:root {
  color-scheme: dark;
  --bg: #0a0e0b;
  --surface: #111813;
  --surface-2: #162019;
  --surface-3: #1b271f;
  --text: #f4f7f1;
  --muted: #8b998e;
  --faint: #5c6b60;
  --border: #263129;
  --border-strong: #354339;
  --accent: #c4f86e;
  --accent-strong: #aeea4c;
  --accent-ink: #142003;
  --orange: #ffb86b;
  --red: #ff7d78;
  --blue: #8fc9ff;
  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 75% -10%, rgba(143, 201, 255, 0.07), transparent 29rem),
    linear-gradient(180deg, #0b100c 0%, #090d0a 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ambient {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  filter: blur(1px);
}

.ambient-one {
  top: -12rem;
  right: -8rem;
  width: 36rem;
  height: 36rem;
  border-radius: 50%;
  background: rgba(196, 248, 110, 0.035);
}

.ambient-two {
  left: 34%;
  bottom: -17rem;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  background: rgba(143, 201, 255, 0.025);
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 30px 22px 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.055);
  background: rgba(9, 14, 10, 0.82);
  backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  margin-bottom: 46px;
  letter-spacing: -0.03em;
}

.brand > span:last-child {
  display: grid;
  line-height: 1;
}

.brand strong,
.brand em {
  display: inline;
  font-size: 19px;
  font-style: normal;
  font-weight: 500;
}

.brand em {
  color: var(--accent);
}

.brand small {
  margin-top: 7px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-mark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 29px;
  height: 29px;
  padding: 6px;
  border: 1px solid rgba(196, 248, 110, 0.25);
  border-radius: 9px;
  background: rgba(196, 248, 110, 0.08);
}

.brand-mark span {
  width: 4px;
  border-radius: 3px;
  background: var(--accent);
}

.brand-mark span:nth-child(1) {
  height: 7px;
  opacity: 0.5;
}

.brand-mark span:nth-child(2) {
  height: 14px;
  opacity: 0.75;
}

.brand-mark span:nth-child(3) {
  height: 10px;
}

.primary-nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.nav-item.is-active {
  border-color: rgba(196, 248, 110, 0.12);
  background: rgba(196, 248, 110, 0.075);
  color: var(--text);
}

.nav-icon {
  color: var(--faint);
  font-size: 18px;
  text-align: center;
}

.nav-item.is-active .nav-icon {
  color: var(--accent);
}

.nav-count {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 20px;
  background: rgba(196, 248, 110, 0.12);
  color: var(--accent);
  font-size: 10px;
  text-align: center;
}

.sidebar-spacer {
  flex: 1;
}

.source-card {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.source-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(196, 248, 110, 0.08);
}

.pulse-dot.is-live {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 125, 120, 0.08);
}

.source-card p {
  margin: 7px 0 13px 15px;
  color: var(--faint);
  font-size: 10px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 11px;
  cursor: pointer;
}

.text-button span {
  transition: transform 160ms ease;
}

.text-button:hover span {
  transform: translateX(3px);
}

.responsible-note {
  margin: 17px 4px 0;
  color: #526057;
  font-size: 9px;
  line-height: 1.55;
}

