:root,
[data-theme='dark'] {
  --bg: #0b101b;
  --surface: #131b2e;
  --surface-2: #1a243d;
  --surface-hover: #212e4d;
  --border: #263354;
  --text: #eef2ff;
  --text-muted: #94a3b8;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --winner: #22c55e;
  --loser: #f59e0b;
  --live: #ef4444;
  --gold: #fbbf24;
  --silver: #cbd5e1;
  --bronze: #d97706;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

[data-theme='light'] {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-hover: #e2e8f0;
  --border: #cbd5e1;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --winner: #16a34a;
  --loser: #d97706;
  --live: #dc2626;
  --gold: #eab308;
  --silver: #94a3b8;
  --bronze: #b45309;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.jadisi-3k-app {
  min-height: 100vh;
  padding-bottom: 48px;
}

.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #10b981);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: grid;
  place-items: center;
}

.header-brand h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.brand-sub {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.app-version {
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 11px;
  opacity: 0.8;
}

.app-version-footer {
  padding: 4px 8px;
  text-align: right;
  font-size: 11px;
  color: var(--text-muted);
}

.search-form {
  flex: 1 1 420px;
  max-width: 640px;
}

.input-group {
  display: flex;
  gap: 8px;
}

.input-group input,
.text-input,
.select-input {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
}

.input-group input {
  flex: 1;
}

.input-group input:focus,
.text-input:focus,
.select-input:focus {
  border-color: var(--primary);
}

.quick-examples {
  margin-top: 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.chip {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface-2);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}

.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 20px;
}

.event-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow);
}

.event-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.event-banner h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
}

.event-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.event-meta-row strong {
  color: var(--text);
}

.event-banner-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.live-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}

.last-updated {
  font-size: 12px;
  color: var(--text-muted);
}

