:root {
  --bg: #070b11;
  --bg-2: #0d1522;
  --panel: rgba(23, 34, 50, 0.74);
  --panel-soft: rgba(23, 34, 50, 0.48);
  --panel-strong: rgba(31, 44, 64, 0.9);
  --row: rgba(30, 43, 64, 0.82);
  --row-hover: rgba(38, 54, 80, 0.9);
  --border: rgba(255, 255, 255, 0.105);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f2f7ff;
  --muted: #93a1b6;
  --muted-2: #64748b;
  --green: #29d96f;
  --green-dark: #0e4e35;
  --green-soft: rgba(41, 217, 111, 0.14);
  --purple: #6657ff;
  --purple-2: #7c6dff;
  --purple-soft: rgba(102, 87, 255, 0.2);
  --blue: #62a0ff;
  --danger: #ff647c;
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.38);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 35% -10%, rgba(76, 92, 145, 0.55) 0%, transparent 34%),
    linear-gradient(180deg, #16243a 0%, #0a111c 42%, #05080d 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

input[type="number"] {
  appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.bg-dots {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.42;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.26) 1px, transparent 1.4px),
    radial-gradient(circle, rgba(255, 255, 255, 0.14) 1px, transparent 1.35px);
  background-position: 0 0, 18px 22px;
  background-size: 42px 42px, 58px 58px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.95), rgba(0,0,0,0.7) 46%, transparent 100%);
}

.bg-glow {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 999px;
  filter: blur(92px);
  opacity: 0.24;
  pointer-events: none;
  z-index: 0;
}

.bg-glow-a {
  top: 10px;
  left: 8%;
  background: rgba(102, 87, 255, 0.52);
}

.bg-glow-b {
  top: 160px;
  right: -110px;
  background: rgba(41, 217, 111, 0.24);
}

.topbar,
.layout {
  position: relative;
  z-index: 1;
}

.topbar {
  width: min(1480px, calc(100% - 44px));
  margin: 0 auto;
  padding: 30px 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.tool-switch {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(10, 16, 26, 0.48);
}

.tool-tab {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #b8c4d6;
  font-weight: 900;
  cursor: pointer;
}

.tool-tab.active {
  color: #06100c;
  background: var(--green);
}

.tool-panel.hidden {
  display: none;
}

.logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
  border-radius: 24px;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.38));
}

.tools-dropdown {
  height: 58px;
  padding: 0 28px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 800;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.tools-dropdown svg,
.refresh-btn svg,
.search-wrap svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tools-dropdown:hover,
.refresh-btn:hover {
  border-color: rgba(255,255,255,0.36);
  background: rgba(255,255,255,0.06);
  transform: translateY(-1px);
}

.layout {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto 44px;
}

.control-shell {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: rgba(24, 36, 54, 0.58);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px 18px;
  align-items: center;
  margin-bottom: 18px;
}

.ev-shell {
  border: 1px solid rgba(41, 217, 111, 0.22);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(17, 62, 48, 0.58), rgba(25, 36, 58, 0.72)),
    rgba(24, 36, 54, 0.62);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 18px;
  backdrop-filter: blur(18px);
}

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

.section-kicker {
  margin: 0 0 5px;
  color: #80f0ad;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ev-head h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
}

.ev-actions {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(7, 11, 17, 0.34);
}

.ev-size {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #b8c4d6;
  font-weight: 900;
  cursor: pointer;
}

.ev-size.active {
  color: #06100c;
  background: var(--green);
}

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

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

.ev-score-card {
  min-height: 104px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(9, 16, 27, 0.48);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.ev-card-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ev-score-card strong {
  font-size: 22px;
  line-height: 1.05;
}

.ev-score-card span:last-child {
  color: #a9b5c8;
  font-size: 14px;
  line-height: 1.25;
}

.ev-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ev-signal-row span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: #d9e5f7;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}

.ev-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.ev-filter-bar .select-wrap {
  flex: 1 1 240px;
}

.ev-find-btn {
  flex: 1 1 180px;
  justify-content: center;
}

.ev-board,
.ev-parlay-card {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(7, 11, 17, 0.38);
  overflow: hidden;
}

.ev-board-head,
.ev-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) minmax(180px, 1.2fr) repeat(4, minmax(86px, 0.55fr));
  gap: 12px;
  align-items: center;
}

