:root {
  color-scheme: light;
  --bg: #edf2f6;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #667085;
  --line: #d8e0e8;
  --blue: #1464f4;
  --blue-dark: #0d46b3;
  --green: #04a777;
  --green-dark: #03795a;
  --red: #d64b4b;
  --amber: #c78200;
  --gold: #f5c451;
  --teal: #0f766e;
  --nav: #080d13;
  --nav-soft: #111923;
  --shadow: 0 18px 50px rgba(16, 24, 40, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 28px;
  background: var(--nav);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--gold);
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}

.brand-mark.large {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

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

.logout-form {
  margin: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.main-nav a {
  padding: 9px 11px;
  border-radius: 7px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  background: #162233;
}

.role-pill {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 12px;
  color: #e7f7f1;
  background: rgba(4, 167, 119, 0.12);
}

.user-name {
  color: #cbd5e1;
}

.ghost-button,
.primary-button,
.secondary-button,
.tiny-button {
  border: 0;
  border-radius: 8px;
  font-weight: 800;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}

.ghost-button.light {
  color: #101828;
  background: rgba(255, 255, 255, 0.74);
}

.primary-button {
  padding: 13px 18px;
  color: #fff;
  background: var(--green);
}

.primary-link-button,
.secondary-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
}

.primary-link-button {
  color: #fff;
  background: var(--green);
}

.secondary-link-button {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.text-link {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.primary-button:hover {
  background: var(--green-dark);
}

.secondary-button {
  padding: 12px 16px;
  color: #fff;
  background: var(--nav-soft);
}

.tiny-button {
  padding: 7px 10px;
  color: var(--muted);
  background: #edf1f5;
}

.tiny-button.active {
  color: #fff;
  background: var(--green);
}

.tiny-button.danger {
  color: #a12626;
  background: #fff1f1;
}

.tiny-button.warning {
  color: #7a4f00;
  background: #fff2cf;
}

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

.full {
  width: 100%;
}

.flash-stack {
  position: fixed;
  top: 82px;
  right: 22px;
  z-index: 30;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
}

.flash {
  padding: 13px 15px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--blue);
}

.flash.error {
  border-left-color: var(--red);
}

.flash.success {
  border-left-color: var(--green);
}

.login-body {
  min-height: 100vh;
  background: #080d13;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(420px, 100%);
  padding: 30px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}

.login-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 28px;
}

.login-brand h1 {
  margin: 0;
  font-size: 28px;
}

.login-brand p {
  margin: 2px 0 0;
  color: var(--muted);
}

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

label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.14);
}

.bettor-body {
  min-height: 100vh;
  background: #070d12;
}

.bettor-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  color: #fff;
}

.bettor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.bettor-header h1 {
  margin: 4px 0 0;
  font-size: clamp(24px, 7vw, 42px);
}

.eyebrow {
  display: inline-block;
  color: var(--teal);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
  font-weight: 900;
}

.bettor-market {
  min-height: 188px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #111923;
}

.bettor-market h2 {
  margin: 16px 0 8px;
  font-size: clamp(24px, 7vw, 38px);
  line-height: 1.04;
}

.bettor-market p {
  margin: 0;
  color: #cbd5e1;
  font-size: 16px;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d6e4ff;
  font-size: 13px;
  font-weight: 900;
}

.status-dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--amber);
}

.status-dot.ready::before {
  background: #22c55e;
}