.portal-link {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.portal-link:hover {
  text-decoration: underline;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-finish {
  background: rgba(34, 197, 94, 0.16);
  color: var(--winner);
}

.status-live {
  background: rgba(239, 68, 68, 0.18);
  color: var(--live);
}

.status-open {
  background: rgba(59, 130, 246, 0.16);
  color: var(--primary);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.tag {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.tag-mono,
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
}

.kpi-sub {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.tab-btn:hover {
  color: var(--text);
  background: var(--surface);
}

.tab-btn.is-active {
  background: var(--primary);
  color: #fff;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}

@media (max-width: 960px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}

.panel-full {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-header h3,
.panel-header h4 {
  margin: 0;
  font-size: 16px;
}

.panel-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.podium-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: end;
}

@media (max-width: 720px) {
  .podium-grid {
    grid-template-columns: 1fr;
  }
}

.podium-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.podium-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.podium-card.place-1 {
  border-color: rgba(251, 191, 36, 0.55);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.14), var(--surface-2));
  padding-top: 26px;
  padding-bottom: 24px;
}

.podium-card.place-2 {
  border-color: rgba(203, 213, 225, 0.45);
}

.podium-card.place-3 {
  border-color: rgba(217, 119, 6, 0.45);
}

.podium-medal {
  font-size: 32px;
}

.podium-place {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 4px;
}

.podium-name {
  font-size: 17px;
  font-weight: 700;
  margin: 6px 0 10px;
}

.podium-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.data-table th {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.data-table th.num,
.data-table td.num {
  text-align: right;
}

.data-table th.center,
.data-table td.center {
  text-align: center;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: var(--surface-hover);
}

.place-badge {
  display: inline-block;
  min-width: 30px;
  text-align: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
  background: var(--surface-2);
}

.place-badge-1 {
  background: rgba(251, 191, 36, 0.2);
  color: var(--gold);
}

.place-badge-2 {
  background: rgba(203, 213, 225, 0.2);
  color: var(--silver);
}

.place-badge-3 {
  background: rgba(217, 119, 6, 0.2);
  color: var(--bronze);
}

.text-pos { color: var(--winner); font-weight: 600; }
.text-neg { color: var(--live); }
.muted { color: var(--text-muted); }

.board-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.board-bar-row {
  display: grid;
  grid-template-columns: 74px 1fr 72px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.board-bar-track {
  height: 10px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}

.board-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #10b981);
  border-radius: 999px;
}

.board-count {
  text-align: right;
  color: var(--text-muted);
  font-size: 12px;
}

.highlight-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.highlight-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.highlight-title {
  font-size: 12px;
  color: var(--text-muted);
}

.highlight-val {
  font-size: 13px;
  font-weight: 600;
}

.ko-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.segmented-control {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
}

.seg-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.seg-btn.is-active {
  background: var(--primary);
  color: #fff;
}

.helper-hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.bracket-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bracket-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.bracket-section-header {
  width: 100%;
  border: none;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  text-align: left;
}

.bracket-section-header:hover {
  background: var(--surface-hover);
}

.bracket-section.is-collapsed .bracket-section-header {
  border-bottom: none;
}

.bracket-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hidden-rounds-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.08);
  font-size: 12px;
}

.ko-tree-hint-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.bracket-section-header h3 {
  margin: 0;
  font-size: 15px;
}

.accent-winner .bracket-section-header { border-left: 4px solid var(--winner); }
.accent-loser .bracket-section-header { border-left: 4px solid var(--loser); }
.accent-final .bracket-section-header { border-left: 4px solid var(--gold); }

.section-count {
  font-size: 12px;
  color: var(--text-muted);
}

.bracket-scroll {
  overflow-x: auto;
  padding: 16px;
}

.bracket-columns {
  display: flex;
  gap: 16px;
  align-items: stretch;
  min-width: max-content;
}

.bracket-round-col {
  width: 230px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bracket-round-title {
  width: 100%;
  color: var(--text);
  font: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.bracket-round-title:hover {
  border-color: var(--primary);
  background: var(--surface-hover);
}

.round-title-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.round-hide-icon {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.65;
}

.bracket-round-title:hover .round-hide-icon {
  opacity: 1;
  color: var(--live);
}

.round-count {
  background: var(--surface);
  padding: 1px 6px;
  border-radius: 999px;
  color: var(--text-muted);
}

.bracket-round-matches {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 10px;
  flex: 1;
}

.bracket-match {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bracket-match.is-bye {
  opacity: 0.72;
}

.bracket-match.is-highlighted {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.bracket-match-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}

.bracket-player {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  cursor: pointer;
}

.bracket-player + .bracket-player {
  border-top: 1px solid var(--border);
}

.bracket-player:hover {
  background: var(--surface-hover);
}

.bracket-player.is-winner .player-name,
.bracket-player.is-winner .player-score {
  font-weight: 700;
  color: var(--winner);
}

.bracket-player.is-loser .player-name {
  color: var(--text-muted);
}

.bracket-player.is-player-focus {
  background: rgba(59, 130, 246, 0.18);
}

.player-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-score {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 600;
  flex-shrink: 0;
}

.badge {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

.badge-board {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge-live {
  background: var(--live);
  color: #fff;
}

.round-pill {
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
}

.winner-cell {
  font-weight: 700;
  color: var(--winner);
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.link-btn:hover {
  text-decoration: underline;
  color: var(--primary);
}

.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

.phase-heading {
  margin: 0 0 12px;
  font-size: 18px;
}

.group-matches-details {
  margin-top: 12px;
  font-size: 13px;
}

.group-matches-details summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 600;
}

.group-match-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.group-match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  background: var(--surface-2);
  border-radius: 6px;
}

.group-match-row > :first-child { text-align: right; }
.group-match-row > :last-child { text-align: left; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 100;
}

.modal-card {
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-header h3 {
  margin: 6px 0 0;
  font-size: 20px;
}

.modal-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.modal-kpis > div {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.modal-kpis span {
  font-size: 11px;
  color: var(--text-muted);
}

.modal-matches {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-match-row {
  display: grid;
  grid-template-columns: 150px 1fr auto 90px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: 8px;
  border-left: 3px solid var(--border);
  font-size: 13px;
}

.modal-match-row.is-win { border-left-color: var(--winner); }
.modal-match-row.is-loss { border-left-color: var(--live); }

@media (max-width: 640px) {
  .modal-match-row {
    grid-template-columns: 1fr auto;
  }
}

.state-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
}

.state-error {
  border-color: rgba(239, 68, 68, 0.5);
  color: var(--live);
}

.empty-state {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin 0.8s linear infinite;
}

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

/* ==================== LEAGUE MODE STYLES ==================== */

.league-focus-bar {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.focus-team-picker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-alert-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.16);
  color: var(--live);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 700;
}

.focus-row {
  background: rgba(59, 130, 246, 0.12);
}

.live-row {
  background: rgba(239, 68, 68, 0.08);
}

.focus-team-name {
  font-weight: 800;
  font-size: 1.25em;
  letter-spacing: 0.01em;
}

.prognosis-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.prognosis-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prognosis-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}

.prognosis-place {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.prognosis-sample {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.sim-match-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sim-match-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sim-match-card.is-focus-match {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.08);
}

.sim-match-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.sim-match-teams {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.sim-pick-btns {
  display: flex;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
}

.sim-pick-btns .seg-btn {
  flex: 1;
  font-size: 12px;
  padding: 6px 8px;
}

/* ==================== ROUND ACCORDION CARDS ==================== */

.round-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.round-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.round-card.is-open-round {
  border-color: rgba(59, 130, 246, 0.45);
}

.round-card.has-live {
  border-color: rgba(239, 68, 68, 0.6);
}

.round-card-header {
  width: 100%;
  background: var(--surface-2);
  color: var(--text);
  border: none;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.round-card-header:hover {
  background: var(--surface-hover);
}

.round-card-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
}

.round-chevron {
  display: inline-block;
  width: 14px;
  color: var(--text-muted);
  font-size: 13px;
}

.round-card-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.round-card-body {
  border-top: 1px solid var(--border);
  padding: 6px 14px 12px;
}

.rescheduled-date {
  font-style: italic;
  font-weight: 700;
  color: var(--text);
}

.loser-cell {
  font-weight: 600;
  color: var(--live);
}

.draw-cell {
  font-weight: 600;
  color: var(--loser);
}

.focus-team-name.winner-cell {
  color: var(--winner);
  font-weight: 800;
}

.focus-team-name.loser-cell {
  color: var(--live);
  font-weight: 800;
}

.focus-team-name.draw-cell {
  color: var(--loser);
  font-weight: 800;
}

.loading-backdrop {
  z-index: 200;
  backdrop-filter: blur(3px);
}

.loading-modal-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.loading-modal-card h3 {
  margin: 4px 0 8px;
  font-size: 18px;
}

.loading-modal-card p {
  margin: 0;
  font-size: 13px;
}

.event-upcoming {
  color: var(--text);
  font-weight: 700;
}

.event-past {
  color: var(--live);
  font-weight: 600;
}
