:root {
  color-scheme: light;
  --page-bg: #f9f9f7;
  --surface: #ffffff;
  --surface-2: #fcfcfb;
  --sidebar-bg: #14203a;
  --sidebar-bg-2: #1b2c4d;
  --sidebar-text: #c7d0e0;
  --sidebar-text-active: #ffffff;
  --sidebar-accent: #4f8fe8;
  --text-primary: #0b0e14;
  --text-secondary: #52514e;
  --text-muted: #898781;
  --border: rgba(11, 11, 11, 0.1);
  --border-strong: rgba(11, 11, 11, 0.16);
  --gridline: #e1e0d9;
  --accent: #2a78d6;
  --accent-dark: #184f95;
  --accent-soft: #eaf2fc;
  --danger: #d03b3b;
  --danger-dark: #a52c2c;
  --danger-soft: #fbeceb;
  --success-text: #006300;
  --success-soft: #e8f6e8;
  --focus-ring: #2a78d6;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #4a3aa7;
  --series-other: #9a978d;
  --chart-grid: #e1e0d9;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 1px 2px rgba(11, 11, 11, 0.04), 0 1px 8px rgba(11, 11, 11, 0.04);
  --shadow-pop: 0 12px 32px rgba(11, 11, 11, 0.18);
  font-variant-numeric: tabular-nums;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page-bg: #0d0d0d;
    --surface: #17181a;
    --surface-2: #1a1a19;
    --sidebar-bg: #0b1220;
    --sidebar-bg-2: #101a2e;
    --sidebar-text: #a7b3c9;
    --sidebar-text-active: #ffffff;
    --sidebar-accent: #6fa4ef;
    --text-primary: #ffffff;
    --text-secondary: #c3c2b7;
    --text-muted: #8f9099;
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.18);
    --gridline: #2c2c2a;
    --accent: #3987e5;
    --accent-dark: #86b6ef;
    --accent-soft: #16283f;
    --danger: #e66767;
    --danger-dark: #f3a3a3;
    --danger-soft: #3a2222;
    --success-text: #0ca30c;
    --success-soft: #12331a;
    --focus-ring: #6fa4ef;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --series-6: #9085e9;
    --series-other: #7d7b73;
    --chart-grid: #2c2c2a;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 8px rgba(0, 0, 0, 0.3);
    --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #0d0d0d;
  --surface: #17181a;
  --surface-2: #1a1a19;
  --sidebar-bg: #0b1220;
  --sidebar-bg-2: #101a2e;
  --sidebar-text: #a7b3c9;
  --sidebar-text-active: #ffffff;
  --sidebar-accent: #6fa4ef;
  --text-primary: #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted: #8f9099;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --gridline: #2c2c2a;
  --accent: #3987e5;
  --accent-dark: #86b6ef;
  --accent-soft: #16283f;
  --danger: #e66767;
  --danger-dark: #f3a3a3;
  --danger-soft: #3a2222;
  --success-text: #0ca30c;
  --success-soft: #12331a;
  --focus-ring: #6fa4ef;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #9085e9;
  --series-other: #7d7b73;
  --chart-grid: #2c2c2a;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 8px rgba(0, 0, 0, 0.3);
  --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text-primary);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; text-wrap: balance; font-weight: 600; }

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

a { color: var(--accent); }

/* ---------- Layout shell ---------- */

.shell {
  display: flex;
  min-height: 100%;
}

.sidebar {
  flex: 0 0 236px;
  background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-2));
  color: var(--sidebar-text);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #3987e5, #184f95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 14px;
  flex: none;
}

.brand-text .title { color: #fff; font-weight: 700; font-size: 15px; letter-spacing: 0.2px; }
.brand-text .subtitle { color: var(--sidebar-text); font-size: 11px; opacity: 0.7; }

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 500;
}

.nav-item .nav-icon {
  width: 18px;
  height: 18px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-item .nav-icon svg { width: 17px; height: 17px; stroke: currentColor; fill: none; }

.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: var(--sidebar-text-active); }

.nav-item.active {
  background: rgba(79, 143, 232, 0.16);
  color: var(--sidebar-text-active);
  border-color: rgba(79, 143, 232, 0.35);
}
.nav-item.active .nav-icon { color: var(--sidebar-accent); }

