/* ============================================================
   PlayMaker Roster — Design System
   Shared across all pages. Import after tokens.
   ============================================================ */

/* ---- TOKENS ---- */
:root {
  /* Brand */
  --navy:   #0f1f3d;
  --blue:   #1a4a8a;
  --gold:   #e8a020;

  /* Surface */
  --white:  #ffffff;
  --light:  #f5f7fa;
  --border: #dce3ec;

  /* Text */
  --text:   #1a2233;
  --muted:  #6b7a8d;

  /* Status */
  --status-registered: #6b7a8d;
  --status-invited:    #1a4a8a;
  --status-rsvp-yes:   #0891b2;
  --status-rsvp-no:    #9ca3af;
  --status-attended:   #7c3aed;
  --status-offered:    #d97706;
  --status-active:     #16a34a;
  --status-released:   #9ca3af;
  --status-declined:   #dc2626;

  /* Feedback */
  --success:   #16a34a;
  --warning:   #d97706;
  --error:     #dc2626;
  --error-bg:  #fef2f2;
  --info:      #1a4a8a;

  /* Typography */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;

  --weight-normal: 400;
  --weight-medium: 600;
  --weight-bold:   700;
  --weight-heavy:  800;

  /* Spacing (8px base unit) */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
}

/* ---- RESET ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  color: var(--text);
  background: var(--light);
  line-height: 1.5;
  min-height: 100svh; /* svh = small viewport, never clips behind mobile chrome */
}

a {
  color: var(--blue);
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
}

/* ---- LAYOUT ---- */
.page-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* ---- HEADER ---- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  padding: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.app-header .club-name {
  color: var(--white);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  line-height: 1.2;
}

.app-header .season-label {
  color: var(--gold);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.app-header .header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--gold);
  color: var(--navy);
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  padding: 14px 24px;
  border-radius: 10px;
  min-height: 48px;
  width: 100%;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.btn-primary:active {
  opacity: 0.85;
  transform: scale(0.99);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--white);
  color: var(--navy);
  border: 2px solid var(--border);
  font-weight: var(--weight-medium);
  font-size: var(--text-base);
  padding: 12px 24px;
  border-radius: 10px;
  min-height: 48px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.btn-secondary:hover {
  border-color: var(--blue);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--error);
  color: white;
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  padding: 14px 24px;
  border-radius: 10px;
  min-height: 48px;
  border: none;
  cursor: pointer;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--gold);
  color: var(--navy);
  font-size: 20px;
  font-weight: var(--weight-bold);
  border: none;
  cursor: pointer;
}

/* ---- FORM ELEMENTS ---- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text);
  display: block;
}

.form-label .required {
  color: var(--error);
  margin-left: 2px;
}

.form-hint {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-top: calc(-1 * var(--space-1));
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: var(--text-base); /* 16px — prevents iOS zoom */
  color: var(--text);
  min-height: 52px;
  transition: border-color 0.15s, background 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--blue);
  outline: none;
  background: var(--white);
}

.input.error,
.select.error,
.textarea.error {
  border-color: var(--error);
  background: #fff5f5;
}

.select {
  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='%236b7a8d' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.5;
}

.field-error {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--error);
  margin-top: var(--space-1);
}

.field-error::before {
  content: '⚠';
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s;
  margin-bottom: var(--space-3);
}

.checkbox-group:hover {
  border-color: var(--blue);
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 2px;
  accent-color: var(--blue);
  cursor: pointer;
}

.checkbox-label {
  font-size: var(--text-sm);
  color: var(--text);
  line-height: 1.5;
}

.checkbox-label strong {
  font-weight: var(--weight-medium);
  display: block;
  margin-bottom: var(--space-1);
}

.checkbox-label p {
  color: var(--muted);
  font-size: var(--text-sm);
}

/* Dual inputs side by side */
.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

/* ---- CARDS ---- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: var(--space-4);
}

.card-elevated {
  background: var(--white);
  border-radius: 14px;
  padding: var(--space-4);
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  border: none;
}

/* ---- FORM SECTIONS ---- */
.form-section {
  margin-bottom: var(--space-6);
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}

