/* ==========================================================================
   MotoBrutal — Neobrutalism Design System (Mobile-First 360px -> 1440px)
   100% Lokal, Zero External Dependencies
   ========================================================================== */

:root {
  --bg: #FFFDF5;
  --surface: #FFFFFF;
  --muted: #F4EFE0;
  --ink: #111111;
  --ink-soft: #3A3A3A;
  --yellow: #FFDE59;
  --green: #7ED957;
  --red: #FF5757;
  --blue: #38B6FF;
  --purple: #C084FC;

  --border: 3px solid var(--ink);
  --shadow-card: 4px 4px 0px var(--ink);
  --shadow-btn: 3px 3px 0px var(--ink);
  --shadow-modal: 6px 6px 0px var(--ink);
  --radius: 3px;

  --font-display: 'Space Grotesk', 'Arial Black', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Space Grotesk', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;

  --sidebar-w: 252px;
  --header-h: 64px;
  --bottom-nav-h: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

img,
svg {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ---------- Boot & Auth Screens ---------- */

.boot-screen,
.auth-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background-color: var(--bg);
  background-image:
    radial-gradient(var(--ink) 1px, transparent 1px);
  background-size: 24px 24px;
}

.boot-card,
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: var(--border);
  box-shadow: var(--shadow-modal);
  border-radius: var(--radius);
  padding: 24px;
}

.boot-card {
  text-align: center;
}

.auth-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--yellow);
  color: var(--ink);
  border: var(--border);
  box-shadow: var(--shadow-btn);
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 16px;
  padding: 6px 10px;
  border-radius: var(--radius);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.auth-tab-btn {
  min-height: 48px;
  background: var(--muted);
  border: var(--border);
  box-shadow: var(--shadow-btn);
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}

.auth-tab-btn.active {
  background: var(--yellow);
}

.auth-tab-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px var(--ink);
}

.auth-note {
  margin-top: 16px;
  padding: 10px 12px;
  background: #E9F9E0;
  border: 2px solid var(--ink);
  font-size: 12.5px;
  font-weight: 600;
}

/* ---------- Shell Layout (Mobile-First -> Desktop Sidebar) ---------- */

.shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.sidebar {
  display: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--yellow);
  border-bottom: var(--border);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: var(--header-h);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.topbar-brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.moto-select-wrap {
  min-width: 0;
  flex: 1;
  max-width: 240px;
}

.moto-select {
  width: 100%;
  min-height: 40px;
  padding: 4px 10px;
  background: var(--surface);
  border: var(--border);
  box-shadow: 2px 2px 0px var(--ink);
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 13px;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.main-content {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 12px calc(var(--bottom-nav-h) + 84px);
}

/* ---------- Bottom Navigation (Mobile) ---------- */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--bottom-nav-h);
  background: var(--surface);
  border-top: var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  border-right: 2px solid var(--ink);
  padding: 4px 2px;
  min-height: 48px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.bottom-nav-btn:last-child {
  border-right: none;
}

.bottom-nav-btn.active {
  background: var(--yellow);
}

.bottom-nav-btn svg {
  width: 21px;
  height: 21px;
}

/* Floating Quick Action Button (Mobile) */
.fab-btn {
  position: fixed;
  right: 14px;
  bottom: calc(var(--bottom-nav-h) + 14px + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background: var(--yellow);
  color: var(--ink);
  border: var(--border);
  box-shadow: var(--shadow-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}

.fab-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px var(--ink);
}

/* ---------- Badges & Status Pills ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--surface);
}

.badge-online { background: var(--green); }
.badge-offline { background: var(--red); color: #FFFFFF; }
.badge-syncing { background: var(--blue); }
.badge-pending { background: var(--yellow); }
.badge-yellow { background: var(--yellow); }
.badge-green { background: var(--green); }
.badge-red { background: var(--red); color: #FFFFFF; }
.badge-blue { background: var(--blue); }
.badge-purple { background: var(--purple); }
.badge-muted { background: var(--muted); }

.sync-badge-btn {
  min-height: 36px;
  padding: 4px 8px;
  border: var(--border);
  box-shadow: 2px 2px 0px var(--ink);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sync-badge-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px var(--ink);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--ink);
  flex-shrink: 0;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--ink);
  border: var(--border);
  box-shadow: var(--shadow-btn);
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}

.btn:hover:not(:disabled) {
  filter: brightness(0.98);
}

.btn:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px var(--ink);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-sm {
  min-height: 38px;
  padding: 6px 11px;
  font-size: 12px;
}

.btn-xs {
  min-height: 34px;
  padding: 4px 9px;
  font-size: 11.5px;
  border-width: 2px;
  box-shadow: 2px 2px 0px var(--ink);
}

.btn-block {
  width: 100%;
}

.btn-yellow { background: var(--yellow); }
.btn-green { background: var(--green); }
.btn-blue { background: var(--blue); }
.btn-purple { background: var(--purple); }
.btn-red { background: var(--red); color: #FFFFFF; }
.btn-dark { background: var(--ink); color: var(--yellow); }

/* ---------- Cards & Sections ---------- */

.card {
  background: var(--surface);
  border: var(--border);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius);
  padding: 16px;
}