.sidebar-foot {
  margin-top: auto;
  padding: 12px 10px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.session-user { padding: 2px 2px 8px; }
.session-user-name { color: var(--sidebar-text-active); font-size: 13px; font-weight: 600; }
.session-user-role { color: var(--sidebar-text); font-size: 11.5px; opacity: 0.75; margin-top: 1px; }

.session-logout.btn {
  width: 100%;
  justify-content: flex-start;
  gap: 8px;
  color: var(--sidebar-text);
  border-color: rgba(255, 255, 255, 0.14);
}
.session-logout svg { width: 15px; height: 15px; stroke: currentColor; fill: none; }
.session-logout:hover { background: rgba(255, 255, 255, 0.08); color: var(--sidebar-text-active); }

.sidebar-foot-note {
  margin-top: 10px;
  font-size: 11px;
  color: var(--sidebar-text);
  opacity: 0.55;
}

.main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 26px 34px 60px;
}

.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.page-header h1 { font-size: 21px; }
.page-header p.desc { margin: 4px 0 0; color: var(--text-secondary); font-size: 13px; }

/* ---------- Buttons & inputs ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .nav-item:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

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

.btn-danger { color: var(--danger); border-color: var(--danger); background: var(--surface); }
.btn-danger:hover { background: var(--danger-soft); }

.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--accent-soft); border-color: transparent; }

.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 6px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.field .hint { font-size: 11.5px; color: var(--text-muted); font-weight: 400; }
.required-mark { color: var(--danger); margin-left: 2px; }

.input, select.input, textarea.input {
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-primary);
  width: 100%;
}
textarea.input { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; }
.input:focus { outline: 2px solid var(--focus-ring); outline-offset: -1px; border-color: var(--focus-ring); }
.input::placeholder { color: var(--text-muted); }

.input-suffix-group { position: relative; }
.input-suffix-group .input { padding-right: 54px; text-align: right; }
.input-suffix-group .suffix {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 12.5px; color: var(--text-muted); font-weight: 600; pointer-events: none;
}

.segmented { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.segmented button {
  border: none; background: var(--surface); color: var(--text-secondary);
  padding: 0 18px; height: 38px; font-weight: 600; cursor: pointer; font-size: 13px;
  border-right: 1px solid var(--border-strong);
}
.segmented button:last-child { border-right: none; }
.segmented button.active { background: var(--accent); color: #fff; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}
.filter-bar .field { min-width: 150px; }
.filter-bar .field.grow { flex: 1 1 200px; }
.filter-bar .field-actions { display: flex; gap: 8px; margin-left: auto; }

/* ---------- Cards / KPI ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

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

.kpi-grid-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}
.kpi-grid-compact .kpi-card { flex: 0 1 260px; }

.dash-period-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.kpi-card {
  padding: 16px 18px;
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.kpi-value {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
}
.kpi-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.charts-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
  align-items: stretch;
}

.chart-card { padding: 18px 20px 14px; display: flex; flex-direction: column; }
.chart-card h3 {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.chart-card .chart-note { font-size: 11.5px; color: var(--text-muted); margin-bottom: 10px; }
.chart-canvas-wrap { position: relative; flex: 1 1 auto; min-height: 260px; }

.legend-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.legend-list li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; cursor: pointer; padding: 3px 4px; border-radius: 6px; }
.legend-list li:hover { background: var(--accent-soft); }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend-list .lg-name { color: var(--text-primary); flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-list .lg-pct { color: var(--text-secondary); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Detail / drilldown panel ---------- */

.detail-panel {
  margin-top: 4px;
  padding: 18px 20px;
  animation: fadeIn 0.15s ease-out;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px);} to { opacity: 1; transform: none; } }

.detail-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.detail-panel-head .eyebrow { font-size: 11.5px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.detail-panel-head h3 { font-size: 16px; margin-top: 2px; }
.detail-panel-total { text-align: right; }
.detail-panel-total .num { font-size: 20px; font-weight: 700; }
.detail-panel-total .lbl { font-size: 11.5px; color: var(--text-muted); }

.empty-state { padding: 40px 20px; text-align: center; color: var(--text-muted); }
.empty-state .big { font-size: 15px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }

/* ---------- Table ---------- */

.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }
table.data-table.perm-matrix { min-width: 0; }
table.data-table.perm-matrix th:last-child, table.data-table.perm-matrix td:last-child { position: static; box-shadow: none; }
table.data-table.perm-matrix input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }
table.data-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-strong);
  background: var(--surface-2);
  white-space: nowrap;
  position: sticky;
  top: 0;
}
table.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
}
table.data-table tbody tr:hover { background: var(--accent-soft); }
table.data-table td.num, table.data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data-table td.center, table.data-table th.center { text-align: center; }
table.data-table tr.clickable { cursor: pointer; }

