* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f6f2e9;
  --bg-soft: #fffdf7;
  --bg-surface: rgba(248, 250, 252, 0.7);
  --ink: #0f172a;
  --ink-soft: #1f2937;
  --muted: #6b7280;
  --accent: #f59e0b;
  --accent-2: #14b8a6;
  --accent-3: #0ea5e9;
  --danger: #ef4444;
  --success: #16a34a;
  --tier-elite: #f59e0b;
  --tier-prime: #14b8a6;
  --tier-strong: #0ea5e9;
  --tier-watch: #64748b;
  --tier-longshot: #ef4444;
  --tier-perfect: #22c55e;
  --tier-solid: #8b5cf6;
  --risk-low: #16a34a;
  --risk-moderate: #f59e0b;
  --risk-high: #ef4444;
  --border: rgba(15, 23, 42, 0.12);
  --border-soft: rgba(15, 23, 42, 0.08);
  --shadow: 0 28px 70px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 16px 32px rgba(15, 23, 42, 0.08);
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 76px;
}

body.app {
  font-family: "Sora", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: linear-gradient(140deg, #f7f3ea 0%, #f3eee4 40%, #efe8dc 100%);
  min-height: 100vh;
}

body.app.auth {
  --auth-surface: rgba(248, 250, 252, 0.92);
  --auth-border: rgba(15, 23, 42, 0.12);
  --auth-shadow: 0 32px 80px rgba(15, 23, 42, 0.16);
  --auth-gold: rgba(245, 158, 11, 0.35);
  --auth-blue: rgba(14, 165, 233, 0.35);
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top, #f8fafc 0%, #eef2f5 55%, #e2e8f0 100%);
}

body.app.auth .ambient-grid {
  opacity: 0.35;
}

body.app.auth .ambient-glow {
  opacity: 0.28;
}

.ambient-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
  background-size: 120px 120px;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}

.ambient-glow {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}

.glow-1 {
  top: -140px;
  right: -120px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.35), transparent 70%);
}

.glow-2 {
  bottom: -160px;
  left: -80px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.3), transparent 70%);
}

body.app.auth .auth-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

body.app.auth .auth-abacus {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0.88;
  filter: drop-shadow(0 26px 50px rgba(15, 23, 42, 0.2));
  animation: abacus-drift 24s ease-in-out infinite;
}

body.app.auth .abacus-frame {
  position: relative;
  width: 100vw;
  height: 100vh;
  padding: clamp(70px, 9vw, 140px) clamp(80px, 12vw, 160px);
  display: grid;
  gap: clamp(24px, 3.2vh, 36px);
  border-radius: 0;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    linear-gradient(160deg, #0f172a 0%, #1f2937 45%, #0b1220 100%);
  box-shadow: inset 0 0 120px rgba(2, 6, 23, 0.5);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

body.app.auth .abacus-frame::before {
  content: "";
  position: absolute;
  inset: clamp(18px, 3vw, 34px);
  border-radius: 0;
  border: 1px solid rgba(226, 232, 240, 0.28);
  opacity: 0.6;
  pointer-events: none;
}

body.app.auth .abacus-frame::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: linear-gradient(120deg,
      rgba(255, 255, 255, 0) 30%,
      rgba(255, 255, 255, 0.45) 45%,
      rgba(255, 255, 255, 0) 60%);
  opacity: 0.4;
  animation: abacus-shine 12s ease-in-out infinite;
  pointer-events: none;
}

body.app.auth .abacus-frame>* {
  position: relative;
  z-index: 1;
}

body.app.auth .abacus-post {
  position: absolute;
  top: clamp(22px, 3.5vh, 40px);
  bottom: clamp(22px, 3.5vh, 40px);
  width: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.7), rgba(100, 116, 139, 0.55));
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.35);
}

body.app.auth .abacus-post.post-left {
  left: clamp(18px, 3vw, 42px);
}

body.app.auth .abacus-post.post-right {
  right: clamp(18px, 3vw, 42px);
}

body.app.auth .abacus-rod {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg,
      rgba(148, 163, 184, 0.95),
      rgba(226, 232, 240, 0.7),
      rgba(100, 116, 139, 0.9));
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.4),
    0 6px 16px rgba(2, 6, 23, 0.45);
}

body.app.auth .abacus-bead {
  position: absolute;
  top: 50%;
  left: var(--bead-x);
  width: 44px;
  height: 32px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0) 45%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(14, 165, 233, 0.45));
  box-shadow:
    inset 0 1px 3px rgba(255, 255, 255, 0.35),
    0 12px 20px rgba(2, 6, 23, 0.45);
  transform: translate(-50%, -50%) translateX(calc(var(--bead-shift) * -1));
  animation: bead-glide 9s ease-in-out infinite;
  animation-delay: var(--bead-delay, 0s);
}

body.app.auth .auth-orb {
  position: absolute;
  border-radius: 999px;
  opacity: 0.08;
  animation: orb-float 26s ease-in-out infinite;
}

body.app.auth .orb-1 {
  width: 360px;
  height: 360px;
  top: -140px;
  left: -120px;
  background: radial-gradient(circle at 30% 30%, var(--auth-gold), rgba(245, 158, 11, 0) 68%);
  animation-duration: 30s;
}

body.app.auth .orb-2 {
  width: 280px;
  height: 280px;
  bottom: -140px;
  right: -80px;
  background: radial-gradient(circle at 70% 30%, var(--auth-blue), rgba(14, 165, 233, 0) 68%);
  animation-duration: 34s;
  animation-delay: -8s;
}

body.app.auth .orb-3 {
  width: 200px;
  height: 200px;
  top: 18%;
  right: 14%;
  background: radial-gradient(circle at 30% 30%, rgba(20, 184, 166, 0.35), rgba(20, 184, 166, 0) 68%);
  animation-duration: 24s;
  animation-delay: -6s;
}

body.app.auth .orb-4 {
  width: 160px;
  height: 160px;
  bottom: 18%;
  left: 16%;
  background: radial-gradient(circle at 40% 40%, rgba(245, 158, 11, 0.28), rgba(245, 158, 11, 0) 68%);
  animation-duration: 22s;
  animation-delay: -12s;
}

body.app.auth .auth-beam {
  position: absolute;
  width: 480px;
  height: 140px;
  border-radius: 999px;
  opacity: 0.08;
  background: linear-gradient(120deg,
      rgba(245, 158, 11, 0.12),
      rgba(14, 165, 233, 0.18),
      rgba(245, 158, 11, 0));
  animation: beam-drift 34s ease-in-out infinite;
}

body.app.auth .beam-1 {
  --beam-rotate: -12deg;
  top: 18%;
  left: -10%;
}

body.app.auth .beam-2 {
  --beam-rotate: 18deg;
  bottom: 6%;
  right: -12%;
  animation-duration: 40s;
  animation-delay: -12s;
}

body.app.auth .auth-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
  animation: spark-flicker 6s ease-in-out infinite;
}

body.app.auth .spark-1 {
  top: 24%;
  left: 24%;
  animation-delay: -1s;
}

body.app.auth .spark-2 {
  top: 62%;
  right: 26%;
  animation-delay: -3s;
}

body.app.auth .spark-3 {
  bottom: 28%;
  left: 44%;
  animation-delay: -4s;
}

body.app.auth .spark-4 {
  top: 14%;
  right: 42%;
  animation-delay: -2s;
}

.layout {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

.auth-layout {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 20px;
}

.auth-stack {
  width: min(620px, 96vw);
  display: grid;
  gap: 24px;
}

body.app.auth .auth-card {
  position: relative;
  border-radius: 24px;
  background: linear-gradient(160deg, var(--auth-surface), #ffffff);
  border: 1px solid var(--auth-border);
  box-shadow: var(--auth-shadow);
  padding: 40px;
  overflow: hidden;
  backdrop-filter: blur(6px);
  animation: auth-enter 0.6s ease both;
}

body.app.auth .auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 15%, rgba(245, 158, 11, 0.22), transparent 55%),
    radial-gradient(circle at 85% 85%, rgba(14, 165, 233, 0.16), transparent 55%);
  opacity: 0.75;
  pointer-events: none;
}

body.app.auth .auth-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.6);
  opacity: 0.35;
  pointer-events: none;
}

body.app.auth .auth-card>* {
  position: relative;
  z-index: 1;
}

body.app.auth .auth-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

body.app.auth .auth-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #0f172a;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 16px 35px rgba(245, 158, 11, 0.35);
}

body.app.auth .auth-mark svg {
  width: 34px;
  height: 34px;
  display: block;
}

body.app.auth .auth-title {
  font-size: 1.65rem;
  font-weight: 700;
  white-space: nowrap;
}

body.app.auth .auth-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 4px;
}

body.app.auth .auth-form {
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
}

body.app.auth .auth-form label span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

body.app.auth .auth-card input {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.app.auth .auth-card input:focus {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
  outline: none;
}

body.app.auth .auth-actions {
  display: grid;
  gap: 10px;
}

body.app.auth .auth-actions .btn.primary {
  width: 100%;
  justify-content: center;
  letter-spacing: 0.03em;
  box-shadow: 0 16px 35px rgba(245, 158, 11, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.app.auth .auth-actions .btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.45);
}

body.app.auth .auth-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
}

body.app.auth .auth-links .btn.ghost {
  border-color: transparent;
  padding: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

body.app.auth .auth-links .btn.ghost:hover {
  color: var(--ink);
  border-color: transparent;
}

body.app.auth .auth-form label,
body.app.auth .auth-actions,
body.app.auth .auth-links {
  animation: auth-stagger 0.6s ease both;
}

body.app.auth .auth-form label:nth-of-type(1) {
  animation-delay: 0.05s;
}

body.app.auth .auth-form label:nth-of-type(2) {
  animation-delay: 0.1s;
}

body.app.auth .auth-actions {
  animation-delay: 0.16s;
}

body.app.auth .auth-links {
  animation-delay: 0.22s;
}

@keyframes auth-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes auth-stagger {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes orb-float {

  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(18px, 22px, 0);
  }
}

@keyframes beam-drift {

  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(var(--beam-rotate));
  }

  50% {
    transform: translate3d(30px, -18px, 0) rotate(var(--beam-rotate));
  }
}

@keyframes spark-flicker {

  0%,
  100% {
    opacity: 0.75;
    transform: scale(1);
  }

  50% {
    opacity: 0.35;
    transform: scale(0.6);
  }
}

@keyframes abacus-drift {

  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(16px) rotate(1deg);
  }
}

@keyframes abacus-shine {

  0%,
  100% {
    transform: translateX(-20%);
  }

  50% {
    transform: translateX(20%);
  }
}

@keyframes bead-glide {

  0%,
  100% {
    transform: translate(-50%, -50%) translateX(calc(var(--bead-shift) * -1));
  }

  50% {
    transform: translate(-50%, -50%) translateX(var(--bead-shift));
  }
}

@media (max-width: 520px) {
  body.app.auth .auth-card {
    padding: 22px;
  }

  body.app.auth .auth-header {
    align-items: flex-start;
    flex-direction: column;
  }

  body.app.auth .auth-mark {
    width: 46px;
    height: 46px;
  }

  body.app.auth .auth-title {
    font-size: 1.35rem;
    white-space: normal;
  }

  body.app.auth .auth-links {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {

  body.app.auth .auth-card,
  body.app.auth .auth-form label,
  body.app.auth .auth-actions,
  body.app.auth .auth-links,
  body.app.auth .auth-atmosphere * {
    animation: none;
  }
}

.sidebar {
  width: var(--sidebar-width);
  background: #0f172a;
  color: #e2e8f0;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width 0.2s ease, padding 0.2s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-core {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #0f172a;
  font-weight: 700;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.brand-sub {
  font-size: 0.75rem;
  color: rgba(226, 232, 240, 0.7);
}

.sidebar-collapse {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.12);
  color: rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  font-size: 0.72rem;
  padding: 6px 10px;
  cursor: pointer;
  transition: 0.2s ease;
  white-space: nowrap;
}

.sidebar-collapse:hover {
  background: rgba(148, 163, 184, 0.24);
  color: #fff;
}

.nav-group {
  display: grid;
  gap: 8px;
}

.nav-label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.65rem;
  color: rgba(226, 232, 240, 0.5);
  margin-bottom: 6px;
}

.nav-link {
  color: rgba(226, 232, 240, 0.75);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  border: 1px solid transparent;
  transition: 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-text {
  display: inline-flex;
}

.nav-link::before {
  content: attr(data-short);
  display: none;
  min-width: 32px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(226, 232, 240, 0.85);
}

.nav-user {
  color: rgba(226, 232, 240, 0.8);
  font-size: 0.8rem;
  padding: 4px 12px;
}

.nav-button {
  background: transparent;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(15, 23, 42, 0.4);
}

.sidebar-footer {
  margin-top: auto;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.72rem;
  display: grid;
  gap: 6px;
}

.sidebar-footer.is-collapsed .footer-body {
  display: none;
}

.footer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.footer-toggle {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.12);
  color: rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  font-size: 0.7rem;
  padding: 4px 10px;
  cursor: pointer;
  transition: 0.2s ease;
}

.footer-toggle:hover {
  background: rgba(148, 163, 184, 0.22);
  color: #fff;
}

.footer-title {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(226, 232, 240, 0.6);
  font-size: 0.62rem;
}

.footer-body {
  display: grid;
  gap: 6px;
}

.footer-badge {
  font-weight: 600;
  color: #f8fafc;
}

.footer-sub {
  color: rgba(226, 232, 240, 0.6);
}

.footer-note {
  color: rgba(226, 232, 240, 0.6);
  font-size: 0.65rem;
  line-height: 1.3;
}

.footer-grid {
  display: grid;
  gap: 4px;
}

.footer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: rgba(226, 232, 240, 0.7);
}

.footer-item strong {
  color: #f8fafc;
  font-weight: 600;
  text-align: right;
}

.footer-version {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(226, 232, 240, 0.15);
  font-size: 0.65rem;
  color: rgba(226, 232, 240, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-version [data-code-hash-display] {
  opacity: 0.7;
}

.footer-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-pill.ok {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

.footer-pill.warn {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
}

.footer-pill.bad {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

.footer-empty {
  font-weight: 600;
  color: #f8fafc;
}

.content {
  flex: 1;
  padding: 32px 40px 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.page-title {
  font-size: 2.2rem;
  font-weight: 700;
}

.page-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 6px;
}

.topbar-actions {
  display: flex;
  gap: 12px;
}

.sidebar-toggle {
  display: inline-flex;
  white-space: nowrap;
}

.sidebar-overlay {
  display: none;
}

body.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-width);
  padding: 24px 12px;
}

body.sidebar-collapsed .brand-text {
  display: none;
}

body.sidebar-collapsed .sidebar-brand {
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

body.sidebar-collapsed .brand-core {
  justify-content: center;
}

body.sidebar-collapsed .sidebar-collapse {
  padding: 6px;
  min-width: 40px;
  text-align: center;
}

body.sidebar-collapsed .nav-label {
  display: none;
}

body.sidebar-collapsed .nav-group {
  justify-items: center;
}

body.sidebar-collapsed .nav-link {
  justify-content: center;
  padding: 10px;
  gap: 0;
}

body.sidebar-collapsed .nav-link::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.14);
}

body.sidebar-collapsed .nav-link.active::before {
  border-color: rgba(245, 158, 11, 0.6);
  color: #fcd34d;
}

body.sidebar-collapsed .nav-text {
  display: none;
}

body.sidebar-collapsed .nav-user {
  display: none;
}

body.sidebar-collapsed .sidebar-footer {
  display: none;
}

.page {
  display: grid;
  gap: 32px;
}

.page>* {
  animation: rise 0.6s ease both;
}

.page>*:nth-child(1) {
  animation-delay: 0.05s;
}

.page>*:nth-child(2) {
  animation-delay: 0.1s;
}

.page>*:nth-child(3) {
  animation-delay: 0.15s;
}

.page>*:nth-child(4) {
  animation-delay: 0.2s;
}

.page>*:nth-child(5) {
  animation-delay: 0.25s;
}

.page>*:nth-child(6) {
  animation-delay: 0.3s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.trend-hero {
  grid-template-columns: minmax(0, 1fr);
}

.trend-hero-merged {
  background: var(--bg-soft);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 18px;
}

.trend-hero-header {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.6fr);
  gap: 20px;
  align-items: start;
}

.trend-hero-title-group {
  display: grid;
  gap: 6px;
}

.trend-hero-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.trend-hero-title-row h2 {
  font-size: 1.9rem;
  margin: 6px 0;
}

.trend-hero-status-pill {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.55rem;
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.12);
  color: rgba(15, 23, 42, 0.7);
}

.trend-hero-subline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--muted);
}

.trend-hero-sub-divider {
  opacity: 0.5;
}

.trend-hero-summary-text {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.trend-hero-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.trend-hero-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.trend-hero-action-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.trend-hero-glance {
  display: grid;
  gap: 12px;
}

.trend-hero-glance-grid {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 12px;
  color: rgba(15, 23, 42, 0.7);
}

.trend-hero-glance-grid .panel-kv-label {
  color: rgba(71, 85, 105, 0.8);
}

.trend-hero-glance-grid .panel-kv-value {
  color: rgba(15, 23, 42, 0.85);
}

.trend-hero-detail {
  display: grid;
}

.trend-hero-status {
  background: #111827;
  color: #f8fafc;
  border-radius: 18px;
  padding: 18px;
  display: grid;
  gap: 12px;
}

.trend-hero-status-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.trend-hero-status-main,
.trend-hero-status-side {
  display: grid;
  gap: 12px;
}

.trend-hero-merged.is-collapsed {
  gap: 14px;
}

.trend-hero-merged.is-collapsed .trend-hero-detail,
.trend-hero-merged.is-collapsed .trend-hero-summary-text,
.trend-hero-merged.is-collapsed .trend-hero-action-pills,
.trend-hero-merged.is-collapsed .trend-hero-delta {
  display: none;
}

.hero-card {
  background: var(--bg-soft);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.7rem;
  color: rgba(15, 23, 42, 0.5);
}

.hero-metrics {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  display: grid;
  gap: 16px;
}

.hero-main {
  background: var(--bg-soft);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.hero-main h1,
.hero-main h2 {
  font-size: 1.9rem;
  margin: 10px 0 8px;
}

.hero-card h1,
.hero-card h2 {
  font-size: 2.3rem;
  margin: 16px 0 12px;
}

.hero-main p {
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.hero-panel {
  background: #111827;
  color: #f8fafc;
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.hero-panel.live-panel {
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(15, 23, 42, 0.96));
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.7rem;
  color: rgba(15, 23, 42, 0.5);
}

.panel-title {
  font-size: 0.75rem;
  color: rgba(248, 250, 252, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-value {
  font-size: 1.45rem;
  font-weight: 700;
}

.panel-sub {
  color: rgba(248, 250, 252, 0.7);
}

.panel-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: rgba(248, 250, 252, 0.7);
}

.panel-head {
  display: grid;
  gap: 4px;
}

.panel-progress {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.panel-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.7);
}

.panel-progress-label {
  font-weight: 600;
}

.panel-progress-bar {
  position: relative;
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.3);
  overflow: hidden;
}

.panel-progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #0ea5e9);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
  transition: width 0.35s ease;
}

.panel-progress-bar.is-indeterminate .panel-progress-fill {
  animation: hero-progress 1.2s linear infinite;
  background-size: 200% 100%;
}

.panel-progress-bar.is-stalled {
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(248, 113, 113, 0.18);
}

.panel-progress-bar.is-stalled .panel-progress-fill {
  background: linear-gradient(90deg, #f97316, #ef4444);
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.45);
  animation: stall-pulse 1.6s ease-in-out infinite;
}

.panel-roadmap {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.panel-roadmap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-roadmap-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(226, 232, 240, 0.65);
}

.panel-roadmap-step,
.panel-roadmap-phase {
  font-weight: 600;
}

.panel-roadmap-note {
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 0.8);
  line-height: 1.4;
}

