:root {
  color-scheme: light;
  --bg: #f5f7f4;
  --surface: #ffffff;
  --surface-2: #f9faf8;
  --ink: #111827;
  --muted: #647062;
  --soft: #e2e7df;
  --line: #d8ded5;
  --green: #0c7a43;
  --green-2: #e8f6ee;
  --amber: #b97707;
  --amber-2: #fff3d6;
  --red: #b42318;
  --purple: #7c3aed;
  --purple-2: #f3ecff;
  --shadow: 0 18px 45px rgba(20, 31, 25, 0.08);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 5;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #12231b;
  color: #f7fff9;
  font-weight: 800;
  letter-spacing: 0;
}

.brand h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.05;
}

.brand p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.competition-dropdown-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 28px 0 14px;
  min-height: 38px;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.competition-dropdown-container:hover {
  border-color: var(--green);
  background: var(--surface);
}

.competition-dropdown-container:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(12, 122, 67, 0.15);
}

.competition-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  height: 38px;
  padding: 0;
  margin: 0;
}

.competition-select option {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  padding: 8px;
}

.competition-dropdown-arrow {
  position: absolute;
  right: 10px;
  font-size: 9px;
  color: var(--muted);
  pointer-events: none;
}

.segmented {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
}

.segmented button,
.refresh-button {
  border: 0;
  min-height: 38px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.segmented button.active {
  background: #12231b;
  color: white;
}

.refresh-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  background: var(--green);
  color: white;
}

.refresh-countdown {
  min-width: 30px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
}

.refresh-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.refresh-icon {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
}

.refresh-button.is-loading .refresh-icon {
  animation: spin 0.8s linear infinite;
}

.workspace {
  display: grid;
  grid-template-columns: 238px minmax(680px, 1fr);
  gap: 18px;
  padding: 18px;
  flex: 1;
}

.filter-rail,
.main-panel {
  min-width: 0;
}

.filter-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-rail section,
.main-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.filter-rail section {
  padding: 16px;
}

h2 {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0;
}

.select-label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

select,
.range-control,
.search-box {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 0 10px;
  font-size: 13px;
}

.range-control {
  height: auto;
  display: grid;
  gap: 10px;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.range-control span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.range-control strong {
  color: var(--ink);
}

.range-control input {
  width: 100%;
  accent-color: var(--green);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.search-icon {
  width: 14px;
  height: 14px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  position: relative;
  flex: 0 0 auto;
}

.search-icon::after {
  content: "";
  width: 6px;
  height: 2px;
  background: var(--muted);
  position: absolute;
  right: -5px;
  bottom: -2px;
  transform: rotate(45deg);
}

.bookmaker-toggles {
  display: grid;
  gap: 8px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.toggle-row input {
  accent-color: var(--green);
  order: 2;
}

.main-panel {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 114px);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
}

.summary-strip > div {
  padding: 16px;
  border-right: 1px solid var(--line);
}

.summary-strip > div:last-child {
  border-right: 0;
}

.metric-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 800;
}

.summary-strip strong {
  font-size: 20px;
  line-height: 1;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.table-toolbar h2 {
  margin: 0;
  font-size: 18px;
  text-transform: none;
}

.table-toolbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  max-width: 610px;
}

.best-dot,
.lowest-dot,
.reference-dot,
.alert-dot,
.missing-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
}

.best-dot {
  background: var(--green);
}

.lowest-dot {
  background: var(--purple);
}

.reference-dot {
  background: var(--amber);
}

.alert-dot {
  background: var(--red);
}

.missing-dot {
  background: var(--line);
}

.odds-table-wrap {
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.odds-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 980px;
}

.odds-table.is-today {
  min-width: 1420px;
}

.odds-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 38px;
  background: #17231d;
  color: #eff8ef;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
}

.odds-table th.bookmaker-head {
  background: #10251b;
  border-left: 2px solid rgba(164, 205, 175, 0.38);
  border-right: 2px solid rgba(164, 205, 175, 0.38);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.odds-table th.margin-head {
  border-left: 3px solid rgba(232, 164, 62, 0.45);
}

.odds-table th.max-head {
  background: #182c3a;
  border-left: 2px solid rgba(97, 154, 197, 0.4);
  border-right: 2px solid rgba(97, 154, 197, 0.4);
}

.odds-table .subhead th {
  top: 38px;
  height: 30px;
  background: #26342c;
  color: #cbd8cf;
  font-size: 11px;
}

.odds-table .subhead th.group-start,
.odds-table td.group-start {
  border-left: 2px solid rgba(39, 83, 58, 0.42);
}

.odds-table .subhead th.group-end,
.odds-table td.group-end {
  border-right: 2px solid rgba(39, 83, 58, 0.42);
}

.odds-table th.match-head {
  text-align: left;
  padding-left: 14px;
}

.odds-table td {
  height: 58px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--soft);
  background: var(--surface);
  text-align: center;
  font-size: 13px;
}

