/* ─── PnP Design System — Navy & Champagne ───────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Brand palette */
  --primary:        #0F2340;
  --primary-dark:   #0A1A30;
  --primary-light:  #E8EEF7;
  --primary-mid:    #3A5F8A;
  --accent:         #C9A96E;
  --accent-dark:    #A8803E;
  --accent-light:   #F5EDD8;

  /* Functional */
  --rose:          #E05C6A;
  --rose-light:    #FDE8EB;
  --green:         #10B981;
  --green-light:   #D1FAE5;
  --amber:         #F59E0B;

  /* Neutrals */
  --white:         #FFFFFF;
  --bg:            #F7F8FA;
  --bg-card:       #FFFFFF;
  --gray-50:       #F8FAFC;
  --gray-100:      #F1F5F9;
  --gray-200:      #E2E8F0;
  --gray-300:      #CBD5E1;
  --gray-400:      #94A3B8;
  --gray-500:      #64748B;
  --gray-600:      #475569;
  --gray-700:      #334155;
  --gray-800:      #1E293B;
  --gray-900:      #0F172A;

  /* Shadows */
  --shadow-sm:      0 1px 3px rgba(15,35,64,.06), 0 1px 2px rgba(15,35,64,.04);
  --shadow:         0 4px 16px rgba(15,35,64,.10);
  --shadow-lg:      0 8px 32px rgba(15,35,64,.14);
  --shadow-primary: 0 4px 20px rgba(15,35,64,.28);
  --shadow-accent:  0 4px 20px rgba(201,169,110,.35);

  /* Radii */
  --radius-sm:     8px;
  --radius:        12px;
  --radius-lg:     16px;
  --radius-xl:     24px;
  --radius-full:   9999px;

  /* Typography */
  --font-serif:    'Cormorant Garamond', Georgia, serif;
  --font-sans:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Legacy alias keeps existing code working */
  --purple:        var(--primary);
  --purple-dark:   var(--primary-dark);
  --purple-light:  var(--primary-light);
  --purple-mid:    var(--primary-mid);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--gray-800);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── NAVBAR ─────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: 60px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: white;
}
.nav-logo-text { font-weight: 700; font-size: 14px; color: var(--gray-900); line-height: 1.2; }
.nav-logo-text span { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-user { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.nav-avatar {
  width: 34px; height: 34px; border-radius: var(--radius-full);
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.nav-username { font-weight: 600; font-size: 14px; color: var(--gray-800); }
.nav-caret { color: var(--gray-400); font-size: 12px; }

/* ─── BADGES / PILLS ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
}
.badge-purple  { background: var(--primary-light); color: var(--primary); }
.badge-rose    { background: var(--rose-light);    color: var(--rose); }
.badge-green   { background: var(--green-light);   color: var(--green); }
.badge-gray    { background: var(--gray-100);      color: var(--gray-600); }
.badge-accent  { background: var(--accent-light);  color: var(--accent-dark); }
.badge-live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; display: inline-block; animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.85); }
}

/* ─── BUTTONS ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-full);
  font-family: var(--font-sans); font-size: 15px; font-weight: 600;
  border: none; cursor: pointer; transition: all .18s ease;
  text-decoration: none; white-space: nowrap;
}
.btn-primary {
  background: var(--primary); color: white;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(15,35,64,.38); }
.btn-primary:active { transform: translateY(0); }

.btn-accent {
  background: var(--accent); color: var(--primary);
  box-shadow: var(--shadow-accent);
  font-weight: 700;
}
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-1px); }

.btn-secondary {
  background: white; color: var(--primary);
  border: 1.5px solid var(--primary-light);
}
.btn-secondary:hover { background: var(--primary-light); }
.btn-outline {
  background: transparent; color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
}
.btn-outline:hover { background: var(--gray-50); border-color: var(--gray-300); }
.btn-rose { background: var(--rose); color: white; }
.btn-rose:hover { background: #C0394A; }
.btn-rose-outline {
  background: transparent; color: var(--rose);
  border: 1.5px solid var(--rose-light);
}
.btn-rose-outline:hover { background: var(--rose-light); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 16px; width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-full); background: var(--gray-100); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--gray-600); transition: all .15s; }
.btn-icon:hover { background: var(--gray-200); }

/* ─── CARDS ──────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
.card-purple, .card-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #1A3A6B 100%);
  color: white; border: none;
  box-shadow: var(--shadow-primary);
}

/* ─── FORM ELEMENTS ──────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 14px; font-weight: 600; color: var(--gray-700); }
.form-label .req { color: var(--rose); margin-left: 2px; }
.form-input, .form-select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: var(--font-sans); font-size: 15px; color: var(--gray-800);
  background: white;
  transition: border-color .15s, box-shadow .15s;
  appearance: none; outline: none;
}
.form-input:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,35,64,.10);
}
.form-input::placeholder { color: var(--gray-400); }
.form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; cursor: pointer; }
.form-hint { font-size: 12px; color: var(--gray-400); }
.form-error { font-size: 12px; color: var(--rose); font-weight: 500; }

/* Radio group */
.radio-group { display: flex; gap: 10px; }
.radio-btn {
  flex: 1; padding: 11px 16px;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius);
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 15px; font-weight: 500; color: var(--gray-700);
  transition: all .15s;
}
.radio-btn input[type="radio"] { accent-color: var(--primary); width: 16px; height: 16px; }
.radio-btn:has(input:checked) { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }

/* ─── ALERTS ─────────────────────────────────────────────────────── */
.alert {
  padding: 12px 14px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500;
  display: none;
}
.alert.show { display: block; }
.alert-error   { background: var(--rose-light);  color: #9F1239; border: 1px solid #FECDD3; }
.alert-success { background: var(--green-light); color: #065F46; border: 1px solid #A7F3D0; }

/* ─── TOAST ──────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--primary); color: white;
  padding: 12px 20px; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 500;
  transition: transform .25s ease; z-index: 999;
  pointer-events: none; white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ─── STAT TILE ──────────────────────────────────────────────────── */
.stat-tile {
  background: white; border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg); padding: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: var(--shadow-sm);
}
.stat-tile-icon { font-size: 20px; margin-bottom: 2px; }
.stat-tile-val { font-size: 24px; font-weight: 800; color: var(--gray-900); }
.stat-tile-label { font-size: 12px; color: var(--gray-500); font-weight: 500; }

/* ─── TABS ───────────────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 1.5px solid var(--gray-200); gap: 0; }
.tab-btn {
  flex: 1; padding: 12px 8px;
  background: none; border: none; border-bottom: 2.5px solid transparent;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500;
  color: var(--gray-500); cursor: pointer; transition: all .15s;
  margin-bottom: -1.5px;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── TABLE ──────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  padding: 10px 12px; text-align: left;
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--gray-500);
  background: var(--gray-50); border-bottom: 1px solid var(--gray-200);
}
td { padding: 12px; border-bottom: 1px solid var(--gray-100); font-size: 14px; color: var(--gray-700); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray-50); }

/* ─── STEP PROGRESS ──────────────────────────────────────────────── */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 28px; }
.step-item { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; position: relative; }
.step-item:not(:last-child)::after {
  content: ''; position: absolute; top: 15px; left: 60%; width: 80%; height: 2px;
  background: var(--gray-200);
}
.step-item.done:not(:last-child)::after,
.step-item.active:not(:last-child)::after { background: var(--accent); }
.step-circle {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gray-200); color: var(--gray-500);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; z-index: 1; transition: all .2s;
}
.step-item.active .step-circle { background: var(--primary); color: white; box-shadow: 0 0 0 4px var(--primary-light); }
.step-item.done .step-circle { background: var(--accent); color: var(--primary); }
.step-label { font-size: 11px; font-weight: 500; color: var(--gray-500); text-align: center; }
.step-item.active .step-label { color: var(--primary); font-weight: 600; }

/* ─── SECTION / PAGE LAYOUT ──────────────────────────────────────── */
.page-wrap { max-width: 480px; margin: 0 auto; padding: 80px 20px 40px; }
.page-title {
  font-family: var(--font-serif); font-size: 30px; font-weight: 700;
  color: var(--gray-900); margin-bottom: 6px; letter-spacing: -.01em;
}
.page-sub { font-size: 15px; color: var(--gray-500); margin-bottom: 28px; }
.section-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gray-500); margin-bottom: 14px; }

