/**
 * Admin Portal Styles
 * Gramado Wine E-commerce
 */

:root {
  --sand: #F1CC98;
  --marsala: #800020;
  --gold: #D4AF37;
  --dark-bg: #1a1a1a;
  --light-bg: #f8f9fa;
  --border-color: #dee2e6;
  --text-dark: #333;
  --text-muted: #6c757d;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --info: #17a2b8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--light-bg);
  color: var(--text-dark);
  height: 100%;
  overflow: hidden;
}

/* ===== LAYOUT ===== */

.admin-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background: linear-gradient(180deg, #800020 0%, #600018 100%);
  border-right: 1px solid rgba(212, 175, 55, 0.2);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  
}

.sidebar-logo img {
  max-width: 180px;
  height: auto;
  filter: brightness(1.1);
}

.sidebar-logo h1 {
  font-size: 24px;
  font-weight: 600;
}

.sidebar-nav {
  padding: 20px 0;
}

.nav-section-title {
  padding: 10px 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--sand);
  letter-spacing: 0.5px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: var(--gold);
  color: white;
}

.nav-link.active {
  background: rgba(212, 175, 55, 0.15);
  /* color: var(--gold); */
  border-left-color: var(--gold);
  font-weight: 600;
}

.nav-link i {
 width: 20px;
  text-align: center;
}

/* Main Content */
.admin-main {
  margin-left: 260px;
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Header */
.admin-header {
  background: white;
  border-bottom: 1px solid var(--border-color);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-title h1 {
  font-family:  'Inter', sans-serif;
  font-size: 24px;
  color: var(--marsala);
}

.header-title p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--marsala);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-details strong {
  display: block;
  font-size: 14px;
  color: var(--text-dark);
  line-height: 1.2;
}

.user-details small {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.2;
}

/* Content */
.admin-content {
  padding: 30px;
}

/* ===== COMPONENTS ===== */

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border-color);
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
}

.stat-icon.primary { background: var(--marsala); }
.stat-icon.success { background: var(--marsala) }
.stat-icon.warning { background: var(--marsala) }
.stat-icon.info { background: var(--marsala) }

.stat-trend {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.stat-trend.up {
  background: rgba(40, 167, 69, 0.1);
  color: var(--success);
}

.stat-trend.down {
  background: rgba(220, 53, 69, 0.1);
  color: var(--danger);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
}

/* Tables */
.table-container {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
 
}

.table-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-header > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.table-header h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.table-header h2 i {
  margin-right: 8px;
  color: var(--sand);
}

.table-header span {
  font-size: 14px;
  color: var(--text-muted);
}

.table-actions {
  display: flex;
  gap: 10px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: var(--light-bg);
}

.data-table th {
  text-align: left;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-dark);
  border-bottom: 2px solid var(--border-color);
}

.data-table td {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.data-table tbody tr:hover {
  background: var(--light-bg);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.col-name {
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge.success {
  background: rgba(40, 167, 69, 0.1);
  color: var(--success);
}

.badge.warning {
  background: rgba(255, 193, 7, 0.1);
  color: #856404;
}

.badge.danger {
  background: rgba(220, 53, 69, 0.1);
  color: var(--danger);
}

.badge.info {
  background: rgba(23, 162, 184, 0.1);
  color: var(--info);
}

.badge.primary {
  background: rgba(108, 117, 125, 0.1);
  color: var(--text-muted);
}

.badge.secondary {
  background: rgba(108, 117, 125, 0.1);
  color: var(--text-muted);
}

/* Badges específicos para categorização de produtos */
.badge-categoria,
.badge-subcategoria,
.badge-none {
  display: inline-block;
  padding: 3px 8px;
  font-size: 9px;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-categoria {
  background: rgba(128, 0, 32,0.8);
  color: white;
}

.badge-subcategoria {
  background: rgba(212, 175, 55, 0.2);
  color: black
}

.badge-none {
  background: rgba(136, 136, 136, 0.2);
  color: black
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-primary {
  background: var(--marsala);
  color: white;
}

.btn-primary:hover {
  background: #600018;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-warning {
  background: var(--warning);
  color: var(--text-dark);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--marsala);
  color: var(--marsala);
}

.btn-outline:hover {
  background: var(--marsala);
  color: white;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Filters */
.filters {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}

.form-control {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--marsala);
  box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.1);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

/* Modal overlay for address modal (above user modal) */
.modal.modal-overlay {
  z-index: 1100;
}

.modal-dialog {
  background: white;
  border-radius: 12px;
  max-width: 720px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--marsala);
  box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.1);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 64px;
  opacity: 0.3;
  margin-bottom: 20px;
}

.empty-state h3 {
  margin-bottom: 10px;
}

/* Loading */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--light-bg);
  border-top-color: var(--marsala);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== LOADING OVERLAY ===== */

.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
}

