﻿:root {
  --brand-900: #0f172a;
  --brand-800: #1e3a5f;
  --brand-700: #1d4ed8;
  --brand-600: #2563eb;
  --brand-500: #3b82f6;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --header-h: 64px;
  --sidebar-w: 260px;
  --radius: 10px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--slate-100);
  color: var(--slate-800);
}
body.sidebar-drawer-open { overflow: hidden; }

.loading-msg { text-align: center; padding: 2rem; color: var(--slate-500); }

.demo-banner {
  background: #f59e0b;
  color: #78350f;
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  flex-shrink: 0;
}

.app-root { display: flex; flex-direction: column; min-height: 100vh; }
.app-shell {
  display: flex;
  flex: 1;
  min-height: 0;
  position: relative;
}

/* ——— Sidebar ——— */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--brand-900) 0%, var(--brand-800) 100%);
  color: #fff;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  z-index: 200;
}
.sidebar-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem 1rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--brand-500);
  flex-shrink: 0;
}
.sidebar-logo svg { width: 1.5rem; height: 1.5rem; }
.sidebar-head h1 { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.sidebar-head p { margin: 0.2rem 0 0; font-size: 0.7rem; opacity: 0.65; color: #93c5fd; }

.sidebar nav { flex: 1; padding: 0.75rem 0.625rem; overflow-y: auto; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-link.active {
  background: var(--brand-600);
  color: #fff;
  font-weight: 600;
}
.nav-icon { display: flex; width: 1.125rem; height: 1.125rem; flex-shrink: 0; opacity: 0.85; }
.nav-icon svg { width: 100%; height: 100%; }
.nav-label { flex: 1; }

.sidebar-foot {
  padding: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.5rem;
  border: none;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.06);
  color: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.sidebar-user-text { flex: 1; min-width: 0; }
.sidebar-user-text strong { display: block; font-size: 0.8125rem; }
.sidebar-user-text span { display: block; font-size: 0.7rem; opacity: 0.65; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-chevron { opacity: 0.5; }
.sidebar-user-chevron svg { width: 1rem; height: 1rem; }

.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--brand-600);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.user-avatar.sm { width: 2rem; height: 2rem; font-size: 0.6875rem; }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.5);
  z-index: 150;
}

/* ——— Main + Header ——— */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--slate-100);
  overflow: hidden;
}

.app-header {
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid var(--slate-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  height: var(--header-h);
  min-height: var(--header-h);
}

.header-left { display: flex; align-items: center; flex-shrink: 0; }
#sidebar-toggle { display: none; }

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
  max-width: 36rem;
  margin: 0 auto;
}

.header-search-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  padding: 0 0.875rem;
  height: 2.5rem;
  gap: 0.5rem;
}
.search-icon {
  display: flex;
  color: var(--slate-400);
  flex-shrink: 0;
}
.header-search {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 0.875rem;
  outline: none;
  min-width: 0;
}
.header-search::placeholder { color: var(--slate-400); }
.header-kbd {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-family: inherit;
  color: var(--slate-500);
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 0.375rem;
  flex-shrink: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
  margin-left: auto;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--slate-600);
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
}
.icon-btn:hover { background: var(--slate-100); }

.header-notify .notify-badge {
  position: absolute;
  top: 0.375rem;
  right: 0.375rem;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.25rem;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1.125rem;
  text-align: center;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--slate-800);
  transition: background 0.15s;
}
.header-user:hover { background: var(--slate-100); }
.user-meta { display: flex; align-items: center; gap: 0.25rem; }
.user-name { font-size: 0.875rem; font-weight: 600; white-space: nowrap; }
.user-chevron { display: flex; color: var(--slate-400); }

/* Page chrome (title row below top bar) */
.page-chrome {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 1rem;
  flex-wrap: wrap;
  background: #fff;
  border-bottom: 1px solid var(--slate-200);
}
.page-chrome-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--slate-900);
  letter-spacing: -0.02em;
}
.page-chrome-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--slate-500);
  max-width: 36rem;
}
.page-chrome-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.date-range-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  background: #fff;
  font-size: 0.8125rem;
  color: var(--slate-700);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.date-range-btn:hover { background: var(--slate-50); }
.date-icon, .date-chevron { display: flex; color: var(--slate-500); }

.header-quick-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  white-space: nowrap;
}
.header-quick-action .qa-chevron,
.qa-chevron { display: inline-flex; align-items: center; }

.main-inner {
  flex: 1;
  overflow: auto;
  padding: 1.5rem;
  max-width: none;
}

.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap; }
.page-header h2 { margin: 0; font-size: 1.5rem; color: var(--slate-800); }
.page-header p { margin: 0.25rem 0 0; font-size: 0.875rem; color: var(--slate-500); }