.ev-board-head {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.ev-row {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ev-row-watchlist {
  background: rgba(245, 198, 106, 0.045);
}

.ev-row:last-child {
  border-bottom: 0;
}

.ev-player,
.ev-prop {
  min-width: 0;
}

.ev-player strong,
.ev-prop strong {
  display: block;
  line-height: 1.15;
}

.ev-player span,
.ev-prop span,
.ev-metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.ev-metric strong {
  font-size: 18px;
}

.ev-positive {
  color: var(--green);
}

.ev-neutral {
  color: #f5c66a;
}

.ev-negative {
  color: var(--danger);
}

.ev-empty-row {
  padding: 24px;
  color: var(--muted);
}

.ev-empty-row strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  margin-bottom: 4px;
}

.ev-watchlist-board {
  margin-top: 14px;
  border: 1px solid rgba(245, 198, 106, 0.22);
  border-radius: var(--radius-md);
  background: rgba(7, 11, 17, 0.28);
  overflow: hidden;
}

.ev-best-panel {
  margin-top: 14px;
  border: 1px solid rgba(41, 217, 111, 0.22);
  border-radius: var(--radius-md);
  background: rgba(7, 11, 17, 0.3);
  overflow: hidden;
}

.ev-sync-panel {
  margin-top: 14px;
  border: 1px solid rgba(98, 160, 255, 0.2);
  border-radius: var(--radius-md);
  background: rgba(7, 11, 17, 0.28);
  overflow: hidden;
}

.ev-sync-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.ev-import-btn {
  min-width: 110px;
  justify-content: center;
}

.ev-import-status {
  padding: 0 14px 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.ev-best-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 10px;
  padding: 12px;
}

.ev-best-card {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
}

.ev-best-card strong,
.ev-best-card b {
  display: block;
  line-height: 1.2;
}

.ev-best-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.ev-parlay-suggestions {
  display: contents;
}

.ev-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}

.ev-section-head h2 {
  margin: 4px 0 0;
  font-size: 18px;
  line-height: 1.15;
}

.ev-section-head > span {
  color: #f5c66a;
  font-weight: 900;
  white-space: nowrap;
}

.ev-watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
  gap: 12px;
  padding: 14px;
}

.ev-watch-card {
  display: grid;
  grid-template-columns: minmax(140px, 1.05fr) minmax(150px, 1.1fr) minmax(84px, 0.55fr);
  grid-template-areas:
    "player prop model"
    "side line odds"
    "calc calc calc";
  gap: 14px 16px;
  align-items: end;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  min-width: 0;
}

.watch-shell {
  width: min(1480px, calc(100% - 44px));
  margin: 0 auto 38px;
  padding: 22px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: rgba(11, 20, 32, 0.72);
  box-shadow: var(--shadow);
}

.watch-status-pill {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(41, 217, 111, 0.34);
  border-radius: 999px;
  background: rgba(41, 217, 111, 0.14);
  color: #9dffbf;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.watch-rule-grid {
  margin-top: 16px;
}

.watch-board {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(7, 11, 17, 0.26);
  overflow: hidden;
}

.watch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 12px;
  padding: 14px;
}

.watch-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
}

.watch-card-alert {
  border-color: rgba(41, 217, 111, 0.45);
  background: rgba(41, 217, 111, 0.11);
}

.watch-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.watch-card-top strong {
  min-width: 0;
  line-height: 1.15;
}

.watch-card-top span {
  color: #f5c66a;
  font-weight: 900;
  white-space: nowrap;
}

