/* Icarus Aud — portal visual.
   CSP allows only same-origin styles: no inline style attributes, no web fonts.
   Dynamic values (stagger index, progress, pointer glow) are set from JS via CSSOM. */

:root {
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --font-display: "Inter", "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --violet: #8b7bff;
  --pink: #ec5bdc;
  --orange: #ff9a4d;
  --cyan: #4fd6ff;
  --green: #3ee6a8;
  --red: #ff6b8b;
  --amber: #ffc24d;
  --blue: #6aa6ff;
  --brand: linear-gradient(135deg, #6d5dfc 0%, #a64bf0 38%, #e14bd6 68%, #ff9a4d 100%);
  --brand-soft: linear-gradient(135deg, rgba(109, 93, 252, .22), rgba(225, 75, 214, .14) 55%, rgba(255, 154, 77, .16));

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 22px;
  --r-xl: 28px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07061a;
  --text: #f4f2ff;
  --text-2: rgba(236, 233, 255, .74);
  --muted: rgba(214, 209, 255, .5);
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .15);
  --glass: rgba(255, 255, 255, .045);
  --glass-strong: rgba(255, 255, 255, .075);
  --glass-hover: rgba(255, 255, 255, .07);
  --glass-modal: rgba(20, 17, 46, .78);
  --inset: inset 0 1px 0 rgba(255, 255, 255, .07);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .65);
  --orb-opacity: .5;
  --orb-blend: screen;
  --sk: rgba(255, 255, 255, .05);
  --sk-hi: rgba(255, 255, 255, .12);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f3ff;
  --text: #171430;
  --text-2: rgba(23, 20, 48, .74);
  --muted: rgba(23, 20, 48, .5);
  --line: rgba(23, 20, 48, .08);
  --line-strong: rgba(23, 20, 48, .15);
  --glass: rgba(255, 255, 255, .55);
  --glass-strong: rgba(255, 255, 255, .78);
  --glass-hover: rgba(255, 255, 255, .7);
  --glass-modal: rgba(255, 255, 255, .86);
  --inset: inset 0 1px 0 rgba(255, 255, 255, .9);
  --shadow: 0 24px 60px -28px rgba(60, 40, 140, .35);
  --orb-opacity: .32;
  --orb-blend: multiply;
  --sk: rgba(23, 20, 48, .05);
  --sk-hi: rgba(23, 20, 48, .1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
::selection { background: rgba(225, 75, 214, .35); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }

/* ---------- Ambient light ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.orb {
  position: absolute; width: 52vmax; height: 52vmax; border-radius: 50%;
  filter: blur(90px); opacity: var(--orb-opacity); mix-blend-mode: var(--orb-blend);
  will-change: transform;
}
.orb-a { background: radial-gradient(circle, #5b4bff 0%, transparent 65%); top: -22vmax; left: -12vmax; animation: drift-a 26s ease-in-out infinite alternate; }
.orb-b { background: radial-gradient(circle, #e14bd6 0%, transparent 65%); top: -14vmax; right: -20vmax; animation: drift-b 32s ease-in-out infinite alternate; }
.orb-c { background: radial-gradient(circle, #ff8a3d 0%, transparent 62%); bottom: -30vmax; right: 6vmax; opacity: calc(var(--orb-opacity) * .75); animation: drift-c 38s ease-in-out infinite alternate; }
.orb-d { background: radial-gradient(circle, #2fb8ff 0%, transparent 62%); bottom: -26vmax; left: -18vmax; opacity: calc(var(--orb-opacity) * .7); animation: drift-d 30s ease-in-out infinite alternate; }
.grid-glow {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 0%, transparent 75%);
  opacity: .55;
}
@keyframes drift-a { to { transform: translate(14vmax, 10vmax) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-12vmax, 14vmax) scale(.9); } }
@keyframes drift-c { to { transform: translate(-16vmax, -8vmax) scale(1.2); } }
@keyframes drift-d { to { transform: translate(12vmax, -12vmax) scale(1.05); } }

/* ---------- Glass ---------- */
.glass, .card {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--line);
  box-shadow: var(--inset), var(--shadow);
}
.glass-soft {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
}
.card { position: relative; border-radius: var(--r-lg); padding: 22px; overflow: hidden; isolation: isolate; }
.card-glow::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 1;
  background: linear-gradient(135deg, rgba(139, 123, 255, .7), rgba(236, 91, 220, .25) 35%, transparent 60%, rgba(255, 154, 77, .45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* Pointer-following light; --mx/--my are set by JS. */
.spot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -40%), rgba(165, 120, 255, .16), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.spot:hover::after { opacity: 1; }

.gradient-text {
  background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  background: linear-gradient(90deg, var(--violet), var(--pink) 60%, var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.muted { color: var(--muted); }

/* ---------- Brand ---------- */
.logo { width: 36px; height: 36px; flex: none; filter: drop-shadow(0 6px 18px rgba(225, 75, 214, .35)); }
.logo-bg { fill: rgba(255, 255, 255, .06); stroke: rgba(255, 255, 255, .12); stroke-width: 1; }
[data-theme="light"] .logo-bg { fill: #15122e; stroke: none; }
.logo-bars rect { transform-box: fill-box; transform-origin: 50% 100%; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-name, .brand h1 { font: 700 19px/1 var(--font-display); letter-spacing: -.02em; }
.brand-name span, .brand h1 span, .splash-name span { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-lg .logo { width: 48px; height: 48px; }
.brand-lg h1 { font-size: 26px; }

/* ---------- Top progress ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 100; pointer-events: none; opacity: 0; transition: opacity .3s; }
.progress.active { opacity: 1; }
.progress span { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--violet), var(--pink), var(--orange), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: progress-slide 1.1s var(--ease) infinite; box-shadow: 0 0 12px var(--pink); }
@keyframes progress-slide { from { background-position: -50% 0; } to { background-position: 150% 0; } }

/* ---------- Splash ---------- */
.splash { position: fixed; inset: 0; z-index: 60; display: grid; place-content: center; justify-items: center; gap: 18px; transition: opacity .5s var(--ease), transform .5s var(--ease), filter .5s; }
.splash.hide { opacity: 0; transform: scale(1.04); filter: blur(8px); pointer-events: none; }
.logo-xl { width: 88px; height: 88px; }
.splash-name { font: 700 24px var(--font-display); letter-spacing: -.02em; opacity: 0; animation: rise .8s .15s var(--ease) both; }
.splash .logo-bars rect, .is-busy .logo-bars rect { animation: eq 1s ease-in-out infinite; }
.logo-bars rect:nth-child(2) { animation-delay: -.2s; }
.logo-bars rect:nth-child(3) { animation-delay: -.45s; }
.logo-bars rect:nth-child(4) { animation-delay: -.7s; }
.logo-bars rect:nth-child(5) { animation-delay: -.35s; }
@keyframes eq { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.45); } }

/* ---------- Motion primitives ---------- */
.reveal { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* ---------- Buttons & inputs ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--glass-strong); font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none;
  transition: transform .18s var(--ease), box-shadow .25s, background-color .2s, border-color .2s, opacity .2s;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(139, 123, 255, .45); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary {
  border-color: transparent; color: #fff; overflow: hidden;
  background: var(--brand); background-size: 160% 160%; background-position: 0% 50%;
  box-shadow: 0 10px 30px -10px rgba(225, 75, 214, .75), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .18s var(--ease), box-shadow .25s, background-position .6s var(--ease), opacity .2s;
}
.btn-primary:hover { background-position: 100% 50%; box-shadow: 0 14px 36px -10px rgba(225, 75, 214, .9), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg);
}
.btn-primary:hover::after { animation: sweep .9s var(--ease); }
@keyframes sweep { to { left: 130%; } }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn .spinner { display: none; position: absolute; }
.btn.loading .btn-label, .btn.loading .btn-icon { opacity: 0; }
.btn.loading .spinner { display: block; }
.btn-icon { display: inline-grid; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px;
  border: 1px solid var(--line); background: var(--glass); color: var(--text-2);
  transition: background-color .2s, color .2s, transform .18s var(--ease), border-color .2s;
}
.icon-btn:hover { color: var(--text); background: var(--glass-hover); border-color: var(--line-strong); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.ghost { background: transparent; border-color: transparent; }
.icon-btn.spinning svg { animation: spin .8s linear infinite; }

svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.field { display: grid; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.field input, .input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .04); color: var(--text); font-size: 15px; font-weight: 500;
  transition: border-color .2s, box-shadow .25s, background-color .2s;
}
[data-theme="light"] .field input, [data-theme="light"] .input { background: rgba(255, 255, 255, .7); }
.field input::placeholder, .input::placeholder { color: var(--muted); }
.field input:focus, .input:focus { outline: none; border-color: rgba(139, 123, 255, .7); box-shadow: 0 0 0 4px rgba(139, 123, 255, .18), 0 0 30px -6px rgba(225, 75, 214, .45); }
.field-row { position: relative; display: block; }
.field-row input { padding-right: 48px; }
.field-row .icon-btn { position: absolute; right: 4px; top: 3px; }
.form-error { color: var(--red); font-size: 13.5px; font-weight: 600; }

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; cursor: pointer;
  background: linear-gradient(90deg, var(--violet), var(--pink) 60%, var(--orange)) 0 0 / var(--pct, 0%) 100% no-repeat, var(--line-strong);
}
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(225, 75, 214, .35), 0 4px 12px rgba(0, 0, 0, .4); transition: transform .15s; }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(225, 75, 214, .35); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.2); }

