@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=IBM+Plex+Sans:wght@400;500;600;700&family=Roboto+Mono:wght@500;700&display=swap');

:root{
  --brand-yellow:#F5C518;
  --brand-yellow-hover:#FFDC4D;
  --bg:#000000;
  --surface:#161616;
  --surface-2:#1f1f1f;
  --text:#F2F0E9;
  --text-soft:#9A978C;
  --border:rgba(245,197,24,0.14);
  --border-soft:rgba(255,255,255,0.08);
  /* legacy aliases kept so existing rules resolve to dark-theme values */
  --ink:#141414;
  --ink-soft:var(--text-soft);
  --chalk:var(--bg);
  --paper:var(--surface);
  --line:var(--border-soft);
  --amber:#E8A93A;
  --crimson:#E5484D;
  --gold:#C9A227;
  --success:#3F9E48;
  --font-display:'Bebas Neue', sans-serif;
  --font-body:'IBM Plex Sans', sans-serif;
  --font-mono:'Roboto Mono', monospace;
}
*{ box-sizing:border-box; }
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:var(--font-body);
}
.topbar{
  background:var(--bg); display:flex; align-items:center; justify-content:space-between;
  gap:16px; padding:16px 28px;
  position:sticky; top:0; z-index:30;
}
body.is-scrolled .topbar{ box-shadow:0 6px 20px rgba(0,0,0,0.55); }
.topbar-brand{ display:flex; align-items:center; gap:16px; }
.topbar-title{
  font-family:var(--font-display); font-size:42px; letter-spacing:2px; margin:0;
  color:var(--brand-yellow); line-height:1;
}
.topbar-logo{
  width:60px; height:60px; border-radius:50%; object-fit:cover; flex-shrink:0;
}

.icon-btn{
  display:flex; align-items:center; justify-content:center;
  width:40px; height:40px; flex:0 0 auto; background:none; border:none; cursor:pointer;
  padding:0; color:var(--brand-yellow); border-radius:10px;
  transition:background .2s ease;
}
.icon-btn svg{ width:24px; height:24px; }
.icon-btn:hover{ background:rgba(245,197,24,0.12); }
.icon-btn:focus-visible{ outline:2px solid var(--brand-yellow); outline-offset:2px; }

/* Settings page */
body.is-settings .topbar{ display:none; }
.settings-header{
  position:sticky; top:0; z-index:30; background:var(--bg);
  display:flex; align-items:center; gap:12px; padding:16px 28px;
  max-width:640px; margin:0 auto;
}
.settings-back{
  display:flex; align-items:center; justify-content:center;
  width:40px; height:40px; flex:0 0 auto; background:none; border:none; cursor:pointer;
  padding:0; color:var(--text-soft); border-radius:10px; transition:background .2s ease;
}
.settings-back svg{ width:26px; height:26px; }
.settings-back:hover{ background:rgba(255,255,255,0.08); }
.settings-back:focus-visible{ outline:2px solid var(--text-soft); outline-offset:2px; }
.settings-header-title{
  font-family:var(--font-display); font-size:42px; letter-spacing:2px; margin:0;
  color:var(--text-soft); line-height:1;
}
.settings-section{ margin-bottom:26px; }
.settings-section-title{
  font-family:var(--font-display); font-size:18px; letter-spacing:1px;
  color:var(--text-soft); text-transform:uppercase; margin:0 0 10px;
}
.settings-card{
  background:var(--surface); border:1px solid var(--border); border-radius:12px; overflow:hidden;
}
.settings-item{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  width:100%; text-align:left; background:none; border:none; cursor:pointer;
  color:var(--text); font-family:var(--font-body); font-size:15px;
  padding:16px 18px; transition:background .2s ease;
}
.settings-item:hover{ background:rgba(245,197,24,0.06); }
.settings-item + .settings-item{ border-top:1px solid var(--border-soft); }
.settings-item .chev, .settings-item .go{ color:var(--text-soft); flex:none; font-size:18px; }
.settings-item.danger{ color:var(--crimson); }
.settings-body{ padding:0 18px 18px; border-top:1px solid var(--border-soft); }
.calendar-options{ display:flex; flex-direction:column; gap:2px; padding:6px 0 0; }
.calendar-option{
  display:block; width:100%; text-align:left; background:none; border:none; cursor:pointer;
  color:var(--text); font-family:var(--font-body); font-size:14px;
  padding:12px 10px; border-radius:8px; transition:background .2s ease;
}
.calendar-option:hover{ background:rgba(255,255,255,0.06); }
.calendar-note{ margin:6px 10px; font-size:12px; color:var(--text-soft); line-height:1.4; }
.role-badge{
  display:inline-block; font-family:var(--font-mono); font-size:10px; letter-spacing:.5px;
  text-transform:uppercase; padding:2px 8px; border-radius:10px;
  background:var(--brand-yellow); color:var(--ink); font-weight:700;
}
.status-badge{
  display:inline-block; font-family:var(--font-mono); font-size:10px; letter-spacing:.5px;
  text-transform:uppercase; padding:2px 8px; border-radius:10px;
  background:rgba(245,197,24,0.15); color:var(--brand-yellow); font-weight:700;
}

