/* 관리 화면 공용 스타일 (대시보드형: 왼쪽 메뉴, 위 막대, 표)
   - 바탕은 중립 회색, 강조색만 도메인별 (html[data-domain]): askgenie 버건디, ottakku 분홍
   - 라이트/다크: 시스템 따라감, 설정에서 고정 가능 (html[data-theme]) */
:root {
  --acc-l: #8c1c36; --acc-d: #f08aa3; --acc-soft-l: #f7e9ec; --acc-soft-d: #3a1d25;
  --bg: #f4f5f7; --panel: #ffffff; --side: #ffffff; --thead: #f8f9fa; --hover: #f2f3f5; --line: #e2e4e8; --line2: #eceef1;
  --ink: #1c1e23; --sub: #5c6370; --muted: #8a909b; --grid: #edeef1; --focus: #2563eb;
  --acc: var(--acc-l); --acc-soft: var(--acc-soft-l); --on-acc: #ffffff;
  --ok: #157f45; --ok-bg: #e4f4ea; --warn: #9a5b00; --warn-bg: #fdf1dc; --idle: #5f6571; --idle-bg: #eef0f3; --bad: #b42318; --bad-bg: #fde9e7;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  color-scheme: light;
}
:root[data-domain="ottakku"] { --acc-l: #c7336d; --acc-d: #ff6fbd; --acc-soft-l: #fbe7f0; --acc-soft-d: #3b1a33; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115; --panel: #171a20; --side: #13161b; --thead: #1b1f26; --hover: #1f232b; --line: #2a2f38; --line2: #232830;
    --ink: #e9ebef; --sub: #a3a9b4; --muted: #767d89; --grid: #232830; --focus: #7aa7ff;
    --acc: var(--acc-d); --acc-soft: var(--acc-soft-d); --on-acc: #17090f;
    --ok: #6ad497; --ok-bg: #12301f; --warn: #f2b84b; --warn-bg: #33270e; --idle: #a3a9b4; --idle-bg: #23272f; --bad: #ff8a7a; --bad-bg: #3b1714;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1115; --panel: #171a20; --side: #13161b; --thead: #1b1f26; --hover: #1f232b; --line: #2a2f38; --line2: #232830;
  --ink: #e9ebef; --sub: #a3a9b4; --muted: #767d89; --grid: #232830; --focus: #7aa7ff;
  --acc: var(--acc-d); --acc-soft: var(--acc-soft-d); --on-acc: #17090f;
  --ok: #6ad497; --ok-bg: #12301f; --warn: #f2b84b; --warn-bg: #33270e; --idle: #a3a9b4; --idle-bg: #23272f; --bad: #ff8a7a; --bad-bg: #3b1714;
  --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; word-break: keep-all; overflow-wrap: break-word; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
svg { flex: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 8px 12px; border-radius: 6px; background: var(--ink); color: var(--bg); }
.skip:focus { top: 8px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sub { color: var(--sub); }
.muted { color: var(--muted); }
.loading { color: var(--sub); padding: 24px 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 1px 5px; border-radius: 4px; background: var(--hover); }

/* 뼈대 */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--side) 235px, var(--line) 235px 236px, transparent 236px); }
body.out .shell { display: none; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 12px 10px; background: var(--side); border-right: 1px solid var(--line); overflow-y: auto; }
.acct { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--acc); color: var(--on-acc); font-weight: 800; font-size: 15px; }
.acct-t { display: grid; line-height: 1.25; min-width: 0; }
.acct-t b { font-size: 14.5px; }
.acct-t small { color: var(--sub); font-size: 12px; }
.nav { display: grid; gap: 2px; }
.nav a, .ext { position: relative; display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border-radius: 7px; color: var(--sub); text-decoration: none; font-weight: 600; }
.nav a:hover, .ext:hover { background: var(--hover); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--acc-soft); color: var(--ink); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--acc); }
.nav a[aria-current="page"] svg { stroke: var(--acc); }
.nav svg, .ext svg, .icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cnt { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--hover); color: var(--sub); font-size: 12px; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.nav a[aria-current="page"] .cnt:not(.bad) { background: var(--panel); }
.cnt.bad { background: var(--bad); color: #fff; }
.side-foot { margin-top: auto; display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); }
.ext { width: 100%; border: 0; background: transparent; cursor: pointer; font-weight: 500; text-align: left; }
.body { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 24px; background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; color: var(--sub); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .sep { color: var(--muted); }
.crumbs b { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.today { color: var(--sub); font-size: 12.5px; white-space: nowrap; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--sub); cursor: pointer; }
.icon-btn:hover { color: var(--ink); background: var(--hover); }
.menu { display: none; }
.sel select { height: 36px; padding: 0 30px 0 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5l3-3' fill='none' stroke='%238a909b' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center / 12px; appearance: none; cursor: pointer; font-size: 13.5px; }
main:focus, main:focus-visible { outline: none; }
main { width: 100%; max-width: 1280px; padding: 24px 24px 64px; outline: none; }
.scrim { display: none; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-weight: 600; font-size: 13.5px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.warn-o { color: var(--bad); }
.btn.warn-o:hover { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:disabled { opacity: .5; cursor: default; }
.link { color: var(--acc); text-decoration: none; font-weight: 600; font-size: 13px; white-space: nowrap; }
.link:hover { text-decoration: underline; }

/* 페이지 머리 */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ph h1 { margin: 0; font-size: 22px; line-height: 1.3; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ph p { margin: 4px 0 0; }
.ph-r { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ph .host { color: var(--sub); text-decoration: none; font-size: 13.5px; }
.ph .host:hover { text-decoration: underline; }

/* 상태 표시 */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; line-height: 20px; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.live { color: var(--ok); background: var(--ok-bg); }
.pill.draft { color: var(--warn); background: var(--warn-bg); }
.pill.planned { color: var(--idle); background: var(--idle-bg); }
.pill.planned i { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.pill.blocked { color: var(--bad); background: var(--bad-bg); }
.pill.blocked i { border-radius: 1px; }
.dl { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dl.up { color: var(--ok); }
.dl.down { color: var(--bad); }
.dl.flat { color: var(--muted); font-weight: 500; }

/* 요약 숫자 */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.kpi { padding: 14px 18px; border-left: 1px solid var(--line); min-width: 0; }
.kpi:first-child { border-left: 0; }
.kpi small { display: block; color: var(--sub); font-size: 12.5px; font-weight: 600; }
.kpi b { display: block; margin: 2px 0; font-size: 26px; line-height: 1.25; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi b small { display: inline; font-size: 15px; color: var(--muted); font-weight: 600; }
.kpi .foot { font-size: 12.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 카드와 표 */
.card { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-h h2 { margin: 0; font-size: 15px; }
.card-h .sub { font-size: 12.5px; }
.card-b { padding: 16px; }
.card.flush .card-b { padding: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.tw { overflow-x: auto; }
table.dt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dt th { position: relative; padding: 9px 16px; text-align: left; font-size: 12px; font-weight: 600; color: var(--sub); background: var(--thead); border-bottom: 1px solid var(--line); white-space: nowrap; }
.dt th.num { text-align: right; }
.dt td { padding: 11px 16px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.dt tbody tr:last-child td { border-bottom: 0; }
.dt tr.click { cursor: pointer; }
.dt tr.click:hover td { background: var(--hover); }
.dt tr.is-blocked td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.dt .sortb { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.dt .sortb:hover { color: var(--ink); }
.dt .sortb .ar { opacity: .35; font-size: 10px; }
.dt th[aria-sort] .sortb { color: var(--ink); }
.dt th[aria-sort] .ar { opacity: 1; }
.dt .empty-row td { padding: 28px 16px; text-align: center; color: var(--sub); }
.sname { display: grid; line-height: 1.35; min-width: 160px; }
.sname a.t { font-weight: 700; text-decoration: none; }
.sname a.t:hover { text-decoration: underline; }
.sname .h { color: var(--sub); font-size: 12.5px; text-decoration: none; }
.sname .h:hover { text-decoration: underline; }
.sname .why { color: var(--bad); font-size: 12px; }
.tag-main { margin-left: 6px; padding: 0 6px; border-radius: 4px; background: var(--hover); color: var(--sub); font-size: 11px; font-weight: 600; vertical-align: 1px; }
.spark { display: block; width: 112px; height: 28px; }
.spark rect { fill: var(--acc); }
.spark rect.z { fill: var(--grid); }
.ping.slow { color: var(--warn); }
.ping.fail { color: var(--bad); font-weight: 700; }
.share { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.share .m { width: 90px; height: 6px; border-radius: 3px; background: var(--grid); overflow: hidden; }
.share .m i { display: block; height: 100%; border-radius: 3px; background: var(--acc); }
.share span { width: 38px; text-align: right; color: var(--sub); font-variant-numeric: tabular-nums; }
.k-ell { display: block; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.show-s { display: none; }
/* 실제 응답 상태 */
.hp { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hp i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.hp.ok { color: var(--ok); } .hp.warn { color: var(--warn); } .hp.bad { color: var(--bad); } .hp.blocked { color: var(--bad); } .hp.idle, .hp.wait { color: var(--muted); }
.hp.blocked i { border-radius: 1px; }
.hp.wait i { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.sname .desc { color: var(--muted); font-size: 12px; max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chg { display: grid; line-height: 1.35; max-width: 320px; }
.chg span { font-weight: 600; }
.chg small { color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chg code { justify-self: start; margin-top: 2px; font-size: 11px; }
.why-cell { display: flex; align-items: center; gap: 8px; }
.why-cell span { max-width: 260px; }
.golink { display: flex; gap: 6px; }
.gourl { display: inline-block; margin-top: 6px; font-size: 11.5px; color: var(--sub); }
.nowrap { white-space: nowrap; }
.m-acc { display: grid; gap: 8px; margin-top: 8px; }
.m-acc .golink { flex-wrap: wrap; }
a.link-kpi { color: inherit; text-decoration: none; transition: background .12s; }
a.link-kpi:hover { background: var(--hover); }
a.link-kpi small span { color: var(--acc); }
.alerts .tx a { font-weight: 600; text-decoration: none; }
.alerts .tx a:hover { text-decoration: underline; }
.alerts .tx small a { font-weight: 600; color: var(--acc); }
.guide .ic { background: var(--acc-soft); color: var(--acc); }
.acts { display: flex; gap: 6px; justify-content: flex-end; }

/* 표 위 도구 줄 */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ftabs { display: flex; gap: 4px; flex-wrap: wrap; }
.ftabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: 7px; border: 1px solid transparent; background: none; color: var(--sub); font-weight: 600; font-size: 13px; cursor: pointer; }
.ftabs button:hover { background: var(--hover); color: var(--ink); }
.ftabs button[aria-pressed="true"] { background: var(--acc-soft); color: var(--ink); border-color: color-mix(in srgb, var(--acc) 35%, transparent); }
.ftabs b { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.search { position: relative; }
.search input { width: 240px; height: 34px; padding: 0 10px 0 32px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); font-size: 13.5px; }
.search svg { position: absolute; left: 10px; top: 9px; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }

/* 확인할 것 */
.alerts { list-style: none; margin: 0; padding: 0; }
.alerts li { display: flex; gap: 10px; align-items: flex-start; padding: 11px 16px; border-bottom: 1px solid var(--line2); }
.alerts li:last-child { border-bottom: 0; }
.alerts .ic { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; font-weight: 800; margin-top: 1px; }
.alerts .bad .ic { background: var(--bad-bg); color: var(--bad); }
.alerts .warn .ic { background: var(--warn-bg); color: var(--warn); }
.alerts .ok .ic { background: var(--ok-bg); color: var(--ok); }
.alerts .tx { min-width: 0; flex: 1; }
.alerts .tx small { display: block; color: var(--sub); }

/* 차단 안내 띠 */
.banner { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 16px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--line)); background: var(--bad-bg); color: var(--bad); }
.banner .tape { flex: none; width: 54px; height: 22px; border-radius: 3px; background: repeating-linear-gradient(-45deg, #ffd23f 0 7px, #1d1d1d 7px 14px); }
.banner .tx { flex: 1; min-width: 0; }
.banner .tx small { display: block; color: var(--ink); opacity: .75; }

/* 열림/차단 스위치 */
.sw { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--sub); white-space: nowrap; }
.sw .tr { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--bad); transition: background .15s; }
.sw .tr::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.sw[aria-checked="true"] .tr { background: var(--ok); }
.sw[aria-checked="true"] .tr::after { transform: translateX(16px); }
.sw:disabled { cursor: default; opacity: .55; }

/* 막대 그래프 */
.chart { position: relative; padding: 12px 16px 6px; }
.chart svg { display: block; overflow: visible; }
.chart .gl { stroke: var(--grid); stroke-width: 1; }
.chart .yl, .chart .xl { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .b { fill: var(--acc); pointer-events: none; }
.chart .hit { fill: transparent; }
.chart .hit:hover { fill: var(--hover); }
.tip { position: absolute; pointer-events: none; padding: 6px 10px; border-radius: 6px; background: var(--ink); color: var(--bg); font-size: 12.5px; white-space: nowrap; transform: translate(-50%, -115%); opacity: 0; transition: opacity .1s; z-index: 2; }
.tip.on { opacity: 1; }
.tbl-dd { border-top: 1px solid var(--line); max-height: 320px; overflow: auto; }

/* 설정 */
.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); margin: 0; }
.kv dt, .kv dd { margin: 0; padding: 11px 16px; border-bottom: 1px solid var(--line2); }
.kv dt { color: var(--sub); font-weight: 600; font-size: 13px; }
.kv dt:nth-last-of-type(1), .kv dd:last-child { border-bottom: 0; }
.steps { margin: 0; padding: 4px 16px 14px 36px; }
.steps li { padding: 4px 0; }
.note { padding: 12px 16px; color: var(--sub); font-size: 13px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.seg button { min-height: 32px; padding: 0 12px; border: 0; border-left: 1px solid var(--line); background: var(--panel); font-size: 13px; font-weight: 600; color: var(--sub); cursor: pointer; }
.seg button:first-child { border-left: 0; }
.seg button[aria-pressed="true"] { background: var(--acc-soft); color: var(--ink); }

/* 로그인 */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login { width: min(400px, 100%); border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 8px 30px rgba(16, 24, 40, .08); overflow: hidden; }
.login-h { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.login-h b { font-size: 16px; }
.login-h small { display: block; color: var(--sub); font-size: 12.5px; }
.login-b { padding: 20px 22px 22px; }
.login-b p { margin: 0 0 4px; }
.field { display: grid; gap: 6px; margin: 14px 0 12px; font-size: 13px; color: var(--sub); font-weight: 600; }
.field input { height: 40px; padding: 0 12px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 16px; font-weight: 400; }
.login .btn { width: 100%; min-height: 40px; }
.err { color: var(--bad); font-size: 13px; min-height: 1.4em; margin: 6px 0 0; }
.setup { margin-top: 14px; padding: 12px 14px; border-radius: 8px; background: var(--warn-bg); color: var(--ink); font-size: 13px; }
.setup ol { margin: 6px 0 0; padding-left: 20px; }

dialog { border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; width: min(440px, calc(100vw - 32px)); background: var(--panel); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
dialog h2 { margin: 0 0 6px; font-size: 17px; }
dialog .sub { margin: 0; font-size: 13.5px; }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 10px 16px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; }
.toast.on { opacity: 1; }

@media (max-width: 1100px) {
  .hide-m { display: none; }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .side { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: 264px; height: auto; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .4); }
  .menu { display: inline-grid; }
  .topbar { padding: 8px 16px; }
  main { padding: 18px 16px 56px; }
  .today { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .hide-s { display: none; }
  .show-s { display: block; margin-top: 4px; }
  .sname { min-width: 0; }
  .ftabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -4px; padding: 0 4px; scrollbar-width: none; }
  .ftabs button { flex: none; }
  .ph h1 { font-size: 20px; }
  .kpi { padding: 12px 14px; }
  .kpi b { font-size: 22px; }
  .dt th, .dt td { padding-left: 12px; padding-right: 12px; }
  .search, .search input { width: 100%; }
  .toolbar .search { flex: 1 1 100%; }
  .share .m { width: 48px; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { padding-bottom: 0; border-bottom: 0; }
  .crumbs .hide-xs { display: none; }
  .sel select { padding-right: 26px; font-size: 13px; }
  .k-ell { max-width: 180px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
