/* ============================================
   MASTER AI TEAM BUILDER - Design System
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Primary Colors */
  --navy: #0a1628;
  --navy-light: #132240;
  --navy-mid: #1a2d4d;
  --navy-surface: #1e3456;

  /* Accent */
  --orange: #f97316;
  --orange-dark: #ea580c;
  --orange-light: #fb923c;
  --red: #ef4444;
  --red-dark: #dc2626;

  /* Success */
  --green: #22c55e;
  --green-dark: #16a34a;
  --green-light: #4ade80;
  --green-bg: #052e16;

  /* Neutral */
  --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;
  --white: #ffffff;
  --black: #000000;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-elevated: 0 12px 40px rgba(0,0,0,0.2);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Spacing */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;

  /* Font */
  --font: 'Inter', 'Outfit', -apple-system, sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;

  /* Layout */
  --header-h: 56px;
  --bottomnav-h: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--gray-100);
  color: var(--gray-800);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select { font-family: inherit; }
a { text-decoration: none; color: inherit; }

/* ============ APP CONTAINER ============ */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  background: var(--gray-100);
  overflow-x: hidden;
}
.screen { display: none; min-height: 100dvh; padding-bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 16px); }
.screen.active { display: block; animation: fadeIn 0.25s ease; }
.screen.no-bnav { padding-bottom: 0; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fadeOverlay { from { opacity: 0; } to { opacity: 1; } }

/* ============ HEADER ============ */
.app-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 var(--sp-4);
  position: sticky;
  top: 0;
  z-index: 50;
  gap: var(--sp-3);
}
.app-header .back-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 20px;
  border-radius: var(--radius-full);
  transition: background 0.2s;
}
.app-header .back-btn:hover { background: rgba(255,255,255,0.1); }
.app-header .header-title {
  flex: 1;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.3px;
}
.app-header .header-title .brand-accent { color: var(--orange); }
.app-header .header-actions { display: flex; gap: var(--sp-2); }
.app-header .header-actions button {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.8);
  font-size: 18px;
  border-radius: var(--radius-full);
  transition: all 0.2s;
  background: transparent;
  border: none;
}
.app-header .header-actions button:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.app-header .header-actions button[onclick*="doLogout"] { background: #dc2626 !important; width: 32px; height: 32px; }
.app-header .header-actions button[onclick*="doLogout"]:hover { background: #b91c1c !important; }

/* ============ BOTTOM NAV ============ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--bottomnav-h);
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  display: flex;
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
  padding-bottom: var(--safe-bottom);
}
.bottom-nav .nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--gray-400);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s;
  position: relative;
}
.bottom-nav .nav-tab.active { color: var(--navy); }
.bottom-nav .nav-tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%; right: 25%;
  height: 3px;
  background: var(--orange);
  border-radius: 0 0 3px 3px;
}
.bottom-nav .nav-tab .nav-icon { font-size: 22px; }

/* ============ MATCH CARD ============ */
.match-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  margin: var(--sp-3) var(--sp-4);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.match-card:active { transform: scale(0.98); box-shadow: var(--shadow-sm); }
.match-card .mc-league {
  padding: var(--sp-2) var(--sp-3);
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.match-card .mc-league .lineup-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.match-card .mc-body {
  padding: var(--sp-4) var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.match-card .mc-team {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.match-card .mc-team.right { flex-direction: row-reverse; text-align: right; }
.match-card .mc-team-logo {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 12px;
  color: var(--navy);
  border: 2px solid var(--gray-200);
  overflow: hidden;
  flex-shrink: 0;
}
.match-card .mc-team-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  letter-spacing: 0.3px;
}
.match-card .mc-vs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  min-width: 70px;
}
.match-card .mc-timer {
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.match-card .mc-time {
  font-size: 10px;
  color: var(--gray-500);
  font-weight: 500;
}
.match-card .mc-footer {
  padding: var(--sp-2) var(--sp-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--gray-100);
  font-size: 10px;
  color: var(--gray-400);
  font-weight: 600;
}
.match-card .mc-footer .teams-count {
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: var(--gray-600);
}

/* ============ PROMO BANNER ============ */
.promo-banner {
  margin: var(--sp-4) var(--sp-4) var(--sp-2);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 50%, var(--orange-dark) 100%);
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-4);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.promo-banner::before {
  content: '';
  position: absolute;
  top: -50%; right: -30%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(249,115,22,0.3), transparent 70%);
  border-radius: 50%;
}
.promo-banner .pb-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  margin-bottom: var(--sp-1);
  position: relative;
}
.promo-banner .pb-sub {
  font-size: 12px;
  opacity: 0.85;
  font-weight: 500;
  position: relative;
}

/* ============ SEGMENTED TABS ============ */
.seg-tabs {
  display: flex;
  background: var(--gray-200);
  border-radius: var(--radius-md);
  padding: 3px;
  margin: 0 var(--sp-4);
  gap: 2px;
}
.seg-tabs .seg-tab {
  flex: 1;
  padding: var(--sp-2) var(--sp-3);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.seg-tabs .seg-tab.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

/* ============ ROLE TABS ============ */
.role-tabs {
  display: flex;
  padding: var(--sp-2) var(--sp-4);
  gap: var(--sp-2);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.role-tabs::-webkit-scrollbar { display: none; }
.role-tab {
  padding: var(--sp-2) var(--sp-4);
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  background: var(--white);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--gray-200);
  white-space: nowrap;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.role-tab.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.role-tab .count { font-size: 10px; opacity: 0.7; margin-left: 2px; }

/* ============ SETTINGS CARD ============ */
.settings-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  margin: var(--sp-3) var(--sp-4);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.sc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  cursor: pointer;
  transition: background 0.15s;
  min-height: 48px;
}
.sc-header:active { background: var(--gray-50); }
.sc-header .sc-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.sc-header .sc-label .sc-icon {
  width: 28px; height: 28px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.sc-header .sc-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--orange);
  background: rgba(249,115,22,0.1);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
.sc-header .sc-arrow { color: var(--gray-400); font-size: 16px; transition: transform 0.2s; }
.sc-body {
  padding: 0 var(--sp-4) var(--sp-4);
  border-top: 1px solid var(--gray-100);
  display: none;
}
.sc-body.open { display: block; padding-top: var(--sp-3); }

/* ============ TOGGLE ============ */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
}
.toggle-switch {
  width: 44px; height: 24px;
  background: var(--gray-300);
  border-radius: var(--radius-full);
  position: relative;
  transition: background 0.25s;
  flex-shrink: 0;
}
.toggle-switch.on { background: var(--green); }
.toggle-switch .toggle-knob {
  width: 20px; height: 20px;
  background: var(--white);
  border-radius: 50%;
  position: absolute;
  top: 2px; left: 2px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s;
}
.toggle-switch.on .toggle-knob { transform: translateX(20px); }

/* ============ SLIDER ============ */
.slider-control {
  padding: var(--sp-2) 0;
}
.slider-control .slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray-600);
  font-weight: 500;
  margin-bottom: var(--sp-2);
}
.slider-control .slider-val {
  font-weight: 700;
  color: var(--navy);
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.slider-control input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  outline: none;
}
.slider-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  background: var(--navy);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* ============ PLAYER CARD ============ */
.player-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--sp-3);
  margin: var(--sp-2) var(--sp-4);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  transition: all 0.15s;
}
.player-card:active { transform: scale(0.99); }
.player-card .pc-img {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gray-200), var(--gray-100));
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.player-card .pc-img .team-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  position: absolute;
  bottom: 0; right: 0;
  border: 2px solid var(--white);
}
.player-card .pc-info { flex: 1; min-width: 0; }
.player-card .pc-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-card .pc-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: 2px;
  flex-wrap: wrap;
}
.player-card .pc-role {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.player-card .pc-stat {
  font-size: 10px;
  color: var(--gray-500);
  font-weight: 500;
}
.player-card .pc-stats-row {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-1);
}
.player-card .pc-stat-chip {
  font-size: 9px;
  font-weight: 600;
  color: var(--gray-500);
  background: var(--gray-50);
  padding: 1px 5px;
  border-radius: 4px;
}
.player-card .pc-actions {
  display: flex;
  gap: var(--sp-2);
  flex-shrink: 0;
}
.pc-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.15s;
  border: 2px solid var(--gray-200);
  color: var(--gray-400);
  background: var(--white);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pc-btn.active-c { background: var(--navy); color: var(--white); border-color: var(--navy); }
