:root {
    --bg: #0f1115;
    --bg-elev: #1a1d24;
    --fg: #f2f2f2;
    --fg-dim: #9aa0a6;
    --accent: #ffb400;
    --accent-dim: #b37d00;
    --err: #ff6b6b;
    --ok: #51cf66;
    --warn: #e0a94a;
    --border: #2a2f3a;
    --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    line-height: 1.5;
}

main {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

h1 {
    color: var(--accent);
    margin: 0 0 1rem;
    font-size: clamp(2rem, 6vw, 3.2rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.05;
    text-shadow: 0 0 24px rgba(255, 180, 0, 0.28);
}
/* Home (.hero .wordmark) + admin (.admin-header h1) both override via
   higher specificity — they keep their own treatments. */

p.lead { color: var(--fg-dim); }

a { color: var(--accent); }

/* ---------- Flash messages ---------- */
.flash {
    padding: .75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    background: var(--bg-elev);
}
.flash-error { border-color: var(--err); color: var(--err); }
.flash-success { border-color: var(--ok); color: var(--ok); }

/* ---------- Landing page ---------- */
.home {
    max-width: 640px;
    margin: 0 auto;
    padding: 4rem 1.25rem 4rem;
    min-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    position: relative;
    isolation: isolate;
}
.home::before {
    /* Soft orange glow behind the wordmark — sets the vibe without an image. */
    content: "";
    position: absolute;
    top: 3rem;
    left: 50%;
    width: min(90vw, 520px);
    height: 260px;
    transform: translateX(-50%);
    background: radial-gradient(
        ellipse at center,
        rgba(255, 180, 0, 0.22) 0%,
        rgba(255, 180, 0, 0.08) 40%,
        transparent 70%
    );
    filter: blur(40px);
    pointer-events: none;
    z-index: -1;
}

.hero { text-align: center; }
.hero .wordmark {
    font-size: clamp(2.8rem, 11vw, 5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--accent);
    margin: 0;
    text-shadow: 0 0 32px rgba(255, 180, 0, 0.35);
}
.hero .wordmark .dot {
    color: var(--fg);
    font-weight: 600;
    opacity: 0.65;
}
.hero .tagline {
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    color: var(--fg);
    font-weight: 600;
    margin: 1.25rem 0 0.4rem;
}
.hero .blurb {
    color: var(--fg-dim);
    font-size: 0.95rem;
    max-width: 50ch;
    margin: 0 auto;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.action {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 1rem;
    padding: 1.1rem 1.3rem;
    border-radius: 14px;
    text-decoration: none;
    font: inherit;
    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.2s ease,
        background-color 0.15s ease;
}
.action-title {
    grid-column: 1;
    grid-row: 1;
    font-weight: 700;
    font-size: 1.05rem;
}
.action-sub {
    grid-column: 1;
    grid-row: 2;
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 0.15rem;
}
.action-chevron {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-size: 1.3rem;
    opacity: 0.7;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.action:hover .action-chevron {
    transform: translateX(4px);
    opacity: 1;
}

.action-primary {
    background: var(--accent);
    color: #0a0a0a;
    border: 1px solid var(--accent);
    box-shadow: 0 8px 24px rgba(255, 180, 0, 0.22);
}
.action-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(255, 180, 0, 0.32);
    background: #ffc020;
}

.action-secondary {
    background: var(--bg-elev);
    color: var(--fg);
    border: 1px solid var(--border);
}
.action-secondary:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: #1e222b;
}

.join-hint {
    text-align: center;
    color: var(--fg-dim);
    font-size: 0.9rem;
    margin: 0;
}
.join-hint::before {
    content: "";
    display: block;
    width: 2rem;
    height: 1px;
    background: var(--border);
    margin: 0 auto 1rem;
}

/* ---------- Forms ---------- */
.submit-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}
.field { display: flex; flex-direction: column; gap: .35rem; }
.field > span { font-size: .9rem; color: var(--fg-dim); }
.field > span small { color: var(--fg-dim); opacity: .7; }

.submit-form input[type="text"],
.submit-form input[type="email"],
.submit-form input[type="number"],
.submit-form input:not([type]),
.submit-form select,
.submit-form textarea {
    width: 100%;
    padding: .7rem .85rem;
    background: var(--bg-elev);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
}
.submit-form input:focus,
.submit-form select:focus,
.submit-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.submit-form textarea { resize: vertical; min-height: 80px; }

/* Hide the default number-input spin buttons — they render with a
   white chrome in dark theme that clashes with everything else. Keeps
   the input plain; the user can still type or use arrow keys. */
.submit-form input[type="number"]::-webkit-inner-spin-button,
.submit-form input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.submit-form input[type="number"] { -moz-appearance: textfield; }

.options { display: grid; grid-template-columns: 1fr; gap: .75rem; }

.correct-group {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .75rem 1rem 1rem;
    margin: 0;
}
.correct-group legend { padding: 0 .4rem; color: var(--fg-dim); font-size: .9rem; }
.radio {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-right: 1rem;
}

.btn-primary {
    background: var(--accent);
    color: #000;
    border: none;
    padding: .85rem 1.2rem;
    border-radius: var(--radius);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}
.btn-primary:hover { background: var(--accent-dim); }

/* Honeypot — push offscreen, keep accessible for screen readers that ignore hidden. */
.honeypot {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

small.err { color: var(--err); }

.back { margin-top: 2rem; }
.back a { color: var(--fg-dim); text-decoration: none; }
.back a:hover { color: var(--accent); }

/* Wider screens: two-column option grid. */
@media (min-width: 640px) {
    .options { grid-template-columns: 1fr 1fr; }
}

/* ---------- Host setup specifics ---------- */
.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.hint { color: var(--fg-dim); font-size: .9rem; }
.hint.err { color: var(--err); }
.radio.block { display: flex; margin: .25rem 0; }

/* ---------- Lobby ---------- */
.lobby { position: relative; }
.share-card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 1.5rem 0;
    display: grid;
    gap: 1rem;
}
.share-url-row {
    display: flex;
    gap: .5rem;
}
.share-url-row input {
    flex: 1;
    padding: .7rem .85rem;
    background: var(--bg);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
    min-width: 0;
}
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.share-btn {
    display: inline-block;
    padding: .5rem .9rem;
    background: var(--bg);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    font-size: .9rem;
}
.share-btn:hover { border-color: var(--accent); }

.qr {
    margin: 0;
    text-align: center;
    background: #fff;
    padding: 1rem;
    border-radius: var(--radius);
}
.qr img {
    display: block;
    margin: 0 auto;
    image-rendering: pixelated;
}
.qr figcaption {
    color: var(--bg);
    font-size: .85rem;
    margin-top: .5rem;
}

.players { margin: 1.5rem 0; }
.players h2 {
    font-size: 1.1rem;
    color: var(--fg);
    margin: 0 0 .5rem;
}
.players #player-count { color: var(--fg-dim); font-weight: 400; }
#player-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .4rem;
}
.player {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .85rem;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.player .dot {
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    background: var(--ok);
    flex-shrink: 0;
}
.player.is-offline .dot { background: var(--fg-dim); }
.player .name { font-weight: 600; }
.player.is-host .name::after { content: ''; }
.player .tag {
    margin-left: auto;
    padding: .15rem .5rem;
    background: var(--accent);
    color: #000;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
}
.player.is-offline .name { color: var(--fg-dim); }

.mute-toggle {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-elev);
    color: var(--fg);
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.mute-toggle:hover { border-color: var(--accent); }

.btn-primary[disabled] {
    opacity: .55;
    cursor: not-allowed;
}

/* ---------- Game phase panels ---------- */
.panel { }
.panel[hidden] { display: none !important; }

.progress { color: var(--fg-dim); font-size: .95rem; margin: 0 0 .5rem; }
.progress small { margin-left: .5rem; opacity: .8; }

.timer-bar {
    height: .5rem;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    margin: 1rem 0;
}
.timer-fill {
    height: 100%;
    background: var(--accent);
    width: 100%;
}

/* Question options: 2x2 buttons */
#panel-question .options {
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin: 1rem 0;
}
.opt {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-elev);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
    text-align: left;
    cursor: pointer;
    min-height: 3.5rem;
}
.opt strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: .9rem;
    flex-shrink: 0;
}
.opt:hover:not([disabled]) { border-color: var(--accent); }
.opt.chosen { border-color: var(--accent); background: #1f1a0a; }
.opt[disabled] { opacity: .6; cursor: default; }

/* Distribution bars */
.distribution {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: grid;
    gap: .35rem;
}
.distribution li {
    display: grid;
    grid-template-columns: 1.5rem 1fr 2rem;
    gap: .5rem;
    align-items: center;
}
.distribution .lbl { font-weight: 700; color: var(--fg-dim); }
.distribution .bar {
    height: .6rem;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
}
.distribution .fill {
    display: block;
    height: 100%;
    background: var(--fg-dim);
}
.distribution .is-correct .fill { background: var(--ok); }
.distribution .is-correct .lbl { color: var(--ok); }
.distribution .count { text-align: right; color: var(--fg-dim); font-variant-numeric: tabular-nums; }

/* Opdracht (punishment) callout — the `Opdracht:` label sits inline with
   the player name(s) on the first line, with the sentence below. */
.punishment {
    background: #2a1010;
    border: 1px solid var(--err);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}
.punishment p { margin: .25rem 0; }
.punishment .opdracht-line { display: flex; gap: .4em; flex-wrap: wrap; }
.punishment .opdracht-label { color: var(--err); font-weight: 600; }
.punishment .sentence { font-size: 1.15rem; font-weight: 600; }

/* Leaderboard */
.leaderboard {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: grid;
    gap: .3rem;
}
.leaderboard li {
    display: grid;
    grid-template-columns: 2rem 1fr auto auto;
    gap: .75rem;
    align-items: center;
    padding: .55rem .85rem;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-variant-numeric: tabular-nums;
}
.leaderboard .rank { color: var(--fg-dim); font-weight: 700; }
.leaderboard .name { font-weight: 600; }
.leaderboard .pts { color: var(--ok); font-weight: 600; }
.leaderboard .total { color: var(--fg); font-weight: 700; min-width: 3rem; text-align: right; }
.leaderboard .is-me { border-color: var(--accent); }
.leaderboard .is-me .name::after { content: ' (jij)'; color: var(--accent); font-weight: 400; font-size: .85em; }
.leaderboard.big li { padding: .85rem 1rem; font-size: 1.05rem; }
.leaderboard.final li:first-child {
    background: linear-gradient(to right, #2a2110, var(--bg-elev));
    border-color: var(--accent);
}
.leaderboard.final li:first-child .rank::after { content: ' 🏆'; }

/* ---------- Pause overlay ---------- */
.pause-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 1rem;
}
.pause-overlay[hidden] { display: none; }
.pause-card {
    background: var(--bg-elev);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.pause-card h2 { color: var(--accent); margin-top: 0; }
#pause-countdown { font-variant-numeric: tabular-nums; }

/* ---------- Killed reason note on game-end panel ---------- */
#ge-reason { color: var(--err); }
#ge-reason[hidden] { display: none; }

/* ---------- Admin dashboard ---------- */
.admin-shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1rem 4rem;
}
.admin-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}
.admin-header h1 {
    font-size: 1.4rem;
    margin: 0;
}
.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}
.admin-nav a {
    padding: .5rem .85rem;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--fg);
    text-decoration: none;
    font-size: .9rem;
}
.admin-nav a:hover { border-color: var(--accent); }
.admin-nav a.active { background: var(--accent); color: #000; border-color: var(--accent); }

.admin-main h2 { margin-top: 0; font-size: 1.2rem; color: var(--fg); }
.admin-main h2 .muted { font-weight: 400; color: var(--fg-dim); }
.admin-main h3 { margin-top: 2rem; font-size: 1rem; color: var(--fg); }
.muted { color: var(--fg-dim); }

.admin-card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}
.admin-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: .75rem;
}
.admin-card-head strong { display: block; font-size: 1.05rem; }
.admin-card-head small { color: var(--fg-dim); font-size: .85rem; }