.market-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.market-line span,
.market-line strong {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.action-button {
  flex: 1;
  min-height: 280px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-size: clamp(38px, 13vw, 74px);
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.action-button:active {
  transform: scale(0.992);
  background: var(--green-dark);
}

.execution-feedback {
  min-height: 58px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #d8e8ff;
  font-weight: 800;
}

.workspace {
  width: min(1500px, calc(100vw - 32px));
  margin: 24px auto 48px;
  display: grid;
  gap: 18px;
}

.action-workspace {
  width: min(1540px, calc(100vw - 32px));
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-actions,
.inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.form-actions {
  display: flex;
  align-items: end;
}

.form-actions .primary-button {
  width: 100%;
}

.page-heading h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(24, 37, 56, 0.06);
}

.metric {
  padding: 16px;
  display: grid;
  gap: 6px;
}

.metric strong {
  letter-spacing: 0;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric strong {
  font-size: 28px;
}

.metric.warn strong {
  color: var(--amber);
}

.metric.live strong {
  color: var(--green);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.dashboard-grid.single {
  grid-template-columns: 1fr;
}

.dashboard-grid.lower {
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
}

.panel {
  padding: 18px;
  min-width: 0;
}

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

.panel h1,
.panel h2 {
  margin: 2px 0 0;
}

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

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
}

.span-two {
  grid-column: span 2;
}

.search-results,
.market-results {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.event-button,
.outcome-button {
  width: 100%;
  min-height: 52px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.event-button:hover,
.outcome-button:hover,
.outcome-button.selected {
  border-color: var(--blue);
  background: #f0f6ff;
}

.market-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.bettor-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.bettor-control-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border: 1px solid #d5dee8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.08);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.bettor-control-card:hover,
.bettor-control-card:focus {
  border-color: var(--green);
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.14);
  outline: none;
  transform: translateY(-2px);
}

.bettor-control-card.online {
  border-top: 4px solid var(--green);
}

.bettor-control-card.offline {
  border-top: 4px solid #d7a03d;
}

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

.bettor-control-card h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.08;
}

.bettor-control-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.live-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.live-badge.on {
  color: #035c44;
  background: #dbf8ef;
}

.live-badge.on::before {
  background: var(--green);
}

.live-badge.off {
  color: #7a4f00;
  background: #fff2cf;
}

.live-badge.off::before {
  background: var(--amber);
}

.icon-text-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.icon-text-button.danger {
  color: #a12626;
  border-color: #ffd1d1;
  background: #fff7f7;
}

.action-summary {
  display: grid;
  gap: 5px;
  min-height: 112px;
  padding: 13px;
  border-radius: 8px;
  background: #f4f7fb;
  border: 1px solid #e1e8f0;
}

.action-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.action-summary strong {
  color: var(--ink);
}

.action-summary small {
  color: var(--muted);
  line-height: 1.3;
}

.action-summary.active {
  background: #edf9f5;
  border-color: #bdebdc;
}

.empty-panel {
  grid-column: 1 / -1;
}

.action-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
}

.action-drawer.open {
  pointer-events: auto;
  opacity: 1;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 13, 19, 0.62);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(820px, 100vw);
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0;
  overflow-y: auto;
  padding: 22px;
  background: #f7fafc;
  box-shadow: -22px 0 70px rgba(0, 0, 0, 0.22);
  transform: translateX(24px);
  transition: transform 180ms ease;
}

.action-drawer.open .drawer-panel {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-header h2 {
  margin: 3px 0 0;
  font-size: 30px;
}

.drawer-header p {
  margin: 5px 0 0;
  color: var(--muted);
}

.close-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.link-loader {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 18px;
}

.event-focus {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dfe8ef;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 850;
}

.event-focus img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  background: #e8eef5;
}

.event-focus span,
.event-focus small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.event-focus strong {
  display: block;
  margin: 3px 0;
  color: var(--ink);
  font-size: 18px;
}

.pro-market-card {
  background: #fff;
}

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

.market-card-title span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eff4f8;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.odds-button {
  min-height: 88px;
  display: grid;
  gap: 4px;
  align-content: center;
  background: #f7fafc;
}

.odds-button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.odds-button strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.odds-button small {
  color: var(--muted);
  font-weight: 850;
}

.outcome-liquidity {
  font-size: 11px;
  opacity: 0.82;
}

.odds-button.selected {
  color: #fff;
  background: #102a43;
  border-color: #102a43;
}

.odds-button.quote-unavailable {
  background: #f4f6f8;
}

.odds-button.quote-unavailable strong {
  font-size: 15px;
  line-height: 1.2;
}

.current-market-card .odds-button {
  width: min(260px, 100%);
  margin-top: 10px;
}

.odds-button.selected span,
.odds-button.selected strong,
.odds-button.selected small {
  color: #fff;
}

.execution-form {
  position: sticky;
  bottom: -22px;
  margin: 16px -22px -22px;
  padding: 16px 22px 22px;
  border-top: 1px solid var(--line);
  background: rgba(247, 250, 252, 0.96);
  backdrop-filter: blur(10px);
}

.market-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

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

.outcome-button strong,
.outcome-button span {
  display: block;
}

.outcome-button span {
  color: var(--muted);
  margin-top: 3px;
  font-size: 13px;
}

.selected-action {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: #edf7f5;
  color: #0f766e;
  font-weight: 900;
}

.drawer-section {
  margin-top: 16px;
}

.drawer-section h3,
.execution-form h3 {
  margin: 0 0 10px;
  color: #223044;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-title-row h3 {
  margin-bottom: 0;
}

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

.selected-action-grid div {
  display: grid;
  gap: 4px;
}

.selected-action-grid span {
  color: #58706b;
  font-size: 11px;
  text-transform: uppercase;
}

.selected-action-grid strong {
  color: #0f3f35;
  line-height: 1.25;
}

.roster-list,
.account-list {
  display: grid;
  gap: 10px;
}

.account-dashboard-list {
  display: grid;
  gap: 12px;
}

.account-dashboard-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}

