:root {
  color-scheme: light;
  --bg: #f7f8f8; --surface: #ffffff; --surface-2: #f3f4f5; --surface-3: #e9ebec; --line: #e8eaeb; --line-2: #d8dbdd;
  --ink: #111518; --ink-2: #4d555b; --ink-3: #697178;
  --accent: #0f766e; --accent-ink: #0b5f58; --on-accent: #ffffff; --accent-soft: #e4f4f1; --accent-ring: rgba(15,118,110,.22);
  --good: #15703b; --good-soft: #e3f5e9; --warn: #8a5300; --warn-soft: #fcf1da; --crit: #b92c28; --crit-soft: #fcebe9; --info: #1f5cae; --info-soft: #e7f0fb;
  --note: #fff9e3; --note-line: #eadfae; --ai: #5b3fc4; --ai-soft: #f0edfc;
  --side: #fbfbfb; --side-2: #eff1f2; --side-ink: #4d555b; --side-ink-2: #7b838a; --side-on: #111518; --side-line: #e8eaeb; --side-ind: #ffffff;
  --panel: #0c1716; --panel-ink: #c3d2ce; --panel-ink-2: #8aa09b; --code-bg: #101718; --code-ink: #dbe7e4;
  --series: #0f8f83; --grid: #eceeef; --scrim: rgba(12,17,19,.42);
  --shadow: 0 1px 2px rgba(17,21,24,.04); --shadow-md: 0 1px 2px rgba(17,21,24,.04), 0 8px 24px -10px rgba(17,21,24,.14); --shadow-lg: 0 2px 6px rgba(17,21,24,.06), 0 24px 60px -12px rgba(17,21,24,.26);
  --radius: 12px; --mono: "Geist Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.2,.7,.2,1); --fast: .14s; --med: .28s;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0e0f; --surface: #131718; --surface-2: #1b2021; --surface-3: #262c2d; --line: #22282a; --line-2: #333a3c;
  --ink: #eef1f0; --ink-2: #b2bab8; --ink-3: #8f9896;
  --accent: #36c2ae; --accent-ink: #66d8c8; --on-accent: #04201c; --accent-soft: #12302c; --accent-ring: rgba(54,194,174,.28);
  --good: #63cf8b; --good-soft: #14291c; --warn: #e9b35c; --warn-soft: #2f2511; --crit: #f08a85; --crit-soft: #351917; --info: #84b4f2; --info-soft: #16263b;
  --note: #2c2410; --note-line: #4d4116; --ai: #b5a5f5; --ai-soft: #231d3f;
  --side: #0e1112; --side-2: #1a1f20; --side-ink: #a9b2b0; --side-ink-2: #7f8987; --side-on: #eef1f0; --side-line: #1e2425; --side-ind: #1e2425;
  --panel: #0a1312; --code-bg: #0a0d0e;
  --series: #2bb3a0; --grid: #22282a; --scrim: rgba(0,0,0,.6);
  --shadow: none; --shadow-md: 0 8px 24px -10px rgba(0,0,0,.6); --shadow-lg: 0 24px 60px -12px rgba(0,0,0,.75);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--accent-ring); }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 22px; line-height: 1.2; letter-spacing: -.022em; font-weight: 600; }