.match-cell {
  min-width: 250px;
  text-align: left !important;
  padding: 9px 14px;
  position: sticky;
  left: 0;
  z-index: 1;
}

.match-cell strong {
  display: block;
  margin: 2px 0;
  font-size: 13px;
}

.match-cell strong span {
  color: var(--muted);
  font-weight: 600;
}

.match-cell small,
.kickoff {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.max-cell {
  width: 78px;
  color: #135989;
  background: #eef7ff !important;
  border-left: 2px solid rgba(97, 154, 197, 0.28) !important;
  border-right: 2px solid rgba(97, 154, 197, 0.28) !important;
  font-weight: 800;
}

.max-cell strong,
.max-cell span {
  display: block;
}

.max-cell span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.odd-cell {
  width: 54px;
  font-weight: 800;
  outline: 2px solid transparent;
  outline-offset: -2px;
  white-space: nowrap;
}

.odd-value,
.odd-move-arrow {
  display: inline-block;
  vertical-align: middle;
}

.odd-move-arrow {
  margin-left: 3px;
  font-size: 11px;
  line-height: 1;
}

.odd-cell.move-up .odd-move-arrow {
  color: var(--green);
}

.odd-cell.move-down .odd-move-arrow {
  color: var(--red);
}

.odd-cell.group-start,
.odd-cell.group-end {
  background-clip: padding-box;
}

.odd-cell.best {
  background: var(--green-2);
  color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(12, 122, 67, 0.2);
}

.odd-cell.lowest {
  background: var(--purple-2);
  color: var(--purple);
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.22);
}

.odd-cell.above-reference {
  background: var(--amber-2);
  color: var(--amber);
  box-shadow: inset 0 0 0 1px rgba(185, 119, 7, 0.24);
}

.odd-cell.above-both-references {
  background: #fff1f0;
  color: var(--red);
  box-shadow: inset 0 0 0 1px rgba(180, 35, 24, 0.24);
}

.odd-cell.missing {
  color: #a5aea4;
  background: #fafbf9;
}

.odd-cell.is-changing {
  animation: odds-pulse 10s ease-out;
}

.margin-cell {
  width: 78px;
  color: var(--amber);
  font-weight: 800;
  background: var(--amber-2) !important;
  border-left: 3px solid rgba(232, 164, 62, 0.35) !important;
}