/* ---------- Auth ---------- */
.auth { position: relative; z-index: 2; min-height: 100vh; display: grid; grid-template-columns: 1.1fr minmax(360px, 440px); align-items: center; gap: 64px; padding: 48px clamp(24px, 6vw, 96px); max-width: 1320px; margin: 0 auto; }
.auth-hero { display: grid; gap: 22px; animation: rise .9s var(--ease) both; }
.auth-headline { font-size: clamp(38px, 5vw, 62px); font-weight: 750; letter-spacing: -.035em; line-height: 1.02; }
.auth-lead { font-size: 17px; color: var(--text-2); max-width: 520px; line-height: 1.6; }
.feature-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 12px; color: var(--text-2); font-weight: 500; }
.feature-list li { display: flex; align-items: center; gap: 12px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot-violet { background: var(--violet); box-shadow: 0 0 12px var(--violet); }
.dot-pink { background: var(--pink); box-shadow: 0 0 12px var(--pink); }
.dot-orange { background: var(--orange); box-shadow: 0 0 12px var(--orange); }
.dot-green { background: var(--green); box-shadow: 0 0 12px var(--green); }
.wave { display: flex; align-items: center; gap: 5px; height: 72px; max-width: 520px; }
.wave i { flex: 1; height: 100%; border-radius: 99px; background: linear-gradient(180deg, var(--orange), var(--pink) 45%, var(--violet)); transform-origin: center; animation: wave 1.6s ease-in-out infinite; opacity: .9; }
.wave i:nth-child(2n) { animation-duration: 1.25s; }
.wave i:nth-child(3n) { animation-duration: 1.9s; animation-delay: -.6s; }
.wave i:nth-child(4n) { animation-delay: -.3s; }
.wave i:nth-child(5n) { animation-duration: 1.05s; animation-delay: -.9s; }
.wave i:nth-child(7n) { animation-delay: -1.2s; }
@keyframes wave { 0%, 100% { transform: scaleY(.18); } 50% { transform: scaleY(1); } }
.auth-card { position: relative; border-radius: var(--r-xl); padding: 36px; display: grid; gap: 18px; animation: pop .7s .1s var(--ease) both; }
.auth-card.shake { animation: shake .5s; }
.auth-sub { color: var(--text-2); margin-top: -6px; }
.auth-form { display: grid; gap: 16px; }
.auth-form .btn { height: 48px; font-size: 15px; margin-top: 4px; }
.auth-download { font-size: 13.5px; font-weight: 600; color: var(--text-2); text-decoration: none; justify-self: start; }
.auth-download:hover { color: var(--text); text-decoration: underline; }
.auth-note { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- App shell ---------- */
.app { position: relative; z-index: 2; display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; animation: fade .5s var(--ease); }
.sidebar {
  position: sticky; top: 14px; height: calc(100vh - 28px); margin: 14px 0 14px 14px; border-radius: 24px;
  padding: 20px 14px 14px; display: flex; flex-direction: column; gap: 18px;
}
.sidebar .brand { padding: 0 6px; }
.nav { display: grid; gap: 3px; margin-top: 2px; overflow-y: auto; }
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px;
  border: 0; background: transparent; color: var(--text-2); font-size: 14.5px; font-weight: 550; text-align: left;
  transition: background-color .2s, color .2s;
}
.nav-item [data-icon] { display: inline-grid; transition: transform .25s var(--spring); }
.nav-item:hover { background: var(--glass-hover); color: var(--text); }
.nav-item:hover [data-icon] { transform: scale(1.1); }
.nav-item.active { color: var(--text); background: linear-gradient(90deg, rgba(139, 123, 255, .2), rgba(236, 91, 220, .07)); }
.nav-item.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); box-shadow: 0 0 14px var(--pink); }
.nav-item.active [data-icon] { color: var(--violet); }
.nav-count { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--glass-strong); color: var(--text-2); }
.nav-count:empty { display: none; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); }
.user-chip { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.avatar { width: 36px; height: 36px; border-radius: 12px; flex: none; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--brand); box-shadow: 0 6px 18px -6px rgba(225, 75, 214, .8); text-transform: uppercase; }
.user-meta { display: grid; min-width: 0; line-height: 1.25; }
.user-meta strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { font-size: 11.5px; color: var(--muted); }
.sidebar-actions { display: flex; gap: 4px; }
.sidebar-actions .icon-btn { width: 34px; height: 34px; border-radius: 10px; background: transparent; border-color: transparent; }