h2 { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: 13.5px; font-weight: 600; letter-spacing: -.005em; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; flex: none; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--ink-3); }
::-webkit-scrollbar-track { background: transparent; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); } .small { font-size: 12.5px; } .tiny { font-size: 11.5px; }
.mono { font-family: var(--mono); font-size: .9em; direction: ltr; unicode-bidi: isolate; } .num { font-variant-numeric: tabular-nums; }
.b { font-weight: 600; } .nowrap { white-space: nowrap; } .right { text-align: end; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; } .row.wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; } .stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; } .stack.tight { gap: 8px; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt { margin-top: 14px; } .mt-s { margin-top: 8px; } .mb { margin-bottom: 14px; }
[hidden] { display: none !important; }

/* Shell */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); height: 100dvh; }
.side { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; min-height: 0; z-index: 40; border-inline-end: 1px solid var(--side-line); }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 10px; color: var(--side-on); font-weight: 600; font-size: 15.5px; letter-spacing: -.02em; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(150deg, #17a394, #0d6f67); display: grid; place-items: center; color: #fff; box-shadow: 0 1px 2px rgba(13,111,103,.4), inset 0 1px 0 rgba(255,255,255,.22); }
.nav { overflow-y: auto; flex: 1; padding: 2px 10px 12px; position: relative; }
.nav-h { color: var(--side-ink-2); font-size: 11px; font-weight: 500; padding: 14px 10px 5px; }
.nav a { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 8px; color: var(--side-ink); font-weight: 450; font-size: 13.5px; transition: color var(--fast), background var(--fast); }
.nav a svg { opacity: .78; transition: opacity var(--fast); }
.nav a:hover { background: var(--side-2); text-decoration: none; color: var(--side-on); }
.nav a.on { color: var(--side-on); font-weight: 550; }
.nav a.on:hover { background: transparent; }
.nav a.on svg, .nav a:hover svg { opacity: 1; }
.nav-ind { position: absolute; inset-inline: 10px; height: 32px; top: 0; border-radius: 8px; background: var(--side-ind); box-shadow: 0 0 0 1px var(--line), var(--shadow); opacity: 0; z-index: 0; pointer-events: none; }
.nav-ind.ready { transition: transform var(--med) var(--ease), opacity var(--fast); }
.nav .count { margin-inline-start: auto; background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 9px; font-variant-numeric: tabular-nums; }
.side-foot { padding: 10px; border-top: 1px solid var(--side-line); font-size: 12px; color: var(--side-ink-2); }
.side-foot a { color: var(--side-ink); }
.side-user { display: flex; align-items: center; gap: 9px; padding: 4px 6px; }
.side-links { display: flex; justify-content: space-between; gap: 8px; padding: 6px 6px 0; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 9px 18px; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); flex: none; position: relative; z-index: 20; }
.content { flex: 1; overflow-y: auto; min-height: 0; }
.page { padding: 26px 28px 44px; max-width: 1280px; margin-inline: auto; }
.page-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.page-h p { color: var(--ink-2); margin-top: 4px; }
.iconbtn { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid transparent; background: transparent; border-radius: 8px; color: var(--ink-2); position: relative; flex: none; transition: background var(--fast), color var(--fast), transform var(--fast); }
.iconbtn:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.iconbtn:active { transform: scale(.94); }
.iconbtn .dot { position: absolute; top: 6px; inset-inline-end: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--crit); box-shadow: 0 0 0 2px var(--surface); animation: pulse 2.6s ease-out infinite; }
.menu-btn { display: none; }
.scrim { display: none; }
.pswitch { position: relative; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; height: 34px; background: var(--surface); min-width: 0; box-shadow: var(--shadow); transition: border-color var(--fast); }
.pswitch:hover { border-color: var(--line-2); }
.pswitch select { border: 0; background: transparent; font-weight: 550; font-size: 13px; outline: none; max-width: 190px; min-width: 0; padding-block: 6px; }
.pswitch option { background: var(--surface); color: var(--ink); }
.searchbox { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid transparent; border-radius: 9px; padding: 0 10px; height: 34px; flex: 1; max-width: 420px; color: var(--ink-3); min-width: 0; transition: background var(--fast), border-color var(--fast), box-shadow var(--fast); }
.searchbox:focus-within { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.searchbox input { border: 0; outline: 0; background: transparent; width: 100%; min-width: 0; color: var(--ink); font-size: 13px; }
.searchbox input::placeholder { color: var(--ink-3); }
.popover { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; width: 340px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 60; padding: 6px; animation: pop .16s var(--ease); transform-origin: top right; }
.popwrap { position: relative; }
.pop-item { display: flex; gap: 10px; padding: 9px; border-radius: 8px; color: var(--ink); transition: background var(--fast); }
.pop-item:hover { background: var(--surface-2); text-decoration: none; }

/* Logos and channels */
.logo { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 9.5px; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.logo.lg { width: 42px; height: 42px; border-radius: 11px; font-size: 15px; }
.ch { display: inline-grid; place-items: center; border-radius: 6px; color: #fff; flex: none; width: 22px; height: 22px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.ch.s { width: 16px; height: 16px; border-radius: 4px; }
.ch.l { width: 38px; height: 38px; border-radius: 10px; }
.ch.off { filter: grayscale(1); opacity: .42; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 11.5px; background: var(--surface-3); color: var(--ink); flex: none; position: relative; }
.avatar.s { width: 24px; height: 24px; font-size: 10px; }
.avatar.l { width: 54px; height: 54px; font-size: 18px; }
.avatar .on { position: absolute; bottom: -1px; inset-inline-end: -1px; width: 8px; height: 8px; background: #27a35b; border: 2px solid var(--surface); border-radius: 50%; box-sizing: content-box; }
.av-wrap { position: relative; flex: none; }
.av-wrap .ch { position: absolute; bottom: -3px; inset-inline-end: -4px; box-shadow: 0 0 0 2px var(--surface); }

/* Primitives */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card.pad { padding: 16px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-b { padding: 16px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 550; font-size: 13px; white-space: nowrap; color: var(--ink); box-shadow: var(--shadow); transition: background var(--fast), border-color var(--fast), color var(--fast), transform var(--fast), box-shadow var(--fast), filter var(--fast); }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); box-shadow: 0 1px 2px rgba(15,118,110,.3), inset 0 1px 0 rgba(255,255,255,.14); }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn.danger { color: var(--crit); border-color: color-mix(in srgb, var(--crit) 40%, var(--line)); }
.btn.danger:hover { background: var(--crit-soft); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.s { height: 28px; padding: 0 9px; font-size: 12.5px; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 20px; font-size: 11.5px; font-weight: 500; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); } .pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.crit { background: var(--crit-soft); color: var(--crit); } .pill.info { background: var(--info-soft); color: var(--info); }
.pill.ai { background: var(--ai-soft); color: var(--ai); } .pill.accent { background: var(--accent-soft); color: var(--accent-ink); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--surface-2); font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lbl { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.hint { font-size: 12px; color: var(--ink-3); }
.input, .select, .textarea { width: 100%; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); min-width: 0; transition: border-color var(--fast), box-shadow var(--fast); }
.input, .select { min-height: 34px; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.textarea { resize: vertical; min-height: 84px; }
.select.s, .input.s { padding: 3px 7px; min-height: 28px; font-size: 12.5px; border-radius: 8px; width: auto; }
.switch { position: relative; display: inline-block; width: 34px; height: 20px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 12px; transition: background .2s var(--ease); }
.switch span::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .22s var(--ease); box-shadow: 0 1px 2px rgba(0,0,0,.28); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(14px); }
[dir="rtl"] .switch input:checked + span::after { transform: translateX(-14px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg { display: inline-flex; background: var(--surface-2); padding: 2px; border-radius: 9px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { border: 0; background: transparent; height: 24px; padding: 0 10px; border-radius: 7px; font-weight: 500; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; transition: color var(--fast), background var(--fast), box-shadow var(--fast); }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.1), 0 0 0 .5px rgba(0,0,0,.04); }
.tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 8px 1px; font-weight: 500; color: var(--ink-2); white-space: nowrap; transition: color var(--fast), border-color var(--fast); }
.tabs button:hover { color: var(--ink); }
.tabs button.on { border-color: var(--accent); color: var(--ink); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th { text-align: start; font-size: 12px; font-weight: 500; color: var(--ink-3); padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th:first-child, td:first-child { padding-inline-start: 16px; } th:last-child, td:last-child { padding-inline-end: 16px; }
tr:last-child td { border-bottom: 0; }
th.right, td.right { text-align: end; }
td { transition: background var(--fast); }
tr.link { cursor: pointer; } tr.link:hover td { background: var(--surface-2); }
.banner { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13px; background: var(--info-soft); color: var(--info); }
.banner svg { margin-top: 2px; }
.banner.warn { background: var(--warn-soft); color: var(--warn); } .banner.crit { background: var(--crit-soft); color: var(--crit); } .banner.good { background: var(--good-soft); color: var(--good); } .banner.plain { background: var(--surface-2); color: var(--ink-2); }
.banner a { color: inherit; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.setrow:last-child { border-bottom: 0; padding-bottom: 0; } .setrow:first-child { padding-top: 0; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; font-size: 13px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; overflow-wrap: anywhere; }
dl { margin: 0; }
.empty { text-align: center; padding: 40px 16px; color: var(--ink-3); }

/* KPI */
.kpi { padding: 15px 16px; }
.kpi .v { font-size: 26px; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 12.5px; color: var(--ink-2); font-weight: 450; }
.kpi .d { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.meter { height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--series); border-radius: 4px; transform-origin: 0 50%; }
[dir="rtl"] .meter i { transform-origin: 100% 50%; }
.meter i.warn { background: var(--warn); } .meter i.crit { background: var(--crit); }

/* Charts */
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: 112px minmax(0, 1fr) 54px; align-items: center; gap: 10px; font-size: 12.5px; padding: 2px 4px; margin-inline: -4px; border-radius: 6px; transition: background var(--fast); }
.hbar:hover { background: var(--surface-2); }
.hbar .track { height: 12px; display: flex; }
.hbar .fill { background: var(--series); height: 100%; border-radius: 3px; min-width: 2px; transform-origin: 0 50%; }
[dir="rtl"] .hbar .fill { transform-origin: 100% 50%; }
.hbar .val { text-align: end; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 550; }
.linechart { position: relative; }
.linechart svg { width: 100%; height: auto; overflow: visible; }
.linechart .tick { font-size: 8px; fill: var(--ink-3); font-family: inherit; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--surface); font-size: 12px; border-radius: 7px; padding: 4px 8px; transform: translate(-50%, -125%); white-space: nowrap; z-index: 5; box-shadow: var(--shadow-md); }

/* Login */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-side { background: var(--panel); color: #fff; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; position: relative; overflow: hidden; isolation: isolate; }
.auth-side .brand { color: #fff; }
.auth-side::before, .auth-side::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); }
.auth-side::before { width: 520px; height: 520px; background: #12907f; opacity: .34; top: -180px; inset-inline-end: -140px; animation: drift 16s ease-in-out infinite alternate; }
.auth-side::after { width: 420px; height: 420px; background: #4c3bb0; opacity: .22; bottom: -160px; inset-inline-start: -100px; animation: drift 20s ease-in-out infinite alternate-reverse; }
.auth-side h2 { font-size: 38px; line-height: 1.08; letter-spacing: -.035em; font-weight: 600; max-width: 520px; }
.auth-side p { color: var(--panel-ink); margin-top: 14px; max-width: 460px; font-size: 15px; }
.auth-chs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.auth-chs .ch { box-shadow: 0 6px 18px -6px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.14); animation: rise .5s var(--ease) both; }
.auth-chs .ch:nth-child(2) { animation-delay: .04s; } .auth-chs .ch:nth-child(3) { animation-delay: .08s; } .auth-chs .ch:nth-child(4) { animation-delay: .12s; } .auth-chs .ch:nth-child(5) { animation-delay: .16s; } .auth-chs .ch:nth-child(6) { animation-delay: .2s; } .auth-chs .ch:nth-child(7) { animation-delay: .24s; } .auth-chs .ch:nth-child(8) { animation-delay: .28s; } .auth-chs .ch:nth-child(9) { animation-delay: .32s; } .auth-chs .ch:nth-child(10) { animation-delay: .36s; }
.auth-form { display: grid; place-items: center; padding: 32px 22px; background: var(--surface); }
.auth-form form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; animation: rise .4s var(--ease) both; }
.auth-form .btn { height: 38px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12px; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }

/* Products and channels */
.prod-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; transition: border-color var(--fast), box-shadow var(--med) var(--ease), transform var(--med) var(--ease); }
.prod-card:hover, .ch-tile:hover, .lift:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); transform: translateY(-1px); text-decoration: none; }
.chs { display: flex; flex-wrap: wrap; gap: 4px; }
.ch-tile { padding: 14px; display: flex; flex-direction: column; gap: 10px; transition: border-color var(--fast), box-shadow var(--med) var(--ease), transform var(--med) var(--ease); }
.ch-tile.err { border-color: color-mix(in srgb, var(--crit) 50%, var(--line)); }
.matrix td, .matrix th { text-align: center; padding: 9px 6px; } .matrix td:first-child, .matrix th:first-child { text-align: start; padding-inline-start: 14px; }
.mdot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; }
.mdot.connected { background: var(--good-soft); color: var(--good); } .mdot.error { background: var(--crit-soft); color: var(--crit); } .mdot.none { color: var(--ink-3); }