.empty-state {
  height: 260px !important;
  text-align: center !important;
  color: var(--muted);
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state strong {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 16px;
}

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

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

@keyframes odds-pulse {
  0%,
  18%,
  36% {
    outline-color: rgba(12, 122, 67, 0.75);
    box-shadow:
      inset 0 0 0 1px rgba(12, 122, 67, 0.38),
      0 0 0 0 rgba(12, 122, 67, 0.38);
    filter: brightness(1.08);
  }

  9%,
  27%,
  45% {
    outline-color: rgba(185, 119, 7, 0.85);
    box-shadow:
      inset 0 0 0 1px rgba(185, 119, 7, 0.4),
      0 0 0 5px rgba(185, 119, 7, 0.18);
    filter: brightness(1.12);
  }

  100% {
    outline-color: transparent;
    box-shadow: inherit;
    filter: none;
  }
}

@media (max-width: 900px) {
  body {
    min-width: 0;
  }

  .topbar {
    height: auto;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    flex-direction: column;
  }

  .topbar-controls,
  .segmented {
    width: 100%;
  }

  .segmented button,
  .refresh-button {
    flex: 1;
  }

  .workspace {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .table-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .odds-table-wrap {
    max-height: none;
    overflow: visible;
  }

  .main-panel {
    height: auto;
    display: block;
    overflow: visible;
  }

  .accumulator-view,
  .unmatched-view {
    max-height: none;
    overflow-y: visible;
  }
}

/* Modal Notification in Center of Screen */
.notification-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 15, 12, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.notification-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.notification-modal {
  background: rgba(18, 35, 27, 0.96);
  border: 1px solid rgba(164, 205, 175, 0.3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), 0 8px 16px rgba(0, 0, 0, 0.2);
  border-radius: 14px;
  width: 90%;
  max-width: 580px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  color: #f7fff9;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.notification-backdrop.show .notification-modal {
  transform: scale(1);
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notification-title {
  font-size: 16px;
  font-weight: 800;
  color: #a4cdaf;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.notification-close {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 22px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.notification-close:hover {
  color: #fff;
  transform: scale(1.1);
}

.notification-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.notification-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
}

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

.notification-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notification-match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notification-match {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  min-width: 0;
  overflow-wrap: anywhere;
}

.notification-copy {
  flex: 0 0 auto;
  border: 1px solid rgba(164, 205, 175, 0.35);
  background: rgba(164, 205, 175, 0.08);
  color: #a4cdaf;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.notification-copy:hover,
.notification-copy.is-copied {
  background: rgba(164, 205, 175, 0.18);
  border-color: rgba(164, 205, 175, 0.6);
  color: #f7fff9;
}

.notification-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  gap: 12px;
}

.notification-meta {
  color: rgba(255, 255, 255, 0.65);
}

.notification-change-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-odd-transition {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
}

.notification-badge {
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.notification-badge.up {
  background: rgba(12, 122, 67, 0.3);
  color: #4ed98a;
  border: 1px solid rgba(12, 122, 67, 0.4);
}

.notification-badge.down {
  background: rgba(180, 35, 24, 0.3);
  color: #ffa19b;
  border: 1px solid rgba(180, 35, 24, 0.4);
}

.outright-alert-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(17, 24, 39, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.outright-alert-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.outright-alert-modal {
  width: min(760px, 96vw);
  border: 2px solid rgba(245, 158, 11, 0.75);
  border-radius: 8px;
  background: #fff8e5;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  padding: 38px;
  color: #1f2937;
  text-align: center;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.2s ease;
}

.outright-alert-backdrop.show .outright-alert-modal {
  transform: translateY(0) scale(1);
}

.outright-alert-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.outright-alert-modal h2 {
  margin: 18px 0 12px;
  color: #7f1d1d;
  font-size: 46px;
  line-height: 1.04;
  text-transform: none;
  letter-spacing: 0;
}

.outright-alert-text {
  margin: 0 auto 28px;
  max-width: 620px;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.45;
}

.outright-alert-confirm {
  min-width: 210px;
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: #12231b;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
}

.outright-alert-confirm:hover,
.outright-alert-confirm:focus-visible {
  background: #0c7a43;
  outline: 3px solid rgba(12, 122, 67, 0.22);
  outline-offset: 3px;
}

/* Value Bets Chiron Ticker */
.ticker-wrap {
  display: flex;
  flex: 1;
  max-width: 480px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  position: relative;
  height: 34px;
  box-sizing: border-box;
}

.ticker-wrap::before {
  content: "Value kvote";
  background: var(--amber);
  color: var(--dark);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: 8px;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

.ticker-content-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-content-container::before,
.ticker-content-container::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 20px;
  z-index: 1;
  pointer-events: none;
}

.ticker-content-container::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-card), transparent);
}

.ticker-content-container::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-card), transparent);
}

.ticker {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: ticker-animation 70s linear infinite;
}

.ticker:hover {
  animation-play-state: paused;
}

@keyframes ticker-animation {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-100%, 0, 0);
  }
}