.panel-steps {
  display: grid;
  gap: 8px;
}

.panel-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.35);
}

.panel-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.7);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.4);
  flex: 0 0 8px;
}

.panel-step-body {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.panel-step-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.95);
}

.anchor-hero {
  grid-template-columns: minmax(0, 1fr);
}

.anchor-hero-shell {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.08), rgba(59, 130, 246, 0.08));
  border-radius: 24px;
  padding: 24px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}

.anchor-hero-header {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 20px;
  align-items: start;
}

.anchor-hero-header h2 {
  font-size: 2rem;
  margin: 8px 0;
}

.anchor-hero-sub {
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.98rem;
}

.anchor-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.anchor-hero-metrics {
  display: grid;
  gap: 12px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.anchor-metric {
  display: grid;
  gap: 4px;
}

.anchor-metric-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(15, 23, 42, 0.6);
}

.anchor-metric-value {
  font-weight: 600;
  color: rgba(15, 23, 42, 0.9);
}

.anchor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 20px;
  align-items: start;
}

.anchor-left {
  display: grid;
  gap: 18px;
}

.anchor-right {
  display: grid;
  gap: 18px;
}

.anchor-builder .form-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.anchor-builder textarea {
  min-height: 120px;
}

.anchor-range {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  align-items: end;
}

.anchor-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.anchor-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.anchor-summary-card {
  background: rgba(15, 23, 42, 0.04);
  border-radius: 16px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 6px;
}

.anchor-summary-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(15, 23, 42, 0.6);
}

.anchor-summary-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.9);
}

.anchor-summary-sub {
  color: var(--muted);
  font-size: 0.8rem;
}

.anchor-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.anchor-table {
  overflow: auto;
  margin-top: 12px;
}

.anchor-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.anchor-table th,
.anchor-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  text-align: left;
}

.anchor-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(15, 23, 42, 0.5);
}

.anchor-table tr:hover {
  background: rgba(59, 130, 246, 0.06);
}

.tag.anchor-anchor {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
  color: #15803d;
}

.tag.anchor-strong {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
  color: #1d4ed8;
}

.tag.anchor-fade {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.3);
  color: #b91c1c;
}

.anchor-filter-panel {
  position: sticky;
  top: 16px;
  z-index: 2;
}

@media (max-width: 1100px) {
  .anchor-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .anchor-filter-panel {
    position: static;
  }

  .anchor-hero-header {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ============================================================================
   ANCHOR LAB - PREMIUM CANDIDATE CARDS & HERO ENHANCEMENTS
   ============================================================================ */

.anchor-hero-title-group {
  display: grid;
  gap: 8px;
}

.anchor-hero-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.anchor-hero-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.anchor-hero-action-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.anchor-status-pill {
  font-size: 0.68rem;
  font-weight: 600;
}

.anchor-status-pill.is-loading {
  animation: pulse 1s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.anchor-hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.anchor-hero-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: grid;
  gap: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.anchor-hero-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.anchor-hero-card[data-tier="perfect"] {
  border-left: 4px solid var(--tier-perfect);
}

.anchor-hero-card[data-tier="elite"] {
  border-left: 4px solid var(--tier-elite);
}

.anchor-hero-card[data-tier="strong"] {
  border-left: 4px solid var(--tier-strong);
}

.anchor-hero-card[data-tier="solid"] {
  border-left: 4px solid var(--tier-solid);
}

.anchor-hero-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(15, 23, 42, 0.6);
}

.anchor-hero-value {
  font-size: 2rem;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.9);
  line-height: 1;
}

.anchor-hero-card .anchor-hero-sub {
  font-size: 0.72rem;
  color: var(--muted);
}

.anchor-hero-validation {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 14px 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

/* Candidate Grid */
.anchor-candidates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.anchor-candidate-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: grid;
  gap: 12px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.anchor-candidate-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.anchor-candidate-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.anchor-candidate-title {
  display: grid;
  gap: 2px;
}

.anchor-candidate-player {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}

.anchor-candidate-prop {
  font-size: 0.8rem;
  color: var(--muted);
}

.anchor-candidate-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.anchor-candidate-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.anchor-line-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}

.anchor-line-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.anchor-candidate-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.anchor-stat {
  display: grid;
  gap: 2px;
  text-align: center;
}

.anchor-stat-value {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}

.anchor-stat-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.anchor-candidate-context {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.anchor-candidate-evidence {
  margin-top: 8px;
}

.anchor-evidence-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.anchor-evidence-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.anchor-evidence-table {
  margin-top: 8px;
}

.anchor-evidence-table.is-hidden {
  display: none;
}

.anchor-evidence-table table {
  width: 100%;
  font-size: 0.8rem;
  border-collapse: collapse;
}

.anchor-evidence-table th,
.anchor-evidence-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.anchor-evidence-table th {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.anchor-candidate-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* Tier tag styles for anchors */
.tag.tier-perfect {
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.4);
}

.tag.tier-solid {
  background: rgba(139, 92, 246, 0.18);
  color: #6d28d9;
  border-color: rgba(139, 92, 246, 0.4);
}

/* Risk pill variants */
.pill.risk-low {
  background: rgba(22, 163, 74, 0.15);
  color: #166534;
}

.pill.risk-moderate {
  background: rgba(245, 158, 11, 0.15);
  color: #92400e;
}

.pill.risk-high {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

/* [PHASE6] Signal tier badges */
.tag.tier-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.tag.tier-core {
  background: rgba(34, 197, 94, 0.2);
  color: #166534;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.tag.tier-contextual {
  background: rgba(234, 179, 8, 0.2);
  color: #a16207;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.tag.tier-experimental {
  background: rgba(249, 115, 22, 0.2);
  color: #c2410c;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.tag.flagship-badge {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(59, 130, 246, 0.25));
  color: #6d28d9;
  border: 1px solid rgba(139, 92, 246, 0.5);
  font-weight: 700;
  animation: flagship-pulse 2s ease-in-out infinite;
}

@keyframes flagship-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.3); }
  50% { box-shadow: 0 0 8px 2px rgba(139, 92, 246, 0.4); }
}

.tag.proxy-badge {
  background: rgba(107, 114, 128, 0.15);
  color: #4b5563;
  border: 1px solid rgba(107, 114, 128, 0.3);
  font-style: italic;
}

.pill.shrunk-rate {
  background: rgba(59, 130, 246, 0.15);
  color: #1d4ed8;
  font-weight: 600;
}

/* Flagship trend item highlight */
.trend-item[data-is-flagship="true"] {
  border-left: 3px solid #8b5cf6;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.05), transparent);
}

/* Proxy trend item styling */
.trend-item[data-is-proxy="true"] {
  border-left: 3px solid #6b7280;
  opacity: 0.95;
}

/* Builder layout */
.anchor-builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 20px;
  align-items: start;
}

.anchor-results-panel {
  min-height: 400px;
}

.anchor-results-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Glossary styles */
.glossary-grid {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.glossary-item {
  display: grid;
  gap: 4px;
}

.glossary-term {
  font-weight: 700;
  font-size: 0.9rem;
}

.glossary-term.tier-perfect {
  color: var(--tier-perfect);
}

.glossary-term.tier-elite {
  color: var(--tier-elite);
}

.glossary-term.tier-strong {
  color: var(--tier-strong);
}

.glossary-term.tier-solid {
  color: var(--tier-solid);
}

.glossary-def {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .anchor-hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .anchor-candidates-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .anchor-builder-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .anchor-candidate-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.panel-step-sub {
  font-size: 0.68rem;
  color: rgba(226, 232, 240, 0.7);
}

.panel-step-status {
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: rgba(226, 232, 240, 0.7);
}

.panel-step.is-active {
  border-color: rgba(14, 165, 233, 0.55);
  background: rgba(14, 165, 233, 0.12);
}

.panel-step.is-active .panel-step-dot {
  background: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.panel-step.is-active .panel-step-status {
  color: rgba(56, 189, 248, 0.9);
  border-color: rgba(56, 189, 248, 0.6);
}

.panel-step.is-done {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.12);
}

.panel-step.is-done .panel-step-dot {
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.panel-step.is-done .panel-step-status {
  color: rgba(34, 197, 94, 0.9);
  border-color: rgba(34, 197, 94, 0.5);
}

.panel-step.is-error {
  border-color: rgba(239, 68, 68, 0.6);
  background: rgba(239, 68, 68, 0.12);
}

.panel-step.is-error .panel-step-dot {
  background: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.panel-step.is-error .panel-step-status {
  color: rgba(239, 68, 68, 0.95);
  border-color: rgba(239, 68, 68, 0.6);
}

.panel-roadmap-footer {
  font-size: 0.68rem;
  color: rgba(226, 232, 240, 0.6);
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  font-size: 0.76rem;
  color: rgba(226, 232, 240, 0.85);
}

.panel-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel-grid-dense {
  gap: 6px 10px;
}

.panel-grid-compact {
  margin-top: 6px;
  font-size: 0.78rem;
}

.trend-hero-glance-grid.panel-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.panel-kv {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.panel-kv-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.56rem;
  color: rgba(148, 163, 184, 0.7);
}

.panel-kv-value {
  font-weight: 600;
  color: rgba(226, 232, 240, 0.92);
  line-height: 1.2;
}

.panel-kv-value-wrap {
  font-weight: 500;
  font-size: 0.68rem;
  line-height: 1.2;
}

.panel-kv-wide {
  grid-column: 1 / -1;
}

.panel-divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.2);
  margin: 6px 0;
}

.panel-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.7rem;
  color: rgba(226, 232, 240, 0.8);
}

.panel-pill {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  padding: 3px 8px;
  font-variant-numeric: tabular-nums;
}

.panel-note {
  display: grid;
  gap: 6px;
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 0.8);
}

.panel-note-title {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.56rem;
  color: rgba(148, 163, 184, 0.7);
}

.panel-note-row {
  display: grid;
  gap: 6px;
}

.panel-note-label {
  font-weight: 600;
  color: rgba(226, 232, 240, 0.85);
}

.panel-note-value {
  color: rgba(226, 232, 240, 0.75);
  line-height: 1.4;
  word-break: break-word;
}

.panel-note-actions .panel-note-value {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-gap-list {
  margin-top: 6px;
}

.history-gap-grid {
  display: grid;
  gap: 6px;
}

.history-gap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.35);
  color: rgba(226, 232, 240, 0.85);
  font-size: 0.72rem;
}

.history-gap-label {
  font-weight: 600;
}

.history-gap-meta {
  color: rgba(226, 232, 240, 0.65);
  font-variant-numeric: tabular-nums;
}

.btn.has-gaps {
  border-color: rgba(239, 68, 68, 0.45);
}

.window-gap-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-gap-summary {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.04);
  font-size: 0.82rem;
}

.history-gap-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.history-gap-summary-label {
  color: var(--muted);
  font-weight: 600;
}

.history-gap-summary-value {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.panel-list {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.panel-list-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(248, 250, 252, 0.6);
}

.panel-list-item {
  font-size: 0.82rem;
  color: rgba(248, 250, 252, 0.85);
}

.panel-list-item.muted {
  color: rgba(148, 163, 184, 0.8);
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.trend-hero-summary {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.trend-hero-summary .hero-actions {
  margin-top: 8px;
  align-items: center;
}

.trend-hero-progress {
  display: grid;
  gap: 6px;
  margin-bottom: 4px;
}

.trend-hero-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.trend-hero-progress-label {
  font-weight: 600;
  color: rgba(15, 23, 42, 0.7);
}

.trend-hero-progress-eta {
  font-variant-numeric: tabular-nums;
}

.trend-hero-progress-bar {
  position: relative;
  height: 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

.trend-hero-progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #f97316, #fb7185);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.35);
  transition: width 0.35s ease;
}

.trend-hero-progress-bar.is-indeterminate .trend-hero-progress-fill {
  animation: hero-progress 1.2s linear infinite;
  background-size: 200% 100%;
}

.trend-hero-progress-bar.is-stalled {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
}

.trend-hero-progress-bar.is-stalled .trend-hero-progress-fill {
  background: linear-gradient(90deg, #f97316, #ef4444);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
  animation: stall-pulse 1.6s ease-in-out infinite;
}

@keyframes stall-pulse {
  0% {
    opacity: 0.65;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.65;
  }
}

@keyframes hero-progress {
  0% {
    background-position: 0% 0%;
  }

  100% {
    background-position: 200% 0%;
  }
}

.trend-hero-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.trend-hero-card {
  background: rgba(15, 23, 42, 0.04);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 7px 9px;
  display: grid;
  gap: 4px;
}

.trend-hero-label {
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.trend-hero-value {
  font-size: 1.05rem;
  font-weight: 700;
}

.trend-hero-sub {
  font-size: 0.7rem;
  color: var(--muted);
}

.trend-hero-delta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trend-hero-delta .pill {
  background: rgba(15, 23, 42, 0.06);
}

/* ============================================
   RADAR HERO - Redesigned backfill radar section
   ============================================ */
.radar-hero {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  margin-bottom: 24px;
  position: relative;
}

/* Sticky Header Bar */
.radar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), transparent);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.radar-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.radar-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.radar-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.radar-status-pill[data-status="state"]:empty::after { content: "idle"; }

/* Status pill variants */
.radar-hero[data-state="running"] .radar-status-pill,
.radar-status-pill.running {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  animation: radar-pulse 1.5s ease-in-out infinite;
}

.radar-hero[data-state="error"] .radar-status-pill,
.radar-status-pill.error {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

@keyframes radar-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.radar-subtext {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.radar-subtext-sep {
  color: rgba(15, 23, 42, 0.2);
}

.radar-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Collapse/Expand Toggle Button */
.radar-toggle-btn {
  margin-left: 4px;
}

.radar-toggle-icon {
  transition: transform 0.2s ease;
}

.radar-hero.is-collapsed .radar-toggle-icon {
  transform: rotate(-180deg);
}

/* Menu dropdown */
.radar-menu {
  position: relative;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--muted);
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.icon-btn:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: var(--border);
  color: var(--ink);
}

.radar-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 160px;
  margin-top: 4px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.15s;
  z-index: 100;
}

.radar-menu.is-open .radar-menu-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.radar-menu-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--ink);
  background: none;
  border: none;
  border-radius: 6px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.radar-menu-item:hover {
  background: rgba(15, 23, 42, 0.04);
}

/* Progress bar */
.radar-progress {
  padding: 0 24px 16px;
  display: none;
}

.radar-hero[data-state="running"] .radar-progress,
.radar-progress.is-visible {
  display: block;
}

.radar-progress-bar {
  height: 4px;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.radar-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.radar-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Collapsible body */
.radar-body {
  padding: 0 24px 24px;
}

.radar-hero.is-collapsed .radar-body {
  display: none;
}

/* KPI Strip */
.radar-kpi-strip {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  margin-bottom: 20px;
}

.radar-kpi {
  flex: 1;
  min-width: 100px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.02);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.radar-kpi:hover {
  background: rgba(15, 23, 42, 0.04);
}

.radar-kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.radar-kpi-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.radar-kpi-health {
  border-left: 2px solid rgba(34, 197, 94, 0.4);
}

/* Main content: Pipeline + Health side by side */
.radar-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .radar-main {
    grid-template-columns: 1fr;
  }
}

/* Radar Cards */
.radar-card {
  background: rgba(15, 23, 42, 0.015);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 12px;
  overflow: hidden;
}

.radar-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(15, 23, 42, 0.02);
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
  cursor: pointer;
  user-select: none;
}

.radar-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.radar-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}

.radar-card-toggle-icon {
  transition: transform 0.2s;
}

.radar-card.is-collapsed .radar-card-toggle-icon {
  transform: rotate(-90deg);
}

.radar-card.is-collapsed .radar-card-body {
  display: none;
}

.radar-card-body {
  padding: 16px 18px;
}

/* Pipeline Stepper */
.radar-stepper {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.radar-step {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  position: relative;
}

.radar-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 28px;
  bottom: -2px;
  width: 2px;
  background: rgba(15, 23, 42, 0.08);
}

.radar-step.is-complete:not(:last-child)::before {
  background: rgba(34, 197, 94, 0.3);
}

.radar-step-indicator {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-step-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.08);
  border: 2px solid rgba(15, 23, 42, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.radar-step.is-complete .radar-step-icon {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.radar-step.is-complete .radar-step-icon::after {
  content: "✓";
  font-weight: bold;
}

.radar-step.is-running .radar-step-icon {
  background: #3b82f6;
  border-color: #3b82f6;
  animation: radar-pulse 1s ease-in-out infinite;
}

.radar-step-content {
  flex: 1;
  min-width: 0;
}

.radar-step-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.radar-step-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
}

.radar-step.is-complete .radar-step-title {
  color: var(--muted);
}

.radar-step-time {
  font-size: 0.75rem;
  font-family: var(--mono);
  color: var(--muted);
}

.radar-step.is-complete .radar-step-time {
  color: #16a34a;
}

.radar-step-detail {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
  display: none;
}

.radar-step:hover .radar-step-detail,
.radar-step.is-running .radar-step-detail {
  display: block;
}

.radar-pipeline-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 0.75rem;
  color: var(--muted);
}

/* Data Health Panel */
.radar-health-status {
  display: flex;
  align-items: center;
}

.radar-health-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 8px;
}

.radar-health-badge.ok {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.radar-health-badge.warn {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.radar-health-badge.error {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.radar-health-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
}

.radar-health-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.radar-health-item.radar-health-warn .radar-health-value {
  color: #d97706;
  font-weight: 600;
}

.radar-health-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.radar-health-value {
  font-size: 0.85rem;
  color: var(--ink);
}

.radar-health-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.radar-health-gaps {
  margin-top: 12px;
  padding: 12px;
  background: rgba(245, 158, 11, 0.04);
  border-radius: 8px;
}

.radar-health-gaps-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 0.8rem;
}

.radar-health-gaps-row:not(:last-child) {
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.radar-health-gaps-label {
  color: var(--muted);
}

.radar-health-gaps-value {
  color: var(--ink);
  text-align: right;
}

/* Summary Row */
.radar-summary-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  padding: 14px 18px;
  background: rgba(15, 23, 42, 0.02);
  border-radius: 10px;
  flex-wrap: wrap;
}

.radar-summary-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.radar-summary-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.radar-summary-value {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
}

.radar-summary-sep {
  width: 1px;
  height: 24px;
  background: rgba(15, 23, 42, 0.1);
}

.radar-delta-pills {
  display: flex;
  gap: 12px;
  margin-left: auto;
}

.radar-delta-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.04);
  border-radius: 8px;
  font-size: 0.75rem;
}

.radar-delta-count {
  font-weight: 600;
  color: var(--ink);
}

.radar-delta-label {
  color: var(--muted);
}

/* Diagnostics Accordion */
.radar-diagnostics {
  margin-top: 16px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 10px;
  overflow: hidden;
}

.radar-diagnostics-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.02);
  cursor: pointer;
  list-style: none;
}

.radar-diagnostics-toggle::-webkit-details-marker {
  display: none;
}

.radar-diagnostics-toggle svg {
  transition: transform 0.2s;
}

.radar-diagnostics[open] .radar-diagnostics-toggle svg {
  transform: rotate(180deg);
}

.radar-diagnostics-body {
  padding: 16px;
  background: rgba(15, 23, 42, 0.01);
}

.radar-diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.radar-diagnostics-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radar-diagnostics-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.radar-diagnostics-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.75rem;
}

.radar-diagnostics-label {
  color: var(--muted);
}

.radar-diagnostics-value {
  color: var(--ink);
  text-align: right;
}

