/* ─────────────────────────────────────────────────────────────
   ReviewsPortal — Design System (based on MarketCards)
   ───────────────────────────────────────────────────────────── */

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

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --primary:        #6366f1;
  --primary-dark:   #4f46e5;
  --primary-light:  #e0e7ff;
  --success:        #22c55e;
  --success-light:  #dcfce7;
  --warning:        #f59e0b;
  --warning-light:  #fef3c7;
  --danger:         #ef4444;
  --danger-light:   #fee2e2;
  --info:           #3b82f6;
  --info-light:     #dbeafe;
  --secondary:      #64748b;

  --sidebar-bg:     #0f172a;
  --sidebar-text:   #94a3b8;
  --sidebar-hover:  rgba(99,102,241,.12);
  --sidebar-active: #6366f1;
  --sidebar-border: rgba(148,163,184,.1);

  --bg:             #f1f5f9;
  --card-bg:        #ffffff;
  --border:         #e2e8f0;
  --border-focus:   #6366f1;

  --text:           #1e293b;
  --text-muted:     #64748b;
  --text-light:     #94a3b8;

  --radius:         10px;
  --radius-sm:      6px;
  --radius-lg:      16px;
  --shadow:         0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:      0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:      0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);

  --sidebar-w:      240px;
  --topbar-h:       64px;
  --transition:     .2s ease;

  /* legacy compat aliases */
  --c-primary:       var(--primary);
  --c-primary-light: var(--primary-light);
  --c-success:       var(--success);
  --c-warning:       var(--warning);
  --c-danger:        var(--danger);
  --c-info:          var(--info);
  --c-text:          var(--text);
  --c-text-muted:    var(--text-muted);
  --c-text-faint:    var(--text-light);
  --c-surface:       var(--card-bg);
  --c-surface2:      #f8fafc;
  --c-border:        var(--border);
  --c-border-light:  #cbd5e1;
  --c-r1: #ef4444; --c-r2: #f97316; --c-r3: #f59e0b; --c-r4: #84cc16; --c-r5: #22c55e;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── App Layout ─────────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--sidebar-border); border-radius: 4px; }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sidebar-logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}
.sidebar-logo-text { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -.3px; }
.sidebar-logo-sub  { font-size: 10px; color: var(--sidebar-text); margin-top: 1px; }

.sidebar-nav { padding: 12px 0; flex: 1; }

.nav-section-title, .nav-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-light);
  padding: 12px 20px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  cursor: pointer;
  text-decoration: none;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--sidebar-hover); color: #fff; }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; opacity: .75; font-size: 15px; }
.nav-item.active .nav-icon, .nav-item:hover .nav-icon { opacity: 1; }
.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
}

.sidebar-footer, .sidebar-bottom {
  padding: 12px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sidebar-user, .user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.sidebar-user:hover, .user-card:hover { background: var(--sidebar-hover); text-decoration: none; }
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}
.user-info, .user-card > div { flex: 1; min-width: 0; }
.user-name {
  font-size: 13px; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-role { font-size: 11px; color: var(--sidebar-text); }

/* ── Main Content ────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  flex: 1;
}

/* ── Topbar ──────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title    { font-size: 18px; font-weight: 700; color: var(--text); flex: 1; }
.topbar-breadcrumb { font-size: 13px; color: var(--text-muted); flex: 1; }
.topbar-actions  { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--success-light);
  color: #15803d;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
}
.balance-chip:hover { text-decoration: none; filter: brightness(.97); }
.balance-chip.low { background: var(--danger-light); color: #991b1b; }

/* ── Page Content ───────────────────────────────────────────── */
.page-content { padding: 24px; flex: 1; }

/* ── Page Header ────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-title    { font-size: 22px; font-weight: 700; color: var(--text); }
.page-subtitle { font-size: 13.5px; color: var(--text-muted); margin-top: 3px; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-body { padding: 20px; }

/* ── Stats Grid ─────────────────────────────────────────────── */
.stats-grid, .stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
}
.stat-icon.blue   { background: var(--info-light);    color: var(--info); }
.stat-icon.green  { background: var(--success-light); color: var(--success); }
.stat-icon.yellow { background: var(--warning-light); color: var(--warning); }
.stat-icon.purple { background: var(--primary-light); color: var(--primary); }
.stat-icon.red    { background: var(--danger-light);  color: var(--danger); }
.stat-body { flex: 1; min-width: 0; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 12.5px; color: var(--text-muted); font-weight: 500; }
.stat-sub, .stat-trend { font-size: 11.5px; font-weight: 500; margin-top: 5px; color: var(--text-muted); }
.stat-trend.up   { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-bg);
  box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  background: #f8fafc;
  padding: 11px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: var(--text);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f8fafc; }