/* Modal */
.modal-back { position: fixed; inset: 0; background: var(--scrim); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 90; padding: 16px; overflow-y: auto; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; width: 100%; max-width: 500px; box-shadow: var(--shadow-lg); }
.modal.wide { max-width: 680px; }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-b { padding: 18px; display: flex; flex-direction: column; gap: 13px; }
.modal-f { padding: 13px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.modal-back.enter { animation: fade .16s ease-out; }
.modal-back.enter .modal { animation: modal-in .24s var(--ease); }
.modal-back.step .modal-b { animation: fade .2s ease-out; }
.modal-back.leaving { animation: fade .13s ease-in reverse both; }
.modal-back.leaving .modal { animation: modal-in .13s ease-in reverse both; }
.steps { display: flex; gap: 6px; }
.steps i { height: 3px; flex: 1; background: var(--surface-3); border-radius: 2px; transition: background var(--med); }
.steps i.on { background: var(--accent); }
.oauth-box { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--surface-2); }
.pick { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; transition: background var(--fast), border-color var(--fast); }
.pick:hover { background: var(--surface-2); border-color: var(--line-2); } .pick input { margin: 0; accent-color: var(--accent); }
.pick:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.otp { display: flex; gap: 8px; }
.otp input { width: 44px; height: 46px; text-align: center; font-size: 18px; font-weight: 600; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); }
.code { font-family: var(--mono); font-size: 12px; background: var(--code-bg); color: var(--code-ink); border-radius: 10px; padding: 13px 14px; overflow-x: auto; white-space: pre; line-height: 1.65; direction: ltr; text-align: left; }

