/* MD Overview - "Liquid Glass" (owner, 12-10-2026), in Mahendra blue + white + saffron.
   Frosted glass panels over a soft blue/saffron light field. Saffron is a fill (active tab, main button), never text on white.
   Text always sits on a glass that is opaque enough to read; "reduce transparency" and old browsers get solid panels. */
:root {
  color-scheme: light;
  --bg-base: #e6ecf8; --bg-1: rgba(42, 91, 215, .42); --bg-2: rgba(244, 196, 48, .38); --bg-3: rgba(20, 48, 122, .30);
  --glass: rgba(255, 255, 255, .60); --glass-strong: rgba(255, 255, 255, .80); --glass-thin: rgba(255, 255, 255, .42);
  --sheen: rgba(255, 255, 255, .55); --edge: rgba(255, 255, 255, .90); --glass-line: rgba(20, 48, 122, .10);
  --surface: rgba(255, 255, 255, .74); --surface-2: rgba(20, 48, 122, .06); --hover: rgba(20, 48, 122, .07);
  --ink: #0b1530; --ink-2: #364260; --muted: #5a6683; --line: rgba(20, 48, 122, .11); --axis: rgba(20, 48, 122, .22);
  --brand: #14307a; --brand-2: #2a4fb0; --on-brand: #ffffff; --accent: #f4c430; --on-accent: #14307a;
  --series: #2a5bd7; --series-wash: rgba(42, 91, 215, .12);
  --good: #0ca30c; --warn: #fab219; --serious: #ec835a; --critical: #d03b3b; --idle: #9aa3b8;
  --good-text: #006300; --bad-text: #b42318;
  --shadow: inset 0 1px 0 var(--edge), 0 14px 34px -14px rgba(17, 34, 85, .30), 0 2px 6px rgba(17, 34, 85, .06);
  --shadow-lift: inset 0 1px 0 var(--edge), 0 22px 44px -16px rgba(17, 34, 85, .38), 0 3px 8px rgba(17, 34, 85, .08);
  --blur: 22px; --radius: 24px; --radius-sm: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg-base: #050a18; --bg-1: rgba(37, 78, 190, .50); --bg-2: rgba(244, 196, 48, .14); --bg-3: rgba(21, 46, 120, .55);
    --glass: rgba(20, 30, 60, .56); --glass-strong: rgba(14, 22, 46, .82); --glass-thin: rgba(255, 255, 255, .06);
    --sheen: rgba(255, 255, 255, .07); --edge: rgba(255, 255, 255, .14); --glass-line: rgba(255, 255, 255, .08);
    --surface: rgba(255, 255, 255, .07); --surface-2: rgba(255, 255, 255, .06); --hover: rgba(255, 255, 255, .08);
    --ink: #f1f4fc; --ink-2: #c3cbe0; --muted: #8f9ab6; --line: rgba(255, 255, 255, .09); --axis: rgba(255, 255, 255, .18);
    --brand: #0f2363; --brand-2: #2a4fb0; --series: #5585f5; --series-wash: rgba(85, 133, 245, .14);
    --good-text: #3ccf3c; --bad-text: #ff8a8a;
    --shadow: inset 0 1px 0 var(--edge), 0 18px 40px -14px rgba(0, 0, 0, .65);
    --shadow-lift: inset 0 1px 0 var(--edge), 0 24px 48px -14px rgba(0, 0, 0, .75);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-base: #050a18; --bg-1: rgba(37, 78, 190, .50); --bg-2: rgba(244, 196, 48, .14); --bg-3: rgba(21, 46, 120, .55);
  --glass: rgba(20, 30, 60, .56); --glass-strong: rgba(14, 22, 46, .82); --glass-thin: rgba(255, 255, 255, .06);
  --sheen: rgba(255, 255, 255, .07); --edge: rgba(255, 255, 255, .14); --glass-line: rgba(255, 255, 255, .08);
  --surface: rgba(255, 255, 255, .07); --surface-2: rgba(255, 255, 255, .06); --hover: rgba(255, 255, 255, .08);
  --ink: #f1f4fc; --ink-2: #c3cbe0; --muted: #8f9ab6; --line: rgba(255, 255, 255, .09); --axis: rgba(255, 255, 255, .18);
  --brand: #0f2363; --brand-2: #2a4fb0; --series: #5585f5; --series-wash: rgba(85, 133, 245, .14);
  --good-text: #3ccf3c; --bad-text: #ff8a8a;
  --shadow: inset 0 1px 0 var(--edge), 0 18px 40px -14px rgba(0, 0, 0, .65);
  --shadow-lift: inset 0 1px 0 var(--edge), 0 24px 48px -14px rgba(0, 0, 0, .75);
}
/* No glass where it cannot be drawn, or where the person asked for less transparency */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgba(255, 255, 255, .95); --glass-strong: #fff; --glass-thin: rgba(255, 255, 255, .9); }
  :root[data-theme="dark"] { --glass: #121b33; --glass-strong: #0e1630; --glass-thin: #18223a; }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: rgba(255, 255, 255, .97); --glass-strong: #fff; --glass-thin: #f3f6fc; }
  :root[data-theme="dark"] { --glass: #121b33; --glass-strong: #0e1630; --glass-thin: #18223a; }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg-base); color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased;
  min-height: 100vh; letter-spacing: -.005em; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(1100px 680px at 6% -12%, var(--bg-1), transparent 62%),
              radial-gradient(900px 620px at 104% -4%, var(--bg-2), transparent 58%),
              radial-gradient(1100px 820px at 58% 112%, var(--bg-3), transparent 62%); }
a { color: var(--series); }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- the glass ---------- */
.card, .topbar-in, .menu-list, dialog, .drawer, .sections-in {
  background-color: var(--glass);
  background-image: linear-gradient(180deg, var(--sheen), transparent 42%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
  backdrop-filter: blur(var(--blur)) saturate(180%);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow);
}

/* ---------- top bar: a floating glass bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; padding: 10px 14px 0; }
.topbar-in { max-width: 1320px; margin: 0 auto; padding: 9px 12px 9px 14px; display: flex; align-items: center; gap: 14px;
  border-radius: 22px; color: var(--ink); }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; min-width: 0; }
.brand img { width: 38px; height: 38px; border-radius: 11px; flex: none; box-shadow: 0 6px 14px -6px rgba(20, 48, 122, .6); }
.brand b { display: block; font-size: 17.5px; letter-spacing: -.02em; font-weight: 700; }
.brand small { display: block; font-size: 12px; color: var(--muted); }
.topbar .spacer { flex: 1; }
.stamp { font-size: 12.5px; color: var(--ink-2); text-align: right; line-height: 1.3; }
.icon-btn { background: var(--surface); border: 1px solid var(--glass-line); color: var(--ink); width: 38px; height: 38px;
  border-radius: 999px; display: inline-grid; place-items: center; cursor: pointer; flex: none;
  box-shadow: inset 0 1px 0 var(--edge); transition: transform .15s, background .15s; }
.icon-btn:hover { background: var(--glass-strong); transform: translateY(-1px); }
.icon-btn:active { transform: scale(.96); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.spin svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.menu { position: relative; }
.menu-list { position: absolute; right: 0; top: 48px; min-width: 230px; background-color: var(--glass-strong); color: var(--ink);
  border-radius: 18px; padding: 6px; z-index: 30; }
.menu-list a, .menu-list button { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0;
  background: none; border-radius: 12px; color: var(--ink); text-decoration: none; cursor: pointer; }
.menu-list a:hover, .menu-list button:hover { background: var(--hover); }
.menu-list .who { padding: 8px 12px 10px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }

/* ---------- layout ---------- */
main { max-width: 1320px; margin: 0 auto; padding: 22px 24px 40px; }
.page-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; }
.page-title h1 { margin: 0; font-size: 28px; letter-spacing: -.03em; color: var(--ink); }
.card { border-radius: var(--radius); }
.section-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 4px 12px; }
.section-h h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }

