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

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

:root {
  /* Marvel Rivals logo palette: navy + gold/yellow + white */
  --navy:        #1c2340;
  --navy-deep:   #141a30;
  --navy-raised: #232b4d;
  --navy-hover:  #2c365e;
  --gold:        #f0c419;
  --gold-bright: #ffd83d;
  --gold-dim:    rgba(240,196,25,0.12);
  --gold-border: rgba(240,196,25,0.4);

  --page-bg:        #ffffff;
  --border-subtle:  rgba(255,255,255,0.07);
  --border-mid:      rgba(255,255,255,0.12);
  --border-on-white: #e4e6ef;

  --text-primary:    #f3f4fa;
  --text-secondary:  #aab0d0;
  --text-muted:      #6b7299;
  --text-on-white:   #1c2340;
  --text-on-white-secondary: #6b7299;

  --red:        #dc2626;
  --red-bright: #ef4444;
  --red-dim:    rgba(220,38,38,0.1);
  --green:      #22c55e;
  --green-dim:  rgba(34,197,94,0.08);
  --green-border: rgba(34,197,94,0.2);

  --font-display: 'Rajdhani', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* legacy variable aliases so older component CSS keeps working */
  --bg-void:    var(--page-bg);
  --bg-deep:    var(--navy);
  --bg-surface: var(--navy-raised);
  --bg-raised:  var(--navy-raised);
  --bg-hover:   var(--navy-hover);
  --border-accent: var(--gold-border);
}

html, body {
  min-height: 100vh;

  /* ══════════════════════════════════════════════════════════════════════
     BACKGROUND OPTIONS — uncomment ONE of the lines below (and comment out
     the others) to switch the page background. The active one is Option 1.
  ══════════════════════════════════════════════════════════════════════ */

  /* Option 1 (ACTIVE): Soft navy-to-white radial glow — subtle, keeps team
     colors and white cards popping, just removes the flat stark white. */
  background: radial-gradient(ellipse 120% 80% at 50% -10%, rgba(28,35,64,0.08) 0%, rgba(240,196,25,0.04) 35%, #ffffff 70%);

  /* Option 2: Light gold-tinted diagonal sweep — warmer, more "trophy room" feel.
  background: linear-gradient(135deg, #fffdf5 0%, #fff8e1 25%, #ffffff 60%, #f7f8fc 100%);
  */

  /* Option 3: Cool navy vignette — darker corners, brighter center, dramatic.
  background: radial-gradient(circle at 50% 0%, #ffffff 0%, #eef0f8 45%, #dde1f0 100%);
  */

  /* Option 4: Full navy dark mode — for if you want the WHOLE page dark,
     not just the cards/windows (this is a bigger visual shift).
  background: linear-gradient(160deg, #141a30 0%, #1c2340 50%, #0d1124 100%);
  */

  background-attachment: fixed;
  font-family: var(--font-body);
  color: var(--text-on-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem 4rem;
}

/* ── PAGE HEADER ─────────────────────────────────────────────────────── */
.page-header { text-align: center; margin-bottom: 1.5rem; width: 100%; }
.page-eyebrow {
  font-family: var(--font-display); font-size: 11px; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--gold-bright);
  -webkit-text-stroke: 0.3px var(--navy);
  margin-bottom: 0.35rem;
}
.page-title {
  font-family: var(--font-display); font-size: clamp(26px, 3.5vw, 42px); font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--navy); line-height: 1; margin-bottom: 0.25rem;
}
.page-subtitle { font-size: 13px; color: var(--text-on-white-secondary); letter-spacing: 0.04em; }
.deco-line { display: flex; align-items: center; gap: 10px; margin: 0.9rem auto 0; width: 200px; }
.deco-line::before, .deco-line::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.deco-diamond { width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); flex-shrink: 0; }