/* Toast */
#toast-root { position: fixed; bottom: 20px; inset-inline: 0; display: flex; justify-content: center; pointer-events: none; z-index: 120; }
.toast { background: var(--ink); color: var(--surface); padding: 9px 14px; border-radius: 10px; font-weight: 500; font-size: 13px; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); animation: toast-in .24s var(--ease); }
.toast.leaving { animation: toast-in .16s ease-in reverse both; }

/* Inbox */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr) 290px; height: 100%; min-height: 0; background: var(--surface); }
.inbox.focus { grid-template-columns: minmax(0, 1fr) 320px; }
.inbox > section { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.pane-list { border-inline-end: 1px solid var(--line); }
.pane-profile { border-inline-start: 1px solid var(--line); overflow-y: auto; background: var(--surface); }
.list-head { padding: 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; flex: none; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.filters select { width: 100%; min-width: 0; height: 28px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 12.5px; transition: border-color var(--fast); }
.filters select:hover { border-color: var(--line-2); }
.chfilter { display: flex; gap: 3px; flex-wrap: wrap; }
.chfilter button { border: 0; background: transparent; padding: 1px; border-radius: 7px; display: grid; place-items: center; transition: background var(--fast), box-shadow var(--fast), transform var(--fast); }
.chfilter button.txt { font-size: 11.5px; font-weight: 550; padding: 2px 7px; color: var(--ink-2); }
.chfilter button:hover { background: var(--surface-2); transform: translateY(-1px); }
.chfilter button.on { box-shadow: 0 0 0 2px var(--accent); }
.chfilter button.dim .ch { opacity: .34; }
.bulk { display: flex; gap: 6px; align-items: center; background: var(--accent-soft); color: var(--accent-ink); padding: 7px 12px; font-weight: 550; font-size: 12.5px; flex: none; flex-wrap: wrap; }
.conv-list { overflow-y: auto; flex: 1; min-height: 0; }
.conv { display: flex; gap: 9px; padding: 12px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; transition: background var(--fast); }
.conv:hover { background: var(--surface-2); }
.conv.on { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
[dir="rtl"] .conv.on { box-shadow: inset -2px 0 0 var(--accent); }
.conv input[type=checkbox] { margin: 2px 0 0; accent-color: var(--accent); flex: none; opacity: .35; transition: opacity var(--fast); }
.conv:hover input[type=checkbox], .conv input[type=checkbox]:checked, .conv input[type=checkbox]:focus-visible { opacity: 1; }
@media (hover: none) { .conv input[type=checkbox] { opacity: 1; } }
.conv .name { font-weight: 550; } .conv.unread .name, .conv.unread .subj { font-weight: 650; color: var(--ink); }
.conv .subj { font-size: 12.5px; color: var(--ink-2); }
.conv .prev { font-size: 12.5px; color: var(--ink-3); }
.ucount { background: var(--accent); color: var(--on-accent); min-width: 17px; height: 17px; border-radius: 9px; font-size: 10.5px; font-weight: 600; display: inline-grid; place-items: center; padding: 0 4px; }
.th-head { padding: 10px 16px; border-bottom: 1px solid var(--line); flex: none; display: flex; flex-direction: column; gap: 8px; }
.th-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); min-height: 0; }
.msg { display: flex; gap: 8px; max-width: min(620px, 88%); }
.msg.out { align-self: flex-end; flex-direction: row-reverse; }
.msg.pop { animation: msg-in .3s var(--ease); transform-origin: bottom right; }
.bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; border-start-start-radius: 5px; padding: 8px 12px; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; box-shadow: var(--shadow); }
.msg.out .bubble { background: var(--accent-soft); border-color: transparent; border-start-start-radius: 14px; border-start-end-radius: 5px; box-shadow: none; }
.msg.ai .bubble { background: var(--ai-soft); border-color: transparent; }
.msg .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); margin-bottom: 4px; }
.msg.out .meta { justify-content: flex-end; }
.msg.note { align-self: stretch; max-width: none; }
.msg.note .bubble { background: var(--note); border: 1px dashed var(--note-line); border-radius: 10px; width: 100%; box-shadow: none; }
.sysline { align-self: center; font-size: 12px; color: var(--ink-3); text-align: center; max-width: 90%; }
.attach { display: flex; width: fit-content; max-width: 100%; gap: 6px; align-items: center; margin-top: 6px; padding: 4px 8px; background: var(--surface-2); border-radius: 7px; font-size: 12px; color: var(--ink-2); }
.postctx { border: 1px solid var(--line); background: var(--surface); padding: 10px 12px; border-radius: 10px; font-size: 12.5px; display: flex; gap: 10px; align-items: center; }
.postctx .thumb { width: 42px; height: 42px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; color: var(--ink-3); flex: none; }
.cmt-actions { display: flex; gap: 12px; margin-top: 4px; font-size: 12px; flex-wrap: wrap; }
.cmt-actions button { border: 0; background: none; padding: 0; color: var(--ink-2); font-weight: 500; }
.cmt-actions button:hover { color: var(--ink); text-decoration: underline; }
.collision { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--warn); padding: 5px 16px; background: var(--warn-soft); flex: none; }
.composer { border-top: 1px solid var(--line); background: var(--surface); padding: 9px 14px 11px; }
.pane-thread #composerWrap { flex: none; max-height: 68%; overflow-y: auto; }
.composer .textarea { min-height: 54px; display: block; }
.cbar { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; padding: 4px 9px; border-radius: 8px; margin-bottom: 7px; flex-wrap: wrap; }
.cbar.good { background: var(--good-soft); color: var(--good); } .cbar.warn { background: var(--warn-soft); color: var(--warn); } .cbar.crit { background: var(--crit-soft); color: var(--crit); } .cbar.plain { background: var(--surface-2); color: var(--ink-2); }
.cbar a { color: inherit; text-decoration: underline; font-weight: 600; }
.cbar .select { flex: 1 1 190px; width: auto; background: var(--surface); color: var(--ink); }
.composer.note-mode .textarea { background: var(--note); border-color: var(--note-line); }
.ai-card { background: var(--ai-soft); border-radius: 10px; padding: 9px 11px; margin-bottom: 9px; }
.ai-card .t { white-space: pre-wrap; font-size: 13px; margin-top: 4px; }
.composer .ai-card { padding: 7px 10px; margin-bottom: 7px; }
.composer .ai-card .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-fields { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1.5fr); gap: 5px 8px; align-items: center; margin-bottom: 8px; font-size: 12.5px; color: var(--ink-3); }
.mini-fields input { padding: 4px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); min-width: 0; width: 100%; }
.side-sec { padding: 14px; border-bottom: 1px solid var(--line); }
.side-sec:last-child { border-bottom: 0; }
.side-sec h3 { margin-bottom: 8px; }
.back-btn { display: none; }
.no-sel { flex: 1; display: grid; place-items: center; color: var(--ink-3); padding: 40px; text-align: center; }
.profile-close { display: none; }

