:root {
  --bg: #f5f0e7;
  --ink: #112126;
  --muted: #4a5f66;
  --card: #fffdf8;
  --line: #d5cbbf;
  --accent: #0f6f78;
  --accent-2: #cf5a2e;
  --ok: #1f7a3f;
  --bad: #9f2f26;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Manrope", "Segoe UI", sans-serif;
  min-height: 100vh;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 8%, #f1b5774d 0%, transparent 28%),
    radial-gradient(circle at 89% 90%, #3ca8af40 0%, transparent 31%),
    linear-gradient(125deg, #faf7f0 0%, #f5f0e7 45%, #f7f1e6 100%);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 100;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: #fffaf2d4;
  backdrop-filter: blur(5px);
}

.brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 12px;
}

.nav-logout-form {
  margin: 0;
  padding: 0;
}

/* ── Profile dropdown ── */
.profile-dropdown {
  position: relative;
  display: inline-flex;
}

.profile-dropdown-trigger,
.profile-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  cursor: pointer;
  font: inherit;
  color: var(--accent);
  font-weight: 500;
  transition: background 0.15s;
}
.profile-dropdown-trigger:hover,
.profile-header-btn:hover {
  background: rgba(15, 111, 120, 0.12);
}

.profile-dropdown-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.profile-dropdown-email {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.88rem;
}

.profile-dropdown-caret {
  font-size: 0.72rem;
  opacity: 0.6;
}

.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: #1a2430;
  border: 1px solid #3e5569;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  padding: 6px 0;
  z-index: 500;
}

.profile-dropdown-item {
  display: block;
  width: 100%;
  padding: 9px 16px;
  color: #c6d7ea;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.12s;
}
.profile-dropdown-item:hover {
  background: rgba(15, 111, 120, 0.15);
  color: #fff;
}

.profile-dropdown-item-form {
  margin: 0;
  padding: 0;
  border-top: 1px solid #2d3e4e;
  margin-top: 4px;
  padding-top: 4px;
}

.profile-dropdown-logout {
  color: #e06050 !important;
}
.profile-dropdown-logout:hover {
  background: rgba(224, 96, 80, 0.12) !important;
}