.form-section-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}

.form-section-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--navy);
}

/* ---- STATUS CHIPS — outlined ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border: 1.5px solid currentColor;
  white-space: nowrap;
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.chip-registered { color: var(--status-registered); }
.chip-invited    { color: var(--status-invited); }
.chip-rsvp-yes   { color: var(--status-rsvp-yes); }
.chip-rsvp-no    { color: var(--status-rsvp-no); }
.chip-attended   { color: var(--status-attended); }
.chip-offered    { color: var(--status-offered); }
.chip-active     { color: var(--status-active); }
.chip-released   { color: var(--status-released); }
.chip-declined   { color: var(--status-declined); }
.chip-passed     { color: var(--status-passed); }

/* ---- AGE GROUP CALLOUT ---- */
.age-group-display {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: rgba(26,74,138,0.08);
  border: 1px solid rgba(26,74,138,0.2);
  border-radius: 8px;
  font-size: var(--text-sm);
  color: var(--blue);
  font-weight: var(--weight-medium);
  margin-top: var(--space-2);
}

.age-group-display .age-group-value {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
}

/* ---- PRIVACY BLOCK ---- */
.privacy-statement {
  padding: var(--space-4);
  background: var(--light);
  border-radius: 10px;
  border-left: 3px solid var(--blue);
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.6;
  margin-top: var(--space-4);
}

/* ---- TOAST ---- */
.toast-container {
  position: fixed;
  top: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
  width: min(90vw, 400px);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  pointer-events: auto;
  animation: toast-in 0.2s ease;
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left-color: var(--error);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- SKELETON LOADING ---- */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, #edf0f4 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- PLAYER LIST ROW ---- */
.player-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  min-height: 72px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
  position: relative;
  overflow: hidden;
}

.player-row:active {
  background: var(--light);
}

.player-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--white);
  flex-shrink: 0;
}

.player-info {
  flex: 1;
  min-width: 0;
}

.player-name {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-meta {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-top: 2px;
}

.player-row-status {
  flex-shrink: 0;
}

/* ---- CONFIRMATION SCREEN ---- */
.confirmation-screen {
  text-align: center;
  padding: var(--space-10) var(--space-4);
  max-width: 500px;
  margin: 0 auto;
}

.confirmation-icon {
  font-size: 56px;
  margin-bottom: var(--space-4);
  display: block;
}

.confirmation-title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-heavy);
  color: var(--navy);
  margin-bottom: var(--space-3);
}

.confirmation-body {
  font-size: var(--text-base);
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: var(--space-6);
}

.confirmation-details {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: var(--space-5);
  text-align: left;
  margin-bottom: var(--space-6);
}

.confirmation-details .detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--text-sm);
}

.confirmation-details .detail-row:last-child {
  border-bottom: none;
}

.confirmation-details .detail-label {
  color: var(--muted);
}

.confirmation-details .detail-value {
  font-weight: var(--weight-medium);
  color: var(--text);
  text-align: right;
}

/* ---- NEXT STEPS LIST ---- */
.next-steps {
  text-align: left;
  background: var(--light);
  border-radius: 10px;
  padding: var(--space-4);
  margin-bottom: var(--space-6);
}

.next-steps h3 {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0 0 var(--space-3);
  text-align: center;
}

.next-steps ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.next-steps ol li {
  position: relative;
  counter-increment: steps;

  margin: 0;
  padding: var(--space-2) 0 var(--space-2) 36px;

  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--muted);
  text-align: left;
}

.next-steps ol li::before {
  content: counter(steps);

  position: absolute;
  left: 0;
  top: var(--space-2);

  width: 20px;
  height: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--navy);
  color: var(--white);
  border-radius: 50%;

  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
}

.next-steps ol li + li {
  margin-top: var(--space-2);
}

.next-steps a {
  color: var(--navy);
  text-decoration: underline;
}

/* ---- TOP-LEVEL FORM ERROR ---- */
.form-error-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: #fff5f5;
  border: 1.5px solid var(--error);
  border-radius: 10px;
  margin-bottom: var(--space-5);
  font-size: var(--text-sm);
  color: var(--error);
  line-height: 1.5;
}

