/* BISTEC Partner Portal — brand system with three selectable themes. */
:root, [data-theme="black"] {
  --navy:#002B54; --teal:#00A89D; --green:#5BBF3D; --cyan:#00BCD4;
  --bg0:#050a10; --bg1:#080f18; --bg-grad:linear-gradient(160deg,#04070c 0%,#070d15 40%,#0a1420 100%);
  --surface:rgba(255,255,255,.05); --surface-2:rgba(255,255,255,.08); --border:rgba(255,255,255,.10);
  --text:#f2f6fa; --text-2:rgba(242,246,250,.72); --text-3:rgba(242,246,250,.48);
  --danger:#FF6B6B; --danger-bg:rgba(255,107,107,.12); --danger-border:rgba(255,107,107,.3);
  --shadow:0 18px 50px rgba(0,0,0,.5); --accent-grad:linear-gradient(135deg,var(--teal),var(--cyan));
  --on-accent:#03121c; --input-bg:rgba(255,255,255,.06);
}
[data-theme="navy"] {
  --bg0:#001A35; --bg1:#002B54; --bg-grad:linear-gradient(160deg,#001A35 0%,#002B54 45%,#003B6F 100%);
  --surface:rgba(255,255,255,.07); --surface-2:rgba(255,255,255,.11); --border:rgba(255,255,255,.13);
  --text:#ffffff; --text-2:rgba(255,255,255,.75); --text-3:rgba(255,255,255,.5);
  --shadow:0 18px 50px rgba(0,10,25,.55); --input-bg:rgba(255,255,255,.08);
}
[data-theme="light"] {
  --bg0:#eef3f8; --bg1:#f7fafc; --bg-grad:linear-gradient(160deg,#f2f6fa 0%,#e9f1f7 60%,#e2ecf5 100%);
  --surface:rgba(255,255,255,.75); --surface-2:#ffffff; --border:rgba(0,43,84,.14);
  --text:#0b2540; --text-2:rgba(11,37,64,.75); --text-3:rgba(11,37,64,.5);
  --danger:#d64545; --danger-bg:rgba(214,69,69,.08); --danger-border:rgba(214,69,69,.3);
  --shadow:0 14px 40px rgba(0,43,84,.12); --on-accent:#ffffff; --input-bg:#ffffff;
}

* { margin:0; box-sizing:border-box; }
html, body { height:100%; }
body {
  font-family:Inter,-apple-system,BlinkMacSystemFont,sans-serif;
  background:var(--bg-grad); background-attachment:fixed; color:var(--text);
  font-size:14px; line-height:1.55; -webkit-font-smoothing:antialiased;
}
a { color:var(--cyan); text-decoration:none; }
button { font-family:inherit; }

