/* Fodboldgrafik – dashboard (mørkt broadcast-tema) */
:root {
  --bg: #0c0e12;
  --panel: #14171e;
  --panel-2: #1a1e27;
  --panel-3: #222733;
  --line: #252a35;
  --line-2: #323947;
  --text: #e8ebf1;
  --muted: #8a93a5;
  --faint: #5c6476;
  --accent: #4c9dff;
  --accent-ink: #0b1a2e;
  --onair: #ff3434;
  --onair-soft: rgba(255, 52, 52, 0.14);
  --pvw: #27c46b;
  --pvw-soft: rgba(39, 196, 107, 0.14);
  --amber: #f5a524;
  --radius: 10px;
  --radius-sm: 7px;
  --topbar: 52px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 650; }
h4 { font-size: 14px; margin-bottom: 8px; }
code { font: 12px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--panel-3); padding: 2px 6px; border-radius: 5px; color: #cfd6e4; word-break: break-all; }
kbd { font: 11px ui-monospace, Menlo, monospace; background: var(--panel-3); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.spacer { flex: 1; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.ok { color: var(--pvw); }
.warn { color: var(--amber); }
.hint { color: var(--faint); font-size: 12px; margin: 6px 0 0; }
.loading { display: grid; place-items: center; height: 100vh; color: var(--muted); }

/* ------------------------------------------------------------ knapper */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--panel-3); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, transform 0.05s;
  text-decoration: none !important;
}
.btn:hover:not(:disabled) { background: #2a3040; border-color: #3d4556; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible, .icon-btn:focus-visible, .seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 13px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: 12px; }
.btn-xl { height: 52px; font-size: 16px; width: 100%; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: #6aaeff; border-color: #6aaeff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { background: var(--panel-3); color: var(--text); border-color: var(--line-2); }
.btn.danger, .btn-ghost.danger { color: #ff7b7b; }
.btn-danger { background: transparent; border-color: rgba(255, 52, 52, 0.45); color: #ff8080; }
.btn-danger:hover:not(:disabled) { background: var(--onair-soft); border-color: var(--onair); }
.btn-start { background: #16883f; border-color: #1fa04d; color: #fff; }
.btn-start:hover:not(:disabled) { background: #1a9a48; border-color: #22b356; }
.btn-stop { background: #3a1416; border-color: #a12a2e; color: #ffb3b3; }
.btn-stop:hover:not(:disabled) { background: #4a1719; }
.btn-live { background: var(--onair-soft); border-color: var(--onair); color: #ffb0b0; }
.btn-goal { background: var(--panel-3); border-color: var(--line-2); width: 100%; height: 40px; font-size: 15px; }
.btn-pvw { background: transparent; border-color: rgba(39, 196, 107, 0.55); color: #7be3a5; }
.btn-pvw:hover:not(:disabled) { background: var(--pvw-soft); border-color: var(--pvw); }
.btn-take { background: #d61f26; border-color: #ee2f36; color: #fff; min-width: 74px; letter-spacing: 0.04em; }
.btn-take:hover:not(:disabled) { background: #ec2a31; border-color: #ff4b51; }
.btn-take-soft { background: rgba(214, 31, 38, 0.16); border-color: rgba(238, 47, 54, 0.6); color: #ffb8ba; }
.btn-out { background: #2b1214; border-color: var(--onair); color: #ffb8ba; min-width: 74px; letter-spacing: 0.04em; }
.btn-out:hover:not(:disabled) { background: #3b1518; }
.btn-update { background: rgba(245, 165, 36, 0.14); border-color: rgba(245, 165, 36, 0.7); color: #ffd28a; }
.icon-btn {
  display: inline-grid; place-items: center; width: 26px; height: 26px;
  border: 0; border-radius: 6px; background: transparent; color: var(--faint); cursor: pointer; font-size: 13px;
}
.icon-btn:hover { background: var(--panel-3); color: var(--text); }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; }

/* ------------------------------------------------------------ formularer */
input, select, textarea {
  font: inherit; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  height: 34px; padding: 0 10px; width: 100%; min-width: 0;
}
textarea { height: auto; padding: 8px 10px; resize: vertical; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
select { padding-right: 26px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(76, 157, 255, 0.18); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type='checkbox'] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; flex: none; }
input[type='time'] { width: 120px; }
.input-num { width: 64px; flex: none; }
.input-min { width: 120px; flex: none; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12px; color: var(--muted); font-weight: 600; }
.field-inline { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.field-inline select { width: auto; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check.small { font-size: 12px; color: var(--muted); }
.inline { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.btn-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid .narrow { max-width: 140px; }

/* segmenteret vælger */
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 3px; gap: 3px; }
.seg.wrap { flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600;
  padding: 6px 12px; border-radius: 5px; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15;
}
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--panel-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg.small button { padding: 4px 10px; font-size: 13px; }
.seg-kicker { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); font-weight: 700; }
.seg button.active .seg-kicker { color: var(--accent); }

.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--panel-3); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--pvw-soft); color: #7be3a5; }
.pill.warn { background: rgba(245, 165, 36, 0.14); color: #ffcf7f; }

/* ------------------------------------------------------------ topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  height: var(--topbar); padding: 0 16px;
  background: #0f1217; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text) !important; font-weight: 700; text-decoration: none !important; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: #e5262b; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 0.02em; }
.match-picker select { width: 240px; height: 32px; background-color: var(--panel-2); }
.tabs { display: flex; gap: 2px; }
.tabs a { padding: 7px 12px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 600; text-decoration: none; }
.tabs a:hover { color: var(--text); background: var(--panel-2); }
.tabs a.active { color: var(--text); background: var(--panel-3); }
.pkg-name { font-size: 12px; color: var(--muted); border: 1px solid var(--line-2); padding: 3px 8px; border-radius: 6px; }
.onair-pill { font-size: 12px; font-weight: 700; color: #fff; background: var(--onair); padding: 3px 9px; border-radius: 11px; letter-spacing: 0.02em; }
.conn { font-size: 12px; color: #ff9b9b; display: flex; align-items: center; gap: 6px; }
.conn::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--onair); }
.conn.ok { color: var(--muted); }
.conn.ok::before { background: var(--pvw); }

.main { padding: 14px; }

/* ------------------------------------------------------------ paneler */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.panel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; min-height: 26px; }
.panel-head.sub { margin-top: 20px; }
.notice { background: rgba(245, 165, 36, 0.1); border: 1px solid rgba(245, 165, 36, 0.35); color: #ffd28a; padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 12px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 50vh; text-align: center; color: var(--muted); }
.empty-state h2 { color: var(--text); }

/* ------------------------------------------------------------ live */
.route-live { padding: 12px; }
.live {
  display: grid;
  grid-template-columns: minmax(290px, 330px) minmax(380px, 1fr) minmax(400px, 1.1fr);
  gap: 12px;
  height: calc(100vh - var(--topbar) - 24px);
}
.col { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; padding-right: 2px; }
.col::-webkit-scrollbar { width: 8px; }
.col::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }

.clock-panel { display: flex; flex-direction: column; gap: 10px; }
.clock-panel .panel-head { margin-bottom: 0; }
.clock-panel .panel-head .pill { margin-left: auto; }
.clock-display { text-align: center; padding: 4px 0 2px; }
.clock-text {
  font: 700 58px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
  background: none; border: 0; color: var(--text); cursor: text; padding: 0 8px; border-radius: 8px;
}
.clock-text:hover { background: var(--panel-2); }
.clock-display.running .clock-text { color: #fff; }
.clock-display:not(.running) .clock-text { color: #c3c9d6; }
.clock-display.held .clock-text { color: var(--amber); }
.clock-edit input { font: 700 50px/1 ui-monospace, Menlo, monospace; height: 64px; text-align: center; }
.clock-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.nudge .btn { padding: 0; }
.periods { display: grid; grid-template-columns: repeat(4, 1fr); }
.periods button { align-items: center; }
.added-row { display: flex; align-items: center; gap: 8px; }
.added-row .label { font-size: 12px; color: var(--muted); font-weight: 600; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; }
.stepper button { width: 30px; height: 30px; border: 0; background: var(--panel-3); color: var(--text); font-size: 16px; cursor: pointer; }
.stepper button:disabled { opacity: 0.4; cursor: not-allowed; }
.stepper b { min-width: 38px; text-align: center; font-variant-numeric: tabular-nums; }
.added-row .btn { margin-left: auto; }

.score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.score-team { display: flex; flex-direction: column; align-items: stretch; gap: 6px; text-align: center; }
.score-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score-num { font: 800 46px/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; }

.events-panel { flex: 1; min-height: 160px; display: flex; flex-direction: column; }
.events { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.event { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-top: 1px solid var(--line); font-size: 13px; }
.event:first-child { border-top: 0; }
.ev-min { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 40px; color: var(--muted); }
.tag { font-size: 10px; font-weight: 800; letter-spacing: 0.06em; padding: 2px 6px; border-radius: 4px; }
.tag.goal { background: rgba(76, 157, 255, 0.16); color: #8cc0ff; }
.tag.sub { background: rgba(245, 165, 36, 0.14); color: #ffcf7f; }
.ev-text { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.ev-text small { color: var(--faint); }
.in { color: #7be3a5; }
.out { color: #ff9b9b; }

/* grafik-kort */
.gcard {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px 12px; cursor: pointer;
  border-left: 4px solid var(--line-2);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.gcard:hover { border-color: var(--line-2); }
.gcard.previewing { border-left-color: var(--pvw); box-shadow: inset 0 0 0 1px rgba(39, 196, 107, 0.25); }
.gcard.onair { border-left-color: var(--onair); background: linear-gradient(90deg, var(--onair-soft), transparent 60%), var(--panel); box-shadow: inset 0 0 0 1px rgba(255, 52, 52, 0.35); }
.gcard-head { display: flex; align-items: center; gap: 8px; }
.gcard-title { font-weight: 700; font-size: 15px; }
.badge { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; padding: 3px 7px; border-radius: 4px; }
.badge-onair { background: var(--onair); color: #fff; animation: pulse 1.6s ease-in-out infinite; }
.badge-changed { background: rgba(245, 165, 36, 0.18); color: #ffcf7f; }
@keyframes pulse { 50% { opacity: 0.65; } }
.gcard-body { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; cursor: default; }
.gcard-body .hint { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; background: var(--panel-3); border: 1px solid var(--line-2); border-radius: 14px; font-size: 12px; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip-x { border: 0; background: transparent; color: var(--faint); cursor: pointer; border-radius: 50%; width: 18px; height: 18px; line-height: 1; }
.chip-x:hover { color: var(--text); background: var(--line-2); }
.sub-form { display: grid; grid-template-columns: 1fr 1fr 120px; gap: 6px; }
.sub-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sub-list .check { font-size: 13px; padding: 4px 2px; }

/* monitorer */
.monitor { display: flex; flex-direction: column; gap: 6px; }
.monitor-head { display: flex; align-items: center; gap: 8px; }
.monitor-label { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; background: var(--panel-3); color: var(--muted); }
.monitor.pvw .monitor-label { background: var(--pvw); color: #04140a; }
.monitor.pgm .monitor-label { background: var(--onair); color: #fff; }
.monitor-actions { margin-left: auto; display: flex; gap: 6px; }
.monitor-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; border: 2px solid var(--line-2); }
.monitor.pvw .monitor-frame { border-color: rgba(39, 196, 107, 0.7); }
.monitor.pgm .monitor-frame { border-color: rgba(255, 52, 52, 0.75); }
.monitor-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.output-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.output-box .label { font-size: 12px; color: var(--muted); font-weight: 600; }
.copy-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.copy-row code { flex: 1; min-width: 0; }
.copy-row.big code { font-size: 13px; padding: 7px 10px; }

/* ------------------------------------------------------------ dialog */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(5, 6, 9, 0.7); display: grid; place-items: center; padding: 20px; backdrop-filter: blur(2px); }
.modal { width: min(520px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.modal.wide { width: min(880px, 100%); }
.modal-head { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 17px; flex: 1; }
.modal-body { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.goal-top { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.minute-field { width: 120px; }
.goal-flags { display: flex; gap: 20px; flex-wrap: wrap; }
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.player-btn { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--panel-2); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.player-btn:hover { border-color: var(--accent); }
.player-btn.bench { opacity: 0.6; }
.player-btn.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); opacity: 1; }
.player-btn .num { font-weight: 800; min-width: 22px; font-variant-numeric: tabular-nums; }
.player-btn .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------ opstilling */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.save-state { font-size: 12px; color: var(--faint); min-width: 64px; text-align: right; }
.save-state.busy { color: var(--amber); }
.lineup-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.lineup-stage .monitor-frame { border-color: var(--line-2); }
.lineup-side { display: flex; flex-direction: column; gap: 12px; }
.slots { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.slots li { display: flex; align-items: center; gap: 6px; padding: 3px; border-radius: var(--radius-sm); border: 1px solid transparent; }
.slots li.selected { border-color: var(--accent); background: rgba(76, 157, 255, 0.08); }
.slot-role { width: 30px; flex: none; font-size: 11px; font-weight: 800; color: var(--faint); text-align: center; letter-spacing: 0.04em; }
.slots select { height: 32px; }
.cap-btn { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--faint); font-weight: 800; cursor: pointer; }
.cap-btn.active { background: #ffd400; border-color: #ffd400; color: #1a1600; }
.cap-btn:disabled { opacity: 0.3; cursor: default; }
.bench-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; max-height: 260px; overflow-y: auto; }
.bench-list .num { display: inline-block; min-width: 20px; color: var(--muted); }
.quick-add { display: grid; grid-template-columns: 60px 1fr 1fr auto; gap: 6px; }

/* ------------------------------------------------------------ hold */
.teams-view, .match-view { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; align-items: start; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.list li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.list li:hover { background: var(--panel-2); }
.list li.active { background: var(--panel-3); box-shadow: inset 3px 0 0 var(--accent); }
.team-short { font-weight: 800; font-size: 11px; letter-spacing: 0.06em; color: var(--muted); background: var(--panel-3); border-radius: 4px; padding: 2px 5px; min-width: 38px; text-align: center; }
.logo-thumb { height: 34px; width: auto; border-radius: 4px; background: #fff2; padding: 2px; }
.logo-field .btn input { display: none; }
.import-box { display: flex; flex-direction: column; gap: 8px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 12px; }
.import-box .hint { margin: 0; }
.table-wrap { overflow-x: auto; }
.players-table { width: 100%; border-collapse: collapse; }
.players-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); font-weight: 700; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.players-table td { padding: 3px 4px; }
.players-table input, .players-table select { height: 30px; background-color: transparent; border-color: transparent; }
.players-table tr:hover input, .players-table tr:hover select, .players-table input:focus, .players-table select:focus { background-color: var(--panel-2); border-color: var(--line-2); }
.players-table .c-num { width: 64px; }
.players-table .c-num input { text-align: center; font-weight: 700; }
.players-table .c-pos { width: 130px; }

/* ------------------------------------------------------------ kamp */
.match-list { display: flex; flex-direction: column; gap: 10px; }
.new-match { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.match-settings { display: flex; flex-direction: column; gap: 18px; }
.output-card, .danger-zone { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--panel-2); }
.guide { margin: 0; padding-left: 20px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.guide b { color: var(--text); }
.output-card .link { align-self: flex-start; }

/* ------------------------------------------------------------ pakker */
.packages-view { display: flex; flex-direction: column; gap: 14px; }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.pkg-card { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.pkg-card.current { border-color: rgba(39, 196, 107, 0.5); }
.pkg-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; cursor: pointer; }
.pkg-thumb iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.pkg-thumb:hover { outline: 2px solid var(--accent); }
.pkg-info { display: flex; flex-direction: column; gap: 4px; }
.pkg-info h3 { font-size: 17px; text-transform: none; letter-spacing: 0; color: var(--text); }
.pkg-info p { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.tag-sm { font-size: 11px; color: var(--muted); background: var(--panel-3); border-radius: 4px; padding: 2px 6px; }
.pkg-upload { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; border-style: dashed; border-width: 2px; cursor: pointer; min-height: 260px; color: var(--muted); }
.pkg-upload:hover, .pkg-upload.over { border-color: var(--accent); background: rgba(76, 157, 255, 0.06); }
.pkg-upload.busy { opacity: 0.6; pointer-events: none; }
.pkg-upload h3 { color: var(--text); font-size: 16px; text-transform: none; letter-spacing: 0; }
.upload-icon { font-size: 34px; color: var(--accent); }
.help ol { margin: 10px 0; padding-left: 20px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.help h3 { color: var(--text); text-transform: none; letter-spacing: 0; font-size: 15px; }
.preview-tabs { margin-bottom: 4px; }

/* ------------------------------------------------------------ toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--panel-3); border: 1px solid var(--line-2); padding: 10px 14px; border-radius: 9px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4); max-width: 380px; animation: toast-in 0.18s ease-out; }
.toast.error { background: #3a1416; border-color: #a12a2e; color: #ffd0d0; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ------------------------------------------------------------ login */
.login-page { display: grid; place-items: center; min-height: 100vh; background: radial-gradient(1200px 600px at 50% -10%, #1d2230, var(--bg)); }
.login-card { width: min(360px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.brand.big { font-size: 18px; justify-content: center; margin-bottom: 4px; }
.login-card .error { margin: 0; color: #ff9b9b; font-size: 13px; }

/* ------------------------------------------------------------ mindre skærme */
@media (max-width: 1280px) {
  .live { grid-template-columns: 290px minmax(0, 1fr); height: auto; }
  .col-right { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .col-right > .btn, .col-right > .output-box { grid-column: 1 / -1; }
  .col { overflow: visible; }
  .lineup-grid { grid-template-columns: 1fr; }
  .match-picker select { width: 180px; }
}
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
  .tabs { order: 10; width: 100%; overflow-x: auto; }
  .live, .teams-view, .match-view { grid-template-columns: 1fr; }
  .col-right { grid-template-columns: 1fr; }
  .sub-form { grid-template-columns: 1fr 1fr; }
  .main { padding: 10px; }
}