.ticker-item {
  display: inline-block;
  margin-right: 32px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.ticker-item strong {
  font-weight: 700;
}

@media (max-width: 900px) {
  .ticker-wrap {
    width: 100%;
    max-width: none;
    margin: 12px 0;
  }
}


.money-flow-outcome {
  position: relative;
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: var(--green);
  text-align: center;
  font-weight: 700;
  cursor: help;
}

.money-flow-chart-popup {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: none;
  z-index: 100;
  white-space: nowrap;
  pointer-events: none;
  margin-bottom: 6px;
}

.money-flow-outcome:hover .money-flow-chart-popup {
  display: block;
}

.money-flow-chart {
  display: block;
}

.money-flow-val {
  background: rgba(14, 161, 83, 0.1);
  padding: 2px 4px;
  border-radius: 3px;
}

/* Accumulator Presets in Sidebar */
.accumulator-presets {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.preset-btn {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  padding: 6px 0;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  color: var(--muted);
  transition: all 0.2s ease;
}

.preset-btn:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.preset-btn.active {
  background: #12231b;
  color: white;
  border-color: #12231b;
}

/* Accumulator Layout View */
.accumulator-view {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Leaderboard Grid */
.accumulator-leaderboard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

/* Leaderboard Cards styling */
.leaderboard-card {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.leaderboard-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px rgba(20, 31, 25, 0.05);
}

/* Top Rank highlighting */
.leaderboard-card.rank-1 {
  background: linear-gradient(145deg, #ffffff, #eef9f2);
  border: 2px solid var(--green);
  box-shadow: 0 8px 24px rgba(12, 122, 67, 0.08);
}

.leaderboard-card.incomplete {
  opacity: 0.65;
  background: var(--bg);
}

/* Header inside card */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  background: var(--soft);
  color: var(--muted);
}

.rank-1 .rank-badge {
  background: #f1c40f;
  color: #7f6000;
  box-shadow: 0 2px 8px rgba(241, 196, 15, 0.4);
}

.rank-2 .rank-badge {
  background: #bdc3c7;
  color: #2c3e50;
  box-shadow: 0 2px 8px rgba(189, 195, 199, 0.4);
}

.rank-3 .rank-badge {
  background: #e67e22;
  color: #fff;
  box-shadow: 0 2px 8px rgba(230, 126, 34, 0.4);
}

/* Combined Odd */
.card-odd-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.card-odd-value {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.5px;
}

.rank-1 .card-odd-value {
  color: var(--green);
}

.card-odd-label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
}

/* Edge badge vs Pinnacle Reference */
.card-edge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  width: fit-content;
}

.card-edge.positive {
  background: var(--green-2);
  color: var(--green);
}

.card-edge.negative {
  background: #fef3f2;
  color: var(--red);
}

.card-edge.neutral {
  background: var(--soft);
  color: var(--muted);
}

/* Value Progress Bar */
.card-progress-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 4px;
}

.card-progress-label {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

.card-progress-bar-bg {
  height: 6px;
  background: var(--soft);
  border-radius: 3px;
  overflow: hidden;
}

.card-progress-bar-fg {
  height: 100%;
  background: var(--muted);
  border-radius: 3px;
  transition: width 0.4s ease-out;
}

.rank-1 .card-progress-bar-fg {
  background: var(--green);
}

/* Copy ticket button inside card */
.card-copy-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: auto;
  transition: all 0.2s ease;
  width: 100%;
}

.card-copy-btn:hover {
  background: var(--surface-2);
  border-color: var(--muted);
}

.card-copy-btn.is-copied {
  background: var(--green-2);
  color: var(--green);
  border-color: var(--green);
}

/* Leg Table styling */
.accumulator-legs {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 10px;
  flex-shrink: 0;
}

.legs-title {
  padding: 16px;
  font-size: 15px;
  font-weight: 800;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  margin: 0;
}

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

.legs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.legs-table th {
  height: 38px;
  background: #17231d;
  color: #eff8ef;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  padding: 0 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}

.legs-table th.leg-num-head {
  width: 50px;
}

.legs-table th.leg-match-head {
  text-align: left;
  padding-left: 14px;
}

.legs-table th.leg-fav-head {
  text-align: left;
  padding-left: 10px;
}

.legs-table td {
  height: 52px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--soft);
  font-size: 13px;
  text-align: center;
  padding: 0 10px;
  background: var(--surface);
}

.legs-table tr:last-child td {
  border-bottom: 0;
}

.legs-table td.leg-num {
  font-weight: 700;
  color: var(--muted);
}

.legs-table td.leg-match {
  text-align: left;
  padding-left: 14px;
  font-weight: 700;
}

.legs-table td.leg-match small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.legs-table td.leg-fav {
  text-align: left;
  padding-left: 10px;
}

.legs-table td.leg-fav strong {
  color: var(--green);
}

.legs-table td.leg-fav span {
  font-size: 11px;
  background: var(--green-2);
  color: var(--green);
  padding: 1px 4px;
  border-radius: 4px;
  margin-left: 4px;
  font-weight: 800;
}

.legs-table td.ref-odd-cell {
  background: var(--surface-2);
  font-weight: 700;
  color: var(--muted);
}

.legs-table td.leg-odd-cell {
  font-weight: 800;
}

.legs-table td.leg-odd-cell.best {
  background: var(--green-2);
  color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(12, 122, 67, 0.15);
}

