/* =====================================================
   TU@SL Fashion — Admin Dashboard Styles
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Inter', sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  line-height: 1.6;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
img { display: block; max-width: 100%; }

/* ---- Variables ---- */
:root {
  --brand:       #8b1e3f;
  --brand-dark:  #5f1029;
  --brand-light: #fdf2f5;
  --sidebar-bg:  #1a1a2e;
  --sidebar-w:   240px;
  --header-h:    60px;
  --surface:     #ffffff;
  --border:      #e5e8ed;
  --text:        #1a1a2e;
  --muted:       #6b7280;
  --success:     #287a45;
  --info:        #2563eb;
  --warning:     #d97706;
  --danger:      #c62828;
  --pending:     #8b1e3f;
  --radius:      10px;
  --radius-sm:   6px;
  --shadow:      0 1px 4px rgba(0,0,0,0.07);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.10);
}

/* ---- Login page ---- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--sidebar-bg) 0%, #2d1b3d 100%);
}
.login-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-md);
}
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo h1 { font-size: 1.5rem; font-weight: 800; color: var(--brand); }
.login-logo p { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.8125rem; font-weight: 600; margin-bottom: 0.375rem; }
.form-input {
  width: 100%; padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.875rem; font-family: inherit;
  transition: border-color 0.2s;
}
.form-input:focus { outline: none; border-color: var(--brand); }
.form-input.error { border-color: var(--danger); }
.login-error { color: var(--danger); font-size: 0.8125rem; margin-top: 0.5rem; display: none; }
.btn-login {
  width: 100%; padding: 0.75rem;
  background: var(--brand); color: #fff;
  border-radius: var(--radius-sm); font-size: 0.9375rem; font-weight: 700;
  margin-top: 0.5rem; transition: background 0.2s;
}
.btn-login:hover { background: var(--brand-dark); }
.login-hint { font-size: 0.75rem; color: var(--muted); text-align: center; margin-top: 1rem; }

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

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: rgba(255,255,255,0.85);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
}
.sidebar-brand {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand h2 { font-size: 1rem; font-weight: 800; color: #fff; }
.sidebar-brand p { font-size: 0.6875rem; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 0.1em; }
.sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; }
.sidebar-section-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.3);
  padding: 0.75rem 1.25rem 0.25rem;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  border-left: 3px solid transparent;
  transition: all 0.2s;
}
.sidebar-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-link.active { background: rgba(139,30,63,0.35); color: #fff; border-left-color: var(--brand); }
.sidebar-link .badge-count {
  margin-left: auto;
  background: var(--brand);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 50px;
}
.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.sidebar-avatar {
  width: 34px; height: 34px;
  background: var(--brand);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem; font-weight: 700; color: #fff;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 0.8125rem; font-weight: 600; color: #fff; }
.sidebar-user-role { font-size: 0.6875rem; color: rgba(255,255,255,0.45); }
.btn-logout {
  width: 100%;
  padding: 0.5rem;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  text-align: center;
  transition: background 0.2s;
}
.btn-logout:hover { background: rgba(198,40,40,0.4); color: #fff; }

/* ---- Main content area ---- */
.admin-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.admin-topbar {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}
.admin-topbar h1 { font-size: 1.0625rem; font-weight: 700; }
.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--muted);
}
.topbar-date { font-size: 0.8125rem; color: var(--muted); }
.mobile-sidebar-btn { display: none; }

.admin-content {
  padding: 1.5rem;
  flex: 1;
}

/* ---- KPI Cards ---- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.kpi-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.kpi-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.kpi-body { flex: 1; min-width: 0; }
.kpi-label { font-size: 0.75rem; color: var(--muted); font-weight: 500; margin-bottom: 0.25rem; }
.kpi-value { font-size: 1.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 0.25rem; }
.kpi-change {
  font-size: 0.6875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 2px;
}
.kpi-change.up { color: var(--success); }
.kpi-change.down { color: var(--danger); }

/* ---- Section Headers ---- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.section-head h2 { font-size: 1rem; font-weight: 700; }
.section-head .tab-group { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.section-head .tab-btn {
  padding: 0.375rem 0.875rem;
  font-size: 0.75rem; font-weight: 600;
  color: var(--muted);
  transition: all 0.2s;
  background: var(--surface);
}
.section-head .tab-btn.active { background: var(--brand); color: #fff; }
.section-head .tab-btn:hover:not(.active) { background: var(--brand-light); color: var(--brand); }
.btn-sm-outline {
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  transition: all 0.2s;
}
.btn-sm-outline:hover { border-color: var(--brand); color: var(--brand); }

/* ---- Charts row ---- */
.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.chart-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.chart-card canvas { max-height: 260px; }

