@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #06060f;
  --bg-secondary: #0d0d1a;
  --bg-card: rgba(18, 18, 35, 0.85);
  --bg-card-hover: rgba(25, 25, 50, 0.95);
  --bg-input: rgba(15, 15, 30, 0.9);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  --text-primary: #f0f0f5;
  --text-secondary: #8b8ba3;
  --text-muted: #5a5a72;

  --accent-primary: #6c5ce7;
  --accent-secondary: #00cec9;
  --accent-gradient: linear-gradient(135deg, #6c5ce7, #a29bfe);

  --shopee: #ee4d2d;
  --tokopedia: #42b549;
  --tiktok: #ff0050;
  --lazada: #0f146d;
  --blibli: #0094da;

  --success: #00b894;
  --warning: #fdcb6e;
  --danger: #d63031;
  --info: #74b9ff;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(108, 92, 231, 0.15);
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background animated gradient */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 20% 50%, rgba(108, 92, 231, 0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(0, 206, 201, 0.04) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, rgba(255, 0, 80, 0.03) 0%, transparent 50%);
  z-index: -1;
  animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-2%, 1%) rotate(1deg); }
  66% { transform: translate(1%, -1%) rotate(-1deg); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(108, 92, 231, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(108, 92, 231, 0.5); }

/* ===== APP LAYOUT ===== */
#app {
  min-height: 100vh;
}

/* ===== LOGIN PAGE ===== */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: fadeInUp 0.6s ease;
}

.login-card .logo {
  text-align: center;
  margin-bottom: 36px;
}