/* ---- SPINNER ---- */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.spinner.dark {
  border-color: rgba(15,31,61,0.2);
  border-top-color: var(--navy);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- RESPONSIVE ---- */
@media (min-width: 768px) {
  .page-container {
    padding: 0 var(--space-8);
  }

  .btn-primary {
    width: auto;
  }
}

/* ============================================================
   APP SHELL — shared by index.html, teams.html, events.html
   ============================================================ */

/* Lock scroll only on dashboard pages (index.html, teams.html, events.html).
   Pages without .dashboard on <body> (register, login, mypage, admin) scroll normally. */
body:has(.dashboard) { height: 100%; overflow: hidden; }
html:has(.dashboard) { height: 100%; overflow: hidden; }

/* Dashboard wrapper */
.dashboard {
  display: flex;
  height: 100svh; /* svh: never clips under mobile browser chrome */
  overflow: hidden;
  background: var(--light);
}

/* ---- Sidebar (tablet+) ---- */
.sidebar {
  display: none;
  flex-direction: column;
  width: 220px;
  min-width: 220px;
  background: var(--navy);
  padding: var(--space-6) 0;
}

@media (min-width: 768px) { .sidebar { display: flex; } }

.sidebar-logo {
  padding: 0 var(--space-5) var(--space-6);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: var(--space-4);
}

.sidebar-logo .logo-mark {
  font-size: var(--text-xs);
  color: var(--gold);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: 0 var(--space-3);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: 10px;
  color: rgba(255,255,255,0.65);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover  { background: rgba(255,255,255,0.08); color: white; }
.nav-item.active { background: rgba(232,160,32,0.15);  color: var(--gold); }
.nav-item .nav-icon { font-size: 18px; width: 22px; text-align: center; }

.sidebar-footer {
  margin-top: auto;
  padding: var(--space-5);
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  line-height: 1.5;
}

/* ---- Main column ---- */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ---- App header ---- */
.app-header {
  background: var(--navy);
  padding: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-shrink: 0;
  z-index: 50;
}

.header-left  { min-width: 0; }
.header-right { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }

.header-club {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-season {
  font-size: var(--text-xs);
  color: var(--gold);
  font-weight: var(--weight-medium);
}

/* ---- Invite Player nav button (sidebar footer + drawer) ---- */
.nav-invite-btn {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-2) var(--space-4);
  border-radius: 8px;
  background: var(--gold);
  color: var(--navy);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  border: none;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: opacity 0.15s;
  box-sizing: border-box;
}
.nav-invite-btn:hover { opacity: 0.85; }

/* ---- Hamburger button (mobile only) ---- */
.hamburger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gold);
  font-size: 33px;
  border-radius: 8px;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}
.hamburger-btn:hover { background: rgba(255,255,255,0.08); }
@media (min-width: 768px) { .hamburger-btn { display: none; } }

/* ---- Hamburger nav drawer ---- */
.nav-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
}
.nav-drawer-overlay.open { display: block; }

.nav-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 260px;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--space-4));
  box-shadow: -4px 0 32px rgba(0,0,0,0.35);
}

.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-4) var(--space-3);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.nav-drawer-logo {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--white);
}

.nav-drawer-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
  line-height: 1;
  border-radius: 6px;
}
.nav-drawer-close:hover { background: rgba(255,255,255,0.08); color: var(--white); }

.nav-drawer-links {
  flex: 1;
  padding: var(--space-2) 0;
  overflow-y: auto;
}

.nav-drawer-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 14px var(--space-5);
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}
.nav-drawer-item:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.nav-drawer-item.active { color: var(--gold); }

