:root {
  --bg: #f7f8f6;
  --surface: #ffffff;
  --text: #16211c;
  --text-muted: rgba(22, 33, 28, 0.62);
  --border: rgba(0, 0, 0, 0.1);
  --accent: #0a7a4f;
  --accent-strong: #075c3b;
  --accent-fg: #ffffff;
  --accent-soft: #e6f3ec;
  --highlight: #f6c445;
  --danger: #c8102e;
  --danger-soft: #fbe9ec;
  --warn: #9a6400;
  --warn-soft: #fff4d6;
  --whatsapp: #1fa855;
  --primary-action: var(--accent);
  --primary-action-fg: var(--accent-fg);
  --radius: 8px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--text-muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Layout */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 10px 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { padding: 6px 10px; border-radius: 6px; color: var(--text); font-weight: 500; }
.nav a:hover, .nav a.active { background: var(--accent-soft); color: var(--accent-strong); text-decoration: none; }
.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.lang-switch button { border: 0; background: transparent; padding: 4px 9px; font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; color: var(--text-muted); }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); }
.container { max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px; }
.narrow { max-width: 560px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.stat .value { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .label { color: var(--text-muted); font-size: 0.85rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.footer { border-top: 1px solid var(--border); padding: 20px 16px; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; min-height: 38px; }
.btn:hover { text-decoration: none; border-color: rgba(0, 0, 0, 0.25); }
.btn-primary { background: var(--primary-action); border-color: var(--primary-action); color: var(--primary-action-fg); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-whatsapp { background: var(--whatsapp); border-color: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { filter: brightness(0.93); }
.btn-danger { color: var(--danger); }
.btn-sm { padding: 4px 10px; min-height: 30px; font-size: 0.85rem; }
.btn-lg { padding: 12px 22px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.inline { display: inline; }
.wa-icon { width: 16px; height: 16px; fill: currentColor; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.badge-ok { background: var(--accent-soft); color: var(--accent-strong); }
.badge-pending { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--danger-soft); color: var(--danger); }
.badge-open { background: #eef0f3; color: #3b4652; }
.badge-neutral { background: #eef0f3; color: #3b4652; }

/* Forms */
form p { margin: 0 0 14px; }
label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 0.9rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=tel], input[type=datetime-local], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 6px; font: inherit; background: #fff; color: var(--text); min-height: 40px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input[type=checkbox] { width: 18px; height: 18px; vertical-align: middle; margin-right: 6px; }
.checkbox-label { display: flex; align-items: center; font-weight: 500; }
.helptext, .form-help { display: block; color: var(--text-muted); font-size: 0.82rem; margin-top: 3px; font-weight: 400; }
.errorlist { list-style: none; padding: 0; margin: 4px 0; color: var(--danger); font-size: 0.85rem; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters > * { flex: 0 1 auto; }
.filters input, .filters select { width: auto; min-width: 140px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }

/* Messages */
.messages { list-style: none; padding: 0; margin: 0 0 18px; }
.messages li { padding: 10px 14px; border-radius: 6px; margin-bottom: 8px; border: 1px solid var(--border); background: var(--surface); }
.messages .success { background: var(--accent-soft); border-color: transparent; color: var(--accent-strong); }
.messages .error { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.messages .warning { background: var(--warn-soft); border-color: transparent; color: var(--warn); }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }
.game-line { font-weight: 600; }
.meta { color: var(--text-muted); font-size: 0.85rem; }
.conflicts { margin: 4px 0 0; padding-left: 18px; color: var(--danger); font-size: 0.85rem; }
.empty { color: var(--text-muted); padding: 20px 0; text-align: center; }
.code-box { font-family: var(--mono); font-size: 1.4rem; font-weight: 700; letter-spacing: 0.12em; background: var(--accent-soft); color: var(--accent-strong); padding: 8px 14px; border-radius: 6px; display: inline-block; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 16px; align-items: center; }
details summary { cursor: pointer; font-weight: 600; }

/* Landing */
.hero { background: var(--accent-strong); color: #fff; }
.hero-inner { max-width: 1200px; margin: 0 auto; padding: 64px 16px 72px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.02em; margin-bottom: 16px; }
.hero p.lead { font-size: 1.15rem; color: rgba(255, 255, 255, 0.86); max-width: 560px; }
.hero .btn { border-color: transparent; }
.hero .btn-light { background: #fff; color: var(--accent-strong); }
.hero .btn-yellow { background: var(--highlight); color: #2b2100; }
.hero-flag { display: flex; height: 6px; }
.hero-flag span { flex: 1; }
.phone-mock { background: #e9e2d6; border-radius: 22px; padding: 16px; max-width: 360px; margin-left: auto; border: 8px solid #0d1f17; }
.bubble { background: #fff; color: #111; border-radius: 10px; padding: 10px 12px; font-size: 0.88rem; line-height: 1.45; white-space: pre-line; margin-bottom: 10px; max-width: 92%; }
.bubble.me { background: #d9fdd3; margin-left: auto; width: fit-content; }
.section { max-width: 1200px; margin: 0 auto; padding: 56px 16px; }
.section h2 { font-size: 1.7rem; margin-bottom: 8px; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.feature { padding: 4px 0; }
.feature h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature .icon { width: 40px; height: 40px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-strong); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 10px; }
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.steps li::before { content: counter(step); display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--highlight); color: #2b2100; font-weight: 800; align-items: center; justify-content: center; margin-bottom: 8px; }
.cta-band { background: var(--text); color: #fff; text-align: center; }
.cta-band .section { padding: 48px 16px; }

/* Respond page */
.respond-card { max-width: 480px; margin: 24px auto; }
.respond-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

@media (max-width: 800px) {
  .hero-inner { grid-template-columns: 1fr; padding: 40px 16px 48px; }
  .phone-mock { margin: 0 auto; }
  .topbar-inner { gap: 8px 12px; }
  .nav { order: 3; flex: 1 0 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .nav a { white-space: nowrap; }
  .hide-sm { display: none; }
  .container { padding-top: 16px; }
}

/* Football redesign */
.ico { width: 28px; height: 28px; flex: none; color: var(--accent-strong); }
.hero-pitch { position: relative; overflow: hidden; background: #075c3b; }
.hero-pitch > .pitch-svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .35; --pitch: transparent; }
.hero-pitch .hero-inner { position: relative; padding: 80px 16px 88px; }
.hero-pitch h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); text-shadow: 0 2px 0 rgba(0,0,0,.15); }
.hero-badges { display: flex; gap: 10px; margin-bottom: 18px; }
.hero-badges .ico { width: 44px; height: 44px; color: #fff; background: rgba(255,255,255,.12); border-radius: 50%; padding: 8px; }
.btn-yellow { background: var(--highlight); color: #2b2100; border-color: var(--highlight); }
.btn-yellow:hover { filter: brightness(.95); }
.hero-card { background: #efe7da; border-radius: 18px; padding: 14px; max-width: 340px; margin-left: auto; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.hero-card-head { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #0d1f17; margin-bottom: 10px; }
.hero-card-head .ico { width: 22px; height: 22px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px 12px; font-weight: 700; }
.tile .ico { width: 44px; height: 44px; }
.pitch-section { text-align: center; }
.pitch { position: relative; aspect-ratio: 105 / 68; width: 100%; border-radius: 10px; overflow: visible; margin: 28px auto 24px; }
.pitch > .pitch-svg { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 10px; }
.pitch-demo { max-width: 860px; }
.pitch-chip { position: absolute; transform: translate(-50%, -50%); background: #fff; border-radius: 999px; padding: 5px 12px 5px 8px; display: flex; align-items: center; gap: 6px; box-shadow: 0 3px 10px rgba(0,0,0,.25); border: 3px solid #cfd6d2; max-width: 46%; white-space: nowrap; font-size: .82rem; }
.pitch-chip .ico { width: 20px; height: 20px; }
.pitch-chip .pitch-role { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.pitch-chip .pitch-name { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.pitch-accepted { border-color: #1fa855; }
.pitch-pending { border-color: var(--highlight); }
.pitch-declined { border-color: var(--danger); }
.pitch-open { border-color: #cfd6d2; border-style: dashed; }
.pitch-crew-wrap { margin: 18px 0 8px; padding: 0 4px; }
.pitch-crew-wrap .pitch { margin: 22px auto; max-width: 760px; }
.pitch-crew-wrap .pitch-chip { flex-direction: column; align-items: flex-start; gap: 0; border-radius: 10px; padding: 4px 10px; line-height: 1.25; }
.steps-icons li { display: flex; align-items: center; gap: 12px; }
.steps-icons li::before { margin-bottom: 0; flex: none; }
.steps-icons .ico { width: 32px; height: 32px; }
@media (max-width: 800px) {
  .hero-card { margin: 0 auto; }
  .pitch-chip { font-size: .68rem; padding: 3px 8px 3px 5px; border-width: 2px; }
  .pitch-chip .ico { display: none; }
  .pitch-crew-wrap .pitch-chip .pitch-name { display: none; }
}