/* Light theme */
body[data-theme="light"] .profile-dropdown-trigger {
  color: #0f6f78;
}
body[data-theme="light"] .profile-dropdown-trigger:hover {
  background: rgba(15, 111, 120, 0.08);
}
body[data-theme="light"] .profile-dropdown-menu {
  background: #fff;
  border-color: #d2dce6;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
body[data-theme="light"] .profile-dropdown-item {
  color: #2a3a4a;
}
body[data-theme="light"] .profile-dropdown-item:hover {
  background: rgba(15, 111, 120, 0.08);
  color: #0f6f78;
}
body[data-theme="light"] .profile-dropdown-item-form {
  border-top-color: #e8eef4;
}
body[data-theme="light"] .profile-dropdown-logout {
  color: #c0392b !important;
}

.topbar-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #c6d7ea;
  cursor: pointer;
  font-size: 1.05rem;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.topbar-icon-btn:hover {
  background: rgba(15, 111, 120, 0.12);
  border-color: rgba(15, 111, 120, 0.25);
}
.topbar-icon-btn.active {
  background: rgba(15, 111, 120, 0.18);
  border-color: var(--accent);
}
body[data-theme="light"] .topbar-icon-btn { color: #2a3a4a; }
body[data-theme="light"] .topbar-icon-btn:hover { background: rgba(15, 111, 120, 0.08); }

/* Telegram button states */

/* Generic panel popup */
.panel-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999;
}
.panel-popup {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1000;
  width: 380px; max-width: calc(100vw - 32px); max-height: calc(100vh - 80px);
  overflow-y: auto;
  background: var(--card-bg, #1a2332); border: 1px solid var(--border, #263545);
  border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  color: var(--text, #c6d7ea);
}
.panel-popup.panel-wide {
  width: 520px;
}
.panel-popup.panel-evidence {
  width: 1100px;
  max-width: 95vw;
  top: 5vh;
  transform: translateX(-50%);
}
.panel-evidence .panel-body { padding: 0; }
.panel-evidence .evidence-inner { padding: 10px 14px 14px; }
.panel-evidence .evidence-row td { background: transparent; }
.panel-popup.panel-analyze {
  width: 900px;
  max-width: 95vw;
  top: 5vh;
  transform: translateX(-50%);
}
.analyze-season-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 0 12px; border-bottom: 1px solid var(--line, rgba(255,255,255,0.12));
  margin-bottom: 12px;
}
.analyze-body { padding: 1rem 1.25rem; }
.analyze-subtitle {
  color: var(--muted, #7a8ea0); font-size: 0.85rem; margin-bottom: 0.75rem;
}
.analyze-summary {
  display: flex; gap: 1.5rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.analyze-stat { font-size: 0.9rem; color: var(--text, #c6d7ea); }
.analyze-stat strong { color: var(--accent, #3b82f6); }
.analyze-no-filters {
  text-align: center; padding: 0.5rem 1rem 0.75rem; color: var(--muted, #7a8ea0);
  font-size: 0.85rem; font-style: italic;
}
.analyze-trial-info {
  text-align: center; padding: 0.4rem 1rem; color: #d4a843;
  font-size: 0.8rem; font-weight: 500;
}
.analyze-active-filters {
  display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.5rem 1rem;
  justify-content: center;
}
.analyze-filter-tag {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px;
  font-size: 0.75rem; font-weight: 500;
  background: rgba(255,255,255,0.08); color: #ccc; border: 1px solid rgba(255,255,255,0.12);
}
[data-theme="light"] .analyze-filter-tag {
  background: rgba(0,0,0,0.06); color: #444; border-color: rgba(0,0,0,0.1);
}
.analyze-table {
  width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.analyze-table th {
  text-align: left; padding: 6px 10px; font-weight: 600;
  border-bottom: 2px solid var(--border, #263545);
  color: var(--muted, #7a8ea0); font-size: 0.8rem; white-space: nowrap;
}
.analyze-table td {
  padding: 7px 10px; border-bottom: 1px solid var(--border, #263545);
  white-space: nowrap;
}
.analyze-table tbody tr:hover td {
  background: rgba(59,130,246,0.06);
}
.analyze-market-label { min-width: 50px; }
.analyze-profit-pos { color: #4caf50; }
.analyze-profit-neg { color: #f44336; }
.analyze-sparkline { display: block; }
.analyze-row-clickable { cursor: pointer; transition: background 0.12s; }
.analyze-row-clickable:hover td { background: rgba(76,175,80,0.08); }
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--border, #263545);
  position: sticky; top: 0; background: inherit; z-index: 1; border-radius: 12px 12px 0 0;
}
.panel-title { font-weight: 600; font-size: 0.95rem; }
.panel-close {
  background: none; border: none; color: var(--text, #c6d7ea);
  font-size: 1.4rem; cursor: pointer; padding: 0 4px; line-height: 1;
}
.panel-close:hover { color: #ff6b6b; }
.panel-body { padding: 0.75rem 1rem; }
.panel-loading { text-align: center; padding: 1.5rem 0; opacity: 0.6; }
.panel-error { color: #ff6b6b; text-align: center; }
.tg-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 0.5rem;
}
.tg-label { font-size: 0.85rem; color: var(--muted, #8899aa); min-width: 90px; }
.tg-value { font-size: 0.85rem; }
.tg-status-linked { color: #2dd97a; font-weight: 600; }
.tg-status { font-size: 0.8rem; margin-left: 4px; }
.tg-select {
  flex: 1; font-size: 0.82rem; padding: 4px 8px;
  background: var(--input-bg, #0e1a26); border: 1px solid var(--border, #263545);
  border-radius: 6px; color: var(--text, #c6d7ea);
}
.tg-hint { font-size: 0.85rem; margin: 0 0 0.5rem; line-height: 1.4; }
.tg-steps { font-size: 0.82rem; padding-left: 1.2rem; margin: 0.3rem 0 0.6rem; line-height: 1.5; }
.tg-steps a { color: var(--accent, #0f6f78); }
.tg-hint-small { font-size: 0.75rem; opacity: 0.55; margin: 0.3rem 0 0.6rem; }
.tg-filter-summary { font-size: 0.78rem; color: var(--muted, #8899aa); margin: 0.2rem 0 0.3rem; }
.tg-link-row { display: flex; align-items: center; gap: 6px; margin-top: 0.3rem; }
.tg-actions { display: flex; align-items: center; gap: 8px; }
.tg-btn-danger { color: #ff6b6b !important; border-color: rgba(255,107,107,0.3) !important; }
.tg-btn-danger:hover { background: rgba(255,107,107,0.1) !important; }

body[data-theme="light"] .panel-popup {
  background: #fff; border-color: #dde3ea; color: #2a3a4a;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
body[data-theme="light"] .panel-close { color: #667; }
body[data-theme="light"] .tg-select { background: #f5f7fa; border-color: #dde3ea; color: #2a3a4a; }

/* Profile panel */
.pp-section { margin-bottom: 0.8rem; }
.pp-section-title { font-size: 0.82rem; font-weight: 600; color: var(--accent, #dbb540); margin: 0 0 0.4rem; }
.pp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem 1rem; }
.pp-label { font-size: 0.78rem; color: var(--muted, #8899aa); }
.pp-value { font-size: 0.85rem; }
.pp-row { display: flex; align-items: center; gap: 8px; margin-bottom: 0.4rem; }
.pp-input {
  font-size: 0.85rem; padding: 5px 10px;
  background: var(--input-bg, #0e1a26); border: 1px solid var(--border, #263545);
  border-radius: 6px; color: var(--text, #c6d7ea); width: 100%;
}
.pp-select {
  font-size: 0.82rem; padding: 4px 8px;
  background: var(--input-bg, #0e1a26); border: 1px solid var(--border, #263545);
  border-radius: 6px; color: var(--text, #c6d7ea); flex: 1;
}
.pp-status { font-size: 0.8rem; margin-left: 4px; }
.pp-status.is-success { color: #2dd97a; }
.pp-status.is-error { color: #ff6b6b; }
.pp-hint { font-size: 0.75rem; opacity: 0.55; margin: 0.2rem 0 0; }
.pp-plan-badge {
  display: inline-block; padding: 2px 10px; border-radius: 4px;
  font-size: 0.8rem; font-weight: 600;
}
.pp-plan-pro { background: rgba(219,181,64,0.15); color: #dbb540; border: 1px solid rgba(219,181,64,0.3); }
.pp-plan-free { background: rgba(102,119,136,0.15); color: #8899aa; border: 1px solid rgba(102,119,136,0.3); }
.pp-plan-trial { background: rgba(64,160,255,0.15); color: #60b0ff; border: 1px solid rgba(64,160,255,0.3); }
.pp-pw-form { display: flex; flex-direction: column; gap: 0.4rem; }
.pp-pw-form label { font-size: 0.8rem; color: var(--muted, #8899aa); }
.pp-pw-form input { font-size: 0.85rem; padding: 6px 10px; }
.pp-pw-msg { font-size: 0.82rem; margin-top: 0.3rem; }
body[data-theme="light"] .pp-input,
body[data-theme="light"] .pp-select { background: #f5f7fa; border-color: #dde3ea; color: #2a3a4a; }

/* Help panel */
.hp-accordion { border-bottom: 1px solid var(--border, #263545); }
.hp-accordion summary {
  padding: 0.55rem 0; font-weight: 600; font-size: 0.88rem; cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.hp-accordion summary::after { content: "▸"; transition: transform 0.2s; }
.hp-accordion[open] summary::after { transform: rotate(90deg); }
.hp-accordion summary::-webkit-details-marker { display: none; }
.hp-body { padding: 0 0 0.6rem; font-size: 0.82rem; line-height: 1.55; color: var(--text-soft, #a0b8cc); }
.hp-body p { margin: 0 0 0.45rem; }
.hp-body ul, .hp-body ol { margin: 0.2rem 0 0.5rem; padding-left: 1.2rem; }
.hp-body li { margin-bottom: 0.25rem; }
.hp-body h4 { font-size: 0.84rem; margin: 0.6rem 0 0.25rem; color: var(--accent, #dbb540); }
.hp-body strong { color: var(--text, #c6d7ea); font-weight: 700; }
.hp-body em { font-style: italic; opacity: 0.75; }
.hp-body a { color: var(--link-color, #4fc3f7); text-decoration: underline; }
.hp-body a:hover { color: var(--link-hover, #8ad8ff); }
.hp-body dt { font-weight: 700; margin-top: 0.55rem; color: var(--text, #c6d7ea); }
.hp-body dd { margin: 0.1rem 0 0.4rem 0; }

@media (max-width: 560px) {
  .profile-dropdown-email { display: none; }
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav a,
.nav-link-btn {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid transparent;
  padding: 6px 10px;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.nav a:hover,
.nav-link-btn:hover {
  border-color: var(--accent);
}

.nav-icon-link {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
}
button.nav-icon-link {
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  padding: 6px 12px;
  border-radius: 6px;
}
button.nav-icon-link:hover {
  background: rgba(255,255,255,0.07);
}
button.nav-icon-link.tg-active {
  color: #2dd97a;
}
button.nav-icon-link.tg-linked {
  color: #e8a735;
}
button.nav-icon-link.tg-inactive {
  color: var(--clr-muted, #667);
}
body[data-theme="light"] button.nav-icon-link:hover {
  background: rgba(0,0,0,0.06);
}
body[data-theme="light"] button.nav-icon-link.tg-active {
  color: #1aaa55;
}
body[data-theme="light"] button.nav-icon-link.tg-linked {
  color: #c48a20;
}
body[data-theme="light"] button.nav-icon-link.tg-inactive {
  color: #99aabb;
}

/* ── Sport selector (admin only) ── */
.sport-selector {
  display: inline-flex;
  gap: 2px;
  background: rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 2px;
  margin-right: 4px;
}
.sport-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  border-radius: 6px;
  font-size: 1rem;
  text-decoration: none;
  opacity: 0.45;
  transition: opacity 0.15s, background 0.15s;
}
.sport-btn:hover {
  opacity: 0.8;
  background: rgba(255,255,255,0.1);
}
.sport-btn.sport-active {
  opacity: 1;
  background: rgba(255,255,255,0.15);
}
body[data-theme="light"] .sport-selector {
  background: rgba(0,0,0,0.06);
}
body[data-theme="light"] .sport-btn:hover {
  background: rgba(0,0,0,0.08);
}
body[data-theme="light"] .sport-btn.sport-active {
  background: rgba(0,0,0,0.12);
}

/* ── Basketball dashboard ── */
.bball-dashboard {
  padding: 16px 20px;
}
.bball-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.bball-tab-btn {
  padding: 7px 18px;
  border: 1px solid var(--clr-border, rgba(255,255,255,0.1));
  border-radius: 8px;
  background: transparent;
  color: var(--clr-muted, #8899aa);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.bball-tab-btn:hover {
  background: rgba(255,255,255,0.05);
  color: var(--clr-text, #dbe8f8);
}
.bball-tab-btn.is-active {
  background: var(--clr-accent, #0f6f78);
  color: #fff;
  border-color: var(--clr-accent, #0f6f78);
}
body[data-theme="light"] .bball-tab-btn {
  border-color: var(--line);
  color: var(--muted);
}
body[data-theme="light"] .bball-tab-btn:hover {
  background: rgba(0,0,0,0.04);
  color: var(--ink);
}
body[data-theme="light"] .bball-tab-btn.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.bball-tab-panel { display: none; }
.bball-tab-panel.is-active { display: block; }
.bball-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.bball-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.bball-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 6px 8px;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-bottom: 2px solid var(--clr-border, rgba(255,255,255,0.12));
  background: var(--clr-bg, #0e1a22);
  color: var(--clr-muted, #8899aa);
}
body[data-theme="light"] .bball-table thead th {
  background: var(--card);
  color: var(--muted);
  border-bottom-color: var(--line);
}
.bball-table td {
  padding: 5px 8px;
  white-space: nowrap;
  border-bottom: 1px solid var(--clr-border, rgba(255,255,255,0.06));
  color: var(--clr-text, #dbe8f8);
}
body[data-theme="light"] .bball-table td {
  color: var(--ink);
  border-bottom-color: var(--line);
}
.bball-table .data-row:hover td {
  background: rgba(255,255,255,0.03);
}
body[data-theme="light"] .bball-table .data-row:hover td {
  background: rgba(0,0,0,0.02);
}
.bball-start { color: var(--clr-muted, #8899aa); }
.bball-status { font-weight: 600; }
.bball-finished { color: var(--clr-muted, #667); }
.bball-live { color: #2dd97a; }
body[data-theme="light"] .bball-live { color: #1a8a4a; }
.bball-league {
  color: var(--clr-muted, #8899aa);
  font-size: 0.78rem;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bball-match { min-width: 200px; }
.bball-match strong { font-weight: 600; }
.bball-score { font-weight: 700; font-size: 0.88rem; }
.bball-score-final { color: var(--clr-muted, #8899aa); }
.bball-quarter {
  color: var(--clr-muted, #8899aa);
  font-size: 0.78rem;
  text-align: center;
}
.bball-ot-empty { opacity: 0.3; }
.bball-line { font-weight: 600; color: var(--clr-accent, #3fb8c4); }
body[data-theme="light"] .bball-line { color: var(--accent); }
.bball-odd { font-family: "IBM Plex Mono", monospace; font-size: 0.78rem; }
.bball-source {
  color: var(--clr-muted, #667);
  font-size: 0.75rem;
}
.bball-row-live td { background: rgba(45,217,122,0.04); }
body[data-theme="light"] .bball-row-live td { background: rgba(26,138,74,0.04); }
.bball-date-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.85rem;
}
.bball-date-picker input[type="date"] {
  padding: 4px 8px;
  border: 1px solid var(--clr-border, rgba(255,255,255,0.15));
  border-radius: 6px;
  background: var(--clr-bg, #0e1a22);
  color: var(--clr-text, #dbe8f8);
  font: inherit;
  font-size: 0.85rem;
}
body[data-theme="light"] .bball-date-picker input[type="date"] {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}
.bball-date-picker .btn-sm {
  padding: 4px 14px;
  border: 1px solid var(--clr-accent, #0f6f78);
  border-radius: 6px;
  background: var(--clr-accent, #0f6f78);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.bball-date-picker .btn-sm:hover {
  opacity: 0.85;
}
.bball-col-match { min-width: 200px; }
.bball-col-expand { width: 28px; text-align: center; padding: 0 2px; }
.bball-expand-col { width: 28px; text-align: center; padding: 0 2px !important; }
.bball-expand-btn {
  background: none; border: 1px solid var(--clr-muted, #556); color: var(--clr-fg, #dde);
  width: 22px; height: 22px; border-radius: 3px; cursor: pointer;
  font-size: 0.85rem; line-height: 1; padding: 0;
}
.bball-expand-btn:hover { background: rgba(63,184,196,0.15); border-color: var(--clr-accent, #3fb8c4); }
body[data-theme="light"] .bball-expand-btn { border-color: #bbb; color: #333; }
body[data-theme="light"] .bball-expand-btn:hover { background: rgba(37,99,235,0.08); border-color: var(--accent); }
.bball-stat { font-weight: 600; text-align: center; font-size: 0.82rem; }
.bball-ft-score { font-weight: 700; }
.bball-evidence-row td { padding: 0 !important; }
.bball-evidence-inner { padding: 8px 12px; }
.bball-evidence-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.bball-evidence-table th {
  background: rgba(63,184,196,0.08); padding: 4px 8px; text-align: left;
  font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.06);
}
body[data-theme="light"] .bball-evidence-table th { background: rgba(37,99,235,0.04); border-color: #e2e5ea; }
.bball-evidence-table td { padding: 3px 8px; border-bottom: 1px solid rgba(255,255,255,0.03); }
body[data-theme="light"] .bball-evidence-table td { border-color: #f0f0f0; }
.bball-evidence-table .ev-type { font-weight: 600; color: var(--clr-accent, #3fb8c4); width: 50px; }
body[data-theme="light"] .bball-evidence-table .ev-type { color: var(--accent); }
.bball-evidence-table .ev-score { font-family: "IBM Plex Mono", monospace; font-weight: 600; }
.bball-evidence-table .ev-total { font-weight: 700; }
.bball-evidence-table .evidence-separator td { height: 2px; padding: 0; background: rgba(63,184,196,0.15); }
body[data-theme="light"] .bball-evidence-table .evidence-separator td { background: rgba(37,99,235,0.1); }
.bball-evidence-table .evidence-summary { font-weight: 600; }
.bball-evidence-table .evidence-summary td { border-top: 1px solid rgba(63,184,196,0.2); padding-top: 6px; }
body[data-theme="light"] .bball-evidence-table .evidence-summary td { border-color: rgba(37,99,235,0.15); }
.bball-evidence-table .evidence-summary-label { color: var(--clr-muted, #8899aa); }
.empty-row {
  text-align: center;
  color: var(--clr-muted, #8899aa);
  padding: 20px !important;
  font-style: italic;
}

.nav-bets-active {
  border: 1px solid rgba(219,181,64,0.3) !important;
  background: rgba(219,181,64,0.08) !important;
  color: #dbb540 !important;
}
.nav-bets-active:hover {
  background: rgba(219,181,64,0.18) !important;
  border-color: rgba(219,181,64,0.5) !important;
  color: #f0d060 !important;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  width: 42px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 2px solid #6a829a;
  background: #152030;
  color: #dbe8f8;
  cursor: pointer;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.theme-toggle:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.theme-toggle:disabled {
  opacity: 0.75;
  cursor: wait;
}

.container {
  max-width: 1320px;
  margin: 18px auto 36px;
  padding: 0 16px;
}

.hero {
  margin-bottom: 16px;
}

.hero-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.hero-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.data-refreshing-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  margin: 0 0 16px;
  border-radius: 8px;
  background: rgba(255, 180, 50, 0.12);
  border: 1px solid rgba(255, 180, 50, 0.3);
  color: #f0ad4e;
  font-size: 0.9rem;
}
.data-refreshing-banner svg {
  flex-shrink: 0;
  animation: spin 1.5s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-refresh {
  display: inline-block;
  text-decoration: none;
  color: #ffffff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 700;
  transition: filter 0.15s ease;
}

.btn-refresh:hover {
  filter: brightness(1.08);
}

.btn-refresh.is-loading {
  pointer-events: none;
  opacity: 0.8;
}

.favorites-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.btn-clear-favorites {
  font-size: 0.82rem;
  padding: 5px 12px;
  background: var(--bad);
  border-color: var(--bad);
}

/* Table loading overlay — fixed center of viewport */
.table-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

/* Football orbit loading animation */
.table-loading-spinner {
  --loading-accent: #4fc882;
  display: block;
  position: relative;
  width: 80px;
  height: 80px;
}
.loading-orbit-track {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(100,140,180,0.15);
  border-radius: 50%;
}
.loading-orbit-progress {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--loading-accent) 0deg 18deg, transparent 18deg 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  transition: background 0.3s;
}
.loading-football {
  position: absolute;
  width: 26px;
  height: 26px;
  top: -13px;
  left: 50%;
  margin-left: -13px;
  transform-origin: 13px 53px;
  animation: football-orbit 1.6s linear infinite;
}
.loading-football svg {
  width: 26px;
  height: 26px;
  animation: football-spin 0.8s linear infinite;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}
/* Pct in center */
.loading-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #8ea8be;
  font-family: "IBM Plex Mono", monospace;
}

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

.table-loading-text {
  color: #8ea8be;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}
.table-loading-step {
  color: #5e7a90;
  font-size: 0.76rem;
  letter-spacing: 0.01em;
  min-height: 1em;
}

body[data-theme="light"] .table-loading-text { color: #5a7a8e; }
body[data-theme="light"] .table-loading-step { color: #8a9eac; }
body[data-theme="light"] .loading-pct { color: #5a7a8e; }
body[data-theme="light"] .loading-orbit-track { border-color: rgba(60,80,100,0.12); }
body[data-theme="light"] .table-loading-spinner { --loading-accent: #2a8a4a; }
body[data-theme="light"] .data-refreshing-banner {
  background: rgba(200, 140, 20, 0.1);
  border-color: rgba(200, 140, 20, 0.35);
  color: #8a6d1a;
}

/* Profit inline (toolbar) */
.profit-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}
.profit-result {
  white-space: nowrap;
}
.profit-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}
.profit-item.is-positive { color: #4caf50; }
.profit-item.is-negative { color: #f44336; }
.profit-item.is-zero { color: #8ea8be; }

body[data-theme="light"] .table-loading-spinner .loading-football svg circle {
  fill: #fafaf5;
}
body[data-theme="light"] .table-loading-spinner .loading-football svg path,
body[data-theme="light"] .table-loading-spinner .loading-football svg polygon {
  stroke: #444;
  fill: #444;
}
body[data-theme="light"] .table-loading-spinner .loading-football svg path {
  fill: none;
}

.refresh-status {
  color: var(--muted);
  font-size: 0.86rem;
  font-family: "IBM Plex Mono", monospace;
}

.refresh-status.is-running {
  color: var(--accent);
}

.refresh-status.is-ok {
  color: var(--ok);
}

.refresh-status.is-error {
  color: var(--bad);
}

.refresh-log {
  margin: 0 0 14px;
  max-height: 240px;
  overflow: auto;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #274149;
  background: #102126;
  color: #d9ecef;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.79rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: 0 8px 20px #00000008;
}

.auth-card {
  max-width: 420px;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-heading {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 4px;
}

.auth-label {
  font-weight: 600;
  color: var(--ink);
}

.auth-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: #fffefb;
}

.auth-input:focus {
  outline: 2px solid #7cb7bc;
  outline-offset: 1px;
}

.auth-error {
  margin: 0;
  color: var(--bad);
  font-weight: 600;
}

/* ── Profile page ── */
.profile-card {
  max-width: 560px;
}
.profile-heading {
  margin: 0 0 20px;
  font-size: 1.3rem;
}
.profile-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.profile-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.profile-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--accent);
}
.profile-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
}
.profile-info-label {
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.6;
  display: block;
}
.profile-info-value {
  font-size: 0.92rem;
  display: block;
}
.profile-plan-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.profile-plan-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
}
.profile-plan-free {
  background: #2d3e4e;
  color: #a4b8cc;
}
.profile-plan-pro {
  background: #0f6f78;
  color: #fff;
}
.profile-plan-trial {
  background: #1a4a8a;
  color: #80c0ff;
}
.profile-plan-expires {
  font-size: 0.84rem;
  opacity: 0.7;
}
.profile-upgrade-btn {
  font-size: 0.84rem;
  padding: 5px 14px;
}
.profile-cancel-btn {
  font-size: 0.8rem;
  padding: 4px 12px;
  background: transparent;
  color: var(--danger, #c0392b);
  border: 1px solid var(--danger, #c0392b);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.profile-cancel-btn:hover {
  background: var(--danger, #c0392b);
  color: #fff;
}
.profile-cancel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.profile-tz-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.profile-tz-select {
  max-width: 280px;
}
.profile-tz-status {
  font-size: 0.84rem;
  font-weight: 600;
}
.profile-tz-status.is-success {
  color: var(--good);
}
.profile-tz-status.is-error {
  color: var(--bad);
}
.profile-pw-form {
  max-width: 360px;
}

/* Light theme profile */
body[data-theme="light"] .profile-plan-free {
  background: #e8eef4;
  color: #5a6a7a;
}

@media (max-width: 560px) {
  .profile-info-grid { grid-template-columns: 1fr; }
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.metric-card strong {
  font-size: 1.05rem;
}

.table-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.mono {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

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

.data-table thead th {
  color: var(--muted);
  font-weight: 600;
}

.data-table.compact {
  max-width: 520px;
}

.odd-list {
  margin: 8px 0 0;
  padding-left: 14px;
}

.odds-cell-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 130px;
}

.odds-count {
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
}

.expand-col {
  width: 44px;
  text-align: center;
  white-space: nowrap;
}

.favorite-col {
  width: 44px;
  text-align: center;
  white-space: nowrap;
}

.expand-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff8ed;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.expand-btn:hover {
  border-color: var(--accent);
  background: #f7efe0;
}

.evidence-row td {
  background: #fbf6ec;
  padding: 0;
}

.evidence-inner {
  padding: 10px 12px 12px;
  overflow-x: auto;
  overflow-y: visible;
}

.evidence-tabs-nav {
  display: flex;
  gap: 8px;
  margin: 0 0 10px;
}

.evidence-tab-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
}

.evidence-tab-btn.is-active {
  background: rgba(88, 199, 185, 0.16);
  border-color: var(--accent);
  color: var(--ink);
}

.evidence-tab-pane[hidden] {
  display: none !important;
}

.evidence-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.evidence-table th,
.evidence-table td {
  border-bottom: 1px solid var(--line);
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
}

.evidence-table thead th {
  color: var(--muted);
  font-weight: 600;
}

.evidence-type {
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.odds-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin-top: 10px;
}

.odds-history-table th,
.odds-history-table td {
  border-bottom: 1px solid var(--line);
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
}

.odds-history-table thead th {
  color: var(--muted);
  font-weight: 600;
}

/* ── Bookmaker logo cells ─────────────────────────────── */
.bk-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
  vertical-align: middle;
}
.bk-logo {
  height: 16px;
  width: 44px;
  display: block;
  border-radius: 3px;
}
.odds-detail-table .bk-logo {
  height: 18px;
}

.odds-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.odds-detail-table th,
.odds-detail-table td {
  border-bottom: 1px solid var(--line);
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
}

.odds-detail-table thead th {
  color: var(--muted);
  font-weight: 600;
}

.best-odd {
  display: inline-block;
  padding: 2px 8px;
  border: 2px solid #c8902f;
  border-radius: 8px;
  background: #fff5df;
  font-weight: 700;
}

.odd-history-trigger {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  margin: 0;
  padding: 0;
}

.odd-history-trigger.has-history,
.odd-history-trigger.lazy-history {
  cursor: pointer;
  text-decoration: underline dotted #7a8d94;
  text-underline-offset: 2px;
}

.odd-history-trigger.has-history:hover,
.odd-history-trigger.lazy-history:hover {
  color: #0b5860;
}

.odd-history-trigger.best-odd {
  padding: 2px 8px;
}

.live-col {
  min-width: 115px;
  width: 115px;
  max-width: 115px;
  white-space: nowrap;
}

.live-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  background: #d94134;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.live-meta {
  margin-top: 3px;
  color: #8b3127;
  font-size: 0.78rem;
  font-family: "IBM Plex Mono", monospace;
}

.live-score {
  margin-top: 2px;
  color: #7b1f18;
  font-weight: 700;
  font-size: 0.92rem;
}

.live-row td:nth-child(n + 3):nth-child(-n + 6) {
  background: #fff4d8 !important;
}

.settled-win-row td:nth-child(n + 3):nth-child(-n + 6) {
  background: inherit;
}

.settled-loss-row td:nth-child(n + 3):nth-child(-n + 6) {
  background: inherit;
}

.settled-mixed-row td:nth-child(n + 3):nth-child(-n + 6) {
  background: #eef4fb;
}

.odds-popup {
  position: fixed;
  z-index: 9999;
  min-width: 320px;
  max-width: min(92vw, 460px);
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 34px #00000026;
  padding: 8px 10px;
}

.pro-popup {
  position: fixed;
  z-index: 9999;
  min-width: 280px;
  max-width: min(92vw, 420px);
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 34px #00000026;
  padding: 8px 10px;
}

.pro-popup-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  margin: 0 0 6px;
}

.pro-popup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.pro-popup-table th,
.pro-popup-table td {
  border: 1px solid var(--line);
  padding: 5px 7px;
  text-align: left;
  vertical-align: top;
}

.pro-popup-table th {
  width: 65%;
  color: var(--muted);
  font-weight: 600;
}

.pro-popup-table td {
  text-align: right;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
}

.pro-cell {
  cursor: pointer;
}

.js-cell-info-trigger {
  cursor: pointer;
}

.cell-info-popup {
  min-width: 360px;
  max-width: min(96vw, 980px);
}

.cell-info-popup .cell-info-content {
  max-height: min(72vh, 700px);
  overflow: auto;
}

.cell-info-popup .evidence-table,
.cell-info-popup .odds-popup-table {
  width: 100%;
}

.odds-popup-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
  margin: 0 0 6px;
}

.odds-popup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.79rem;
}

.odds-popup-table th,
.odds-popup-table td {
  border-bottom: 1px solid var(--line);
  padding: 5px 6px;
  text-align: left;
  vertical-align: top;
}

.odds-popup-table thead th {
  color: var(--muted);
  font-weight: 600;
}

.empty-row {
  color: var(--muted);
}

.btn-link {
  color: var(--accent-2);
  font-weight: 700;
  text-decoration: none;
}

button.btn-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

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

.status-tag {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-ok {
  color: var(--ok);
  background: #eaf8ef;
  border-color: #b8dfc3;
}

.status-nok {
  color: var(--bad);
  background: #fdeceb;
  border-color: #f0c4bf;
}

.status-na {
  color: var(--muted);
  background: #eef1f2;
  border-color: #d6dde0;
}

.status-pending {
  color: #ffd890;
  background: #3a2b14;
  border-color: #b48945;
}

.odds-up {
  color: #0c5f3d;
  background: #e4f6ec;
  border-color: #b5dfc7;
}

.odds-down {
  color: #8e2f2f;
  background: #fce9e7;
  border-color: #e9bfbb;
}

.odds-added {
  color: #1a4f7b;
  background: #e8f1fb;
  border-color: #c2d9f1;
}

.odds-removed {
  color: #6b495f;
  background: #f3e9f2;
  border-color: #ddc9db;
}

.odds-init {
  color: #565f67;
  background: #eef1f4;
  border-color: #d6dce2;
}

.odds-same,
.odds-na {
  color: var(--muted);
  background: #eef1f2;
  border-color: #d6dde0;
}

.ok-row td {
  background: #eef8f0;
}

.bad-row td {
  background: #fff4f1;
}

.log-view {
  margin: 0;
  max-height: 70vh;
  overflow: auto;
  padding: 10px;
  border-radius: 10px;
  background: #132025;
  color: #d9ecef;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.45;
}

@media (max-width: 840px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .topbar-tools {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .container {
    margin-top: 14px;
  }

  .hero-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .filters-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .filter-subcard {
    grid-column: auto;
    grid-row: auto;
  }

  .filter-tabs {
    gap: 4px;
  }
  .filter-tab-btn {
    padding: 5px 10px;
    font-size: 0.78rem;
  }

  .filters-split {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .filters-split-left,
  .filters-split-right {
    flex: none !important;
    width: 100% !important;
  }
  .filter-summary {
    max-height: 200px !important;
  }

  .filter-subcard-items {
    grid-template-columns: 1fr;
    gap: 8px 10px;
  }

  .filter-item-slider {
    min-width: 100%;
    width: 100%;
    max-width: none;
  }

  .data-table {
    font-size: 0.82rem;
  }

  .data-table th,
  .data-table td {
    padding: 8px 6px;
  }
}

/* Dark Theme */
:root {
  --bg: #0f1216;
  --ink: #e7ecf3;
  --muted: #a7b5c6;
  --card: #171d24;
  --line: #4a5a6c;
  --accent: #58c7b9;
  --accent-2: #ffb56b;
  --ok: #6ce59d;
  --bad: #ff7a7a;
}

body {
  color: var(--ink);
  background: var(--bg);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.page-bg {
  background:
    radial-gradient(circle at 11% 10%, #203446b3 0%, transparent 33%),
    radial-gradient(circle at 86% 86%, #4126369a 0%, transparent 35%),
    repeating-linear-gradient(
      -8deg,
      #11161ccf 0px,
      #11161ccf 20px,
      #0f141aeb 20px,
      #0f141aeb 41px
    );
}

.topbar {
  border-bottom: 2px dashed #60758a;
  background: #111820e3;
  box-shadow: 0 10px 24px #0000004f;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f4f8ff;
  text-decoration: none;
}

.brand-title {
  font-family: "Manrope", "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
  font-size: 1.07rem;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
}

.brand-dot {
  opacity: 0.55;
  font-weight: 500;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px dashed #7ba2c1;
  box-shadow: 0 4px 12px #00000080;
  background: #141b24;
}

.brand-logo-full {
  width: auto;
  height: 54px;
  max-width: 220px;
  object-fit: contain;
  object-position: center;
  padding: 0;
}

.nav a,
.nav-link-btn {
  color: #dce8f8;
  border: 2px dashed transparent;
  border-radius: 12px;
  padding: 6px 12px;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  background: transparent;
  cursor: pointer;
  font-style: normal;
}

.nav a:hover,
.nav-link-btn:hover {
  border-color: #8aa9c5;
  background: #1a2330;
}

.hero h1 {
  font-family: "Manrope", "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
  color: #f1f6ff;
}

.hero p {
  color: #b8c5d6;
}

.card,
.metric-card {
  background: linear-gradient(170deg, #19212a 0%, #161d26 100%);
  border: 2px dashed #5f7489;
  border-radius: 18px;
  box-shadow: 0 10px 24px #0000004f;
}

.metric-card span {
  color: #a8b7c9;
}

.metric-card strong {
  color: #f0f5fd;
}

.btn-refresh {
  color: #0f141a;
  background: #66d4c7;
  border: 2px dashed #0f5d56;
  border-radius: 12px;
  font-family: "Manrope", "Segoe UI", sans-serif;
  letter-spacing: 0.04em;
  font-weight: 400;
}

.btn-refresh:hover {
  filter: brightness(1.02);
  transform: translateY(-1px) rotate(-0.6deg);
}

.refresh-log,
.log-view {
  border: 2px dashed #4b657e;
  background: #0f151d;
  color: #cae5fb;
}

.auth-card {
  max-width: 460px;
  margin: 24px auto 0;
}

.auth-form {
  justify-items: stretch;
}

.auth-logo-wrap {
  display: flex;
  justify-content: center;
  margin-top: 6px;
  margin-bottom: 2px;
}

.auth-logo {
  width: min(230px, 68%);
  height: auto;
  border-radius: 16px;
  border: 2px dashed #7f9ab5;
  box-shadow: 0 8px 24px #00000070;
  background: #111820;
}

.auth-submit {
  justify-self: center;
  min-width: 140px;
}

.auth-label {
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 1.35rem;
  color: #dce8f6;
}

.auth-input {
  border: 2px dashed #688099;
  border-radius: 12px;
  background: #0f151d;
  color: #e8eff8;
}

.auth-input:focus {
  outline: 2px dashed #87b1cf;
  outline-offset: 1px;
}

.auth-error {
  color: #ff8c8c;
}

.auth-success {
  color: #90f2b6;
}

.auth-help {
  color: #c9d7e8;
  text-align: center;
  margin: 4px 0 0;
}

.auth-help a {
  color: #66d4c7;
}

.auth-resend-form {
  display: flex;
  justify-content: center;
  margin: 2px 0 0;
}

.auth-resend-btn {
  font-size: 0.9rem;
  color: #8fd7ff;
  text-decoration: underline;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.auth-resend-btn:hover {
  color: #bde7ff;
}

.data-table th,
.data-table td,
.evidence-table th,
.evidence-table td,
.odds-detail-table th,
.odds-detail-table td,
.odds-popup-table th,
.odds-popup-table td {
  border-bottom: 1px dashed #5b6f82;
}

.data-table thead th,
.evidence-table thead th,
.odds-detail-table thead th,
.odds-popup-table thead th {
  color: #b7c8db;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 1.2rem;
}

.expand-btn {
  border: 2px dashed #61778f;
  background: #111821;
  color: #d7e5f7;
  border-radius: 10px;
}

.expand-btn:hover {
  border-color: #89aac7;
  background: #1c2631;
}

.evidence-row td {
  background: #121a23;
}

.best-odd {
  border: 2px dashed #e3b45f;
  background: #2a2418;
  color: #ffd58d;
}

.live-badge {
  background: #d84f43;
}

.live-meta {
  color: #ffb2aa;
}

.live-score {
  color: #ffd0ca;
}

.live-row td:nth-child(n + 3):nth-child(-n + 6) {
  background: #2a2120 !important;
}

.settled-win-row td:nth-child(n + 3):nth-child(-n + 6) {
  background: inherit;
}

.settled-loss-row td:nth-child(n + 3):nth-child(-n + 6) {
  background: inherit;
}

.settled-mixed-row td:nth-child(n + 3):nth-child(-n + 6) {
  background: #1f2630;
}

.odds-popup {
  background: #131a22;
  border: 2px dashed #738ba2;
}

.pro-popup {
  background: #131a22;
  border: 1px solid #738ba2;
}

.odds-popup-title {
  color: #eff5ff;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
  text-align: center;
  font-style: normal !important;
  letter-spacing: 0 !important;
}

.pro-popup-title {
  color: #eff5ff;
  font-family: "Manrope", "Segoe UI", sans-serif;
  text-align: center;
  font-style: normal;
  letter-spacing: 0;
}

.pro-popup-table th,
.pro-popup-table td {
  border-color: #5e7389;
}

.pro-popup-table th {
  color: #b9ccdf;
}

.pro-popup-table td {
  color: #eff5ff;
}

.status-ok {
  color: #90f2b6;
  background: #113020;
  border-color: #3f8b60;
}

.status-nok {
  color: #ff9a9a;
  background: #3a1616;
  border-color: #8d4040;
}

.status-na {
  color: #c2ccda;
  background: #1d2530;
  border-color: #5f6e80;
}

/* Force Dark Look On Main Tables/Pages */
body {
  background: #0d1217 !important;
  color: #e8eef6 !important;
}

.container,
.hero,
.card,
.metric-card,
.data-table,
.evidence-table,
.odds-detail-table {
  color: #e8eef6;
}

.card,
.metric-card {
  background: linear-gradient(170deg, #171f29 0%, #141b24 100%) !important;
}

.data-table {
  border: 2px dashed #597087;
  border-radius: 14px;
  overflow: hidden;
  background: #131b25;
}

.data-table thead th {
  background: #1a2430;
  color: #c6d7ea !important;
}

.data-table tbody td {
  background: #15202a;
}

.evidence-row td,
.evidence-inner {
  background: #111a23 !important;
}

.evidence-table thead th,
.odds-detail-table thead th {
  background: #1a2530;
  color: #c4d7eb !important;
}

.evidence-table tbody td,
.odds-detail-table tbody td {
  background: #141f29;
}

.ok-row td {
  background: #1b2c24 !important;
}

.bad-row td {
  background: #2f1e23 !important;
}

.empty-row {
  color: #9fb2c7 !important;
}

/* Final Dark Override */
html,
body {
  background: #0c1117 !important;
  color: #e7eef8 !important;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
}

.page-bg {
  background:
    radial-gradient(circle at 9% 9%, #1f3347cc 0%, transparent 34%),
    radial-gradient(circle at 88% 88%, #3f2234b3 0%, transparent 36%),
    repeating-linear-gradient(
      -9deg,
      #0f141bcc 0px,
      #0f141bcc 22px,
      #0c1117cc 22px,
      #0c1117cc 45px
    ) !important;
}

.topbar {
  background: #0f1721f0 !important;
  border-bottom: 2px solid #63788f !important;
  box-shadow: 0 10px 24px #00000066 !important;
}

.brand-title {
  color: #f4f9ff !important;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
}

.nav a,
.nav-link-btn,
button.nav-icon-link {
  color: #dbe8f8 !important;
  border: 2px solid transparent !important;
  border-radius: 12px !important;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  padding: 6px 12px !important;
}

.nav a:hover,
.nav-link-btn:hover {
  border-color: #8eaac5 !important;
  background: #1b2430 !important;
}

.hero h1,
.hero h2 {
  color: #eef5ff !important;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
  letter-spacing: 0.02em !important;
}

.card h2 {
  color: #6aa9ff !important;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
  letter-spacing: 0.02em !important;
}

.hero p,
.table-note,
.metric-card span {
  color: #b4c4d8 !important;
}

.card,
.metric-card,
.auth-card {
  background: linear-gradient(170deg, #181f29 0%, #131b24 100%) !important;
  border: 2px solid #61778f !important;
  border-radius: 18px !important;
  box-shadow: 0 18px 44px #0000007a !important;
  overflow: hidden !important;
}

.btn-refresh {
  background: #65d4c7 !important;
  color: #0f151c !important;
  border: 2px solid #0f5f59 !important;
  border-radius: 12px !important;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
}

.data-table,
.evidence-table,
.odds-detail-table,
.odds-popup-table,
.odds-history-table {
  background: #000000 !important;
  color: #e7eef8 !important;
  border: 1px solid #5e7389 !important;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
  font-size: 1.02rem !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: 14px !important;
  overflow: hidden !important;
}

.data-table thead th,
.evidence-table thead th,
.odds-detail-table thead th,
.odds-popup-table thead th,
.odds-history-table thead th {
  background: #070b11 !important;
  color: #c9d8ea !important;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
  font-size: 1.08rem !important;
  font-weight: 700 !important;
}

.data-table tbody td,
.evidence-table tbody td,
.odds-detail-table tbody td,
.odds-popup-table tbody td,
.odds-history-table tbody td {
  background: #000000 !important;
}

.data-table th,
.data-table td,
.evidence-table th,
.evidence-table td,
.odds-detail-table th,
.odds-detail-table td,
.odds-popup-table th,
.odds-popup-table td,
.odds-history-table th,
.odds-history-table td {
  border: 0 !important;
  border-right: 1px solid rgba(226, 236, 248, 0.28) !important;
  border-bottom: 1px solid rgba(226, 236, 248, 0.28) !important;
}

.data-table tr > *:last-child,
.evidence-table tr > *:last-child,
.odds-detail-table tr > *:last-child,
.odds-popup-table tr > *:last-child,
.odds-history-table tr > *:last-child {
  border-right: 0 !important;
}

.data-table tbody tr:last-child td,
.evidence-table tbody tr:last-child td,
.odds-detail-table tbody tr:last-child td,
.odds-popup-table tbody tr:last-child td,
.odds-history-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

.data-table th.table-hover-row-cell,
.data-table td.table-hover-row-cell,
.evidence-table th.table-hover-row-cell,
.evidence-table td.table-hover-row-cell,
.odds-detail-table th.table-hover-row-cell,
.odds-detail-table td.table-hover-row-cell,
.odds-popup-table th.table-hover-row-cell,
.odds-popup-table td.table-hover-row-cell,
.odds-history-table th.table-hover-row-cell,
.odds-history-table td.table-hover-row-cell {
  background: rgba(151, 232, 170, 0.18) !important;
}

.data-table th.table-hover-col,
.data-table td.table-hover-col,
.evidence-table th.table-hover-col,
.evidence-table td.table-hover-col,
.odds-detail-table th.table-hover-col,
.odds-detail-table td.table-hover-col,
.odds-popup-table th.table-hover-col,
.odds-popup-table td.table-hover-col,
.odds-history-table th.table-hover-col,
.odds-history-table td.table-hover-col {
  background: rgba(151, 232, 170, 0.18) !important;
}

.data-table th.table-hover-col.table-hover-row-cell,
.data-table td.table-hover-col.table-hover-row-cell,
.evidence-table th.table-hover-col.table-hover-row-cell,
.evidence-table td.table-hover-col.table-hover-row-cell,
.odds-detail-table th.table-hover-col.table-hover-row-cell,
.odds-detail-table td.table-hover-col.table-hover-row-cell,
.odds-popup-table th.table-hover-col.table-hover-row-cell,
.odds-popup-table td.table-hover-col.table-hover-row-cell,
.odds-history-table th.table-hover-col.table-hover-row-cell,
.odds-history-table td.table-hover-col.table-hover-row-cell {
  background: rgba(151, 232, 170, 0.3) !important;
}

.data-table th.table-hover-focus,
.data-table td.table-hover-focus,
.evidence-table th.table-hover-focus,
.evidence-table td.table-hover-focus,
.odds-detail-table th.table-hover-focus,
.odds-detail-table td.table-hover-focus,
.odds-popup-table th.table-hover-focus,
.odds-popup-table td.table-hover-focus,
.odds-history-table th.table-hover-focus,
.odds-history-table td.table-hover-focus {
  box-shadow: inset 0 0 0 2px rgba(171, 245, 188, 0.92) !important;
}

.table-wrap {
  position: relative;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  max-height: none !important;
  scrollbar-gutter: stable both-edges;
  scrollbar-width: auto;
  scrollbar-color: #5f7388 #0f1620;
  border-radius: 14px !important;
  -webkit-overflow-scrolling: touch !important;
}

.table-wrap::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: #5f7388;
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
  min-height: 40px;
}

.table-wrap::-webkit-scrollbar-track {
  background: #0f1620;
}

.table-wrap > .data-table {
  width: max-content !important;
  min-width: max-content !important;
  table-layout: auto !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  overflow: visible !important;
}

.table-wrap > .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 20;
}

.table-sticky-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  display: none;
  overflow: hidden;
  pointer-events: none;
  z-index: 260;
}

.table-sticky-layer .table-sticky-clone {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.table-sticky-layer .table-sticky-clone thead th {
  box-shadow: 0 1px 0 rgba(226, 236, 248, 0.28);
}

.table-floating-scroll {
  position: fixed;
  bottom: 8px;
  left: 8px;
  width: 0;
  height: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  display: none;
  z-index: 320;
  border: 1px solid rgba(152, 178, 203, 0.65);
  border-radius: 999px;
  background: rgba(14, 21, 31, 0.92);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.28);
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.table-floating-scroll.is-visible {
  display: block;
}

.table-floating-scroll-inner {
  height: 1px;
}

.table-floating-scroll::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

.table-floating-scroll::-webkit-scrollbar-thumb {
  background: #5f7388;
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
  min-height: 40px;
}

.table-floating-scroll::-webkit-scrollbar-track {
  background: #0f1620;
  border-radius: 999px;
}

.container {
  width: 100% !important;
  max-width: 100% !important;
  margin: 18px 0 36px !important;
  padding: 0 20px !important;
}

.card {
  width: 100% !important;
}

/* Filters collapse header */
.filters-collapse-header {
  display: flex;
  align-items: center;
}
.filters-collapse-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #8ca8c0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s;
}
.filters-collapse-btn:hover { color: #d0dde8; }
.filters-collapse-chevron {
  transition: transform 0.2s ease;
}
.filters-collapse-btn[aria-expanded="false"] .filters-collapse-chevron {
  transform: rotate(-90deg);
}
.filters-card.is-collapsed .filters-form {
  display: none;
}
.filters-card.is-collapsed .filters-split {
  display: none;
}
.filters-card.is-collapsed .column-toggle-box {
  margin-top: 0;
}

.filters-form {
  display: block;
}

.filters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 10px 12px;
  align-items: stretch;
}

/* Sub-card shared style */
.filter-subcard {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(152, 178, 203, 0.1);
  border-radius: 8px;
  padding: 8px 10px 10px;
}

.filter-subcard-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6d8ba3;
  margin-bottom: 8px;
}

.filter-subcard-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: start;
}

/* Grid placement – 2-column layout */
.filter-subcard-stats {
  grid-column: 1;
  grid-row: 1;
}

.filter-subcard-pct {
  grid-column: 2;
  grid-row: 1;
}

.filter-subcard-odds {
  grid-column: 1;
  grid-row: 2;
}

.filter-subcard-ht-odds {
  grid-column: 2;
  grid-row: 2;
}

.filter-subcard-analysis {
  grid-column: 1 / -1;
  grid-row: 3;
}

.filter-subcard-analysis .filter-subcard-items {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ---- Filter Tabs ---- */
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.filter-tab-btn {
  border: 1px solid #5e7389;
  border-radius: 10px;
  background: #132030;
  color: #d8e7f9;
  padding: 7px 12px;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.filter-tab-btn:hover {
  filter: brightness(1.07);
}

.filter-tab-btn.is-active {
  background: #1f7c45;
  border-color: #2f9b5b;
  color: #ecfff3;
}

.filter-tab-panel[hidden] {
  display: none !important;
}

.filter-tab-panel .filter-subcard {
  grid-column: auto;
  grid-row: auto;
}

/* ---- Filter Split Layout ---- */
.filters-split {
  display: flex;
  gap: 16px;
  align-items: stretch;
}
.filters-split-left {
  flex: 1 1 50%;
  min-width: 0;
}
.filters-split-right {
  flex: 1 1 50%;
  min-width: 0;
}

/* ---- Active Filters Summary ---- */
.filter-summary {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(152, 178, 203, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  height: 100%;
  overflow-y: auto;
  max-height: 400px;
}
.filter-summary-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6d8ba3;
  margin-bottom: 10px;
}
.filter-summary-empty {
  color: #5a7a8a;
  font-size: 0.82rem;
  font-style: italic;
  margin: 0;
}
.filter-summary-group {
  margin-bottom: 10px;
}
.filter-summary-group:last-child {
  margin-bottom: 0;
}
.filter-summary-group-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: #65d4c7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(101, 212, 199, 0.15);
}
.filter-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 3px 0;
  font-size: 0.8rem;
}
.filter-summary-item-name {
  color: #c9d7e8;
  font-weight: 600;
}
.filter-summary-item-value {
  color: #65d4c7;
  font-weight: 700;
  font-size: 0.78rem;
  white-space: nowrap;
  margin-left: 8px;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 104px;
}

.filter-item-slider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label value"
    "control control";
  column-gap: 10px;
  row-gap: 4px;
  align-items: end;
  min-width: 0;
  max-width: none;
  width: 100%;
  padding: 5px 7px;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.filter-item-slider.filter-active {
  background-color: rgba(101, 212, 199, 0.1);
}

.filter-item > span {
  color: #c9d7e8;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.filter-hits-check {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: #65d4c7;
  cursor: pointer;
  flex-shrink: 0;
}

.hm-am-exact-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  color: #8a9bb0;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.hm-am-exact-label input {
  width: 12px;
  height: 12px;
  margin: 0;
  accent-color: #dbb540;
  cursor: pointer;
}

.filter-item-slider > span {
  grid-area: label;
}

.filter-slider-control {
  grid-area: control;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
}
.filter-slider-control-exact {
  grid-template-columns: 28px minmax(0, 1fr) 28px auto;
}

.filter-slider-control-dual {
  grid-template-columns: 28px 28px minmax(0, 1fr) 28px 28px;
  gap: 4px;
}

.filter-slider-control-dual.filter-slider-control-exact {
  grid-template-columns: 28px 28px minmax(0, 1fr) 28px 28px auto;
}

.filter-dual-range {
  position: relative;
  height: 24px;
  --min-pct: 0%;
  --max-pct: 100%;
}

.filter-dual-range::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 8px;
  border-radius: 999px;
  border: 1px solid #7a7a7a;
  background: #4a4a4a;
  transform: translateY(-50%);
  z-index: 1;
}

.filter-dual-range::after {
  content: "";
  position: absolute;
  top: 50%;
  left: var(--min-pct);
  width: calc(var(--max-pct) - var(--min-pct));
  height: 8px;
  border-radius: 999px;
  background: #65d4c7;
  transform: translateY(-50%);
  z-index: 2;
}

.filter-dual-range .filter-range {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 24px;
  margin: 0;
  background: transparent;
  pointer-events: none;
  z-index: 3;
}

.filter-dual-range .filter-range::-webkit-slider-runnable-track {
  height: 8px;
  background: transparent;
  border: none;
}

.filter-dual-range .filter-range::-moz-range-track {
  height: 8px;
  background: transparent;
  border: none;
}

.filter-dual-range .filter-range::-moz-range-progress {
  background: transparent;
}

.filter-dual-range .filter-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -4px;
  border-radius: 999px;
  border: 2px solid #65d4c7;
  background: #65d4c7;
  box-shadow: 0 0 0 1px #22374c;
  pointer-events: auto;
}

.filter-dual-range .filter-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid #65d4c7;
  background: #65d4c7;
  box-shadow: 0 0 0 1px #22374c;
  pointer-events: auto;
}

/* z-index for all dual-range thumb overlaps (min below max) */
.js-pro-range-min,
.js-bal-range-min,
.js-hs-range-min,
.js-hc-range-min,
.js-as-range-min,
.js-ac-range-min,
.js-btts-range-min,
.js-o25-range-min,
.js-o15-range-min,
.js-hto05pct-range-min,
.js-hto15pct-range-min,
.js-sho05pct-range-min,
.js-sho15pct-range-min,
.js-gg-best-range-min,
.js-ng-best-range-min,
.js-one-best-range-min,
.js-draw-best-range-min,
.js-two-best-range-min,
.js-o25-best-range-min,
.js-o15-best-range-min,
.js-hto05-best-range-min,
.js-hto15-best-range-min {
  z-index: 4;
}

.js-pro-range-max,
.js-bal-range-max,
.js-hs-range-max,
.js-hc-range-max,
.js-as-range-max,
.js-ac-range-max,
.js-btts-range-max,
.js-o25-range-max,
.js-o15-range-max,
.js-hto05pct-range-max,
.js-hto15pct-range-max,
.js-sho05pct-range-max,
.js-sho15pct-range-max,
.js-gg-best-range-max,
.js-ng-best-range-max,
.js-one-best-range-max,
.js-draw-best-range-max,
.js-two-best-range-max,
.js-o25-best-range-max,
.js-o15-best-range-max,
.js-hto05-best-range-max,
.js-hto15-best-range-max {
  z-index: 5;
}

.filter-step-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #60788f;
  border-radius: 8px;
  background: #0b1117;
  color: #dbe8f8;
  font-family: "IBM Plex Mono", monospace;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.filter-step-btn:hover {
  border-color: #84abc8;
  background: #15212f;
}

.filter-slider-value {
  grid-area: value;
  justify-self: end;
  text-align: right;
  color: #d8e7f9;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.1;
}

.filter-subtitle {
  margin-top: 2px;
  color: #c9d7e8;
  font-size: 0.84rem;
  font-weight: 700;
}

.filter-hit-slider {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(180px, 300px) auto;
  grid-template-areas:
    "label label"
    "range value";
  justify-content: start;
  align-items: center;
  gap: 6px 10px;
}

.filter-hit-slider > span {
  grid-area: label;
  color: #c9d7e8;
  font-size: 0.85rem;
  font-weight: 700;
}

.filter-hit-slider > .filter-range {
  grid-area: range;
  max-width: 300px;
}

.filter-hit-slider > strong {
  grid-area: value;
  color: #e6eef7;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  min-width: 20px;
  text-align: left;
}

.filter-range {
  width: 100%;
  accent-color: #65d4c7;
}

.filter-select {
  height: 34px;
  border: 1px solid #60788f;
  border-radius: 8px;
  background: #0b1117;
  color: #e6eef7;
  padding: 0 8px;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.9rem;
}

.filter-select:focus {
  outline: none;
  border-color: #84abc8;
}

.filter-input {
  height: 34px;
  border: 1px solid #60788f;
  border-radius: 8px;
  background: #0b1117;
  color: #e6eef7;
  padding: 0 8px;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.9rem;
}

.filter-input:focus {
  outline: none;
  border-color: #84abc8;
}

.filter-search-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-search-label {
  color: #c9d7e8;
  font-size: 0.85rem;
  font-weight: 700;
  min-width: 52px;
}

.filter-search-row .filter-input {
  flex: 1 1 320px;
  min-width: 220px;
  max-width: 620px;
}

.search-standalone {
  margin: 10px 0;
  display: flex;
}

.search-standalone .filter-input {
  flex: 1;
  max-width: 100%;
}

.search-inline {
  margin-top: 8px;
}

.search-inline .filter-input {
  width: 100%;
}

.data-table .col-league,
.data-table .cell-league {
  min-width: max-content !important;
  width: auto !important;
  max-width: none !important;
  font-size: 0.92rem !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.data-table .col-match,
.data-table .cell-match {
  min-width: max-content !important;
  width: auto !important;
  max-width: none !important;
  font-size: 0.92rem !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.data-table .col-odds,
.data-table .cell-odds {
  min-width: max-content !important;
  width: auto !important;
  max-width: none !important;
  white-space: nowrap !important;
}

.data-table .cell-odds .odds-cell-wrap {
  min-width: 0 !important;
  width: auto !important;
  gap: 6px !important;
}

.data-table .cell-odds .odds-count {
  font-size: 0.92rem !important;
}

.settled-meta {
  margin-top: 2px;
  color: #c3d2e4;
  font-size: 0.76rem;
  font-family: "IBM Plex Mono", monospace;
}

.settled-score {
  margin-top: 2px;
  color: #edf6ff;
  font-weight: 700;
  font-size: 0.95rem;
}

.result-inline {
  display: inline-block;
  white-space: nowrap !important;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.2;
}

.live-col .result-inline {
  font-size: 0.74rem !important;
}

.result-live {
  color: #ffd0ca;
  font-weight: 700;
}

.result-new {
  color: #1f3324;
  background: #7df0b1;
  border: 1px solid #3ebf80;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 800;
}

.result-settled {
  color: #d6e5f7;
  font-weight: 600;
}

.result-ago {
  color: #8a9bae;
  font-size: 0.85em;
}

/* ── Anonymous banner ── */
.anon-banner {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 12px;
  font-size: 0.9em;
  color: #e2e8f0;
  text-align: center;
}
.anon-banner a {
  color: #f59e0b;
  font-weight: 600;
  text-decoration: underline;
}
.anon-banner a:hover {
  color: #fbbf24;
}
html.light-mode .anon-banner {
  background: rgba(245, 158, 11, 0.10);
  border-color: rgba(245, 158, 11, 0.40);
  color: #334155;
}
html.light-mode .anon-banner a {
  color: #d97706;
}

/* ── Upgrade/pricing popup ── */
.upgrade-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  display: none;
}
.upgrade-modal-backdrop:not([hidden]) {
  display: flex;
}
.upgrade-modal {
  background: #1a2332;
  border: 1px solid #2a3a4e;
  border-radius: 12px;
  padding: 16px 20px;
  max-width: 560px;
  width: 94%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-height: 90vh;
  overflow-y: auto;
}
.upgrade-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: #8a9bae;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  z-index: 1;
}
.upgrade-modal-close:hover { color: #fff; }
.upgrade-modal-body { }

/* ── Compact pricing inside popup ── */
.pp-pricing { text-align: center; }
.pp-toggle { margin-bottom: 14px !important; max-width: 260px !important; }
.pp-toggle .pricing-toggle-btn { padding: 6px 12px; font-size: 0.8rem; }
.pp-toggle .pricing-save-badge { font-size: 0.65rem; padding: 1px 6px; }
.pp-pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}
.pp-plan-card {
  background: #15202d;
  border: 1px solid #3e5569;
  border-radius: 10px;
  padding: 14px 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  position: relative;
}
.pp-plan-card-pro {
  border-color: var(--accent);
}
.pp-plan-active { box-shadow: 0 0 0 2px var(--accent); }
.pp-popular {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.pp-plan-name {
  font-size: 0.85rem;
  margin: 0 0 4px;
  font-weight: 700;
}
.pp-plan-price {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 2px;
}
.pp-plan-curr { font-size: 0.65rem; font-weight: 600; opacity: 0.6; margin-left: 2px; }
.pp-plan-period { font-size: 0.72rem; opacity: 0.6; margin-bottom: 8px; }
.pp-plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  flex: 1;
}
.pp-plan-features li {
  padding: 2px 0 2px 14px;
  position: relative;
  font-size: 0.75rem;
  color: #c2d1e4;
  line-height: 1.4;
}
.pp-plan-features li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: #5bc7a0;
  font-weight: 700;
  font-size: 0.7rem;
}
.pp-feature-disabled {
  text-decoration: line-through;
  opacity: 0.35;
}
.pp-feature-disabled::before {
  content: "\2717" !important;
  color: #6a7a8a !important;
}
.pp-plan-cta-group { display: flex; flex-direction: column; gap: 5px; }
.pp-plan-cta-btn {
  width: 100%;
  text-align: center;
  padding: 7px 10px;
  font-weight: 700;
  font-size: 0.78rem;
}
.pp-paypal { background: #0070ba; border-color: #0070ba; }
.pp-paypal:hover { background: #005ea6; }
.pp-plan-cta-current {
  display: block;
  text-align: center;
  padding: 7px;
  background: #2d3e4e;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.75rem;
  color: #8aa4ba;
}
.pp-vat { font-size: 0.65rem; color: #8aa4ba; margin-top: 6px; }
@media (max-width: 500px) {
  .pp-pricing-grid { grid-template-columns: 1fr; }
}

body[data-theme="light"] .upgrade-modal {
  background: #fff;
  border-color: #d0d7de;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}
body[data-theme="light"] .upgrade-modal-close { color: #6b7d8e; }
body[data-theme="light"] .upgrade-modal-close:hover { color: #1a2332; }
body[data-theme="light"] .pp-plan-card { background: #f8fafc; border-color: #d2dce6; }
body[data-theme="light"] .pp-plan-features li { color: #4a5a6a; }
body[data-theme="light"] .pp-plan-cta-current { background: #e8eef4; color: #5a6a7a; }

/* Locked tab styling */
.matches-tab-btn[data-locked] {
  opacity: 0.5;
  cursor: pointer !important;
}
.matches-tab-btn[data-locked]:hover {
  opacity: 0.7;
}

/* Locked toolbar button styling */
.column-toggle-actions [data-locked] {
  opacity: 0.55;
  cursor: pointer !important;
}
.column-toggle-actions [data-locked]:hover {
  opacity: 0.75;
}

.data-table tr.live-row td:nth-child(n + 3):nth-child(-n + 6) {
  background: #2a2120 !important;
}

.data-table tr.settled-win-row td:nth-child(n + 3):nth-child(-n + 6) {
  background: #000000 !important;
}

.data-table tr.settled-loss-row td:nth-child(n + 3):nth-child(-n + 6) {
  background: #000000 !important;
}

.data-table tr.settled-mixed-row td:nth-child(n + 3):nth-child(-n + 6) {
  background: #202d3a !important;
}

.data-table tr.pending-row td:nth-child(n + 3):nth-child(-n + 6) {
  background: #2d2619 !important;
}

.evidence-row td,
.evidence-inner {
  background: #000000 !important;
}

.expand-btn {
  border: 2px solid #657c93 !important;
  background: #101822 !important;
  color: #dbe8f8 !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 9px !important;
  font-size: 0.92rem !important;
  line-height: 1 !important;
  padding: 0 !important;
}

.expand-btn:hover {
  border-color: #90afcb !important;
  background: #1b2530 !important;
}

.auth-label {
  color: #dce8f7 !important;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
  font-size: 1.35rem !important;
}

.auth-input {
  background: #0f151d !important;
  border: 2px solid #6a829b !important;
  color: #e8eff9 !important;
}

.auth-input:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: #8bb1ce !important;
}

.refresh-log,
.log-view,
.odds-popup {
  background: #0f151d !important;
  border: 2px solid #4d657d !important;
  color: #cae4fb !important;
}

.brand-logo,
.auth-logo,
.best-odd {
  border-style: solid !important;
}

.column-toggle-box {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(170, 188, 208, 0.28);
}

.column-toggle-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 10px 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.ui-template-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  margin: 0;
}

.ui-template-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 220px;
}

.ui-template-field > span {
  color: #c9d7e8;
  font-size: 0.84rem;
  font-weight: 700;
}

.ui-template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ui-template-controls .filter-select {
  min-width: 220px;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
  font-size: 0.9rem !important;
  font-style: normal !important;
  letter-spacing: 0 !important;
}

.ui-template-actions .btn-control {
  min-width: 136px;
  padding: 6px 12px !important;
  border-radius: 10px !important;
  font-size: 0.9rem !important;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
  font-style: normal !important;
  letter-spacing: 0 !important;
  line-height: 1.2 !important;
}

.ui-template-actions .btn-control.js-ui-template-rename,
.ui-template-actions .btn-control.js-ui-template-delete {
  min-width: auto;
  padding: 6px 10px !important;
  font-size: 1rem !important;
  line-height: 1 !important;
  text-align: center !important;
  white-space: nowrap;
}

.ui-template-status {
  margin: 0;
  min-height: 1.1em;
  color: #cddbec;
  font-size: 0.82rem;
  align-self: center;
}

.ui-template-status.is-ok {
  color: #78d8a5;
}

.ui-template-status.is-error {
  color: #ff9f9f;
}

.column-toggle-title {
  display: inline-block;
  margin-bottom: 8px;
  color: #d2deed;
  font-size: 0.9rem;
  font-weight: 700;
}

.column-toggle-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.columns-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1185;
  background: rgba(2, 7, 12, 0.76);
  display: grid;
  place-items: center;
  padding: 18px;
}

.columns-modal-backdrop[hidden] {
  display: none !important;
}

.columns-modal {
  width: min(760px, 96vw);
  max-height: 92vh;
  overflow: auto;
  border: 2px solid #4f657d;
  border-radius: 14px;
  background: #101924;
  box-shadow: 0 16px 42px #00000088;
  padding: 14px;
}

.columns-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.columns-modal-head h3 {
  margin: 0;
  color: #dce8f7;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.columns-modal-close {
  border: 1px solid #60788f;
  border-radius: 8px;
  background: #0b1117;
  color: #dbe8f8;
  width: 30px;
  height: 30px;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}

.columns-modal-close:hover {
  border-color: #84abc8;
  background: #15212f;
}

.columns-modal .column-toggle-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 4px 10px;
  max-height: 72vh;
  overflow: auto;
  padding-right: 4px;
}

.columns-modal-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.column-toggle-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #dce7f5;
  font-size: 0.85rem;
  user-select: none;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}

.column-toggle-item[draggable="true"] {
  cursor: grab;
}

.column-toggle-item[draggable="true"]:hover {
  background: rgba(100, 160, 220, 0.1);
  border-color: rgba(100, 160, 220, 0.25);
}

.column-toggle-item.is-fixed {
  opacity: 0.55;
}

.column-toggle-item.is-dragging {
  opacity: 0.35;
}

.column-toggle-item.drag-over-top {
  border-top: 2px solid #6bd3c6;
}

.column-toggle-item.drag-over-bottom {
  border-bottom: 2px solid #6bd3c6;
}

.col-drag-handle {
  font-size: 1.1rem;
  line-height: 1;
  color: #6e8aa0;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}

.col-toggle-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-toggle-item input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: #6bd3c6;
  flex-shrink: 0;
}

/* --- Leagues modal --- */
.leagues-modal {
  width: min(520px, 96vw);
}
.leagues-modal-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.leagues-modal-toolbar .filter-input {
  flex: 1;
  min-width: 0;
}
.leagues-modal-tree {
  max-height: 56vh;
  overflow-y: auto;
  padding-right: 4px;
}
.league-country-group {
  margin-bottom: 2px;
}
.league-country-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  color: #dce7f5;
  user-select: none;
}
.league-country-header:hover {
  background: rgba(100, 160, 220, 0.1);
}
.league-country-toggle {
  font-size: 0.7rem;
  width: 14px;
  text-align: center;
  transition: transform 0.15s;
  flex-shrink: 0;
}
.league-country-toggle[aria-expanded="false"] {
  transform: rotate(-90deg);
}
.league-country-checkbox {
  width: 14px;
  height: 14px;
  accent-color: #6bd3c6;
  flex-shrink: 0;
}
.league-country-children {
  padding-left: 28px;
}
.league-country-children[hidden] {
  display: none;
}
.league-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #c0d0e4;
  user-select: none;
}
.league-item:hover {
  background: rgba(100, 160, 220, 0.08);
}
.league-checkbox {
  width: 14px;
  height: 14px;
  accent-color: #6bd3c6;
  flex-shrink: 0;
}
.leagues-count {
  font-size: 0.82rem;
  color: #8aa0b8;
  margin-right: auto;
}
.league-top-group {
  margin-bottom: 0;
}
.league-top-header {
  font-weight: 700;
}
.league-top-name {
  color: #dbb540;
}
.league-top-separator {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 6px 0 4px;
}
/* --- /Leagues modal --- */

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

.matches-tab-btn {
  border: 1px solid #5e7389;
  border-radius: 10px;
  background: #132030;
  color: #d8e7f9;
  padding: 7px 12px;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.matches-tab-btn:hover {
  filter: brightness(1.07);
}

.matches-tab-btn.is-active {
  background: #1f7c45;
  border-color: #2f9b5b;
  color: #ecfff3;
}

.matches-tab-btn.is-disabled,
.matches-tab-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none !important;
}

.matches-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ffffff1f;
  color: inherit;
  font-size: 0.78rem;
  line-height: 1;
}

.matches-tab-panel[hidden] {
  display: none !important;
}

/* Match Calendar */
.card:has(.match-calendar-wrap) {
  overflow: visible !important;
}
.match-calendar-wrap {
  position: relative;
}
.match-calendar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid #5e7389;
  background: transparent;
  color: #8a9bb0;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.match-calendar-toggle:hover { border-color: #4fc882; background: #1a3040; color: #e0e8f0; }
.match-calendar-toggle.is-active { border-color: #2f9b5b; background: #1f7c45; color: #fff; }
.match-calendar {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #0e1a28;
  border: 1px solid #2a3a4a;
  width: 310px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.match-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.match-calendar-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #c8d8e8;
}
.match-calendar-nav {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 1px solid #3a4f60;
  background: transparent;
  color: #8a9bb0;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.match-calendar-nav:hover { border-color: #4fc882; background: #1a3040; color: #e0e8f0; }
.match-calendar-nav:disabled { opacity: 0.3; cursor: default; }
.match-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.match-calendar-weekdays span {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #5e7389;
  padding: 2px 0;
}
.match-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.match-calendar-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 3px 2px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #c8d8e8;
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.match-calendar-day.is-empty {
  cursor: default;
  pointer-events: none;
}
.match-calendar-day:not(.is-empty):not(.is-future):not(.is-no-data):hover {
  background: #1a3040;
  border-color: #4fc882;
}
.match-calendar-day.is-today {
  border-color: #4fc882;
  font-weight: 700;
}
.match-calendar-day.is-selected {
  background: #1f7c45;
  border-color: #2f9b5b;
  color: #fff;
}
.match-calendar-day.is-selected .cal-day-count {
  color: #c0ffd8;
}
.match-calendar-day.is-future {
  opacity: 0.2;
  cursor: default;
}
.match-calendar-day.is-no-data {
  opacity: 0.25;
  cursor: default;
}
.match-calendar-day:disabled {
  cursor: default;
  pointer-events: none;
}
.cal-day-num {
  line-height: 1;
}
.cal-day-count {
  font-size: 0.6rem;
  font-weight: 800;
  color: #4fc882;
  line-height: 1;
  margin-top: 1px;
}

/* Calendar light theme */
body[data-theme="light"] .match-calendar-toggle {
  background: transparent;
  border-color: #c8c0b0;
  color: #7a6e5c;
}
body[data-theme="light"] .match-calendar-toggle:hover {
  border-color: #3a9a55;
  background: #e5dfd4;
}
body[data-theme="light"] .match-calendar-toggle.is-active {
  background: #2a8a4a;
  border-color: #2a8a4a;
  color: #fff;
}
body[data-theme="light"] .match-calendar {
  background: #f0ebe2;
  border-color: #d0c9b8;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
body[data-theme="light"] .match-calendar-title { color: #3a3226; }
body[data-theme="light"] .match-calendar-nav {
  border-color: #c8c0b0;
  color: #7a6e5c;
}
body[data-theme="light"] .match-calendar-nav:hover {
  border-color: #3a9a55;
  background: #e5dfd4;
}
body[data-theme="light"] .match-calendar-weekdays span { color: #9a8e7c; }
body[data-theme="light"] .match-calendar-day { color: #3a3226; }
body[data-theme="light"] .match-calendar-day:not(.is-empty):not(.is-future):not(.is-no-data):hover {
  background: #e5dfd4;
  border-color: #3a9a55;
}
body[data-theme="light"] .match-calendar-day.is-today { border-color: #3a9a55; }
body[data-theme="light"] .match-calendar-day.is-selected {
  background: #2a8a4a;
  border-color: #2a8a4a;
  color: #fff;
}
body[data-theme="light"] .cal-day-count { color: #1a7a3a; }
body[data-theme="light"] .match-calendar-day.is-selected .cal-day-count { color: #c0ffd8; }

/* --- Filter Help Icons --- */
.filter-help-btn {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  padding: 0;
  border: 1px solid #3a4f60;
  background: transparent;
  color: #5e7389;
  cursor: pointer;
  margin-left: 3px;
  vertical-align: middle;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  font-family: inherit;
}
.filter-help-btn:hover {
  background: #1a3040;
  color: #c8d8e8;
  border-color: #4fc882;
}
.filter-help-tooltip {
  position: absolute;
  z-index: 10000;
  max-width: 280px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #1a2a3a;
  border: 1px solid #3a4f60;
  color: #c8d8e8;
  font-size: 0.78rem;
  line-height: 1.45;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  pointer-events: none;
  animation: filterHelpFadeIn 0.12s ease;
}
@keyframes filterHelpFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Help icons light theme */
body[data-theme="light"] .filter-help-btn {
  border-color: #c8c0b0;
  color: #9a8e7c;
}
body[data-theme="light"] .filter-help-btn:hover {
  background: #e5dfd4;
  color: #3a3226;
  border-color: #3a9a55;
}
body[data-theme="light"] .filter-help-tooltip {
  background: #faf8f4;
  border-color: #d0c9b8;
  color: #3a3226;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.data-table td.pct-band-90 {
  background: #0d4d2c !important;
  color: #d9ffea !important;
}

.data-table td.pct-band-75 {
  background: #1f7a45 !important;
  color: #e5fff0 !important;
}

.data-table td.pct-band-60 {
  background: #8a5a1f !important;
  color: #fff0db !important;
}

.data-table td.pct-band-45 {
  background: #7a3b3b !important;
  color: #ffe9e9 !important;
}

.data-table td.pct-band-1 {
  background: #a61f1f !important;
  color: #fff2f2 !important;
}

/* Compact centered table layout */
.data-table,
.evidence-table,
.odds-detail-table,
.odds-popup-table,
.odds-history-table {
  font-size: 0.9rem !important;
}

.data-table thead th,
.evidence-table thead th,
.odds-detail-table thead th,
.odds-popup-table thead th,
.odds-history-table thead th {
  font-size: 0.92rem !important;
}

.data-table th,
.data-table td,
.evidence-table th,
.evidence-table td,
.odds-detail-table th,
.odds-detail-table td,
.odds-popup-table th,
.odds-popup-table td,
.odds-history-table th,
.odds-history-table td {
  text-align: center !important;
  vertical-align: middle !important;
  padding: 2px 6px !important;
  line-height: 1.05 !important;
}

.data-table .cell-odds .odds-count {
  font-size: 0.84rem !important;
}

/* Auto-size popup tables to real content width (no unnecessary wide columns) */
.evidence-inner .evidence-table,
.evidence-inner .odds-detail-table {
  width: max-content !important;
  min-width: max-content !important;
  table-layout: auto !important;
}

.evidence-inner .evidence-table th,
.evidence-inner .evidence-table td,
.evidence-inner .odds-detail-table th,
.evidence-inner .odds-detail-table td {
  white-space: nowrap !important;
}

/* Evidence separator between home / away */
.evidence-separator td {
  height: 2px !important;
  padding: 0 !important;
  background: linear-gradient(90deg, transparent, rgba(100,150,200,0.25) 15%, rgba(100,150,200,0.25) 85%, transparent) !important;
  border: none !important;
}

/* Evidence summary row */
.evidence-summary td {
  border-top: 1px solid rgba(100,150,200,0.18) !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}
.evidence-summary-label {
  font-weight: 700;
  font-size: 0.78rem;
  color: #8ea8be;
  text-align: right !important;
  padding-right: 10px !important;
  letter-spacing: 0.03em;
}
.evidence-summary .status-tag {
  font-weight: 700;
  font-size: 0.72rem;
  min-width: 40px;
  text-align: center;
}
/* status-warn: yellow/amber for 40-69% */
.status-warn {
  color: #c8a020;
  background: rgba(200,160,32,0.12);
  border-color: rgba(200,160,32,0.3);
}

body[data-theme="light"] .evidence-separator td {
  background: linear-gradient(90deg, transparent, rgba(60,80,100,0.18) 15%, rgba(60,80,100,0.18) 85%, transparent) !important;
}
body[data-theme="light"] .evidence-summary-label {
  color: #5a7a8e;
}
body[data-theme="light"] .status-warn {
  color: #9a7a10;
  background: rgba(180,140,20,0.1);
  border-color: rgba(180,140,20,0.25);
}

.column-toggle-actions {
  margin-bottom: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.column-toggle-actions .btn-control {
  min-width: 136px;
  padding: 6px 12px !important;
  border-radius: 10px !important;
  font-size: 0.9rem !important;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
  font-style: normal !important;
  letter-spacing: 0 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .ui-template-controls {
    margin-left: 0;
  }
}

.column-toggle-actions .btn-control:hover {
  transform: translateY(-1px);
}

.column-toggle-actions .btn-control[disabled],
.ui-template-controls .btn-control[disabled],
.ui-template-controls .filter-select[disabled],
.filters-form.is-public-preview button[disabled],
.filters-form.is-public-preview input[disabled],
.filters-form.is-public-preview select[disabled] {
  opacity: 0.58;
  cursor: not-allowed !important;
}

.filters-form.is-public-preview .filter-range {
  accent-color: #7a8a98;
}
/* Ensure filter help buttons remain interactive in public preview mode */
.filters-form.is-public-preview .filter-help-btn {
  pointer-events: auto !important;
  opacity: 1 !important;
  cursor: pointer !important;
}
/* Prevent filter labels from wrapping with longer translations */
.filter-item > span,
.filter-item-slider > span {
  white-space: nowrap;
}
.filter-subcard-title {
  white-space: nowrap;
}
.column-toggle-actions .btn-control {
  white-space: nowrap;
}

.locked-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px dashed #7b8a98;
  background: #121b26;
  color: #c6d3e0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
a.locked-pill:hover {
  border-color: var(--accent);
  background: #1a2a3a;
  color: #e2eaf2;
}

body[data-theme="light"] .locked-pill {
  border-color: #9caebe;
  background: #eef3f8;
  color: #3d5064;
}
body[data-theme="light"] a.locked-pill:hover {
  border-color: var(--accent);
  background: #dde8f2;
  color: #1e2d3d;
}

.column-toggle-actions .js-toggle-pct-colors[data-state="off"],
.column-toggle-actions .js-toggle-display-filters[data-state="off"] {
  background: #1b2734 !important;
  color: #f1d7df !important;
  border-color: #8e5a70 !important;
}

.column-toggle-actions .js-toggle-pct-colors[data-state="on"],
.column-toggle-actions .js-toggle-display-filters[data-state="on"] {
  background: #2b7d47 !important;
  color: #eaf9ef !important;
  border-color: #6fd18b !important;
}

.column-toggle-actions .js-open-pct-colors {
  background: #223243 !important;
  color: #d9e8fa !important;
  border-color: #5b7692 !important;
}

.js-toggle-pct-colors.is-active {
  color: #0f151c !important;
}

.pct-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(2, 7, 12, 0.78);
  display: grid;
  place-items: center;
  padding: 18px;
}

.pct-modal-backdrop[hidden] {
  display: none !important;
}

.pct-modal {
  width: min(760px, 96vw);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid #3d5771;
  border-radius: 14px;
  background: #0a111a;
  box-shadow: 0 18px 56px #000000b8;
  padding: 14px;
}

.pct-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.pct-modal-head h3 {
  margin: 0;
  font-size: 1rem;
  color: #d8e8fb;
}

.pct-modal-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.pct-modal-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 220px;
  color: #bfd3e8;
}

.pct-modal-field-wide {
  min-width: 320px;
  flex: 1;
}

.pct-modal-enabled {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #dbe9f9;
}

.pct-modal-inline {
  margin-bottom: 0;
  align-self: center;
}

.pct-range-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
}

.pct-range-table th,
.pct-range-table td {
  border: 1px solid #2f465f;
  padding: 6px 8px;
  text-align: center;
  color: #dbe9f8;
}

.pct-range-table th {
  background: #111f2f;
  font-size: 0.88rem;
}

.pct-modal-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.pct-modal-status {
  min-height: 20px;
  margin: 0;
  color: #bdd3e9;
  font-size: 0.86rem;
}

.pct-modal-status.is-error {
  color: #ff9e9e;
}

.pct-modal-status.is-ok {
  color: #98f2bc;
}

.data-table td.pct-user-dark-red {
  background: #5a0f0f !important;
  color: #ffe6e6 !important;
}

.data-table td.pct-user-red {
  background: #962626 !important;
  color: #ffe9e9 !important;
}

.data-table td.pct-user-orange {
  background: #9a5d1e !important;
  color: #fff2df !important;
}

.data-table td.pct-user-green {
  background: #1f7c45 !important;
  color: #e8fff2 !important;
}

.data-table td.pct-user-dark-green {
  background: #0f4f2d !important;
  color: #ddffe9 !important;
}

/* Light theme overrides (user selectable) */
body[data-theme="light"] {
  --bg: #f5f0e7;
  --ink: #12212b;
  --muted: #4a5f66;
  --card: #fffdf8;
  --line: #cfd8df;
  --accent: #0f6f78;
  --accent-2: #b4552e;
  --ok: #1f7a3f;
  --bad: #9f2f26;
  background: #f5f0e7 !important;
  color: #12212b !important;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
}

body[data-theme="light"] .page-bg {
  background:
    radial-gradient(circle at 12% 9%, #f1b5774d 0%, transparent 28%),
    radial-gradient(circle at 89% 90%, #3ca8af40 0%, transparent 31%),
    linear-gradient(125deg, #faf7f0 0%, #f5f0e7 45%, #f7f1e6 100%) !important;
}

body[data-theme="light"] .brand-title {
  color: #1a2a3a !important;
}

body[data-theme="light"] .brand-dot {
  color: #3090c0 !important;
  opacity: 0.8 !important;
}

body[data-theme="light"] .topbar {
  background: #fffaf2ed !important;
  border-bottom: 1px solid #c7d2dc !important;
  box-shadow: 0 8px 18px #00000014 !important;
}

body[data-theme="light"] .nav a,
body[data-theme="light"] .nav-link-btn {
  color: #0f6f78 !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
  font-size: 0.95rem !important;
  background: transparent !important;
}

body[data-theme="light"] .nav a:hover,
body[data-theme="light"] .nav-link-btn:hover {
  border-color: #0f6f78 !important;
  background: #edf6f7 !important;
}
body[data-theme="light"] .nav a.nav-bets-active {
  border: 1px solid rgba(160,128,32,0.3) !important;
  background: rgba(160,128,32,0.06) !important;
  color: #806818 !important;
}
body[data-theme="light"] .nav a.nav-bets-active:hover {
  background: rgba(160,128,32,0.12) !important;
  border-color: rgba(160,128,32,0.5) !important;
}

body[data-theme="light"] .theme-toggle {
  background: #ffffff !important;
  color: #184154 !important;
  border-color: #9ab7c8 !important;
}

body[data-theme="light"] .hero h1,
body[data-theme="light"] .hero h2 {
  color: #112126 !important;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
}

body[data-theme="light"] .card h2 {
  color: #1f68d6 !important;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
}

body[data-theme="light"] .hero p,
body[data-theme="light"] .table-note,
body[data-theme="light"] .metric-card span,
body[data-theme="light"] .column-toggle-title,
body[data-theme="light"] .column-toggle-item {
  color: #48616e !important;
}

body[data-theme="light"] .columns-modal {
  background: #ffffff !important;
  border: 1px solid #c8d5e1 !important;
  box-shadow: 0 16px 40px #0000002a !important;
}

body[data-theme="light"] .columns-modal-head h3,
body[data-theme="light"] .columns-modal .column-toggle-item {
  color: #274153 !important;
}

body[data-theme="light"] .columns-modal-close {
  background: #ffffff !important;
  border: 1px solid #b9c9d8 !important;
  color: #1f3442 !important;
}

body[data-theme="light"] .col-drag-handle {
  color: #8ba3b8 !important;
}

body[data-theme="light"] .column-toggle-item[draggable="true"]:hover {
  background: rgba(30, 100, 180, 0.08) !important;
  border-color: rgba(30, 100, 180, 0.2) !important;
}

body[data-theme="light"] .column-toggle-item.drag-over-top {
  border-top-color: #0f9688 !important;
}

body[data-theme="light"] .column-toggle-item.drag-over-bottom {
  border-bottom-color: #0f9688 !important;
}

body[data-theme="light"] .columns-modal-close:hover {
  background: #edf4fa !important;
  border-color: #9bb7cb !important;
}

body[data-theme="light"] .league-country-header {
  color: #274153 !important;
}
body[data-theme="light"] .league-country-header:hover {
  background: rgba(30, 100, 180, 0.07) !important;
}
body[data-theme="light"] .league-item {
  color: #48616e !important;
}
body[data-theme="light"] .league-item:hover {
  background: rgba(30, 100, 180, 0.05) !important;
}
body[data-theme="light"] .leagues-count {
  color: #6a8598 !important;
}
body[data-theme="light"] .league-top-name {
  color: #9a7010 !important;
}
body[data-theme="light"] .league-top-separator {
  background: rgba(0,0,0,0.10) !important;
}

body[data-theme="light"] .card,
body[data-theme="light"] .metric-card,
body[data-theme="light"] .auth-card {
  background: #fffdfa !important;
  border: 1px solid #d3dde5 !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 24px #00000012 !important;
}

body[data-theme="light"] .btn-refresh {
  background: #0f6f78 !important;
  color: #ffffff !important;
  border: 1px solid #0f6f78 !important;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
}

body[data-theme="light"] .btn-refresh:hover {
  filter: brightness(1.06);
  transform: none;
}

body[data-theme="light"] .refresh-log,
body[data-theme="light"] .log-view,
body[data-theme="light"] .odds-popup,
body[data-theme="light"] .pro-popup {
  background: #ffffff !important;
  border: 1px solid #cdd8e3 !important;
  color: #1f3442 !important;
}

body[data-theme="light"] .auth-label {
  color: #223744 !important;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
  font-size: 1rem !important;
}

body[data-theme="light"] .auth-input,
body[data-theme="light"] .filter-input,
body[data-theme="light"] .filter-select {
  background: #ffffff !important;
  color: #1f3442 !important;
  border: 1px solid #b9c9d8 !important;
}

body[data-theme="light"] .filter-step-btn {
  background: #ffffff !important;
  color: #1f3442 !important;
  border: 1px solid #b9c9d8 !important;
}

body[data-theme="light"] .filter-step-btn:hover {
  background: #edf4fa !important;
  border-color: #9bb7cb !important;
}

body[data-theme="light"] .filters-collapse-btn { color: #5a7080; }
body[data-theme="light"] .filters-collapse-btn:hover { color: #1f3442; }

body[data-theme="light"] .filters-form {
  color: #1f3442 !important;
}

body[data-theme="light"] .filter-item > span,
body[data-theme="light"] .filter-item-slider > span,
body[data-theme="light"] .filter-search-label {
  color: #2a4354 !important;
}

body[data-theme="light"] .filter-subtitle,
body[data-theme="light"] .filter-hit-slider > span {
  color: #48616e !important;
}

body[data-theme="light"] .filter-hit-slider > strong {
  color: #1f3442 !important;
}

body[data-theme="light"] .filter-tab-btn {
  background: #f7fbff;
  color: #2a4a60;
  border-color: #adc5d7;
}
body[data-theme="light"] .filter-tab-btn.is-active {
  background: #0f6f78;
  border-color: #0f6f78;
  color: #ffffff;
}

body[data-theme="light"] .filter-slider-value {
  color: #2a4354 !important;
}

body[data-theme="light"] .filter-item-slider.filter-active {
  background-color: rgba(40, 160, 145, 0.1);
}
body[data-theme="light"] .filter-summary {
  background: rgba(0, 0, 0, 0.02);
  border-color: #d0dce8;
}
body[data-theme="light"] .filter-summary-title {
  color: #4a6a80;
}
body[data-theme="light"] .filter-summary-empty {
  color: #7a8a9a;
}
body[data-theme="light"] .filter-summary-group-title {
  color: #28a091;
  border-bottom-color: rgba(40, 160, 145, 0.2);
}
body[data-theme="light"] .filter-summary-item-name {
  color: #2a4354;
}
body[data-theme="light"] .filter-summary-item-value {
  color: #28a091;
}

body[data-theme="light"] .filter-range {
  accent-color: #0f6f78;
}

body[data-theme="light"] .filter-dual-range::before {
  border-color: #afbfce;
  background: #d5dee8;
}

body[data-theme="light"] .filter-dual-range::after {
  background: #0f6f78;
}

body[data-theme="light"] .filter-dual-range .filter-range::-webkit-slider-thumb {
  border-color: #0f6f78;
  background: #0f6f78;
  box-shadow: 0 0 0 1px #c9d5e0;
}

body[data-theme="light"] .filter-dual-range .filter-range::-moz-range-thumb {
  border-color: #0f6f78;
  background: #0f6f78;
  box-shadow: 0 0 0 1px #c9d5e0;
}

body[data-theme="light"] .data-table,
body[data-theme="light"] .evidence-table,
body[data-theme="light"] .odds-detail-table,
body[data-theme="light"] .odds-popup-table,
body[data-theme="light"] .odds-history-table {
  background: #ffffff !important;
  color: #1d3341 !important;
  border: 1px solid #c8d5e2 !important;
}

body[data-theme="light"] .pro-popup-table {
  background: #ffffff !important;
  color: #1d3341 !important;
  border: 1px solid #c8d5e2 !important;
}

body[data-theme="light"] .data-table thead th,
body[data-theme="light"] .evidence-table thead th,
body[data-theme="light"] .odds-detail-table thead th,
body[data-theme="light"] .odds-popup-table thead th,
body[data-theme="light"] .odds-history-table thead th {
  background: #f3f7fb !important;
  color: #334b5d !important;
}

body[data-theme="light"] .data-table tbody td,
body[data-theme="light"] .evidence-table tbody td,
body[data-theme="light"] .odds-detail-table tbody td,
body[data-theme="light"] .odds-popup-table tbody td,
body[data-theme="light"] .odds-history-table tbody td,
body[data-theme="light"] .evidence-row td,
body[data-theme="light"] .evidence-inner {
  background: #ffffff !important;
}

body[data-theme="light"] .data-table th,
body[data-theme="light"] .data-table td,
body[data-theme="light"] .evidence-table th,
body[data-theme="light"] .evidence-table td,
body[data-theme="light"] .odds-detail-table th,
body[data-theme="light"] .odds-detail-table td,
body[data-theme="light"] .odds-popup-table th,
body[data-theme="light"] .odds-popup-table td,
body[data-theme="light"] .odds-history-table th,
body[data-theme="light"] .odds-history-table td {
  border-right: 1px solid rgba(72, 98, 117, 0.22) !important;
  border-bottom: 1px solid rgba(72, 98, 117, 0.22) !important;
}

body[data-theme="light"] .pro-popup-table th,
body[data-theme="light"] .pro-popup-table td {
  border: 1px solid rgba(72, 98, 117, 0.22) !important;
}

body[data-theme="light"] .pro-popup-table th {
  color: #48616e !important;
}

body[data-theme="light"] .data-table th.table-hover-row-cell,
body[data-theme="light"] .data-table td.table-hover-row-cell,
body[data-theme="light"] .evidence-table th.table-hover-row-cell,
body[data-theme="light"] .evidence-table td.table-hover-row-cell,
body[data-theme="light"] .odds-detail-table th.table-hover-row-cell,
body[data-theme="light"] .odds-detail-table td.table-hover-row-cell,
body[data-theme="light"] .odds-popup-table th.table-hover-row-cell,
body[data-theme="light"] .odds-popup-table td.table-hover-row-cell,
body[data-theme="light"] .odds-history-table th.table-hover-row-cell,
body[data-theme="light"] .odds-history-table td.table-hover-row-cell {
  background: rgba(135, 204, 140, 0.22) !important;
}

body[data-theme="light"] .data-table th.table-hover-col,
body[data-theme="light"] .data-table td.table-hover-col,
body[data-theme="light"] .evidence-table th.table-hover-col,
body[data-theme="light"] .evidence-table td.table-hover-col,
body[data-theme="light"] .odds-detail-table th.table-hover-col,
body[data-theme="light"] .odds-detail-table td.table-hover-col,
body[data-theme="light"] .odds-popup-table th.table-hover-col,
body[data-theme="light"] .odds-popup-table td.table-hover-col,
body[data-theme="light"] .odds-history-table th.table-hover-col,
body[data-theme="light"] .odds-history-table td.table-hover-col {
  background: rgba(135, 204, 140, 0.22) !important;
}

body[data-theme="light"] .data-table th.table-hover-col.table-hover-row-cell,
body[data-theme="light"] .data-table td.table-hover-col.table-hover-row-cell,
body[data-theme="light"] .evidence-table th.table-hover-col.table-hover-row-cell,
body[data-theme="light"] .evidence-table td.table-hover-col.table-hover-row-cell,
body[data-theme="light"] .odds-detail-table th.table-hover-col.table-hover-row-cell,
body[data-theme="light"] .odds-detail-table td.table-hover-col.table-hover-row-cell,
body[data-theme="light"] .odds-popup-table th.table-hover-col.table-hover-row-cell,
body[data-theme="light"] .odds-popup-table td.table-hover-col.table-hover-row-cell,
body[data-theme="light"] .odds-history-table th.table-hover-col.table-hover-row-cell,
body[data-theme="light"] .odds-history-table td.table-hover-col.table-hover-row-cell {
  background: rgba(135, 204, 140, 0.34) !important;
}

body[data-theme="light"] .data-table th.table-hover-focus,
body[data-theme="light"] .data-table td.table-hover-focus,
body[data-theme="light"] .evidence-table th.table-hover-focus,
body[data-theme="light"] .evidence-table td.table-hover-focus,
body[data-theme="light"] .odds-detail-table th.table-hover-focus,
body[data-theme="light"] .odds-detail-table td.table-hover-focus,
body[data-theme="light"] .odds-popup-table th.table-hover-focus,
body[data-theme="light"] .odds-popup-table td.table-hover-focus,
body[data-theme="light"] .odds-history-table th.table-hover-focus,
body[data-theme="light"] .odds-history-table td.table-hover-focus {
  box-shadow: inset 0 0 0 2px rgba(52, 126, 84, 0.92) !important;
}

body[data-theme="light"] .data-table tr.live-row td:nth-child(n + 3):nth-child(-n + 6) {
  background: #fff7e8 !important;
}

body[data-theme="light"] .data-table tr.settled-win-row td:nth-child(n + 3):nth-child(-n + 6) {
  background: #ffffff !important;
}

body[data-theme="light"] .data-table tr.settled-loss-row td:nth-child(n + 3):nth-child(-n + 6) {
  background: #ffffff !important;
}

body[data-theme="light"] .data-table tr.settled-mixed-row td:nth-child(n + 3):nth-child(-n + 6) {
  background: #edf3fa !important;
}

body[data-theme="light"] .data-table tr.pending-row td:nth-child(n + 3):nth-child(-n + 6) {
  background: #fff7e8 !important;
}

body[data-theme="light"] .expand-btn {
  border: 1px solid #b9cbd8 !important;
  background: #ffffff !important;
  color: #1f3544 !important;
}

body[data-theme="light"] .expand-btn:hover {
  border-color: #7fa8c3 !important;
  background: #f1f8fc !important;
}

body[data-theme="light"] .column-toggle-actions .js-toggle-pct-colors[data-state="off"],
body[data-theme="light"] .column-toggle-actions .js-toggle-display-filters[data-state="off"] {
  background: #fdf0f4 !important;
  color: #8c3b55 !important;
  border-color: #e2b3c3 !important;
}

body[data-theme="light"] .column-toggle-actions .js-toggle-pct-colors[data-state="on"],
body[data-theme="light"] .column-toggle-actions .js-toggle-display-filters[data-state="on"] {
  background: #2a8f53 !important;
  color: #ffffff !important;
  border-color: #2a8f53 !important;
}

body[data-theme="light"] .column-toggle-actions .js-open-pct-colors {
  background: #fffdfa !important;
  color: #2a4b61 !important;
  border-color: #abc3d5 !important;
}

body[data-theme="light"] .matches-tab-btn {
  background: #f7fbff;
  color: #2a4a60;
  border-color: #adc5d7;
}

body[data-theme="light"] .matches-tab-btn.is-active {
  background: #0f6f78;
  border-color: #0f6f78;
  color: #ffffff;
}

body[data-theme="light"] .matches-tab-count {
  background: #0000001a;
}

body[data-theme="light"] .table-wrap {
  scrollbar-color: #9db4c5 #eef3f8;
}

body[data-theme="light"] .table-wrap::-webkit-scrollbar-thumb {
  background: #9db4c5;
}

body[data-theme="light"] .table-wrap::-webkit-scrollbar-track {
  background: #eef3f8;
}

body[data-theme="light"] .table-wrap > .data-table thead th {
  box-shadow: 0 1px 0 #c8d5e2;
}

body[data-theme="light"] .table-floating-scroll {
  border-color: rgba(146, 173, 193, 0.9);
  background: rgba(244, 248, 252, 0.94);
  box-shadow: 0 4px 12px rgba(40, 61, 78, 0.16);
}

body[data-theme="light"] .table-floating-scroll::-webkit-scrollbar-thumb {
  background: #9db4c5;
}

body[data-theme="light"] .table-floating-scroll::-webkit-scrollbar-track {
  background: #eef3f8;
}

body[data-theme="light"] .pct-modal {
  background: #ffffff !important;
  border: 1px solid #c8d5e1 !important;
  box-shadow: 0 16px 40px #0000002a !important;
}

body[data-theme="light"] .pct-modal-head h3,
body[data-theme="light"] .pct-modal-field,
body[data-theme="light"] .pct-modal-enabled,
body[data-theme="light"] .pct-modal-status,
body[data-theme="light"] .pct-range-table th,
body[data-theme="light"] .pct-range-table td {
  color: #274153 !important;
}

body[data-theme="light"] .pct-range-table th {
  background: #f2f7fb !important;
}

body[data-theme="light"] .pct-range-table th,
body[data-theme="light"] .pct-range-table td {
  border-color: #c4d3de !important;
}

body[data-theme="light"] .live-col {
  color: #1f3442 !important;
}

body[data-theme="light"] .result-inline {
  font-size: 0.8rem !important;
  font-weight: 700 !important;
}

body[data-theme="light"] .result-live {
  color: #7a1f1f !important;
  background: #ffe6e2 !important;
  border: 1px solid #e2aca4 !important;
  border-radius: 999px;
  padding: 2px 6px;
}

body[data-theme="light"] .result-new {
  color: #0f3a1f !important;
  background: #8df7bf !important;
  border: 1px solid #56c58c !important;
  border-radius: 999px;
  padding: 2px 6px;
  font-weight: 800 !important;
}

body[data-theme="light"] .result-settled {
  color: #21465e !important;
  background: #e7f1fb !important;
  border: 1px solid #bdd1e3 !important;
  border-radius: 999px;
  padding: 2px 6px;
}

body[data-theme="light"] .result-ago {
  color: #6b7d8e;
}

body[data-theme="light"] .live-meta,
body[data-theme="light"] .settled-meta {
  color: #4f6778 !important;
}

body[data-theme="light"] .live-score,
body[data-theme="light"] .settled-score {
  color: #244659 !important;
}

/* Keep colored cells clearly visible in Light theme as in Dark theme */
body[data-theme="light"] .data-table td.pct-user-dark-red,
body[data-theme="light"] .data-table td.pct-band-1 {
  background: #5a0f0f !important;
  color: #ffe6e6 !important;
}

body[data-theme="light"] .data-table td.pct-user-red,
body[data-theme="light"] .data-table td.pct-band-45 {
  background: #962626 !important;
  color: #ffe9e9 !important;
}

body[data-theme="light"] .data-table td.pct-user-orange,
body[data-theme="light"] .data-table td.pct-band-60 {
  background: #9a5d1e !important;
  color: #fff2df !important;
}

body[data-theme="light"] .data-table td.pct-user-green,
body[data-theme="light"] .data-table td.pct-band-75 {
  background: #1f7c45 !important;
  color: #e8fff2 !important;
}

body[data-theme="light"] .data-table td.pct-user-dark-green,
body[data-theme="light"] .data-table td.pct-band-90 {
  background: #0f4f2d !important;
  color: #ddffe9 !important;
}

.row-tools {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.favorite-btn {
  width: 26px;
  height: 26px;
  border: 1px solid #5b7896;
  border-radius: 9px;
  background: #0c131d;
  color: #d9e4f2;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.favorite-btn:hover {
  border-color: #8faeca;
  background: #162333;
}

.favorite-btn.is-favorite {
  color: #f7d46b;
  border-color: #b28a2d;
  background: #2a220f;
}

.favorite-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

body[data-theme="light"] .favorite-btn {
  background: #f4f8fc;
  color: #3a5166;
  border-color: #9fb4c6;
}

body[data-theme="light"] .favorite-btn:hover {
  background: #e5eef7;
  border-color: #7d9eb7;
}

body[data-theme="light"] .favorite-btn.is-favorite {
  color: #8f5f00;
  border-color: #b89238;
  background: #f8edd1;
}

/* ── Logout icon button ── */
.js-logout-btn { display: inline-flex; }
.js-logout-btn:hover {
  color: #e06050 !important;
  background: rgba(224,96,80,0.12) !important;
  border-color: rgba(224,96,80,0.25) !important;
}

/* ── Legal panel content ── */
.legal-panel-content p { font-size: 0.88rem; line-height: 1.55; margin: 0 0 0.5rem; }
.legal-panel-content h3 { font-size: 1rem; font-weight: 600; margin: 1rem 0 0.5rem; }
.legal-panel-content h3:first-child { margin-top: 0; }
.legal-panel-content ul { margin: 0.25rem 0 0.5rem 1.2rem; font-size: 0.86rem; }
.legal-panel-content li { margin-bottom: 0.25rem; }
.legal-panel-intro { color: #9fb1c5; font-size: 0.85rem; margin-bottom: 0.75rem; }
body[data-theme="light"] .legal-panel-intro { color: #667; }

/* Auth form in panel popup */
.pub-auth-form { display: grid; gap: 10px; padding: 0; }
.pub-auth-form .auth-input { width: 100%; box-sizing: border-box; }
.pub-auth-form .auth-submit { justify-self: center; min-width: 140px; margin-top: 4px; }
.pub-auth-form .auth-label { font-weight: 600; font-size: 0.85rem; color: #c6d7ea; margin: 0; }
.pub-auth-form .auth-help { text-align: center; font-size: 0.82rem; color: #8ba3bc; margin: 0; }
.pub-auth-form .auth-help a { color: #66d4c7; }
.pub-auth-form .auth-help-small { font-size: 0.72rem; color: #6e8399; }
body[data-theme="light"] .pub-auth-form .auth-label { color: #2a3a4a; }
body[data-theme="light"] .pub-auth-form .auth-help { color: #5a7080; }
body[data-theme="light"] .pub-auth-form .auth-help a { color: #1a8a7e; }
body[data-theme="light"] .pub-auth-form .auth-help-small { color: #7a9aaa; }

/* Panel auth messages */
.pub-auth-msg { margin: 0; padding: 6px 10px; border-radius: 6px; font-size: 0.84rem; text-align: center; }
.pub-auth-error { background: rgba(255,107,107,0.12); color: #ff8c8c; border: 1px solid rgba(255,107,107,0.25); }
.pub-auth-success { background: rgba(45,217,122,0.12); color: #90f2b6; border: 1px solid rgba(45,217,122,0.25); }
body[data-theme="light"] .pub-auth-error { background: #fff0f0; color: #c0392b; border-color: #f5c6cb; }
body[data-theme="light"] .pub-auth-success { background: #f0fff4; color: #1a8a3e; border-color: #c3e6cb; }

/* Info message panels (Telegram upgrade, Contact login required) */
.pub-panel-message { text-align: center; padding: 1rem 0.5rem; }
.pub-panel-message p { margin: 0.3rem 0; color: #c6d7ea; font-size: 0.9rem; }
body[data-theme="light"] .pub-panel-message p { color: #2a3a4a; }

/* Mobile corrective overrides (must stay at end to win cascade) */
@media (max-width: 900px) {
  .topbar {
    padding: 10px 12px !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
  }

  .brand-title {
    display: none !important;
  }

  .topbar-tools {
    width: auto !important;
    min-width: 0 !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important;
  }

  /* Nav always visible as inline icon row */
  .nav {
    display: flex !important;
    position: static !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 2px !important;
    padding: 0 !important;
    max-width: none !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* Hide text labels, show only emoji icons */
  .nav-label {
    display: none !important;
  }

  .nav a.nav-icon-link,
  .nav button.nav-icon-link {
    padding: 6px 8px !important;
    font-size: 1.15rem !important;
    width: auto !important;
    text-align: center !important;
    border-radius: 8px !important;
  }

  /* Hide admin text-only links on mobile */
  .nav > a:not(.nav-icon-link) {
    display: none !important;
  }

  /* Hide plan badge and profile email on mobile */
  .header-plan-badge {
    display: none !important;
  }
  .profile-header-btn .profile-dropdown-email {
    display: none !important;
  }

  .container {
    margin: 10px 0 18px !important;
    padding: 0 10px !important;
  }

  .card {
    padding: 10px !important;
  }

  .filters-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  .filter-subcard {
    grid-column: auto !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .filter-search-row {
    margin-top: 8px !important;
    gap: 6px !important;
  }

  .filter-search-row .filter-input {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 1 1 auto !important;
  }

  .filter-subcard-items {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  .filter-item,
  .filter-item-slider,
  .filter-item-slider.filter-item-slider-dual {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .filter-item-slider {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "label value"
      "control control" !important;
    align-items: end !important;
    row-gap: 4px !important;
    column-gap: 8px !important;
  }

  .filter-item-slider > span {
    grid-area: label !important;
    font-size: 0.95rem !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    min-width: 0 !important;
  }

  .filter-slider-value {
    grid-area: value !important;
    justify-self: end !important;
    text-align: right !important;
    font-size: 0.9rem !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }

  .filter-slider-control {
    grid-area: control !important;
    grid-template-columns: 28px minmax(0, 1fr) 28px !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .filter-slider-control-dual {
    grid-area: control !important;
    grid-template-columns: 28px 28px minmax(0, 1fr) 28px 28px !important;
    gap: 4px !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .filter-slider-control-exact:not(.filter-slider-control-dual) {
    grid-template-columns: 28px minmax(0, 1fr) 28px auto !important;
  }
  .filter-slider-control-dual.filter-slider-control-exact {
    grid-template-columns: 28px 28px minmax(0, 1fr) 28px 28px auto !important;
  }

  .filter-dual-range {
    min-width: 0 !important;
    width: 100% !important;
  }

  .column-toggle-toolbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .column-toggle-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .column-toggle-actions .btn-control {
    width: 100% !important;
    min-width: 0 !important;
  }

  .ui-template-controls {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    align-items: stretch !important;
    gap: 8px !important;
    margin: 0 !important;
  }

  .ui-template-field {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .ui-template-controls .filter-select {
    width: 100% !important;
    min-width: 0 !important;
  }

  .ui-template-actions {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .ui-template-actions .btn-control {
    width: 100% !important;
    min-width: 0 !important;
  }

  .ui-template-actions .btn-control:last-child {
    grid-column: 1 / -1 !important;
  }

  .ui-template-status {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 560px) {
  .column-toggle-actions,
  .ui-template-actions {
    grid-template-columns: 1fr !important;
  }
}

.topbar-public {
  position: sticky !important;
  top: 0 !important;
  z-index: 80 !important;
}

.topbar-tools-public {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-public .nav-public {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-public .nav-public a {
  font-size: 0.88rem !important;
  padding: 5px 10px !important;
  border-width: 1px !important;
  white-space: nowrap;
}

/* Public nav: icon-based links matching logged-in style */
.topbar-public .nav-public .nav-icon-link {
  font-size: 0.92rem;
  padding: 6px 12px;
  white-space: nowrap;
}
.js-pub-signin-btn {
  color: #66d4c7 !important;
}
.js-pub-signin-btn:hover {
  background: rgba(102, 212, 199, 0.1) !important;
}
body[data-theme="light"] .js-pub-signin-btn {
  color: #1a8a7e !important;
}
body[data-theme="light"] .js-pub-signin-btn:hover {
  background: rgba(26, 138, 126, 0.08) !important;
}

.topbar-last-update {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #5e7287;
  border-radius: 999px;
  background: #14202de0;
  color: #d7e4f5;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
  font-size: 0.88rem;
  line-height: 1;
  white-space: nowrap;
}

.topbar-last-update strong {
  font-family: "IBM Plex Mono", monospace !important;
  font-size: 0.84rem;
  font-weight: 600;
  color: #9fd8ff;
}

body[data-theme="light"] .topbar-last-update {
  background: #f7fbff;
  border-color: #b5c8d8;
  color: #274357;
}

body[data-theme="light"] .topbar-last-update strong {
  color: #195a86;
}

@media (max-width: 900px) {
  .topbar-public {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .topbar-tools-public {
    justify-content: flex-start;
    width: auto;
    gap: 2px;
    flex-wrap: nowrap;
  }

  .topbar-public .nav-public {
    justify-content: flex-start;
    gap: 2px;
    flex-wrap: nowrap;
  }

  .topbar-public .nav-public .nav-icon-link {
    padding: 6px 7px !important;
    font-size: 1.1rem !important;
  }

  .topbar-last-update {
    order: 99;
    width: 100%;
    justify-content: flex-start;
    margin-top: 2px;
  }
}

/* Public pre-login pages */
.public-body {
  overflow-x: hidden;
}

.public-body .table-sticky-layer,
.public-body .table-floating-scroll {
  display: none !important;
}

.public-body .page-bg {
  background:
    radial-gradient(circle at 12% 10%, #1f415b8f 0%, transparent 33%),
    radial-gradient(circle at 86% 88%, #4d243299 0%, transparent 36%),
    linear-gradient(145deg, #0d1116 0%, #10161e 48%, #0c1119 100%);
}

.public-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: #101821e8;
  border-bottom: 1px solid #465a6d;
  backdrop-filter: blur(6px);
}

.public-header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.public-brand {
  gap: 10px;
}

.public-brand .brand-logo {
  width: auto;
  height: 54px;
  max-width: 220px;
  object-fit: contain;
  object-position: center;
}

.public-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.public-nav a {
  color: #d7e3f2;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}

.public-nav a:hover {
  border-color: #6f89a3;
  background: #1a2533;
}

.public-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.public-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #d3e3f8;
  border: 1px solid #5f7891;
  border-radius: 10px;
  background: #132030;
  padding: 7px 12px;
  font-weight: 700;
  font-size: 0.92rem;
}

.public-link-btn:hover {
  border-color: #86a6c4;
  background: #1a2a3b;
}

.public-cta-btn {
  font-size: 0.92rem;
  padding: 7px 12px;
}

.public-main {
  width: 100% !important;
  max-width: 100% !important;
  margin: 18px 0 34px !important;
  padding: 0 20px !important;
}

.public-hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 18px;
}

.public-hero-compact {
  grid-template-columns: 1fr;
}

.public-badge {
  display: inline-block;
  margin: 0 0 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #19384d;
  border: 1px solid #386788;
  color: #9bd0ff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.public-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.75rem, 3.4vw, 2.8rem);
  line-height: 1.15;
}

.public-hero p {
  margin: 0 0 10px;
  color: #afc0d4;
  max-width: 65ch;
}

.public-hero-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.public-hero-stats {
  display: grid;
  gap: 10px;
}

.public-hero-stats article {
  border: 1px solid #425469;
  border-radius: 12px;
  background: #111a24cc;
  padding: 10px 12px;
}

.public-hero-stats strong {
  display: block;
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.public-hero-stats p {
  margin: 0;
  font-size: 0.9rem;
  color: #afc0d4;
}

.public-section h2,
.public-static-section h2 {
  margin: 0 0 10px;
  font-size: 1.3rem;
}

.public-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.public-feature-grid article {
  border: 1px solid #425469;
  border-radius: 12px;
  background: #111a24cc;
  padding: 10px 12px;
}

.public-feature-grid h3 {
  margin: 0 0 5px;
  font-size: 1rem;
}

.public-feature-grid p {
  margin: 0;
  color: #afc0d4;
  font-size: 0.91rem;
}

.public-steps {
  margin: 0;
  padding-left: 20px;
  color: #cfdbea;
}

.public-steps li {
  margin-bottom: 8px;
}

.public-list {
  margin: 0;
  padding-left: 20px;
}

.public-list li {
  margin-bottom: 7px;
  color: #cfdbea;
}

.public-updated {
  margin: 0;
  color: #7f97b0;
  font-size: 0.86rem;
}

.public-static-card {
  display: grid;
  gap: 14px;
}

.public-static-section p {
  margin: 0 0 10px;
  color: #c2d1e4;
  line-height: 1.55;
}

/* ── Pricing page ── */
.pricing-section { max-width: 860px; margin: 0 auto; }
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 20px;
}
.pricing-card {
  background: #1a2430;
  border: 1px solid #3e5569;
  border-radius: 14px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.pricing-card-pro {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(15, 111, 120, 0.15);
}
.pricing-card-active {
  box-shadow: 0 0 0 2px var(--accent);
}
.pricing-popular-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.pricing-card-name {
  font-size: 1.2rem;
  margin: 0 0 8px;
}
.pricing-price {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}
.pricing-currency {
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: 4px;
  opacity: 0.6;
}
.pricing-period {
  margin: 4px 0 16px;
  font-size: 0.84rem;
  opacity: 0.6;
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  flex: 1;
}
.pricing-features li {
  padding: 5px 0 5px 20px;
  position: relative;
  font-size: 0.9rem;
  color: #c2d1e4;
}
.pricing-features li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: #5bc7a0;
  font-weight: 700;
}
.pricing-feature-disabled {
  text-decoration: line-through;
  opacity: 0.35;
}
.pricing-feature-disabled::before {
  content: "\2717" !important;
  color: #6a7a8a !important;
}
.pricing-cta-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pricing-cta-btn {
  width: 100%;
  text-align: center;
  padding: 10px 16px;
  font-weight: 700;
}
.pricing-cta-paypal {
  background: #0070ba;
  border-color: #0070ba;
}
.pricing-cta-paypal:hover {
  background: #005ea6;
}
.pricing-cta-current {
  display: block;
  text-align: center;
  padding: 10px;
  background: #2d3e4e;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.88rem;
  color: #8aa4ba;
}
.pricing-note {
  text-align: center;
  font-size: 0.84rem;
  color: #8aa4ba;
  margin-top: 12px;
}
.pricing-note a { color: var(--accent); }

/* Billing cycle toggle */
.pricing-toggle {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
  background: #1a2430;
  border-radius: 12px;
  padding: 4px;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid #3e5569;
}
.pricing-toggle-btn {
  flex: 1;
  padding: 10px 18px;
  border: none;
  background: transparent;
  color: #8aa4ba;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 9px;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pricing-toggle-btn:hover {
  color: #e2eaf2;
}
.pricing-toggle-active {
  background: var(--accent);
  color: #fff;
}
.pricing-toggle-active:hover {
  color: #fff;
}
.pricing-save-badge {
  background: #f39c12;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}
.pricing-price-block {
  min-height: 64px;
}
.pricing-period-note {
  font-size: 0.78rem;
  opacity: 0.8;
}

/* Payment method CTA icons */
.pricing-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.pricing-pay-icon {
  flex-shrink: 0;
}

/* VAT note */
.pricing-vat-note {
  text-align: center;
  font-size: 0.78rem;
  color: #8aa4ba;
  margin: 10px 0 6px;
  opacity: 0.85;
}

/* Accepted payment methods */
.pricing-methods {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.pricing-method-label {
  font-size: 0.76rem;
  color: #8aa4ba;
  opacity: 0.7;
}
.pricing-method-item {
  font-size: 0.74rem;
  font-weight: 600;
  color: #b0c4d8;
  background: #2a3a4a;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

/* Light theme pricing */
body[data-theme="light"] .pricing-card { background: #fff; border-color: #d2dce6; }
body[data-theme="light"] .pricing-card-pro { border-color: var(--accent); }
body[data-theme="light"] .pricing-features li { color: #4a5a6a; }
body[data-theme="light"] .pricing-cta-current { background: #e8eef4; color: #5a6a7a; }
body[data-theme="light"] .pricing-toggle { background: #f0f3f7; border-color: #d2dce6; }
body[data-theme="light"] .pricing-toggle-btn { color: #5a6a7a; }
body[data-theme="light"] .pricing-toggle-btn:hover { color: #1e2d3d; }
body[data-theme="light"] .pricing-vat-note { color: #5a6a7a; }
body[data-theme="light"] .pricing-method-item { background: #e8eef4; color: #3a4a5a; }
body[data-theme="light"] .pricing-method-label { color: #5a6a7a; }

@media (max-width: 600px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-toggle { max-width: 100%; }
}

/* ── Help page ─────────────────────────────────── */
.help-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 28px 32px;
}
.help-accordion {
  border-bottom: 1px solid #2a3a4a;
}
.help-accordion:last-child {
  border-bottom: none;
}
.help-accordion summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  font-size: 1.05rem;
  color: #e2eaf2;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.help-accordion summary::-webkit-details-marker { display: none; }
.help-accordion summary::after {
  content: "▸";
  font-size: 0.9rem;
  transition: transform 0.2s ease;
  color: #8aa4ba;
}
.help-accordion[open] summary::after {
  transform: rotate(90deg);
}
.help-accordion summary:hover {
  color: var(--accent);
}
.help-accordion-body {
  padding: 0 0 20px;
  line-height: 1.7;
  color: #b0c4d8;
  font-size: 0.93rem;
}
.help-accordion-body p {
  margin: 0 0 10px;
}
.help-accordion-body ul,
.help-accordion-body ol {
  margin: 8px 0 12px 20px;
  padding: 0;
}
.help-accordion-body li {
  margin-bottom: 6px;
}
.help-accordion-body strong {
  color: #d4e0ec;
}
.help-accordion-body a {
  color: var(--accent);
  text-decoration: none;
}
.help-accordion-body a:hover {
  text-decoration: underline;
}
.help-accordion-body em {
  color: #8aa4ba;
  font-style: italic;
}

/* FAQ list inside help */
.help-faq-list {
  margin: 0;
  padding: 0;
}
.help-faq-list dt {
  font-weight: 600;
  color: #d4e0ec;
  margin-top: 14px;
  margin-bottom: 4px;
}
.help-faq-list dt:first-child {
  margin-top: 0;
}
.help-faq-list dd {
  margin: 0 0 10px 0;
  color: #b0c4d8;
  line-height: 1.65;
}
.help-faq-list dd a {
  color: var(--accent);
  text-decoration: none;
}
.help-faq-list dd a:hover {
  text-decoration: underline;
}

/* Light theme help */
body[data-theme="light"] .help-accordion { border-color: #d2dce6; }
body[data-theme="light"] .help-accordion summary { color: #1e2d3d; }
body[data-theme="light"] .help-accordion summary::after { color: #6a7a8a; }
body[data-theme="light"] .help-accordion-body { color: #4a5a6a; }
body[data-theme="light"] .help-accordion-body strong { color: #1e2d3d; }
body[data-theme="light"] .help-accordion-body em { color: #6a7a8a; }
body[data-theme="light"] .help-faq-list dt { color: #1e2d3d; }
body[data-theme="light"] .help-faq-list dd { color: #4a5a6a; }

@media (max-width: 600px) {
  .help-page { padding: 16px 18px 24px; }
  .help-accordion summary { font-size: 0.98rem; padding: 14px 0; }
}

/* ── Admin link in nav ─────────────────────────── */
.nav-admin-link {
  background: rgba(79, 195, 247, 0.1);
  color: #4fc3f7 !important;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.nav-admin-link:hover {
  background: rgba(79, 195, 247, 0.2);
  color: #80d8ff !important;
  text-decoration: none;
}

/* ── Admin pages (legacy, kept for backward compat) ─ */
.admin-hero-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.admin-plan-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.admin-plan-badge-pro {
  background: var(--accent);
  color: #fff;
}
.admin-plan-badge-free {
  background: #2a3a4a;
  color: #8aa4ba;
}
.admin-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.admin-actions form {
  margin: 0;
}
.btn-sm {
  padding: 4px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
}
.btn-pro {
  background: var(--accent);
  color: #fff;
}
.btn-pro:hover {
  background: #219a52;
}
.btn-free {
  background: #475a6e;
  color: #e2eaf2;
}
.btn-free:hover {
  background: #586d83;
}
.btn-active {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.admin-expires {
  white-space: nowrap;
  font-size: 0.85rem;
  color: #8aa4ba;
}

/* Admin plan form with date picker */
.admin-plan-form {
  display: flex;
  align-items: center;
  gap: 4px;
}
.admin-date-input {
  width: 124px;
  font-size: 0.75rem;
  padding: 3px 5px;
  background: #0d1b2a;
  color: #c8dbe8;
  border: 1px solid #2a4460;
  border-radius: 4px;
  font-family: inherit;
}
.admin-date-input:focus {
  border-color: var(--accent);
  outline: none;
}

/* Footer clock */
.footer-clock {
  font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.7;
  white-space: nowrap;
  letter-spacing: 0.02em;
  cursor: default;
  user-select: none;
}

/* Header plan badge */
.header-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: 6px;
  margin-right: 6px;
  white-space: nowrap;
  vertical-align: middle;
}
.header-plan-badge-free {
  background: rgba(100,120,140,0.2);
  color: #8aa4bd;
}
.header-plan-badge-pro {
  background: rgba(45,217,122,0.15);
  color: #2dd97a;
}
.header-plan-badge-trial {
  background: rgba(64,160,255,0.15);
  color: #60b0ff;
}
.header-plan-icon {
  font-size: 0.85rem;
  line-height: 1;
}
.header-plan-expires {
  font-weight: 400;
  opacity: 0.7;
  font-size: 0.75rem;
}
.header-plan-upgrade {
  color: #ff4444 !important;
  text-decoration: none !important;
  font-weight: 800 !important;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  border: none !important;
  padding: 0 !important;
  background: transparent !important;
  animation: upgrade-pulse 1.8s ease-in-out infinite;
}
.header-plan-upgrade:hover {
  color: #ff6666 !important;
  text-decoration: underline !important;
  background: transparent !important;
}
@keyframes upgrade-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Admin filter bar */
.admin-filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 0 14px;
  flex-wrap: wrap;
}
.admin-filter-count {
  margin-left: auto;
  font-size: 0.82rem;
  color: #8aa4ba;
}

/* Admin provider badges */
.admin-provider-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: capitalize;
}
.admin-provider-stripe { background: #635bff22; color: #a29bfe; }
.admin-provider-paypal { background: #00308722; color: #6fa8dc; }
.admin-provider-admin  { background: #f0932b22; color: #f0932b; }

/* Admin status badges */
.admin-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
}
.admin-status-completed { background: #27ae6022; color: #2ecc71; }
.admin-status-renewed   { background: #2980b922; color: #3498db; }
.admin-status-cancelled { background: #e74c3c22; color: #e74c3c; }
.admin-status-manual    { background: #f39c1222; color: #f39c12; }
.admin-status-pending   { background: #95a5a622; color: #95a5a6; }

/* Admin payment ID */
.admin-payment-id {
  font-family: monospace;
  font-size: 0.8rem;
  color: #8aa4ba;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-period {
  white-space: nowrap;
  font-size: 0.84rem;
  color: #8aa4ba;
}

/* Admin metadata toggle */
.admin-metadata details summary {
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--accent);
  user-select: none;
}
.admin-metadata details summary:hover {
  text-decoration: underline;
}
.admin-metadata pre {
  margin: 6px 0 0;
  padding: 10px 12px;
  background: #0c1420;
  border: 1px solid #2a3a4a;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #b0c4d8;
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Admin pagination */
.admin-pagination {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 16px 0 4px;
}
.admin-pagination-info {
  font-size: 0.85rem;
  color: #8aa4ba;
}

/* Admin stats cards */
.admin-stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.admin-stat-card {
  flex: 1;
  min-width: 120px;
  background: var(--card-bg, #1a2332);
  border: 1px solid var(--border, #263545);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
}
.admin-stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent, #0f6f78);
  line-height: 1;
  margin-bottom: 4px;
}
.admin-stat-label {
  font-size: 0.75rem;
  color: #8aa4ba;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.admin-section-title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text, #c6d7ea);
}
body[data-theme="light"] .admin-stat-card {
  background: #fff;
  border-color: #d2dce6;
}
body[data-theme="light"] .admin-stat-label { color: #5a6a7a; }

/* Admin IP column */
.admin-ip {
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: 0.8rem;
  color: #8aa4ba;
  white-space: nowrap;
}

/* Admin Telegram badges */
.admin-tg-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
}
.admin-tg-linked {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
}
.admin-tg-none {
  color: #5a6a7a;
}

/* Admin migration banner */
.admin-migration-banner {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  color: #e2e8f0;
}
.admin-migration-banner code {
  font-size: 0.82em;
  background: rgba(0,0,0,0.2);
  padding: 1px 5px;
  border-radius: 4px;
}

/* Light theme admin */
body[data-theme="light"] .admin-ip { color: #5a6a7a; }
body[data-theme="light"] .admin-tg-linked { background: rgba(46, 204, 113, 0.12); color: #1a8a4a; }
body[data-theme="light"] .admin-migration-banner { background: rgba(245, 158, 11, 0.08); color: #334155; }
body[data-theme="light"] .admin-migration-banner code { background: rgba(0,0,0,0.06); }
body[data-theme="light"] .admin-plan-badge-free { background: #e8eef4; color: #5a6a7a; }
body[data-theme="light"] .admin-expires { color: #5a6a7a; }
body[data-theme="light"] .admin-filter-count { color: #5a6a7a; }
body[data-theme="light"] .admin-provider-stripe { background: #635bff15; color: #635bff; }
body[data-theme="light"] .admin-provider-paypal { background: #00308715; color: #003087; }
body[data-theme="light"] .admin-provider-admin  { background: #f0932b15; color: #d68910; }
body[data-theme="light"] .admin-metadata pre { background: #f4f7fa; border-color: #d2dce6; color: #4a5a6a; }
body[data-theme="light"] .admin-payment-id { color: #5a6a7a; }
body[data-theme="light"] .admin-period { color: #5a6a7a; }
body[data-theme="light"] .admin-pagination-info { color: #5a6a7a; }
body[data-theme="light"] .btn-free { background: #d2dce6; color: #2a3a4a; }
body[data-theme="light"] .btn-free:hover { background: #bcc8d6; }
body[data-theme="light"] .admin-date-input { background: #f4f7fa; color: #2a3a4a; border-color: #c2ccd6; }
body[data-theme="light"] .header-plan-badge-free { background: rgba(90,110,130,0.12); color: #5a6a7a; }
body[data-theme="light"] .header-plan-badge-pro { background: rgba(30,160,80,0.12); color: #1a8a4a; }
body[data-theme="light"] .header-plan-badge-trial { background: rgba(40,120,220,0.12); color: #2060b0; }
body[data-theme="light"] .header-plan-upgrade { color: #cc2222 !important; }
body[data-theme="light"] .header-plan-upgrade:hover { color: #ee3333 !important; }

/* ═══ Betting Tracker ═══════════════════════════════════════════════ */

/* Dashboard bet column */
.bet-col { width: 36px; text-align: center; padding: 0 2px !important; }
.bet-btn {
  background: none; border: none; cursor: pointer;
  font-size: 0.95rem; padding: 2px 4px; line-height: 1;
  transition: transform 0.15s;
}
.bet-btn:hover { transform: scale(1.2); }
.bet-btn:disabled { opacity: 0.3; cursor: default; transform: none; }

/* Bet placement modal */
.bet-modal { width: min(440px, 94vw); }
.bet-modal-match-info {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 12px; margin-bottom: 10px;
  background: rgba(255,255,255,0.04); border-radius: 8px;
}
.bet-modal-league, .bet-modal-date {
  font-size: 0.78rem; color: #8aa4bd; opacity: 0.8;
}
.bet-modal-body { display: flex; flex-direction: column; gap: 10px; padding: 0 4px; }
.bet-modal-field { display: flex; flex-direction: column; gap: 3px; }
.bet-modal-field[hidden] { display: none; }
.bet-modal-field label {
  font-size: 0.75rem; font-weight: 600; color: #8aa4bd;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.bet-modal-field input, .bet-modal-field select {
  padding: 7px 10px; border-radius: 6px;
  border: 1px solid #2a4460; background: #0d1b2a; color: #c8dbe8;
  font-size: 0.88rem; font-family: inherit;
}
.bet-modal-field input:focus, .bet-modal-field select:focus {
  border-color: var(--accent); outline: none;
}
.bet-modal-error {
  padding: 6px 10px; margin-top: 8px; border-radius: 6px;
  background: rgba(240,72,72,0.12); color: #f06060; font-size: 0.82rem;
}

/* Bets page summary */
.bets-summary {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 0 0 12px; margin-top: -4px;
}
.bets-summary-card {
  flex: 1 1 120px; min-width: 100px;
  background: var(--card, #101924); border: 1px solid var(--line, rgba(255,255,255,0.06));
  border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 2px;
}
.bets-summary-label {
  font-size: 0.72rem; font-weight: 600; color: #8aa4bd;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.bets-summary-value { font-size: 1.4rem; font-weight: 700; color: var(--ink, #c8dbe8); }
.bets-val-won { color: #2dd97a !important; }
.bets-val-lost { color: #f04848 !important; }
.bets-val-pending { color: #dbb540 !important; }

/* Bets chart */
.bets-chart-wrap { position: relative; padding: 14px; height: 280px; }
#bets-chart { max-height: 240px; }
.bets-chart-title { font-size: 0.9rem; color: #8aa4bd; margin: 0 0 8px; font-weight: 600; }
.bets-chart-empty { text-align: center; color: #5e7389; padding: 40px 0; font-size: 0.9rem; }

/* Bets toolbar */
.bets-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 0 0 10px;
}
.bets-toolbar-group { display: flex; align-items: center; gap: 6px; }
.bets-toolbar-group label { font-size: 0.78rem; color: #8aa4bd; font-weight: 600; white-space: nowrap; }
.bets-filter-select {
  background: var(--card, #101924); color: var(--ink, #c8dbe8);
  border: 1px solid var(--line, rgba(255,255,255,0.12)); border-radius: 6px;
  padding: 4px 8px; font-size: 0.8rem; cursor: pointer;
}
body[data-theme="light"] .bets-filter-select { background: #fff; color: #1a2a3a; border-color: #d0d8e0; }

.bets-pagination {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 10px 0 0; font-size: 0.82rem; color: #8aa4bd;
}
.bets-pagination button { font-size: 0.78rem; }

/* Bets table */
.bets-table td { font-size: 0.82rem; vertical-align: middle; }
.bet-date-cell { white-space: nowrap; min-width: 90px; }
.bet-ko-time { color: #8aa4bd; font-size: 0.72rem; }
.bet-match-cell { min-width: 160px; }
.bet-odds-cell { cursor: pointer; transition: background 0.15s; }
.bet-odds-cell:hover { background: rgba(100,160,255,0.08); border-radius: 4px; }
.bet-inline-odds-input {
  width: 70px; padding: 2px 4px; font-size: 0.82rem; text-align: center;
  background: var(--bg-card, #1a2332); color: var(--text-primary, #e1e8f0);
  border: 1px solid rgba(100,160,255,0.4); border-radius: 4px; outline: none;
}
.bet-inline-odds-input:focus { border-color: rgba(100,160,255,0.8); box-shadow: 0 0 0 2px rgba(100,160,255,0.15); }
.bet-odds-saving { opacity: 0.5; }
.bet-league-text { color: #6a8298; font-size: 0.72rem; }
.bet-row-won { background: rgba(45,217,122,0.04) !important; }
.bet-row-lost { background: rgba(240,72,72,0.04) !important; }
.bet-status-badge {
  display: inline-block; padding: 2px 8px; border-radius: 8px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
}
.bet-status-won { background: rgba(45,217,122,0.15); color: #2dd97a; }
.bet-status-lost { background: rgba(240,72,72,0.15); color: #f04848; }
.bet-status-void { background: rgba(150,160,180,0.15); color: #8aa4bd; }
.bet-status-pending { background: rgba(219,181,64,0.12); color: #dbb540; }

.bet-stats-btn, .bet-action-btn {
  background: none; border: none; cursor: pointer;
  font-size: 0.85rem; padding: 2px 4px; opacity: 0.7;
  transition: opacity 0.15s;
}
.bet-stats-btn:hover, .bet-action-btn:hover { opacity: 1; }
.bet-delete-btn:hover { color: #f04848; }
.bet-actions-cell { white-space: nowrap; }

/* Stats popup */
.bet-stats-popup { width: min(500px, 94vw); }
.bet-stats-section { margin-bottom: 12px; }
.bet-stats-section h4 {
  font-size: 0.78rem; font-weight: 700; color: #8aa4bd;
  text-transform: uppercase; margin: 0 0 4px; letter-spacing: 0.04em;
}
.bet-stats-pre {
  background: rgba(255,255,255,0.04); border-radius: 6px;
  padding: 8px 10px; font-size: 0.78rem; white-space: pre-wrap;
  color: #c8dbe8; font-family: 'IBM Plex Mono', monospace;
  margin: 0; border: 1px solid rgba(255,255,255,0.06);
}

/* Result modal */
.bet-result-modal { width: min(360px, 94vw); }
.bet-result-match { font-size: 0.88rem; color: #c8dbe8; margin: 0 0 12px; }
.bet-result-fields {
  display: flex; align-items: end; gap: 8px;
  justify-content: center; margin-bottom: 14px;
}
.bet-result-score { display: flex; flex-direction: column; gap: 3px; }
.bet-result-score label { font-size: 0.72rem; font-weight: 600; color: #8aa4bd; text-align: center; }
.bet-result-score input {
  width: 60px; text-align: center; padding: 8px;
  border-radius: 6px; border: 1px solid #2a4460;
  background: #0d1b2a; color: #c8dbe8; font-size: 1.1rem;
  font-weight: 700; font-family: inherit;
}
.bet-result-dash { font-size: 1.4rem; font-weight: 700; color: #5e7389; padding-bottom: 6px; }
.bet-result-system {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  margin-bottom: 12px; padding: 8px 10px; border-radius: 8px;
  background: rgba(45,217,122,0.08); border: 1px solid rgba(45,217,122,0.2);
  font-size: 0.85rem; color: #9fd8c8;
}
.bet-result-system .btn-sm { padding: 4px 10px; font-size: 0.78rem; }
.bet-edit-modal { width: min(380px, 94vw); }

/* Light theme overrides */
body[data-theme="light"] .bet-modal-field input,
body[data-theme="light"] .bet-modal-field select {
  background: #f4f7fa; color: #2a3a4a; border-color: #c2ccd6;
}
body[data-theme="light"] .bet-modal-match-info { background: rgba(0,0,0,0.03); }
body[data-theme="light"] .bet-modal-league,
body[data-theme="light"] .bet-modal-date { color: #5a6a7a; }
body[data-theme="light"] .bet-modal-field label { color: #5a6a7a; }
body[data-theme="light"] .bets-summary-label { color: #5a6a7a; }
body[data-theme="light"] .bets-summary-value { color: #1a2a3a; }
body[data-theme="light"] .bets-chart-title { color: #5a6a7a; }
body[data-theme="light"] .bets-chart-empty { color: #8a9aaa; }
body[data-theme="light"] .bet-league-text { color: #7a8a9a; }
body[data-theme="light"] .bet-stats-pre {
  background: #f4f7fa; color: #2a3a4a; border-color: #d2dce6;
}
body[data-theme="light"] .bet-stats-section h4 { color: #5a6a7a; }
body[data-theme="light"] .bet-result-match { color: #2a3a4a; }
body[data-theme="light"] .bet-result-score input {
  background: #f4f7fa; color: #2a3a4a; border-color: #c2ccd6;
}
body[data-theme="light"] .bet-result-dash { color: #8a9aaa; }

.public-footer {
  border-top: 1px solid #435567;
  background: #101821e8;
}
body[data-theme="light"] .public-footer {
  background: #f0ebe0f0;
  border-color: #d5c9b5;
}
body[data-theme="light"] .public-footer-copy {
  color: #5a4e3a;
}
body[data-theme="light"] .public-footer-nav a {
  color: #4a6a80;
}
body[data-theme="light"] .public-footer-nav a:hover {
  color: #1a4a6a;
}

.public-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.public-footer-copy {
  margin: 0;
  color: #9fb1c5;
  font-size: 0.9rem;
}
.footer-last-update {
  font-size: 0.82rem;
  color: #7a8fa5;
}
.footer-last-update strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: #8abdd8;
}
body[data-theme="light"] .footer-last-update { color: #6a5e4a; }
body[data-theme="light"] .footer-last-update strong { color: #195a86; }

.public-footer-nav {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.public-footer-nav a {
  color: #b9d1ec;
  text-decoration: none;
  font-size: 0.9rem;
}

.public-footer-nav a:hover {
  text-decoration: underline;
}

/* ── Language selector ───────────────────────── */
.lang-selector {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.lang-selector-header {
  margin: 0 2px;
}
.lang-dropdown {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-bg, #1a2332);
  border: 1px solid var(--border, #263545);
  border-radius: 8px;
  padding: 6px 0;
  min-width: 160px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
}
.lang-dropdown-header {
  bottom: auto;
  top: 100%;
  margin-top: 4px;
  right: 0;
  left: auto;
  transform: none;
}
.lang-dropdown[hidden] {
  display: none;
}
.lang-option {
  display: block;
  width: 100%;
  padding: 6px 14px;
  text-align: left;
  background: none;
  border: none;
  color: var(--text, #c2d1e4);
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}
.lang-option:hover {
  background: rgba(79, 195, 247, 0.1);
  color: #4fc3f7;
}
body[data-theme="light"] .lang-dropdown {
  background: #fff;
  border-color: #d0d5dd;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
body[data-theme="light"] .lang-option {
  color: #3a4a5a;
}
body[data-theme="light"] .lang-option:hover {
  background: rgba(25, 118, 210, 0.08);
  color: #1976d2;
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 24px;
  z-index: 1400;
  border: 1px solid #50657b;
  border-radius: 12px;
  background: #111c29f2;
  box-shadow: 0 14px 34px #00000069;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner p {
  margin: 0;
  color: #c2d3e9;
  font-size: 0.9rem;
  max-width: 68ch;
}

.cookie-banner,
.cookie-banner * {
  pointer-events: auto;
}

.cookie-banner-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: #08111dcf;
  display: grid;
  place-items: center;
  padding: 16px;
}

.cookie-modal-backdrop[hidden] {
  display: none;
}

.cookie-modal {
  width: min(100%, 600px);
  border: 1px solid #5a7088;
  border-radius: 14px;
  background: #121d2bdc;
  box-shadow: 0 18px 48px #00000073;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.cookie-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cookie-modal-head h3 {
  margin: 0;
  font-size: 1.15rem;
}

.cookie-modal-grid {
  display: grid;
  gap: 10px;
}

.cookie-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #42566d;
  border-radius: 10px;
  background: #132131;
  padding: 10px 12px;
}

.cookie-option span {
  display: grid;
  gap: 2px;
}

.cookie-option strong {
  font-size: 0.96rem;
}

.cookie-option small {
  color: #a9bdd3;
}

.cookie-modal-actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-help-small {
  font-size: 0.86rem;
  line-height: 1.45;
  color: #9fb2c6;
}

body[data-theme="light"].public-body .public-header,
body[data-theme="light"].public-body .public-footer {
  background: #f5f9ffeb;
  border-color: #b8cadb;
}

body[data-theme="light"].public-body .public-nav a,
body[data-theme="light"].public-body .public-link-btn {
  color: #21455f;
  border-color: #9db2c7;
  background: #f8fcff;
}

body[data-theme="light"].public-body .public-nav a:hover,
body[data-theme="light"].public-body .public-link-btn:hover {
  border-color: #6c8eab;
  background: #edf5fc;
}

body[data-theme="light"].public-body .public-badge {
  background: #e7f1fb;
  border-color: #a9bfd6;
  color: #21557a;
}

body[data-theme="light"].public-body .public-hero h1,
body[data-theme="light"].public-body .public-section h2,
body[data-theme="light"].public-body .public-static-section h2 {
  color: #1a2a3a;
}

body[data-theme="light"].public-body .public-feature-grid h3 {
  color: #1e3348;
}

body[data-theme="light"].public-body .public-hero p,
body[data-theme="light"].public-body .public-feature-grid p,
body[data-theme="light"].public-body .public-static-section p,
body[data-theme="light"].public-body .public-list li,
body[data-theme="light"].public-body .public-steps,
body[data-theme="light"].public-body .public-steps li,
body[data-theme="light"].public-body .public-hero-stats p,
body[data-theme="light"].public-body .public-updated,
body[data-theme="light"].public-body .auth-help-small {
  color: #3a5468;
}

body[data-theme="light"].public-body .public-static-section a {
  color: #1a6a9a;
}

/* Footer — light theme: use warm cream bg to match page */
body[data-theme="light"].public-body .public-footer {
  background: #f0ebe0f0;
  border-color: #d5c9b5;
}

body[data-theme="light"].public-body .public-footer-copy {
  color: #5a4e3a;
}

body[data-theme="light"].public-body .public-footer-nav a {
  color: #4a6a80;
}

body[data-theme="light"].public-body .public-footer-nav a:hover {
  color: #1a4a6a;
}

body[data-theme="light"].public-body .public-hero-stats article,
body[data-theme="light"].public-body .public-feature-grid article,
body[data-theme="light"].public-body .cookie-option {
  border-color: #c3d1df;
  background: #f8fbff;
}

body[data-theme="light"].public-body .cookie-banner {
  border-color: #b6c9dc;
  background: #f6fbfffa;
}

body[data-theme="light"].public-body .cookie-banner p,
body[data-theme="light"].public-body .cookie-option small {
  color: #466178;
}

body[data-theme="light"].public-body .cookie-modal {
  border-color: #afc3d8;
  background: #f5fbfffa;
}

@media (max-width: 1080px) {
  .public-header-inner {
    grid-template-columns: auto auto;
    grid-template-areas:
      "brand actions"
      "nav nav";
  }

  .public-brand {
    grid-area: brand;
  }

  .public-nav {
    grid-area: nav;
    justify-content: flex-start;
  }

  .public-header-actions {
    grid-area: actions;
    justify-self: end;
  }

  .public-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .brand-logo-full,
  .public-brand .brand-logo {
    height: 46px;
    max-width: 188px;
  }

  .public-header-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "actions"
      "nav";
    gap: 10px;
  }

  .public-header-actions {
    justify-self: start;
    flex-wrap: wrap;
  }

  .public-feature-grid {
    grid-template-columns: 1fr;
  }

  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 18px;
  }
}

@media (max-width: 560px) {
  .brand-logo-full,
  .public-brand .brand-logo {
    height: 40px;
    max-width: 160px;
  }

  .public-main {
    padding: 0 10px !important;
  }

  .public-hero-actions,
  .cookie-modal-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .public-hero-actions .btn-refresh,
  .public-hero-actions .public-link-btn,
  .cookie-modal-actions .btn-refresh,
  .cookie-modal-actions .public-link-btn {
    width: 100%;
    justify-content: center;
  }
}
/* Header sorting indicators */
.js-main-table thead th.is-sortable {
  cursor: pointer;
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 20;
  padding-right: 18px !important;
}

.js-main-table thead th.is-sortable::after {
  content: "⇅";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  opacity: 0.45;
}

.js-main-table thead th.sort-asc::after {
  content: "▲";
  opacity: 0.95;
}

.js-main-table thead th.sort-desc::after {
  content: "▼";
  opacity: 0.95;
}

/* Header column drag-and-drop */
.js-main-table thead th[draggable="true"] {
  cursor: grab;
}

.js-main-table .is-col-dragging {
  opacity: 0.3;
  background: rgba(107, 211, 198, 0.08) !important;
}

.js-main-table thead th.col-drag-over-left {
  border-left: 2px solid #6bd3c6 !important;
}

.js-main-table thead th.col-drag-over-right {
  border-right: 2px solid #6bd3c6 !important;
}

body[data-theme="light"] .js-main-table thead th.col-drag-over-left {
  border-left-color: #0f9688 !important;
}

body[data-theme="light"] .js-main-table thead th.col-drag-over-right {
  border-right-color: #0f9688 !important;
}

/* ===================================================================
   DESIGN TOGGLE BUTTON
   =================================================================== */
.design-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  width: 42px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 1.5px solid #3a4f66;
  background: #192533;
  color: #c2d0de;
  font-size: 1.22rem;
  cursor: pointer;
  transition: filter 0.14s, transform 0.14s, border-color 0.14s;
  box-shadow: 0 2px 8px #00000040;
}

.design-toggle:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  border-color: #7c5cbf;
}

.design-toggle:disabled {
  opacity: 0.75;
  cursor: wait;
}

body[data-theme="light"] .design-toggle {
  background: #ffffff !important;
  color: #184154 !important;
  border-color: #9ab7c8 !important;
}

body[data-theme="light"] .design-toggle:hover {
  border-color: #7c5cbf !important;
}

/* ===================================================================
   "ONYX" MODERN DESIGN — DARK THEME
   Gold/Amber luxury dashboard with sharp, vivid cell colors
   =================================================================== */

/* ---- D1. CSS Variables Override ---- */
body[data-design="modern"] {
  --bg: #060810;
  --ink: #f0eee8;
  --muted: #b0b8cc;
  --card: #111420;
  --line: rgba(255,255,255,0.05);
  --accent: #dbb540;
  --accent-2: #b89530;
  --ok: #2dd97a;
  --bad: #f04848;
  background: #060810 !important;
  color: #f0eee8 !important;
}

/* ---- D2. Page Background ---- */
body[data-design="modern"] .page-bg {
  background:
    radial-gradient(ellipse at 15% 5%, rgba(219,181,64,0.04) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 95%, rgba(45,217,122,0.03) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 50%, rgba(14,16,24,1) 0%, #060810 100%) !important;
}

/* ---- D3. Topbar ---- */
body[data-design="modern"] .topbar {
  background: rgba(8,10,16,0.82) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255,255,255,0.05) !important;
  box-shadow: 0 1px 12px rgba(219,181,64,0.03) !important;
}

/* ---- D4. Brand ---- */
body[data-design="modern"] .brand {
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-style: solid !important;
}

body[data-design="modern"] .brand-title {
  color: #f0eee8 !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
}

body[data-design="modern"] .brand-dot {
  color: #dbb540 !important;
  opacity: 1 !important;
  font-weight: 600 !important;
}

body[data-design="modern"] .brand-accent {
  color: #dbb540 !important;
}

/* ---- D5. Nav Links ---- */
body[data-design="modern"] .nav a,
body[data-design="modern"] .nav-link-btn {
  color: #9098ae !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  transition: all 0.15s !important;
}

body[data-design="modern"] .nav a:hover,
body[data-design="modern"] .nav-link-btn:hover {
  color: #f0eee8 !important;
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.08) !important;
}
body[data-design="modern"] .nav a.nav-bets-active {
  border: 1px solid rgba(219,181,64,0.25) !important;
  background: rgba(219,181,64,0.06) !important;
  color: #dbb540 !important;
}
body[data-design="modern"] .nav a.nav-bets-active:hover {
  background: rgba(219,181,64,0.14) !important;
  border-color: rgba(219,181,64,0.4) !important;
  color: #f0d060 !important;
}
body[data-design="modern"] .nav a.header-plan-upgrade {
  color: #ff4444 !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}
body[data-design="modern"] .nav a.header-plan-upgrade:hover {
  color: #ff6666 !important;
  background: transparent !important;
}

body[data-design="modern"] .nav a.active,
body[data-design="modern"] .nav-link-btn.active {
  color: #dbb540 !important;
  background: rgba(219,181,64,0.16) !important;
  border-color: rgba(219,181,64,0.2) !important;
}

/* ---- D6. Cards ---- */
body[data-design="modern"] .card,
body[data-design="modern"] .metric-card,
body[data-design="modern"] .auth-card,
body[data-design="modern"] .filters-card {
  background: #111420 !important;
  border: 1px solid rgba(255,255,255,0.05) !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4) !important;
}

body[data-design="modern"] .metric-card span {
  color: #5a6280 !important;
}

body[data-design="modern"] .metric-card strong {
  color: #f0eee8 !important;
  font-family: 'JetBrains Mono', monospace;
}

/* ---- D7. Primary Button (Refresh) ---- */
body[data-design="modern"] .btn-refresh:not(.btn-control) {
  background: linear-gradient(135deg, #b89530, #dbb540) !important;
  color: #0a0c12 !important;
  border: none !important;
  border-radius: 8px !important;
  box-shadow: 0 0 20px rgba(219,181,64,0.1) !important;
  font-weight: 700 !important;
}

body[data-design="modern"] .btn-refresh:not(.btn-control):hover {
  box-shadow: 0 0 28px rgba(219,181,64,0.25) !important;
  transform: translateY(-1px);
}

/* ---- D8. Control Buttons ---- */
body[data-design="modern"] .btn-control {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  color: #b0b8cc !important;
  border-radius: 6px !important;
}

body[data-design="modern"] .btn-control:hover {
  border-color: rgba(255,255,255,0.14) !important;
  color: #f0eee8 !important;
  background: rgba(255,255,255,0.05) !important;
}

/* ---- D9. Toggle ON/OFF States ---- */
body[data-design="modern"] .btn-control.is-on {
  background: rgba(219,181,64,0.16) !important;
  border-color: rgba(219,181,64,0.3) !important;
  color: #f5e48a !important;
}

body[data-design="modern"] .btn-control.is-on .toggle-dot,
body[data-design="modern"] .btn-control.is-on .dot {
  background: #dbb540 !important;
}

/* ---- D10. Cell Colors — pct-band and pct-user ---- */
body[data-design="modern"] .data-table td.pct-user-dark-red,
body[data-design="modern"] .data-table td.pct-band-1 {
  background: #351828 !important;
  color: #ff9999 !important;
  font-weight: 600 !important;
}

body[data-design="modern"] .data-table td.pct-user-red,
body[data-design="modern"] .data-table td.pct-band-45 {
  background: #352410 !important;
  color: #ffcc66 !important;
  font-weight: 600 !important;
}

body[data-design="modern"] .data-table td.pct-user-orange,
body[data-design="modern"] .data-table td.pct-band-60 {
  background: #1c2030 !important;
  color: #b8c4dd !important;
}

body[data-design="modern"] .data-table td.pct-user-green,
body[data-design="modern"] .data-table td.pct-band-75 {
  background: #0c3018 !important;
  color: #55eea0 !important;
  font-weight: 600 !important;
}

body[data-design="modern"] .data-table td.pct-user-dark-green,
body[data-design="modern"] .data-table td.pct-band-90 {
  background: #082c28 !important;
  color: #40e8cc !important;
  font-weight: 600 !important;
}

/* ---- D11. Tables (all 5 types) ---- */
body[data-design="modern"] .data-table,
body[data-design="modern"] .evidence-table,
body[data-design="modern"] .odds-detail-table,
body[data-design="modern"] .odds-popup-table,
body[data-design="modern"] .odds-history-table {
  background: #0b0d14 !important;
  border-color: rgba(255,255,255,0.05) !important;
}

body[data-design="modern"] .data-table thead th,
body[data-design="modern"] .evidence-table thead th,
body[data-design="modern"] .odds-detail-table thead th,
body[data-design="modern"] .odds-popup-table thead th,
body[data-design="modern"] .odds-history-table thead th {
  background: #151928 !important;
  color: #8892aa !important;
  border-bottom-color: rgba(255,255,255,0.08) !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

body[data-design="modern"] .data-table tbody td,
body[data-design="modern"] .evidence-table tbody td {
  border-bottom-color: rgba(255,255,255,0.04) !important;
  color: #b0b8cc !important;
}

body[data-design="modern"] .data-table td.cell-match,
body[data-design="modern"] .data-table td.col-match {
  color: #f0eee8 !important;
  font-weight: 600 !important;
}

body[data-design="modern"] .data-table td.cell-league,
body[data-design="modern"] .data-table td.col-league {
  color: #9aa2b8 !important;
}

/* ---- D12. Table Wrap ---- */
body[data-design="modern"] .table-wrap {
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3) !important;
  background: #0b0d14 !important;
}

/* ---- D13. Table Row/Column Hover ---- */
body[data-design="modern"] .data-table tbody tr:hover > td {
  background: rgba(219,181,64,0.04) !important;
}

body[data-design="modern"] .data-table td.table-hover-col {
  background: rgba(219,181,64,0.06) !important;
}

body[data-design="modern"] .data-table td.table-hover-focus {
  background: rgba(219,181,64,0.12) !important;
  box-shadow: inset 0 0 0 1px rgba(219,181,64,0.3) !important;
}

body[data-design="modern"] .data-table td.table-hover-row-cell {
  background: rgba(219,181,64,0.04) !important;
}

/* Sticky header gold glow */
body[data-design="modern"] .data-table thead th {
  box-shadow: 0 1px 6px rgba(219,181,64,0.03) !important;
}

/* ---- D14. Scrollbars ---- */
body[data-design="modern"] .table-wrap::-webkit-scrollbar-thumb,
body[data-design="modern"] .data-table::-webkit-scrollbar-thumb,
body[data-design="modern"]::-webkit-scrollbar-thumb {
  background: #5a4820 !important;
  border-radius: 4px !important;
}

body[data-design="modern"] .table-wrap::-webkit-scrollbar-track,
body[data-design="modern"] .data-table::-webkit-scrollbar-track,
body[data-design="modern"]::-webkit-scrollbar-track {
  background: #0b0d14 !important;
}

body[data-design="modern"] .table-wrap::-webkit-scrollbar,
body[data-design="modern"] .data-table::-webkit-scrollbar,
body[data-design="modern"]::-webkit-scrollbar {
  width: 14px !important;
  height: 14px !important;
}

/* ---- D15. Expand Button ---- */
body[data-design="modern"] .expand-btn {
  border: 1px solid rgba(255,255,255,0.12) !important;
  background: transparent !important;
  color: #8892aa !important;
  border-radius: 6px !important;
}

body[data-design="modern"] .expand-btn:hover {
  border-color: #dbb540 !important;
  color: #dbb540 !important;
  background: rgba(219,181,64,0.08) !important;
}

/* ---- D16. Evidence ---- */
body[data-design="modern"] .evidence-row,
body[data-design="modern"] .evidence-inner {
  background: #080a10 !important;
  border-color: rgba(255,255,255,0.04) !important;
}

body[data-design="modern"] .evidence-tab-btn {
  background: transparent !important;
  color: #8892aa !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
}

body[data-design="modern"] .evidence-tab-btn:hover {
  color: #c0c8dd !important;
  border-color: rgba(255,255,255,0.12) !important;
}

body[data-design="modern"] .evidence-tab-btn.is-active {
  background: rgba(219,181,64,0.16) !important;
  color: #dbb540 !important;
  border-color: rgba(219,181,64,0.3) !important;
}

/* ---- D17. Filters ---- */
body[data-design="modern"] .filter-subcard {
  background: rgba(255,255,255,0.018) !important;
  border: 1px solid rgba(255,255,255,0.05) !important;
  border-radius: 8px !important;
}

body[data-design="modern"] .filter-subcard-title {
  color: #dbb540 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  font-size: 10px !important;
  font-weight: 700 !important;
}

body[data-design="modern"] .filter-item label,
body[data-design="modern"] .filter-item-label {
  color: #b0b8cc !important;
}

body[data-design="modern"] .filter-range::-webkit-slider-thumb {
  background: #f0cc50 !important;
  border: 2px solid #111420 !important;
  box-shadow: 0 0 8px rgba(219,181,64,0.4) !important;
}

body[data-design="modern"] .filter-range::-webkit-slider-runnable-track {
  background: rgba(255,255,255,0.07) !important;
}

body[data-design="modern"] .filter-tab-btn {
  color: #8892aa !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
}
body[data-design="modern"] .filter-tab-btn:hover {
  color: #c0c8dd !important;
}
body[data-design="modern"] .filter-tab-btn.is-active {
  background: #dbb540 !important;
  color: #0a0c12 !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(219,181,64,0.2) !important;
}

body[data-design="modern"] .filter-range {
  accent-color: #dbb540 !important;
}
body[data-design="modern"] .filter-summary {
  background: rgba(255, 255, 255, 0.018) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
}
body[data-design="modern"] .filter-summary-title {
  color: #dbb540 !important;
}
body[data-design="modern"] .filter-summary-group-title {
  color: #f0cc50 !important;
  border-bottom-color: rgba(219, 181, 64, 0.15) !important;
}
body[data-design="modern"] .filter-summary-item-value {
  color: #dbb540 !important;
}

body[data-design="modern"] .filter-hits-check {
  accent-color: #dbb540 !important;
  border-color: #dbb540 !important;
}

body[data-design="modern"] .filter-step-btn {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  color: #b0b8cc !important;
}

body[data-design="modern"] .filter-step-btn:hover {
  border-color: #dbb540 !important;
  color: #dbb540 !important;
  background: rgba(219,181,64,0.08) !important;
}

body[data-design="modern"] .filter-select,
body[data-design="modern"] .filter-input {
  background: #0b0d14 !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  color: #f0eee8 !important;
  border-radius: 6px !important;
}

body[data-design="modern"] .filter-select:focus,
body[data-design="modern"] .filter-input:focus {
  border-color: rgba(219,181,64,0.35) !important;
  box-shadow: 0 0 0 3px rgba(219,181,64,0.08) !important;
}

body[data-design="modern"] .filter-slider-value {
  color: #5a6280 !important;
  font-family: 'JetBrains Mono', monospace !important;
}

body[data-design="modern"] .filters-collapse-btn {
  color: #dbb540 !important;
  border-color: rgba(219,181,64,0.2) !important;
}

body[data-design="modern"] .filters-collapse-btn:hover {
  background: rgba(219,181,64,0.08) !important;
}

body[data-design="modern"] .filters-collapse-chevron {
  color: #dbb540 !important;
}

/* ---- D18. Match Tabs ---- */
body[data-design="modern"] .matches-tabs {
  background: rgba(255,255,255,0.02) !important;
  border: 1px solid rgba(255,255,255,0.05) !important;
  border-radius: 8px !important;
}

body[data-design="modern"] .matches-tab-btn {
  color: #8892aa !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
}

body[data-design="modern"] .matches-tab-btn:hover {
  color: #c0c8dd !important;
}

body[data-design="modern"] .matches-tab-btn.is-active {
  background: #dbb540 !important;
  color: #0a0c12 !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(219,181,64,0.2) !important;
}

body[data-design="modern"] .matches-tab-count {
  background: rgba(255,255,255,0.06) !important;
}

body[data-design="modern"] .matches-tab-btn.is-active .matches-tab-count {
  background: rgba(0,0,0,0.15) !important;
  color: #0a0c12 !important;
}

/* ---- D19. Calendar & Help Icons ---- */
body[data-design="modern"] .match-calendar-toggle {
  background: rgba(255,255,255,0.015) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 8px !important;
  color: #8892aa !important;
}
body[data-design="modern"] .match-calendar-toggle:hover {
  border-color: rgba(219,181,64,0.4) !important;
  background: rgba(255,255,255,0.03) !important;
}
body[data-design="modern"] .match-calendar-toggle.is-active {
  background: rgba(219,181,64,0.12) !important;
  border-color: #dbb540 !important;
  color: #dbb540 !important;
}
body[data-design="modern"] .match-calendar {
  background: #111420 !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 10px !important;
}
body[data-design="modern"] .match-calendar-title { color: #e0e4ee !important; }
body[data-design="modern"] .match-calendar-nav {
  border-color: rgba(255,255,255,0.08) !important;
  color: #8892aa !important;
}
body[data-design="modern"] .match-calendar-nav:hover {
  border-color: rgba(219,181,64,0.4) !important;
  color: #dbb540 !important;
}
body[data-design="modern"] .match-calendar-weekdays span { color: #5a6278 !important; }
body[data-design="modern"] .match-calendar-day { color: #b0b8cc !important; }
body[data-design="modern"] .match-calendar-day:not(.is-empty):not(.is-future):not(.is-no-data):hover {
  background: rgba(219,181,64,0.06) !important;
  border-color: rgba(219,181,64,0.3) !important;
}
body[data-design="modern"] .match-calendar-day.is-today { border-color: #dbb540 !important; }
body[data-design="modern"] .match-calendar-day.is-selected {
  background: rgba(219,181,64,0.16) !important;
  border-color: #dbb540 !important;
  color: #dbb540 !important;
}
body[data-design="modern"] .cal-day-count { color: #dbb540 !important; }
body[data-design="modern"] .match-calendar-day.is-selected .cal-day-count { color: #b89530 !important; }

body[data-design="modern"] .filter-help-btn {
  border-color: rgba(255,255,255,0.08) !important;
  color: #5a6278 !important;
}
body[data-design="modern"] .filter-help-btn:hover {
  border-color: rgba(219,181,64,0.4) !important;
  color: #dbb540 !important;
  background: rgba(219,181,64,0.06) !important;
}
body[data-design="modern"] .filter-help-tooltip {
  background: #1a1e2e !important;
  border-color: rgba(255,255,255,0.08) !important;
  color: #c8cee0 !important;
}

/* ---- D20. Column Toggle ---- */
body[data-design="modern"] .column-toggle-box {
  background: #111420 !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 12px !important;
}

body[data-design="modern"] .column-toggle-item {
  border-color: rgba(255,255,255,0.04) !important;
}

body[data-design="modern"] .column-toggle-item:hover {
  background: rgba(219,181,64,0.04) !important;
}

body[data-design="modern"] .column-toggle-item .drag-indicator {
  color: #dbb540 !important;
}

/* ---- D21. Columns Modal ---- */
body[data-design="modern"] .column-toggle-box,
body[data-design="modern"] .pct-modal {
  background: rgba(12,16,24,0.95) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 12px !important;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5) !important;
}

/* ---- D21b. Leagues Modal ---- */
body[data-design="modern"] .league-country-header {
  color: #f0eee8 !important;
}
body[data-design="modern"] .league-country-header:hover {
  background: rgba(219,181,64,0.06) !important;
}
body[data-design="modern"] .league-item {
  color: #b0b8cc !important;
}
body[data-design="modern"] .league-item:hover {
  background: rgba(219,181,64,0.04) !important;
}
body[data-design="modern"] .league-country-checkbox,
body[data-design="modern"] .league-checkbox {
  accent-color: #dbb540 !important;
}
body[data-design="modern"] .leagues-count {
  color: #8892aa !important;
}

/* ---- D22. PCT Modal ---- */
body[data-design="modern"] .pct-modal-head {
  color: #dbb540 !important;
  border-bottom-color: rgba(255,255,255,0.06) !important;
}

body[data-design="modern"] .pct-modal-field input,
body[data-design="modern"] .pct-modal-field select {
  background: #0b0d14 !important;
  border-color: rgba(255,255,255,0.08) !important;
  color: #f0eee8 !important;
}

body[data-design="modern"] .pct-modal-field input:focus {
  border-color: rgba(219,181,64,0.35) !important;
}

body[data-design="modern"] .pct-modal-backdrop {
  background: rgba(0,0,0,0.6) !important;
  backdrop-filter: blur(4px) !important;
}

body[data-design="modern"] .pct-range-table th {
  background: #151928 !important;
  color: #5a6280 !important;
}

body[data-design="modern"] .pct-range-table td {
  border-color: rgba(255,255,255,0.04) !important;
}

/* ---- D23. Odds/Pro Popup ---- */
body[data-design="modern"] .odds-popup,
body[data-design="modern"] .cell-info-popup {
  background: rgba(12,16,24,0.95) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4) !important;
}

body[data-design="modern"] .odds-popup-title,
body[data-design="modern"] .cell-info-popup h3 {
  color: #dbb540 !important;
}

body[data-design="modern"] .cell-info-content {
  color: #9098ae !important;
}

/* ---- D24. Auth Pages ---- */
body[data-design="modern"] .auth-card {
  background: #111420 !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 12px !important;
}

body[data-design="modern"] .auth-card label {
  color: #dbb540 !important;
}

body[data-design="modern"] .auth-card input[type="text"],
body[data-design="modern"] .auth-card input[type="email"],
body[data-design="modern"] .auth-card input[type="password"] {
  background: #0b0d14 !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  color: #f0eee8 !important;
  border-radius: 8px !important;
}

body[data-design="modern"] .auth-card input:focus {
  border-color: rgba(219,181,64,0.35) !important;
  box-shadow: 0 0 0 3px rgba(219,181,64,0.08) !important;
}

/* ---- D25. Status Tags ---- */
body[data-design="modern"] .status-ok {
  background: rgba(45,217,122,0.14) !important;
  color: #2dd97a !important;
  border: 1px solid rgba(45,217,122,0.25) !important;
}

body[data-design="modern"] .status-nok {
  background: rgba(240,72,72,0.14) !important;
  color: #f04848 !important;
  border: 1px solid rgba(240,72,72,0.25) !important;
}

body[data-design="modern"] .status-warn {
  background: rgba(219,181,64,0.14) !important;
  color: #dbb540 !important;
  border: 1px solid rgba(219,181,64,0.25) !important;
}

body[data-design="modern"] .evidence-separator td {
  background: linear-gradient(90deg, transparent, rgba(219,181,64,0.15) 15%, rgba(219,181,64,0.15) 85%, transparent) !important;
}

body[data-design="modern"] .evidence-summary-label {
  color: rgba(219,181,64,0.5) !important;
}

/* ---- D26. Row Status Classes ---- */
body[data-design="modern"] .live-row > td {
  background: rgba(240,72,72,0.06) !important;
}

body[data-design="modern"] .settled-win-row > td {
  background: rgba(45,217,122,0.06) !important;
}

body[data-design="modern"] .settled-loss-row > td {
  background: rgba(240,72,72,0.06) !important;
}

body[data-design="modern"] .settled-mixed-row > td {
  background: rgba(240,168,48,0.06) !important;
}

body[data-design="modern"] .pending-row > td {
  background: rgba(80,144,224,0.06) !important;
}

/* ---- D27. Favorite Button ---- */
body[data-design="modern"] .favorite-btn {
  border: 1px solid rgba(255,255,255,0.10) !important;
  background: transparent !important;
  color: #8892aa !important;
  border-radius: 6px !important;
}

body[data-design="modern"] .favorite-btn:hover {
  border-color: #dbb540 !important;
  color: #dbb540 !important;
  background: rgba(219,181,64,0.08) !important;
}

body[data-design="modern"] .favorite-btn.is-favorite {
  color: #dbb540 !important;
  border-color: rgba(219,181,64,0.3) !important;
  background: rgba(219,181,64,0.1) !important;
}

/* ---- D28. Filters Collapse ---- */
body[data-design="modern"] .filters-collapse-header {
  color: #8892aa !important;
}

/* ---- D29. Profile ---- */
body[data-design="modern"] .profile-dropdown-menu {
  background: rgba(12,16,24,0.95) !important;
  backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 10px !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4) !important;
}

body[data-design="modern"] .profile-dropdown-item:hover {
  background: rgba(219,181,64,0.08) !important;
}

body[data-design="modern"] .profile-plan-pro {
  background: #dbb540 !important;
  color: #0a0c12 !important;
}
body[data-design="modern"] .profile-plan-trial {
  background: #3090e0 !important;
  color: #ffffff !important;
}

body[data-design="modern"] .profile-avatar {
  background: linear-gradient(135deg, #b89530, #dbb540) !important;
  color: #0a0c12 !important;
}

/* ---- D30. Theme Toggle ---- */
body[data-design="modern"] .theme-toggle {
  border: 1px solid rgba(255,255,255,0.08) !important;
  background: transparent !important;
  color: #9098ae !important;
}

body[data-design="modern"] .theme-toggle:hover {
  border-color: rgba(255,255,255,0.14) !important;
  color: #f0eee8 !important;
}

/* ---- D31. Design Toggle ---- */
body[data-design="modern"] .design-toggle {
  border-color: rgba(219,181,64,0.3) !important;
  background: rgba(219,181,64,0.12) !important;
  color: #dbb540 !important;
}

/* ---- D32. Last Update / Refresh Status ---- */
body[data-design="modern"] .topbar-update,
body[data-design="modern"] .refresh-status {
  background: rgba(255,255,255,0.02) !important;
  border: 1px solid rgba(255,255,255,0.05) !important;
  color: #5a6280 !important;
}

body[data-design="modern"] .topbar-update strong,
body[data-design="modern"] .refresh-status strong {
  color: #2dd97a !important;
}

/* ---- D33. Loading Spinner (Football) ---- */
body[data-design="modern"] .table-loading-spinner {
  --loading-accent: #dbb540 !important;
}
body[data-design="modern"] .loading-orbit-track {
  border-color: rgba(219,181,64,0.15) !important;
}
body[data-design="modern"] .loading-pct {
  color: rgba(219,181,64,0.7) !important;
}
body[data-design="modern"] .table-loading-text {
  color: rgba(219,181,64,0.6) !important;
}
body[data-design="modern"] .table-loading-step {
  color: rgba(219,181,64,0.4) !important;
}

/* ---- D34. Search ---- */
body[data-design="modern"] .search-standalone input,
body[data-design="modern"] .search-inline input,
body[data-design="modern"] .filter-search-row input {
  background: #111420 !important;
  border: 1px solid rgba(255,255,255,0.05) !important;
  color: #f0eee8 !important;
  border-radius: 8px !important;
}

body[data-design="modern"] .search-standalone input:focus,
body[data-design="modern"] .filter-search-row input:focus {
  border-color: rgba(219,181,64,0.35) !important;
  box-shadow: 0 0 0 3px rgba(219,181,64,0.08) !important;
}

body[data-design="modern"] .search-standalone input::placeholder,
body[data-design="modern"] .filter-search-row input::placeholder {
  color: #5a6280 !important;
}

/* ---- D35. Best Odd Badge, Locked Pill ---- */
body[data-design="modern"] .locked-pill {
  border: 1px solid rgba(255,255,255,0.08) !important;
  background: rgba(255,255,255,0.03) !important;
  color: #5a6280 !important;
  border-radius: 6px !important;
}

body[data-design="modern"] .locked-pill:hover {
  border-color: #dbb540 !important;
  color: #dbb540 !important;
}

/* ---- D36. Log Views ---- */
body[data-design="modern"] .refresh-log {
  background: #0b0d14 !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 10px !important;
  color: #9098ae !important;
}

/* ---- D37. Hero / Admin Bar ---- */
body[data-design="modern"] .hero {
  background: #111420 !important;
  border-color: rgba(255,255,255,0.05) !important;
}

body[data-design="modern"] .hero h1,
body[data-design="modern"] .hero h2 {
  color: #f0eee8 !important;
}

body[data-design="modern"] .hero-bar {
  background: #111420 !important;
  border-color: rgba(255,255,255,0.05) !important;
}

/* ---- D38. Misc Text and Links ---- */
body[data-design="modern"] a {
  color: #dbb540;
}

body[data-design="modern"] .card h2 {
  color: #dbb540 !important;
}

body[data-design="modern"] .data-refreshing-banner {
  background: rgba(219,181,64,0.12) !important;
  color: #dbb540 !important;
  border: 1px solid rgba(219,181,64,0.2) !important;
}

/* ---- D39. Odds movement indicators ---- */
body[data-design="modern"] .odds-up { color: #2dd97a !important; }
body[data-design="modern"] .odds-down { color: #f04848 !important; }
body[data-design="modern"] .odds-added { color: #5090e0 !important; }
body[data-design="modern"] .odds-removed { color: #f04848 !important; }

/* ---- D40. Empty row ---- */
body[data-design="modern"] .data-table .empty-row td {
  color: #5a6280 !important;
}

/* ---- D41. Header plan badge (modern) ---- */
body[data-design="modern"] .header-plan-badge-pro {
  background: rgba(219,181,64,0.15);
  color: #dbb540;
}
body[data-design="modern"] .header-plan-badge-trial {
  background: rgba(64,160,255,0.15);
  color: #60b0ff;
}
body[data-design="modern"] .admin-date-input {
  background: #111420;
  border-color: #2a3050;
  color: #e0ddd4;
}


/* ===================================================================
   "ONYX" MODERN DESIGN — LIGHT THEME
   Warm cream base with gold accents, high-contrast readable text
   =================================================================== */

/* ---- L1. Variables & Background ---- */
body[data-theme="light"][data-design="modern"] {
  --bg: #f0ede6;
  --ink: #1a1a24;
  --muted: #555e72;
  --card: #ffffff;
  --line: rgba(0,0,0,0.06);
  --accent: #a08020;
  --accent-2: #806818;
  --ok: #18a858;
  --bad: #d03030;
  background: #f0ede6 !important;
  color: #1a1a24 !important;
}

body[data-theme="light"][data-design="modern"] .page-bg {
  background:
    radial-gradient(ellipse at 15% 5%, rgba(180,150,60,0.04) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 95%, rgba(40,160,90,0.03) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 50%, #f0ede6 0%, #f0ede6 100%) !important;
}

/* ---- L2. Topbar ---- */
body[data-theme="light"][data-design="modern"] .topbar {
  background: rgba(255,255,255,0.88) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(0,0,0,0.08) !important;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04) !important;
}

body[data-theme="light"][data-design="modern"] .brand-title {
  color: #1a1a24 !important;
}

body[data-theme="light"][data-design="modern"] .brand-dot {
  color: #a08020 !important;
  opacity: 1 !important;
}

body[data-theme="light"][data-design="modern"] .nav a,
body[data-theme="light"][data-design="modern"] .nav-link-btn {
  color: #555e72 !important;
}

body[data-theme="light"][data-design="modern"] .nav a:hover,
body[data-theme="light"][data-design="modern"] .nav-link-btn:hover {
  color: #1a1a24 !important;
  background: rgba(0,0,0,0.04) !important;
}

body[data-theme="light"][data-design="modern"] .nav a.active,
body[data-theme="light"][data-design="modern"] .nav-link-btn.active {
  color: #a08020 !important;
  background: rgba(160,128,32,0.10) !important;
}

body[data-theme="light"][data-design="modern"] .brand-accent {
  color: #a08020 !important;
}

/* ---- L3. Cards ---- */
body[data-theme="light"][data-design="modern"] .card,
body[data-theme="light"][data-design="modern"] .metric-card,
body[data-theme="light"][data-design="modern"] .filters-card,
body[data-theme="light"][data-design="modern"] .auth-card {
  background: #ffffff !important;
  border: 1px solid rgba(0,0,0,0.06) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04) !important;
  border-radius: 12px !important;
}

body[data-theme="light"][data-design="modern"] .metric-card span {
  color: #8890a2 !important;
}

body[data-theme="light"][data-design="modern"] .metric-card strong {
  color: #1a1a24 !important;
}

/* ---- L4. Tables ---- */
body[data-theme="light"][data-design="modern"] .data-table,
body[data-theme="light"][data-design="modern"] .evidence-table,
body[data-theme="light"][data-design="modern"] .odds-detail-table,
body[data-theme="light"][data-design="modern"] .odds-popup-table,
body[data-theme="light"][data-design="modern"] .odds-history-table {
  background: #f7f5f0 !important;
}

body[data-theme="light"][data-design="modern"] .table-wrap {
  background: #f7f5f0 !important;
  border: 1px solid rgba(0,0,0,0.10) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
}

body[data-theme="light"][data-design="modern"] .data-table thead th,
body[data-theme="light"][data-design="modern"] .evidence-table thead th,
body[data-theme="light"][data-design="modern"] .odds-detail-table thead th {
  background: #f4f2ec !important;
  color: #8890a2 !important;
  border-bottom-color: rgba(0,0,0,0.08) !important;
}

body[data-theme="light"][data-design="modern"] .data-table tbody td,
body[data-theme="light"][data-design="modern"] .evidence-table tbody td {
  border-bottom-color: rgba(0,0,0,0.04) !important;
  color: #555e72 !important;
}

body[data-theme="light"][data-design="modern"] .data-table td.cell-match,
body[data-theme="light"][data-design="modern"] .data-table td.col-match {
  color: #1a1a24 !important;
}

/* ---- L5. Cell Colors (Light — pastel bg, dark readable text) ---- */
body[data-theme="light"][data-design="modern"] .data-table td.pct-user-dark-red,
body[data-theme="light"][data-design="modern"] .data-table td.pct-band-1 {
  background: #fce8e8 !important;
  color: #a01818 !important;
  font-weight: 600 !important;
}

body[data-theme="light"][data-design="modern"] .data-table td.pct-user-red,
body[data-theme="light"][data-design="modern"] .data-table td.pct-band-45 {
  background: #fef3dd !important;
  color: #8a5e00 !important;
  font-weight: 600 !important;
}

body[data-theme="light"][data-design="modern"] .data-table td.pct-user-orange,
body[data-theme="light"][data-design="modern"] .data-table td.pct-band-60 {
  background: #eef0f6 !important;
  color: #4a5068 !important;
}

body[data-theme="light"][data-design="modern"] .data-table td.pct-user-green,
body[data-theme="light"][data-design="modern"] .data-table td.pct-band-75 {
  background: #e2f8ec !important;
  color: #0e6e35 !important;
  font-weight: 600 !important;
}

body[data-theme="light"][data-design="modern"] .data-table td.pct-user-dark-green,
body[data-theme="light"][data-design="modern"] .data-table td.pct-band-90 {
  background: #dcf6f2 !important;
  color: #067060 !important;
  font-weight: 600 !important;
}

/* ---- L6. Table Hover ---- */
body[data-theme="light"][data-design="modern"] .data-table tbody tr:hover > td {
  background: rgba(160,128,32,0.06) !important;
}

body[data-theme="light"][data-design="modern"] .data-table td.table-hover-col {
  background: rgba(160,128,32,0.06) !important;
}

body[data-theme="light"][data-design="modern"] .data-table td.table-hover-focus {
  background: rgba(160,128,32,0.10) !important;
  box-shadow: inset 0 0 0 1px rgba(160,128,32,0.25) !important;
}

/* ---- L7. Tabs & Pills ---- */
body[data-theme="light"][data-design="modern"] .matches-tabs {
  background: rgba(0,0,0,0.02) !important;
  border-color: rgba(0,0,0,0.06) !important;
}

body[data-theme="light"][data-design="modern"] .matches-tab-btn {
  color: #8890a2 !important;
}

body[data-theme="light"][data-design="modern"] .matches-tab-btn:hover {
  color: #555e72 !important;
}

body[data-theme="light"][data-design="modern"] .matches-tab-btn.is-active {
  background: #a08020 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(160,128,32,0.15) !important;
}

body[data-theme="light"][data-design="modern"] .matches-tab-btn.is-active .matches-tab-count {
  background: rgba(255,255,255,0.25) !important;
  color: #ffffff !important;
}

body[data-theme="light"][data-design="modern"] .match-calendar-toggle {
  background: rgba(0,0,0,0.02) !important;
  border-color: rgba(0,0,0,0.06) !important;
  color: #6a6050 !important;
}
body[data-theme="light"][data-design="modern"] .match-calendar-toggle:hover {
  border-color: #a08020 !important;
}
body[data-theme="light"][data-design="modern"] .match-calendar-toggle.is-active {
  background: rgba(160,128,32,0.10) !important;
  border-color: #a08020 !important;
  color: #a08020 !important;
}
body[data-theme="light"][data-design="modern"] .match-calendar {
  background: #faf8f4 !important;
  border-color: rgba(0,0,0,0.06) !important;
}
body[data-theme="light"][data-design="modern"] .match-calendar-day.is-today { border-color: #a08020 !important; }
body[data-theme="light"][data-design="modern"] .match-calendar-day.is-selected {
  background: rgba(160,128,32,0.10) !important;
  border-color: #a08020 !important;
  color: #a08020 !important;
}
body[data-theme="light"][data-design="modern"] .cal-day-count { color: #a08020 !important; }
body[data-theme="light"][data-design="modern"] .filter-help-btn {
  border-color: rgba(0,0,0,0.10) !important;
  color: #9a8e7c !important;
}
body[data-theme="light"][data-design="modern"] .filter-help-btn:hover {
  border-color: #a08020 !important;
  color: #a08020 !important;
}
body[data-theme="light"][data-design="modern"] .filter-help-tooltip {
  background: #faf8f4 !important;
  border-color: rgba(0,0,0,0.10) !important;
  color: #3a3226 !important;
}

/* ---- L8. Filters ---- */
body[data-theme="light"][data-design="modern"] .filter-subcard {
  background: rgba(0,0,0,0.02) !important;
  border-color: rgba(0,0,0,0.06) !important;
}

body[data-theme="light"][data-design="modern"] .filter-subcard-title {
  color: #a08020 !important;
}

body[data-theme="light"][data-design="modern"] .filter-range {
  accent-color: #a08020 !important;
}

body[data-theme="light"][data-design="modern"] .filter-range::-webkit-slider-thumb {
  background: #a08020 !important;
}

body[data-theme="light"][data-design="modern"] .filter-hits-check {
  accent-color: #a08020 !important;
}

body[data-theme="light"][data-design="modern"] .filter-step-btn {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.10) !important;
  color: #555e72 !important;
}

body[data-theme="light"][data-design="modern"] .filter-step-btn:hover {
  border-color: #a08020 !important;
  color: #a08020 !important;
}

body[data-theme="light"][data-design="modern"] .filter-select,
body[data-theme="light"][data-design="modern"] .filter-input {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.10) !important;
  color: #1a1a24 !important;
}

body[data-theme="light"][data-design="modern"] .filter-select:focus,
body[data-theme="light"][data-design="modern"] .filter-input:focus {
  border-color: rgba(160,128,32,0.4) !important;
  box-shadow: 0 0 0 3px rgba(160,128,32,0.08) !important;
}

body[data-theme="light"][data-design="modern"] .filters-collapse-btn {
  color: #a08020 !important;
}

body[data-theme="light"][data-design="modern"] .filters-collapse-chevron {
  color: #a08020 !important;
}

/* ---- L9. Modals & Popups ---- */
body[data-theme="light"][data-design="modern"] .odds-popup,
body[data-theme="light"][data-design="modern"] .cell-info-popup,
body[data-theme="light"][data-design="modern"] .pct-modal,
body[data-theme="light"][data-design="modern"] .column-toggle-box {
  background: #ffffff !important;
  border: 1px solid rgba(160,128,32,0.15) !important;
  box-shadow: 0 16px 48px rgba(0,0,0,0.1) !important;
}

body[data-theme="light"][data-design="modern"] .league-country-header {
  color: #1a1a24 !important;
}
body[data-theme="light"][data-design="modern"] .league-country-header:hover {
  background: rgba(160,128,32,0.06) !important;
}
body[data-theme="light"][data-design="modern"] .league-item {
  color: #555e72 !important;
}
body[data-theme="light"][data-design="modern"] .league-item:hover {
  background: rgba(160,128,32,0.04) !important;
}
body[data-theme="light"][data-design="modern"] .league-country-checkbox,
body[data-theme="light"][data-design="modern"] .league-checkbox {
  accent-color: #a08020 !important;
}
body[data-theme="light"][data-design="modern"] .leagues-count {
  color: #888e9e !important;
}
body[data-theme="light"][data-design="modern"] .league-top-name {
  color: #a08020 !important;
}
body[data-theme="light"][data-design="modern"] .league-top-separator {
  background: rgba(0,0,0,0.08) !important;
}

body[data-theme="light"][data-design="modern"] .odds-popup-title,
body[data-theme="light"][data-design="modern"] .pct-modal-head {
  color: #a08020 !important;
}

/* ---- L10. Buttons ---- */
body[data-theme="light"][data-design="modern"] .btn-refresh:not(.btn-control) {
  background: linear-gradient(135deg, #a08020, #c09828) !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(160,128,32,0.12) !important;
}

body[data-theme="light"][data-design="modern"] .btn-control {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.10) !important;
  color: #555e72 !important;
}

body[data-theme="light"][data-design="modern"] .btn-control:hover {
  border-color: rgba(0,0,0,0.18) !important;
  color: #1a1a24 !important;
}

body[data-theme="light"][data-design="modern"] .btn-control.is-on {
  background: rgba(160,128,32,0.10) !important;
  border-color: rgba(160,128,32,0.25) !important;
  color: #a08020 !important;
}

/* ---- L11. Scrollbar ---- */
body[data-theme="light"][data-design="modern"] .table-wrap::-webkit-scrollbar-thumb,
body[data-theme="light"][data-design="modern"]::-webkit-scrollbar-thumb {
  background: #c0a848 !important;
}

body[data-theme="light"][data-design="modern"] .table-wrap::-webkit-scrollbar-track,
body[data-theme="light"][data-design="modern"]::-webkit-scrollbar-track {
  background: #f0ede6 !important;
}

/* ---- L12. Profile, Auth, Misc ---- */
body[data-theme="light"][data-design="modern"] .profile-dropdown-menu {
  background: #ffffff !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08) !important;
}

body[data-theme="light"][data-design="modern"] .profile-dropdown-item:hover {
  background: rgba(160,128,32,0.06) !important;
}

body[data-theme="light"][data-design="modern"] .profile-plan-pro {
  background: #a08020 !important;
  color: #ffffff !important;
}
body[data-theme="light"][data-design="modern"] .profile-plan-trial {
  background: #2070b0 !important;
  color: #ffffff !important;
}

body[data-theme="light"][data-design="modern"] .auth-card label {
  color: #a08020 !important;
}

body[data-theme="light"][data-design="modern"] .auth-card input[type="text"],
body[data-theme="light"][data-design="modern"] .auth-card input[type="email"],
body[data-theme="light"][data-design="modern"] .auth-card input[type="password"] {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.10) !important;
  color: #1a1a24 !important;
}

body[data-theme="light"][data-design="modern"] .auth-card input:focus {
  border-color: rgba(160,128,32,0.4) !important;
  box-shadow: 0 0 0 3px rgba(160,128,32,0.08) !important;
}

body[data-theme="light"][data-design="modern"] .card h2 {
  color: #a08020 !important;
}

body[data-theme="light"][data-design="modern"] .hero h1,
body[data-theme="light"][data-design="modern"] .hero h2 {
  color: #1a1a24 !important;
}

body[data-theme="light"][data-design="modern"] .search-standalone input,
body[data-theme="light"][data-design="modern"] .search-inline input,
body[data-theme="light"][data-design="modern"] .filter-search-row input {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.08) !important;
  color: #1a1a24 !important;
}

body[data-theme="light"][data-design="modern"] .search-standalone input:focus,
body[data-theme="light"][data-design="modern"] .filter-search-row input:focus {
  border-color: rgba(160,128,32,0.4) !important;
  box-shadow: 0 0 0 3px rgba(160,128,32,0.08) !important;
}

body[data-theme="light"][data-design="modern"] .expand-btn {
  border-color: rgba(0,0,0,0.10) !important;
  background: #ffffff !important;
  color: #8890a2 !important;
}

body[data-theme="light"][data-design="modern"] .expand-btn:hover {
  border-color: #a08020 !important;
  color: #a08020 !important;
}

body[data-theme="light"][data-design="modern"] .favorite-btn {
  border-color: rgba(0,0,0,0.10) !important;
  background: #ffffff !important;
  color: #8890a2 !important;
}

body[data-theme="light"][data-design="modern"] .favorite-btn:hover {
  border-color: #a08020 !important;
  color: #a08020 !important;
}

body[data-theme="light"][data-design="modern"] .theme-toggle {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.10) !important;
  color: #555e72 !important;
}

body[data-theme="light"][data-design="modern"] .design-toggle {
  background: rgba(160,128,32,0.10) !important;
  border-color: rgba(160,128,32,0.25) !important;
  color: #a08020 !important;
}

body[data-theme="light"][data-design="modern"] .evidence-row,
body[data-theme="light"][data-design="modern"] .evidence-inner {
  background: #f7f5f0 !important;
  border-color: rgba(0,0,0,0.04) !important;
}

body[data-theme="light"][data-design="modern"] .evidence-tab-btn.is-active {
  background: rgba(160,128,32,0.10) !important;
  color: #a08020 !important;
  border-color: rgba(160,128,32,0.25) !important;
}

body[data-theme="light"][data-design="modern"] .evidence-separator td {
  background: linear-gradient(90deg, transparent, rgba(160,128,32,0.15) 15%, rgba(160,128,32,0.15) 85%, transparent) !important;
}
body[data-theme="light"][data-design="modern"] .evidence-summary-label {
  color: rgba(160,128,32,0.5) !important;
}
body[data-theme="light"][data-design="modern"] .status-warn {
  background: rgba(160,128,32,0.1) !important;
  color: #a08020 !important;
  border: 1px solid rgba(160,128,32,0.2) !important;
}

body[data-theme="light"][data-design="modern"] .table-loading-spinner {
  --loading-accent: #a08020 !important;
}
body[data-theme="light"][data-design="modern"] .loading-orbit-track {
  border-color: rgba(160,128,32,0.12) !important;
}
body[data-theme="light"][data-design="modern"] .loading-pct {
  color: rgba(160,128,32,0.7) !important;
}
body[data-theme="light"][data-design="modern"] .table-loading-text {
  color: rgba(160,128,32,0.6) !important;
}
body[data-theme="light"][data-design="modern"] .table-loading-step {
  color: rgba(160,128,32,0.45) !important;
}

body[data-theme="light"][data-design="modern"] .data-refreshing-banner {
  background: rgba(160,128,32,0.08) !important;
  color: #a08020 !important;
  border-color: rgba(160,128,32,0.2) !important;
}

body[data-theme="light"][data-design="modern"] .refresh-log {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.06) !important;
}

/* ---- L-Header plan badge (modern+light) ---- */
body[data-theme="light"][data-design="modern"] .header-plan-badge-pro {
  background: rgba(160,128,32,0.12);
  color: #806818;
}
body[data-theme="light"][data-design="modern"] .header-plan-badge-trial {
  background: rgba(40,120,220,0.12);
  color: #2060b0;
}
body[data-theme="light"][data-design="modern"] .admin-date-input {
  background: #ffffff;
  border-color: rgba(0,0,0,0.12);
  color: #1a1a24;
}

/* ── Trial promo banner (non-logged-in users) ─────────── */
.trial-promo-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 16px;
  background: linear-gradient(90deg, #0a1a14 0%, #0e2018 50%, #0a1a14 100%);
  border-bottom: 1px solid rgba(102,212,199,0.22);
  font-size: 0.88rem;
  color: #e8f5f0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.trial-promo-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(102,212,199,0.08) 50%, transparent 100%);
  animation: trial-shimmer 3s ease-in-out infinite;
}
@keyframes trial-shimmer {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}
.trial-promo-icon { font-size: 1.15em; position: relative; z-index: 1; }
.trial-promo-text { font-weight: 600; position: relative; z-index: 1; }
.trial-promo-btn {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #d4a836 0%, #c49428 100%);
  color: #000 !important;
  padding: 7px 24px;
  border-radius: 8px;
  border: none;
  font-weight: 800;
  font-size: 0.85rem;
  text-decoration: none !important;
  white-space: nowrap;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(196,148,40,0.35);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.trial-promo-btn:hover {
  background: linear-gradient(135deg, #e0b63e 0%, #d4a836 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(196,148,40,0.45);
  color: #000 !important;
  text-decoration: none !important;
}
/* Light theme */
body[data-theme="light"] .trial-promo-bar {
  background: linear-gradient(90deg, #e0f5ed 0%, #c8edd9 50%, #e0f5ed 100%);
  border-bottom-color: rgba(26,138,126,0.18);
  color: #166b58;
}
body[data-theme="light"] .trial-promo-bar::before {
  background: linear-gradient(90deg, transparent 0%, rgba(26,138,126,0.06) 50%, transparent 100%);
}
body[data-theme="light"] .trial-promo-btn {
  background: #1a8a7e;
  color: #fff;
}
body[data-theme="light"] .trial-promo-btn:hover {
  background: #1f9b8e;
}
@media (max-width: 600px) {
  .trial-promo-bar {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    font-size: 0.82rem;
  }
  .trial-promo-btn { padding: 4px 12px; }
}

/* ─── Analyze Season Selector ─── */
.ad-season-wrap {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.ad-season-wrap label {
  font-size: 0.82rem; color: var(--muted, #8aa4bd); font-weight: 600;
  white-space: nowrap;
}
.ad-season-select {
  background: var(--card, #101924); color: var(--ink, #c8dbe8);
  border: 1px solid var(--line, rgba(255,255,255,0.12));
  border-radius: 6px; padding: 6px 10px; font-size: 0.85rem;
  font-family: inherit; cursor: pointer; min-width: 140px;
}
.ad-season-select:focus {
  outline: none; border-color: var(--accent, #00aaff);
}
body[data-theme="light"] .ad-season-select {
  background: #fff; color: #1a2a3a; border-color: #d0d8e0;
}
.ad-controls-wrap {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.ad-month-wrap {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.ad-month-wrap label {
  font-size: 0.82rem; color: var(--muted, #8aa4bd); font-weight: 600;
  white-space: nowrap;
}
.ad-month-wrap .ad-season-select { min-width: 120px; }
.ad-month-sep {
  color: var(--muted, #8aa4bd); font-size: 0.9rem;
}
.ad-generate-btn {
  background: var(--accent, #00aaff);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}
.ad-generate-btn:hover { opacity: 0.85; }
.ad-generate-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
body[data-theme="light"] .ad-generate-btn {
  background: #0088cc;
}
.panel-info {
  text-align: center; padding: 1.5rem 0;
  color: var(--accent, #00aaff); opacity: 0.8;
}

/* ─── Analyze Daily Breakdown ─── */
.ad-summary {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 0 0 12px; margin-top: -4px;
}
.ad-summary-card {
  flex: 1 1 120px; min-width: 100px;
  background: var(--card, #101924); border: 1px solid var(--line, rgba(255,255,255,0.06));
  border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 2px;
}
.ad-summary-label {
  font-size: 0.72rem; font-weight: 600; color: #8aa4bd;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.ad-summary-value {
  font-size: 1.4rem; font-weight: 700; color: var(--ink, #c8dbe8);
}
.ad-profit-pos { color: #2dd97a !important; }
.ad-profit-neg { color: #f04848 !important; }

.ad-filters-section { padding: 12px 16px; }
.ad-filters-bar {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: 0.82rem; color: var(--ink, #c8dbe8);
}
.ad-filter-tag {
  display: inline-block;
  background: rgba(76,175,80,0.12); color: #4caf50;
  border-radius: 4px; padding: 2px 8px;
  font-size: 0.78rem; font-weight: 600;
}

.ad-chart-section { position: relative; padding: 14px; }
.ad-chart-title {
  font-size: 0.9rem; color: #8aa4bd; margin: 0 0 8px; font-weight: 600;
}
#ad-chart { width: 100%; height: 200px; }

.ad-table {
  width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.ad-table th {
  text-align: left; padding: 8px 10px;
  font-size: 0.72rem; font-weight: 600;
  color: #8aa4bd; text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line, rgba(255,255,255,0.06));
}
.ad-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line, rgba(255,255,255,0.04));
  color: var(--ink, #c8dbe8);
}
.ad-day-row { cursor: pointer; transition: background 0.15s; }
.ad-day-row:hover {
  background: rgba(76,175,80,0.06);
}

/* Day detail popup */
.ad-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.ad-popup {
  background: var(--card, #101924); border: 1px solid var(--line, rgba(255,255,255,0.08));
  border-radius: 14px; width: 90%; max-width: 800px; max-height: 80vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.ad-popup .panel-header {
  padding: 14px 18px; border-bottom: 1px solid var(--line, rgba(255,255,255,0.06));
  display: flex; align-items: center; justify-content: space-between;
}
.ad-popup-body {
  padding: 14px 18px; overflow-y: auto; flex: 1;
}

.ad-detail-table {
  width: 100%; border-collapse: collapse; font-size: 0.82rem;
}
.ad-detail-table th {
  text-align: left; padding: 6px 8px;
  font-size: 0.7rem; font-weight: 600;
  color: #8aa4bd; text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line, rgba(255,255,255,0.06));
}
.ad-detail-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line, rgba(255,255,255,0.04));
  color: var(--ink, #c8dbe8);
}

.ad-day-summary {
  display: flex; flex-wrap: wrap; gap: 16px;
  padding: 12px 0 4px; margin-top: 10px;
  border-top: 1px solid var(--line, rgba(255,255,255,0.06));
  font-size: 0.85rem; color: var(--ink, #c8dbe8);
}
.ad-day-filters {
  margin-top: 8px; font-size: 0.82rem; color: #8aa4bd;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}

.ad-loading {
  padding: 60px 0; text-align: center;
}

/* Light theme overrides */
body[data-theme="light"] .ad-summary-label { color: #5a6a7a; }
body[data-theme="light"] .ad-summary-value { color: #1a2a3a; }
body[data-theme="light"] .ad-filter-tag {
  background: rgba(76,175,80,0.08); color: #2e7d32;
}
body[data-theme="light"] .ad-table th { color: #5a6a7a; }
body[data-theme="light"] .ad-table td { color: #1a2a3a; }
body[data-theme="light"] .ad-day-row:hover { background: rgba(76,175,80,0.04); }
body[data-theme="light"] .ad-detail-table th { color: #5a6a7a; }
body[data-theme="light"] .ad-detail-table td { color: #1a2a3a; }
body[data-theme="light"] .ad-chart-title { color: #5a6a7a; }
body[data-theme="light"] .ad-day-filters { color: #5a6a7a; }

@media (max-width: 600px) {
  .ad-summary { gap: 6px; }
  .ad-summary-card { flex: 1 1 80px; min-width: 70px; padding: 8px 10px; }
  .ad-summary-value { font-size: 1.1rem; }
  .ad-table { font-size: 0.78rem; }
  .ad-table th, .ad-table td { padding: 6px 6px; }
  .ad-popup { width: 96%; max-height: 90vh; }
  .ad-detail-table { font-size: 0.75rem; }
}

/* BTTS Recommendation badges */
.rec-bet { color: #1f7a3f; font-weight: 700; }
.rec-moderate { color: #b8860b; font-weight: 600; }
.rec-skip { color: #9f2f26; font-weight: 600; }