.watch-score {
  margin-top: 14px;
  color: var(--muted);
  font-weight: 800;
}

.watch-lead {
  margin-top: 6px;
  color: var(--green);
  font-size: 22px;
  font-weight: 1000;
}

.watch-note {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.watch-picks {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.watch-pick {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.12);
}

.watch-pick b,
.watch-pick span {
  display: block;
  line-height: 1.25;
}

.watch-pick span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.ev-watch-player {
  grid-area: player;
}

.ev-watch-prop {
  grid-area: prop;
}

.ev-watch-model {
  grid-area: model;
}

.ev-line-input {
  grid-area: line;
}

.ev-side-input {
  grid-area: side;
}

.ev-odds-input {
  grid-area: odds;
}

.ev-live-calc {
  grid-area: calc;
}

.ev-watch-card strong,
.ev-watch-card b {
  display: block;
  color: var(--text);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.ev-watch-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ev-price-input {
  display: grid;
  gap: 5px;
}

.ev-price-input span,
.ev-live-calc span {
  margin-top: 0;
  font-size: 12px;
}

.ev-price-input input,
.ev-price-input select {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  padding: 0 10px;
  font-weight: 900;
}

.ev-price-input select {
  appearance: none;
}

.ev-live-calc b {
  font-size: 18px;
}

.ev-parlay-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.ev-parlay-card {
  padding: 14px;
  margin-top: 0;
}

.ev-parlay-card h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.ev-parlay-list {
  margin: 0;
  padding-left: 18px;
  color: #dce7f8;
}

.ev-parlay-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
  line-height: 1.35;
}

.ev-sections {
  display: grid;
  gap: 22px;
  margin-top: 16px;
}

.ev-head-simple {
  margin-bottom: 18px;
}

.ev-sport-section {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  background: rgba(5, 8, 13, 0.54);
  overflow: hidden;
}

.ev-sport-title {
  padding: 18px;
}

.ev-sport-title h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
}

.ev-sport-title h2 span {
  color: var(--green);
  font-size: 15px;
}

.ev-sport-title h2 small {
  color: var(--muted);
}

.ev-sport-title p {
  max-width: 960px;
  margin: 12px 0 0;
  color: #aab6c8;
  line-height: 1.5;
}

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