/* ---- Donut row ---- */
.donut-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.donut-card { background: var(--surface); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.donut-card canvas { max-height: 200px; }
.donut-legend { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.375rem; }
.legend-item { display: flex; align-items: center; justify-content: space-between; font-size: 0.75rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-right: 0.5rem; }
.legend-left { display: flex; align-items: center; color: var(--muted); }
.legend-val { font-weight: 700; color: var(--text); }

/* ---- Tables row ---- */
.tables-row {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* ---- Data Tables ---- */
.table-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.table-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.table-card-header h3 { font-size: 0.9375rem; font-weight: 700; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 0.625rem 1rem;
  text-align: left;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: #fafafa;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafbfc; }
.data-table td.name-cell { font-weight: 600; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Status badges */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 50px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.badge-success  { background: #dcfce7; color: #166534; }
.badge-info     { background: #dbeafe; color: #1d4ed8; }
.badge-warning  { background: #fef3c7; color: #92400e; }
.badge-pending  { background: #fdf2f5; color: #8b1e3f; }
.badge-danger   { background: #fee2e2; color: #991b1b; }
.badge-muted    { background: #f3f4f6; color: #6b7280; }

/* Stock indicator */
.stock-low  { color: var(--danger); font-weight: 700; }
.stock-ok   { color: var(--success); font-weight: 700; }
.trend-up   { color: var(--success); font-size: 0.75rem; font-weight: 700; }
.trend-down { color: var(--danger);  font-size: 0.75rem; font-weight: 700; }

/* ---- Alert strip ---- */
.alert-strip {
  background: #fff8f0;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: #92400e;
}
.alert-strip svg { flex-shrink: 0; color: #f97316; }

/* ---- Date range picker (visual only) ---- */
.date-range {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
}
.date-range:hover { border-color: var(--brand); color: var(--brand); }

/* ---- Progress bar ---- */
.progress-bar { background: var(--border); border-radius: 50px; height: 6px; margin-top: 0.25rem; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 50px; background: var(--brand); }

/* ---- Responsive ---- */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr; }
  .donut-row { grid-template-columns: repeat(2, 1fr); }
  .tables-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .mobile-sidebar-btn { display: flex; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .donut-row { grid-template-columns: 1fr; }
  .admin-content { padding: 1rem; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   Extended styles for admin/index.html
   ===================================================== */

/* ---- Sidebar logo ---- */
.sidebar-logo {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo .brand {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.5px;
}
.sidebar-logo .sub {
  display: block;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(255,255,255,.4);
  margin-top: 2px;
}

/* ---- Nav links ---- */
.nav-section-label {
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.3);
  padding: .75rem 1.25rem .25rem;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1.25rem;
  font-size: .86rem;
  color: rgba(255,255,255,.7);
  border-left: 3px solid transparent;
  transition: all .2s;
}
.nav-link svg { width:18px; height:18px; flex-shrink:0; }
.nav-link:hover { background: rgba(255,255,255,.06); color:#fff; }
.nav-link.active { background: rgba(139,30,63,.35); color:#fff; border-left-color: var(--brand); }
.nav-badge {
  margin-left: auto;
  background: var(--brand);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 50px;
}
.nav-badge.danger { background: var(--danger); }

/* ---- Sidebar user / logout ---- */
.user-avatar {
  width: 34px; height: 34px;
  background: var(--brand);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .875rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.user-info { flex:1; min-width:0; }
.user-name { font-size: .8rem; font-weight: 600; color: #fff; }
.user-role { font-size: .68rem; color: rgba(255,255,255,.4); }
.logout-btn {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.7);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.logout-btn:hover { background: rgba(198,40,40,.5); color:#fff; }
.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* ---- Main wrap / topbar ---- */
.main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.topbar {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}
.sidebar-toggle {
  background: none;
  border: none;
  color: var(--muted);
  padding: 6px;
  border-radius: 6px;
  display: flex;
  display: none; /* hidden on desktop */
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
.topbar-title .topbar-date { display: block; font-size: .75rem; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: .75rem; }
.icon-btn {
  position: relative;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid #fff;
}

/* ---- Content + sections ---- */
.content { padding: 1.5rem; flex: 1; }
.section { margin-bottom: 1.5rem; }
.section-header {
  display: flex; align-items: baseline; gap: .75rem;
  margin-bottom: 1rem;
}
.section-title { font-size: 1rem; font-weight: 700; }
.section-sub { font-size: .78rem; color: var(--muted); }

/* ---- KPI icon ---- */
.kpi-icon-wrap {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  background: var(--brand-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--brand);
}

/* ---- Chart card extensions ---- */
.chart-card.wide  { /* inherits from .chart-card */ }
.chart-card.narrow { /* inherits from .chart-card */ }
.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.chart-card-title { font-size: .92rem; font-weight: 700; }
.chart-card-sub { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.chart-canvas-wrap { position: relative; height: 240px; }
.chart-canvas-wrap.donut-wrap { height: 200px; }
.chart-canvas-wrap.donut-wrap.sm { height: 170px; }
.chart-canvas-wrap canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }

/* Chart toggle buttons */
.chart-toggle { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.ctog {
  padding: .3rem .75rem;
  font-size: .72rem; font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  transition: all .2s;
}
.ctog.active { background: var(--brand); color: #fff; }
.ctog:hover:not(.active) { background: var(--brand-light); color: var(--brand); }

/* Chart legend */
.chart-legend { margin-top: .75rem; display: flex; flex-direction: column; gap: .3rem; }
.legend-item { display: flex; align-items: center; gap: .4rem; font-size: .75rem; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.legend-label { flex: 1; color: var(--muted); }
.legend-pct { font-weight: 700; color: var(--text); }

/* 3-col charts row */
.charts-row.three-col { grid-template-columns: repeat(3, 1fr); }

/* ---- Table extensions ---- */
.table-card.wide  { /* inherits */ }
.table-card.narrow { /* inherits */ }
.table-scroll { overflow-x: auto; }
.table-card-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.view-all-btn {
  padding: .3rem .8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  transition: all .2s;
}
.view-all-btn:hover { border-color: var(--brand); color: var(--brand); }

/* Table utility classes */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.order-id { font-family: monospace; font-size: .78rem; color: var(--muted); }
.cell-primary { font-weight: 600; font-size: .82rem; }
.cell-sub { font-size: .72rem; color: var(--muted); }

/* Department tag */
.dept-tag {
  display: inline-block;
  background: #f3f4f6;
  color: #374151;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: .72rem;
  font-weight: 600;
}

/* Stock pill */
.stock-pill {
  display: inline-block;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: .75rem;
  font-weight: 700;
}
.stock-pill.stock-ok  { background: #dcfce7; color: #166534; }
.stock-pill.stock-med { background: #fef3c7; color: #92400e; }
.stock-pill.stock-low { background: #fee2e2; color: #991b1b; }

/* Trend */
.trend { font-size: .75rem; font-weight: 700; }
.trend.trend-up   { color: var(--success); }
.trend.trend-down { color: var(--danger); }

/* Stock progress bar */
.stock-bar-wrap { background: #e5e7eb; border-radius: 50px; height: 5px; width: 100px; overflow: hidden; }
.stock-bar { height: 100%; border-radius: 50px; }
.stock-bar.bar-danger { background: var(--danger); }
.stock-bar.bar-warn   { background: var(--warning); }
.stock-bar-label { font-size: .7rem; color: var(--muted); margin-top: 3px; }

/* ---- Bottom row ---- */
.bottom-row {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* ---- Alert strip items ---- */
.alert-strip { flex-wrap: wrap; }
.alert-item { display: flex; align-items: center; gap: .4rem; }
.alert-item + .alert-item { border-left: 1px solid #fed7aa; padding-left: .75rem; margin-left: .25rem; }

/* ---- Customer stat card ---- */
.stat-card { display: flex; flex-direction: column; }
.stat-numbers { margin-bottom: 1.25rem; }
.stat-row { display: flex; gap: 1rem; }
.stat-item { flex: 1; }
.stat-val { font-size: 1.4rem; font-weight: 800; line-height: 1.1; }
.stat-val.accent { color: var(--brand); }
.stat-lbl { font-size: .72rem; color: var(--muted); margin-top: 2px; }

/* District bars */
.district-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .6rem; }
.district-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.district-name { font-size: .78rem; width: 90px; flex-shrink: 0; color: var(--text); }
.district-bar-wrap { flex: 1; background: #f3f4f6; border-radius: 50px; height: 7px; overflow: hidden; }
.district-bar { height: 100%; background: var(--brand); border-radius: 50px; }
.district-count { font-size: .75rem; font-weight: 700; width: 32px; text-align: right; }

/* ---- Responsive additions ---- */
@media (max-width: 1200px) {
  .charts-row.three-col { grid-template-columns: repeat(2, 1fr); }
  .bottom-row { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .charts-row { grid-template-columns: 1fr; }
  .charts-row.three-col { grid-template-columns: 1fr; }
  .bottom-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .main-wrap { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .content { padding: 1rem; }
  .stat-row { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .topbar { padding: 0 1rem; }
  .tables-row { grid-template-columns: 1fr; }
}