.admin-form {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: .75rem;
}
.admin-form-reject {
    border-top: 1px dashed var(--border);
    padding-top: .75rem;
}
.admin-form input[type="text"],
.admin-form input:not([type]),
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: .55rem .75rem;
    background: var(--bg);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
}
.admin-form .field > span { font-size: .8rem; color: var(--fg-dim); }
.admin-form .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}
.admin-form .row-4 {
    grid-template-columns: repeat(2, 1fr);
}

.admin-search {
    display: flex;
    gap: .5rem;
    margin: 1rem 0;
}
.admin-filter-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: .5rem 0 .25rem;
}
.admin-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}
.admin-pager .is-disabled {
    opacity: .4;
    pointer-events: none;
}
.admin-card-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-top: .5rem;
}
.admin-card-actions form {
    display: contents;
}
.admin-card-actions-secondary {
    border-top: 1px solid var(--border);
    padding-top: .75rem;
    margin-top: .75rem;
    gap: .65rem;
}
/* Pushes the Opslaan button to the right of the action row, leaving
   delete/flag/retry on the left. Works because .admin-card-actions is a
   flex container. */
.save-push-right { margin-left: auto; }

/* Unify all 4 admin-card action buttons to the same box-height. The icon
   stays square (width == height); text buttons share padding with warn/ghost;
   primary shrinks from its default tall shape to match. Scoped so the
   site-wide .btn-primary elsewhere keeps its oversized look. */
