:root {
  color-scheme: light;
  font-family: 'Segoe UI', system-ui, sans-serif;
  --surface: #fff;
  --canvas: #f5faff;
  --ink: #17384f;
  --muted: #526b7b;
  --line: #d7e7f1;
  --accent: #245d80;
  --accent-dark: #17384f;
  --accent-soft: #d9effb;
  --club-sky: #b9e1fa;
  --warning: #843911;
  --warning-soft: #fff0da;
  --danger: #9b292e;
  --radius: 14px;
  --shadow: 0 3px 12px #17384f0a;
}

*, *::before, *::after { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; background: linear-gradient(180deg, #e8f5fc, var(--canvas) 320px); color: var(--ink); line-height: 1.5; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent-dark); text-underline-offset: 3px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #448bb1; outline-offset: 3px; }
h1, h2, h3, p { margin-block: 0; }
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: -.04em; }
h2 { font-size: 1.3rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; }
small { font-size: .84rem; }

.app-shell { width: min(100% - 32px, 1260px); margin: 0 auto; padding: 20px 0 48px; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 2px 18px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 750; letter-spacing: -.025em; }
.brand img { width: 38px; height: 58px; object-fit: contain; flex-shrink: 0; }
.brand-caption { display: block; color: var(--muted); font-size: .72rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow { font-size: .72rem; letter-spacing: .11em; text-transform: uppercase; font-weight: 800; color: var(--accent-dark); }
.muted { color: var(--muted); }
.panel.admin-hero, .live-topbar {
  background: repeating-radial-gradient(circle at 90% 180%, transparent 0 34px, #b9e1fa17 35px 36px, transparent 37px 58px), linear-gradient(120deg, #17384f, #112e42);
  border: 1px solid #244962;
  border-radius: var(--radius);
  color: #fff;
}
.admin-hero .muted, .live-topbar .eyebrow { color: var(--club-sky); }
.admin-hero .admin-summary span + span { border-color: #a7d3eb55; }
.live-topbar { padding: clamp(14px, 3vw, 24px); }
.stack, .grid { display: grid; gap: 14px; }
.panel {
  min-width: 0;
  padding: clamp(14px, 2vw, 22px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 24px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: .79rem;
  font-weight: 700;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  text-align: center;
}
.button:hover:not(:disabled) { background: var(--canvas); border-color: #9bbdd1; }
.admin-tabs .button[aria-current='page'] { background: var(--accent-soft); border-color: #a9cfe4; color: var(--ink); }
.button-primary, .button.primary, .button[aria-selected='true'] {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.button-primary:hover:not(:disabled), .button.primary:hover:not(:disabled), .button[aria-selected='true']:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}
.button-small { min-height: 34px; padding: 4px 10px; font-size: .87rem; }
.button-danger, .button.danger { color: var(--danger); }
button:disabled, select:disabled { cursor: default; opacity: .58; }
.field { display: grid; gap: 4px; min-width: 0; color: var(--ink); font-size: .9rem; font-weight: 650; }
input, select {
  min-width: 0;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid #a7c1d3;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}
.field > input, .field > select { width: 100%; }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr)); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { background: var(--canvas); color: var(--muted); font-size: .8rem; }
tbody tr:last-child td { border-bottom: 0; }
.notice { padding: 10px 13px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-dark); }
.notice.error, .notice[data-kind='error'] { color: var(--danger); background: #fcebed; }
dialog {
  width: min(100% - 24px, 560px);
  max-height: calc(100% - 32px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 16px 45px #172c3540;
}
dialog::backdrop { background: #152c3699; }

@media (max-width: 540px) {
  .app-shell { width: calc(100% - 24px); padding-top: 12px; }
  .topbar { padding-bottom: 12px; margin-bottom: 12px; }
  .brand img { width: 31px; height: 47px; }
  .live-topbar { padding: 14px; }
}