.radar-diagnostics-path {
  font-family: var(--mono);
  font-size: 0.7rem;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
  .radar-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .radar-header-right {
    width: 100%;
    justify-content: flex-start;
  }

  .radar-kpi-strip {
    flex-wrap: wrap;
  }

  .radar-kpi {
    min-width: calc(50% - 6px);
  }

  .radar-summary-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .radar-delta-pills {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .radar-summary-sep {
    display: none;
  }
}

.section {
  display: grid;
  gap: 18px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 600;
}

.section-subtitle {
  color: var(--muted);
  margin-top: 6px;
}

/* ============================================
   SECTION PANELS - Professional dashboard cards
   ============================================ */
.section-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 24px;
  overflow: hidden;
}

/* Panel Header */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.02) 0%, rgba(15, 23, 42, 0.04) 100%);
  border-bottom: 1px solid var(--border);
}

.panel-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--fg);
  margin: 0;
}

.panel-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  border-radius: 100px;
  background: rgba(100, 116, 139, 0.1);
  color: #64748b;
}

.panel-status-pill[data-delta-status="active"] {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.panel-status-pill[data-delta-status="sharp"] {
  background: rgba(249, 115, 22, 0.1);
  color: #ea580c;
}

.panel-subtext {
  font-size: 0.8125rem;
  color: var(--muted);
}

.panel-collapse-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.panel-collapse-icon {
  transition: transform 0.2s ease;
}

.section-panel.is-collapsed .panel-collapse-icon {
  transform: rotate(-90deg);
}

.section-panel.is-collapsed .panel-body {
  display: none;
}

/* Panel Body */
.panel-body {
  padding: 20px;
}

/* Panel KPI Strip */
.panel-kpi-strip {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.02);
  border-radius: 12px;
  overflow-x: auto;
}

.panel-kpi {
  flex: 1;
  min-width: 90px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
  position: relative;
}

.panel-kpi-highlight {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(34, 197, 94, 0.04) 100%);
  border-color: rgba(34, 197, 94, 0.3);
}

.panel-kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.2;
}

.panel-kpi-highlight .panel-kpi-value {
  color: #16a34a;
}

.panel-kpi-label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 4px;
}

.panel-kpi-tag {
  position: absolute;
  top: -8px;
  right: -8px;
  padding: 2px 6px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #16a34a;
  color: #fff;
  border-radius: 4px;
}

/* Panel Empty State */
.panel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.panel-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.panel-empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 4px;
}

.panel-empty-text {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Panel Accordion */
.panel-accordion {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.panel-accordion-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.02);
  cursor: pointer;
  list-style: none;
}

.panel-accordion-header::-webkit-details-marker {
  display: none;
}

.panel-accordion-icon {
  font-size: 1rem;
}

.panel-accordion-title {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg);
}

.panel-accordion-chevron {
  transition: transform 0.2s ease;
}

.panel-accordion[open] .panel-accordion-chevron {
  transform: rotate(180deg);
}

.panel-accordion-body {
  padding: 16px;
  background: #fff;
  border-top: 1px solid var(--border);
}

/* Delta Priority Card */
.delta-priority-card {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.06) 0%, rgba(234, 88, 12, 0.03) 100%);
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.delta-priority-header {
  margin-bottom: 12px;
}

.delta-priority-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
}

.delta-priority-icon {
  font-size: 1.125rem;
}

.delta-priority-badge {
  padding: 3px 8px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #ea580c;
  color: #fff;
  border-radius: 4px;
}

.delta-priority-hint {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 4px;
}

.delta-priority-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.delta-priority-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 8px;
}

.delta-priority-player {
  font-weight: 600;
  color: var(--fg);
}

.delta-priority-prop {
  font-size: 0.8125rem;
  color: var(--muted);
}

.delta-priority-shift {
  display: flex;
  align-items: center;
  gap: 6px;
}

.delta-side-old {
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border-radius: 4px;
  text-decoration: line-through;
  opacity: 0.7;
}

.delta-side-new {
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border-radius: 4px;
}

.delta-arrow {
  color: var(--muted);
}

/* Delta Grid - Redesigned */
.delta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.delta-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.delta-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.02);
  border-bottom: 1px solid var(--border);
}

.delta-card-icon {
  font-size: 1rem;
}

.delta-card-title {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
}

.delta-card-count {
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.06);
  color: var(--muted);
  border-radius: 100px;
}

.delta-card-body {
  max-height: 240px;
  overflow-y: auto;
}

.delta-card-empty {
  padding: 24px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
}

.delta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.delta-row:last-child {
  border-bottom: none;
}

.delta-row.is-large,
.delta-row.is-sharp {
  background: rgba(249, 115, 22, 0.04);
}

.delta-row.is-notable {
  background: rgba(234, 179, 8, 0.04);
}

.delta-row.is-new {
  background: rgba(34, 197, 94, 0.04);
}

.delta-row.is-removed {
  background: rgba(239, 68, 68, 0.04);
}

.delta-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.delta-row-player {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delta-row-prop {
  font-size: 0.75rem;
  color: var(--muted);
}

.delta-row-change {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.delta-row-values,
.delta-row-books,
.delta-row-line {
  font-size: 0.75rem;
  color: var(--muted);
}

.delta-row-delta {
  padding: 2px 6px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
}

.delta-row-delta.is-up {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.delta-row-delta.is-down {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.delta-row-tag {
  padding: 2px 6px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 4px;
}

.delta-row-tag.is-sharp {
  background: #ea580c;
  color: #fff;
}

.delta-row-tag.is-new {
  background: #16a34a;
  color: #fff;
}

.delta-row-tag.is-removed {
  background: #dc2626;
  color: #fff;
}

/* Delta Guide Grid */
.delta-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.delta-guide-item {
  padding: 12px;
  background: rgba(15, 23, 42, 0.02);
  border-radius: 8px;
}

.delta-guide-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 6px;
}

.delta-guide-text {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ============================================
   P/L SIMULATOR - Backtest styles
   ============================================ */
.sim-filter-grid {
  margin-bottom: 16px;
}

.sim-filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.sim-filter-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sim-filter-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sim-filter-input,
.sim-filter-select {
  padding: 8px 10px;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--fg);
}

.sim-filter-input:focus,
.sim-filter-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.sim-results-strip.is-hidden {
  display: none;
}

.panel-kpi-large {
  min-width: 140px;
}

.panel-kpi-large .panel-kpi-value {
  font-size: 1.75rem;
}

.sim-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 16px;
  margin-top: 16px;
  background: rgba(15, 23, 42, 0.02);
  border-radius: 8px;
}

.sim-meta-strip.is-hidden {
  display: none;
}

.sim-meta-item {
  font-size: 0.8125rem;
  color: var(--muted);
}

.sim-meta-item strong {
  color: var(--fg);
  font-weight: 600;
}

.sim-breakdowns {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sim-breakdowns.is-hidden {
  display: none;
}

/* Dim theme for simulator */
body.theme-dim .sim-filter-input,
body.theme-dim .sim-filter-select {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(148, 163, 184, 0.2);
  color: #f1f5f9;
}

body.theme-dim .sim-filter-label {
  color: #94a3b8;
}

body.theme-dim .sim-meta-strip {
  background: rgba(15, 23, 42, 0.3);
}

body.theme-dim .sim-meta-item {
  color: #94a3b8;
}

body.theme-dim .sim-meta-item strong {
  color: #f1f5f9;
}

/* ============================================
   ADVANCED SIGNALS - Pattern detection cards
   ============================================ */
.advanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.advanced-grid.is-hidden {
  display: none;
}

.advanced-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.advanced-card-wide {
  grid-column: 1 / -1;
}

.advanced-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.02);
  border-bottom: 1px solid var(--border);
}

.advanced-card-icon {
  font-size: 1rem;
}

.advanced-card-title {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
}

.advanced-card-badge {
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border-radius: 100px;
}

.advanced-card-hint {
  padding: 8px 14px;
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.01);
  border-bottom: 1px solid var(--border);
}

.advanced-card-body {
  max-height: 200px;
  overflow-y: auto;
  padding: 8px 0;
}

.advanced-card-empty {
  padding: 24px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Dim theme for advanced signals */
body.theme-dim .advanced-card {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(148, 163, 184, 0.15);
}

body.theme-dim .advanced-card-header {
  background: rgba(15, 23, 42, 0.3);
  border-color: rgba(148, 163, 184, 0.15);
}

body.theme-dim .advanced-card-title {
  color: #f1f5f9;
}

body.theme-dim .advanced-card-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

body.theme-dim .advanced-card-hint {
  background: rgba(15, 23, 42, 0.2);
  border-color: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}

body.theme-dim .advanced-card-empty {
  color: #94a3b8;
}

/* ============================================
   SIGNAL ACCURACY BACKTEST - Time-travel styles
   ============================================ */
.bt-filter-grid {
  margin-bottom: 16px;
}

.bt-filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.bt-filter-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bt-filter-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.bt-filter-input,
.bt-filter-select {
  padding: 8px 10px;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--fg);
}

.bt-results-strip.is-hidden {
  display: none;
}

.bt-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
}

.bt-loading.is-hidden {
  display: none;
}

.bt-loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.bt-loading-text {
  font-size: 0.875rem;
  color: var(--muted);
}

.bt-leaderboards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.bt-leaderboards.is-hidden {
  display: none;
}

.bt-tabs {
  display: flex;
  gap: 4px;
  margin-left: auto;
  margin-right: 12px;
}

.bt-tab {
  padding: 4px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.bt-tab:hover {
  background: rgba(15, 23, 42, 0.04);
}

.bt-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.bt-table {
  min-height: 60px;
}

.bt-table.is-hidden {
  display: none;
}

/* Dim theme for backtest */
body.theme-dim .bt-filter-input,
body.theme-dim .bt-filter-select {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(148, 163, 184, 0.2);
  color: #f1f5f9;
}

body.theme-dim .bt-filter-label {
  color: #94a3b8;
}

body.theme-dim .bt-loading-text {
  color: #94a3b8;
}

body.theme-dim .bt-loading-spinner {
  border-color: rgba(148, 163, 184, 0.2);
  border-top-color: var(--accent);
}

body.theme-dim .bt-tab {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

body.theme-dim .bt-tab:hover {
  background: rgba(148, 163, 184, 0.1);
}

body.theme-dim .bt-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ============================================
   SIGNAL ALERTS - Notification styles
   ============================================ */
.alerts-form-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alerts-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  align-items: end;
}

.alerts-form-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.alerts-form-item-wide {
  grid-column: span 2;
}

.alerts-form-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.alerts-form-input,
.alerts-form-select {
  padding: 8px 10px;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--fg);
}

.alerts-form-actions {
  display: flex;
  align-items: flex-end;
}

.alerts-list-container {
  margin-top: 16px;
}

.alerts-list-header {
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
}

.alerts-list-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg);
}

.alerts-list {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  min-height: 80px;
}

.alerts-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  text-align: center;
}

.alerts-empty-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
  opacity: 0.5;
}

.alerts-empty-text {
  font-size: 0.8125rem;
  color: var(--muted);
  max-width: 280px;
}

/* Dim theme for alerts */
body.theme-dim .alerts-form-input,
body.theme-dim .alerts-form-select {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(148, 163, 184, 0.2);
  color: #f1f5f9;
}

body.theme-dim .alerts-form-label {
  color: #94a3b8;
}

body.theme-dim .alerts-list-header {
  background: rgba(15, 23, 42, 0.3);
  border-color: rgba(148, 163, 184, 0.15);
}

body.theme-dim .alerts-list-title {
  color: #f1f5f9;
}

body.theme-dim .alerts-list {
  border-color: rgba(148, 163, 184, 0.15);
}

body.theme-dim .alerts-empty-text {
  color: #94a3b8;
}

/* ============================================
   RUN HISTORY - Past runs and timeline
   ============================================ */
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.history-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.history-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.02);
  border-bottom: 1px solid var(--border);
}

.history-card-icon {
  font-size: 1rem;
}

.history-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
}

.history-card-body {
  padding: 8px 0;
  max-height: 200px;
  overflow-y: auto;
}

.history-card-empty {
  padding: 24px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
}

.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.history-row:last-child {
  border-bottom: none;
}

.history-row-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-row-status {
  padding: 3px 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 4px;
  background: rgba(100, 116, 139, 0.1);
  color: #64748b;
}

.history-row-status.completed {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.history-row-status.failed {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.history-row-props {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg);
}

.history-row-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.history-row-time {
  font-size: 0.6875rem;
  color: var(--muted);
}

.history-row-badge {
  padding: 2px 6px;
  font-size: 0.625rem;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.06);
  color: var(--muted);
  border-radius: 4px;
}

.history-row-badge.is-warn {
  background: rgba(234, 179, 8, 0.1);
  color: #ca8a04;
}

.history-timeline {
  position: relative;
  padding-left: 20px;
}

/* ============================================
   LIVE TIMELINE - Enhanced Real-Time Progress
   ============================================ */

/* Heartbeat indicator in header */
.live-heartbeat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 0.6875rem;
  color: var(--muted);
}

.heartbeat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  transition: background 0.3s, box-shadow 0.3s;
}

.live-heartbeat.is-active .heartbeat-dot {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
  animation: heartbeat-pulse 1s ease-in-out infinite;
}

.live-heartbeat.is-stale .heartbeat-dot {
  background: #f59e0b;
}

.live-heartbeat.is-dead .heartbeat-dot {
  background: #ef4444;
}

@keyframes heartbeat-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

/* Elapsed time bar */
.live-elapsed-bar {
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.08));
  border-bottom: 1px solid var(--border);
}

.live-elapsed-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.75rem;
}

.live-elapsed-label {
  color: var(--muted);
  font-weight: 500;
}

.live-elapsed-time {
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-weight: 600;
  color: var(--accent);
  font-size: 0.875rem;
}

.live-elapsed-sep {
  color: var(--muted);
  opacity: 0.5;
}

.live-elapsed-stage {
  color: var(--fg);
  font-weight: 500;
  text-transform: capitalize;
}

.live-elapsed-progress {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.live-elapsed-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Current step detail */
.live-step-detail {
  padding: 12px 14px;
  background: rgba(34, 197, 94, 0.05);
  border-bottom: 1px solid var(--border);
}

.live-step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.live-step-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg);
  text-transform: capitalize;
}

.live-step-count {
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
}

.live-step-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.live-step-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  border-radius: 3px;
  transition: width 0.15s ease;
}

.live-step-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: var(--muted);
}

.live-step-date {
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

.live-step-eta {
  font-weight: 500;
}

/* Timeline card when running */
[data-live-timeline-card].is-running {
  border-color: rgba(34, 197, 94, 0.3);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.1);
}

[data-live-timeline-card].is-running .history-card-header {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(59, 130, 246, 0.05));
}

/* Dim theme for live timeline */
body.theme-dim .live-elapsed-bar {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(139, 92, 246, 0.12));
}

body.theme-dim .live-step-detail {
  background: rgba(34, 197, 94, 0.08);
}

body.theme-dim .live-elapsed-time {
  color: #60a5fa;
}

body.theme-dim .live-step-count {
  color: #60a5fa;
}

.timeline-item {
  position: relative;
  padding: 8px 14px 8px 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-dot {
  position: absolute;
  left: -16px;
  top: 12px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

.timeline-content {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-stage {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg);
  text-transform: capitalize;
}

.timeline-progress {
  font-size: 0.75rem;
  color: var(--muted);
}

.timeline-time {
  font-size: 0.6875rem;
  color: var(--muted);
  margin-left: auto;
}

/* Dim theme for history */
body.theme-dim .history-card {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(148, 163, 184, 0.15);
}

body.theme-dim .history-card-header {
  background: rgba(15, 23, 42, 0.3);
  border-color: rgba(148, 163, 184, 0.15);
}

body.theme-dim .history-card-title {
  color: #f1f5f9;
}

body.theme-dim .history-card-empty {
  color: #94a3b8;
}

body.theme-dim .history-row {
  border-color: rgba(148, 163, 184, 0.1);
}

body.theme-dim .history-row-props {
  color: #f1f5f9;
}

body.theme-dim .history-row-time {
  color: #94a3b8;
}

body.theme-dim .timeline-stage {
  color: #f1f5f9;
}

/* ============================================
   DATA INTEGRITY - Guardrails and Alerts styles
   ============================================ */
.section-panel-muted {
  opacity: 0.85;
}

.section-panel-muted:hover {
  opacity: 1;
}

.section-panel-warn {
  border-color: rgba(234, 179, 8, 0.3);
}

.panel-status-info {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.panel-status-ok {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.panel-status-warn {
  background: rgba(234, 179, 8, 0.1);
  color: #ca8a04;
}

/* Guardrails styles */
.guardrails-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.02);
  border-radius: 10px;
}

.guardrails-rule {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.guardrails-rule-icon {
  font-size: 0.875rem;
}

.guardrails-rule-text strong {
  color: var(--ink);
}

.guardrails-kpi-strip {
  margin-bottom: 12px;
}

.guardrails-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.guardrails-tag {
  display: inline-flex;
  padding: 4px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
}

/* Validation styles */
.validation-kpi-strip {
  margin-bottom: 16px;
}

.panel-kpi-warn {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.08) 0%, rgba(234, 179, 8, 0.04) 100%);
  border-color: rgba(234, 179, 8, 0.3);
}

.panel-kpi-warn .panel-kpi-value {
  color: #ca8a04;
}

.validation-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.validation-tag {
  display: inline-flex;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: "Roboto Mono", monospace;
  color: var(--ink-soft);
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 6px;
}

.validation-tag.is-warn {
  color: #ca8a04;
  background: rgba(234, 179, 8, 0.08);
  border-color: rgba(234, 179, 8, 0.2);
}

.validation-tag.is-ok {
  color: #16a34a;
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
}

.panel-accordion-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 2px 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.06);
  border-radius: 10px;
  margin-left: auto;
  margin-right: 8px;
}

.panel-accordion-badge.is-warn {
  color: #ca8a04;
  background: rgba(234, 179, 8, 0.15);
}

/* Dim theme for Data Integrity */
body.theme-dim .section-panel-warn {
  border-color: rgba(234, 179, 8, 0.25);
}

body.theme-dim .panel-status-info {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

body.theme-dim .panel-status-ok {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

body.theme-dim .panel-status-warn {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
}

body.theme-dim .guardrails-summary {
  background: rgba(148, 163, 184, 0.06);
}

body.theme-dim .guardrails-rule {
  color: #e2e8f0;
}

body.theme-dim .guardrails-rule-text strong {
  color: #f8fafc;
}

body.theme-dim .guardrails-tag {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.15);
}

body.theme-dim .panel-kpi-warn {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.12) 0%, rgba(234, 179, 8, 0.06) 100%);
  border-color: rgba(234, 179, 8, 0.3);
}

body.theme-dim .panel-kpi-warn .panel-kpi-value {
  color: #facc15;
}

body.theme-dim .validation-tag {
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.15);
}

body.theme-dim .validation-tag.is-warn {
  color: #facc15;
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.25);
}

body.theme-dim .validation-tag.is-ok {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.25);
}

body.theme-dim .panel-accordion-badge {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.1);
}

body.theme-dim .panel-accordion-badge.is-warn {
  color: #facc15;
  background: rgba(234, 179, 8, 0.2);
}

/* ============================================
   ADMIN FORMS - Schedule and upload styles
   ============================================ */
.section-panel-admin {
  border-color: rgba(168, 85, 247, 0.2);
}

.panel-status-admin {
  background: rgba(168, 85, 247, 0.1);
  color: #9333ea;
}

.admin-form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-form-section {
  padding: 12px;
  background: rgba(15, 23, 42, 0.02);
  border-radius: 8px;
}

.admin-form-section-title {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.admin-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.admin-form-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-form-item-wide {
  grid-column: span 2;
}

.admin-form-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-form-input {
  padding: 8px 10px;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--fg);
}

.admin-form-checkbox {
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.02);
  border-radius: 8px;
}

.admin-form-checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--fg);
  cursor: pointer;
}