.login-card .logo h1 {
  font-size: 28px;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.login-card .logo p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 6px;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: all 0.3s ease;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.form-control::placeholder {
  color: var(--text-muted);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b8ba3' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(108, 92, 231, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
}

.btn-success {
  background: linear-gradient(135deg, #00b894, #00cec9);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, #d63031, #e17055);
  color: white;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== MAIN LAYOUT ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(20px);
  padding: 24px 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--border);
}

.sidebar-header h1 {
  font-size: 22px;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-header p {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 16px 12px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: rgba(108, 92, 231, 0.08);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(108, 92, 231, 0.15);
  color: var(--accent-primary);
  font-weight: 600;
}

.nav-item .icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.sync-info {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Main content */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 24px 32px;
  min-height: 100vh;
}

/* ===== TOP HEADER BAR ===== */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.top-bar h2 {
  font-size: 24px;
  font-weight: 700;
}

.top-bar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 150px;
}

.filter-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group .form-control {
  padding: 10px 14px;
  font-size: 13px;
}

/* ===== STAT CARDS ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card.omzet::before { background: var(--accent-gradient); }
.stat-card.pcs::before { background: linear-gradient(135deg, #00b894, #55efc4); }
.stat-card.retur::before { background: linear-gradient(135deg, #fdcb6e, #ffeaa7); }
.stat-card.batal::before { background: linear-gradient(135deg, #d63031, #ff7675); }

.stat-card .stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 12px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
}

.stat-card .stat-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.stat-card.omzet .stat-value { color: #a29bfe; }
.stat-card.pcs .stat-value { color: #55efc4; }
.stat-card.retur .stat-value { color: #ffeaa7; }
.stat-card.batal .stat-value { color: #ff7675; }

/* ===== DATA PANELS ===== */
.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.panel-header h3 {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-body {
  padding: 8px 0;
  max-height: 400px;
  overflow-y: auto;
}

.rank-item {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  gap: 14px;
  transition: background 0.2s ease;
}

.rank-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.rank-number {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  width: 28px;
  text-align: center;
}

.rank-item:nth-child(1) .rank-number { color: #ffd700; }
.rank-item:nth-child(2) .rank-number { color: #c0c0c0; }
.rank-item:nth-child(3) .rank-number { color: #cd7f32; }

.rank-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.rank-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-secondary);
}

/* ===== PLATFORM BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-shopee { background: rgba(238,77,45,0.15); color: var(--shopee); }
.badge-tokopedia { background: rgba(66,181,73,0.15); color: var(--tokopedia); }
.badge-tiktok { background: rgba(255,0,80,0.15); color: var(--tiktok); }
.badge-lazada { background: rgba(15,20,109,0.3); color: #6c7bff; }
.badge-blibli { background: rgba(0,148,218,0.15); color: var(--blibli); }
.badge-default { background: rgba(255,255,255,0.08); color: var(--text-secondary); }

/* Status badges */
.badge-success { background: rgba(0,184,148,0.15); color: var(--success); }
.badge-warning { background: rgba(253,203,110,0.15); color: var(--warning); }
.badge-danger { background: rgba(214,48,49,0.15); color: var(--danger); }
.badge-info { background: rgba(116,185,255,0.15); color: var(--info); }

/* ===== TABLE ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-card);
}

.data-table td {
  padding: 14px 16px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-secondary);
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ===== SETTINGS PAGE ===== */
.settings-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px;
  margin-bottom: 24px;
  width: fit-content;
}

.settings-tab {
  padding: 10px 24px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-tab.active {
  background: var(--accent-gradient);
  color: white;
}

.settings-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
}

/* Settings card */
.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
}

.settings-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.settings-card-body {
  padding: 0;
  max-height: 600px;
  overflow-y: auto;
}

/* Store list item */
.store-item {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  gap: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.2s ease;
}

.store-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.store-item:last-child {
  border-bottom: none;
}

.store-info {
  flex: 1;
}

.store-info .name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.store-info .meta {
  font-size: 12px;
  color: var(--text-muted);
}

.store-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.store-actions select {
  padding: 6px 12px;
  font-size: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  outline: none;
}

/* Marketing list */
.marketing-item {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  gap: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.marketing-item:last-child {
  border-bottom: none;
}

.marketing-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: white;
  flex-shrink: 0;
}

.marketing-info {
  flex: 1;
}

.marketing-info .name {
  font-weight: 600;
  color: var(--text-primary);
}

.marketing-info .stats {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
  padding: 20px;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.3s ease;
}

.modal h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ===== LOADING ===== */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  flex-direction: column;
  gap: 16px;
  color: var(--text-muted);
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  min-width: 280px;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 14px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.fade-in {
  animation: fadeIn 0.4s ease;
}

/* ===== MOBILE TOGGLE ===== */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .panel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: 70px 12px 24px;
  }

  .stat-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    overflow-x: hidden;
    max-width: 100%;
  }

  .main-content {
    overflow-x: hidden;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-card .stat-value {
    font-size: 22px;
  }

  .stat-card .stat-label {
    font-size: 10px;
  }

  /* Filter bar: stack vertically on mobile */
  .filter-bar {
    padding: 14px;
    flex-direction: column;
    gap: 10px;
  }

  .filter-group {
    min-width: unset;
    width: 100%;
  }

  .filter-group .form-control {
    padding: 12px 14px;
    font-size: 16px; /* prevents iOS zoom */
  }

  .filter-group label {
    font-size: 11px;
  }

  /* Larger touch targets for buttons */
  .btn {
    padding: 14px 20px;
    font-size: 14px;
  }

  .btn-sm {
    padding: 12px 18px;
    font-size: 13px;
    width: 100%;
    justify-content: center;
  }

  /* Form controls bigger on mobile */
  .form-control {
    padding: 14px 16px;
    font-size: 16px; /* prevents iOS zoom on focus */
  }

  select.form-control {
    padding: 14px 36px 14px 16px;
    font-size: 16px;
  }

  /* Top bar */
  .top-bar {
    margin-bottom: 16px;
  }

  .top-bar h2 {
    font-size: 18px;
  }

  .top-bar-actions {
    flex-direction: column;
    align-items: flex-end;
  }

  /* Tables: smaller padding */
  .data-table th {
    padding: 10px 10px;
    font-size: 10px;
  }

  .data-table td {
    padding: 10px 10px;
    font-size: 12px;
  }

  /* Panel header */
  .panel-header {
    padding: 14px 16px;
    flex-wrap: wrap;
  }

  .panel-header h3 {
    font-size: 14px;
  }

  /* Settings card */
  .settings-card-header {
    padding: 14px 16px;
  }

  /* Store / marketing items */
  .store-item, .marketing-item {
    padding: 12px 14px;
    flex-wrap: wrap;
  }

  .store-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 8px;
  }

  /* Modal */
  .modal {
    padding: 24px 18px;
    margin: 10px;
  }

  .modal h3 {
    font-size: 16px;
  }

  /* Rank items */
  .rank-item {
    padding: 10px 16px;
  }

  .rank-value {
    font-size: 12px;
  }

  /* Toast */
  .toast-container {
    left: 12px;
    right: 12px;
    top: 12px;
  }

  .toast {
    min-width: unset;
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stat-card .stat-value {
    font-size: 22px;
  }

  .login-card {
    padding: 28px 18px;
  }

  .main-content {
    padding: 66px 10px 20px;
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== ORDERS TABLE PANEL ===== */
.orders-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.orders-panel .panel-body {
  overflow-x: auto;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.pagination button {
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  transition: all 0.2s ease;
}

.pagination button:hover:not(:disabled) {
  background: rgba(108, 92, 231, 0.1);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.pagination button.active {
  background: var(--accent-gradient);
  color: white;
  border-color: transparent;
}

.pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination .page-info {
  font-size: 13px;
  color: var(--text-muted);
  padding: 0 12px;
}

/* ===== FORM GRIDS ===== */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 10px;
  margin-bottom: 16px;
  gap: 12px;
}

@media (max-width: 768px) {
  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form-preview-bar {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }

  .form-preview-bar .btn {
    width: 100%;
  }
}
@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
}