/* ─── MATCH CARD ─────────────────────────────────────────────────── */
.match-photo {
  width: 100%; aspect-ratio: 3/4; object-fit: cover;
  border-radius: var(--radius-lg); background: var(--gray-100);
  display: block;
}
.match-photo-placeholder {
  width: 100%; aspect-ratio: 3/4;
  border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--primary-light), #C8D8EC);
  display: flex; align-items: center; justify-content: center;
  font-size: 56px;
}
.match-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.match-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; background: var(--gray-100);
  border-radius: var(--radius-full); font-size: 12px; color: var(--gray-600); font-weight: 500;
}

/* ─── TIMER ──────────────────────────────────────────────────────── */
.timer { display: flex; align-items: center; gap: 5px; color: var(--rose); font-weight: 700; font-size: 14px; }
.timer-icon { font-size: 14px; }

/* ─── COUNTDOWN GRID ─────────────────────────────────────────────── */
.countdown { display: flex; gap: 10px; }
.cd-box {
  flex: 1; background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  box-shadow: var(--shadow-sm);
}
.cd-num { font-size: 26px; font-weight: 800; color: var(--primary); line-height: 1; }
.cd-unit { font-size: 11px; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

/* ─── UTILS ──────────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.w-full { width: 100%; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-purple, .text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-gray { color: var(--gray-500); }
.text-dark { color: var(--gray-900); }
.hidden { display: none !important; }