/* background decorations */
.bg { position:fixed; inset:0; pointer-events:none; z-index:0; }
.orb { position:absolute; border-radius:50%; filter:blur(90px); opacity:.35; }
.orb-a { width:520px; height:520px; top:-160px; right:-120px; background:radial-gradient(circle,#00BCD4 0%,transparent 65%); }
.orb-b { width:460px; height:460px; bottom:-180px; left:-120px; background:radial-gradient(circle,#00A89D 0%,transparent 65%); }
[data-theme="light"] .orb { opacity:.18; }
.grid-overlay { position:absolute; inset:0; opacity:.045;
  background-image:linear-gradient(currentColor 1px,transparent 1px),linear-gradient(90deg,currentColor 1px,transparent 1px);
  background-size:44px 44px; color:var(--text); }

#app { position:relative; z-index:1; min-height:100vh; }
.boot { display:flex; align-items:center; justify-content:center; height:100vh; color:var(--text-3); letter-spacing:.1em; }

/* ---------- login ---------- */
.login-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; }
.login-card { width:100%; max-width:420px; background:var(--surface); border:1px solid var(--border);
  border-radius:22px; padding:42px 38px; backdrop-filter:blur(18px); box-shadow:var(--shadow); }
.brand-row { display:flex; align-items:center; gap:13px; margin-bottom:26px; }
.brand-mark { width:46px; height:46px; border-radius:12px; flex:none; }
.brand-name { font-weight:800; font-size:17px; letter-spacing:.01em; }
.brand-name small { display:block; font-size:10.5px; font-weight:600; letter-spacing:.24em; text-transform:uppercase;
  background:var(--accent-grad); -webkit-background-clip:text; background-clip:text; color:transparent; margin-top:2px; }
.login-card h1 { font-size:24px; font-weight:900; margin-bottom:6px; }
.login-card .tag { color:var(--text-2); font-weight:300; margin-bottom:26px; }

/* ---------- shell ---------- */
.shell { display:flex; min-height:100vh; }
.side { width:232px; flex:none; padding:22px 14px; display:flex; flex-direction:column; gap:4px;
  border-right:1px solid var(--border); position:sticky; top:0; height:100vh; }
.side .brand-row { padding:0 10px; margin-bottom:22px; }
.nav-item { display:flex; align-items:center; gap:11px; padding:10px 12px; border-radius:11px; color:var(--text-2);
  font-weight:600; font-size:13.5px; cursor:pointer; border:1px solid transparent; background:none; width:100%; text-align:left; }
.nav-item:hover { background:var(--surface); color:var(--text); }
.nav-item.on { background:var(--surface-2); border-color:var(--border); color:var(--text); }
.nav-item svg { width:17px; height:17px; flex:none; opacity:.85; }
.nav-item .pill { margin-left:auto; background:var(--accent-grad); color:var(--on-accent); font-size:10.5px; font-weight:800;
  border-radius:999px; padding:1px 8px; }
.side .spacer { flex:1; }
.user-chip { display:flex; align-items:center; gap:10px; padding:10px 12px; border-top:1px solid var(--border); margin-top:8px; }
.avatar { width:34px; height:34px; border-radius:50%; background:var(--accent-grad); color:var(--on-accent);
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:13px; flex:none; }
.user-chip .who { min-width:0; }
.user-chip .who b { display:block; font-size:12.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.user-chip .who span { font-size:11px; color:var(--text-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; }

.main { flex:1; min-width:0; padding:26px 34px 60px; }
.topbar { display:flex; align-items:center; gap:14px; margin-bottom:26px; }
.topbar h1 { font-size:24px; font-weight:900; }
.topbar .sub { color:var(--text-3); font-size:12.5px; margin-top:2px; font-weight:400; }
.topbar .right { margin-left:auto; display:flex; align-items:center; gap:10px; }

/* theme switch */
.theme-switch { display:flex; background:var(--surface); border:1px solid var(--border); border-radius:999px; padding:3px; }
.theme-switch button { border:none; background:none; color:var(--text-3); font-size:11px; font-weight:700; padding:5px 11px;
  border-radius:999px; cursor:pointer; letter-spacing:.03em; }
.theme-switch button.on { background:var(--accent-grad); color:var(--on-accent); }

.bell { position:relative; background:var(--surface); border:1px solid var(--border); border-radius:11px; width:38px; height:38px;
  display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--text-2); }
.bell .dot { position:absolute; top:8px; right:9px; width:8px; height:8px; border-radius:50%; background:var(--danger); }

/* ---------- components ---------- */
.card { background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:22px; backdrop-filter:blur(14px); }
.cards-grid { display:grid; gap:16px; }
.g2 { grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); }
.g3 { grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); }
.g4 { grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); }

.stat-card .n { font-size:32px; font-weight:900; background:var(--accent-grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
.stat-card .l { font-size:11.5px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--text-3); margin-top:3px; }

.section-title { font-size:12px; font-weight:800; letter-spacing:.2em; text-transform:uppercase; color:var(--cyan); margin:30px 0 14px; }
h2.block { font-size:18px; font-weight:800; margin-bottom:14px; }

.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; border:none; cursor:pointer;
  background:var(--accent-grad); color:var(--on-accent); font-weight:800; font-size:13.5px; padding:11px 20px; border-radius:11px; }
.btn:hover { filter:brightness(1.08); }
.btn:disabled { opacity:.55; cursor:default; }
.btn.ghost { background:var(--surface); color:var(--text); border:1px solid var(--border); font-weight:700; }
.btn.danger { background:var(--danger-bg); color:var(--danger); border:1px solid var(--danger-border); font-weight:700; }
.btn.sm { padding:7px 13px; font-size:12px; border-radius:9px; }

label.f { display:block; font-size:11.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--text-3); margin:14px 0 6px; }
input, select, textarea { width:100%; background:var(--input-bg); border:1px solid var(--border); color:var(--text);
  border-radius:10px; padding:11px 13px; font-family:inherit; font-size:13.5px; outline:none; }
