/* v20 shell (2026-11-18, builder S): the layout of the two references, our own colours (from js/themes.js).
   Colours are NOT set here: themes.js writes every colour token into <style id="theme-vars"> before the first paint.
   This file: style options (density, corners, cards, text size), the app frame, sidebar + rail + peek, top bar, phone bar,
   shared components (u-*), the account menu, palette, shortcut sheet, theme gallery. Loaded after v14.css, before motion.css. */

/* ---------- shape + style options ---------- */
:root {
  --r-card: 16px; --r-s: 10px; --r-m: 12px; --r-l: 16px; --r-xl: 20px; --r-xs: 6px;
  --gap: 16px; --pad: 20px; --row-h: 36px;
  --sh-card: 0 1px 2px rgba(17, 17, 17, .04), 0 8px 24px -16px rgba(17, 17, 17, .14);
  --sh-pop: 0 2px 6px rgba(17, 17, 17, .08), 0 24px 56px -20px rgba(17, 17, 17, .34);
  --sh-1: var(--sh-card); --sh-3: var(--sh-pop);
  --spring-snappy: linear(0, .25 5%, .63 12%, .92 20%, 1.04 28%, 1.05 36%, 1.02 46%, 1 60%, 1);
  --spring-soft: linear(0, .18 6%, .5 15%, .78 25%, .94 36%, 1.01 48%, 1.02 60%, 1.005 78%, 1);
  --spring-bouncy: linear(0, .3 6%, .78 15%, 1.08 25%, 1.12 32%, 1.04 44%, .985 56%, 1.005 75%, 1);
  --sw: 256px; --sw-rail: 72px;
}
:root[data-theme="dark"] { --sh-card: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 28px -18px rgba(0, 0, 0, .8); --sh-pop: 0 2px 8px rgba(0, 0, 0, .5), 0 30px 70px -24px rgba(0, 0, 0, .9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sh-card: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 28px -18px rgba(0, 0, 0, .8); --sh-pop: 0 2px 8px rgba(0, 0, 0, .5), 0 30px 70px -24px rgba(0, 0, 0, .9); } }
:root[data-corners="tegas"] { --r-card: 6px; --r-s: 6px; --r-m: 6px; --r-l: 8px; --r-xl: 10px; --r-xs: 4px; }
:root[data-density="padat"] { --gap: 10px; --pad: 14px; --row-h: 32px; }
:root[data-cards="datar"] { --sh-card: none; }
:root[data-text="s"] .app { zoom: .93; }
:root[data-text="l"] .app { zoom: 1.08; }

/* ---------- ground ---------- */
body { background: radial-gradient(1100px 480px at 8% -12%, color-mix(in oklab, var(--tint, var(--bg)) 70%, transparent), transparent 62%), var(--bg); background-attachment: fixed; color: var(--ink); }
:root[data-cards="kaca"] body { background: radial-gradient(900px 520px at 0% 0%, color-mix(in oklab, var(--c1) 22%, transparent), transparent 60%), radial-gradient(800px 480px at 100% 10%, color-mix(in oklab, var(--c2) 18%, transparent), transparent 60%), radial-gradient(900px 600px at 60% 110%, color-mix(in oklab, var(--c3) 16%, transparent), transparent 60%), var(--bg); background-attachment: fixed; }

/* ---------- app frame (desktop): sidebar | top bar / main ---------- */
.app { margin: 0; height: 100dvh; border-radius: 0; grid-template-columns: var(--sw) minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr); grid-template-areas: "side gbar" "side main";
  transition: grid-template-columns 460ms var(--spring-soft); isolation: isolate; }
.app::before { content: none !important; }
.app[data-rail] { grid-template-columns: var(--sw-rail) minmax(0, 1fr); }
.main { background: transparent; }