.ev-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.ev-table th,
.ev-table td {
  padding: 13px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

.mlb-board-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mlb-sort-wrap {
  min-width: 220px;
}

.watch-metrics {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.watch-metrics span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.watch-metrics b {
  color: var(--green);
}

.ev-table th {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.ev-table td {
  color: #eef4ff;
}

.ev-table td span,
.ev-table td small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

.ev-table td small {
  max-width: 460px;
  font-size: 12px;
}

.ev-table-empty {
  color: var(--muted);
  text-align: center;
}

.tabs {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.tab {
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #b5c0d3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 800;
  white-space: normal;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.tab span {
  line-height: 1.08;
}

.tab strong {
  min-width: 28px;
  min-height: 25px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #e8e5ff;
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.tab.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  box-shadow: 0 12px 24px rgba(102, 87, 255, 0.28);
}

.tab.active strong {
  background: rgba(255,255,255,0.17);
  color: #ffffff;
}

.control-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  min-width: 0;
}

.search-wrap {
  flex: 999 1 360px;
  max-width: none;
  min-width: min(100%, 300px);
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 999px;
  background: rgba(5, 9, 15, 0.2);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 11px;
}

.unit-input {
  flex: 0 0 116px;
  height: 48px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.unit-input:hover,
.unit-input:focus-within {
  border-color: rgba(255,255,255,0.36);
  background: rgba(255,255,255,0.06);
  transform: translateY(-1px);
}

.unit-input span {
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c8d2e3;
  background: rgba(255,255,255,0.04);
  border-right: 1px solid rgba(255,255,255,0.08);
  font-weight: 950;
  font-size: 13px;
}

.unit-input input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 0 14px;
  font-weight: 950;
}

.arb-input {
  flex-basis: 126px;
  grid-template-columns: 58px minmax(0, 1fr);
}

.select-wrap {
  position: relative;
  flex: 1 0 176px;
  max-width: 260px;
  height: 48px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  display: flex;
  align-items: center;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.select-wrap:hover {
  border-color: rgba(255,255,255,0.36);
  background: rgba(255,255,255,0.06);
  transform: translateY(-1px);
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 18px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #d7dff0;
  border-bottom: 2px solid #d7dff0;
  transform: rotate(45deg) translateY(-2px);
  pointer-events: none;
  opacity: .82;
}

.market-select-wrap {
  flex-basis: 224px;
  max-width: 320px;
}

.stake-mode-wrap {
  flex-basis: 224px;
  max-width: 320px;
}

.sort-select-wrap {
  flex-basis: 210px;
  max-width: 300px;
}

.sport-select {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  appearance: none;
  padding: 0 42px 0 18px;
  color: var(--text);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.sport-select option {
  color: #0f1724;
  background: #f7fbff;
}

.search {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search::placeholder {
  color: rgba(196, 207, 225, 0.48);
}

.sportsbook-pill,
.auto-pill,
.refresh-btn {
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.sportsbook-pill {
  gap: 10px;
  padding: 0 18px;
  background: rgba(255,255,255,0.035);
  font-weight: 800;
}

.sportsbook-pill strong {
  min-width: 26px;
  min-height: 25px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--purple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.auto-pill {
  padding: 0 18px;
  color: #caffdf;
  background: rgba(41, 217, 111, 0.14);
  border-color: rgba(41, 217, 111, 0.34);
  font-weight: 900;
}

.wallet-btn {
  min-width: 124px;
  justify-content: center;
}

.save-btn {
  min-width: 94px;
  justify-content: center;
  color: #dfffea;
  border-color: rgba(41, 217, 111, 0.34);
  background: rgba(41, 217, 111, 0.12);
}

.profit-filter-toggle {
  min-width: 154px;
  justify-content: center;
}

.profit-filter-toggle.active {
  color: #dfffea;
  border-color: rgba(41, 217, 111, 0.42);
  background: rgba(30, 162, 105, 0.22);
}

.profit-filter-mode-wrap {
  min-width: 148px;
}

.profit-filter-input-wrap {
  min-width: 132px;
}

.auto-pill::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  margin-right: 9px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(41, 217, 111, 0.12);
}

.auto-pill.error {
  color: #ffd1d8;
  background: rgba(255, 100, 124, 0.11);
  border-color: rgba(255, 100, 124, 0.28);
}

.auto-pill.error::before {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 100, 124, 0.12);
}

.auto-pill.checking {
  color: #f5f0c8;
  background: rgba(245, 190, 72, 0.14);
  border-color: rgba(245, 190, 72, 0.34);
}

.auto-pill.checking::before {
  background: #f5be48;
  box-shadow: 0 0 0 4px rgba(245, 190, 72, 0.12);
  animation: pulse-check 1s ease-in-out infinite;
}

.auto-pill.done {
  color: #dfffe8;
  background: rgba(41, 217, 111, 0.22);
  border-color: rgba(41, 217, 111, 0.52);
}

.auto-pill.done::before {
  box-shadow: 0 0 0 5px rgba(41, 217, 111, 0.2);
}

@keyframes pulse-check {
  0%, 100% { transform: scale(1); opacity: .72; }
  50% { transform: scale(1.42); opacity: 1; }
}

.refresh-btn {
  gap: 10px;
  padding: 0 22px;
  color: var(--text);
  background: rgba(255,255,255,0.035);
  cursor: pointer;
  font-weight: 900;
}

.refresh-btn:disabled {
  cursor: wait;
  opacity: .68;
}

.meta-strip {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  padding: 0 8px 2px;
}

.meta-strip strong {
  color: #c9d4e5;
  font-weight: 700;
}

.wallet-panel {
  grid-column: 1 / -1;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 22px;
  background: rgba(5, 9, 15, 0.22);
  padding: 14px;
}

.discord-books-panel {
  margin-top: 10px;
}

.wallet-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 2px 12px;
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.wallet-panel-head strong {
  color: #eaf0fb;
}

.wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 10px;
}

.wallet-field {
  height: 48px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  background: rgba(255,255,255,0.035);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  align-items: center;
  overflow: hidden;
}

.wallet-field span {
  padding: 0 12px;
  color: #d8e2f2;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-field input {
  width: 100%;
  height: 100%;
  border: 0;
  border-left: 1px solid rgba(255,255,255,0.08);
  outline: 0;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 0 10px;
  font-weight: 950;
  text-align: right;
}

.discord-filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mini-action {
  border: 1px solid rgba(216, 225, 241, 0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  color: #eaf0fb;
  min-height: 30px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.mini-action.active {
  border-color: rgba(45, 231, 140, 0.45);
  background: rgba(30, 162, 105, 0.32);
  color: #dfffea;
}

.discord-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 8px;
}

.discord-book-chip {
  min-height: 42px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  color: #d8e2f2;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
}

.discord-book-chip.selected {
  border-color: rgba(45, 231, 140, 0.46);
  background: rgba(30, 162, 105, 0.20);
}

.discord-book-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-book-chip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.discord-filter-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.board-card {
  border: 1px solid rgba(255,255,255,0.095);
  border-radius: var(--radius-lg);
  background: rgba(17, 27, 41, 0.54);
  overflow: visible;
  box-shadow: var(--shadow);
  width: 100%;
}

.bet-row {
  display: grid;
  grid-template-columns: minmax(82px, auto) minmax(0, 1fr) minmax(58px, auto) minmax(96px, auto);
  grid-template-areas:
    "profit market market market"
    "profit bet1 btn1 stake1"
    "profit bet2 btn2 stake2";
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.board-header {
  display: none;
}

.bet-list {
  overflow-x: hidden;
  overflow-y: auto;
  max-height: calc(100vh - 235px);
  scrollbar-color: rgba(255,255,255,0.22) transparent;
}

.bet-row {
  padding: 16px 20px;
  background: rgba(29, 43, 64, 0.62);
  border-bottom: 1px solid rgba(255,255,255,0.055);
  animation: rowIn .24s ease both;
  transition: background .16s ease;
}

.profit-cell { grid-area: profit; }
.market-block { grid-area: market; }
.bet-side-1 { grid-area: bet1; }
.bet-side-1 + .bet-btn { grid-area: btn1; }
.bet-side-1 + .bet-btn + .stake-box { grid-area: stake1; }
.bet-side-2 { grid-area: bet2; }
.bet-side-2 + .bet-btn { grid-area: btn2; }
.bet-side-2 + .bet-btn + .stake-box { grid-area: stake2; }

.bet-row:hover {
  background: rgba(38, 54, 80, 0.88);
}

.profit {
  display: inline-flex;
  width: fit-content;
  min-width: 74px;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  color: #eafff2;
  background: linear-gradient(180deg, rgba(41,217,111,0.95), rgba(20,165,83,0.95));
  font-weight: 950;
  line-height: 1;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.18), 0 10px 20px rgba(41,217,111,0.13);
}

.unit-profit {
  margin-top: 7px;
  color: #9fffc4;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.unit-profit.warning {
  color: #ffd1d8;
}

.wallet-warning {
  margin-top: 5px;
  color: #ffd1d8;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.market-block {
  min-width: 0;
}

.market-title {
  color: #f7fbff;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: normal;
}

.event-context {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 5px;
  padding: 3px 8px;
  border: 1px solid rgba(41, 217, 111, 0.28);
  border-radius: 999px;
  color: #caffdf;
  background: rgba(41, 217, 111, 0.10);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.event-line {
  margin-top: 4px;
  color: #a8b4c5;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.event-details {
  margin-top: 5px;
  color: #7f8da3;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.bet-side {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.bookmaker-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #111827;
  border: 1px solid rgba(255,255,255,0.09);
  color: #e7ebff;
  font-size: 13px;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.035);
}

.bookmaker-icon.green {
  background: rgba(41, 217, 111, 0.18);
  color: #dfffea;
}

.bookmaker-icon.purple {
  background: rgba(102, 87, 255, 0.2);
  color: #dedaff;
}

.selection-title {
  display: block;
  min-width: 0;
  color: #f2f7ff;
  font-weight: 900;
  line-height: 1.24;
  overflow-wrap: anywhere;
  word-break: normal;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.selection-title::-webkit-scrollbar {
  height: 8px;
}

.selection-title::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.055);
  border-radius: 999px;
}

.selection-title::-webkit-scrollbar-thumb {
  background: rgba(151, 164, 190, 0.55);
  border-radius: 999px;
}

.selection-title::-webkit-scrollbar-thumb:hover {
  background: rgba(210, 220, 240, 0.72);
}

.bet-meta {
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
  min-width: 0;
  flex-wrap: wrap;
}

.bookmaker-name {
  overflow-wrap: anywhere;
}

.odd {
  font-size: 15px;
  font-weight: 950;
  color: #ffffff;
}

.odd.positive {
  color: var(--green);
}

.odd.negative {
  color: #ffffff;
}

.bet-btn {
  justify-self: center;
  min-width: 54px;
  min-height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid rgba(216, 225, 241, 0.26);
  color: #f5f8ff;
  background: rgba(255,255,255,0.025);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .02em;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.bet-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.58);
  background: rgba(255,255,255,0.08);
}

.bet-btn.disabled {
  pointer-events: none;
  opacity: .35;
}

.stake-box {
  justify-self: end;
  width: min(112px, 100%);
  height: 38px;
  border-radius: 6px;
  border: 1px solid rgba(216, 225, 241, 0.14);
  background: rgba(255,255,255,0.075);
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  overflow: hidden;
  color: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.stake-box.warning {
  border-color: rgba(255, 100, 124, 0.32);
  background: rgba(255, 100, 124, 0.11);
}

.stake-box span {
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #aeb9ca;
  background: rgba(255,255,255,0.035);
  border-right: 1px solid rgba(255,255,255,0.08);
  font-weight: 900;
}

.stake-box strong,
.stake-box input {
  padding: 0 10px;
  text-align: right;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stake-box input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  color: #f8fbff;
  background: transparent;
  font: inherit;
}

.stake-box.manual {
  border-color: rgba(45, 231, 140, 0.45);
  background: rgba(45, 231, 140, 0.10);
}

.empty {
  text-align: center;
  padding: 70px 22px 76px;
}

.empty h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

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

.hidden {
  display: none !important;
}

@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .control-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .search-wrap {
    max-width: none;
    flex-basis: 100%;
  }

  .select-wrap,
  .unit-input,
  .auto-pill,
  .refresh-btn {
    flex: 1 1 180px;
  }

  .unit-input,
  .arb-input {
    max-width: 190px;
  }

  .meta-strip {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

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

  .tabs,
  .control-actions {
    grid-column: 1 / -1;
  }

  .control-actions {
    grid-row: 2;
  }

  .control-actions {
    justify-content: flex-start;
  }

  .tabs {
    width: fit-content;
  }
}

@media (max-width: 720px) {
  .topbar,
  .layout {
    width: min(100% - 24px, 1480px);
  }

  .topbar {
    padding-top: 18px;
    gap: 12px;
    align-items: flex-start;
    flex-direction: column;
  }

  .tool-switch {
    width: 100%;
  }

  .tool-tab {
    flex: 1;
    padding: 0 10px;
  }

  .ev-head {
    align-items: stretch;
    flex-direction: column;
  }

  .ev-actions,
  .ev-grid {
    width: 100%;
  }

  .ev-size {
    flex: 1;
    padding: 0 10px;
  }

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

  .ev-board {
    overflow-x: auto;
  }

  .ev-board-head,
  .ev-row {
    min-width: 820px;
  }

  .ev-watch-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "player"
      "prop"
      "model"
      "side"
      "line"
      "odds"
      "calc";
  }

  .ev-parlay-grid {
    grid-template-columns: 1fr;
  }

  .ev-head h1 {
    font-size: 24px;
  }

  .logo {
    width: 62px;
    height: 62px;
  }

  .tools-dropdown {
    height: 48px;
    padding: 0 18px;
  }

  .tabs {
    width: 100%;
  }

  .tab {
    flex: 1;
    justify-content: center;
    padding: 0 8px;
    gap: 6px;
    min-width: 0;
  }

  .tab span {
    overflow-wrap: anywhere;
  }

  .control-actions {
    gap: 10px;
  }

  .search-wrap,
  .select-wrap,
  .unit-input,
  .sportsbook-pill,
  .auto-pill,
  .refresh-btn {
    width: 100%;
    justify-content: center;
  }

  .select-wrap {
    flex-basis: auto;
    max-width: none;
  }

  .unit-input,
  .arb-input {
    flex-basis: auto;
    max-width: none;
  }

  .search-wrap {
    justify-content: flex-start;
  }

  .board-header {
    display: none;
  }

  .bet-list {
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 8px;
  }

  .bet-row {
    width: max(860px, calc(100vw - 24px));
    grid-template-columns: 110px minmax(0, 1fr) 112px 118px;
    grid-template-areas:
      "market market market market"
      "profit bet1 btn1 stake1"
      "profit bet2 btn2 stake2";
    gap: 12px 18px;
    padding: 16px;
    align-items: center;
  }

  .profit-cell {
    display: block;
  }

  .market-title {
    font-size: 18px;
  }

  .bet-side {
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    padding-top: 0;
    border-top: 0;
  }

  .bookmaker-icon {
    width: 38px;
    height: 38px;
  }

  .selection-title {
    font-size: 17px;
  }

  .bet-btn {
    justify-self: stretch;
    min-height: 40px;
  }

  .stake-box {
    justify-self: stretch;
    width: 100%;
    height: 40px;
  }
}

@media (min-width: 721px) and (max-width: 1680px) {
  .bet-list {
    overflow-x: hidden;
  }

  .selection-title {
    max-width: 100%;
    padding-bottom: 6px;
    white-space: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overflow-wrap: normal;
    word-break: keep-all;
    scrollbar-width: thin;
    scrollbar-color: rgba(151, 164, 190, 0.55) rgba(255,255,255,0.055);
  }
}

@media (min-width: 721px) and (max-width: 1120px) {
  .ev-watch-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "player model"
      "prop prop"
      "side line"
      "odds odds"
      "calc calc";
    align-items: start;
  }

  .bet-row {
    grid-template-columns: minmax(78px, auto) minmax(0, 1fr) minmax(58px, auto) minmax(96px, auto);
  }
}

@media (min-width: 721px) and (max-width: 920px) {
  .bet-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "profit profit"
      "market market"
      "bet1 bet1"
      "btn1 stake1"
      "bet2 bet2"
      "btn2 stake2";
    align-items: start;
  }

  .profit-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  .bet-side {
    align-items: start;
  }

  .bet-btn,
  .stake-box {
    justify-self: stretch;
  }
}

@media (max-width: 720px) {
  .selection-title {
    padding-bottom: 0;
    white-space: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overflow-wrap: normal;
    word-break: keep-all;
    scrollbar-width: thin;
    scrollbar-color: rgba(151, 164, 190, 0.55) rgba(255,255,255,0.055);
  }
}

/* Customer build: internal controls hidden. */
.tools-dropdown,.sportsbook-pill{display:none!important;}
