/* ===================================================================
   OSIS Competition Suite — admin-sider (super-admin + arrangør)
   Bygger oven på styles.css (Beyond Vision-designsystemet fra LiveSync).
   =================================================================== */
[hidden] { display: none !important; }
.muted { color: var(--text-muted); }
.divider { height: 1px; background: var(--border); margin: 6px 0 16px; }
.actions { display: flex; gap: 10px; margin-top: 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .row2, .row3 { grid-template-columns: 1fr; } }
.stat-pill { font-family: var(--font-mono); font-size: .66rem; color: var(--text-muted); letter-spacing: .5px; }
@media (max-width: 900px) { .stat-pill { display: none; } }

/* ---------- Super-admin ---------- */
.admin-grid { display: grid; grid-template-columns: 420px 1fr; gap: 20px; padding: 22px 24px 40px; align-items: start; }
@media (max-width: 900px) { .admin-grid { grid-template-columns: 1fr; padding: 16px; } }
.sticky { position: sticky; top: 90px; }
@media (max-width: 900px) { .sticky { position: static; } }
.toggle { position: relative; width: 46px; height: 26px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border); cursor: pointer; transition: background .2s, border-color .2s; flex: none; padding: 0; }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-faint); transition: left .2s, background .2s; }
.toggle.on { background: var(--green); border-color: var(--green); }
.toggle.on::after { left: 22px; background: #fff; }
.toggle.fixed { opacity: .45; cursor: not-allowed; display: inline-block; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); }
.ev-card { display: flex; gap: 14px; align-items: center; padding: 16px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); transition: box-shadow .2s, opacity .2s; }
.ev-card:hover { box-shadow: var(--shadow-sm); }
.ev-card.inactive { opacity: .6; }
.ev-logo { width: 46px; height: 46px; border-radius: var(--r-sm); background: var(--surface-3); flex: none; display: grid; place-items: center; color: var(--text-faint); overflow: hidden; }
.ev-logo img { width: 100%; height: 100%; object-fit: cover; }
.ev-info { flex: 1; min-width: 0; }
.ev-name { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.color-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.ev-meta { font-family: var(--font-mono); font-size: .72rem; color: var(--text-muted); margin-top: 5px; display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; }
.ev-meta b { color: var(--text); }
.cred { font-family: var(--font-mono); background: var(--surface-3); border: 1px solid var(--border); padding: 1px 7px; border-radius: 6px; color: var(--text); }
.status-tag { font-family: var(--font-mono); font-size: .6rem; letter-spacing: 1px; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.status-tag.active, .status-tag.live { background: var(--green); color: var(--green-ink); }
.status-tag.paused, .status-tag.ready { background: var(--surface-3); color: var(--text-muted); border: 1px solid var(--border); }
.status-tag.done { background: transparent; color: var(--green-text); border: 1px solid var(--green); }
.status-tag.pending { background: var(--yellow); color: #201800; }
.ev-actions { display: flex; gap: 6px; align-items: center; flex: none; }
@media (max-width: 640px) { .ev-card { flex-wrap: wrap; } .ev-actions { width: 100%; justify-content: flex-end; } }
.module-list { border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); margin-bottom: 16px; }
.module-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--border); cursor: pointer; user-select: none; }
.module-row:first-child { border-top: none; cursor: default; }
.module-row .m-name { font-weight: 600; font-size: .88rem; }
.module-row .m-desc { color: var(--text-muted); font-size: .76rem; margin-top: 1px; }
.mod-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.mod-tag { font-family: var(--font-mono); font-size: .62rem; padding: 1px 7px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--border); color: var(--text-muted); }

