/* Layout: a fixed ground of slow color glows, a floating glass navigation layer (sidebar, top bar, tab bar),
   and solid content cards in between. Glass is never used for content. */
:root {
  color-scheme: light;
  --bg: #F5F5F7; --surface: #FFFFFF; --text: #1D1D1F; --text-2: #6E6E73;
  --line: rgba(0,0,0,.08);
  --accent: #4F5BFF; --accent-text: #3A45E0; --on-accent: #FFFFFF;
  --glass: rgba(255,255,255,.62); --glass-strong: rgba(255,255,255,.85);
  --glass-rim: rgba(255,255,255,.75); --glass-edge: rgba(0,0,0,.08);
  --glass-shine: rgba(255,255,255,.95); --glass-shadow: rgba(0,0,0,.18);
  --glow-pink: #FF7AB6; --glow-blue: #3D5AFE; --glow-purple: #9B6BFF; --glow-orange: #FFA15C;
  --ok: #16753A; --warn: #A04600; --bad: #C4161C; --info: #6B3FD4;
  --ease: cubic-bezier(.32,.72,0,1);
  --glow-strength: .09;
  --scrim: rgba(0,0,0,.3);
  --text-glass: color-mix(in srgb, var(--text) 72%, var(--surface)); /* secondary text that sits directly on glass */
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  --side: 232px; --bar: 56px; --edge: 12px;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #060608; --surface: #141418; --text: #F5F5F7; --text-2: #A1A1A6;
    --line: rgba(255,255,255,.10); --accent-text: #8C95FF;
    --glass: rgba(28,28,32,.55); --glass-strong: rgba(28,28,32,.82);
    --glass-rim: rgba(255,255,255,.14); --glass-edge: rgba(0,0,0,.55);
    --glass-shine: rgba(255,255,255,.22); --glass-shadow: rgba(0,0,0,.6);
    --ok: #4ADE80; --warn: #FFB35C; --bad: #FF6B6B; --info: #B69CFF;
    --glow-strength: .17; --scrim: rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #060608; --surface: #141418; --text: #F5F5F7; --text-2: #A1A1A6;
  --line: rgba(255,255,255,.10); --accent-text: #8C95FF;
  --glass: rgba(28,28,32,.55); --glass-strong: rgba(28,28,32,.82);
  --glass-rim: rgba(255,255,255,.14); --glass-edge: rgba(0,0,0,.55);
  --glass-shine: rgba(255,255,255,.22); --glass-shadow: rgba(0,0,0,.6);
  --ok: #4ADE80; --warn: #FFB35C; --bad: #FF6B6B; --info: #B69CFF;
  --glow-strength: .17; --scrim: rgba(0,0,0,.5);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
h3 { font-size: 16px; line-height: 1.3; font-weight: 600; }
a { color: var(--accent-text); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
.num { font-variant-numeric: tabular-nums; }
/* captions use --text-2 on solid cards; on the ground or on glass they use the darker --text-glass so they hold 4.5:1 over the glows */
.cap { font-size: 13px; line-height: 1.4; color: var(--text-glass); }
.card .cap, .tile .cap, .rcard .cap, .kpi .cap, .mcard .cap { color: var(--text-2); }
.sr { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent), 0 0 14px color-mix(in srgb, var(--accent) 22%, transparent); }
.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ic.s { width: 16px; height: 16px; }
.ic.l { width: 24px; height: 24px; }

/* ---------- the ground: huge soft glows, drifting slowly ---------- */
.ground { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--bg); }
.ground i { position: absolute; border-radius: 50%; opacity: var(--glow-strength); will-change: transform; animation: drift 60s ease-in-out infinite alternate; }
.ground .g1 { width: 95vmax; height: 95vmax; left: -30vmax; top: -42vmax; background: radial-gradient(closest-side, var(--glow-blue), transparent 72%); }
.ground .g2 { width: 80vmax; height: 80vmax; right: -28vmax; top: 8vh; background: radial-gradient(closest-side, var(--glow-purple), transparent 72%); animation-duration: 75s; animation-direction: alternate-reverse; }
.ground .g3 { width: 55vmax; height: 55vmax; left: 12vw; bottom: -34vmax; background: radial-gradient(closest-side, var(--glow-orange), transparent 70%); animation-duration: 90s; opacity: calc(var(--glow-strength) * .6); }
.ground .g4 { width: 40vmax; height: 40vmax; right: 6vw; bottom: -22vmax; background: radial-gradient(closest-side, var(--glow-pink), transparent 70%); animation-duration: 80s; opacity: calc(var(--glow-strength) * .5); }
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(5vw,4vh,0) scale(1.08); } }

