/* =====================================================================
   Banker Training & Assessment Portal – design system
   ===================================================================== */
:root {
  --navy-950: #071428; --navy-900: #0b1f3a; --navy-800: #12294b; --navy-700: #1b365f; --navy-600: #2a4a7a;
  --blue: #2457e6; --blue-600: #1d47c2; --blue-50: #eef3ff; --blue-100: #dbe6ff;
  --gold: #d4a72c; --gold-50: #fdf7e6;
  --bg: #f5f7fb; --card: #fff; --text: #0f1b2d; --text-2: #3b4a60; --muted: #6b7a90; --line: #e5e9f1; --line-2: #eef1f6;
  --ok: #0f8a4b; --ok-50: #e8f7ef; --bad: #c62828; --bad-50: #fdecec; --warn: #b7650b; --warn-50: #fff4e5;
  --c1: #2457e6; --c2: #d4a72c; --c3: #0d9488; --c4: #c2417e; --c5: #7a4cdc; --c6: #e56b1f;
  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --sh-1: 0 1px 2px rgba(11, 31, 58, .06); --sh-2: 0 1px 3px rgba(11, 31, 58, .06), 0 8px 24px rgba(11, 31, 58, .06);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14.5px/1.55 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; font-weight: 700; } h2 { font-size: 1.12rem; font-weight: 650; } h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); } .small { font-size: .84rem; } .tiny { font-size: .76rem; } .hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.end { justify-content: flex-end; }