input:focus, select:focus, textarea:focus { border-color:var(--teal); box-shadow:0 0 0 3px rgba(0,168,157,.18); }
textarea { resize:vertical; min-height:84px; }
select option { color:#0b2540; }
.hint { font-size:11.5px; color:var(--text-3); margin-top:5px; }
.frow { display:grid; grid-template-columns:1fr 1fr; gap:0 16px; }

.badge { display:inline-flex; align-items:center; gap:6px; font-size:11px; font-weight:800; letter-spacing:.05em;
  padding:3px 10px; border-radius:999px; text-transform:uppercase; border:1px solid var(--border); background:var(--surface-2); color:var(--text-2); }
.badge.submitted { color:#e8c268; border-color:rgba(232,194,104,.4); background:rgba(232,194,104,.1); }
.badge.approved { color:var(--teal); border-color:rgba(0,168,157,.4); background:rgba(0,168,157,.1); }
.badge.won { color:var(--green); border-color:rgba(91,191,61,.45); background:rgba(91,191,61,.12); }
.badge.rejected, .badge.lost, .badge.expired, .badge.declined { color:var(--danger); border-color:var(--danger-border); background:var(--danger-bg); }
.badge.requested { color:#e8c268; border-color:rgba(232,194,104,.4); background:rgba(232,194,104,.1); }
.badge.confirmed, .badge.done { color:var(--teal); border-color:rgba(0,168,157,.4); background:rgba(0,168,157,.1); }
.badge.flagship { color:var(--on-accent); background:var(--accent-grad); border:none; }

table.list { width:100%; border-collapse:collapse; }
table.list th { text-align:left; font-size:10.5px; font-weight:800; letter-spacing:.14em; text-transform:uppercase;
  color:var(--text-3); padding:10px 14px; border-bottom:1px solid var(--border); }
table.list td { padding:13px 14px; border-bottom:1px solid var(--border); font-size:13px; vertical-align:middle; }
table.list tr:last-child td { border-bottom:none; }
table.list tr.click { cursor:pointer; }
table.list tr.click:hover td { background:var(--surface); }
.table-wrap { overflow-x:auto; border:1px solid var(--border); border-radius:16px; background:var(--surface); backdrop-filter:blur(14px); }

/* modal */
.modal-veil { position:fixed; inset:0; background:rgba(0,8,16,.6); backdrop-filter:blur(4px); z-index:40;
  display:flex; align-items:flex-start; justify-content:center; padding:5vh 18px; overflow:auto;
  animation:veilIn .18s ease-out; }
.modal { width:100%; max-width:680px; background:var(--bg1); border:1px solid var(--border); border-radius:20px;
  padding:30px 32px; box-shadow:var(--shadow); position:relative; animation:modalIn .26s cubic-bezier(.21,1.02,.55,1); }
.modal.wide { max-width:min(1100px, 94vw); }
[data-theme="light"] .modal { background:#fff; }
.modal-x { position:absolute; top:16px; right:16px; width:32px; height:32px; border-radius:9px; border:1px solid var(--border);
  background:var(--surface); color:var(--text-2); cursor:pointer; font-size:13px; transition:background .15s, transform .15s; }
.modal-x:hover { background:var(--surface-2); transform:scale(1.06); }

/* deal record: two columns on desktop, one on narrow screens */
.cmdbar { display:flex; gap:8px; flex-wrap:wrap; margin:14px 0 18px; }
.deal-grid { display:grid; grid-template-columns:1fr; gap:0 28px; }
.deal-grid .deal-col { min-width:0; }
.activity-scroll { max-height:240px; overflow:auto; padding-right:4px; }
@media (min-width: 1080px) {
  .deal-grid { grid-template-columns:1.05fr .95fr; }
  .deal-grid .deal-col:last-child { display:flex; flex-direction:column; border-left:1px solid var(--border); padding-left:28px; }
  .activity-scroll { flex:1; max-height:none; min-height:280px; max-height:56vh; }
}
.modal h2 { font-size:20px; font-weight:900; margin-bottom:4px; }
.modal .sub { color:var(--text-3); font-size:12.5px; margin-bottom:10px; }
.modal .actions { display:flex; gap:10px; justify-content:flex-end; margin-top:24px; }

.toast-wrap { position:fixed; bottom:22px; left:50%; transform:translateX(-50%); z-index:60; display:flex; flex-direction:column; gap:8px; }
.toast { background:var(--bg1); color:var(--text); border:1px solid var(--border); border-left:3px solid var(--teal);
  padding:12px 18px; border-radius:12px; box-shadow:var(--shadow); font-size:13px; font-weight:600; max-width:520px; }
[data-theme="light"] .toast { background:#fff; }
.toast.err { border-left-color:var(--danger); }

.empty { text-align:center; color:var(--text-3); padding:44px 20px; }
.empty b { display:block; color:var(--text-2); font-size:15px; margin-bottom:6px; }

/* checklist */
.check-item { display:flex; align-items:center; gap:11px; padding:9px 0; font-size:13.5px; color:var(--text-2); }
.check-item .box { width:20px; height:20px; border-radius:6px; border:1.5px solid var(--border); flex:none;
  display:flex; align-items:center; justify-content:center; font-size:12px; }
.check-item.done { color:var(--text-3); text-decoration:line-through; }
.check-item.done .box { background:var(--accent-grad); border:none; color:var(--on-accent); }

/* pricing */
.tabs { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:18px; }
.tab { background:var(--surface); border:1px solid var(--border); color:var(--text-2); font-weight:700; font-size:12.5px;
  padding:8px 15px; border-radius:999px; cursor:pointer; }
.tab.on { background:var(--accent-grad); color:var(--on-accent); border-color:transparent; }
.save-chip { color:var(--green); font-weight:800; font-size:12px; }

/* materials */
.mat-card { display:flex; flex-direction:column; gap:8px; }
.mat-card .type { font-size:10.5px; font-weight:800; letter-spacing:.16em; text-transform:uppercase; color:var(--cyan); }
.mat-card h3 { font-size:15px; font-weight:800; }
.mat-card p { font-size:12.5px; color:var(--text-2); flex:1; }
.mat-card .meta { display:flex; align-items:center; gap:8px; font-size:11px; color:var(--text-3); }

/* deck studio */
.deck-row { display:flex; align-items:center; gap:14px; padding:14px 0; border-bottom:1px solid var(--border); }
.deck-row:last-child { border-bottom:none; }
.deck-ico { width:42px; height:42px; border-radius:11px; background:var(--accent-grad); color:var(--on-accent);
  display:flex; align-items:center; justify-content:center; font-weight:900; font-size:15px; flex:none; }
.deck-row .info { flex:1; min-width:0; }
.deck-row .info b { display:block; font-size:14px; }
.deck-row .info span { font-size:11.5px; color:var(--text-3); }
.working { display:flex; align-items:center; gap:12px; color:var(--text-2); font-weight:600; }
.spin { width:18px; height:18px; border-radius:50%; border:2.5px solid var(--border); border-top-color:var(--teal);
  animation:spin .8s linear infinite; flex:none; }
@keyframes spin { to { transform:rotate(360deg); } }

.notif-pop { position:absolute; top:46px; right:0; width:340px; max-height:420px; overflow:auto; background:var(--bg1);
  border:1px solid var(--border); border-radius:16px; box-shadow:var(--shadow); z-index:30; padding:8px; }
[data-theme="light"] .notif-pop { background:#fff; }
.notif { padding:10px 12px; border-radius:10px; font-size:12.5px; color:var(--text-2); }
.notif:hover { background:var(--surface); }
.notif .when { display:block; font-size:10.5px; color:var(--text-3); margin-top:3px; }
.notif.unread { border-left:2px solid var(--teal); background:var(--surface); }

.attention { border-left:3px solid #e8c268; }

/* Buddy chat */
.buddy-log { max-height:280px; overflow-y:auto; display:flex; flex-direction:column; gap:8px; padding:4px 2px; }
.msg { padding:10px 14px; border-radius:14px; font-size:13.5px; line-height:1.6; white-space:pre-wrap; max-width:88%; }
.msg.bot { background:var(--surface-2); border:1px solid var(--border); align-self:flex-start; border-bottom-left-radius:4px; }
.msg.me { background:linear-gradient(135deg,rgba(0,168,157,.25),rgba(0,188,212,.2)); border:1px solid rgba(0,168,157,.35);
  align-self:flex-end; border-bottom-right-radius:4px; }
.msg.thinking { display:flex; align-items:center; gap:8px; color:var(--text-3); }

@media (max-width: 860px) {
  .side { position:fixed; z-index:20; left:0; transform:translateX(-100%); transition:transform .2s; background:var(--bg1); }
  .side.open { transform:none; }
  .main { padding:20px 16px 60px; }
  .frow { grid-template-columns:1fr; }
  .burger { display:flex !important; }
}
.burger { display:none; background:var(--surface); border:1px solid var(--border); border-radius:10px; width:38px; height:38px;
  align-items:center; justify-content:center; color:var(--text); cursor:pointer; }

/* ---------- motion: corporate, subtle, GPU-only ---------- */
@keyframes veilIn { from { opacity:0; } to { opacity:1; } }
@keyframes modalIn { from { opacity:0; transform:translateY(14px) scale(.985); } to { opacity:1; transform:none; } }
@keyframes riseIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
@keyframes toastIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
@keyframes orbDrift { 0% { transform:translate(0,0); } 50% { transform:translate(-30px,24px); } 100% { transform:translate(0,0); } }
@keyframes needleSweep { from { transform:rotate(-90deg); } }

/* view entrance: content blocks rise in with a gentle stagger */
.main > *:not(.topbar) { animation:riseIn .38s cubic-bezier(.21,.9,.35,1) both; }
.main > *:nth-child(2) { animation-delay:.02s; } .main > *:nth-child(3) { animation-delay:.06s; }
.main > *:nth-child(4) { animation-delay:.10s; } .main > *:nth-child(5) { animation-delay:.14s; }
.main > *:nth-child(6) { animation-delay:.18s; } .main > *:nth-child(n+7) { animation-delay:.22s; }
.topbar { animation:riseIn .3s ease-out both; }
.login-card { animation:modalIn .45s cubic-bezier(.21,1.02,.55,1) both; }

/* ambient orbs drift very slowly */
.orb-a { animation:orbDrift 26s ease-in-out infinite; }
.orb-b { animation:orbDrift 34s ease-in-out infinite reverse; }

/* interactive cards lift */
.card { transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.card[onclick], .card.mat-card[data-mat], tr.click { cursor:pointer; }
.card[onclick]:hover, .card[data-mat]:hover { transform:translateY(-3px); border-color:rgba(0,168,157,.45); box-shadow:0 10px 30px rgba(0,20,40,.35); }
[data-theme="light"] .card[onclick]:hover, [data-theme="light"] .card[data-mat]:hover { box-shadow:0 10px 26px rgba(0,43,84,.14); }

/* buttons + tabs: press + hover feel */
.btn { transition:filter .15s, transform .12s, box-shadow .18s; }
.btn:hover:not(:disabled) { box-shadow:0 6px 18px rgba(0,168,157,.28); }
.btn:active:not(:disabled) { transform:scale(.97); }
.btn.ghost:hover { box-shadow:none; border-color:rgba(0,168,157,.45); }
.tab { transition:background .16s, color .16s, border-color .16s, transform .12s; }
.tab:hover:not(.on) { border-color:rgba(0,168,157,.45); color:var(--text); }
.tab:active { transform:scale(.96); }

/* sidebar: sliding accent bar on the active item */
.nav-item { position:relative; transition:background .16s, color .16s; }
.nav-item::before { content:""; position:absolute; left:-1px; top:22%; bottom:22%; width:3px; border-radius:3px;
  background:var(--accent-grad); opacity:0; transform:scaleY(.3); transition:opacity .2s, transform .25s cubic-bezier(.2,.9,.3,1.4); }
.nav-item.on::before { opacity:1; transform:none; }
.nav-item svg { transition:transform .18s; }
.nav-item:hover svg { transform:translateX(1.5px) scale(1.06); }
.nav-item .pill { animation:riseIn .3s ease-out; }

/* table rows */
table.list td { transition:background .14s; }

/* toasts + buddy messages + notifications */
.toast { animation:toastIn .28s cubic-bezier(.21,1.02,.55,1); }
.msg { animation:riseIn .24s ease-out; }
.notif-pop { animation:modalIn .2s ease-out; }

/* tachometer needle sweeps to its reading */
.dial-needle { animation:needleSweep .9s cubic-bezier(.3,.9,.35,1.1) both; }

/* theme changes glide */
body, .card, .side, .modal, input, select, textarea, .table-wrap { transition:background-color .3s ease, border-color .3s ease, color .2s ease; }

/* focus visibility for keyboard users */
.btn:focus-visible, .tab:focus-visible, .nav-item:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }

/* foldable section header (Sally-brief style) */
.fold-head { cursor:pointer; user-select:none; display:flex; align-items:center; gap:8px; }
.fold-head:hover { color:var(--teal); }
.fold-arrow { display:inline-block; color:var(--teal); font-size:11px; transition:transform .25s cubic-bezier(.2,.9,.3,1.3); }
.fold-head.folded .fold-arrow { transform:rotate(-90deg); }

/* ---------- pipeline analytics ---------- */
.viz-tip { position:fixed; z-index:60; pointer-events:none; background:var(--bg1); border:1px solid var(--border);
  border-radius:10px; padding:8px 12px; font-size:12px; box-shadow:var(--shadow); max-width:260px; }
[data-theme="light"] .viz-tip { background:#fff; }
.viz-tip b { display:block; font-size:12.5px; }
.viz svg { display:block; width:100%; height:auto; }
.viz .seg { cursor:pointer; transition:opacity .12s; }
.viz .seg:hover { opacity:.82; }
.viz-legend { display:flex; gap:14px; flex-wrap:wrap; margin-top:10px; font-size:11.5px; color:var(--text-2); }
.viz-legend span { display:inline-flex; align-items:center; gap:6px; }
.viz-legend i { width:10px; height:10px; border-radius:3px; display:inline-block; }
.drill-row { display:flex; align-items:center; gap:10px; padding:9px 4px; border-bottom:1px solid var(--border);
  cursor:pointer; flex-wrap:wrap; border-radius:8px; }
.drill-row:hover { background:var(--surface); }
.drill-row:last-child { border-bottom:none; }

/* ---------- guided tour ---------- */
.tour-spot { position:fixed; z-index:80; border-radius:14px; border:2px solid var(--teal);
  box-shadow:0 0 0 9999px rgba(0,8,16,.74), 0 0 24px rgba(0,168,157,.5); pointer-events:none;
  transition:all .35s cubic-bezier(.3,.9,.35,1); }
.tour-tip { position:fixed; z-index:81; width:min(360px, calc(100vw - 32px)); background:var(--bg1);
  border:1px solid var(--border); border-radius:16px; padding:20px 22px; box-shadow:var(--shadow);
  animation:modalIn .3s cubic-bezier(.21,1.02,.55,1); transition:top .35s ease, left .35s ease; }
[data-theme="light"] .tour-tip { background:#fff; }
.tour-tip .t-kick { font-size:10.5px; font-weight:800; letter-spacing:.18em; text-transform:uppercase; color:var(--cyan); margin-bottom:6px; }
.tour-tip h3 { font-size:16px; font-weight:800; margin-bottom:6px; }
.tour-tip p { font-size:13px; line-height:1.6; color:var(--text-2); }
.tour-tip .t-row { display:flex; align-items:center; gap:8px; margin-top:16px; }
.tour-tip .t-dots { display:flex; gap:5px; margin-right:auto; }
.tour-tip .t-dots span { width:7px; height:7px; border-radius:50%; background:var(--border); transition:background .2s, transform .2s; }
.tour-tip .t-dots span.on { background:var(--teal); transform:scale(1.25); }

/* guide page */
.guide-section { margin-bottom:8px; }
.guide-section summary { cursor:pointer; font-weight:800; font-size:15px; padding:14px 18px;
  list-style:none; display:flex; align-items:center; gap:10px; border-radius:12px; transition:background .15s; }
.guide-section summary:hover { background:var(--surface); }
.guide-section summary::before { content:"▸"; color:var(--teal); transition:transform .2s; }
.guide-section[open] summary::before { transform:rotate(90deg); }
.guide-section .g-body { padding:0 18px 16px 38px; font-size:13.5px; line-height:1.75; color:var(--text-2); }
.guide-section .g-body b { color:var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

/* presentation mode: hide internal verdicts while screen-sharing */
.present-mode .sens { display:none !important; }

/* ---------- drag-to-order ---------- */
.dragging { opacity: .45; outline: 2px dashed var(--accent, #3987e5); outline-offset: 2px; border-radius: 10px; }
[data-ord][draggable="true"]:active { cursor: grabbing; }

/* ---------- Buddy dock (everywhere) ---------- */
#buddyFab { position: fixed; right: 22px; bottom: 22px; z-index: 900; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--border); background: var(--teal, #12b3a4); color: #06231f; font-size: 24px; cursor: pointer; box-shadow: 0 10px 30px rgba(0,10,25,.35); transition: transform .15s; }
#buddyFab:hover { transform: scale(1.08); }
#buddyDock { position: fixed; right: 22px; bottom: 84px; z-index: 900; width: min(420px, calc(100vw - 32px)); background: var(--panel, var(--card-bg, #10202b)); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 18px 50px rgba(0,10,25,.5); display: flex; flex-direction: column; overflow: hidden; animation: modalIn .18s ease; }
#buddyDock .dock-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
#buddyDock .dock-x { margin-left: auto; background: none; border: none; color: inherit; cursor: pointer; font-size: 15px; }
#buddyDock .buddy-log { max-height: 46vh; min-height: 140px; overflow-y: auto; padding: 12px; }
#buddyDock form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
#buddyDock form input { flex: 1; }

/* ---------- ⌘K palette ---------- */
#cmdk { position: fixed; inset: 0; z-index: 1000; background: rgba(4,12,18,.55); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.cmdk-box { width: min(620px, calc(100vw - 32px)); background: var(--panel, var(--card-bg, #10202b)); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: 0 24px 70px rgba(0,10,25,.55); animation: modalIn .15s ease; }
#cmdkInput { width: 100%; border: none; border-bottom: 1px solid var(--border); border-radius: 0; padding: 15px 18px; font-size: 15px; background: transparent; color: inherit; }
#cmdkInput:focus { outline: none; box-shadow: none; }
#cmdkList { max-height: 46vh; overflow-y: auto; padding: 6px; }
.cmdk-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.cmdk-item.on, .cmdk-item:hover { background: rgba(18,179,164,.12); }
.cmdk-item .hint { margin-left: auto; }

/* ---------- deal record: More menu + inline stage ---------- */
.more-wrap { position: relative; display: inline-block; }
.more-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 190px; background: var(--panel, var(--card-bg, #10202b)); border: 1px solid var(--border); border-radius: 12px; padding: 6px; box-shadow: 0 14px 40px rgba(0,10,25,.45); display: flex; flex-direction: column; }
.more-menu button { text-align: left; background: none; border: none; color: inherit; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.more-menu button:hover { background: rgba(127,127,127,.14); }
.stage-inline { padding: 5px 8px; font-size: 12.5px; width: auto; }
@media (max-width: 700px) { #buddyDock { right: 8px; bottom: 76px; } #buddyFab { right: 14px; bottom: 14px; } }
#cmdk[hidden], #buddyDock[hidden], .more-menu[hidden] { display: none !important; }

/* ---------- rich audio tile: waveform + rolling karaoke ---------- */
.audio-tile { padding: 14px 16px; margin: 14px 0; max-width: 680px; }
.audio-tile .at-head { display: flex; align-items: center; gap: 10px; }
.audio-tile .at-head b { font-size: 13.5px; }
.audio-tile .at-time { margin-left: auto; font-variant-numeric: tabular-nums; }
.at-play { width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--teal, #12b3a4); color: #06231f; font-size: 15px; cursor: pointer; flex-shrink: 0; transition: transform .15s; }
.at-play:hover { transform: scale(1.08); }
.at-wave { width: 100%; height: 64px; display: block; margin-top: 10px; cursor: pointer; }
.at-karaoke { margin-top: 10px; height: 66px; overflow: hidden; border-top: 1px solid var(--border); padding-top: 8px; }
.at-line { font-size: 12.5px; line-height: 1.55; min-height: 19px; color: var(--text-3, #6c8a99); opacity: .55; transition: all .25s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-line.at-cur { color: var(--teal, #12b3a4); opacity: 1; font-weight: 700; font-size: 13.5px; }
.at-karaoke.roll .at-line { animation: capRoll .28s ease; }
@keyframes capRoll { from { transform: translateY(10px); opacity: .2; } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .at-karaoke.roll .at-line { animation: none; } }