.profile-trigger{ font-weight:600; }

/* ===== Auth (login / signup / recovery) ===== */
body.is-auth .topbar{ display:none; }
.auth-screen{ min-height:100vh; display:grid; grid-template-columns:1fr; background:var(--bg); }

.auth-hero{ display:none; }
.auth-hero-inner{ position:relative; z-index:2; text-align:center; padding:40px; }
.auth-brand-logo{ width:120px; height:120px; border-radius:50%; object-fit:cover; box-shadow:0 10px 40px rgba(0,0,0,0.5); }
.auth-wordmark{
  font-family:var(--font-display); font-size:64px; letter-spacing:3px; margin:20px 0 6px;
  color:var(--brand-yellow); line-height:1;
}
.auth-tagline{
  font-family:var(--font-mono); font-size:13px; letter-spacing:4px; text-transform:uppercase;
  color:var(--text-soft); margin:0;
}
.auth-hero-glow{
  position:absolute; inset:0; z-index:1;
  background:radial-gradient(60% 55% at 50% 42%, rgba(245,197,24,0.18), rgba(245,197,24,0) 70%);
}
.auth-hero-watermark{
  position:absolute; z-index:0; width:130%; max-width:900px; top:50%; left:50%;
  transform:translate(-50%,-50%); opacity:0.04; filter:grayscale(1); pointer-events:none;
}