/* ---------- KPI row ---------- */
.kpis { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 16px; }
.hero { padding: 22px 24px; }
.hero .label, .tile .label { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.hero .big { font-size: 60px; font-weight: 700; line-height: 1; margin: 10px 0 6px; letter-spacing: -.04em; }
.hero .big span { font-size: 24px; color: var(--muted); font-weight: 600; letter-spacing: -.02em; }
.statusbar { display: flex; gap: 3px; height: 10px; margin: 16px 0 12px; }
.statusbar i { display: block; height: 100%; border-radius: 999px; min-width: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.tile { padding: 20px 22px; display: flex; flex-direction: column; justify-content: space-between; min-height: 140px; }
.tile .value { font-size: 36px; font-weight: 700; margin: 10px 0 2px; letter-spacing: -.035em; }
.tile .sub { font-size: 13px; color: var(--muted); }
.tile.alerting { box-shadow: var(--shadow), 0 0 0 2px rgba(208, 59, 59, .55); }

/* ---------- status ---------- */
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink);
  padding: 4px 11px 4px 6px; border-radius: 999px; background: var(--surface); white-space: nowrap;
  border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--edge); }
.st svg { width: 16px; height: 16px; flex: none; }
.c-online { color: var(--good); } .c-slow { color: var(--warn); } .c-key, .c-error { color: var(--serious); }
.c-down { color: var(--critical); } .c-limit { color: var(--warn); } .c-pending, .c-waiting, .c-paused { color: var(--idle); }
.bg-online { background: var(--good); } .bg-slow { background: var(--warn); } .bg-key, .bg-error { background: var(--serious); }
.bg-down { background: var(--critical); } .bg-pending, .bg-waiting, .bg-paused { background: var(--idle); }