.td-muted { color: var(--text-muted); font-size: 12.5px; }
.td-name  { font-weight: 600; }
.td-sub   { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-success   { background: var(--success-light); color: #15803d; }
.badge-warning   { background: var(--warning-light); color: #92400e; }
.badge-danger    { background: var(--danger-light);  color: #991b1b; }
.badge-info      { background: var(--info-light);    color: #1d4ed8; }
.badge-secondary { background: #f1f5f9;              color: var(--secondary); }
.badge-primary   { background: var(--primary-light); color: var(--primary-dark); }

/* Marketplace badges */
.mp-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.mp-wildberries { background: #f3e8ff; color: #7c3aed; }
.mp-ozon        { background: #e0f2fe; color: #0369a1; }
.mp-yandex_market { background: #fef9c3; color: #854d0e; }
.mp-avito       { background: #dcfce7; color: #166534; }
.mp-sbermarket  { background: #dcfce7; color: #15803d; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { filter: brightness(.92); }

.btn-danger  { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { filter: brightness(.92); }

.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-warning:hover { filter: brightness(.92); }

.btn-secondary {
  background: #f1f5f9; color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: #e2e8f0; color: var(--text); }

.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: #f8fafc; color: var(--text); }

.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; padding: 6px 10px; }
.btn-ghost:hover { background: #f1f5f9; color: var(--text); }

.btn-sm { padding: 5px 12px; font-size: 12.5px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { padding: 6px; min-width: 32px; justify-content: center; }
.btn:disabled, .btn.loading { opacity: .6; pointer-events: none; }
.w-full { width: 100%; justify-content: center; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px; font-weight: 500;
  color: var(--text); margin-bottom: 6px;
}
.form-label .req { color: var(--danger); margin-left: 3px; }
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--card-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.form-control::placeholder { color: var(--text-light); }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { cursor: pointer; }
.form-hint  { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
.input-group { display: flex; gap: 8px; }
.input-group .form-control { flex: 1; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* Toggle ───────────────────────────────────────────────────── */
.toggle-label { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle {
  appearance: none;
  width: 38px; height: 22px;
  background: var(--border);
  border-radius: 20px;
  position: relative;
  cursor: pointer;
  transition: background var(--transition);
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  top: 3px; left: 3px;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle:checked { background: var(--primary); }
.toggle:checked::after { transform: translateX(16px); }

/* ── Progress Bar ───────────────────────────────────────────── */
.progress { height: 6px; background: #e2e8f0; border-radius: 10px; overflow: hidden; margin-bottom: 4px; }
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
  border-radius: 10px;
  transition: width .4s ease;
  min-width: 2px;
}
.progress-bar.success { background: linear-gradient(90deg, #22c55e, #16a34a); }
.progress-bar.warning { background: linear-gradient(90deg, #f59e0b, #d97706); }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: all .2s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(12px) scale(.98);
  transition: transform .2s;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 960px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 17px; font-weight: 700; color: var(--text); }
.modal-close {
  width: 32px; height: 32px;
  border: none; background: #f1f5f9;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 18px; line-height: 1;
  transition: all var(--transition);
}
.modal-close:hover { background: #e2e8f0; color: var(--text); }
.modal-body { padding: 24px; }
.modal-footer {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ── Toast ──────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-width: 280px; max-width: 380px;
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: toastIn .3s ease;
}
@keyframes toastIn  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.toast.removing     { animation: toastOut .3s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); height: 0; padding: 0; margin: 0; } }
.toast-icon  { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.toast-body  { flex: 1; }
.toast-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.toast-msg   { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.toast.success .toast-icon { color: var(--success); }
.toast.error   .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info    .toast-icon { color: var(--info); }

/* ── Tabs ───────────────────────────────────────────────────── */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-btn {
  padding: 10px 18px;
  font-size: 13.5px; font-weight: 500;
  color: var(--text-muted);
  border: none; background: transparent;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 16px 0; }
.page-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--card-bg);
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; color: var(--text);
  cursor: pointer; transition: all var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .4; pointer-events: none; }

/* ── Search Bar ─────────────────────────────────────────────── */
.search-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.search-input-wrap { position: relative; flex: 1; min-width: 200px; }
.search-input-wrap .search-icon {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none; font-size: 14px;
}
.search-input-wrap .form-control { padding-left: 32px; }

/* ── Balance Card (gradient) ────────────────────────────────── */
.balance-card, .balance-widget {
  background: linear-gradient(135deg, #0f172a, #1e1b4b);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}
.balance-card::before, .balance-widget::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: rgba(99,102,241,.2); border-radius: 50%;
}
.balance-card::after, .balance-widget::after {
  content: '';
  position: absolute; bottom: -60px; right: 60px;
  width: 120px; height: 120px;
  background: rgba(139,92,246,.15); border-radius: 50%;
}
.balance-label    { font-size: 13px; opacity: .7; margin-bottom: 8px; position: relative; z-index: 1; }
.balance-amount   { font-size: 38px; font-weight: 800; letter-spacing: -1px; position: relative; z-index: 1; }
.balance-amount.low { color: #fca5a5; }
.balance-currency { font-size: 22px; margin-right: 4px; opacity: .7; }
.balance-footer, .balance-tariff {
  margin-top: 16px; font-size: 13px; opacity: .8;
  position: relative; z-index: 1;
}
.balance-footer { display: flex; gap: 24px; }

/* ── Rating bars ────────────────────────────────────────────── */
.rating-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rating-bar-label { width: 20px; font-size: 12px; font-weight: 600; color: var(--text-muted); flex-shrink: 0; }
.rating-bar-track { flex: 1; height: 8px; background: #f1f5f9; border-radius: 10px; overflow: hidden; }
.rating-bar-fill  { height: 100%; border-radius: 10px; transition: width .4s ease; min-width: 2px; }
.rating-bar-count { width: 28px; font-size: 12px; color: var(--text-muted); text-align: right; flex-shrink: 0; }

/* ── Auth Page ──────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  padding: 20px;
}
.auth-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 420px;
  padding: 40px;
}
.auth-logo {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 32px;
}
.auth-logo-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.auth-logo-text { font-size: 22px; font-weight: 800; color: var(--text); }
.auth-logo-sub  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.auth-title { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.auth-sub   { font-size: 13.5px; color: var(--text-muted); margin-bottom: 28px; }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-success { background: var(--success-light); color: #15803d; border-color: #bbf7d0; }
.alert-danger  { background: var(--danger-light);  color: #991b1b; border-color: #fecaca; }
.alert-warning { background: var(--warning-light); color: #92400e; border-color: #fde68a; }
.alert-info    { background: var(--info-light);    color: #1d4ed8; border-color: #bfdbfe; }

/* ── Empty State ────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state-icon  { font-size: 42px; margin-bottom: 14px; opacity: .5; }
.empty-state-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-state p, .empty-state-sub { font-size: 13.5px; }

/* ── Spinner ────────────────────────────────────────────────── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
.spinner.dark {
  border-color: rgba(99,102,241,.2);
  border-top-color: var(--primary);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Stars Renderer (reviews rating) ─────────────────────────── */
.stars { display: inline-flex; gap: 2px; }
.star  { color: var(--border); }
.star.filled { color: var(--warning); }

/* ── Misc utilities ─────────────────────────────────────────── */
.text-muted   { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.mb-0  { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.ms-auto { margin-left: auto; }
.w-100  { width: 100%; }

/* ── Chart container ────────────────────────────────────────── */
.chart-wrap { position: relative; height: 220px; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .page-content { padding: 16px; }
  .stats-grid, .stat-grid { grid-template-columns: 1fr 1fr; }
  #sidebar-toggle { display: flex !important; }
  .topbar-title { font-size: 15px; }
}
@media (max-width: 480px) {
  .stats-grid, .stat-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
}