.loading-overlay.active {
  display: flex;
}

.loading-overlay .spinner {
  width: 60px;
  height: 60px;
  border: 6px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-overlay p {
  color: white;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  max-width: 300px;
}

/* ===== TOGGLE SWITCH ===== */

.toggle-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 15px 0;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 28px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--success);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.toggle-label {
  font-weight: 500;
  color: var(--text-dark);
  user-select: none;
}

/* Address list in modal */
.address-list {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid var(--border-color);
}

.address-item {
  padding: 12px;
  background: var(--light-bg);
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}

/* ===== TOAST SYSTEM ===== */

#toast-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  top: auto;
  right: auto;
  z-index: 10000;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  max-width: 400px;
}

.toast {
  background: white;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  transform: translateX(-400px); /* Slide from left */
  opacity: 0;
  transition: all 0.3s ease;
  border-left: 4px solid var(--marsala);
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hide {
  transform: translateX(-400px);
  opacity: 0;
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--text-dark);
}

.toast-message {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-close:hover {
  color: var(--text-dark);
}

/* Toast types */
.toast.success {
  border-left-color: var(--success);
}

.toast.success .toast-icon {
  color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.error .toast-icon {
  color: var(--danger);
}

.toast.warning {
  border-left-color: var(--warning);
}

.toast.warning .toast-icon {
  color: var(--warning);
}

.toast.info {
  border-left-color: var(--info);
}

.toast.info .toast-icon {
  color: var(--info);
}

.address-item.default {
  background: linear-gradient(135deg, #fff9f0 0%, var(--light-bg) 100%);
  border-left: 3px solid var(--gold);
}

.address-item strong {
  color: var(--marsala);
  display: block;
  margin-bottom: 4px;
}

/* ===== DASHBOARD FILTERS ===== */

.dashboard-filters {
  display: flex;
  gap: 15px;
  align-items: flex-end;
  flex-wrap: wrap;
  background: white;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 30px;
}

.dashboard-filters .filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 150px;
}

.dashboard-filters .filter-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.dashboard-filters .filter-group select,
.dashboard-filters .filter-group input {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  min-width: 150px;
  transition: all 0.3s;
}

.dashboard-filters .filter-group select:focus,
.dashboard-filters .filter-group input:focus {
  outline: none;
  border-color: var(--marsala);
  box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.1);
}

.dashboard-filters button {
  margin-top: 20px;
}

/* ===== STAT COMPARISON ===== */

.stat-comparison {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ===== RANKING TABLE ===== */

.ranking-table {
  font-size: 13px;
}

.ranking-table .rank-position {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ranking-table .medal {
  font-size: 20px;
}

.ranking-table .rank-number {
  font-weight: 600;
  background: var(--light-bg);
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
}

.ranking-table .seller-name strong {
  color: var(--text-dark);
  font-weight: 600;
}

.ranking-table .seller-sales .value {
  font-weight: 600;
  color: var(--marsala);
}

.ranking-table .growth {
  font-weight: 600;
  font-size: 12px;
}

.ranking-table .growth.positive {
  color: var(--success);
}

.ranking-table .growth.negative {
  color: var(--danger);
}

.ranking-table .growth i {
  margin-right: 3px;
}

.ranking-table tbody tr:hover {
  background: rgba(128, 0, 32, 0.02);
  cursor: pointer;
}

/* ===== STATS GRID (3 COLUMNS) ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== RESPONSIVE UPDATES ===== */

@media (max-width: 1200px) {
  .dashboard-filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .dashboard-filters .filter-group {
    width: 100%;
  }
  
  .dashboard-filters button {
    margin-top: 0;
  }
}

/* Responsive */
@media (max-width: 968px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }
  
  .admin-sidebar.active {
    transform: translateX(0);
  }
  
  .admin-main {
    margin-left: 0;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .filters {
    flex-direction: column;
  }
  
  /* Grids responsivos - todos viram 1 coluna em mobile */
  .charts-grid-2,
  .charts-grid-3,
  .tables-grid-2 {
    grid-template-columns: 1fr !important;
  }
}

/* ===== DASHBOARD GRIDS ===== */

/* Grid 2 colunas - Gráficos de Linha */
.charts-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

/* Grid 3 colunas - Gráficos Donut */
.charts-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

/* Grid 2 colunas - Tabelas */
.tables-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

/* Tabela largura total */
.table-wide {
  width: 100%;
  margin-bottom: 30px;
}

/* Tablet (768px - 1200px) */
@media (max-width: 1200px) {
  .charts-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ===== SHIPPING METHODS SPECIFIC STYLES ===== */

/* Method Cards Grid */
#methodsList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.method-card {
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
}

.method-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  border-color: var(--marsala);
}

.method-card.inactive {
  opacity: 0.6;
}

.method-header {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: var(--light-bg);
  border-bottom: 1px solid var(--border-color);
}

.method-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--marsala), #600018);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  flex-shrink: 0;
}