.nav-drawer-icon {
  font-size: 22px;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.nav-drawer-signout {
  margin: var(--space-2) var(--space-4) 0;
  background: none;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: rgba(255,255,255,0.55);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  padding: 10px var(--space-4);
  cursor: pointer;
  text-align: left;
  width: calc(100% - var(--space-8));
}
.nav-drawer-signout:hover { border-color: rgba(255,255,255,0.4); color: var(--white); }

/* ---- Bottom nav (mobile) — kept for mypage.html tab switching ---- */
.bottom-footer {
  text-align: center;
  padding: 4px var(--space-2) calc(4px + env(safe-area-inset-bottom));
  font-size: 10px;
  color: rgba(255,255,255,0.25);
  background: var(--navy);
  flex-shrink: 0;
}
@media (min-width: 768px) { .bottom-footer { display: none; } }

.bottom-nav {
  display: flex;
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  flex-shrink: 0;
}
@media (min-width: 768px) { .bottom-nav { display: none; } }

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: var(--space-2) var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}
.bottom-nav-item .nav-icon { font-size: 22px; }
.bottom-nav-item.active    { color: var(--gold); }

/* ---- Toast notifications ---- */
#toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  z-index: 9999;
  pointer-events: none;
  width: calc(100vw - var(--space-8));
  max-width: 480px;
}
@media (min-width: 768px) { #toast-container { bottom: var(--space-6); } }

.toast {
  background: var(--navy);
  color: #fff;
  padding: var(--space-3) var(--space-5);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  animation: slideUp 0.2s ease;
  white-space: normal;
  text-align: center;
  pointer-events: all;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}
.toast.error { background: var(--error); }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SPLIT LAYOUT — primary list column
   Used by teams.html, events.html (3-panel split left col)
   ============================================================ */

.split-list-col {
  overflow-y: auto;
  padding: var(--space-4);
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
@media (min-width: 768px) {
  .split-list-col {
    flex: 0 0 380px;
    border-right: 1px solid var(--border);
  }
}

/* ============================================================
   REGISTER PAGE SHELL — shared by register.html + staff-register.html
   ============================================================ */

.register-page {
  background: var(--light);
  min-height: 100vh;
}

.register-header {
  background: var(--navy);
  padding: var(--space-5) var(--space-4);
  text-align: center;
}

.register-header .logo-mark {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--space-2);
}

.register-header h1 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-heavy);
  color: var(--white);
  line-height: 1.2;
}

.register-header .subtitle {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  margin-top: var(--space-2);
}

.submit-section {
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  margin-top: var(--space-6);
}

.submit-section .submit-note {
  font-size: var(--text-xs);
  color: var(--muted);
  text-align: center;
  margin-top: var(--space-3);
  line-height: 1.5;
}

/* ============================================================
   PLAYER DETAIL PANEL — .pd-*
   Used by teams.html, mypage.html, events.html
   ============================================================ */

.pd-header     { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-4); border-bottom: 1px solid var(--border); flex-shrink: 0; background: var(--white); }
.pd-avatar     { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: var(--text-base); font-weight: var(--weight-bold); color: #fff; flex-shrink: 0; }
.pd-name-block { flex: 1; min-width: 0; }
.pd-name       { font-size: var(--text-base); font-weight: var(--weight-bold); color: var(--navy); }
.pd-sub        { font-size: var(--text-xs); color: var(--muted); margin-top: 2px; }
.pd-close      { background: none; border: none; cursor: pointer; font-size: 20px; color: var(--muted); padding: 4px; line-height: 1; flex-shrink: 0; }
.pd-back       { background: none; border: none; cursor: pointer; font-size: 20px; color: var(--navy); padding: 4px; line-height: 1; flex-shrink: 0; }
@media (min-width: 768px) { .pd-back { display: none; } }

.pd-body          { flex: 1; overflow-y: auto; padding: var(--space-4); }
.pd-section       { margin-bottom: var(--space-5); }
.pd-section-title { font-size: var(--text-xs); font-weight: var(--weight-bold); text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); margin-bottom: var(--space-3); }
.pd-row           { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); padding: var(--space-2) 0; border-bottom: 1px solid var(--border); font-size: var(--text-sm); }
.pd-row:last-child { border-bottom: none; }
.pd-label         { color: var(--muted); flex-shrink: 0; }
.pd-value         { color: var(--text); text-align: right; font-weight: var(--weight-medium); }
.pd-value a       { color: var(--navy); text-decoration: none; }
.pd-value a:hover { text-decoration: underline; }
.pd-gated         { font-size: var(--text-sm); color: var(--muted); font-style: italic; }