/* ---------- alerts ---------- */
.alerts { padding: 6px; }
.alert { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; cursor: pointer; }
.alert + .alert { margin-top: 2px; }
.alert:hover { background: var(--hover); }
.alert .msg { flex: 1; min-width: 0; }
.alert .msg b { display: block; font-weight: 600; }
.alert .msg small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert .when { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.all-clear { padding: 16px 18px; display: flex; gap: 10px; align-items: center; color: var(--ink-2); }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.chip { border: 1px solid var(--glass-line); background: var(--surface); padding: 7px 15px; border-radius: 999px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2); box-shadow: inset 0 1px 0 var(--edge); transition: background .15s; }
.chip:hover { background: var(--glass-strong); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: transparent; color: var(--on-brand);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 14px -6px rgba(20, 48, 122, .7); }
.filters .search { margin-left: auto; min-width: 240px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }

/* ---------- system cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.sys { padding: 18px 20px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; text-align: left;
  transition: transform .2s ease, box-shadow .2s ease; }
.sys:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.sys-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sys-h b { font-size: 17px; display: block; letter-spacing: -.02em; }
.sys-h small { color: var(--muted); font-size: 12.5px; }
.figs { display: flex; flex-direction: column; }
.fig { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 9px 10px; margin: 0 -10px;
  border-top: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.fig .fl { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.fig .fv { font-size: 24px; font-weight: 700; line-height: 1.15; letter-spacing: -.03em; }
.fig .fd { font-size: 12.5px; color: var(--ink-2); }
.fig .spark { grid-row: 1 / span 3; grid-column: 2; }
.fig:hover { background: var(--hover); border-top-color: transparent; }
.up { color: var(--good-text) !important; } .down { color: var(--bad-text) !important; }
.flag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; margin-left: 6px;
  background: var(--warn); color: #3a2a00; vertical-align: 2px; letter-spacing: .03em; }
.sys-empty { font-size: 13px; color: var(--muted); padding: 10px 0 2px; border-top: 1px solid var(--line); }
.sys-f { font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sys-more { font-size: 12.5px; color: var(--series); font-weight: 600; padding: 2px 0 0; }
.empty-state { padding: 40px 24px; text-align: center; color: var(--ink-2); }

/* ---------- the slide-in sheet ---------- */
.scrim { position: fixed; inset: 0; background: rgba(8, 16, 38, .26); z-index: 40;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.drawer { position: fixed; top: 10px; right: 10px; bottom: 10px; width: min(660px, calc(100% - 20px)); z-index: 41;
  background-color: var(--glass-strong); border-radius: 28px; overflow-y: auto; box-shadow: var(--shadow-lift); }
.drawer-h { position: sticky; top: 0; z-index: 2; padding: 16px 16px 14px 22px; display: flex; gap: 12px; align-items: center;
  background: linear-gradient(180deg, var(--glass-strong) 70%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.drawer-h h2 { margin: 0; font-size: 21px; flex: 1; min-width: 0; letter-spacing: -.03em; }
.drawer-h a { color: var(--series); font-size: 13px; }
.drawer-b { padding: 4px 18px 32px; display: flex; flex-direction: column; gap: 14px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; border: 1px solid var(--glass-line); }
.seg button { border: 0; background: none; padding: 6px 13px; border-radius: 999px; cursor: pointer; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--glass-strong); color: var(--ink); box-shadow: inset 0 1px 0 var(--edge), 0 4px 10px -4px rgba(17, 34, 85, .35); }
.panel { padding: 18px 20px; }
.panel h3 { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); font-weight: 700; }
.chart-card { padding: 16px 18px 10px; }
.chart-card .ch { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.chart-card .ch b { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.chart-card .cv { font-size: 28px; font-weight: 700; letter-spacing: -.03em; }
.chart { position: relative; margin-top: 6px; touch-action: pan-y; }
.chart svg { display: block; width: 100%; overflow: visible; }
.tip { position: absolute; pointer-events: none; background: rgba(11, 21, 48, .86); color: #fff; font-size: 12.5px; padding: 7px 11px;
  border-radius: 12px; white-space: nowrap; transform: translate(-50%, -100%); z-index: 3;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.uptime { display: flex; gap: 2px; height: 34px; align-items: stretch; margin: 8px 0 10px; position: relative; }
.uptime i { flex: 1; border-radius: 3px; min-width: 2px; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kv div { background: var(--surface-2); border-radius: 16px; padding: 10px 14px; }
.kv b { display: block; font-size: 20px; letter-spacing: -.02em; }
.kv small { color: var(--muted); font-size: 12px; }

/* ---------- tables, forms, buttons ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
label.f small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=password], input[type=url], input[type=number], input[type=search], input[type=date], select, textarea {
  border: 1px solid var(--glass-line); background: var(--surface); border-radius: var(--radius-sm); padding: 10px 14px; width: 100%;
  min-width: 0; color: var(--ink); box-shadow: inset 0 1px 2px rgba(17, 34, 85, .06); transition: box-shadow .15s, background .15s; }
input:focus, select:focus, textarea:focus { outline: none; background: var(--glass-strong);
  box-shadow: 0 0 0 3px rgba(42, 91, 215, .28), inset 0 1px 2px rgba(17, 34, 85, .06); }
textarea { min-height: 80px; resize: vertical; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
input[type=checkbox] { accent-color: var(--brand); width: 17px; height: 17px; }
.btn { border: 1px solid var(--glass-line); background: var(--surface); padding: 10px 18px; border-radius: 999px; cursor: pointer;
  font-weight: 600; font-size: 14px; color: var(--ink); display: inline-flex; gap: 8px; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 var(--edge), 0 4px 12px -6px rgba(17, 34, 85, .35); transition: transform .15s, background .15s; }
.btn:hover { background: var(--glass-strong); transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn.primary { background: linear-gradient(180deg, #ffd864, #f4c430); border-color: rgba(160, 120, 0, .25); color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 8px 18px -8px rgba(212, 160, 0, .9); }
.btn.blue { background: linear-gradient(180deg, var(--brand-2), var(--brand)); border-color: transparent; color: var(--on-brand);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 18px -8px rgba(20, 48, 122, .8); }
.btn.danger { color: var(--bad-text); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: wait; transform: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.note { background: var(--glass-thin); border: 1px solid var(--glass-line); border-left: 4px solid var(--accent); padding: 11px 15px;
  border-radius: 16px; font-size: 13.5px; color: var(--ink-2); }
.err { color: var(--bad-text); font-size: 13.5px; }
.okmsg { color: var(--good-text); font-size: 13.5px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: rgba(11, 21, 48, .84); color: #fff;
  padding: 11px 20px; border-radius: 999px; z-index: 60; font-size: 14px; max-width: calc(100% - 32px);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .5); }
dialog { border-radius: 26px; background-color: var(--glass-strong); color: var(--ink); padding: 24px; width: min(440px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(8, 16, 38, .3); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

/* ---------- password eye ---------- */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 48px; }
.eye { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none;
  border-radius: 999px; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.eye:hover, .eye[aria-pressed="true"] { color: var(--ink); background: var(--hover); }
.eye:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; }
.eye svg { width: 20px; height: 20px; }
input::-ms-reveal, input::-ms-clear { display: none; }

/* ---------- clickable surfaces ---------- */
.clickable { cursor: pointer; position: relative; transition: transform .2s ease, box-shadow .2s ease; }
.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.tile.clickable::after { content: "›"; position: absolute; top: 14px; right: 18px; font-size: 22px; line-height: 1; color: var(--muted);
  transition: transform .15s, color .15s; }
.tile.clickable:hover::after { transform: translateX(3px); color: var(--series); }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.link-btn { border: 0; background: var(--surface); color: var(--series); font-weight: 600; font-size: 13px; cursor: pointer; padding: 5px 12px;
  border-radius: 999px; box-shadow: inset 0 1px 0 var(--edge); }
.link-btn:hover { background: var(--glass-strong); }
.legend-btn { border: 0; background: none; padding: 5px 10px; margin: -5px 0 -5px -10px; border-radius: 999px; display: inline-flex; gap: 6px;
  align-items: center; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.legend-btn:hover, .legend-btn[aria-pressed="true"] { background: var(--hover); color: var(--ink); }
.legend-btn[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--series); }
.alert .chev { color: var(--muted); font-size: 22px; line-height: 1; }
.status-chip { background: var(--series) !important; border-color: transparent !important; color: #fff !important; }
.ph { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; cursor: pointer; }
.ph:hover h3 { color: var(--series); }
.frow { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 14px; align-items: center; padding: 11px 10px; margin: 0 -10px;
  border-top: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.frow > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.frow .fl { font-size: 13.5px; color: var(--ink); font-weight: 600; }
.frow .fd { font-size: 12.5px; color: var(--ink-2); }
.frow .fv { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.brow { display: grid; grid-template-columns: minmax(120px, 190px) 1fr 64px; gap: 4px 12px; align-items: center; padding: 10px 10px;
  margin: 0 -10px; border-radius: 14px; cursor: pointer; }
.brow + .brow { border-top: 1px solid var(--line); }
.brow .bl { display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; font-weight: 600; min-width: 0; }
.brow .track { height: 12px; }
.brow .track i { display: block; height: 100%; background: var(--series); border-radius: 0 999px 999px 0; min-width: 3px; }
.brow .track i.slow { background: var(--warn); }
.brow .bv { text-align: right; font-size: 13px; }
.brow .bu { grid-column: 1 / -1; font-size: 12px; margin-top: -4px; }
.brow.na { grid-template-columns: 1fr auto; }
.frow:hover, .brow:hover { background: var(--hover); border-top-color: transparent; }
[data-go]:focus-visible, .legend-btn:focus-visible, .link-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.flash { animation: flash 1.8s ease; }
@keyframes flash { 0%, 45% { box-shadow: 0 0 0 3px var(--accent), var(--shadow); } 100% { box-shadow: var(--shadow); } }
body.locked { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- narrow phone screens (Galaxy Z Fold 7 cover screen, ~411 dp): keep the top bar on one line ---------- */
.menu-list #m-theme { display: none; }
@media (max-width: 640px) { .stamp br { display: none; } }
@media (max-width: 440px) {
  #theme-btn { display: none; }
  .menu-list #m-theme { display: block; }
  .brand b { white-space: nowrap; font-size: 16.5px; }
  .stamp { font-size: 12px; white-space: nowrap; }
  .upd-word { display: none; }
}

/* ---------- the app on a wide screen (Galaxy Z Fold 7 opened): two panes ---------- */
@media (min-width: 700px) {
  .in-app body.locked { overflow: auto; }
  .in-app .scrim { display: none; }
  .in-app .drawer { top: calc(var(--topbar-h, 64px) + 8px); width: calc(50% - 16px); }
  .in-app body.locked main { margin-right: 50%; }
  .in-app body.locked .grid { grid-template-columns: 1fr; }
  .in-app body.locked .kpis { grid-template-columns: 1fr 1fr; }
  .in-app body.locked .hero { grid-column: 1 / -1; }
  .in-app body.locked .kpis > .tile:last-child { grid-column: 1 / -1; }
  .in-app body.locked .filters .search { margin-left: 0; width: 100%; min-width: 0; }
}

@media (max-width: 980px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .hero, .kpis > .tile:last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  main { padding: 16px 14px 110px; }
  .topbar { padding: 8px 10px 0; }
  .topbar-in { padding: 8px 8px 8px 12px; gap: 10px; border-radius: 20px; }
  .brand small, .stamp .date { display: none; }
  .hero .big { font-size: 50px; }
  .tile { min-height: 0; padding: 18px; }
  .tile .value { font-size: 28px; }
  .grid { grid-template-columns: 1fr; }
  .filters .search { margin-left: 0; width: 100%; min-width: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr 1fr 1fr; }
  .drawer { top: 8px; left: 0; right: 0; bottom: 0; width: 100%; border-radius: 26px 26px 0 0; }
  .drawer-b { padding: 4px 14px 40px; }
  .brow:not(.na) { grid-template-columns: 1fr auto; grid-template-areas: "l v" "t t" "u u"; row-gap: 6px; }
  .brow .bl { grid-area: l; } .brow .track { grid-area: t; } .brow .bv { grid-area: v; } .brow .bu { grid-area: u; margin-top: 0; }
  .frow { grid-template-columns: 1fr auto; }
  .frow .spark { display: none; }
}

/* tablet width (Galaxy Z Fold 7 opened, a tablet upright): the three tiles in one row under the hero */
@media (min-width: 700px) and (max-width: 980px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .kpis > .tile:last-child { grid-column: auto; }
}
