/* Shalby Care AI · frosted-glass care desk.
   Sage + forest green with a lime signal colour, light thin display type, mesh-gradient tiles,
   a living aurora behind everything, and a glowing voice orb for calls. */
:root {
  --bg: #eceee8;
  --ink: #0e1813; --ink-2: #26332b; --muted: #4a574f; --faint: #6c786f;
  --line: rgb(14 24 19 / .1); --line-2: rgb(14 24 19 / .18);
  --glass: rgb(255 255 255 / .86); --glass-2: rgb(255 255 255 / .95); --glass-edge: rgb(255 255 255 / .9);
  --panel: #fff; --field: rgb(255 255 255 / .72);
  --forest: #0b271c; --forest-2: #12392a; --sage: #697d59; --moss: #4a5643;
  --lime: #d4f35c; --lime-2: #bce53a; --lime-ink: #142008;
  --accent: #1c5a40; --accent-hover: #154832; --accent-ink: #fff; --accent-soft: rgb(105 125 89 / .14);
  --good: #2b7a4b; --good-soft: #e0f0da; --warn: #ad630b; --warn-soft: #fdf0db; --crit: #d0432d; --crit-soft: #fde4de;
  --shadow-sm: 0 1px 2px rgb(14 24 19 / .04), 0 6px 16px -8px rgb(14 24 19 / .12);
  --shadow: inset 0 1px 0 rgb(255 255 255 / .7), 0 2px 6px -2px rgb(14 24 19 / .06), 0 30px 60px -30px rgb(14 24 19 / .22);
  --blur: blur(16px) saturate(1.2);
  --r: 26px; --r-sm: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --display: "Inter Tight", "Noto Sans Devanagari", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --body: "Inter Tight", "Noto Sans Devanagari", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #070d0a;
  --ink: #eef3ef; --ink-2: #d3ddd5; --muted: #a9b8ae; --faint: #849389;
  --line: rgb(255 255 255 / .07); --line-2: rgb(255 255 255 / .14);
  --glass: rgb(17 26 21 / .9); --glass-2: rgb(23 34 28 / .96); --glass-edge: rgb(255 255 255 / .08);
  --panel: #111b16; --field: rgb(255 255 255 / .05);
  --accent: #c9ef5c; --accent-hover: #dbf883; --accent-ink: #10200a; --accent-soft: rgb(201 239 92 / .1);
  --good: #82d89d; --good-soft: rgb(130 216 157 / .12); --warn: #f2b25a; --warn-soft: rgb(242 178 90 / .12); --crit: #ff806c; --crit-soft: rgb(255 128 108 / .13);
  --shadow-sm: 0 6px 16px -8px rgb(0 0 0 / .5);
  --shadow: inset 0 1px 0 rgb(255 255 255 / .05), 0 30px 60px -30px rgb(0 0 0 / .7);
  color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--body); padding: 18px max(16px, 3vw) 56px; -webkit-font-smoothing: antialiased; position: relative; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; font-weight: 500; letter-spacing: -.02em; }