.method-info {
  flex: 1;
}

.method-info h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.method-type {
  font-size: 12px;
  color: var(--text-muted);
}

.method-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.btn-icon:hover {
  background: var(--light-bg);
  color: var(--marsala);
}

.btn-icon.btn-danger:hover {
  background: rgba(220, 53, 69, 0.1);
  color: var(--danger);
}

.method-body {
  padding: 20px;
}

.method-body p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 15px;
  line-height: 1.6;
}

.method-details {
  display: flex;
  gap: 20px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dark);
}

.detail-item i {
  color: var(--marsala);
}

/* Form Rows */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

.form-group small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Info Card */
.info-card {
  background: linear-gradient(135deg, rgba(128, 0, 32, 0.05), rgba(212, 175, 55, 0.05));
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 25px;
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.info-card i {
  color: var(--sand);
  font-size: 20px;
  margin-top: 2px;
}

.info-card strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text-dark);
}

.info-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

/* Card Component */
.card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.card-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--light-bg);
}

.card-header h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.card-body {
  padding: 20px;
}

/* Modal Variations */
.modal-content {
  background: white;
  /* border-radius: 12px; */
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content.modal-sm {
  max-width: 400px;
}

.text-warning {
  color: var(--marsala);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

.sidebar-header h2,
.sidebar-header p {
  color: white;
  margin: 0;
}

.sidebar-header h2 {
  font-size: 20px;
  font-weight: 600;
}

.sidebar-header p {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 4px;
}

.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  font-weight: 600;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  background: var(--text-muted);
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.admin-header h1 {
  font-size: 24px;
  color: var(--marsala);
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-header h1 i {
  color: var(--gold);
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  /* border-left-color: var(--gold); */
  color: white;
}

.sidebar-nav a.active {
  background: rgba(212, 175, 55, 0.20);
  /* color: var(--gold); */
  border-left-color: var(--sand);
  font-weight: 600;
}

.sidebar-nav a i {
  width: 20px;
  text-align: center;
}



/* ===== MODAL IMPROVEMENTS (Dark Theme like Account Area) ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.modal-dialog {
  background: linear-gradient(145deg, #2D2A29 0%, #1a1918 100%);
  border-radius: 0;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
  border: 1px solid rgba(212, 175, 55, 0.15);
}

.modal-header {
  padding: 24px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, #800020, #600018);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--gold);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--gold);
}

.modal-body {
  padding: 30px;
  background: linear-gradient(145deg, #2D2A29 0%, #1a1918 100%);
  max-height: calc(90vh - 180px);
  overflow-y: auto;
}

.modal-footer {
  padding: 20px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: #1a1918;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--gold);
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
}

.form-group small {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  margin-top: 6px;
  font-family: 'Inter', sans-serif;
  text-transform: none;
  letter-spacing: normal;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
  
}

.form-control:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

.form-control:disabled {
  background: rgba(255, 255, 255, 0.02);
  cursor: not-allowed;
  opacity: 0.5;
}

.form-control option {
  background: white;
  color: black;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--marsala);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a02030;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--marsala);
  border-radius: 10px;
}

/* ===== TOGGLE SWITCH (Beautiful with Circle) ===== */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  vertical-align: middle;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--gold);
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 2px var(--gold);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

/* ===== IMPROVED CHECKBOXES ===== */
input[type="checkbox"]:not(.toggle-switch input) {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--gold);
  vertical-align: middle;
  margin-right: 8px;
}
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.modal-dialog {
  background: #fff;
  border-radius: 8px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  /* box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); */
  animation: slideUp 0.3s ease;
}

.modal-dialog.modal-lg {
  max-width: 1200px;
  width: 95%;
}

.modal-lg .modal-content {
  max-width: none;
  width: 100%;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #dee2e6;
  background: linear-gradient(135deg, #800020, #600018);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px 8px 0 0;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--sand);
  font-family: 'Inter', sans-serif; font-weight: 600;
  font-weight: 400;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #D4AF37;
}

.modal-body {
  padding: 24px;
  background: #fff;
}

/* Specific styles for ranking modals (sellers and products) */
#sellersModal .modal-body,
#productsModal .modal-body {
  padding: 0;
}

#sellersModal .modal-body table,
#productsModal .modal-body table {
  width: 100%;
  margin: 0;
  table-layout: auto;
}

