/* Admin page: dark, in the overlay's colors, usable on a phone. */
@font-face { font-family: 'Anton'; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/anton-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Saira Condensed'; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/saira-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Saira Condensed'; font-weight: 700; font-display: swap;
  src: url('/assets/fonts/saira-condensed-latin-700-normal.woff2') format('woff2'); }

:root {
  --bg: #0D0D10; --card: #131316; --card-2: #19191D; --line: #2B2B31; --line-2: #25252A;
  --text: #F6F6F7; --muted: #B3B3BC; --red: #E3121B; --red-2: #FF4A51; --ok: #3DDC84; --warn: #FFD34D;
  --display: Anton, Impact, sans-serif; --label: 'Saira Condensed', 'Arial Narrow', sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); color-scheme: dark; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
[hidden] { display: none !important; }
a { color: var(--red-2); }

.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; background: rgba(13, 13, 16, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top form { margin-left: auto; }
.brand { font-family: var(--display); font-size: 26px; letter-spacing: 0.03em; line-height: 1; }
.brand span { color: var(--red); }
.pill {
  font-family: var(--label); font-weight: 700; font-size: 14px; letter-spacing: 0.16em; padding: 4px 10px;
  border: 1px solid var(--line); color: var(--muted);
}
.pill.live { background: var(--red); border-color: var(--red); color: #fff; }

.grid { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 16px; max-width: 1240px; margin: 0 auto; }
@media (min-width: 980px) { .grid { grid-template-columns: 1fr 1fr; } .card.wide { grid-column: 1 / -1; } }

.card { background: var(--card); border: 1px solid var(--line); padding: 18px; min-width: 0; }
.card h2 {
  margin: -18px -18px 16px; padding: 10px 18px; font-family: var(--display); font-weight: 400; font-size: 22px;
  letter-spacing: 0.04em; text-transform: uppercase; background: linear-gradient(180deg, #F0212A 0%, #C80F17 100%);
}
.card h3 { margin: 18px 0 6px; font-family: var(--label); font-weight: 700; font-size: 16px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.count { font-family: var(--label); font-size: 16px; opacity: 0.85; }

.status { margin: 0 0 6px; font-size: 17px; }
.status.small { font-size: 14px; color: var(--muted); }
.hint { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.alert { margin: 8px 0; padding: 8px 10px; border-left: 3px solid var(--red); background: rgba(227, 18, 27, 0.12); color: #FFD6D8; font-size: 14px; }
.alert.warn { border-color: var(--warn); background: rgba(255, 211, 77, 0.1); color: #FFEBAF; }
.empty { color: var(--muted); margin: 8px 0; }

.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 10px 0; }
.row > input { flex: 1 1 120px; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.field.grow { flex: 1; margin: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; margin: 4px 14px 4px 0; font-size: 15px; color: var(--text); }
.checks { border: 1px solid var(--line-2); margin: 4px 0 12px; padding: 8px 12px 10px; }
.checks legend { font-size: 13px; color: var(--muted); padding: 0 4px; }

input, select {
  font: inherit; color: var(--text); background: var(--card-2); border: 1px solid var(--line);
  padding: 9px 10px; border-radius: 0; min-height: 40px; width: 100%;
}
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--red); }
input:focus, select:focus { outline: 2px solid var(--red); outline-offset: -1px; }
input[readonly] { color: var(--muted); }

button {
  font-family: var(--label); font-weight: 700; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text); background: var(--card-2); border: 1px solid var(--line); padding: 9px 14px; min-height: 40px;
  cursor: pointer;
}
button:hover { border-color: var(--muted); }
button:disabled { opacity: 0.45; cursor: default; }
button.primary { background: linear-gradient(180deg, #F0212A 0%, #B80D14 100%); border-color: #F0212A; color: #fff; }
button.danger { border-color: var(--red); color: var(--red-2); }
button.link { background: none; border: none; color: var(--muted); padding: 6px; min-height: 0; }
button.small { font-size: 12px; padding: 4px 8px; min-height: 30px; }

.actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.saved { color: var(--ok); font-family: var(--label); font-weight: 700; letter-spacing: 0.1em; }

#card-session .field { margin-top: 16px; }
.ball-pick { display: flex; align-items: center; gap: 10px; }
.ball-pick img { height: 44px; width: auto; }

.table-wrap { overflow-x: auto; }
table.games { width: 100%; border-collapse: collapse; font-size: 15px; }
table.games th { text-align: left; font-family: var(--label); font-weight: 700; letter-spacing: 0.1em; font-size: 13px; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.games td { padding: 7px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; white-space: nowrap; }
table.games td.score { font-family: var(--display); font-size: 20px; }
table.games tr.best td.score { color: #FF3B42; }
table.games td.course img { height: 28px; width: auto; vertical-align: middle; margin-right: 6px; }
table.games td.actions { text-align: right; }
table.games td input { min-height: 32px; padding: 4px 6px; width: 90px; }
table.games td.course input { width: 150px; }
.src { font-size: 11px; font-family: var(--label); letter-spacing: 0.1em; color: var(--muted); border: 1px solid var(--line); padding: 1px 5px; margin-left: 6px; }
@media (max-width: 600px) {
  table.games th:first-child, table.games td:first-child, .src { display: none; }
  table.games td { padding: 7px 4px; }
  table.games td.course { white-space: normal; }
  table.games td.actions button { padding: 4px 6px; font-size: 11px; letter-spacing: 0.04em; }
}

.clubs { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; }
.club { display: grid; grid-template-columns: 24px minmax(0, 1fr) 96px 34px 34px 34px; gap: 6px; align-items: center; }
.club .num { color: var(--muted); font-size: 13px; text-align: right; }
.club button { padding: 0; min-height: 36px; font-size: 15px; letter-spacing: 0; }
.club input { min-height: 36px; padding: 6px 8px; }

.preview { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border: 1px solid var(--line); }
.preview iframe { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; border: 0; transform-origin: 0 0; pointer-events: none; }

.copy { display: flex; gap: 6px; }
.steps { margin: 0 0 14px; padding-left: 20px; font-size: 14px; color: var(--muted); }
.steps li { margin: 4px 0; }
.steps b { color: var(--text); }

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 10; max-width: calc(100vw - 32px);
  background: var(--card-2); border: 1px solid var(--line); border-left: 4px solid var(--ok); padding: 10px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.toast.error { border-left-color: var(--red); }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.card.login { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
.card.login .brand { margin-bottom: 6px; }
