:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #191812;
  background: #f3f0e8;
  --black: #090907;
  --charcoal: #161510;
  --gold: #c99a32;
  --gold-bright: #efc760;
  --gold-soft: #f7edcf;
  --ivory: #fffdf7;
  --muted: #716b5e;
  --green: #18743b;
  --red: #c92b2b;
  --border: #e6ddc8;
  --shadow: 0 18px 50px rgba(38, 30, 12, .09);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #f3f0e8; }
body { min-height: 100vh; margin: 0; background: radial-gradient(circle at 15% 0, #fffdf8 0, transparent 32rem), #f3f0e8; }

.site-header {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 12% 10%, rgba(239, 199, 96, .18), transparent 24rem),
    linear-gradient(125deg, #050504 0%, #17140d 58%, #090907 100%);
  border-bottom: 1px solid #d1a642;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .2);
}
.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
}
.header-shell {
  position: relative;
  z-index: 1;
  width: min(1500px, 100%);
  margin: auto;
  padding: 24px 36px 26px;
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) minmax(430px, .9fr);
  gap: 34px;
  align-items: center;
}
.brand-block { display: flex; align-items: center; gap: 22px; min-width: 0; }
.club-logo {
  width: 142px;
  height: 142px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .6)) drop-shadow(0 0 12px rgba(224, 176, 64, .2));
}
.brand-copy { min-width: 0; }
.brand-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--gold-bright);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
h1 { margin: 0 0 7px; color: #fffdf5; font-size: clamp(1.8rem, 3vw, 2.75rem); line-height: 1.05; letter-spacing: -.035em; }
h2 { margin: 0 0 12px; color: #17150f; letter-spacing: -.02em; }
h3 { letter-spacing: -.015em; }
p { margin: 0; }
.brand-copy p { max-width: 590px; color: #d4cbb8; line-height: 1.55; }

.header-panel { display: grid; justify-items: end; gap: 12px; }
header .meta, header .actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; flex-wrap: wrap; }
header .meta label { display: flex; align-items: center; gap: 8px; color: #eadfc7; font-size: .78rem; font-weight: 800; }
header .meta select { min-width: 104px; color: #17150f; background: #fffdf7; border-color: #b99239; }
header .meta button { padding: 9px 13px; }
.status-banner {
  max-width: 680px;
  padding: 8px 11px;
  border: 1px solid rgba(239, 199, 96, .22);
  border-radius: 9px;
  color: #d9cfba;
  background: rgba(255, 255, 255, .055);
  font-size: .78rem;
  text-align: right;
}

.hidden { display: none !important; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
button, .import {
  border: 1px solid #b88824;
  border-radius: 10px;
  padding: 10px 14px;
  color: #16130b;
  background: linear-gradient(180deg, #f3d476, #c9972d);
  box-shadow: 0 5px 14px rgba(110, 75, 10, .15);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
button:hover, .import:hover { transform: translateY(-1px); filter: brightness(1.035); box-shadow: 0 8px 18px rgba(110, 75, 10, .2); }
button:active, .import:active { transform: translateY(0); }
.disabled, button:disabled { opacity: .48; cursor: not-allowed; transform: none; box-shadow: none; }
.secondary { color: #282319; border-color: #d8cbae; background: #fffdf7; box-shadow: none; }
.ghost { color: #f1e8d4; border-color: rgba(239, 199, 96, .35); background: rgba(255, 255, 255, .08); box-shadow: none; }
.danger { color: white; border-color: #a81717; background: linear-gradient(180deg, #e34040, #b91c1c); }
.import input { display: none; }

nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 7px;
  padding: 11px max(36px, calc((100vw - 1500px) / 2 + 36px));
  overflow-x: auto;
  background: rgba(255, 253, 247, .94);
  border-bottom: 1px solid #ded3bb;
  box-shadow: 0 8px 24px rgba(42, 33, 13, .07);
  backdrop-filter: blur(14px);
}
nav button { white-space: nowrap; color: #4d473b; border-color: transparent; background: transparent; box-shadow: none; }
nav button:hover { color: #15120b; background: #f5ecd8; box-shadow: none; }
nav button.active { color: #fff7df; border-color: #2d2512; background: linear-gradient(135deg, #0a0907, #272116); box-shadow: inset 0 -2px #d8aa42, 0 7px 15px rgba(0, 0, 0, .14); }

main { width: min(1572px, 100%); min-height: 55vh; margin: auto; padding: 28px 36px 42px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.grid > .card { margin-bottom: 0; }
.card {
  margin-bottom: 20px;
  padding: 20px;
  overflow: hidden;
  background: rgba(255, 253, 247, .98);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.kpi { color: #9a6b0f; font-size: 34px; font-weight: 950; }
.small { color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }

table { width: 100%; border-collapse: collapse; overflow: hidden; background: #fffefb; border-radius: 12px; }
th, td { padding: 10px 11px; border-bottom: 1px solid #ece4d3; text-align: left; vertical-align: top; }
th { color: #fff7e7; background: linear-gradient(135deg, #0a0907, #242016); font-size: .78rem; letter-spacing: .015em; }
tr:hover td { background: #fcf8ed; }

input, select {
  box-sizing: border-box;
  padding: 9px;
  color: #1d1a13;
  background: #fffefb;
  border: 1px solid #d9cfb9;
  border-radius: 8px;
  font: inherit;
}
input:focus, select:focus { outline: 3px solid rgba(201, 154, 50, .2); border-color: #b98722; }
input[type="text"], input[type="date"], select { width: 100%; }
.num { max-width: 74px; }
.row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 180px; }
.pill { display: inline-flex; align-items: center; gap: 6px; margin: 4px 6px 4px 0; padding: 7px 10px; color: #3e382d; background: #f5efdf; border: 1px solid #e8ddc4; border-radius: 999px; }
.pill:has(input:checked) { color: #18140b; background: #f4dfa8; border-color: #c99a32; }
.pill input { width: auto; accent-color: #b9851d; }
.warn { background: #fff8e8; border-left: 4px solid #d99c22; }
.bad { background: #fff0f0; border-left: 4px solid #c92b2b; }
.ok { background: #f8f1dd; border-left: 4px solid #c99a32; }
.pools { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.pool { padding: 14px; background: #fffdf8; border: 1px solid #e5dcc8; border-radius: 14px; }
.match-count-2 { color: #c92b2b; font-weight: 900; }
.match-count-1 { color: #9a690c; font-weight: 850; }
.winner { color: #16713a; font-weight: 900; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.scroll { overflow: auto; }

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 30px 36px;
  color: #9d927c;
  background: #0b0a08;
  border-top: 1px solid #a67a21;
  font-size: .82rem;
}
footer img { width: 40px; height: 40px; object-fit: contain; opacity: .82; }
.footer-link { padding: 5px 8px; color: #e8cc85; background: transparent; border: 0; border-bottom: 1px solid #9e7929; border-radius: 0; font: inherit; }
.footer-link:hover { color: #fff4d2; background: transparent; transform: none; border-color: #e6c467; }

@media (max-width: 1000px) {
  .header-shell { grid-template-columns: 1fr; gap: 18px; }
  .header-panel { justify-items: start; }
  header .meta, header .actions { justify-content: flex-start; }
  .status-banner { text-align: left; }
}
@media (max-width: 760px) {
  .header-shell { padding: 18px; }
  .brand-block { align-items: flex-start; gap: 13px; }
  .club-logo { width: 88px; height: 88px; }
  .brand-kicker { font-size: .58rem; letter-spacing: .12em; }
  h1 { font-size: 1.55rem; line-height: 1.12; }
  .brand-copy p { font-size: .85rem; }
  main, nav, footer { padding-left: 16px; padding-right: 16px; }
  .toolbar { display: block; }
  th { position: static; }
  .card { padding: 16px; border-radius: 13px; }
}