#sellersModal .data-table,
#sellersModal .ranking-table,
#productsModal .data-table,
#productsModal .ranking-table {
  width: 100% !important;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #dee2e6;
  background: #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-radius: 0 0 8px 8px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #333;
  font-size: 0.7rem;
}

.form-group small {
  display: block;
  color: #6c757d;
  font-size: 0.85rem;
  margin-top: 4px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: #800020;
  box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.1);
}

.form-control:disabled {
  background: #e9ecef;
  cursor: not-allowed;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ===== CUSTOM SCROLLBAR (Like Account Area) ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--marsala);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a02030;
}

/* ===== TOGGLE SWITCH (Beautiful with Circle) ===== */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--marsala);
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 1px var(--marsala);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

/* ===== IMPROVED FORM CONTROLS ===== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="url"],
select,
textarea {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.8rem;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: all 0.2s ease;
  background: white;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--marsala);
  box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.1);
}

input:disabled,
select:disabled,
textarea:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.6;
}

input[type='checkbox']:not(.toggle-switch input) {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--marsala);
}

label {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-dark);
}

small, .hint-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--marsala);
  border-radius: 10px;
}

/* ===== TOAST NOTIFICATIONS (Bottom Left) ===== */
#toast-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(145deg, #2D2A29, #1a1918);
  border-left: 4px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  color: white;
  font-family: 'Inter', sans-serif;
  transform: translateX(-400px);
  opacity: 0;
  transition: all 0.3s ease;
  min-width: 300px;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hide {
  transform: translateX(-400px);
  opacity: 0;
}

.toast.success {
  border-left-color: #28a745;
}

.toast.error {
  border-left-color: #dc3545;
}

.toast.warning {
  border-left-color: #ffc107;
}

.toast.info {
  border-left-color: #17a2b8;
}

.toast-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  color: #28a745;
}

.toast.error .toast-icon {
  color: #dc3545;
}

.toast.warning .toast-icon {
  color: #ffc107;
}

.toast.info .toast-icon {
  color: #17a2b8;
}

.toast-content {
  flex: 1;
}

.toast-message {
  font-size: 0.95rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.95);
}

.toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* ===== CONFIRM MODAL SPECIFIC ===== */
.admin-modal-message {
  font-size: 1rem !important;
  line-height: 1.6;
  margin: 0;
  font-family: 'Inter', sans-serif;
}

#adminConfirmModal .modal-body {
  padding: 30px;
  text-align: center;
}

/* Truncate long product names */
.data-table td:nth-child(2) {
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Selects de Ordena��o nos Rankings */
.filter-select {
  padding: 6px 32px 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: white;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2712%27 height=%278%27 viewBox=%270 0 12 8%27%3e%3cpath fill=%27%23495057%27 d=%27M6 8L0 0h12z%27/%3e%3c/svg%3e');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
}

.filter-select:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