.legs-table td.leg-odd-cell.lowest {
  background: var(--purple-2);
  color: var(--purple);
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.15);
}

.legs-table td.leg-odd-cell.missing {
  background: #fafbf9;
  color: #a5aea4;
}

.hidden {
  display: none !important;
}

#accumulatorFilterSection .select-label {
  margin-top: 14px;
}

.unmatched-panel {
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid var(--border, #2a2f3a);
  border-radius: 10px;
  font-size: 13px;
}

.unmatched-panel > summary {
  cursor: pointer;
  font-weight: 600;
}

.unmatched-hint {
  margin: 8px 0 12px;
  opacity: 0.7;
}

.unmatched-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 12px;
  padding: 6px 0;
  border-top: 1px solid var(--border, #2a2f3a);
}

.unmatched-book {
  font-weight: 600;
}

.unmatched-reason {
  opacity: 0.7;
}

@media (max-width: 720px) {
  .unmatched-item {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* â”€â”€ Unmatched tab badge â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.unmatched-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  margin-left: 4px;
}

/* â”€â”€ Unmatched full-screen view â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.unmatched-view {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.uv-header {
  margin-bottom: 20px;
}

.uv-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.uv-hint code {
  background: var(--soft);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
}

.uv-sources {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* â”€â”€ Source block card â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.uv-source-block {
  border: 2px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(20, 31, 25, 0.07);
}

.uv-source-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  background: #12231b;
  border-bottom: 2px solid var(--line);
}

.uv-source-name {
  font-weight: 700;
  font-size: 14px;
  color: #f7fff9;
  letter-spacing: 0.01em;
}

.uv-source-count {
  font-size: 11px;
  font-weight: 700;
  color: #12231b;
  background: #c2f5d5;
  padding: 2px 10px;
  border-radius: 99px;
}

/* â”€â”€ Table â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.uv-table-wrap {
  overflow-x: auto;
}

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

.uv-table colgroup col:nth-child(1) { width: 38%; }
.uv-table colgroup col:nth-child(2) { width: 13%; }
.uv-table colgroup col:nth-child(3) { width: 18%; }
.uv-table colgroup col:nth-child(4) { width: 31%; }

.uv-table thead tr {
  background: #f0f4ee;
}

.uv-table thead th {
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4a5e4a;
  padding: 9px 14px;
  text-align: left;
  border-bottom: 2px solid var(--line);
  border-right: 1px solid var(--line);
}

.uv-table thead th:last-child {
  border-right: none;
}

.uv-table tbody tr {
  border-bottom: 1px solid var(--line);
  transition: background 0.12s;
}

.uv-table tbody tr:nth-child(even) {
  background: #f9fbf8;
}

.uv-table tbody tr:last-child {
  border-bottom: none;
}

.uv-table tbody tr:hover {
  background: #e8f5ee;
}

.uv-table td {
  padding: 10px 14px;
  vertical-align: middle;
  border-right: 1px solid var(--line);
}

.uv-table td:last-child {
  border-right: none;
}

/* â”€â”€ Cell styles â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.uv-teams {
  font-size: 13px;
  line-height: 1.4;
}

.uv-teams strong {
  color: var(--ink);
  font-weight: 700;
}

.uv-sep {
  display: inline-block;
  margin: 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.uv-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.uv-reason-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  background: var(--amber-2);
  color: var(--amber);
  border: 1px solid rgba(185, 119, 7, 0.2);
  white-space: nowrap;
}

.uv-closest-cell {
  color: var(--muted);
  font-size: 12px;
}

.uv-closest {
  font-style: italic;
  color: var(--ink);
  margin-right: 5px;
  font-weight: 500;
}

.uv-score {
  font-size: 11px;
  color: var(--muted);
  background: var(--soft);
  padding: 1px 5px;
  border-radius: 4px;
}

.uv-no-match {
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
}

/* â”€â”€ Empty state â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.unmatched-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 15px;
}

.unmatched-empty-icon {
  font-size: 40px;
}

/* ── Badges & Generic Empty States ────────── */
.changes-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  background: var(--amber);
  color: #ffffff;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 60px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
}

.empty-state-icon {
  font-size: 42px;
}

.empty-state strong {
  font-size: 16px;
  color: var(--ink);
}

.empty-state span {
  font-size: 13px;
  color: var(--muted);
  max-width: 500px;
  line-height: 1.4;
}

/* ── Custom View Scroll Containers ────────── */
.accumulator-view,
.value-odds-view,
.recent-changes-view,
.unmatched-view {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 16px;
}

/* ── Value Odds & Recent Changes Views ────────── */
.vo-summary-banner,
.rc-summary-banner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 16px;
}

