/* =========================================================
   LIVE CARDS (NEW CORE UI)
   ========================================================= */

.live-section {
  margin-bottom: 18px;
}

.live-section-header,
.today-section-header {
  align-items: flex-start;
}

.section-title-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-title-block h2 {
  margin: 0;
}

.section-subtitle {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.section-header-actions,
.today-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.live-cards-empty {
  padding: 30px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--muted);
  background: rgba(255,255,255,0.02);
}

.live-cards-empty-title {
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.live-cards-empty-subtitle {
  font-size: 13px;
}

.live-card {
  background: linear-gradient(160deg, var(--card), var(--card-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.live-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.live-card.row-entry {
  border-left: 3px solid var(--accent);
}

.live-card.row-danger {
  border-left: 3px solid var(--danger);
}

.live-row-low-priority {
  opacity: 0.45;
}

/* HEADER */

.live-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.live-card-league {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.live-card-clock {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

/* TEAMS */

.live-card-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  font-weight: 700;
}

.live-card-teams > div:first-child {
  text-align: left;
}

.live-card-teams > div:last-child {
  text-align: right;
}

.live-card-score {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

.live-source-badge {
  margin-left: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.live-source-badge.realtime {
  color: var(--accent);
  background: rgba(139,92,246,0.14);
  border: 1px solid rgba(139,92,246,0.35);
  text-shadow: 0 0 8px rgba(139,92,246,0.45);
}

.live-source-badge.rest {
  color: var(--good);
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.28);
}

/* METRICS */

.live-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  font-size: 12px;
}

.live-metric {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
}

.live-metric-label {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.live-metric-value {
  font-weight: 700;
  color: var(--text);
}

.live-card {
  will-change: transform;
}

.live-card-score,
.focus-score,
.focus-clock,
.live-card-clock {
  font-variant-numeric: tabular-nums;
}

.today-status-danger {
  color: var(--danger);
  border-color: rgba(239,68,68,0.35);
}

.today-status-warn {
  color: var(--warn);
  border-color: rgba(245,158,11,0.35);
}

.today-status-live.pulse {
  box-shadow: 0 0 10px rgba(34,197,94,0.35);
}

.focus-card.hidden {
  display: none;
}

.live-odds {
  margin-top: 6px;
  display: flex;
  gap: 12px;
  font-size: 13px;
  opacity: 0.9;
}

.live-odds span {
  color: #cfcfcf;
}

.live-odds.no-market {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 140, 0, 0.12);
  border: 1px solid rgba(255, 140, 0, 0.35);
  color: #ff9f43;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.4px;
}

.live-odds:not(.no-market) span {
  color: #4cd964;
  font-weight: 500;
}

.live-card:hover .live-odds.no-market {
  background: rgba(255, 140, 0, 0.18);
  border-color: rgba(255, 140, 0, 0.6);
}

.odds-signals {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.odds-signal {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.odds-signal-hot {
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.odds-signal-cold {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* MOMENTUM */

.live-card-momentum {
  margin-top: 4px;
}

.momentum-sofa-mini {
  position: relative;
  width: 100%;
  height: 36px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
}

.momentum-sofa-axis {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255,255,255,0.16);
  transform: translateY(-0.5px);
}

.momentum-sofa-bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  gap: 1px;
  padding: 2px 3px;
}

.momentum-sofa-bar-wrap {
  flex: 1;
  position: relative;
}

.momentum-sofa-bar {
  position: absolute;
  left: 0;
  right: 0;
  border-radius: 2px;
}

.momentum-sofa-bar-up {
  bottom: 50%;
  background: linear-gradient(180deg, #86efac, #22c55e);
}

.momentum-sofa-bar-down {
  top: 50%;
  background: linear-gradient(180deg, #818cf8, #4f46e5);
}

/* SIGNALS */

.live-card-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ACTIONS */

.live-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.live-action-btn {
  flex: 1;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.live-action-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(139,92,246,0.06);
}

/* =========================================================
   FOCUS PANEL (UPGRADED)
   ========================================================= */

.focus-shell {
  margin-bottom: 16px;
}

.focus-card {
  padding: 20px;
}

.focus-empty {
  padding: 30px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.02);
}

.focus-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.focus-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  margin-bottom: 4px;
}

.focus-team {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.focus-team.right {
  text-align: right;
}

.focus-score-block {
  text-align: center;
}

.focus-score {
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
}

.focus-clock {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}

/* ALERT PILLS */

.focus-alerts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.focus-alert-pill {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid var(--border);
  background: var(--card-2);
}

.focus-alert-goal {
  color: var(--good);
  border-color: rgba(34,197,94,0.4);
}

.focus-alert-var {
  color: var(--accent);
  border-color: rgba(139,92,246,0.4);
}

.focus-alert-penalty {
  color: var(--warn);
  border-color: rgba(245,158,11,0.4);
}

.focus-alert-red {
  color: var(--danger);
  border-color: rgba(239,68,68,0.4);
}

/* CHARTS / BARS */

.focus-chart-title {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.metric-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric-bar {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  display: flex;
}

.metric-bar-home {
  background: linear-gradient(90deg, #22c55e, #86efac);
}

.metric-bar-away {
  background: linear-gradient(90deg, #3b82f6, #93c5fd);
}

.metric-bar-label {
  color: var(--muted);
  font-size: 12px;
}

/* LARGE MOMENTUM */

.momentum-sofa-card {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.momentum-sofa-stage {
  position: relative;
  height: 180px;
  border-radius: 12px;
  background:
    linear-gradient(
      to bottom,
      rgba(34, 197, 94, 0.08) 0%,
      rgba(34, 197, 94, 0.08) 50%,
      rgba(99, 102, 241, 0.08) 50%,
      rgba(99, 102, 241, 0.08) 100%
    );
  overflow: hidden;
}

.momentum-sofa-center-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

.momentum-sofa-bars-large {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 10px 12px;
}

.momentum-sofa-bar-slot {
  flex: 1;
  position: relative;
}

.momentum-sofa-bars-large .momentum-sofa-bar-up {
  bottom: 50%;
}

.momentum-sofa-bars-large .momentum-sofa-bar-down {
  top: 50%;
}

.momentum-sofa-labels {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.momentum-sofa-labels span:nth-child(1) {
  text-align: left;
}

.momentum-sofa-labels span:nth-child(2) {
  text-align: center;
}

.momentum-sofa-labels span:nth-child(3) {
  text-align: right;
}

/* STATS COMPARISON */

.focus-stats-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stat-compare-row {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  gap: 10px;
  align-items: center;
}

.stat-compare-mid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-compare-label {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.stat-compare-bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  display: flex;
}

.stat-compare-home {
  background: linear-gradient(90deg, #22c55e, #86efac);
}

.stat-compare-away {
  background: linear-gradient(90deg, #3b82f6, #93c5fd);
}

.stat-compare-value {
  font-size: 14px;
  font-weight: 800;
}

.stat-compare-value-right {
  text-align: right;
}

/* TIMELINE */

.focus-timeline {
  margin-top: 6px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.focus-timeline-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.focus-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.focus-timeline-item {
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.focus-timeline-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.focus-timeline-line {
  font-size: 14px;
}

.focus-timeline-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

/* =========================================================
   FOCUS ODDS CHART
   ========================================================= */

.focus-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.focus-tab {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.focus-tab:hover {
  border-color: var(--accent);
  color: var(--text);
}

.focus-tab-active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(139,92,246,0.12);
  box-shadow: 0 0 0 1px rgba(139,92,246,0.14);
}

.focus-chart-card {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}

.focus-chart-empty {
  color: var(--muted);
  text-align: center;
  padding: 30px 12px;
}

.odds-chart-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.odds-chart-title-row {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.odds-chart-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.odds-chart-svg {
  display: block;
  width: 100%;
  height: 240px;
}

.odds-axis-line {
  stroke: rgba(255,255,255,0.10);
  stroke-width: 1;
}

.odds-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.odds-line-home {
  stroke: #22c55e;
}

.odds-line-draw {
  stroke: #f59e0b;
}

.odds-line-away {
  stroke: #60a5fa;
}

.odds-event-goal {
  fill: #22c55e;
}

.odds-event-red {
  fill: #ef4444;
}

.odds-event-penalty {
  fill: #f59e0b;
}

.odds-event-var {
  fill: #8b5cf6;
}

.odds-event-neutral {
  fill: #94a3b8;
}

.odds-event-goal,
.odds-event-red,
.odds-event-penalty,
.odds-event-var,
.odds-event-neutral {
  stroke: rgba(15,15,15,0.9);
  stroke-width: 1.5;
}

.odds-chart-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.odds-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 600;
}

.odds-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.odds-dot-home {
  background: #22c55e;
}

.odds-dot-draw {
  background: #f59e0b;
}

.odds-dot-away {
  background: #60a5fa;
}

/* =========================================================
   TODAY TABLE (NEW)
   ========================================================= */

.today-section {
  margin-bottom: 18px;
}

.today-table-shell {
  display: flex;
  flex-direction: column;
}

.today-table-head {
  display: grid;
  grid-template-columns: 80px 1fr 160px 100px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  padding: 0 6px;
}

.today-main-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.today-empty {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.02);
}

.today-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.today-group-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding: 6px 4px;
}

.today-row {
  display: grid;
  grid-template-columns: 80px 1fr 160px 100px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-2);
  align-items: center;
  transition: all 0.15s ease;
  cursor: pointer;
}

.today-row:hover {
  border-color: var(--border-strong);
  background: rgba(139,92,246,0.06);
}

.today-col-time {
  font-weight: 700;
}

.today-col-match {
  font-weight: 600;
  color: var(--text);
}

.today-col-league {
  font-size: 12px;
  color: var(--muted);
}

.today-col-status {
  text-align: right;
  font-size: 11px;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.today-item-countdown {
  color: var(--warn);
}

.today-item-livehint {
  color: var(--danger);
}

/* STATUS BADGES */

.today-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 11px;
  font-weight: 800;
}

.today-status-upcoming {
  color: var(--accent);
  border-color: rgba(139,92,246,0.28);
}

.today-status-live {
  color: var(--good);
  border-color: rgba(34,197,94,0.35);
  box-shadow: 0 0 8px rgba(34,197,94,0.15);
}

.today-status-finished {
  color: var(--muted);
}

/* FILTER BUTTONS */

.today-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.today-filter-btn {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.today-filter-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.today-filter-btn-active {
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

/* =========================================================
   BUTTONS
   ========================================================= */

.reset-btn {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.reset-btn:hover {
  border-color: var(--accent);
  background: rgba(139,92,246,0.06);
}

/* =========================================================
   FLOATING ALERTS
   ========================================================= */

.floating-alerts {
  position: fixed;
  top: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.floating-alert {
  min-width: 220px;
  max-width: 360px;
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(10, 10, 14, 0.96);
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  font-size: 13px;
  font-weight: 700;
}

.floating-alert-goal {
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.floating-alert-var {
  border-color: rgba(167, 139, 250, 0.35);
  color: #c4b5fd;
}

.floating-alert-penalty {
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}

.floating-alert-red {
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

/* =========================================================
   LIVE BANNER
   ========================================================= */

.live-banner {
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, #22c55e, #86efac);
  box-shadow:
    0 0 10px rgba(34,197,94,0.6),
    0 0 20px rgba(34,197,94,0.3);
  position: sticky;
  top: 0;
  z-index: 50;
}

.live-banner.hidden {
  display: none;
}

.live-banner-inner {
  display: none;
}

/* =========================================================
   LEGACY (SAFE TO REMOVE LATER)
   ========================================================= */

.table-wrap,
table,
th,
td,
.live-row {
  display: none;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {
  .live-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .today-table-head,
  .today-row {
    grid-template-columns: 80px 1fr 120px 90px;
  }
}

@media (max-width: 860px) {
  .focus-header {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 10px;
  }

  .focus-team.right {
    text-align: center;
  }

  .today-table-head {
    display: none;
  }

  .today-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .today-col-status {
    text-align: left;
  }
}

@media (max-width: 760px) {
  .live-card-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-header-actions,
  .today-toolbar {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .focus-score {
    font-size: 34px;
  }

  .stat-compare-row {
    grid-template-columns: 44px 1fr 44px;
  }

  .floating-alerts {
    right: 10px;
    left: 10px;
  }

  .floating-alert {
    min-width: auto;
    max-width: none;
  }
}

@media (max-width: 760px) {
  .odds-chart-topline {
    flex-direction: column;
    align-items: flex-start;
  }

  .odds-chart-svg {
    height: 200px;
  }
}