/* Calls */
.call-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(250px, .8fr); }
.wave { display: flex; align-items: center; gap: 2px; height: 42px; flex: 1; min-width: 0; overflow: hidden; }
.wave i { width: 3px; background: var(--line-2); border-radius: 2px; flex: none; transition: background var(--fast); }
.wave i.p { background: var(--accent); }
.player { display: flex; align-items: center; gap: 12px; }
.play { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--on-accent); border: 0; display: grid; place-items: center; flex: none; transition: transform var(--fast), filter var(--fast); }
.play:hover { filter: brightness(1.08); } .play:active { transform: scale(.94); }
.dial-display { font-family: var(--mono); font-size: 20px; text-align: center; padding: 8px; min-height: 44px; overflow-wrap: anywhere; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.keypad button { padding: 10px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 550; font-size: 16px; transition: background var(--fast), transform var(--fast); }
.keypad button:hover { background: var(--surface-3); } .keypad button:active { transform: scale(.95); }
.transcript { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.transcript b { font-weight: 600; }
.flow { display: flex; flex-direction: column; gap: 8px; }
.flow-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); flex-wrap: wrap; }
.keycap { width: 26px; height: 26px; display: grid; place-items: center; font-weight: 600; border-radius: 7px; background: var(--surface-3); flex: none; }
.rule { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rule > div { background: var(--surface-2); border-radius: 9px; padding: 8px 11px; font-size: 12.5px; min-width: 0; }
.rule small { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 500; margin-bottom: 1px; }
.var { background: var(--accent-soft); color: var(--accent-ink); border-radius: 4px; padding: 0 3px; font-family: var(--mono); font-size: .88em; }
.range { width: 100%; accent-color: var(--accent); }

/* Widget preview */
.widget-stage { background: var(--surface-2); border-radius: 10px; padding: 18px; display: flex; justify-content: flex-end; align-items: flex-end; min-height: 440px; }
.widget { width: 100%; max-width: 300px; border-radius: 16px; overflow: hidden; background: #fff; color: #15191c; box-shadow: 0 14px 40px -8px rgba(0,0,0,.28); display: flex; flex-direction: column; }
.widget-h { color: #fff; padding: 13px; transition: background var(--med); }
.widget-b { padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #f7f7f4; min-height: 210px; font-size: 13px; }
.widget-b .w-in { background: #fff; border: 1px solid #e4e4dd; padding: 7px 10px; border-radius: 10px; align-self: flex-start; max-width: 88%; }
.widget-f { padding: 8px 10px; border-top: 1px solid #e4e4dd; color: #6b7175; font-size: 12.5px; background: #fff; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; padding: 0; transition: transform var(--fast); }
.swatch:hover { transform: scale(1.1); }
.swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }

.map-num { width: 26px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* Developers */
.dev-ref { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 14px; align-items: start; }
.ep-list { position: sticky; top: 14px; max-height: calc(100dvh - 130px); overflow-y: auto; padding: 6px; }
.ep-group { font-size: 11.5px; font-weight: 500; color: var(--ink-3); padding: 10px 8px 4px; }
.ep { display: flex; align-items: center; gap: 8px; width: 100%; height: 30px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; text-align: start; font-size: 12.5px; color: var(--ink-2); transition: background var(--fast), color var(--fast); }
.ep:hover { background: var(--surface-2); color: var(--ink); }
.ep.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 550; }
.verb { display: inline-grid; place-items: center; min-width: 40px; height: 18px; border-radius: 5px; font-family: var(--mono); font-size: 10px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); flex: none; }
.verb.GET { background: var(--info-soft); color: var(--info); } .verb.POST { background: var(--good-soft); color: var(--good); } .verb.PATCH { background: var(--warn-soft); color: var(--warn); } .verb.DELETE { background: var(--crit-soft); color: var(--crit); }
.ep-path { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; direction: ltr; unicode-bidi: isolate; }
.codebox { position: relative; }
.codebox .copy { position: absolute; top: 7px; inset-inline-end: 7px; background: rgba(255,255,255,.08); border: 0; color: var(--code-ink); box-shadow: none; opacity: 0; }
.codebox .copy:hover { background: rgba(255,255,255,.16); }
.codebox:hover .copy, .codebox .copy:focus-visible { opacity: 1; }
.code.resp { max-height: 380px; overflow: auto; }
.code .k { color: #8fd3c7; } .code .s { color: #e6c88e; } .code .n { color: #b9a9f5; } .code .c { color: #7d8d8a; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.resp-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; }
.spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; animation: spin .7s linear infinite; }
.param-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: center; }
.param-row label { font-family: var(--mono); font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.req { color: var(--crit); }
.hl-card { display: flex; flex-direction: column; gap: 8px; padding: 15px 16px; transition: border-color var(--fast), box-shadow var(--med) var(--ease), transform var(--med) var(--ease); color: var(--ink); }
.hl-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.app-tile { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.app-mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink); font-weight: 600; font-size: 12px; flex: none; }
.evlog { display: flex; flex-direction: column; }
.ev { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; width: 100%; background: transparent; border-inline: 0; border-top: 0; text-align: start; transition: background var(--fast); }
.ev:hover { background: var(--surface-2); }
.ev.fresh { animation: ev-in .36s var(--ease); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--good); font-weight: 500; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse-g 2.2s ease-out infinite; }
.step-n { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }

/* Embed mode: OneDesk running inside another product */
.app.embed { grid-template-columns: minmax(0, 1fr); }
.app.embed .side, .app.embed .topbar { display: none; }

/* Motion. Entrance classes are only set when the route really changes (see renderView). */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes ev-in { from { opacity: 0; transform: translateY(-6px); background: var(--accent-soft); } to { opacity: 1; transform: none; background: transparent; } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 2px var(--surface), 0 0 0 2px rgba(185,44,40,.5); } 70%, 100% { box-shadow: 0 0 0 2px var(--surface), 0 0 0 8px rgba(185,44,40,0); } }
@keyframes pulse-g { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 50%, transparent); } 70%, 100% { box-shadow: 0 0 0 6px transparent; } }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-40px, 36px) scale(1.12); } }