table.data-table th:last-child, table.data-table td:last-child {
  position: sticky;
  right: 0;
}
table.data-table th:last-child { background: var(--surface-2); }
table.data-table td:last-child { background: var(--surface); box-shadow: -6px 0 8px -8px rgba(11, 11, 11, 0.18); }
table.data-table tbody tr:hover td:last-child { background: #eef4fb; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) table.data-table tbody tr:hover td:last-child { background: #1e2c3f; }
}
:root[data-theme="dark"] table.data-table tbody tr:hover td:last-child { background: #1e2c3f; }

.row-actions { display: flex; gap: 6px; justify-content: center; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--border-strong);
  background: var(--surface); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary);
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.icon-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent-dark);
  white-space: nowrap;
}
.pill-muted { background: var(--surface-2); color: var(--text-secondary); border: 1px solid var(--border); }
.pill-currency-usd { background: var(--success-soft); color: var(--success-text); }
.pill-currency-vnd { background: var(--accent-soft); color: var(--accent-dark); }

.note-cell { color: var(--text-secondary); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.results-count { font-size: 12.5px; color: var(--text-muted); margin: -8px 0 12px; }

/* ---------- Form page ---------- */

.form-layout { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
.form-card { padding: 22px 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.form-note { font-size: 11.5px; color: var(--text-muted); }

.summary-card { padding: 20px; position: sticky; top: 20px; }
.summary-card h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--text-muted); margin-bottom: 14px; }
.summary-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 12.5px; }
.summary-row:last-of-type { border-bottom: none; }
.summary-row .k { color: var(--text-secondary); }
.summary-row .v { font-weight: 600; text-align: right; }
.summary-total { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--border-strong); }
.summary-total .lbl { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.summary-total .val { font-size: 22px; font-weight: 700; margin-top: 4px; }

.banner {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-md);
  background: var(--success-soft); color: var(--success-text);
  font-size: 13px; font-weight: 600; margin-bottom: 16px;
  border: 1px solid rgba(12, 163, 12, 0.25);
}
.banner svg { width: 16px; height: 16px; flex: none; }

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

.modal-overlay {
  position: fixed; inset: 0; background: rgba(11, 11, 11, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 50;
}
.modal-panel {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop);
  width: 100%; max-width: 460px; padding: 22px 24px; border: 1px solid var(--border);
}
.modal-panel.wide { max-width: 620px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.modal-head h3 { font-size: 15.5px; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 2px; }
.modal-body { font-size: 13.5px; color: var(--text-secondary); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.detail-grid .k { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.2px; }
.detail-grid .v { font-size: 13.5px; font-weight: 600; margin-top: 2px; color: var(--text-primary); }
.detail-grid .span-2 { grid-column: 1 / -1; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 22px; right: 22px; z-index: 60;
  background: var(--text-primary); color: var(--page-bg);
  padding: 12px 18px; border-radius: var(--radius-md); font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-pop); display: flex; align-items: center; gap: 10px;
  animation: fadeIn 0.15s ease-out;
}

/* ---------- Đăng nhập ---------- */

.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at top, var(--accent-soft), var(--page-bg) 60%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 30px 32px 26px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 14px;
  color: var(--text-muted);
  font-size: 11.5px;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--border-strong);
}

.auth-role-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-role-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  cursor: pointer;
}
.auth-role-card:hover { border-color: var(--accent); background: var(--accent-soft); }

.auth-role-name { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.auth-role-badge {
  display: inline-block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-dark);
}
.auth-role-perms {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .charts-row { grid-template-columns: 1fr; }
  .form-layout { grid-template-columns: 1fr; }
  .summary-card { position: static; }
}

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar {
    position: sticky; top: 0; height: auto; width: 100%;
    flex-direction: row; align-items: center; padding: 10px 14px; gap: 14px;
    overflow-x: auto; z-index: 10;
  }
  .brand { border-bottom: none; padding: 0; }
  .brand-text .subtitle { display: none; }
  .nav { flex-direction: row; }
  .nav-item span.label { display: none; }
  .nav-item { padding: 8px 10px; }
  .sidebar-foot { display: none; }
  .main { padding: 18px 16px 40px; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .filter-bar .field { min-width: 130px; }
}