/* ============================================================
   PANEL CHROME — .panel-*
   Used by app.html, events.html
   ============================================================ */

.panel-header       { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4); border-bottom: 1px solid var(--border); flex-shrink: 0; background: var(--white); }
.panel-back         { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--muted); background: none; border: none; cursor: pointer; padding: 0; }
.panel-back:hover   { color: var(--text); }
.panel-title        { font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--text); }
.panel-close        { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--muted); padding: 4px; line-height: 1; }
.panel-close:hover  { color: var(--text); }

/* ============================================================
   EVENT PLAYER ROW — .ep-*
   Used by app.html, events.html
   ============================================================ */

.ep-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: var(--text-xs); font-weight: var(--weight-bold); flex-shrink: 0; }
.ep-info   { flex: 1; min-width: 0; }
.ep-name   { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text); }
.ep-meta   { font-size: var(--text-xs); color: var(--muted); margin-top: 2px; }

/* ============================================================
   EMPTY STATE
   Used by app.html, events.html, mypage.html, admin.html
   ============================================================ */

.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--space-8) var(--space-6); gap: var(--space-3); color: var(--muted); }
.empty-icon  { font-size: 48px; line-height: 1; }
.empty-title { font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--text); }
.empty-body  { font-size: var(--text-sm); max-width: 280px; }

/* ============================================================
   PAST DIVIDER
   Used by events.html, mypage.html
   ============================================================ */

.past-divider       { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-5) 0 var(--space-3); }
.past-divider-line  { flex: 1; height: 1px; background: var(--border); }
.past-divider-label { font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--muted); white-space: nowrap; }
.past-divider-btn   { font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--muted); background: none; border: 1px solid var(--border); border-radius: 20px; padding: 3px 10px; cursor: pointer; white-space: nowrap; }

/* ============================================================
   EVENT CARD
   Used by events.html, mypage.html
   ============================================================ */

.event-card        { background: var(--white); border: 1.5px solid var(--border); border-radius: 12px; padding: var(--space-4); cursor: pointer; width: 100%; box-sizing: border-box; text-align: left; font: inherit; transition: border-color 0.15s; }
.event-card:hover  { border-color: var(--navy); }
.event-card.active { border-color: var(--gold); background: rgba(232,160,32,0.04); }
.event-card.past   { opacity: 0.65; }
.event-card-name   { font-size: var(--text-base); font-weight: var(--weight-bold); color: var(--text); margin-bottom: 2px; }
.event-card-meta   { font-size: var(--text-sm); color: var(--muted); }

/* ============================================================
   TEAM CARD
   Used by teams.html, mypage.html
   ============================================================ */

.team-card         { background: var(--white); border: 1.5px solid var(--border); border-radius: 12px; padding: var(--space-4); margin-bottom: var(--space-3); cursor: pointer; transition: border-color 0.15s; width: 100%; box-sizing: border-box; text-align: left; font: inherit; }
.team-card:hover   { border-color: var(--navy); }
.team-card.active  { border-color: var(--gold); background: rgba(232,160,32,0.04); }
.team-card-name    { font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--navy); }
.team-card-age     { font-size: var(--text-xs); color: var(--gold); font-weight: var(--weight-semibold); margin-top: 2px; }
.team-card-count   { font-size: var(--text-xs); color: var(--muted); margin-top: 4px; }

/* ============================================================
   SKELETON LOADING CARDS
   Used by teams.html, events.html
   (.skeleton base animation already in style.css — these extend it)
   ============================================================ */

.skeleton-card { background: var(--white); border: 1.5px solid var(--border); border-radius: 12px; padding: var(--space-4); margin-bottom: var(--space-3); }
.skel          { background: linear-gradient(90deg, var(--light) 25%, #e8eaed 50%, var(--light) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 4px; height: 14px; margin-bottom: var(--space-2); }
.skel.wide     { width: 70%; }
.skel.short    { width: 45%; height: 12px; }