.enter .page-h, .enter .page > .banner, .enter .page > .stack, .enter .page > .card, .enter .page > .tabs, .enter .page > .mb, .enter .page > .row { animation: rise var(--med) var(--ease) backwards; }
.enter .grid > * { animation: rise .32s var(--ease) backwards; }
.enter .grid > :nth-child(2) { animation-delay: .03s; } .enter .grid > :nth-child(3) { animation-delay: .06s; } .enter .grid > :nth-child(4) { animation-delay: .09s; } .enter .grid > :nth-child(5) { animation-delay: .12s; } .enter .grid > :nth-child(6) { animation-delay: .15s; } .enter .grid > :nth-child(n+7) { animation-delay: .18s; }
.enter .hbar .fill { animation: grow-x .6s var(--ease) .08s both; }
.enter .meter i { animation: grow-x .6s var(--ease) .08s both; }
.enter .linechart .line { stroke-dasharray: 1; animation: draw .9s var(--ease) .06s both; }
.enter .linechart .area { animation: fade .7s ease-out .3s both; }
.enter .linechart .end-dot { animation: fade .25s ease-out .85s both; }
.enter .inbox { animation: fade .22s ease-out; }
.subenter .th-body, .subenter .pane-profile { animation: fade .2s ease-out; }
.soft .tabs ~ * { animation: fade .18s ease-out; }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}

