﻿/* admin-portal.css: the owner's admin portal (admin.html), redesigned 2026-11-17.
 * Owner: "lots of visuals, I don't want to read", "liquid glass", "super nice, not overwhelming".
 * Built on cutflux-tokens.css. Two radii only: --r (cards, panels, sheets) and pill (chips, buttons, the bar).
 * Glass (blur + rim + top sheen) is only on the things that float: the side rail, the phone bar, the More sheet,
 * sticky headers. Content cards are calm tonal surfaces. No gradients on controls. */

:root {
  --r: 18px;
  --bg: #07080B;
  --panel: #101116;
  --card: #14151B;          /* tonal surface 1 */
  --raised: #1B1C24;        /* tonal surface 2 (inside a card) */
  --hover: #22242D;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #fff;
  --text-2: rgba(255, 255, 255, .72);
  --text-3: rgba(255, 255, 255, .48);
  --text-4: rgba(255, 255, 255, .30);
  --accent: var(--cf-accent, #3B82F6);
  --accent-soft: rgba(59, 130, 246, .16);
  --ok: #34D399; --ok-soft: rgba(52, 211, 153, .14);
  --warn: #F5A623; --warn-soft: rgba(245, 166, 35, .15);
  --err: #F87171; --err-soft: rgba(248, 113, 113, .14);
  --park: #8B90A0; --park-soft: rgba(139, 144, 160, .14);
  /* owners (calendar + cards) */
  --o-you: #F472B6; --o-app: #34D399; --o-claude: #60A5FA; --o-muse: #C084FC; --o-ultron: #FB923C; --o-reel: #FACC15;
  /* glass */
  --glass: rgba(22, 23, 30, .58);
  --glass-solid: rgba(18, 19, 25, .97);
  --glass-rim: rgba(255, 255, 255, .14);
  --glass-spec: rgba(255, 255, 255, .20);
  --glass-shadow: 0 18px 40px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);
  --spring: cubic-bezier(.3, 1.3, .5, 1);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.45 Inter, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }
[hidden] { display: none !important; }
svg.i { width: 18px; height: 18px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Soft colour fields behind everything, so the glass has something to bend. Decorative, never on a control. */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .32; }
.ambient i:nth-child(1) { width: 520px; height: 520px; left: -160px; top: -180px; background: #1D4ED8; }
.ambient i:nth-child(2) { width: 420px; height: 420px; right: -140px; top: 30%; background: #7C3AED; opacity: .18; }
.ambient i:nth-child(3) { width: 460px; height: 460px; left: 30%; bottom: -260px; background: #0EA5E9; opacity: .14; }

/* ---------- gate ---------- */
#gate { min-height: 100dvh; display: grid; place-items: center; padding: 20px; position: relative; z-index: 1; }
#gate .card { max-width: 360px; text-align: center; }

/* ---------- shell ---------- */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.7); backdrop-filter: blur(24px) saturate(1.7);
  box-shadow: inset 0 0 0 .5px var(--glass-rim), inset 0 1px 0 var(--glass-spec), var(--glass-shadow);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .glass { background: var(--glass-solid); } }

.rail { position: sticky; top: 12px; height: calc(100dvh - 24px); margin: 12px 0 12px 12px; border-radius: var(--r); padding: 18px 10px 12px; display: flex; flex-direction: column; gap: 2px; overflow: auto; isolation: isolate; }
.rail::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0) 40%); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; padding: 0 10px 16px; letter-spacing: -.01em; }
.brand .logo { width: 30px; height: 30px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; }
.brand small { display: block; color: var(--text-3); font-weight: 500; font-size: 11.5px; letter-spacing: .02em; }
.rail .sep { height: 1px; background: var(--line); margin: 8px 10px; }
.nav { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 999px; background: none; color: var(--text-2); cursor: pointer; text-align: left; font-weight: 500; transition: background .2s var(--ease), color .2s var(--ease); }
.nav:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.nav.on { background: rgba(255, 255, 255, .11); color: #fff; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .16); }
.nav .n { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; text-align: center; }
.nav .n.warn { background: var(--warn); color: #1a1205; }
.nav .n:empty { display: none; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 10px; }
.rail-foot a { display: flex; align-items: center; gap: 10px; color: var(--text-3); text-decoration: none; padding: 7px 12px; border-radius: 999px; font-size: 12.5px; }
.rail-foot a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.who { color: var(--text-4); padding: 8px 12px 0; font-size: 11.5px; overflow-wrap: anywhere; }

main { padding: 28px clamp(16px, 3.2vw, 44px) 80px; min-width: 0; }
.page-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.page-h h1 { font-size: 30px; line-height: 1.1; margin: 0; letter-spacing: -.025em; font-weight: 700; display: flex; align-items: center; gap: 12px; }
.page-h h1 .ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--raised); }
.page-h h1 .ic svg { width: 21px; height: 21px; }
.page-h .tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- shared pieces ---------- */
.card { background: var(--card); border-radius: var(--r); padding: 18px; min-width: 0; box-shadow: inset 0 0 0 .5px var(--line); }
.card h2, .h2 { font-size: 13px; margin: 0 0 14px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.card h2 .r, .h2 .r { margin-left: auto; color: var(--text-3); font-weight: 500; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.muted { color: var(--text-3); }
.note { font-size: 12.5px; color: var(--text-3); }
.empty { color: var(--text-3); padding: 34px 10px; text-align: center; }
.empty .big { font-size: 34px; display: block; margin-bottom: 6px; }
.err { color: var(--err); }

/* number tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { position: relative; background: var(--card); border-radius: var(--r); padding: 16px 16px 14px; box-shadow: inset 0 0 0 .5px var(--line); display: flex; flex-direction: column; gap: 10px; min-width: 0; text-align: left; border: 0; color: var(--text); }
button.tile { cursor: pointer; transition: transform .2s var(--spring), box-shadow .2s var(--ease); }
button.tile:hover { box-shadow: inset 0 0 0 .5px var(--line-2); }
button.tile.on { box-shadow: inset 0 0 0 1.5px currentColor; }
.tile .ti { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--raised); color: var(--text-2); }
.tile .v { font-size: 34px; line-height: 1; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tile .l { font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.tile .d { font-size: 11.5px; color: var(--text-4); margin-top: -4px; }
.tile.c-warn .ti { background: var(--warn-soft); color: var(--warn); } .tile.c-warn.on { color: var(--warn); }
.tile.c-blue .ti { background: var(--accent-soft); color: #93C5FD; } .tile.c-blue.on { color: #93C5FD; }
.tile.c-ok .ti { background: var(--ok-soft); color: var(--ok); } .tile.c-ok.on { color: var(--ok); }
.tile.c-park .ti { background: var(--park-soft); color: var(--park); } .tile.c-park.on { color: var(--park); }
.tile.c-err .ti { background: var(--err-soft); color: var(--err); }
.tile.c-pink .ti { background: rgba(244, 114, 182, .14); color: var(--o-you); }
.tile.c-purple .ti { background: rgba(192, 132, 252, .14); color: var(--o-muse); }
.tile .v small { font-size: 15px; font-weight: 600; color: var(--text-3); letter-spacing: 0; margin-left: 2px; }
.tile.wait .v { color: var(--text-4); }

/* chips (filters + labels) */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; margin: 0 -2px 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--card); color: var(--text-2); cursor: pointer; font-weight: 500; font-size: 13.5px; box-shadow: inset 0 0 0 .5px var(--line-2); white-space: nowrap; transition: background .2s var(--ease), color .2s var(--ease); }
.chip svg.i { width: 16px; height: 16px; }
.chip b { font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chip:hover { color: var(--text); }
.chip.on { background: #fff; color: #0A0A0D; box-shadow: none; }
.chip.on b { color: rgba(10, 10, 13, .55); }
.chip.add { background: var(--accent); color: #fff; box-shadow: none; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--raised); color: var(--text-2); white-space: nowrap; }
.tag svg.i { width: 13px; height: 13px; }
.tag.waiting, .tag.warn { background: var(--warn-soft); color: #FBBF24; }
.tag.todo, .tag.blue { background: var(--accent-soft); color: #93C5FD; }
.tag.shipping, .tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.parked { background: var(--park-soft); color: var(--park); }
.tag.done { background: var(--ok-soft); color: var(--ok); }
.tag.err { background: var(--err-soft); color: #FCA5A5; }
/* legacy names the Agents HQ module uses */
.pill { font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--raised); color: var(--text-2); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.warn { background: var(--warn-soft); color: #FBBF24; } .pill.blue { background: var(--accent-soft); color: #93C5FD; } .pill.err { background: var(--err-soft); color: #FCA5A5; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 999px; height: 38px; padding: 0 16px; background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; font-size: 13.5px; white-space: nowrap; transition: transform .2s var(--spring), background .2s var(--ease); }
a.btn { text-decoration: none; }
.btn:hover { background: var(--cf-accent-hover, #5B9BFF); }
.btn.ghost { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 .5px var(--line-2); }
.btn.ghost:hover { background: var(--hover); }
.btn.ok { background: var(--ok); color: #04130C; }
.btn.small { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn.icon { width: 38px; padding: 0; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn:active:not([disabled]) { transform: scale(.96); }
.actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--card); border-radius: 999px; padding: 4px; box-shadow: inset 0 0 0 .5px var(--line-2); gap: 2px; }
.seg button { border: 0; background: none; height: 30px; padding: 0 13px; border-radius: 999px; color: var(--text-2); cursor: pointer; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: rgba(255, 255, 255, .12); color: #fff; }
.seg button b { font-weight: 600; font-size: 11.5px; background: var(--accent); color: #fff; border-radius: 999px; padding: 0 6px; }
.seg button b:empty { display: none; }

input[type=search], input[type=text], input[type=date], input[type=number], select, textarea { background: var(--raised); border: 0; box-shadow: inset 0 0 0 .5px var(--line-2); border-radius: 12px; padding: 9px 13px; outline: none; color: var(--text); }
input[type=search] { border-radius: 999px; padding-left: 38px; height: 38px; min-width: 220px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 13px 50% / 16px; }
:is(input, select, textarea):focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
textarea { width: 100%; min-height: 96px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
input[type=date] { color-scheme: dark; }

.banner { display: flex; align-items: center; gap: 10px; background: var(--warn-soft); color: #FCD34D; border-radius: var(--r); padding: 12px 16px; font-size: 13px; margin-bottom: 14px; }
.soon { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12.5px; background: var(--card); border-radius: 999px; padding: 8px 14px; box-shadow: inset 0 0 0 .5px var(--line); width: max-content; max-width: 100%; }
.soon svg.i { width: 15px; height: 15px; color: var(--warn); }

/* bars + charts */
.hbars { display: flex; flex-direction: column; gap: 11px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 140px) minmax(0, 1fr) 64px; gap: 12px; align-items: center; font-size: 13px; }
.hbar span:first-child { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 12px; border-radius: 999px; background: var(--raised); overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width .6s var(--ease); }
.hbar .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 600; }
.hbar .num small { color: var(--text-4); font-weight: 500; }
.cbars { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.cbars i { flex: 1; min-width: 2px; background: var(--accent); border-radius: 4px 4px 1px 1px; min-height: 2px; opacity: .9; position: relative; }
.cbars i.z { background: var(--raised); }
.cbars i:hover { opacity: 1; filter: brightness(1.2); }
.caxis { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-4); margin-top: 6px; }
.meter { height: 16px; border-radius: 999px; background: var(--raised); overflow: hidden; position: relative; }
.meter i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--ok); transition: width .8s var(--ease); }
.meter.warn i { background: var(--warn); } .meter.err i { background: var(--err); }
.split { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px; }
.split i { display: block; height: 100%; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--accent)); }

/* ---------- Follow up ---------- */
.fu-list { display: flex; flex-direction: column; gap: 10px; }
.fu { background: var(--card); border-radius: var(--r); box-shadow: inset 0 0 0 .5px var(--line); transition: box-shadow .2s var(--ease); overflow: hidden; }
.fu:hover { box-shadow: inset 0 0 0 .5px var(--line-2); }
.fu.open { box-shadow: inset 0 0 0 1px var(--line-2); }
.fu-h { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 0; background: none; color: var(--text); cursor: pointer; text-align: left; }
.prio { width: 34px; height: 34px; border-radius: 11px; flex: 0 0 34px; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--raised); color: var(--text-3); }
.prio.p1 { background: rgba(248, 113, 113, .16); color: #FCA5A5; }
.prio.p2 { background: var(--warn-soft); color: #FBBF24; }
.fu-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.fu-t b { font-weight: 600; font-size: 15px; line-height: 1.3; }
.fu-m { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ownr { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; font-size: 11px; font-weight: 800; color: #0A0A0D; background: var(--oc, var(--text-3)); flex: 0 0 24px; }
.fu-h .chev { color: var(--text-4); transition: transform .25s var(--ease); }
.fu.open .fu-h .chev { transform: rotate(180deg); }
.fu-b { padding: 0 16px 16px 64px; display: flex; flex-direction: column; gap: 14px; }
.fu-note { color: var(--text-2); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fu-notes { display: flex; flex-direction: column; gap: 6px; }
.fu-notes div { background: var(--raised); border-radius: 12px; padding: 8px 12px; font-size: 13px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.fu-vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.fu-vid { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.fu-vid video { width: 100%; max-height: 420px; border-radius: 12px; background: #000; aspect-ratio: 9 / 16; object-fit: contain; }
.fu-vid figcaption { font-size: 13px; color: var(--text-2); }
.tag.vid { color: var(--text-1, inherit); }
.fu-notes div time { display: block; font-size: 11px; color: var(--text-4); margin-bottom: 2px; }
.fu-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fu-row .seg { flex-wrap: wrap; border-radius: 16px; }
.fu-row .lbl { font-size: 11.5px; color: var(--text-4); width: 58px; flex: 0 0 58px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.fu-quick { display: flex; gap: 8px; }
.fu-quick input { flex: 1; min-width: 0; border-radius: 999px; height: 38px; }
.done-h { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; color: var(--text-3); cursor: pointer; padding: 18px 4px 8px; font-weight: 600; font-size: 13px; }
.done-h .chev { transition: transform .25s var(--ease); }
.done-h.open .chev { transform: rotate(180deg); }
.fu.isdone .fu-t b { color: var(--text-3); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .25); }
.sync { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-4); margin-top: 18px; }
.sync svg.i { width: 14px; height: 14px; }

/* new-item sheet */
.sheet-back { position: fixed; inset: 0; z-index: 9600; background: rgba(0, 0, 0, .5); display: grid; place-items: center; padding: 16px; animation: fadeIn .2s var(--ease); }
.sheet { width: min(520px, 100%); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 14px; position: relative; isolation: isolate; animation: popIn .32s var(--spring); }
.sheet h3 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.sheet .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet label { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.sheet input, .sheet select, .sheet textarea { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 14px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }

/* ---------- Calendar ---------- */
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.month { padding: 16px; }
.month + .month { margin-top: 14px; }
.mh { font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin: 0 2px 12px; }
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.wd { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-4); text-align: center; padding-bottom: 4px; }
.cell { display: flex; flex-direction: column; gap: 3px; min-height: 86px; min-width: 0; padding: 6px; border-radius: 12px; background: var(--raised); border: 0; box-shadow: inset 0 0 0 1px transparent; text-align: left; color: var(--text); cursor: pointer; overflow: hidden; transition: box-shadow .15s var(--ease); }
.cell:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.cell.pad { background: transparent; cursor: default; box-shadow: none; }
.cell.past { opacity: .42; }
.cell.sel { box-shadow: inset 0 0 0 1.5px var(--accent); }
.cell .dn { font-size: 12.5px; font-weight: 700; width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 999px; }
.cell.today .dn { background: var(--accent); color: #fff; }
.ev { display: block; font-style: normal; font-size: 11px; line-height: 1.35; padding: 1px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #0A0A0D; font-weight: 600; background: var(--oc, var(--text-3)); }
.ev.more { background: transparent; color: var(--text-3); padding-left: 2px; }
.cal-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; }
.day-h { font-size: 18px; font-weight: 700; margin: 0 0 12px; letter-spacing: -.01em; }
.ag-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.ag-row:first-of-type { border-top: 0; }
.ag-row .bar { width: 4px; align-self: stretch; border-radius: 99px; background: var(--oc, var(--text-3)); flex: 0 0 4px; }
.ag-row .tx { flex: 1; min-width: 0; font-size: 13.5px; }
.ag-row .tx small { display: block; color: var(--text-3); font-size: 12px; margin-top: 2px; }
a.ag-row { color: inherit; text-decoration: none; }
a.ag-row:hover .tx { color: #fff; }
.ag-row .tx svg.i { width: 14px; height: 14px; vertical-align: -2px; color: var(--text-3); }
.ag-day { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin: 14px 0 2px; }
.ag-day:first-child { margin-top: 0; }
.lanes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; }
.lane { padding: 14px; }
.lane-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.lane-h .ownr { width: 34px; height: 34px; border-radius: 11px; font-size: 15px; }
.lane-h b { font-size: 15px; }
.lane-h .v { margin-left: auto; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lane li { list-style: none; font-size: 13px; color: var(--text-2); padding: 6px 0; border-top: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.lane ul { margin: 0; padding: 0; }
.lane li:hover { color: var(--text); }

/* ---------- people (users, chats) ---------- */
.av { width: 42px; height: 42px; border-radius: 14px; flex: 0 0 42px; display: grid; place-items: center; font-weight: 700; font-size: 16px; color: #0A0A0D; background: var(--ac, #93C5FD); }
.av.sm { width: 34px; height: 34px; flex-basis: 34px; border-radius: 11px; font-size: 14px; }
.plist { display: flex; flex-direction: column; gap: 8px; }
.prow { background: var(--card); border-radius: var(--r); box-shadow: inset 0 0 0 .5px var(--line); overflow: hidden; }
.prow.open { box-shadow: inset 0 0 0 1px var(--line-2); }
.prow-h { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 16px; border: 0; background: none; color: var(--text); cursor: pointer; text-align: left; }
.prow-h .who2 { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.prow-h .who2 b { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow-h .who2 .fu-m { flex-wrap: nowrap; overflow: hidden; }
.prow-h .right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.prow-h .right b { font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 5px; }
.prow-h .right b svg.i { width: 15px; height: 15px; color: var(--text-3); }
.prow-b { padding: 4px 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.fact { background: var(--raised); border-radius: 14px; padding: 11px 13px; min-width: 0; }
.fact b { display: block; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fact span { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
.fact span svg.i { width: 13px; height: 13px; }
.journey { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.journey div { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--text-4); text-align: center; }
.journey i { display: block; height: 6px; border-radius: 99px; background: var(--raised); }
.journey div.on { color: var(--text-2); }
.journey div.on i { background: var(--ok); }
.disclose { border: 0; background: none; color: var(--text-3); cursor: pointer; font-weight: 600; font-size: 12.5px; padding: 4px 0; display: inline-flex; gap: 6px; align-items: center; }
.tl { display: flex; flex-direction: column; }
.tl div { display: flex; gap: 10px; font-size: 13px; padding: 7px 0; border-top: 1px solid var(--line); }
.tl div:first-child { border-top: 0; }
.tl div span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.tl div time { color: var(--text-4); white-space: nowrap; font-size: 12px; }

/* chats */
.msgs { display: flex; flex-direction: column; gap: 8px; max-height: 56vh; overflow: auto; padding: 4px 0; }
.m { max-width: 85%; padding: 10px 13px; border-radius: 16px; background: var(--raised); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; }
.m.me { align-self: flex-end; background: var(--accent); color: #fff; }
.m .meta { font-size: 11px; opacity: .6; margin-bottom: 3px; }
.ustrip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--raised); border-radius: 14px; padding: 10px 12px; }
.ustrip .grow { flex: 1 1 170px; min-width: 0; font-size: 12.5px; color: var(--text-3); overflow-wrap: anywhere; }
/* Agents HQ module (admin-hq.js) keeps its own markup; give it the same surfaces */
#hqRoot .head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
#hqRoot h1 { font-size: 18px; margin: 0; }
#hqRoot .sub { color: var(--text-3); font-size: 12.5px; }
#hqRoot .conv { display: flex; flex-direction: column; }
#hqRoot .conv-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
#hqRoot .ulist { padding: 10px; max-height: 70vh; overflow: auto; }
#hqRoot .urow { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 12px; cursor: pointer; color: var(--text); }
#hqRoot .urow:hover { background: var(--raised); } #hqRoot .urow.on { background: var(--accent-soft); }
#hqRoot .urow .u1 { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 13px; }
#hqRoot .urow .em { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hqRoot .urow .u2, #hqRoot .urow .u3 { font-size: 12px; }
#hqRoot .row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; }

/* tables (YouTube) */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { color: var(--text-3); font-weight: 500; text-align: left; padding: 0 10px 8px 0; font-size: 12px; }
td { border-top: 1px solid var(--line); padding: 9px 10px 9px 0; vertical-align: middle; }
.tw { overflow-x: auto; }
iframe { width: 100%; height: 78vh; border: 0; border-radius: var(--r); background: #070c14; box-shadow: inset 0 0 0 .5px var(--line); }

/* list rows (payments, errors) */
.rows { display: flex; flex-direction: column; }
.rowx { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; min-width: 0; }
.rowx:first-child { border-top: 0; }
.rowx .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowx .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.rowx .amt.neg { color: var(--err); }

/* spend */
.big-meter { padding: 22px; }
.big-meter .top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.big-meter .top .v { font-size: 52px; font-weight: 700; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.big-meter .top .of { color: var(--text-3); font-size: 16px; font-weight: 500; }
.big-meter .top .tag { margin-left: auto; }
.big-meter .ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-4); margin-top: 6px; }

/* ---------- phone ---------- */
.ph-top { display: none; }
.pbar, .more-sheet { display: none; }
@media (max-width: 1100px) { .cal-wrap { grid-template-columns: minmax(0, 1fr); } .cal-side { position: static; } }
@media (max-width: 899px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  main { padding: 0 16px calc(110px + env(safe-area-inset-bottom, 0px)); }
  .ph-top { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 50; margin: 0 -16px 16px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: rgba(7, 8, 11, .72); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: inset 0 -.5px 0 var(--line); }
  .ph-top .logo { width: 28px; height: 28px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
  .ph-top b { font-size: 16px; }
  /* the sticky glass header already names the section; no second big title */
  .page-h { margin-bottom: 14px; }
  .page-h h1 { display: none; }
  .page-h:not(:has(.tools)) { display: none; }
  .page-h .tools { justify-content: flex-end; }
  .tiles.st4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .tiles.st4 .tile { padding: 12px 6px 10px; gap: 6px; align-items: center; text-align: center; }
  .tiles.st4 .tile .ti { width: 28px; height: 28px; border-radius: 9px; }
  .tiles.st4 .tile .ti svg.i { width: 15px; height: 15px; }
  .tiles.st4 .tile .v { font-size: 26px; }
  .tiles.st4 .tile .l { font-size: 12px; line-height: 1.2; }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 14px; }
  .tile .v { font-size: 30px; }
  .fu-b { padding-left: 16px; }
  .fu-h { padding: 13px 14px; gap: 12px; }
  .cell { min-height: 54px; padding: 4px; border-radius: 10px; }
  .cell .dn { font-size: 12px; width: 22px; height: 22px; line-height: 22px; }
  .ev { font-size: 0; height: 5px; padding: 0; border-radius: 3px; }
  .ev.more { display: none; }
  .month { padding: 12px; }
  .hbar { grid-template-columns: 92px minmax(0, 1fr) 54px; gap: 10px; }
  input[type=search] { min-width: 0; width: 100%; }
  .page-h .tools { width: 100%; }
  .prow-h { padding: 12px 14px; gap: 12px; }
  .hide-ph { display: none !important; }
  .big-meter .top .v { font-size: 44px; }
  .sheet .grid2 { grid-template-columns: 1fr; }
  .sheet-back { align-items: end; padding: 10px; }

  /* floating glass capsule (same recipe as cutflux-glassbar.css) */
  .pbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; z-index: 9500; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: max(10px, calc(env(safe-area-inset-bottom, 0px) - 8px)); max-width: 460px; margin: 0 auto; height: 64px; padding: 5px; border-radius: 999px; isolation: isolate; }
  .pbar::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; background: linear-gradient(180deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, 0) 52%); }
  .pbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 999px; background: transparent; color: rgba(255, 255, 255, .62); font-size: 10.5px; font-weight: 600; cursor: pointer; transition: color .25s ease, background .25s ease, transform .2s var(--spring); -webkit-tap-highlight-color: transparent; }
  .pbar button svg.i { width: 22px; height: 22px; }
  .pbar button.on { color: #fff; background: rgba(255, 255, 255, .13); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .2); }
  .pbar button:active { transform: scale(.92); }
  .pbar .n { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
  .pbar .n.warn { background: var(--warn); color: #1a1205; }
  .pbar .n:empty { display: none; }

  .more-sheet { display: block; position: fixed; inset: 0; z-index: 9550; pointer-events: none; }
  .more-sheet .back { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .25s var(--ease); }
  .more-sheet .panel { position: absolute; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); max-width: 460px; margin: 0 auto; border-radius: 26px; padding: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; isolation: isolate; transform: translateY(20px) scale(.96); opacity: 0; transition: transform .35s var(--spring), opacity .2s var(--ease); }
  .more-sheet.open { pointer-events: auto; }
  .more-sheet.open .back { opacity: 1; }
  .more-sheet.open .panel { transform: none; opacity: 1; }
  .more-sheet .panel button { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 0; border-radius: var(--r); background: rgba(255, 255, 255, .06); color: var(--text); padding: 14px 6px; font-size: 12px; font-weight: 600; cursor: pointer; }
  .more-sheet .panel button.on { background: rgba(255, 255, 255, .16); }
  .more-sheet .panel button svg.i { width: 24px; height: 24px; }
  .more-sheet .more-links { grid-column: 1 / -1; display: flex; justify-content: center; gap: 8px; padding-top: 4px; }
  .more-sheet .more-links a { font-size: 12.5px; color: var(--text-2); text-decoration: none; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .06); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =====================================================================
   v2 (2026-11-17 evening): charts, Muse, Briefings, phone polish
   ===================================================================== */

/* ---------- skeleton (before Firebase answers; holds no data) ---------- */
#gate .skel { width: min(720px, 100%); display: flex; flex-direction: column; gap: 12px; }
#gate .skel i { display: block; border-radius: var(--r); background: var(--card); position: relative; overflow: hidden; }
#gate .skel i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent); animation: shimmer 1.3s infinite; transform: translateX(-100%); }
#gate .skel .s-top { height: 40px; width: 46%; border-radius: 999px; }
#gate .skel .s-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
#gate .skel .s-tiles i { height: 96px; }
#gate .skel .s-row { height: 66px; }
#gate:has(#gateCard:not([hidden])) .skel { display: none; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------- section change: a short slide in the direction you moved ---------- */
section[data-sec]:not([hidden]) { animation: secFwd .34s var(--ease) backwards; }
main[data-dir="back"] section[data-sec]:not([hidden]) { animation-name: secBack; }
@keyframes secFwd { from { opacity: 0; transform: translateX(14px); } }
@keyframes secBack { from { opacity: 0; transform: translateX(-14px); } }
.fu.open .fu-b, .prow.open .prow-b { animation: openIn .28s var(--ease) backwards; }
@keyframes openIn { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- charts ---------- */
.chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.yax { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--text-4); text-align: right; font-variant-numeric: tabular-nums; height: 140px; margin: -6px 0; min-width: 22px; }
.plot { position: relative; height: 140px; background: linear-gradient(var(--line), var(--line)) 0 0 / 100% 1px no-repeat, linear-gradient(var(--line), var(--line)) 0 50% / 100% 1px no-repeat, linear-gradient(var(--line-2), var(--line-2)) 0 100% / 100% 1px no-repeat; }
.chart .cbars { position: absolute; inset: 0; height: auto; gap: 3px; touch-action: pan-y; }
.chart .cbars i { height: var(--h); min-height: 0; background: var(--c, var(--accent)); opacity: .85; border-radius: 5px 5px 1px 1px; transform-origin: bottom; animation: growY .55s var(--ease) backwards; animation-delay: calc(var(--i) * 14ms); cursor: pointer; transition: opacity .15s var(--ease); }
.chart .cbars i.z { height: 3px; background: var(--raised); }
.chart .cbars i:hover, .chart .cbars i.hot { opacity: 1; filter: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); }
.chart .cbars:has(.hot) i:not(.hot) { opacity: .45; }
@keyframes growY { from { transform: scaleY(0); } }
.caxis { padding-left: 32px; }
.csum { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.csum b { color: var(--text); font-variant-numeric: tabular-nums; margin-left: 4px; }
.hbar { cursor: default; border-radius: 8px; }
.hbar.hot span:first-child { color: #fff; }
.hbar .track i { transform-origin: left; animation: growX .7s var(--ease) backwards; animation-delay: calc(var(--i) * 45ms); }
@keyframes growX { from { transform: scaleX(0); } }
.split { height: 16px; }
.split i { cursor: pointer; transform-origin: left; animation: growX .6s var(--ease) backwards; animation-delay: calc(var(--i) * 70ms); transition: filter .15s; }
.split i.hot { filter: brightness(1.25); }
.meter i { transform-origin: left; animation: growX .8s var(--ease) backwards; }
.meter .mark { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255, 255, 255, .35); }
.spend-split { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.ctip { position: fixed; z-index: 9800; pointer-events: none; transform: translate(-50%, -100%) scale(.96); opacity: 0; transition: opacity .12s var(--ease), transform .12s var(--ease); background: var(--glass-solid); box-shadow: inset 0 0 0 .5px var(--glass-rim), var(--glass-shadow); border-radius: 12px; padding: 7px 11px; display: flex; flex-direction: column; gap: 1px; white-space: nowrap; }
.ctip.below { transform: translate(-50%, 0) scale(.96); }
.ctip.on { opacity: 1; transform: translate(-50%, -100%); }
.ctip.below.on { transform: translate(-50%, 0); }
.ctip b { font-size: 15px; font-variant-numeric: tabular-nums; }
.ctip span { font-size: 11.5px; color: var(--text-3); }

/* ---------- Muse ---------- */
.mseg { display: none; margin-bottom: 12px; }
.mseg button svg.i { width: 16px; height: 16px; }
.mstate .tag svg.i { width: 14px; height: 14px; }
.muse-wrap { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.mcard { display: flex; flex-direction: column; padding: 14px 14px 12px; height: calc(100dvh - 150px); min-height: 460px; }
.mfilt { margin-bottom: 8px; }
.mthread { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 6px 4px 10px; overscroll-behavior: contain; }
.mday { display: flex; justify-content: center; margin: 8px 0 2px; }
.mday span { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-4); background: var(--raised); padding: 3px 10px; border-radius: 999px; }
.mm { display: flex; gap: 10px; align-items: flex-end; max-width: 88%; animation: msgIn .3s var(--ease) backwards; }
.mm.mine { align-self: flex-end; flex-direction: row-reverse; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.mav { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #0A0A0D; background: var(--oc, var(--park)); }
.mav svg.i { width: 16px; height: 16px; }
.mb { background: var(--raised); border-radius: 18px 18px 18px 6px; padding: 9px 13px 10px; min-width: 0; box-shadow: inset 2px 0 0 var(--oc, transparent); }
.mm.mine .mb { background: var(--accent); color: #fff; border-radius: 18px 18px 6px 18px; box-shadow: none; }
.mm.mine.failed .mb { background: var(--err-soft); color: var(--text); box-shadow: inset 0 0 0 1px rgba(248, 113, 113, .35); }
.mmeta { display: flex; align-items: baseline; gap: 5px; font-size: 11.5px; color: var(--text-3); margin-bottom: 3px; flex-wrap: wrap; }
.mm.mine .mmeta { color: rgba(255, 255, 255, .75); }
.mmeta b { color: var(--oc, var(--text)); font-weight: 700; }
.mm.mine .mmeta b { color: #fff; }
.mmeta .arrow { opacity: .7; }
.mmeta time { margin-left: 4px; opacity: .8; }
.mtext { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; }
.mfoot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.mst { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; opacity: .9; }
.mst svg.i { width: 13px; height: 13px; }
.mst.bad { color: #FCA5A5; }
.mm.mine .mst.wait { color: rgba(255, 255, 255, .8); }
.mempty { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: auto; padding: 40px 10px; }
.mempty .mav { width: 46px; height: 46px; border-radius: 15px; font-size: 19px; }
.mempty b { color: var(--text); font-size: 15px; }
.mempty span { max-width: 280px; }
.mempty.sm { padding: 18px 10px; flex-direction: row; justify-content: center; }
.mcompose { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.mto { display: flex; align-items: center; gap: 10px; }
.mto .lbl { font-size: 11.5px; color: var(--text-4); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.mto .seg button .tdot { width: 8px; height: 8px; border-radius: 3px; background: var(--oc); display: inline-block; }
.mto .seg button.on { background: var(--oc); color: #0A0A0D; font-weight: 700; }
.mto .seg button.on .tdot { background: rgba(10, 10, 13, .55); }
.mrow { display: flex; gap: 8px; align-items: flex-end; }
.mrow textarea { flex: 1; min-height: 44px; max-height: 160px; resize: none; border-radius: 22px; padding: 11px 16px; line-height: 1.4; overflow-y: auto; }
.msend { width: 44px; height: 44px; flex: 0 0 44px; }
.mhint { display: flex; gap: 6px; align-items: center; }
.mhint svg.i { width: 14px; height: 14px; flex: 0 0 14px; }
.warnc { color: #FBBF24; }
.mside { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 16px; }
.hp { background: var(--raised); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; box-shadow: inset 3px 0 0 var(--oc, var(--park)); animation: msgIn .3s var(--ease) backwards; }
.hp.done { opacity: .75; }
.hp-h { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.hp-h time { margin-left: auto; color: var(--text-4); font-size: 12px; }
.hp-t { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.hp-a { display: flex; gap: 8px; font-size: 13px; color: var(--text-2); background: var(--card); border-radius: 12px; padding: 8px 10px; }
.hp-a svg.i { width: 14px; height: 14px; flex: 0 0 14px; margin-top: 2px; }
.hp-x { display: flex; justify-content: flex-end; margin-top: -4px; }
.hp .fu-quick input { background: var(--card); }
.mhow .flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-bottom: 10px; }
.mhow .flow > span { display: inline-flex; align-items: center; gap: 6px; background: var(--raised); border-radius: 999px; padding: 4px 10px 4px 4px; }
.mhow .flow .mav { width: 22px; height: 22px; flex-basis: 22px; border-radius: 8px; font-size: 10px; }
.mhow .flow .mav svg.i { width: 13px; height: 13px; }
.mhow .flow > i svg.i { transform: rotate(-90deg); width: 14px; height: 14px; color: var(--text-4); }

/* ---------- Briefings ---------- */
.brf-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.brf { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.brf.first { box-shadow: inset 0 0 0 1px var(--line-2); }
.brf-open { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border: 0; background: none; color: var(--text); cursor: pointer; text-align: left; transition: background .2s var(--ease); }
.brf-open:hover { background: rgba(255, 255, 255, .03); }
.brf-ic { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 15px; display: grid; place-items: center; background: var(--accent-soft); color: #93C5FD; }
.brf-ic svg.i { width: 24px; height: 24px; }
.brf-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.brf-t b { font-size: 16px; }
.brf-go { color: var(--text-4); }
.aud { display: flex; align-items: center; gap: 12px; padding: 10px 16px 14px; }
.aud-btn { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 999px; border: 0; background: #fff; color: #0A0A0D; display: grid; place-items: center; cursor: pointer; transition: transform .2s var(--spring); }
.aud-btn svg.i { width: 18px; height: 18px; fill: currentColor; }
.aud-btn:active { transform: scale(.92); }
.aud-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--raised); overflow: hidden; cursor: pointer; }
.aud-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .25s linear; }
.aud-t { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; display: inline-flex; gap: 6px; align-items: center; min-width: 76px; justify-content: flex-end; }
.aud-t svg.i { width: 14px; height: 14px; }
.viewer-back { padding: 24px; }
.viewer { width: min(1000px, 100%); height: min(860px, 100%); border-radius: var(--r); display: flex; flex-direction: column; overflow: hidden; animation: popIn .32s var(--spring); }
.viewer-h { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 18px; }
.viewer-h b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer iframe { flex: 1; height: auto; border-radius: 0; box-shadow: none; background: #07080B; }

@media (max-width: 1100px) { .muse-wrap { grid-template-columns: minmax(0, 1fr); } .mside { position: static; } }

/* ---------- phone polish ---------- */
@media (max-width: 899px) {
  /* bigger touch targets everywhere */
  .chip { height: 40px; padding: 0 15px; font-size: 14px; }
  .seg button { height: 36px; padding: 0 14px; font-size: 13.5px; }
  .btn { height: 44px; padding: 0 18px; font-size: 14px; }
  .btn.small { height: 38px; padding: 0 14px; font-size: 13px; }
  .btn.icon { width: 44px; }
  input[type=search], input[type=text], input[type=date], input[type=number], select { min-height: 44px; font-size: 16px; }
  textarea { font-size: 16px; }
  .fu-quick input { height: 44px; }
  .prow-h { min-height: 68px; }
  .fu-h { min-height: 64px; }
  .disclose { padding: 10px 0; }
  .cell { min-height: 58px; }
  section[data-sec]:not([hidden]) { animation-duration: .3s; }

  /* no cramped or towering tiles: every number tile is a compact 2-up card (icon left, number + label right) */
  .tiles, .tiles.st4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tiles .tile, .tiles.st4 .tile { display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-auto-rows: auto; column-gap: 10px; row-gap: 2px; align-items: center; align-content: center; text-align: left; padding: 12px; min-height: 70px; }
  .tiles .tile .ti { grid-row: 1 / span 2; width: 36px; height: 36px; border-radius: 12px; align-self: center; }
  .tiles .tile .ti svg.i { width: 18px; height: 18px; }
  .tiles .tile .v { font-size: 24px; grid-column: 2; }
  .tiles .tile .l { font-size: 12px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; grid-column: 2; }
  .tiles .tile .d { grid-column: 1 / -1; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* charts */
  .yax, .plot { height: 120px; }
  .hbar { grid-template-columns: minmax(70px, 96px) minmax(0, 1fr) 58px; padding: 3px 0; }

  /* Muse on a phone: one view at a time, compose pinned above the bar */
  .mseg { display: inline-flex; }
  .muse-wrap[data-view="thread"] .mside { display: none; }
  .muse-wrap[data-view="help"] .mcard { display: none; }
  .muse-wrap[data-view="help"] .mhow { display: none; }
  .mstate { width: 100%; justify-content: flex-start !important; }
  .mcard { height: auto; min-height: 0; padding: 0; background: none; box-shadow: none; }
  .mthread { overflow: visible; padding: 4px 0 8px; }
  .mm { max-width: 92%; }
  .mcompose { position: sticky; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 40; margin: 0 -6px; padding: 10px; border: 0; border-radius: 24px; background: rgba(20, 21, 28, .78); -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6); box-shadow: inset 0 0 0 .5px var(--glass-rim), inset 0 1px 0 var(--glass-spec), var(--glass-shadow); }
  .mto .seg { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); }
  .mto .seg button { justify-content: center; }

  /* briefings */
  .brf-list { grid-template-columns: minmax(0, 1fr); }
  .viewer-back { padding: 0; align-items: stretch; }
  .viewer { width: 100%; height: 100%; border-radius: 0; padding-top: env(safe-area-inset-top, 0px); }

  /* More sheet: handle, drag down to close, badges, staggered pop */
  .more-sheet .panel { padding: 10px 14px 16px; transition: transform .38s var(--spring), opacity .2s var(--ease); }
  .more-sheet .panel .grab { grid-column: 1 / -1; width: 40px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .28); margin: 0 auto 6px; }
  .more-sheet .panel button { position: relative; min-height: 84px; justify-content: center; transition: background .2s var(--ease), transform .2s var(--spring); }
  .more-sheet .panel button:active { transform: scale(.95); }
  .more-sheet .panel .n { position: absolute; top: 8px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10.5px; line-height: 18px; }
  .more-sheet .panel .n:empty { display: none; }
  .more-sheet.open .panel button { animation: popIn .34s var(--spring) backwards; }
  .more-sheet.open .panel button:nth-of-type(2) { animation-delay: 20ms; }
  .more-sheet.open .panel button:nth-of-type(3) { animation-delay: 40ms; }
  .more-sheet.open .panel button:nth-of-type(4) { animation-delay: 60ms; }
  .more-sheet.open .panel button:nth-of-type(5) { animation-delay: 80ms; }
  .more-sheet.open .panel button:nth-of-type(n+6) { animation-delay: 100ms; }
  .pbar button { min-height: 54px; }
  .pbar button svg.i { transition: transform .25s var(--spring); }
  .pbar button.on svg.i { transform: translateY(-1px); }
}
@media (max-width: 380px) { .tiles .tile .l { font-size: 11.5px; } .tiles .tile .v { font-size: 22px; } .mto .lbl { display: none; } }