/* ---------- glass: navigation layer only ---------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-rim);
  box-shadow: inset 0 1px 0 var(--glass-shine), 0 0 0 1px var(--glass-edge), 0 12px 32px -12px var(--glass-shadow);
}
.glass.strong { background: var(--glass-strong); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: linear-gradient(var(--glass-strong), var(--glass-strong)), var(--bg); }
}
@media (prefers-reduced-transparency: reduce) {
  .glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: linear-gradient(var(--glass-strong), var(--glass-strong)), var(--bg); }
}
:root[data-solid="on"] .glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: linear-gradient(var(--glass-strong), var(--glass-strong)), var(--bg); }
@media (prefers-contrast: more) {
  .glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface); border-color: var(--text); box-shadow: none; }
  .card, .field input, .field select, .field textarea { box-shadow: 0 0 0 1px var(--text); }
}

/* ---------- shell ---------- */
#app { position: relative; z-index: 1; }
.sidebar { position: fixed; z-index: 20; top: calc(var(--edge) + var(--safe-top)); bottom: calc(var(--edge) + var(--safe-bottom)); left: var(--edge); width: var(--side); border-radius: 24px; padding: 18px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 16px; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.brand .mark { width: 28px; height: 28px; border-radius: 9px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 15px; font-weight: 700; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--text); font-size: 15px; font-weight: 500; transition: background 200ms var(--ease), transform 200ms var(--ease); }
.nav a:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.nav a:active { transform: scale(.98); }
.nav a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-text); font-weight: 600; }
.nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.nav-label { padding: 14px 12px 4px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-glass); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.me { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 6px 10px; border-radius: 12px; }
.me:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.me .grow { text-align: left; }
.me .grow b { display: block; font-size: 14px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .grow span { display: block; font-size: 12.5px; color: var(--text-glass); line-height: 1.25; }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent-text); }
.avatar.l { width: 56px; height: 56px; font-size: 19px; }
.avatar.xl { width: 72px; height: 72px; font-size: 24px; }

.topbar { position: fixed; z-index: 20; top: calc(var(--edge) + var(--safe-top)); left: calc(var(--side) + var(--edge) * 2); right: var(--edge); height: var(--bar); border-radius: 28px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 8px; transition: background 220ms var(--ease); }
.topbar.scrolled { background: var(--glass-strong); }
.topbar .mobile-title { display: none; position: relative; flex: 1; min-width: 0; height: 100%; font-size: 17px; font-weight: 600; }
.mobile-title > span { position: absolute; left: 12px; top: 50%; display: flex; align-items: center; gap: 8px; white-space: nowrap; transition: opacity 220ms var(--ease), transform 220ms var(--ease); }
.mobile-title .mt-brand { transform: translateY(-50%); letter-spacing: -0.01em; }
.mobile-title .mt-brand .mark { width: 24px; height: 24px; border-radius: 8px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.mobile-title .mt-page { opacity: 0; transform: translateY(-20%); }
.topbar.titled .mt-brand { opacity: 0; transform: translateY(-80%); }
.topbar.titled .mt-page { opacity: 1; transform: translateY(-50%); }
.search { position: relative; flex: 1; max-width: 480px; }
.search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-glass); pointer-events: none; }
.search input { width: 100%; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--text) 5%, var(--surface)); padding: 0 56px 0 42px; font-size: 15px; outline: none; }
.search input::placeholder { color: var(--text-glass); opacity: 1; }
.search input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent), 0 0 14px color-mix(in srgb, var(--accent) 22%, transparent); }
.search kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 500 12px var(--font); color: var(--text-glass); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--text); transition: background 200ms var(--ease), transform 200ms var(--ease); }
.iconbtn:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.iconbtn:active { transform: scale(.95); }

