/* ─── Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ─── Design Tokens ─────────────────────────────────────── */
:root {
  /* Tournament accent — overridden per tournament via JS */
  --accent:          #3A7D44;
  --accent-light:    #3A7D4420;
  --accent-text:     #ffffff;

  /* Surfaces */
  --surface:         #ffffff;
  --surface-raised:  #F5F5F7;
  --surface-sunken:  #EBEBED;

  /* Text */
  --text-primary:    #1D1D1F;
  --text-secondary:  #6E6E73;
  --text-tertiary:   #AEAEB2;

  /* Borders */
  --separator:       #D2D2D7;
  --separator-light: #E8E8ED;

  /* Semantic */
  --success:         #34C759;
  --success-light:   #34C75918;
  --danger:          #FF3B30;
  --danger-light:    #FF3B3018;
  --warning:         #FF9500;
  --gold:            #FFD700;
  --silver:          #C0C0C0;
  --bronze:          #CD7F32;

  /* Layout */
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --radius-xl:    24px;
  --radius-pill:  999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:  0 12px 32px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.04);

  /* Transitions */
  --t-fast:   120ms ease;
  --t-normal: 200ms ease;
  --t-slow:   300ms ease;

  /* Typography scale */
  --text-xs:   11px;
  --text-sm:   13px;
  --text-base: 15px;
  --text-md:   17px;
  --text-lg:   22px;
  --text-xl:   28px;
  --text-2xl:  36px;
  --text-3xl:  48px;
}

/* ─── Dark Mode ─────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --surface:         #1C1C1E;
    --surface-raised:  #2C2C2E;
    --surface-sunken:  #3A3A3C;
    --text-primary:    #F5F5F7;
    --text-secondary:  #98989F;
    --text-tertiary:   #636366;
    --separator:       #3A3A3C;
    --separator-light: #2C2C2E;
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.3);
    --shadow-md:  0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg:  0 12px 32px rgba(0,0,0,0.4);
    --success-light:  #34C75922;
    --danger-light:   #FF3B3022;
  }
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--surface-raised);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; }

/* ─── App Shell ─────────────────────────────────────────── */
#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: page-in var(--t-normal) ease both;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Navigation Bar ─────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--separator-light);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 52px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
}
.nav-logo svg { width: 28px; height: 28px; color: var(--accent); }
.nav-brand {
  font-weight: 700;
  font-size: var(--text-base);
  letter-spacing: -0.3px;
}
.nav-title {
  font-weight: 600;
  font-size: var(--text-base);
  flex: 1;
  text-align: center;
}
.nav-back {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: var(--text-base);
  font-weight: 500;
  padding: 4px 0;
  background: none;
  border: none;
}
.nav-back svg { width: 18px; height: 18px; }
.nav-spacer { flex: 1; }
.nav-action {
  color: var(--accent);
  font-size: var(--text-base);
  font-weight: 500;
  padding: 6px 0 6px 12px;
}

/* ─── Container ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ─── Cards ─────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-padded { padding: 20px; }
.card + .card { margin-top: 12px; }

/* ─── Section labels ─────────────────────────────────────── */
.section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 20px 0 8px;
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: var(--text-base);
  font-weight: 600;
  transition: all var(--t-fast);
  white-space: nowrap;
  border: none;
  cursor: pointer;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary {
  background: var(--surface-raised);
  color: var(--text-primary);
}
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger-ghost {
  background: transparent;
  color: var(--danger);
  border: 1.5px solid var(--danger);
}
.btn-full { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: var(--text-sm); }
.btn-lg { padding: 16px 28px; font-size: var(--text-md); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:disabled:active { transform: none; }

/* Google Sign-In button */
.btn-google {
  background: var(--surface);
  color: var(--text-primary);
  border: 1.5px solid var(--separator);
  box-shadow: var(--shadow-sm);
}
.btn-google:hover { box-shadow: var(--shadow-md); }
.btn-google svg { width: 20px; height: 20px; }

/* ─── Form Elements ─────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
}
.input {
  background: var(--surface-raised);
  border: 1.5px solid var(--separator);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: var(--text-base);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  width: 100%;
}
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236E6E73' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--separator-light);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-info { flex: 1; min-width: 0; margin-right: 12px; }
.toggle-name {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-primary);
}
.toggle-sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: 2px;
}
.toggle-switch {
  position: relative;
  width: 51px;
  height: 31px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--surface-sunken);
  border-radius: var(--radius-pill);
  transition: background var(--t-fast);
  cursor: pointer;
}
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: transform var(--t-fast);
  pointer-events: none;
}
.toggle-switch input:checked ~ .toggle-track { background: var(--success); }
.toggle-switch input:checked ~ .toggle-thumb { transform: translateX(20px); }

/* Color picker */
.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--separator);
  cursor: pointer;
  transition: transform var(--t-fast);
}
.color-swatch:hover { transform: scale(1.1); }