.auth-form-side{
  display:flex; align-items:center; justify-content:center;
  padding:48px 24px; min-height:100vh;
}
.auth-form-inner{ width:100%; max-width:380px; }
.auth-brand-compact{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:10px; margin-bottom:32px;
}
.auth-brand-logo-sm{ width:88px; height:88px; border-radius:50%; object-fit:cover; box-shadow:0 8px 30px rgba(0,0,0,0.55); }
.auth-wordmark-sm{
  font-family:var(--font-display); font-size:48px; letter-spacing:2px; color:var(--brand-yellow); line-height:1;
}
.auth-tagline-sm{
  font-family:var(--font-mono); font-size:12px; letter-spacing:4px; text-transform:uppercase; color:var(--text-soft);
}
.auth-segment{
  display:flex; gap:8px; padding:6px; margin:0 0 24px;
  background:var(--surface-2); border:1px solid var(--border); border-radius:14px;
}
.auth-segment-btn{
  flex:1; padding:13px 10px; border:none; border-radius:10px; cursor:pointer;
  background:transparent; color:var(--text-soft);
  font-family:var(--font-display); font-size:18px; letter-spacing:1px;
  transition:background .2s ease, color .2s ease;
}
.auth-segment-btn:hover{ color:var(--text); }
.auth-segment-btn.is-active{ background:#333333; color:var(--text); box-shadow:0 2px 8px rgba(0,0,0,0.45); }
.auth-title{
  font-family:var(--font-display); font-size:30px; letter-spacing:1px; margin:0 0 24px;
  color:var(--text);
}
.auth-form{ display:flex; flex-direction:column; }
.auth-field{ display:flex; flex-direction:column; gap:6px; margin-bottom:16px; }
.auth-field label{ font-size:11px; letter-spacing:1px; text-transform:uppercase; color:var(--text-soft); }
.auth-field input{
  width:100%; min-width:0; box-sizing:border-box;
  font-family:var(--font-body); font-size:15px; padding:13px 14px;
  border:1px solid var(--border); border-radius:10px; background:var(--surface-2); color:var(--text);
  transition:border-color .2s ease, box-shadow .2s ease;
}
.auth-field input:focus{
  outline:none; border-color:var(--brand-yellow); box-shadow:0 0 0 3px rgba(245,197,24,0.18);
}
.auth-form .auth-submit{
  width:60%; min-width:200px; align-self:center; margin-top:8px;
  padding:16px 28px; font-size:22px; border-radius:999px;
}
.auth-forgot{ display:flex; justify-content:flex-end; margin:-6px 0 16px; }
.auth-forgot-link{ text-decoration:none; color:var(--text-soft); }
.auth-forgot-link:hover{ color:var(--brand-yellow); }
.auth-switch{ font-size:13px; color:var(--text-soft); margin:16px 0 0; text-align:center; }
.auth-switch .btn-link{ font-size:13px; }

@media (min-width:900px){
  .auth-screen{ grid-template-columns:1.1fr 1fr; }
  .auth-hero{
    position:relative; display:flex; align-items:center; justify-content:center; overflow:hidden;
    border-right:1px solid var(--border);
    background:linear-gradient(160deg, #101010 0%, #000000 100%);
  }
  .auth-brand-compact{ display:none; }
  .auth-form-side{ min-height:auto; }
}

.profile-stats-grid{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(80px, 1fr)); gap:12px;
}
.profile-stat{ text-align:center; }
.profile-stat-value{ font-family:var(--font-mono); font-weight:700; font-size:22px; }
.profile-stat-label{ font-size:11px; letter-spacing:.5px; text-transform:uppercase; color:var(--ink-soft); margin-top:2px; }

.tabs{ display:flex; background:var(--bg); position:sticky; top:var(--header-h, 80px); z-index:29; border-bottom:1px solid var(--border); }
.tab-btn{
  flex:1; background:none; border:none; color:rgba(245,197,24,0.5);
  font-family:var(--font-display); font-size:16px; letter-spacing:1.5px;
  padding:15px 0; cursor:pointer;
  display:flex; align-items:center; justify-content:center; gap:8px;
}
.tab-btn svg{ width:16px; height:16px; flex:none; }
.tab-btn.active{ color:var(--brand-yellow); }
.tab-btn:focus-visible{ outline:2px solid var(--brand-yellow); outline-offset:-2px; }
@media (max-width: 380px){ .tab-btn .tab-label{ display:none; } }
.tab-indicator{
  position:absolute; bottom:0; left:0; height:3px;
  background:var(--brand-yellow); transition:transform .25s ease, width .25s ease;
}
.content{ padding:24px 28px 60px; max-width:900px; margin:0 auto; }
.toolbar{ display:flex; justify-content:flex-end; margin-bottom:16px; }
.btn{
  font-family:var(--font-display); letter-spacing:1px; font-size:15px;
  padding:9px 20px; border-radius:6px; border:none; cursor:pointer;
}
.btn-primary{ background:var(--brand-yellow); color:#141414; font-weight:700; }
.btn-primary:hover{ background:var(--brand-yellow-hover); }
.btn-ghost{ background:none; border:1px solid var(--border); color:var(--text-soft); }
.btn-ghost:hover{ border-color:var(--brand-yellow); color:var(--text); }
.btn-accent{ background:var(--brand-yellow); color:#141414; }
.btn-accent:hover{ background:var(--brand-yellow-hover); }
.btn-link{
  background:none; border:none; text-decoration:underline; cursor:pointer;
  font-family:var(--font-body); font-size:13px; padding:0; color:var(--brand-yellow);
}
button:focus-visible, input:focus-visible{ outline:2px solid var(--brand-yellow); outline-offset:1px; }
button:disabled{ opacity:.5; cursor:not-allowed; }

.form-panel{
  background:var(--surface); border:1px solid var(--border); border-radius:10px;
  padding:18px 20px; margin-bottom:22px;
}
.form-grid{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom:14px; }
.field{ display:flex; flex-direction:column; gap:4px; }
.field label{ font-size:11px; letter-spacing:1px; text-transform:uppercase; color:var(--text-soft); }
input[type=text], input[type=date], input[type=password], input[type=email]{
  font-family:var(--font-body); font-size:14px; padding:8px 10px;
  border:1px solid var(--border); border-radius:6px; background:var(--surface-2); color:var(--text);
  min-width:180px;
}
.form-error{ color:var(--crimson); font-size:13px; margin:12px 0 0; }
.form-error.is-success{ color:var(--success); }
.form-actions{ display:flex; gap:10px; margin-top:16px; }
.muted-note{ color:var(--ink-soft); font-size:14px; padding:10px 0; }

.section-heading{
  font-family:var(--font-display); letter-spacing:1px; font-size:20px; margin:0 0 10px;
  color:var(--text); display:inline-block; border-bottom:2px solid var(--brand-yellow); padding-bottom:4px;
}
.section-heading.spaced{ margin-top:28px; }

.roster-card{ background:var(--surface); border:1px solid var(--border); border-radius:10px; overflow:hidden; margin-bottom:8px; }
.squad-list-row{ display:flex; align-items:center; gap:12px; padding:11px 18px; border-bottom:1px solid var(--line); }
.squad-list-row:last-child{ border-bottom:none; }
.squad-list-row .player-name{ flex:1; }
.row-remove{
  background:none; border:none; color:var(--ink-soft); font-size:18px; cursor:pointer; padding:2px 6px; flex-shrink:0;
}
.row-remove:hover:not(:disabled){ color:var(--crimson); }
.row-remove:disabled{ opacity:.3; cursor:not-allowed; }

.squad-rows{ border-top:1px solid var(--line); margin-top:4px; }
.squad-row{
  display:flex; justify-content:space-between; align-items:center; flex-wrap:nowrap;
  gap:12px; padding:11px 0; border-bottom:1px solid var(--line);
}
.squad-check{ display:flex; align-items:center; gap:10px; flex-shrink:0; }
.squad-stats{ display:flex; gap:18px; opacity:1; transition:opacity .15s ease; flex-wrap:wrap; justify-content:flex-end; }
.squad-stats.is-disabled{ opacity:.35; pointer-events:none; }
.stepper{ display:flex; align-items:center; gap:6px; }
.stepper-label{ font-size:10px; letter-spacing:1px; color:var(--ink-soft); text-transform:uppercase; margin-right:2px; }
.stepper button{
  width:22px; height:22px; border-radius:50%; border:1px solid var(--border);
  background:var(--surface-2); color:var(--text); cursor:pointer; font-size:14px; line-height:1; padding:0;
}
.stepper button:hover{ border-color:var(--brand-yellow); color:var(--brand-yellow); }
.stepper-value{ min-width:16px; text-align:center; font-family:var(--font-mono); font-weight:700; }

.match-card{
  background:var(--surface); border:1px solid var(--border); border-radius:10px;
  margin-bottom:18px; overflow:hidden;
}
.match-card-header{
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 18px; border-bottom:1px solid var(--border); background:var(--surface-2);
}
.match-opponent{ font-family:var(--font-display); font-size:22px; letter-spacing:1px; }
.match-date{ font-family:var(--font-mono); font-size:12px; color:var(--ink-soft); margin-top:2px; }
.match-actions{ display:flex; gap:14px; }
.match-actions button{
  background:none; border:none; cursor:pointer; color:var(--ink-soft);
  font-size:13px; padding:2px; font-family:var(--font-body);
}
.match-actions button:hover{ color:var(--brand-yellow); text-decoration:underline; }
.sheet-header-row, .sheet-row{
  display:grid; grid-template-columns:36px 1fr 70px 70px 70px; align-items:center;
  padding:8px 18px;
}
.sheet-header-row{
  font-size:10px; letter-spacing:1px; text-transform:uppercase; color:var(--ink-soft);
  padding-top:10px; padding-bottom:4px;
}
.sheet-row{ border-top:1px solid var(--line); font-size:14px; }
.squad-number{
  width:24px; height:24px; border-radius:50%; background:var(--ink); color:var(--brand-yellow);
  font-family:var(--font-mono); font-size:11px; font-weight:700;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.player-name{ font-weight:500; }
.stat-goals{ display:flex; align-items:center; gap:5px; font-family:var(--font-mono); }
.card-dash{ color:var(--line); }
.card-tag{ display:inline-flex; align-items:center; gap:4px; font-family:var(--font-mono); font-size:12px; font-weight:700; }
.card-rect{ width:11px; height:15px; border-radius:2px; display:inline-block; }
.card-rect.yellow{ background:var(--amber); }
.card-rect.red{ background:var(--crimson); }

.stats-table{ width:100%; border-collapse:collapse; background:var(--surface); border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.stats-table th{
  font-family:var(--font-display); letter-spacing:1px; font-size:14px; text-align:left;
  padding:12px 14px; background:var(--surface-2); color:var(--brand-yellow); cursor:pointer; user-select:none; white-space:nowrap;
}
.stats-table th:hover{ background:#2b2b2b; }
.stats-table td{ padding:11px 14px; border-bottom:1px solid var(--border); font-size:14px; }
.stats-table tr:last-child td{ border-bottom:none; }
.stats-table td.num, .stats-table th.num{ font-family:var(--font-mono); text-align:right; }
.top-scorer-row td:first-child{ border-left:3px solid var(--gold); }
.table-scroll{ overflow-x:auto; }

.empty-state{ text-align:center; padding:56px 20px; color:var(--text-soft); }
.empty-state h3{ font-family:var(--font-display); font-size:24px; color:var(--text); margin:0 0 8px; letter-spacing:1px; }
.empty-state p{ margin:0; font-size:14px; }

@media (prefers-reduced-motion: reduce){ *{ transition:none !important; } }

.shirt-badge{ display:inline-flex; align-items:center; vertical-align:middle; flex-shrink:0; }

.ref-payer{ font-family:var(--font-mono); font-size:11px; color:var(--ink-soft); margin-top:2px; }

.fixture-card{
  background:var(--surface); border:1px solid var(--border); border-radius:12px;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:16px 20px; margin-bottom:14px; flex-wrap:wrap;
  position:relative; overflow:hidden;
  box-shadow:0 1px 3px rgba(0,0,0,0.4);
}
.fixture-date-bar{
  width:calc(100% + 40px); margin:-16px -20px 12px; padding:8px 20px;
  background:var(--brand-yellow); color:#141414; text-align:center;
  font-family:var(--font-display); font-size:22px; letter-spacing:.5px;
}
.fixture-card::before{
  content:''; position:absolute; inset:0; pointer-events:none; z-index:0;
  background-image:repeating-linear-gradient(135deg, rgba(255,255,255,0.02) 0 3px, transparent 3px 22px),
    repeating-linear-gradient(135deg, rgba(245,197,24,0.05) 0 3px, transparent 3px 22px);
  background-position:0 0, 11px 11px;
}
.fixture-card > *{ position:relative; z-index:1; }
.fixture-info .fixture-opponent{ font-family:var(--font-display); font-size:18px; letter-spacing:1px; }
.fixture-info .fixture-date{ font-family:var(--font-mono); font-size:12px; color:var(--ink-soft); margin-top:2px; }
.fixture-card-clickable{ cursor:pointer; transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.fixture-card-clickable:hover{
  border-color:var(--brand-yellow);
  box-shadow:0 4px 16px rgba(245,197,24,0.35), 0 1px 3px rgba(20,20,20,0.1);
  transform:translateY(-1px);
}

.fixture-meta-top{
  text-align:center; font-family:var(--font-mono); font-size:11px; letter-spacing:.5px;
  color:var(--ink-soft); text-transform:uppercase; min-height:14px;
  margin-bottom:4px;
}
.fixture-meta-top:not(:empty){
  width:fit-content; align-self:center; margin:0 0 6px; padding:1px 10px 3px;
  border-bottom:2px solid var(--brand-yellow);
}
.fixture-venue{
  text-align:center; font-family:var(--font-mono); font-size:12px; color:var(--ink-soft); margin-top:8px;
}
.fixture-row{
  display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%;
}
.fixture-team{
  flex:1; font-family:var(--font-display); font-size:22px; letter-spacing:.5px;
}
.fixture-team-home{ text-align:right; }
.fixture-team-away{ text-align:left; }
.fixture-center{
  flex-shrink:0; min-width:76px; text-align:center; font-family:var(--font-mono);
  font-weight:700; font-size:18px;
}
.forfeit-tag-wrap{ margin-bottom:4px; }
.forfeit-tag-wrap .pill{ margin-left:0; }

.vote-group{ border-bottom:1px solid var(--line); }
.vote-group:last-child{ border-bottom:none; }
.vote-group-label{
  font-family:var(--font-mono); font-size:11px; letter-spacing:.5px; text-transform:uppercase;
  color:var(--ink-soft); padding:10px 18px 4px;
}

textarea{
  font-family:var(--font-mono); font-size:13px; padding:8px 10px;
  border:1px solid var(--border); border-radius:6px; background:var(--surface-2); color:var(--text);
  width:100%; resize:vertical;
}
select{
  font-family:var(--font-body); font-size:14px; padding:8px 10px;
  border:1px solid var(--border); border-radius:6px; background:var(--surface-2); color:var(--text);
  min-width:180px;
}
input[type=number]{
  font-family:var(--font-mono); font-size:14px; padding:8px 10px;
  border:1px solid var(--border); border-radius:6px; background:var(--surface-2); color:var(--text);
  width:70px;
}

/* segmented Fixtures / Played menu */
.segmented{
  display:inline-flex; background:var(--surface); border:1px solid var(--border);
  border-radius:8px; padding:3px; margin-bottom:20px;
}
.segmented button{
  font-family:var(--font-display); letter-spacing:1px; font-size:14px;
  padding:8px 22px; border:none; border-radius:6px; background:none;
  color:var(--text-soft); cursor:pointer;
}
.segmented button.active{ background:var(--brand-yellow); color:#141414; }

/* upcoming fixture cards with availability */
.fixture-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; flex-wrap:wrap; }
.avail-counts{ font-family:var(--font-mono); font-size:12px; color:var(--ink-soft); margin-top:6px; text-align:center; }
.avail-counts b{ color:var(--text); }
.avail-toggle{ display:flex; gap:8px; margin-top:12px; flex-wrap:wrap; justify-content:center; }
.avail-btn{
  font-family:var(--font-body); font-size:13px; padding:6px 14px; border-radius:20px;
  border:1px solid var(--border); background:var(--surface-2); color:var(--text-soft); cursor:pointer;
}
.avail-btn:hover{ border-color:var(--brand-yellow); }
.avail-btn.on-available{ background:var(--success); border-color:var(--success); color:#fff; }
.avail-btn.on-maybe{ background:var(--amber); border-color:var(--amber); color:var(--ink); }
.avail-btn.on-unavailable{ background:var(--crimson); border-color:var(--crimson); color:#fff; }
.avail-note{ font-size:12px; color:var(--ink-soft); margin-top:10px; }

.fixture-score{
  font-family:var(--font-mono); font-weight:700; font-size:22px;
  background:var(--ink); color:var(--brand-yellow); padding:3px 14px; border-radius:6px;
  display:inline-block;
}
.pill{
  display:inline-block; font-family:var(--font-mono); font-size:10px; letter-spacing:.5px;
  text-transform:uppercase; padding:2px 8px; border-radius:10px; margin-left:8px;
  background:rgba(255,255,255,0.08); color:var(--text-soft); font-weight:700;
}
.pill.home{ background:rgba(63,158,72,0.20); color:#6FCF77; }
.pill.away{ background:rgba(229,72,77,0.18); color:#F07177; }
.pill.competition{ background:rgba(245,197,24,0.18); color:var(--brand-yellow); }
.pill.forfeit{ background:rgba(229,72,77,0.18); color:#F07177; }

.goal-type{ font-family:var(--font-mono); font-size:13px; text-align:center; }

.member-row{ display:flex; align-items:center; gap:12px; padding:11px 18px; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.member-row:last-child{ border-bottom:none; }
.member-row .player-name{ flex:1; min-width:120px; }
.member-row.is-inactive{ opacity:.5; }

/* --- Floating bottom nav: phones + tablets (< 900px) --- */
@media (max-width:899px){
  .content{ padding-bottom:calc(92px + env(safe-area-inset-bottom)); }
  .tabs{
    position:fixed; top:auto; left:12px; right:12px; z-index:30;
    bottom:calc(12px + env(safe-area-inset-bottom));
    background:rgba(20,20,20,0.72);
    backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
    border:1px solid var(--border); border-radius:20px;
    box-shadow:0 8px 30px rgba(0,0,0,0.55);
    padding:8px; gap:4px;
  }
  .tab-btn{
    flex-direction:column; gap:4px; padding:8px 4px;
    border-radius:14px; font-size:11px; letter-spacing:0.5px;
    transition:background .2s ease, color .2s ease, transform .1s ease;
  }
  .tab-btn svg{ width:20px; height:20px; }
  .tab-btn:hover{ background:rgba(245,197,24,0.10); color:var(--brand-yellow); }
  .tab-btn.active{ background:rgba(245,197,24,0.14); }
  .tab-btn:active{ transform:scale(0.94); }
  .tab-btn .tab-label{ display:block; }
  .tab-indicator{ display:none; }
}

/* --- Left icon rail: large screens (>= 900px) --- */
@media (min-width:900px){
  .tabs{
    position:fixed; left:0; top:var(--header-h, 80px); bottom:0; z-index:29;
    flex-direction:column; align-items:stretch; justify-content:center; gap:4px;
    width:76px; padding:12px 8px; overflow:hidden;
    background:var(--bg); border-bottom:none;
    transition:width .2s ease;
  }
  .tabs:hover, .tabs:focus-within{ width:230px; box-shadow:8px 0 30px rgba(0,0,0,0.45); }
  .tab-btn{
    flex:none; justify-content:flex-start; gap:16px;
    padding:12px 0; border-radius:12px; font-size:18px; letter-spacing:1px;
    transition:background .2s ease, color .2s ease;
  }
  .tab-btn svg{ width:26px; height:26px; margin:0 17px; flex:none; }
  .tab-btn .tab-label{
    opacity:0; white-space:nowrap;
    transition:opacity .15s ease;
  }
  .tabs:hover .tab-label, .tabs:focus-within .tab-label{ opacity:1; }
  .tab-btn:hover{ background:rgba(245,197,24,0.10); color:var(--brand-yellow); }
  .tab-btn.active{ background:rgba(245,197,24,0.14); }
  .tab-indicator{ display:none; }
  .content{ padding-left:76px; }
}

/* --- Phone-only visual tweaks --- */
@media (max-width:600px){
  .shirt-badge svg{ width:24px; height:24px; }
  .topbar{ padding:14px 16px; }
  .topbar-title{ font-size:34px; }
  .settings-header{ padding:14px 16px; }
  .settings-header-title{ font-size:34px; }
  .topbar-logo{ width:50px; height:50px; }
  .content{ padding:18px 16px calc(92px + env(safe-area-inset-bottom)); }
  .squad-row{ flex-direction:column; align-items:flex-start; }
  .squad-stats{ gap:12px; }
  .sheet-header-row, .sheet-row{ grid-template-columns:28px 1fr 56px 56px 56px; padding:8px 12px; }
  .match-card-header{ padding:12px 14px; }
  .stats-table th, .stats-table td{ padding:9px 10px; font-size:13px; }
  .fixture-team{ font-size:17px; }
  .fixture-date-bar{ font-size:17px; }
  .fixture-center{ min-width:56px; font-size:15px; }
  .fixture-score{ font-size:18px; padding:2px 10px; }
}

/* ============ UI/UX polish additions ============ */

/* --- Toasts --- */
.toast-host{
  position:fixed; left:50%; bottom:24px; transform:translateX(-50%);
  z-index:80; display:flex; flex-direction:column; gap:10px; align-items:center;
  width:max-content; max-width:calc(100vw - 32px); pointer-events:none;
}
.toast{
  pointer-events:auto; cursor:pointer;
  background:var(--surface-2); color:var(--text);
  border:1px solid var(--border-soft); border-left:4px solid var(--brand-yellow);
  border-radius:8px; padding:12px 18px; font-size:14px; line-height:1.35;
  box-shadow:0 8px 24px rgba(0,0,0,0.5); max-width:92vw;
  opacity:0; transform:translateY(12px); transition:opacity .24s ease, transform .24s ease;
}
.toast-in{ opacity:1; transform:translateY(0); }
.toast-out{ opacity:0; transform:translateY(12px); }
.toast-success{ border-left-color:var(--success); }
.toast-error{ border-left-color:var(--crimson); }
.toast-info{ border-left-color:var(--brand-yellow); }

/* --- Confirm dialog --- */
.confirm-host{ position:fixed; inset:0; z-index:70; display:flex; align-items:center; justify-content:center; padding:20px; }
.confirm-host[hidden]{ display:none; }
.confirm-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,0.6); }
.confirm-box{
  position:relative; background:var(--surface); color:var(--text);
  border:1px solid var(--border); border-radius:12px; padding:22px 22px 18px;
  width:100%; max-width:380px; box-shadow:0 20px 50px rgba(0,0,0,0.6);
  animation:confirm-pop .18s ease;
}
@keyframes confirm-pop{ from{ opacity:0; transform:scale(.94); } to{ opacity:1; transform:scale(1); } }
.confirm-title{ font-family:var(--font-display); letter-spacing:1px; font-size:20px; margin:0 0 8px; color:var(--brand-yellow); }
.confirm-msg{ margin:0 0 18px; font-size:14px; color:var(--text); line-height:1.45; }
.confirm-actions{ display:flex; gap:10px; justify-content:flex-end; }
.btn-danger{ background:var(--crimson); color:#fff; font-weight:700; }
.btn-danger:hover{ background:#F0595E; }

/* --- Button spinner / loading --- */
.btn.is-loading{ position:relative; }
.btn-spinner{
  display:inline-block; width:14px; height:14px; margin-right:8px; vertical-align:-2px;
  border:2px solid rgba(20,20,20,0.35); border-top-color:#141414; border-radius:50%;
  animation:spin .7s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }

/* --- Skeleton loaders --- */
.skeleton-wrap{ max-width:900px; margin:0 auto; padding:24px 28px 60px; }
.skeleton-card{
  background:var(--surface); border:1px solid var(--border);
  border-radius:12px; padding:16px 20px; margin-bottom:14px; overflow:hidden;
}
.skeleton-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin:14px 0 12px; }
.skeleton{ background:var(--surface-2); border-radius:6px; position:relative; overflow:hidden; }
.skeleton::after{
  content:''; position:absolute; inset:0;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  transform:translateX(-100%); animation:shimmer 1.3s infinite;
}
@keyframes shimmer{ to{ transform:translateX(100%); } }
.skeleton-bar{ height:26px; width:calc(100% + 40px); margin:-16px -20px 4px; border-radius:0; background:rgba(245,197,24,0.18); }
.skeleton-line{ height:18px; }
.skeleton-line.lg{ flex:1; height:22px; }
.skeleton-line.sm{ height:12px; width:180px; }
.skeleton-line.center{ margin:0 auto; }
.skeleton-chip{ width:60px; height:24px; border-radius:6px; }

/* --- Next-match hero --- */
.fixture-hero{
  border:1px solid rgba(245,197,24,0.45);
  box-shadow:0 6px 26px rgba(245,197,24,0.14), 0 2px 6px rgba(0,0,0,0.5);
  background:linear-gradient(180deg, rgba(245,197,24,0.06), transparent 60%), var(--surface);
}
.hero-eyebrow{
  display:flex; align-items:center; gap:8px; margin-bottom:12px;
  font-family:var(--font-mono); font-size:11px; letter-spacing:1.5px; text-transform:uppercase;
  color:var(--brand-yellow);
}
.hero-dot{ width:8px; height:8px; border-radius:50%; background:var(--brand-yellow); box-shadow:0 0 0 0 rgba(245,197,24,0.6); animation:pulse 2s infinite; }
@keyframes pulse{ 0%{ box-shadow:0 0 0 0 rgba(245,197,24,0.5); } 70%{ box-shadow:0 0 0 8px rgba(245,197,24,0); } 100%{ box-shadow:0 0 0 0 rgba(245,197,24,0); } }
.fixture-hero .fixture-team{ font-size:26px; }

/* --- Relative date tag inside date bar --- */
.fixture-rel{
  display:inline-block; margin-left:10px; padding:1px 8px; border-radius:10px;
  background:rgba(20,20,20,0.18); color:#141414; font-family:var(--font-mono);
  font-size:11px; letter-spacing:.5px; vertical-align:middle; font-weight:700;
}

/* --- Played card outcome tint --- */
.outcome-win{ border-left:3px solid var(--success); }
.outcome-loss{ border-left:3px solid var(--crimson); }
.outcome-draw{ border-left:3px solid var(--text-soft); }

/* --- Empty-state icon --- */
.empty-icon{ color:var(--brand-yellow); opacity:.85; margin-bottom:12px; display:flex; justify-content:center; }

/* --- Micro-interactions --- */
.btn, .avail-btn, .segmented button, .tab-btn, .settings-item, .calendar-option{
  transition:background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.btn:active:not(:disabled){ transform:translateY(1px); }
.fixture-card-clickable:active{ transform:scale(.995); }
.avail-btn.is-pending{ opacity:.6; pointer-events:none; }
#panel-fixtures, #panel-stats, #panel-admin{ animation:panel-fade .22s ease; }
@keyframes panel-fade{ from{ opacity:0; transform:translateY(4px); } to{ opacity:1; transform:none; } }

@media (prefers-reduced-motion: reduce){
  .skeleton::after, .hero-dot, .btn-spinner{ animation:none !important; }
  #panel-fixtures, #panel-stats, #panel-admin, .confirm-box{ animation:none !important; }
}

@media (max-width:600px){
  .fixture-hero .fixture-team{ font-size:19px; }
  .toast-host{ bottom:16px; }
}