.vo-summary-label,
.rc-summary-label {
  font-size: 13px;
  color: var(--muted);
  margin-right: 6px;
}

.vo-summary-count,
.rc-summary-count {
  font-size: 16px;
  color: var(--green);
}

.vo-summary-threshold,
.rc-summary-threshold {
  font-size: 14px;
  color: var(--ink);
}

.vo-summary-max {
  font-size: 14px;
  color: var(--amber);
}

.vo-table-wrap,
.rc-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

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

.vo-table thead tr,
.rc-table thead tr {
  background: #f0f4ee;
  border-bottom: 2px solid var(--line);
}

.vo-table th,
.rc-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #4a5e4a;
}

.vo-table tbody tr,
.rc-table tbody tr {
  border-bottom: 1px solid var(--line);
  transition: background 0.12s;
}

.vo-table tbody tr:last-child,
.rc-table tbody tr:last-child {
  border-bottom: none;
}

.vo-table tbody tr:hover,
.rc-table tbody tr:hover {
  background: #f4f9f4;
}

.vo-table td,
.rc-table td {
  padding: 12px 16px;
  vertical-align: middle;
}

.vo-rank {
  font-weight: 700;
  color: var(--muted);
  width: 40px;
}

.vo-match strong,
.rc-match strong {
  display: block;
  font-weight: 700;
  color: var(--ink);
  font-size: 13.5px;
}

.vo-match small,
.rc-match small {
  font-size: 11.5px;
  color: var(--muted);
}

.vo-outcome-badge,
.rc-outcome-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  background: #e9f0e8;
  color: #214d24;
  font-weight: 700;
  font-size: 12px;
}

.vo-bookie strong {
  color: var(--ink);
  font-weight: 700;
}

.vo-odd-val {
  font-size: 15px;
  color: var(--green);
  font-weight: 800;
  margin-right: 6px;
}

.vo-ref-val {
  font-size: 11.5px;
  color: var(--muted);
}

.vo-edge-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 99px;
  background: #e6f6ec;
  color: var(--green);
  font-weight: 800;
  font-size: 12px;
  border: 1px solid rgba(12, 122, 67, 0.2);
}

.rc-time {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  font-family: monospace;
}

.rc-bookie {
  font-weight: 600;
  color: var(--ink);
}

.rc-transition {
  font-size: 13px;
}

.rc-old-odd {
  color: var(--muted);
  text-decoration: line-through;
  margin-right: 4px;
}

.rc-arrow {
  color: var(--muted);
  margin-right: 4px;
}

.rc-new-odd {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.rc-change-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
}

.rc-change-badge.up {
  background: #e6f6ec;
  color: var(--green);
  border: 1px solid rgba(12, 122, 67, 0.2);
}

.rc-change-badge.down {
  background: #fde8e8;
  color: var(--red);
  border: 1px solid rgba(180, 35, 24, 0.2);
}

/* ── Football loader ─────────────────────────────────────────────────── */

.football-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 80px 24px;
  min-height: 340px;
}

.football-loader.hidden {
  display: none;
}

.football-loader__scene {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.football-loader__ball {
  font-size: 72px;
  line-height: 1;
  animation: fb-bounce 0.75s cubic-bezier(0.33, 0, 0.66, 0) infinite alternate;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.18));
  transform-origin: center bottom;
  will-change: transform;
}

.football-loader__shadow {
  width: 56px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
  animation: fb-shadow 0.75s cubic-bezier(0.33, 0, 0.66, 0) infinite alternate;
  will-change: transform, opacity;
}

.football-loader__msg {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  max-width: 340px;
  min-height: 24px;
  animation: fb-fadein 0.4s ease;
  letter-spacing: 0.01em;
}

@keyframes fb-bounce {
  from {
    transform: translateY(0) scaleX(1) scaleY(1);
  }
  to {
    transform: translateY(-52px) scaleX(0.92) scaleY(1.06);
  }
}

@keyframes fb-shadow {
  from {
    transform: scaleX(1);
    opacity: 0.18;
  }
  to {
    transform: scaleX(0.55);
    opacity: 0.07;
  }
}

@keyframes fb-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