h2 { font-size: clamp(28px, 3vw, 36px); font-weight: 500; letter-spacing: -.03em; line-height: 1.05; }
p { margin: 0; }
.muted { color: var(--muted); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hint { font-size: 14px; color: var(--muted); }
.warn { font-size: 13px; color: var(--warn); background: var(--warn-soft); border-radius: 12px; padding: 9px 12px; }
.eyebrow { font: 600 14px/1.3 var(--body); display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.big { width: 32px; height: 32px; stroke-width: 1.4; color: var(--accent); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 999px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
main:focus { outline: none; }

/* ---------- living background ---------- */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; width: 56vmax; height: 56vmax; border-radius: 50%; filter: blur(110px); opacity: .3; animation: drift 38s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { background: #a9c48e; left: -18vmax; top: -22vmax; }
.aurora i:nth-child(2) { background: #e3f58a; right: -20vmax; top: -10vmax; animation-duration: 46s; animation-delay: -12s; opacity: .25; }
.aurora i:nth-child(3) { background: #ffc8a6; left: 20vw; bottom: -30vmax; animation-duration: 52s; animation-delay: -20s; opacity: .25; }
.aurora i:nth-child(4) { background: #cdbcf2; right: -14vmax; bottom: -26vmax; animation-duration: 42s; animation-delay: -6s; opacity: .25; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6vw, 5vh) scale(1.12); } 100% { transform: translate(-5vw, 8vh) scale(.94); } }
:root[data-theme="dark"] .aurora i { opacity: .16 !important; }
:root[data-theme="dark"] .aurora i:nth-child(2) { background: #9fd23a; }
:root[data-theme="dark"] .aurora i:nth-child(3) { background: #1f6b4c; opacity: .3 !important; }

/* ---------- glass surface ---------- */
.glass, .panel, .qrow, .callbar, .record, .brief, .blist button, .seg, .tabs, .chip, .btn.ghost, .notice, dialog {
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge); box-shadow: var(--shadow);
}

/* ---------- buttons & chips ---------- */
.btn { position: relative; border: 1px solid transparent; border-radius: 999px; min-height: 44px; padding: 0 20px; font-weight: 600; letter-spacing: -.005em;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff) 0%, var(--accent) 100%); color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), 0 8px 20px -10px color-mix(in srgb, var(--accent) 80%, transparent);
  white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s var(--ease), box-shadow .25s var(--ease), transform .15s var(--ease), border-color .2s var(--ease); }
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), 0 12px 26px -10px color-mix(in srgb, var(--accent) 90%, transparent); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.ghost { color: var(--ink); background: var(--glass-2); box-shadow: var(--shadow-sm); }
.btn.ghost:hover:not(:disabled) { border-color: var(--line-2); background: var(--panel); }
.btn.danger { background: linear-gradient(180deg, #e65a43, #c63a25); color: #fff; box-shadow: 0 8px 20px -10px #c63a25; }
.btn.lime { background: var(--lime); color: var(--lime-ink); box-shadow: 0 0 0 0 rgb(212 243 92 / .5), 0 10px 30px -8px rgb(212 243 92 / .55); }
.btn.lime:hover:not(:disabled) { background: #e2fa7c; box-shadow: 0 0 0 6px rgb(212 243 92 / .14), 0 14px 34px -8px rgb(212 243 92 / .7); }
.btn.lime::before { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l1.8 6.2L20 10l-6.2 1.8L12 18l-1.8-6.2L4 10l6.2-1.8z M19 15l.9 2.1L22 18l-2.1.9L19 21l-.9-2.1L16 18l2.1-.9z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l1.8 6.2L20 10l-6.2 1.8L12 18l-1.8-6.2L4 10l6.2-1.8z M19 15l.9 2.1L22 18l-2.1.9L19 21l-.9-2.1L16 18l2.1-.9z'/%3E%3C/svg%3E") center / contain no-repeat; }
.btn.lime:disabled { background: rgb(255 255 255 / .1); color: rgb(255 255 255 / .55); border-color: rgb(255 255 255 / .14); box-shadow: none; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13.5px; gap: 6px; }
.btn.small .ico { width: 16px; height: 16px; }
.btn.icon { width: 44px; padding: 0; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; color: var(--lime); }
.theme-toggle .ico { transition: transform .4s var(--ease); }
.theme-toggle:hover .ico { transform: rotate(-20deg); }
.btn:disabled { background: var(--field); color: var(--faint); border-color: var(--line); cursor: not-allowed; box-shadow: none; transform: none; }
.chip { font-size: 13.5px; font-weight: 600; padding: 0 14px; min-height: 36px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; color: var(--muted); box-shadow: var(--shadow-sm); }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.chip.on { color: var(--ink); }
.chip.on::before { background: var(--lime-2); box-shadow: 0 0 0 3px rgb(188 229 58 / .3), 0 0 12px var(--lime-2); animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 6px rgb(188 229 58 / .08), 0 0 18px var(--lime-2); } }

/* ---------- header ---------- */
.top { max-width: 1440px; margin: 0 auto 18px; display: grid; grid-template-columns: auto 1fr auto; gap: 14px 20px; align-items: center; }
.brand { display: flex; gap: 12px; align-items: center; min-width: 0; }
.logo { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; position: relative;
  background: radial-gradient(circle at 32% 28%, #f4ffc4 0%, #c9ef5c 22%, #4f9a5c 58%, #0d3a27 100%);
  box-shadow: inset -4px -6px 12px rgb(0 0 0 / .25), inset 3px 4px 8px rgb(255 255 255 / .5), 0 10px 24px -8px rgb(60 120 60 / .7); }
.logo svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 2px rgb(0 0 0 / .3)); }
.logo svg path { stroke-dasharray: 40; animation: trace 3.2s var(--ease) infinite; }
@keyframes trace { 0% { stroke-dashoffset: 40; } 45%, 70% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -40; } }
.brand h1 { font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.brand h1 .ai { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 22px; color: var(--sage); }
.brand p { font-size: 12.5px; color: var(--muted); }
.top-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.needs-link { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); font-weight: 600; font-size: 12.5px; text-decoration: none; }
.needs-link.urgent { background: var(--crit-soft); color: var(--crit); border-color: color-mix(in srgb, var(--crit) 40%, transparent); }
.needs-link .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.needs-link.urgent .dot { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }

.tabs { justify-self: center; display: flex; gap: 2px; padding: 5px; border-radius: 999px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; background: none; border: 0; min-height: 40px; padding: 0 16px; font-weight: 500; font-size: 14px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; transition: color .2s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease); }
.tabs button:hover { color: var(--ink); background: rgb(255 255 255 / .5); }
.tabs button[aria-selected="true"] { color: #fff; background: linear-gradient(180deg, #1b3a2c, var(--forest)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .12), 0 8px 18px -8px rgb(11 39 28 / .8); }
.tabs button[aria-selected="true"] .ico { color: var(--lime); }
.tabs button:focus-visible { outline-offset: -2px; }
.tab-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--crit); color: #fff !important; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; box-shadow: 0 0 0 2px var(--glass-2); }
:root[data-theme="dark"] .tabs button:hover { background: rgb(255 255 255 / .06); }
:root[data-theme="dark"] .tabs button[aria-selected="true"] { background: var(--lime); color: var(--lime-ink); box-shadow: 0 8px 22px -8px rgb(201 239 92 / .5); }
:root[data-theme="dark"] .tabs button[aria-selected="true"] .ico { color: var(--lime-ink); }
:root[data-theme="dark"] .brand h1 .ai { color: var(--lime); }
@media (max-width: 1220px) {
  .top { grid-template-columns: 1fr auto; }
  .tabs { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
  .tabs button { flex: 1 0 auto; justify-content: center; }
}

.notice { max-width: 1440px; margin: 0 auto 16px; border-radius: 20px; padding: 10px 12px 10px 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; font-size: 14px; }
.notice .ico { color: var(--warn); }
.notice > span { flex: 1 1 40ch; }

/* ---------- layout ---------- */
.layout { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1060px) { .layout { grid-template-columns: minmax(0, 1fr); } }
main { min-width: 0; }
.view { display: flex; flex-direction: column; gap: 16px; animation: view-in .6s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(12px); filter: blur(4px); } }
.view-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; padding: 6px 4px 2px; }
.view-head .kicker { display: block; margin-bottom: 10px; }
.view-head p { max-width: 66ch; margin-top: 10px; }
.kicker { font: 500 14px/1.2 var(--body); color: var(--muted); }
.kicker b { color: var(--ink); font-weight: 500; }
.side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
@media (max-width: 1060px) { .side { position: static; } }
.panel { border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel h3 { font-size: 17px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; border-radius: 32px; padding: clamp(22px, 3vw, 36px); color: #eef6ea;
  background:
    radial-gradient(60% 80% at 85% 10%, rgb(201 239 92 / .28), transparent 60%),
    radial-gradient(50% 70% at 10% 110%, rgb(64 160 110 / .45), transparent 60%),
    radial-gradient(40% 50% at 60% 60%, rgb(255 190 150 / .12), transparent 70%),
    linear-gradient(160deg, #123a2a 0%, #0a2419 55%, #06150f 100%);
  box-shadow: 0 40px 80px -40px rgb(6 21 15 / .8), inset 0 1px 0 rgb(255 255 255 / .1);
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(220px, .75fr); gap: 20px 28px; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; mix-blend-mode: soft-light;
  background-image: linear-gradient(rgb(255 255 255 / .05) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .05) 1px, transparent 1px);
  display: none; background-size: 44px 44px; -webkit-mask: radial-gradient(70% 90% at 70% 30%, #000, transparent); mask: radial-gradient(70% 90% at 70% 30%, #000, transparent); }
.hero-copy { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; min-width: 0; position: relative; z-index: 1; }
.date-pill { display: inline-flex; align-items: center; gap: 8px; font: 500 13.5px/1 var(--body); padding: 8px 12px; border-radius: 999px; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .12); color: rgb(238 246 234 / .85); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); animation: pulse 1.8s ease-in-out infinite; }
.hero h2 { font-size: clamp(34px, 4.4vw, 54px); font-weight: 400; letter-spacing: -.045em; line-height: .98; color: #fff; }
.hero h2 em { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -.02em; color: var(--lime);
  background: linear-gradient(90deg, #e9ff9a, #c9ef5c 40%, #8fe0a8); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; padding-right: .06em; }
.hero p { color: rgb(238 246 234 / .92); max-width: 46ch; font-size: 17px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 4px; }
.hero-cta .hint { color: rgb(238 246 234 / .88); }
.hero-art { position: relative; display: grid; place-items: center; min-height: 190px; opacity: .8; }
.hero-art svg { width: min(100%, 250px); height: auto; overflow: visible; }
.globe ellipse, .globe circle.outline { fill: none; stroke: rgb(220 245 200 / .38); stroke-width: .8; }
.globe .lat { stroke: rgb(220 245 200 / .22); }
.globe .mer { transform-box: fill-box; transform-origin: center; animation: spin-mer 14s linear infinite; }
.globe .mer:nth-child(2) { animation-delay: -2.33s; } .globe .mer:nth-child(3) { animation-delay: -4.66s; }
.globe .mer:nth-child(4) { animation-delay: -7s; } .globe .mer:nth-child(5) { animation-delay: -9.33s; } .globe .mer:nth-child(6) { animation-delay: -11.66s; }
@keyframes spin-mer { 0% { transform: scaleX(1); } 25% { transform: scaleX(0); } 50% { transform: scaleX(-1); } 75% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
.globe .orbit { fill: none; stroke: rgb(212 243 92 / .35); stroke-width: 1; stroke-dasharray: 2 6; }
.globe .core { fill: url(#coreGlow); }
.globe .sat { fill: var(--lime); filter: drop-shadow(0 0 6px var(--lime)); }
.globe .ping { fill: none; stroke: var(--lime); stroke-width: 1.2; transform-box: fill-box; transform-origin: center; animation: ping 2.6s ease-out infinite; }
@keyframes ping { from { transform: scale(.4); opacity: .9; } to { transform: scale(3); opacity: 0; } }
.globe .ecg { fill: none; stroke: var(--lime); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 420; animation: ecg 3.6s linear infinite; filter: drop-shadow(0 0 6px rgb(212 243 92 / .8)); }
@keyframes ecg { from { stroke-dashoffset: 420; } to { stroke-dashoffset: -420; } }
.art-tag { position: absolute; font-size: 12px; line-height: 1.25; color: rgb(238 246 234 / .8); display: flex; flex-direction: column; gap: 2px; }
.art-tag b { font-weight: 300; font-size: 26px; letter-spacing: -.03em; color: #fff; }
.art-tag small { font: 500 10.5px/1 var(--mono); padding: 4px 8px; border-radius: 999px; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .1); align-self: flex-start; margin-top: 4px; }
.art-tag.a { left: 0; top: 8%; } .art-tag.b { right: 0; bottom: 6%; text-align: right; } .art-tag.b small { align-self: flex-end; }
.art-tag::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgb(212 243 92 / .2), 0 0 14px var(--lime); }
.art-tag.a::after { right: -22px; top: 12px; } .art-tag.b::after { left: -22px; top: 12px; }

.kpis { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; position: relative; z-index: 1; }
.kpi { position: relative; overflow: hidden; border-radius: 22px; padding: 16px 16px 14px; min-height: 116px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; color: #0e1813;
  border: 1px solid rgb(255 255 255 / .35); box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), 0 20px 40px -24px rgb(0 0 0 / .6);
  animation: rise .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 120ms); transition: transform .3s var(--ease); }
.kpi:hover { transform: translateY(-3px); }
.kpi::after { display: none; content: ""; position: absolute; right: -30px; bottom: -40px; width: 140px; height: 140px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .55); box-shadow: 0 0 0 16px rgb(255 255 255 / .1), 0 0 0 34px rgb(255 255 255 / .06); pointer-events: none; }
.kpi-top { font-size: 15px; font-weight: 600; }
.kpi-top i { width: 28px; height: 28px; border-radius: 50%; background: rgb(255 255 255 / .55); display: grid; place-items: center; flex: none; }
.kpi-top i svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kpi b { font: 400 42px/.95 var(--display); letter-spacing: -.05em; }
.kpi small { display: block; font-size: 14px; opacity: .85; margin-top: 6px; }
.kpi.k1 { background: radial-gradient(90% 120% at 0% 0%, #ffd6c4 0%, transparent 60%), radial-gradient(90% 120% at 100% 100%, #ff8a6e 0%, transparent 70%), #ffb39a; }
.kpi.k2 { background: radial-gradient(90% 120% at 100% 0%, #fff3b0 0%, transparent 60%), radial-gradient(90% 120% at 0% 100%, #f5b25a 0%, transparent 70%), #ffd88a; }
.kpi.k3 { background: radial-gradient(90% 120% at 0% 0%, #f4ffc4 0%, transparent 55%), radial-gradient(90% 120% at 100% 100%, #7fc77a 0%, transparent 70%), #c9ef5c; }
.kpi.k4 { background: radial-gradient(90% 120% at 100% 0%, #e6dcff 0%, transparent 60%), radial-gradient(90% 120% at 0% 100%, #9cc7e8 0%, transparent 70%), #bfd6f2; }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr); } .hero-art { min-height: 200px; order: -1; display: none; } .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.list-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; padding: 12px 4px 0; }
.list-head h3 { font-size: 22px; font-weight: 600; letter-spacing: -.03em; }

/* ---------- queue ---------- */
.queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.qrow { position: relative; border-radius: var(--r); padding: 16px 18px 16px 16px; display: grid; grid-template-columns: 34px 48px minmax(0, 1fr) auto; gap: 4px 16px; align-items: start;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease); animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
.qrow:hover { transform: none; background: var(--glass-2); box-shadow: var(--shadow), 0 24px 40px -28px rgb(14 24 19 / .35); }
.qrow::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 3px; border-radius: 0 3px 3px 0; background: transparent; }
.qrow.High::before { background: var(--crit); box-shadow: 0 0 14px var(--crit); }
.qrow.Medium::before { background: var(--warn); }
.rank { font: 500 18px/1 var(--display); color: var(--faint); align-self: start; padding-top: 15px; text-align: right; }
.avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 600; font-size: 15px; letter-spacing: -.02em; color: #fff;
  background: radial-gradient(circle at 30% 25%, hsl(var(--h) 90% 88%), hsl(var(--h) 55% 58%) 45%, hsl(calc(var(--h) + 30) 50% 30%) 100%);
  box-shadow: inset -3px -5px 10px rgb(0 0 0 / .2), inset 2px 3px 6px rgb(255 255 255 / .45), 0 8px 16px -8px hsl(var(--h) 50% 30%);
  text-shadow: 0 1px 2px rgb(0 0 0 / .25); }
.avatar.sm { width: 40px; height: 40px; font-size: 13px; }
.qmain { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.qname { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qname b { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 14.5px; color: var(--muted); }
.meta span + span::before { content: "·"; margin-right: 10px; color: var(--faint); }
.reasons { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.reasons li { font-size: 14.5px; color: var(--ink-2); position: relative; padding-left: 16px; }
.reasons li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.pts { font: 500 12.5px/1 var(--mono); color: var(--muted); margin-left: 4px; }
.ai-why { font-size: 13px; background: linear-gradient(90deg, rgb(212 243 92 / .35), rgb(212 243 92 / .08)); border: 1px solid rgb(188 229 58 / .4); border-radius: 14px; padding: 7px 12px; }
.ai-why .moved { font-weight: 700; color: var(--accent); }
.qside { display: flex; gap: 18px; align-items: center; }
.gauge-wrap { position: relative; width: 58px; height: 58px; display: grid; place-items: center; flex: none; }
.gauge { position: absolute; inset: 0; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 4.5; stroke-linecap: round; }
.gauge .track { stroke: var(--line); }
.gauge .val { stroke: var(--good); animation: gauge-in 1.2s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms + 200ms); }
.gauge.High .val { stroke: var(--crit); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--crit) 60%, transparent)); }
.gauge.Medium .val { stroke: var(--warn); }
@keyframes gauge-in { from { stroke-dasharray: 0 200; } }
.gauge-wrap b { font: 500 16px/1 var(--display); letter-spacing: -.03em; }
.gauge-wrap small { display: none; position: absolute; bottom: -14px; font: 500 9.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.trend { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; } .trend small { font-size: 13px; color: var(--muted); }
.call-btn { padding-left: 6px !important; }
.call-btn .ico { width: 26px; height: 26px; padding: 6px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); stroke-width: 2.2; }
:root[data-theme="dark"] .call-btn .ico { background: var(--lime-ink); color: var(--lime); }
@media (max-width: 860px) {
  .qrow { grid-template-columns: 40px minmax(0, 1fr); }
  .qrow .rank { display: none; }
  .qside { grid-column: 1 / -1; justify-content: space-between; flex-wrap: wrap; border-top: 1px dashed var(--line-2); padding-top: 12px; margin-top: 8px; }
  .qrow .avatar { width: 40px; height: 40px; font-size: 13px; align-self: start; }
}
@media (max-width: 520px) { .qside .btn { width: 100%; } }

.pill { font-size: 13px; padding: 3px 10px; border-radius: 999px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; letter-spacing: .01em; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.High, .pill.missed, .pill.overdue, .pill.notbooked { background: var(--crit-soft); color: var(--crit); }
.pill.Medium, .pill.due { background: var(--warn-soft); color: var(--warn); }
.pill.Low, .pill.taken, .pill.booked { background: var(--good-soft); color: var(--good); }
.pill.quiet { border: 1px solid var(--line-2); color: var(--muted); }

/* ---------- call bar ---------- */
.callbar { border-radius: var(--r); padding: 14px; display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) minmax(130px, .8fr) auto; gap: 12px; align-items: end; }
@media (max-width: 760px) { .callbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .callbtns { grid-column: 1 / -1; } }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding-left: 2px; }
select, input:not([type=checkbox]) { font: inherit; font-size: 14.5px; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 14px; min-height: 44px; padding: 0 14px; min-width: 0; transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease); }
select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23697d59' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
select:hover, input:not([type=checkbox]):hover { border-color: var(--line-2); }
select:focus, input:not([type=checkbox]):focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 4px rgb(105 125 89 / .18); background-color: var(--panel); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--lime-2); }
.callbtns { display: flex; gap: 8px; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 13px; }
.callbar.desk { grid-template-columns: minmax(180px, 280px) auto; justify-content: start; }

/* ---------- voice console: dark stage with a living orb ---------- */
.voice-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .voice-grid { grid-template-columns: minmax(0, 1fr); } }
.phone { position: relative; overflow: hidden; isolation: isolate; border-radius: 30px; display: flex; flex-direction: column; min-width: 0; color: #e8f2e6;
  background:
    radial-gradient(70% 50% at 50% 0%, rgb(201 239 92 / .16), transparent 70%),
    radial-gradient(60% 60% at 100% 100%, rgb(255 170 140 / .1), transparent 70%),
    radial-gradient(60% 60% at 0% 100%, rgb(64 160 110 / .22), transparent 70%),
    linear-gradient(180deg, #0f3324, #081c14);
  box-shadow: 0 40px 80px -40px rgb(6 21 15 / .85), inset 0 1px 0 rgb(255 255 255 / .1); }
.phone::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image: radial-gradient(rgb(255 255 255 / .12) 1px, transparent 1px); background-size: 18px 18px;
  -webkit-mask: radial-gradient(60% 40% at 50% 15%, #000, transparent); mask: radial-gradient(60% 40% at 50% 15%, #000, transparent); }
.mic-row { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 28px 20px 18px; text-align: center; border-bottom: 1px solid rgb(255 255 255 / .08); }
.stage { display: flex; align-items: center; justify-content: center; gap: 22px; width: 100%; }
.wave { display: flex; align-items: center; gap: 4px; height: 64px; flex: 0 1 180px; justify-content: flex-end; }
.wave.r { justify-content: flex-start; }
.wave i { width: 3px; height: 100%; border-radius: 3px; background: linear-gradient(180deg, transparent, rgb(212 243 92 / .9), transparent); transform: scaleY(.06); opacity: .5; transition: transform .4s var(--ease), opacity .4s; }
.wave i:nth-child(3n) { animation-delay: -.3s !important; } .wave i:nth-child(3n+1) { animation-delay: -.7s !important; } .wave i:nth-child(4n) { animation-delay: -.5s !important; } .wave i:nth-child(5n) { animation-delay: -.15s !important; }
.mic-row:has(.mic.listening) .wave i { opacity: 1; animation: eq 1s ease-in-out infinite; }
.mic-row:has(.mic.speaking) .wave i { opacity: 1; animation: eq .75s ease-in-out infinite; background: linear-gradient(180deg, transparent, rgb(255 196 160 / .95), transparent); }
.mic-row:has(.mic.thinking) .wave i { opacity: .8; animation: eq 1.6s ease-in-out infinite; background: linear-gradient(180deg, transparent, rgb(242 178 90 / .9), transparent); }
@keyframes eq { 0%, 100% { transform: scaleY(.1); } 30% { transform: scaleY(.85); } 60% { transform: scaleY(.35); } 80% { transform: scaleY(.6); } }

.mic { position: relative; width: 112px; height: 112px; border-radius: 50%; border: 0; color: #fff; display: grid; place-items: center; flex: none; isolation: isolate;
  background: radial-gradient(circle at 34% 28%, #f6ffd0 0%, #c9ef5c 20%, #4f9a5c 55%, #0d3a27 100%);
  box-shadow: inset -8px -12px 24px rgb(0 0 0 / .3), inset 6px 8px 16px rgb(255 255 255 / .45), 0 0 0 10px rgb(212 243 92 / .06), 0 20px 50px -10px rgb(201 239 92 / .5);
  transition: transform .3s var(--ease), box-shadow .4s var(--ease), filter .4s; }
.mic::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; z-index: -1; opacity: 0; transition: opacity .4s;
  background: conic-gradient(from 0deg, #ffb59a, #cdbcf2, #9cd8ff, #c9ef5c, #ffb59a); filter: blur(10px); }
.mic:hover:not(:disabled) { transform: scale(1.04); }
.mic:active:not(:disabled) { transform: scale(.96); }
.mic:disabled { cursor: not-allowed; filter: saturate(.55) brightness(.8); box-shadow: inset -8px -12px 24px rgb(0 0 0 / .3), inset 6px 8px 16px rgb(255 255 255 / .2), 0 0 0 10px rgb(255 255 255 / .03); }
.mic svg { width: 34px; height: 34px; fill: currentColor; position: relative; filter: drop-shadow(0 2px 4px rgb(0 0 0 / .35)); }
.mic .ring { position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--lime); opacity: 0; pointer-events: none; }
.mic.listening .ring { animation: ring 1.6s ease-out infinite; }
.mic.listening .ring.r2 { animation-delay: .8s; }
.mic.listening { animation: orb-breathe 1.6s ease-in-out infinite; }
.mic.speaking { background: radial-gradient(circle at 34% 28%, #fff4ec 0%, #ffc3a6 22%, #e48ab0 55%, #6b4bb8 100%); box-shadow: inset -8px -12px 24px rgb(0 0 0 / .25), inset 6px 8px 16px rgb(255 255 255 / .5), 0 20px 60px -6px rgb(255 160 170 / .55); animation: orb-breathe 1.1s ease-in-out infinite; }
.mic.speaking::before { opacity: .9; animation: spin 4s linear infinite; }
.mic.thinking { background: radial-gradient(circle at 34% 28%, #fff8e0 0%, #ffd88a 25%, #e0902e 60%, #6b3a0b 100%); }
.mic.thinking::before { opacity: .7; animation: spin 1.4s linear infinite; }
.mic.muted { filter: grayscale(1) brightness(.7); }
@keyframes ring { from { opacity: .8; transform: scale(.92); } to { opacity: 0; transform: scale(1.45); } }
@keyframes orb-breathe { 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .mic.listening .ring { animation: none; opacity: .6; } }
.mic-text { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 60ch; }
.state { font-weight: 500; font-size: 21px; letter-spacing: -.03em; color: #fff; }
.interim { color: rgb(232 242 230 / .88); font-size: 16px; min-height: 1.4em; }
.latency { font-size: 12.5px; color: rgb(232 242 230 / .7); min-height: 1.2em; }
.phone label.check { color: rgb(232 242 230 / .92); margin-top: 4px; }
.transcript { padding: 20px; display: flex; flex-direction: column; gap: 10px; min-height: 300px; max-height: 460px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .15) transparent; }
.transcript .empty { margin: auto; text-align: center; color: rgb(232 242 230 / .9); max-width: 46ch; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.transcript .empty b { color: var(--lime); font-weight: 600; }
.transcript .empty .ico.big { width: 44px; height: 44px; padding: 12px; border-radius: 50%; background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .1); box-sizing: content-box; color: var(--lime); }
.msg { max-width: 80%; padding: 11px 15px; border-radius: 20px; white-space: pre-wrap; overflow-wrap: anywhere; animation: msg-in .35s var(--ease); font-size: 16px; line-height: 1.55; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.msg small { display: block; font: 600 12.5px/1.6 var(--body); opacity: .75; }
.msg.agent { background: rgb(255 255 255 / .14); border: 1px solid rgb(255 255 255 / .16); color: #fff; align-self: flex-start; border-bottom-left-radius: 6px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.msg.patient { background: linear-gradient(160deg, #e2fa7c, #c2e94a); color: var(--lime-ink); align-self: flex-end; border-bottom-right-radius: 6px; box-shadow: 0 10px 24px -14px rgb(201 239 92 / .8); }
.sys { align-self: center; font-size: 13.5px; color: rgb(232 242 230 / .75); text-align: center; }
.sys.alert { color: #ffd2c8; background: rgb(255 110 90 / .16); border: 1px solid rgb(255 128 108 / .35); border-radius: 999px; padding: 6px 14px; font-weight: 500; font-family: var(--body); font-size: 12.5px; }
.typebar { display: flex; gap: 8px; padding: 14px 16px 8px; border-top: 1px solid rgb(255 255 255 / .08); }
.typebar input { flex: 1; background: rgb(255 255 255 / .06) !important; border-color: rgb(255 255 255 / .12) !important; color: #fff !important; border-radius: 999px !important; }
.typebar input::placeholder { color: rgb(232 242 230 / .45); }
.typebar input:disabled { opacity: .6; }
.typebar .btn.ghost { background: rgb(255 255 255 / .1); color: #fff; border-color: rgb(255 255 255 / .14); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.typebar .btn.ghost:disabled { background: rgb(255 255 255 / .04); color: rgb(255 255 255 / .35); }
.phone > .hint { padding: 0 18px 14px; color: rgb(232 242 230 / .82); }
.phone > .hint:empty { display: none; }

.record { border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.rec-head { display: flex; gap: 12px; align-items: center; }
.rec-head > div { min-width: 0; flex: 1; }
.rec-head b { font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.rrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rrow:first-of-type { border-top: 0; }
.rrow > .pill { align-self: start; }
.rrow .sub { color: var(--muted); font-size: 13px; grid-column: 1 / -1; }
.crit-tag { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--crit); background: var(--crit-soft); border-radius: 6px; padding: 1px 6px; vertical-align: 1px; margin-left: 4px; }

.wellness { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.wk { border-radius: 14px; padding: 9px 11px; display: flex; flex-direction: column; min-width: 0; background: var(--field); border: 1px solid var(--line); }
.wk:nth-child(1) { background: linear-gradient(140deg, rgb(255 179 154 / .45), transparent 85%), var(--field); }
.wk:nth-child(3) { background: linear-gradient(140deg, rgb(255 216 138 / .45), transparent 85%), var(--field); }
.wk:nth-child(6) { background: linear-gradient(140deg, rgb(205 188 242 / .5), transparent 85%), var(--field); }
.wk:nth-child(7) { background: linear-gradient(140deg, rgb(201 239 92 / .45), transparent 85%), var(--field); grid-column: 1 / -1; }
.wk span { font-size: 13px; color: var(--muted); font-weight: 600; }
.wk b { font-size: 16px; font-weight: 500; letter-spacing: -.02em; overflow-wrap: anywhere; text-transform: capitalize; }
.alloc { position: relative; overflow: hidden; border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; color: #0e1813;
  background: radial-gradient(90% 120% at 100% 0%, #f4ffc4, transparent 60%), radial-gradient(90% 120% at 0% 100%, #9fd49a, transparent 70%), #d3f07a; animation: rise .5s var(--ease); }
.alloc b { font-size: 18px; font-weight: 500; letter-spacing: -.02em; }
.alloc .hint { color: rgb(14 24 19 / .7); }

/* ---------- side rail ---------- */
.needs h3 { justify-content: flex-start; }
.item { border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); background: linear-gradient(140deg, var(--warn-soft), transparent 85%), var(--field); border-radius: 18px; padding: 14px; animation: rise .4s var(--ease); display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.item b { font-size: 14px; color: var(--warn); }
.item.urgent { border-color: color-mix(in srgb, var(--crit) 45%, transparent); background: linear-gradient(140deg, var(--crit-soft), transparent 85%), var(--field); box-shadow: 0 0 0 0 rgb(208 67 45 / .4); animation: rise .4s var(--ease), alarm 2s ease-out infinite; }
.item.urgent b { color: var(--crit); }
@keyframes alarm { 0% { box-shadow: 0 0 0 0 rgb(208 67 45 / .35); } 70%, 100% { box-shadow: 0 0 0 10px rgb(208 67 45 / 0); } }
.item .acts { display: flex; gap: 6px; }
.log { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; scrollbar-width: thin; margin: 0 -4px; padding: 0 4px; }
.entry { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 0 10px; padding: 9px 0; font-size: 14px; animation: msg-in .3s var(--ease); }
.entry::before { content: ""; position: absolute; left: 54px; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.entry > span { padding-left: 14px; }
.entry time { color: var(--muted); font-size: 12.5px; grid-row: 1 / 3; padding-top: 2px; }
.tier { font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.entry .tier { position: relative; }
.entry .tier i { position: absolute; left: -5px; top: 3px; box-shadow: 0 0 0 3px var(--glass-2); }
.tier i { width: 8px; height: 8px; border-radius: 2px; background: currentColor; display: inline-block; }
.tier.t2 i { border-radius: 50%; } .tier.t3 i { transform: rotate(45deg); } .tier.esc i { width: 0; height: 0; background: none; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 9px solid currentColor; border-radius: 0; box-shadow: none; }
.count { font: 700 11px/20px var(--body); min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--warn); color: #fff; text-align: center; letter-spacing: 0; }
.count.urgent { background: var(--crit); }
.needs:focus-visible { outline-offset: 3px; }
.empty-note { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--muted); padding: 4px 0; }
.empty-note .ico { color: var(--good); width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: var(--good-soft); }
.t1 { color: var(--good); } .t2 { color: var(--accent); } .t3 { color: var(--warn); } .esc { color: var(--crit); } .sysl { color: var(--muted); }
:root:not([data-theme="dark"]) .t2 { color: #3b6fd4; }
.legend { display: grid; grid-template-columns: 1fr; gap: 6px; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.legend span { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
#resetBtn { align-self: center; }

/* ---------- dialog ---------- */
dialog { border-radius: 28px; max-height: calc(100dvh - 32px); padding: 0; background: var(--glass-2); color: var(--ink); width: min(540px, calc(100vw - 32px)); }
dialog[open] { animation: pop .4s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
dialog::backdrop { background: rgb(6 21 15 / .4); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.settings { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.settings h2 { font-size: 30px; }
.row-end { display: flex; gap: 8px; justify-content: flex-end; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgb(127 127 127 / .3); border-top-color: currentColor; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.settings-group { display: flex; flex-direction: column; gap: 10px; border-left: 2px solid var(--lime-2); padding-left: 14px; }

/* ---------- shared bits ---------- */
.tag { font: 600 13px/1 var(--body); background: var(--lime); color: var(--lime-ink); border-radius: 999px; padding: 6px 10px; vertical-align: middle; margin-left: 10px; position: relative; top: -6px; }
.tag.in { background: #cdbcf2; color: #2a1a52; }
.row-between { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.mic-text label { align-self: center; }
.tablewrap { overflow-x: auto; margin: 0 -6px; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 13px/1.2 var(--body); color: var(--muted); white-space: nowrap; }
.recv select { max-width: 240px; font-size: 13px; min-height: 36px; padding: 0 30px 0 10px; border-radius: 12px; }
tbody tr { transition: background .2s; }
tbody tr:hover { background: rgb(255 255 255 / .45); }
:root[data-theme="dark"] tbody tr:hover { background: rgb(255 255 255 / .03); }
tbody tr:last-child td { border-bottom: 0; }

/* pain sparkline */
.spark { display: block; overflow: visible; }
.spark path { fill: none; stroke: var(--good); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 400; animation: draw 1.4s var(--ease) both; }
.spark circle { fill: var(--good); }
.spark.up path { stroke: var(--crit); } .spark.up circle { fill: var(--crit); filter: drop-shadow(0 0 4px var(--crit)); }
.spark .mid { stroke: var(--line-2); stroke-dasharray: 2 4; }
.spark text { fill: var(--ink); font: 600 12px var(--mono); }
@keyframes draw { from { stroke-dashoffset: 400; } to { stroke-dashoffset: 0; } }

/* segmented toggle */
.seg { display: inline-flex; padding: 4px; border-radius: 999px; gap: 2px; }
.seg button { border: 0; background: none; min-height: 38px; padding: 0 18px; border-radius: 999px; font-weight: 500; color: var(--muted); transition: background .25s var(--ease), color .2s var(--ease); }
.seg button:hover:not([aria-pressed="true"]) { color: var(--ink); background: rgb(255 255 255 / .5); }
.seg button[aria-pressed="true"] { background: linear-gradient(180deg, #1b3a2c, var(--forest)); color: #fff; box-shadow: 0 8px 18px -8px rgb(11 39 28 / .7); }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { background: var(--lime); color: var(--lime-ink); }
:root[data-theme="dark"] .seg button:hover:not([aria-pressed="true"]) { background: rgb(255 255 255 / .06); }

/* briefs */
.brief-grid { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .brief-grid { grid-template-columns: minmax(0, 1fr); } }
.blist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.blist li { animation: rise .5s var(--ease) both; }
.blist li:nth-child(2) { animation-delay: 40ms; } .blist li:nth-child(3) { animation-delay: 80ms; } .blist li:nth-child(4) { animation-delay: 120ms; } .blist li:nth-child(5) { animation-delay: 160ms; } .blist li:nth-child(n+6) { animation-delay: 200ms; }
.blist button { width: 100%; text-align: left; border-radius: 18px; padding: 12px 14px; min-height: 44px; transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s; display: flex; flex-direction: column; gap: 3px; color: var(--ink); box-shadow: var(--shadow-sm); }
.blist button:hover { transform: translateX(3px); background: var(--glass-2); }
.blist button[aria-current="true"] { background: linear-gradient(160deg, #164030, var(--forest)); color: #fff; border-color: transparent; box-shadow: 0 16px 30px -16px rgb(11 39 28 / .8); }
.blist button[aria-current="true"] .hint { color: rgb(232 242 230 / .7); }
.bl-top { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.bl-top b { font-weight: 600; letter-spacing: -.01em; }
.brief { border-radius: 30px; padding: 24px; display: flex; flex-direction: column; gap: 18px; min-width: 0; animation: view-in .5s var(--ease); }
.brief-head { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; }
.brief-head h3 { font-size: 26px; font-weight: 500; letter-spacing: -.04em; line-height: 1.1; }
.brief-head h3 .muted { font-size: 15px; letter-spacing: -.01em; font-weight: 400; display: block; margin-top: 4px; }
.facts-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 680px) { .facts-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.facts-row > div { position: relative; overflow: hidden; border-radius: 20px; padding: 14px; min-height: 116px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; align-items: flex-start; min-width: 0; color: #0e1813;
  border: 1px solid rgb(255 255 255 / .5); box-shadow: inset 0 1px 0 rgb(255 255 255 / .5); }
.facts-row > div .hint { color: rgb(14 24 19 / .85); font-weight: 600; font-size: 14px; }
.facts-row > div::after { display: none; content: ""; position: absolute; right: -40px; bottom: -50px; width: 120px; height: 120px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .6); box-shadow: 0 0 0 14px rgb(255 255 255 / .1); pointer-events: none; }
.facts-row > div:nth-child(1) { background: radial-gradient(90% 120% at 0% 0%, #f4ffc4, transparent 55%), radial-gradient(90% 120% at 100% 100%, #7fc77a, transparent 70%), #c9ef5c; }
.facts-row > div:nth-child(2) { background: radial-gradient(90% 120% at 100% 0%, #e6dcff, transparent 60%), radial-gradient(90% 120% at 0% 100%, #ffc3a6, transparent 70%), #f1d1e4; }
.facts-row > div:nth-child(3) { background: radial-gradient(90% 120% at 100% 0%, #fff3b0, transparent 60%), radial-gradient(90% 120% at 0% 100%, #f5b25a, transparent 70%), #ffd88a; }
.facts-row > div:nth-child(4) { background: radial-gradient(90% 120% at 0% 0%, #e2f3ff, transparent 60%), radial-gradient(90% 120% at 100% 100%, #9cc7e8, transparent 70%), #c4dcf2; }
.facts-row b { font: 400 38px/.95 var(--display); letter-spacing: -.05em; }
.facts-row b.bad { color: #b52a15; }
.facts-row .spark { max-width: 100%; height: auto; }
.facts-row .spark text, .facts-row .spark circle { fill: var(--lime-ink); } .facts-row .spark path { stroke: #1d3a14; } .facts-row .spark.up path { stroke: #b52a15; } .facts-row .spark.up circle { fill: #b52a15; }
.facts-row .spark .mid { stroke: rgb(14 24 19 / .2); }
.facts-row .pill { background: rgb(255 255 255 / .6); }
.badge-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.headline { font: 400 19px/1.45 var(--display); letter-spacing: -.025em; margin: 0; padding-left: 16px; border-left: 2px solid var(--lime-2); }
.brief-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .brief-cols { grid-template-columns: minmax(0, 1fr); } }
.brief-cols section { min-width: 0; padding: 16px; border-radius: 20px; background: var(--field); border: 1px solid var(--line); }
.brief-cols h4 { margin: 0 0 8px; font: 600 14.5px/1.3 var(--body); color: var(--ink-2); }
.brief-cols ul { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.brief-cols li { position: relative; padding-left: 16px; }
.brief-cols li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }
.brief-cols .lead { background: linear-gradient(160deg, #164030, var(--forest)); color: #eef6ea; border-color: transparent; }
.brief-cols .lead h4 { color: var(--lime); }
.brief-cols .lead li::before { background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.brief-cols .watch { background: linear-gradient(160deg, var(--crit-soft), transparent 85%), var(--field); border-color: color-mix(in srgb, var(--crit) 25%, transparent); }
.brief-cols .watch h4 { color: var(--crit); }
.brief-cols .watch li::before { background: var(--crit); }
.kv { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.kv:first-child { border-top: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 500; overflow-wrap: anywhere; }

/* mobile */
@media (max-width: 640px) {
  body { padding-top: 12px; }
  .brand p { display: none; }
  .chip { display: none; }
  .tabs button span:not(.tab-badge) { font-size: 13px; }
  .tabs button { padding: 0 12px; }
  .callbtns .btn { flex: 1; }
  .transcript { min-height: 220px; }
  .mic { width: 92px; height: 92px; }
  .wave { height: 48px; }
  .view-head .btn, .seg { width: 100%; } .seg button { flex: 1; }
  .kpi b { font-size: 38px; }
  .legend { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