.pc-btn.active-vc { background: var(--orange); color: var(--white); border-color: var(--orange); }
.pc-btn.add { border-color: var(--green); color: var(--green); }
.pc-btn.remove { border-color: var(--red); color: var(--red); }
.pc-btn.selected { background: var(--green); color: var(--white); border-color: var(--green); }
.player-card.excluded { opacity: 0.5; border-color: var(--red); background: var(--gray-50); }
.player-card.excluded .pc-btn.remove { background: var(--red); color: var(--white); }

.p-tag { font-size: 8px; font-weight: 700; padding: 1px 4px; border-radius: 3px; display: inline-block; margin-top: 4px; border: 0.5px solid; }
.p-tag.violet { color: #7c3aed; border-color: #c4b5fd; background: #f5f3ff; }
.p-tag.green { color: #059669; border-color: #6ee7b7; background: #ecfdf5; }
.p-tag.red { color: #dc2626; border-color: #fca5a5; background: #fef2f2; }
.p-tag.orange { color: #d97706; border-color: #fcd34d; background: #fffbeb; }
.pc-img-container { position: relative; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.red-dot { position: absolute; top: 0; left: 0; width: 10px; height: 10px; background: #ef4444; border-radius: 50%; border: 1.5px solid white; z-index: 5; }
.orange-dot { position: absolute; top: 0; left: 0; width: 10px; height: 10px; background: #f59e0b; border-radius: 50%; border: 1.5px solid white; z-index: 5; }
.green-dot { position: absolute; top: 0; left: 0; width: 10px; height: 10px; background: #10b981; border-radius: 50%; border: 1.5px solid white; z-index: 5; }

/* ============ TEAM PREVIEW CARD ============ */
.team-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  margin: var(--sp-3) var(--sp-4);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: all 0.15s;
}
.team-card.selected { border: 2px solid var(--orange); }
.tc-header {
  display: flex;
  align-items: center;
  padding: var(--sp-2) var(--sp-3);
  gap: var(--sp-2);
  border-bottom: 1px solid var(--gray-100);
}
.tc-header .tc-radio {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  flex-shrink: 0;
  transition: all 0.15s;
}
.team-card.selected .tc-radio { border-color: var(--orange); background: var(--orange); box-shadow: inset 0 0 0 3px var(--white); }
.tc-header .tc-label { font-weight: 700; font-size: 13px; color: var(--navy); flex: 1; }
.tc-header .tc-actions { display: flex; gap: var(--sp-1); }
.tc-header .tc-actions button {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all 0.15s;
}
.tc-header .tc-actions button:hover { background: var(--gray-100); color: var(--gray-600); }

.tc-field {
  background: linear-gradient(180deg, #1a6b3c 0%, #15803d 40%, #166534 100%);
  padding: var(--sp-4) var(--sp-3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
  position: relative;
  min-height: 90px;
}
.tc-field::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60px; height: 60px;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 50%;
}
.tc-captain-block { text-align: center; }
.tc-captain-block .tc-cp-img {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  margin: 0 auto var(--sp-1);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  position: relative;
}
.tc-captain-block .tc-badge {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 18px; height: 18px;
  font-size: 9px;
  font-weight: 800;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
}
.tc-badge.c-badge { background: var(--navy); }
.tc-badge.vc-badge { background: var(--orange); }
.tc-captain-block .tc-cp-name {
  font-size: 10px;
  color: var(--white);
  font-weight: 600;
  max-width: 70px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tc-field .tc-split {
  position: absolute;
  right: var(--sp-3);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}

.tc-footer {
  display: flex;
  align-items: center;
  padding: var(--sp-2) var(--sp-3);
  gap: var(--sp-3);
  justify-content: center;
}
.tc-footer .tc-stat {
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-500);
  text-align: center;
}
.tc-footer .tc-stat span { color: var(--navy); font-weight: 700; display: block; font-size: 13px; }

/* ============ ACTION CARDS (Match Entry) ============ */
.action-cards { padding: var(--sp-4); display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.action-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-4);
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: all 0.15s;
  cursor: pointer;
  border: 2px solid transparent;
}
.action-card:active { transform: scale(0.96); }
.action-card:hover { border-color: var(--orange); }
.action-card .ac-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  margin: 0 auto var(--sp-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.action-card .ac-icon.ai { background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: white; }
.action-card .ac-icon.smart { background: linear-gradient(135deg, var(--orange), var(--red)); color: white; }
.action-card .ac-icon.gemini { background: linear-gradient(135deg, #ec4899, #f59e0b); color: white; }
.action-card .ac-icon.teams { background: linear-gradient(135deg, var(--green), #14b8a6); color: white; }
.action-card .ac-icon.delete { background: linear-gradient(135deg, var(--gray-400), var(--gray-500)); color: white; }
.action-card .ac-title { font-weight: 700; font-size: 12px; color: var(--navy); text-transform: uppercase; letter-spacing: 0.3px; }

/* ============ STICKY BOTTOM BAR ============ */
.sticky-bottom {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: var(--sp-3) var(--sp-4);
  padding-bottom: calc(var(--sp-3) + var(--safe-bottom));
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  z-index: 90;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
  display: flex;
  gap: var(--sp-3);
}
.sticky-bottom .btn-primary {
  flex: 1;
  padding: var(--sp-3) var(--sp-4);
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  border: none;
  border-radius: var(--radius-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.15s;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sticky-bottom .btn-primary:active { transform: scale(0.98); }
.sticky-bottom .btn-secondary {
  flex: 1;
  padding: var(--sp-3) var(--sp-4);
  background: var(--gray-100);
  color: var(--navy);
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}
.sticky-bottom .btn-orange {
  flex: 1;
  padding: var(--sp-3) var(--sp-4);
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}
.sticky-bottom .btn-replace-m11 {
  flex: 1;
  padding: var(--sp-3) var(--sp-4);
  background: linear-gradient(135deg, #1976d2, #1565c0);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sticky-bottom .btn-replace-m11:active { transform: scale(0.98); }

/* My11Circle team card in replace dialog */
.m11-team-card {
  border: 2px solid var(--border, #e0e0e0);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  background: var(--white);
  transition: all 0.15s;
  position: relative;
}
.m11-team-card.selected {
  border-color: #1976d2;
  background: #e3f2fd;
}
.m11-team-card .m11-tc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.m11-tc-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--gray-400);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.m11-team-card.selected .m11-tc-radio {
  border-color: #1976d2;
  background: #1976d2;
}
.m11-team-card.selected .m11-tc-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}
.m11-tc-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  flex: 1;
}
.m11-tc-view-btn {
  padding: 4px 10px;
  background: var(--gray-100);
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.m11-tc-cvc {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--gray-600);
  margin-bottom: 6px;
}
.m11-tc-players-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.m11-tc-player-chip {
  padding: 3px 7px 3px 3px;
  background: var(--gray-100);
  border-radius: 20px;
  font-size: 11px;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 4px;
}
.m11-tc-player-chip.is-cap { background: #fff3e0; color: #e65100; font-weight: 700; }
.m11-tc-player-chip.is-vc  { background: #e8f5e9; color: #2e7d32; font-weight: 700; }
.m11-chip-img {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.m11-chip-img img { display: block; }
.m11-chip-badge {
  position: absolute;
  bottom: -2px;
  right: -3px;
  background: #e65100;
  color: white;
  font-size: 8px;
  font-weight: 800;
  padding: 0 3px;
  border-radius: 6px;
  line-height: 12px;
}
.m11-chip-badge.vc { background: #2e7d32; }
.m11-chip-name { font-size: 11px; white-space: nowrap; }
.m11-seq-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #1976d2;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}

/* ============ OPERATION PROGRESS MODAL ============ */
.op-progress-bar-wrap {
  height: 10px;
  background: var(--gray-200);
  border-radius: 10px;
  overflow: hidden;
}
.op-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), #ff9800);
  border-radius: 10px;
  transition: width 0.4s ease;
}
.op-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--gray-100);
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  transition: background 0.2s;
}
.op-row.pending  { color: var(--gray-500); }
.op-row.active   { background: #fff8e1; color: #e65100; }
.op-row.success  { background: #e8f5e9; color: #2e7d32; }
.op-row.fail     { background: #ffebee; color: #c62828; }
.op-row-icon     { font-size: 18px; flex-shrink: 0; }
.op-row-info     { flex: 1; }
.op-row-title    { font-weight: 700; }
.op-row-sub      { font-size: 11px; font-weight: 400; color: inherit; opacity: 0.8; margin-top: 1px; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: fadeOverlay 0.2s ease;
}
.modal-overlay.show { display: flex; }
.modal-sheet {
  background: var(--white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
  padding-bottom: var(--safe-bottom);
}
.modal-sheet .ms-handle {
  width: 40px; height: 4px;
  background: var(--gray-300);
  border-radius: 2px;
  margin: var(--sp-3) auto;
}
.modal-sheet .ms-header {
  padding: var(--sp-3) var(--sp-4);
  font-weight: 700;
  font-size: 16px;
  color: var(--navy);
  border-bottom: 1px solid var(--gray-100);
}
.modal-sheet .ms-body { padding: var(--sp-4); }
.modal-sheet .ms-footer {
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  gap: var(--sp-3);
  border-top: 1px solid var(--gray-100);
}
.modal-sheet .ms-footer button { flex: 1; padding: var(--sp-3); border-radius: var(--radius-md); font-weight: 700; font-size: 13px; text-transform: uppercase; }
.ms-btn-cancel { background: var(--gray-100); color: var(--gray-600); }
.ms-btn-confirm { background: linear-gradient(135deg, var(--navy), var(--navy-light)); color: var(--white); }
.ms-btn-orange { background: linear-gradient(135deg, var(--orange), var(--orange-dark)); color: var(--white); }

/* ============ ACCOUNT CARD ============ */
.account-platform-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  margin: var(--sp-3) var(--sp-4);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.apc-header {
  display: flex;
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  gap: var(--sp-3);
  border-bottom: 1px dashed var(--gray-200);
}
.apc-logo {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 11px;
  color: var(--navy);
}
.apc-name { flex: 1; font-weight: 700; font-size: 14px; color: var(--navy); }
.apc-add-btn {
  padding: var(--sp-2) var(--sp-4);
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: var(--white);
  font-weight: 700;
  font-size: 11px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.apc-body { padding: var(--sp-4); }
.apc-empty { text-align: center; color: var(--gray-400); font-size: 12px; font-weight: 500; padding: var(--sp-4) 0; }
.account-row {
  display: flex;
  align-items: center;
  padding: var(--sp-3) 0;
  gap: var(--sp-3);
  border-bottom: 1px solid var(--gray-100);
}
.account-row:last-child { border-bottom: none; }
.ar-priority { display: flex; flex-direction: column; gap: 2px; }
.ar-priority button { font-size: 14px; color: var(--gray-400); padding: 2px; }
.ar-info { flex: 1; }
.ar-info .ar-name { font-weight: 600; font-size: 13px; color: var(--navy); }
.ar-info .ar-phone { font-size: 11px; color: var(--gray-500); }
.ar-actions { display: flex; align-items: center; gap: var(--sp-3); }
.ar-delete { color: var(--red); font-size: 16px; }

/* ============ STEPPER ============ */
.step-progress {
  display: flex;
  align-items: center;
  padding: var(--sp-4) var(--sp-6);
  gap: 0;
}
.step-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex: 1;
}
.step-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-500);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.3s;
}
.step-item.active .step-circle { background: var(--navy); color: var(--white); }
.step-item.done .step-circle { background: var(--green); color: var(--white); }
.step-text { font-size: 10px; font-weight: 600; color: var(--gray-400); white-space: nowrap; }
.step-item.active .step-text { color: var(--navy); }
.step-item.done .step-text { color: var(--green-dark); }
.step-line { flex: 1; height: 2px; background: var(--gray-200); margin: 0 var(--sp-2); }
.step-line.done { background: var(--green); }

/* ============ SELECTED STRIP ============ */
.selected-strip {
  display: flex;
  gap: var(--sp-1);
  padding: var(--sp-2) var(--sp-4);
  overflow-x: auto;
}
.selected-strip::-webkit-scrollbar { display: none; }
.ss-slot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-400);
  flex-shrink: 0;
  transition: all 0.2s;
}
.ss-slot.filled { background: var(--navy); color: var(--white); }

/* ============ COPY MODAL HEADER ============ */
.copy-modal-top {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  padding: var(--sp-5) var(--sp-4);
  text-align: center;
  color: var(--white);
}
.copy-modal-top .cmt-title { font-weight: 800; font-size: 16px; font-family: var(--font-display); }
.copy-modal-top .cmt-sub { font-size: 12px; opacity: 0.9; margin-top: var(--sp-1); }

.copy-option {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  margin: var(--sp-3) 0;
  cursor: pointer;
  transition: all 0.15s;
}
.copy-option.selected { border-color: var(--orange); background: rgba(249,115,22,0.05); }
.copy-option .co-radio {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  flex-shrink: 0;
  margin-top: 2px;
}
.copy-option.selected .co-radio { border-color: var(--orange); background: var(--orange); box-shadow: inset 0 0 0 3px var(--white); }
.copy-option .co-title { font-weight: 700; font-size: 13px; color: var(--navy); }
.copy-option .co-desc { font-size: 11px; color: var(--gray-500); margin-top: var(--sp-1); line-height: 1.5; }

.acct-summary {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: var(--sp-3);
  margin-top: var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.acct-summary .as-info { flex: 1; }
.acct-summary .as-name { font-weight: 600; font-size: 12px; color: var(--navy); }
.acct-summary .as-phone { font-size: 11px; color: var(--gray-500); }
.acct-summary .as-stats {
  display: flex;
  gap: var(--sp-3);
  font-size: 10px;
  font-weight: 600;
  text-align: center;
}
.acct-summary .as-stats .as-s { color: var(--gray-500); }
.acct-summary .as-stats .as-s span { display: block; font-weight: 800; font-size: 14px; color: var(--navy); }

/* ============ INFO CARD ============ */
.info-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  margin: var(--sp-3) var(--sp-4);
  box-shadow: var(--shadow-card);
  padding: var(--sp-4);
}
.info-card .ic-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--navy);
  margin-bottom: var(--sp-3);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.info-card .ic-bullet {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.5;
}
.info-card .ic-bullet::before {
  content: '•';
  color: var(--orange);
  font-weight: 700;
  flex-shrink: 0;
}
.info-card .ic-link { color: var(--orange); font-weight: 600; font-size: 12px; }

/* ============ OTP INPUT ============ */
.otp-group {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  padding: var(--sp-4) 0;
}
.otp-box {
  width: 44px; height: 52px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  transition: border-color 0.2s;
}
.otp-box:focus { border-color: var(--navy); outline: none; }

/* ============ INPUT FIELD ============ */
.input-field {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--navy);
  transition: border-color 0.2s;
}
.input-field:focus { border-color: var(--navy); outline: none; }
.input-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: var(--sp-2);
  display: block;
}
.input-count { font-size: 11px; color: var(--gray-400); text-align: right; margin-top: var(--sp-1); }

/* ============ SECTION TITLE ============ */
.section-title {
  padding: var(--sp-4) var(--sp-4) var(--sp-2);
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  font-family: var(--font-display);
}
.section-sub {
  padding: 0 var(--sp-4) var(--sp-3);
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.5;
}

/* ============ SORT ROW ============ */
.sort-row {
  display: flex;
  padding: var(--sp-2) var(--sp-4);
  gap: var(--sp-3);
}
.sort-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.sort-btn.active { color: var(--navy); border-bottom: 2px solid var(--navy); }

/* ============ FAB ============ */
.fab-group {
  position: fixed;
  bottom: 80px;
  right: calc(50% - 220px);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  z-index: 85;
}
.fab {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: var(--white);
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s;
}
.fab:active { transform: scale(0.9); }
.fab.fab-delete { background: var(--red); }
.fab.fab-copy { background: #3b82f6; }

/* ============ TOOLBAR ROW ============ */
.toolbar-row {
  display: flex;
  align-items: center;
  padding: var(--sp-2) var(--sp-4);
  gap: var(--sp-2);
  justify-content: space-between;
}
.toolbar-row .tr-count { font-weight: 700; font-size: 13px; color: var(--navy); }
.toolbar-row .tr-actions { display: flex; gap: var(--sp-2); }
.toolbar-row .tr-actions button {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  color: var(--gray-500);
  transition: all 0.15s;
}
.toolbar-row .tr-actions button:hover { border-color: var(--gray-300); color: var(--navy); }

/* ============ HELPER NOTE ============ */
.helper-note {
  margin: var(--sp-2) var(--sp-4);
  padding: var(--sp-3);
  background: #eff6ff;
  border-radius: var(--radius-md);
  font-size: 11px;
  color: #2563eb;
  font-weight: 500;
  line-height: 1.5;
  border-left: 3px solid #3b82f6;
}

/* ============ MATCH ENTRY WELCOME ============ */
.welcome-section {
  text-align: center;
  padding: var(--sp-6) var(--sp-4) var(--sp-4);
}
.welcome-section .ws-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--navy);
  margin-bottom: var(--sp-2);
}
.welcome-section .ws-sub {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
}

/* ============ RESPONSIVE ============ */
@media (min-width: 481px) {
  #app { box-shadow: var(--shadow-elevated); }
}
@media (min-width: 768px) {
  #app { max-width: 480px; }
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 0; background: transparent; }

/* ============ TEAM PREVIEW ============ */
.preview-header {
  text-align: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 12px;
}
.preview-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
}
.preview-meta {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}
.preview-cvc {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 10px 0;
}
.preview-cvc-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}
.preview-split {
  text-align: center;
  font-size: 12px;
  color: var(--gray-500);
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 12px;
}
.preview-role-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  padding: 8px 0 4px;
  border-bottom: 1px solid var(--gray-100);
}
.preview-players {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0;
}
.preview-player {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  min-width: 45%;
  flex: 1;
}
.preview-player-img {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-player-img .tc-badge {
  position: absolute;
  bottom: -2px;
  right: -4px;
  font-size: 8px;
  width: 16px;
  height: 16px;
  line-height: 16px;
}
.preview-player-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  flex: 1;
}
.preview-player-credit {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
}
.preview-actions {
  padding: 16px 0 8px;
  display: flex;
  gap: 8px;
}
.preview-actions .btn-primary,
.preview-actions .btn-orange {
  flex: 1;
  font-size: 13px;
}

/* ============ EXPORT BADGE ============ */
.export-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: var(--green-dark);
  background: #dcfce7;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

/* ============ TEAM CARD ENHANCEMENTS ============ */
.team-card.favorited {
  border-left: 3px solid var(--red);
}
.tc-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
}

/* ============ EDIT PLAYER SELECTED STATE ============ */
.player-card.pc-selected {
  background: #f0fdf4;
  border-left: 3px solid var(--green);
}

/* ============ BTN ORANGE ============ */
.btn-orange {
  background: var(--orange);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  text-align: center;
}
.btn-orange:active {
  background: var(--orange-dark);
}

/* ============================================
   MY PLAYERS / MY CAPTAINS - Swipe Cards
   ============================================ */
.mp-summary { padding: 10px 16px; }
.mp-sum-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 600; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.swipe-list { padding: 0 12px 80px; }
.swipe-card {
  background: var(--white); border-radius: var(--radius-lg);
  margin-bottom: 8px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid var(--gray-100);
}
.swipe-content { display: flex; flex-direction: column; }
.swipe-main {
  display: flex; align-items: center; padding: 12px 14px; gap: 10px;
}
.swipe-info { flex: 1; min-width: 0; }
.swipe-name { font-weight: 700; font-size: 13px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swipe-meta { display: flex; gap: 6px; align-items: center; margin-top: 2px; flex-wrap: wrap; }
.swipe-meta .pc-role, .swipe-meta .pc-stat { font-size: 11px; }
.swipe-badges { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.mp-badge {
  font-size: 10px; font-weight: 700; padding: 2px 6px;
  border-radius: 4px; display: inline-block;
}
.mp-badge.cap { background: var(--navy); color: var(--white); }
.mp-badge.vc { background: var(--orange); color: var(--white); }
.swipe-count-block {
  text-align: center; min-width: 48px; flex-shrink: 0;
}
.swipe-count {
  font-size: 22px; font-weight: 800; color: var(--navy); line-height: 1;
}
.swipe-count-label { font-size: 10px; color: var(--gray-400); margin-top: 1px; }
.swipe-pct {
  font-size: 11px; font-weight: 700; color: var(--orange);
  margin-top: 2px;
}
.swipe-replace-btn {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  width: 100%; padding: 10px; border: none;
  background: var(--gray-50); color: var(--navy);
  font-size: 12px; font-weight: 700; cursor: pointer;
  border-top: 1px solid var(--gray-100);
  transition: background 0.15s;
}
.swipe-replace-btn:active { background: var(--gray-200); }

/* ============================================
   REPLACE MODAL
   ============================================ */
.replace-info { padding: 12px 16px; border-bottom: 1px solid var(--gray-100); }
.replace-old-player {
  display: flex; align-items: center; gap: 10px;
  background: #fff3e0; border-radius: var(--radius-md); padding: 10px 12px;
}
.rep-img { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.rep-detail { flex: 1; min-width: 0; }
.rep-name { font-weight: 700; font-size: 13px; color: var(--navy); }
.rep-meta { font-size: 11px; color: var(--gray-500); margin-top: 1px; }
.rep-in-teams { font-size: 11px; font-weight: 700; color: var(--orange); white-space: nowrap; }

.replace-team-select { padding: 12px 16px; border-bottom: 1px solid var(--gray-100); }
.rep-team-header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 600; color: var(--gray-600); margin-bottom: 8px;
}
.rep-toggle-all {
  background: none; border: none; color: var(--orange); font-weight: 700;
  font-size: 11px; cursor: pointer; padding: 0;
}
.rep-team-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rep-team-chip {
  padding: 5px 12px; border-radius: 20px; font-size: 11px; font-weight: 600;
  border: 1.5px solid var(--gray-200); color: var(--gray-500);
  cursor: pointer; transition: all 0.15s;
}
.rep-team-chip.selected {
  background: var(--navy); color: var(--white); border-color: var(--navy);
}

.replace-search { padding: 8px 16px; }
.replace-search input {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md); font-size: 13px; outline: none;
  box-sizing: border-box;
}
.replace-search input:focus { border-color: var(--orange); }

.replace-player-list {
  max-height: 280px; overflow-y: auto; padding: 0 16px;
}
.rep-player-row {
  display: flex; align-items: center; gap: 8px; padding: 10px 8px;
  border-bottom: 1px solid var(--gray-50); cursor: pointer;
  border-radius: var(--radius-md); transition: background 0.12s;
}
.rep-player-row:active { background: var(--gray-50); }
.rep-player-row.rep-selected {
  background: #e8f5e9; border-color: var(--green);
}
.rep-check { width: 24px; text-align: center; font-size: 16px; flex-shrink: 0; }

.mc-sub-tabs { margin-bottom: 0; }

/* ============ AUTH FULL SCREEN ============ */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, #0d1f3c 0%, #162d50 50%, #1a3560 100%);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.auth-card {
  width: 90%;
  max-width: 380px;
  text-align: center;
}
.auth-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
  margin-bottom: 2px;
}
.auth-subtitle {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: 4px;
  margin-bottom: 36px;
}
.auth-form {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 28px 24px;
}
.auth-form .input-label {
  text-align: left;
  display: block;
  color: #8899bb;
  font-size: 12px;
  margin-bottom: 4px;
}
.auth-input {
  background: rgba(255,255,255,0.1) !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  color: #fff !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  font-size: 14px !important;
  width: 100%;
  box-sizing: border-box;
}
.auth-input::placeholder { color: #7788aa !important; }
.auth-input:focus {
  border-color: var(--orange) !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}
.auth-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  margin-top: 20px;
  transition: transform 0.1s, box-shadow 0.2s;
}
.auth-btn:hover { box-shadow: 0 4px 20px rgba(249,115,22,0.4); }
.auth-btn:active { transform: scale(0.98); }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; }