/* ── SYNC BAR ─────────────────────────────────────────────────────────── */
.sync-bar { display: flex; align-items: center; justify-content: center; gap: 7px; font-family: var(--font-display); font-size: 11px; letter-spacing: 0.08em; margin-top: 0.6rem; color: var(--text-on-white-secondary); transition: color 0.3s; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); transition: background 0.3s; }
.sync-bar.synced  { color: #16a34a; } .sync-bar.synced  .sync-dot { background: #16a34a; }
.sync-bar.saving  { color: #b45309; } .sync-bar.saving  .sync-dot { background: #b45309; animation: pulse 0.8s infinite; }
.sync-bar.error   { color: #dc2626; } .sync-bar.error   .sync-dot { background: #dc2626; }
.sync-bar.loading { color: var(--text-on-white-secondary); } .sync-bar.loading .sync-dot { background: var(--text-on-white-secondary); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── MAIN TABS ────────────────────────────────────────────────────────── */
.main-tabs {
  display: flex; gap: 4px; background: var(--navy); border: 1px solid var(--navy-deep);
  border-radius: 12px; padding: 4px; width: fit-content; margin: 0 auto 1.5rem; flex-wrap: wrap;
  box-shadow: 0 4px 16px rgba(28,35,64,0.15);
}
.main-tab {
  font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 8px 18px; border-radius: 9px; border: none;
  background: transparent; color: var(--text-secondary); cursor: pointer; transition: all 0.15s;
}
.main-tab.active { background: var(--gold); color: var(--navy-deep); }
.main-tab:hover:not(.active) { color: var(--text-primary); }

/* ── MAIN LAYOUT (stacked: roster+pool full width, schedule below) ──── */
.main-layout {
  display: flex; flex-direction: column; gap: 18px;
  width: 100%; max-width: 1400px;
}
.roster-pool-row {
  display: flex; gap: 18px; align-items: flex-start; width: 100%;
}

/* ══ ROSTER PHONE → now full-height column, widened ═══════════════════ */
.phone-col { flex: 0 0 460px; }
.phone-shell {
  width: 100%; background: var(--navy); border-radius: 22px;
  border: 1px solid var(--navy-deep); overflow: hidden;
  box-shadow: 0 24px 60px rgba(28,35,64,0.25), inset 0 1px 0 rgba(255,255,255,0.04);
}
.phone-notch { background: var(--navy-deep); height: 26px; display: flex; align-items: center; justify-content: center; gap: 8px; border-bottom: 1px solid var(--border-subtle); }
.notch-pill { width: 52px; height: 9px; background: var(--navy-raised); border-radius: 999px; }
.notch-dot  { width: 7px;  height: 7px; background: var(--navy-raised); border-radius: 50%; }
.phone-bottom-bar { height: 20px; background: var(--navy-deep); display: flex; align-items: center; justify-content: center; border-top: 1px solid var(--border-subtle); }
.home-indicator { width: 66px; height: 4px; background: var(--border-mid); border-radius: 999px; }

.app-header {
  background: linear-gradient(180deg, #20264a 0%, var(--navy) 100%);
  padding: 14px 16px 12px; border-bottom: 1px solid var(--gold-border);
  position: relative; overflow: hidden;
}
.app-header::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.app-header-tag {
  display: inline-flex; align-items: center; gap: 5px; background: var(--gold-dim);
  border: 1px solid var(--gold-border); color: var(--gold-bright); font-size: 10px;
  font-family: var(--font-display); font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 3px; margin-bottom: 5px;
}
.app-header-tag::before { content: '◆'; font-size: 7px; }
.app-header h1 { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-primary); line-height: 1; }
.app-header p { font-size: 11px; color: var(--text-secondary); margin-top: 3px; }

/* Roster grid — widened, more columns */
#view-roster { padding: 12px; }
.roster-split { display: flex; gap: 0; align-items: stretch; }
.roster-core-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 1fr);
  gap: 8px; flex: 1;
}
.roster-divider { width: 1px; background: var(--border-mid); margin: 4px 10px; flex-shrink: 0; }
.roster-flex-col {
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  width: 130px; flex-shrink: 0;
}
/* Keep old selector working for anything still targeting it directly */
.roster-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.card { background: var(--navy-raised); border: 1px solid var(--border-subtle); border-radius: 10px; overflow: hidden; }
.card.filled { border-color: var(--gold-border); background: linear-gradient(160deg, #2a2410 0%, var(--navy-raised) 65%); }
.card-top { height: 46px; background: var(--navy-deep); display: flex; align-items: center; justify-content: center; position: relative; border-bottom: 1px solid var(--border-subtle); }
.card.filled .card-top { background: linear-gradient(135deg, #2d2710, #1e2240); border-bottom-color: var(--gold-border); }
.slot-num { position: absolute; top: 5px; left: 7px; font-family: var(--font-display); font-size: 9px; letter-spacing: 0.1em; color: var(--text-muted); text-transform: uppercase; }
.slot-icon { font-size: 17px; opacity: 0.25; line-height: 1; color: var(--text-secondary); }
.card.filled .slot-icon { color: var(--gold-bright); opacity: 0.8; }
.card-body { padding: 7px 8px 9px; }
.player-name { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 0.03em; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 16px; }
.player-name.empty { color: var(--text-muted); font-weight: 400; font-style: italic; font-family: var(--font-body); font-size: 11px; }
.player-team { font-size: 9px; color: var(--text-secondary); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-row { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.stat-label { font-size: 9px; color: var(--text-muted); }
.stat-val { font-size: 11px; font-weight: 600; color: var(--text-primary); font-family: var(--font-display); }
.stat-val.empty { color: var(--text-muted); font-weight: 400; font-family: var(--font-body); }
.slot-pts { font-family: var(--font-display); font-size: 10px; font-weight: 600; color: var(--gold-bright); margin-top: 2px; }
.card-btn { margin-top: 6px; width: 100%; font-size: 9px; font-family: var(--font-display); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 0; cursor: pointer; border-radius: 5px; border: 1px solid var(--border-mid); background: transparent; color: var(--text-secondary); transition: all 0.12s; }
.card-btn:hover { background: var(--navy-hover); color: var(--text-primary); }
.card-btn.remove { color: #f87171; border-color: rgba(220,38,38,0.4); }
.card-btn.remove:hover { background: var(--red-dim); }
.card-btn.trade { color: var(--gold-bright); border-color: var(--gold-border); }
.card-btn.trade:hover { background: var(--gold-dim); }
.card.card-locked { border-color: rgba(220,38,38,0.3); }

.card-team-logo { position: absolute; top: 5px; right: 28px; width: 24px; height: 24px; border-radius: 5px; object-fit: contain; background: var(--navy-deep); border: 1px solid var(--border-subtle); padding: 2px; }
.card-team-logo-placeholder { position: absolute; top: 5px; right: 28px; width: 24px; height: 24px; border-radius: 5px; background: var(--navy-deep); border: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 8px; font-weight: 700; color: var(--text-muted); }

.card-swap-mini {
  position: absolute; top: 5px; right: 6px;
  width: 18px; height: 18px; border-radius: 5px;
  background: var(--navy-raised); border: 1px solid var(--gold-border);
  color: var(--gold-bright); font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; z-index: 2;
  transition: all 0.12s;
}
.card-swap-mini:hover { background: var(--gold-dim); }
.card-swap-mini.swap-active { background: var(--gold); color: var(--navy-deep); border-color: var(--gold); animation: swap-pulse 1s infinite; }

.footer { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; background: var(--navy-deep); border-radius: 8px; border: 1px solid var(--border-subtle); flex-wrap: wrap; gap: 6px; }
.footer-stat { font-size: 11px; color: var(--text-secondary); font-family: var(--font-display); }
.footer-stat span { color: var(--gold-bright); font-weight: 600; }
.reset-btn { font-size: 10px; font-family: var(--font-display); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; cursor: pointer; border-radius: 4px; border: 1px solid var(--border-mid); background: transparent; color: var(--text-muted); transition: all 0.12s; }
.reset-btn:hover { border-color: rgba(220,38,38,0.4); color: #f87171; background: var(--red-dim); }

.roster-lock-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; gap: 8px; flex-wrap: wrap; }
.lock-badge { font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.lock-badge.unlocked { background: rgba(255,255,255,0.05); border: 1px solid var(--border-mid); color: var(--text-muted); }
.lock-badge.locked { background: var(--gold-dim); border: 1px solid var(--gold-border); color: var(--gold-bright); }
.trade-info-bar { font-family: var(--font-display); font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--gold-dim); border: 1px solid var(--gold-border); color: var(--gold-bright); }
.trade-info-bar.exhausted { background: var(--red-dim); border-color: rgba(220,38,38,0.4); color: #f87171; }
.lock-btn-row { margin-top: 8px; display: flex; gap: 6px; }
.lock-roster-btn { flex: 1; font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 0; cursor: pointer; border-radius: 8px; background: var(--gold); color: var(--navy-deep); border: none; transition: background 0.12s; }
.lock-roster-btn:hover { background: var(--gold-bright); }
.unlock-roster-btn { flex: 1; font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 0; cursor: pointer; border-radius: 8px; background: transparent; color: var(--text-muted); border: 1px solid var(--border-mid); transition: all 0.12s; }
.unlock-roster-btn:hover { border-color: rgba(220,38,38,0.4); color: #f87171; }

/* ══ POOL SECTION ═══════════════════════════════════════════════════════ */
.pool-section { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.filter-panel { background: var(--navy); border: 1px solid var(--navy-deep); border-radius: 16px; overflow: hidden; box-shadow: 0 8px 24px rgba(28,35,64,0.15); }
.filter-panel-header { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid var(--border-subtle); background: var(--navy-deep); position: relative; }
.filter-panel-header::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.filter-panel-title { font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold-bright); }
.filter-active-indicator { font-family: var(--font-display); font-size: 10px; color: var(--gold-bright); opacity: 0; transition: opacity 0.2s; }
.filter-active-indicator.visible { opacity: 1; }
.filter-clear-btn { font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 11px; cursor: pointer; border-radius: 6px; border: 1px solid var(--border-mid); background: transparent; color: var(--text-muted); transition: all 0.12s; }
.filter-clear-btn:hover { border-color: var(--gold-border); color: var(--gold-bright); }

.filter-body-new { padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 12px; }
.filter-search-row { display: flex; }
.filter-search { flex: 1; font-family: var(--font-body); font-size: 12px; padding: 7px 12px 7px 28px; border-radius: 7px; border: 1px solid var(--border-mid); background: var(--navy-raised); color: var(--text-primary); outline: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7299' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 9px center; }
.filter-search:focus { border-color: var(--gold-border); }
.filter-search::placeholder { color: var(--text-muted); }
.filter-col { display: flex; flex-direction: column; gap: 6px; }
.filter-col-label { font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.filter-checkbox-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.filter-checkbox-label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; padding: 4px 9px; border-radius: 6px; border: 1px solid var(--border-mid); background: var(--navy-raised); transition: all 0.12s; user-select: none; }
.filter-checkbox-label:hover { border-color: var(--gold-border); background: var(--navy-hover); }
.filter-checkbox-label:has(.filter-cb:checked) { background: var(--gold-dim); border-color: var(--gold-border); }
.filter-cb { appearance: none; width: 12px; height: 12px; border: 1px solid var(--border-mid); border-radius: 3px; background: var(--navy-deep); cursor: pointer; flex-shrink: 0; position: relative; transition: all 0.12s; }
.filter-cb:checked { background: var(--gold); border-color: var(--gold); }
.filter-cb:checked::after { content: ''; position: absolute; top: 1px; left: 3px; width: 4px; height: 7px; border: 2px solid var(--navy-deep); border-top: none; border-left: none; transform: rotate(45deg); }
.filter-cb-text { font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-secondary); white-space: nowrap; }
.filter-checkbox-label:has(.filter-cb:checked) .filter-cb-text { color: var(--gold-bright); }
.filter-nat-note { font-size: 10px; color: var(--text-muted); font-style: italic; }

/* Role phones row */
.role-phones-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.role-phone { background: var(--navy); border-radius: 18px; border: 1px solid var(--navy-deep); overflow: hidden; box-shadow: 0 16px 40px rgba(28,35,64,0.18); display: flex; flex-direction: column; }
.role-phone-notch { height: 20px; background: var(--navy-deep); display: flex; align-items: center; justify-content: center; gap: 6px; border-bottom: 1px solid var(--border-subtle); flex-shrink: 0; }
.rp-notch-pill { width: 38px; height: 7px; background: var(--navy-raised); border-radius: 999px; }
.rp-notch-dot  { width: 6px;  height: 6px; background: var(--navy-raised); border-radius: 50%; }
.role-phone-header { padding: 10px 12px 9px; border-bottom: 1px solid var(--border-subtle); position: relative; overflow: hidden; flex-shrink: 0; background: linear-gradient(180deg, #20264a, var(--navy)); }
.role-phone-header::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.rp-header-top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.rp-role-icon { width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 13px; background: var(--gold-dim); border: 1px solid var(--gold-border); }
.rp-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-bright); }
.rp-count { margin-left: auto; font-family: var(--font-display); font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--gold-dim); color: var(--gold-bright); border: 1px solid var(--gold-border); }
.rp-subtitle { font-size: 10px; color: var(--text-muted); padding-left: 34px; }
.role-phone-body { padding: 8px; overflow-y: auto; flex: 1; min-height: 260px; max-height: 420px; scrollbar-width: thin; scrollbar-color: var(--border-mid) transparent; display: flex; flex-direction: column; gap: 6px; }
.role-phone-bar { height: 16px; background: var(--navy-deep); display: flex; align-items: center; justify-content: center; border-top: 1px solid var(--border-subtle); flex-shrink: 0; }
.rp-home { width: 48px; height: 3px; background: var(--border-mid); border-radius: 999px; }

.pool-card { background: var(--navy-raised); border: 1px solid var(--border-subtle); border-radius: 8px; padding: 8px 10px; cursor: pointer; transition: border-color 0.12s, background 0.12s; display: flex; align-items: center; gap: 9px; }
.pool-card:hover { border-color: var(--gold-border); background: var(--navy-hover); }
.pool-card.drafted { opacity: 0.4; cursor: pointer; }
.pcard-avatar { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 12px; font-weight: 700; flex-shrink: 0; background: var(--gold-dim); color: var(--gold-bright); border: 1px solid var(--gold-border); }
.pcard-avatar-logo { object-fit: contain; padding: 3px; background: var(--navy-deep); border: 1px solid var(--border-subtle); }
.pool-card.drafted .pcard-avatar { background: var(--navy-deep); color: var(--text-muted); border-color: var(--border-subtle); }
.pcard-info { flex: 1; min-width: 0; }
.pcard-name { font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-team { font-size: 10px; color: var(--text-secondary); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-nat  { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.pcard-pts  { font-family: var(--font-display); font-size: 10px; font-weight: 600; color: var(--gold-bright); margin-top: 1px; }
.draft-btn { flex-shrink: 0; font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 9px; cursor: pointer; border-radius: 5px; background: transparent; transition: background 0.1s; white-space: nowrap; border: 1px solid var(--gold-border); color: var(--gold-bright); }
.draft-btn:hover { background: var(--gold-dim); }
.drafted-badge { flex-shrink: 0; font-family: var(--font-display); font-size: 10px; font-weight: 600; padding: 4px 7px; border-radius: 5px; background: var(--navy-deep); color: var(--text-muted); border: 1px solid var(--border-subtle); }
.no-results { font-size: 12px; color: var(--text-muted); padding: 2rem 0; text-align: center; }

/* ══ SCHEDULE — now landscape, below roster+pool ════════════════════ */
.schedule-section { width: 100%; }
.upcoming-shell {
  width: 100%; background: var(--navy); border-radius: 18px; border: 1px solid var(--navy-deep);
  overflow: hidden; box-shadow: 0 16px 40px rgba(28,35,64,0.18);
}
.upcoming-notch { height: 20px; background: var(--navy-deep); display: flex; align-items: center; justify-content: center; gap: 6px; border-bottom: 1px solid var(--border-subtle); }
.upcoming-notch-pill { width: 50px; height: 7px; background: var(--navy-raised); border-radius: 999px; }
.upcoming-notch-dot  { width: 6px; height: 6px; background: var(--navy-raised); border-radius: 50%; }
.upcoming-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px 10px; border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, #20264a, var(--navy)); position: relative;
}
.upcoming-header::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.upcoming-header-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-bright); flex-shrink: 0; }
.upcoming-round-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.upcoming-round-btn {
  font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 6px; cursor: pointer; border: 1px solid var(--border-mid);
  background: transparent; color: var(--text-muted); transition: all 0.12s; white-space: nowrap;
}
.upcoming-round-btn.active { background: var(--gold-dim); border-color: var(--gold-border); color: var(--gold-bright); }
.upcoming-round-btn:hover:not(.active) { color: var(--text-secondary); }

/* Landscape match grid */
.upcoming-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 600px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-mid) transparent;
}
.upcoming-empty { font-size: 12px; color: var(--text-muted); text-align: center; padding: 2rem 0; font-style: italic; }
.upcoming-bar { height: 16px; background: var(--navy-deep); display: flex; align-items: center; justify-content: center; border-top: 1px solid var(--border-subtle); }
.upcoming-bar-pill { width: 48px; height: 3px; background: var(--border-mid); border-radius: 999px; }

.match-card { background: var(--navy-raised); border: 1px solid var(--border-subtle); border-radius: 10px; overflow: hidden; transition: border-color 0.12s; }
.match-card:hover { border-color: var(--gold-border); }
.match-card-time { font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: 0.06em; padding: 5px 10px; background: var(--navy-deep); border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); text-align: center; }
.match-card-time.match-live { color: #f87171; }
.match-teams-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px; gap: 6px; }
.match-team-side { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 1; min-width: 0; }
.match-team-side.winner .match-team-name { color: #4ade80; }
.match-logo { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; background: var(--navy-deep); border: 1px solid var(--border-subtle); padding: 3px; }
.match-logo-placeholder { width: 32px; height: 32px; border-radius: 8px; background: var(--navy-deep); border: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 9px; font-weight: 700; color: var(--text-muted); }
.match-team-name { font-family: var(--font-display); font-size: 10px; font-weight: 600; color: var(--text-primary); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; }
.match-vs { font-family: var(--font-display); font-size: 12px; font-weight: 700; color: var(--text-muted); flex-shrink: 0; }
.match-result { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 5px 10px; background: var(--navy-deep); border-top: 1px solid var(--border-subtle); font-family: var(--font-display); font-size: 10px; }
.match-result-score { color: var(--text-secondary); }
.match-winner-label { color: var(--gold-bright); font-weight: 700; }

/* ══ LEADERBOARD ═════════════════════════════════════════════════════ */
.leaderboard-shell { width: 100%; max-width: 460px; margin: 0 auto; background: var(--navy); border-radius: 22px; border: 1px solid var(--navy-deep); overflow: hidden; box-shadow: 0 24px 60px rgba(28,35,64,0.25); }
.lb-header { background: linear-gradient(180deg, #20264a, var(--navy)); padding: 14px 16px 12px; border-bottom: 1px solid var(--gold-border); position: relative; overflow: hidden; }
.lb-header::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.lb-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-primary); line-height: 1; }
.lb-subtitle { font-size: 11px; color: var(--text-secondary); margin-top: 3px; }
.lb-body { padding: 10px; min-height: 200px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; margin-bottom: 6px; background: var(--navy-raised); border: 1px solid var(--border-subtle); }
.lb-row.lb-me { background: var(--gold-dim); border-color: var(--gold-border); }
.lb-rank { font-family: var(--font-display); font-size: 16px; font-weight: 700; min-width: 32px; text-align: center; color: var(--text-primary); }
.lb-name { font-family: var(--font-display); font-size: 14px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-primary); flex: 1; }
.lb-row.lb-me .lb-name { color: var(--gold-bright); }
.lb-pts { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--gold-bright); }
.lb-empty { font-size: 13px; color: var(--text-muted); text-align: center; padding: 2rem 0; }

/* ══ MODALS ═══════════════════════════════════════════════════════════ */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(20,26,48,0.7); align-items: center; justify-content: center; z-index: 100; backdrop-filter: blur(2px); }
.modal-overlay.open { display: flex; }
.modal { background: var(--navy-raised); border: 1px solid var(--border-mid); border-top: 2px solid var(--gold); border-radius: 16px; padding: 22px; width: 290px; box-shadow: 0 24px 60px rgba(0,0,0,0.4); color: var(--text-primary); }
.modal h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-primary); margin-bottom: 14px; }
.modal label { font-size: 10px; font-family: var(--font-display); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); display: block; margin-bottom: 5px; }
.slot-select { width: 100%; margin-bottom: 4px; font-size: 13px; padding: 7px 10px; border-radius: 7px; border: 1px solid var(--border-mid); background: var(--navy-deep); color: var(--text-primary); outline: none; appearance: none; }
.slot-select:focus { border-color: var(--gold-border); }
.modal-actions { display: flex; gap: 8px; margin-top: 14px; }
.modal-actions button { flex: 1; padding: 8px 0; font-size: 12px; font-family: var(--font-display); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; border-radius: 7px; }
.btn-save { background: var(--gold); color: var(--navy-deep); border: none; }
.btn-save:hover { background: var(--gold-bright); }
.btn-cancel { background: transparent; border: 1px solid var(--border-mid); color: var(--text-secondary); }
.btn-cancel:hover { background: var(--navy-hover); }
.btn-trade { background: var(--gold) !important; color: var(--navy-deep) !important; }

.trade-modal-box { width: 300px; }
.trade-modal-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-bright); margin-bottom: 14px; }
.trade-out-row { background: var(--navy-deep); border: 1px solid var(--border-subtle); border-radius: 8px; padding: 9px 12px; display: flex; flex-direction: column; gap: 3px; }
.trade-label { font-family: var(--font-display); font-size: 9px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.trade-player-name { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--text-primary); }
.modal-label { font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.trade-salary-warning { font-size: 11px; margin-top: 6px; min-height: 16px; color: var(--text-secondary); }
.trade-limit-info { font-family: var(--font-display); font-size: 11px; font-weight: 600; color: var(--gold-bright); margin-top: 6px; }

/* ══ PLAYER INFO MODAL ═══════════════════════════════════════════════ */
.pinfo-modal { background: var(--navy-raised); border: 1px solid var(--border-mid); border-top: 2px solid var(--gold); border-radius: 20px; width: 340px; max-width: calc(100vw - 2rem); max-height: 88vh; overflow-y: auto; box-shadow: 0 32px 80px rgba(0,0,0,0.4); position: relative; color: var(--text-primary); scrollbar-width: thin; scrollbar-color: var(--border-mid) transparent; }
.pinfo-close { position: absolute; top: 12px; right: 14px; background: var(--navy-deep); border: 1px solid var(--border-mid); color: var(--text-muted); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 11px; display: flex; align-items: center; justify-content: center; transition: all 0.12s; z-index: 1; }
.pinfo-close:hover { color: var(--text-primary); border-color: var(--gold-border); }
.pinfo-body { padding: 20px; }
.pinfo-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; position: relative; flex-wrap: wrap; }
.pinfo-avatar { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 18px; font-weight: 700; flex-shrink: 0; }
.pinfo-header-text { flex: 1; min-width: 0; }
.pinfo-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: 0.05em; color: var(--text-primary); line-height: 1; }
.pinfo-team { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
.pinfo-role-badge { display: inline-block; margin-top: 5px; font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 8px; border-radius: 3px; }
.pinfo-drafted-tag { font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #4ade80; background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2); padding: 3px 8px; border-radius: 4px; white-space: nowrap; align-self: flex-start; }
.pinfo-stats-row { display: flex; gap: 0; background: var(--navy-deep); border-radius: 10px; border: 1px solid var(--border-subtle); overflow: hidden; margin-bottom: 16px; flex-wrap: wrap; }
.pinfo-stat { flex: 1; min-width: 80px; padding: 9px 10px; display: flex; flex-direction: column; gap: 3px; border-right: 1px solid var(--border-subtle); }
.pinfo-stat:last-child { border-right: none; }
.pinfo-stat-label { font-family: var(--font-display); font-size: 9px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.pinfo-stat-val { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--text-primary); }
.pinfo-section-label { font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 7px; margin-top: 14px; }
.pinfo-synopsis { font-size: 13px; line-height: 1.55; color: var(--text-secondary); background: var(--navy-deep); border: 1px solid var(--border-subtle); border-radius: 8px; padding: 10px 12px; }
.pinfo-synopsis-empty { color: var(--text-muted); font-style: italic; }
.pinfo-liq-btn { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 14px; border-radius: 8px; background: var(--navy-deep); border: 1px solid var(--border-mid); color: var(--text-secondary); text-decoration: none; transition: all 0.12s; cursor: pointer; }
.pinfo-liq-btn:hover { border-color: var(--gold-border); color: var(--gold-bright); }
.pinfo-liq-empty { color: var(--text-muted); font-style: italic; font-size: 12px; padding: 4px 0; }
.pinfo-draft-btn { width: 100%; margin-top: 16px; font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 10px 0; cursor: pointer; border-radius: 9px; background: var(--gold); color: var(--navy-deep); border: none; transition: background 0.12s; }
.pinfo-draft-btn:hover { background: var(--gold-bright); }

/* ══ AUTH OVERLAY ═════════════════════════════════════════════════════ */
.auth-overlay { display: none; position: fixed; inset: 0; background: rgba(20,26,48,0.92); align-items: center; justify-content: center; z-index: 200; backdrop-filter: blur(4px); }
.auth-overlay.open { display: flex; }
.auth-box { background: var(--navy-raised); border: 1px solid var(--border-mid); border-top: 2px solid var(--gold); border-radius: 20px; padding: 28px 28px 24px; width: 340px; box-shadow: 0 32px 80px rgba(0,0,0,0.4); color: var(--text-primary); }
.auth-header { text-align: center; margin-bottom: 20px; }
.auth-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-primary); margin-bottom: 5px; }
.auth-subtitle { font-size: 12px; color: var(--text-secondary); }
.auth-error { background: var(--red-dim); border: 1px solid rgba(220,38,38,0.3); color: #f87171; font-size: 12px; padding: 8px 12px; border-radius: 7px; margin-bottom: 14px; line-height: 1.4; }
.auth-field { margin-bottom: 12px; }
.auth-label { font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); display: block; margin-bottom: 4px; }
.auth-input { width: 100%; font-family: var(--font-body); font-size: 13px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border-mid); background: var(--navy-deep); color: var(--text-primary); outline: none; transition: border-color 0.12s; }
.auth-input:focus { border-color: var(--gold-border); }
.auth-input::placeholder { color: var(--text-muted); }
.auth-btn-primary { width: 100%; margin-top: 6px; padding: 10px 0; font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; background: var(--gold); color: var(--navy-deep); border: none; border-radius: 9px; cursor: pointer; transition: background 0.12s; }
.auth-btn-primary:hover { background: var(--gold-bright); }
.auth-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-switch { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 14px; }
.auth-link { background: none; border: none; color: var(--gold-bright); cursor: pointer; font-size: 12px; padding: 0; text-decoration: underline; }

