/* KURONOA DASHBOARD — Modern Elegant Bakery */
@font-face { font-family: "Fraunces"; src: url(fonts/fraunces-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(fonts/fraunces-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ivory: #FFF8ED;
  --cream: #F6E9D5;
  --caramel: #B78052;
  --chocolate: #70412D;
  --gold: #C8A56A;
  --white: #FFFFFF;

  --ink: #3B2418;
  --ink-2: #6E5444;
  --ink-3: #9A8271;
  --line: #EBDCC4;
  --line-2: #E2CDAE;
  --surface: #FFFFFF;
  --surface-2: #FDF5E8;

  --ok: #3E7B4F;      --ok-bg: #E8F2E6;
  --warn: #A9542B;    --warn-bg: #FBE9DD;
  --unv: #8A6A2E;     --unv-bg: #F7EDD6;
  --off: #7C6F68;     --off-bg: #EEE8E4;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(112, 65, 45, .06), 0 8px 24px -12px rgba(112, 65, 45, .18);
  --sidebar-w: 248px;
  --topbar-h: 64px;
  --font: "Jakarta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); color: var(--ink); background: var(--ivory);
  font-size: 15px; line-height: 1.5; min-height: 100vh; min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--chocolate); }
.num, td.n, th.n { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--caramel); outline-offset: 2px; border-radius: 6px; }

/* ---------- Splash ---------- */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; gap: 22px; justify-items: center;
  background: var(--chocolate); transition: opacity .35s ease; }
.splash img { width: min(56vw, 240px); height: auto; }
.splash-bar { width: 120px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; }
.splash-bar span { display: block; width: 40%; height: 100%; background: var(--gold); animation: slide 1.1s ease-in-out infinite; }
.splash.out { opacity: 0; pointer-events: none; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* ---------- Login ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(1200px 600px at 50% -10%, var(--cream), var(--ivory)); }
.login-card { width: min(420px, 100%); background: var(--chocolate); color: var(--ivory); border-radius: 22px;
  padding: 28px 24px 22px; box-shadow: 0 30px 60px -30px rgba(112,65,45,.6); display: grid; gap: 14px; }