/* ─── Tab Strip ─────────────────────────────────────────── */
.tab-strip-wrapper {
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--surface);
  border-bottom: 1px solid var(--separator-light);
  position: sticky;
  top: 52px;
  z-index: 90;
}
.tab-strip-wrapper::-webkit-scrollbar { display: none; }
.tab-strip {
  display: flex;
  gap: 4px;
  padding: 8px 16px;
  width: max-content;
  min-width: 100%;
}
.tab {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  transition: all var(--t-fast);
  white-space: nowrap;
  flex-shrink: 0;
}
.tab:hover { background: var(--surface-raised); color: var(--text-primary); }
.tab.active {
  background: var(--accent);
  color: var(--accent-text);
}

/* ─── Match Cards ───────────────────────────────────────── */
.match-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 0;
}
.match-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast);
}
.match-card:active { transform: scale(0.995); }
.match-card.correct {
  border-left: 3px solid var(--success);
}
.match-card.wrong {
  border-left: 3px solid var(--danger);
  opacity: 0.75;
}
.match-card.pending {
  border-left: 3px solid var(--separator);
}
.match-teams {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.team {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.team--away {
  flex-direction: row-reverse;
  text-align: right;
}
.team-flag { font-size: 22px; flex-shrink: 0; }
.team-name {
  font-weight: 600;
  font-size: var(--text-base);
  truncate: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.match-divider {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  font-weight: 500;
  flex-shrink: 0;
  min-width: 32px;
  text-align: center;
}
.match-score {
  font-weight: 800;
  font-size: var(--text-lg);
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.match-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.match-time {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}
.match-status-badge {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}
.match-status-badge.live {
  background: var(--danger-light);
  color: var(--danger);
  animation: pulse 2s infinite;
}
.match-status-badge.finished {
  background: var(--success-light);
  color: var(--success);
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* Pick pills */
.pick-row {
  display: flex;
  gap: 8px;
}
.pick-pill {
  flex: 1;
  padding: 10px 8px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.3px;
  background: var(--surface-raised);
  color: var(--text-secondary);
  border: 1.5px solid transparent;
  transition: all var(--t-fast);
  text-align: center;
}
.pick-pill:hover:not(:disabled) {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}
.pick-pill.selected {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}
.pick-pill.correct {
  background: var(--success-light);
  color: var(--success);
  border-color: var(--success);
}
.pick-pill.wrong {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger);
}
.pick-pill:disabled { cursor: default; }
.pick-pill-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 500;
  opacity: 0.8;
  margin-top: 2px;
}

/* ─── Save indicator ────────────────────────────────────── */
.save-status {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding: 8px 0 16px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
}
.save-status.saving { color: var(--text-tertiary); }
.save-status.saved  { color: var(--success); }
.save-status svg { width: 14px; height: 14px; }

/* ─── Leaderboard ───────────────────────────────────────── */
.leaderboard { display: flex; flex-direction: column; }
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--separator-light);
}
.leaderboard-row:last-child { border-bottom: none; }
.leaderboard-row.you {
  background: var(--accent-light);
  margin: 0 -20px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border-bottom: none;
}
.rank-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: var(--text-base);
  background: var(--surface-raised);
  color: var(--text-secondary);
  flex-shrink: 0;
}
.rank-badge.gold   { background: #FFF3CD; color: #B8860B; }
.rank-badge.silver { background: #F0F0F0; color: #6B6B6B; }
.rank-badge.bronze { background: #FDF0E8; color: #8B4513; }
.player-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-sunken);
}
.player-info { flex: 1; min-width: 0; }
.player-name {
  font-weight: 600;
  font-size: var(--text-base);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-name.you { color: var(--accent); }
.player-sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: 1px;
}
.player-points {
  font-weight: 800;
  font-size: var(--text-lg);
  color: var(--text-primary);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.prize-badge {
  background: var(--accent-light);
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* ─── "Hva tror vi?" section ────────────────────────────── */
.crowd-list { display: flex; flex-direction: column; gap: 0; }
.crowd-match {
  padding: 12px 0;
  border-bottom: 1px solid var(--separator-light);
}
.crowd-match:last-child { border-bottom: none; }
.crowd-match-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.crowd-bars {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 48px;
}
.crowd-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.crowd-bar-track {
  width: 100%;
  background: var(--surface-sunken);
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 32px;
  display: flex;
  align-items: flex-end;
}
.crowd-bar-fill {
  width: 100%;
  background: var(--accent);
  border-radius: var(--radius-sm);
  transition: height var(--t-slow);
}
.crowd-bar-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-secondary);
}
.crowd-bar-pct {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
}
.crowd-names {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 4px;
  line-height: 1.4;
}

/* ─── Prize summary ─────────────────────────────────────── */
.prize-summary {
  display: flex;
  gap: 0;
  text-align: center;
}
.prize-block {
  flex: 1;
  padding: 16px 8px;
  border-right: 1px solid var(--separator-light);
}
.prize-block:last-child { border-right: none; }
.prize-amount {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1px;
}
.prize-place {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ─── Countdown ─────────────────────────────────────────── */
.countdown {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}
.countdown-unit { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.countdown-number {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -1px;
  line-height: 1;
}
.countdown-label {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.countdown-sep {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--text-tertiary);
  line-height: 1;
  margin-bottom: 18px;
}

/* ─── Login Page ────────────────────────────────────────── */
.login-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: var(--surface-raised);
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.login-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  color: var(--accent);
}
.login-title {
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.login-subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: 32px;
}
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  margin: 20px 0;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--separator);
}