.main { min-width: 0; padding: 26px clamp(18px, 3vw, 40px) 56px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.topbar-title h2 { font-size: 30px; font-weight: 750; margin-top: 4px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.search { display: flex; align-items: center; gap: 8px; height: 42px; width: 300px; padding: 0 10px 0 14px; border-radius: 12px; color: var(--muted); transition: border-color .2s, box-shadow .25s, width .35s var(--ease); }
.search:focus-within { border-color: rgba(139, 123, 255, .6); box-shadow: 0 0 0 4px rgba(139, 123, 255, .14); width: 340px; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; color: var(--text); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { font: 600 11px var(--mono); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--muted); }

.view { outline: none; transition: opacity .16s, transform .16s; }
.view.leaving { opacity: 0; transform: translateY(6px); }

.tabbar { display: none; }

/* ---------- Shared bits ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--glass-strong); border: 1px solid var(--line); color: var(--text-2);
}
.chip svg.i { width: 14px; height: 14px; }
.chip-ok { color: var(--green); background: rgba(62, 230, 168, .1); border-color: rgba(62, 230, 168, .25); }
.chip-warn { color: var(--amber); background: rgba(255, 194, 77, .1); border-color: rgba(255, 194, 77, .25); }
.chip-err { color: var(--red); background: rgba(255, 107, 139, .1); border-color: rgba(255, 107, 139, .25); }
.chip-live { color: var(--violet); background: rgba(139, 123, 255, .12); border-color: rgba(139, 123, 255, .3); }
.chip-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; animation: pulse 1.4s ease-in-out infinite; }
[data-theme="light"] .chip-ok { color: #0f9b6c; }
[data-theme="light"] .chip-warn { color: #b77700; }
[data-theme="light"] .chip-err { color: #d23a5f; }
[data-theme="light"] .chip-live { color: #5b47ff; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h4 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.section-head h4 .tile { width: 30px; height: 30px; border-radius: 9px; }
.section-head h4 .tile svg.i { width: 16px; height: 16px; }
.link-btn { border: 0; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 600; padding: 4px 6px; border-radius: 8px; display: inline-flex; align-items: center; gap: 4px; }
.link-btn:hover { color: var(--text); background: var(--glass-hover); }

.tile { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); border: 1px solid var(--line); color: var(--text); }
.tile svg.i { width: 19px; height: 19px; }
.tile-violet { color: var(--violet); background: rgba(139, 123, 255, .14); }
.tile-pink { color: var(--pink); background: rgba(236, 91, 220, .13); }
.tile-orange { color: var(--orange); background: rgba(255, 154, 77, .13); }
.tile-cyan { color: var(--cyan); background: rgba(79, 214, 255, .12); }
.tile-green { color: var(--green); background: rgba(62, 230, 168, .12); }

.row-item {
  display: flex; align-items: center; gap: 13px; width: 100%; padding: 11px 12px; border-radius: 14px;
  border: 1px solid transparent; background: transparent; text-align: left; transition: background-color .2s, border-color .2s, transform .2s var(--ease);
}
button.row-item:hover { background: var(--glass-hover); border-color: var(--line); transform: translateX(2px); }
.row-main { min-width: 0; flex: 1; display: grid; gap: 2px; }
.row-title { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-end { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 8px; }

/* ---------- Skeletons ---------- */
.sk { border-radius: 10px; background: linear-gradient(100deg, var(--sk) 30%, var(--sk-hi) 50%, var(--sk) 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.sk-line { height: 12px; margin: 10px 0; }
.sk-title { height: 22px; width: 46%; margin-bottom: 14px; }
.sk-num { height: 34px; width: 40%; margin-top: 10px; }
.sk-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; }
.sk-tile { width: 42px; height: 42px; border-radius: 13px; flex: none; }
.w-30 { width: 30%; } .w-40 { width: 40%; } .w-55 { width: 55%; } .w-70 { width: 70%; } .w-85 { width: 85%; } .w-95 { width: 95%; }
.sk-stack { flex: 1; }
.sk-stack .sk-line { margin: 6px 0; }

/* ---------- Empty & processing states ---------- */
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 48px 20px; color: var(--text-2); }
.empty .tile { width: 64px; height: 64px; border-radius: 20px; animation: float 4s ease-in-out infinite; box-shadow: 0 18px 40px -16px rgba(225, 75, 214, .6); }
.empty .tile svg.i { width: 26px; height: 26px; }
.empty h4 { font-size: 17px; color: var(--text); margin-top: 6px; }
.empty p { max-width: 380px; font-size: 14px; }

.processing { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 44px 20px; }
.orbit { position: relative; width: 84px; height: 84px; display: grid; place-items: center; }
.orbit::before, .orbit::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--violet); border-right-color: var(--pink); animation: spin 1.4s linear infinite; }
.orbit::after { inset: 10px; border-top-color: var(--orange); border-right-color: transparent; border-left-color: var(--pink); animation-duration: 2s; animation-direction: reverse; }
.orbit .logo { width: 40px; height: 40px; }
.orbit .logo-bars rect { animation: eq 1s ease-in-out infinite; }
.processing h4 { font-size: 17px; }
.processing p { color: var(--text-2); max-width: 420px; font-size: 14px; }