/* a soft fade where content slides under the top bar, instead of a hard divider */
.edge-top { position: fixed; z-index: 10; top: 0; left: 0; right: 0; height: calc(96px + var(--safe-top)); pointer-events: none; background: linear-gradient(var(--bg) 20%, transparent); opacity: 0; transition: opacity 220ms var(--ease); }
.edge-top.on { opacity: .92; }

.main { position: relative; padding: calc(var(--bar) + var(--edge) + 28px + var(--safe-top)) 24px calc(120px + var(--safe-bottom)) calc(var(--side) + var(--edge) + 28px); }
.page { max-width: 1160px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head .cap { margin-top: 6px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.tabbar { display: none; position: fixed; z-index: 20; left: 50%; bottom: calc(var(--edge) + var(--safe-bottom)); transform: translateX(-50%); padding: 6px; border-radius: 999px; gap: 2px; transition: transform 300ms var(--ease); }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 64px; height: 52px; padding: 0 6px; border-radius: 999px; color: var(--text); font-size: 10.5px; font-weight: 600; line-height: 1; }
.tabbar a span { transition: opacity 200ms var(--ease); }
.tabbar a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent-text); }
.tabbar .dot { position: absolute; top: 8px; right: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.tabbar.min { transform: translateX(-50%) translateY(10px) scale(.84); }
.tabbar.min a span { opacity: 0; }

/* ---------- solid content ---------- */
.card { background: var(--surface); border-radius: 24px; box-shadow: 0 0 0 1px var(--line); padding: 24px; min-width: 0; }
.card.flush { padding: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.side { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 600; white-space: nowrap; transition: transform 200ms var(--ease), filter 200ms var(--ease), background 200ms var(--ease); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.28); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.quiet { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.btn.quiet:hover { background: color-mix(in srgb, var(--text) 11%, transparent); }
.btn.quiet[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-text); }
.btn.danger { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.glass { color: var(--text); }
.btn.glass:hover { background: var(--glass-strong); }
.link { color: var(--accent-text); font-weight: 600; font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; gap: 4px; }
.link { white-space: nowrap; }
.link:hover { text-decoration: underline; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.plain::before { display: none; }
.chip.ok { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); }
.chip.warn { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); color: var(--warn); }
.chip.bad { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); }
.chip.info { background: color-mix(in srgb, var(--info) 14%, var(--surface)); color: var(--info); }
.chip.mute { background: color-mix(in srgb, var(--text) 9%, var(--surface)); color: var(--text); font-weight: 500; }
.chip.accent { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent-text); }