.grow { flex: 1; min-width: 0; } .nowrap { white-space: nowrap; } .mt { margin-top: 16px; } .mb0 { margin-bottom: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1.6fr 1fr; align-items: start; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------------- app shell (admin) ---------------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, var(--navy-900), var(--navy-950)); color: #c9d4e6; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { padding: 20px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; color: #fff; }
.brand .logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #f0c64a, var(--gold)); color: var(--navy-900); display: grid; place-items: center; font-weight: 800; font-size: 1rem; box-shadow: 0 2px 8px rgba(212,167,44,.35); flex: none; }
.brand small { display: block; font-weight: 500; color: #8fa1bd; font-size: .74rem; letter-spacing: .02em; }
.sidenav { padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.sidenav .grp { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: #6f83a3; padding: 14px 12px 6px; }
.sidenav button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 12px; border: 0; border-radius: 8px; background: none; color: #c9d4e6; font: inherit; font-weight: 500; cursor: pointer; text-align: left; }
.sidenav button svg { width: 18px; height: 18px; opacity: .8; flex: none; }
.sidenav button:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidenav button.active { background: rgba(36,87,230,.22); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.sidenav .count { margin-left: auto; background: var(--ok); color: #fff; font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.sidefoot { padding: 14px; border-top: 1px solid rgba(255,255,255,.07); display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .82rem; color: #fff; background: var(--navy-600); flex: none; }
.sidefoot .who { flex: 1; min-width: 0; font-size: .82rem; } .sidefoot .who b { display: block; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); background: none; color: #c9d4e6; cursor: pointer; }
.iconbtn:hover { background: rgba(255,255,255,.08); color: #fff; } .iconbtn svg { width: 17px; height: 17px; }
.mainwrap { min-width: 0; display: flex; flex-direction: column; }
.pagebar { height: 64px; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 28px; position: sticky; top: 0; z-index: 20; }
.pagebar .crumbs { font-size: .84rem; color: var(--muted); } .pagebar .crumbs b { color: var(--text); font-weight: 600; }
.livepill { display: inline-flex; align-items: center; gap: 7px; background: var(--ok-50); color: var(--ok); font-weight: 600; font-size: .8rem; padding: 4px 11px; border-radius: 99px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.dot.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(15,138,75,.5); } 70% { box-shadow: 0 0 0 8px rgba(15,138,75,0); } 100% { box-shadow: 0 0 0 0 rgba(15,138,75,0); } }
.app main { padding: 26px 28px 60px; max-width: 1440px; width: 100%; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; } .sidenav { flex-direction: row; overflow-x: auto; padding: 8px; } .sidenav .grp, .sidefoot .who { display: none; }
  .sidenav button { width: auto; white-space: nowrap; } .sidebar .brand { display: none; } .sidefoot { position: absolute; top: 6px; right: 8px; border: 0; padding: 0; }
  .pagebar { padding: 0 16px; } .app main { padding: 18px 14px 50px; }
}

/* ---------------- simple top bar (candidate) ---------------- */
.topbar { background: var(--navy-900); color: #fff; padding: 0 20px; height: 60px; display: flex; align-items: center; gap: 18px; position: sticky; top: 0; z-index: 10; box-shadow: 0 2px 10px rgba(7,20,40,.15); }
.topbar nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.topbar nav button { background: none; border: 0; color: #c9d4e6; padding: 8px 12px; border-radius: 6px; cursor: pointer; font: inherit; white-space: nowrap; }
.topbar nav button.active, .topbar nav button:hover { background: var(--navy-700); color: #fff; }
.topbar .user { font-size: .85rem; color: #c9d4e6; display: flex; gap: 10px; align-items: center; }
body > main { max-width: 900px; margin: 0 auto; padding: 24px 18px 60px; }

/* ---------------- cards & stats ---------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h2 { margin: 0; }
.kpis { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--sh-1); display: flex; gap: 14px; align-items: flex-start; }
.kpi .ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--blue-50); color: var(--blue); }
.kpi .ic svg { width: 21px; height: 21px; }
.kpi .ic.g { background: var(--ok-50); color: var(--ok); } .kpi .ic.y { background: var(--gold-50); color: #a67c0d; } .kpi .ic.p { background: #f3edff; color: var(--c5); } .kpi .ic.r { background: #fdecf4; color: var(--c4); }
.kpi .v { font-size: 1.7rem; font-weight: 750; line-height: 1.1; letter-spacing: -.02em; } .kpi .l { color: var(--muted); font-size: .82rem; font-weight: 500; }
.stat { padding: 18px; } .stat b { display: block; font-size: 1.8rem; color: var(--navy-900); }
.hero { background: radial-gradient(1200px 300px at 100% 0, rgba(212,167,44,.18), transparent 60%), linear-gradient(120deg, var(--navy-900), var(--navy-700)); color: #fff; border-radius: var(--r-lg); padding: 24px 26px; margin-bottom: 18px; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.hero h1 { margin: 0 0 4px; } .hero p { margin: 0; color: #b9c6dc; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); } .empty svg { width: 42px; height: 42px; opacity: .45; margin-bottom: 8px; }

/* chart */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .colbar { width: 100%; max-width: 30px; background: linear-gradient(180deg, #5a83f0, var(--blue)); border-radius: 5px 5px 2px 2px; height: 0; min-height: 2px; transition: height .6s ease; }
.chart .col span { font-size: .68rem; color: var(--muted); }
.feed { list-style: none; margin: 0; padding: 0; } .feed li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: .86rem; } .feed li:last-child { border: 0; }
.feed .fi { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-top: 7px; flex: none; } .feed .fi.bad { background: var(--bad); } .feed .fi.ok { background: var(--ok); }

/* ---------------- forms ---------------- */
label { display: block; font-weight: 600; font-size: .84rem; margin-bottom: 5px; color: var(--text-2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #cfd7e4; border-radius: var(--r-sm); font: inherit; background: #fff; color: inherit; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 110px; resize: vertical; } textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: .86rem; min-height: 220px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,87,230,.15); }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 500; margin: 6px 0; color: var(--text); } .check input { margin-top: 3px; }
.field { margin-bottom: 14px; } .hint { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border-radius: var(--r-sm); border: 1px solid transparent; background: var(--navy-900); color: #fff;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: filter .15s, background .15s; }
.btn:hover { filter: brightness(1.18); } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--blue); } .btn.gold { background: var(--gold); color: var(--navy-900); } .btn.ok { background: var(--ok); } .btn.danger { background: var(--bad); }
.btn.ghost { background: #fff; color: var(--text); border-color: #cfd7e4; } .btn.ghost:hover { background: #f6f8fc; filter: none; }
.btn.sm { padding: 6px 11px; font-size: .82rem; } .btn.lg { padding: 13px 22px; font-size: 1rem; } .btn.block { width: 100%; }
.seg { display: inline-flex; border: 1px solid #cfd7e4; border-radius: var(--r-sm); overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 7px 13px; font: inherit; font-size: .84rem; cursor: pointer; color: var(--text-2); }
.seg button.on { background: var(--navy-900); color: #fff; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: .86rem; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 99px; background: #cfd7e4; position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--bad); } .switch input:checked::after { left: 19px; }

/* ---------------- tables ---------------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; background: #fafbfd; }
tbody tr:hover, table tr:hover td { background: #fafcff; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.table-wrap table tr:last-child td { border-bottom: 0; }
.namecell { display: flex; align-items: center; gap: 10px; } .namecell .avatar { width: 30px; height: 30px; font-size: .72rem; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: .72rem; font-weight: 650; background: #edf0f5; color: #3b4a60; text-transform: capitalize; white-space: nowrap; }
.badge.live, .badge.open, .badge.active { background: var(--ok-50); color: var(--ok); } .badge.closed, .badge.removed { background: var(--bad-50); color: var(--bad); }
.badge.draft { background: #edf0f5; } .badge.warn { background: var(--warn-50); color: var(--warn); }
.badge.quiz { background: var(--blue-50); color: var(--blue-600); } .badge.survey { background: #e3f6f3; color: #0b7569; } .badge.poll { background: var(--gold-50); color: #8a6508; }
.badge.case_study { background: #fdecf4; color: #a0285f; } .badge.brainstorm { background: #f3edff; color: #6236c4; }

/* ---------------- session page ---------------- */
.sesshead { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.sesshead h1 { margin: 2px 0 6px; }
.share { display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: center; }
.share img.qr { width: 132px; height: 132px; border-radius: 10px; border: 1px solid var(--line); padding: 6px; background: #fff; }
.linkbox { display: flex; border: 1px solid #cfd7e4; border-radius: var(--r-sm); overflow: hidden; }
.linkbox input { border: 0; border-radius: 0; font-family: ui-monospace, monospace; font-size: .84rem; background: #f7f9fc; }
.linkbox input:focus { box-shadow: none; } .linkbox .btn { border-radius: 0; }
@media (max-width: 640px) { .share { grid-template-columns: 1fr; } }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; font: inherit; font-weight: 550; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 7px; align-items: center; }
.tabs button.active { color: var(--navy-900); border-bottom-color: var(--blue); }
.tabs .n { background: #edf0f5; color: var(--text-2); font-size: .72rem; padding: 1px 7px; border-radius: 99px; }
.split { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } }
.act { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.act + .act { margin-top: 8px; } .act:hover { border-color: #b9c7e0; }
.act.current { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,87,230,.12); }
.act .num { width: 28px; height: 28px; border-radius: 8px; background: #edf0f5; display: grid; place-items: center; font-weight: 700; font-size: .8rem; color: var(--text-2); flex: none; }
.act .t { flex: 1; min-width: 0; } .act .t b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act select { width: auto; padding: 6px 8px; }
.user-act { width: auto; padding: 6px 8px; }

/* ---------------- results ---------------- */
.bar { margin: 9px 0; } .bar .lbl { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; }
.bar .track { height: 26px; background: #eef1f6; border-radius: 6px; overflow: hidden; margin-top: 4px; }
.bar .fill { height: 100%; width: 0; background: var(--c1); border-radius: 6px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.bar.correct .fill { background: var(--ok); } .bar.correct .lbl b::after { content: " ✓"; color: var(--ok); }
.bar:nth-child(6n+2) .fill { background: var(--c2); } .bar:nth-child(6n+3) .fill { background: var(--c3); }
.bar:nth-child(6n+4) .fill { background: var(--c4); } .bar:nth-child(6n+5) .fill { background: var(--c5); } .bar:nth-child(6n+6) .fill { background: var(--c6); }
.ideas { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.idea { background: #fffbea; border: 1px solid #f3e2a6; border-radius: 10px; padding: 13px; display: flex; flex-direction: column; gap: 8px; justify-content: space-between; }
.idea:nth-child(4n+2) { background: #eef4ff; border-color: #cddcfb; } .idea:nth-child(4n+3) { background: #eefaf4; border-color: #c4ead6; } .idea:nth-child(4n+4) { background: #fdf1f7; border-color: #f4d1e2; }
.idea.hiddenidea { opacity: .45; } .idea .meta { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--muted); }
.vote { border: 1px solid #cfd7e4; background: #fff; border-radius: 99px; padding: 3px 10px; cursor: pointer; font: inherit; font-size: .82rem; }
.vote.on { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.opt { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; background: #fff; margin: 8px 0; transition: border-color .15s, background .15s; }
.opt:hover { border-color: #a9c0f5; } .opt.sel { border-color: var(--blue); background: var(--blue-50); }
.opt.right { border-color: var(--ok); background: var(--ok-50); } .opt.wrong { border-color: var(--bad); background: var(--bad-50); } .opt input { margin: 0; }
.qblock { padding: 16px 0; border-bottom: 1px dashed var(--line); } .qblock:last-child { border-bottom: 0; }
.rating { display: flex; gap: 8px; margin-top: 8px; } .rating button { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--line); background: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.rating button.sel { background: var(--gold); border-color: var(--gold); color: var(--navy-900); }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.15rem; padding: 6px 12px; border-radius: 8px; background: #eef1f6; color: var(--navy-900); }
.timer.low { background: var(--bad-50); color: var(--bad); }
.casebox { background: #f8fafc; border-left: 4px solid var(--gold); padding: 14px 16px; white-space: pre-wrap; border-radius: 6px; max-height: 420px; overflow: auto; }
.md h2 { font-size: 1.05rem; margin-top: 1.1em; color: var(--navy-900); } .md h3 { font-size: .98rem; } .md ul { padding-left: 20px; }
.md blockquote { margin: 0 0 10px; padding: 9px 13px; background: var(--gold-50); border-radius: 6px; border-left: 3px solid var(--gold); }
.pill-code { font-family: ui-monospace, monospace; font-weight: 800; letter-spacing: 3px; background: var(--gold-50); color: var(--navy-900); border: 1px solid #ecd9a0; padding: 3px 10px; border-radius: 7px; }
pre.help { background: var(--navy-950); color: #dbe4f3; padding: 12px; border-radius: 8px; font-size: .8rem; overflow: auto; white-space: pre-wrap; }
code { background: #eef1f6; padding: 2px 6px; border-radius: 4px; font-size: .88em; }

/* ---------------- participants list (admin) ---------------- */
.plist { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.pitem { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pitem .avatar { position: relative; } .pitem .avatar .on { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: #b8c2d2; border: 2px solid #fff; }
.pitem .avatar .on.y { background: #1fbf6a; }
.pitem .t { flex: 1; min-width: 0; } .pitem .t b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pitem .t span { font-size: .76rem; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pitem.removed { opacity: .55; background: #fafafa; }

/* ---------------- login / join ---------------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-side { background: radial-gradient(900px 400px at 0 100%, rgba(212,167,44,.22), transparent 60%), linear-gradient(140deg, var(--navy-900), var(--navy-700)); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h2 { font-size: 2rem; line-height: 1.2; margin: 0 0 12px; letter-spacing: -.02em; } .auth-side p { color: #b9c6dc; max-width: 440px; }
.auth-side ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; color: #dbe4f3; } .auth-side li { display: flex; gap: 10px; align-items: center; }
.auth-side li i { width: 26px; height: 26px; border-radius: 7px; background: rgba(255,255,255,.1); display: grid; place-items: center; font-style: normal; font-size: .8rem; color: var(--gold); }
.auth-main { display: grid; place-items: center; padding: 30px 20px; }
.auth-card { width: 100%; max-width: 410px; }
.auth-card h1 { font-size: 1.5rem; } .auth-card .sub { color: var(--muted); margin-bottom: 22px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 22px 0; } .divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 860px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { padding: 26px 22px; } .auth-side ul, .auth-side .foot { display: none; } .auth-side h2 { font-size: 1.35rem; } }
.joinsess { background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; }
.joinsess b { display: block; color: var(--navy-900); }
.notice { background: var(--warn-50); border: 1px solid #f5d6a8; color: #7a4a06; padding: 10px 12px; border-radius: 8px; font-size: .84rem; margin-bottom: 14px; }
.success-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-50); color: var(--ok); display: grid; place-items: center; margin: 0 auto 14px; }
.success-ic svg { width: 34px; height: 34px; }

/* ---------------- modal + toast ---------------- */
.modal { position: fixed; inset: 0; background: rgba(7,20,40,.55); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 50; padding: 20px; animation: fade .15s; }
.modal .card { width: 100%; max-width: 760px; max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(7,20,40,.3); }
@keyframes fade { from { opacity: 0; } }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--navy-950); color: #fff; padding: 11px 18px; border-radius: 10px; z-index: 100; max-width: 90vw; box-shadow: var(--sh-2); font-weight: 500; }
#toast.err { background: var(--bad); } #toast.okk { background: var(--ok); }

/* =====================================================================
   PRESENTER SCREEN (projector)
   ===================================================================== */
.present { background: var(--navy-950); color: #fff; min-height: 100vh; overflow: hidden; font-size: 16px; }
.present .stage { height: 100vh; display: grid; grid-template-rows: auto 1fr auto; background: radial-gradient(1400px 700px at 85% -10%, rgba(36,87,230,.28), transparent 60%), radial-gradient(900px 600px at -10% 110%, rgba(212,167,44,.16), transparent 60%), var(--navy-950); }
.p-top { display: flex; align-items: center; justify-content: space-between; padding: 22px 40px; }
.p-top .brand { font-size: 1.05rem; } .p-top .brand small { color: #8fa1bd; }
.p-top .ctrl { display: flex; gap: 8px; opacity: .25; transition: opacity .2s; } .p-top:hover .ctrl { opacity: 1; }
.p-top .ctrl button { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 7px 12px; font: inherit; font-size: .82rem; cursor: pointer; }
.p-top .ctrl button.on { background: var(--blue); border-color: var(--blue); }
.p-body { min-height: 0; padding: 0 40px; display: flex; flex-direction: column; }
/* lobby */
.lobby { display: grid; grid-template-columns: minmax(320px, 30%) 1fr; gap: 40px; height: 100%; min-height: 0; padding-bottom: 20px; }
.joinpanel { background: #fff; color: var(--navy-900); border-radius: 22px; padding: 28px; display: flex; flex-direction: column; align-items: center; text-align: center; align-self: start; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.joinpanel .step { font-size: .82rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; }
.joinpanel img { width: 100%; max-width: 300px; aspect-ratio: 1; margin: 14px 0 12px; }
.joinpanel .url { font-size: 1.15rem; font-weight: 700; word-break: break-all; color: var(--navy-900); }
.joinpanel .or { color: var(--muted); font-size: .85rem; margin: 10px 0 6px; }
.joinpanel .code { font-family: ui-monospace, monospace; font-size: 2.3rem; font-weight: 800; letter-spacing: .18em; color: var(--navy-900); background: var(--gold-50); border: 2px dashed #e7cf87; padding: 4px 18px; border-radius: 12px; }
.roster { display: flex; flex-direction: column; min-height: 0; }
.roster-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.roster-head h1 { font-size: clamp(1.8rem, 3vw, 2.8rem); margin: 0; letter-spacing: -.02em; }
.roster-head p { color: #9fb0cc; margin: 6px 0 0; font-size: 1.05rem; }
.counter { text-align: right; } .counter .n { font-size: clamp(3rem, 7vw, 6rem); font-weight: 800; line-height: .95; letter-spacing: -.04em; background: linear-gradient(180deg, #fff, #c9d6f0); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.counter .l { color: #9fb0cc; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; font-size: .82rem; }
.names { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 12px; mask-image: linear-gradient(180deg, #000 85%, transparent); }
.nchip { display: inline-flex; align-items: center; gap: 11px; padding: 9px 18px 9px 9px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); font-size: 1.2rem; font-weight: 600; color: #f1f5fc; animation: chipIn .5s cubic-bezier(.2,.9,.3,1.3) both; }
.nchip .avatar { width: 38px; height: 38px; font-size: .9rem; }
.nchip.new { background: rgba(212,167,44,.22); border-color: rgba(212,167,44,.6); box-shadow: 0 0 0 4px rgba(212,167,44,.12); }
.nchip.off { opacity: .55; }
.names.dense .nchip { font-size: 1rem; padding: 6px 14px 6px 6px; } .names.dense .nchip .avatar { width: 30px; height: 30px; font-size: .74rem; }
.names.xdense { gap: 8px; } .names.xdense .nchip { font-size: .86rem; padding: 4px 11px 4px 4px; } .names.xdense .nchip .avatar { width: 24px; height: 24px; font-size: .64rem; }
@keyframes chipIn { from { opacity: 0; transform: translateY(14px) scale(.85); } }
.waiting { color: #9fb0cc; font-size: 1.3rem; display: flex; align-items: center; gap: 14px; padding: 30px 0; }
.waiting .dots span { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); margin-right: 5px; animation: bounce 1.2s infinite; }
.waiting .dots span:nth-child(2) { animation-delay: .15s; } .waiting .dots span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-8px); opacity: 1; } }
.ticker { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: rgba(255,255,255,.96); color: var(--navy-900); padding: 10px 20px; border-radius: 99px; font-weight: 700; font-size: 1.1rem; box-shadow: 0 10px 30px rgba(0,0,0,.3); display: flex; gap: 10px; align-items: center; animation: tick 3.2s ease forwards; }
@keyframes tick { 0% { opacity: 0; transform: translate(-50%, 20px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -10px); } }
/* results on presenter */
.p-results { background: #fff; color: var(--text); border-radius: 22px; padding: 30px 36px; flex: 1; min-height: 0; overflow: auto; margin-bottom: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.p-results h2 { font-size: clamp(1.5rem, 2.6vw, 2.3rem); } .p-results h3 { font-size: 1.4rem; }
.p-results .bar .track { height: 46px; border-radius: 10px; } .p-results .bar .fill { border-radius: 10px; } .p-results .bar .lbl { font-size: 1.3rem; }
.p-results .idea { font-size: 1.2rem; } .p-results table { font-size: 1.15rem; }
.p-foot { display: flex; align-items: center; justify-content: space-between; padding: 14px 40px; background: rgba(0,0,0,.25); border-top: 1px solid rgba(255,255,255,.06); font-size: 1rem; color: #c9d4e6; gap: 20px; }
.p-foot b { color: #fff; } .p-foot .code { font-family: ui-monospace, monospace; font-weight: 800; letter-spacing: .14em; color: var(--gold); font-size: 1.2rem; }
.p-foot img { width: 54px; height: 54px; background: #fff; border-radius: 6px; padding: 3px; }
@media (max-width: 900px) { .lobby { grid-template-columns: 1fr; overflow: auto; } .p-top, .p-body, .p-foot { padding-left: 18px; padding-right: 18px; } }
.present .no-present { display: none !important; } .present .p-results .card { border: 0; box-shadow: none; padding: 0; } .present .p-results .card + .card { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 20px; }
.center { text-align: center; } .auth-card .sub.center, #joinForm .sub { } .waitcard { text-align: center; padding: 34px 20px; } .waitcard .avatar { width: 64px; height: 64px; font-size: 1.4rem; margin: 0 auto 12px; }
.waitcard .waiting { justify-content: center; padding: 10px 0; }
/* layout fixes */
.grid-2 > .card + .card, .kpis > .card + .card { margin-top: 0; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.pitem select, .act select { width: 46px; flex: none; padding: 6px 4px; }
#enrol input { width: 150px; } #pSearch { flex: 1 1 260px; }
.act .t .row { gap: 6px; flex-wrap: nowrap; margin-top: 3px; }
.topbar .user { margin-left: auto; }