.admin-card-actions .btn-icon,
.admin-card-actions .btn-primary,
.admin-card-actions .btn-warn,
.admin-card-actions .btn-ghost {
    min-height: 2.4rem;
    box-sizing: border-box;
}
.admin-card-actions .btn-primary {
    padding: .5rem .85rem;
}
.admin-card-actions .btn-icon {
    width: 2.4rem;
    height: 2.4rem;
}

/* Circular icon-only button — used for the delete trashcan on each
   approved-question card. Keeps the action visible without dominating
   the row with red "Verwijder" text. Confirm() dialog still guards it. */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--fg-dim);
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-icon:hover { color: var(--fg); border-color: var(--fg-dim); }
.btn-icon-danger:hover {
    color: #fff;
    background: var(--err);
    border-color: var(--err);
}

/* Bordered field wrapper — same visual box as `.correct-group`, used for
   the Taal dropdown so both fields on the row read as a grouped control. */
.field-group {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .5rem .75rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.field-group legend {
    padding: 0 .4rem;
    color: var(--fg-dim);
    font-size: .9rem;
}
.field-group select,
.field-group input { margin: 0; }
.btn-warn {
    display: inline-flex;
    align-items: center;
    padding: .5rem .85rem;
    background: transparent;
    color: var(--warn, #e0a94a);
    border: 1px solid var(--warn, #e0a94a);
    border-radius: var(--radius);
    font: inherit;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.btn-warn:hover {
    background: var(--warn, #e0a94a);
    color: var(--bg);
}
.admin-search input {
    flex: 1;
    padding: .55rem .75rem;
    background: var(--bg-elev);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
}
.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: .5rem .85rem;
    background: var(--bg-elev);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    font: inherit;
}
.btn-danger {
    background: var(--err);
    color: #fff;
    border: none;
    padding: .55rem .9rem;
    border-radius: var(--radius);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.btn-danger:hover { filter: brightness(.9); }
.btn-sm { font-size: .8rem; padding: .35rem .65rem; }

.opt-list {
    list-style: none;
    padding: 0;
    margin: .5rem 0;
    display: grid;
    gap: .25rem;
}
.opt-list li {
    padding: .35rem .65rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .9rem;
}
.opt-list li.is-correct {
    border-color: var(--ok);
    color: var(--ok);
    font-weight: 600;
}

.slug-urls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}
@media (max-width: 720px) {
    .slug-urls { grid-template-columns: 1fr; }
}
.slug-urls code {
    display: block;
    padding: .45rem .65rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .8rem;
    overflow-x: auto;
    white-space: nowrap;
}
.copy-field {
    display: flex;
    margin-top: .25rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .15s ease;
}
.copy-field:focus-within { border-color: var(--fg-dim); }
.copy-field input {
    flex: 1;
    min-width: 0;
    padding: .5rem .7rem;
    background: transparent;
    color: var(--fg);
    border: none;
    outline: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .82rem;
    text-overflow: ellipsis;
}
.btn-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    padding: 0;
    background: transparent;
    color: var(--fg-dim);
    border: none;
    border-left: 1px solid var(--border);
    cursor: pointer;
    transition: color .15s ease, background .15s ease;
}
.btn-copy:hover { color: var(--fg); background: var(--bg-elev); }
.btn-copy:active { background: var(--border); }
.btn-copy svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.btn-copy .icon-check { display: none; }
.btn-copy.is-copied { color: var(--ok); }
.btn-copy.is-copied .icon-copy { display: none; }
.btn-copy.is-copied .icon-check { display: inline-block; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
    margin-top: 1rem;
}
.admin-table th,
.admin-table td {
    padding: .55rem .5rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.admin-table th {
    color: var(--fg-dim);
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.admin-table tr:hover { background: var(--bg-elev); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .75rem;
    margin: 1rem 0 2rem;
}
.stat-card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    font-size: .85rem;
    color: var(--fg-dim);
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.stat-card .big {
    font-size: 1.8rem;
    color: var(--accent);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ai-review-box {
    margin: 0 0 1rem;
    padding: .6rem .75rem;
    border-left: 3px solid var(--border);
    background: rgba(255, 255, 255, .02);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: .9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
}
.ai-review-box.ai-pass { border-left-color: var(--ok, #4ade80); }
.ai-review-box.ai-flag { border-left-color: var(--err, #ef4444); }
.ai-review-box .ai-notes {
    margin: .25rem 0 0;
    flex: 1 1 100%;
    color: var(--fg-dim);
}
.ai-retry-form { margin-left: auto; }
.badge {
    display: inline-block;
    padding: .1rem .5rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.badge-pass { background: rgba(74, 222, 128, .15); color: #4ade80; }
.badge-flag { background: rgba(239, 68, 68, .15); color: #ef4444; }
.btn-ghost {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: var(--fg-dim);
    border: 1px solid var(--border);
    padding: .5rem .85rem;
    border-radius: var(--radius);
    font: inherit;
    cursor: pointer;
}
.btn-ghost:hover { color: var(--fg); border-color: var(--fg-dim); }
