:root {
  --bg: #0b1020; --bg2: #11182c; --card: #151d34; --card2: #1b2541; --line: #26314f;
  --text: #e8ecf6; --muted: #8b96b3; --dim: #5d6888;
  --accent: #2ee6b8; --accent2: #5b8cff; --blue: #5b8cff; --gold: #ffc861; --red: #ff6b7a; --orange: #ff9f5a;
  --radius: 14px; --shadow: 0 10px 30px rgba(0,0,0,.35);
  font-family: 'Plus Jakarta Sans', 'Noto Sans Devanagari', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-size: 15px; }
a { color: var(--accent2); }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card2); padding: 9px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: var(--accent2); }
.btn.primary { background: linear-gradient(135deg, var(--accent), #20c3a0); color: #04241c; border: none; }
.btn.blue { background: var(--accent2); color: #fff; border: none; }
.btn.danger { color: var(--red); border-color: #5a2a36; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 14px 20px; font-size: 16px; border-radius: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; font-weight: 600; }
input, select, textarea { width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent2); }
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 500; font-size: 14px; margin: 10px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; line-height: 1.5; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .hero { position: relative; overflow: hidden; background: radial-gradient(circle at 30% 30%, #1d3a6b 0, #0b1020 60%); padding: 60px; display: flex; flex-direction: column; justify-content: flex-end; }
.login .hero canvas { position: absolute; inset: 0; }
.login .hero h1 { position: relative; font-size: 44px; margin: 0 0 12px; line-height: 1.1; }
.login .hero p { position: relative; color: var(--muted); max-width: 440px; line-height: 1.6; }
.login .formside { display: grid; place-items: center; padding: 40px; }
.login form { width: 100%; max-width: 380px; }
.login h2 { margin: 0 0 6px; font-size: 26px; }
.err { color: var(--red); font-size: 14px; margin-top: 10px; min-height: 20px; }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .login .hero { min-height: 300px; } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--bg2); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; font-weight: 800; font-size: 18px; }
.brand .dot { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--accent2)); display: grid; place-items: center; color: #04241c; font-size: 15px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; }
.nav a:hover { background: var(--card); color: var(--text); }
.nav a.on { background: var(--card2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.nav .sec { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); padding: 16px 12px 6px; }
.side .me { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.main { padding: 28px 34px 60px; max-width: 1280px; width: 100%; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.head h1 { margin: 0; font-size: 26px; }
.head p { margin: 4px 0 0; color: var(--muted); }
@media (max-width: 800px) { .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; } .main { padding: 20px 16px; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin: 0 0 4px; font-size: 16px; }
.card + .card { margin-top: 16px; }
.stat { font-size: 30px; font-weight: 800; margin-top: 6px; }
.stat-l { color: var(--muted); font-size: 13px; font-weight: 600; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 10px; border-bottom: 1px solid var(--line); }
td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
tr:last-child td { border-bottom: none; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--card2); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--card2); color: var(--muted); }
.pill.green { background: rgba(46,230,184,.12); color: var(--accent); }
.pill.red { background: rgba(255,107,122,.12); color: var(--red); }
.pill.gold { background: rgba(255,200,97,.12); color: var(--gold); }
.pill.blue { background: rgba(91,140,255,.15); color: var(--accent2); }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }

.prov { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.prov .card { margin: 0; position: relative; }
.prov .card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.modal-bg { position: fixed; inset: 0; background: rgba(4,8,20,.7); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow); }
.modal h2 { margin: 0 0 8px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 99; display: flex; flex-direction: column; gap: 8px; align-items: center; }
#toast div { background: var(--card2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 600; animation: pop .2s; }
#toast div.bad { border-color: var(--red); color: var(--red); }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } }

.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; cursor: pointer; transition: .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(46,230,184,.04); }

/* ---------- summary ---------- */
.sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sum-grid ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.7; }
.transcript { display: flex; flex-direction: column; gap: 10px; max-height: 560px; overflow: auto; }
.bubble { padding: 10px 14px; border-radius: 12px; background: var(--card2); max-width: 85%; line-height: 1.5; }
.bubble .who { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.bubble.lead .who { color: var(--gold); }
.bubble.salesperson .who { color: var(--accent2); }
.bubble.agent { align-self: flex-end; background: rgba(46,230,184,.08); border: 1px solid rgba(46,230,184,.2); }
.bubble.agent .who { color: var(--accent); }

/* ---------- meeting room ---------- */
.room { height: 100vh; display: grid; grid-template-rows: auto 1fr auto; background: radial-gradient(circle at 70% 0%, #172447 0, var(--bg) 55%); overflow: hidden; }
.room-top { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: rgba(11,16,32,.7); backdrop-filter: blur(8px); flex-wrap: wrap; }
.room-top .title { font-weight: 800; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(255,107,122,.6); animation: ping 1.6s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(255,107,122,0); } 100% { box-shadow: 0 0 0 0 rgba(255,107,122,0); } }
.stage { display: grid; grid-template-columns: 1fr 380px; gap: 16px; padding: 16px 20px; min-height: 0; }
.stage.noscreen { grid-template-columns: 1fr 380px; }
.screen { position: relative; background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); min-height: 0; }
.screen iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.screen .screen-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; gap: 8px; align-items: center; padding: 8px 10px; background: rgba(11,16,32,.85); color: var(--text); font-size: 13px; z-index: 2; }
.screen .screen-bar .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.screen.has-bar iframe { padding-top: 40px; }
.avatar-stage { position: relative; border-radius: 16px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #1b2b55, #0c1226 70%); border: 1px solid var(--line); min-height: 0; }
.avatar-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.noscreen .avatar-stage { grid-column: 1; }
.noscreen .screen { display: none; }
.side-col { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.side-col .avatar-mini { height: 300px; flex-shrink: 0; }
.caption { z-index: 3; position: absolute; left: 16px; right: 16px; bottom: 16px; background: rgba(5,9,22,.8); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 18px; line-height: 1.5; min-height: 0; backdrop-filter: blur(6px); }
.caption:empty { display: none; }
.caption .spoken { color: var(--text); } .caption .rest { color: transparent; }
.status-chip { z-index: 3; position: absolute; top: 14px; left: 14px; display: flex; align-items: center; gap: 8px; background: rgba(5,9,22,.7); border: 1px solid var(--line); padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; }
.status-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); }
.status-chip.listening i { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.status-chip.thinking i { background: var(--accent2); animation: blink .6s infinite alternate; }
.status-chip.speaking i { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
@keyframes blink { to { opacity: .2; } }
.live-feed { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; overflow: auto; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.live-feed .bubble { max-width: 100%; font-size: 14px; padding: 8px 12px; }
.interim { color: var(--muted); font-style: italic; font-size: 14px; padding: 4px 6px; }
.controls { display: flex; gap: 10px; align-items: center; padding: 12px 20px 16px; flex-wrap: wrap; border-top: 1px solid var(--line); background: rgba(11,16,32,.85); }
.seg { display: inline-flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 8px 12px; border-radius: 9px; cursor: pointer; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--card2); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.seg button.on.lead { color: var(--gold); } .seg button.on.sp { color: var(--accent2); }
.mic { width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; font-size: 20px; background: var(--card2); }
.mic.on { background: var(--accent); color: #04241c; box-shadow: 0 0 0 6px rgba(46,230,184,.15); }
.steps { display: flex; gap: 6px; flex-wrap: wrap; }
.steps .btn.done { opacity: .55; }
.steps .btn.cur { border-color: var(--gold); color: var(--gold); }
.popover { position: absolute; bottom: 80px; right: 20px; width: 340px; z-index: 20; }
@media (max-width: 1000px) { .stage { grid-template-columns: 1fr; overflow: auto; } .room { height: auto; min-height: 100vh; } .screen { height: 60vh; } .avatar-stage { height: 360px; } }

/* ---------- conversation mode & full-screen presenting ---------- */
.meter { height: 8px; background: var(--bg2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width .08s; }
.who-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-transform: uppercase; letter-spacing: .06em; }
.who-btn:hover { text-decoration: underline; }
.bubble.unknown .who { color: var(--muted); }
.stage { grid-template-columns: 1fr 390px; }
.stage .avatar-stage { grid-column: 1; }
.present-ui { display: none; }
.room.presenting .present-ui { display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 40; background: #0b1020; }
.present-bar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: rgba(11,16,32,.95); border-bottom: 1px solid var(--line); }
.present-bar .t { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-host { flex: 1; min-height: 0; position: relative; }
.vw-body { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.vw-frame { width: 100%; height: 100%; border: 0; background: #fff; }
.vw-pdf { max-width: calc(100% - 24px); max-height: calc(100% - 24px); box-shadow: 0 20px 60px rgba(0,0,0,.5); border-radius: 6px; background: #fff; }
.vw-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.vw-slide { width: min(100%, calc((100vh - 120px) * 16 / 9)); aspect-ratio: 16 / 9; max-height: 100%; margin: 12px; border-radius: 14px; background: linear-gradient(135deg, #10204a, #0f3b54); color: #fff; padding: 5% 6%; display: grid; grid-template-columns: 1fr; gap: 4%; align-items: center; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.vw-slide.has-img { grid-template-columns: 1.1fr 1fr; }
.vw-slide img { width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.vw-slide h1 { font-size: clamp(22px, 3.4vw, 52px); margin: 0 0 3%; line-height: 1.1; text-wrap: balance; }
.vw-slide ul { margin: 0; padding-left: 1.2em; font-size: clamp(14px, 1.6vw, 26px); line-height: 1.5; color: #d7e2f7; }
.vw-slide-n { color: #7ff0d2; font-weight: 700; letter-spacing: .1em; font-size: 13px; margin-bottom: 8px; }
.subtitle { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); width: min(900px, calc(100% - 300px)); background: rgba(5,9,22,.88); color: #fff; border-radius: 14px; padding: 12px 18px; font-size: 20px; line-height: 1.45; text-align: center; z-index: 3; pointer-events: none; }
.subtitle:empty { display: none; }
.subtitle .rest, .caption .rest { color: transparent; }
.room.presenting #avatarBox { position: fixed; right: 22px; bottom: 22px; width: 230px; height: 230px; border-radius: 50%; z-index: 45; box-shadow: 0 10px 40px rgba(0,0,0,.6), 0 0 0 3px rgba(46,230,184,.4); }
.room.presenting #avatarBox .caption, .room.presenting #avatarBox .status-chip { display: none; }
@media (max-width: 1000px) {
  .subtitle { width: calc(100% - 24px); bottom: 150px; font-size: 16px; }
  .room.presenting #avatarBox { width: 130px; height: 130px; right: 12px; bottom: 12px; }
}
.train-col { display: flex; flex-direction: column; }
.train-feed { height: 380px; flex: none; margin-top: 10px; }
.bubble.blocked { border-color: var(--red) !important; }
[hidden] { display: none !important; }
.grid2 > .card, .grid3 > .card, .grid4 > .card { margin-top: 0; }

/* ---------- panels, topbar, summaries, looks ---------- */
.shell { grid-template-columns: 250px 1fr; }
.side { overflow-y: auto; }
.nav a { display: flex; }
.badge { background: var(--blue); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 800; padding: 1px 8px; margin-left: 6px; }
.main-wrap { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 34px; border-bottom: 1px solid var(--line); background: var(--bg2); position: sticky; top: 0; z-index: 10; }
.me-chip { display: flex; align-items: center; gap: 9px; }
.me-chip .av { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--blue)); color: #04241c; display: grid; place-items: center; font-weight: 800; }
.sum-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 10px; }
.sum-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; transition: .15s; }
.sum-card:hover { border-color: var(--blue); transform: translateY(-1px); }
.hello { display: flex; align-items: center; gap: 20px; min-height: 230px; background: radial-gradient(circle at 85% 50%, #1b2b55, var(--card) 60%); }
.home-avatar { width: 260px; height: 230px; position: relative; flex-shrink: 0; }
.home-avatar canvas, .look-thumb canvas, .big-prev canvas { width: 100% !important; height: 100% !important; display: block; }
.lock-card { border-color: rgba(46,230,184,.35); background: linear-gradient(135deg, rgba(46,230,184,.06), var(--card)); }
.look-layout { display: grid; grid-template-columns: 380px 1fr; gap: 16px; align-items: start; }
.look-preview { position: sticky; top: 70px; }
.big-prev { height: 420px; border-radius: 12px; background: radial-gradient(circle at 50% 40%, #1b2b55, #0c1226 70%); }
.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.look-card { display: flex; flex-direction: column; gap: 3px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px 10px; cursor: pointer; color: var(--text); }
.look-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.look-thumb { height: 140px; border-radius: 9px; background: radial-gradient(circle at 50% 40%, #1b2b55, #0c1226 70%); margin-bottom: 6px; }
.look-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
input[type=color] { height: 42px; padding: 4px; cursor: pointer; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; }
@media (max-width: 900px) { .look-layout { grid-template-columns: 1fr; } .look-preview { position: static; } .hello { flex-direction: column; } .topbar { padding: 10px 16px; } }

/* ---------- clean meeting screen + controls drawer ---------- */
.room.clean { display: block; position: relative; height: 100vh; overflow: hidden; background: #0b1020; }
.clean-stage { position: absolute; inset: 0; background: radial-gradient(circle at 50% 42%, #1d2f5e 0, #0c1226 62%); }
.clean-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.clean-top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 14px max(20px, env(safe-area-inset-right, 0px)) 30px max(20px, env(safe-area-inset-left, 0px)); background: linear-gradient(rgba(8,12,26,.75), rgba(8,12,26,0)); flex-wrap: wrap; }
.clean-top .title { font-weight: 800; font-size: 16px; }
.clean-top .status-chip { position: static; }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: rgba(11,16,32,.75); color: var(--text); padding: 7px 13px; border-radius: 99px; cursor: pointer; font-weight: 700; font-size: 13px; backdrop-filter: blur(6px); }
.pill-btn:hover { border-color: var(--blue); }
.pill-btn.off { opacity: .55; }
.pill-btn.danger { color: var(--red); border-color: #5a2a36; }
.mini-meter { width: 46px; height: 6px; border-radius: 99px; background: var(--bg2); overflow: hidden; display: inline-block; }
.mini-meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width .08s; }
.clean .caption { left: 50%; right: auto; transform: translateX(-50%); width: min(920px, calc(100% - 40px)); bottom: 36px; font-size: 21px; text-align: center; z-index: 5; }
.clean-hint { position: absolute; left: 50%; transform: translateX(-50%); bottom: 34px; width: min(760px, calc(100% - 40px)); text-align: center; color: var(--muted); font-size: 14px; line-height: 1.6; z-index: 4; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(410px, 100%); z-index: 50; background: var(--bg2); border-left: 1px solid var(--line); box-shadow: -20px 0 60px rgba(0,0,0,.45); transform: translateX(105%); transition: transform .25s ease; display: flex; flex-direction: column; }
.drawer-open .drawer { transform: none; }
.drawer-head { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 16px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px 16px 30px; display: flex; flex-direction: column; gap: 18px; }
.drawer-body section { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.drawer-body section:last-child { border-bottom: 0; }
.drawer-body .live-feed { height: 260px; flex: none; margin-top: 8px; }
.room.presenting #avatarBox { position: fixed; inset: auto 22px 22px auto; width: 230px; height: 230px; border-radius: 50%; z-index: 45; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.6), 0 0 0 3px rgba(46,230,184,.4); }
.room.presenting #avatarBox > :not(canvas) { display: none !important; }
@media (prefers-reduced-motion: reduce) { .drawer { transition: none; } }
@media (max-width: 700px) { .clean .caption { font-size: 17px; bottom: 20px; } .room.presenting #avatarBox { width: 120px; height: 120px; inset: auto 10px 10px auto; } }
.train-av { position: relative; height: 210px; margin-top: 10px; border-radius: 12px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #1b2b55, #0c1226 70%); }
.train-av canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.train-feed { height: 300px; }
.grow { flex: 1; min-width: 0; }
.login .hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 45%; background: linear-gradient(transparent, rgba(11,16,32,.92)); pointer-events: none; }
.login .hero h1, .login .hero p { z-index: 1; text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.auth-box { width: 100%; max-width: 400px; }
.auth-box form, .auth-box #sent { max-width: none; }
.auth-tabs { display: flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 22px; }
.auth-tabs button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 9px; font-weight: 700; color: var(--muted); cursor: pointer; }
.auth-tabs button.on { background: var(--card2); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.demo-box { margin-top: 18px; border: 1px dashed rgba(255,200,97,.5); border-radius: 12px; padding: 12px; font-size: 13px; }
.demo-row { display: flex; align-items: center; gap: 10px; padding-top: 10px; }
.formside { overflow-y: auto; }

/* ---------- phones & small tablets ---------- */
.main .card { overflow-x: auto; }
@media (max-width: 800px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { min-width: 0; position: static; height: auto; padding: 12px 12px 6px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .brand { padding: 2px 4px 10px; }
  .nav { display: flex; flex-direction: row; gap: 4px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .nav .sec { display: none; }
  .nav a { flex: none; padding: 8px 12px; white-space: nowrap; }
  .nav a.on { box-shadow: inset 0 -3px 0 var(--accent); }
  .main { padding: 18px 16px 48px; }
  .topbar { padding: 8px 16px; flex-wrap: wrap; position: static; }
  .topbar > .muted { display: none; }
  .head h1 { font-size: 22px; }
  .main table { min-width: 560px; }
  .main input, .main select { max-width: 100% !important; }
  .modal { width: calc(100vw - 32px); max-width: none; }
}