/* Responsive */
@media (max-width: 1240px) {
  .linechart .tick { font-size: 11px; }
  .inbox { grid-template-columns: 310px minmax(0, 1fr); position: relative; }
  .inbox.focus { grid-template-columns: minmax(0, 1fr); }
  .inbox > .pane-profile { display: none; position: absolute; inset-block: 0; inset-inline-end: 0; width: min(320px, 100%); z-index: 30; box-shadow: var(--shadow-lg); }
  .inbox.show-profile > .pane-profile { display: block; animation: fade .18s ease-out; }
  .profile-close { display: inline-grid; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .call-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
  .call-grid > aside { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: 256px; transform: translateX(-100%); transition: transform .24s var(--ease); box-shadow: var(--shadow-lg); }
  [dir="rtl"] .side { transform: translateX(100%); }
  .app:not(.nav-open) .side { box-shadow: none; }
  .app.nav-open .side { transform: none; }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; background: var(--scrim); z-index: 35; animation: fade .18s ease-out; }
  .menu-btn { display: inline-grid; }
  .g3, .g-2-1, .g-1-2, .call-grid, .dev-ref { grid-template-columns: minmax(0, 1fr); }
  .ep-list { position: static; max-height: 240px; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { display: none; }
}
@media (max-width: 760px) {
  .linechart .tick { font-size: 18px; }
  .inbox { grid-template-columns: minmax(0, 1fr); }
  .inbox .pane-list { border: 0; }
  .inbox[data-view="thread"] .pane-list { display: none; }
  .inbox[data-view="list"] .pane-thread { display: none; }
  .back-btn { display: inline-grid; }
  .pane-profile { width: 100%; }
  .page { padding: 18px 16px 32px; }
  .topbar { padding: 8px 10px; gap: 6px; }
  .topbar .searchbox { display: none; }
  .topbar .spacer { flex: 1; }
  .pswitch select { max-width: 130px; }
  .g2, .g4 { grid-template-columns: minmax(0, 1fr); }
  .kpis.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .v { font-size: 21px; }
  .rule { grid-template-columns: minmax(0, 1fr); }
  .mini-fields { grid-template-columns: auto minmax(0, 1fr); }
  .hbar { grid-template-columns: 84px minmax(0, 1fr) 48px; }
  .msg { max-width: 96%; }
  .pane-thread #composerWrap { max-height: 62%; }
  .topbar .hide-m { display: none; }
  .param-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .codebox .copy { opacity: 1; }
}