.login-logo { width: 200px; height: auto; margin: 0 auto 4px; }
.login-title { font-family: var(--serif); font-weight: 600; letter-spacing: .06em; font-size: 22px; margin: 0; text-align: center; }
.login-sub { margin: -10px 0 6px; text-align: center; color: var(--gold); font-size: 13px; letter-spacing: .04em; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--cream); }
.field input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,248,237,.08); color: var(--white); outline: none; }
.field input:focus { border-color: var(--gold); background: rgba(255,248,237,.14); }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--cream); }
.login-error { min-height: 1.2em; margin: 0; color: #FFC9A8; font-size: 13px; }
.login-note { margin: 0; font-size: 12px; color: rgba(246,233,213,.7); text-align: center; }

/* ---------- Buttons ---------- */
.btn { border: 0; border-radius: 12px; padding: 11px 16px; font-weight: 600; cursor: pointer; display: inline-flex; gap: 8px;
  align-items: center; justify-content: center; transition: transform .08s ease, background .2s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: var(--chocolate); }
.btn-primary:hover { background: #D4B47D; }
.btn-ghost { background: var(--surface); color: var(--chocolate); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.icon-btn { border: 0; background: transparent; color: inherit; width: 40px; height: 40px; border-radius: 12px; display: grid;
  place-items: center; cursor: pointer; flex: none; }
.icon-btn:hover { background: rgba(255,255,255,.12); }
.spin svg { animation: rot 1s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- Topbar ---------- */
.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: calc(var(--topbar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  display: flex; align-items: center; gap: 8px; background: var(--chocolate); color: var(--ivory);
  box-shadow: 0 6px 18px -12px rgba(0,0,0,.5); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; flex: 1 1 auto; overflow: hidden; }
.brand img { width: 74px; height: auto; flex: none; }
.brand-text { display: grid; line-height: 1.15; min-width: 0; }
.brand-text strong { font-family: var(--serif); font-weight: 600; letter-spacing: .08em; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text em { font-style: normal; font-size: 11.5px; color: var(--gold); letter-spacing: .03em; white-space: nowrap; }
.topbar-actions { margin-left: auto; flex: none; display: flex; align-items: center; gap: 2px; position: relative; }
.sync-pill { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: rgba(255,248,237,.12); color: var(--cream);
  white-space: nowrap; margin-right: 6px; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; }
.sync-pill.cache { background: rgba(200,165,106,.25); color: #FFE9BF; }
.sync-pill.err { background: rgba(255,120,80,.25); color: #FFD2BF; }
.menu-pop { position: absolute; right: 0; top: 46px; background: var(--surface); color: var(--ink); border-radius: 14px;
  box-shadow: var(--shadow); border: 1px solid var(--line); padding: 6px; min-width: 210px; display: grid; z-index: 40; }
.menu-pop button { text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.menu-pop button:hover { background: var(--surface-2); }

/* ---------- Layout ---------- */
.layout { flex: 1; display: flex; min-height: 0; width: 100%; }
.sidebar { width: var(--sidebar-w); flex: none; background: var(--surface); border-right: 1px solid var(--line);
  padding: 16px 12px 24px; position: sticky; top: calc(var(--topbar-h) + env(safe-area-inset-top));
  height: calc(100vh - var(--topbar-h) - env(safe-area-inset-top)); overflow-y: auto; }
.nav-group { margin-bottom: 6px; }
.nav-group-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
  padding: 10px 12px 4px; display: flex; justify-content: space-between; align-items: center; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; text-decoration: none;
  color: var(--ink-2); font-weight: 500; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active { background: var(--cream); color: var(--chocolate); font-weight: 600; }
.nav-item .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); flex: none; }
.nav-item.active .dot { background: var(--caramel); }
.nav-item .lbl { flex: 1; min-width: 0; }
.nav-flags { display: block; font-size: 11px; color: var(--warn); font-weight: 500; line-height: 1.3; margin-top: 1px; }
.badge { min-width: 20px; height: 20px; border-radius: 999px; padding: 0 6px; font-size: 11px; font-weight: 700;
  display: inline-grid; place-items: center; background: var(--warn); color: var(--white); }
.badge.off { background: var(--off); }
.sidebar-foot { margin-top: 18px; padding: 12px; border-radius: 12px; background: var(--surface-2); font-size: 12px; color: var(--ink-2); }

.main { flex: 1; min-width: 0; padding: 22px clamp(16px, 2.6vw, 34px) 40px; outline: none; }
.scrim { position: fixed; inset: 0; background: rgba(59,36,24,.45); z-index: 25; }

/* ---------- Banners ---------- */
.banner-stack:empty { display: none; }
.banner { display: flex; gap: 10px; align-items: center; padding: 9px max(16px, env(safe-area-inset-left)); font-size: 13px; }
.banner.offline { background: #4A2B1E; color: var(--cream); }
.banner.update { background: var(--gold); color: var(--chocolate); }
.banner button { margin-left: auto; }

/* ---------- Page ---------- */
.page-head { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; margin-bottom: 18px; }
.page-head h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(22px, 2.4vw, 30px); margin: 0; color: var(--chocolate); letter-spacing: .01em; }
.crumb { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--caramel); margin-bottom: 2px; font-weight: 600; }
.page-head .grow { flex: 1; min-width: 220px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.meta-row b { color: var(--ink); font-weight: 600; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; min-width: 0; }
.card + .card, .grid + .card, .card + .grid, .grid + .grid, .note + .card, .card + .note { margin-top: 16px; }
.grid > .card { margin-top: 0; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.card-title h2 { font-family: var(--serif); font-weight: 600; font-size: 17px; margin: 0; color: var(--chocolate); }
.card-sub { font-size: 12.5px; color: var(--ink-3); }

.kpi { position: relative; padding: 16px 16px 14px; background: linear-gradient(180deg, var(--white), var(--surface-2)); }
.kpi .k-label { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.kpi .k-value { font-size: clamp(17px, 1.55vw, 23px); font-weight: 700; color: var(--ink); margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.01em; }
.kpi .k-note { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.kpi.muted .k-value { color: var(--ink-3); }
.kpi.accent { background: var(--chocolate); border-color: var(--chocolate); }
.kpi.accent .k-label { color: var(--gold); }
.kpi.accent .k-value { color: var(--ivory); }
.kpi.accent .k-note { color: var(--cream); }
.kpi .flag-btn { margin: 0 0 8px; font-size: 11px; }

/* ---------- Status chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap; border: 0; cursor: default; line-height: 1.3; }
button.chip { cursor: pointer; }
button.chip:hover { filter: brightness(.97); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.unv { background: var(--unv-bg); color: var(--unv); }
.chip.off { background: var(--off-bg); color: var(--off); }
.chip.plain { background: var(--surface-2); color: var(--ink-2); }
.chip.plain::before { display: none; }

/* ---------- Alerts ---------- */
.alerts { display: grid; gap: 10px; margin-bottom: 16px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid; font-size: 13.5px; }
.alert .a-ico { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.alert .a-body { flex: 1; min-width: 0; }
.alert .a-title { font-weight: 700; }
.alert.warn { background: var(--warn-bg); border-color: #F1CDB5; color: #5E2F17; }
.alert.warn .a-ico { background: var(--warn); color: var(--white); }
.alert.unv { background: var(--unv-bg); border-color: #EAD9B2; color: #4F3B12; }
.alert.unv .a-ico { background: var(--unv); color: var(--white); }
.alert.off { background: var(--off-bg); border-color: #DDD3CD; color: #3C3430; }
.alert.off .a-ico { background: var(--off); color: var(--white); }
.alert.ok { background: var(--ok-bg); border-color: #CFE3CB; color: #24452C; }
.alert.ok .a-ico { background: var(--ok); color: var(--white); }
.alert .link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font-weight: 600; }
.note { font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 12px; padding: 10px 12px; }

/* ---------- DQ monitor ---------- */
.dq { background: var(--chocolate); color: var(--ivory); border-color: var(--chocolate); }
.dq .card-title h2 { color: var(--ivory); }
.dq .card-sub { color: var(--gold); }
.dq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.dq-cell { background: rgba(255,248,237,.07); border: 1px solid rgba(255,248,237,.12); border-radius: 12px; padding: 12px; }
.dq-cell .l { font-size: 11.5px; color: var(--cream); opacity: .85; letter-spacing: .04em; }
.dq-cell .v { font-size: 22px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.dq-cell .v small { font-size: 13px; font-weight: 500; opacity: .75; }
.dq-status { display: grid; gap: 8px; margin-top: 12px; }
.dq-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  background: rgba(255,248,237,.07); flex-wrap: wrap; }
.dq-row .t { font-size: 13.5px; }
.dq .chip.ok { background: #DDEFD9; } .dq .chip.warn { background: #FBE2D2; } .dq .chip.unv { background: #F5E6C4; } .dq .chip.off { background: #E9E2DE; }
.overall { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Checks list ---------- */
.checks { display: grid; gap: 8px; }
.check-item { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.check-item summary { list-style: none; cursor: pointer; padding: 12px 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.check-item summary::-webkit-details-marker { display: none; }
.check-item summary .id { font-size: 11px; font-weight: 700; color: var(--ink-3); letter-spacing: .06em; }
.check-item summary .tt { font-weight: 600; flex: 1; min-width: 180px; }
.check-item .cbody { padding: 0 14px 14px; font-size: 13.5px; color: var(--ink-2); }
.check-item ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 640px; }
table.t th, table.t td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.t th { position: sticky; top: 0; background: var(--cream); color: var(--chocolate); font-weight: 700; font-size: 12px; letter-spacing: .02em; z-index: 1; }
table.t th.n, table.t td.n { text-align: right; }
table.t tbody tr:nth-child(even) td { background: #FFFCF6; }
table.t tbody tr:hover td { background: var(--surface-2); }
table.t td.first, table.t th.first { position: sticky; left: 0; z-index: 2; background: inherit; }
table.t tbody td.first { background: var(--white); font-weight: 600; }
table.t tbody tr:nth-child(even) td.first { background: #FFFCF6; }
table.t th.first { background: var(--cream); z-index: 3; }
table.t tfoot td { background: var(--cream) !important; font-weight: 700; color: var(--chocolate); border-bottom: 0; }
table.t tr.nodata td { color: var(--ink-3); }
table.t td .warnmark { color: var(--warn); font-weight: 700; margin-left: 4px; cursor: help; }
table.t td.flagged { box-shadow: inset 0 0 0 2px #E7A47E; }
.neg { color: #8C3B1D; }

/* ---------- Heatmap ---------- */
.heat { border-collapse: separate; border-spacing: 3px; font-size: 11px; min-width: 900px; width: 100%; }
.heat th { font-weight: 600; color: var(--ink-3); padding: 2px; text-align: center; white-space: nowrap; }
.heat th.rowh { text-align: left; color: var(--ink-2); padding-right: 8px; }
.heat td { height: 30px; border-radius: 6px; text-align: center; color: var(--ink); font-variant-numeric: tabular-nums; position: relative; }
.heat td.dark { color: var(--white); }
.heat td.odd { outline: 2px dashed var(--warn); outline-offset: -2px; }
.heat-legend { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); margin-top: 10px; flex-wrap: wrap; }
.heat-legend .bar { width: 160px; height: 10px; border-radius: 6px; background: linear-gradient(90deg, #FFF8ED, #F6E9D5, #C8A56A, #B78052, #70412D); }

/* ---------- Charts ---------- */
.chart-box { position: relative; height: 300px; }
.chart-box.tall { height: 360px; }
.chart-foot { font-size: 12px; color: var(--ink-3); margin-top: 8px; }

/* ---------- Controls ---------- */
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.select, .search { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--white); min-height: 40px; }
.search { min-width: 200px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.seg button.on { background: var(--white); color: var(--chocolate); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; font-size: 13px; color: var(--ink-2); }

/* ---------- Skeleton / empty ---------- */
.skel { background: linear-gradient(90deg, #F5EBDB 25%, #FBF3E6 37%, #F5EBDB 63%); background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite; border-radius: 10px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skel.h1 { height: 34px; width: 40%; margin-bottom: 18px; }
.skel.kpi { height: 96px; }
.skel.block { height: 300px; margin-top: 16px; }
.empty { text-align: center; padding: 40px 16px; color: var(--ink-2); }
.empty h3 { font-family: var(--serif); color: var(--chocolate); margin: 10px 0 6px; }
.empty .ico { width: 56px; height: 56px; margin: 0 auto; border-radius: 16px; display: grid; place-items: center; background: var(--cream); color: var(--chocolate); font-size: 24px; }

/* ---------- Modal / toast ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(59,36,24,.5); display: grid; place-items: center; padding: 16px; }
.modal-card { width: min(640px, 100%); max-height: min(86vh, 760px); overflow: auto; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); }
.modal-head { position: sticky; top: 0; background: var(--surface); display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 8px; gap: 10px; }
.modal-head h2 { margin: 0; font-family: var(--serif); color: var(--chocolate); font-size: 19px; }
.modal-head .icon-btn:hover { background: var(--surface-2); }
.modal-body { padding: 0 18px 18px; font-size: 14px; color: var(--ink-2); }
.modal-body h4 { margin: 14px 0 6px; color: var(--ink); }
.modal-body .opt { display: grid; gap: 10px; margin: 12px 0; }
.modal-body .opt label { display: flex; gap: 8px; align-items: flex-start; }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 70;
  background: var(--ink); color: var(--ivory); padding: 10px 16px; border-radius: 12px; font-size: 13.5px; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 14px max(16px, env(safe-area-inset-left)) calc(14px + env(safe-area-inset-bottom));
  font-size: 12px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: center; text-align: center; }
.footer strong { color: var(--chocolate); letter-spacing: .06em; }

/* ---------- Responsive ---------- */
.only-mobile { display: none; }
@media (max-width: 960px) {
  .only-mobile { display: grid; }
  .sidebar { position: fixed; z-index: 28; left: 0; top: 0; bottom: 0; height: 100%; width: min(84vw, 300px);
    padding-top: calc(var(--topbar-h) + env(safe-area-inset-top) + 8px); transform: translateX(-102%); transition: transform .22s ease;
    box-shadow: 10px 0 30px -18px rgba(0,0,0,.45); }
  .sidebar.open { transform: none; }
  .brand-text em { display: none; }
}
@media (max-width: 560px) {
  :root { --topbar-h: 58px; }
  body { font-size: 14px; }
  .brand img { width: 56px; }
  .brand-text strong { font-size: 13px; letter-spacing: .05em; }
  .sync-pill { display: none; }
  .hide-xs { display: none !important; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px; }
  .kpi .k-value { font-size: 16px; }
  .kpi .k-label { font-size: 10.5px; }
  .card { padding: 14px; border-radius: 14px; }
  .chart-box { height: 250px; }
  .main { padding-top: 16px; }
}
@media (max-width: 400px) { .brand-text strong { font-size: 12px; letter-spacing: .03em; } .icon-btn { width: 36px; } }
@media (max-width: 340px) { .brand-text { display: none; } }
@media (orientation: landscape) and (max-height: 520px) {
  .topbar { --topbar-h: 52px; }
  .chart-box { height: 220px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .topbar, .sidebar, .footer, .banner-stack { display: none !important; } }

/* Navigasi ringkas: judul tab saja */
.sidebar > .nav-item { margin-bottom: 2px; }
.nav-heading { display: flex; align-items: center; gap: 10px; padding: 9px 12px 4px; color: var(--ink-2); font-weight: 500; }
.nav-heading::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.nav-item.sub { padding-left: 28px; font-size: 14px; }