.admin-form-hint {
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Export guide */
.boxscore-export-guide {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.export-guide-item {
  padding: 10px;
  background: rgba(15, 23, 42, 0.02);
  border-radius: 6px;
}

.export-guide-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.export-guide-code {
  display: block;
  font-size: 0.6875rem;
  font-family: var(--mono);
  color: var(--fg);
  word-break: break-all;
}

.export-guide-text {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Dim theme for admin */
body.theme-dim .section-panel-admin {
  border-color: rgba(168, 85, 247, 0.25);
}

body.theme-dim .panel-status-admin {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

body.theme-dim .admin-form-section {
  background: rgba(15, 23, 42, 0.3);
}

body.theme-dim .admin-form-section-title {
  color: #94a3b8;
}

body.theme-dim .admin-form-label {
  color: #94a3b8;
}

body.theme-dim .admin-form-input {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(148, 163, 184, 0.2);
  color: #f1f5f9;
}

body.theme-dim .admin-form-checkbox {
  background: rgba(15, 23, 42, 0.3);
}

body.theme-dim .admin-form-checkbox label {
  color: #f1f5f9;
}

body.theme-dim .admin-form-hint {
  color: #94a3b8;
}

body.theme-dim .export-guide-item {
  background: rgba(15, 23, 42, 0.3);
}

body.theme-dim .export-guide-code {
  color: #f1f5f9;
}

body.theme-dim .export-guide-text {
  color: #94a3b8;
}

/* ============================================
   SIGNAL TRACKER - Today's signals vs history
   ============================================ */
.panel-header-meta {
  display: flex;
  gap: 12px;
}

.panel-countdown {
  color: var(--accent);
  font-weight: 500;
}

.panel-select {
  padding: 6px 10px;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--fg);
  cursor: pointer;
}

.tracker-kpi-strip {
  margin-bottom: 16px;
}

.tracker-kpi-hottest {
  min-width: 120px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.08) 0%, rgba(234, 88, 12, 0.04) 100%);
  border-color: rgba(249, 115, 22, 0.2);
}

.tracker-hottest-name {
  font-size: 0.875rem !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

/* Tracker Filter Grid */
.tracker-filter-grid {
  margin-bottom: 16px;
}

.tracker-filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  align-items: end;
}

.tracker-filter-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tracker-filter-item-wide {
  grid-column: span 2;
}

.tracker-filter-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tracker-filter-select,
.tracker-filter-input {
  padding: 7px 10px;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--fg);
}

.tracker-filter-select:focus,
.tracker-filter-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.tracker-filter-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 7px 0;
}

.tracker-filter-checkbox input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.tracker-filter-checkbox .tracker-filter-label {
  margin-bottom: 0;
}

/* Tracker Pagination */
.tracker-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  margin-top: 16px;
  border-top: 1px solid var(--border);
}

.tracker-page-info {
  font-size: 0.8125rem;
  color: var(--muted);
}

.tracker-page-actions {
  display: flex;
  gap: 6px;
}

/* Dim theme for tracker */
body.theme-dim .panel-select {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(148, 163, 184, 0.2);
  color: #f1f5f9;
}

body.theme-dim .panel-countdown {
  color: #60a5fa;
}

body.theme-dim .tracker-kpi-hottest {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.12) 0%, rgba(234, 88, 12, 0.06) 100%);
  border-color: rgba(249, 115, 22, 0.25);
}

body.theme-dim .tracker-filter-select,
body.theme-dim .tracker-filter-input {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(148, 163, 184, 0.2);
  color: #f1f5f9;
}

body.theme-dim .tracker-filter-label {
  color: #94a3b8;
}

body.theme-dim .tracker-pagination {
  border-color: rgba(148, 163, 184, 0.15);
}

body.theme-dim .tracker-page-info {
  color: #94a3b8;
}

/* ============================================
   COLLAPSIBLE SECTIONS - Unified toggle pattern
   ============================================ */
.section-collapsible {
  display: grid;
  gap: 0;
}

.section-collapsible > .section-header {
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.section-collapsible:not(.is-collapsed) > .section-header {
  border-radius: 12px 12px 0 0;
  border-bottom-color: transparent;
}

.section-collapsible > .section-header:hover {
  background: rgba(15, 23, 42, 0.02);
}

.section-collapsible > .section-body {
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.section-collapsible.is-collapsed > .section-body {
  display: none;
}

/* Section toggle button */
.section-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.section-toggle:hover {
  background: rgba(15, 23, 42, 0.08);
  color: var(--ink);
}

.section-toggle-icon {
  transition: transform 0.2s ease;
}

.section-collapsible.is-collapsed .section-toggle-icon {
  transform: rotate(-90deg);
}

/* Section header layout */
.section-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.section-header-info {
  flex: 1;
  min-width: 0;
}

.section-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Section title inline badge */
.section-title-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  margin-left: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border-radius: 6px;
  vertical-align: middle;
}

.section-title-badge.warn {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.section-title-badge.error {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

/* Dim theme for section panels */
body.theme-dim .section-panel {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(148, 163, 184, 0.2);
}

body.theme-dim .panel-header {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.3) 0%, rgba(15, 23, 42, 0.4) 100%);
  border-color: rgba(148, 163, 184, 0.15);
}

body.theme-dim .panel-title {
  color: #f1f5f9;
}

body.theme-dim .panel-status-pill {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

body.theme-dim .panel-status-pill[data-delta-status="active"] {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

body.theme-dim .panel-status-pill[data-delta-status="sharp"] {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
}

body.theme-dim .panel-subtext {
  color: #94a3b8;
}

body.theme-dim .panel-collapse-btn {
  color: #94a3b8;
}

body.theme-dim .panel-collapse-btn:hover {
  background: rgba(148, 163, 184, 0.15);
  color: #f1f5f9;
}

body.theme-dim .panel-body {
  background: rgba(30, 41, 59, 0.3);
}

body.theme-dim .panel-kpi-strip {
  background: rgba(15, 23, 42, 0.3);
}

body.theme-dim .panel-kpi {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(148, 163, 184, 0.15);
}

body.theme-dim .panel-kpi-highlight {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(34, 197, 94, 0.06) 100%);
  border-color: rgba(34, 197, 94, 0.3);
}

body.theme-dim .panel-kpi-value {
  color: #f1f5f9;
}

body.theme-dim .panel-kpi-highlight .panel-kpi-value {
  color: #4ade80;
}

body.theme-dim .panel-kpi-label {
  color: #94a3b8;
}

body.theme-dim .panel-empty-title {
  color: #f1f5f9;
}

body.theme-dim .panel-empty-text {
  color: #94a3b8;
}

body.theme-dim .panel-accordion {
  border-color: rgba(148, 163, 184, 0.15);
}

body.theme-dim .panel-accordion-header {
  background: rgba(15, 23, 42, 0.3);
}

body.theme-dim .panel-accordion-title {
  color: #f1f5f9;
}

body.theme-dim .panel-accordion-chevron {
  color: #94a3b8;
}

body.theme-dim .panel-accordion-body {
  background: rgba(30, 41, 59, 0.4);
  border-color: rgba(148, 163, 184, 0.15);
}

body.theme-dim .delta-priority-card {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(234, 88, 12, 0.05) 100%);
  border-color: rgba(249, 115, 22, 0.3);
}

body.theme-dim .delta-priority-title {
  color: #f1f5f9;
}

body.theme-dim .delta-priority-hint {
  color: #94a3b8;
}

body.theme-dim .delta-priority-item {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(249, 115, 22, 0.2);
}

body.theme-dim .delta-priority-player {
  color: #f1f5f9;
}

body.theme-dim .delta-priority-prop {
  color: #94a3b8;
}

body.theme-dim .delta-card {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(148, 163, 184, 0.15);
}

body.theme-dim .delta-card-header {
  background: rgba(15, 23, 42, 0.3);
  border-color: rgba(148, 163, 184, 0.15);
}

body.theme-dim .delta-card-title {
  color: #f1f5f9;
}

body.theme-dim .delta-card-count {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

body.theme-dim .delta-card-empty {
  color: #94a3b8;
}

body.theme-dim .delta-row {
  border-color: rgba(148, 163, 184, 0.1);
}

body.theme-dim .delta-row.is-large,
body.theme-dim .delta-row.is-sharp {
  background: rgba(249, 115, 22, 0.08);
}

body.theme-dim .delta-row.is-notable {
  background: rgba(234, 179, 8, 0.08);
}

body.theme-dim .delta-row.is-new {
  background: rgba(34, 197, 94, 0.08);
}

body.theme-dim .delta-row.is-removed {
  background: rgba(239, 68, 68, 0.08);
}

body.theme-dim .delta-row-player {
  color: #f1f5f9;
}

body.theme-dim .delta-row-prop,
body.theme-dim .delta-row-values,
body.theme-dim .delta-row-books,
body.theme-dim .delta-row-line {
  color: #94a3b8;
}

body.theme-dim .delta-guide-item {
  background: rgba(15, 23, 42, 0.3);
}

body.theme-dim .delta-guide-label {
  color: #f1f5f9;
}

body.theme-dim .delta-guide-text {
  color: #94a3b8;
}

/* Dim theme for collapsible sections */
body.theme-dim .section-collapsible > .section-header {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(148, 163, 184, 0.2);
}

body.theme-dim .section-collapsible > .section-header:hover {
  background: rgba(30, 41, 59, 0.8);
}

body.theme-dim .section-collapsible > .section-body {
  background: rgba(30, 41, 59, 0.4);
  border-color: rgba(148, 163, 184, 0.2);
}

body.theme-dim .section-toggle {
  background: rgba(148, 163, 184, 0.15);
  color: rgba(148, 163, 184, 0.8);
}

body.theme-dim .section-toggle:hover {
  background: rgba(148, 163, 184, 0.25);
  color: #f1f5f9;
}

body.theme-dim .section-title-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

body.theme-dim .section-title-badge.warn {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

body.theme-dim .section-title-badge.error {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 10px;
}

.stat-value.compact {
  font-size: 1.15rem;
  word-break: break-word;
}

.stat-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 6px;
}

.stat-sub.mono {
  font-family: var(--mono);
  word-break: break-all;
}

.vault-mode {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.metric-list {
  display: grid;
  gap: 12px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.metric-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.metric-label {
  font-weight: 600;
}

.metric-help {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.metric-value {
  font-weight: 700;
  font-size: 1.2rem;
  text-align: right;
  min-width: 120px;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.vault-type-grid {
  display: grid;
  gap: 12px;
}

.vault-type {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(248, 250, 252, 0.6);
}

.vault-type-title {
  font-weight: 600;
}

.vault-type-body {
  margin-top: 8px;
}

.vault-type-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.card {
  background: #fff;
  border-radius: 18px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.card-link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.card-body {
  color: var(--muted);
  font-size: 0.95rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.card-grid[data-correlated-edges] {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.card-grid[data-correlated-edges] .trend-item {
  padding: 8px 10px;
}

.card-grid[data-correlated-edges] .trend-item-top {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.card-grid[data-correlated-edges] .trend-title {
  flex: 1 1 140px;
  min-width: 0;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.card-grid[data-correlated-edges] .trend-title span {
  white-space: normal;
  line-height: 1.2;
}

.card-grid[data-correlated-edges] .player-headshot {
  width: 22px;
  height: 22px;
}

.card-grid[data-correlated-edges] .tag {
  margin-left: 0;
  align-self: flex-start;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.chart-card {
  display: grid;
  gap: 12px;
}

.chart-wrap {
  width: 100%;
  min-height: 220px;
}

.chart-wrap canvas {
  width: 100%;
  height: 260px;
}

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  white-space: nowrap;
}

.data-table th {
  background: #fdf8f1;
  font-weight: 600;
}

.data-table tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.6);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.search-input {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  min-width: 200px;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.table-pagination.is-compact {
  justify-content: flex-start;
  margin-top: 0;
  gap: 10px;
}

.table-pagination.is-compact .page-info {
  font-size: 0.72rem;
}

.table-pagination.is-compact .filter-actions {
  gap: 8px;
  align-items: center;
  padding-bottom: 0;
}

.table-pagination.is-compact .search-input {
  min-width: 120px;
  padding: 6px 10px;
  font-size: 0.8rem;
}

.page-info {
  font-size: 0.8rem;
  color: var(--muted);
}

th.sortable {
  cursor: pointer;
  position: relative;
}

th.sortable::after {
  content: "";
  color: var(--muted);
  font-size: 0.75rem;
  margin-left: 6px;
}

th.sortable[data-sort-dir="asc"]::after {
  content: "^";
}

th.sortable[data-sort-dir="desc"]::after {
  content: "v";
}

.rationale {
  min-width: 220px;
  white-space: normal;
  color: var(--muted);
}

.bar-stack {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 140px;
  gap: 12px;
  align-items: center;
  font-size: 0.85rem;
}

.bar-label {
  font-weight: 600;
}

.bar-track {
  background: rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent-2);
}

.bar-fill.positive {
  background: linear-gradient(90deg, #14b8a6, #22c55e);
}

.bar-fill.negative {
  background: linear-gradient(90deg, #f97316, #ef4444);
}

.bar-value {
  color: var(--muted);
  font-size: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(120deg, #f59e0b, #f97316);
  color: #0f172a;
}

.btn.ghost {
  background: transparent;
  border-color: rgba(15, 23, 42, 0.2);
  color: var(--ink);
}

.btn.danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #b91c1c;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.loading {
  opacity: 0.75;
}

.btn.small {
  padding: 6px 12px;
  font-size: 0.75rem;
}

.window-tabs .btn.active {
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.7);
  color: #0f172a;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
}

.form-grid,
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px 16px; /* row-gap: 20px, column-gap: 16px */
  align-items: end;
  align-items: end;
}

.inline-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.form-stack {
  display: grid;
  gap: 18px;
}

.form-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
}

.section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.quick-range {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.range-pill {
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: rgba(15, 23, 42, 0.04);
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
}

.range-pill.active {
  border-color: rgba(245, 158, 11, 0.6);
  background: rgba(245, 158, 11, 0.16);
}

.range-preview {
  font-size: 0.85rem;
  color: var(--muted);
}

[data-preflight-pill="ok"] {
  color: #166534;
}

[data-preflight-pill="warn"] {
  color: #b45309;
}

[data-preflight-pill="bad"] {
  color: #b91c1c;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

input,
select,
textarea {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.9rem;
  color: var(--ink);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.chip-group {
  display: grid;
  gap: 8px;
}

.chip-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.1);
  font-size: 0.75rem;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-title {
  font-weight: 600;
}

.status-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.refresh-log {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.refresh-log-row {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(15, 23, 42, 0.04);
}

.refresh-log-row.warning {
  border-color: rgba(234, 179, 8, 0.5);
  background: rgba(234, 179, 8, 0.08);
}

.refresh-log-row.error {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}

.refresh-log-row.info {
  border-color: rgba(14, 165, 233, 0.25);
  background: rgba(14, 165, 233, 0.08);
}

.refresh-log-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.refresh-log-detail,
.refresh-log-action {
  font-size: 0.85rem;
  color: var(--muted);
}

.status-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
  margin-top: 12px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #14b8a6, #0ea5e9);
  transition: width 0.2s ease;
}

.pill.status-idle {
  background: rgba(100, 116, 139, 0.15);
  color: #475569;
}

.pill.status-running {
  background: rgba(14, 165, 233, 0.18);
  color: #075985;
}

.pill.status-cancelling {
  background: rgba(245, 158, 11, 0.2);
  color: #92400e;
}

.pill.status-queued {
  background: rgba(148, 163, 184, 0.18);
  color: #475569;
}

.pill.status-completed {
  background: rgba(22, 163, 74, 0.18);
  color: #166534;
}

.pill.status-error {
  background: rgba(239, 68, 68, 0.18);
  color: #991b1b;
}

.chip input {
  accent-color: var(--accent-2);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-weight: 600;
  font-size: 0.75rem;
}

.pill.badge-ok {
  background: rgba(22, 163, 74, 0.18);
  color: #166534;
  border: 1px solid rgba(22, 163, 74, 0.4);
}

.pill.badge-warn {
  background: rgba(245, 158, 11, 0.2);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.pill.badge-alert {
  background: rgba(239, 68, 68, 0.18);
  color: #991b1b;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.pill.warn {
  background: rgba(239, 68, 68, 0.15);
  color: #991b1b;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.tag.tier-elite {
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.4);
}

.tag.tier-prime {
  background: rgba(20, 184, 166, 0.18);
  color: #0f766e;
  border-color: rgba(20, 184, 166, 0.4);
}

.tag.tier-strong {
  background: rgba(14, 165, 233, 0.18);
  color: #0369a1;
  border-color: rgba(14, 165, 233, 0.4);
}

.tag.tier-watch {
  background: rgba(100, 116, 139, 0.18);
  color: #475569;
  border-color: rgba(100, 116, 139, 0.4);
}

.tag.tier-longshot {
  background: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.4);
}

.tag.risk-low {
  background: rgba(22, 163, 74, 0.18);
  color: #166534;
  border-color: rgba(22, 163, 74, 0.4);
}

.tag.risk-moderate {
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.4);
}

.tag.risk-high {
  background: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.4);
}

.tag.caution-badge {
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.35);
}

.tag.caution-badge.caution-rating {
  background: rgba(56, 189, 248, 0.18);
  color: #0c4a6e;
  border-color: rgba(56, 189, 248, 0.35);
}

.tag.caution-badge.caution-cooling {
  background: rgba(248, 113, 113, 0.18);
  color: #991b1b;
  border-color: rgba(248, 113, 113, 0.35);
}

.callout {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.callout.warn {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.4);
}

.callout-title {
  font-weight: 600;
  font-size: 1rem;
}

.callout-body {
  color: var(--muted);
  font-size: 0.9rem;
}

.callout-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.validation-grid {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.validation-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.validation-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  min-width: 120px;
}

.validation-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.alert {
  border-radius: 14px;
  padding: 14px 18px;
  border: 1px solid transparent;
}

.alert.success {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.35);
}

.alert.error {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.35);
}

.alert.warning {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.35);
}

.alert-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.alert-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.empty-state,
.empty {
  padding: 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px dashed rgba(15, 23, 42, 0.2);
  color: var(--muted);
  font-size: 0.9rem;
}

.analysis-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.analysis-panel {
  grid-column: 1 / -1;
  margin-top: 4px;
  border-style: solid;
  background: var(--bg-surface);
}

.analysis-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.field-stack {
  display: grid;
  gap: 8px;
}

.form-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: 18px;
  align-items: start;
}

.form-main,
.form-side {
  display: grid;
  gap: 12px;
}

.form-side {
  align-content: start;
}

.status-card {
  background: var(--bg-surface);
}

.status-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.status-kpis > div {
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: rgba(148, 163, 184, 0.08);
}

body.theme-dim .status-kpis > div {
  background: rgba(15, 23, 42, 0.4);
  border-color: var(--border);
}

.kpi-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.kpi-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 4px;
}

.status-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 6px;
}

.exclude-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-toggle {
  position: relative;
  cursor: pointer;
}

.chip-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-toggle span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.12);
  color: var(--ink-soft);
  font-size: 0.75rem;
  transition: 0.2s ease;
}

.chip-toggle span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
}

.chip-toggle span:hover {
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--ink);
}

.chip-toggle input:checked + span {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
  color: var(--ink);
}

.chip-toggle input:checked + span::before {
  background: var(--accent);
  border-color: var(--accent);
}

.analysis-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.analysis-filters,
.analysis-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.analysis-filters .btn.active {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.35);
  color: var(--ink);
}

.analysis-grid {
  display: grid;
  gap: 12px;
}

.analysis-empty {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted);
  font-size: 0.85rem;
}

.analysis-empty.is-hidden,
.analysis-group.is-hidden,
.analysis-items .is-hidden {
  display: none;
}

.analysis-group {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--bg-surface);
}

.analysis-group summary {
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.analysis-items {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 12px;
}

.analysis-items .checkbox {
  padding: 4px 6px;
  border-radius: 8px;
}

.analysis-items .checkbox:hover {
  background: rgba(148, 163, 184, 0.12);
}

.export-title {
  font-weight: 600;
}

.export-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-size: 0.78rem;
}