/* ---------- Home ---------- */
.home { display: grid; gap: 18px; }
.hero-card { padding: 30px 32px; border-radius: 26px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; }
.hero-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(600px 220px at 0% 0%, rgba(139, 123, 255, .22), transparent 70%), radial-gradient(500px 240px at 100% 100%, rgba(255, 154, 77, .16), transparent 70%); }
.hero-card h3 { font-size: clamp(24px, 3vw, 34px); font-weight: 750; letter-spacing: -.03em; }
.hero-card p { color: var(--text-2); margin-top: 8px; font-size: 15px; }
.hero-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.hero-card .wave { width: 260px; height: 92px; gap: 4px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { display: grid; gap: 6px; padding: 20px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.stat-value { font: 750 34px/1.1 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-foot { font-size: 12.5px; color: var(--muted); }
.stat .tile { width: 36px; height: 36px; border-radius: 11px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.home-col { display: grid; gap: 18px; }
.panel { padding: 18px; }
.panel .section-head { padding: 2px 4px 0; }

/* ---------- Meetings ---------- */
.split { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start; }
.list-panel { position: sticky; top: 20px; padding: 8px; max-height: calc(100vh - 150px); overflow-y: auto; }
.group-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; }
.meeting-item.active { background: linear-gradient(90deg, rgba(139, 123, 255, .18), rgba(236, 91, 220, .06)); border-color: var(--line-strong); }
.meeting-item .tile { transition: transform .3s var(--spring); }
.meeting-item:hover .tile { transform: rotate(-6deg) scale(1.05); }
.list-count { padding: 8px 12px 4px; font-size: 12px; color: var(--muted); }
.detail { display: grid; gap: 16px; min-width: 0; }
.detail-head { padding: 26px; border-radius: 24px; }
.detail-head::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(560px 200px at 10% 0%, rgba(139, 123, 255, .2), transparent 70%), radial-gradient(400px 200px at 100% 0%, rgba(236, 91, 220, .14), transparent 70%); }
.detail-head h3 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 750; letter-spacing: -.03em; margin-top: 6px; overflow-wrap: anywhere; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.back-btn { display: none; }

.segmented { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); max-width: 100%; overflow-x: auto; }
.segmented button { border: 0; background: transparent; color: var(--text-2); font-weight: 600; font-size: 13.5px; padding: 8px 14px; border-radius: 10px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; transition: background-color .2s, color .2s, box-shadow .2s; }
.segmented button:hover { color: var(--text); }
.segmented button.active { color: var(--text); background: var(--glass-strong); box-shadow: var(--inset), 0 6px 18px -8px rgba(0, 0, 0, .5), 0 0 0 1px var(--line-strong); }
.segmented .count { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--brand-soft); color: var(--text); }
.tab-panel { animation: rise .45s var(--ease) both; }