/* ---------- Arrangør: faner ---------- */
.nav-tabs { display: flex; gap: 4px; padding: 12px 24px 0; border-bottom: 1px solid var(--border); overflow-x: auto; background: var(--bg); position: relative; z-index: 1; }
.nav-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border: none; border-bottom: 2px solid transparent; background: none; color: var(--text-muted); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.nav-tabs button svg { width: 16px; height: 16px; }
.nav-tabs button:hover { color: var(--text); }
.nav-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--green); }
.nav-tabs .n { font-family: var(--font-mono); font-size: .66rem; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-muted); }
.nav-tabs .n.warn { background: var(--yellow); color: #201800; }
@media (max-width: 640px) { .nav-tabs { padding: 8px 12px 0; } }
.page { padding: 22px 24px 60px; position: relative; z-index: 1; }
.page[hidden] { display: none; }
@media (max-width: 640px) { .page { padding: 16px 12px 60px; } }
.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.two-col.even { grid-template-columns: 1fr 1fr; }
@media (max-width: 980px) { .two-col, .two-col.even { grid-template-columns: 1fr; } }
.panel + .panel { margin-top: 20px; }
.panel-body { padding: 18px 20px; }
.hint { color: var(--text-muted); font-size: .82rem; line-height: 1.5; }
.hint code, .mono-s { font-family: var(--font-mono); font-size: .78rem; }

/* Toolbar: på banen nu */
.now-playing .np-sub { font-family: var(--font-mono); font-size: .7rem; color: var(--text-muted); margin-top: 2px; }
.judge-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-pass { background: var(--green); color: var(--green-ink); border-color: var(--green); }
.btn-pass:hover { background: var(--green-bright); }
.btn-fail { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-fail:hover { filter: brightness(1.08); }

/* Atletliste */
.list-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.list-tools .search { flex: 1 1 200px; position: relative; }
.list-tools .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-faint); }
.list-tools .search input { padding-left: 36px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-family: var(--font-mono); font-size: .72rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-muted); cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--green); color: var(--text); }
.chip.on { background: var(--green); border-color: var(--green); color: var(--green-ink); font-weight: 700; }
.a-row { display: grid; grid-template-columns: 38px 42px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 20px; border-top: 1px solid var(--border); }
.a-row:first-child { border-top: none; }
.a-row:hover { background: var(--surface-2); }
.a-row.selected { background: var(--green-soft); }
.a-rank { font-family: var(--font-mono); font-weight: 700; color: var(--text-muted); text-align: right; }
.a-name { font-weight: 700; display: flex; align-items: center; gap: 8px; min-width: 0; }
.a-name span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-meta { font-size: .76rem; color: var(--text-muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.a-score { font-family: var(--font-mono); font-weight: 700; font-size: 1.1rem; text-align: right; min-width: 44px; }
.a-score small { display: block; font-size: .58rem; font-weight: 500; color: var(--text-faint); letter-spacing: 1px; text-transform: uppercase; }
.a-actions { display: flex; gap: 4px; }
@media (max-width: 640px) { .a-row { grid-template-columns: 28px 36px minmax(0, 1fr) auto; padding: 10px 12px; } .a-actions { grid-column: 3 / -1; justify-content: flex-end; } }
.avatar { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; background: var(--surface-3); display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: var(--text-muted); flex: none; }
.flag { width: 20px; height: 14px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px var(--border); flex: none; }
.flag-none { display: none; }
.cat-badge { font-family: var(--font-mono); font-size: .6rem; font-weight: 700; letter-spacing: 1px; padding: 1px 7px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--border); color: var(--text-muted); }
.pending-box { border: 1px dashed var(--yellow); background: rgba(245, 184, 0, .07); border-radius: var(--r); margin: 16px 20px 4px; }
.pending-box h3 { margin: 0; padding: 12px 16px 4px; font-size: .9rem; }

/* Editor */
.qual-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; margin-bottom: 12px; }
.qual-grid label { font-family: var(--font-mono); font-size: .64rem; text-align: center; margin-bottom: 4px; }
.qual-grid select { padding: 8px 6px; text-align: center; background-image: none; padding-right: 6px; }
.total-line { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: var(--r-sm); background: var(--green-soft); margin-bottom: 16px; }
.total-line b { font-family: var(--font-mono); font-size: 1.5rem; color: var(--green-text); }
.img-pick { display: flex; gap: 12px; align-items: center; }
.img-pick .avatar { width: 56px; height: 56px; border-radius: 14px; }
.img-pick .field { flex: 1; margin: 0; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Finale */
.final-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); }
.final-card:first-child { border-top: none; }
.final-card.active { background: var(--green-soft); }
.final-card .fc-body { flex: 1; min-width: 0; }
.final-card .fc-title { font-weight: 700; display: flex; gap: 8px; align-items: center; }
.final-card .fc-meta { font-family: var(--font-mono); font-size: .7rem; color: var(--text-muted); margin-top: 3px; }
.onstage { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.onstage .avatar { width: 76px; height: 76px; border-radius: 20px; font-size: 1.3rem; }
.onstage .os-label { font-family: var(--font-mono); font-size: .64rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--green-text); }
.onstage .os-name { font-size: 1.6rem; font-weight: 800; letter-spacing: -.4px; line-height: 1.15; }
.onstage .os-sub { color: var(--text-muted); font-size: .86rem; margin-top: 2px; }
.judge-big { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.judge-big .btn { padding: 18px; font-size: 1.05rem; font-weight: 800; justify-content: center; }
.control-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.score-table-wrap { overflow-x: auto; }
table.scores { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.scores th { font-family: var(--font-mono); font-size: .62rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.scores td { padding: 9px 8px; border-bottom: 1px solid var(--border); }
table.scores tr.current td { background: var(--green-soft); }
table.scores td.num, table.scores th.num { text-align: center; font-family: var(--font-mono); }
table.scores td.total { font-family: var(--font-mono); font-weight: 800; text-align: center; }
table.scores button.cell { width: 38px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); font-family: var(--font-mono); font-weight: 700; }
table.scores button.cell:hover { border-color: var(--green); }
table.scores button.cell.empty { color: var(--text-faint); }
.order-btns { display: inline-flex; gap: 2px; }
.order-btns button { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); font-size: .7rem; }

/* Stemmer */
.vote-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 60px; gap: 10px; align-items: center; padding: 9px 20px; border-top: 1px solid var(--border); }
.vote-bar { grid-column: 2 / 3; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-top: 4px; }
.vote-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--cyan)); border-radius: 3px; }
.big-num { font-family: var(--font-mono); font-size: 2.2rem; font-weight: 800; }

/* Skærme */
.link-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--border); }
.link-card:first-child { border-top: none; }
.link-card .lc-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--green-soft); color: var(--green-text); display: grid; place-items: center; }
.link-card .lc-ic svg { width: 20px; height: 20px; }
.link-card.locked { opacity: .55; }
.link-card .lc-name { font-weight: 700; }
.link-card .lc-url { font-family: var(--font-mono); font-size: .7rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-card .lc-actions { display: flex; gap: 6px; }
.qr-row { display: flex; gap: 20px; flex-wrap: wrap; padding: 16px 20px; }
.qr-box { text-align: center; font-size: .8rem; font-weight: 600; }
.qr-box .qr { width: 150px; height: 150px; padding: 6px; background: #fff; border-radius: 12px; margin-bottom: 6px; }
.qr-box .qr svg { width: 100%; height: 100%; display: block; }
.deck-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 20px; border-top: 1px solid var(--border); font-size: .85rem; }
.deck-row code { font-family: var(--font-mono); font-size: .7rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .deck-row { grid-template-columns: 1fr auto; } .deck-row code { grid-column: 1 / -1; grid-row: 2; } }
.lock-note { font-family: var(--font-mono); font-size: .62rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 1px; }