.chip-link:hover {
  background: rgba(37, 99, 235, 0.2);
}

body.theme-dim .chip-link {
  color: #bfdbfe;
}

.export-expand {
  margin-top: 12px;
  border-top: 1px dashed var(--border);
  padding-top: 12px;
}

.export-expand summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.discovery-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.discovery-stepper .stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

#discovery-engine,
#trend-analysis,
#batch-scanner,
#review-exports,
#recent-exports {
  scroll-margin-top: 120px;
}

.stepper-link {
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.8rem;
}

.stepper-link.active {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(148, 163, 184, 0.15);
}

.form-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  margin-bottom: 12px;
}

.form-card-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 10px;
}

.form-advanced {
  border-radius: 14px;
  border: 1px dashed var(--border);
  padding: 12px 14px;
  background: rgba(148, 163, 184, 0.08);
  margin-bottom: 12px;
}

.form-advanced summary {
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.theme-dim .form-advanced {
  background: rgba(15, 23, 42, 0.4);
}

.field-hint {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

.field-hint.is-error,
.field-hint.is-warning {
  color: #fbbf24;
}

.form-inline-error {
  margin-top: 10px;
  font-size: 0.85rem;
  color: #fca5a5;
  display: none;
}

.form-inline-error.is-visible {
  display: block;
}

.sticky-actions {
  position: sticky;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  z-index: 2;
}

.sticky-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.theme-dim .sticky-actions {
  background: rgba(15, 23, 42, 0.85);
}

.pill.pill-muted {
  background: rgba(148, 163, 184, 0.15);
  color: #e2e8f0;
}

.app[data-page="discovery"] .card-title {
  font-size: 1.05rem;
}

@media (max-width: 980px) {
  .form-shell {
    grid-template-columns: 1fr;
  }

  .sticky-actions {
    position: static;
  }
}

.export-list {
  list-style: none;
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.export-list li {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font-family: "Space Mono", monospace;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.export-list a {
  color: var(--ink);
  text-decoration: none;
}

.snapshot-library {
  display: grid;
  gap: 16px;
}

.snapshot-latest {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.04);
}

.snapshot-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.snapshot-title {
  font-weight: 600;
  margin-top: 6px;
}

.snapshot-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

.snapshot-actions {
  display: flex;
  gap: 10px;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.snapshot-grid .snapshot-card {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  display: grid;
  gap: 6px;
}

.export-meta {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: "Sora", system-ui, -apple-system, sans-serif;
}

.audit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.audit-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.metric {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.04);
}

.metric-value {
  font-weight: 700;
  font-size: 1.2rem;
}

.metric-label {
  color: var(--muted);
  font-size: 0.85rem;
}

.steps {
  padding-left: 20px;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.workflow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.workflow-step {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.step-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.step-body {
  color: var(--muted);
  font-size: 0.9rem;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

.checkbox input {
  accent-color: var(--accent-2);
}

.hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.form-feedback {
  display: none;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
  font-size: 0.85rem;
  grid-column: 1 / -1;
}

.form-feedback.active {
  display: grid;
  gap: 6px;
}

.form-error-title {
  font-weight: 600;
}

.form-feedback ul {
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.boxscore-hint {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.03);
}

.boxscore-hint .hint-span {
  grid-column: 1 / -1;
}

.hint-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 600;
}

.hint-body {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.4;
}

.input-error {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.preview-grid {
  display: grid;
  gap: 18px;
}

.preview-table {
  display: grid;
  gap: 8px;
}

.table-title {
  font-weight: 600;
  color: var(--ink);
}

.small-muted {
  color: var(--muted);
  font-size: 0.75rem;
}

.small-muted.is-error {
  color: var(--danger);
  font-weight: 600;
}

.picks-board {
  display: grid;
  gap: 18px;
}

.view-toggle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.view-toggle .btn.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.45);
}

.weight-panel summary {
  cursor: pointer;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.weight-controls {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.weight-controls label {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
}

.weight-controls input[type="range"] {
  accent-color: var(--accent);
}

.picks-view[data-view-mode="cards"] .picks-table {
  display: none;
}

.picks-view[data-view-mode="table"] .picks-cards {
  display: none;
}

.picks-cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.pick-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 16px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 12px;
}

.pick-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pick-player {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1rem;
}

.pick-prop {
  color: var(--muted);
  font-size: 0.85rem;
}

.pick-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pick-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.pick-metric {
  background: rgba(15, 23, 42, 0.04);
  border-radius: 12px;
  padding: 8px 10px;
  display: grid;
  gap: 4px;
}

.pick-metric span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.pick-metric strong {
  font-size: 0.95rem;
}

.pick-details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}

.pick-details[open] summary {
  margin-bottom: 8px;
}

.pick-detail-grid {
  display: grid;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.active-sort {
  font-size: 0.8rem;
  color: var(--muted);
}

.trend-stats .stat-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), #fff);
}

.trend-panel {
  border: 1px solid rgba(20, 184, 166, 0.4);
}

.trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  align-items: start;
}

.radar-board {
  display: grid;
  gap: 16px;
}

.radar-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.radar-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  border-left: 4px solid rgba(14, 165, 233, 0.6);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.radar-card.is-stale {
  border-left-color: rgba(245, 158, 11, 0.6);
  background: rgba(255, 255, 255, 0.78);
}

.radar-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trend-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pin-toggle {
  border: 1px solid rgba(14, 165, 233, 0.45);
  background: rgba(14, 165, 233, 0.14);
  color: #0c4a6e;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
}

.pin-toggle.is-active {
  border-color: rgba(14, 165, 233, 0.7);
  background: rgba(14, 165, 233, 0.22);
  color: #0c4a6e;
}

.radar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  grid-auto-flow: dense;
}

.radar-tile {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.radar-tile.is-wide {
  grid-column: span 2;
}

.radar-tile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.radar-tile-body {
  display: grid;
  gap: 10px;
}

.radar-row {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.04);
}

.radar-row-title {
  font-weight: 600;
  color: var(--ink);
}

.radar-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.radar-tile-footer {
  display: flex;
  justify-content: flex-end;
}

.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filter-toggle input[type="checkbox"] {
  accent-color: var(--accent-2);
}

.trend-card {
  display: grid;
  gap: 14px;
  border-left: 4px solid rgba(14, 165, 233, 0.6);
  align-self: start;
}

.trend-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

/* ============================================
   TOP TREND SIGNALS - Controls strip
   ============================================ */
.top-signals-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: rgba(15, 23, 42, 0.02);
  border-radius: 10px;
}

.top-signals-controls-bottom {
  margin-bottom: 0;
  margin-top: 16px;
  padding: 10px 16px;
}

.top-signals-controls-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-signals-controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-signals-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  cursor: pointer;
}

.top-signals-checkbox input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

.top-signals-page-info {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.top-signals-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-signals-page-size {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--muted);
}

.top-signals-page-size select {
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

/* Dim theme for Top Signals controls */
body.theme-dim .top-signals-controls {
  background: rgba(148, 163, 184, 0.06);
}

body.theme-dim .top-signals-checkbox {
  color: #e2e8f0;
}

body.theme-dim .top-signals-page-info {
  color: #94a3b8;
}

body.theme-dim .top-signals-page-size {
  color: #94a3b8;
}

body.theme-dim .top-signals-page-size select {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(148, 163, 184, 0.15);
  color: #f1f5f9;
}

.trend-list {
  display: grid;
  gap: 12px;
}

.top-trend-list {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 16px;
}

.trend-group {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
}

.trend-group-header {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
}

.trend-group-actions {
  display: flex;
  align-items: stretch;
  flex: 0 0 140px;
  min-width: 120px;
}

.trend-group-top .trend-group-actions {
  align-self: stretch;
}

.trend-group-body.is-collapsed {
  display: none;
}

.trend-group-list {
  display: grid;
  gap: 10px;
}

.trend-summary {
  flex: 1;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.02);
  display: grid;
  gap: 8px;
}

.trend-summary.has-near-miss,
.trend-item.has-near-miss {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.08);
}

.trend-evidence {
  font-size: 0.78rem;
  color: var(--muted);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px;
}

.trend-evidence.compact {
  font-size: 0.76rem;
}

.trend-evidence.table {
  grid-template-columns: 1fr;
  gap: 10px;
}

.trend-evidence-header {
  display: grid;
  gap: 2px;
}

.trend-evidence-table {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  max-width: 100%;
  overflow-x: auto;
}

.trend-evidence-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.trend-evidence-table th,
.trend-evidence-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.trend-evidence-table th {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.65rem;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.04);
  position: sticky;
  top: 0;
}

.trend-evidence-table tr:last-child td {
  border-bottom: none;
}

.trend-evidence-table tr.near-miss td {
  background: rgba(245, 158, 11, 0.12);
}

.trend-evidence-table tr.hit td {
  background: rgba(34, 197, 94, 0.12);
}

.trend-evidence-table tr.miss td {
  background: rgba(239, 68, 68, 0.12);
}

.trend-evidence-table tr.dnp td {
  background: rgba(168, 85, 247, 0.14);
}

.trend-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reason-pill {
  background: rgba(14, 165, 233, 0.15);
  color: #075985;
}

.trend-evidence-label {
  font-weight: 600;
  color: var(--ink-soft);
}

.trend-evidence-list {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.evidence-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.06);
  font-size: 0.72rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.trend-group-top {
  padding: 16px;
  gap: 12px;
  background: rgba(255, 255, 255, 0.94);
  border-left: 4px solid rgba(14, 165, 233, 0.6);
  box-shadow: var(--shadow-soft);
}

.trend-summary-top {
  flex: 1;
  width: 100%;
  display: grid;
  gap: 12px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.trend-summary-head {
  display: grid;
  gap: 10px;
}

.trend-summary-title {
  display: grid;
  gap: 6px;
}

.trend-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.trend-title-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.trend-summary-title .trend-desc {
  margin: 0;
}

.trend-summary-details {
  display: grid;
  grid-template-columns: minmax(220px, 0.6fr) minmax(0, 1.4fr);
  gap: 12px 18px;
  align-items: start;
}

.trend-summary-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px 14px;
}

.macro-drivers {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.04);
}

.macro-drivers.is-collapsed .macro-list {
  display: none;
}

.macro-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.macro-title {
  font-weight: 600;
}

.macro-sub {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

.macro-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.macro-card {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.03);
  display: grid;
  gap: 4px;
}

.macro-card-title {
  font-weight: 600;
  font-size: 0.85rem;
}

.macro-card-detail {
  font-size: 0.8rem;
  color: var(--muted);
}

.trend-summary-facts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trend-featured-facts {
  display: flex;
  gap: 8px;
  max-width: 420px;
}

.trend-secondary-facts {
  display: flex;
  gap: 16px;
}

.trend-teammate-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.08);
  font-size: 0.85rem;
}

.trend-teammate-facts .trend-fact {
  flex: 0 0 auto;
  min-width: 80px;
}

.trend-teammate-facts .trend-fact-label {
  color: #7c3aed;
}

.trend-teammate-facts .trend-fact-value {
  color: #5b21b6;
}

/* Dual-teammate trigger styling */
.trend-teammate-verification {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.85rem;
}

.trend-teammate-verification .teammate-label {
  color: #7c3aed;
  font-weight: 500;
}

.trend-teammate-verification .dual-teammate-and {
  color: #f59e0b;
  font-weight: 600;
  padding: 2px 6px;
  background: rgba(245, 158, 11, 0.15);
  border-radius: 4px;
}

.trend-teammate-verification .teammate-pill {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #7c3aed;
}

.trend-fact {
  display: grid;
  gap: 2px;
}

.trend-fact.is-featured {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(14, 165, 233, 0.35);
  background: rgba(14, 165, 233, 0.12);
}

.trend-fact-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.65rem;
  color: var(--muted);
}

.trend-fact-value {
  font-weight: 600;
  color: var(--ink);
}

.trend-fact.is-featured .trend-fact-label {
  color: #0c4a6e;
}

.trend-fact.is-featured .trend-fact-value {
  font-size: 1.05rem;
  font-weight: 700;
}

.trend-fact.is-featured.projection-over {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.15);
}

.trend-fact.is-featured.projection-over .trend-fact-label {
  color: #166534;
}

.trend-fact.is-featured.projection-over .trend-fact-value {
  color: #16a34a;
}

.trend-fact.is-featured.projection-under {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.15);
}

.trend-fact.is-featured.projection-under .trend-fact-label {
  color: #991b1b;
}

.trend-fact.is-featured.projection-under .trend-fact-value {
  color: #dc2626;
}

.trend-kpi {
  display: grid;
  gap: 2px;
}

.trend-kpi-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.65rem;
  color: var(--muted);
}

.trend-kpi-value {
  font-weight: 700;
  color: var(--ink);
}

.tipoff-pill {
  background: rgba(14, 165, 233, 0.15);
  color: #0c4a6e;
  border-color: rgba(14, 165, 233, 0.35);
}

.pill.warning {
  background: rgba(245, 158, 11, 0.2);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.4);
}

.trend-count-badge {
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.trend-count-badge.badge-neutral {
  background: var(--accent-3);
}

.trend-count-badge.badge-warn {
  background: var(--risk-moderate);
}

.trend-count-badge.badge-alert {
  background: var(--risk-high);
}

.trend-group-toggle {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.trend-group-toggle.badge-neutral {
  background: var(--accent-3);
}

.trend-group-toggle.badge-warn {
  background: var(--risk-moderate);
}

.trend-group-toggle.badge-alert {
  background: var(--risk-high);
}

.trend-group-toggle:hover {
  filter: brightness(0.96);
}

.trend-toggle-count {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
}

.trend-toggle-label {
  font-size: 0.7rem;
}

.trend-history {
  display: grid;
  gap: 12px;
}

.history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.03);
}

.history-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.history-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  align-items: start;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-3);
  margin-top: 4px;
}

.timeline-title {
  font-weight: 600;
  font-size: 0.85rem;
}

.alert-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.alert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.03);
}

.alert-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.trend-item {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.03);
  display: grid;
  gap: 8px;
}

.trend-streak {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  background: rgba(14, 165, 233, 0.08);
  display: grid;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.trend-streak.compact {
  font-size: 0.74rem;
}

.trend-streak-title {
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.64rem;
}

.trend-streak-line {
  color: var(--muted);
}

.trend-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.trend-stack-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.stacked-pill {
  background: rgba(14, 165, 233, 0.15);
  color: #0c4a6e;
  border-color: rgba(14, 165, 233, 0.35);
}

.trend-item.is-stacked {
  border-left: 3px solid rgba(14, 165, 233, 0.35);
  background: rgba(15, 23, 42, 0.04);
}

.trend-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}

.player-headshot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.08);
  flex: 0 0 auto;
}

.trend-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.trend-desc {
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.trend-summary-top .trend-context {
  font-size: 0.78rem;
}

.trend-summary-top .trend-evidence {
  margin-top: 4px;
  align-items: start;
}

.trend-context {
  font-size: 0.75rem;
  color: var(--muted);
}

.tag.signal-over {
  background: rgba(34, 197, 94, 0.18);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.4);
}

.tag.signal-under {
  background: rgba(239, 68, 68, 0.18);
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.4);
}

.tag.signal-correct {
  background: rgba(34, 197, 94, 0.18);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.4);
}

.tag.signal-incorrect {
  background: rgba(239, 68, 68, 0.18);
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.4);
}

.tag.bet-action {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag.bet-action.bet {
  background: rgba(34, 197, 94, 0.25);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.5);
}

.tag.bet-action.fade {
  background: rgba(251, 146, 60, 0.25);
  color: #9a3412;
  border-color: rgba(251, 146, 60, 0.5);
}

/* [2026-01-27] Anomaly Due badge - pattern cleared, due for opposite */
.tag.anomaly-due-badge {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(236, 72, 153, 0.3));
  color: #7c3aed;
  border-color: rgba(168, 85, 247, 0.6);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: anomaly-pulse 2s ease-in-out infinite;
}

@keyframes anomaly-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4); }
  50% { box-shadow: 0 0 8px 2px rgba(168, 85, 247, 0.3); }
}

.pill.rec-side {
  background: rgba(59, 130, 246, 0.18);
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.4);
  font-weight: 600;
}

.tag-sm {
  display: inline-block;
  padding: 2px 6px;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 3px;
  text-transform: uppercase;
}

.tag-sm.signal-over {
  background: rgba(34, 197, 94, 0.18);
  color: #166534;
}

.tag-sm.signal-under {
  background: rgba(239, 68, 68, 0.18);
  color: #991b1b;
}

.tag-sm.rec-hit {
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.6);
}

.delta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.delta-card {
  display: grid;
  gap: 12px;
}

.delta-list {
  display: grid;
  gap: 10px;
}

.delta-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
}

.delta-title {
  font-weight: 600;
}

.delta-value {
  font-family: "Space Mono", monospace;
  font-size: 0.8rem;
}

.delta-change.up {
  color: var(--success);
}

.delta-change.down {
  color: var(--danger);
}

.empty-state.small {
  padding: 12px;
  font-size: 0.8rem;
}

.empty-state.missing-data {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(245, 158, 11, 0.08));
  border: 1px dashed rgba(251, 191, 36, 0.4);
  border-radius: 6px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state.missing-data .missing-icon {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.empty-state.missing-data .missing-cols {
  font-size: 0.7rem;
  margin-top: 6px;
  opacity: 0.7;
  font-family: "Space Mono", monospace;
}

select option.unavailable {
  color: var(--warning, #f59e0b);
  font-style: italic;
}

.pill.mono {
  font-family: "Space Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.filter-panel {
  background: linear-gradient(140deg, rgba(245, 158, 11, 0.08), rgba(14, 165, 233, 0.08));
  border: 1px solid rgba(15, 23, 42, 0.12);
}

/* =============================================================================
   FILTER PANEL V2 - Professional two-tier filter system
   ============================================================================= */

.filter-panel-v2 {
  padding: 0;
  overflow: hidden;
}

/* Quick Filters Row - always visible, handles 80% of filtering */
.filter-quick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.filter-quick-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
}

.filter-quick-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.filter-search {
  min-width: 200px;
  max-width: 280px;
  flex: 1;
}

.filter-select {
  min-width: 110px;
  max-width: 150px;
}

.filter-select-wide {
  min-width: 150px;
  max-width: 200px;
}

.filter-select-game {
  min-width: 220px;
  max-width: 280px;
}

.filter-select-sm {
  min-width: 100px;
  max-width: 140px;
  font-size: 0.8rem;
  padding: 6px 10px;
}

/* More Filters button with badge */
.filter-more-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-weight: 500;
}