.account-dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.account-dashboard-head strong,
.account-dashboard-head span {
  display: block;
}

.account-dashboard-head strong {
  overflow-wrap: anywhere;
}

.account-dashboard-head span:not(.table-status) {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.account-dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.account-dashboard-metrics div {
  padding: 10px;
  border-radius: 8px;
  background: #f4f7fa;
  min-width: 0;
}

.account-dashboard-metrics span,
.account-dashboard-warning {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.account-dashboard-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.account-dashboard-warning {
  padding: 9px 10px;
  border-radius: 8px;
  color: #7a4f00;
  background: #fff2cf;
}

.roster-item,
.account-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.roster-item span,
.roster-item small,
.account-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.connection {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.connection.on {
  color: #087443;
  background: #ddfbea;
}

.connection.off {
  color: #7a2e0e;
  background: #fff0d7;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.table-status {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: #edf1f5;
}

.table-status.accepted,
.table-status.placed {
  color: #087443;
  background: #ddfbea;
}

.table-status.open {
  color: #8a5a00;
  background: #fff4cf;
}

.table-status.cashout {
  color: #0d46b3;
  background: #e1edff;
}

.table-status.won,
.table-status.finalized {
  color: #035c44;
  background: #d7f9ec;
}

.table-status.lost,
.table-status.canceled {
  color: #a12626;
  background: #ffe1e1;
}

.table-status.partial {
  color: #8a5a00;
  background: #fff4cf;
}

.table-status.failed {
  color: #a12626;
  background: #ffe1e1;
}

.admin-panel {
  margin-top: 4px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.7fr);
  gap: 18px;
}

.account-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric.compact {
  min-height: 82px;
}

.account-connection-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.account-connect-form {
  display: grid;
  gap: 14px;
}

.connect-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.connect-step:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.step-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #fff;
  background: var(--nav-soft);
  font-size: 12px;
  font-weight: 800;
}

.step-body {
  display: grid;
  gap: 10px;
}

.step-body h3 {
  margin: 2px 0 0;
  font-size: 15px;
}

.step-body p {
  max-width: 740px;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

.credential-choice {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
}

.credential-choice input {
  width: 16px;
  min-height: 16px;
  margin-top: 2px;
}

.credential-choice strong,
.credential-choice small {
  display: block;
}

.credential-choice strong {
  color: var(--ink);
  font-size: 13px;
}

.credential-choice small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.credential-choice.selected {
  border-color: rgba(4, 167, 119, 0.55);
  background: #eefaf6;
  box-shadow: inset 0 0 0 1px rgba(4, 167, 119, 0.12);
}

.compact-check {
  min-height: 34px;
  grid-column: auto;
}

.manual-credentials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-top: 2px;
}

.manual-credentials[hidden] {
  display: none;
}

.account-list-modern {
  gap: 12px;
}

.account-card {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.account-card-heading strong,
.account-card-heading span {
  display: block;
}

.account-card-heading strong {
  font-size: 14px;
}

.account-card-heading span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.account-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  background: #f5f8fb;
}

.account-facts dt,
.account-facts dd {
  margin: 0;
}

.account-facts dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.account-facts dd {
  margin-top: 3px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.account-warning {
  margin: -2px 0 0;
  padding: 8px 10px;
  border-radius: 7px;
  color: #8a5a00;
  background: #fff7df;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.account-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  grid-column: span 2;
}

.checkbox-line.compact-check {
  grid-column: auto;
}

.checkbox-line input {
  width: 18px;
  min-height: 18px;
}

.checkbox-line span {
  color: #344054;
  font-weight: 850;
}

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

/* Professional density pass: tighter, calmer operational UI. */
body {
  font-size: 14px;
  line-height: 1.42;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.topbar {
  min-height: 56px;
  gap: 14px;
  padding: 0 22px;
}

.brand {
  gap: 9px;
  font-size: 14px;
  font-weight: 760;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 850;
}

.main-nav a {
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 720;
}

.role-pill {
  padding: 4px 8px;
  font-size: 11px;
}

.user-name {
  font-size: 13px;
}

.ghost-button,
.primary-button,
.secondary-button,
.tiny-button,
.close-button,
.icon-text-button {
  border-radius: 7px;
  font-size: 13px;
  font-weight: 720;
}

.primary-button,
.secondary-button {
  min-height: 40px;
  padding: 9px 14px;
}

.ghost-button {
  padding: 7px 11px;
}

.primary-link-button {
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 760;
}

label {
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
}

input,
select {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 560;
}

.workspace,
.action-workspace {
  width: min(1380px, calc(100vw - 32px));
  margin-top: 18px;
  gap: 14px;
}

.page-heading h1 {
  margin-top: 2px;
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 760;
}

.eyebrow {
  font-size: 10px;
  font-weight: 800;
}

.metric,
.panel {
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.06);
}

.metric {
  padding: 13px;
}

.metric span {
  font-size: 12px;
  font-weight: 680;
}

.metric strong {
  font-size: 22px;
  font-weight: 760;
}

.panel {
  padding: 15px;
}

.panel h1,
.panel h2 {
  font-size: 20px;
  font-weight: 760;
}

.bettor-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.bettor-control-card {
  min-height: 210px;
  gap: 11px;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.07);
}

.bettor-control-card:hover,
.bettor-control-card:focus {
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.11);
}