/* Player */
.player { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.play-btn { position: relative; width: 48px; height: 48px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; background: var(--brand); box-shadow: 0 10px 28px -8px rgba(225, 75, 214, .8); transition: transform .2s var(--spring); }
.play-btn:hover { transform: scale(1.06); }
.play-btn:active { transform: scale(.95); }
.play-btn svg.i { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.play-btn .spinner { position: absolute; }
.play-btn.loading svg { opacity: 0; }
.play-btn:not(.loading) .spinner { display: none; }
.player-main { flex: 1; min-width: 0; display: grid; gap: 8px; }
.player-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.player-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-time { font: 600 12.5px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.speed-btn { font: 700 12px var(--mono); min-width: 48px; height: 32px; border-radius: 10px; border: 1px solid var(--line); background: var(--glass); color: var(--text-2); }
.speed-btn:hover { color: var(--text); }
.mini-wave { display: flex; align-items: center; gap: 3px; height: 22px; }
.mini-wave i { width: 3px; height: 100%; border-radius: 3px; background: var(--brand); transform: scaleY(.25); transition: transform .3s; }
.playing .mini-wave i { animation: wave 1s ease-in-out infinite; }
.playing .mini-wave i:nth-child(2n) { animation-duration: .8s; }
.playing .mini-wave i:nth-child(3n) { animation-duration: 1.2s; animation-delay: -.3s; }

/* Summary */
.summary-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.summary-text { font-size: 16.5px; line-height: 1.75; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.side-stack { display: grid; gap: 16px; }
.ring-wrap { display: flex; align-items: center; gap: 18px; }
.ring { width: 92px; height: 92px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .ring-bg { stroke: var(--line-strong); }
.ring .ring-fg { stroke: url(#brand-gradient); stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease); }
.ring-label { display: grid; gap: 2px; }
.ring-label strong { font: 750 28px var(--font-display); letter-spacing: -.02em; }
.ring-label span { font-size: 13px; color: var(--text-2); }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kpi { padding: 12px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); }
.kpi strong { display: block; font: 750 22px var(--font-display); }
.kpi span { font-size: 12.5px; color: var(--text-2); }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: rgba(79, 214, 255, .08); border: 1px solid rgba(79, 214, 255, .22); color: var(--text-2); font-size: 13px; }
.note svg.i { color: var(--cyan); margin-top: 1px; }

/* Insights */
.insight-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.insight-card { --accent: var(--violet); padding: 20px 20px 10px; }
.insight-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.insight-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(320px 120px at 50% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 75%); }
.insight-card h4 { font-size: 15px; display: flex; align-items: center; gap: 10px; }
.insight-card h4 .dot { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.insight-card h4 .count { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.accent-green { --accent: var(--green); }
.accent-red { --accent: var(--red); }
.accent-amber { --accent: var(--amber); }
.accent-violet { --accent: var(--violet); }
.accent-cyan { --accent: var(--cyan); }
.accent-blue { --accent: var(--blue); }
.accent-pink { --accent: var(--pink); }
.accent-orange { --accent: var(--orange); }
.evidence { padding: 13px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.evidence:first-of-type { border-top: 0; margin-top: 6px; }
.evidence p { font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.evidence .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.quote { display: flex; align-items: flex-start; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; padding: 6px 8px; margin: 0 -8px; border-radius: 10px; color: var(--muted); font-size: 12.5px; transition: background-color .2s, color .2s; }
.quote:hover { background: var(--glass-hover); color: var(--text-2); }
.quote q { font-style: italic; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ts { flex: none; font: 700 11.5px var(--mono); padding: 2px 7px; border-radius: 7px; color: var(--violet); background: rgba(139, 123, 255, .13); font-variant-numeric: tabular-nums; }
[data-theme="light"] .ts { color: #5b47ff; }

/* Tasks */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.task-list { display: grid; gap: 10px; }
.task { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border-radius: 18px; transition: opacity .3s, transform .3s var(--ease); }
.check { width: 24px; height: 24px; flex: none; margin-top: 1px; border-radius: 8px; border: 2px solid var(--line-strong); background: transparent; display: grid; place-items: center; color: #fff; transition: background-color .2s, border-color .2s, transform .2s var(--spring); }
.check:hover { border-color: var(--violet); transform: scale(1.08); }
.check svg.i { width: 14px; height: 14px; stroke-width: 3; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .3s var(--spring); }
.task.done .check { background: var(--brand); border-color: transparent; box-shadow: 0 6px 16px -6px rgba(225, 75, 214, .8); }
.task.done .check svg.i { opacity: 1; transform: none; }
.task-body { flex: 1; min-width: 0; display: grid; gap: 6px; }
.task-title { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; transition: color .3s; position: relative; justify-self: start; }
.task-title::after { content: ""; position: absolute; left: 0; top: 52%; height: 1.5px; width: 0; background: var(--muted); transition: width .35s var(--ease); }
.task.done .task-title { color: var(--muted); }
.task.done .task-title::after { width: 100%; }
.task-details { font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; }

/* Transcript */
.transcript { padding: 12px; }
.transcript-tools { display: flex; align-items: center; gap: 10px; padding: 6px 6px 12px; flex-wrap: wrap; }
.transcript-tools .search { width: 100%; max-width: 360px; }
.segment { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 12px; padding: 10px; border-radius: 12px; transition: background-color .2s; }
.segment:hover { background: var(--glass-hover); }
.segment .ts { border: 0; cursor: pointer; justify-self: start; height: max-content; margin-top: 2px; }
.segment .speaker { font-size: 12px; font-weight: 700; display: block; margin-bottom: 2px; color: var(--accent, var(--violet)); }
.segment p { line-height: 1.65; overflow-wrap: anywhere; }
.segment.now { background: rgba(139, 123, 255, .1); }
mark { background: rgba(236, 91, 220, .32); color: inherit; border-radius: 4px; padding: 0 2px; }
.plain-transcript { white-space: pre-wrap; line-height: 1.75; padding: 6px; overflow-wrap: anywhere; }

/* Organogram */
.org { padding: 8px; }
.org svg { display: block; width: 100%; height: auto; max-height: 520px; }
.org .edge { fill: none; stroke: url(#edge-gradient); stroke-width: 1.6; opacity: .55; stroke-dasharray: 4 5; animation: dash 18s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -400; } }
.org .node-halo { fill: rgba(225, 75, 214, .14); }
.org .node { fill: url(#brand-gradient); }
.org .node-initial { fill: #fff; font: 800 15px var(--font); text-anchor: middle; dominant-baseline: central; }
.org .node-label { fill: var(--text); font: 700 13px var(--font); text-anchor: middle; }
.org .node-role { fill: var(--muted); font: 500 11.5px var(--font); text-anchor: middle; }
.org .edge-label { fill: var(--text-2); font: 600 11px var(--font); text-anchor: middle; paint-order: stroke; stroke: var(--bg); stroke-width: 4px; }
.org-g { animation: fade .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
.relations { display: grid; gap: 8px; margin-top: 12px; }
.relation { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; padding: 10px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); }
.relation svg.i { color: var(--pink); width: 16px; height: 16px; }

/* Events timeline */
.timeline { position: relative; display: grid; gap: 14px; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, var(--violet), var(--pink) 50%, var(--orange)); opacity: .55; }
.event { padding: 18px 20px; border-radius: 18px; }
.event-dot { position: absolute; left: -27px; top: 22px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--pink); box-shadow: 0 0 14px var(--pink); }
.event-wrap { position: relative; }
.event-date { display: inline-flex; align-items: baseline; gap: 6px; font: 700 13px var(--font); color: var(--pink); }
[data-theme="light"] .event-date { color: #c22fb4; }
.event h4 { font-size: 16px; margin: 6px 0 8px; overflow-wrap: anywhere; }
.timeline-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 8px 0 -4px 2px; }

/* Cost */
.cost-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; align-items: start; }
.slider-field { display: grid; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.slider-field:last-of-type { border-bottom: 0; }
.slider-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; font-size: 14px; color: var(--text-2); }
.slider-head strong { font: 750 20px var(--font-display); color: var(--text); font-variant-numeric: tabular-nums; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.presets button { cursor: pointer; }
.presets button:hover { border-color: rgba(139, 123, 255, .45); color: var(--text); }
.presets button.active { color: var(--text); background: var(--brand-soft); border-color: rgba(139, 123, 255, .45); }
.total { font: 800 clamp(42px, 5vw, 60px)/1 var(--font-display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; margin: 10px 0 4px; }
.stackbar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--line); margin: 18px 0 12px; gap: 2px; }
.stackbar span { display: block; height: 100%; flex: 0 0 0; transition: flex-grow .8s var(--ease); }
.stackbar .seg-a { background: linear-gradient(90deg, #6d5dfc, #a64bf0); }
.stackbar .seg-b { background: linear-gradient(90deg, #e14bd6, #ff9a4d); }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13.5px; color: var(--text-2); }
.legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.legend .dot { display: inline-block; margin-right: 6px; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13.5px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* Downloads / more */
.download-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.download-card { display: grid; gap: 14px; align-content: start; padding: 24px; }
.download-card .tile { width: 54px; height: 54px; border-radius: 17px; }
.download-card h4 { font-size: 18px; }
.download-card p { color: var(--text-2); font-size: 14px; }
.download-card .btn { justify-self: start; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.steps li { display: flex; gap: 14px; align-items: flex-start; color: var(--text-2); font-size: 14px; counter-increment: step; }
.steps li::before { content: counter(step); flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; background: var(--brand); }
.more-grid { display: grid; gap: 10px; }
.more-grid .row-item { padding: 14px 16px; border-color: var(--line); background: var(--glass); }

/* ---------- Upload dialog ---------- */
.modal { border: 0; padding: 0; width: min(540px, calc(100vw - 32px)); border-radius: 26px; color: var(--text); background: var(--glass-modal); }
.modal[open] { animation: pop .35s var(--ease); }
.modal::backdrop { background: rgba(6, 5, 18, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.upload-form { display: grid; gap: 18px; padding: 24px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-head h3 { font-size: 22px; margin-top: 4px; }
.dropzone { position: relative; display: grid; justify-items: center; text-align: center; gap: 8px; padding: 36px 20px; border-radius: 20px; border: 1.5px dashed var(--line-strong); background: var(--glass); cursor: pointer; transition: border-color .25s, background-color .25s, box-shadow .3s, transform .25s var(--ease); }
.dropzone:hover, .dropzone.drag { border-color: var(--violet); background: rgba(139, 123, 255, .08); box-shadow: 0 0 0 6px rgba(139, 123, 255, .08), 0 20px 50px -20px rgba(225, 75, 214, .5); }
.dropzone.drag { transform: scale(1.015); }
.dropzone.has-file { border-style: solid; border-color: rgba(62, 230, 168, .5); }
.dropzone-icon { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: var(--brand); box-shadow: 0 14px 34px -12px rgba(225, 75, 214, .8); margin-bottom: 6px; }
.dropzone-icon svg.i { width: 26px; height: 26px; }
.dropzone strong { font-size: 15px; overflow-wrap: anywhere; }
.dropzone small { color: var(--muted); font-size: 12.5px; }
.upload-progress { display: flex; align-items: center; gap: 12px; }
.meter { flex: 1; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--brand); box-shadow: 0 0 14px rgba(225, 75, 214, .7); transition: width .25s var(--ease); }
.upload-progress small { font: 700 12.5px var(--mono); color: var(--text-2); min-width: 42px; text-align: right; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

.drop-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(6, 5, 18, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .2s; }
.drop-overlay-card { display: grid; justify-items: center; gap: 12px; padding: 44px 56px; border-radius: 28px; border: 2px dashed var(--violet); font-size: 17px; animation: pop .3s var(--ease); }
.drop-overlay-card [data-icon] { color: var(--pink); }
.drop-overlay-card svg.i { width: 34px; height: 34px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 90; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; border-radius: 16px; background: var(--glass-modal); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-size: 14px; font-weight: 500; animation: toast-in .45s var(--spring) both; }
.toast.out { animation: toast-out .3s var(--ease) forwards; }
.toast [data-icon], .toast > svg.i { color: var(--green); }
.toast.error > svg.i { color: var(--red); }
.toast.info > svg.i { color: var(--violet); }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid, .summary-grid, .cost-grid { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: 290px minmax(0, 1fr); }
}

@media (max-width: 960px) {
  .auth { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 40px 20px; justify-items: center; }
  .auth-hero { text-align: center; justify-items: center; }
  .auth-hero .wave { width: 100%; height: 56px; }
  .feature-list { display: none; }
  .auth-card { width: 100%; max-width: 440px; }

  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .main { padding: 18px 16px 120px; }
  .topbar { margin-bottom: 18px; }
  .topbar-title h2 { font-size: 24px; }
  .topbar-actions { width: 100%; }
  .search, .search:focus-within { flex: 1; width: auto; }
  .search kbd { display: none; }
  .topbar-upload { display: none; }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
    height: 66px; padding: 0 6px; border-radius: 24px; background: var(--glass-modal);
  }
  .tab-item { display: grid; justify-items: center; gap: 3px; border: 0; background: transparent; color: var(--muted); font-size: 10.5px; font-weight: 600; padding: 6px 0; transition: color .2s; }
  .tab-item.active { color: var(--text); }
  .tab-item.active [data-icon] { color: var(--pink); }
  .tab-upload { justify-self: center; width: 54px; height: 54px; border-radius: 18px; place-items: center; color: #fff; background: var(--brand); box-shadow: 0 12px 30px -8px rgba(225, 75, 214, .9); transform: translateY(-14px); }
  .tab-upload svg.i { width: 24px; height: 24px; }

  .split { grid-template-columns: minmax(0, 1fr); }
  .list-panel { position: static; max-height: none; }
  .split.show-detail .list-panel { display: none; }
  .split:not(.show-detail) .detail { display: none; }
  .back-btn { display: inline-flex; }
  .hero-card { grid-template-columns: minmax(0, 1fr); padding: 24px; }
  .hero-card .wave { display: none; }
  .toasts { right: 16px; bottom: 96px; }
}

@media (max-width: 560px) {
  .auth-headline { font-size: 34px; }
  .auth-lead { font-size: 15px; }
  .auth-card { padding: 26px 22px; }
  .stats { gap: 10px; }
  .stat { padding: 16px; }
  .stat-value { font-size: 27px; }
  .insight-grid, .download-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-head { padding: 20px; }
  .player { padding: 12px 14px; gap: 12px; }
  .mini-wave { display: none; }
  .segment { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .modal-actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .orb { animation: none; }
}