.main-content {
  min-width: 0;
  padding: 0 38px 54px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 80px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu,
.mobile-brand {
  display: none;
}

.mode-badge {
  padding: 6px 9px;
  border: 1px solid rgba(196, 248, 110, 0.18);
  border-radius: 6px;
  background: rgba(196, 248, 110, 0.07);
  color: var(--accent);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mode-badge.is-live {
  border-color: rgba(255, 125, 120, 0.22);
  background: rgba(255, 125, 120, 0.08);
  color: var(--red);
}

.live-time {
  color: var(--faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.button:hover {
  border-color: #4b5d50;
  background: var(--surface-3);
}

.button:active {
  transform: translateY(1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.button-primary:hover {
  border-color: #d5ff92;
  background: #d5ff92;
}

.button-danger {
  border-color: rgba(255, 125, 120, 0.25);
  color: var(--red);
}

.button-danger:hover {
  border-color: rgba(255, 125, 120, 0.55);
  background: rgba(255, 125, 120, 0.07);
}

.button-wide {
  width: 100%;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.refresh-button {
  min-height: 38px;
  padding: 0 14px;
  border-color: rgba(196, 248, 110, 0.28);
  background: rgba(196, 248, 110, 0.08);
  color: var(--accent);
}

.refresh-button:hover {
  border-color: rgba(196, 248, 110, 0.55);
  background: rgba(196, 248, 110, 0.13);
}

.refresh-button.is-loading .refresh-glyph {
  animation: spin 900ms linear infinite;
}

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

.page {
  max-width: 1470px;
  margin: 0 auto;
  padding-top: 39px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(32px, 4.1vw, 54px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.accent-text {
  color: var(--accent);
}

.page-subtitle {
  max-width: 650px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.model-chip {
  display: grid;
  min-width: 244px;
  gap: 3px;
  padding: 14px 16px;
  border-left: 2px solid var(--accent);
  background: linear-gradient(90deg, rgba(196, 248, 110, 0.055), transparent);
}

.model-chip-label {
  color: var(--faint);
  font-size: 8px;
  letter-spacing: 0.17em;
}

.model-chip strong {
  font-size: 12px;
  font-weight: 500;
}

.model-chip > span:last-child {
  color: var(--muted);
  font-size: 9px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 38px;
}

.stat-card {
  position: relative;
  min-width: 0;
  padding: 20px 20px 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(17, 24, 19, 0.78);
}

.stat-card::after {
  position: absolute;
  right: -30px;
  bottom: -52px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 248, 110, 0.05), transparent 68%);
  content: "";
}

.stat-featured {
  border-color: rgba(196, 248, 110, 0.24);
  background: linear-gradient(145deg, rgba(196, 248, 110, 0.09), rgba(17, 24, 19, 0.85) 58%);
}

.stat-label {
  color: var(--muted);
  font-size: 10px;
}

.stat-value {
  margin-top: 12px;
  font-size: clamp(23px, 2.2vw, 31px);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
}

.stat-featured .stat-value {
  color: var(--accent);
}

.stat-meta {
  margin-top: 8px;
  color: var(--faint);
  font-size: 9px;
}

.stat-meta span {
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  gap: 28px;
  align-items: start;
}

.signals-section {
  min-width: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}

.signal-count {
  color: var(--faint);
  font-size: 10px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 17px;
}

.filter-bar label {
  display: flex;
}

.filter-bar select,
.filter-bar input {
  height: 39px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
}

.filter-bar select {
  padding: 0 31px 0 11px;
}

.filter-bar input {
  width: 100%;
  padding: 0 12px 0 35px;
}

.filter-bar select:focus,
.filter-bar input:focus,
.field input:focus,
.field select:focus {
  border-color: rgba(196, 248, 110, 0.45);
  box-shadow: 0 0 0 3px rgba(196, 248, 110, 0.06);
}

.search-field {
  position: relative;
  flex: 1 1 210px;
  max-width: 330px;
}

.search-field > span:not(.sr-only) {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 12px;
  color: var(--faint);
  font-size: 17px;
  transform: translateY(-50%);
}

.signal-list {
  display: grid;
  gap: 9px;
}

.signal-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) minmax(120px, 0.75fr) 88px 88px 72px 30px;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 91px;
  padding: 15px 15px 15px 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(17, 24, 19, 0.72);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.signal-card::before {
  position: absolute;
  top: 13px;
  bottom: 13px;
  left: 0;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: transparent;
  content: "";
}

.signal-card:hover {
  border-color: #3a493e;
  background: rgba(23, 33, 26, 0.92);
  transform: translateY(-1px);
}

.signal-card.is-selected {
  border-color: rgba(196, 248, 110, 0.38);
  background: linear-gradient(90deg, rgba(196, 248, 110, 0.075), rgba(17, 24, 19, 0.88) 38%);
}

.signal-card.is-selected::before {
  background: var(--accent);
}

.signal-card.is-watch::before {
  background: rgba(255, 184, 107, 0.6);
}

.signal-card.is-no-bet {
  opacity: 0.64;
}

.signal-identity {
  min-width: 0;
}

.signal-league {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--faint);
  font-size: 9px;
}

.signal-league::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-strong);
  content: "";
}

.signal-match {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-match em {
  padding: 0 5px;
  color: var(--faint);
  font-size: 9px;
  font-style: normal;
}

.signal-start {
  display: block;
  margin-top: 5px;
  color: var(--faint);
  font-size: 9px;
}

.signal-pick {
  min-width: 0;
}

.metric-caption {
  display: block;
  margin-bottom: 5px;
  color: var(--faint);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pick-name {
  display: block;
  overflow: hidden;
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pick-book {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-metric {
  min-width: 0;
}

.signal-metric strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.signal-metric small {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-size: 8px;
}

.probability-value {
  color: var(--text);
}

.edge-positive {
  color: var(--accent) !important;
}

.edge-negative {
  color: var(--red) !important;
}

.mini-meter {
  width: 100%;
  height: 3px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
}

.mini-meter span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
}

.signal-card-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 15px;
}

.signal-card:hover .signal-card-icon,
.signal-card.is-selected .signal-card-icon {
  border-color: rgba(196, 248, 110, 0.4);
  color: var(--accent);
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 54px 20px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.empty-state span {
  font-size: 11px;
}

.insight-column {
  display: grid;
  gap: 13px;
}

.insight-card,
.threshold-card,
.settings-card,
.list-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(17, 24, 19, 0.8);
}

.insight-card {
  padding: 21px;
}

.insight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(196, 248, 110, 0.08);
}

.insight-card h3 {
  margin-top: 10px;
}

.insight-card > p:not(.eyebrow) {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.decision-meter {
  margin-bottom: 18px;
}

.meter-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 9px;
}

.meter-label strong {
  color: var(--text);
  font-size: 10px;
}

.meter-track {
  height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
}

.meter-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
  transition: width 450ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.decision-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 19px;
}

.decision-facts > div {
  min-width: 0;
}

.decision-facts span {
  display: block;
  color: var(--faint);
  font-size: 8px;
}

.decision-facts strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quiet-card {
  background: rgba(255, 255, 255, 0.018);
}

.explain-list {
  display: grid;
  gap: 13px;
  margin: 17px 0 0;
  padding: 0;
  list-style: none;
}

.explain-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 9px;
  align-items: start;
}

.explain-list span {
  color: var(--accent);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.explain-list p {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.threshold-card {
  display: grid;
  gap: 0;
  overflow: hidden;
}

.threshold-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 17px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 9px;
}

.threshold-row strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.threshold-card .text-button {
  padding: 13px 17px;
}

.compact-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 920px;
}

.list-panel {
  padding: 23px;
}

.bets-filter {
  margin: 0;
}

.bets-list {
  display: grid;
  gap: 8px;
}

.bet-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(110px, 0.7fr) 100px 100px 130px 120px;
  align-items: center;
  gap: 16px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
}

.bet-main strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}

.bet-main span,
.bet-cell span {
  display: block;
  margin-top: 3px;
  color: var(--faint);
  font-size: 9px;
}

.bet-cell strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.status-pill {
  display: inline-flex !important;
  width: fit-content;
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted) !important;
  font-size: 8px !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-pill.won {
  border-color: rgba(196, 248, 110, 0.25);
  background: rgba(196, 248, 110, 0.075);
  color: var(--accent) !important;
}

.status-pill.lost {
  border-color: rgba(255, 125, 120, 0.24);
  background: rgba(255, 125, 120, 0.07);
  color: var(--red) !important;
}

.settle-actions {
  display: flex;
  gap: 5px;
}

.settle-actions button {
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
}

.settle-actions button:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

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

.settings-card {
  padding: 23px;
}

.settings-card:nth-child(3) {
  grid-column: 1 / -1;
}

.settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.settings-copy {
  max-width: 650px;
  margin: 13px 0 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.legal-feed {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 20px;
  padding: 13px;
  border: 1px solid rgba(196, 248, 110, 0.15);
  border-radius: 10px;
  background: rgba(196, 248, 110, 0.045);
}

.legal-feed-mark {
  flex: 0 0 auto;
  padding: 4px 6px;
  border: 1px solid rgba(196, 248, 110, 0.3);
  border-radius: 5px;
  color: var(--accent);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.legal-feed strong {
  display: block;
  font-size: 10px;
  font-weight: 500;
}

.legal-feed p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.legal-feed a {
  display: inline-block;
  margin-top: 7px;
  color: var(--accent);
  font-size: 9px;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: fit-content;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
}

.segmented-control button {
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}

.segmented-control button.is-active {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.form-stack {
  display: grid;
  gap: 14px;
  margin-top: 19px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field > span {
  color: var(--muted);
  font-size: 9px;
}

.field input,
.field select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  background: rgba(0, 0, 0, 0.17);
  color: var(--text);
  font-size: 11px;
}

.field input::placeholder {
  color: var(--faint);
}

.field-help {
  margin: 0;
  color: var(--faint);
  font-size: 9px;
}

.settings-card > .segmented-control {
  margin: 20px 0;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(3, 6, 4, 0.78);
  backdrop-filter: blur(10px);
}

.modal {
  position: relative;
  width: min(100%, 510px);
  max-height: calc(100vh - 40px);
  padding: 27px;
  overflow-y: auto;
  border: 1px solid var(--border-strong);
  border-radius: 19px;
  background: #111813;
  box-shadow: var(--shadow);
}

.modal h2 {
  padding-right: 35px;
  font-size: 28px;
}

.modal-close {
  position: absolute;
  top: 17px;
  right: 17px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 21px;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
}

.modal-match {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: 23px 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.modal-match > div {
  display: grid;
  gap: 3px;
}

.modal-match span:not(.selection-pill) {
  color: var(--faint);
  font-size: 9px;
}

.modal-match strong {
  font-size: 13px;
  font-weight: 500;
}

.modal-match small {
  color: var(--muted);
  font-size: 9px;
}

.selection-pill {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(196, 248, 110, 0.28);
  border-radius: 8px;
  background: rgba(196, 248, 110, 0.08);
  color: var(--accent);
  font-size: 10px;
  font-weight: 500;
}

.modal-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 19px;
}

.modal-metrics > div {
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 9px;
}

.modal-metrics span {
  display: block;
  color: var(--faint);
  font-size: 8px;
}

.modal-metrics strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stake-field input {
  height: 55px;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.stake-presets {
  display: flex;
  gap: 6px;
  margin-top: -5px;
}

.stake-presets button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
}

.stake-presets button:hover {
  color: var(--text);
}

.return-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 17px 0;
  padding: 13px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
}

.return-preview strong {
  color: var(--accent);
  font-size: 16px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 19px;
}

.modal-footnote {
  margin: 14px 0 0;
  color: var(--faint);
  font-size: 8px;
  line-height: 1.5;
}

.toast-region {
  position: fixed;
  z-index: 200;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 44px));
}

.toast {
  padding: 13px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #172019;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 11px;
  animation: toast-in 180ms ease both;
}

.toast.success {
  border-color: rgba(196, 248, 110, 0.28);
}

.toast.error {
  border-color: rgba(255, 125, 120, 0.35);
}

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

.loading-bar {
  position: fixed;
  z-index: 300;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(196, 248, 110, 0.5);
  transition: width 220ms ease, opacity 220ms ease;
}

.loading-bar.is-loading {
  width: 72%;
}

.loading-bar.is-done {
  width: 100%;
  opacity: 0;
}

@media (max-width: 1180px) {
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 278px;
  }

  .signal-card {
    grid-template-columns: minmax(180px, 1.45fr) minmax(105px, 0.8fr) 76px 76px 30px;
  }

  .signal-card .signal-stake {
    display: none;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 90;
    top: 0;
    bottom: 0;
    left: 0;
    width: 244px;
    transform: translateX(-105%);
    transition: transform 200ms ease;
    box-shadow: var(--shadow);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .main-content {
    padding: 0 22px 45px;
  }

  .topbar {
    justify-content: space-between;
    min-height: 68px;
  }

  .mobile-menu {
    display: grid;
    place-items: center;
    width: 37px;
    height: 37px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
  }

  .mobile-brand {
    display: block;
    margin-left: 10px;
    margin-right: auto;
    font-size: 14px;
    letter-spacing: -0.03em;
  }

  .mobile-brand strong {
    color: var(--accent);
    font-weight: 500;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .insight-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .threshold-card {
    grid-column: 1 / -1;
  }

  .signals-section {
    order: 1;
  }

  .insight-column {
    order: 2;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-card:nth-child(3) {
    grid-column: auto;
  }

  .bet-row {
    grid-template-columns: minmax(160px, 1.2fr) 100px 90px 120px;
  }

  .bet-row .bet-cell:nth-child(3),
  .bet-row .bet-cell:nth-child(4) {
    display: none;
  }
}

@media (max-width: 700px) {
  .main-content {
    padding: 0 15px 38px;
  }

  .live-time {
    display: none;
  }

  .topbar-actions {
    gap: 8px;
  }

  .refresh-button span:last-child {
    display: none;
  }

  .refresh-button {
    width: 38px;
    padding: 0;
  }

  .page {
    padding-top: 27px;
  }

  .page-heading {
    display: block;
  }

  .dashboard-heading .model-chip {
    margin-top: 22px;
  }

  h1 {
    font-size: 37px;
  }

  .stat-grid,
  .compact-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card {
    padding: 16px;
  }

  .stat-value {
    font-size: 23px;
  }

  .dashboard-grid {
    gap: 24px;
  }

  .filter-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .search-field {
    grid-column: 1 / -1;
    max-width: none;
  }

  .filter-bar select {
    width: 100%;
  }

  .signal-card {
    grid-template-columns: minmax(0, 1fr) 80px 30px;
    gap: 12px;
    padding: 15px;
  }

  .signal-identity {
    grid-column: 1;
    grid-row: 1;
  }

  .signal-pick {
    grid-column: 1;
    grid-row: 2;
  }

  .signal-card .signal-metric {
    display: none;
  }

  .signal-card .signal-probability {
    display: block;
    grid-column: 2;
    grid-row: 1;
  }

  .signal-card-icon {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .insight-column {
    grid-template-columns: 1fr;
  }

  .threshold-card {
    grid-column: auto;
  }

  .list-panel {
    padding: 16px;
  }

  .list-panel .section-heading {
    align-items: flex-start;
  }

  .bet-row {
    grid-template-columns: minmax(0, 1fr) 75px;
    gap: 12px;
  }

  .bet-row .bet-cell {
    display: none;
  }

  .bet-row .bet-cell:nth-child(2) {
    display: block;
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }

  .bet-row .bet-cell:nth-child(5) {
    display: block;
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .bet-row .bet-actions {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .settings-card {
    padding: 18px;
  }

  .form-grid,
  .inline-fields {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 22px;
  }

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

  .modal-actions {
    display: grid;
  }
}

@media (max-width: 430px) {
  .stat-grid,
  .compact-stats {
    grid-template-columns: 1fr;
  }

  .page-heading {
    margin-bottom: 25px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .signal-count {
    padding-top: 5px;
  }

  .modal-match {
    display: grid;
  }

  .selection-pill {
    width: fit-content;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 28px 18px;
  background:
    radial-gradient(circle at 70% 0%, rgba(196, 248, 110, 0.09), transparent 30rem),
    radial-gradient(circle at 15% 90%, rgba(143, 201, 255, 0.05), transparent 27rem),
    var(--bg);
}

.login-grid {
  position: fixed;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at center, black, transparent 72%);
  pointer-events: none;
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  margin: 0 auto 20px;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.login-brand strong,
.login-brand em {
  font-style: normal;
  font-weight: 500;
}

.login-brand em {
  color: var(--accent);
}

.login-card {
  padding: 31px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: rgba(17, 24, 19, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.login-card h1 {
  font-size: 38px;
}

.login-copy {
  margin: 12px 0 26px;
  color: var(--muted);
  font-size: 12px;
}

.login-form {
  display: grid;
  gap: 15px;
}

.login-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 125, 120, 0.3);
  border-radius: 8px;
  background: rgba(255, 125, 120, 0.07);
  color: var(--red);
  font-size: 10px;
}

.login-footnote {
  margin: 22px 0 0;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.55;
}