.bettor-control-card h2 {
  font-size: 19px;
  font-weight: 760;
}

.bettor-control-card p {
  font-size: 12px;
}

.live-badge {
  min-height: 24px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 740;
}

.icon-text-button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.action-summary {
  min-height: 92px;
  gap: 4px;
  padding: 11px;
}

.action-summary span {
  font-size: 10px;
  font-weight: 760;
}

.action-summary strong {
  font-size: 14px;
  font-weight: 760;
}

.action-summary small {
  font-size: 12px;
}

.drawer-backdrop {
  background: rgba(8, 13, 19, 0.56);
}

.drawer-panel {
  width: min(760px, 100vw);
  padding: 18px;
  background: #f8fafc;
}

.drawer-header {
  gap: 12px;
  padding-bottom: 12px;
}

.drawer-header h2 {
  margin-top: 2px;
  font-size: 24px;
  font-weight: 760;
}

.drawer-header p {
  margin-top: 3px;
  font-size: 13px;
}

.close-button {
  min-height: 34px;
  padding: 0 11px;
}

.link-loader {
  align-items: end;
  gap: 10px;
  margin-top: 14px;
}

.link-loader .secondary-button {
  width: 132px;
}

.event-focus {
  min-height: 60px;
  gap: 10px;
  margin-top: 11px;
  padding: 10px;
  font-weight: 640;
}

.event-focus img {
  width: 42px;
  height: 42px;
}

.event-focus strong {
  font-size: 15px;
  font-weight: 760;
}

.event-focus span,
.event-focus small {
  font-size: 11px;
}

.drawer-section {
  margin-top: 13px;
}

.drawer-section h3,
.execution-form h3 {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
}

.selected-action {
  margin-top: 0;
  padding: 10px;
  font-weight: 680;
}