.card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.card-pad { padding: 1rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card .label { font-size: 0.875rem; color: var(--slate-500); }
.stat-card .value { font-size: 1.5rem; font-weight: 700; margin-top: 0.25rem; color: var(--slate-900); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--slate-200);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  gap: 0.35rem;
}
.btn-primary { background: var(--brand-600); color: #fff; }
.btn-primary:hover { background: var(--brand-700); }
.btn-green { background: #16a34a; color: #fff; }
.btn-dark { background: #334155; color: #fff; }
.btn-ghost {
  background: #fff;
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
}
.btn-ghost:hover { background: var(--slate-50); border-color: var(--slate-300); }
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  min-height: 2.25rem;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.header-quick-action:disabled { opacity: 0.6; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); }
th, td { padding: 0.625rem 0.875rem; text-align: left; border-top: 1px solid var(--slate-200); }
thead th { background: var(--slate-50); font-weight: 600; font-size: 0.8125rem; color: var(--slate-600); }
.text-right { text-align: right; }
.empty-row td { text-align: center; color: var(--slate-500); padding: 1.5rem; }

.notice {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}
.notice-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.notice-ok { color: #15803d; font-weight: 600; }

.toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  color: #fff;
  z-index: 9999;
  max-width: 320px;
  font-size: 0.875rem;
}
.toast-error { background: #dc2626; }
.toast-success { background: #16a34a; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

.page-content { display: flex; flex-direction: column; gap: 1.25rem; }
.content-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* Dashboard image-matched blocks */
.dashboard-page { display: flex; flex-direction: column; gap: 1.25rem; }
.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.metric-card { padding: 1.125rem 1.25rem; }
.metric-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.metric-icon { font-size: 1.25rem; width: 2.25rem; height: 2.25rem; display: flex; align-items: center; justify-content: center; background: var(--slate-100); border-radius: 0.5rem; }
.metric-link { font-size: 0.75rem; color: var(--brand-600); text-decoration: none; font-weight: 500; }
.metric-label { font-size: 0.8125rem; color: var(--slate-500); margin-bottom: 0.25rem; }
.metric-value { font-size: 1.5rem; font-weight: 700; color: var(--slate-900); letter-spacing: -0.02em; }
.metric-trend { font-size: 0.75rem; margin-top: 0.5rem; font-weight: 500; }
.metric-trend.up { color: #10b981; }
.metric-trend.down { color: #ef4444; }
.metric-sub { font-size: 0.75rem; margin-top: 0.5rem; font-weight: 500; color: var(--slate-500); line-height: 1.35; }
.metric-icon svg { display: block; }
.metric-icon--blue { background: #eff6ff; color: #2563eb; }
.metric-icon--green { background: #ecfdf5; color: #059669; }
.metric-icon--purple { background: #f5f3ff; color: #7c3aed; }
.metric-icon--orange { background: #fff7ed; color: #ea580c; }
.customers-page .metric-icon { width: 2.5rem; height: 2.5rem; border-radius: 0.625rem; }

.dashboard-mid {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 0.9fr;
  gap: 1rem;
  align-items: start;
}
.dashboard-bottom {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1rem;
}
.section-card { overflow: hidden; }
.section-card-head {
  padding: 1rem 1.25rem 0.5rem;
  border-bottom: 1px solid var(--slate-100);
}
.section-card-body { padding: 1rem 1.25rem 1.25rem; }
.section-title { margin: 0; font-size: 1rem; font-weight: 700; color: var(--slate-900); }
.section-sub { margin: 0.25rem 0 0; font-size: 0.8125rem; color: var(--slate-500); }

.chart-legend { display: flex; gap: 1rem; font-size: 0.75rem; color: var(--slate-600); margin-bottom: 0.75rem; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.35rem; vertical-align: middle; }
.dot-green { background: #10b981; }
.dot-red { background: #ef4444; }
.line-chart { width: 100%; height: 140px; display: block; }
.line-receipts { fill: none; stroke: #10b981; stroke-width: 2; }
.line-payments { fill: none; stroke: #ef4444; stroke-width: 2; }
.chart-labels { display: flex; justify-content: space-between; font-size: 0.6875rem; color: var(--slate-400); margin-top: 0.5rem; }

.dash-table { border: none; box-shadow: none; }
.dash-table thead th { border-top: none; }
.dash-table td small { color: var(--slate-500); }

.chip {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
}
.chip-success { background: #d1fae5; color: #047857; }
.chip-warning { background: #ffedd5; color: #c2410c; }
.chip-info { background: #dbeafe; color: #1d4ed8; }
.chip-muted { background: var(--slate-100); color: var(--slate-600); }

.progress-track { height: 6px; background: var(--slate-200); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--brand-600); border-radius: 999px; }
.progress-fill.profit-fill { background: #10b981; }
.progress-cell small { display: block; margin-top: 0.25rem; color: var(--slate-500); font-size: 0.75rem; }

.quick-actions-card { padding: 1rem 1.25rem; }
.quick-actions-card .section-title { margin-bottom: 0.75rem; }
.quick-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; }
.quick-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  border: 1px solid transparent;
}
.qa-blue { background: #eff6ff; color: #1d4ed8; }
.qa-purple { background: #f5f3ff; color: #6d28d9; }
.qa-green { background: #ecfdf5; color: #047857; }
.qa-teal { background: #f0fdfa; color: #0f766e; }
.qa-orange { background: #fff7ed; color: #c2410c; }
.qa-red { background: #fef2f2; color: #b91c1c; }

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.summary-ring {
  text-align: center;
  padding: 0.75rem;
  background: var(--slate-50);
  border-radius: var(--radius);
}
.summary-label { display: block; font-size: 0.75rem; color: var(--slate-500); margin-bottom: 0.35rem; }
.summary-ring strong { font-size: 1rem; color: var(--slate-900); }
.net-profit-block { padding-top: 0.5rem; }
.net-profit-head { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.875rem; }
.net-profit-head strong { font-size: 1.125rem; color: var(--slate-900); }
.profit-pct { display: block; margin-top: 0.35rem; color: var(--slate-500); font-size: 0.75rem; }

/* Customers page */
.customers-page { display: flex; flex-direction: column; gap: 1.25rem; }
.customers-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.customers-toolbar .toolbar-filters,
.customers-toolbar .toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.customers-toolbar .toolbar-meta { width: 100%; }
.toolbar-input,
.toolbar-select {
  height: 2.25rem;
  padding: 0 0.75rem;
  border: 1px solid var(--slate-200);
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-family: inherit;
  color: var(--slate-800);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.toolbar-input { min-width: 7rem; flex: 1; max-width: 10rem; }
.toolbar-select {
  min-width: 8.5rem;
  cursor: pointer;
  padding-right: 1.75rem;
  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='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}
.toolbar-input:hover,
.toolbar-select:hover { border-color: var(--slate-300); }
.toolbar-input:focus,
.toolbar-select:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.customers-toolbar .toolbar-search {
  flex: 1;
  min-width: 10rem;
  max-width: 16rem;
}
.customers-toolbar .btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.customers-toolbar .btn-sm svg { flex-shrink: 0; }
.toolbar-count { font-size: 0.8125rem; color: var(--slate-500); }
.customers-table .col-num { width: 2.5rem; color: var(--slate-500); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.customers-table .col-date { font-size: 0.8125rem; color: var(--slate-600); white-space: nowrap; }
.cell-user { display: flex; align-items: center; gap: 0.625rem; }
.cell-user strong { font-weight: 600; color: var(--slate-900); }
.text-muted { color: var(--slate-400); font-size: 0.875rem; }
.table-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
}
.icon-btn--sm {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 0.375rem;
  color: var(--slate-500);
  transition: background 0.12s, color 0.12s, transform 0.12s;
}
.icon-btn--sm:hover {
  background: var(--slate-100);
  color: var(--brand-600);
}
.icon-btn--sm:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}
.cust-row {
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.cust-row:hover { background: var(--slate-50); }
.cust-row.row-selected {
  background: #eff6ff;
  box-shadow: inset 3px 0 0 var(--brand-600);
}
.cust-form-card.is-editing {
  border-color: var(--brand-200);
  box-shadow: 0 0 0 1px var(--brand-100), var(--shadow);
}
.cust-form-card.is-editing .section-card-head {
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
}
.cust-form-card.is-focused .section-title { color: var(--brand-700); }
.form-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  grid-column: 1 / -1;
}
.cust-form .form-actions { margin-top: 0.25rem; }
.cust-form--full textarea {
  resize: vertical;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--slate-200);
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.875rem;
  grid-column: 1 / -1;
}
.cust-form--full textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.cust-detail-panel {
  margin-bottom: 1rem;
  padding: 1rem 1.125rem;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  transition: opacity 0.15s ease;
}
.cust-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.cust-detail-title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.cust-detail-title strong { font-size: 1rem; color: var(--slate-900); }
.cust-detail-sub { display: block; font-size: 0.8125rem; color: var(--slate-500); margin-top: 0.15rem; }
.cust-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 0.75rem 1rem;
  font-size: 0.8125rem;
  color: var(--slate-700);
}
.cust-detail-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-400);
  margin-bottom: 0.2rem;
}
.cust-detail-address {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--slate-600);
  line-height: 1.45;
}
.cust-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.875rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--slate-200);
}

@media (prefers-reduced-motion: reduce) {
  .cust-row,
  .icon-btn--sm,
  .toolbar-input,
  .toolbar-select { transition: none; }
}

/* Desktop: sidebar always visible, hide hamburger */
@media (min-width: 769px) {
  #sidebar-toggle { display: none !important; }
  .sidebar-backdrop { display: none !important; }
}

/* Mobile: drawer sidebar */
@media (max-width: 768px) {
  #sidebar-toggle { display: inline-flex !important; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  }
  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }
  .app-shell.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .header-center { max-width: none; }
  .header-kbd { display: none; }
  .user-name { display: none; }
  .user-chevron { display: none; }

  .page-chrome {
    flex-direction: column;
    align-items: stretch;
  }
  .page-chrome-right {
    flex-wrap: wrap;
  }
  .page-chrome-title { font-size: 1.375rem; }

  .grid-2 { grid-template-columns: 1fr; }
  .metrics-row { grid-template-columns: 1fr 1fr; }
  .dashboard-mid { grid-template-columns: 1fr; }
  .dashboard-bottom { grid-template-columns: 1fr; }
  .content-grid-2 { grid-template-columns: 1fr; }
}