.filter-badge {
  display: none;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  color: #fff;
  background: var(--primary, #f59e0b);
  border-radius: 9px;
}

.filter-badge.has-filters,
.filter-badge.is-visible {
  display: inline-block;
}

/* Applied Filter Chips */
.filter-chips {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(245, 158, 11, 0.06);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.filter-chips.has-chips {
  display: flex;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 16px;
}

.filter-chip-label {
  color: var(--muted);
}

.filter-chip-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  color: var(--muted);
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-chip-remove:hover {
  color: var(--danger, #ef4444);
  background: rgba(239, 68, 68, 0.1);
}

.chip-clear-all {
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: 1px dashed rgba(15, 23, 42, 0.2);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.15s;
}

.chip-clear-all:hover {
  color: var(--danger, #ef4444);
  border-color: var(--danger, #ef4444);
}

/* Advanced Filters Panel - collapsible */
.filter-advanced-panel {
  display: none;
  padding: 20px;
  background: rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.filter-advanced-panel.is-open {
  display: block;
}

.filter-advanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-group-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.filter-group .filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-group .filter-label {
  font-size: 0.7rem;
  color: var(--muted);
  margin: 0;
}

.filter-group select {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.85rem;
}

/* Date range within filter group */
.filter-date-range {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-date-range .date-range-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-date-range .date-range-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-date-range .date-input {
  width: 130px;
  padding: 6px 10px;
  font-size: 0.8rem;
}

.filter-date-range .date-separator {
  color: var(--muted);
  font-size: 0.8rem;
}

.filter-date-range .recalc-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
}

.filter-date-range .recalc-toggle input {
  width: 14px;
  height: 14px;
}

.filter-advanced-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.filter-presets {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Results Footer */
.filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.02);
}

.filter-summary {
  font-size: 0.8rem;
  color: var(--muted);
}

.filter-clear-all {
  font-size: 0.8rem;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.filter-clear-all:hover {
  opacity: 1;
  color: var(--danger, #ef4444);
}

.filter-clear-all.is-hidden {
  display: none;
}

.btn-link {
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

/* Legacy support for old filter-panel pages */
.filter-panel:not(.filter-panel-v2) .filter-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

/* Responsive */
@media (max-width: 900px) {
  .filter-quick {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-quick-left {
    flex-direction: column;
  }
  .filter-search,
  .filter-select,
  .filter-select-wide,
  .filter-select-game {
    max-width: none;
    width: 100%;
  }
  .filter-advanced-grid {
    grid-template-columns: 1fr;
  }
}

/* Legacy filter-bar support (for other pages) */
.filter-bar:not(.filter-grid) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px 12px;
  align-items: end;
}

.filter-bar:not(.filter-grid) input,
.filter-bar:not(.filter-grid) select {
  width: 100%;
  margin-top: 8px;
}

.filter-advanced {
  display: contents;
}

.filter-advanced.is-hidden {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .filter-field-search {
    max-width: 220px;
  }
  .filter-field-wide {
    max-width: 180px;
  }
}

@media (max-width: 900px) {
  .filter-row {
    gap: 10px;
  }
  .filter-field-search {
    flex: 1 1 100%;
    max-width: none;
  }
  .filter-field {
    flex: 1 1 calc(50% - 10px);
    min-width: 80px;
  }
  .filter-field-wide {
    flex: 1 1 calc(50% - 10px);
    max-width: none;
  }
}

.filter-actions {
  display: flex;
  align-items: flex-end;
  padding-bottom: 2px;
}

.filter-panel .filter-actions {
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

/* Filter group for related dropdowns (category + prop) */
.filter-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-group > label {
  flex: 1;
  min-width: 160px;
}

/* Condition chips for discovered patterns */
.condition-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}

.condition-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.condition-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 12px;
  color: var(--ink);
}

.condition-chip.elite {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
}

.condition-chip .warning-badge {
  color: var(--warning);
  font-weight: 700;
  font-size: 0.8em;
}

.condition-lift {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.lift-badge {
  color: var(--success);
  font-weight: 600;
}

/* Condition summary text */
.condition-summary {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 4px;
}

/* Enhanced evidence table */
.evidence-table.enhanced th {
  font-size: 0.7rem;
  white-space: nowrap;
  padding: 6px 8px;
}

.evidence-table.enhanced td {
  font-size: 0.75rem;
  padding: 5px 8px;
}

.evidence-table .condition-match {
  background: rgba(34, 197, 94, 0.15);
  font-weight: 600;
}

/* Custom tooltips */
.tooltip-trigger {
  cursor: help;
  margin-left: 4px;
  opacity: 0.6;
  display: inline-flex;
  align-items: center;
}

.tooltip-trigger:hover {
  opacity: 1;
}

.tooltip-trigger svg {
  width: 14px;
  height: 14px;
}

.tooltip-content {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  max-width: 280px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 100;
  font-size: 0.85rem;
  line-height: 1.4;
}

.tooltip-trigger:hover + .tooltip-content,
.tooltip-content:hover {
  opacity: 1;
  visibility: visible;
}

.tooltip-content strong {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
}

.tooltip-content ul {
  margin: 8px 0 0 16px;
  padding: 0;
}

.tooltip-content li {
  margin: 4px 0;
}

.filter-summary {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.input-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-inline input {
  flex: 1;
}

[data-delta-section].is-compact .delta-grid {
  display: none;
}

[data-delta-section].is-compact [data-delta-empty] {
  display: grid;
}

[data-delta-section].is-collapsed > :not(.section-header) {
  display: none;
}

[data-alerts-section].is-collapsed > :not(.section-header) {
  display: none;
}

.bar-fill.elite {
  background: linear-gradient(90deg, #f59e0b, #f97316);
}

.bar-fill.strong {
  background: linear-gradient(90deg, #14b8a6, #22c55e);
}

.bar-fill.lean {
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
}

.bar-fill.edge {
  background: linear-gradient(90deg, #94a3b8, #cbd5f5);
}

.bar-fill.accent {
  background: linear-gradient(90deg, #f59e0b, #14b8a6);
}

@media (max-width: 1024px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }

  .content {
    padding: 24px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .trend-hero {
    grid-template-columns: 1fr;
  }

  .trend-hero-header {
    grid-template-columns: 1fr;
  }

  .trend-hero-actions {
    justify-items: start;
  }

  .trend-hero-action-row,
  .trend-hero-action-pills {
    justify-content: flex-start;
  }

  .trend-hero-status-grid {
    grid-template-columns: 1fr;
  }

  .trend-summary-head {
    grid-template-columns: 1fr;
  }

  .trend-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .trend-title-tags {
    justify-content: flex-start;
  }

  .trend-summary-details {
    grid-template-columns: 1fr;
  }

  .top-trend-list {
    grid-template-columns: 1fr;
  }

  .radar-tile.is-wide {
    grid-column: auto;
  }

  .sidebar-toggle {
    display: inline-flex;
  }
}

@media (max-width: 768px) {
  .page-title {
    font-size: 1.7rem;
  }

  /* Filter bar responsive: 2 columns on tablet */
  .filter-bar {
    grid-template-columns: 1fr 1fr;
    gap: 16px 12px;
  }

  .filter-group {
    grid-column: 1 / -1;
    gap: 12px;
  }

  .filter-group > label {
    flex: 1 1 calc(50% - 6px);
    min-width: 140px;
  }

  .hero-main h1,
  .hero-main h2,
  .hero-card h1,
  .hero-card h2 {
    font-size: 1.8rem;
  }

  .trend-hero-title-row h2 {
    font-size: 1.8rem;
  }

  .bar-row {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 20px;
  }

  .nav-group {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .nav-group .nav-label {
    grid-column: 1 / -1;
  }

  .content {
    padding: 20px;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-input {
    min-width: 100%;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
  }

  .picks-cards {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 20;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
    display: block;
  }

  body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  /* Filter bar responsive: stack on mobile */
  .filter-bar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .filter-group {
    flex-direction: column;
    gap: 12px;
  }

  .filter-group > label {
    flex: 1;
    min-width: 100%;
  }

  .trend-grid {
    grid-template-columns: 1fr;
  }

  .trend-card-header,
  .trend-group-header,
  .trend-item-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .trend-group-actions {
    flex-direction: row;
    align-items: stretch;
    justify-content: stretch;
    gap: 8px;
    width: 100%;
  }

  .trend-group-toggle {
    min-height: 44px;
  }

  .top-trend-list {
    grid-template-columns: 1fr;
  }

  .trend-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .trend-title-tags {
    justify-content: flex-start;
  }

  .trend-summary-facts {
    grid-template-columns: 1fr;
  }

  .trend-summary-kpis {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .trend-summary {
    width: 100%;
  }

  .trend-group {
    padding: 10px;
  }

  .panel-meta {
    gap: 10px;
  }
}

.toast-stack {
  position: fixed;
  top: 24px;
  right: 24px;
  display: grid;
  gap: 12px;
  z-index: 999;
}

.toast {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 12px 14px;
  display: grid;
  gap: 6px;
  min-width: 240px;
  max-width: 320px;
  border-left: 4px solid var(--accent-3);
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.toast-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.toast-body {
  color: var(--muted);
  font-size: 0.8rem;
}

.toast-close {
  border: none;
  background: transparent;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 900;
}

.modal.is-open {
  display: flex;
}

.drawer {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 950;
}

.drawer.is-open {
  display: block;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(520px, 92vw);
  background: #fff;
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  padding: 20px;
  overflow: auto;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 1;
}

.drawer.is-open .drawer-panel {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.drawer-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.drawer-sub {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.drawer-body {
  display: grid;
  gap: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.modal-panel {
  position: relative;
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  width: min(640px, 92vw);
  max-height: 85vh;
  overflow: auto;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: grid;
  gap: 16px;
  z-index: 1;
}

.modal-panel-wide {
  width: min(860px, 92vw);
}

.log-list {
  display: grid;
  gap: 10px;
}

.log-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.03);
  font-size: 0.8rem;
}

.log-time {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.log-title {
  font-weight: 600;
  color: var(--ink);
}

.log-meta {
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .log-row {
    grid-template-columns: 1fr;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.modal-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.modal-sub {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.modal-body {
  display: grid;
  gap: 16px;
}

.pref-columns {
  display: grid;
  gap: 12px;
}

.pref-table {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.03);
}

.pref-table-title {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.pref-table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.glossary-item {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.03);
  display: grid;
  gap: 6px;
}

.glossary-term {
  font-weight: 600;
  font-size: 0.9rem;
}

.glossary-def {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.glossary-example {
  font-size: 0.78rem;
  color: var(--muted);
}

.shortcut-list {
  display: grid;
  gap: 8px;
  font-size: 0.85rem;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.version-info {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
}

.version-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.version-row code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.8rem;
  background: var(--surface-alt, rgba(0, 0, 0, 0.1));
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-muted, #64748b);
}

.chip-field {
  display: grid;
  gap: 8px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-token {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.1);
  font-size: 0.75rem;
}

.chip-remove {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.8rem;
}

.tooltip {
  border-bottom: 1px dashed rgba(15, 23, 42, 0.3);
  cursor: help;
}

.col-hidden {
  display: none;
}

.is-hidden {
  display: none;
}

.skeleton-table {
  display: grid;
  gap: 10px;
}

.skeleton-row {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.06));
  background-size: 200px 100%;
  animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }

  100% {
    background-position: 200px 0;
  }
}

body.theme-dim {
  --bg: #0f172a;
  --bg-soft: #111827;
  --bg-surface: rgba(30, 41, 59, 0.6);
  --ink: #e2e8f0;
  --ink-soft: #cbd5f5;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.2);
  --border-soft: rgba(148, 163, 184, 0.16);
  --shadow: 0 26px 60px rgba(2, 6, 23, 0.45);
  --shadow-soft: 0 14px 28px rgba(2, 6, 23, 0.35);
  background: linear-gradient(140deg, #0b1220 0%, #111827 40%, #1e293b 100%);
}

body.theme-dim .card,
body.theme-dim .table-wrap,
body.theme-dim .stat-card,
body.theme-dim .callout,
body.theme-dim .hero-main,
body.theme-dim .hero-card,
body.theme-dim .hero-metrics,
body.theme-dim .workflow-step,
body.theme-dim .empty,
body.theme-dim .empty-state,
body.theme-dim .export-list li,
body.theme-dim .form-section,
body.theme-dim .metric,
body.theme-dim .modal-panel,
body.theme-dim .toast {
  background: rgba(15, 23, 42, 0.92);
  border-color: var(--border);
  color: var(--ink);
}

body.theme-dim .data-table th {
  background: rgba(15, 23, 42, 0.7);
}

body.theme-dim .data-table tr:nth-child(even) td {
  background: rgba(15, 23, 42, 0.6);
}

body.theme-dim input,
body.theme-dim select,
body.theme-dim textarea {
  background: rgba(15, 23, 42, 0.7);
  border-color: var(--border);
  color: var(--ink);
}

body.theme-dim .btn.ghost {
  border-color: rgba(148, 163, 184, 0.3);
  color: var(--ink);
}

body.theme-dim .window-tabs .btn.active {
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.8);
  color: #0f172a;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.3);
}

body.theme-dim .trend-group,
body.theme-dim .trend-summary,
body.theme-dim .trend-item {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(148, 163, 184, 0.25);
  color: var(--ink);
}

body.theme-dim .trend-group-top {
  background: rgba(15, 23, 42, 0.92);
  border-left-color: rgba(14, 165, 233, 0.7);
}

body.theme-dim .trend-desc {
  color: var(--ink-soft);
}

body.theme-dim .trend-context {
  color: var(--muted);
}

body.theme-dim .evidence-chip {
  background: rgba(15, 23, 42, 0.55);
  color: var(--ink);
  border-color: rgba(148, 163, 184, 0.25);
}

body.theme-dim .trend-evidence-table {
  background: rgba(15, 23, 42, 0.6);
}

body.theme-dim .trend-evidence-table th {
  background: rgba(15, 23, 42, 0.9);
  color: var(--muted);
}

body.theme-dim .trend-evidence-table td {
  border-bottom-color: rgba(148, 163, 184, 0.15);
}

body.theme-dim .trend-evidence-table tr.near-miss td {
  background: rgba(245, 158, 11, 0.18);
}

body.theme-dim .trend-evidence-table tr.hit td {
  background: rgba(34, 197, 94, 0.2);
}

body.theme-dim .trend-evidence-table tr.miss td {
  background: rgba(239, 68, 68, 0.2);
}

body.theme-dim .trend-evidence-table tr.dnp td {
  background: rgba(168, 85, 247, 0.22);
}

body.theme-dim .trend-fact.is-featured {
  background: rgba(14, 165, 233, 0.22);
  border-color: rgba(56, 189, 248, 0.4);
}

body.theme-dim .trend-fact.is-featured .trend-fact-label {
  color: #bae6fd;
}

body.theme-dim .trend-fact.is-featured.projection-over {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.22);
}

body.theme-dim .trend-fact.is-featured.projection-over .trend-fact-label {
  color: #86efac;
}

body.theme-dim .trend-fact.is-featured.projection-over .trend-fact-value {
  color: #4ade80;
}

body.theme-dim .trend-fact.is-featured.projection-under {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.22);
}

body.theme-dim .trend-fact.is-featured.projection-under .trend-fact-label {
  color: #fecaca;
}

body.theme-dim .trend-fact.is-featured.projection-under .trend-fact-value {
  color: #f87171;
}

body.theme-dim .macro-drivers {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.2);
}

body.theme-dim .macro-card {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(148, 163, 184, 0.18);
}

body.theme-dim .trend-hero-card {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.25);
}

body.theme-dim .trend-hero-merged {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(148, 163, 184, 0.18);
}

body.theme-dim .trend-hero-status {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(14, 165, 233, 0.3);
}

body.theme-dim .trend-hero-status-pill {
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
}

body.theme-dim .trend-hero-glance-grid {
  background: rgba(15, 23, 42, 0.35);
  border-color: rgba(148, 163, 184, 0.2);
  color: rgba(226, 232, 240, 0.7);
}

body.theme-dim .trend-hero-glance-grid .panel-kv-label {
  color: rgba(148, 163, 184, 0.75);
}

body.theme-dim .trend-hero-glance-grid .panel-kv-value {
  color: rgba(226, 232, 240, 0.9);
}

body.theme-dim .trend-hero-summary-text {
  color: rgba(226, 232, 240, 0.72);
}

body.theme-dim .trend-hero-subline {
  color: rgba(226, 232, 240, 0.7);
}

body.theme-dim .trend-hero-progress-label {
  color: #cbd5f5;
}

body.theme-dim .trend-hero-progress-bar {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.3);
}

body.theme-dim .trend-hero-delta .pill {
  background: rgba(15, 23, 42, 0.6);
  color: var(--ink);
  border-color: rgba(148, 163, 184, 0.25);
}

/* ============================================
   RADAR HERO - Dim/Dark Theme Styles
   ============================================ */
body.theme-dim .radar-hero {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(148, 163, 184, 0.2);
}

body.theme-dim .radar-header {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.5), transparent);
  border-color: rgba(148, 163, 184, 0.15);
}

body.theme-dim .radar-title {
  color: #f1f5f9;
}

body.theme-dim .radar-status-pill {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

body.theme-dim .radar-status-pill.running {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

body.theme-dim .radar-status-pill.error {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

body.theme-dim .radar-subtext {
  color: rgba(148, 163, 184, 0.8);
}

body.theme-dim .radar-subtext-sep {
  color: rgba(148, 163, 184, 0.4);
}

body.theme-dim .icon-btn {
  color: rgba(148, 163, 184, 0.8);
}

body.theme-dim .icon-btn:hover {
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.3);
  color: #f1f5f9;
}

body.theme-dim .radar-menu-dropdown {
  background: rgba(30, 41, 59, 0.98);
  border-color: rgba(148, 163, 184, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body.theme-dim .radar-menu-item {
  color: #e2e8f0;
}

body.theme-dim .radar-menu-item:hover {
  background: rgba(148, 163, 184, 0.15);
}

body.theme-dim .radar-progress-bar {
  background: rgba(148, 163, 184, 0.15);
}

body.theme-dim .radar-progress-meta {
  color: rgba(148, 163, 184, 0.8);
}

/* KPI Strip - Dim */
body.theme-dim .radar-kpi-strip {
  border-color: rgba(148, 163, 184, 0.12);
}

body.theme-dim .radar-kpi {
  background: rgba(30, 41, 59, 0.5);
}

body.theme-dim .radar-kpi:hover {
  background: rgba(30, 41, 59, 0.7);
}

body.theme-dim .radar-kpi-value {
  color: #f1f5f9;
}

body.theme-dim .radar-kpi-label {
  color: rgba(148, 163, 184, 0.8);
}

body.theme-dim .radar-kpi-health {
  border-left-color: rgba(34, 197, 94, 0.5);
}

/* Radar Cards - Dim */
body.theme-dim .radar-card {
  background: rgba(30, 41, 59, 0.4);
  border-color: rgba(148, 163, 184, 0.15);
}

body.theme-dim .radar-card-header {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(148, 163, 184, 0.1);
}

body.theme-dim .radar-card-title {
  color: #e2e8f0;
}

body.theme-dim .radar-card-meta {
  color: rgba(148, 163, 184, 0.7);
}

/* Pipeline Stepper - Dim */
body.theme-dim .radar-step:not(:last-child)::before {
  background: rgba(148, 163, 184, 0.15);
}

body.theme-dim .radar-step.is-complete:not(:last-child)::before {
  background: rgba(34, 197, 94, 0.4);
}

body.theme-dim .radar-step-icon {
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.25);
}

body.theme-dim .radar-step.is-complete .radar-step-icon {
  background: #22c55e;
  border-color: #22c55e;
}

body.theme-dim .radar-step.is-running .radar-step-icon {
  background: #3b82f6;
  border-color: #3b82f6;
}

body.theme-dim .radar-step-title {
  color: #e2e8f0;
}

body.theme-dim .radar-step.is-complete .radar-step-title {
  color: rgba(148, 163, 184, 0.7);
}

body.theme-dim .radar-step-time {
  color: rgba(148, 163, 184, 0.7);
}

body.theme-dim .radar-step.is-complete .radar-step-time {
  color: #86efac;
}

body.theme-dim .radar-step-detail {
  color: rgba(148, 163, 184, 0.6);
}

body.theme-dim .radar-pipeline-footer {
  border-color: rgba(148, 163, 184, 0.1);
  color: rgba(148, 163, 184, 0.6);
}

/* Data Health Panel - Dim */
body.theme-dim .radar-health-badge.ok {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

body.theme-dim .radar-health-badge.warn {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

body.theme-dim .radar-health-badge.error {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

body.theme-dim .radar-health-label {
  color: rgba(148, 163, 184, 0.7);
}

body.theme-dim .radar-health-value {
  color: #e2e8f0;
}

body.theme-dim .radar-health-item.radar-health-warn .radar-health-value {
  color: #fbbf24;
}

body.theme-dim .radar-health-actions {
  border-color: rgba(148, 163, 184, 0.1);
}

body.theme-dim .radar-health-gaps {
  background: rgba(245, 158, 11, 0.08);
}

body.theme-dim .radar-health-gaps-row {
  border-color: rgba(148, 163, 184, 0.1);
}

body.theme-dim .radar-health-gaps-label {
  color: rgba(148, 163, 184, 0.7);
}

body.theme-dim .radar-health-gaps-value {
  color: #e2e8f0;
}

/* Summary Row - Dim */
body.theme-dim .radar-summary-row {
  background: rgba(30, 41, 59, 0.4);
}

body.theme-dim .radar-summary-label {
  color: rgba(148, 163, 184, 0.7);
}

body.theme-dim .radar-summary-value {
  color: #e2e8f0;
}

body.theme-dim .radar-summary-sep {
  background: rgba(148, 163, 184, 0.2);
}

body.theme-dim .radar-delta-pill {
  background: rgba(30, 41, 59, 0.6);
}

body.theme-dim .radar-delta-count {
  color: #f1f5f9;
}

body.theme-dim .radar-delta-label {
  color: rgba(148, 163, 184, 0.7);
}

/* Diagnostics Accordion - Dim */
body.theme-dim .radar-diagnostics {
  border-color: rgba(148, 163, 184, 0.12);
}

body.theme-dim .radar-diagnostics-toggle {
  background: rgba(30, 41, 59, 0.4);
  color: rgba(148, 163, 184, 0.8);
}

body.theme-dim .radar-diagnostics-body {
  background: rgba(15, 23, 42, 0.4);
}

body.theme-dim .radar-diagnostics-title {
  color: rgba(148, 163, 184, 0.7);
  border-color: rgba(148, 163, 184, 0.1);
}

body.theme-dim .radar-diagnostics-label {
  color: rgba(148, 163, 184, 0.6);
}

body.theme-dim .radar-diagnostics-value {
  color: #e2e8f0;
}

body.theme-dim .tipoff-pill {
  background: rgba(14, 165, 233, 0.25);
  color: #bae6fd;
  border-color: rgba(14, 165, 233, 0.4);
}

.evidence-chip.near-miss {
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.45);
}

.evidence-chip.hit {
  background: rgba(34, 197, 94, 0.16);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.4);
}

.evidence-chip.miss {
  background: rgba(239, 68, 68, 0.16);
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.4);
}

.evidence-chip.dnp {
  background: rgba(168, 85, 247, 0.16);
  color: #6b21a8;
  border-color: rgba(168, 85, 247, 0.4);
}

body.theme-dim .evidence-chip.near-miss {
  background: rgba(245, 158, 11, 0.22);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.5);
}

body.theme-dim .evidence-chip.hit {
  background: rgba(34, 197, 94, 0.22);
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.5);
}

body.theme-dim .evidence-chip.miss {
  background: rgba(239, 68, 68, 0.22);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.5);
}

body.theme-dim .evidence-chip.dnp {
  background: rgba(168, 85, 247, 0.22);
  color: #e9d5ff;
  border-color: rgba(168, 85, 247, 0.5);
}

body.theme-dim .range-pill {
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(148, 163, 184, 0.12);
  color: var(--ink);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 16px;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  z-index: 1000;
}

.skip-link:focus {
  left: 16px;
}

body.modal-open {
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent-3);
  outline-offset: 2px;
}

/* -----------------------------------------------------------------------------
   Betting Analytics Styles
   ----------------------------------------------------------------------------- */

/* Stat Cards Grid */
.card-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .card-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .card-grid-4 {
    grid-template-columns: 1fr;
  }
}

.card-grid-horizontal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.card-grid-horizontal>.card {
  flex: 1;
  min-width: 280px;
  max-width: 350px;
}

/* Stat Card */
.stat-card {
  text-align: center;
  padding: 20px 16px;
}

.stat-card .stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.stat-card .stat-value.small {
  font-size: 16px;
  font-weight: 600;
}

.stat-card .stat-value.positive {
  color: var(--success);
}

.stat-card .stat-value.negative {
  color: var(--danger);
}

.stat-card .stat-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.monitoring-grid .pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
}

/* Top Play Card */
.top-play-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-play-card .play-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.top-play-card .play-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}

.top-play-card .play-direction {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.top-play-card .play-direction.over {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.top-play-card .play-direction.under {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.top-play-card .play-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.top-play-card .play-ev {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  padding: 8px 0;
}

.top-play-card .play-ev.positive {
  color: var(--success);
}

.top-play-card .play-ev.negative {
  color: var(--danger);
}

.top-play-card .play-meta {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* Simulator Styles */
.simulator-results {
  display: none;
  padding: 20px 0 0;
}

.simulator-results.is-visible {
  display: block;
}

.simulator-hero {
  text-align: center;
  padding: 24px 0;
}

.simulator-pl {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
}

.simulator-pl.positive {
  color: var(--success);
}

.simulator-pl.negative {
  color: var(--danger);
}

.simulator-label {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}

.simulator-stats {
  margin-top: 20px;
}

.stat-mini {
  text-align: center;
  padding: 12px 8px;
  background: var(--bg-soft);
  border-radius: 8px;
}

.stat-mini-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-mini-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 4px;
}

.simulator-edge {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.simulator-breakdown {
  margin-top: 20px;
}

.simulator-breakdown h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.breakdown-table th,
.breakdown-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.breakdown-table th {
  font-weight: 600;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.breakdown-table .positive {
  color: var(--success);
}

.breakdown-table .negative {
  color: var(--danger);
}

/* EV Pills */
.ev-pill {
  font-weight: 600;
}

.ev-pill.ev-positive {
  background: rgba(22, 163, 74, 0.15);
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.3);
}

.ev-pill.ev-negative {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.3);
}

.edge-pill.edge-positive {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}

.kelly-pill {
  background: rgba(139, 92, 246, 0.15);
  color: #7c3aed;
  border-color: rgba(139, 92, 246, 0.3);
}

/* Yesterday Results */
[data-yesterday-section] .stat-card .stat-value.positive {
  color: var(--success);
}

[data-yesterday-section] .stat-card .stat-value.negative {
  color: var(--danger);
}

/* Loading States */
[data-yesterday-empty],
[data-simulator-empty] {
  padding: 32px 16px;
  text-align: center;
}

[data-yesterday-cards].is-hidden,
[data-yesterday-empty].is-hidden,
[data-simulator-empty].is-hidden,
[data-top-plays-list] .empty-state.is-hidden {
  display: none;
}

/* Simulator results visibility */
[data-simulator-results] {
  display: none;
}

[data-simulator-results].is-visible {
  display: block;
}

[data-simulator-card].is-collapsed [data-simulator-form],
[data-simulator-card].is-collapsed [data-simulator-results],
[data-simulator-card].is-collapsed [data-simulator-empty] {
  display: none;
}

/* Simulator metadata */
.simulator-meta {
  margin-bottom: 16px;
}

.sim-meta-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.simulator-daily {
  margin-top: 24px;
}

.simulator-daily h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

/* Help tooltip */
.help-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-hover);
  color: var(--text-muted);
  border-radius: 50%;
  margin-left: 6px;
  cursor: help;
  vertical-align: middle;
}

.help-tooltip:hover {
  background: var(--primary);
  color: white;
}

/* Small pill variant */
.pill.small {
  font-size: 11px;
  padding: 2px 8px;
}

.pill.warning {
  background: rgba(255, 170, 0, 0.15);
  color: #ffaa00;
}

/* Category table edge highlighting */
.breakdown-table tr.has-edge {
  background: rgba(34, 197, 94, 0.08);
}

.breakdown-table tr.has-edge td {
  font-weight: 500;
}

/* Top plays horizontal layout */
.card-grid-horizontal {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.top-play-card {
  min-width: 240px;
  max-width: 280px;
  flex-shrink: 0;
}

.play-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}

.play-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.play-direction {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.play-direction.over {
  background: rgba(22, 163, 74, 0.15);
  color: #16a34a;
}

.play-direction.under {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.play-ev {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.play-ev.positive {
  color: var(--success);
}

.play-ev.negative {
  color: var(--danger);
}

/* Hit Rate Display for Most Predictable Plays */
.play-rate {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
  padding: 8px 0;
}

.play-rate.excellent {
  color: #16a34a;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 8px;
}

.play-rate.good {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 8px;
}

.play-rate.moderate {
  color: #d97706;
  background: rgba(217, 119, 6, 0.1);
  border-radius: 8px;
}

/* Redesigned Top Play Cards */
.top-play-card .play-player {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.top-play-card .play-prop {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.top-play-card .play-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 18px;
}

.top-play-card .play-action.over {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
  color: #16a34a;
  border: 2px solid rgba(34, 197, 94, 0.3);
}

.top-play-card .play-action.under {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
  color: #dc2626;
  border: 2px solid rgba(239, 68, 68, 0.3);
}

.top-play-card .action-arrow {
  font-size: 20px;
}

.top-play-card .action-text {
  letter-spacing: 0.5px;
}

.top-play-card .play-rate {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  padding: 6px 0;
}

.top-play-card .play-description {
  font-size: 12px;
  color: var(--ink);
  background: var(--surface);
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  line-height: 1.4;
  border-left: 3px solid var(--accent);
}

.top-play-card .pill.strength {
  background: rgba(139, 92, 246, 0.15);
  color: #7c3aed;
  font-weight: 600;
}

.play-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.play-meta {
  font-size: 11px;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Betting Performance Tracker */
.betting-period-card {
  transition: border-color 0.2s, box-shadow 0.2s;
}

.betting-period-card.is-positive {
  border-color: rgba(22, 163, 74, 0.4);
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.2);
}

.betting-period-card.is-negative {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.2);
}

.betting-period-card .stat-value {
  font-size: 28px;
}

.betting-period-card .stat-value.positive {
  color: var(--success);
}

.betting-period-card .stat-value.negative {
  color: var(--danger);
}

.betting-period-card .stat-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

[data-betting-comparison-cards].is-hidden,
[data-betting-empty].is-hidden {
  display: none;
}

/* My Bets Page */
.bet-form {
  padding: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-field.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 10px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.form-actions {
  display: flex;
  gap: 12px;
  padding-top: 16px;
}

.bet-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.bet-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  transition: border-color 0.2s;
}

.bet-card.pending {
  border-left: 3px solid var(--warning);
}

.bet-card.won {
  border-left: 3px solid var(--success);
}

.bet-card.lost {
  border-left: 3px solid var(--danger);
}

.bet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.bet-player {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}

.bet-prop {
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 8px;
}

.bet-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.bet-details span {
  background: var(--bg-soft);
  padding: 2px 8px;
  border-radius: 4px;
}

.bet-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.btn.tiny {
  font-size: 11px;
  padding: 4px 8px;
}

.btn.danger {
  color: var(--danger);
}

[data-add-bet-card].is-collapsed {
  display: none;
}

/* Grade Modal */
.modal {
  background: transparent;
  border: none;
  padding: 0;
  max-width: 90vw;
  width: 400px;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: var(--ink);
}

.modal-body {
  padding: 20px;
}

.grade-bet-info {
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.grade-info-row {
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 4px;
}

.grade-info-row:last-child {
  margin-bottom: 0;
}

/* History table status colors */
.data-table tbody tr.won td:last-child {
  color: var(--success);
  font-weight: 600;
}

.data-table tbody tr.lost td:last-child {
  color: var(--danger);
  font-weight: 600;
}

/* Callout actions */
.callout-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

/* Player Profiles */
.search-container {
  position: relative;
  max-width: 500px;
}

.search-input.large {
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  border-radius: 12px;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 100;
  margin-top: 8px;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}

.search-results.is-visible {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s;
}

.search-result-item:hover {
  background: var(--bg-soft);
}

.result-image,
.result-image-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.result-image-placeholder {
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--muted);
}

.result-name {
  font-weight: 600;
  font-size: 14px;
}

.result-team {
  font-size: 12px;
  color: var(--muted);
}

.search-empty {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.player-header {
  display: flex;
  align-items: center;
  gap: 20px;
}

.player-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
}

.player-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
}

.player-name {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--ink);
}

.player-team {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}

.form-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
}

.form-badge.hot {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.form-badge.cold {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.form-badge.neutral {
  background: var(--bg-soft);
  color: var(--muted);
}

.card-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

@media (max-width: 900px) {
  .card-grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 500px) {
  .card-grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card.mini {
  padding: 12px;
  text-align: center;
}

.stat-card.mini .stat-value {
  font-size: 24px;
  margin-bottom: 2px;
}

.stat-card.mini .stat-label {
  font-size: 10px;
}

.prop-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-soft);
  border-radius: 8px;
}

.prop-row.positive {
  border-left: 3px solid var(--success);
}

.prop-row.negative {
  border-left: 3px solid var(--danger);
}

.prop-name {
  font-weight: 600;
  font-size: 14px;
}

.prop-record {
  font-size: 12px;
  color: var(--muted);
}

.prop-rate {
  font-size: 14px;
  font-weight: 600;
}

.prop-row.positive .prop-rate {
  color: var(--success);
}

.prop-row.negative .prop-rate {
  color: var(--danger);
}

.trend-list.compact .trend-item {
  padding: 12px 16px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.empty-text {
  font-size: 14px;
  color: var(--muted);
  max-width: 400px;
  margin: 0 auto;
}

/* ==========================================================================
   Alerts Page Styles
   ========================================================================== */

.alerts-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
}

.alerts-page .page-header {
  text-align: center;
  margin-bottom: 32px;
}

.alerts-page .page-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.alerts-page .page-header p {
  color: var(--muted);
  font-size: 16px;
}

/* Alert Stats */
.alert-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.alert-stats .stat-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.alert-stats .stat-value {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
}

.alert-stats .stat-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.alert-stats .action-card {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-check-alerts {
  background: linear-gradient(135deg, var(--accent), #d97706);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-check-alerts:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-check-alerts:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Presets Section */
.presets-section {
  margin-bottom: 40px;
}

.presets-section h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.preset-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s;
}

.preset-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-soft);
}

.preset-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.preset-card p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.btn-add-preset {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-preset:hover {
  background: var(--accent);
  color: white;
}

/* Alerts List Section */
.alerts-list-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.alerts-list-section h2 {
  font-size: 18px;
  font-weight: 600;
}

.btn-create {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-create:hover {
  background: #d97706;
}

.alerts-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.alert-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  transition: all 0.2s;
}

.alert-card:hover {
  box-shadow: var(--shadow-soft);
}

.alert-card.paused {
  opacity: 0.6;
}

.alert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.alert-type-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  background: var(--bg);
}

.alert-type-badge.high_ev {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.alert-type-badge.high_rate {
  background: rgba(22, 163, 74, 0.15);
  color: var(--success);
}

.alert-type-badge.player {
  background: rgba(14, 165, 233, 0.15);
  color: var(--accent-3);
}

.alert-type-badge.prop {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.alert-type-badge.hot_streak {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.alert-status {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
}

.alert-status.active {
  background: rgba(22, 163, 74, 0.15);
  color: var(--success);
}

.alert-status.paused {
  background: rgba(107, 114, 128, 0.15);
  color: var(--muted);
}

.alert-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.alert-config {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.config-item {
  font-size: 12px;
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--ink-soft);
}

.alert-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.alert-actions {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.alert-actions button {
  background: transparent;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.alert-actions button:hover {
  background: var(--bg);
}

/* Matches Section */
.matches-section {
  margin: 32px 0;
  padding: 24px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 12px;
}

.matches-section h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #d97706;
}

.matches-list {
  display: grid;
  gap: 12px;
}

.match-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.match-header {
  margin-bottom: 8px;
}

.match-header .alert-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.match-signal {
  font-size: 14px;
  margin-bottom: 8px;
}

.match-rate {
  display: inline-block;
  background: rgba(22, 163, 74, 0.15);
  color: var(--success);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
}

.match-ev {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
}

.match-reason {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

/* History Section */
.history-section {
  margin-top: 40px;
}

.history-section h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.history-list {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.history-item {
  display: grid;
  grid-template-columns: 150px 200px 1fr;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.history-item:last-child {
  border-bottom: none;
}

.history-time {
  color: var(--muted);
}

.history-alert {
  font-weight: 500;
}

.history-signal {
  color: var(--ink-soft);
}

.history-list .empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.history-list .loading {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

/* Alert Modal */
.alerts-page .modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.alerts-page .modal-content {
  background: var(--bg-soft);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow);
}

.alerts-page .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.alerts-page .modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.alerts-page .modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
}

.alerts-page form {
  padding: 24px;
}

.alerts-page .form-group {
  margin-bottom: 20px;
}

.alerts-page .form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}

.alerts-page .form-group input,
.alerts-page .form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg);
}

.alerts-page .form-group input:focus,
.alerts-page .form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.alerts-page .modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 8px;
}

.alerts-page .btn-cancel {
  background: transparent;
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.alerts-page .btn-submit {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.alerts-page .btn-submit:hover {
  background: #d97706;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 2000;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  background: var(--success);
  color: white;
}

.toast-error {
  background: var(--danger);
  color: white;
}

.toast-info {
  background: var(--accent-3);
  color: white;
}

/* Empty State */
.alerts-list .empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px;
  color: var(--muted);
}

.alerts-list .empty-state p {
  margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .alert-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .presets-grid {
    grid-template-columns: 1fr;
  }

  .alerts-list {
    grid-template-columns: 1fr;
  }

  .history-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ==========================================================================
   Advanced Signals Styles
   ========================================================================== */

.advanced-signals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.advanced-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.advanced-card.wide {
  grid-column: 1 / -1;
}

.advanced-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.advanced-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

/* Fade Items */
.fade-list {
  display: grid;
  gap: 12px;
}

.fade-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--danger);
  border-radius: 8px;
  padding: 12px;
}

.fade-player {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.fade-prop {
  font-size: 13px;
  color: var(--ink-soft);
}

.fade-dir {
  display: inline-block;
  background: var(--danger);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 4px;
}

.fade-reason {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  font-style: italic;
}

.fade-confidence {
  font-size: 11px;
  color: var(--danger);
  font-weight: 500;
  margin-top: 6px;
}

/* Contrarian Items */
.contrarian-list {
  display: grid;
  gap: 12px;
}

.contrarian-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 12px;
}

.contrarian-player {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.contrarian-prop {
  font-size: 13px;
  color: var(--ink-soft);
}

.contrarian-dir {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 4px;
}

.contrarian-rate {
  font-size: 12px;
  color: var(--success);
  font-weight: 500;
  margin-top: 8px;
}

.contrarian-edge {
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
  margin-top: 4px;
}

/* Correlation Items */
.correlation-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.correlation-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.corr-signals {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.corr-signal {
  flex: 1;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  text-align: center;
}

.corr-player {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}

.corr-prop {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
}

.corr-rate {
  display: inline-block;
  background: rgba(22, 163, 74, 0.15);
  color: var(--success);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
}

.corr-plus {
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
}

.corr-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}

.corr-type {
  background: rgba(14, 165, 233, 0.15);
  color: var(--accent-3);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.corr-desc {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 768px) {
  .advanced-signals-grid {
    grid-template-columns: 1fr;
  }

  .correlation-list {
    grid-template-columns: 1fr;
  }

  .corr-signals {
    flex-direction: column;
  }
}

/* ============================================
   MARKET DELTA ENHANCED STYLES
   ============================================ */

/* Strategy Guide Panel */
.delta-guide {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(245, 158, 11, 0.08) 100%);
  border: 1px solid rgba(14, 165, 233, 0.25);
  padding: 16px;
  margin-bottom: 16px;
}

.delta-guide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.delta-guide-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}

.delta-guide-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.delta-guide-section {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.delta-guide-label {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 4px;
  color: var(--ink);
}

.delta-guide-text {
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

/* Delta Card Header with Tips */
.delta-card-header {
  display: grid;
  gap: 2px;
  margin-bottom: 8px;
}

.delta-card-tip {
  font-size: 0.72rem;
  color: var(--muted);
  font-style: italic;
}

/* Priority Card (Side Shifts) */
.delta-card-priority {
  border: 2px solid rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(251, 191, 36, 0.06) 100%);
}

.delta-priority-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f59e0b, #f97316);
  color: #fff;
  margin-left: 6px;
  vertical-align: middle;
}

/* Delta Item Enhanced Layout */
.delta-item-main {
  flex: 1;
  display: grid;
  gap: 4px;
}

.delta-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.8rem;
}

.delta-line-change,
.delta-odds-change,
.delta-book-change,
.delta-side-change,
.delta-line-new,
.delta-line-removed {
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 0.78rem;
}

/* Signal Strength Visual Indicators */
.delta-signal-large {
  border-left: 3px solid #f97316;
  padding-left: 10px;
  background: rgba(249, 115, 22, 0.04);
}

.delta-signal-medium {
  border-left: 3px solid #0ea5e9;
  padding-left: 10px;
  background: rgba(14, 165, 233, 0.04);
}

.delta-signal-small {
  border-left: 3px solid var(--border);
  padding-left: 10px;
}

/* Delta Badges */
.delta-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-up {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-down {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-sharp {
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.2), rgba(234, 88, 12, 0.2));
  color: #c2410c;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.badge-notable {
  background: rgba(14, 165, 233, 0.15);
  color: #0369a1;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.badge-minor {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.25);
}

.badge-flip {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.25), rgba(251, 191, 36, 0.25));
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.5);
}

.badge-new {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-removed {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Actionable Insights */
.delta-insight {
  font-size: 0.72rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 2px;
}

.delta-insight-action {
  color: #92400e;
  font-weight: 500;
  font-style: normal;
}

/* Side Shift Styling */
.delta-side-flip {
  background: rgba(245, 158, 11, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
}

.delta-side-change {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.side-old {
  color: var(--muted);
  text-decoration: line-through;
  opacity: 0.7;
}

.side-arrow {
  color: var(--accent-3);
  font-weight: 700;
}

.side-new {
  color: var(--ink);
  font-weight: 600;
}

.delta-flip-tag {
  background: linear-gradient(90deg, #f59e0b, #f97316);
  color: #fff;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
}

/* New/Removed Props Styling */
.delta-new-prop {
  background: rgba(34, 197, 94, 0.04);
  border-radius: 8px;
  padding: 8px 10px;
}

.delta-new-tag {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
}

.delta-removed-prop {
  background: rgba(239, 68, 68, 0.04);
  border-radius: 8px;
  padding: 8px 10px;
}

.delta-removed-tag {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
}

.delta-badge-book {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
  padding: 4px 8px;
  border-radius: 4px;
}

/* Responsive adjustments for delta cards */
@media (max-width: 768px) {
  .delta-guide-body {
    grid-template-columns: 1fr;
  }

  .delta-detail {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .delta-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .delta-change,
  .delta-value {
    align-self: flex-start;
  }
}

/* ==========================================================================
   P/L Simulator Enhanced Styles
   ========================================================================== */

/* Confidence Interval Styling */
.ci-range {
  display: inline-block;
  font-size: 0.75em;
  color: var(--muted);
  font-weight: 400;
  margin-left: 4px;
}

/* Significance Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.badge.positive {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge.neutral {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
  border: 1px solid rgba(100, 116, 139, 0.25);
}

.badge.negative {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Simulation Error Message */
.error-message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  color: #b91c1c;
  font-size: 0.9rem;
}

.error-icon {
  font-size: 1.2rem;
}

/* Simulation Meta Row */
.sim-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Simulation Warnings */
.sim-warnings {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
}

.sim-warning-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #92400e;
}

.sim-warning-item+.sim-warning-item {
  margin-top: 6px;
}

/* ==========================================================================
   SIGNAL TRACKER - Premium Analytics Section
   ========================================================================== */

/* Section Styling */
.signal-tracker-section {
  position: relative;
}

.signal-tracker-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.tracker-controls {
  display: flex;
  gap: 8px;
}

/* Card Container */
.signal-tracker-card {
  padding: 0;
  overflow: hidden;
}

.signal-tracker-card.is-collapsed {
  display: none;
}

/* Summary Bar */
.tracker-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.06) 0%, rgba(245, 158, 11, 0.06) 100%);
  border-bottom: 1px solid var(--border);
}

.tracker-summary-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.tracker-summary-stat {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tracker-summary-stat .stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}

.tracker-summary-stat .stat-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.tracker-summary-loading {
  width: 100%;
}

/* Filters Bar */
.tracker-filters {
  padding: 12px 20px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}

/* Insights Bar */
.tracker-insights {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.tracker-insight {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
}

.insight-icon {
  font-size: 0.9rem;
}

.insight-label {
  color: var(--muted);
}

.insight-value {
  font-weight: 600;
  color: var(--ink);
}

.insight-text {
  color: var(--ink);
  font-weight: 500;
}

.tracker-insight-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}

/* Signal Cards Grid */
.tracker-grid {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 20px;
}

/* Individual Signal Card */
.tracker-signal-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.tracker-signal-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.12);
  transform: translateY(-2px);
}

/* Confidence Level Badge (Top Left) */
.tracker-signal-card::before {
  content: attr(data-confidence-label);
  position: absolute;
  top: 0;
  left: 0;
  padding: 4px 12px 4px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 0 0 10px 0;
}

.tracker-signal-card.confidence-high::before {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}

.tracker-signal-card.confidence-medium::before {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.tracker-signal-card.confidence-low::before {
  background: rgba(100, 116, 139, 0.2);
  color: #64748b;
}

.tracker-signal-card.confidence-new::before {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: white;
}

/* Card Header */
.tracker-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding-top: 8px;
}

.tracker-player-image {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--bg), var(--border));
  flex-shrink: 0;
}

.tracker-player-info {
  flex: 1;
  min-width: 0;
}

.tracker-player-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tracker-prop-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.tracker-prop {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.tracker-direction {
  display: inline-block;
  padding: 2px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
}

.tracker-direction.over {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.tracker-direction.under {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

/* Stats Row */
.tracker-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.tracker-stat-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}

.tracker-stat-label {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.tracker-stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.tracker-stat-sub {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Streak Badge */
.tracker-streak {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.tracker-streak.hot {
  color: #ea580c;
}

.tracker-streak.cold {
  color: #0891b2;
}

/* Last Outcomes Visual */
.tracker-outcomes {
  display: flex;
  gap: 3px;
  margin-top: 4px;
}

.tracker-outcome-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.tracker-outcome-dot.win {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.tracker-outcome-dot.loss {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Today's Signal Info */
.tracker-today {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 8px 0;
  border-top: 1px dashed var(--border);
  margin-top: 10px;
}

.tracker-today strong {
  color: var(--ink-soft);
}

/* Category Performance */
.tracker-category-perf {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  padding: 8px 10px;
  background: rgba(14, 165, 233, 0.06);
  border-radius: 6px;
  margin-top: 10px;
}

.tracker-category-name {
  color: var(--muted);
  flex-shrink: 0;
}

.tracker-category-roi {
  font-weight: 600;
}

.tracker-category-roi.positive {
  color: #16a34a;
}

.tracker-category-roi.negative {
  color: #dc2626;
}

/* Reputation Score Bar */
.tracker-reputation {
  margin-top: 12px;
}

.tracker-reputation-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.tracker-reputation-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.tracker-reputation-fill.high {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.tracker-reputation-fill.medium {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.tracker-reputation-fill.low {
  background: linear-gradient(90deg, #94a3b8, #64748b);
}

.tracker-reputation-fill.new {
  background: linear-gradient(90deg, #0ea5e9, #0284c7);
}

.tracker-reputation-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
}

.tracker-reputation-score {
  font-weight: 700;
  color: var(--ink);
}

/* Loading Skeleton */
.tracker-loading {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
}

.tracker-skeleton-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-bottom: 12px;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-text.short {
  width: 60%;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Empty State */
.tracker-empty {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.6;
}

.empty-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.empty-text {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 300px;
  margin: 0 auto;
}

/* Pagination */
.tracker-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

/* Matchup Info */
.tracker-matchup {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
}

.tracker-game-time {
  font-weight: 500;
  color: var(--ink-soft);
}

/* Responsive */
@media (max-width: 768px) {
  .tracker-grid {
    grid-template-columns: 1fr;
  }

  .tracker-loading {
    grid-template-columns: 1fr;
  }

  .tracker-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .tracker-insights {
    gap: 10px;
  }

  .tracker-insight-divider {
    display: none;
  }

  .tracker-summary-stats {
    gap: 12px;
  }
}

/* Animation for new cards */
.tracker-signal-card.animate-in {
  animation: tracker-card-in 0.3s ease forwards;
}

@keyframes tracker-card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Search Input */
.tracker-search-label {
  flex: 1;
  max-width: 200px;
}

.search-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.82rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

/* Dual Record Layout */
.tracker-dual-records {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.tracker-record-section {
  padding: 10px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.tracker-record-section.has-data {
  border-color: rgba(34, 197, 94, 0.3);
}

.tracker-record-section.no-data {
  opacity: 0.7;
}

.tracker-record-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tracker-record-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.tracker-record-badge {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.tracker-record-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.tracker-record-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tracker-record-stat .stat-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.tracker-record-stat .stat-label {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
}

.tracker-record-outcomes {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.outcomes-label {
  font-size: 0.68rem;
  color: var(--muted);
}

.tracker-record-ci {
  font-size: 0.68rem;
  color: var(--muted);
}

.tracker-record-empty {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
  padding: 8px 0;
}

.tracker-no-history-reason {
  font-size: 0.7rem;
  color: #64748b;
  background: rgba(100, 116, 139, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 4px;
}

.tracker-category-roi-line {
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}

.tracker-category-roi-line.positive {
  color: #16a34a;
}

.tracker-category-roi-line.negative {
  color: #dc2626;
}

.tracker-no-data {
  font-size: 0.72rem;
  color: var(--muted);
  font-style: italic;
}

/* Responsive dual records */
@media (max-width: 500px) {
  .tracker-dual-records {
    grid-template-columns: 1fr;
  }
}

/* Summary meta row */
.tracker-summary-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tracker-summary-stat.positive .stat-value {
  color: #16a34a;
}

.pill.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.3);
}

/* Toggle Label Styling */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.toggle-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}

/* Card Scaling Fixes */
.tracker-signal-card {
  contain: layout;
  overflow: hidden;
}

.tracker-signal-card * {
  max-width: 100%;
  box-sizing: border-box;
}

.tracker-card-header {
  overflow: hidden;
}

.tracker-player-info {
  overflow: hidden;
}

.tracker-dual-records {
  overflow: hidden;
}

.tracker-record-section {
  overflow: hidden;
  word-wrap: break-word;
}

/* Responsive card grid scaling */
@media (max-width: 768px) {
  .tracker-signal-grid {
    grid-template-columns: 1fr;
  }

  .tracker-signal-card {
    font-size: 0.9rem;
  }

  .tracker-player-image {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 400px) {
  .tracker-signal-card {
    padding: 12px;
    font-size: 0.85rem;
  }

  .tracker-player-image {
    width: 36px;
    height: 36px;
  }

  .tracker-dual-records {
    gap: 6px;
  }
}

/* Auto-refresh Status */
.tracker-status {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
}

.tracker-last-updated,
.tracker-countdown {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tracker-countdown {
  color: var(--accent);
}

.tracker-auto-refresh select {
  padding: 4px 8px;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}

/* Derived Data Styles for Backfill Radar */

/* Table row styling */
.trend-evidence tr.derived-row td {
  background-color: var(--bg-soft);
  /* Light contrast */
  color: var(--muted);
  font-style: italic;
}

.trend-evidence tr.derived-row td:first-child {
  border-left: 3px solid var(--accent);
  /* Visual indicator on left */
}

/* Marker for derived values */
.derived-marker {
  display: inline-block;
  color: var(--accent);
  margin-left: 2px;
  cursor: help;
  font-style: normal;
  font-weight: bold;
}

/* Chip styling */
.evidence-chip.derived {
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  color: var(--muted);
}

/* Date Range Picker */
.date-range-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.date-range-presets {
  display: flex;
  gap: 4px;
}

.date-range-custom {
  display: flex;
  align-items: center;
  gap: 6px;
}

.date-input {
  width: 130px;
  padding: 6px 10px;
  font-size: 0.8rem;
}

.date-separator {
  color: var(--muted);
  font-size: 0.8rem;
}

.recalc-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: 0.2s ease;
}

.recalc-toggle:hover {
  border-color: var(--accent);
}

.recalc-toggle input[type="checkbox"] {
  accent-color: var(--accent);
}

.recalc-toggle span {
  user-select: none;
}

/* Recalculated indicator */
.recalc-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), #f97316);
  color: #0f172a;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Date range preset active state enhancement */
[data-date-preset].active {
  background: var(--accent);
  color: #0f172a;
  border-color: var(--accent);
}

/* ===========================================
   SIGNAL ACCURACY BACKTEST STYLES
   =========================================== */

.backtest-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 14px;
}

.backtest-loading .spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.backtest-summary {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.backtest-hero {
  text-align: center;
  padding: 16px 0;
}

.backtest-overall-rate {
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
}

.backtest-label {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}

.backtest-stats {
  margin-top: 20px;
}

.backtest-leaderboards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.backtest-leaderboard-section {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 16px;
}

.leaderboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.leaderboard-header h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.leaderboard-tabs {
  display: flex;
  gap: 4px;
}

.leaderboard-tabs .tab {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: 0.2s ease;
}

.leaderboard-tabs .tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.leaderboard-tabs .tab.active {
  background: var(--accent);
  color: #0f172a;
  border-color: var(--accent);
}

.leaderboard-table {
  max-height: 300px;
  overflow-y: auto;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
  align-items: center;
}

.leaderboard-row:last-child {
  border-bottom: none;
}

.lb-name {
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-rate {
  font-weight: 700;
  font-family: var(--font-mono);
  min-width: 50px;
  text-align: right;
}

.lb-rate.positive {
  color: var(--success);
}

.lb-rate.negative {
  color: var(--danger);
}

.lb-count {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
  min-width: 40px;
  text-align: right;
}

/* ===========================================
   DAILY BACKTEST STYLES
   =========================================== */

.backtest-daily-hero .trend-hero-summary-text {
  max-width: 640px;
}

.backtest-daily-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  padding-bottom: 12px;
}

.backtest-daily-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 12px 4px 4px;
}

.backtest-daily-actions .small-muted {
  color: var(--muted);
}

.backtest-daily-effective {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.backtest-daily-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.backtest-daily-panel {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
}

.backtest-daily-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.backtest-daily-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--ink);
}

.backtest-daily-table-wrap {
  margin-top: 24px;
  overflow-x: auto;
}

.backtest-daily-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.backtest-daily-table th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
}

.backtest-daily-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}

.backtest-daily-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px;
  color: var(--muted);
}

/* Multiselect dropdown */
.multiselect {
  position: relative;
  min-width: 200px;
}

.multiselect-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input, #1a1a2e);
  border: 1px solid var(--border, #2a2a3e);
  border-radius: 6px;
  color: var(--ink, #fff);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.multiselect-toggle:hover {
  border-color: var(--accent, #3b82f6);
}

.multiselect-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.multiselect-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 100;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg-card, #1e1e2f);
  border: 1px solid var(--border, #2a2a3e);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  padding: 8px 0;
}

.multiselect-dropdown.open {
  display: block;
}

.multiselect-actions {
  display: flex;
  gap: 8px;
  padding: 4px 12px 8px;
  border-bottom: 1px solid var(--border, #2a2a3e);
  margin-bottom: 4px;
}

.multiselect-actions button {
  flex: 1;
  padding: 6px 10px;
  font-size: 12px;
  background: var(--bg-offset, #252538);
  border: 1px solid var(--border, #2a2a3e);
  border-radius: 4px;
  color: var(--muted, #888);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.multiselect-actions button:hover {
  background: var(--accent, #3b82f6);
  color: #fff;
  border-color: var(--accent, #3b82f6);
}

.multiselect-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.1s;
}

.multiselect-option:hover {
  background: var(--bg-hover, #252538);
}

.multiselect-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent, #3b82f6);
  cursor: pointer;
}

.multiselect-option span {
  font-size: 13px;
  color: var(--ink, #fff);
}

.multiselect-divider {
  margin: 8px 12px;
  border: none;
  border-top: 1px solid var(--border, #2a2a3e);
}

/* ============================================
   TOP TREND SIGNALS - Premium Controls & Layout
   ============================================ */
.top-signals-kpis {
  padding: 16px;
  border-radius: 10px;
}

.top-signals-kpi-hottest {
  min-width: 140px;
}

.top-signals-kpi-hottest .panel-kpi-value {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.top-signals-hottest-name {
  color: #f59e0b !important;
}

.top-signals-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.2);
  border-radius: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.top-signals-controls-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.top-signals-controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.top-signals-controls-bottom {
  margin-top: 16px;
  margin-bottom: 0;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.top-signals-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--muted);
  cursor: pointer;
}

.top-signals-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.top-signals-filter-hint {
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.7;
  font-style: italic;
}

body.theme-dim .top-signals-filter-hint {
  color: #64748b;
}

.top-signals-search {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 0.8125rem;
  min-width: 180px;
}

.top-signals-search::placeholder {
  color: var(--muted);
}

.top-signals-filter {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 0.8125rem;
  min-width: 100px;
  cursor: pointer;
}

.top-signals-page-info {
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
}

.top-signals-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-signals-page-size {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.top-signals-page-size select {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 0.8125rem;
}

.top-signals-applied-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.top-signals-applied-chips:empty {
  display: none;
}

.top-signals-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 999px;
  font-size: 0.75rem;
  color: #93c5fd;
}

.top-signals-chip-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: inherit;
  cursor: pointer;
  font-size: 0.65rem;
  line-height: 1;
}

.top-signals-chip-remove:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.top-signals-chip-clear {
  padding: 4px 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 999px;
  font-size: 0.75rem;
  color: #fca5a5;
  cursor: pointer;
}

.top-signals-chip-clear:hover {
  background: rgba(239, 68, 68, 0.2);
}

.top-signals-compare-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.08) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  margin-bottom: 16px;
}

.top-signals-compare-bar.is-hidden {
  display: none;
}

.top-signals-compare-count {
  font-size: 0.875rem;
  font-weight: 500;
  color: #93c5fd;
}

.top-signals-content {
  min-height: 200px;
}

.top-signals-cards-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-signals-table-view {
  overflow-x: auto;
}

.top-signals-table-view table {
  width: 100%;
  border-collapse: collapse;
}

.top-signals-table-view th,
.top-signals-table-view td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.top-signals-table-view th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.3);
  position: sticky;
  top: 0;
}

.top-signals-table-view tbody tr:hover {
  background: rgba(59, 130, 246, 0.05);
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.glossary-item {
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.2);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.glossary-term {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}

.glossary-def {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
}

.panel-subtext-sep {
  margin: 0 6px;
  opacity: 0.5;
}

/* Dim theme overrides for top signals */
body.theme-dim .top-signals-controls {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

body.theme-dim .top-signals-search,
body.theme-dim .top-signals-filter,
body.theme-dim .top-signals-page-size select {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(148, 163, 184, 0.2);
  color: #f1f5f9;
}

body.theme-dim .top-signals-search::placeholder {
  color: #64748b;
}

body.theme-dim .top-signals-checkbox {
  color: #94a3b8;
}

body.theme-dim .top-signals-page-info {
  color: #94a3b8;
}

body.theme-dim .glossary-item {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(148, 163, 184, 0.15);
}

body.theme-dim .glossary-term {
  color: #f59e0b;
}

body.theme-dim .glossary-def {
  color: #94a3b8;
}

body.theme-dim .top-signals-table-view th {
  background: rgba(15, 23, 42, 0.5);
  color: #94a3b8;
}

body.theme-dim .top-signals-table-view td {
  color: #f1f5f9;
}

body.theme-dim .top-signals-table-view tbody tr:hover {
  background: rgba(59, 130, 246, 0.08);
}