.selected-action-grid {
  gap: 9px;
}

.selected-action-grid span {
  font-size: 10px;
}

.selected-action-grid strong {
  font-size: 13px;
  font-weight: 740;
}

.market-results {
  gap: 9px;
  margin-top: 0;
}

.market-card {
  padding: 10px;
}

.market-card h3,
.market-card-title h3 {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 760;
}

.market-card-title span {
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 740;
}

.outcome-grid {
  gap: 8px;
}

.event-button,
.outcome-button {
  min-height: 44px;
  padding: 9px 10px;
  border-radius: 7px;
}

.odds-button {
  min-height: 64px;
  gap: 3px;
}

.odds-button span {
  font-size: 11px;
  font-weight: 760;
}

.odds-button strong {
  font-size: 22px;
  font-weight: 780;
}

.odds-button.quote-unavailable strong {
  font-size: 13px;
}

.odds-button small {
  font-size: 12px;
  font-weight: 650;
}

.outcome-liquidity {
  font-size: 10px;
}

.execution-form {
  bottom: -18px;
  margin: 14px -18px -18px;
  padding: 12px 18px 16px;
}

.form-grid.four {
  gap: 10px;
  margin-top: 0;
}

.execution-form .primary-button.full {
  margin-top: 2px;
}

.quick-buy-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1fr);
  gap: 12px;
  align-items: end;
}

.amount-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.amount-control .tiny-button {
  min-width: 58px;
}

.return-preview {
  min-height: 56px;
  display: grid;
  gap: 2px;
  padding: 9px 11px;
  border: 1px solid #d8e3ec;
  border-radius: 7px;
  background: #fff;
}

.return-preview span,
.return-preview small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.return-preview strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 760;
}

.bettor-header h1 {
  font-size: clamp(22px, 6vw, 34px);
  font-weight: 760;
}

.bettor-market {
  min-height: 150px;
  padding: 15px;
}

.bettor-market h2 {
  font-size: clamp(20px, 5.6vw, 30px);
  line-height: 1.12;
}

.bettor-market p {
  font-size: 14px;
}

.status-dot {
  font-size: 12px;
  font-weight: 760;
}

@media (max-width: 1040px) {
  .metrics-grid,
  .dashboard-grid,
  .dashboard-grid.lower,
  .admin-grid,
  .account-connection-grid {
    grid-template-columns: 1fr;
  }

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

  .account-dashboard-metrics {
    grid-template-columns: 1fr;
  }

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

  .link-loader {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

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

  .main-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .topbar-right {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .workspace {
    width: calc(100vw - 20px);
    margin-top: 10px;
  }

  .metrics-grid,
  .account-overview,
  .form-grid.two,
  .form-grid.three,
  .form-grid.four,
  .credential-choice-grid,
  .manual-credentials,
  .account-facts,
  .outcome-grid {
    grid-template-columns: 1fr;
  }

  .span-two {
    grid-column: span 1;
  }

  .checkbox-line {
    grid-column: span 1;
  }

  .panel {
    padding: 14px;
  }

  .table-wrap {
    overflow: visible;
  }

  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap th,
  .table-wrap td {
    display: block;
    width: 100%;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap table {
    border-collapse: separate;
    border-spacing: 0;
  }

  .table-wrap tbody {
    display: grid;
    gap: 10px;
  }

  .table-wrap tr {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .table-wrap td {
    display: grid;
    grid-template-columns: minmax(94px, 0.42fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 8px 0;
    border-bottom: 1px solid #edf1f5;
    white-space: normal;
    word-break: break-word;
  }

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

  .table-wrap td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .table-wrap td[colspan] {
    display: block;
  }

  .table-wrap td[colspan]::before {
    content: "";
  }

  .action-button {
    min-height: 310px;
  }

  .bettor-card-grid {
    grid-template-columns: 1fr;
  }

  .drawer-panel {
    width: 100vw;
    padding: 16px;
  }

  .drawer-header {
    align-items: stretch;
    flex-direction: column;
  }

  .drawer-actions {
    justify-content: space-between;
  }

  .execution-form {
    margin: 16px -16px -16px;
    padding: 14px 16px 16px;
  }
}