/* ─── Home page hero ────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 70%, black) 100%);
  color: white;
  padding: 40px 24px 48px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='28'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}
.hero-content { position: relative; max-width: 640px; margin: 0 auto; }
.hero-eyebrow {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 8px;
}
.hero-title {
  font-size: var(--text-2xl);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 12px;
}
.hero-sub {
  font-size: var(--text-base);
  opacity: 0.85;
  margin-bottom: 28px;
}

/* ─── Tournament archive cards ──────────────────────────── */
.tournament-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 0;
}
@media (min-width: 480px) {
  .tournament-grid { grid-template-columns: repeat(3, 1fr); }
}
.tournament-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--t-fast);
  text-decoration: none;
  color: var(--text-primary);
  display: block;
}
.tournament-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tournament-card-year {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.tournament-card-name {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}
.tournament-card-winner {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ─── Admin styles ──────────────────────────────────────── */
.admin-nav {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--separator-light);
}
.admin-nav::-webkit-scrollbar { display: none; }
.admin-nav-item {
  padding: 8px 14px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  white-space: nowrap;
  transition: all var(--t-fast);
  text-decoration: none;
}
.admin-nav-item:hover { background: var(--surface-raised); color: var(--text-primary); }
.admin-nav-item.active { background: var(--accent-light); color: var(--accent); }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 0;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.stat-number {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

.readiness-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--separator-light);
}
.readiness-item:last-child { border-bottom: none; }
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.ok      { background: var(--success); }
.status-dot.warn    { background: var(--warning); }
.status-dot.fail    { background: var(--danger); }
.status-dot.loading { background: var(--text-tertiary); animation: pulse 1.5s infinite; }

/* ─── KiwiWrapped stat cards ────────────────────────────── */
.wrapped-page {
  background: var(--accent);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  color: white;
  text-align: center;
}
.wrapped-card {
  max-width: 360px;
  width: 100%;
}
.wrapped-label {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
  margin-bottom: 16px;
}
.wrapped-number {
  font-size: 80px;
  font-weight: 900;
  letter-spacing: -4px;
  line-height: 1;
  margin-bottom: 8px;
}
.wrapped-title {
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.wrapped-description {
  font-size: var(--text-base);
  opacity: 0.8;
  line-height: 1.5;
}
.wrapped-nav {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 40px;
}
.wrapped-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: background var(--t-fast);
}
.wrapped-dot.active { background: white; }

/* ─── Pending approval screen ───────────────────────────── */
.pending-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 16px;
}
.pending-icon { font-size: 56px; margin-bottom: 8px; }
.pending-title { font-size: var(--text-xl); font-weight: 800; }
.pending-text { font-size: var(--text-base); color: var(--text-secondary); max-width: 280px; line-height: 1.5; }

/* ─── Empty states ──────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}
.empty-state-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state-title { font-size: var(--text-md); font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.empty-state-text { font-size: var(--text-base); line-height: 1.5; }

/* ─── Toast notifications ───────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--text-primary);
  color: var(--surface);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
  animation: toast-in var(--t-normal) ease both;
  pointer-events: all;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(12px) scale(0.95); }
}

/* ─── Loading spinner ───────────────────────────────────── */
.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--separator);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Locked round banner ───────────────────────────────── */
.locked-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-raised);
  border: 1px solid var(--separator);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.locked-banner svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ─── Responsive ────────────────────────────────────────── */
@media (min-width: 640px) {
  .container { padding: 0 24px; }
  .match-list { gap: 12px; }
  .login-card { padding: 48px 40px; }
  .hero { padding: 56px 32px 64px; }
  .hero-title { font-size: var(--text-3xl); }
}

/* ─── Safe area (iOS notch) ─────────────────────────────── */
@supports (padding: env(safe-area-inset-bottom)) {
  .tab-strip-wrapper { padding-bottom: env(safe-area-inset-bottom); }
}