/* top bar: breadcrumb left, search + New + AI + bell + avatar right (ref1) */
.gbar { background: transparent; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0 24px 0 28px; gap: 8px; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.crumbs i { font-style: normal; opacity: .5; }
.crumbs b { color: var(--ink); font-weight: 560; overflow: hidden; text-overflow: ellipsis; }
.crumbs .cr-home .i { width: 15px; height: 15px; }
.gsearch { flex: 0 1 300px; height: 36px; border-radius: var(--r-s); background: var(--panel); border: 1px solid var(--line); color: var(--ink-3); font-size: 13.5px; box-shadow: none; }
.gsearch:hover { border-color: var(--line-2); box-shadow: none; background: var(--panel); }
.gbar .ibtn { width: 36px; height: 36px; border-radius: 50%; background: transparent; border: 1px solid transparent; }
.gbar .ibtn:hover { background: var(--hover); border-color: var(--line); }
.gbar .ubtn { padding: 0; }
.gbar .gnew { height: 36px; border-radius: var(--r-s); }

/* buttons: primary (theme --pri) and the one key action (--live) */
.btn.pri { background: var(--pri); color: var(--pri-ink); border-color: transparent; }
.btn.pri:hover { background: var(--pri-hover); }
.btn.key, .btn.gnew, .fab { background: var(--live); color: var(--live-ink); border-color: transparent; box-shadow: 0 8px 20px -12px var(--live-glow); }
.btn.key:hover, .btn.gnew:hover { background: var(--live-hover); }
.btn { border-radius: var(--r-s); }

/* ---------- sidebar ---------- */
.side { padding: 0 10px 10px; background: color-mix(in oklab, var(--panel) 55%, var(--bg)); border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; overflow: hidden; z-index: 30;
  transition: box-shadow 220ms var(--ease-out), width 420ms var(--spring-soft); }
.sd-top { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 2px 0 6px; flex: none; }
.sd-top .logo { width: 28px; height: 28px; flex: none; }
.sd-brand { display: grid; min-width: 0; flex: 1; transition: opacity 180ms var(--ease-out), transform 260ms var(--ease-out); }
.sd-brand b { font-size: 15.5px; font-weight: 680; letter-spacing: -.02em; }
.sd-brand small { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-top .pill.test { flex: none; }
.sd-tog { width: 32px; height: 32px; flex: none; border-radius: 9px; color: var(--ink-3); }
.sd-tog:hover { background: var(--hover); color: var(--ink); }
.navl { position: relative; flex: 1; overflow-y: auto; overflow-x: hidden; display: block; padding: 2px 0 10px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.sd-pill { position: absolute; top: 0; left: 0; right: 0; height: var(--row-h); border-radius: 10px; background: var(--panel); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 0 0 1px var(--line); pointer-events: none; z-index: 0; opacity: 0; transform-origin: 50% 50%; will-change: transform; }
.nav-sec { margin-top: 8px; }
.nav-sec:first-of-type, .sd-pill + .nav-sec { margin-top: 2px; }
.nav-gh { display: flex; align-items: center; gap: 6px; width: 100%; }
button.nav-gh, .nav-g { height: 28px; padding: 0 8px; border: 0; background: none; border-radius: 8px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); letter-spacing: .02em; text-align: left; cursor: pointer; }
.nav-gh > span, .nav-g > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
span.nav-g { display: flex; align-items: center; gap: 6px; flex: 1; cursor: default; }
span.nav-g .i { width: 13px; height: 13px; }
.nav-gh .i { width: 14px; height: 14px; transition: transform 260ms var(--spring-snappy); flex: none; }
.nav-sec.folded > .nav-gh .i { transform: rotate(-90deg); }
button.nav-gh:hover { color: var(--ink); background: var(--hover); }
.nav-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--warn-fill); flex: none; }
.nav-sort { width: 26px; height: 26px; border-radius: 7px; color: var(--ink-3); flex: none; }
.nav-gb { display: grid; gap: 1px; }
.nav-r { position: relative; display: grid; }
.nav-r.dragging { opacity: .55; }
.nav-r.dragging .nav-i { background: var(--hover); }
.nav-i { position: relative; z-index: 1; height: var(--row-h); padding: 0 8px; gap: 10px; border-radius: 10px; color: var(--ink-2); font-size: 13.5px; font-weight: 500; background: transparent !important; box-shadow: none !important; overflow: hidden; }
.nav-i:hover { color: var(--ink); background: var(--hover) !important; }
.nav-i.on { color: var(--ink); font-weight: 600; }
.nav-i .wdot { width: 22px; height: 22px; background: none !important; color: var(--ink-3); box-shadow: none !important; border-radius: 6px; }
.nav-i.on .wdot, .nav-i:hover .wdot { color: var(--ink); }
.nav-i .wdot .i { width: 17px; height: 17px; }
.nav-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: opacity 200ms var(--ease-out), transform 280ms var(--ease-out); transition-delay: calc(var(--k, 0) * 9ms); }
.nav-i .nav-grip { flex: 0 0 12px; width: 12px; margin-left: -4px; color: var(--ink-3); opacity: 0; cursor: grab; display: grid; }
.nav-grip .i { width: 12px; height: 12px; }
.nav-r[data-fav]:hover .nav-grip { opacity: .8; }
.nav-b { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; display: inline-grid; place-items: center; font: 600 10.5px/1 var(--mono); font-style: normal; box-shadow: none; }
.nav-b.warn { background: var(--warn-soft); color: var(--warn); }
.nav-b.err, .nav-i .pip { background: var(--err-fill); color: var(--err-ink, #fff); box-shadow: none; }
.nav-star { position: absolute; z-index: 2; right: 6px; top: calc(var(--row-h) / 2 - 12px); width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 7px; background: var(--panel); color: var(--ink-3); opacity: 0; transform: scale(.8); transition: opacity 140ms var(--ease-out), transform 200ms var(--spring-snappy); }
.nav-star .i { width: 14px; height: 14px; }
.nav-star.on { color: var(--warn-fill); }
.nav-star.on .i { fill: currentColor; }
.nav-r:hover .nav-star, .nav-star:focus-visible { opacity: 1; transform: none; }
.nav-r:has(.nav-x) .nav-star { right: 34px; }
.nav-r:has(.nav-star) .nav-i:has(.nav-b) { padding-right: 8px; }
.nav-r .nav-x { position: absolute; z-index: 2; right: 4px; top: calc(var(--row-h) / 2 - 13px); width: 26px; height: 26px; margin: 0; }
.nav-r .nav-i:has(+ .nav-star + .nav-x), .nav-r .nav-i:has(+ .nav-x) { padding-right: 34px; }
.nav-sub { margin: 2px 0 4px 19px; }

/* bottom: next step + the person */
.sd-foot { flex: none; display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.sd-next-c { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; padding: 12px; border-radius: var(--r-m); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--sh-card); }
.sd-next-c > .btn { grid-column: 1 / -1; justify-self: stretch; height: 32px; }
.sd-next-i { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-on-soft, var(--brand)); }
.sd-next-c[data-tone="err"] .sd-next-i { background: var(--err-soft); color: var(--err); }
.sd-next-c[data-tone="warn"] .sd-next-i { background: var(--warn-soft); color: var(--warn); }
.sd-next-c[data-tone="ok"] .sd-next-i { background: var(--ok-soft); color: var(--ok); }
.sd-next-i .i { width: 16px; height: 16px; }
.sd-next-t { display: grid; min-width: 0; }
.sd-next-t small { font-size: 11px; color: var(--ink-3); }
.sd-next-t b { font-size: 13px; font-weight: 620; line-height: 1.3; }
.sd-next-t p { margin: 2px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.sd-me { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; border: 0; border-radius: var(--r-m); background: none; text-align: left; color: var(--ink); }
.sd-me:hover { background: var(--hover); }
.sd-me .av { flex: none; }
.sd-me-t { flex: 1; display: grid; min-width: 0; }
.sd-me-t b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-me-t small { font-size: 11.5px; color: var(--ink-3); }
.sd-me > .i { color: var(--ink-3); }

/* rail (closed): icons only, the pill stays, tooltips come from the peek */
.app[data-rail] .side:not(.peek) .sd-brand, .app[data-rail] .side:not(.peek) .sd-top .pill,
.app[data-rail] .side:not(.peek) .nav-l, .app[data-rail] .side:not(.peek) .nav-gh > span, .app[data-rail] .side:not(.peek) .nav-gh .i,
.app[data-rail] .side:not(.peek) .nav-sort, .app[data-rail] .side:not(.peek) .nav-star, .app[data-rail] .side:not(.peek) .nav-x,
.app[data-rail] .side:not(.peek) .nav-sub, .app[data-rail] .side:not(.peek) .nav-grip, .app[data-rail] .side:not(.peek) .sd-next-t,
.app[data-rail] .side:not(.peek) .sd-next-c > .btn, .app[data-rail] .side:not(.peek) .sd-me-t, .app[data-rail] .side:not(.peek) .sd-me > .i { opacity: 0; pointer-events: none; }
.app[data-rail] .side:not(.peek) .nav-sub, .app[data-rail] .side:not(.peek) .nav-x, .app[data-rail] .side:not(.peek) .sd-next-c > .btn, .app[data-rail] .side:not(.peek) .sd-next-t { display: none; }
.app[data-rail] .side:not(.peek) .nav-l { transform: translateX(-8px); transition-delay: 0ms; }
.app[data-rail] .side:not(.peek) .sd-top { flex-direction: column; justify-content: center; height: 92px; gap: 6px; padding: 8px 0 0; }
.app[data-rail] .side:not(.peek) .sd-brand { display: none; }
.app[data-rail] .side:not(.peek) .nav-gh { height: 12px; padding: 0; position: relative; }
.app[data-rail] .side:not(.peek) .nav-gh::after { content: ""; position: absolute; left: 14px; right: 14px; top: 6px; height: 1px; background: var(--line); }
.app[data-rail] .side:not(.peek) .nav-dot { position: absolute; right: 12px; top: 3px; }
.app[data-rail] .side:not(.peek) .nav-b { position: absolute; top: 3px; left: 30px; min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; }
.app[data-rail] .side:not(.peek) .nav-i { padding: 0 0 0 15px; }
.app[data-rail] .side:not(.peek) .sd-next-c { grid-template-columns: 1fr; padding: 8px; justify-items: center; }
.app[data-rail] .side:not(.peek) .sd-me { justify-content: center; }
.app[data-rail] .side { position: relative; }
/* peek: the full sidebar floats over the page while the pointer is on the rail */
.app[data-rail] .side.peek { position: absolute; top: 0; bottom: 0; left: 0; width: var(--sw); display: flex; flex-direction: column; box-shadow: var(--sh-pop); z-index: 46; background: var(--panel); border-radius: 0 var(--r-xl) var(--r-xl) 0; animation: peek-in 260ms var(--spring-soft); }
@keyframes peek-in { from { width: var(--sw-rail); } }

/* ---------- page header + page ---------- */
.top { padding: 14px 28px 8px; min-height: 64px; }
.ttl h3 { font-size: 22px; font-weight: 660; letter-spacing: -.025em; }
.ttl-i { display: none; }
#tabsHost { padding: 0 28px; }
.page { padding: 8px 28px 56px; }

/* ---------- shared components (u-*) ---------- */
.u-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.u-grid > * { grid-column: span var(--span, 12); min-width: 0; }
.u-grid + .u-grid, .u-kpis + .u-grid, .u-head + .u-grid, .u-head + .u-kpis { margin-top: var(--gap); }
.u-card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--sh-card); padding: var(--pad); min-width: 0; }
.u-card[data-tone]::before { content: ""; position: absolute; left: 16px; right: 16px; top: -1px; height: 2px; border-radius: 0 0 2px 2px; background: var(--brand); }
.u-card[data-tone="live"]::before { background: var(--live); } .u-card[data-tone="ok"]::before { background: var(--ok-fill); } .u-card[data-tone="warn"]::before { background: var(--warn-fill); } .u-card[data-tone="err"]::before { background: var(--err-fill); }
.u-card-h { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.u-card-i { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--panel-sunk); border: 1px solid var(--line); color: var(--ink-2); }
.u-card-i .i { width: 15px; height: 15px; }
.u-card-t { flex: 1; min-width: 0; }
.u-card-t h4 { margin: 0; font-size: 14.5px; font-weight: 640; letter-spacing: -.01em; color: var(--ink); }
.u-card-t p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3); }
.u-card-x { display: flex; align-items: center; gap: 8px; flex: none; }
.u-more { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; font-weight: 560; color: var(--ink-2); padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); }
.u-more:hover { text-decoration: none; color: var(--ink); background: var(--hover); }
.u-more .i { width: 13px; height: 13px; }
.u-card-f { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.u-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.u-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; margin-bottom: var(--gap); position: relative; }
.u-head-t { flex: 1 1 320px; min-width: 0; }
.u-greet { font-size: 13.5px; color: var(--ink-3); font-weight: 500; }
.u-head h2 { margin: 2px 0 0; font-size: clamp(22px, 2.4vw, 30px); font-weight: 680; letter-spacing: -.03em; line-height: 1.15; color: var(--ink); }
.u-head p { margin: 4px 0 0; color: var(--ink-3); font-size: 13.5px; }
.u-head-a { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.u-head-below { flex: 1 0 100%; }
.u-amb { padding: 20px 22px; border-radius: var(--r-card); background: linear-gradient(120deg, color-mix(in oklab, var(--tint) 85%, var(--panel)), var(--panel) 45%, color-mix(in oklab, var(--tint) 60%, var(--panel))); background-size: 220% 220%; border: 1px solid var(--line); }
.u-seg { position: relative; display: inline-flex; gap: 2px; padding: 3px; border-radius: calc(var(--r-s) + 2px); background: var(--panel-sunk); border: 1px solid var(--line); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.u-seg > button { position: relative; z-index: 1; height: 30px; padding: 0 12px; border: 0; border-radius: var(--r-s); background: none; color: var(--ink-3); font-size: 13px; font-weight: 560; white-space: nowrap; transition: color 160ms var(--ease-out); }
.u-seg > button:hover { color: var(--ink); }
.u-seg > button.on { color: var(--ink); }
.u-seg > button em { font-style: normal; font-size: 11px; color: var(--ink-3); margin-left: 2px; }
.u-seg.sm > button { height: 26px; padding: 0 10px; font-size: 12.5px; }
.u-seg-ink { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: var(--r-s); background: var(--panel); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--line); transform-origin: 0 50%; pointer-events: none; will-change: transform; }
:root:not(.js-seg) .u-seg > button.on { background: var(--panel); }
.u-seg:has(.u-seg-ink[style*="width"]) > button.on { background: none; }
.u-empty { display: grid; justify-items: center; gap: 8px; padding: 28px 16px; text-align: center; color: var(--ink-3); }
.u-empty b { color: var(--ink); font-size: 14.5px; font-weight: 620; }
.u-empty p { margin: 0; max-width: 34ch; font-size: 13px; line-height: 1.45; }
.u-empty .btn { margin-top: 6px; }
.u-empty-i { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--ink-2); }
.u-empty-i .i { width: 22px; height: 22px; }
.u-empty .u-avs .av { width: 40px; height: 40px; font-size: 15px; }
.u-avs { display: inline-flex; align-items: center; }
.u-avs .av { box-shadow: 0 0 0 2px var(--panel); }
.u-avs .av + .av { margin-left: -8px; }
.u-avs .av.more { background: var(--panel-sunk); color: var(--ink-2); font-size: 11px; }
.u-delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.u-delta .i { width: 13px; height: 13px; stroke-width: 2.4; }
.u-delta.good { color: var(--ok); } .u-delta.bad { color: var(--err); } .u-delta.flat { color: var(--ink-3); }
.u-delta small { font-size: 11.5px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.u-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 7px; border-radius: 10px; font: 600 11px/1 var(--font); font-style: normal; background: var(--mute-soft); color: var(--ink-2); }
.u-badge.brand { background: var(--brand-soft); color: var(--brand-on-soft, var(--brand)); } .u-badge.live { background: var(--live); color: var(--live-ink); }
.u-badge.warn { background: var(--warn-soft); color: var(--warn); } .u-badge.err { background: var(--err-soft); color: var(--err); } .u-badge.ok { background: var(--ok-soft); color: var(--ok); }
.u-stat { position: relative; display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--r-card); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--sh-card); color: var(--ink); min-width: 0; }
a.u-stat:hover { text-decoration: none; }
.u-stat-l { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.u-stat-v { font-size: 24px; font-weight: 680; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.u-stat-s { position: absolute; right: 14px; bottom: 14px; }

/* cards everywhere take the theme surface, hairline and shadow; glass when chosen */
.card, .kpi, .tbl, .plates, .md { background: var(--panel); border-color: var(--line); border-radius: var(--r-card); box-shadow: var(--sh-card); }
:root[data-cards="kaca"] :is(.u-card, .u-stat, .card, .kpi, .tbl, .plates, .md, .sd-next-c) { background: color-mix(in oklab, var(--panel) 66%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); border-color: color-mix(in oklab, var(--ink) 10%, transparent); }
:root[data-cards="kaca"] .side { background: color-mix(in oklab, var(--panel) 50%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
:root[data-cards="datar"] :is(.u-card, .u-stat, .card, .kpi, .tbl, .plates, .md) { box-shadow: none; }
:root[data-density="padat"] .page { padding-top: 4px; }
:root[data-density="padat"] .row { padding-top: 8px; padding-bottom: 8px; }
:root[data-density="padat"] .card { padding: 14px; }

/* odometer numbers (M.count) */
.odo-on { display: inline-flex; align-items: baseline; font-variant-numeric: tabular-nums; }
.odo { position: relative; display: inline-block; overflow: hidden; height: 1.15em; line-height: 1.15em; vertical-align: bottom; }
.odo-g { visibility: hidden; }
.odo-r { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; text-align: center; will-change: transform; }
.odo-r > span { display: block; height: 1.15em; line-height: 1.15em; }
.odo-s { display: inline-block; }

/* ---------- account menu, shortcuts sheet, palette ---------- */
.menu { border-radius: var(--r-l); }
.um-row { display: grid; gap: 6px; padding: 8px 9px; }
.um-l { font-size: 12px; color: var(--ink-3); font-weight: 560; }
.um-row .u-seg { width: 100%; }
.um-row .u-seg > button { flex: 1; }
.pi kbd { margin-left: auto; }
.pi > span { flex: 1; }
.kb-l { display: grid; gap: 2px; }
.kb-r { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.kb-k { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.kb-k kbd { font-size: 12px; padding: 2px 7px; }
.kb-k small { color: var(--ink-3); font-size: 11.5px; }
.pop.palette { border-radius: var(--r-xl); }
.pal-l .pi { min-height: 40px; }
.pal-in input, .pal-in input:focus, .pal-in input:focus-visible { outline: none; box-shadow: none; border: 0; background: transparent; }
.pal-l .pi.sel { background: var(--hover); box-shadow: inset 3px 0 0 var(--brand); }
.pal-l .pi .pal-k { opacity: 0; font-size: 10.5px; }
.pal-l .pi.sel .pal-k { opacity: 1; }
.pal-foot { position: sticky; bottom: -6px; margin: 6px -6px -6px; padding: 8px 14px; font-size: 11.5px; color: var(--ink-3); background: var(--panel); border-top: 1px solid var(--line); }

/* ---------- Settings: theme gallery ---------- */
.th-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; margin-top: 10px; }
.th-c { position: relative; display: grid; gap: 6px; padding: 8px 8px 10px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--panel); text-align: left; color: var(--ink); cursor: pointer; }
.th-c.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-line); }
.th-prev { display: grid; gap: 6px; padding: 8px; border-radius: calc(var(--r-m) - 4px); background: var(--tb); border: 1px solid var(--tl); }
.th-card { display: flex; align-items: flex-end; gap: 8px; padding: 8px; border-radius: 8px; background: var(--tp); border: 1px solid var(--tl); height: 64px; }
.th-bars { flex: 1; display: flex; align-items: flex-end; gap: 4px; height: 100%; }
.th-bars i { flex: 1; border-radius: 3px 3px 1px 1px; }
.th-btn { flex: none; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 6px; }
.th-dots { display: flex; gap: 4px; }
.th-dots i { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1px var(--tl); }
.th-n { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.th-n b { font-size: 13.5px; font-weight: 620; }
.th-c small { font-size: 11.5px; color: var(--ink-3); line-height: 1.3; }
.th-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 20px; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) and (min-width: 721px) {
  .u-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .u-grid > * { grid-column: span 2; }
  .u-grid > .u-half { grid-column: span 1; }
  .u-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gsearch { flex-basis: 200px; }
  .crumbs > span:not(.cr-home), .crumbs > i:first-of-type { display: none; }
}

/* ---------- phone ---------- */
@media (max-width: 720px) {
  .app, .app[data-rail] { grid-template-columns: minmax(0, 1fr); }
  .top { padding: calc(12px + env(safe-area-inset-top)) 12px 6px 16px; }
  .page { padding: 12px 16px calc(112px + env(safe-area-inset-bottom)); }
  #tabsHost { padding: 6px 16px 0; }
  .u-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .u-grid > * { grid-column: auto; }
  .u-kpis { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(72%, 1fr); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; gap: 10px; }
  .u-kpis > * { scroll-snap-align: start; }
  .u-card { padding: 16px; }
  .u-head-a { width: 100%; }
  /* owner 2026-11-18: New is a rounded square floating above the bar's right end; the calendar holds the middle */
  .fab { position: fixed; z-index: 31; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom)); width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; border: 0; cursor: pointer; background: var(--live); color: var(--live-ink); box-shadow: 0 12px 26px -10px var(--live-glow), 0 3px 10px rgba(0, 0, 0, .22); transition: transform .32s var(--fx-spring, cubic-bezier(.34, 1.56, .64, 1)), box-shadow .2s; }
  .fab .i { width: 26px; height: 26px; stroke-width: 2.2; }
  .fab:active { transform: scale(.92); transition-duration: .11s; }
  [data-over="create"] .fab { transform: rotate(45deg); }
  .no-tabs ~ .fab, .app.no-tabs .fab { display: none; }
  .tab.cal { color: var(--ink-2); }
  .tab.cal .i { width: 24px; height: 24px; }
  .top-side { order: 99; }
  .um-slot select { width: 100%; height: 36px; border-radius: var(--r-s, 10px); border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 0 8px; font: inherit; }
  .tabs { left: 10px; right: 10px; height: 64px; padding: 0 4px; border-radius: 22px; background: color-mix(in oklab, var(--panel) 88%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); border: 1px solid var(--line); box-shadow: var(--sh-pop); }
  .tab { color: var(--ink-3); }
  .tab.on { color: var(--ink); background: var(--hover); }
  .tab.plus { flex: 0 0 54px; width: 54px; height: 54px; margin: -22px 6px 0; border-radius: 50%; background: var(--live); color: var(--live-ink); box-shadow: 0 10px 24px -10px var(--live-glow), 0 0 0 4px var(--bg); display: grid; place-items: center; }
  .tab.plus .i { width: 26px; height: 26px; }
  .tab .pip { position: absolute; top: 4px; left: calc(50% + 4px); }
  .drawer { background: var(--panel); border-radius: 0 var(--r-xl) var(--r-xl) 0; }
  .dr-nav .nav-i { height: 44px; }
  .dr-nav .nav-gh { height: 30px; }
  .dr-me { width: 100%; }
  .dr-me > span:not(.av) { flex: 1; }
  .dr-nav .nav-i.on { background: var(--hover) !important; box-shadow: inset 3px 0 0 var(--ink) !important; }
  .th-g { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .th-card { height: 52px; }
}
@media (min-width: 721px) { .um-slot { display: none; } }
@media (prefers-reduced-motion: reduce) { .fab { transition: none; } }
@media print { .side, .gbar, .tabs, .fab { display: none !important; } }
@media (forced-colors: active) { .sd-pill { background: Highlight; opacity: .3 !important; } .nav-i.on { outline: 2px solid CanvasText; } .th-c.on { outline: 3px solid Highlight; } }