.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--text) 7%, transparent); gap: 2px; }
.seg button { height: 38px; min-width: 44px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--text); transition: background 200ms var(--ease); }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 1px 3px rgba(0,0,0,.08); color: var(--accent-text); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field .label { font-size: 14px; font-weight: 600; }
.field input:not([type="checkbox"]):not([type="file"]), .field select, .field textarea { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--text) 4%, transparent); padding: 0 14px; font-size: 16px; outline: none; transition: box-shadow 200ms var(--ease); }
.field textarea { height: auto; min-height: 88px; padding: 10px 14px; resize: vertical; line-height: 1.45; }
.field input:not([type="checkbox"]):not([type="file"]):focus, .field select:focus, .field textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent), 0 0 14px color-mix(in srgb, var(--accent) 22%, transparent); }
.field .hint { font-size: 13px; color: var(--text-2); line-height: 1.4; }
.field .err { font-size: 13px; color: var(--bad); font-weight: 500; line-height: 1.4; display: flex; gap: 6px; align-items: flex-start; }
.field.bad input { border-color: var(--bad); }
.field.good input { border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fields .wide { grid-column: 1 / -1; }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 8px 0; font-size: 15px; line-height: 1.4; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.switch { position: relative; width: 50px; height: 30px; flex: none; border-radius: 999px; background: color-mix(in srgb, var(--text) 18%, transparent); transition: background 220ms var(--ease); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform 220ms var(--ease); }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.switch.danger[aria-checked="true"] { background: var(--bad); }

/* ---------- clients ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 16px; border-radius: 20px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); transition: transform 200ms var(--ease), box-shadow 200ms var(--ease); min-width: 0; }
.tile:hover { transform: translateY(-1px); }
.tile:active { transform: scale(.98); }
.tile[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); }
.tile .k { font-size: 13px; font-weight: 600; color: var(--text-2); }
.tile .v { font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
.tile .h { font-size: 12.5px; line-height: 1.35; color: var(--text-2); }
.tile .h.risk { color: var(--warn); font-weight: 600; }
.tablewrap { position: relative; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; }
table.t th { position: sticky; top: calc(var(--bar) + var(--edge) + 8px + var(--safe-top)); z-index: 5; height: 40px; padding: 0 12px; text-align: left; font-size: 12.5px; font-weight: 600; color: var(--text-2); background: var(--surface); white-space: nowrap; }
table.t th:first-child { border-top-left-radius: 24px; padding-left: 20px; }
table.t th:last-child { border-top-right-radius: 24px; padding-right: 20px; }
table.t.stuck th { background: var(--glass-strong); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); color: var(--text); box-shadow: 0 1px 0 var(--line); border-radius: 0; }
table.t.stuck th:first-child { border-radius: 16px 0 0 16px; }
table.t.stuck th:last-child { border-radius: 0 16px 16px 0; }
table.t td { height: 52px; padding: 0 12px; border-top: 1px solid var(--line); vertical-align: middle; }
table.t td:first-child { padding-left: 20px; }
table.t td:last-child { padding-right: 20px; }
table.t tbody tr { transition: background 180ms var(--ease); cursor: pointer; }
table.t tbody tr:hover, table.t tbody tr:focus-visible { background: color-mix(in srgb, var(--text) 4%, transparent); }
table.t tbody tr.sel { background: color-mix(in srgb, var(--accent) 8%, transparent); }
table.t .r { text-align: right; }
table.t .name b { display: block; font-weight: 600; font-size: 15px; line-height: 1.25; }
table.t .name span { display: block; font-size: 12.5px; color: var(--text-2); line-height: 1.25; }
table.t input[type="checkbox"], .mcard input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; cursor: pointer; }
.tfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--line); }
.marks { display: inline-flex; gap: 6px; color: var(--text-2); }
.marks .on { color: var(--ok); }
.marks .off { opacity: .35; }
.mlist { display: none; }
.mcard { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-top: 1px solid var(--line); min-height: 52px; }
.mcard:first-child { border-top: 0; }
.mcard .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.mcard .body b { font-size: 15px; font-weight: 600; }
.empty { padding: 48px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.actionbar { position: fixed; z-index: 25; left: 50%; bottom: calc(28px + var(--safe-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; max-width: calc(100vw - 24px); animation: pop 300ms var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateX(-50%) translateY(12px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ---------- sheets, menus, toasts ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); animation: fade 300ms var(--ease) both; }
.sheet { position: fixed; z-index: 41; left: 50%; top: 50%; width: min(760px, calc(100vw - 48px)); max-height: min(86vh, 900px); transform: translate(-50%, -50%); border-radius: 28px; display: flex; flex-direction: column; overflow: hidden; animation: sheet-in 380ms var(--ease) both; }
.sheet.narrow { width: min(560px, calc(100vw - 48px)); }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px 24px; }
.sheet-head h2 { flex: 1; min-width: 0; }
.sheet-body { overflow: auto; padding: 4px 24px 24px; display: flex; flex-direction: column; gap: 16px; overscroll-behavior: contain; }
.sheet-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 24px calc(16px + var(--safe-bottom)); border-top: 1px solid var(--line); flex-wrap: wrap; }
.sheet .card { border-radius: 20px; padding: 20px; }
.sheet .cap, .sheet .hint, .actionbar .cap, .public-bar .cap { color: var(--text-glass); }
.grabber { display: none; width: 36px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--text) 25%, transparent); margin: 8px auto 0; }
@keyframes sheet-in { from { opacity: 0; transform: translate(-50%, -48%) scale(.98); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.menu { position: fixed; z-index: 50; min-width: 240px; padding: 6px; border-radius: 18px; animation: fade 180ms var(--ease) both; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; font-size: 15px; font-weight: 500; color: var(--text); }
.menu button:hover, .menu a:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.menu .tick { margin-left: auto; color: var(--accent-text); }
.menu .mlabel { padding: 8px 12px 4px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-glass); }
.toasts { position: fixed; z-index: 60; top: calc(16px + var(--safe-top)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.toast { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 18px; border-radius: 999px; font-size: 14.5px; font-weight: 600; animation: toast-in 320ms var(--ease) both; }
.toast .ic { color: var(--ok); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- profile ---------- */
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.kv div span { display: block; font-size: 12.5px; color: var(--text-2); }
.kv div b { display: block; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.consent { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.consent:first-of-type { border-top: 0; }
.consent .ic.yes { color: var(--ok); } .consent .ic.no { color: var(--text-2); } .consent .ic.stop { color: var(--bad); }
.policy { padding: 14px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.policy:first-of-type { border-top: 0; padding-top: 0; }
.policy .kv { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.timeline { display: flex; flex-direction: column; }
.tl { display: grid; grid-template-columns: 20px 1fr; gap: 12px; padding-bottom: 14px; position: relative; font-size: 14.5px; }
.tl::before { content: ""; position: absolute; left: 9.5px; top: 22px; bottom: 0; width: 1px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl .ic { color: var(--text-2); margin-top: 1px; }
.tl span { display: block; font-size: 12.5px; color: var(--text-2); }

/* ---------- taken rate ---------- */
.stat { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 14px 16px; border-radius: 18px; min-width: 0; transition: background 200ms var(--ease), box-shadow 200ms var(--ease); }
.stat:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.stat[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 9%, transparent); box-shadow: 0 0 0 1.5px var(--accent); }
.stat .k { font-size: 13px; font-weight: 600; color: var(--text-2); }
.stat .v { font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
.stat .h { font-size: 12.5px; color: var(--text-2); line-height: 1.35; }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 0 -8px -8px; }
.hero { font-size: 56px; line-height: 1; font-weight: 700; letter-spacing: -0.03em; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis { font: 500 12px var(--font); fill: var(--text-2); font-variant-numeric: tabular-nums; }
.chart .gridline { stroke: var(--line); stroke-width: 1; }
.chart .baseline { stroke: color-mix(in srgb, var(--text) 28%, transparent); stroke-width: 1; }
.chart .taken { fill: var(--accent); }
.chart .nto { fill: color-mix(in srgb, var(--text) 50%, var(--surface)); }
.chart .col { cursor: default; outline: none; }
.chart .col.dim .taken, .chart .col.dim .nto { opacity: .3; }
.chart .col .hit { fill: transparent; }
.chart .col:hover .hit, .chart .col:focus-visible .hit { fill: color-mix(in srgb, var(--text) 6%, transparent); }
.chart .band { fill: color-mix(in srgb, var(--accent) 7%, transparent); }
.chart .lbl { font: 600 12px var(--font); fill: var(--text); font-variant-numeric: tabular-nums; }
.tip { position: absolute; z-index: 6; pointer-events: none; padding: 10px 12px; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 8px 24px -8px var(--glass-shadow); font-size: 13px; line-height: 1.45; min-width: 150px; }
.tip b { font-size: 15px; }
.tip .key { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.counter { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.counter:first-of-type { border-top: 0; }
.counter b { font-weight: 600; }
table.plain { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.plain th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--text-2); padding: 8px 10px; }
table.plain td { padding: 11px 10px; border-top: 1px solid var(--line); }
table.plain .r { text-align: right; }
table.plain tfoot td { font-weight: 600; }
.owner-table table.plain td:first-child { padding-left: 20px; }
.owner-table table.plain td:last-child, .owner-table table.plain th:last-child { padding-right: 20px; }
.scroll-x { overflow-x: auto; }

/* ---------- inbox ---------- */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: clamp(520px, calc(100vh - 230px), 860px); overflow: hidden; }
.threads { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-width: 0; min-height: 0; }
.threads-head { padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 12px; }
.thread-list { overflow: auto; flex: 1; }
.thread { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 12px 16px; text-align: left; border-top: 1px solid var(--line); min-height: 68px; }
.thread:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.thread[aria-current="true"] { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.thread b { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.thread .snip { display: block; font-size: 13.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread .meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; color: var(--text-2); }
.unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.convo { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.convo-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.convo-head .back { display: none; }
.msgs { flex: 1; overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: min(520px, 84%); display: flex; flex-direction: column; gap: 4px; }
.msg.out { align-self: flex-end; align-items: flex-end; }
.msg.in { align-self: flex-start; }
.bubble { padding: 10px 14px; border-radius: 20px; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.msg.in .bubble { background: color-mix(in srgb, var(--text) 7%, transparent); border-bottom-left-radius: 6px; }
.msg.out .bubble { background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.msg.out.held .bubble { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.mail { width: min(560px, 100%); border-radius: 18px; box-shadow: 0 0 0 1px var(--line); padding: 14px 16px; font-size: 14.5px; line-height: 1.5; background: var(--surface); }
.msg.out .mail { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.mail .subj { font-weight: 600; font-size: 15px; margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.msg .meta { font-size: 12px; color: var(--text-2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sys { align-self: center; max-width: 560px; display: flex; gap: 8px; align-items: flex-start; padding: 8px 14px; border-radius: 14px; font-size: 13px; line-height: 1.4; color: var(--text-2); background: color-mix(in srgb, var(--text) 5%, transparent); }
.sys.pause { color: var(--info); background: color-mix(in srgb, var(--info) 12%, var(--surface)); }
.sys.stop { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--surface)); }
.composer { border-top: 1px solid var(--line); padding: 12px 16px calc(12px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 10px; }
.composer textarea { width: 100%; min-height: 64px; max-height: 160px; border-radius: 16px; border: 1px solid var(--line); background: color-mix(in srgb, var(--text) 4%, transparent); padding: 10px 14px; font-size: 16px; line-height: 1.4; resize: none; outline: none; }
.composer textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.notice { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.4; }
.notice.warn { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); color: var(--warn); }
.notice.bad { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); color: var(--bad); }
.notice.info { background: color-mix(in srgb, var(--info) 12%, var(--surface)); color: var(--info); }
.notice.plain { background: color-mix(in srgb, var(--text) 5%, var(--surface)); color: var(--text); }
.notice .ic { margin-top: 1px; }

/* ---------- holidays ---------- */
.prompt { position: relative; box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 24px; align-items: center; }
.preview { border-radius: 18px; background: color-mix(in srgb, var(--text) 4%, transparent); padding: 16px; font-size: 14.5px; line-height: 1.5; white-space: pre-line; }
.prompt img.thumb { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 0 0 1px var(--line); }
.prompt .what { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: -4px; }
/* an email as the client sees it: the picture first, then the words */
.mailprev { border-radius: 18px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.mailprev img { display: block; width: 100%; height: auto; }
.mailprev-body { padding: 16px; font-size: 14.5px; line-height: 1.5; white-space: pre-line; }
.hrow { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 24px; border-top: 1px solid var(--line); min-height: 64px; }
.hrow:first-child { border-top: 0; }
.hrow .d b { display: block; font-size: 15px; font-weight: 600; }
.hrow .d span, .hrow .n span { display: block; font-size: 12.5px; color: var(--text-2); }
.hrow .n b { font-size: 15px; font-weight: 600; }
.hrow .s { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.hrow.now { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.month-h { padding: 18px 24px 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }

/* the two moments allowed to glow: a file over the drop zone, and a send in progress */
.drop { position: relative; border-radius: 20px; padding: 28px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; border: 1.5px dashed color-mix(in srgb, var(--text) 25%, transparent); transition: border-color 200ms var(--ease); }
.drop.over { border-color: transparent; }
.drop.over::before, .sending::before { content: ""; position: absolute; inset: -2px; border-radius: inherit; padding: 2px; background: conic-gradient(from var(--spin, 0deg), var(--glow-pink), var(--glow-blue), var(--glow-purple), var(--glow-orange), var(--glow-pink)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: spin 6s linear infinite; }
.drop.over::after, .sending::after { content: ""; position: absolute; inset: 8px; border-radius: inherit; background: conic-gradient(from var(--spin, 0deg), var(--glow-pink), var(--glow-blue), var(--glow-purple), var(--glow-orange), var(--glow-pink)); filter: blur(28px); opacity: .22; z-index: -1; animation: spin 6s linear infinite; }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --spin: 360deg; } }
.sending { position: relative; border-radius: 20px; padding: 18px 20px; isolation: isolate; }
.progress { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transform-origin: left; transition: transform 600ms var(--ease); }

/* ---------- referrals ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; }
.lane { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lane-h { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; font-size: 13px; font-weight: 600; color: var(--text-glass); }
.rcard { background: var(--surface); border-radius: 16px; box-shadow: 0 0 0 1px var(--line); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.rcard b { font-size: 15px; }
.qr { width: 132px; height: 132px; border-radius: 16px; background: #FFFFFF; padding: 10px; flex: none; box-shadow: 0 0 0 1px var(--line); }
.qr svg { display: block; width: 100%; height: 100%; }
.urlbox { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px 0 14px; border-radius: 12px; background: color-mix(in srgb, var(--text) 5%, transparent); font-size: 14.5px; font-weight: 500; overflow: hidden; }
.urlbox span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all; }

/* the public referral page: no app chrome */
.public { position: relative; z-index: 1; min-height: 100%; padding: calc(84px + var(--safe-top)) 16px calc(48px + var(--safe-bottom)); }
.public-bar { position: fixed; z-index: 20; top: calc(var(--edge) + var(--safe-top)); left: 50%; transform: translateX(-50%); width: min(440px, calc(100vw - 24px)); height: 52px; border-radius: 26px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 18px; font-size: 14px; font-weight: 600; }
.public-col { max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.agent-card { display: flex; align-items: center; gap: 14px; }
.agent-card div b { display: block; font-size: 17px; font-weight: 600; }
.agent-card div span { display: block; font-size: 13.5px; color: var(--text-2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- texting setup and owner ---------- */
.choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.option { position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 18px; border-radius: 20px; box-shadow: 0 0 0 1px var(--line); font-size: 14.5px; line-height: 1.45; transition: box-shadow 200ms var(--ease); }
.option[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 5%, transparent); }
.option b { font-size: 17px; font-weight: 600; }
.option .price { font-size: 13px; font-weight: 600; color: var(--accent-text); }
.option .price.big { font-size: 20px; line-height: 1.2; letter-spacing: -0.01em; }
.localpick { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.localpick .notice { font-size: 14.5px; flex-wrap: wrap; }
.localpick .notice > span { flex: 1 1 240px; min-width: 0; }
.localpick .notice .btn { flex: none; }
.address { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin-top: 16px; padding: 16px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.address b { font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.steps { display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding-bottom: 16px; position: relative; font-size: 14.5px; }
.step::before { content: ""; position: absolute; left: 11.5px; top: 26px; bottom: 2px; width: 1px; background: var(--line); }
.step:last-child::before { display: none; }
.step .bullet { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--text-2); }
.step.done .bullet { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.step.now .bullet { background: var(--accent); color: var(--on-accent); }
.step b { display: block; font-weight: 600; }
.step span { display: block; font-size: 13px; color: var(--text-2); }
.meter { display: flex; flex-direction: column; gap: 5px; min-width: 120px; }
.meter .track { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--accent) 16%, transparent); overflow: hidden; }
.meter .track i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.meter.warn .track { background: color-mix(in srgb, var(--warn) 18%, transparent); } .meter.warn .track i { background: var(--warn); }
.meter.bad .track { background: color-mix(in srgb, var(--bad) 18%, transparent); } .meter.bad .track i { background: var(--bad); }
.meter span { font-size: 12.5px; color: var(--text-2); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border-radius: 20px; box-shadow: 0 0 0 1px var(--line); padding: 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi .k { font-size: 13px; font-weight: 600; color: var(--text-2); }
.kpi .v { font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
.kpi .h { font-size: 12.5px; color: var(--text-2); }
.killcard { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.killcard.on { box-shadow: 0 0 0 2px var(--bad); }

/* ---------- entrance: fade and rise 8px, staggered ---------- */
.page > * { animation: rise 420ms var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.page.still > * { animation: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- phone and tablet ---------- */
@media (max-width: 1023px) {
  .sidebar { display: none; }
  .tabbar { display: flex; }
  .topbar { left: var(--edge); height: 52px; border-radius: 26px; }
  .topbar .mobile-title { display: block; }
  .topbar .search { display: none; }
  .main { padding: calc(52px + var(--edge) + 20px + var(--safe-top)) 16px calc(128px + var(--safe-bottom)); }
  .grid.side, .grid.two { grid-template-columns: minmax(0, 1fr); }
  table.t th { top: calc(52px + var(--edge) + 8px + var(--safe-top)); }
  .actionbar { bottom: calc(92px + var(--safe-bottom)); }
  .board { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(220px, 72vw); overflow-x: auto; padding: 2px 2px 8px; margin: 0 -16px; padding-inline: 16px; scroll-snap-type: x proximity; }
  .lane { scroll-snap-align: start; }
}
@media (max-width: 767px) {
  .card { padding: 18px; border-radius: 22px; }
  .tiles, .pills { display: flex; flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scroll-padding-inline: 16px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .pills::-webkit-scrollbar { display: none; }
  .pills > * { flex: none; }
  .tiles::-webkit-scrollbar { display: none; }
  .tile { flex: 0 0 148px; scroll-snap-align: start; }
  table.t { display: none; }
  .mlist { display: block; }
  .sheet, .sheet.narrow { left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 92%; transform: none; border-radius: 28px 28px 0 0; animation: sheet-up 420ms var(--ease) both; }
  .grabber { display: block; }
  .sheet-head { padding: 8px 12px 8px 20px; }
  .sheet-body { padding: 4px 16px 20px; }
  .sheet-foot { padding-inline: 16px; }
  .sheet-foot .btn { flex: 1; }
  .sheet-foot .cap { flex-basis: 100%; }
  .kv, .policy .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fields, .choice { grid-template-columns: minmax(0, 1fr); }
  .stats3 { grid-template-columns: minmax(0, 1fr); margin: 0; }
  .stat { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k v" "h v"; column-gap: 12px; align-items: center; }
  .stat .k { grid-area: k; } .stat .h { grid-area: h; } .stat .v { grid-area: v; font-size: 28px; }
  .hero { font-size: 48px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inbox { grid-template-columns: minmax(0, 1fr); height: auto; overflow: visible; }
  .inbox .threads { border-right: 0; }
  .inbox .thread-list { overflow: visible; }
  .inbox.open .threads { display: none; }
  .inbox:not(.open) .convo { display: none; }
  .inbox .convo { min-height: calc(100vh - 230px); }
  .convo-head .back { display: grid; }
  .convo-head { padding: 10px 12px; }
  .msgs { padding: 16px 12px; }
  .prompt { grid-template-columns: minmax(0, 1fr); }
  .hrow { grid-template-columns: 64px minmax(0, 1fr); padding: 12px 18px; }
  .hrow .s { grid-column: 2; align-items: flex-start; text-align: left; }
  .month-h { padding-inline: 18px; }
  .owner-table { display: none; }
  .actionbar { padding-left: 16px; }
  .actionbar .hide-s { display: none; }
}
@media (min-width: 768px) { .owner-cards { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .ground i, .drop.over::before, .drop.over::after, .sending::before, .sending::after { animation: none; }
  .page > *, .actionbar, .toast { animation: fade 200ms linear both; }
  .sheet { animation: fade 200ms linear both; }
  .tabbar, .tabbar.min { transition: none; transform: translateX(-50%); }
  * { scroll-behavior: auto; }
}