/* ══ USER BAR ═════════════════════════════════════════════════════════ */
.user-bar { display: none; align-items: center; gap: 8px; position: fixed; top: 12px; right: 16px; background: var(--navy); border: 1px solid var(--navy-deep); border-radius: 999px; padding: 5px 12px 5px 10px; z-index: 100; font-size: 12px; box-shadow: 0 4px 16px rgba(28,35,64,0.2); }
.user-bar.visible { display: flex; }
.user-bar-label { color: var(--text-muted); font-size: 11px; }
.user-bar-name { font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--text-primary); letter-spacing: 0.04em; }
.user-bar-signout { font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 9px; cursor: pointer; border-radius: 999px; border: 1px solid var(--border-mid); background: transparent; color: var(--text-muted); transition: all 0.12s; }
.user-bar-signout:hover { border-color: var(--gold-border); color: var(--gold-bright); }

/* ══ POINTS / HOW TO SCORE MODAL ══════════════════════════════════════ */
.pts-section-label { font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-bright); }
.pts-divider { height: 1px; background: var(--border-subtle); margin: 6px 0 8px; }
.pts-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-primary); padding: 4px 0; }
.pts-pos { color: #4ade80; font-weight: 600; }
.pts-neg { color: #f87171; font-weight: 600; }

/* ══ TUTORIAL MODAL ═══════════════════════════════════════════════════ */
/* (old step-list tutorial styles removed — replaced by carousel below) */

/* ══ RESPONSIVE ═══════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .phone-col { flex: 0 0 400px; }
}
@media (max-width: 900px) {
  .roster-pool-row { flex-direction: column; align-items: center; }
  .phone-col { flex: none; width: 100%; max-width: 460px; }
  .pool-section { width: 100%; }
  .role-phones-row { grid-template-columns: 1fr; }
  .roster-split { flex-direction: column; }
  .roster-divider { width: auto; height: 1px; margin: 10px 0; }
  .roster-core-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 1fr); }
  .roster-flex-col { width: 100%; flex-direction: row; }
}

/* ══ RANK CHANGE INDICATORS ═══════════════════════════════════════════ */
.lb-change {
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px; flex-shrink: 0;
}
.lb-change-up    { color: #4ade80; background: rgba(34,197,94,0.12); }
.lb-change-down  { color: #f87171; background: rgba(220,38,38,0.12); }
.lb-change-same  { color: var(--text-muted); background: rgba(255,255,255,0.05); }
.lb-change-new   { color: var(--gold-bright); background: var(--gold-dim); }

/* ══ LEAGUES & CUPS ═══════════════════════════════════════════════════ */
.league-actions-row {
  display: flex; gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.league-action-btn {
  flex: 1; font-family: var(--font-display); font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 9px 0;
  border-radius: 9px; cursor: pointer; border: none;
  background: var(--gold); color: var(--navy-deep); transition: background 0.12s;
}
.league-action-btn:hover { background: var(--gold-bright); }
.league-action-btn-alt {
  background: transparent; border: 1px solid var(--border-mid); color: var(--text-secondary);
}
.league-action-btn-alt:hover { border-color: var(--gold-border); color: var(--gold-bright); background: transparent; }

.league-form {
  padding: 12px 16px; border-bottom: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; gap: 10px;
}
.league-form-actions { display: flex; gap: 8px; }
.league-form-actions button { flex: 1; padding: 8px 0; font-size: 12px; font-family: var(--font-display); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; border-radius: 7px; }

.league-feedback {
  margin: 0 16px 0; padding: 10px 12px; border-radius: 8px; font-size: 12px;
  line-height: 1.5;
}
.league-feedback.success { background: var(--green-dim); border: 1px solid var(--green-border); color: #4ade80; }
.league-feedback.error   { background: var(--red-dim); border: 1px solid rgba(220,38,38,0.3); color: #f87171; }

.league-row {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 9px;
  margin-bottom: 6px; background: var(--navy-raised); border: 1px solid var(--border-subtle);
  cursor: pointer; transition: border-color 0.12s;
}
.league-row:hover { border-color: var(--gold-border); }
.league-row-icon {
  width: 32px; height: 32px; border-radius: 8px; background: var(--gold-dim);
  border: 1px solid var(--gold-border); display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.league-row-info { flex: 1; min-width: 0; }
.league-row-name { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.league-row-meta { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.league-row-code {
  font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--gold-bright); background: var(--gold-dim); border: 1px solid var(--gold-border);
  padding: 3px 8px; border-radius: 6px; flex-shrink: 0;
}
.league-row-code-global { color: var(--gold-bright); background: var(--gold-dim); }
.league-row-global { border-color: var(--gold-border); }

.league-row-rank {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  color: var(--gold-bright); flex-shrink: 0; min-width: 32px; text-align: right;
}
.league-row-rank-none { color: var(--text-muted); font-weight: 600; }

/* ── Leaderboard 4-column layout: Rank | Name | Last Round | Total ──── */
.lb-col-header-row {
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px 6px; margin-bottom: 4px;
}
.lb-col-header {
  font-family: var(--font-display); font-size: 9px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted);
}
.lb-col-rank  { min-width: 70px; text-align: left; }
.lb-col-name  { flex: 1; }
.lb-col-last  { min-width: 56px; text-align: center; }
.lb-col-total { min-width: 56px; text-align: right; }

.lb-row { display: flex; align-items: center; gap: 10px; }
.lb-rank {
  min-width: 70px; display: flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text-primary);
}
.lb-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-last {
  min-width: 56px; text-align: center; font-family: var(--font-display);
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
}
.lb-pts { min-width: 56px; text-align: right; }

/* ══ SCHEDULE + BRACKET ROW ═══════════════════════════════════════════ */
.schedule-bracket-row { display: flex; gap: 18px; align-items: flex-start; width: 100%; }
.schedule-section { flex: 1; min-width: 0; }
.bracket-section { flex: 1.4; min-width: 0; }

@media (max-width: 1100px) {
  .schedule-bracket-row { flex-direction: column; }
  .schedule-section, .bracket-section { width: 100%; }
}

/* ══ BRACKET VISUALIZATION ═════════════════════════════════════════════ */
.bracket-view-scroll {
  overflow-x: auto; overflow-y: hidden;
  padding: 16px;
  scrollbar-width: thin; scrollbar-color: var(--border-mid) transparent;
}
.bracket-container { display: flex; flex-direction: column; gap: 22px; min-width: max-content; }
.bracket-top-row { display: flex; align-items: flex-start; gap: 24px; }

.bracket-bracket-half { display: flex; flex-direction: column; gap: 8px; }
.bracket-half-label {
  font-family: var(--font-display); font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; padding: 3px 10px;
  border-radius: 999px; width: fit-content;
}
.bracket-half-upper { background: var(--gold-dim); color: var(--gold-bright); border: 1px solid var(--gold-border); }
.bracket-half-lower { background: rgba(220,38,38,0.1); color: #f87171; border: 1px solid rgba(220,38,38,0.25); }

.bracket-rounds-row { display: flex; gap: 22px; align-items: center; }
.bracket-round-col { display: flex; flex-direction: column; gap: 8px; min-width: 150px; }
.bracket-round-title {
  font-family: var(--font-display); font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted);
  text-align: center;
}
.bracket-gf-title { color: var(--gold-bright); }
.bracket-round-slots { display: flex; flex-direction: column; justify-content: space-around; gap: 18px; flex: 1; min-height: 100%; }
.bracket-gf-col { align-self: center; }

.bracket-slot {
  background: var(--navy-raised); border: 1px solid var(--border-subtle);
  border-radius: 8px; overflow: hidden; min-width: 150px;
}
.bracket-slot-editable { cursor: pointer; transition: border-color 0.12s; }
.bracket-slot-editable:hover { border-color: var(--gold-border); }

.bracket-team-row {
  display: flex; align-items: center; gap: 7px; padding: 6px 8px;
  border-bottom: 1px solid var(--border-subtle);
}
.bracket-team-row:last-child { border-bottom: none; }
.bracket-team-winner { background: var(--gold-dim); }
.bracket-team-loser  { opacity: 0.55; }
.bracket-team-logo { width: 20px; height: 20px; border-radius: 4px; object-fit: contain; background: var(--navy-deep); border: 1px solid var(--border-subtle); padding: 2px; flex-shrink: 0; }
.bracket-team-logo-placeholder { width: 20px; height: 20px; border-radius: 4px; background: var(--navy-deep); border: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: var(--text-muted); flex-shrink: 0; }
.bracket-team-name { font-family: var(--font-display); font-size: 11px; font-weight: 600; color: var(--text-primary); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bracket-team-tbd { color: var(--text-muted); font-style: italic; font-weight: 400; }
.bracket-team-score { font-family: var(--font-display); font-size: 11px; font-weight: 700; color: var(--gold-bright); flex-shrink: 0; }

/* ══ ADMIN BRACKET EDITOR MODAL (shared classes, admin.html scoped) ════ */
.bracket-editor-overlay {
  display: none; position: fixed; inset: 0; background: rgba(20,26,48,0.7);
  align-items: center; justify-content: center; z-index: 300; backdrop-filter: blur(2px);
}
.bracket-editor-overlay.open { display: flex; }

/* ══ TUTORIAL CAROUSEL ════════════════════════════════════════════════
   Matches the reference style: colored icon panel on top (with a curved
   accent corner), white text panel below, dot nav + arrows.
══════════════════════════════════════════════════════════════════════ */
.tutorial-carousel {
  width: 380px; max-width: calc(100vw - 2rem);
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.35);
  position: relative;
}

.tutorial-close {
  position: absolute; top: 12px; right: 14px; z-index: 3;
  width: 30px; height: 30px; border-radius: 50%;
  background: #fff; border: none; color: #1c2340;
  font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.12s;
}
.tutorial-close:hover { transform: scale(1.08); }

.tutorial-icon-panel {
  height: 220px;
  background: var(--navy);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.tutorial-icon-panel::after {
  content: '';
  position: absolute; top: -20%; right: -25%;
  width: 70%; height: 140%;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0.9;
  z-index: 0;
}
.tutorial-icon-wrap {
  position: relative; z-index: 1;
  width: 96px; height: 96px; color: #fff;
}
.tutorial-icon-wrap svg { width: 100%; height: 100%; }

.tutorial-text-panel { padding: 24px 28px 22px; text-align: center; }
.tutorial-title {
  font-family: var(--font-display); font-size: 19px; font-weight: 700;
  color: var(--navy); margin-bottom: 8px; letter-spacing: 0.01em;
}
.tutorial-desc {
  font-size: 13.5px; line-height: 1.55; color: #4b5070;
  min-height: 58px;
}

.tutorial-nav-row {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin-top: 18px;
}
.tutorial-arrow {
  width: 30px; height: 30px; border-radius: 50%;
  background: transparent; border: 1px solid #d8dceb;
  color: #1c2340; font-size: 17px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.12s; flex-shrink: 0;
}
.tutorial-arrow:hover { background: var(--gold-dim); border-color: var(--gold-border); }

.tutorial-dots { display: flex; align-items: center; gap: 7px; }
.tutorial-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #d8dceb; border: none; cursor: pointer; padding: 0;
  transition: all 0.15s;
}
.tutorial-dot.active { background: var(--navy); width: 9px; height: 9px; }

/* ══ SWAP FEATURE ═══════════════════════════════════════════════════════ */
.card-btn-row { display: flex; gap: 6px; margin-top: 6px; }
.card-btn-row .card-btn { margin-top: 0; flex: 1; }
.card-btn.swap {
  flex: 0 0 32px; padding: 4px 0;
  color: var(--gold-bright); border-color: var(--gold-border);
  font-size: 13px; font-weight: 700;
}
.card-btn.swap:hover { background: var(--gold-dim); }
.card-btn.swap.swap-active {
  background: var(--gold); color: var(--navy-deep); border-color: var(--gold);
  animation: swap-pulse 1s infinite;
}
@keyframes swap-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }

.swap-picker-box { width: 320px; }
.swap-picker-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 240px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--border-mid) transparent;
}
.swap-picker-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 8px;
  background: var(--navy-deep); border: 1px solid var(--border-subtle);
  cursor: pointer; transition: border-color 0.12s;
}
.swap-picker-row:hover { border-color: var(--gold-border); background: var(--navy-hover); }
.swap-picker-slot {
  font-family: var(--font-display); font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em; color: var(--text-muted); min-width: 70px;
}
.swap-picker-name {
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  color: var(--text-primary); flex: 1;
}
.swap-picker-team { font-size: 11px; color: var(--text-secondary); }

/* ══ LOCK STATUS PANEL — sits below the roster phone, themed to match ══ */
.lock-status-panel {
  margin-top: 10px;
  background: var(--navy);
  border: 1px solid var(--navy-deep);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 8px 24px rgba(28,35,64,0.15);
}
.lock-status-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lock-status-hint {
  font-size: 11px; color: var(--text-muted); margin-top: 6px;
  min-height: 14px;
}

/* ══ DELETE LEAGUE BUTTON ═══════════════════════════════════════════════ */
.league-delete-row {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}
.league-delete-btn {
  width: 100%; padding: 9px 0;
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: 8px; cursor: pointer;
  background: transparent; border: 1px solid rgba(220,38,38,0.4);
  color: #f87171; transition: all 0.12s;
}
.league-delete-btn:hover { background: var(--red-dim); }

/* ══ AUTO-LOCK COUNTDOWN PANELS — sit above the roster phone ════════════ */
.lock-countdown-stack {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 10px;
}
.lock-countdown-panel {
  border-radius: 14px; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  box-shadow: 0 8px 24px rgba(28,35,64,0.15);
}
.lock-countdown-locking {
  background: rgba(220,38,38,0.1); border: 1px solid rgba(220,38,38,0.35);
}
.lock-countdown-unlocking {
  background: rgba(96,165,250,0.1); border: 1px solid rgba(96,165,250,0.3);
}
.lock-countdown-label {
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  letter-spacing: 0.02em;
}
.lock-countdown-locking .lock-countdown-label { color: #f87171; }
.lock-countdown-unlocking .lock-countdown-label { color: #60a5fa; }
.lock-countdown-timer {
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
  letter-spacing: 0.04em; white-space: nowrap;
}
.lock-countdown-locking .lock-countdown-timer { color: #f87171; }
.lock-countdown-unlocking .lock-countdown-timer { color: #60a5fa; }
.lock-countdown-panel.lock-countdown-imminent {
  animation: lock-countdown-pulse 1s infinite;
}
@keyframes lock-countdown-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.7; } }

/* ══ SCOPED STATUS MESSAGE — replaces the old floating toast ════════════ */
.lock-status-message {
  font-size: 12px; font-weight: 600;
  margin-top: 6px; min-height: 0;
  max-height: 0; overflow: hidden;
  opacity: 0; transition: opacity 0.2s, max-height 0.2s;
}
.lock-status-message.visible {
  opacity: 1; max-height: 40px; min-height: 16px;
}
.lock-status-message-success { color: #4ade80; }
.lock-status-message-error   { color: #f87171; }
.lock-status-message-info    { color: var(--gold-bright); }

/* ══ ROUND NAVIGATION BAR — above the roster phone ══════════════════════ */
.round-nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
  background: var(--navy); border: 1px solid var(--navy-deep);
  border-radius: 14px; padding: 8px 10px;
  box-shadow: 0 8px 24px rgba(28,35,64,0.15);
}
.round-nav-arrow {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--navy-raised); border: 1px solid var(--border-mid);
  color: var(--text-primary); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.12s;
}
.round-nav-arrow:hover:not(:disabled) { background: var(--gold-dim); border-color: var(--gold-border); color: var(--gold-bright); }
.round-nav-arrow:disabled { opacity: 0.3; cursor: not-allowed; }
.round-nav-center { flex: 1; text-align: center; min-width: 0; }
.round-nav-name {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: 0.04em; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.round-nav-sublabel {
  font-size: 10px; color: var(--text-secondary); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.round-nav-status {
  font-family: var(--font-display); font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; margin-top: 2px;
}
.round-nav-status.status-live    { color: #4ade80; }
.round-nav-status.status-staging { color: var(--gold-bright); }
.round-nav-status.status-future  { color: var(--text-muted); }

/* ══ EXTRA TRADE COST WARNING ════════════════════════════════════════════ */
.extra-trade-warning {
  font-size: 11px; color: #f87171; margin-top: 6px;
  background: var(--red-dim); border: 1px solid rgba(220,38,38,0.25);
  border-radius: 7px; padding: 7px 10px; line-height: 1.4;
}

/* ══ CONFIRM TRANSFERS BUTTON ════════════════════════════════════════════ */
.confirm-trades-btn {
  width: 100%; margin-top: 10px; padding: 10px 0;
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: 9px; cursor: pointer; border: none;
  background: var(--gold); color: var(--navy-deep);
  transition: all 0.12s;
}
.confirm-trades-btn:hover:not(:disabled) { background: var(--gold-bright); }
.confirm-trades-btn:disabled {
  background: var(--navy-raised); color: var(--text-muted);
  cursor: not-allowed; border: 1px solid var(--border-mid);
}

/* ══ CARD NEEDS-FILL HIGHLIGHT — empty slot on the staging round ═══════ */
.card.card-needs-fill {
  border-color: rgba(220,38,38,0.4);
  background: linear-gradient(160deg, #2a1010 0%, var(--navy-raised) 65%);
}
.card.card-needs-fill .player-name.empty {
  color: #f87171;
}

/* ══ TRADE MODAL INLINE ERROR ════════════════════════════════════════════ */
.trade-modal-error {
  display: none;
  font-size: 12px; font-weight: 600; color: #f87171;
  background: var(--red-dim); border: 1px solid rgba(220,38,38,0.3);
  border-radius: 7px; padding: 9px 11px; margin-top: 10px; line-height: 1.4;
}

/* ══ STAGING ACTION ROW — Undo + Confirm side by side ══════════════════ */
.staging-action-row { display: flex; gap: 8px; margin-top: 10px; }
.staging-action-row .confirm-trades-btn,
.staging-action-row .undo-trades-btn { margin-top: 0; }
.staging-action-row .confirm-trades-btn { flex: 2; }
.staging-action-row .undo-trades-btn { flex: 1; }

.undo-trades-btn {
  padding: 10px 0;
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 9px; cursor: pointer;
  background: transparent; border: 1px solid var(--border-mid);
  color: var(--text-secondary); transition: all 0.12s;
}
.undo-trades-btn:hover:not(:disabled) { border-color: var(--gold-border); color: var(--gold-bright); }
.undo-trades-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ══ FIRST ROSTER BUILD BANNER — brand new users only ══════════════════ */
.first-build-banner {
  background: var(--gold-dim); border: 1px solid var(--gold-border);
  border-radius: 14px; padding: 12px 16px; margin-bottom: 10px;
}
.first-build-title {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: 0.04em; color: var(--gold-bright);
}
.first-build-sub {
  font-size: 12px; color: var(--text-secondary); margin-top: 3px;
}

/* ══ GENERIC APP ALERT MODAL — replaces browser-native alert() ══════════ */
.app-alert-box {
  width: 320px; text-align: center; padding: 28px 24px 22px;
}
.app-alert-icon { font-size: 32px; margin-bottom: 10px; }
.app-alert-message {
  font-size: 14px; color: var(--text-primary); line-height: 1.5;
  margin-bottom: 18px;
}

/* ══ BRACKET ROUND TAGS — shows which Round (deadline) each stage belongs to ═ */
.bracket-round-tag {
  display: inline-block; margin-left: 6px;
  font-family: var(--font-display); font-size: 8px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--gold-dim); color: var(--gold-bright);
  border: 1px solid var(--gold-border); border-radius: 999px;
  padding: 1px 6px; vertical-align: middle;
}

/* ══ AUTH SHELL — auth box + side tip panel ══════════════════════════════ */
.auth-shell {
  display: flex; gap: 18px; align-items: flex-start;
  max-width: 700px; padding: 0 16px;
}
.auth-tip-panel {
  background: var(--navy); border: 1px solid var(--gold-border);
  border-radius: 16px; padding: 20px 20px 18px; width: 240px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
  flex-shrink: 0;
}
.auth-tip-icon { font-size: 22px; margin-bottom: 8px; }
.auth-tip-title {
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  color: var(--gold-bright); margin-bottom: 8px; line-height: 1.3;
}
.auth-tip-text {
  font-size: 12px; color: var(--text-secondary); line-height: 1.55;
  margin-bottom: 10px;
}
.auth-tip-example {
  font-size: 11px; color: var(--text-muted); line-height: 1.6;
}
.auth-tip-example code {
  background: var(--navy-deep); border: 1px solid var(--border-subtle);
  border-radius: 4px; padding: 1px 5px; color: var(--gold-bright);
  font-family: var(--font-display); font-size: 10px;
}

@media (max-width: 680px) {
  .auth-shell { flex-direction: column; align-items: center; }
  .auth-tip-panel { width: 100%; max-width: 340px; }
}