.card-yellow { background: var(--yellow); }
.card-green { background: var(--green); }
.card-blue { background: var(--blue); }
.card-purple { background: var(--purple); }
.card-red { background: var(--red); color: #FFFFFF; }
.card-muted { background: var(--muted); }

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.section-title {
  font-size: 20px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- Alerts ---------- */

.alert-banner {
  border: var(--border);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 700;
}

.alert-danger { background: var(--red); color: #FFFFFF; }
.alert-warn { background: var(--yellow); color: var(--ink); }
.alert-info { background: var(--blue); color: var(--ink); }

.alert-icon {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 16px;
  padding: 2px 7px;
  background: var(--ink);
  color: var(--yellow);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ---------- KPI Grid ---------- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.kpi-card {
  background: var(--surface);
  border: var(--border);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.kpi-label {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.kpi-value {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: clamp(18px, 4.8vw, 26px);
  line-height: 1.1;
  word-break: break-word;
}

.kpi-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-actions-grid .btn:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

/* ---------- Progress Bars & Component Health ---------- */

.component-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comp-card {
  background: var(--surface);
  border: var(--border);
  box-shadow: var(--shadow-btn);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comp-card.status-danger {
  border-left: 10px solid var(--red);
}

.comp-card.status-warning {
  border-left: 10px solid var(--yellow);
}

.comp-card.status-ok {
  border-left: 10px solid var(--green);
}

.comp-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.comp-name {
  font-weight: 900;
  font-size: 15px;
}

.comp-meta {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 600;
}

.progress-track {
  width: 100%;
  height: 18px;
  background: var(--muted);
  border: 2px solid var(--ink);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  transition: width 0.25s ease;
  border-right: 2px solid var(--ink);
}

.progress-fill.status-ok { background: var(--green); }
.progress-fill.status-warning { background: var(--yellow); }
.progress-fill.status-danger { background: var(--red); }

.comp-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
}

/* ---------- Charts (Neobrutalism SVG) ---------- */

.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.chart-box {
  background: var(--surface);
  border: var(--border);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius);
  padding: 14px;
}

.chart-title {
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chart-empty {
  padding: 24px 12px;
  text-align: center;
  background: var(--muted);
  border: 2px dashed var(--ink);
  font-weight: 700;
  font-size: 13px;
}

.cost-bar-wrap {
  width: 100%;
  height: 32px;
  border: var(--border);
  display: flex;
  overflow: hidden;
  background: var(--muted);
  margin: 10px 0;
}

.cost-bar-fuel {
  background: var(--blue);
  height: 100%;
  border-right: 2px solid var(--ink);
}

.cost-bar-service {
  background: var(--purple);
  height: 100%;
}

.cost-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.legend-item {
  border: 2px solid var(--ink);
  padding: 8px 10px;
  background: var(--bg);
}

/* ---------- Forms & Inputs ---------- */

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field label {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
  border: var(--border);
  box-shadow: 2px 2px 0px var(--ink);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  background: #FFFBE0;
  box-shadow: 4px 4px 0px var(--ink);
}

.textarea {
  min-height: 80px;
  resize: vertical;
}

.field-hint {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

.field-warn {
  font-size: 12px;
  font-weight: 800;
  padding: 6px 8px;
  background: var(--yellow);
  border: 2px solid var(--ink);
}

/* Toggle & Checkbox Brutalist */
.check-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 12px;
  background: var(--muted);
  border: var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
  font-size: 13.5px;
}

.check-card input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--ink);
  flex-shrink: 0;
  cursor: pointer;
}

/* Service Items Repeater */
.repeater-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.repeater-row {
  background: var(--muted);
  border: var(--border);
  padding: 12px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.repeater-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
}

.receipt-preview {
  margin-top: 8px;
  border: var(--border);
  max-height: 180px;
  object-fit: contain;
  background: var(--muted);
}

/* ---------- History List & Desktop Brutalist Table ---------- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-bar .select {
  width: auto;
  min-width: 150px;
  min-height: 40px;
  padding: 6px 10px;
  font-size: 13px;
}

.history-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-card {
  background: var(--surface);
  border: var(--border);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.history-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg);
  border: 2px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
}

.history-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 4px;
}

.table-wrap {
  display: none;
  width: 100%;
  overflow-x: auto;
  border: var(--border);
  box-shadow: var(--shadow-card);
  background: var(--surface);
}

.brutal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.brutal-table th {
  background: var(--yellow);
  border-bottom: var(--border);
  border-right: 2px solid var(--ink);
  padding: 10px 12px;
  text-align: left;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 11.5px;
  white-space: nowrap;
}

.brutal-table th:last-child {
  border-right: none;
}

.brutal-table td {
  border-bottom: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
  padding: 10px 12px;
  vertical-align: top;
}

.brutal-table td:last-child {
  border-right: none;
}

.brutal-table tr:last-child td {
  border-bottom: none;
}

.brutal-table tbody tr:hover {
  background: #FFFBE8;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.empty-state {
  text-align: center;
  padding: 32px 18px;
  background: var(--surface);
  border: var(--border);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* ---------- Modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(17, 17, 17, 0.65);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal-box {
  width: 100%;
  max-width: 600px;
  max-height: 92dvh;
  background: var(--bg);
  border: var(--border);
  box-shadow: var(--shadow-modal);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: var(--yellow);
  border-bottom: var(--border);
}

.modal-head.accent-blue { background: var(--blue); }
.modal-head.accent-purple { background: var(--purple); }
.modal-head.accent-green { background: var(--green); }
.modal-head.accent-red { background: var(--red); color: #FFFFFF; }

.modal-title {
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
}

.modal-close {
  width: 38px;
  height: 38px;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0px var(--ink);
  font-weight: 900;
  font-size: 18px;
  line-height: 1;
}

.modal-close:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px var(--ink);
}

.modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

/* ---------- Toast Stack ---------- */

.toast-stack {
  position: fixed;
  top: 12px;
  right: 12px;
  left: 12px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  max-width: 420px;
  width: 100%;
  background: var(--yellow);
  color: var(--ink);
  border: var(--border);
  box-shadow: var(--shadow-card);
  padding: 11px 14px;
  font-weight: 800;
  font-size: 13.5px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.toast-success { background: var(--green); }
.toast-error { background: var(--red); color: #FFFFFF; }
.toast-info { background: var(--blue); }

/* ---------- Responsive Breakpoints (Tablet & Desktop >= 768px) ---------- */

@media (min-width: 600px) {
  .form-row-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .quick-actions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .quick-actions-grid .btn:last-child:nth-child(odd) {
    grid-column: auto;
  }
  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }
}

@media (min-width: 768px) {
  .shell {
    flex-direction: row;
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: var(--border);
    z-index: 50;
    padding: 16px 14px;
    gap: 14px;
    overflow-y: auto;
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: var(--border);
  }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .sidebar-nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 8px 12px;
    background: var(--bg);
    border: var(--border);
    box-shadow: var(--shadow-btn);
    border-radius: var(--radius);
    font-weight: 900;
    font-size: 13.5px;
    text-transform: uppercase;
    text-align: left;
    transition: transform 0.06s ease, box-shadow 0.06s ease;
  }

  .sidebar-nav-btn.active {
    background: var(--yellow);
  }

  .sidebar-nav-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px var(--ink);
  }

  .sidebar-nav-btn svg {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
  }

  .sidebar-quick {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 10px;
    border-top: 2px dashed var(--ink);
  }

  .sidebar-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .shell-main {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }

  .topbar {
    padding: 10px 24px;
  }

  .topbar-brand-mobile {
    display: none;
  }

  .main-content {
    padding: 22px 24px 40px;
  }

  .bottom-nav,
  .fab-btn {
    display: none !important;
  }

  .kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .charts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .charts-grid .chart-wide {
    grid-column: 1 / -1;
  }

  .history-cards {
    display: none;
  }

  .table-wrap {
    display: block;
  }

  .toast-stack {
    left: auto;
    width: 380px;
  }
}

@media (min-width: 1100px) {
  .dashboard-two-col {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
    align-items: start;
  }
}
