:root {
  --blue: #1a73e8; --blue-2: #4285f4; --red: #ea4335; --green: #34a853; --yellow: #fbbc04; --orange: #e8710a;
  --bg: #f6f8fc; --surface: #ffffff; --surface-2: #f1f3f8; --line: #e3e7ef; --text: #1f2430; --muted: #646d7e;
  --blue-soft: #e8f0fe; --green-soft: #e6f4ea; --yellow-soft: #fef7e0; --red-soft: #fce8e6;
  --shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 4px 16px rgba(20, 30, 60, .05);
  --radius: 16px;
  --font: "Google Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --blue: #8ab4f8; --blue-2: #8ab4f8; --red: #f28b82; --green: #81c995; --yellow: #fdd663; --orange: #fcad70;
    --bg: #0f1115; --surface: #181b22; --surface-2: #20242d; --line: #2b303b; --text: #e8eaed; --muted: #9aa0ab;
    --blue-soft: #1d2a40; --green-soft: #18301f; --yellow-soft: #33290f; --red-soft: #3a1d1b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
.muted { color: var(--muted); }
.tiny { font-size: 12.5px; }
.spacer { flex: 1; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.count { display: inline-block; min-width: 24px; padding: 0 8px; margin-left: 6px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; vertical-align: 2px; }

/* --- logo dots */
.logo-dots { display: inline-grid; grid-template-columns: repeat(2, 14px); gap: 4px; }
.logo-dots i { width: 14px; height: 14px; border-radius: 50%; }
.logo-dots i:nth-child(1) { background: #4285f4; } .logo-dots i:nth-child(2) { background: #ea4335; }
.logo-dots i:nth-child(3) { background: #34a853; } .logo-dots i:nth-child(4) { background: #fbbc04; }
.logo-dots.sm { grid-template-columns: repeat(2, 10px); gap: 3px; }
.logo-dots.sm i { width: 10px; height: 10px; }

/* --- buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 18px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { color: #0f1115; } }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); background: transparent; }
.btn.small { padding: 6px 12px; font-size: 13.5px; }
.btn.block { width: 100%; padding: 12px; }
.link { background: none; border: 0; padding: 4px 6px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; border-radius: 8px; font-size: 13.5px; }
.link:hover { color: var(--text); background: var(--surface-2); }
.link.on { color: var(--green); font-weight: 600; }
.link.danger:hover { color: var(--red); }
.link svg { width: 16px; height: 16px; }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: 8px; color: var(--muted); cursor: pointer; display: inline-flex; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.danger:hover { color: var(--red); }
.icon-btn svg { width: 16px; height: 16px; }
input:not([type=checkbox]), textarea, select { width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 20%, transparent); }
textarea { resize: vertical; }
label { display: block; font-weight: 600; font-size: 14px; }
label > input, label > textarea { margin-top: 6px; font-weight: 400; }
.form-error { color: var(--red); min-height: 1.2em; margin: 8px 0 0; font-size: 14px; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pill { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.pill.ok { background: var(--green-soft); color: var(--green); }
.pill.wait { background: var(--yellow-soft); color: #b06000; }
.pill.off { background: var(--red-soft); color: var(--red); }
@media (prefers-color-scheme: dark) { .pill.wait { color: var(--yellow); } }

/* --- avatars */
.av { --c: #4285f4; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--c); color: #fff; font-size: 13px; font-weight: 700; flex: none; letter-spacing: .02em; }
.av.xs { width: 20px; height: 20px; font-size: 9.5px; }

/* --- login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(600px 300px at 10% 0%, color-mix(in srgb, #4285f4 14%, transparent), transparent),
  radial-gradient(500px 300px at 100% 100%, color-mix(in srgb, #34a853 12%, transparent), transparent), var(--bg); }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 36px 32px; box-shadow: var(--shadow); }
.login-card h1 { font-size: 26px; margin-top: 18px; }
.login-card h1 span { color: var(--muted); font-weight: 500; }
.login-card form { margin-top: 24px; display: grid; gap: 14px; }
.who { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface-2); border-radius: 14px; }
.who div { flex: 1; min-width: 0; } .who small { display: block; color: var(--muted); }
.note { margin: 0; padding: 10px 12px; background: var(--blue-soft); border-radius: 12px; font-size: 14px; }

/* --- topbar */
.topbar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 10px 24px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand b { display: block; font-size: 16px; white-space: nowrap; } .brand small { display: block; color: var(--muted); font-size: 12px; margin-top: -2px; }
.usermenu { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.tabs { display: flex; background: var(--surface-2); border-radius: 99px; padding: 3px; }
.tabs a { padding: 5px 14px; border-radius: 99px; color: var(--muted); font-weight: 600; font-size: 14px; }
.tabs a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.menu { position: relative; }
.menu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 10px 3px 3px; border-radius: 99px; font-weight: 600; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { background: var(--surface-2); }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 6px; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-head small { display: block; color: var(--muted); }
.menu-pop button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; }
.menu-pop button:hover { background: var(--surface-2); }

/* --- timer */
.timer { display: flex; align-items: center; gap: 12px; padding: 6px 8px 6px 16px; border-radius: 16px; background: var(--blue-soft); color: var(--blue); }
.timer .tlabel { font-size: 12.5px; font-weight: 600; max-width: 84px; line-height: 1.2; }
.tparts { display: flex; gap: 4px; }
.tp { display: grid; place-items: center; min-width: 46px; padding: 3px 4px; background: var(--surface); border-radius: 10px; }
.tp b { font-size: 19px; font-variant-numeric: tabular-nums; line-height: 1.15; color: var(--text); }
.tp small { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.timer.urgent { background: var(--red-soft); color: var(--red); }
.timer.urgent .tp b { color: var(--red); }
.timer.closed { background: var(--surface-2); color: var(--text); padding: 8px 16px; }
.timer.closed small { display: block; color: var(--muted); font-size: 12px; }

/* --- layout */
.layout { max-width: 1180px; margin: 0 auto; padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.col-main { display: grid; gap: 16px; }
.col-side { position: sticky; top: 92px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.col-main { grid-template-columns: minmax(0, 1fr); }
.board ol { grid-template-columns: minmax(0, 1fr); }
.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 24px 16px 40px; }

/* --- composer */
.composer { padding: 6px; }
.composer-row { display: flex; align-items: center; gap: 4px; }
.composer-row .plus { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--blue); color: #fff; margin-left: 4px; }
@media (prefers-color-scheme: dark) { .composer-row .plus { color: #0f1115; } }
.composer-row input { border: 0; font-size: 16px; padding: 12px; box-shadow: none !important; background: transparent; }
.composer-more { display: none; padding: 4px 10px 10px; }
.composer.open .composer-more { display: grid; gap: 10px; }
.composer-actions { display: flex; align-items: center; gap: 8px; }
.composer-actions .tiny { flex: 1; }

/* --- rights bar */
.rights { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding: 12px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.right-item { display: flex; align-items: center; gap: 8px; }
.right-item .lbl { color: var(--muted); font-size: 13.5px; }
.right-item.hint { flex: 1 1 260px; justify-content: flex-end; color: var(--muted); font-size: 13px; text-align: right; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.pips i.on { background: var(--yellow); box-shadow: 0 0 0 2px color-mix(in srgb, var(--yellow) 25%, transparent); }

/* --- toolbar */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.toolbar h2 { font-size: 20px; }
.seg { display: flex; background: var(--surface-2); border-radius: 99px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 99px; color: var(--muted); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg button:disabled { opacity: .45; cursor: not-allowed; }

/* --- topic cards */
.topics { display: grid; gap: 12px; }
.empty { padding: 40px; text-align: center; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius); }
.topic { display: grid; grid-template-columns: 76px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; scroll-margin-top: 100px; }
.topic.voted { border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); }
.topic.voted.double { border-color: color-mix(in srgb, var(--yellow) 70%, var(--line)); }
.topic.flash { box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 35%, transparent); }
.score-col { display: flex; flex-direction: column; align-items: center; padding: 18px 6px; border-right: 1px solid var(--line); gap: 1px; }
.score { font-size: 26px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.score.q { color: var(--muted); }
.score-col small { color: var(--muted); font-size: 11.5px; }
.score-col .rank { margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); padding: 1px 8px; border-radius: 99px; }
.topic.top1 .rank { background: #fde293; color: #7a5200; }
.topic.top2 .rank { background: #dadce0; color: #3c4043; }
.topic.top3 .rank { background: #f6c7a5; color: #7a3d0a; }
.tbody { padding: 16px 18px 10px; min-width: 0; }
.thead { display: flex; align-items: flex-start; gap: 10px; }
.thead h3 { font-size: 17px; flex: 1; overflow-wrap: anywhere; }
.badge { font-size: 11.5px; font-weight: 700; color: var(--green); background: var(--green-soft); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.desc { margin: 6px 0 0; color: var(--text); opacity: .85; white-space: pre-line; overflow-wrap: anywhere; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.meta .owner { display: inline-flex; align-items: center; gap: 6px; }
.voters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 3px; border-radius: 99px; background: var(--surface-2); font-size: 12.5px; }
.chip.dbl { background: var(--yellow-soft); }
.chip b { color: #b06000; } @media (prefers-color-scheme: dark) { .chip b { color: var(--yellow); } }
.vols { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.vols svg { width: 16px; height: 16px; color: var(--green); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.vote-btns { display: flex; gap: 6px; }
.vbtn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 14px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 13.5px; cursor: pointer; transition: all .15s; }
.vbtn svg { width: 15px; height: 15px; stroke-width: 3; }
.vbtn.single:hover { border-color: var(--blue); color: var(--blue); }
.vbtn.double:hover { border-color: var(--yellow); color: #b06000; }
.vbtn.single.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.vbtn.double.on { background: var(--yellow); border-color: var(--yellow); color: #3c2a00; }
@media (prefers-color-scheme: dark) { .vbtn.single.on { color: #0f1115; } .vbtn.double:hover { color: var(--yellow); } }
.vbtn:disabled { opacity: .6; }
.myvote { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--blue); font-size: 13.5px; }
.topic-edit { display: grid; gap: 8px; }

/* comments: göze batmayan */
.comments { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); display: grid; gap: 8px; font-size: 13.5px; }
.comment { display: flex; gap: 8px; }
.comment small { color: var(--muted); }
.comment p { margin: 1px 0 0; overflow-wrap: anywhere; white-space: pre-line; }
.comment .link { padding: 0 4px; font-size: 12px; }
.comment-form { display: flex; gap: 6px; }
.comment-form input { padding: 7px 12px; font-size: 13.5px; }

/* --- sidebar */
.board { padding: 18px; }
.board h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 12px; }
.board h3 svg { color: var(--yellow); }
.board ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.board li a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; color: var(--text); }
.board li a:hover { background: var(--surface-2); }
.pos { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); font-weight: 700; font-size: 13px; flex: none; }
.r1 .pos { background: #fbbc04; color: #3c2a00; } .r2 .pos { background: #bdc1c6; color: #202124; } .r3 .pos { background: #e8a87c; color: #3f1d00; }
.lb-body { flex: 1; min-width: 0; }
.lb-title { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { display: block; height: 5px; background: var(--surface-2); border-radius: 99px; margin-top: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #4285f4, #34a853); }
.r1 .bar i { background: linear-gradient(90deg, #fbbc04, #ea4335); }
.lb-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.hidden-board { text-align: center; padding: 28px 22px; }
.hidden-board svg { width: 32px; height: 32px; color: var(--muted); }
.hidden-board h3 { justify-content: center; margin: 8px 0 4px; }
.hidden-board p { margin: 0; font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); padding: 14px 8px; text-align: center; }
.stats div + div { border-left: 1px solid var(--line); }
.stats b { display: block; font-size: 22px; }
.stats b span { font-size: 14px; color: var(--muted); font-weight: 600; }
.stats small { color: var(--muted); font-size: 12px; }

/* --- closed banner / podium */
.closed-banner { grid-column: 1 / -1; padding: 24px; border-radius: 24px; background:
  linear-gradient(135deg, color-mix(in srgb, #4285f4 12%, var(--surface)), color-mix(in srgb, #34a853 10%, var(--surface))); border: 1px solid var(--line); text-align: center; }
.closed-banner h2 { font-size: 24px; display: flex; gap: 8px; align-items: center; justify-content: center; }
.cb-head p { margin: 4px 0 0; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin-top: 22px; }
.pod { flex: 1; max-width: 260px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pod b { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.pod small { color: var(--muted); }
.pscore { font-weight: 700; color: var(--blue); }
.medal { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-weight: 800; font-size: 18px; }
.p1 .medal { background: #fbbc04; color: #3c2a00; width: 52px; height: 52px; font-size: 22px; }
.p2 .medal { background: #bdc1c6; color: #202124; } .p3 .medal { background: #e8a87c; color: #3f1d00; }
.step { width: 100%; border-radius: 12px 12px 0 0; margin-top: 8px; }
.p1 .step { height: 70px; background: linear-gradient(#fbbc04, color-mix(in srgb, #fbbc04 40%, transparent)); }
.p2 .step { height: 46px; background: linear-gradient(#4285f4, color-mix(in srgb, #4285f4 40%, transparent)); }
.p3 .step { height: 30px; background: linear-gradient(#34a853, color-mix(in srgb, #34a853 40%, transparent)); }

/* --- admin */
.admin { max-width: 1080px; margin: 0 auto; padding: 24px; }
.admin-head { margin-bottom: 18px; }
.admin-head h1 { font-size: 26px; } .admin-head p { margin: 4px 0 0; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin .card { padding: 20px; }
.admin .card h2 { font-size: 17px; margin-bottom: 10px; }
.admin .card h2 small { font-weight: 500; font-size: 14px; }
.span2 { grid-column: 1 / -1; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline input, .inline select { width: auto; flex: 1 1 180px; }
.inline .arrow { color: var(--muted); font-size: 20px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.stack { display: grid; gap: 12px; }
.numrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.numrow small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.numrow input { width: 90px !important; text-align: center; margin: 0; }
.toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.toggle { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 12px; cursor: pointer; font-weight: 400; }
.toggle:hover { background: var(--surface-2); }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle b { display: block; font-size: 14.5px; } .toggle small { display: block; color: var(--muted); font-size: 12.5px; }
.sw { flex: none; width: 38px; height: 22px; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; margin-top: 2px; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.toggle input:checked + .sw { background: var(--blue); }
.toggle input:checked + .sw::after { transform: translateX(16px); }
.toggle input:focus-visible + .sw { outline: 2px solid var(--blue); outline-offset: 2px; }
.export-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; cursor: pointer; }
.md-preview { margin-top: 12px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table.users { width: 100%; border-collapse: collapse; font-size: 14px; }
.users th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12.5px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.users td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.users tr:last-child td { border-bottom: 0; }
.ucell { display: flex; align-items: center; gap: 10px; }
.ucell small { display: block; color: var(--muted); font-size: 12px; }
.dbl-cell { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
input.mini { width: 56px !important; padding: 4px 6px; text-align: center; border-radius: 8px; }
.row-actions { white-space: nowrap; text-align: right; }
.code-input { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.invite-row { padding: 10px 12px; margin-bottom: 12px; border-radius: 12px; background: var(--blue-soft); }
.invite-row label { font-size: 13.5px; }
.login-tabs { margin-top: 20px; }
.login-tabs button { flex: 1; }
.login-card form { margin-top: 16px !important; }
select { appearance: auto; }
.add-user { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

/* --- modal & toast */
dialog.modal { border: 1px solid var(--line); border-radius: 20px; padding: 24px; width: min(420px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog.modal::backdrop { background: rgba(10, 14, 25, .45); }
dialog.modal form { display: grid; gap: 12px; }
dialog.modal h2 { font-size: 20px; }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; width: max-content; max-width: calc(100vw - 32px); }
.toast { padding: 10px 18px; border-radius: 12px; background: #202124; color: #fff; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25); animation: tin .2s ease-out; transition: opacity .4s, transform .4s; }
.toast.ok { background: #137333; } .toast.error { background: #c5221f; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* --- responsive */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .col-side { position: static; order: -1; }
  .topbar { grid-template-columns: 1fr auto; padding: 10px 16px; }
  .topbar .timer { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .admin-grid, .toggles { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .layout, .admin { padding: 16px; }
  .hide-sm, .brand small { display: none; }
  .timer .tlabel { display: none; }
  .timer { padding: 6px; }
  .topic { grid-template-columns: 58px minmax(0, 1fr); }
  .tbody { padding: 14px 14px 8px; }
  .right-item.hint { text-align: left; justify-content: flex-start; }
  .podium { gap: 6px; } .pod b { font-size: 13px; }
  .login-card { padding: 28px 22px; }
  .numrow { flex-wrap: wrap; }
}
