:root {
  --bg: #06111f;
  --surface: #0d1f31;
  --surface-alt: #0a1929;
  --ink: #dbeafe;
  --muted: #8aa4bd;
  --line: #1c3852;
  --line-strong: #315776;
  --nav: #081522;
  --nav-muted: #7894ae;
  --accent: #2f7dff;
  --accent-soft: #102f55;
  --success: #22c55e;
  --success-soft: #123522;
  --warning: #f59e0b;
  --warning-soft: #36270f;
  --danger: #ef4444;
  --danger-soft: #3a171d;
  --blue: #18d4ff;
  --blue-soft: #0d3346;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

/* Foundation 1.121: bounded realtime order monitoring */
.order-monitor-workspace { min-width: 0; }
.order-product-tabs {
  min-width: 0;
  margin: 0 0 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--line);
  gap: 1px;
}
.order-product-tabs button {
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: var(--surface-alt);
  color: var(--muted);
  font-weight: 750;
}
.order-product-tabs button:hover { color: var(--ink); }
.order-product-tabs button.active {
  background: var(--accent-soft);
  color: var(--blue);
  box-shadow: inset 0 -3px 0 var(--blue);
}
.order-product-tabs .lucide-icon { width: 16px; height: 16px; }
.order-monitor-status-strip {
  min-width: 0;
  min-height: 58px;
  margin: 0 0 10px;
  padding: 7px 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.order-monitor-status-facts { min-width: 0; display: flex; align-items: stretch; overflow-x: auto; }
.order-monitor-status-fact {
  min-width: 116px;
  padding: 3px 11px;
  display: grid;
  gap: 3px;
  border-right: 1px solid var(--line);
}
.order-monitor-status-fact:first-child { padding-left: 3px; }
.order-monitor-status-fact:last-child { border-right: 0; }
.order-monitor-status-fact small { color: var(--muted); font-size: 9px; }
.order-monitor-status-fact strong { color: var(--ink); font-size: 12px; white-space: nowrap; }
.order-monitor-refresh-state {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.order-monitor-refresh-state .lucide-icon { width: 13px; height: 13px; color: var(--success); }
.order-monitor-refresh-state time { color: var(--ink); font-variant-numeric: tabular-nums; }
.order-monitor-mode-actions { display: flex; align-items: center; gap: 6px; }
.order-monitor-freshness {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  margin: 0 0 14px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 13px;
  overflow-x: auto;
  white-space: nowrap;
}
.order-monitor-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(130px, 1fr)) auto;
  align-items: end;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.order-monitor-filters .field { min-width: 0; margin: 0; }
.order-monitor-filters .btn { min-height: 40px; }
.order-monitor-toolbar { min-height: 44px; margin-bottom: 12px; }
.order-monitor-stack { min-width: 0; }
.order-monitor-table { table-layout: fixed; min-width: 1280px; }
.order-monitor-current-table { min-width: 1120px; }
.order-monitor-summary-table { min-width: 1320px; }
.order-monitor-order-table { min-width: 1760px; }
.order-monitor-anomaly-table { min-width: 1540px; }
.order-monitor-table th,
.order-monitor-table td { vertical-align: top; overflow-wrap: anywhere; }
.order-monitor-table td.number { white-space: nowrap; }
.order-monitor-table .primary-cell { min-width: 0; }
.order-monitor-table .table-actions { flex-wrap: wrap; min-width: 118px; }
.live-order-list { min-width: 0; display: grid; }
.live-order-row {
  min-width: 0;
  min-height: 64px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 138px 158px minmax(240px, 1fr) 146px 126px 92px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.live-order-row:last-child { border-bottom: 0; }
.live-order-row:hover { background: var(--surface-alt); }
.live-order-time,
.live-order-member,
.live-order-selection,
.live-order-metric { min-width: 0; display: grid; gap: 3px; }
.live-order-time { align-items: start; }
.live-order-time .badge { width: fit-content; }
.live-order-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-order-row span,
.live-order-row small { min-width: 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.live-order-metric strong { color: var(--blue); font-variant-numeric: tabular-nums; }
.live-order-actions { display: flex; justify-content: flex-end; }
.live-order-empty { min-height: 170px; }
.racing-event-monitor { display: grid; gap: 0; }
.racing-event-table-wrap { margin: 0; overflow-x: auto; overscroll-behavior-x: contain; }
.racing-event-table { width: 100%; min-width: 1160px; border-collapse: collapse; table-layout: fixed; }
.racing-event-table th,
.racing-event-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.racing-event-table th { color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.racing-event-table td { color: var(--ink); font-size: 10px; }
.racing-event-table th:nth-child(1) { width: 210px; }
.racing-event-table th:nth-child(2) { width: 134px; }
.racing-event-table th:nth-child(3) { width: 220px; }
.racing-event-table th:nth-child(4) { width: 118px; }
.racing-event-table th:nth-child(5),
.racing-event-table th:nth-child(6),
.racing-event-table th:nth-child(7),
.racing-event-table th:nth-child(8) { width: 118px; }
.racing-event-table th:nth-child(9) { width: 148px; }
.racing-event-table tbody tr:hover { background: var(--surface-alt); }
.racing-event-table tbody tr.selected { background: var(--accent-soft); outline: 1px solid var(--blue); outline-offset: -1px; }
.racing-event-table .number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.racing-event-table .strong-number { color: var(--blue); font-weight: 800; }
.racing-event-select { width: 100%; display: grid; gap: 3px; text-align: left; }
.racing-event-select strong,
.racing-event-select span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.racing-event-select span { color: var(--muted); font-size: 9px; }
.racing-wager-list { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.racing-event-detail { min-width: 0; padding: 14px 12px 4px; border-top: 1px solid var(--line-strong); background: var(--surface-alt); }
.racing-event-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.racing-event-detail-head h3 { margin: 0 0 3px; color: var(--ink); font-size: 15px; }
.racing-event-detail-head p { margin: 0; color: var(--muted); font-size: 10px; }
.racing-wager-tabs { min-width: 0; display: flex; align-items: stretch; overflow-x: auto; border: 1px solid var(--line); background: var(--line); gap: 1px; }
.racing-wager-tabs button { min-width: 118px; min-height: 46px; padding: 6px 10px; display: grid; place-content: center; gap: 2px; border: 0; background: var(--surface); color: var(--muted); text-align: center; }
.racing-wager-tabs button strong { color: inherit; font-size: 11px; }
.racing-wager-tabs button span { font-size: 9px; font-variant-numeric: tabular-nums; }
.racing-wager-tabs button:hover { color: var(--ink); background: var(--surface-alt); }
.racing-wager-tabs button.active { background: var(--accent-soft); color: var(--blue); box-shadow: inset 0 -3px 0 var(--blue); }
.racing-wager-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); border-top: 0; }
.racing-wager-summary > span { min-width: 0; padding: 8px 10px; display: grid; gap: 3px; border-right: 1px solid var(--line); }
.racing-wager-summary > span:last-child { border-right: 0; }
.racing-wager-summary small { color: var(--muted); font-size: 9px; }
.racing-wager-summary strong { overflow: hidden; color: var(--ink); font-size: 11px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.racing-market-table { min-width: 1040px; }
.racing-personal-order-table { min-width: 1320px; }
.racing-personal-orders > .racing-event-detail-head { padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.order-monitor-detail-modal { width: min(1240px, calc(100vw - 36px)); max-height: calc(100vh - 28px); }
.order-monitor-detail-head p { margin-top: 4px; color: var(--muted); }
.order-monitor-detail-body { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 20px 20px; overflow: auto; }
.order-monitor-detail-section { min-width: 0; padding: 18px 0; border-bottom: 1px solid var(--line); }
.order-monitor-detail-section:last-child { border-bottom: 0; }
.order-monitor-detail-section h3 { margin: 0 0 12px; font-size: 15px; }
.order-monitor-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: #fff;
}
.order-monitor-detail-grid .member-detail-fact { min-height: 86px; padding: 13px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.order-monitor-detail-grid .member-detail-fact:nth-child(3n) { border-right: 0; }
.order-monitor-detail-grid .member-detail-fact:nth-last-child(-n + 3) { border-bottom: 0; }
.order-monitor-detail-section .table-wrap { max-width: 100%; margin: 0; overflow-x: auto; }

@media (max-width: 1180px) {
  .order-monitor-status-strip { grid-template-columns: minmax(0, 1fr) auto; }
  .order-monitor-mode-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .order-monitor-filters { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .order-monitor-filters .field:first-child { grid-column: span 2; }
  .order-monitor-filters .btn { width: 100%; }
  .live-order-row { grid-template-columns: 132px 150px minmax(220px, 1fr) 140px 92px; }
  .live-order-row .live-order-metric:nth-of-type(5) { display: none; }
  .racing-wager-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .racing-wager-summary > span:nth-child(3) { border-right: 0; }
  .racing-wager-summary > span:nth-child(-n + 3) { border-bottom: 1px solid var(--line); }
  .order-monitor-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-monitor-detail-grid .member-detail-fact,
  .order-monitor-detail-grid .member-detail-fact:nth-child(3n) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .order-monitor-detail-grid .member-detail-fact:nth-child(2n) { border-right: 0; }
  .order-monitor-detail-grid .member-detail-fact:nth-last-child(-n + 2) { border-bottom: 0; }
}

@media (max-width: 640px) {
  .order-product-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-product-tabs button { min-height: 40px; padding: 0 7px; font-size: 10px; }
  .order-monitor-status-strip { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .order-monitor-status-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
  .order-monitor-status-fact { min-width: 0; padding: 3px 6px; }
  .order-monitor-status-fact:first-child { padding-left: 6px; }
  .order-monitor-status-fact small,
  .order-monitor-status-fact strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .order-monitor-status-fact strong { font-size: 11px; }
  .order-monitor-refresh-state { justify-content: space-between; }
  .order-monitor-mode-actions { grid-column: auto; }
  .order-monitor-mode-actions .btn { flex: 1; }
  .order-monitor-freshness {
    flex-wrap: wrap;
    margin-left: -2px;
    margin-right: -2px;
    overflow-x: visible;
    white-space: normal;
  }
  .order-monitor-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .order-monitor-filters .field:first-child { grid-column: 1 / -1; }
  .order-monitor-filters .btn { width: 100%; }
  .order-monitor-toolbar .agent-view-segment { width: max-content; min-width: 100%; overflow-x: auto; }
  .live-order-row {
    padding: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 10px;
  }
  .live-order-time { grid-column: 1; grid-row: 1; }
  .live-order-actions { grid-column: 2; grid-row: 1; }
  .live-order-member,
  .live-order-selection { grid-column: 1 / -1; }
  .live-order-metric { grid-column: auto; }
  .live-order-row .live-order-metric:nth-of-type(5) { display: grid; text-align: right; }
  .racing-event-detail { padding: 12px 8px 3px; }
  .racing-event-detail-head { align-items: stretch; flex-direction: column; gap: 8px; }
  .racing-event-detail-head .btn { width: 100%; }
  .racing-wager-tabs button { min-width: 104px; }
  .racing-wager-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .racing-wager-summary > span,
  .racing-wager-summary > span:nth-child(3) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .racing-wager-summary > span:nth-child(2n) { border-right: 0; }
  .racing-wager-summary > span:nth-last-child(-n + 2) { border-bottom: 0; }
  .order-monitor-detail-modal { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
  .order-monitor-detail-body { width: 100%; min-width: 0; padding: 0 12px 16px; overflow-x: hidden; }
  .order-monitor-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .order-monitor-detail-grid .member-detail-fact,
  .order-monitor-detail-grid .member-detail-fact:nth-child(2n),
  .order-monitor-detail-grid .member-detail-fact:nth-child(3n) { border-right: 0; border-bottom: 1px solid var(--line); }
  .order-monitor-detail-grid .member-detail-fact:last-child { border-bottom: 0; }
}

/* Foundation 1.122: Provider operations monitor */
.provider-monitor-workspace { min-width: 0; }
.provider-monitor-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(6, minmax(130px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.provider-monitor-filters .field { min-width: 0; margin: 0; }
.provider-monitor-filters .btn { min-height: 40px; }
.provider-monitor-toolbar { min-height: 44px; margin-bottom: 12px; }
.provider-monitor-stack { min-width: 0; }
.provider-monitor-table { table-layout: fixed; min-width: 1320px; }
.provider-monitor-failure-table { min-width: 1560px; }
.provider-monitor-balance-table { min-width: 1500px; }
.provider-monitor-launch-table { min-width: 1540px; }
.provider-monitor-insurance-table { min-width: 1480px; }
.provider-monitor-alert-table { min-width: 1500px; }
.provider-monitor-table th,
.provider-monitor-table td { vertical-align: top; overflow-wrap: anywhere; }
.provider-monitor-table td.number { white-space: nowrap; }
.provider-monitor-table .primary-cell { min-width: 0; }
.provider-monitor-table .table-actions { min-width: 112px; flex-wrap: wrap; }
.provider-monitor-failure-table th:last-child,
.provider-monitor-failure-table td:last-child,
.provider-monitor-alert-table th:last-child,
.provider-monitor-alert-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  background: var(--surface);
  box-shadow: -8px 0 10px -10px rgba(23, 33, 38, 0.35);
}
.provider-monitor-failure-table th:last-child,
.provider-monitor-alert-table th:last-child { z-index: 2; }

@media (max-width: 1360px) {
  .provider-monitor-filters { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
  .provider-monitor-filters .field:first-child { grid-column: span 2; }
}

@media (max-width: 640px) {
  .provider-monitor-workspace > .section-head { align-items: stretch; flex-direction: column; }
  .provider-monitor-workspace > .section-head .section-actions,
  .provider-monitor-workspace > .section-head .btn.icon { width: 100%; }
  .provider-monitor-workspace .panel { min-width: 0; max-width: 100%; overflow: hidden; }
  .provider-monitor-workspace .table-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
  .provider-monitor-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .provider-monitor-filters .field:first-child { grid-column: 1 / -1; }
  .provider-monitor-filters .btn { width: 100%; }
  .provider-monitor-toolbar .agent-view-segment { width: max-content; min-width: 100%; overflow-x: auto; }
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { min-width: 320px; background: var(--bg); font-size: 14px; letter-spacing: 0; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
a { color: inherit; }

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--muted);
}
.boot-screen strong { color: var(--ink); font-size: 17px; }
.boot-screen p { margin: 0; }

.brand-mark { display: grid; grid-template-columns: repeat(3, 5px); align-items: end; gap: 3px; width: 21px; height: 22px; }
.brand-mark span { display: block; background: #36b1a2; border-radius: 1px; }
.brand-mark span:nth-child(1) { height: 10px; }
.brand-mark span:nth-child(2) { height: 21px; background: #e3a534; }
.brand-mark span:nth-child(3) { height: 15px; background: #df6757; }

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(520px, 1.4fr);
  background: var(--surface);
}
.login-brand {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: clamp(34px, 5vw, 74px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #f5faf9;
  background: #17282d;
}
.login-brand::after {
  content: "";
  position: absolute;
  inset: auto -12% 15% 16%;
  height: 1px;
  background: rgba(255,255,255,0.15);
  box-shadow: 0 -54px 0 rgba(255,255,255,0.08), 0 54px 0 rgba(255,255,255,0.08), 0 108px 0 rgba(255,255,255,0.05);
  transform: rotate(-8deg);
}
.brand-lockup { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.brand-lockup strong { font-size: 15px; }
.brand-lockup small { color: #95a9ad; }
.login-signal { position: relative; z-index: 1; max-width: 460px; }
.login-signal h1 { margin: 0 0 18px; font-size: 46px; line-height: 1.08; font-weight: 680; letter-spacing: 0; }
.login-signal p { margin: 0; color: #aebfc2; font-size: 16px; line-height: 1.75; }
.signal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 34px; }
.signal-cell { padding: 14px 12px; border: 1px solid rgba(255,255,255,0.13); background: rgba(255,255,255,0.04); border-radius: 4px; }
.signal-cell b { display: block; font-size: 18px; }
.signal-cell span { display: block; margin-top: 5px; color: #93a9ad; font-size: 12px; }
.login-foot { position: relative; z-index: 1; color: #7f979b; font-size: 12px; }

.login-main { min-height: 100vh; display: grid; place-items: center; padding: 44px; background: #f7f9f8; }
.login-panel { width: min(420px, 100%); }
.login-panel .eyebrow { margin-bottom: 10px; color: var(--accent); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.login-panel h2 { margin: 0; font-size: 28px; font-weight: 650; }
.login-panel > p { margin: 10px 0 28px; color: var(--muted); line-height: 1.6; }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { color: #45545a; font-size: 13px; font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-submit { width: 100%; min-height: 44px; margin-top: 4px; }
.login-register { width: 100%; min-height: 42px; margin-top: 8px; border-color: var(--accent); color: var(--accent); background: transparent; }
.login-register:hover { background: var(--accent-soft); }
.login-security-notice { margin: 0 0 12px; padding: 9px 11px; border-left: 3px solid var(--warning); background: #fff9e8; color: #66551e; font-size: 11px; line-height: 1.55; }
.demo-accounts { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.demo-accounts > span { display: block; margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.account-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.account-button { min-height: 38px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: #3f4d53; }
.account-button:hover { border-color: var(--accent); color: var(--accent); }
.login-error { min-height: 20px; margin-top: 12px; color: var(--danger); font-size: 13px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; z-index: 20; height: 100vh; display: flex; flex-direction: column; background: var(--nav); color: #eef4f3; }
.sidebar-brand { height: 72px; display: flex; align-items: center; gap: 11px; padding: 0 20px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-brand strong { display: block; font-size: 14px; }
.sidebar-brand small { display: block; margin-top: 2px; color: var(--nav-muted); font-size: 10px; }
.role-chip { margin: 18px 16px 10px; padding: 10px 11px; border: 1px solid rgba(255,255,255,0.1); border-radius: 5px; color: #bdd0d2; background: rgba(255,255,255,0.035); font-size: 12px; }
.role-chip b { display: block; color: #ffffff; font-size: 13px; margin-bottom: 2px; }
.nav-list { display: grid; gap: 4px; padding: 7px 10px; }
.nav-button { position: relative; min-height: 42px; padding: 0 12px 0 34px; border: 0; border-radius: 5px; text-align: left; color: #aec0c3; background: transparent; }
.nav-button::before { content: ""; position: absolute; left: 13px; top: 50%; width: 7px; height: 7px; margin-top: -4px; border: 1px solid currentColor; border-radius: 2px; }
.nav-button:hover { color: #ffffff; background: rgba(255,255,255,0.06); }
.nav-button.active { color: #ffffff; background: rgba(57, 183, 166, 0.14); }
.nav-button.active::before { border-color: #45c5b4; background: #45c5b4; }
.sidebar-meta { margin-top: auto; padding: 16px 18px 20px; border-top: 1px solid rgba(255,255,255,0.08); color: #799095; font-size: 11px; line-height: 1.6; }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 15; height: 72px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.96); }
.page-heading { min-width: 0; }
.page-heading h1 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 19px; font-weight: 650; }
.page-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.live-indicator { display: inline-flex; align-items: center; gap: 6px; margin-right: 5px; color: var(--muted); font-size: 12px; }
.live-indicator::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.content { width: min(1540px, 100%); margin: 0 auto; padding: 24px 28px 42px; }

.btn { min-height: 36px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); color: #354349; font-weight: 600; }
.btn:hover { border-color: #9ba9a7; background: var(--surface-alt); }
.btn.primary { border-color: var(--accent); background: var(--accent); color: white; }
.btn.primary:hover { background: #075e59; }
.btn.danger { border-color: #d8938c; color: var(--danger); background: var(--danger-soft); }
.btn.success { border-color: #82bda5; color: #176a49; background: var(--success-soft); }
.btn.warning { border-color: #e2b46f; color: #965700; background: var(--warning-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.icon { width: 36px; padding: 0; font-size: 18px; line-height: 1; }
.btn.small { min-height: 30px; padding: 0 9px; font-size: 12px; }

.section-head { min-height: 38px; margin: 0 0 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.section-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.section-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.section-head .section-actions { display: flex; gap: 7px; }
.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 10px; margin-bottom: 20px; }
.kpi { min-height: 104px; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.kpi-label { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.kpi-value { margin-top: 13px; font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; font-weight: 680; }
.kpi-note { margin-top: 9px; color: var(--muted); font-size: 11px; }
.kpi-tone { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.kpi-tone.green { background: var(--success); }
.kpi-tone.amber { background: #d59020; }
.kpi-tone.red { background: var(--danger); }
.kpi-tone.blue { background: var(--blue); }

.panel { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.panel + .panel { margin-top: 14px; }
.panel-header { min-height: 51px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 0; font-size: 14px; }
.panel-header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.panel-body { padding: 15px; }
.panel-body > .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 0; }
.split-grid { min-width: 0; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr); gap: 14px; margin-bottom: 20px; }
.equal-grid { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.split-grid > *, .equal-grid > * { min-width: 0; }

.table-wrap { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { position: sticky; top: 0; z-index: 2; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--muted); background: #f7f9f8; text-align: left; font-weight: 600; white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid #edf0ef; color: #354248; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafcfb; }
.table-row-clickable { cursor: pointer; }
.table-row-clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.number { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; white-space: nowrap; }
.primary-cell { color: var(--ink); font-weight: 650; }
.sub-cell { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.table-sort-button { width: 100%; min-height: 24px; padding: 0; display: inline-flex; align-items: center; justify-content: flex-start; gap: 6px; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; text-align: inherit; cursor: pointer; }
.number .table-sort-button { justify-content: flex-end; }
.table-sort-button:hover { color: var(--accent); }
.table-sort-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.table-sort-icon { width: 12px; color: #78888d; font-size: 11px; text-align: center; }
.member-list-table { min-width: 1180px; table-layout: auto; }
.member-list-table .member-sticky-col { position: sticky; z-index: 3; background: #ffffff; }
.member-list-table th.member-sticky-col { z-index: 5; background: #f7f9f8; }
.member-list-table .member-sticky-col-1 { left: 0; width: 180px; min-width: 180px; box-shadow: 1px 0 0 var(--line); }
.member-list-table tbody tr:hover .member-sticky-col { background: #fafcfb; }
.empty-state { min-height: 180px; display: grid; place-content: center; justify-items: center; color: var(--muted); }
.empty-state strong { margin-bottom: 5px; color: #45535a; }

.badge { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border-radius: 4px; background: #edf1f1; color: #58666c; font-size: 11px; font-weight: 650; white-space: nowrap; }
.badge.success { color: #176a49; background: var(--success-soft); }
.badge.warning { color: #965700; background: var(--warning-soft); }
.badge.danger { color: #a2392f; background: var(--danger-soft); }
.badge.blue { color: #245682; background: var(--blue-soft); }

.provider-list { display: grid; }
.provider-row { min-height: 55px; display: grid; grid-template-columns: minmax(110px, 1fr) 84px 72px; align-items: center; gap: 8px; border-bottom: 1px solid #edf0ef; }
.provider-row:last-child { border-bottom: 0; }
.provider-name { font-weight: 650; }
.provider-name small { display: block; margin-top: 3px; color: var(--muted); font-weight: 400; }
.provider-metric { color: var(--muted); text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; }

.risk-list { display: grid; gap: 9px; }
.risk-row { padding: 4px 0 13px; border-bottom: 1px solid var(--line); }
.risk-row:last-child { padding-bottom: 4px; border-bottom: 0; }
.risk-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.risk-name { min-width: 0; }
.risk-name b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.risk-name span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.risk-value { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 650; }
.progress { height: 7px; margin-top: 10px; overflow: hidden; border-radius: 3px; background: #edf1f0; }
.progress > span { display: block; height: 100%; background: var(--success); }
.progress > span.warn { background: #d59020; }
.progress > span.danger { background: var(--danger); }

.chart-area { height: 158px; display: flex; align-items: end; gap: 8px; padding: 20px 4px 8px; border-bottom: 1px solid var(--line); }
.chart-bar { flex: 1; min-width: 8px; max-width: 42px; position: relative; border-radius: 2px 2px 0 0; background: #65a69e; }
.chart-bar:nth-child(3n) { background: #d9a34a; }
.chart-bar:hover::after { content: attr(data-value); position: absolute; bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%); padding: 3px 5px; border-radius: 3px; color: white; background: #27383d; font-size: 10px; white-space: nowrap; }
.chart-legend { display: flex; justify-content: space-between; margin-top: 9px; color: var(--muted); font-size: 10px; }

.event-grid { display: grid; gap: 12px; }
.event-row { display: grid; grid-template-columns: minmax(210px, 1fr) 120px 210px 188px; align-items: center; gap: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.event-title b { display: block; font-size: 14px; }
.event-title span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.event-time { color: var(--muted); font-size: 11px; }
.event-actions { display: flex; justify-content: flex-end; gap: 6px; }

.approval-list { display: grid; gap: 10px; }
.approval-row { display: grid; grid-template-columns: minmax(220px, 1fr) 120px 100px 180px; align-items: center; gap: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.approval-row h3 { margin: 0; font-size: 14px; }
.approval-row p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.approval-actions { display: flex; justify-content: flex-end; gap: 7px; }

.capacity-banner { margin-bottom: 14px; padding: 16px; display: grid; grid-template-columns: minmax(200px, 1fr) auto; align-items: center; gap: 18px; border-left: 4px solid var(--warning); background: #fffaf0; }
.capacity-banner h2 { margin: 0; font-size: 14px; }
.capacity-banner p { margin: 5px 0 0; color: #76664c; font-size: 12px; line-height: 1.55; }
.capacity-metrics { display: grid; grid-template-columns: repeat(5, minmax(100px, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.capacity-metric { min-height: 82px; padding: 14px; background: var(--surface); }
.capacity-metric span { display: block; color: var(--muted); font-size: 11px; }
.capacity-metric b { display: block; margin-top: 10px; font-size: 20px; font-variant-numeric: tabular-nums; }

.member-admin-loading { min-height: 280px; display: grid; place-content: center; justify-items: center; color: var(--muted); }
.member-admin-loading strong { color: var(--ink); font-size: 15px; }
.member-admin-loading span { margin-top: 7px; font-size: 12px; }
.member-filter-bar {
  margin-bottom: 14px;
  padding: 13px;
  display: grid;
  grid-template-columns: minmax(210px, 1.6fr) repeat(6, minmax(118px, 1fr)) auto;
  align-items: end;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.member-filter-field { min-width: 0; display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 650; }
.member-filter-field input,
.member-filter-field select { width: 100%; min-width: 0; height: 36px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 4px; outline: none; background: var(--surface); color: var(--ink); font-size: 12px; }
.member-filter-field input:focus,
.member-filter-field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.member-sort-field { min-width: 156px; }
.member-filter-actions { display: flex; gap: 6px; }
.work-center-filters { grid-template-columns: minmax(240px, 1.7fr) repeat(3, minmax(130px, 1fr)) auto; }
.work-center-batch-bar { min-height: 52px; margin: -1px 0 12px; padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); background: #f8faf9; }
.work-center-select-all { display: inline-flex; align-items: center; gap: 8px; color: #45545a; font-size: 11px; font-weight: 700; }
.work-center-select-all input,
.work-item-checkbox { width: 16px; height: 16px; accent-color: var(--accent); }
.work-center-batch-actions,
.work-item-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.work-async-progress { width: 180px; min-width: 140px; color: var(--muted); font-size: 10px; }
.work-async-progress .progress { margin-top: 5px; }
.work-async-error { margin: 0; padding: 9px 11px; border-left: 3px solid var(--danger); background: #fff5f3; color: #8f3026; font-size: 11px; }
.work-async-modal .modal-body { max-height: min(68vh, 720px); overflow: auto; }
.search-spotlight { min-height: 54px; margin-bottom: 14px; padding: 8px 10px 8px 14px; display: flex; align-items: center; gap: 12px; border: 1px solid #b7cfd0; border-left: 4px solid var(--blue); background: #f2f7fb; }
.search-spotlight > div { min-width: 0; flex: 1; }
.search-spotlight b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.search-spotlight span:not(.badge) { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.member-identity-cell { min-width: 150px; }
.member-channel-col { width: 132px; min-width: 132px; max-width: 132px; }
.member-nickname-cell {
  min-width: 116px;
  max-width: 180px;
  padding: 2px 3px;
  display: grid;
  justify-items: start;
  gap: 2px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.member-nickname-cell > b { max-width: 172px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.member-nickname-cell:hover > b,
.member-nickname-cell:focus-visible > b { color: var(--accent); }
.member-nickname-cell .member-tag-strip { max-width: 170px; margin-top: 2px; overflow: hidden; flex-wrap: nowrap; }
.member-channel-compact {
  width: 100%;
  min-width: 0;
  min-height: 31px;
  padding: 3px 5px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1px 5px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.member-channel-compact:hover,
.member-channel-compact:focus-visible { border-color: var(--line-strong); background: var(--accent-soft); outline: none; }
.member-channel-compact > span { grid-column: 1 / -1; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.member-channel-compact > b { max-width: 82px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.member-channel-compact > small { color: var(--muted); font-size: 8px; white-space: nowrap; }
.member-hover-preview {
  position: fixed;
  z-index: 81;
  width: min(520px, calc(100vw - 16px));
  max-height: min(560px, calc(100dvh - 16px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--accent);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 0 18px 54px rgba(0, 0, 0, .32);
}
.member-hover-preview-head { min-height: 48px; padding: 8px 10px; display: grid; align-content: center; gap: 3px; border-bottom: 1px solid var(--line); background: var(--surface-alt); }
.member-hover-preview-head b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.member-hover-preview-head span { color: var(--muted); font-size: 8px; }
.member-channel-preview-list,
.member-note-preview-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.member-channel-preview-row { width: 100%; min-height: 48px; padding: 6px 9px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 12px; align-items: center; gap: 8px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit; text-align: left; cursor: pointer; }
.member-channel-preview-row:hover { background: var(--accent-soft); }
.member-channel-preview-row > b { color: var(--muted); }
.member-note-preview-item { padding: 9px 11px; border-bottom: 1px solid var(--line); }
.member-note-preview-item > div { color: var(--muted); font-size: 8px; }
.member-note-preview-item p { margin: 5px 0 0; color: var(--ink); font-size: 10px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.member-note-preview-loading,
.member-note-preview-error { min-height: 76px; padding: 16px; display: grid; place-items: center; color: var(--muted); font-size: 10px; text-align: center; }
.member-note-preview-error { color: var(--danger); }
.member-channel-path { max-width: 360px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.member-channel-separator { color: #96a2a5; font-size: 11px; }
.member-channel-link { min-width: 0; padding: 2px 3px; display: inline-grid; gap: 1px; border: 0; border-radius: 3px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.member-channel-link:hover { background: var(--accent-soft); color: var(--accent); }
.member-channel-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.member-channel-level { min-width: 24px; height: 17px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 3px; background: var(--accent-soft); color: var(--accent); font-size: 8px; font-weight: 800; line-height: 1; }
.member-channel-link b { overflow: hidden; max-width: 112px; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.member-channel-link small { overflow: hidden; max-width: 112px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.member-tag-strip { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px; }
.member-tag { --tag-color: #66747b; min-height: 19px; padding: 2px 6px; display: inline-flex; align-items: center; border: 1px solid color-mix(in srgb, var(--tag-color) 52%, white); border-left: 3px solid var(--tag-color); border-radius: 3px; background: color-mix(in srgb, var(--tag-color) 8%, white); color: #455258; font-size: 9px; font-weight: 700; white-space: nowrap; }
.member-badge-pair, .member-rule-access { display: flex; flex-wrap: wrap; gap: 4px; }
.member-account-state { min-width: 74px; display: grid; gap: 5px; justify-items: start; }
.member-account-state > span:last-child { position: relative; padding-left: 11px; color: var(--muted); font-size: 10px; }
.member-account-state > span:last-child::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #9aa6a4; }
.member-account-state > span.online:last-child::before { background: var(--success); box-shadow: 0 0 0 2px var(--success-soft); }
.member-pagination { min-height: 52px; padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.member-pagination > div { display: flex; align-items: center; gap: 7px; }
.member-page-index { min-width: 48px; text-align: center; color: #46545a; font-variant-numeric: tabular-nums; }

.member-detail-backdrop { padding: 18px; }
.modal.member-detail-modal { width: min(1120px, 100%); max-height: 92vh; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; overflow: hidden; }
.member-detail-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.member-detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: #f7f9f8; }
.member-detail-summary .member-detail-fact { min-height: 82px; padding: 14px 16px; border-right: 1px solid var(--line); }
.member-detail-summary .member-detail-fact:last-child { border-right: 0; }
.member-detail-tabs { min-height: 44px; display: flex; align-items: stretch; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); background: var(--surface); }
.member-detail-tabs button { min-width: 90px; padding: 0 13px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-size: 11px; font-weight: 650; white-space: nowrap; }
.member-detail-tabs button:hover { color: var(--ink); background: var(--surface-alt); }
.member-detail-tabs button.active { border-bottom-color: var(--accent); color: var(--accent); }
.member-detail-content { min-height: 260px; overflow: auto; background: #f6f8f7; }
.member-detail-section { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.member-detail-section > .panel { min-width: 0; margin-top: 0; }
.member-detail-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.member-detail-fact { min-width: 0; min-height: 78px; padding: 13px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.member-detail-facts .member-detail-fact:nth-child(4n) { border-right: 0; }
.member-detail-facts .member-detail-fact:nth-last-child(-n+4) { border-bottom: 0; }
.member-detail-fact > span { display: block; color: var(--muted); font-size: 10px; }
.member-detail-fact > b { display: block; margin-top: 8px; overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.member-detail-fact > small { display: block; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.member-detail-hierarchy-path { margin-top: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.member-detail-hierarchy-link { min-width: 0; min-height: 25px; padding: 3px 6px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid #23445f; border-radius: 3px; background: #0b2032; color: #cfe2f1; cursor: pointer; }
.member-detail-hierarchy-link:hover { border-color: #2ab9d5; background: #103149; color: #ffffff; }
.member-detail-hierarchy-link b,
.member-detail-hierarchy-link small { max-width: 94px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-detail-hierarchy-link b { font-size: 9px; }
.member-detail-hierarchy-link small { color: #7894ae; font-size: 8px; }
.member-profile-strip { min-height: 72px; padding: 13px 15px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; border: 1px solid var(--line); background: var(--surface); }
.member-profile-strip > div { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.member-profile-strip > div > span:first-child { width: 100%; color: var(--muted); font-size: 10px; }
.member-detail-wallet-grid { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 8px; }
.member-detail-wallet { min-width: 0; min-height: 104px; padding: 13px; border: 1px solid var(--line); border-top: 3px solid var(--accent); background: var(--surface); }
.member-detail-wallet > div { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.member-detail-wallet > strong { display: block; margin-top: 14px; font-size: 19px; font-variant-numeric: tabular-nums; }
.member-detail-wallet > span { display: block; margin-top: 8px; color: var(--muted); font-size: 9px; }
.member-wallet-actions { margin-top: 10px; display: flex; align-items: center; gap: 5px; overflow: visible !important; white-space: normal !important; }
.member-wallet-toolbar { grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 54px; }
.member-wallet-toolbar > span { color: var(--muted); font-size: 10px; }
.member-wallet-operation-page { align-content: start; }
.member-wallet-operation-identity {
  min-height: 54px;
  padding: 8px 11px;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto minmax(260px, 1.2fr);
  align-items: center;
  gap: 8px 12px;
  border: 1px solid #28506b;
  background: #091a2a;
  color: #7894ae;
  font-size: 9px;
}
.member-wallet-operation-identity > div:first-child { color: #8eabc2; font-weight: 700; }
.member-wallet-operation-grid { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(210px, 1fr)); gap: 8px; }
.member-wallet-operation-card { min-width: 0; padding: 10px; display: grid; gap: 10px; border: 1px solid #294b68; border-top: 2px solid #18d4ff; background: #0a1929; }
.member-wallet-operation-card-head { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.member-wallet-operation-balances { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #173149; }
.member-wallet-operation-balances .member-detail-fact { min-height: 59px; padding: 8px; border-bottom: 0; }
.member-wallet-operation-balances .member-detail-fact > b { margin-top: 6px; font-size: 11px; }
.member-wallet-operation-actions { min-height: 34px; display: flex; align-items: center; gap: 6px; }
.member-wallet-operation-actions .btn { flex: 1; min-width: 0; }
.member-wallet-operation-permission { color: #7894ae; font-size: 9px; }
.member-statistics-summary { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.member-detail-actions { flex-wrap: wrap; }

.modal.member-profile-modal { width: min(720px, 100%); max-height: 90vh; overflow: auto; }
.modal.member-comprehensive-modal {
  width: min(1280px, calc(100vw - 28px));
  height: min(900px, calc(100dvh - 28px));
  max-height: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}
.member-comprehensive-modal .modal-head > div:first-child { min-width: 0; }
.member-comprehensive-modal .modal-head h2 { margin: 0; }
.member-comprehensive-modal .modal-head .member-profile-member { margin: 4px 0 0; }
.member-comprehensive-body {
  min-height: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  overflow: hidden;
}
.member-comprehensive-directory {
  min-height: 0;
  padding: 7px;
  display: grid;
  align-content: start;
  gap: 3px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--surface-alt);
}
.member-comprehensive-directory button {
  min-height: 36px;
  padding: 0 9px;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  text-align: left;
}
.member-comprehensive-directory button:hover { border-left-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.member-comprehensive-sections { min-width: 0; min-height: 0; padding: 9px; display: grid; align-content: start; gap: 7px; overflow-y: auto; }
.member-comprehensive-section { min-width: 0; border: 1px solid var(--line); background: var(--surface); scroll-margin-top: 8px; }
.member-comprehensive-section > summary {
  min-height: 48px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface-alt);
  cursor: pointer;
  list-style: none;
}
.member-comprehensive-section > summary::-webkit-details-marker { display: none; }
.member-comprehensive-section > summary span { min-width: 0; display: grid; gap: 3px; }
.member-comprehensive-section > summary b { font-size: 11px; }
.member-comprehensive-section > summary small { color: var(--muted); font-size: 8px; }
.member-comprehensive-section > summary i { color: var(--accent); font-style: normal; transition: transform 120ms ease; }
.member-comprehensive-section[open] > summary i { transform: rotate(180deg); }
.member-comprehensive-section-body { min-width: 0; padding: 10px; border-top: 1px solid var(--line); }
.member-comprehensive-editor,
.member-comprehensive-block { min-width: 0; display: grid; gap: 10px; }
.member-comprehensive-inline-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.member-comprehensive-reason { margin: 0; }
.member-comprehensive-facts { border: 1px solid var(--line); }
.member-comprehensive-facts .member-detail-fact { min-height: 68px; }
.member-comprehensive-modal .member-product-matrix-table { min-width: 920px; }
.member-comprehensive-modal .table-wrap { max-height: 330px; }
.member-comprehensive-rules > h3 { margin: 4px 0 0; font-size: 12px; }
.member-control-profile-summary { margin-right: auto; color: var(--muted); font-size: 9px; }
.member-play-limit-workspace { min-width: 0; display: grid; gap: 7px; }
.member-play-limit-toolbar { min-width: 0; display: grid; grid-template-columns: auto minmax(160px, 1fr) auto; align-items: center; gap: 7px; }
.member-limit-game-tabs { margin: 0; }
.member-limit-game-tabs button { min-width: 76px; }
.member-play-limit-search { width: 100%; min-width: 0; height: 34px; padding: 0 9px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.member-play-limit-table { min-width: 1100px; }
.member-play-rule-intro {
  padding: 9px 10px;
  border-left: 3px solid var(--accent);
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}
.member-play-rule-groups { gap: 6px; }
.member-play-rule-domain { min-width: 0; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.member-play-rule-domain > summary { list-style: none; }
.member-play-rule-domain > summary::-webkit-details-marker { display: none; }
.member-play-rule-domain-summary {
  min-height: 48px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-left: 3px solid var(--accent);
  background: var(--surface-alt);
  cursor: pointer;
}
.member-play-rule-domain-sports .member-play-rule-domain-summary { border-left-color: #e9a22b; }
.member-play-rule-domain-casino .member-play-rule-domain-summary { border-left-color: #9c83e7; }
.member-play-rule-domain-mini .member-play-rule-domain-summary { border-left-color: #45bf77; }
.member-play-rule-domain-title { min-width: 0; display: grid; gap: 3px; }
.member-play-rule-domain-title b { color: var(--ink); font-size: 11px; }
.member-play-rule-domain-title small { color: var(--muted); font-size: 8px; }
.member-play-rule-domain-status { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.member-play-rule-domain-status i { color: var(--accent); font-style: normal; transition: transform 120ms ease; }
.member-play-rule-domain[open] .member-play-rule-domain-status i { transform: rotate(180deg); }
.member-play-rule-domain-body { min-width: 0; padding: 9px; display: grid; gap: 8px; border-top: 1px solid var(--line); }
.member-play-rule-subhead { color: var(--ink); font-size: 10px; font-weight: 750; }
.member-play-rule-overview { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); }
.member-play-rule-overview .member-detail-fact { min-height: 72px; border-right: 1px solid var(--line); border-bottom: 0; }
.member-play-rule-overview .member-detail-fact:last-child { border-right: 0; }
.member-play-rule-domain-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.member-play-rule-table { min-width: 0; border: 1px solid var(--line); }
.member-play-rule-empty { grid-column: 1 / -1; min-height: 72px; }
.modal.member-play-limit-modal { width: min(920px, 100%); max-height: min(92vh, 850px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.member-play-limit-modal .modal-body { min-height: 0; overflow-y: auto; }
.member-play-limit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.member-limit-template-bar { margin-bottom: 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.member-limit-template-bar > span { margin-right: 3px; color: var(--muted); font-size: 10px; font-weight: 750; }
.member-limit-active-toggle { min-height: 38px; margin: 8px 0 12px; padding: 0 10px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface-alt); font-size: 10px; }
.member-limit-active-toggle input { width: 16px; height: 16px; accent-color: var(--accent); }
.modal.member-venue-cutoff-modal,
.modal.member-assignment-editor-modal { width: min(620px, 100%); max-height: 92vh; overflow: auto; }
.member-assignment-current-band { margin-bottom: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); }
.member-assignment-editor-note { padding: 9px; border-left: 3px solid var(--accent); background: var(--surface-alt); color: var(--muted); font-size: 9px; line-height: 1.65; }
.modal.member-bet-control-modal { width: min(1100px, calc(100vw - 24px)); height: min(880px, calc(100dvh - 24px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.member-bet-control-body { min-height: 0; overflow-y: auto; }
.member-bet-control-domains { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.member-bet-control-domains-single { grid-template-columns: minmax(0, 1fr); }
.member-bet-control-domain { min-width: 0; padding: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border: 1px solid var(--line); background: var(--surface-alt); }
.member-bet-control-domain h3,
.member-bet-control-domain fieldset,
.member-bet-control-amounts { grid-column: 1 / -1; }
.member-bet-control-domain h3 { margin: 0; font-size: 12px; }
.member-bet-control-modes { margin: 0; padding: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; border: 1px solid var(--line); }
.member-bet-control-modes legend { padding: 0 4px; color: var(--muted); font-size: 9px; }
.member-bet-control-modes label { display: flex; align-items: center; gap: 5px; font-size: 10px; }
.member-bet-control-modes input { width: 15px; height: 15px; accent-color: var(--accent); }
.member-bet-control-amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
body[data-role="ADMIN"] .member-comprehensive-directory { border-color: #1c3852; background: #071522; }
body[data-role="ADMIN"] .member-comprehensive-directory button:hover { background: #0d3a35; color: #dff7f1; }
body[data-role="ADMIN"] .member-comprehensive-section { border-color: #1c3852; background: #0b1c2c; }
body[data-role="ADMIN"] .member-comprehensive-section > summary { background: #091a2a; }
body[data-role="ADMIN"] .member-comprehensive-section > summary b { color: #e5f1fa; }
body[data-role="ADMIN"] .member-comprehensive-section-body { border-color: #1c3852; }
body[data-role="ADMIN"] :where(.member-bet-control-domain, .member-bet-control-modes, .member-limit-active-toggle, .member-assignment-current-band, .member-assignment-editor-note) { border-color: #1c3852; background: #091a2a; }
.member-profile-member { margin: 0 0 15px; color: var(--muted); font-size: 11px; }
.member-profile-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.member-priority-toggle { min-height: 42px; margin-bottom: 15px; padding: 0 11px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: var(--surface-alt); color: #45545a; font-size: 12px; font-weight: 650; }
.member-priority-toggle input { width: 16px; height: 16px; accent-color: var(--accent); }
.member-tag-editor { margin: 0 0 16px; padding: 12px; display: flex; flex-wrap: wrap; gap: 8px; border: 1px solid var(--line); }
.member-tag-editor legend { padding: 0 5px; color: #45545a; font-size: 12px; font-weight: 650; }
.member-tag-editor label { display: flex; align-items: center; gap: 4px; }
.member-tag-editor input { width: 15px; height: 15px; accent-color: var(--accent); }

.agent-view-segment { width: fit-content; margin: 0 0 12px; display: flex; gap: 1px; border: 1px solid var(--line-strong); background: var(--line); }
.agent-view-segment button { min-width: 96px; min-height: 34px; padding: 0 12px; border: 0; background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 700; }
.agent-view-segment button.active { background: var(--accent); color: #ffffff; }
.agent-identity-cell { min-width: 170px; display: flex; align-items: flex-start; flex-wrap: wrap; gap: 5px; }
.agent-identity-cell .primary-cell { width: 100%; }
.agent-tree-shell { min-width: 0; border: 1px solid var(--line); background: var(--surface); }
.agent-tree-toolbar { min-height: 38px; padding: 5px 8px; display: flex; align-items: center; justify-content: flex-end; gap: 6px; border-bottom: 1px solid var(--line); background: var(--surface-alt); }
.agent-tree-toolbar > span { margin-right: auto; color: var(--muted); font-size: 10px; }
.agent-tree-list { min-width: 0; }
.agent-tree-row {
  --tree-depth: 0;
  min-height: 62px;
  padding: 8px 12px 8px calc(12px + var(--tree-depth) * 22px);
  display: grid;
  grid-template-columns: minmax(250px, 1.4fr) 180px 120px 150px 150px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #edf0ef;
  background: var(--surface);
}
.agent-tree-row:last-child { border-bottom: 0; }
.agent-tree-row:hover { background: var(--surface-alt); }
.agent-tree-identity { min-width: 0; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 6px; }
.agent-tree-branch { width: 22px; height: 22px; padding: 0; display: grid; place-content: center; border: 1px solid var(--line); border-radius: 3px; color: var(--accent); background: var(--surface-alt); font-size: 11px; cursor: default; }
.agent-tree-branch.expandable { cursor: pointer; }
.agent-tree-branch.expandable:hover { border-color: var(--accent); }
.agent-tree-profile { min-width: 0; padding: 3px 5px; display: grid; justify-items: start; gap: 2px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.agent-tree-profile:hover { border-color: var(--line-strong); background: var(--accent-soft); }
.agent-tree-profile b,
.agent-tree-profile span,
.agent-tree-profile small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-tree-profile b { font-size: 11px; }
.agent-tree-profile span { color: var(--muted); font-size: 9px; }
.agent-tree-level { display: inline-block; margin-left: 5px; color: var(--muted); font-size: 8px; font-weight: 700; }
.agent-tree-actions { display: flex; justify-content: flex-end; gap: 6px; }
.agent-tree-member-row { min-height: 52px; background: color-mix(in srgb, var(--surface-alt) 72%, var(--surface)); }
.agent-tree-member-marker { width: 22px; height: 22px; display: grid; place-content: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--accent); background: var(--surface); font-size: 9px; font-weight: 800; }
.agent-tree-member-row .agent-tree-profile b { color: var(--ink); }
.agent-profile-strip { align-items: center; }
.agent-credit-band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); }
.agent-credit-band .member-detail-fact { border-bottom: 0; }
.agent-wallet { border-top-color: #2c67a0; }
.modal.agent-form-modal { width: min(820px, 100%); max-height: 92vh; overflow: auto; }
.modal.agent-move-modal { width: min(560px, 100%); }
.agent-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.agent-form-toggles { min-height: 44px; margin: 0 0 15px; padding: 0 12px; display: flex; align-items: center; gap: 20px; border: 1px solid var(--line); background: var(--surface-alt); }
.agent-form-toggles label { display: flex; align-items: center; gap: 7px; color: #45545a; font-size: 12px; font-weight: 650; }
.agent-form-toggles input { width: 16px; height: 16px; accent-color: var(--accent); }
.store-filter-bar { grid-template-columns: minmax(210px, 1.6fr) repeat(5, minmax(118px, 1fr)) auto; }
.store-readiness-status { min-height: 76px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-left: 4px solid var(--warning); background: #fffaf0; }
.store-readiness-status.ready { border-left-color: var(--success); background: #f2faf5; }
.store-readiness-status strong { display: block; font-size: 14px; }
.store-readiness-status span:not(.badge) { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.store-readiness-facts { border: 1px solid var(--line); background: var(--surface); }
.member-operations-toolbar { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.member-operations-tabs { margin: 0; }
.member-operations-actions { display: flex; gap: 7px; }
.modal.member-operations-modal { width: min(940px, 100%); }
.member-operations-form { display: grid; gap: 12px; }
.member-rule-card { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--line); background: var(--surface-alt); }
.member-rule-card legend { padding: 0 6px; color: var(--ink); font-size: 12px; font-weight: 750; }
.member-rule-editor-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.member-rule-editor-grid .field { margin-bottom: 0; }
.member-rule-source { min-width: 180px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.operations-hint { margin: 0; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); color: #45545a; font-size: 11px; line-height: 1.55; }
.finance-tabs { max-width: 100%; overflow-x: auto; }
.finance-toolbar { align-items: flex-start; }
.finance-request-modal { width: min(820px, 100%); max-height: 92vh; overflow: auto; }
.finance-config-modal { width: min(760px, 100%); max-height: 92vh; overflow: auto; }
.finance-request-form { display: grid; gap: 12px; }
.finance-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.finance-form-grid .field { min-width: 0; margin-bottom: 0; }
.finance-fixed-target,
.finance-fixed-identity,
.finance-fixed-asset,
.finance-fixed-direction { min-height: 60px; padding: 8px 10px; border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); border-radius: 4px; background: var(--surface-alt); }
.finance-fixed-target .primary-cell { margin-top: 6px; }
.finance-fixed-identity > b,
.finance-fixed-asset > b,
.finance-fixed-direction > b { display: block; margin-top: 9px; color: var(--ink); font-size: 12px; }
.finance-reason-field { margin: 0; }
.finance-reason-field textarea { width: 100%; min-height: 92px; padding: 10px 11px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); color: var(--ink); }
.finance-toggle { min-height: 42px; padding: 9px 11px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface-alt); color: #45545a; font-size: 12px; font-weight: 650; }
.finance-toggle input { width: 16px; height: 16px; accent-color: var(--accent); }
.finance-capability-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.member-finance-extension { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.muted-cell { color: var(--muted); }

.racing-ops-toolbar { min-width: 0; align-items: center; }
.racing-upload-button { min-width: max-content; white-space: nowrap; }
.racing-ops-tabs { max-width: 100%; margin: 0; overflow-x: auto; }
.racing-ops-tabs button { min-width: 86px; white-space: nowrap; }
.racing-current-event { min-width: 0; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; }
.racing-ops-layout { min-width: 0; display: grid; grid-template-columns: 210px minmax(430px, 1fr); gap: 10px; align-items: start; }
.racing-ops-rail,
.racing-live-stream { min-width: 0; max-height: calc(100vh - 96px); position: sticky; top: 86px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.racing-ops-rail > h3,
.racing-live-stream > h3 { min-height: 46px; margin: 0; padding: 0 12px; display: flex; align-items: center; border-bottom: 1px solid var(--line); font-size: 13px; }
.racing-country-block { padding: 11px 9px; border-bottom: 1px solid var(--line); }
.racing-country-block:last-child { border-bottom: 0; }
.racing-country-block > strong { display: block; margin: 0 3px 8px; color: var(--ink); font-size: 11px; }
.racing-venue-label { margin: 9px 3px 5px; color: var(--muted); font-size: 10px; }
.racing-race-button { width: 100%; min-height: 48px; margin-top: 4px; padding: 7px 9px; display: grid; gap: 3px; border: 1px solid transparent; border-radius: 4px; background: var(--surface-alt); color: var(--ink); text-align: left; }
.racing-race-button b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.racing-race-button span { color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.racing-race-button:hover { border-color: var(--line-strong); }
.racing-race-button.active { border-color: #83b9b3; background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.racing-ops-center { min-width: 0; }
.racing-event-command { min-height: 90px; margin-bottom: 10px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; background: var(--surface); }
.racing-event-command h2 { margin: 4px 0 3px; font-size: 17px; }
.racing-event-command p { margin: 0; color: var(--muted); font-size: 11px; }
.racing-event-status { max-width: 270px; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
.racing-event-status > strong { width: 100%; margin-top: 3px; color: var(--danger); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
.racing-ops-center .panel { min-width: 0; }
.racing-market-ops { padding: 12px; }
.racing-ops-filter-line,
.racing-asset-segment { display: flex; gap: 1px; overflow-x: auto; border: 1px solid var(--line); background: var(--line); }
.racing-ops-filter-line { width: fit-content; max-width: 100%; margin-bottom: 10px; }
.racing-ops-filter-line button,
.racing-asset-segment button { min-height: 31px; padding: 0 10px; flex: 0 0 auto; border: 0; background: var(--surface); color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.racing-ops-filter-line button.active,
.racing-asset-segment button.active { background: var(--accent); color: #ffffff; }
.racing-odds-grid { display: grid; grid-template-columns: repeat(3, minmax(132px, 1fr)); gap: 7px; }
.racing-odds-cell { min-width: 0; min-height: 136px; padding: 10px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 7px; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 5px; background: var(--surface-alt); }
.racing-odds-cell.status-paused { border-top-color: var(--warning); }
.racing-odds-cell.status-closed { border-top-color: var(--danger); opacity: 0.84; }
.racing-odds-cell > div { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 5px; color: var(--muted); font-size: 9px; }
.racing-odds-cell > strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.racing-odds-cell > small { color: var(--muted); font-size: 9px; }
.racing-odds-value { align-self: end; color: var(--accent); font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }
.racing-odds-cell .btn { justify-self: stretch; }
.racing-asset-segment { margin: 10px; }
.racing-asset-segment button { flex: 1; padding: 0 5px; }
.racing-risk-readout { display: grid; grid-template-columns: 1fr; margin: 0 10px 10px; border: 1px solid var(--line); }
.racing-risk-readout .member-detail-fact { min-width: 0; min-height: 72px; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
.racing-risk-readout .member-detail-fact:last-child { border-bottom: 0; }
.racing-risk-readout .member-detail-fact b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.racing-order-stream { display: grid; }
.racing-order-item { min-width: 0; min-height: 86px; padding: 10px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; border-top: 1px solid var(--line); }
.racing-order-item > div { min-width: 0; overflow: hidden; color: var(--ink); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.racing-order-item > strong { color: var(--accent); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
.racing-order-item > span { min-width: 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.racing-order-item > .badge { justify-self: end; }
.racing-empty { min-height: 120px; padding: 12px; text-align: center; }
.racing-ops-stack { min-width: 0; }
.racing-reference-workspace { min-width: 0; display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 10px; align-items: start; }
.racing-reference-main { min-width: 0; display: grid; gap: 10px; }
.racing-reference-rail {
  min-width: 0;
  max-height: calc(100vh - 96px);
  position: sticky;
  top: 86px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}
.racing-reference-rail > h3 {
  min-height: 42px;
  margin: 0;
  padding: 0 11px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #f1f3f3;
  font-size: 12px;
}
.racing-reference-products { display: grid; }
.racing-reference-products button {
  min-width: 0;
  min-height: 36px;
  padding: 0 9px 0 11px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: #586568;
  font-size: 10px;
  font-weight: 700;
  text-align: left;
}
.racing-reference-products button:hover { background: #f4f8f7; color: var(--ink); }
.racing-reference-products button.active { background: #e5f5f3; color: #176d67; box-shadow: inset 3px 0 0 var(--accent); }
.racing-reference-products button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.racing-reference-products button b {
  min-width: 24px;
  padding: 2px 5px;
  border: 1px solid #d5dcdc;
  border-radius: 3px;
  background: #f6f8f8;
  color: #6f7b7d;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.racing-reference-rail > p { margin: 0; padding: 9px 10px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.racing-reference-command {
  min-width: 0;
  min-height: 58px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--surface);
}
.racing-reference-command > div:first-child { min-width: 0; }
.racing-reference-command h2 { margin: 0; font-size: 14px; }
.racing-reference-command p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.racing-reference-filters { min-width: 0; display: flex; align-items: end; gap: 7px; }
.racing-reference-filters label { min-width: 130px; display: grid; gap: 3px; color: var(--muted); font-size: 9px; font-weight: 700; }
.racing-reference-filters select { width: 100%; height: 32px; padding: 0 26px 0 8px; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--surface); color: var(--ink); font-size: 10px; }
.racing-reference-filters .btn.icon { width: 32px; min-width: 32px; height: 32px; }
.racing-reference-table-wrap { min-width: 0; border: 1px solid var(--line); background: var(--surface); }
.racing-reference-table-wrap .table-workspace-toolbar { min-height: 34px; border-bottom: 1px solid var(--line); background: #f7f8f8; }
.racing-reference-table-wrap .table-scroll { max-width: 100%; overflow: auto; overscroll-behavior-x: contain; }
.racing-reference-table { min-width: 1720px; border-collapse: collapse; table-layout: fixed; font-size: 10px; }
.racing-reference-table th {
  height: 36px;
  padding: 5px 6px;
  border-right: 1px solid #b9bdbf;
  border-bottom: 1px solid #979c9e;
  background: #a9adaf;
  color: #ffffff;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}
.racing-reference-table td {
  height: 34px;
  padding: 5px 6px;
  border-right: 1px solid #d9dddd;
  border-bottom: 1px solid #d9dddd;
  color: #465154;
  font-size: 10px;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
}
.racing-reference-table tbody tr:nth-child(even) td { background: var(--surface-alt); }
.racing-reference-table tbody tr:hover td { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.racing-reference-table .table-primary-link { width: 100%; justify-content: center; color: #176d67; font-size: 10px; }
.racing-reference-table .table-actions { min-width: 150px; justify-content: center; flex-wrap: nowrap; }
.racing-reference-table th:nth-child(1),
.racing-reference-table td:nth-child(1) { width: 112px; }
.racing-reference-table th:nth-child(2),
.racing-reference-table td:nth-child(2) { width: 104px; }
.racing-reference-table th:nth-child(3),
.racing-reference-table td:nth-child(3),
.racing-reference-table th:nth-child(4),
.racing-reference-table td:nth-child(4) { width: 54px; }
.racing-reference-table th:nth-child(5),
.racing-reference-table td:nth-child(5) { width: 68px; }
.racing-reference-table th:nth-child(6),
.racing-reference-table td:nth-child(6) { width: 70px; }
.racing-reference-table th:nth-child(7),
.racing-reference-table td:nth-child(7) { width: 78px; }
.racing-reference-table th:nth-child(n+8):nth-child(-n+18),
.racing-reference-table td:nth-child(n+8):nth-child(-n+18) { width: 74px; }
.racing-reference-table th:nth-child(19),
.racing-reference-table td:nth-child(19) { width: 104px; }
.racing-reference-table th:nth-child(20),
.racing-reference-table td:nth-child(20) { width: 96px; }
.racing-reference-table th:last-child,
.racing-reference-table td:last-child { width: 180px; }
.racing-ops-center .racing-reference-table-wrap { margin: 0; }
.racing-ops-center .racing-reference-table-wrap .table-scroll { max-height: 310px; }
.racing-monitor-empty-layout { grid-template-columns: 210px minmax(0, 1fr); }
.racing-monitor-filter-empty { min-height: 260px; border: 1px solid var(--line); background: var(--surface); }
.table-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.provider-ops-tabs,
.mini-ops-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.provider-ops-stack > .panel + .panel,
.mini-ops-stack > .panel + .panel { margin-top: 12px; }
.casino-session-ready { padding: 10px 12px; border-left: 3px solid var(--success); background: #edf8f3; color: #175d47; font-size: 12px; font-weight: 750; }
.mini-result-entry-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mini-result-entry-group { min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--line); }
.mini-result-entry-group legend { padding: 0 5px; color: var(--text); font-size: 11px; font-weight: 750; }
.mini-result-choice { min-height: 34px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); font-size: 11px; }
.mini-result-choice:last-child { border-bottom: 0; }
.mini-result-choice input { width: 15px; height: 15px; margin: 0; }
.mini-result-choice b { font-variant-numeric: tabular-nums; }
.modal.racing-small-modal { width: min(520px, 100%); max-height: 92vh; overflow: auto; }
.modal.racing-result-modal,
.modal.racing-import-modal { width: min(820px, 100%); max-height: 92vh; overflow: auto; }
.racing-result-form,
.racing-import-form { display: grid; gap: 12px; }
.racing-result-selection-list { display: grid; border: 1px solid var(--line); }
.racing-result-selection { min-width: 0; min-height: 52px; padding: 7px 10px; display: grid; grid-template-columns: minmax(0, 1fr) 130px; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.racing-result-selection:last-child { border-bottom: 0; }
.racing-result-selection select { width: 100%; min-height: 34px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); }
.racing-import-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.racing-import-grid .field { min-width: 0; margin-bottom: 0; }
.racing-result-form .modal-actions,
.racing-import-form .modal-actions { margin: 0 -18px -18px; }

@media (max-width: 1380px) {
  .racing-ops-layout { grid-template-columns: 190px minmax(390px, 1fr); }
  .racing-odds-grid { grid-template-columns: repeat(2, minmax(132px, 1fr)); }
  .racing-reference-workspace { grid-template-columns: 164px minmax(0, 1fr); }
  .racing-monitor-empty-layout { grid-template-columns: 190px minmax(0, 1fr); }
}

@media (max-width: 1120px) {
  .racing-ops-layout { grid-template-columns: 190px minmax(0, 1fr); }
  .racing-live-stream { max-height: none; position: static; grid-column: 1 / -1; }
  .racing-risk-readout { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .racing-risk-readout .member-detail-fact { border-right: 1px solid var(--line); border-bottom: 0; }
  .racing-risk-readout .member-detail-fact:last-child { border-right: 0; }
  .racing-order-stream { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .racing-order-item:nth-child(2) { border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .mini-result-entry-list { grid-template-columns: 1fr; }
  .racing-ops-toolbar { align-items: stretch; flex-direction: column; }
  .racing-ops-tabs { width: 100%; }
  .racing-ops-tabs button { flex: 1 0 auto; min-width: 84px; }
  .racing-current-event { text-align: left; }
  .racing-ops-layout { grid-template-columns: minmax(0, 1fr); }
  .racing-ops-rail { max-height: 210px; position: static; }
  .racing-reference-workspace { grid-template-columns: minmax(0, 1fr); }
  .racing-reference-rail { max-height: none; position: static; overflow: hidden; }
  .racing-reference-rail > h3 { min-height: 36px; }
  .racing-reference-products { display: flex; overflow-x: auto; scrollbar-width: thin; }
  .racing-reference-products button { min-width: 132px; flex: 0 0 132px; border-right: 1px solid var(--line); border-bottom: 0; }
  .racing-reference-rail > p { display: none; }
  .racing-reference-command { align-items: stretch; flex-direction: column; }
  .racing-reference-filters { width: 100%; }
  .racing-reference-filters label { min-width: 0; flex: 1; }
  .racing-monitor-empty-layout { grid-template-columns: minmax(0, 1fr); }
  .racing-ops-center { grid-row: 2; }
  .racing-live-stream { grid-column: auto; }
  .racing-event-command { min-height: 0; align-items: flex-start; flex-direction: column; }
  .racing-event-status { max-width: none; justify-content: flex-start; }
  .racing-event-status > strong { text-align: left; }
  .racing-order-stream { grid-template-columns: 1fr; }
  .racing-import-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .racing-ops-tabs { width: calc(100vw - 24px); }
  .racing-ops-tabs button { flex: 0 0 auto; }
  .racing-odds-grid { grid-template-columns: repeat(2, minmax(118px, 1fr)); }
  .racing-risk-readout { grid-template-columns: 1fr; }
  .racing-risk-readout .member-detail-fact { border-right: 0; border-bottom: 1px solid var(--line); }
  .racing-import-grid { grid-template-columns: minmax(0, 1fr); }
  .modal-backdrop.racing-form-backdrop { padding: 0; place-items: stretch; }
  .racing-form-backdrop .racing-small-modal,
  .racing-form-backdrop .racing-result-modal,
  .racing-form-backdrop .racing-import-modal { width: 100%; height: 100dvh; min-height: 0; max-height: 100dvh; overflow: auto; border-radius: 0; }
  .racing-result-selection { grid-template-columns: minmax(0, 1fr) 104px; }
  .racing-reference-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) 32px; }
  .racing-reference-table { min-width: 1640px; }
}

/* Stage 7: risk, engagement and reporting workspaces */
.nav-list { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.stage-seven-tabs { width: 100%; }
.stage-seven-stack { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.stage-seven-stack > * { min-width: 0; }
.stage-seven-stack > .panel + .panel { margin-top: 0; }
.access-policy-workspace,
.site-policy-workspace { min-width: 0; }
.access-policy-workspace .panel,
.site-policy-workspace .panel { min-width: 0; max-width: 100%; overflow: hidden; }
.access-policy-workspace .table-wrap,
.site-policy-workspace .table-wrap { min-width: 0; max-width: 100%; overscroll-behavior-x: contain; }
.modal.structured-modal { width: min(760px, 100%); max-height: 92vh; overflow: auto; }
.structured-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.structured-form-grid .field { min-width: 0; margin: 0; }
.structured-form-grid .field-wide { grid-column: 1 / -1; }
.structured-form-grid input[type="checkbox"] { width: 18px; min-height: 18px; margin: 11px 0; accent-color: var(--accent); }
.payment-account-filters { min-width: 0; margin-bottom: 14px; padding: 10px 12px; display: grid; grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(130px, 0.8fr)) auto; align-items: end; gap: 9px; border: 1px solid var(--line); background: var(--surface); }
.payment-account-filters .field { min-width: 0; margin: 0; }
.payment-account-filters > .btn { min-width: 72px; }
.odds-center-filters { min-width: 0; margin-bottom: 14px; padding: 10px 12px; display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(2, minmax(130px, 0.75fr)) auto; align-items: end; gap: 9px; border: 1px solid var(--line); background: var(--surface); }
.odds-center-filters .field { min-width: 0; margin: 0; }
.odds-center-filters > .btn { min-width: 72px; }
.result-center-filters { min-width: 0; margin-bottom: 14px; padding: 10px 12px; display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(118px, 0.72fr)) auto; align-items: end; gap: 9px; border: 1px solid var(--line); background: var(--surface); }
.result-center-filters .field { min-width: 0; margin: 0; }
.result-center-filters > .btn { min-width: 72px; }
.reversal-center-filters { min-width: 0; margin-bottom: 14px; padding: 10px 12px; display: grid; grid-template-columns: minmax(240px, 1.6fr) repeat(2, minmax(130px, 0.72fr)) auto; align-items: end; gap: 9px; border: 1px solid var(--line); background: var(--surface); }
.reversal-center-filters .field { min-width: 0; margin: 0; }
.reversal-center-filters > .btn { min-width: 72px; }
.data-source-filters,
.session-center-filters { min-width: 0; margin-bottom: 14px; padding: 10px 12px; display: grid; grid-template-columns: minmax(240px, 1.7fr) repeat(2, minmax(140px, 0.72fr)) auto; align-items: end; gap: 9px; border: 1px solid var(--line); background: var(--surface); }
.relationship-filters { min-width: 0; margin-bottom: 14px; padding: 10px 12px; display: grid; grid-template-columns: minmax(220px, 1.55fr) repeat(3, minmax(125px, 0.72fr)) auto; align-items: end; gap: 9px; border: 1px solid var(--line); background: var(--surface); }
.data-source-filters .field,
.session-center-filters .field,
.relationship-filters .field { min-width: 0; margin: 0; }
.data-source-filters > .btn,
.session-center-filters > .btn,
.relationship-filters > .btn { min-width: 72px; }
.relationship-workspace .relationship-table table { min-width: 1120px; }
.relationship-workspace .table-actions { min-width: 126px; }
.relationship-application-stack { min-width: 0; }
.modal.relationship-detail-modal { width: min(1040px, 100%); max-height: 94vh; overflow: auto; }
.relationship-detail-body { min-width: 0; display: grid; gap: 14px; }
.relationship-fact-grid { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--line); gap: 1px; }
.relationship-fact { min-width: 0; min-height: 62px; padding: 10px 11px; display: grid; align-content: center; gap: 5px; background: var(--surface); }
.relationship-fact span { color: var(--muted); font-size: 9px; }
.relationship-fact b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.relationship-application-copy { min-width: 0; padding: 12px 14px; border-left: 4px solid var(--accent); background: var(--surface-alt); }
.relationship-application-copy b { font-size: 11px; }
.relationship-application-copy p { margin: 6px 0 0; color: var(--ink); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.relationship-application-copy p.review { color: var(--muted); }
.incentive-rule-workspace { min-width: 0; }
.incentive-filters { min-width: 0; margin-bottom: 14px; padding: 10px 12px; display: grid; grid-template-columns: minmax(210px, 1.45fr) repeat(4, minmax(125px, 0.72fr)) auto; align-items: end; gap: 9px; border: 1px solid var(--line); background: var(--surface); }
.incentive-filters .field { min-width: 0; margin: 0; }
.incentive-security-strip { min-height: 44px; margin: 0 0 14px; padding: 8px 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; border: 1px solid var(--line); border-left: 3px solid #198b83; background: var(--surface); }
.incentive-security-strip > span:last-child { margin-left: auto; color: var(--muted); font-size: 10px; }
.incentive-target-stack { min-width: 0; display: grid; gap: 10px; }
.incentive-target-tools { min-height: 32px; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.incentive-row-check { width: 28px; height: 28px; display: grid; place-items: center; }
.incentive-row-check input { width: 15px; height: 15px; accent-color: var(--accent-strong); }
.incentive-target-table table { min-width: 1100px; }
.deposit-reward-workspace { min-width: 0; }
.deposit-reward-security { min-height: 44px; margin: 0 0 14px; padding: 8px 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; border: 1px solid var(--line); border-left: 3px solid #198b83; background: var(--surface); }
.deposit-reward-security > span:last-child { margin-left: auto; color: var(--muted); font-size: 10px; }
.deposit-reward-stack { display: grid; gap: 14px; }
.deposit-reward-table table { min-width: 1040px; }
.benefit-workspace { min-width: 0; }
.benefit-security { min-height: 44px; margin: 0 0 14px; padding: 8px 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; border: 1px solid var(--line); border-left: 3px solid #8a6f1d; background: var(--surface); }
.benefit-security > span:last-child { margin-left: auto; color: var(--muted); font-size: 10px; }
.benefit-stack { display: grid; gap: 14px; }
.benefit-table table { min-width: 1080px; }

.content-message-workspace { min-width: 0; }
.content-message-workspace .panel { min-width: 0; max-width: 100%; overflow: hidden; }
.content-message-workspace .table-wrap { min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.content-center-stack { display: grid; gap: 12px; min-width: 0; }
.content-center-guardrails { min-height: 44px; margin: 0 0 14px; padding: 8px 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; border: 1px solid var(--line); border-left: 3px solid #237c78; background: var(--surface); }
.content-center-guardrails > span:last-child { margin-left: auto; color: var(--muted); font-size: 10px; }
.content-center-table table { min-width: 1080px; }
.content-message-workspace td .primary-cell small { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.incentive-batch-table table { min-width: 1280px; }
.incentive-progress { width: 150px; display: grid; grid-template-columns: minmax(70px, 1fr) auto; align-items: center; gap: 7px; }
.incentive-progress-track { height: 7px; display: block; overflow: hidden; border: 1px solid var(--line); background: var(--surface-alt); }
.incentive-progress-fill { height: 100%; display: block; background: #198b83; transition: width 160ms ease; }
.incentive-progress b { min-width: 48px; color: var(--muted); font-size: 9px; text-align: right; }
.incentive-detail-modal { width: min(1120px, 100%); max-height: 94vh; overflow: auto; }
.incentive-detail-body { min-width: 0; display: grid; gap: 14px; }
.incentive-detail-body > .panel { min-width: 0; margin: 0; }
.incentive-detail-table table { min-width: 980px; }
.member-partner-workspace { min-width: 0; }
.member-partner-summary { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; border: 1px solid #c9d0ce; background: #ffffff; }
.member-partner-facts { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #d8dddc; gap: 1px; }
.member-partner-fact { min-width: 0; min-height: 82px; padding: 13px 14px; display: grid; align-content: center; gap: 6px; background: #ffffff; }
.member-partner-fact span { color: #6d7b7e; font-size: 9px; }
.member-partner-fact b { overflow: hidden; color: #172024; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.member-partner-commands { min-width: 180px; padding: 14px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; border-left: 1px solid #d8dddc; }
.member-partner-ready { color: #147b69; font-size: 10px; font-weight: 800; }
.member-partner-current { min-width: 0; min-height: 60px; margin-top: 10px; padding: 10px 12px; display: grid; grid-template-columns: minmax(170px, 1fr) auto minmax(150px, auto) auto; align-items: center; gap: 12px; border: 1px solid #d7b253; border-left: 4px solid #d7a820; background: #fff9e7; }
.member-partner-workspace > .panel { margin-top: 16px; }
.member-partner-workspace .relationship-table table { min-width: 980px; }
.data-source-stack { width: 100%; min-width: 0; display: grid; gap: 14px; }
.data-source-stack > * { min-width: 0; }
.data-source-domain-grid { min-width: 0; display: grid; grid-template-columns: repeat(5, minmax(170px, 1fr)); gap: 9px; }
.data-source-domain-card { min-width: 0; min-height: 184px; padding: 12px; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; border: 1px solid var(--line); border-top: 3px solid var(--success); border-radius: 6px; background: var(--surface); }
.data-source-domain-card.status-degraded { border-top-color: var(--warning); }
.data-source-domain-card.status-down { border-top-color: var(--danger); }
.data-source-domain-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.data-source-domain-head strong { min-width: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.data-source-domain-metrics { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); }
.data-source-domain-metrics .member-detail-fact { min-width: 0; min-height: 58px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.data-source-domain-metrics .member-detail-fact:nth-child(2n) { border-right: 0; }
.data-source-domain-metrics .member-detail-fact:nth-last-child(-n+2) { border-bottom: 0; }
.data-source-domain-metrics .member-detail-fact b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.data-source-domain-time { min-width: 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.data-source-capabilities { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.data-source-capability { max-width: 150px; min-height: 22px; padding: 3px 6px; display: inline-flex; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 3px; background: var(--surface-alt); color: #47575d; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.data-source-capability.more { color: var(--accent); }
.data-source-workspace .table-wrap table { min-width: 1180px; }
.data-source-workspace .table-wrap .primary-cell { min-width: 104px; }
.modal.data-source-detail-modal { width: min(1120px, 100%); max-height: 94vh; overflow: auto; }
.data-source-detail-body { min-width: 0; display: grid; gap: 14px; }
.data-source-detail-section { min-width: 0; display: grid; gap: 8px; }
.data-source-detail-section > h3 { margin: 0; font-size: 12px; }
.data-source-detail-section .table-wrap table { min-width: 760px; }
.odds-storage-strip { min-width: 0; margin: -5px 0 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.result-difference-cell { min-width: 104px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.result-center-workspace .table-wrap table { min-width: 1120px; }
.result-center-workspace .table-wrap .primary-cell { min-width: 108px; }
.result-history-workspace { min-width: 0; }
.result-history-workspace > .panel { min-width: 0; overflow: hidden; }
.result-history-filters { min-width: 0; margin-bottom: 14px; padding: 10px 12px; display: grid; grid-template-columns: repeat(5, minmax(126px, 1fr)); align-items: end; gap: 9px; border: 1px solid var(--line); background: var(--surface); }
.result-history-filters .field { min-width: 0; margin: 0; }
.result-history-filters .field:first-child { grid-column: span 2; }
.result-history-filter-actions { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(70px, 1fr)); gap: 7px; }
.result-history-results { min-width: 0; display: grid; gap: 10px; }
.result-history-table-wrap { min-width: 0; }
.result-history-table { min-width: 1060px; }
.result-history-table .primary-cell { min-width: 118px; }
.result-history-cards { display: none; }
.result-history-card { min-width: 0; padding: 12px; display: grid; gap: 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.result-history-card-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.result-history-card h3 { min-width: 0; margin: 0; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.result-history-card p { margin: 0; overflow-wrap: anywhere; }
.result-history-card-meta,
.result-history-card-detail,
.result-history-card small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.result-history-card-result { font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
body[data-role="MEMBER"] .result-history-filters { border-color: #303b40; background: #0f161a; }
body[data-role="MEMBER"] .result-history-filters label { color: #8f9ca1; }
body[data-role="MEMBER"] .result-history-filters input,
body[data-role="MEMBER"] .result-history-filters select { border-color: #3a474d; background: #151e23; color: #e3e9eb; }
body[data-role="MEMBER"] .result-history-card { border-color: #303b40; background: #11191d; color: #e5ebed; }
.modal.result-comparison-modal { width: min(980px, 100%); max-height: 92vh; overflow: auto; }
.result-comparison-body { display: grid; gap: 14px; }
.result-comparison-heading { margin: 2px 0 -4px; font-size: 13px; }
.result-snapshot-grid { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.result-snapshot { min-width: 0; border: 1px solid var(--line); background: var(--surface-alt); }
.result-snapshot h3 { min-height: 36px; margin: 0; padding: 9px 11px; border-bottom: 1px solid var(--line); font-size: 11px; }
.result-json { min-width: 0; max-height: 280px; margin: 0; padding: 10px 11px; overflow: auto; color: var(--ink); font: 10px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.reversal-center-workspace .table-wrap table { min-width: 1120px; }
.reversal-center-workspace .table-wrap .primary-cell { min-width: 108px; }
.modal.reversal-detail-modal { width: min(1180px, 100%); max-height: 94vh; overflow: auto; }
.reversal-detail-body { min-width: 0; display: grid; gap: 14px; }
.reversal-detail-body > .kpi-grid { grid-template-columns: repeat(5, minmax(130px, 1fr)); margin-bottom: 0; }
.reversal-detail-body > .panel + .panel { margin-top: 0; }
.reversal-detail-body .table-wrap table { min-width: 860px; }
.reversal-snapshot-grid { min-width: 0; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr); gap: 10px; }
.reversal-snapshot { min-width: 0; border: 1px solid var(--line); background: var(--surface-alt); }
.reversal-snapshot h3 { min-height: 36px; margin: 0; padding: 9px 11px; border-bottom: 1px solid var(--line); font-size: 11px; }
.reversal-reason { min-height: 76px; padding: 12px; color: var(--ink); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.reversal-reason-meta { padding: 0 12px 12px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.table-pagination { min-height: 38px; display: flex; align-items: center; justify-content: flex-end; gap: 9px; color: var(--muted); font-size: 11px; }
.report-filter-bar { min-width: 0; margin-bottom: 14px; padding: 10px 12px; display: flex; align-items: end; gap: 9px; border: 1px solid var(--line); background: var(--surface); }
.report-filter-field { min-width: 150px; display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 650; }
.report-filter-field input,
.report-filter-field select { width: 100%; min-height: 36px; padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); color: var(--ink); }
.report-filter-check { min-width: 118px; min-height: 36px; padding: 0 9px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); }
.report-filter-check input { width: 16px; min-height: 16px; padding: 0; }
.report-status-band { min-width: 0; margin: -4px 0 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.member-engagement-banner { min-width: 0; margin-top: 18px; padding: 15px 18px; border-left: 4px solid #f0ca3e; background: #143d3b; color: #ffffff; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.member-engagement-banner > div:first-child { min-width: 0; font-size: 14px; font-weight: 800; }
.member-engagement-banner p { margin: 4px 0 0; color: #c7dcda; font-size: 11px; line-height: 1.55; }
.member-content-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; }
.member-sports-flash { min-width: 0; margin-top: 18px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #455054; border-left: 4px solid #2bb8a8; background: #20282a; color: #f5f8f8; }
.member-sports-flash > div:first-child { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 4px 10px; }
.member-sports-flash span { color: #5cd3c5; font-size: 10px; font-weight: 800; }
.member-sports-flash strong { min-width: 0; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.member-sports-flash p { grid-column: 2; margin: 0; color: #aab6b7; font-size: 11px; line-height: 1.5; }
.modal.member-content-popup-modal { width: min(560px, 100%); }
.member-content-popup-kicker { display: block; margin-bottom: 5px; color: var(--accent); font-size: 10px; font-weight: 800; }
.member-content-popup-body { display: grid; gap: 14px; }
.member-content-popup-body p { margin: 0; color: var(--ink); font-size: 13px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.member-content-popup-media { width: 100%; max-height: 300px; object-fit: cover; border: 1px solid var(--line); }
.member-content-popup-picture { width: 100%; max-height: 300px; display: block; overflow: hidden; border: 1px solid var(--line); }
.member-content-popup-picture img { width: 100%; height: 100%; max-height: 298px; display: block; object-fit: cover; }
.member-sports-flash-media { width: 96px; height: 54px; flex: 0 0 96px; overflow: hidden; border: 1px solid #455054; }
.member-sports-flash-media img { width: 100%; height: 100%; display: block; object-fit: cover; }
.member-sports-flash .member-content-copy { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 4px 10px; }
.member-engagement-banner-media { width: 136px; height: 72px; flex: 0 0 136px; overflow: hidden; border: 1px solid rgba(255,255,255,0.18); }
.member-engagement-banner-media img { width: 100%; height: 100%; display: block; object-fit: cover; }
.member-engagement-banner .member-content-copy { min-width: 0; flex: 1 1 auto; }
.member-engagement-section { border-top: 1px solid #3a4446; padding-top: 17px; }
.member-engagement-rows { display: grid; border: 1px solid #3a4446; background: #1b2123; }
.member-engagement-row { min-width: 0; min-height: 58px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #343d3f; }
.member-engagement-row:last-child { border-bottom: 0; }
.member-engagement-row .primary-cell { min-width: 0; color: #f4f7f7; }
.member-engagement-row .sub-cell { overflow: hidden; color: #9ca9ab; text-overflow: ellipsis; white-space: nowrap; }
.member-engagement-message { align-items: flex-start; }

@media (max-width: 760px) {
  .report-filter-bar { align-items: stretch; flex-wrap: wrap; }
  .report-filter-field { flex: 1 1 140px; min-width: 0; }
  .report-filter-bar > .btn { flex: 1 0 100%; }
  .payment-account-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .payment-account-filters > .btn { grid-column: 1 / -1; }
  .odds-center-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .odds-center-filters > .btn { grid-column: 1 / -1; }
  .result-center-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .result-center-filters > .btn { grid-column: 1 / -1; }
  .result-history-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .result-history-filters .field:first-child { grid-column: 1 / -1; }
  .reversal-center-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .reversal-center-filters > .btn { grid-column: 1 / -1; }
  .data-source-filters,
  .session-center-filters,
  .relationship-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .data-source-filters > .btn,
  .session-center-filters > .btn,
  .relationship-filters > .btn { grid-column: 1 / -1; }
  .relationship-fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-partner-summary { grid-template-columns: minmax(0, 1fr); }
  .member-partner-commands { min-height: 58px; border-top: 1px solid #d8dddc; border-left: 0; }
  .member-partner-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-partner-current { grid-template-columns: minmax(0, 1fr) auto; }
  .member-partner-current > span { grid-column: 1 / -1; }
  .member-partner-current .table-actions { grid-column: 1 / -1; }
  .data-source-domain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reversal-detail-body > .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .modal-backdrop:has(.structured-modal),
  .modal-backdrop:has(.result-comparison-modal),
  .modal-backdrop.reversal-detail-backdrop,
  .modal-backdrop.data-source-detail-backdrop { padding: 0; place-items: stretch; }
  .modal.structured-modal,
  .modal.result-comparison-modal,
  .modal.reversal-detail-modal,
  .modal.data-source-detail-modal { width: 100%; height: 100dvh; min-height: 0; max-height: 100dvh; border-radius: 0; }
  .structured-form-grid { grid-template-columns: minmax(0, 1fr); }
  .structured-form-grid .field-wide { grid-column: auto; }
  .stage-seven-tabs { width: 100%; flex-wrap: wrap; overflow-x: visible; }
  .agent-view-segment.stage-seven-tabs button { min-width: 100px; padding: 0 8px; flex: 1 1 calc(33.333% - 2px); }
  .member-engagement-banner { margin-top: 12px; padding: 12px 13px; }
  .member-engagement-banner,
  .member-sports-flash { align-items: stretch; flex-direction: column; gap: 10px; }
  .member-engagement-banner-media,
  .member-sports-flash-media { width: 100%; height: auto; aspect-ratio: 16 / 5; flex-basis: auto; }
  .member-sports-flash { margin-top: 12px; padding: 11px 12px; }
  .member-sports-flash > div:first-child { grid-template-columns: minmax(0, 1fr); }
  .member-sports-flash p { grid-column: 1; }
  .member-content-actions { width: 100%; }
  .member-content-actions > .btn { flex: 1 1 0; }
  .member-engagement-row { align-items: flex-start; flex-direction: column; }
  .member-engagement-row > .btn { width: 100%; }
  .payment-account-filters { grid-template-columns: minmax(0, 1fr); }
  .payment-account-filters > .btn { grid-column: auto; }
  .odds-center-filters { grid-template-columns: minmax(0, 1fr); }
  .odds-center-filters > .btn { grid-column: auto; }
  .result-center-filters { grid-template-columns: minmax(0, 1fr); }
  .result-center-filters > .btn { grid-column: auto; }
  .result-history-filters { grid-template-columns: minmax(0, 1fr); }
  .result-history-filters .field:first-child { grid-column: auto; }
  .result-history-table-wrap { display: none; }
  .result-history-cards { display: grid; gap: 9px; }
  .reversal-center-filters { grid-template-columns: minmax(0, 1fr); }
  .reversal-center-filters > .btn { grid-column: auto; }
  .data-source-filters,
  .session-center-filters,
  .relationship-filters { grid-template-columns: minmax(0, 1fr); }
  .data-source-filters > .btn,
  .session-center-filters > .btn,
  .relationship-filters > .btn { grid-column: auto; }
  .modal-backdrop.relationship-detail-backdrop { padding: 0; place-items: stretch; }
  .modal.relationship-detail-modal { width: 100%; height: 100dvh; min-height: 0; max-height: 100dvh; border-radius: 0; }
  .relationship-fact-grid,
  .member-partner-facts { grid-template-columns: minmax(0, 1fr); }
  .member-partner-commands { min-width: 0; align-items: stretch; flex-direction: column; }
  .member-partner-commands > .btn { width: 100%; }
  .data-source-domain-grid { grid-template-columns: minmax(0, 1fr); }
  .result-snapshot-grid { grid-template-columns: minmax(0, 1fr); }
  .reversal-snapshot-grid,
  .reversal-detail-body > .kpi-grid { grid-template-columns: minmax(0, 1fr); }
  .table-pagination { justify-content: space-between; }
}

/* Stage 8: operations, recovery and capacity evidence */
.ops-action-group { min-width: max-content; display: flex; align-items: center; gap: 5px; }
.ops-overview-grid { min-width: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr); gap: 14px; }
.ops-overview-grid > * { min-width: 0; }
.ops-overview-grid > .panel + .panel { margin-top: 0; }
.ops-dependency-list,
.ops-architecture-list { min-width: 0; padding: 7px 15px; }
.ops-dependency { min-width: 0; min-height: 64px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.ops-dependency:last-child { border-bottom: 0; }
.ops-dependency > div { min-width: 0; }
.ops-dependency b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-dependency span:not(.badge) { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ops-dependency strong { color: #39484d; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ops-architecture-row { min-width: 0; min-height: 52px; display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.ops-architecture-row:last-child { border-bottom: 0; }
.ops-architecture-row span { color: var(--muted); font-size: 10px; }
.ops-architecture-row b { min-width: 0; color: #39484d; font-size: 11px; line-height: 1.45; }
.ops-runtime-facts { padding: 12px; display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 1px; background: var(--line); }
.ops-runtime-fact { min-width: 0; min-height: 78px; padding: 12px; background: var(--surface); }
.ops-runtime-fact span { display: block; color: var(--muted); font-size: 10px; }
.ops-runtime-fact b { display: block; margin-top: 11px; overflow: hidden; color: #354248; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.ops-drill-warning { min-height: 62px; padding: 12px 14px; display: grid; gap: 4px; border: 1px solid #e2b46f; border-left: 4px solid #c74b42; background: #fff9e8; color: #64491d; }
.ops-drill-warning b { font-size: 12px; }
.ops-drill-warning span { font-size: 10px; line-height: 1.55; }

@media (max-width: 1180px) {
  .ops-overview-grid { grid-template-columns: minmax(0, 1fr); }
  .ops-runtime-facts { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
}

@media (max-width: 760px) {
  .ops-dependency { grid-template-columns: minmax(0, 1fr) auto; gap: 7px; padding: 9px 0; }
  .ops-dependency span:not(.badge) { overflow: visible; line-height: 1.45; text-overflow: clip; white-space: normal; }
  .ops-dependency > strong { grid-column: 1; grid-row: 2; }
  .ops-dependency > .badge { grid-column: 2; grid-row: 1 / 3; }
  .ops-architecture-row { grid-template-columns: 76px minmax(0, 1fr); }
  .ops-runtime-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 390px) {
  .ops-runtime-facts { grid-template-columns: minmax(0, 1fr); }
}

/* Alert sound control center */
.alert-sound-workspace {
  min-width: 0;
}
.alert-sound-filters {
  margin-bottom: 10px;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(130px, 180px)) auto;
  align-items: end;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.alert-sound-filters .field,
.alert-sound-filters input,
.alert-sound-filters select {
  min-width: 0;
  width: 100%;
}
.alert-sound-table {
  min-width: 920px;
}
.alert-sound-table .table-actions {
  align-items: center;
  flex-wrap: nowrap;
}
.alert-sound-table .primary-cell {
  min-width: 0;
}
.alert-sound-upload-modal {
  width: min(620px, calc(100vw - 28px));
}
.alert-sound-upload-modal .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.alert-sound-header-command {
  width: 36px;
  min-width: 36px;
  height: 36px;
}
.alert-sound-ack-command {
  width: auto;
  min-width: 58px;
  padding: 0 10px;
  border-color: #d98b16;
  background: #fff4dc;
  color: #8a4d00;
  font-weight: 800;
}
.admin-header-sound-ack { color: #a15c00; }

@media (max-width: 900px) {
  .alert-sound-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .alert-sound-filters > .btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .alert-sound-filters,
  .alert-sound-upload-modal .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .alert-sound-upload-modal {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    overflow: auto;
  }
}

/* Unified operations media library */
.media-library-workspace { min-width: 0; }
.media-library-filters {
  margin-bottom: 10px;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) repeat(3, minmax(130px, 180px)) auto;
  align-items: end;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.media-library-filters .field,
.media-library-filters input,
.media-library-filters select { min-width: 0; width: 100%; }
.media-library-table { min-width: 1060px; }
.media-library-table .table-actions { align-items: center; flex-wrap: nowrap; }
.media-library-stack { min-width: 0; display: grid; gap: 12px; }
.media-library-stack > .panel + .panel { margin-top: 0; }
.media-asset-thumb,
.mini-admin-icon {
  width: 46px;
  height: 36px;
  display: block;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #eef1f0;
}
.mini-admin-icon { width: 36px; height: 36px; }
.media-asset-placeholder {
  width: 46px;
  height: 36px;
  display: grid;
  place-content: center;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 9px;
}
.media-upload-modal { width: min(680px, calc(100vw - 28px)); }
.media-upload-modal .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.modal.media-preview-modal { width: min(920px, 100%); max-height: 92vh; overflow: auto; }
.media-preview-body { display: grid; gap: 12px; }
.media-preview-image { width: 100%; max-height: 560px; display: block; object-fit: contain; border: 1px solid var(--line); background: #eef1f0; }
.media-preview-facts { border: 1px solid var(--line); }

@media (max-width: 900px) {
  .media-library-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .media-library-filters > .btn { width: 100%; }
}

@media (max-width: 560px) {
  .media-library-workspace > .section-head { align-items: stretch; flex-direction: column; }
  .media-library-workspace > .section-head .section-actions { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .media-library-workspace > .section-head .section-actions .btn { min-width: 0; padding: 0 6px; white-space: normal; }
  .media-library-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .media-library-filters > .btn { grid-column: 1 / -1; }
  .media-upload-modal .form-grid { grid-template-columns: minmax(0, 1fr); }
  .media-upload-modal,
  .modal.media-preview-modal { width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; overflow: auto; }
  .media-preview-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 390px) {
  .media-library-workspace > .section-head .section-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .media-library-workspace > .section-head .section-actions .btn.icon { width: 100%; }
  .media-library-workspace > .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1380px) {
  .member-filter-bar { grid-template-columns: minmax(210px, 1.5fr) repeat(3, minmax(125px, 1fr)); }
  .member-filter-actions { align-self: end; }
}

.member-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.game-filter { display: flex; gap: 7px; margin-bottom: 12px; overflow-x: auto; }
.filter-button { min-height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 5px; color: #4e5c62; background: var(--surface); white-space: nowrap; }
.filter-button.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.event-card { margin-bottom: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.event-card-head { padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.event-card-head h3 { margin: 0; font-size: 14px; }
.event-card-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.market-grid { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 7px; padding: 11px; }
.market-button { min-height: 54px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 5px; color: #37454b; background: #fafcfb; text-align: left; }
.market-button:hover { border-color: #8dbcb5; }
.market-button.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.market-button span { min-width: 0; }
.market-button span b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.market-button span small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.odds { color: var(--accent); font-weight: 750; font-variant-numeric: tabular-nums; }
.bet-slip { position: sticky; top: 88px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); }
.bet-slip-head { min-height: 50px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.bet-slip-head h2 { margin: 0; font-size: 14px; }
.slip-empty { min-height: 180px; padding: 24px; display: grid; place-content: center; text-align: center; color: var(--muted); line-height: 1.6; }
.slip-body { padding: 14px; }
.slip-selection { margin-bottom: 14px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.slip-selection b { display: block; font-size: 13px; }
.slip-selection span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.stake-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 7px 0 11px; }
.stake-presets button { min-height: 30px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-alt); color: #536168; font-size: 11px; }
.slip-total { margin: 12px 0; display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.slip-total b { color: var(--ink); font-size: 18px; }
.slip-submit { width: 100%; min-height: 42px; }

.wallet-grid { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 10px; }
.wallet-item { min-height: 126px; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.wallet-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.wallet-amount { margin-top: 17px; font-size: 24px; font-weight: 680; font-variant-numeric: tabular-nums; }
.wallet-foot { margin-top: 12px; color: var(--muted); font-size: 10px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(12, 23, 27, 0.52); }
.modal { width: min(460px, 100%); border: 1px solid var(--line-strong); border-top: 3px solid var(--accent); border-radius: 6px; background: var(--surface); box-shadow: 0 24px 80px rgba(0,0,0,0.34), 0 0 0 1px rgba(255,255,255,0.04); }
.modal-head { min-height: 58px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 15px; }
.modal-body { padding: 18px; }
.modal-actions { padding: 13px 18px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
.global-search-modal { width: min(780px, 100%); max-height: min(760px, 92vh); display: grid; grid-template-rows: auto auto minmax(180px, 1fr); overflow: hidden; }
.global-search-form { padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; border-bottom: 1px solid var(--line); background: #f7f9f8; }
.global-search-form input { width: 100%; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 4px; outline: none; background: var(--surface); color: var(--ink); }
.global-search-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.global-search-results { min-height: 180px; overflow: auto; }
.global-search-groups { min-height: 38px; padding: 8px 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); background: var(--surface); }
.global-search-groups span { padding: 3px 7px; border: 1px solid var(--line); border-radius: 3px; color: #536168; background: #f8faf9; font-size: 10px; font-weight: 700; }
.global-search-list { display: grid; }
.global-search-result { width: 100%; min-height: 64px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; border-bottom: 1px solid #edf0ef; background: var(--surface); color: var(--ink); text-align: left; }
.global-search-result:hover,
.global-search-result:focus-visible { outline: none; background: #f4f8f7; box-shadow: inset 3px 0 0 var(--accent); }
.global-search-result-copy { min-width: 0; display: block; }
.global-search-result-copy b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.global-search-result-copy small { display: block; margin-top: 5px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.global-search-empty { min-height: 180px; display: grid; place-content: center; justify-items: center; color: var(--muted); }
.global-search-empty strong { color: #45535a; font-size: 13px; }
.global-search-empty span { margin-top: 6px; font-size: 10px; }

.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 80; width: min(360px, calc(100vw - 40px)); display: grid; gap: 8px; pointer-events: none; }
.toast { padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); pointer-events: auto; }
.toast.error { border-color: color-mix(in srgb, var(--danger) 72%, var(--line)); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.toast.background-refresh-status { border-color: color-mix(in srgb, var(--warning) 72%, var(--line)); background: color-mix(in srgb, var(--warning) 8%, var(--surface)); }
.toast.background-refresh-status.recovered { border-color: color-mix(in srgb, var(--success) 72%, var(--line)); background: color-mix(in srgb, var(--success) 8%, var(--surface)); }
.toast.background-refresh-status .lucide-icon { width: 18px; height: 18px; flex: 0 0 auto; color: var(--warning); }
.toast.background-refresh-status.recovered .lucide-icon { color: var(--success); }
.toast b { display: block; font-size: 12px; }
.toast span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.45; }

.loading-line { height: 2px; overflow: hidden; background: var(--accent-soft); }
.loading-line::after { content: ""; display: block; width: 35%; height: 100%; background: var(--accent); animation: loading 1s infinite linear; }
@keyframes loading { from { transform: translateX(-110%); } to { transform: translateX(310%); } }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .data-source-domain-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .member-filter-bar { grid-template-columns: minmax(210px, 1.5fr) repeat(3, minmax(125px, 1fr)); }
  .member-filter-actions { align-self: end; }
  .member-detail-wallet-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .agent-tree-row { grid-template-columns: minmax(230px, 1.4fr) 160px 110px 130px; }
  .agent-tree-row > :nth-child(4) { display: none; }
  .market-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .event-row { grid-template-columns: minmax(190px, 1fr) 110px 160px; }
  .event-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .approval-row { grid-template-columns: minmax(220px, 1fr) 110px 100px; }
  .approval-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 920px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand { min-height: 320px; padding: 30px; }
  .login-signal h1 { font-size: 36px; }
  .login-signal p, .login-foot { display: none; }
  .signal-grid { margin-top: 24px; }
  .login-main { min-height: auto; padding: 42px 26px; }
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar-brand { padding: 0; justify-content: center; }
  .sidebar-brand .brand-text, .role-chip, .nav-button span, .sidebar-meta { display: none; }
  .nav-list { padding: 10px; }
  .nav-button { width: 54px; padding: 0; }
  .nav-button::before { left: 50%; width: 9px; height: 9px; margin-left: -5px; }
  .split-grid, .equal-grid { grid-template-columns: minmax(0, 1fr); }
  .member-filter-bar { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
  .member-list-table .member-sticky-col { position: static; box-shadow: none; }
  .work-center-filters { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .member-search-field { grid-column: span 2; }
  .member-detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-detail-facts .member-detail-fact:nth-child(4n) { border-right: 1px solid var(--line); }
  .member-detail-facts .member-detail-fact:nth-child(2n) { border-right: 0; }
  .member-detail-facts .member-detail-fact:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); }
  .member-detail-facts .member-detail-fact:nth-last-child(-n+2) { border-bottom: 0; }
  .agent-tree-row { grid-template-columns: minmax(210px, 1.3fr) 150px 120px; }
  .agent-tree-row > :nth-child(3) { display: none; }
  .agent-credit-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-rule-editor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-layout { grid-template-columns: minmax(0, 1fr); }
  .bet-slip { position: static; }
  .wallet-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
}

@media (max-width: 640px) {
  body { padding-bottom: 62px; }
  .login-brand { min-height: 270px; }
  .login-signal h1 { font-size: 30px; }
  .signal-cell { padding: 10px 8px; }
  .signal-cell b { font-size: 15px; }
  .login-main { padding: 34px 20px; }
  .account-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-shell { display: block; }
  body[data-role="ADMIN"], body[data-role="AGENT"] { height: 100dvh; overflow: hidden; padding-bottom: 0; }
  body[data-role="ADMIN"] .app-shell, body[data-role="AGENT"] .app-shell { height: calc(100dvh - 62px); min-height: 0; overflow: hidden; }
  body[data-role="ADMIN"] .main, body[data-role="AGENT"] .main { height: 100%; overflow-y: auto; overscroll-behavior-y: contain; }
  .sidebar { position: fixed; inset: auto 0 0; z-index: 30; width: 100%; height: 62px; border-top: 1px solid rgba(255,255,255,0.1); }
  .sidebar-brand, .role-chip, .sidebar-meta { display: none; }
  .nav-list { height: 62px; padding: 5px 6px; display: flex; align-items: stretch; justify-content: space-around; overflow-x: auto; }
  .nav-button { flex: 1; min-width: 40px; width: auto; min-height: 52px; padding: 26px 2px 2px; text-align: center; font-size: 9px; }
  .nav-button span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-button::before { top: 12px; }
  .topbar { height: 62px; padding: 0 14px; }
  .page-heading h1 { font-size: 16px; }
  .page-heading p, .live-indicator, .top-actions .logout-label { display: none; }
  .content { padding: 16px 12px 28px; }
  .member-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; }
  .member-search-field, .member-filter-actions { grid-column: 1 / -1; }
  .work-center-batch-bar { align-items: stretch; flex-direction: column; }
  .work-center-batch-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-center-batch-actions .btn { min-width: 0; }
  .search-spotlight { align-items: flex-start; }
  .member-filter-actions .btn { flex: 1; }
  .member-pagination { align-items: flex-start; flex-direction: column; }
  .member-detail-backdrop { padding: 0; place-items: stretch; }
  .member-comprehensive-backdrop { padding: 0; place-items: stretch; }
  .modal.member-detail-modal { width: 100%; max-height: none; min-height: 100%; border-radius: 0; }
  .global-search-backdrop { padding: 0; place-items: stretch; }
  .global-search-modal { width: 100%; height: 100dvh; max-height: none; border-radius: 0; }
  .global-search-form { grid-template-columns: minmax(0, 1fr); }
  .global-search-form .btn { width: 100%; }
  .member-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-detail-summary .member-detail-fact:nth-child(2) { border-right: 0; }
  .member-detail-summary .member-detail-fact:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .member-detail-tabs button { min-width: 72px; padding: 0 4px; font-size: 10px; }
  .member-detail-content { padding: 10px; }
  .member-detail-facts { grid-template-columns: 1fr; }
  .member-detail-facts .member-detail-fact { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .member-detail-facts .member-detail-fact:last-child { border-bottom: 0 !important; }
  .member-profile-strip { grid-template-columns: 1fr; }
  .member-detail-wallet-grid { grid-template-columns: 1fr; }
  .modal.member-profile-modal { max-height: none; min-height: 100%; border-radius: 0; }
  .modal.member-comprehensive-modal { width: 100%; height: 100dvh; min-height: 100%; }
  .member-comprehensive-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .member-comprehensive-directory {
    padding: 4px;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .member-comprehensive-directory button { min-width: 112px; border-left: 0; border-bottom: 2px solid transparent; text-align: center; }
  .member-comprehensive-directory button:hover { border-bottom-color: var(--accent); }
  .member-comprehensive-sections { padding: 6px; }
  .member-comprehensive-section-body { padding: 7px; }
  .member-comprehensive-modal .member-profile-fields,
  .member-comprehensive-facts { grid-template-columns: minmax(0, 1fr); }
  .member-profile-fields { grid-template-columns: 1fr; }
  .member-detail-actions { justify-content: stretch; }
  .member-detail-actions .btn { flex: 1; min-width: 110px; }
  .agent-view-segment { width: 100%; }
  .agent-view-segment button { flex: 1; min-width: 0; }
  .agent-tree-row { min-height: 86px; padding: 10px 8px 10px calc(8px + var(--tree-depth) * 10px); grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
  .agent-tree-row > :nth-child(2), .agent-tree-row > :nth-child(3), .agent-tree-row > :nth-child(4) { display: none; }
  .agent-tree-actions { align-items: flex-end; flex-direction: column; }
  .agent-credit-band { grid-template-columns: 1fr; }
  .agent-credit-band .member-detail-fact { border-right: 0; border-bottom: 1px solid var(--line); }
  .agent-credit-band .member-detail-fact:last-child { border-bottom: 0; }
  .finance-toolbar { align-items: stretch; flex-direction: column; }
  .finance-tabs { width: 100%; }
  .finance-form-grid, .finance-capability-grid { grid-template-columns: minmax(0, 1fr); }
  .finance-modal-backdrop { padding: 0; place-items: stretch; }
  .modal.finance-request-modal, .modal.finance-config-modal { width: 100%; max-height: none; min-height: 100%; border-radius: 0; }
  .modal.agent-form-modal, .modal.agent-move-modal { width: 100%; max-height: none; min-height: 100%; border-radius: 0; }
  .member-operations-backdrop, .agent-form-backdrop { padding: 0; place-items: stretch; }
  .member-operations-backdrop .modal.member-operations-modal,
  .agent-form-backdrop .modal.agent-form-modal,
  .agent-form-backdrop .modal.agent-move-modal { width: 100%; height: 100dvh; min-height: 0; max-height: 100dvh; overflow: auto; border-radius: 0; }
  .agent-form-grid { grid-template-columns: 1fr; }
  .store-readiness-status { align-items: flex-start; }
  .member-operations-toolbar { align-items: stretch; flex-direction: column; }
  .member-operations-actions .btn { flex: 1; }
  .member-rule-editor-grid { grid-template-columns: 1fr; }
  .member-rule-source { min-width: 150px; }
  .agent-form-toggles { align-items: flex-start; flex-direction: column; justify-content: center; gap: 8px; padding: 10px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .panel-body > .kpi-grid { grid-template-columns: 1fr; }
  .kpi { min-height: 94px; padding: 13px; }
  .kpi-value { font-size: 20px; }
  .capacity-metrics { grid-template-columns: repeat(2, 1fr); }
  .capacity-banner { grid-template-columns: 1fr; }
  .market-grid { grid-template-columns: 1fr; }
  .event-card-head { align-items: flex-start; }
  .wallet-grid { grid-template-columns: 1fr; }
  .event-row { grid-template-columns: 1fr; gap: 10px; }
  .approval-row { grid-template-columns: 1fr; gap: 10px; }
  .provider-row { grid-template-columns: minmax(100px, 1fr) 76px 60px; }
  .toast-region { right: 12px; bottom: 74px; width: calc(100vw - 24px); }
}

/* Agent and store workspaces */
body[data-role="AGENT"] {
  --channel-accent: #0b756e;
  --channel-accent-soft: #e1f1ef;
  --channel-nav: #1a292d;
  --channel-nav-muted: #9cb0b2;
  --channel-highlight: #d59a31;
  background: #f1f4f3;
}
body[data-terminal="STORE"] {
  --channel-accent: #a66a16;
  --channel-accent-soft: #f8eedc;
  --channel-nav: #252b2d;
  --channel-nav-muted: #aeb5b5;
  --channel-highlight: #168078;
}
.channel-app-shell { min-height: 100vh; display: grid; grid-template-rows: 64px minmax(calc(100vh - 64px), auto); background: #f1f4f3; }
.channel-topbar { position: sticky; top: 0; z-index: 35; min-width: 0; height: 64px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #d9e0de; background: #ffffff; }
.channel-brand { min-width: 0; padding: 0; display: grid; grid-template-columns: 34px auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; border: 0; background: transparent; color: #1c292d; text-align: left; }
.channel-brand-mark { width: 34px; height: 34px; grid-row: 1 / 3; display: grid; place-items: center; border-radius: 5px; background: var(--channel-nav); color: #ffffff; font-size: 15px; font-weight: 800; }
.channel-brand strong { align-self: end; font-size: 13px; line-height: 1.1; }
.channel-brand small { align-self: start; margin-top: 3px; color: #718085; font-size: 9px; font-weight: 700; }
.channel-top-actions { min-width: 0; display: flex; align-items: center; gap: 7px; }
.channel-live { min-height: 27px; padding: 0 9px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #cddad7; border-radius: 4px; color: #527069; background: #f5faf8; font-size: 10px; font-weight: 700; white-space: nowrap; }
.channel-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #25875e; box-shadow: 0 0 0 3px #e1f1e8; }
.channel-user-copy { min-width: 104px; margin: 0 5px 0 3px; text-align: right; }
.channel-user-copy b, .channel-user-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel-user-copy b { color: #263439; font-size: 11px; }
.channel-user-copy span { margin-top: 2px; color: #7a888d; font-size: 9px; }
.channel-icon-command { border-color: #d5dddb; background: #ffffff; }
.channel-layout { min-width: 0; display: grid; grid-template-columns: 232px minmax(0, 1fr); align-items: stretch; }
.channel-sidebar { position: sticky; top: 64px; height: calc(100vh - 64px); min-height: 0; display: flex; flex-direction: column; overflow: hidden; border-right: 1px solid rgba(255,255,255,0.07); background: var(--channel-nav); color: #eef3f2; }
.channel-profile { margin: 15px 12px 9px; border: 1px solid rgba(255,255,255,0.11); border-radius: 6px; background: rgba(255,255,255,0.035); }
.channel-profile-head { min-width: 0; padding: 12px; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 8px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.channel-profile-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 4px; background: var(--channel-accent); color: #ffffff; font-size: 12px; font-weight: 800; }
.channel-profile-head .primary-cell { min-width: 0; overflow: hidden; color: #ffffff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.channel-profile-head .sub-cell { overflow: hidden; color: var(--channel-nav-muted); text-overflow: ellipsis; }
.channel-profile-head .badge { padding: 0 5px; font-size: 8px; }
.channel-profile-facts { padding: 7px 11px 9px; }
.channel-profile-fact { min-width: 0; min-height: 27px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--channel-nav-muted); font-size: 9px; }
.channel-profile-fact b { min-width: 0; overflow: hidden; color: #dbe4e3; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.channel-nav { min-height: 0; padding: 5px 9px 10px; display: grid; gap: 3px; overflow-y: auto; scrollbar-width: thin; }
.channel-nav-button { width: 100%; min-height: 41px; padding: 0 11px; display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 7px; border: 0; border-radius: 5px; background: transparent; color: #afbec0; text-align: left; }
.channel-nav-button b { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 4px; color: #91a6a8; background: rgba(255,255,255,0.05); font-size: 12px; }
.channel-nav-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 650; }
.channel-nav-button:hover { color: #ffffff; background: rgba(255,255,255,0.06); }
.channel-nav-button.active { color: #ffffff; background: rgba(255,255,255,0.1); box-shadow: inset 3px 0 0 var(--channel-highlight); }
.channel-nav-button.active b { color: #ffffff; background: var(--channel-accent); }
.channel-side-foot { margin-top: auto; padding: 13px 18px 17px; border-top: 1px solid rgba(255,255,255,0.08); }
.channel-side-foot b, .channel-side-foot span, .channel-side-foot small { display: block; }
.channel-side-foot b { color: #dbe4e3; font-size: 10px; }
.channel-side-foot span { margin-top: 4px; color: var(--channel-nav-muted); font-size: 9px; }
.channel-side-foot small { margin-top: 9px; color: #70878a; font-size: 8px; }
.channel-main { min-width: 0; }
.channel-pagebar { min-height: 88px; padding: 17px 28px 14px; display: flex; align-items: center; border-bottom: 1px solid #dce2e0; background: #ffffff; }
.channel-page-heading { min-width: 0; }
.channel-page-heading > span { color: var(--channel-accent); font-size: 9px; font-weight: 800; }
.channel-page-heading h1 { margin: 4px 0 0; overflow: hidden; color: #202d31; font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
.channel-page-heading p { margin: 4px 0 0; color: #79868a; font-size: 10px; }
.channel-content { width: min(1500px, 100%); margin: 0 auto; padding: 22px 28px 42px; }
.channel-content .btn.primary { border-color: var(--channel-accent); background: var(--channel-accent); }
.channel-content .btn.primary:hover { filter: brightness(0.92); }
.channel-content .filter-button.active { border-color: var(--channel-accent); color: var(--channel-accent); background: var(--channel-accent-soft); }
.channel-bottom-nav { display: none; }

.store-status-band { min-width: 0; margin-bottom: 14px; padding: 17px 18px; display: grid; grid-template-columns: minmax(240px, 1fr) minmax(520px, 1.35fr); align-items: center; gap: 22px; border: 1px solid #d4dcd9; border-left: 4px solid var(--channel-highlight); background: #ffffff; }
.store-status-copy { min-width: 0; }
.store-status-kicker { color: var(--channel-accent); font-size: 9px; font-weight: 800; }
.store-status-copy h2 { margin: 5px 0 0; overflow: hidden; color: #243136; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.store-status-copy p { margin: 5px 0 0; overflow: hidden; color: #748286; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.store-status-facts { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(100px, 1fr)); border: 1px solid #e0e5e3; }
.store-status-fact { min-width: 0; min-height: 57px; padding: 10px 11px; border-right: 1px solid #e0e5e3; background: #f8faf9; }
.store-status-fact:last-child { border-right: 0; }
.store-status-fact span, .store-status-fact b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-status-fact span { color: #788589; font-size: 9px; }
.store-status-fact b { margin-top: 7px; color: #2b393d; font-size: 11px; }
.store-command-grid { min-width: 0; margin-bottom: 20px; display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 8px; }
.store-command { min-width: 0; min-height: 78px; padding: 11px 12px; display: grid; grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; column-gap: 10px; border: 1px solid #d6dddb; border-radius: 5px; background: #ffffff; color: #2a383c; text-align: left; }
.store-command:hover { border-color: var(--channel-accent); background: var(--channel-accent-soft); }
.store-command-glyph { width: 30px; height: 30px; grid-row: 1 / 3; display: grid; place-items: center; border-radius: 4px; background: var(--channel-nav); color: #ffffff; font-size: 12px; }
.store-command b { align-self: end; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.store-command small { align-self: start; margin-top: 4px; overflow: hidden; color: #7b888c; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.store-overview-split { align-items: stretch; }
.store-overview-split > .panel { margin-top: 0; }

@media (max-width: 1120px) {
  .channel-layout { grid-template-columns: 204px minmax(0, 1fr); }
  .store-status-band { grid-template-columns: minmax(200px, 0.8fr) minmax(460px, 1.4fr); }
  .store-command-grid { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
}

@media (max-width: 760px) {
  body[data-role="AGENT"] { height: 100dvh; overflow: hidden; padding-bottom: 0; }
  body[data-role="AGENT"] .channel-app-shell { height: 100dvh; min-height: 0; grid-template-rows: 60px minmax(0, 1fr) 64px; overflow: hidden; }
  .channel-topbar { position: static; height: 60px; padding: 0 12px; gap: 8px; }
  .channel-brand { grid-template-columns: 31px auto; column-gap: 8px; }
  .channel-brand-mark { width: 31px; height: 31px; }
  .channel-brand strong { font-size: 11px; }
  .channel-brand small { font-size: 8px; }
  .channel-live, .channel-user-copy, .channel-top-actions .global-search-launcher { display: none; }
  .channel-top-actions { gap: 5px; }
  .channel-top-actions .btn.icon { width: 34px; min-height: 34px; }
  .channel-layout { min-height: 0; display: block; overflow: hidden; }
  .channel-sidebar { display: none; }
  .channel-main { height: 100%; overflow-y: auto; overscroll-behavior-y: contain; }
  .channel-pagebar { min-height: 72px; padding: 12px 14px; }
  .channel-page-heading h1 { font-size: 17px; }
  .channel-content { padding: 15px 12px 28px; }
  .channel-bottom-nav { min-width: 0; height: 64px; padding: 4px 5px; display: flex; align-items: stretch; gap: 2px; overflow-x: auto; border-top: 1px solid rgba(255,255,255,0.1); background: var(--channel-nav); scrollbar-width: none; }
  .channel-bottom-button { flex: 0 0 62px; min-width: 62px; padding: 4px 2px 3px; display: grid; place-items: center; gap: 1px; border: 0; border-radius: 4px; background: transparent; color: #aebdbf; }
  .channel-bottom-button b { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 4px; font-size: 12px; }
  .channel-bottom-button span { width: 100%; overflow: hidden; font-size: 8px; font-weight: 650; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
  .channel-bottom-button.active { color: #ffffff; background: rgba(255,255,255,0.09); }
  .channel-bottom-button.active b { background: var(--channel-accent); }
  .store-status-band { padding: 14px; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .store-status-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-status-fact:nth-child(2) { border-right: 0; }
  .store-status-fact:nth-child(-n+2) { border-bottom: 1px solid #e0e5e3; }
  .store-command-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .store-command { min-height: 70px; padding: 9px; }
}

/* Member product experience */
body[data-role="MEMBER"] {
  --member-bg: #edf0ef;
  --member-ink: #172024;
  --member-dark: #0d1213;
  --member-panel: #171d1f;
  --member-panel-2: #202729;
  --member-line: #343d3f;
  --member-muted: #899597;
  --member-teal: #19b8ad;
  --member-yellow: #f4d63c;
  --member-red: #e05a58;
  --member-blue: #4d8fc5;
  padding: 0;
  background: var(--member-bg);
  color: var(--member-ink);
}

.member-app-shell { min-height: 100vh; background: var(--member-bg); }
.member-topbar {
  position: sticky;
  top: 0;
  z-index: 35;
  height: 68px;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  align-items: stretch;
  border-bottom: 1px solid #30383a;
  background: var(--member-dark);
  color: #f4f7f6;
}
.member-brand {
  min-width: 0;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-right: 1px solid #293133;
  background: transparent;
  color: #ffffff;
  text-align: left;
}
.member-brand strong { font-size: 18px; line-height: 1; }
.member-brand span { color: var(--member-yellow); font-size: 11px; font-weight: 800; }
.member-brand-logo { width: 30px; height: 30px; flex: 0 0 30px; display: block; object-fit: contain; }
.member-product-nav { min-width: 0; display: flex; align-items: stretch; overflow-x: auto; }
.member-product-nav button {
  position: relative;
  min-width: 96px;
  padding: 0 18px;
  border: 0;
  background: transparent;
  color: #9da7a9;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.member-product-nav button:hover { color: #ffffff; background: #151c1e; }
.member-product-nav button.active { color: #ffffff; background: #171e20; }
.member-product-nav button.active::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 0;
  left: 18px;
  height: 3px;
  background: var(--member-yellow);
}
.member-top-actions { display: flex; align-items: center; gap: 6px; padding: 0 16px 0 10px; }
.member-balance-control,
.member-top-command,
.member-icon-command {
  height: 38px;
  border: 1px solid #343d3f;
  border-radius: 4px;
  background: #171e20;
  color: #d7dede;
}
.member-balance-control { min-width: 112px; padding: 5px 10px; text-align: right; }
.member-balance-control span { display: block; color: #849092; font-size: 9px; }
.member-balance-control b { display: block; margin-top: 2px; color: var(--member-yellow); font-size: 12px; font-variant-numeric: tabular-nums; }
.member-top-command { padding: 0 11px; font-size: 11px; font-weight: 700; }
.member-icon-command { width: 38px; padding: 0; font-size: 17px; }
.member-balance-control:hover,
.member-top-command:hover,
.member-icon-command:hover { border-color: #667174; color: #ffffff; }
.member-main { min-width: 0; }
.member-content { width: min(1580px, 100%); margin: 0 auto; padding: 22px 24px 44px; }
.member-bottom-nav { display: none; }

.member-command-band {
  min-height: 132px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid #273234;
  border-radius: 6px;
  background: #162022;
  color: #ffffff;
}
.member-command-title .member-kicker { color: var(--member-teal); font-size: 10px; font-weight: 800; }
.member-command-title h1 { margin: 7px 0 0; font-size: 27px; font-weight: 700; }
.member-command-title p { margin: 7px 0 0; color: #94a1a3; font-size: 11px; }
.member-command-account { min-width: 210px; text-align: right; }
.member-command-account span { display: block; color: #8e9a9d; font-size: 10px; }
.member-command-account strong { display: block; margin-top: 7px; color: var(--member-yellow); font-size: 23px; font-variant-numeric: tabular-nums; }
.member-command-account small { display: block; margin-top: 6px; color: #adb7b8; }

.member-product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.member-product-card {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #cbd2d0;
  border-radius: 6px;
  background: #ffffff;
  color: var(--member-ink);
  text-align: left;
}
.member-product-card:hover { border-color: #7f8d8b; box-shadow: 0 7px 22px rgba(15, 25, 28, 0.11); }
.member-product-copy { padding: 16px 17px 12px; }
.member-product-copy > span { color: #718082; font-size: 9px; font-weight: 800; }
.member-product-copy h2 { margin: 5px 0 0; font-size: 18px; }
.member-product-copy p { margin: 5px 0 0; overflow: hidden; color: #718082; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.member-product-visual { position: relative; aspect-ratio: 16 / 7; min-height: 92px; padding: 16px; overflow: hidden; color: #ffffff; }
.member-product-visual.racing { background: #163b37; }
.member-product-visual.sports { background: #252e30; }
.member-product-visual.casino { background: #4b232c; }
.member-product-visual.mini { background: #1e3b55; }
.product-score { position: absolute; right: 13px; bottom: 10px; color: rgba(255,255,255,0.68); font-size: 9px; font-weight: 800; }
.product-track { height: 60px; display: flex; align-items: center; justify-content: space-around; border: 3px solid #67867e; border-radius: 50%; }
.product-track span { width: 25px; height: 25px; display: grid; place-content: center; border-radius: 50%; background: #f3f5f4; color: #182523; font-size: 11px; font-weight: 800; }
.product-track span:nth-child(2) { background: var(--member-yellow); }
.product-scoreboard { min-height: 58px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; border-top: 1px solid #596264; border-bottom: 1px solid #596264; text-align: center; }
.product-scoreboard span { color: #c8cfce; font-size: 10px; font-weight: 800; }
.product-scoreboard b { color: var(--member-yellow); font-size: 20px; font-variant-numeric: tabular-nums; }
.product-table { min-height: 58px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 2px solid #8f5360; border-radius: 50%; }
.product-table span { width: 34px; height: 34px; display: grid; place-content: center; border-radius: 50%; background: #f1e7d8; color: #352023; font-weight: 800; }
.product-table span:nth-child(2) { background: #cc4f4a; color: #ffffff; }
.product-balls { min-height: 58px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.product-balls span { width: 28px; height: 28px; display: grid; place-content: center; border-radius: 50%; background: #f0d04d; color: #1d2528; font-size: 10px; font-weight: 800; box-shadow: inset 0 -4px 0 rgba(0,0,0,0.12); }
.product-balls span:nth-child(2), .product-balls span:nth-child(5) { background: #6fb0de; }
.product-balls span:nth-child(3) { background: #df6963; color: #ffffff; }
.product-balls span.power { background: #e75c55; color: #ffffff; outline: 3px solid rgba(255,255,255,0.17); }
.member-product-foot { min-height: 42px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #e5e9e8; }
.member-product-foot b { font-size: 11px; }
.member-product-foot span { color: #6b7a7d; font-size: 10px; }
.tone-teal .member-product-foot b { color: #08736d; }
.tone-yellow .member-product-foot b { color: #9a6c00; }
.tone-red .member-product-foot b { color: #b04443; }
.tone-blue .member-product-foot b { color: #356f9e; }

.member-home-section { margin-top: 24px; }
.member-section-title { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #cbd2d0; }
.member-section-title > div { font-size: 14px; font-weight: 800; }
.member-section-title > span { color: #718082; font-size: 11px; }
.member-section-title .btn { min-height: 28px; }
.member-home-events { border-bottom: 1px solid #d7dddb; }
.member-home-event { width: 100%; min-height: 58px; padding: 8px 6px; display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid #d7dddb; background: transparent; color: var(--member-ink); text-align: left; }
.member-home-event:last-child { border-bottom: 0; }
.member-home-event:hover { background: rgba(255,255,255,0.65); }
.member-home-event .event-code { min-height: 24px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; border-radius: 3px; background: #d9e2e0; color: #36504d; font-size: 9px; font-weight: 800; }
.member-home-event .event-code.sports { background: #f4e6a9; color: #705b00; }
.member-home-event .event-code.mini { background: #d9e6f0; color: #2e5d83; }
.member-home-event > div b { display: block; font-size: 12px; }
.member-home-event > div span { display: block; margin-top: 4px; color: #738184; font-size: 10px; }
.member-home-event > strong { color: #4f5e60; font-size: 10px; font-variant-numeric: tabular-nums; }
.member-home-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.member-casino-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 10px; }
.member-casino-entrance-card {
  position: relative;
  min-height: 138px;
  padding: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  border: 1px solid #344247;
  border-radius: 3px;
  background: #101719 url("/assets/member/gaming-command-panorama-v1.png") 82% center / cover no-repeat;
  color: #ffffff;
  text-align: left;
}
.member-casino-entrance-card::before { content: ""; position: absolute; inset: 0; background: rgba(5, 9, 11, .56); }
.member-casino-entrance-card > * { position: relative; z-index: 1; }
.member-casino-entrance-card span { color: #e1c94c; font-size: 8px; font-weight: 850; }
.member-casino-entrance-card strong { margin-top: 6px; font-size: 20px; }
.member-casino-entrance-card small { margin-top: 5px; color: #aebabc; font-size: 8px; }
.member-home-column .member-casino-strip { grid-template-columns: minmax(0, 1fr); }
.casino-compact-card { min-width: 0; padding: 0; overflow: hidden; border: 1px solid #cbd2d0; border-radius: 5px; background: #ffffff; color: var(--member-ink); text-align: left; }
.casino-compact-card .casino-game-art { aspect-ratio: 16 / 9; min-height: 80px; }
.casino-compact-card > div:last-child { min-height: 42px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.casino-compact-card b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.casino-compact-card span { color: #778487; font-size: 9px; white-space: nowrap; }
.member-recent-list { padding-top: 2px; }
.member-recent-order { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #d7dddb; }
.member-recent-order div { min-width: 0; }
.member-recent-order div b { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.member-recent-order div span { display: block; margin-top: 4px; overflow: hidden; color: #788689; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.member-recent-order > strong { font-size: 11px; white-space: nowrap; }
.member-empty-compact { min-height: 120px; display: grid; place-content: center; color: #788689; }

.member-workspace-segment { display: none; }
.racing-session-bar {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border: 1px solid #343d3f;
  background: #161b1d;
  color: #ffffff;
}
.racing-event-tabs { display: flex; min-width: 0; overflow-x: auto; }
.racing-event-tabs button { min-width: 130px; padding: 7px 14px; display: grid; grid-template-columns: auto 1fr; align-content: center; gap: 2px 8px; border: 0; border-right: 1px solid #343d3f; background: #202628; color: #a8b2b4; text-align: left; }
.racing-event-tabs button span { grid-row: 1 / 3; align-self: center; color: #7f8c8e; font-size: 10px; }
.racing-event-tabs button b { font-size: 12px; }
.racing-event-tabs button small { color: #7f8c8e; font-size: 9px; }
.racing-event-tabs button.active { background: #0b7771; color: #ffffff; box-shadow: inset 0 -3px 0 #25d2c5; }
.racing-event-tabs button.active span,
.racing-event-tabs button.active small { color: #c1efeb; }
.racing-session-meta { min-width: 300px; padding: 0 16px; display: flex; align-items: center; gap: 16px; color: #8f9a9c; font-size: 9px; }
.racing-session-meta strong { color: var(--member-yellow); font-size: 11px; }
.racing-workbench { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(330px, 0.9fr); gap: 8px; margin-top: 8px; align-items: start; }
.racing-odds-pane { min-width: 0; border: 1px solid #343d3f; background: #151a1c; color: #edf2f1; }
.racing-race-head { min-height: 74px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #343d3f; background: #1d2325; }
.racing-race-head span { color: var(--member-teal); font-size: 9px; font-weight: 800; }
.racing-race-head h1 { margin: 5px 0 0; font-size: 17px; }
.racing-race-metrics { display: flex; align-items: center; gap: 6px; }
.racing-race-metrics div { min-height: 32px; padding: 0 9px; display: flex; align-items: center; border: 1px solid #3b4446; background: #151a1c; color: #a4afb1; font-size: 9px; white-space: nowrap; }
.racing-market-tabs { display: flex; gap: 1px; overflow-x: auto; border-bottom: 1px solid #343d3f; background: #303638; }
.racing-market-tabs button { min-width: 90px; min-height: 36px; padding: 0 12px; border: 0; background: #252b2d; color: #9ba6a8; font-size: 10px; white-space: nowrap; }
.racing-market-tabs button.active { background: #b63f3e; color: #ffffff; }
.racing-market-tools { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; border-bottom: 1px solid #343d3f; background: #303638; }
.racing-market-tools .racing-market-tabs { border-bottom: 0; }
.racing-market-tools > .member-workspace-segment { margin: 4px; display: grid; grid-template-columns: repeat(4, minmax(64px, 1fr)); gap: 1px; border: 1px solid #495254; background: #495254; }
.racing-market-tools > .member-workspace-segment button { min-height: 28px; border: 0; background: #252b2d; color: #a9b3b4; font-size: 9px; font-weight: 800; }
.racing-market-tools > .member-workspace-segment button.active { background: #f0d943; color: #28240d; }
.racing-market-matrix { min-height: 370px; }
.racing-play-board { min-width: 0; }
.racing-runner-picker { padding: 10px; display: grid; gap: 8px; border-bottom: 1px solid #343d3f; background: #191d1e; color: #eef4f5; }
.racing-runner-picker-copy { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.racing-runner-picker-copy b { font-size: 11px; }
.racing-runner-picker-copy span { color: #96a4a7; font-size: 9px; }
.racing-runner-picker-lanes { display: grid; gap: 6px; }
.racing-runner-picker-lane { min-width: 0; display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: stretch; gap: 6px; }
.racing-runner-picker-lane > strong { display: grid; place-content: center; border: 1px solid #485255; background: #111617; color: #f0d943; font-size: 9px; white-space: nowrap; }
.racing-runner-picker-controls { display: grid; grid-template-columns: repeat(6, minmax(62px, 1fr)); gap: 5px; }
.racing-runner-picker-controls button { min-width: 0; min-height: 42px; padding: 5px 7px; display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 5px; border: 1px solid #414a4c; background: #242a2c; color: #dce4e5; text-align: left; }
.racing-runner-picker-controls button b { width: 22px; height: 22px; display: grid; place-content: center; border-radius: 50%; background: #596164; color: #fff; font-size: 10px; }
.racing-runner-picker-controls button span { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.racing-runner-picker-controls button.selected { border-color: #f0d943; background: #393719; }
.racing-runner-picker-controls button.selected b { background: #f0d943; color: #28240d; }
.racing-runner-picker-controls button:disabled { cursor: not-allowed; opacity: 0.35; }
.racing-runner-picker-status { min-height: 28px; padding: 4px 7px; display: flex; align-items: center; justify-content: space-between; border: 1px solid #343d3f; background: #111516; color: #aeb9bb; font-size: 9px; }
.racing-runner-picker-status b { color: #52d7e6; font-size: 11px; }
.racing-market-row { min-height: 66px; padding: 7px 10px; display: grid; grid-template-columns: 34px minmax(140px, 1fr) 88px minmax(150px, 0.9fr); align-items: center; gap: 8px; border-bottom: 1px solid #2d3436; }
.racing-market-row:last-child { border-bottom: 0; }
.runner-number { width: 28px; height: 28px; display: grid; place-content: center; border-radius: 3px; background: #e6eae9; color: #172023; font-size: 11px; font-weight: 800; }
.runner-name b { display: block; font-size: 11px; }
.runner-name small { display: block; margin-top: 4px; color: #778386; font-size: 8px; }
.runner-type { color: #9aa5a7; font-size: 9px; }
.racing-odds-control { width: 100%; min-height: 43px; padding: 6px 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid #414a4c; border-radius: 3px; background: #23292b; color: #dae1df; text-align: left; }
.racing-odds-control span b { display: block; font-size: 10px; }
.racing-odds-control span small { display: block; margin-top: 3px; color: #7f8a8c; font-size: 8px; }
.racing-odds-control > strong { color: #56d4ca; font-size: 14px; font-variant-numeric: tabular-nums; }
.racing-odds-control:hover { border-color: #19a79d; }
.racing-odds-control.selected { border-color: #1bc1b6; background: #0d5f5a; box-shadow: inset 3px 0 0 #31d6c9; }
.racing-odds-control.selected > strong { color: #ffffff; }
.racing-matrix-scroll { max-width: 100%; min-height: 430px; overflow: auto; overscroll-behavior: contain; background: #111617; }
.racing-symmetric-matrix { width: max-content; min-width: 100%; display: grid; grid-template-columns: 48px repeat(var(--racing-runner-count), minmax(58px, 1fr)); grid-auto-rows: 48px; border-right: 1px solid #343d3f; border-bottom: 1px solid #343d3f; }
.racing-matrix-corner,
.racing-matrix-header { display: grid; place-content: center; border-top: 1px solid #343d3f; border-left: 1px solid #343d3f; background: #252c2e; color: #e6eceb; font-size: 11px; font-weight: 900; font-variant-numeric: tabular-nums; }
.racing-matrix-corner { position: sticky; top: 0; left: 0; z-index: 5; background: #0d7771; }
.racing-matrix-header.column { position: sticky; top: 0; z-index: 4; }
.racing-matrix-header.row { position: sticky; left: 0; z-index: 3; background: #2c3436; }
.racing-matrix-cell { min-width: 58px; min-height: 48px; display: grid; place-content: center; border: 0; border-top: 1px solid #343d3f; border-left: 1px solid #343d3f; border-radius: 0; font-size: 10px; font-variant-numeric: tabular-nums; }
.racing-matrix-cell.diagonal { background: #202628; }
.racing-matrix-cell.unavailable { background: #171c1e; color: #465052; }
.racing-matrix-cell.odds { background: #e8eceb; color: #213033; cursor: pointer; }
.racing-matrix-cell.odds.lower { background: #d4dfdd; }
.racing-symmetric-matrix.ordered .racing-matrix-cell.odds.lower { background: #dbe2e7; }
.racing-matrix-cell.odds:hover { position: relative; z-index: 2; box-shadow: inset 0 0 0 2px #12a89f; }
.racing-matrix-cell.odds.selected { background: #08766f; color: #ffffff; box-shadow: inset 0 0 0 2px #3de0d3; }
.racing-context-pane { min-width: 0; display: grid; gap: 8px; }
.race-feed { border: 1px solid #343d3f; background: #151a1c; color: #edf2f1; }
.race-feed-head { height: 42px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #343d3f; color: #889597; font-size: 9px; font-weight: 800; }
.race-track-visual { position: relative; min-height: 218px; padding: 22px; display: grid; place-content: center; background: #26352f; }
.race-track-oval { position: relative; width: min(330px, 68vw); aspect-ratio: 16 / 8; border: 12px double #7c958b; border-radius: 50%; background: #32443b; box-shadow: inset 0 0 0 12px #1d2a25; }
.race-track-oval .runner { position: absolute; width: 25px; height: 25px; display: grid; place-content: center; border: 2px solid #ffffff; border-radius: 50%; color: #182022; background: var(--member-yellow); font-size: 9px; font-weight: 800; }
.race-track-oval .runner-1 { top: 20%; left: 14%; }
.race-track-oval .runner-2 { right: 18%; bottom: 17%; background: #69b8dc; }
.race-track-oval .runner-3 { top: 11%; right: 29%; background: #e0605a; color: #ffffff; }
.race-track-label { position: absolute; right: 12px; bottom: 10px; color: #a3b6ae; font-size: 9px; }
.race-recent-results { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #343d3f; }
.race-recent-results div { min-height: 48px; padding: 8px; border-right: 1px solid #343d3f; text-align: center; }
.race-recent-results div:last-child { border-right: 0; }
.race-recent-results span { display: block; color: #758184; font-size: 8px; }
.race-recent-results b { display: block; margin-top: 4px; font-size: 11px; font-variant-numeric: tabular-nums; }

.member-bet-slip { position: sticky; top: 76px; overflow: hidden; border: 1px solid #3a4446; border-radius: 4px; background: #181e20; color: #eff4f3; box-shadow: 0 10px 30px rgba(0,0,0,0.17); }
.member-slip-head { min-height: 52px; padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #343d3f; }
.member-slip-head span { color: #7f8c8e; font-size: 8px; font-weight: 800; }
.member-slip-head h2 { margin: 3px 0 0; font-size: 13px; }
.member-slip-head-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.member-slip-head-actions .btn { min-height: 28px; padding: 0 8px; border-color: #465154; background: #222a2c; color: #d8dfde; font-size: 9px; }
.member-asset-selector { min-height: 48px; padding: 5px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; border-bottom: 1px solid #30383a; background: #121719; }
.member-asset-selector button { min-width: 0; min-height: 36px; padding: 4px 7px; display: grid; align-content: center; gap: 2px; border: 1px solid #384244; border-radius: 3px; background: #22292b; color: #8e999b; text-align: left; }
.member-asset-selector button span { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.member-asset-selector button b { overflow: hidden; color: #d8dfde; font-size: 10px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.member-asset-selector button.active { border-color: #24bdb2; background: #0b5d58; color: #d8fffb; }
.member-asset-selector button.active b { color: #ffffff; }
.member-slip-balance { min-height: 40px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #30383a; color: #899597; font-size: 9px; }
.member-slip-balance b { color: var(--member-yellow); font-size: 11px; font-variant-numeric: tabular-nums; }
.member-slip-empty { min-height: 146px; display: grid; place-content: center; justify-items: center; color: #758184; }
.member-slip-empty b { color: #bac4c4; font-size: 12px; }
.member-slip-empty span { margin-top: 5px; font-size: 9px; }
.member-slip-body { padding: 11px; }
.member-slip-selection { padding: 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto 26px; align-items: center; gap: 8px; border: 1px solid #394244; background: #22292b; }
.member-slip-selection > div { min-width: 0; }
.member-slip-selection span { display: block; overflow: hidden; color: #7f8c8e; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.member-slip-selection b { display: block; margin-top: 4px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.member-slip-selection small { display: block; margin-top: 3px; color: #8e999b; font-size: 8px; }
.member-slip-selection > strong { color: #56d4ca; font-size: 15px; font-variant-numeric: tabular-nums; }
.member-icon-button { width: 26px; height: 26px; padding: 0; border: 0; background: transparent; color: #899597; font-size: 17px; }
.member-amount-field { display: grid; gap: 6px; margin-top: 11px; }
.member-amount-field > span { color: #8e999b; font-size: 9px; }
.member-amount-field input { width: 100%; height: 40px; padding: 0 10px; border: 1px solid #485255; border-radius: 3px; outline: none; background: #0f1415; color: #ffffff; font-size: 14px; font-variant-numeric: tabular-nums; }
.member-amount-field input:focus { border-color: var(--member-teal); }
.member-stake-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 6px; }
.member-stake-presets button { min-height: 28px; padding: 0 3px; border: 1px solid #414a4c; border-radius: 3px; background: #293033; color: #aeb8b9; font-size: 8px; }
.member-stake-presets button:hover { border-color: #6a7678; color: #ffffff; }
.member-stake-presets button:disabled { cursor: not-allowed; border-color: #303739; background: #1d2325; color: #596366; }
.sports-bet-policy-state { min-height: 32px; padding: 6px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid #30383a; background: #182022; color: #899597; font-size: 9px; }
.sports-bet-policy-state b { color: #f4d719; font-size: 10px; }
.sports-bet-preference-modal { width: min(560px, 100%); overflow: hidden; border: 1px solid #3a4648; background: #161d1f; color: #eef3f2; }
.sports-bet-preference-modal .modal-head,
.sports-bet-preference-modal .modal-actions { border-color: #303a3c; background: #111719; }
.sports-bet-preference-body { display: grid; gap: 16px; }
.sports-bet-setting-group { display: grid; gap: 8px; }
.sports-bet-setting-group h3 { margin: 0; color: #9ba7a9; font-size: 10px; }
.sports-bet-setting-segments { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.sports-bet-setting-segments button { min-width: 0; min-height: 42px; padding: 6px 8px; overflow: hidden; border: 1px solid #3b4648; border-radius: 3px; background: #222a2c; color: #aeb8b9; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sports-bet-setting-segments button.active { border-color: #2bb8a8; background: #0b5d58; color: #ffffff; }
.sports-bet-asset-segments { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sports-bet-asset-segments button { display: grid; align-content: center; gap: 3px; text-align: left; }
.sports-bet-asset-segments button span,
.sports-bet-asset-segments button b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sports-bet-quick-amount-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sports-bet-quick-amount-grid label { min-width: 0; display: grid; gap: 4px; color: #899597; font-size: 9px; }
.sports-bet-quick-amount-grid input { width: 100%; min-width: 0; height: 38px; padding: 0 8px; border: 1px solid #3b4648; border-radius: 3px; outline: none; background: #222a2c; color: #ffffff; font-variant-numeric: tabular-nums; }
.sports-bet-quick-amount-grid input:focus { border-color: #2bb8a8; }
.sports-bet-setting-empty { min-height: 42px; display: grid; place-items: center; border: 1px solid #503d34; color: #e0a36f; }
.member-slip-total { min-height: 46px; display: flex; align-items: center; justify-content: space-between; color: #8e999b; font-size: 9px; }
.member-slip-total b { color: #ffffff; font-size: 16px; font-variant-numeric: tabular-nums; }
.member-slip-total small { max-width: 180px; color: #778386; font-size: 8px; text-align: right; }
.racing-slip-selections { max-height: 250px; overflow-y: auto; border: 1px solid #394244; }
.racing-slip-selection { min-height: 48px; padding: 6px 7px; display: grid; grid-template-columns: minmax(0, 1fr) auto 26px; align-items: center; gap: 7px; border-bottom: 1px solid #343d3f; background: #22292b; }
.racing-slip-selection:last-child { border-bottom: 0; }
.racing-slip-selection > b { color: #56d4ca; font-size: 12px; font-variant-numeric: tabular-nums; }
.racing-slip-totals { min-height: 72px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; border-bottom: 1px solid #30383a; }
.racing-slip-totals > b { color: #ffffff; font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
.racing-slip-balance-state { min-height: 18px; padding: 3px 0; display: block; color: #8c999b; font-size: 9px; }
.racing-slip-balance-state.error { color: #ff7770; }
.member-submit-bet { width: 100%; min-height: 43px; border: 1px solid #f4d63c; border-radius: 3px; background: var(--member-yellow); color: #29250f; font-size: 12px; font-weight: 900; }
.member-submit-bet:hover { background: #ffe65e; }
.member-submit-bet:disabled { cursor: not-allowed; border-color: #485052; background: #303638; color: #7c8789; }

.sports-toolbar { min-height: 56px; padding: 8px 12px; display: grid; grid-template-columns: auto minmax(360px, 1fr) auto; align-items: center; gap: 10px; border: 1px solid #2f383a; background: #171d1f; color: #ffffff; }
.sports-mode { display: flex; gap: 2px; }
.sports-mode button { min-width: 84px; min-height: 32px; border: 0; border-radius: 3px; background: #293033; color: #a9b3b4; font-size: 10px; font-weight: 800; }
.sports-mode button.active { background: var(--member-yellow); color: #2b2711; }
.sports-member-filter { min-width: 0; display: grid; grid-template-columns: minmax(150px, 1fr) 138px auto auto auto; align-items: center; gap: 6px; }
.sports-member-filter > input { width: 100%; min-width: 0; height: 34px; border: 1px solid #3b474a; border-radius: 3px; background: #222b2e; color: #f3f6f5; font-size: 10px; }
.sports-member-filter > input[type="date"] { color-scheme: dark; }
.sports-favorites-filter { min-height: 34px; padding: 0 9px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #3b474a; border-radius: 3px; color: #b4bfc1; font-size: 10px; white-space: nowrap; }
.sports-favorites-filter input { margin: 0; accent-color: var(--member-yellow); }
.sports-member-filter .btn { min-width: 54px; min-height: 34px; }
.sports-toolbar-status { display: flex; align-items: center; gap: 9px; color: #829092; font-size: 9px; font-weight: 800; }
.member-virtual-sports { margin-top: 8px; border: 1px solid #3a4446; background: #1d2426; color: #ffffff; }
.member-virtual-sports-head { min-height: 38px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #3a4446; }
.member-virtual-sports-head b { font-size: 11px; }
.member-virtual-sports-head span { color: #8e9a9c; font-size: 9px; }
.member-virtual-sports-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.member-virtual-sports-card { min-width: 0; min-height: 92px; padding: 11px 12px; border-right: 1px solid #3a4446; background: #232b2d; }
.member-virtual-sports-card:last-child { border-right: 0; }
.member-virtual-sports-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.member-virtual-sports-card-head b { overflow-wrap: anywhere; font-size: 11px; }
.member-virtual-sports-card p { min-height: 28px; margin: 9px 0 5px; color: #b9c2c3; font-size: 9px; line-height: 1.5; }
.member-virtual-sports-card small { color: #7f8c8e; font-size: 8px; }
.sports-workspace { display: grid; grid-template-columns: 164px minmax(0, 1fr) 310px; gap: 8px; margin-top: 8px; align-items: start; }
.sports-category-rail { overflow: hidden; border: 1px solid #d2d8d6; background: #ffffff; }
.sports-category-row { min-height: 48px; display: grid; grid-template-columns: minmax(0, 1fr) 32px; align-items: stretch; border-bottom: 1px solid #e1e5e4; background: #ffffff; }
.sports-category-row:last-child { border-bottom: 0; }
.sports-category-row.active { background: #e5f4f2; box-shadow: inset 3px 0 0 var(--member-teal); }
.sports-category-select { width: 100%; min-width: 0; min-height: 47px; padding: 6px 5px 6px 10px; display: grid; grid-template-columns: 30px minmax(0, 1fr) 16px; align-items: center; gap: 7px; border: 0; background: transparent; color: #536164; text-align: left; }
.sports-category-row.active .sports-category-select { color: #08736d; }
.sports-category-select .sports-glyph { width: 27px; height: 27px; display: grid; place-content: center; border-radius: 3px; background: #e9edec; font-size: 8px; font-weight: 800; }
.sports-category-select b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sports-category-select small { color: #829092; text-align: right; font-size: 9px; }
.sports-preference-toggle { width: 32px; min-height: 47px; padding: 0; border: 0; background: transparent; color: #8b9799; font-size: 15px; }
.sports-preference-toggle.active { color: #c89c00; }
.sports-event-area { min-width: 0; }
.sports-featured { min-height: 132px; padding: 14px 18px; border: 1px solid #30383a; background: #222a2c; color: #ffffff; }
.sports-featured-league { display: flex; align-items: center; gap: 8px; color: #8f9a9c; font-size: 9px; }
.sports-featured-league b { color: var(--member-yellow); }
.sports-featured-league small { margin-left: auto; }
.sports-featured-score { min-height: 74px; display: grid; grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr); align-items: center; gap: 12px; text-align: center; }
.sports-featured-score strong { overflow-wrap: anywhere; font-size: 15px; }
.sports-featured-score b { width: 44px; height: 32px; display: grid; place-content: center; margin: auto; border: 1px solid #505b5d; color: var(--member-yellow); font-size: 10px; }
.sports-league-head { min-height: 42px; padding: 4px 7px 4px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; border: 1px solid #d4dad8; border-top: 0; background: #f5f7f6; font-size: 10px; font-weight: 800; }
.sports-league-head.pinned { box-shadow: inset 3px 0 0 var(--member-yellow); }
.sports-league-identity { min-width: 0; }
.sports-league-identity b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sports-league-head span { display: block; margin-top: 3px; color: #768487; font-size: 9px; font-weight: 400; }
.sports-league-actions { display: flex; gap: 3px; }
.sports-league-actions button { width: 30px; height: 30px; padding: 0; border: 1px solid #cbd3d1; border-radius: 3px; background: #ffffff; color: #697679; font-size: 14px; }
.sports-league-actions button.active { border-color: #b99100; background: #fff6cc; color: #8a6900; }
.sports-result-limit { min-height: 38px; padding: 9px 12px; border: 1px solid #d8c473; border-top: 0; background: #fff9df; color: #665513; font-size: 10px; }
.sports-event-row { min-height: 82px; padding: 10px; display: grid; grid-template-columns: 70px 200px minmax(260px, 1fr); align-items: center; gap: 10px; border: 1px solid #d4dad8; border-top: 0; background: #ffffff; }
.sports-event-time { text-align: center; }
.sports-event-time b { display: block; font-size: 11px; font-variant-numeric: tabular-nums; }
.sports-event-time span { display: block; margin-top: 5px; color: #798689; font-size: 8px; }
.sports-event-name { min-width: 0; }
.sports-event-name b { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sports-event-name span { display: block; margin-top: 5px; color: #798689; font-size: 9px; }
.sports-market-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.sports-odds-control { min-width: 0; min-height: 48px; padding: 6px 8px; display: flex; align-items: center; justify-content: space-between; gap: 6px; border: 1px solid #d0d7d5; border-radius: 3px; background: #f6f8f7; color: #334144; text-align: left; }
.sports-odds-control span { min-width: 0; }
.sports-odds-control span b { display: block; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sports-odds-control span small { display: block; margin-top: 3px; overflow: hidden; color: #7a888a; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.sports-odds-control > strong { color: #08736d; font-size: 12px; font-variant-numeric: tabular-nums; }
.sports-odds-control:hover { border-color: #77b6ae; }
.sports-odds-control.selected { border-color: #0c8f86; background: #dff2ef; box-shadow: inset 3px 0 0 #10a99f; }
.sports-empty { min-height: 210px; display: grid; place-content: center; justify-items: center; gap: 10px; border: 1px solid #d4dad8; border-top: 0; background: #ffffff; color: #7b898b; }
.sports-empty b { color: #4e5c5f; }

.casino-provider-strip { display: flex; gap: 8px; overflow-x: auto; }
.casino-provider-status { min-width: 220px; min-height: 48px; padding: 0 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; border: 1px solid #343d3f; background: #171d1f; color: #dfe5e4; }
.casino-provider-status span { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.casino-provider-status > b { color: #819092; font-size: 9px; font-variant-numeric: tabular-nums; }
.member-game-recent-strip { min-height: 58px; margin-top: 8px; padding: 7px 9px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; border: 1px solid #343d3f; background: #171d1f; color: #dfe5e4; }
.member-game-recent-title { padding: 0 4px; color: #8e9a9d; font-size: 9px; white-space: nowrap; }
.member-game-recent-list { min-width: 0; display: flex; gap: 6px; overflow-x: auto; }
.member-game-recent-item { flex: 0 0 176px; min-width: 0; min-height: 42px; padding: 5px 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px; border: 1px solid #3b4648; border-radius: 3px; background: #20282a; color: #e9edec; text-align: left; }
.member-game-recent-item:hover { border-color: var(--member-yellow); }
.member-game-recent-item .primary-cell { min-width: 0; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.member-game-recent-item .sub-cell { overflow: hidden; color: #809092; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.member-game-use-count { min-width: 22px; color: var(--member-yellow); font-size: 9px; font-variant-numeric: tabular-nums; text-align: right; }
.casino-toolbar { min-height: 62px; margin-top: 10px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #343d3f; background: #202729; }
.casino-filter-tabs { display: flex; gap: 3px; }
.casino-filter-tabs button { min-width: 70px; min-height: 34px; padding: 0 10px; border: 1px solid #414b4d; border-radius: 3px; background: #161c1e; color: #9da8aa; font-size: 10px; }
.casino-filter-tabs button.active { border-color: var(--member-yellow); color: #29250f; background: var(--member-yellow); font-weight: 800; }
.casino-search { display: grid; grid-template-columns: minmax(150px, 240px) 54px; }
.casino-search input { min-width: 0; height: 34px; padding: 0 10px; border: 1px solid #414b4d; border-radius: 3px 0 0 3px; outline: none; background: #121718; color: #ffffff; font-size: 10px; }
.casino-search button { border: 1px solid #414b4d; border-left: 0; border-radius: 0 3px 3px 0; background: #30383a; color: #d7dedc; font-size: 9px; }
.member-view-casino { min-height: calc(100vh - 112px); padding: 18px; background: #111719; }
.casino-game-grid { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 10px; margin-top: 10px; }
.casino-game-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid #343d3f; border-radius: 5px; background: #1c2325; color: #ffffff; }
.casino-favorite { position: absolute; top: 8px; right: 8px; z-index: 2; width: 31px; height: 31px; padding: 0; border: 1px solid rgba(255,255,255,0.26); border-radius: 3px; background: rgba(9,14,15,0.72); color: #ffffff; font-size: 17px; }
.casino-favorite.active { color: var(--member-yellow); }
.casino-game-art { position: relative; aspect-ratio: 4 / 3; min-height: 150px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: #313b3d; color: #ffffff; cursor: pointer; }
.casino-game-art.art-baccarat,
.casino-game-art.art-dragon { background: #5b2732; }
.casino-game-art.art-roulette,
.casino-game-art.art-sicbo { background: #17473f; }
.casino-game-art.art-neon,
.casino-game-art.art-fortune { background: #4b3159; }
.casino-game-art.art-ocean { background: #1d4e68; }
.casino-game-art.art-blackjack { background: #403f2a; }
.casino-art-provider { color: rgba(255,255,255,0.68); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.casino-game-art > strong { position: relative; z-index: 1; max-width: 75%; font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
.casino-table-mark { min-height: 70px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid rgba(255,255,255,0.24); border-radius: 50%; }
.casino-table-mark span { width: 38px; height: 38px; display: grid; place-content: center; border: 2px solid rgba(255,255,255,0.55); border-radius: 50%; background: rgba(255,255,255,0.10); font-size: 10px; font-weight: 900; }
.casino-table-mark span:nth-child(2) { background: #cc4f4a; }
.casino-game-info { min-height: 64px; padding: 10px 11px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; }
.casino-game-info > div { min-width: 0; }
.casino-game-info h2 { margin: 0; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.casino-game-info p { margin: 4px 0 0; overflow: hidden; color: #7f8c8e; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.casino-launch-button { min-width: 48px; min-height: 30px; border: 1px solid #657174; border-radius: 3px; background: #30383a; color: #f0f4f3; font-size: 9px; font-weight: 800; }
.casino-launch-button:hover { border-color: var(--member-yellow); color: var(--member-yellow); }
.casino-launch-modal { background: #171d1f; color: #ffffff; }
.casino-launch-modal .modal-head,
.casino-launch-modal .modal-actions { border-color: #343d3f; }
.casino-launch-body { padding: 16px; display: grid; grid-template-columns: minmax(180px, 1fr) minmax(160px, 0.75fr); gap: 14px; }
.casino-launch-body .casino-game-art { aspect-ratio: 4 / 3; }
.casino-launch-facts { border: 1px solid #343d3f; }
.casino-launch-facts div { min-height: 45px; padding: 0 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #343d3f; }
.casino-launch-facts div:last-child { border-bottom: 0; }
.casino-launch-facts span { color: #859194; font-size: 9px; }
.casino-launch-facts b { font-size: 10px; text-align: right; }
.casino-order-history { min-width: 0; margin-top: 14px; border: 1px solid #343d3f; background: #101719; color: #e8edec; }
.casino-order-history-head { min-height: 48px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #343d3f; }
.casino-order-history-head h2 { margin: 0; font-size: 12px; }
.casino-order-history-head span { color: #849194; font-size: 9px; }
.casino-order-history-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.casino-order-row { min-width: 0; padding: 11px 12px; display: grid; gap: 9px; border-right: 1px solid #343d3f; border-bottom: 1px solid #343d3f; background: #171f21; }
.casino-order-row:nth-child(2n) { border-right: 0; }
.casino-order-row-head { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; }
.casino-order-row-head .primary-cell { min-width: 0; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.casino-order-row-head .sub-cell { overflow: hidden; color: #7f8d8f; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.casino-order-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: #343d3f; }
.casino-order-totals div { min-width: 0; min-height: 48px; padding: 7px 8px; display: grid; align-content: center; gap: 4px; background: #101719; }
.casino-order-totals span { color: #7e8c8e; font-size: 8px; }
.casino-order-totals b { overflow: hidden; font-size: 10px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.casino-order-insurance { padding: 8px; display: grid; grid-template-columns: minmax(130px, 1.25fr) repeat(3, minmax(82px, 1fr)); align-items: center; gap: 8px; border: 1px solid #66583a; background: #292515; }
.casino-order-insurance > b { color: #e3c87f; font-size: 9px; }
.casino-order-insurance > span { min-width: 0; display: grid; gap: 3px; }
.casino-order-insurance small { color: #a8996e; font-size: 7px; }
.casino-order-insurance strong { overflow: hidden; color: #f0dc9d; font-size: 9px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.casino-order-time { color: #728083; font-size: 8px; text-align: right; }

.mini-workspace { display: grid; grid-template-columns: 218px minmax(0, 1fr) 310px; gap: 8px; align-items: start; }
.mini-game-rail { max-height: calc(100vh - 112px); overflow-y: auto; border: 1px solid #343d3f; background: #171d1f; color: #ffffff; }
.mini-rail-head { min-height: 44px; padding: 0 11px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #343d3f; color: #829092; font-size: 8px; }
.mini-rail-head b { color: #e3e9e8; font-size: 9px; }
.mini-game-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 34px; border-bottom: 1px solid #2d3537; background: #171d1f; }
.mini-game-row.active { background: #0d625d; box-shadow: inset 3px 0 0 #28c8bc; }
.mini-game-select { width: 100%; min-width: 0; min-height: 55px; padding: 7px 8px; display: grid; grid-template-columns: 30px minmax(0, 1fr) 28px; align-items: center; gap: 7px; border: 0; background: transparent; color: #d7dedd; text-align: left; }
.mini-game-select.active { background: transparent; }
.mini-game-favorite { width: 30px; height: 34px; align-self: center; padding: 0; border: 1px solid #3a4648; border-radius: 3px; background: #20282a; color: #829092; font-size: 15px; }
.mini-game-favorite.active { color: var(--member-yellow); }
.mini-game-mark { width: 28px; height: 28px; display: grid; place-content: center; border-radius: 3px; background: #274e69; color: #d9ebf6; font-size: 7px; font-weight: 900; }
.mini-game-mark.ladder { background: #5a4131; color: #f0dfd1; }
.mini-game-mark.speed { background: #55324f; color: #f0d9ec; }
.mini-game-icon { width: 28px; height: 28px; display: block; overflow: hidden; border: 1px solid #3c494b; border-radius: 3px; background: #20282a; }
.mini-game-icon img { width: 100%; height: 100%; display: block; object-fit: cover; }
.mini-game-rail .primary-cell { min-width: 0; overflow: hidden; color: #d7dedd; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.mini-game-rail .mini-game-select.active .primary-cell { color: #ffffff; }
.mini-game-rail .sub-cell { overflow: hidden; color: #748184; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.mini-game-rail .mini-game-select.active .sub-cell { color: #a8ddd9; }
.mini-game-rail .mini-game-select > small { color: #6f7d7f; font-size: 7px; text-align: right; }
.mini-game-area { min-width: 0; border: 1px solid #343d3f; background: #151a1c; color: #ffffff; }
.mini-round-head { min-height: 64px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #343d3f; background: #202628; }
.mini-round-head span { color: var(--member-teal); font-size: 8px; font-weight: 800; }
.mini-round-head h1 { margin: 4px 0 0; font-size: 15px; }
.mini-round-clock { text-align: right; }
.mini-round-clock span { display: block; color: #849194; }
.mini-round-clock b { display: block; margin-top: 5px; color: var(--member-yellow); font-size: 12px; }
.mini-draw-stage { min-height: 225px; padding: 14px; background: #20292c; }
.mini-game-cover { width: 100%; aspect-ratio: 16 / 5; margin-bottom: 12px; display: block; overflow: hidden; border: 1px solid #3b4648; background: #151b1d; }
.mini-game-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.mini-stage-top { display: flex; align-items: center; justify-content: space-between; color: #788689; font-size: 8px; font-weight: 800; }
.mini-draw-balls { min-height: 120px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.mini-draw-balls span { width: 48px; height: 48px; display: grid; place-content: center; border: 4px solid rgba(255,255,255,0.20); border-radius: 50%; background: #e5c33f; color: #23230f; font-size: 14px; font-weight: 900; box-shadow: inset 0 -7px 0 rgba(0,0,0,0.12); }
.mini-draw-balls span:nth-child(2),
.mini-draw-balls span:nth-child(5) { background: #5ba5d0; color: #ffffff; }
.mini-draw-balls span:nth-child(3) { background: #d85a56; color: #ffffff; }
.mini-draw-balls span.power { margin-left: 8px; background: #e2514e; color: #ffffff; outline: 4px solid rgba(226,81,78,0.22); }
.mini-result-meta { min-height: 48px; padding: 0 12px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid #3b4648; background: #151b1d; }
.mini-result-meta span { color: #7d898c; font-size: 8px; }
.mini-result-meta b { font-size: 10px; text-align: center; }
.mini-market-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: #343d3f; border-top: 1px solid #343d3f; }
.mini-market-group { min-width: 0; padding: 10px; background: #171d1f; }
.mini-market-group h2 { margin: 0 0 8px; color: #aab4b5; font-size: 9px; }
.mini-market-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.mini-odds-control { min-width: 0; min-height: 45px; padding: 5px 8px; display: flex; align-items: center; justify-content: space-between; gap: 5px; border: 1px solid #424c4e; border-radius: 3px; background: #252c2e; color: #dce2e1; text-align: left; }
.mini-odds-control span { min-width: 0; }
.mini-odds-control span b { display: block; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.mini-odds-control span small { display: block; margin-top: 3px; overflow: hidden; color: #788588; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.mini-odds-control > strong { color: #62cfc6; font-size: 12px; font-variant-numeric: tabular-nums; }
.mini-odds-control.selected { border-color: #18b9ae; background: #0e5e59; box-shadow: inset 3px 0 0 #31d3c7; }
.member-view-mini { width: min(1620px, 100%); }

.member-record-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-bottom: 22px; border: 1px solid #cbd2d0; background: #cbd2d0; }
.member-record-band div { min-height: 86px; padding: 15px; background: #ffffff; }
.member-record-band span { display: block; color: #718082; font-size: 10px; }
.member-record-band b { display: block; margin-top: 11px; font-size: 20px; font-variant-numeric: tabular-nums; }
.member-wallet-band { min-height: 112px; padding: 20px 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 20px; border: 1px solid #253032; border-radius: 6px; background: #172022; color: #ffffff; }
.member-wallet-band div { color: var(--member-teal); font-size: 9px; font-weight: 800; }
.member-wallet-band strong { grid-row: 1 / 3; grid-column: 2; color: var(--member-yellow); font-size: 26px; font-variant-numeric: tabular-nums; }
.member-wallet-band span { color: #8f9b9d; font-size: 10px; }
.member-wallet-grid { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 10px; margin-top: 12px; }
.member-wallet-card { min-width: 0; min-height: 142px; padding: 16px; border: 1px solid #cbd2d0; border-top: 4px solid #667477; border-radius: 5px; background: #ffffff; }
.member-wallet-card.wallet-racing { border-top-color: #168f86; }
.member-wallet-card.wallet-sports { border-top-color: #d2a91d; }
.member-wallet-card.wallet-casino { border-top-color: #c94e4d; }
.member-wallet-card.wallet-mini { border-top-color: #4380b0; }
.member-wallet-card > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #667477; font-size: 10px; }
.member-wallet-card > strong { display: block; margin-top: 20px; font-size: 23px; font-variant-numeric: tabular-nums; }
.member-wallet-card p { margin: 10px 0 0; color: #748184; font-size: 9px; }
.member-wallet-card small { display: block; margin-top: 6px; color: #929c9e; font-size: 8px; }
.member-page-empty { min-height: 320px; display: grid; place-content: center; color: #778487; }

body[data-role="MEMBER"] .panel { border-color: #cbd2d0; border-radius: 5px; box-shadow: none; }
body[data-role="MEMBER"] .panel-header { border-color: #d7dddb; }
body[data-role="MEMBER"] table { font-size: 11px; }
body[data-role="MEMBER"] th { background: #eef2f0; }

@media (max-width: 1280px) {
  .member-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .casino-game-grid { grid-template-columns: repeat(3, minmax(190px, 1fr)); }
  .sports-workspace { grid-template-columns: minmax(0, 1fr) 300px; }
  .sports-category-rail { grid-column: 1 / -1; display: flex; overflow-x: auto; }
  .sports-category-row { min-width: 142px; border-right: 1px solid #e1e5e4; border-bottom: 0; }
  .sports-event-row { grid-template-columns: 66px minmax(170px, 0.75fr) minmax(260px, 1fr); }
  .mini-workspace { grid-template-columns: 190px minmax(0, 1fr) 290px; }
  .mini-game-rail .sub-cell { display: none; }
}

@media (max-width: 1020px) {
  .member-topbar { grid-template-columns: 150px minmax(0, 1fr) auto; }
  .member-product-nav button { min-width: 82px; padding: 0 12px; }
  .member-top-actions { padding-right: 10px; }
  .member-top-command { display: none; }
  .racing-workbench { grid-template-columns: minmax(0, 1fr) 310px; }
  .racing-session-meta { min-width: 220px; gap: 9px; }
  .racing-market-row { grid-template-columns: 32px minmax(120px, 1fr) minmax(140px, 0.9fr); }
  .runner-type { display: none; }
  .sports-workspace { grid-template-columns: 1fr; }
  .sports-workspace > .member-bet-slip { position: static; }
  .sports-toolbar { grid-template-columns: auto minmax(0, 1fr); }
  .sports-toolbar-status { display: none; }
  .sports-member-filter { grid-template-columns: minmax(130px, 1fr) 132px auto auto auto; }
  .casino-game-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .mini-workspace { grid-template-columns: 180px minmax(0, 1fr); }
  .mini-workspace > .member-bet-slip { grid-column: 2; position: static; }
  .member-wallet-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}

@media (max-width: 760px) {
  body[data-role="MEMBER"] { padding-bottom: 62px; }
  .member-topbar { height: 58px; grid-template-columns: 120px minmax(0, 1fr); }
  .member-brand { padding: 0 13px; }
  .member-brand strong { font-size: 15px; }
  .member-product-nav { display: none; }
  .member-top-actions { justify-content: flex-end; padding-right: 9px; }
  .member-balance-control { min-width: 100px; height: 36px; }
  .member-icon-command { width: 36px; height: 36px; }
  .member-main { min-height: calc(100vh - 58px); }
  .member-content { padding: 10px 9px 22px; }
  .member-bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 45; height: 62px; display: flex; align-items: stretch; border-top: 1px solid #343d3f; background: #101617; }
  .member-bottom-nav button { flex: 1; min-width: 0; padding: 5px 2px; display: grid; place-content: center; justify-items: center; gap: 4px; border: 0; background: transparent; color: #7f8c8e; }
  .member-bottom-nav button b { width: 22px; height: 22px; display: grid; place-content: center; border: 1px solid #445052; border-radius: 3px; font-size: 9px; }
  .member-bottom-nav button span { max-width: 54px; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
  .member-bottom-nav button.active { color: var(--member-yellow); }
  .member-bottom-nav button.active b { border-color: var(--member-yellow); background: #282817; }

  .member-command-band { min-height: 104px; padding: 16px; }
  .member-command-title h1 { font-size: 21px; }
  .member-command-account { min-width: 125px; }
  .member-command-account strong { font-size: 17px; }
  .member-command-account small { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .member-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 8px; }
  .member-product-copy { padding: 11px 11px 8px; }
  .member-product-copy h2 { font-size: 14px; }
  .member-product-copy p { font-size: 8px; }
  .member-product-visual { min-height: 76px; padding: 10px; }
  .product-track { height: 50px; }
  .product-scoreboard { min-height: 50px; gap: 5px; }
  .product-scoreboard b { font-size: 14px; }
  .product-table { min-height: 50px; gap: 4px; }
  .product-table span { width: 27px; height: 27px; font-size: 8px; }
  .product-balls { min-height: 50px; gap: 3px; }
  .product-balls span { width: 21px; height: 21px; font-size: 8px; }
  .member-product-foot { min-height: 36px; padding: 0 10px; }
  .member-home-section { margin-top: 17px; }
  .member-home-event { grid-template-columns: 64px minmax(0, 1fr); }
  .member-home-event > strong { display: none; }
  .member-home-split { grid-template-columns: 1fr; gap: 17px; }
  .member-casino-strip { gap: 5px; }
  .casino-compact-card .casino-game-art { min-height: 66px; padding: 7px; }
  .casino-compact-card .casino-table-mark { min-height: 34px; }
  .casino-compact-card .casino-table-mark span { width: 21px; height: 21px; font-size: 7px; }

  .member-workspace-segment { margin-bottom: 7px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border: 1px solid #343d3f; background: #343d3f; }
  .member-workspace-segment button { min-height: 38px; border: 0; background: #202729; color: #98a4a6; font-size: 10px; font-weight: 800; }
  .member-workspace-segment button.active { background: var(--member-teal); color: #ffffff; }
  .member-mobile-pane { display: none !important; }
  .member-mobile-pane.mobile-active { display: block !important; }
  .racing-session-bar { grid-template-columns: 1fr; }
  .racing-event-tabs button { min-width: 120px; }
  .racing-session-meta { min-width: 0; min-height: 42px; padding: 0 10px; justify-content: space-between; }
  .racing-workbench { grid-template-columns: 1fr; margin-top: 0; }
  .racing-race-head { min-height: 66px; padding: 10px; }
  .racing-race-metrics div { display: none; }
  .racing-race-metrics div:last-child { display: flex; }
  .racing-market-tools { grid-template-columns: minmax(0, 1fr); }
  .racing-market-tools > .member-workspace-segment { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .racing-runner-picker-controls { grid-template-columns: repeat(3, minmax(58px, 1fr)); }
  .racing-matrix-scroll { min-height: 390px; }
  .racing-symmetric-matrix { min-width: 528px; grid-template-columns: 42px repeat(var(--racing-runner-count), 58px); grid-auto-rows: 46px; }
  .racing-matrix-cell { min-height: 46px; }
  .racing-market-row { min-height: 61px; padding: 6px; grid-template-columns: 30px minmax(90px, 1fr) minmax(120px, 0.95fr); }
  .racing-market-matrix { min-height: 0; }
  .racing-context-pane { display: block; }
  .race-track-visual { min-height: 245px; }
  .race-track-oval { width: min(330px, 78vw); }
  .member-bet-slip { position: static; }
  .member-slip-empty { min-height: 190px; }
  .member-stake-presets button { min-height: 34px; }

  .sports-toolbar { padding: 8px; grid-template-columns: 1fr; }
  .sports-mode { width: 100%; }
  .sports-mode button { min-width: 0; flex: 1; }
  .sports-member-filter { grid-template-columns: minmax(0, 1fr) 132px auto; }
  .sports-member-filter .sports-favorites-filter { grid-column: 1; }
  .sports-member-filter .btn { min-width: 0; }
  .sports-workspace { grid-template-columns: 1fr; margin-top: 6px; }
  .sports-category-rail { grid-column: auto; }
  .sports-category-row { min-width: 128px; min-height: 42px; }
  .sports-category-select { min-height: 41px; grid-template-columns: 25px minmax(0, 1fr) 16px; }
  .sports-category-select .sports-glyph { width: 23px; height: 23px; }
  .sports-preference-toggle { min-height: 41px; }
  .sports-featured { min-height: 118px; padding: 10px; }
  .sports-featured-score { gap: 5px; }
  .sports-featured-score strong { font-size: 12px; }
  .sports-event-row { min-height: 0; padding: 10px; grid-template-columns: 52px minmax(0, 1fr); }
  .sports-market-grid { grid-column: 1 / -1; }
  .sports-odds-control { min-height: 46px; }
  .member-virtual-sports-grid { grid-template-columns: 1fr; }
  .member-virtual-sports-card { min-height: 78px; border-right: 0; border-bottom: 1px solid #3a4446; }
  .member-virtual-sports-card:last-child { border-bottom: 0; }

  .member-view-casino { min-height: calc(100vh - 130px); padding: 8px; }
  .casino-provider-status { min-width: 190px; }
  .casino-toolbar { min-height: 0; padding: 8px; display: grid; gap: 7px; }
  .casino-filter-tabs { overflow-x: auto; }
  .casino-filter-tabs button { min-width: 64px; }
  .casino-search { grid-template-columns: minmax(0, 1fr) 54px; }
  .casino-game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .casino-game-art { min-height: 118px; padding: 10px; }
  .casino-game-art > strong { font-size: 13px; }
  .casino-table-mark { min-height: 53px; gap: 4px; }
  .casino-table-mark span { width: 29px; height: 29px; font-size: 8px; }
  .casino-game-info { min-height: 76px; padding: 8px; grid-template-columns: minmax(0, 1fr) auto; }
  .casino-game-info .badge { display: none; }
  .casino-launch-body { grid-template-columns: 1fr; max-height: 65vh; overflow-y: auto; }
  .casino-order-history-list { grid-template-columns: minmax(0, 1fr); }
  .casino-order-row { border-right: 0; }
  .casino-order-insurance { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .casino-order-insurance > b { grid-column: 1 / -1; }

  .mini-workspace { grid-template-columns: 1fr; }
  .mini-game-rail { max-height: none; }
  .mini-game-rail .sub-cell { display: block; }
  .mini-game-area { min-width: 0; }
  .mini-workspace > .member-bet-slip { grid-column: auto; }
  .mini-draw-stage { min-height: 210px; padding: 10px; }
  .mini-draw-balls { min-height: 112px; gap: 5px; }
  .mini-draw-balls span { width: 39px; height: 39px; border-width: 3px; font-size: 12px; }
  .mini-draw-balls span.power { margin-left: 3px; }
  .mini-result-meta { grid-template-columns: 1fr; gap: 4px; padding: 8px; text-align: center; }
  .mini-market-groups { grid-template-columns: 1fr; }
  .member-record-band { grid-template-columns: 1fr; }
  .member-record-band div { min-height: 68px; }
  .member-wallet-band { min-height: 100px; padding: 15px; }
  .member-wallet-band strong { font-size: 19px; }
  .member-wallet-grid { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .member-command-account { min-width: 110px; }
  .member-command-account strong { font-size: 15px; }
  .member-product-copy h2 { font-size: 13px; }
  .product-score { display: none; }
  .mini-draw-balls span { width: 35px; height: 35px; }
  .sports-market-grid { grid-template-columns: 1fr; }
}

/* Sports/Toto operations */
.sports-ops-tabs button { min-width: 104px; }
.sports-mode-filter { margin: 0; flex: 0 0 auto; }
.sports-ops-layout { grid-template-columns: 220px minmax(440px, 1fr) 310px; }
.sports-ops-rail { max-height: calc(100vh - 96px); }
.sports-admin-projects { padding: 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; border-bottom: 1px solid var(--line); }
.sports-admin-projects button { min-width: 0; min-height: 38px; padding: 5px 7px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface-alt); color: var(--ink); text-align: left; }
.sports-admin-projects button b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sports-admin-projects button span { color: var(--muted); font-size: 9px; }
.sports-admin-projects button.active { border-color: #5aa99f; background: #e2f3f0; box-shadow: inset 3px 0 0 var(--accent); color: #075f59; }
.sports-admin-event-list { padding: 5px 8px 9px; }
.sports-admin-empty { min-height: 92px; padding: 10px; }
.sports-event-actions { min-height: 42px; margin: -3px 0 10px; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
.sports-feed-import-stack,
.sports-feed-waiting-stack { min-width: 0; display: grid; gap: 10px; }
.sports-feed-import-stack > .panel + .panel { margin-top: 2px; }
.sports-feed-filter-line { min-width: 0; display: grid; grid-template-columns: 120px minmax(150px, 190px) 150px minmax(220px, 1fr) auto auto; align-items: end; gap: 7px; }
.sports-feed-control { min-width: 0; display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 750; }
.sports-feed-control select,
.sports-feed-control input { width: 100%; min-width: 0; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 10px; }
.sports-feed-control select:focus,
.sports-feed-control input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); outline: 0; }
.sports-feed-selection-line { min-height: 38px; padding: 6px 8px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--surface-alt); color: var(--muted); font-size: 10px; }
.sports-feed-selection-line > span { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sports-feed-selection-line > b { flex: 0 0 auto; color: var(--ink); font-size: 10px; }
.sports-feed-waiting-stack table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.sports-feed-pagination { min-height: 34px; display: flex; align-items: center; justify-content: flex-end; gap: 6px; color: var(--muted); font-size: 10px; }
@media (max-width: 980px) {
  .sports-feed-filter-line { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sports-feed-search { grid-column: 1 / -1; }
  .sports-feed-selection-line { align-items: stretch; flex-wrap: wrap; }
  .sports-feed-selection-line > span { flex-basis: 100%; white-space: normal; }
}
.sports-admin-market-board { display: grid; gap: 10px; padding: 11px; }
.sports-admin-market-group { min-width: 0; border: 1px solid var(--line); border-top: 3px solid #1b8178; background: var(--surface-alt); }
.sports-admin-market-group.blocked { border-top-color: var(--danger); }
.sports-admin-market-head { min-height: 56px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
.sports-admin-market-head > div:first-child { min-width: 0; }
.sports-admin-market-head strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.sports-admin-market-head span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.sports-admin-odds-grid { padding: 9px; }
.sports-admin-odds-grid .racing-odds-cell { min-height: 124px; }
.sports-live-risk { max-height: calc(100vh - 96px); }
.sports-rules-stack { display: grid; gap: 12px; }
.sports-config-modal { width: min(800px, 100%); max-height: 92vh; overflow: auto; }
.sports-result-modal,
.sports-import-modal { width: min(900px, 100%); max-height: 92vh; overflow: auto; }
.sports-config-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.sports-config-grid .field { min-width: 0; margin-bottom: 0; }
.sports-config-toggles { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.sports-result-score-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.sports-result-score-grid .field { min-width: 0; margin-bottom: 0; }
.sports-result-impact { min-height: 42px; padding: 10px 12px; display: flex; align-items: center; border: 1px solid #d7b253; border-left: 4px solid #d7a820; background: #fff9e7; color: #5c4b20; font-size: 11px; font-variant-numeric: tabular-nums; }
.sports-import-preview { min-height: 46px; padding: 10px 12px; display: flex; align-items: center; border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--accent-soft); color: var(--ink); font-size: 11px; }
.manual-api-pause-toggle { width: 100%; }
.schedule-batch-modal { width: min(760px, calc(100vw - 28px)); }
.schedule-batch-body { gap: 12px; }
.schedule-batch-file { padding: 12px; border: 1px solid var(--line); background: var(--surface-alt); }
.schedule-batch-file input[type="file"] { width: 100%; color: var(--ink); }
.schedule-batch-selection { color: var(--muted); font-size: 11px; }
.schedule-batch-preview { min-height: 84px; display: grid; gap: 10px; }
.schedule-batch-empty { padding: 18px; border: 1px dashed var(--line-strong); color: var(--muted); text-align: center; }
.schedule-batch-ready { color: var(--success); }
.schedule-batch-blocked { color: var(--danger); }
.schedule-batch-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); }
.schedule-batch-fact { min-width: 0; padding: 10px 12px; display: grid; gap: 4px; border-right: 1px solid var(--line); }
.schedule-batch-fact:last-child { border-right: 0; }
.schedule-batch-fact span { color: var(--muted); font-size: 10px; }
.schedule-batch-fact b { color: var(--ink); font-size: 15px; }

/* Sports member multi-selection slip */
.sports-odds-control:disabled { cursor: not-allowed; opacity: 0.48; }
.sports-slip-selections { max-height: 330px; display: grid; gap: 5px; overflow-y: auto; }
.sports-slip-selection { min-height: 74px; }
.sports-slip-rule,
.sports-slip-warning { min-height: 38px; margin-top: 8px; padding: 8px 9px; display: flex; align-items: center; border: 1px solid #405052; color: #9dafb0; background: #20292a; font-size: 9px; line-height: 1.45; }
.sports-slip-rule { border-left: 3px solid #e4c72e; color: #e8da81; }
.sports-slip-warning { border-left: 3px solid #d55e58; color: #efaaa6; }
.sports-multi-slip .member-submit-bet:disabled { cursor: not-allowed; border-color: #495254; background: #343b3c; color: #7d898a; }

@media (max-width: 1380px) {
  .sports-ops-layout { grid-template-columns: 195px minmax(390px, 1fr) 280px; }
  .sports-admin-odds-grid { grid-template-columns: repeat(2, minmax(125px, 1fr)); }
}

@media (max-width: 1120px) {
  .sports-ops-layout { grid-template-columns: 195px minmax(0, 1fr); }
  .sports-live-risk { max-height: none; position: static; grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .sports-ops-toolbar { align-items: stretch; }
  .sports-mode-filter { width: fit-content; max-width: 100%; }
  .sports-ops-layout { grid-template-columns: minmax(0, 1fr); }
  .sports-ops-rail { max-height: 260px; position: static; }
  .sports-event-actions { justify-content: flex-start; }
  .sports-admin-market-head { align-items: flex-start; flex-direction: column; }
  .sports-config-grid,
  .sports-result-score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sports-config-toggles { grid-template-columns: minmax(0, 1fr); }
  .sports-slip-selections { max-height: none; }
}

@media (max-width: 640px) {
  .sports-admin-odds-grid { grid-template-columns: repeat(2, minmax(116px, 1fr)); }
  .sports-config-grid,
  .sports-result-score-grid { grid-template-columns: minmax(0, 1fr); }
  .modal-backdrop.sports-form-backdrop { padding: 0; place-items: stretch; }
  .sports-form-backdrop .racing-small-modal,
  .sports-form-backdrop .sports-config-modal,
  .sports-form-backdrop .sports-result-modal,
  .sports-form-backdrop .sports-import-modal { width: 100%; height: 100dvh; min-height: 0; max-height: 100dvh; overflow: auto; border-radius: 0; }
}

/* Unified settlement center */
.settlement-toolbar { min-width: 0; margin: 0 0 10px; display: grid; grid-template-columns: auto minmax(300px, 1fr) minmax(430px, auto); align-items: start; gap: 8px; }
.settlement-segment { min-width: 0; max-width: 100%; margin: 0; overflow-x: auto; scrollbar-width: thin; }
.settlement-segment button { min-width: 78px; white-space: nowrap; }
.settlement-domain-tabs { justify-self: start; }
.settlement-status-tabs { justify-self: end; }
.settlement-source-strip { min-height: 34px; margin-bottom: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }

@media (max-width: 1280px) {
  .settlement-toolbar { grid-template-columns: auto minmax(0, 1fr); }
  .settlement-status-tabs { width: 100%; justify-self: stretch; grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .settlement-toolbar { grid-template-columns: minmax(0, 1fr); }
  .settlement-segment,
  .settlement-status-tabs { width: calc(100vw - 24px); justify-self: stretch; grid-column: auto; }
  .settlement-segment button { flex: 0 0 auto; min-width: 84px; }
}

/* Brand, site and theme center */
.structured-form-section { grid-column: 1 / -1; min-height: 34px; margin-top: 5px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); font-size: 12px; font-weight: 750; }
.structured-form-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.structured-form-grid input[type="color"] { width: 100%; min-height: 42px; padding: 4px 6px; cursor: pointer; }
.modal.structured-modal-large { width: min(1040px, 100%); }
.brand-theme-stack { min-width: 0; display: grid; gap: 14px; }
.brand-theme-stack > * { min-width: 0; }
.brand-theme-stack > .panel + .panel { margin-top: 0; }
.brand-theme-security-strip { min-height: 38px; margin: -5px 0 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.brand-theme-security-strip > span:last-child { margin-left: auto; color: var(--muted); font-size: 10px; }
.brand-theme-workspace .table-wrap table { min-width: 1080px; }
.brand-theme-workspace .table-actions { min-width: 150px; }
.brand-theme-filters { grid-template-columns: minmax(240px, 1.7fr) repeat(2, minmax(150px, 0.76fr)) auto; }
.modal.brand-theme-preview-modal { width: min(1160px, 100%); max-height: 94vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.brand-theme-preview-body { min-width: 0; overflow-x: hidden; overflow-y: auto; display: grid; grid-auto-rows: max-content; align-content: start; gap: 14px; background: #f3f5f5; }
.brand-theme-preview-body > * { min-width: 0; max-width: 100%; }
.brand-theme-preview-body > .panel { overflow: visible; }
.brand-theme-preview-body .table-wrap { min-width: 0; max-width: 100%; overscroll-behavior-x: contain; }
.brand-theme-member-preview { min-width: 0; overflow: hidden; border: 1px solid #c9d0ce; border-radius: 5px; background: var(--preview-bg); color: #172024; }
.brand-theme-preview-head { min-height: 58px; display: grid; grid-template-columns: 160px minmax(0, 1fr); align-items: stretch; background: var(--preview-primary); color: #ffffff; }
.brand-theme-preview-logo { padding: 0 18px; display: flex; align-items: center; gap: 5px; border-right: 1px solid rgba(255,255,255,0.12); }
.brand-theme-preview-logo strong { font-size: 17px; }
.brand-theme-preview-logo span { color: var(--preview-accent); font-size: 10px; font-weight: 800; }
.brand-theme-preview-logo-image { width: 30px; height: 30px; flex: 0 0 30px; display: block; object-fit: contain; }
.brand-theme-preview-nav { min-width: 0; display: flex; align-items: stretch; overflow-x: auto; }
.brand-theme-preview-nav span { min-width: 82px; padding: 0 12px; display: grid; place-content: center; position: relative; color: rgba(255,255,255,0.62); font-size: 10px; font-weight: 700; white-space: nowrap; }
.brand-theme-preview-nav span.active { color: #ffffff; }
.brand-theme-preview-nav span.active::after { content: ""; position: absolute; right: 12px; bottom: 0; left: 12px; height: 3px; background: var(--preview-accent); }
.brand-theme-preview-main { min-height: 230px; padding: 28px; }
.brand-theme-preview-main > span { color: var(--preview-positive); font-size: 9px; font-weight: 850; }
.brand-theme-preview-main h3 { margin: 8px 0 0; font-size: 25px; }
.brand-theme-preview-main > p { margin: 7px 0 0; color: #677578; font-size: 11px; }
.brand-theme-preview-banner { min-height: 62px; margin-top: 24px; padding: 12px 15px; display: grid; align-content: center; gap: 4px; border-left: 4px solid var(--preview-accent); background: #ffffff; }
.brand-theme-preview-banner b { font-size: 12px; }
.brand-theme-preview-banner span { color: #667477; font-size: 10px; }
.brand-theme-preview-banner-media { grid-row: 1 / 3; width: 128px; height: 54px; overflow: hidden; }
.brand-theme-preview-banner-media img { width: 100%; height: 100%; display: block; object-fit: cover; }
.brand-theme-preview-banner:has(.brand-theme-preview-banner-media) { grid-template-columns: 128px minmax(0, 1fr); column-gap: 12px; }
.brand-theme-preview-banner:has(.brand-theme-preview-banner-media) > b,
.brand-theme-preview-banner:has(.brand-theme-preview-banner-media) > span { grid-column: 2; }
.brand-theme-preview-banner.tone-info { border-left-color: #4d8fc5; }
.brand-theme-preview-banner.tone-success { border-left-color: var(--preview-positive); }
.brand-theme-preview-banner.tone-warning { border-left-color: #d78b1e; }
.brand-theme-preview-facts { border: 1px solid var(--line); background: var(--surface); }
.brand-theme-preview-body > .panel { margin-top: 0; }
.brand-theme-preview-body .table-wrap table { min-width: 780px; }

.member-app-shell[data-header="bordered"] .member-topbar { box-shadow: inset 0 -3px 0 var(--member-yellow); }
.member-app-shell[data-cards="flat"] .member-product-card { border-color: transparent; box-shadow: none; }
.member-app-shell[data-density="comfortable"] .member-content { padding-top: 30px; }
.member-app-shell[data-density="comfortable"] .member-product-grid { gap: 18px; }
.member-command-band { background: var(--member-dark); }
.member-brand-banner { min-height: 62px; margin-top: 14px; padding: 12px 16px; display: grid; align-content: center; gap: 4px; border-left: 4px solid var(--member-yellow); background: #ffffff; color: var(--member-ink); }
.member-brand-banner b { font-size: 13px; }
.member-brand-banner span { color: #667477; font-size: 10px; line-height: 1.5; }
.member-brand-banner-media { grid-row: 1 / 3; width: 148px; height: 58px; overflow: hidden; }
.member-brand-banner-media img { width: 100%; height: 100%; display: block; object-fit: cover; }
.member-brand-banner:has(.member-brand-banner-media) { grid-template-columns: 148px minmax(0, 1fr); column-gap: 12px; }
.member-brand-banner:has(.member-brand-banner-media) > b,
.member-brand-banner:has(.member-brand-banner-media) > span { grid-column: 2; }
.member-brand-banner.tone-info { border-left-color: var(--member-blue); }
.member-brand-banner.tone-success { border-left-color: var(--member-teal); }
.member-brand-banner.tone-warning { border-left-color: #d78b1e; }

@media (max-width: 760px) {
  .brand-theme-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-theme-filters > .btn { grid-column: 1 / -1; }
  .brand-theme-security-strip > span:last-child { width: 100%; margin-left: 0; }
  .brand-theme-preview-main { min-height: 200px; padding: 20px; }
  .member-brand-banner { margin-top: 9px; padding: 10px 12px; }
}

@media (max-width: 640px) {
  .brand-theme-workspace > .section-head { align-items: stretch; flex-direction: column; }
  .brand-theme-workspace > .section-head .section-actions { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .brand-theme-workspace > .section-head .section-actions .btn { min-width: 0; padding: 0 6px; white-space: nowrap; }
  .brand-theme-workspace > .section-head .section-actions .btn.icon { width: 100%; }
  .brand-theme-workspace .panel { min-width: 0; max-width: 100%; overflow: hidden; }
  .brand-theme-workspace .table-wrap { min-width: 0; max-width: 100%; overscroll-behavior-x: contain; }
  .modal-backdrop.brand-theme-preview-backdrop { padding: 0; place-items: stretch; }
  .modal.brand-theme-preview-modal { width: 100%; height: 100dvh; min-height: 0; max-height: 100dvh; border-radius: 0; }
  .brand-theme-filters { grid-template-columns: minmax(0, 1fr); }
  .brand-theme-filters > .btn { grid-column: auto; }
  .brand-theme-preview-head { grid-template-columns: 120px minmax(0, 1fr); }
  .brand-theme-preview-logo { padding: 0 12px; }
  .brand-theme-preview-logo-image { width: 26px; height: 26px; flex-basis: 26px; }
  .brand-theme-preview-nav span { min-width: 70px; padding: 0 8px; }
  .brand-theme-preview-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-theme-preview-facts .member-detail-fact:nth-child(2n) { border-right: 0; }
  .brand-theme-preview-facts .member-detail-fact:nth-child(4n) { border-right: 1px solid var(--line); }
  .brand-theme-preview-banner:has(.brand-theme-preview-banner-media),
  .member-brand-banner:has(.member-brand-banner-media) { grid-template-columns: minmax(0, 1fr); }
  .brand-theme-preview-banner-media,
  .member-brand-banner-media { grid-row: auto; width: 100%; height: auto; aspect-ratio: 16 / 5; }
  .brand-theme-preview-banner:has(.brand-theme-preview-banner-media) > b,
  .brand-theme-preview-banner:has(.brand-theme-preview-banner-media) > span,
  .member-brand-banner:has(.member-brand-banner-media) > b,
  .member-brand-banner:has(.member-brand-banner-media) > span { grid-column: 1; }
}

/* Communication, support and member account */
.communication-workspace,
.agent-activity-workspace { min-width: 0; }
.communication-workspace > .stage-seven-tabs { margin: 12px 0; }
.support-detail-modal { width: min(900px, 100%); max-height: 92vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.support-detail-modal .modal-head > div { min-width: 0; }
.support-detail-modal .modal-head h3 { margin: 0; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.support-detail-modal .modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.support-detail-body { min-width: 0; overflow-y: auto; }
.support-detail-facts { min-width: 0; margin-bottom: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface-soft); }
.support-detail-facts > .primary-cell { min-width: 0; padding: 11px; border-right: 1px solid var(--line); }
.support-detail-facts > .primary-cell:last-child { border-right: 0; }
.support-conversation { min-width: 0; display: grid; gap: 8px; }
.support-message { max-width: 78%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; background: #f8faf9; }
.support-message-admin { justify-self: end; border-color: #9fd9d3; background: #e8f7f5; }
.support-message-auto-reply { justify-self: end; border-style: dashed; border-color: #64b8ad; background: #f0faf8; }
.support-message-auto-reply .support-message-meta { color: #17796f; font-weight: 800; }
.support-message-agent,
.support-message-member { justify-self: start; }
.support-message-meta { overflow-wrap: anywhere; color: var(--muted); font-size: 9px; }
.support-message p { margin: 6px 0 0; overflow-wrap: anywhere; color: var(--ink); font-size: 12px; line-height: 1.65; white-space: pre-wrap; }
.support-detail-modal .support-message:not(.support-message-auto-reply) .support-message-meta { color: #667477; }
.support-detail-modal .support-message p { color: #263638; }
.support-attachment-list { min-width: 0; margin-top: 9px; display: grid; border-top: 1px solid var(--line); }
.support-attachment-row { min-width: 0; min-height: 42px; padding: 7px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.support-attachment-row:last-child { border-bottom: 0; }
.support-attachment-row .primary-cell { min-width: 0; overflow-wrap: anywhere; font-size: 10px; }
.support-attachment-row .sub-cell { font-size: 8px; }
.support-attachment-row .btn { min-width: 58px; }
.support-form-modal { width: min(760px, 100%); max-height: 92vh; overflow: auto; }
.modal.report-export-create-modal { width: min(620px, 100%); height: auto; min-height: 0; max-height: min(92vh, 720px); }
.support-form textarea { min-height: 150px; resize: vertical; }
.support-form-summary { margin: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; }
.support-quick-reply-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.support-quick-reply-controls select { min-width: 0; width: 100%; }
.support-quick-reply-field .field-hint { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.agent-access-check { align-self: end; }
.agent-access-check label { min-height: 40px; display: flex; gap: 8px; align-items: center; }
.agent-access-check input { width: 16px; height: 16px; }
.account-access-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.support-attachment-field input[type="file"] { width: 100%; min-height: 42px; padding: 6px; border: 1px solid var(--line-strong); background: #ffffff; color: var(--ink); font: inherit; }
.support-attachment-field input[type="file"]::file-selector-button { min-height: 28px; margin-right: 10px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface-soft); color: var(--ink); font: inherit; font-weight: 750; cursor: pointer; }
.support-file-selection { min-height: 18px; overflow-wrap: anywhere; color: var(--muted); font-size: 9px; line-height: 1.5; }

.member-service-workspace,
.member-account-workspace { min-width: 0; }
.member-service-head { min-height: 156px; padding: 24px 26px; display: grid; grid-template-columns: minmax(240px, 1fr) auto auto; align-items: center; gap: 24px; background: var(--member-dark); color: #ffffff; }
.member-service-head > div:first-child { min-width: 0; }
.member-service-head > div:first-child > span { color: var(--member-teal); font-size: 9px; font-weight: 850; }
.member-service-head h1 { margin: 6px 0 0; font-size: 24px; letter-spacing: 0; }
.member-service-head p { margin: 7px 0 0; color: #8f9a9c; font-size: 10px; }
.member-service-metrics { display: grid; grid-template-columns: repeat(3, minmax(76px, 1fr)); border: 1px solid #394244; }
.member-service-metrics div { min-height: 58px; padding: 9px 12px; display: grid; place-content: center; gap: 4px; border-right: 1px solid #394244; text-align: center; }
.member-service-metrics div:last-child { border-right: 0; }
.member-service-metrics b { color: var(--member-yellow); font-size: 17px; }
.member-service-metrics span { color: #9aa5a7; font-size: 8px; white-space: nowrap; }
.member-support-contact-strip { min-height: 52px; padding: 9px 14px; display: flex; align-items: center; gap: 18px; border: 1px solid #c9d0ce; border-top: 0; background: #f5f7f6; }
.member-support-contact-strip > strong { flex: 0 0 auto; color: #172024; font-size: 10px; }
.member-support-contact-strip .primary-cell { min-width: 120px; }
.member-support-contact-strip .primary-cell > span:first-child { font-size: 10px; }
.member-support-contact-strip .primary-cell > span:last-child { color: #657275; font-size: 9px; }
.member-service-tabs { min-height: 44px; margin-top: 10px; display: flex; border: 1px solid #c9d0ce; background: #ffffff; }
.member-service-tabs button { min-width: 96px; padding: 0 18px; border: 0; border-right: 1px solid #d8dedc; background: transparent; color: #657275; font-size: 11px; font-weight: 750; }
.member-service-tabs button.active { background: #172024; color: #ffffff; box-shadow: inset 0 -3px 0 var(--member-yellow); }
.member-service-list { min-width: 0; border: 1px solid #c9d0ce; border-top: 0; background: #ffffff; }
.member-service-row { min-width: 0; min-height: 86px; padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; border-bottom: 1px solid #dce1df; }
.member-service-row:last-child { border-bottom: 0; }
.member-service-row.unread { box-shadow: inset 4px 0 0 var(--member-teal); }
.member-service-row > div { min-width: 0; }
.member-service-row b { display: block; overflow-wrap: anywhere; font-size: 12px; }
.member-service-row p { margin: 6px 0 0; overflow-wrap: anywhere; color: #566568; font-size: 10px; line-height: 1.55; }
.member-service-row small { display: block; margin-top: 7px; color: #849194; font-size: 8px; }
.member-service-empty,
.member-page-loading { min-height: 180px; display: grid; place-content: center; color: #788689; font-size: 11px; }

.member-account-head { min-height: 128px; padding: 20px 24px; display: grid; grid-template-columns: minmax(240px, 1fr) auto auto; align-items: center; gap: 22px; background: var(--member-dark); color: #ffffff; }
.member-account-identity { min-width: 0; display: flex; align-items: center; gap: 12px; }
.member-account-identity .primary-cell { min-width: 0; }
.member-account-identity .primary-cell > span:first-child { overflow: hidden; color: #ffffff; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.member-account-identity .sub-cell { color: #879396; }
.member-account-avatar { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-content: center; border: 1px solid #526062; border-radius: 5px; background: #20282a; color: var(--member-yellow); font-size: 18px; font-weight: 850; }
.member-account-head-facts { display: grid; grid-template-columns: repeat(3, minmax(78px, 1fr)); border: 1px solid #3a4446; }
.member-account-head-facts div { min-height: 54px; padding: 8px 11px; display: grid; align-content: center; gap: 4px; border-right: 1px solid #3a4446; }
.member-account-head-facts div:last-child { border-right: 0; }
.member-account-head-facts span { color: #879396; font-size: 8px; }
.member-account-head-facts b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.member-account-quick-actions { margin-top: 9px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid #c9d0ce; background: #c9d0ce; }
.member-account-quick-actions button { min-height: 62px; padding: 10px 14px; display: grid; align-content: center; gap: 4px; border: 0; background: #ffffff; color: var(--member-ink); text-align: left; }
.member-account-quick-actions button:hover { background: #f3f7f5; }
.member-account-quick-actions b { font-size: 11px; }
.member-account-quick-actions span { color: #778487; font-size: 9px; }
.member-account-summary { margin-top: 9px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border: 1px solid #c9d0ce; background: #c9d0ce; }
.member-account-summary > div { min-height: 88px; padding: 14px; display: grid; align-content: center; gap: 4px; background: #ffffff; }
.member-account-summary span { color: #667477; font-size: 9px; }
.member-account-summary b { font-size: 21px; }
.member-account-summary small { color: #8a9698; font-size: 8px; }
.member-account-section { min-width: 0; margin-top: 18px; border-top: 2px solid #172024; background: #ffffff; }
.member-account-section > .section-head { min-height: 58px; margin: 0; padding: 10px 14px; border: 1px solid #c9d0ce; border-top: 0; }
.member-account-section > .section-head h2 { font-size: 13px; }
.member-payout-account-row { min-height: 68px; padding: 11px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; border: 1px solid #c9d0ce; border-top: 0; }
.member-payout-account-policy { display: grid; justify-items: end; gap: 6px; }
.member-payout-account-policy > span { max-width: 360px; color: #718083; font-size: 9px; text-align: right; line-height: 1.45; }
.member-account-list { min-width: 0; border: 1px solid #c9d0ce; border-top: 0; }
.member-account-list-row { min-width: 0; min-height: 58px; padding: 9px 13px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(130px, auto); align-items: center; gap: 12px; border-bottom: 1px solid #dce1df; }
.member-account-list-row:last-child { border-bottom: 0; }
.member-account-list-row > .primary-cell { min-width: 0; }
.member-account-list-row > span:last-child { overflow: hidden; color: #718083; font-size: 9px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.member-account-split { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.member-account-modal { width: min(720px, 100%); }
.member-account-form .modal-actions { margin: 18px -18px -18px; }
.member-account-confirm-modal { width: min(520px, 100%); }
.member-account-confirm { display: grid; gap: 8px; }
.member-account-confirm strong { font-size: 13px; }
.member-account-confirm p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }

@media (max-width: 900px) {
  .member-service-head,
  .member-account-head { grid-template-columns: minmax(0, 1fr) auto; }
  .member-service-head > .btn,
  .member-account-head > .btn { grid-column: 1 / -1; justify-self: start; }
  .member-account-split { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

@media (max-width: 640px) {
  .modal-backdrop.support-detail-backdrop,
  .modal-backdrop.support-form-backdrop,
  .modal-backdrop.member-account-backdrop { padding: 0; place-items: stretch; }
  .support-detail-modal,
  .support-form-modal,
  .member-account-modal,
  .member-account-confirm-modal { width: 100%; height: 100dvh; min-height: 0; max-height: 100dvh; border-radius: 0; }
  .support-form-modal,
  .member-account-modal,
  .member-account-confirm-modal { overflow: auto; }
  .modal-backdrop.report-export-create-backdrop { padding: 12px; place-items: center; }
  .modal.report-export-create-modal { width: 100%; height: auto; min-height: 0; max-height: calc(100dvh - 24px); border-radius: 6px; overflow: auto; }
  .support-detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .support-detail-facts > .primary-cell:nth-child(2) { border-right: 0; }
  .support-detail-facts > .primary-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .support-message { max-width: 92%; }
  .account-access-strip { grid-template-columns: minmax(0, 1fr); }
  .support-quick-reply-controls { grid-template-columns: minmax(0, 1fr); }
  .support-attachment-row { grid-template-columns: minmax(0, 1fr) 64px; }
  .support-attachment-row .btn { width: 64px; min-width: 0; padding: 0 6px; }
  .member-service-head,
  .member-account-head { min-height: 0; padding: 16px; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .member-service-head h1 { font-size: 20px; }
  .member-service-metrics { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .member-service-head > .btn,
  .member-account-head > .btn { width: 100%; grid-column: auto; justify-self: stretch; }
  .member-support-contact-strip { align-items: flex-start; flex-direction: column; gap: 8px; }
  .member-support-contact-strip .primary-cell { width: 100%; min-width: 0; }
  .member-service-tabs button { min-width: 0; flex: 1; padding: 0 8px; }
  .member-service-row { min-height: 92px; padding: 12px; gap: 8px; }
  .member-service-row > .btn { min-width: 68px; padding: 0 8px; }
  .member-account-head-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .member-account-quick-actions { grid-template-columns: minmax(0, 1fr); }
  .member-account-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-account-section { margin-top: 12px; }
  .member-account-section > .section-head { align-items: stretch; flex-direction: column; }
  .member-account-section > .section-head .btn { width: 100%; }
  .member-payout-account-row { grid-template-columns: minmax(0, 1fr); }
  .member-payout-account-policy { justify-items: start; }
  .member-payout-account-policy > span { text-align: left; }
  .member-account-list-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .member-account-list-row > span:last-child { grid-column: 1 / -1; text-align: left; }
}

/* Foundation 1.124: isolated demo data generator */
.demo-data-guard-band {
  min-height: 42px;
  margin-bottom: 12px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #9fd9d3;
  background: #edf9f6;
  color: #315c57;
  font-size: 10px;
}
.demo-data-guard-band.blocked { border-color: #e4c187; background: #fff8e9; color: #73531f; }
.demo-data-guard-band span:last-child { min-width: 0; overflow-wrap: anywhere; }
.demo-data-filters { grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(130px, .7fr)) auto; }
.demo-data-modal { width: min(980px, 100%); max-height: 92vh; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.demo-data-form { min-width: 0; overflow-y: auto; }
.demo-data-ranges { min-width: 0; margin-top: 18px; border-top: 1px solid var(--line); }
.demo-data-ranges h3,
.demo-data-preview h3,
.demo-data-detail-title { margin: 14px 0 9px; font-size: 12px; }
.demo-data-range-row {
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: 64px repeat(4, minmax(90px, 1fr));
  align-items: end;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.demo-data-range-row > strong { padding-bottom: 12px; font-size: 10px; }
.demo-data-range-field { min-width: 0; padding: 7px 0; display: grid; gap: 4px; color: var(--muted); font-size: 9px; }
.demo-data-range-field input { width: 100%; min-width: 0; height: 32px; }
.demo-data-preview-root { min-width: 0; margin-top: 14px; }
.demo-data-preview { min-width: 0; padding-top: 1px; border-top: 1px solid var(--line); }
.demo-data-preview .kpi-grid { margin-bottom: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.demo-data-preview .kpi { min-height: 78px; }
.demo-data-preview .kpi-value { font-size: 18px; }
.demo-data-detail-modal { width: min(820px, 100%); max-height: 92vh; overflow: auto; }
.demo-data-detail-facts { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface-soft); }
.demo-data-detail-facts > * { min-width: 0; padding: 11px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.demo-data-detail-facts > *:nth-child(3n) { border-right: 0; }
.demo-data-detail-facts > *:nth-last-child(-n+3) { border-bottom: 0; }
.demo-data-guard-status { min-height: 64px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #9fd9d3; background: #edf9f6; }
.demo-data-guard-status.blocked { border-color: #e4c187; background: #fff8e9; }
.demo-data-guard-status strong,
.demo-data-guard-status span { display: block; }
.demo-data-guard-status strong { font-size: 12px; }
.demo-data-guard-status div > span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.demo-data-guard-reasons { display: grid; gap: 5px; }
.demo-data-guard-reasons:empty { display: none; }
.demo-data-guard-reasons span { padding: 7px 10px; border-left: 3px solid #c88b2b; background: #fff8e9; color: #73531f; font-size: 10px; }
.demo-data-excluded-list { min-height: 58px; padding: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }

@media (max-width: 1000px) {
  .demo-data-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-data-filters .member-filter-actions { grid-column: 1 / -1; }
  .demo-data-preview .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .modal-backdrop.demo-data-modal-backdrop { padding: 0; place-items: stretch; }
  .demo-data-modal,
  .demo-data-detail-modal { width: 100%; height: 100dvh; min-height: 0; max-height: 100dvh; border-radius: 0; }
  .demo-data-filters { grid-template-columns: minmax(0, 1fr); }
  .demo-data-filters .member-filter-actions { grid-column: auto; }
  .demo-data-range-row { padding: 8px 0; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .demo-data-range-row > strong { grid-column: 1 / -1; padding: 0; }
  .demo-data-range-field { padding: 0; }
  .demo-data-detail-facts { grid-template-columns: minmax(0, 1fr); }
  .demo-data-detail-facts > * { border-right: 0; border-bottom: 1px solid var(--line); }
  .demo-data-detail-facts > *:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .demo-data-detail-facts > *:last-child { border-bottom: 0; }
  .demo-data-guard-band { align-items: flex-start; flex-direction: column; }
}

/* Foundation 1.22: unified operational configuration center */
.configuration-center-workspace { min-width: 0; }
.configuration-center-workspace .table-wrap { min-width: 0; max-width: 100%; }
.configuration-center-workspace .table-wrap table { min-width: 980px; }
.configuration-center-workspace .configuration-play-limit-table table { min-width: 1420px; }
.configuration-center-workspace .table-actions { min-width: 118px; }
.configuration-center-workspace .primary-cell,
.configuration-center-workspace td { overflow-wrap: anywhere; }
.configuration-security-strip { min-height: 46px; margin: -8px 0 18px; padding: 8px 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; border: 1px solid var(--line); border-left: 3px solid #198b83; background: #ffffff; }
.configuration-security-strip > span:last-child { margin-left: auto; color: var(--muted); font-size: 10px; }
.configuration-stack { min-width: 0; display: grid; gap: 14px; }
.configuration-stack > * { min-width: 0; max-width: 100%; }
.configuration-capability-list { min-width: 150px; display: flex; flex-wrap: wrap; gap: 4px; }
.configuration-capability-list .badge { white-space: nowrap; }
.configuration-access-marks { min-width: 176px; display: grid; grid-template-columns: repeat(3, minmax(52px, 1fr)); gap: 4px; }
.configuration-access-marks .badge { justify-content: center; white-space: nowrap; }
.configuration-filters { margin-bottom: 12px; }
.configuration-detail-modal { width: min(1080px, 100%); }
.configuration-detail-body { min-width: 0; display: grid; gap: 14px; }
.configuration-detail-body > .member-detail-facts { margin: 0; }
.configuration-detail-body > .panel { min-width: 0; margin: 0; }
.configuration-detail-body .table-wrap table { min-width: 720px; }

@media (max-width: 760px) {
  .configuration-center-workspace > .section-head { align-items: stretch; flex-direction: column; }
  .configuration-center-workspace > .section-head .section-actions { width: 100%; }
  .configuration-center-workspace > .section-head .btn.icon { width: 100%; }
  .configuration-security-strip > span:last-child { width: 100%; margin-left: 0; }
  .configuration-center-workspace .panel { min-width: 0; max-width: 100%; overflow: hidden; }
  .configuration-center-workspace .table-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
  .configuration-filters { grid-template-columns: minmax(0, 1fr); }
  .configuration-filters .btn { width: 100%; }
}

@media (max-width: 640px) {
  .configuration-detail-body > .member-detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .configuration-detail-modal .modal-actions { position: sticky; bottom: 0; background: #ffffff; }
}

/* Foundation 1.54: compact four-domain external data bridge */
.external-feed-connector { min-width: 0; margin: 0 0 14px; padding: 14px; border: 1px solid var(--line); border-top: 3px solid #168ca4; background: var(--surface-alt); box-shadow: none; }
.external-feed-connector-head { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.external-feed-connector-head h2 { margin: 0 0 5px; font-size: 18px; }
.external-feed-connector-head p { margin: 0; color: var(--muted); line-height: 1.55; }
.external-feed-security { flex: 0 0 auto; max-width: 100%; padding: 7px 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #2b6872; background: #102f37; color: #8de6d8; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.external-feed-security .lucide-icon { width: 14px; height: 14px; }
.external-feed-domain-tabs { min-width: 0; margin-bottom: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--line); background: var(--surface); }
.external-feed-domain-tabs.single { grid-template-columns: minmax(0, 1fr); }
.external-feed-domain-tabs button { min-width: 0; height: 38px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.external-feed-domain-tabs button:last-child { border-right: 0; }
.external-feed-domain-tabs button:hover { background: var(--surface-alt); color: var(--text); }
.external-feed-domain-tabs button.active { background: #176cc1; color: #fff; }
.external-feed-domain-tabs .lucide-icon { width: 15px; height: 15px; }
.external-feed-grid { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.external-feed-card { min-width: 0; padding: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: none; }
.external-feed-line { min-width: 0; padding: 12px; border: 1px solid var(--line); border-left: 3px solid #31516b; background: var(--surface); box-shadow: none; }
.external-feed-line.active { border-left-color: #18d4ff; background: #0b2235; }
.external-feed-card-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.external-feed-card-title { min-width: 0; display: flex; align-items: center; gap: 8px; }
.external-feed-card-title strong { overflow-wrap: anywhere; }
.external-feed-card-title small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.external-feed-domain { width: 28px; height: 28px; flex: 0 0 28px; padding: 6px; background: #173b55; color: #8be9ff; }
.external-feed-card .field { min-width: 0; }
.external-feed-card input { min-width: 0; width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.external-feed-line input { min-width: 0; width: 100%; }
.external-feed-line-fields { min-width: 0; display: grid; grid-template-columns: minmax(150px, .32fr) minmax(300px, 1fr); gap: 9px; }
.external-feed-actions { min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 13px; }
.external-feed-actions .btn { min-width: 0; flex: 1 1 120px; }
.external-feed-facts { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.external-feed-facts > span { min-width: 0; padding: 9px; display: grid; gap: 4px; background: var(--surface-alt); }
.external-feed-facts small { color: var(--muted); font-size: 10px; }
.external-feed-facts b { min-width: 0; font-size: 11px; font-weight: 650; overflow-wrap: anywhere; word-break: break-word; }
.external-feed-preview { min-width: 0; margin-top: 11px; display: grid; gap: 5px; }
.external-feed-preview-row { min-width: 0; padding: 8px 9px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(70px, .65fr) auto; align-items: center; gap: 8px; border-left: 3px solid #5ba9a2; background: var(--surface-alt); font-size: 11px; }
.external-feed-preview-row strong, .external-feed-preview-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.external-feed-preview-row span, .external-feed-preview-row time { color: var(--muted); }
.external-feed-preview-row time { white-space: nowrap; font-size: 10px; }
.external-feed-empty { padding: 10px; border: 1px dashed var(--line); color: var(--muted); background: var(--surface-alt); font-size: 11px; line-height: 1.5; }
.external-feed-error { margin: 9px 0 0; padding: 8px 9px; border-left: 3px solid #c84b4b; background: #fff2f2; color: #9a3030; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.external-feed-add-line { min-height: 38px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--line); background: var(--surface-alt); }
.external-feed-add-line .btn { min-width: 150px; }
.racing-feed-format { min-width: 0; border: 1px solid var(--line); background: var(--surface); }
.racing-feed-format > summary { min-width: 0; min-height: 46px; padding: 9px 11px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; color: var(--text); cursor: pointer; }
.racing-feed-format > summary:hover { background: var(--surface-alt); }
.racing-feed-format > summary:focus-visible { outline: 2px solid var(--focus, #2e8fff); outline-offset: -2px; }
.racing-feed-format > summary .lucide-icon { width: 18px; height: 18px; color: #25b9d3; }
.racing-feed-format-summary { min-width: 0; display: grid; gap: 2px; }
.racing-feed-format-summary strong, .racing-feed-format-summary small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.racing-feed-format-summary strong { font-size: 13px; }
.racing-feed-format-summary small { color: var(--muted); font-size: 10px; }
.racing-feed-format-status { padding: 4px 7px; border: 1px solid #9b7419; background: #3b2e12; color: #ffd277; font-size: 10px; font-weight: 750; white-space: nowrap; }
.racing-feed-format-body { min-width: 0; padding: 11px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; border-top: 1px solid var(--line); background: var(--surface-alt); }
.racing-feed-format-controls { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 8px; }
.racing-feed-format-controls .field { min-width: 0; margin: 0; }
.racing-feed-format-controls input, .racing-feed-format-controls select { min-width: 0; width: 100%; }
.racing-feed-format-output { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 9px; }
.racing-feed-format-endpoint { min-width: 0; min-height: 36px; padding: 9px 10px; display: block; overflow-x: auto; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 11px; line-height: 1.45; white-space: nowrap; }
.racing-feed-format-actions { min-width: 0; display: flex; gap: 7px; }
.racing-feed-format-actions .btn { min-width: 108px; }
.racing-feed-format-applied { min-width: 88px; color: var(--muted); font-size: 10px; text-align: end; white-space: nowrap; }
.racing-feed-format-meta { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 10px; }
.racing-feed-format-meta span { min-width: 0; overflow-wrap: anywhere; }
.racing-feed-format-meta .warning { color: #d39a31; font-weight: 700; }
.external-feed-line.template-ready { background: var(--surface-alt); border-color: #2d8fa1; }

@media (max-width: 640px) {
  .external-feed-connector { padding: 13px; }
  .external-feed-connector-head { flex-direction: column; }
  .external-feed-security { width: 100%; }
  .external-feed-domain-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .external-feed-domain-tabs button:nth-child(2) { border-right: 0; }
  .external-feed-domain-tabs button:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .external-feed-card { padding: 12px; }
  .external-feed-line { padding: 10px; }
  .external-feed-card-head { align-items: flex-start; }
  .external-feed-line-fields { grid-template-columns: minmax(0, 1fr); }
  .external-feed-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .external-feed-actions .btn { width: 100%; }
  .external-feed-facts { grid-template-columns: minmax(0, 1fr); }
  .external-feed-preview-row { grid-template-columns: minmax(0, 1fr) auto; }
  .external-feed-preview-row span { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
  .racing-feed-format > summary { grid-template-columns: auto minmax(0, 1fr); }
  .racing-feed-format-status { grid-column: 2; justify-self: start; }
  .racing-feed-format-controls { grid-template-columns: minmax(0, 1fr); }
  .racing-feed-format-output { grid-template-columns: minmax(0, 1fr); }
  .racing-feed-format-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .racing-feed-format-actions .btn { width: 100%; }
  .racing-feed-format-applied { min-width: 0; text-align: start; }
}

@media (min-width: 641px) and (max-width: 1180px) {
  .racing-feed-format-controls { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .racing-feed-format-output { grid-template-columns: minmax(0, 1fr) auto; }
  .racing-feed-format-applied { grid-column: 1 / -1; text-align: start; }
}

@media (max-width: 1080px) {
  .incentive-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .incentive-filters > .btn { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .incentive-rule-workspace > .section-head { align-items: stretch; flex-direction: column; }
  .incentive-rule-workspace > .section-head .section-actions,
  .incentive-rule-workspace > .section-head .btn.icon { width: 100%; }
  .incentive-filters { grid-template-columns: minmax(0, 1fr); }
  .incentive-filters > .btn { grid-column: auto; width: 100%; }
  .incentive-security-strip > span:last-child { width: 100%; margin-left: 0; }
  .deposit-reward-security > span:last-child { width: 100%; margin-left: 0; }
  .benefit-security > span:last-child { width: 100%; margin-left: 0; }
  .content-center-guardrails > span:last-child { width: 100%; margin-left: 0; }
  .incentive-target-tools { display: grid; grid-template-columns: minmax(0, 1fr); }
  .incentive-target-tools .btn { width: 100%; }
  .incentive-rule-workspace .panel { min-width: 0; max-width: 100%; overflow: hidden; }
  .incentive-rule-workspace .table-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
  .deposit-reward-workspace .panel { min-width: 0; max-width: 100%; overflow: hidden; }
  .deposit-reward-workspace .table-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
  .benefit-workspace .panel { min-width: 0; max-width: 100%; overflow: hidden; }
  .benefit-workspace .table-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
  .content-message-workspace .panel { min-width: 0; max-width: 100%; overflow: hidden; }
  .content-message-workspace .table-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
  .modal-backdrop.incentive-detail-backdrop { padding: 0; place-items: stretch; }
  .incentive-detail-modal { width: 100%; height: 100dvh; min-height: 0; max-height: 100dvh; border-radius: 0; }
  .incentive-detail-modal .modal-actions { position: sticky; bottom: 0; background: var(--surface); }
}

/* Foundation 1.120: administrator governance and immutable audit views */
.administrator-workspace { min-width: 0; }
.administrator-filter-bar { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(130px, 180px) minmax(150px, 220px) auto auto; gap: 8px; align-items: center; }
.administrator-filter-bar input,
.administrator-filter-bar select { width: 100%; min-width: 0; }
.administrator-detail-modal,
.administrator-audit-modal { width: min(1120px, 100%); }
.administrator-audit-comparison { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.administrator-audit-comparison section { min-width: 0; }
.administrator-audit-comparison h3 { margin: 0 0 7px; font-size: 13px; }
.audit-json { min-width: 0; max-height: 52vh; margin: 0; padding: 12px; overflow: auto; border: 1px solid var(--line); background: #f7f9fa; color: #1c2730; font: 11px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 860px) {
  .administrator-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .administrator-filter-bar input { grid-column: 1 / -1; }
  .administrator-audit-comparison { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .administrator-workspace > .section-head { align-items: stretch; flex-direction: column; }
  .administrator-workspace > .section-head .section-actions,
  .administrator-workspace > .section-head .btn.icon { width: 100%; }
  .administrator-filter-bar { grid-template-columns: minmax(0, 1fr); }
  .administrator-filter-bar input { grid-column: auto; }
  .administrator-filter-bar .btn { width: 100%; }
  .administrator-workspace .panel { min-width: 0; max-width: 100%; overflow: hidden; }
  .administrator-workspace .table-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
  .administrator-detail-modal,
  .administrator-audit-modal { width: 100%; height: 100dvh; min-height: 0; max-height: 100dvh; border-radius: 0; }
  .administrator-detail-modal .modal-actions,
  .administrator-audit-modal .modal-actions { position: sticky; bottom: 0; background: var(--surface); }
}

.order-monitor-detail-modal { width: min(1240px, calc(100vw - 36px)); max-height: calc(100vh - 28px); }
.order-monitor-detail-modal .order-monitor-detail-body { display: grid; gap: 0; padding: 0 20px 20px; overflow: auto; }

@media (max-width: 640px) {
  .order-monitor-workspace > .section-head { align-items: stretch; flex-direction: column; }
  .order-monitor-workspace > .section-head .section-actions,
  .order-monitor-workspace > .section-head .btn.icon { width: 100%; }
  .order-monitor-workspace .panel { min-width: 0; max-width: 100%; overflow: hidden; }
  .order-monitor-workspace .table-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
  .modal-backdrop.order-monitor-detail-backdrop { padding: 0; place-items: stretch; }
  .order-monitor-detail-modal { width: 100%; height: 100dvh; min-height: 0; max-height: 100dvh; border-radius: 0; }
  .order-monitor-detail-modal .order-monitor-detail-body { padding: 0 12px 16px; }
  .order-monitor-detail-modal .modal-actions { position: sticky; bottom: 0; background: var(--surface); }
}

/* Reference-aligned visual system: E-PLAY operations + scanned member workspaces */
body[data-role="ADMIN"] {
  background: #06111f;
  color: #dbeafe;
}
body[data-role="ADMIN"] .app-shell {
  grid-template-columns: 216px minmax(0, 1fr);
  background: #06111f;
}
body[data-role="ADMIN"] .sidebar {
  border-right: 1px solid #17324a;
  background: #081522;
}
body[data-role="ADMIN"] .sidebar-brand {
  height: 52px;
  padding: 0 16px;
  border-bottom-color: #17324a;
}
body[data-role="ADMIN"] .sidebar-brand strong { color: #edf7ff; letter-spacing: 0; }
body[data-role="ADMIN"] .sidebar-brand small { color: #5f7d99; font-size: 9px; }
body[data-role="ADMIN"] .role-chip {
  margin: 8px 10px 5px;
  padding: 7px 10px;
  border-color: #1b3a55;
  border-radius: 4px;
  background: #0b1c2b;
  color: #809bb4;
}
body[data-role="ADMIN"] .nav-list { gap: 2px; padding: 5px 7px 12px; overflow-y: auto; }
body[data-role="ADMIN"] .nav-button {
  min-height: 37px;
  padding: 0 9px;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-radius: 3px;
  color: #829ab1;
}
body[data-role="ADMIN"] .nav-button::before { display: none; }
body[data-role="ADMIN"] .nav-glyph {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid #203e57;
  border-radius: 3px;
  background: #0b1c2b;
  color: #6c8ca8;
  font-size: 9px;
  font-weight: 800;
}
body[data-role="ADMIN"] .nav-button span {
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-role="ADMIN"] .nav-button:hover { background: #0d2235; color: #dcecff; }
body[data-role="ADMIN"] .nav-button.active {
  background: #102943;
  color: #f0f8ff;
  box-shadow: inset 3px 0 0 #18d4ff;
}
body[data-role="ADMIN"] .nav-button.active .nav-glyph {
  border-color: #2f7dff;
  background: #123765;
  color: #67e5ff;
}
body[data-role="ADMIN"] .sidebar-meta { border-top-color: #17324a; color: #55738f; }
body[data-role="ADMIN"] .topbar {
  height: 52px;
  padding: 0 18px;
  border-bottom-color: #1b3851;
  background: rgba(7, 22, 35, 0.97);
  color: #dbeafe;
}
body[data-role="ADMIN"] .page-heading h1 { font-size: 16px; }
body[data-role="ADMIN"] .page-heading p { color: #708ba5; font-size: 9px; }
body[data-role="ADMIN"] .content { padding: 16px 18px 34px; }
body[data-role="ADMIN"] .section-head h2,
body[data-role="ADMIN"] .panel-header h2 { color: #e5f2ff; }
body[data-role="ADMIN"] :where(.panel, .kpi, .event-row, .approval-row, .member-filter-bar, .filter-bar, .work-center-batch-bar, .member-profile-strip, .capacity-metric, .store-status-band, .configuration-security-strip, .external-feed-card) {
  border-color: #1c3852;
  background: #0d1f31;
  color: #dbeafe;
  box-shadow: none;
}
body[data-role="ADMIN"] :where(.panel-header, .member-pagination, .member-detail-tabs, .work-center-batch-bar) {
  border-color: #1c3852;
  background: #0a1929;
}
body[data-role="ADMIN"] .kpi {
  min-height: 94px;
  border-radius: 4px;
  box-shadow: inset 0 2px 0 rgba(24, 212, 255, 0.18);
}
body[data-role="ADMIN"] .kpi-value { color: #f1f8ff; font-size: 22px; }
body[data-role="ADMIN"] :where(input, select, textarea) {
  border-color: #315776;
  background: #071522;
  color: #dbeafe;
}
body[data-role="ADMIN"] :where(input, textarea)::placeholder { color: #58738d; }
body[data-role="ADMIN"] .btn {
  border-color: #315776;
  background: #0b1c2b;
  color: #c8dcef;
}
body[data-role="ADMIN"] .btn:hover { border-color: #4e7da5; background: #102943; color: #ffffff; }
body[data-role="ADMIN"] .btn.primary { border-color: #2f7dff; background: #246ddf; color: #ffffff; }
body[data-role="ADMIN"] .btn.primary:hover { background: #327fff; }
body[data-role="ADMIN"] .btn.success { border-color: #247c4a; background: #123522; color: #7ce7a1; }
body[data-role="ADMIN"] .btn.warning { border-color: #8c641e; background: #36270f; color: #ffc466; }
body[data-role="ADMIN"] .btn.danger { border-color: #8c3740; background: #3a171d; color: #ff8f98; }
body[data-role="ADMIN"] table { color: #c7d8e8; }
body[data-role="ADMIN"] th { border-color: #1c3852; background: #091a2a; color: #7594b1; }
body[data-role="ADMIN"] td { border-color: #173149; color: #bdd0e2; }
body[data-role="ADMIN"] tbody tr:hover td { background: #10283d; }
body[data-role="ADMIN"] .member-list-table .member-sticky-col { background: #0d1f31; }
body[data-role="ADMIN"] .member-list-table th.member-sticky-col { background: #091a2a; }
body[data-role="ADMIN"] .member-list-table tbody tr:hover .member-sticky-col { background: #10283d; }
body[data-role="ADMIN"] :where(.modal, .drawer, .search-modal) { border-color: #315776; background: #0d1f31; color: #dbeafe; }
body[data-role="ADMIN"] :where(.modal-head, .modal-actions) { border-color: #1c3852; background: #0a1929; }
body[data-role="ADMIN"] .audit-json { border-color: #1c3852; background: #071522; color: #bcd2e7; }
body[data-role="ADMIN"] .badge.success { background: #123522; color: #76e39b; }
body[data-role="ADMIN"] .badge.warning { background: #36270f; color: #ffc46b; }
body[data-role="ADMIN"] .badge.danger { background: #3a171d; color: #ff8d97; }
body[data-role="ADMIN"] .badge.blue { background: #0d3346; color: #65ddf7; }

body[data-role="AGENT"] {
  --channel-accent: #18b8a9;
  --channel-accent-soft: #103b3b;
  --channel-nav: #081522;
  --channel-nav-muted: #7894ae;
  --channel-highlight: #18d4ff;
  background: #06111f;
  color: #dbeafe;
}
body[data-terminal="STORE"] {
  --channel-accent: #d99b2b;
  --channel-accent-soft: #3a2b13;
  --channel-highlight: #f4c653;
}
body[data-role="AGENT"] .channel-app-shell { background: #06111f; }
body[data-role="AGENT"] .channel-topbar,
body[data-role="AGENT"] .channel-pagebar {
  border-color: #1b3851;
  background: #081725;
}
body[data-role="AGENT"] .channel-brand,
body[data-role="AGENT"] .channel-user-copy b,
body[data-role="AGENT"] .channel-page-heading h1 { color: #e5f2ff; }
body[data-role="AGENT"] .channel-brand small,
body[data-role="AGENT"] .channel-user-copy span,
body[data-role="AGENT"] .channel-page-heading p { color: #718ca5; }
body[data-role="AGENT"] .channel-icon-command,
body[data-role="AGENT"] .btn {
  border-color: #315776;
  background: #0b1c2b;
  color: #c8dcef;
}
body[data-role="AGENT"] :where(.panel, .kpi, .member-filter-bar, .filter-bar, .store-status-band, .store-command, .store-status-fact) {
  border-color: #1c3852;
  background: #0d1f31;
  color: #dbeafe;
  box-shadow: none;
}
body[data-role="AGENT"] :where(input, select, textarea) { border-color: #315776; background: #071522; color: #dbeafe; }
body[data-role="AGENT"] th { border-color: #1c3852; background: #091a2a; color: #7594b1; }
body[data-role="AGENT"] td { border-color: #173149; color: #bdd0e2; }
body[data-role="AGENT"] tbody tr:hover td { background: #10283d; }
body[data-role="AGENT"] .store-status-copy h2,
body[data-role="AGENT"] .store-status-fact b,
body[data-role="AGENT"] .store-command { color: #dbeafe; }
body[data-role="AGENT"] .store-status-copy p,
body[data-role="AGENT"] .store-status-fact span,
body[data-role="AGENT"] .store-command small { color: #7894ae; }

body[data-role="MEMBER"] {
  --member-bg: #070c11;
  --member-ink: #e8eef0;
  --member-dark: #080b0e;
  --member-panel: #151b1e;
  --member-panel-2: #20272a;
  --member-line: #354044;
  --member-muted: #8b989c;
  background: #070c11;
  color: #e8eef0;
}
.member-app-shell {
  min-height: 100vh;
  background: #070c11;
  color: #e8eef0;
}
.member-topbar {
  height: 62px;
  grid-template-columns: 182px minmax(0, 1fr) auto;
  border-bottom-color: #273238;
  background: #080c10;
}
.member-brand { border-right-color: #273238; }
.member-brand strong { font-size: 17px; }
.member-product-nav button { min-width: 104px; color: #879398; font-size: 12px; }
.member-product-nav button.active { background: #151b1e; }
.member-app-shell[data-view="racing"] .member-product-nav button.active::after { background: #18d4ff; }
.member-app-shell[data-view="sports"] .member-product-nav button.active::after { background: #1fc7a6; }
.member-app-shell[data-view="casino"] .member-product-nav button.active::after { background: #e5b83c; }
.member-app-shell[data-view="mini"] .member-product-nav button.active::after { background: #5ba5d0; }
.member-main { min-height: calc(100vh - 62px); background: #070c11; }
.member-content { width: min(1680px, 100%); padding: 16px 18px 40px; color: #e8eef0; }
.member-command-band {
  position: relative;
  min-height: 210px;
  padding: 26px 30px;
  overflow: hidden;
  border: 1px solid #31414a;
  border-radius: 4px;
  background-color: #0b1117;
  background-image: url("/assets/member/gaming-command-panorama-v1.png");
  background-position: center;
  background-size: cover;
}
.member-command-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 7, 11, 0.58);
}
.member-command-band > * { position: relative; z-index: 1; }
.member-command-title h1 { font-size: 30px; text-shadow: 0 2px 12px #000000; }
.member-command-title p { color: #c0cbd0; text-shadow: 0 1px 8px #000000; }
.member-command-account {
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(5, 10, 14, 0.82);
}
.member-product-grid { gap: 8px; margin-top: 9px; }
.member-product-card {
  border-color: #303b40;
  border-radius: 4px;
  background: #12191d;
  color: #e8eef0;
}
.member-product-card:hover { border-color: #5f7780; box-shadow: 0 8px 24px rgba(0,0,0,0.28); }
.member-product-copy > span,
.member-product-copy p,
.member-product-foot span { color: #829096; }
.member-product-foot { border-top-color: #303b40; }
.member-home-section { margin-top: 18px; }
.member-section-title { border-bottom-color: #334047; }
.member-section-title > div { color: #e7edef; }
.member-section-title > span { color: #829096; }
.member-home-events { border-bottom-color: #303b40; }
.member-home-event { border-bottom-color: #303b40; background: #0f161a; color: #e2e9eb; }
.member-home-event:hover { background: #172126; }
.member-home-event > div span,
.member-home-event > strong { color: #839096; }
.casino-compact-card,
.member-record-band div,
.member-wallet-card,
.member-service-list,
.member-service-row,
.member-account-quick-actions button,
.member-account-summary > div,
.member-account-section,
.member-account-list,
.member-account-list-row {
  border-color: #303b40;
  background: #12191d;
  color: #e8eef0;
}
.member-record-band,
.member-account-quick-actions,
.member-account-summary { border-color: #303b40; background: #303b40; }
.member-wallet-band,
.member-service-head,
.member-account-head { border-color: #303b40; background: #11181c; }
.member-service-tabs { border-color: #303b40; background: #12191d; }
.member-service-tabs button { border-color: #303b40; color: #89969b; }
.member-service-tabs button.active { background: #0b7771; color: #ffffff; box-shadow: inset 0 -3px 0 #32d5c9; }
.member-service-row,
.member-account-list-row { border-bottom-color: #303b40; }
.member-service-row p,
.member-account-quick-actions span,
.member-account-summary span,
.member-account-list-row > span:last-child { color: #839096; }
body[data-role="MEMBER"] .panel { border-color: #303b40; background: #12191d; color: #e8eef0; }
body[data-role="MEMBER"] .panel-header { border-color: #303b40; background: #0f161a; }
body[data-role="MEMBER"] th { border-color: #303b40; background: #10181c; color: #859399; }
body[data-role="MEMBER"] td { border-color: #2a353a; color: #c6d0d3; }
body[data-role="MEMBER"] tbody tr:hover td { background: #172126; }
body[data-role="MEMBER"] .btn { border-color: #3b494f; background: #182126; color: #d9e1e3; }
body[data-role="MEMBER"] .btn.primary { border-color: #18a79d; background: #0c7770; color: #ffffff; }
.member-view-racing,
.member-view-sports,
.member-view-casino,
.member-view-mini { width: 100%; max-width: none; padding: 8px; background: #05080a; }
.racing-workbench { grid-template-columns: minmax(0, 1.38fr) minmax(340px, 0.96fr); }
.racing-session-bar,
.racing-odds-pane,
.race-feed,
.member-bet-slip { border-radius: 0; box-shadow: none; }
.sports-category-rail { border-color: #344044; background: #151b1e; }
.sports-category-row { border-color: #303b40; background: #151b1e; }
.sports-category-select { color: #b7c1c4; }
.sports-category-select .sports-glyph { background: #253036; color: #a8b6ba; }
.sports-category-row.active { background: #0b625d; box-shadow: inset 3px 0 0 #35d2c7; }
.sports-category-row.active .sports-category-select { color: #ffffff; }
.sports-preference-toggle { color: #849195; }
.sports-preference-toggle.active { color: #f4d63c; }
.sports-featured { border-color: #344044; background: #172126; }
.sports-league-head { border-color: #344044; background: #20292d; color: #dce4e6; }
.sports-league-actions button { border-color: #465256; background: #151b1e; color: #a7b3b6; }
.sports-league-actions button.active { border-color: #d9b72e; background: #4b431f; color: #ffe36b; }
.sports-event-row { border-color: #344044; background: #151b1e; color: #dce4e6; }
.sports-event-time span,
.sports-event-name span,
.sports-league-head span { color: #839096; }
.sports-odds-control { border-color: #3b484e; background: #252e32; color: #e1e8ea; }
.sports-odds-control span small { color: #879499; }
.sports-odds-control > strong { color: #61d7ca; }
.sports-odds-control.selected { border-color: #20b7ab; background: #0c625d; box-shadow: inset 3px 0 0 #39d9cd; }
.sports-empty { border-color: #344044; background: #151b1e; color: #839096; }
.sports-empty b { color: #dce4e6; }

@media (min-width: 1121px) {
  body[data-role="ADMIN"] .app-shell { grid-template-columns: 216px minmax(0, 1fr); }
}

@media (max-width: 1120px) and (min-width: 761px) {
  body[data-role="ADMIN"] .app-shell { grid-template-columns: 72px minmax(0, 1fr); }
  body[data-role="ADMIN"] .sidebar-brand { justify-content: center; padding: 0; }
  body[data-role="ADMIN"] .sidebar-brand .brand-text,
  body[data-role="ADMIN"] .role-chip,
  body[data-role="ADMIN"] .nav-button span,
  body[data-role="ADMIN"] .sidebar-meta { display: none; }
  body[data-role="ADMIN"] .nav-button { grid-template-columns: 1fr; padding: 0; justify-items: center; }
}

@media (max-width: 760px) {
  body[data-role="ADMIN"] .topbar { height: 62px; padding: 0 12px; }
  body[data-role="ADMIN"] .content { padding: 14px 12px 30px; }
  .member-topbar { height: 58px; grid-template-columns: minmax(112px, auto) minmax(0, 1fr); }
  .member-command-band { min-height: 178px; padding: 20px 16px; background-position: 32% center; }
  .member-command-account { min-width: 0; width: 100%; text-align: left; }
  .member-product-card { border-radius: 3px; }
  .member-view-racing,
  .member-view-sports,
  .member-view-casino,
  .member-view-mini { padding: 5px; }
}

/* Saved-reference implementation: backend domains, terminals and member products */
.login-page {
  grid-template-columns: minmax(430px, 1.2fr) minmax(430px, 0.8fr);
  background: #06111f;
}
.login-brand {
  isolation: isolate;
  border-right: 1px solid #1c3852;
  background-color: #081522;
  background-image: url("/assets/member/gaming-command-panorama-v1.png");
  background-position: center;
  background-size: cover;
}
.login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(3, 10, 17, 0.76);
}
.login-brand::after { display: none; }
.login-brand .brand-lockup strong { color: #f2f8ff; letter-spacing: 0; }
.login-brand .brand-lockup small,
.login-brand .login-foot { color: #7690a8; }
.login-signal { max-width: 570px; }
.login-signal h1 { color: #f1f8ff; font-size: 40px; }
.login-signal p { max-width: 520px; color: #a8bdcf; }
.signal-cell {
  border-color: rgba(111, 174, 226, 0.24);
  border-radius: 3px;
  background: rgba(7, 24, 39, 0.86);
}
.signal-cell b { color: #5be7ff; font-variant-numeric: tabular-nums; }
.signal-cell span { color: #829cb3; }
.login-main {
  min-width: 0;
  border-left: 1px solid #102d44;
  background: #071522;
}
.login-panel {
  width: min(430px, 100%);
  padding: 28px;
  border: 1px solid #24445f;
  border-radius: 4px;
  background: #0d1f31;
  color: #dbeafe;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
}
.login-panel .eyebrow { color: #18d4ff; }
.login-panel > p { color: #7893aa; }
.login-panel .field label { color: #9eb4c8; }
.login-panel .field input {
  border-color: #315776;
  background: #071522;
  color: #edf7ff;
}
.login-panel .field input:focus { border-color: #2f7dff; box-shadow: 0 0 0 3px #102f55; }
.login-panel .btn.primary { border-color: #2f7dff; background: #246ddf; color: #ffffff; }
.login-panel .login-register { border-color: #315776; color: #9ec7e8; }
.login-panel .login-register:hover { border-color: #18d4ff; background: #0d3346; color: #dffaff; }
.login-panel .login-security-notice { border-left-color: #e8a526; background: #211d13; color: #d5c18b; }
.login-panel .demo-accounts { border-top-color: #1c3852; }
.login-panel .account-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.login-panel .account-button { border-color: #294b68; border-radius: 3px; background: #0a1929; color: #a9c0d4; }
.login-panel .account-button:hover { border-color: #18d4ff; background: #0d3346; color: #effcff; }

body[data-role="ADMIN"] .app-shell {
  --workspace-accent: #2f7dff;
  --workspace-accent-soft: #102f55;
  --workspace-accent-ink: #ffffff;
}
body[data-role="ADMIN"] .app-shell[data-view="racingOps"] {
  --workspace-accent: #18d4ff;
  --workspace-accent-soft: #0b3544;
  --workspace-accent-ink: #03171d;
}
body[data-role="ADMIN"] .app-shell[data-view="sportsOps"] {
  --workspace-accent: #f59e0b;
  --workspace-accent-soft: #3a290d;
  --workspace-accent-ink: #211705;
}
body[data-role="ADMIN"] .app-shell:is([data-view="providerOps"], [data-view="providerMonitor"]) {
  --workspace-accent: #8b5cf6;
  --workspace-accent-soft: #2a2146;
  --workspace-accent-ink: #ffffff;
}
body[data-role="ADMIN"] .app-shell[data-view="miniOps"] {
  --workspace-accent: #df4d7f;
  --workspace-accent-soft: #3b1c2a;
  --workspace-accent-ink: #ffffff;
}
body[data-role="ADMIN"] .app-shell:is([data-view="finance"], [data-view="paymentAccounts"], [data-view="approvals"], [data-view="settlementOps"], [data-view="reversalCenter"]) {
  --workspace-accent: #f59e0b;
  --workspace-accent-soft: #3a290d;
  --workspace-accent-ink: #211705;
}
body[data-role="ADMIN"] .content {
  width: 100%;
  max-width: 1720px;
  padding: 16px 18px 34px;
}
body[data-role="ADMIN"] .nav-button.active { box-shadow: inset 3px 0 0 var(--workspace-accent); }
body[data-role="ADMIN"] .nav-button.active .nav-glyph {
  border-color: var(--workspace-accent);
  background: var(--workspace-accent-soft);
  color: var(--workspace-accent);
}
body[data-role="ADMIN"] .btn.primary {
  border-color: var(--workspace-accent);
  background: var(--workspace-accent);
  color: var(--workspace-accent-ink);
}
body[data-role="ADMIN"] .btn.primary:hover { filter: brightness(1.1); }
body[data-role="ADMIN"] .section-head { min-height: 34px; margin-bottom: 10px; align-items: center; }
body[data-role="ADMIN"] .section-head h2 { font-size: 15px; }
body[data-role="ADMIN"] .section-head p { color: #718ca5; font-size: 10px; }
body[data-role="ADMIN"] .kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
body[data-role="ADMIN"] .kpi {
  min-height: 82px;
  padding: 12px;
  border-radius: 3px;
  box-shadow: inset 0 2px 0 color-mix(in srgb, var(--workspace-accent) 32%, transparent);
}
body[data-role="ADMIN"] .kpi-label { font-size: 10px; }
body[data-role="ADMIN"] .kpi-value { margin-top: 10px; font-size: 20px; }
body[data-role="ADMIN"] .kpi-note { margin-top: 7px; font-size: 9px; }
body[data-role="ADMIN"] .panel { border-radius: 3px; }
body[data-role="ADMIN"] .panel + .panel { margin-top: 10px; }
body[data-role="ADMIN"] .panel-header { min-height: 43px; padding: 9px 12px; }
body[data-role="ADMIN"] .panel-header h2 { font-size: 12px; }
body[data-role="ADMIN"] .panel-header p { color: #718ca5; font-size: 9px; }
body[data-role="ADMIN"] .panel-body { padding: 12px; }
body[data-role="ADMIN"] :where(.field label, .agent-form-toggles label, .finance-toggle, .configuration-toggle, .structured-field label) { color: #90a9bf; }
body[data-role="ADMIN"] :where(.sub-cell, .muted-cell, .primary-cell small, .empty-state, .member-admin-loading span) { color: #718ca5; }
body[data-role="ADMIN"] :where(.empty-state, .member-admin-loading) {
  border-color: #1c3852;
  background: #0d1f31;
  color: #9eb6ca;
}
body[data-role="ADMIN"] :where(.member-detail-fact, .member-profile-fact, .capacity-stat, .store-readiness-facts) {
  border-color: #1c3852;
  background: #0a1929;
}
body[data-role="ADMIN"] :where(.member-detail-fact span, .member-profile-fact span, .capacity-stat span) { color: #718ca5; }
body[data-role="ADMIN"] :where(.member-detail-fact b, .member-profile-fact b, .capacity-stat b) { color: #dbeafe; }
body[data-role="ADMIN"] :where(.order-monitor-freshness, .store-readiness-status, .sports-result-impact, .sports-import-preview, .operations-hint) {
  border-color: #294b68;
  background: #0a1929;
  color: #9ab1c5;
}
body[data-role="ADMIN"] .order-monitor-detail-grid { border-color: #1c3852; background: #0a1929; }
body[data-role="ADMIN"] .table-wrap { scrollbar-color: #315776 #071522; }
body[data-role="ADMIN"] table { font-size: 11px; }
body[data-role="ADMIN"] th { height: 34px; padding: 8px 9px; font-size: 9px; letter-spacing: 0; }
body[data-role="ADMIN"] td { height: 42px; padding: 8px 9px; font-size: 10px; }
body[data-role="ADMIN"] .agent-view-segment {
  border-color: #294b68;
  border-radius: 2px;
  background: #071522;
}
body[data-role="ADMIN"] .agent-view-segment button { border-color: #1c3852; background: #0a1929; color: #7894ae; }
body[data-role="ADMIN"] .agent-view-segment button.active {
  border-color: var(--workspace-accent);
  background: var(--workspace-accent-soft);
  color: var(--workspace-accent);
  box-shadow: inset 0 -2px 0 var(--workspace-accent);
}

body[data-role="ADMIN"] .app-shell[data-view="racingOps"] :where(.racing-ops-rail, .racing-live-stream, .racing-event-command, .racing-odds-cell) {
  border-color: #1b4559;
  border-radius: 2px;
  background: #0a1929;
}
body[data-role="ADMIN"] .app-shell[data-view="racingOps"] .racing-ops-layout { grid-template-columns: 220px minmax(500px, 1fr); gap: 8px; }
body[data-role="ADMIN"] .app-shell[data-view="racingOps"] .racing-ops-layout.racing-monitor-layout {
  grid-template-columns: minmax(0, 1fr);
}
body[data-role="ADMIN"] .app-shell[data-view="racingOps"] .racing-monitor-toolbar {
  min-height: 48px;
  margin-bottom: 8px;
  padding: 6px 8px;
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(260px, 1fr) auto 34px;
  align-items: end;
  gap: 7px;
  border: 1px solid #1b4559;
  background: #0a1929;
}
.racing-monitor-toolbar label { min-width: 0; display: grid; gap: 3px; color: #7894ae; font-size: 8px; }
.racing-monitor-toolbar select {
  width: 100%;
  min-width: 0;
  height: 31px;
  padding: 0 7px;
  border: 1px solid #294b68;
  border-radius: 2px;
  background: #071522;
  color: #dbeafe;
  font-size: 9px;
}
.racing-monitor-count { height: 31px; padding: 0 9px; display: flex; align-items: center; border: 1px solid #294b68; color: #8da9bf; font-size: 9px; white-space: nowrap; }
body[data-role="ADMIN"] .app-shell[data-view="racingOps"] .racing-race-button { border-radius: 2px; background: #0d1f31; }
body[data-role="ADMIN"] .app-shell[data-view="racingOps"] .racing-race-button.active {
  border-color: #18d4ff;
  background: #0b3544;
  box-shadow: inset 3px 0 0 #18d4ff;
}
body[data-role="ADMIN"] .app-shell[data-view="racingOps"] .racing-event-command { border-left-color: #18d4ff; }
body[data-role="ADMIN"] .app-shell[data-view="racingOps"] .racing-odds-cell { border-top-color: #18d4ff; }
body[data-role="ADMIN"] .app-shell[data-view="racingOps"] .racing-odds-value,
body[data-role="ADMIN"] .app-shell[data-view="racingOps"] .racing-order-item > strong { color: #5be7ff; }

body[data-role="ADMIN"] .app-shell[data-view="sportsOps"] .sports-ops-layout { grid-template-columns: 220px minmax(500px, 1fr) 300px; gap: 8px; }
body[data-role="ADMIN"] .app-shell[data-view="sportsOps"] :where(.racing-ops-rail, .racing-live-stream, .sports-admin-market-group, .sports-admin-market-head) {
  border-color: #394329;
  border-radius: 2px;
  background: #0c1b2b;
}
body[data-role="ADMIN"] .app-shell[data-view="sportsOps"] .sports-admin-projects button { border-color: #29445e; background: #0d1f31; }
body[data-role="ADMIN"] .app-shell[data-view="sportsOps"] .sports-admin-projects button.active {
  border-color: #f59e0b;
  background: #3a290d;
  color: #ffd27d;
  box-shadow: inset 3px 0 0 #f59e0b;
}
body[data-role="ADMIN"] .app-shell[data-view="sportsOps"] .sports-admin-market-group { border-top-color: #22c55e; }
body[data-role="ADMIN"] .app-shell[data-view="sportsOps"] .sports-admin-market-group.blocked { border-top-color: #ef4444; }

body[data-role="ADMIN"] .app-shell:is([data-view="providerOps"], [data-view="providerMonitor"]) :where(.panel, .kpi, .provider-monitor-filters) {
  border-color: #343052;
  background: #111b32;
}
body[data-role="ADMIN"] .app-shell:is([data-view="providerOps"], [data-view="providerMonitor"]) :where(th, .panel-header) {
  border-color: #343052;
  background: #171b33;
}
body[data-role="ADMIN"] .app-shell:is([data-view="providerOps"], [data-view="providerMonitor"]) tbody tr:hover td { background: #1d2440; }
body[data-role="ADMIN"] .app-shell:is([data-view="providerOps"], [data-view="providerMonitor"]) .kpi { box-shadow: inset 0 2px 0 rgba(139, 92, 246, 0.36); }

body[data-role="AGENT"] .channel-app-shell { --terminal-accent: var(--channel-accent); }
body[data-role="AGENT"] .channel-app-shell[data-view="providerMonitor"] { --terminal-accent: #8b5cf6; }
body[data-role="AGENT"] .channel-app-shell { grid-template-rows: 58px minmax(calc(100vh - 58px), auto); }
body[data-role="AGENT"] .channel-topbar { height: 58px; padding: 0 16px; }
body[data-role="AGENT"] .channel-layout { grid-template-columns: 212px minmax(0, 1fr); }
body[data-role="AGENT"] .channel-sidebar { top: 58px; height: calc(100vh - 58px); }
body[data-role="AGENT"] .channel-profile { margin: 10px 8px 6px; border-radius: 3px; }
body[data-role="AGENT"] .channel-nav { gap: 2px; padding: 4px 7px 10px; }
body[data-role="AGENT"] .channel-nav-button { min-height: 37px; border-radius: 3px; }
body[data-role="AGENT"] .channel-nav-button.active { box-shadow: inset 3px 0 0 var(--terminal-accent); }
body[data-role="AGENT"] .channel-nav-button.active b { background: var(--terminal-accent); }
body[data-role="AGENT"] .channel-pagebar { min-height: 66px; padding: 11px 18px; }
body[data-role="AGENT"] .channel-content { width: 100%; max-width: 1650px; padding: 14px 18px 34px; }
body[data-role="AGENT"] .channel-content .btn.primary { border-color: var(--terminal-accent); background: var(--terminal-accent); }
body[data-role="AGENT"] .channel-content :where(.field label, .sub-cell, .muted-cell) { color: #7894ae; }
body[data-role="AGENT"] .channel-content table { color: #c7d8e8; font-size: 11px; }
body[data-role="AGENT"] .channel-content th { height: 34px; padding: 8px 9px; font-size: 9px; }
body[data-role="AGENT"] .channel-content td { height: 42px; padding: 8px 9px; font-size: 10px; }

.member-app-shell[data-view="home"] .member-main { background: #070c11; }
.member-app-shell[data-view="home"] .member-command-band { border-color: #31414a; }
.member-app-shell[data-view="home"] .member-product-card { min-height: 280px; }
.member-app-shell[data-view="home"] .member-product-copy { min-height: 86px; }
.member-app-shell[data-view="home"] .member-product-copy h2 { color: #f1f5f6; }
.member-app-shell[data-view="home"] .member-brand-banner {
  border-color: #324047;
  border-left-color: var(--member-yellow);
  background: #11191d;
  color: #e8eef0;
}
.member-app-shell[data-view="home"] .member-brand-banner span { color: #849197; }

.member-app-shell[data-view="racing"] {
  --member-dark: #0a0b0c;
  --member-panel: #17191a;
  --member-panel-2: #252728;
  --member-line: #3b3d3e;
  background: #050607;
}
.member-app-shell[data-view="racing"] .member-topbar { background: #0a0b0c; }
.member-app-shell[data-view="racing"] .member-main,
.member-app-shell[data-view="racing"] .member-content { background: #050607; }
.member-app-shell[data-view="racing"] .member-balance-control b,
.member-app-shell[data-view="racing"] .racing-session-meta strong,
.member-app-shell[data-view="racing"] .member-slip-balance b { color: #27d7cb; }
.member-app-shell[data-view="racing"] .racing-session-bar,
.member-app-shell[data-view="racing"] .racing-odds-pane,
.member-app-shell[data-view="racing"] .race-feed,
.member-app-shell[data-view="racing"] .member-bet-slip { border-color: #414344; background: #151718; }
.member-app-shell[data-view="racing"] .racing-event-tabs button { background: #303233; }
.member-app-shell[data-view="racing"] .racing-event-tabs button.active { background: #07818b; box-shadow: inset 0 -3px 0 #22d7e5; }
.member-app-shell[data-view="racing"] .racing-market-tabs button.active { background: #d3332f; }
.member-app-shell[data-view="racing"] .racing-market-tools > .member-workspace-segment button.active { background: #0a7f89; color: #ffffff; }
.member-app-shell[data-view="racing"] .racing-market-matrix { background: #101112; }
.member-app-shell[data-view="racing"] .racing-matrix-cell.odds { background: #f0f1f1; color: #171a1b; }
.member-app-shell[data-view="racing"] .racing-matrix-cell.odds.lower { background: #d9dddd; }
.member-app-shell[data-view="racing"] .racing-matrix-cell.odds.selected { background: #08766f; color: #ffffff; }
.member-app-shell[data-view="racing"] .member-submit-bet { border-color: #f2cf27; background: #f2cf27; color: #211e08; }

.member-app-shell[data-view="sports"] {
  --member-dark: #11171b;
  --member-yellow: #f4d719;
  background: #171e22;
}
.member-app-shell[data-view="sports"] .member-topbar { background: #171d21; }
.member-app-shell[data-view="sports"] .member-main,
.member-app-shell[data-view="sports"] .member-content { background: #1d2428; }
.member-app-shell[data-view="sports"] .sports-toolbar,
.member-app-shell[data-view="sports"] :where(.sports-category-rail, .sports-featured, .sports-league-head, .sports-event-row, .member-bet-slip) {
  border-color: #3b474c;
  border-radius: 0;
}
.member-app-shell[data-view="sports"] .sports-category-rail { background: #20282c; }
.member-app-shell[data-view="sports"] .sports-category-row { background: #20282c; }
.member-app-shell[data-view="sports"] .sports-category-row.active { background: #118f77; box-shadow: inset 3px 0 0 #42ddbf; }
.member-app-shell[data-view="sports"] .sports-featured { background: #18332f; }
.member-app-shell[data-view="sports"] .sports-league-head { background: #139177; color: #ffffff; }
.member-app-shell[data-view="sports"] .sports-league-head span { color: #c5f1e7; }
.member-app-shell[data-view="sports"] .sports-event-row { background: #283136; }
.member-app-shell[data-view="sports"] .sports-odds-control { background: #313b40; }
.member-app-shell[data-view="sports"] .sports-odds-control > strong { color: #f4d719; }
.member-app-shell[data-view="sports"] .sports-odds-control.selected { border-color: #f4d719; background: #4b471d; box-shadow: inset 3px 0 0 #f4d719; }
.member-app-shell[data-view="sports"] .member-submit-bet { border-color: #f4d719; background: #f4d719; color: #252106; }

.member-app-shell[data-view="casino"] {
  --member-dark: #0b1220;
  --member-yellow: #d8b45f;
  background: #080c14;
}
.member-app-shell[data-view="casino"] .member-topbar { border-bottom-color: #27334b; background: #0c1628; }
.member-app-shell[data-view="casino"] .member-main,
.member-app-shell[data-view="casino"] .member-content { background: #080c14; }
.member-app-shell[data-view="casino"] .member-asset-selector { border: 1px solid #2b3952; background: #0e1727; }
.member-app-shell[data-view="casino"] .casino-provider-strip {
  gap: 1px;
  margin-top: 8px;
  border: 1px solid #2b3952;
  background: #2b3952;
}
.member-app-shell[data-view="casino"] .casino-provider-status {
  min-width: 190px;
  border: 0;
  background: #111a2b;
}
.member-app-shell[data-view="casino"] .casino-provider-status span { color: #e3e8f0; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.member-app-shell[data-view="casino"] .casino-toolbar { border-color: #2b3952; background: #111a2b; }
.member-app-shell[data-view="casino"] .casino-filter-tabs button { border-color: #35445f; background: #0b1321; color: #94a3ba; }
.member-app-shell[data-view="casino"] .casino-filter-tabs button.active { border-color: #d8b45f; background: #d8b45f; color: #251e0c; }
.member-app-shell[data-view="casino"] .casino-game-grid { grid-template-columns: repeat(5, minmax(170px, 1fr)); }
.member-app-shell[data-view="casino"] .casino-game-card { border-color: #2b3952; border-radius: 3px; background: #111827; }
.member-app-shell[data-view="casino"] .casino-game-card:hover { border-color: #d8b45f; }
.member-app-shell[data-view="casino"] .casino-game-info { background: #111827; }
.member-app-shell[data-view="casino"] .casino-launch-button { border-color: #596784; background: #1a2438; }
.member-app-shell[data-view="casino"] .casino-launch-button:hover { border-color: #d8b45f; color: #e8ca82; }
.member-app-shell[data-view="casino"] .casino-order-history { border-color: #2b3952; background: #0b1321; }
.member-app-shell[data-view="casino"] .casino-order-history-head,
.member-app-shell[data-view="casino"] .casino-order-row { border-color: #2b3952; }
.member-app-shell[data-view="casino"] .casino-order-row { background: #111827; }
.member-app-shell[data-view="casino"] .casino-order-totals { background: #2b3952; }
.member-app-shell[data-view="casino"] .casino-order-totals div { background: #0e1727; }

.member-app-shell[data-view="mini"] {
  --member-dark: #0a0c0f;
  background: #05070a;
}
.member-app-shell[data-view="mini"] .member-topbar { background: #0a0c0f; }
.member-app-shell[data-view="mini"] .member-main,
.member-app-shell[data-view="mini"] .member-content { background: #05070a; }
.member-app-shell[data-view="mini"] :where(.mini-game-rail, .mini-game-area, .member-bet-slip) { border-color: #37434a; border-radius: 0; }
.member-app-shell[data-view="mini"] .mini-game-rail { background: #11171b; }
.member-app-shell[data-view="mini"] .mini-game-row { background: #11171b; }
.member-app-shell[data-view="mini"] .mini-game-row.active { background: #075f67; box-shadow: inset 3px 0 0 #1bd1df; }
.member-app-shell[data-view="mini"] .mini-game-select { background: transparent; }
.member-app-shell[data-view="mini"] .mini-round-head { background: #1c2328; }
.member-app-shell[data-view="mini"] .mini-draw-stage { background: #161f24; }
.member-app-shell[data-view="mini"] .mini-market-group { background: #11171b; }
.member-app-shell[data-view="mini"] .mini-odds-control.selected { border-color: #1bd1df; background: #075f67; box-shadow: inset 3px 0 0 #1bd1df; }
.member-app-shell[data-view="mini"] .member-submit-bet { border-color: #f2cf27; background: #f2cf27; color: #211e08; }

.member-protection-cooling {
  min-height: 48px;
  padding: 9px 13px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #d9a9a7;
  border-top: 0;
  background: #fff4f3;
}
.member-protection-cooling b { color: #6f302e; font-size: 11px; }
.member-protection-cooling > span:last-child { color: #9a403e; font-size: 9px; }
.member-protection-limit-row { grid-template-columns: minmax(0, 1fr) auto 54px auto; }
.member-protection-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.member-notification-summary-row { grid-template-columns: minmax(180px, 1fr) minmax(220px, 2fr) minmax(90px, auto); }
.member-notification-badges { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.member-notification-badges small { color: var(--muted); font-size: 9px; }
.member-notification-modal { width: min(760px, 100%); }
.member-notification-form { display: grid; gap: 0; }
.member-notification-form-section { padding: 4px 0 18px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.member-notification-form-section + .member-notification-form-section { padding-top: 18px; }
.member-notification-form-section:last-of-type { border-bottom: 0; }
.member-notification-form-section h3 { margin: 0; font-size: 12px; }
.member-notification-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.member-notification-option { min-width: 0; min-height: 58px; padding: 9px 10px; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.member-notification-option input,
.member-notification-quiet-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--success); }
.member-notification-option span { min-width: 0; display: grid; gap: 3px; }
.member-notification-option b { font-size: 10px; }
.member-notification-option small { overflow-wrap: anywhere; color: var(--muted); font-size: 9px; }
.member-notification-option:has(input:disabled) { background: var(--surface-soft); }
.member-notification-quiet-toggle { width: fit-content; display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 750; }
.member-notification-quiet-fields { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)) minmax(220px, 1.5fr); gap: 8px; }
.member-account-security-note,
.member-account-modal-summary { margin: 0; color: #68777a; font-size: 10px; line-height: 1.55; }
.member-protection-workspace .summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.member-protection-workspace .metric-card {
  min-height: 72px;
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.member-protection-workspace .metric-card span { color: var(--muted); font-size: 10px; }
.member-protection-workspace .metric-card strong { font-size: 22px; }
.member-protection-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(120px, 180px) minmax(120px, 180px) auto;
  align-items: end;
  gap: 8px;
  margin-bottom: 12px;
}
.member-protection-filter-bar > input,
.member-protection-filter-bar > select { width: 100%; min-width: 0; }
.member-protection-filter-bar .filter-actions { display: flex; gap: 6px; }
.member-protection-workspace .pagination {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
}
.member-protection-table { min-width: 920px; }
.member-game-preference-workspace .summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.member-game-preference-workspace > .stage-seven-tabs { margin-bottom: 12px; }
.member-game-preference-workspace .member-sports-preference-summary { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.member-game-preference-workspace .metric-card { min-height: 72px; padding: 12px; display: grid; align-content: center; gap: 4px; border: 1px solid var(--line); background: var(--surface); }
.member-game-preference-workspace .metric-card span { color: var(--muted); font-size: 10px; }
.member-game-preference-workspace .metric-card strong { font-size: 22px; }
.member-game-preference-filter-bar { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(120px, 180px) minmax(120px, 180px) auto; align-items: end; gap: 8px; margin-bottom: 12px; }
.member-game-preference-filter-bar > input,
.member-game-preference-filter-bar > select { width: 100%; min-width: 0; }
.member-game-preference-filter-bar .filter-actions { display: flex; gap: 6px; }
.member-game-preference-workspace .pagination { min-height: 44px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: var(--muted); font-size: 10px; }
.member-game-preference-table { min-width: 1120px; }
.member-sports-preference-table { min-width: 1420px; }
.member-sports-bet-preference-filter-bar { grid-template-columns: minmax(200px, 1fr) repeat(3, minmax(120px, 170px)) auto; }
.member-sports-bet-preference-table { min-width: 1320px; }
.member-notification-preference-filter-bar { grid-template-columns: minmax(190px, 1fr) repeat(4, minmax(110px, 160px)) auto; }
.member-notification-preference-table { min-width: 1460px; }
.member-game-preference-cell { min-width: 180px; display: grid; gap: 5px; }
.member-game-preference-line { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px; }
.member-game-preference-line .primary-cell { min-width: 0; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.member-game-preference-line .sub-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-game-preference-cell > small { color: var(--muted); font-size: 9px; }

@media (max-width: 1400px) {
  .member-app-shell[data-view="casino"] .casino-game-grid { grid-template-columns: repeat(4, minmax(170px, 1fr)); }
  body[data-role="ADMIN"] .app-shell[data-view="racingOps"] .racing-ops-layout { grid-template-columns: 195px minmax(390px, 1fr); }
  body[data-role="ADMIN"] .app-shell[data-view="sportsOps"] .sports-ops-layout { grid-template-columns: 195px minmax(390px, 1fr) 275px; }
}

@media (max-width: 1120px) {
  body[data-role="AGENT"] .channel-layout { grid-template-columns: 190px minmax(0, 1fr); }
  .member-app-shell[data-view="casino"] .casino-game-grid { grid-template-columns: repeat(3, minmax(170px, 1fr)); }
  body[data-role="ADMIN"] .app-shell[data-view="racingOps"] .racing-ops-layout,
  body[data-role="ADMIN"] .app-shell[data-view="sportsOps"] .sports-ops-layout { grid-template-columns: 190px minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .login-page { grid-template-columns: minmax(0, 1fr); }
  .login-brand { min-height: 230px; padding: 24px; border-right: 0; border-bottom: 1px solid #1c3852; }
  .login-signal h1 { font-size: 29px; }
  .login-signal p { display: block; font-size: 12px; }
  .login-signal .signal-grid { margin-top: 20px; }
  .login-foot { display: none; }
  .login-main { min-height: 0; padding: 20px 14px 32px; border-left: 0; }
  .login-panel { padding: 20px 16px; }
  body[data-role="AGENT"] .channel-app-shell { grid-template-rows: 60px minmax(0, 1fr) 64px; }
  body[data-role="AGENT"] .channel-topbar { height: 60px; }
  body[data-role="AGENT"] .channel-content { padding: 14px 12px 28px; }
  body[data-role="ADMIN"] .app-shell[data-view="racingOps"] .racing-ops-layout,
  body[data-role="ADMIN"] .app-shell[data-view="sportsOps"] .sports-ops-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  body[data-role="ADMIN"] .app-shell[data-view="racingOps"] .racing-monitor-toolbar {
    grid-template-columns: minmax(0, 1fr) 34px;
  }
  .racing-monitor-event-field,
  .racing-monitor-count { grid-column: 1 / -1; }
  .member-app-shell[data-view="home"] .member-product-card { min-height: 220px; }
  .member-app-shell[data-view="racing"] .racing-workbench {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }
  .member-app-shell[data-view="racing"] .racing-workbench > .member-mobile-pane {
    min-width: 0;
    grid-column: 1 / -1;
  }
  .member-app-shell[data-view="casino"] .casino-game-grid { grid-template-columns: repeat(2, minmax(136px, 1fr)); }
  .member-app-shell[data-view="casino"] .casino-provider-status { min-width: 160px; }
  .member-protection-limit-row { grid-template-columns: minmax(0, 1fr) auto; }
  .member-protection-limit-row .member-protection-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .member-protection-cooling { grid-template-columns: auto minmax(0, 1fr); }
  .member-protection-cooling > span:last-child { grid-column: 1 / -1; }
  .member-protection-workspace .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-protection-filter-bar { grid-template-columns: minmax(0, 1fr); }
  .member-protection-filter-bar .filter-actions > .btn { flex: 1; }
  .member-protection-workspace .pagination { justify-content: space-between; }
  .member-notification-summary-row { grid-template-columns: minmax(0, 1fr); }
  .member-notification-summary-row > span:last-child { grid-column: auto; }
  .member-notification-option-grid,
  .member-notification-quiet-fields { grid-template-columns: minmax(0, 1fr); }
  .member-notification-modal { width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; overflow: auto; }
  .member-game-preference-workspace .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-game-preference-workspace .member-sports-preference-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-game-preference-filter-bar { grid-template-columns: minmax(0, 1fr); }
  .member-game-preference-filter-bar .filter-actions > .btn { flex: 1; }
  .member-game-preference-workspace .pagination { justify-content: space-between; }
  .sports-bet-preference-backdrop { padding: 0; place-items: stretch; }
  .sports-bet-preference-modal { width: 100%; max-height: 100dvh; border: 0; border-radius: 0; overflow: auto; }
  .sports-bet-quick-amount-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sports-bet-setting-segments { grid-template-columns: minmax(0, 1fr); }
  .sports-bet-asset-segments { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mini Game searchable catalog */
.mini-catalog-toolbar {
  min-width: 0;
  margin-bottom: 10px;
  padding: 10px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.mini-catalog-categories {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(82px, 1fr));
  gap: 5px;
}
.mini-catalog-categories button {
  min-width: 0;
  min-height: 34px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-alt);
  color: var(--ink);
  font-size: 9px;
}
.mini-catalog-categories button b { font-size: 9px; font-variant-numeric: tabular-nums; }
.mini-catalog-categories button.active { border-color: #168f86; background: #e2f3f0; color: #075f59; box-shadow: inset 3px 0 0 #168f86; }
.mini-catalog-filter-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 150px) minmax(150px, 185px) auto auto;
  align-items: center;
  gap: 6px;
}
.mini-catalog-search,
.mini-catalog-select { width: 100%; min-width: 0; height: 34px; }
.mini-catalog-summary { min-height: 20px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 9px; }
.mini-catalog-summary b { color: #28736e; font-size: 9px; }
.mini-catalog-loading { color: #a67312 !important; }
.mini-catalog-empty { min-height: 150px; padding: 20px 12px; display: grid; place-content: center; color: #7e8a8c; font-size: 9px; text-align: center; }
.mini-catalog-preview-summary { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
.mini-catalog-preview-table { min-width: 1020px; }

.member-app-shell[data-view="mini"] .mini-catalog-toolbar { border-color: #37434a; background: #10161a; color: #e8eeed; }
.member-app-shell[data-view="mini"] .mini-catalog-categories button { border-color: #37434a; background: #1a2227; color: #aeb9bb; }
.member-app-shell[data-view="mini"] .mini-catalog-categories button.active { border-color: #1bd1df; background: #075f67; color: #ffffff; box-shadow: inset 3px 0 0 #1bd1df; }
.member-app-shell[data-view="mini"] :where(.mini-catalog-search, .mini-catalog-select) { border-color: #435057; background: #161e23; color: #e8eeed; }
.member-app-shell[data-view="mini"] .mini-catalog-search::placeholder { color: #78858a; }
.member-app-shell[data-view="mini"] .mini-catalog-summary { color: #849196; }
.member-app-shell[data-view="mini"] .mini-catalog-summary b { color: #66ced5; }

@media (max-width: 760px) {
  .mini-catalog-toolbar { padding: 8px; }
  .mini-catalog-categories { display: flex; overflow-x: auto; }
  .mini-catalog-categories button { flex: 0 0 92px; }
  .mini-catalog-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-catalog-search { grid-column: 1 / -1; }
  .mini-catalog-filter-row .btn { width: 100%; }
  .mini-catalog-preview-summary { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 390px) {
  .mini-catalog-filter-row { grid-template-columns: minmax(0, 1fr); }
  .mini-catalog-search { grid-column: auto; }
  .mini-catalog-summary { align-items: flex-start; flex-direction: column; }
}

/* Racing international catalog and source mapping */
.racing-catalog-workspace,
.racing-mapping-workspace { min-width: 0; }
.racing-catalog-workspace > .summary-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.racing-catalog-command {
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
}
.racing-catalog-command > div { min-width: 0; overflow-wrap: anywhere; }
.racing-catalog-filters {
  min-width: 0;
  padding: 9px;
  display: grid;
  grid-template-columns: minmax(170px, 1.4fr) repeat(4, minmax(120px, 0.8fr));
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.racing-catalog-filter { min-width: 0; display: grid; gap: 4px; }
.racing-catalog-filter > span { color: var(--muted); font-size: 9px; font-weight: 750; }
.racing-catalog-filter :where(input, select) { width: 100%; min-width: 0; height: 34px; }
.racing-catalog-history { align-items: start; }
.racing-catalog-history .table-wrap { max-height: 360px; overflow: auto; }
.racing-catalog-modal { width: min(920px, 100%); }
.racing-catalog-modal .agent-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.racing-catalog-modal .field { min-width: 0; }
.racing-catalog-modal input[readonly] { background: var(--surface-soft); color: var(--muted); }
.racing-import-preview-note { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.racing-import-preview-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.racing-import-preview-fact {
  min-width: 0;
  min-height: 56px;
  padding: 8px 9px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}
.racing-import-preview-fact span { color: var(--muted); font-size: 9px; }
.racing-import-preview-fact b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.member-racing-directory {
  width: 100%;
  min-width: 0;
  padding: 12px;
  display: grid;
  gap: 9px;
  border-top: 1px solid #354044;
  border-bottom: 1px solid #354044;
  background: #111719;
  color: #eef3f2;
}
.member-racing-directory-head { min-width: 0; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.member-racing-directory-head > div { min-width: 0; display: grid; gap: 3px; }
.member-racing-directory-head span { color: #d6b959; font-size: 9px; font-weight: 850; }
.member-racing-directory-head h1 { margin: 0; font-size: 18px; letter-spacing: 0; }
.member-racing-directory-head p,
.member-racing-directory-head > small { margin: 0; color: #8d9a9d; font-size: 9px; line-height: 1.45; }
.member-racing-directory .racing-catalog-filters {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  border-color: #354044;
  background: #171e21;
}
.member-racing-directory .racing-catalog-filter > span { color: #89979a; }
.member-racing-directory .racing-catalog-filter select { border-color: #414d50; background: #101618; color: #edf2f1; }
.member-racing-venue-grid {
  min-width: 0;
  max-height: 226px;
  padding-right: 3px;
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 5px;
  overflow: auto;
}
.member-racing-venue {
  min-width: 0;
  min-height: 66px;
  padding: 8px 9px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid #354044;
  border-radius: 3px;
  background: #1a2225;
  color: #e6eceb;
  text-align: left;
}
.member-racing-venue:hover { border-color: #748286; background: #202a2d; }
.member-racing-venue.active { border-color: #d6b959; background: #2c291c; box-shadow: inset 3px 0 0 #d6b959; }
.member-racing-venue span,
.member-racing-venue small { overflow: hidden; color: #8d999c; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.member-racing-venue b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.racing-catalog-empty { margin-top: 8px; }
.racing-source-facts { padding: 9px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.racing-source-facts > div {
  min-width: 0;
  min-height: 48px;
  padding: 7px 8px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid #323d40;
  background: #1b2225;
}
.racing-source-facts span { color: #829093; font-size: 8px; }
.racing-source-facts b { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.racing-source-runners { max-height: 260px; padding: 0 9px 9px; display: grid; gap: 4px; overflow: auto; }
.racing-source-runners > div { min-height: 34px; padding: 5px 7px; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 6px; border-bottom: 1px solid #303a3d; }
.racing-source-runners > div > b { color: #d6b959; font-size: 10px; }
.racing-source-runners > div > span { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

body[data-role="AGENT"] .channel-view-racingCatalog .racing-catalog-filters { grid-template-columns: minmax(180px, 1.5fr) repeat(4, minmax(120px, 1fr)); }
body[data-role="AGENT"] .channel-view-racingCatalog > .summary-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }

@media (max-width: 1180px) {
  .racing-catalog-workspace > .summary-grid,
  body[data-role="AGENT"] .channel-view-racingCatalog > .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .racing-catalog-filters,
  body[data-role="AGENT"] .channel-view-racingCatalog .racing-catalog-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .racing-catalog-search { grid-column: span 2; }
  .member-racing-venue-grid { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
}

@media (max-width: 760px) {
  .racing-catalog-workspace > .summary-grid,
  body[data-role="AGENT"] .channel-view-racingCatalog > .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-batch-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-batch-fact { border-bottom: 1px solid var(--line); }
  .racing-catalog-command { align-items: stretch; flex-direction: column; }
  .racing-catalog-command .btn { width: 100%; }
  .racing-catalog-filters,
  body[data-role="AGENT"] .channel-view-racingCatalog .racing-catalog-filters,
  .member-racing-directory .racing-catalog-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .racing-catalog-search { grid-column: 1 / -1; }
  .racing-catalog-modal { width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; overflow: auto; }
  .racing-catalog-modal .agent-form-grid { grid-template-columns: minmax(0, 1fr); }
  .racing-import-preview-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-racing-directory { padding: 9px 8px; }
  .member-racing-directory-head { align-items: flex-start; flex-direction: column; }
  .member-racing-venue-grid { max-height: 210px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .racing-source-facts { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 390px) {
  .racing-catalog-filters,
  body[data-role="AGENT"] .channel-view-racingCatalog .racing-catalog-filters,
  .member-racing-directory .racing-catalog-filters { grid-template-columns: minmax(0, 1fr); }
  .racing-catalog-search { grid-column: auto; }
  .member-racing-venue-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Foundation 1.139: shared list workspace and multi-window detail controls. */
.table-wrap.table-workspace { min-width: 0; overflow: visible; }
.table-workspace-toolbar {
  min-height: 34px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}
.table-workspace-count { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.table-column-settings-button { width: 28px; min-width: 28px; height: 28px; padding: 0; }
.table-scroll { width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; }
.table-top-scrollbar { min-height: 31px; padding: 3px 4px; display: grid; grid-template-columns: 28px minmax(0, 1fr) 28px; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.table-top-scrollbar[hidden] { display: none; }
.table-top-scrollbar .btn { width: 28px; min-width: 28px; height: 24px; min-height: 24px; padding: 0; }
.table-top-scroll { width: 100%; height: 14px; overflow-x: auto; overflow-y: hidden; scrollbar-color: var(--accent) var(--surface-alt); }
.table-top-scroll-spacer { height: 1px; }
.table-primary-link {
  max-width: 100%;
  padding: 0;
  display: inline-flex;
  align-items: flex-start;
  border: 0;
  background: transparent;
  color: #087f67;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.table-primary-link:hover { color: #05644f; text-decoration: underline; text-underline-offset: 3px; }
.table-primary-link:focus-visible { outline: 2px solid #28a989; outline-offset: 3px; }
.table-custom-order .member-sticky-col { position: static !important; box-shadow: none !important; }
.table-empty-row td { padding: 0; }

.table-column-dialog-layer { z-index: 90; }
.modal.table-column-dialog { width: min(540px, 100%); max-height: min(88vh, 760px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.table-column-dialog .modal-head > div,
.generic-row-detail-modal .modal-head > div { min-width: 0; }
.table-column-dialog .modal-head p,
.generic-row-detail-modal .modal-head p { margin: 4px 0 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.table-column-dialog-body { padding: 8px 12px; display: grid; gap: 4px; overflow: auto; }
.table-column-option { min-height: 42px; padding: 5px 7px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.table-column-toggle { min-width: 0; display: flex; align-items: center; gap: 9px; font-size: 12px; }
.table-column-toggle span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-column-order-actions,
.modal-head-actions { display: flex; align-items: center; gap: 4px; }
.table-column-order-actions .btn { width: 28px; min-width: 28px; height: 28px; padding: 0; }

.generic-detail-layer { z-index: 75; }
.modal.generic-row-detail-modal { width: min(820px, 100%); max-height: 90vh; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.generic-row-detail-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; overflow: auto; }
.draggable-detail-modal { touch-action: none; }
.draggable-detail-modal .detail-drag-handle { cursor: move; user-select: none; }
.draggable-detail-modal.is-dragging { box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34); }

.member-action-menu-layer { position: fixed; inset: 0; z-index: 82; background: transparent; }
.member-action-menu {
  position: fixed;
  width: min(286px, calc(100vw - 16px));
  max-height: min(760px, calc(100dvh - 16px));
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
}
.member-action-menu-head { position: sticky; top: -6px; z-index: 2; padding: 8px 9px 10px; display: grid; gap: 3px; border-bottom: 1px solid var(--line); background: var(--surface); }
.member-action-menu-head b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.member-action-menu-head span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.member-action-menu-row { min-height: 36px; display: grid; grid-template-columns: minmax(0, 1fr) 30px; align-items: center; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.member-action-menu-row:last-child { border-bottom: 0; }
.member-action-menu-command { min-width: 0; height: 34px; padding: 0 9px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 11px; text-align: left; cursor: pointer; }
.member-action-menu-command:hover { background: var(--surface-soft); color: #087f67; }
.member-action-menu-row .btn { width: 28px; min-width: 28px; height: 28px; padding: 0; }
.member-action-menu-divider { height: 5px; margin: 2px -6px; border-top: 1px solid var(--line); border-bottom: 1px solid color-mix(in srgb, var(--line) 45%, transparent); background: var(--surface-soft); }

body[data-role="ADMIN"] .table-primary-link { color: #75d5b4; }
body[data-role="ADMIN"] .table-primary-link:hover { color: #a6f0d7; }
body[data-role="ADMIN"] .table-workspace-toolbar,
body[data-role="ADMIN"] .member-action-menu-command:hover { background: #091a2a; }
body[data-role="ADMIN"] .member-action-menu { border-color: #315776; background: #0d1f31; color: #dbeafe; }
body[data-role="ADMIN"] .member-action-menu-head { background: #0d1f31; }
body[data-role="ADMIN"] .member-action-menu-head,
body[data-role="ADMIN"] .member-action-menu-row,
body[data-role="ADMIN"] .member-action-menu-divider { border-color: #1c3852; }
body[data-role="ADMIN"] .member-hover-preview { border-color: #315776; background: #0d1f31; color: #dbeafe; }
body[data-role="ADMIN"] .member-hover-preview-head { border-color: #1c3852; background: #091a2a; }
body[data-role="ADMIN"] .member-channel-preview-row,
body[data-role="ADMIN"] .member-note-preview-item { border-color: #1c3852; }
body[data-role="ADMIN"] .member-channel-preview-row:hover,
body[data-role="ADMIN"] .member-channel-compact:hover,
body[data-role="ADMIN"] .member-channel-compact:focus-visible { background: #10283d; }

@media (max-width: 760px) {
  .table-workspace-toolbar { position: sticky; left: 0; }
  .modal-backdrop.table-column-dialog-layer,
  .modal-backdrop.generic-detail-layer { padding: 0; place-items: stretch; }
  .modal.table-column-dialog,
  .modal.generic-row-detail-modal { width: 100%; height: 100dvh; min-height: 0; max-height: 100dvh; border-radius: 0; }
  .generic-row-detail-body { grid-template-columns: minmax(0, 1fr); }
  .draggable-detail-modal { position: static !important; left: auto !important; top: auto !important; margin: 0 !important; transform: none !important; }
  .draggable-detail-modal .detail-drag-handle { cursor: default; }
  .member-action-menu { left: 8px !important; right: 8px; bottom: 8px; top: auto !important; width: auto; max-height: calc(100dvh - 16px); overflow: auto; }
}

/* Foundation 1.144: E-PLAY primary navigation, member object workspace, and finance flow. */
.admin-navigation {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.admin-nav-filter {
  min-height: 34px;
  margin: 4px 10px 5px;
  padding: 0 8px;
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  border: 1px solid #1c3852;
  border-radius: 4px;
  background: #071827;
  color: #6687a3;
}
.admin-nav-filter input {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  color: #dbeafe;
  font-size: 11px;
}
.admin-primary-nav {
  min-height: 0;
  flex: 1;
  display: grid !important;
  align-content: start;
  gap: 0 !important;
  padding: 0 0 10px !important;
  overflow-y: auto;
}
.admin-primary-nav-button {
  position: relative;
  width: 100%;
  min-height: 40px;
  padding: 0 12px 0 16px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #8aa4bd;
  text-align: left;
  cursor: pointer;
}
.admin-primary-nav-button[hidden] { display: none; }
.admin-primary-nav-button:hover {
  background: rgba(47, 125, 255, 0.1);
  color: #dbeafe;
}
.admin-primary-nav-button.active {
  border-left-color: #18d4ff;
  background: rgba(47, 125, 255, 0.14);
  color: #edf8ff;
}
.admin-primary-nav-button.search-match { background: rgba(24, 212, 255, 0.06); }
.admin-primary-nav-glyph {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #7694ae;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}
.admin-primary-nav-button.active .admin-primary-nav-glyph { color: #18d4ff; }
.admin-primary-nav-button > span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-primary-nav-button > small {
  max-width: 76px;
  overflow: hidden;
  color: #526f88;
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-primary-nav-button.active > small { color: #7ba3c2; }
.admin-primary-nav.searching .admin-primary-nav-button > small { color: #67dff4; }

.admin-page-context {
  min-height: 38px;
  margin: -4px 0 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  border: 1px solid #1c3852;
  background: #091827;
  overflow: hidden;
}
.admin-page-context-identity {
  min-width: 205px;
  height: 100%;
  padding: 0 10px;
  display: grid;
  grid-template-columns: 22px auto auto;
  align-items: center;
  gap: 7px;
  border-right: 1px solid #1c3852;
}
.admin-page-context-identity > b {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--workspace-accent);
  color: var(--workspace-accent);
  font-size: 8px;
}
.admin-page-context-identity > span { color: #6f8ba4; font-size: 9px; }
.admin-page-context-identity > strong { color: #dbeafe; font-size: 10px; }
.admin-page-siblings { min-width: 0; display: flex; align-items: stretch; overflow-x: auto; }
.admin-page-siblings button {
  min-width: max-content;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid #173149;
  background: transparent;
  color: #7894ae;
  font-size: 9px;
}
.admin-page-siblings button:hover { background: #10283d; color: #dbeafe; }
.admin-page-siblings button.active { background: var(--workspace-accent-soft); color: var(--workspace-accent); box-shadow: inset 0 -2px 0 var(--workspace-accent); }

body[data-role="ADMIN"] :where(.app-shell[data-group="members"], .app-shell[data-group="agents"], .app-shell[data-group="stores"]) {
  --workspace-accent: #22c7a6;
  --workspace-accent-soft: #0d3a35;
  --workspace-accent-ink: #031d18;
}
body[data-role="ADMIN"] :where(.app-shell[data-group="finance"], .app-shell[data-group="settlement"], .app-shell[data-group="rules"]) {
  --workspace-accent: #f59e0b;
  --workspace-accent-soft: #3a290d;
  --workspace-accent-ink: #211705;
}
body[data-role="ADMIN"] :where(.app-shell[data-group="events"], .app-shell[data-group="bets"], .app-shell[data-group="messages"]) {
  --workspace-accent: #18d4ff;
  --workspace-accent-soft: #0b3544;
  --workspace-accent-ink: #03171d;
}
body[data-role="ADMIN"] :where(.app-shell[data-group="games"]) {
  --workspace-accent: #9b7cff;
  --workspace-accent-soft: #2a2146;
  --workspace-accent-ink: #ffffff;
}
body[data-role="ADMIN"] :where(.app-shell[data-group="risk"]) {
  --workspace-accent: #ff6572;
  --workspace-accent-soft: #3a1c25;
  --workspace-accent-ink: #ffffff;
}
body[data-role="ADMIN"] :where(.app-shell[data-group="reports"]) {
  --workspace-accent: #5fd18a;
  --workspace-accent-soft: #143524;
  --workspace-accent-ink: #061a0e;
}
body[data-role="ADMIN"] :where(.app-shell[data-group="audit"], .app-shell[data-group="settings"], .app-shell[data-group="personal"]) {
  --workspace-accent: #8da9bf;
  --workspace-accent-soft: #203142;
  --workspace-accent-ink: #06111f;
}

.modal.member-detail-modal {
  position: relative;
  width: min(1420px, calc(100vw - 28px));
  height: min(900px, calc(100dvh - 28px));
  max-height: none;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
}
.member-detail-identity-band {
  min-width: 0;
  min-height: 78px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: minmax(350px, 1fr) minmax(420px, 1.25fr);
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #1c3852;
  border-left: 3px solid var(--workspace-accent, #2f7dff);
  background: #0d1f31;
}
.member-detail-fixed-identity { min-width: 0; display: flex; align-items: center; gap: 10px; }
.member-detail-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #315776;
  background: #102d46;
  color: #73e4fb;
  font-size: 13px;
}
.member-detail-identity-copy { min-width: 0; }
.member-detail-identity-title { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.member-detail-identity-title > strong { max-width: 260px; overflow: hidden; color: #f0f7ff; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.member-detail-identity-meta { margin-top: 7px; display: flex; align-items: center; flex-wrap: wrap; color: #7894ae; font-size: 8px; }
.member-detail-identity-meta span { padding: 0 7px; border-right: 1px solid #23445f; }
.member-detail-identity-meta span:first-child { padding-left: 0; color: #67dff4; }
.member-detail-queues { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(90px, 1fr)); border: 1px solid #1c3852; }
.member-detail-queue {
  min-width: 0;
  min-height: 47px;
  padding: 5px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  border: 0;
  border-right: 1px solid #1c3852;
  background: #0a1929;
  color: #819db5;
  text-align: left;
}
.member-detail-queue:last-child { border-right: 0; }
.member-detail-queue:hover { background: #10283d; color: #dbeafe; }
.member-detail-queue span { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.member-detail-queue b { color: #edf7ff; font-size: 13px; }
.member-detail-queue.deposit b { color: #65dd95; }
.member-detail-queue.withdrawal b { color: #ffc46b; }
.member-detail-queue.risk b { color: #ff8d97; }
.member-detail-metrics-band { grid-template-columns: repeat(5, minmax(100px, 1fr)); background: #091827; }
.member-detail-metrics-band .member-detail-fact { min-height: 67px; padding: 9px 10px; }
.member-detail-metrics-band .member-detail-fact > span { font-size: 8px; }
.member-detail-metrics-band .member-detail-fact > b { margin-top: 7px; color: #f1f8ff; font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px; }
.member-detail-metrics-band .member-detail-fact > small { font-size: 8px; }
.member-detail-workspace { min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 42px minmax(0, 1fr); overflow: hidden; }
.member-detail-tabs-shell {
  min-width: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: stretch;
  border-bottom: 1px solid #1c3852;
  background: #091827;
}
.member-detail-tabs-shell > .btn.icon {
  width: 32px;
  min-width: 32px;
  min-height: 41px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #0a1929;
  color: #6f91aa;
}
.member-detail-tabs-shell > .btn.icon:first-child { border-right: 1px solid #1c3852; }
.member-detail-tabs-shell > .btn.icon:last-child { border-left: 1px solid #1c3852; }
.member-detail-tabs-shell > .btn.icon:hover { background: #10283d; color: #e7f6ff; }
.member-detail-workspace .member-detail-tabs {
  min-width: 0;
  min-height: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #315776 #091827;
  border-right: 0;
  border-bottom: 0;
  background: #091827;
}
.member-detail-workspace .member-detail-tabs button {
  width: auto;
  min-width: max-content;
  min-height: 41px;
  padding: 0 13px;
  border: 0;
  border-right: 1px solid #142f46;
  border-bottom: 2px solid transparent;
  color: #829bb2;
  font-size: 9px;
  text-align: center;
  white-space: nowrap;
}
.member-detail-workspace .member-detail-tabs button:hover { background: #0e2639; color: #dbeafe; }
.member-detail-workspace .member-detail-tabs button.active { border-bottom-color: var(--workspace-accent, #18d4ff); background: #102c43; color: #e7f6ff; }
.member-detail-workspace .member-detail-content { min-width: 0; min-height: 0; padding: 10px; overflow: auto; background: #0b1b2a; }
.member-product-matrix { min-width: 0; }
.member-product-matrix .table-wrap { overflow: hidden; }
.member-product-matrix-table { min-width: 980px; }
.member-product-identity { min-width: 126px; display: flex; align-items: center; gap: 7px; }
.member-product-mark { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid currentColor; background: #0a1929; font-size: 9px; }
.member-product-identity.product-racing { color: #42dcf5; }
.member-product-identity.product-sports { color: #ffb84d; }
.member-product-identity.product-casino { color: #ac8aff; }
.member-product-identity.product-mini { color: #65d78b; }
.member-product-access { min-width: 90px; display: grid; justify-items: start; gap: 4px; }
.member-product-baselines { margin-top: 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.member-product-baseline { min-width: 0; min-height: 58px; padding: 9px 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px 9px; border: 1px solid #294b68; background: #0a1929; }
.member-product-baseline b { color: #dbeafe; font-size: 10px; }
.member-product-baseline span:not(.badge) { grid-column: 1 / -1; color: #718ca5; font-size: 8px; }
.member-detail-lower-grid { min-width: 0; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(330px, .9fr); gap: 10px; }
.member-detail-timeline { margin: 0; padding: 0; list-style: none; }
.member-detail-timeline li { min-width: 0; min-height: 46px; padding: 6px 9px; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; border-bottom: 1px solid #173149; }
.member-detail-timeline li:last-child { border-bottom: 0; }
.member-timeline-kind { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #315776; background: #0a1929; color: #79a5c4; font-size: 8px; }
.member-detail-timeline b,
.member-detail-timeline small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-detail-timeline b { color: #c9dbea; font-size: 9px; }
.member-detail-timeline small { margin-top: 4px; color: #658198; font-size: 8px; }
.member-detail-risk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.member-detail-risk-grid .member-detail-fact { min-height: 72px; }
.member-overview-facts { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.finance-policy-notice { min-width: 0; margin: 0 0 10px; border: 1px solid #315b79; background: #0a1929; }
.finance-policy-notice-row { min-height: 38px; padding: 7px 10px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; border-bottom: 1px solid #1c3852; }
.finance-policy-notice-row:last-child { border-bottom: 0; }
.finance-policy-notice-row > span:last-child { color: #9bb3c5; font-size: 9px; line-height: 1.5; }
.finance-member-visibility { min-height: 120px; padding: 18px; display: grid; align-content: center; justify-items: start; gap: 8px; }
.finance-member-visibility b { font-size: 12px; }
.finance-member-visibility > span:last-child,
.finance-verification-note { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.finance-verification-note { grid-column: 1 / -1; }
.finance-flow-workspace { min-width: 0; margin: 0 0 12px; border: 1px solid var(--line); background: var(--surface); }
.finance-flow-title { min-height: 42px; padding: 8px 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.finance-flow-title > div { font-size: 11px; font-weight: 750; }
.finance-flow-title > span { color: var(--muted); font-size: 9px; }
.finance-flow-grid { min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); }
.finance-flow-card { min-width: 0; min-height: 118px; padding: 10px; display: grid; grid-template-rows: auto minmax(34px, 1fr) auto; align-items: start; gap: 8px; border-right: 1px solid var(--line); background: var(--surface); }
.finance-flow-card:last-child { border-right: 0; }
.finance-flow-head { min-width: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.finance-flow-step { width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid var(--workspace-accent, var(--accent)); color: var(--workspace-accent, var(--accent)); font-size: 8px; }
.finance-flow-head > strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.finance-flow-card p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.finance-flow-card > .btn { width: 100%; min-width: 0; }
.finance-amount-presets { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(70px, 1fr)); gap: 5px; }

body[data-role="ADMIN"] :where(.finance-flow-workspace, .finance-flow-card) { border-color: #1c3852; background: #0d1f31; }
body[data-role="ADMIN"] .finance-flow-title { border-color: #1c3852; background: #0a1929; }
body[data-role="ADMIN"] .finance-flow-card { border-color: #1c3852; }
body[data-role="ADMIN"] .finance-flow-card p { color: #718ca5; }
body[data-role="MEMBER"] :where(.finance-flow-workspace, .finance-flow-card) { border-color: #303b40; background: #12191d; color: #e8eef0; }
body[data-role="MEMBER"] .finance-flow-title { border-color: #303b40; background: #0f161a; }
body[data-role="MEMBER"] .finance-flow-card { border-color: #303b40; }
body[data-role="MEMBER"] .finance-flow-step { border-color: var(--member-teal); color: var(--member-teal); }

@media (max-width: 1180px) {
  .member-detail-identity-band { grid-template-columns: minmax(320px, 1fr); }
  .member-detail-metrics-band { grid-template-columns: repeat(5, minmax(100px, 1fr)); }
  .member-detail-metrics-band .member-detail-fact:nth-child(5n) { border-right: 0; }
  .member-overview-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .finance-flow-card { border-bottom: 1px solid var(--line); }
}

@media (max-width: 1120px) and (min-width: 761px) {
  .admin-nav-filter { display: none; }
  .admin-primary-nav { padding: 5px 8px 10px !important; }
  .admin-primary-nav-button { min-height: 46px; padding: 0; grid-template-columns: 1fr; justify-items: center; border-left-width: 2px; }
  .admin-primary-nav-button > span,
  .admin-primary-nav-button > small { display: none; }
  .admin-primary-nav-glyph { width: 24px; height: 24px; font-size: 11px; }
  .admin-page-context-identity { min-width: 150px; grid-template-columns: 22px minmax(0, 1fr); }
  .admin-page-context-identity > span { display: none; }
}

@media (max-width: 760px) {
  body[data-role="ADMIN"] .admin-navigation { width: 100%; height: 62px; }
  body[data-role="ADMIN"] .admin-nav-filter { display: none; }
  body[data-role="ADMIN"] .admin-primary-nav { height: 62px; padding: 5px 6px !important; display: flex !important; align-items: stretch; overflow-x: auto; overflow-y: hidden; }
  body[data-role="ADMIN"] .admin-primary-nav-button {
    flex: 0 0 64px;
    width: 64px;
    min-height: 52px;
    padding: 3px 2px 2px;
    grid-template-columns: 1fr;
    justify-items: center;
    align-content: center;
    gap: 3px;
    border-left: 0;
    border-top: 2px solid transparent;
  }
  body[data-role="ADMIN"] .admin-primary-nav-button.active { border-top-color: #18d4ff; }
  body[data-role="ADMIN"] .admin-primary-nav-glyph { width: 21px; height: 20px; font-size: 10px; }
  body[data-role="ADMIN"] .admin-primary-nav-button > span { display: block; width: 100%; font-size: 8px; text-align: center; }
  body[data-role="ADMIN"] .admin-primary-nav-button > small { display: none; }
  .admin-page-context { margin: -4px 0 10px; grid-template-columns: minmax(0, 1fr); }
  .admin-page-context-identity { min-width: 0; min-height: 34px; border-right: 0; border-bottom: 1px solid #1c3852; }
  .admin-page-siblings button { height: 34px; }
  .modal.member-detail-modal { width: 100%; height: 100dvh; max-height: 100dvh; }
  .member-detail-identity-band { min-height: 0; padding: 8px; grid-template-columns: minmax(0, 1fr); }
  .member-detail-identity-meta span { padding: 2px 5px; }
  .member-detail-queues { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .member-detail-queue:nth-child(3) { border-right: 0; }
  .member-detail-metrics-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-detail-metrics-band .member-detail-fact { border-right: 1px solid #1c3852 !important; border-bottom: 1px solid #1c3852 !important; }
  .member-detail-metrics-band .member-detail-fact:nth-child(2n) { border-right: 0 !important; }
  .member-detail-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .member-detail-workspace .member-detail-tabs { padding: 0; display: flex; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid #1c3852; }
  .member-detail-workspace .member-detail-tabs button { width: auto; min-width: 104px; min-height: 39px; border-left: 0; border-bottom: 2px solid transparent; text-align: center; }
  .member-detail-workspace .member-detail-tabs button.active { border-bottom-color: var(--workspace-accent, #18d4ff); }
  .member-detail-workspace .member-detail-content { padding: 8px; }
  .member-overview-facts { grid-template-columns: minmax(0, 1fr); }
  .member-product-baselines,
  .member-detail-lower-grid { grid-template-columns: minmax(0, 1fr); }
  .member-detail-risk-grid { grid-template-columns: minmax(0, 1fr); }
  .finance-flow-title { align-items: flex-start; flex-direction: column; }
  .finance-flow-grid { grid-template-columns: minmax(0, 1fr); }
  .finance-flow-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .finance-flow-card:last-child { border-bottom: 0; }
  .finance-amount-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Foundation 1.49: exact approved operations-workspace design system. */
body[data-role="ADMIN"] .app-shell { grid-template-columns: 200px minmax(0, 1fr); }
body[data-role="ADMIN"] .sidebar-brand { height: 58px; padding: 0 14px; }
body[data-role="ADMIN"] .sidebar-brand .brand-mark { transform: scale(.9); transform-origin: left center; }
body[data-role="ADMIN"] .role-chip { display: none; }
body[data-role="ADMIN"] .topbar {
  height: 58px;
  padding: 0 16px;
  justify-content: space-between;
  gap: 14px;
  overflow: visible;
  background: #071522;
}
.admin-header-leading { min-width: 0; flex: 1 1 auto; display: flex; align-items: center; gap: 8px; }
.admin-top-search {
  width: min(560px, 58vw);
  min-width: 260px;
  height: 36px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #294b68;
  border-radius: 4px;
  background: #06111f;
  color: #7e99b2;
  text-align: left;
}
.admin-top-search:hover,
.admin-top-search:focus-visible { border-color: #18d4ff; color: #dff9ff; outline: none; }
.admin-top-search > b { color: #8aaac4; font-size: 16px; }
.admin-top-search > span { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.admin-top-search > small { padding: 2px 5px; border: 1px solid #23435d; border-radius: 3px; color: #607f98; font-size: 8px; }
body[data-role="ADMIN"] .top-actions { flex: 0 0 auto; }
.admin-header-tools { min-width: 0; gap: 4px; }
.admin-header-command {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #86a3bc;
}
.admin-header-command:hover,
.admin-header-command:focus-visible { border-color: #315776; background: #10283d; color: #e8f7ff; outline: none; }
.admin-header-command > b { font-size: 12px; font-weight: 750; }
.admin-header-command-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.admin-header-command > small {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  display: grid;
  place-items: center;
  border: 2px solid #071522;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 7px;
  font-weight: 800;
}
.admin-sidebar-toggle { margin-right: 2px; }
.admin-header-alerts > b { color: #ff7180; }
.admin-header-tasks > b { color: #ffc15d; }
.admin-header-language {
  height: 34px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #88a4bc;
  font-size: 9px;
}
.admin-header-language:hover { border-color: #315776; background: #10283d; color: #eef8ff; }
.admin-language-switcher { position: relative; flex: 0 0 auto; }
.admin-language-summary {
  min-width: 94px;
  height: 34px;
  padding: 0 7px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 9px;
  align-items: center;
  gap: 4px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #88a4bc;
  cursor: pointer;
  list-style: none;
}
.admin-language-summary::-webkit-details-marker { display: none; }
.admin-language-summary:hover,
.admin-language-summary:focus-visible,
.admin-language-switcher[open] .admin-language-summary { border-color: #315776; background: #10283d; color: #eef8ff; outline: none; }
.admin-language-summary > b {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid #315776;
  border-radius: 3px;
  color: #72e2f8;
  font-size: 8px;
}
.admin-language-summary > span { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.admin-language-summary > i { color: #55758e; font-size: 8px; font-style: normal; }
.admin-language-list {
  position: absolute;
  top: 39px;
  right: 0;
  z-index: 45;
  width: 206px;
  padding: 5px;
  display: grid;
  gap: 2px;
  border: 1px solid #315776;
  border-radius: 3px;
  background: #071522;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .45);
}
.admin-language-switcher:not([open]) .admin-language-list { display: none; }
.admin-language-option {
  min-height: 36px;
  padding: 4px 7px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 44px 12px;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: #8ca7bd;
  text-align: left;
}
.admin-language-option:hover,
.admin-language-option:focus-visible { border-color: #294b68; background: #10283d; color: #edf8ff; outline: none; }
.admin-language-option.active { border-color: #1d5668; background: #0d2c3c; color: #dffaff; }
.admin-language-option > b { color: #72e2f8; font-size: 9px; text-align: center; }
.admin-language-option > span { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.admin-language-option > small { color: #587a94; font-size: 7px; text-align: right; }
.admin-language-option > i { color: #4ade80; font-size: 9px; font-style: normal; }
.admin-profile-menu { position: relative; min-width: 0; margin-left: 3px; }
.admin-profile-summary {
  min-width: 154px;
  height: 40px;
  padding: 0 5px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 7px;
  border-left: 1px solid #1c3852;
  color: #b8cee0;
  cursor: pointer;
  list-style: none;
}
.admin-profile-summary::-webkit-details-marker { display: none; }
.admin-profile-avatar { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #2f5b78; border-radius: 50%; background: #12314a; color: #72e2f8; font-size: 10px; }
.admin-profile-identity { min-width: 0; }
.admin-profile-identity strong,
.admin-profile-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-profile-identity strong { color: #eaf5fd; font-size: 9px; }
.admin-profile-identity small { margin-top: 3px; color: #65cfa4; font-size: 7px; }
.admin-profile-summary > i { color: #55758e; font-style: normal; }
.admin-profile-menu-list {
  position: absolute;
  right: 0;
  top: 45px;
  z-index: 40;
  width: 188px;
  padding: 5px;
  display: grid;
  gap: 2px;
  border: 1px solid #315776;
  border-radius: 3px;
  background: #071522;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .45);
}
.admin-profile-menu:not([open]) .admin-profile-menu-list { display: none; }
.admin-profile-menu-status { min-height: 31px; padding: 0 8px; display: flex; align-items: center; border-bottom: 1px solid #1c3852; color: #5fd18a; font-size: 8px; }
.admin-profile-menu-action { min-height: 32px; padding: 0 8px; border: 0; border-radius: 2px; background: transparent; color: #92aac0; font-size: 9px; text-align: left; }
.admin-profile-menu-action:hover { background: #10283d; color: #eef8ff; }
.admin-sidebar-account-fallback {
  flex: 0 0 auto;
  padding: 6px;
  border-top: 1px solid #17324a;
}
.admin-sidebar-profile-menu { width: 100%; margin: 0; }
.admin-sidebar-profile-menu .admin-profile-summary {
  width: 100%;
  min-width: 0;
  border: 1px solid #203d54;
  border-radius: 3px;
  background: #0a1c2c;
}
.admin-sidebar-profile-menu .admin-profile-menu-list {
  top: auto;
  right: auto;
  bottom: 0;
  left: calc(100% + 6px);
}
body[data-role="ADMIN"] .content { max-width: none; padding: 14px 16px 34px; }

.admin-personal-nav { padding: 6px 7px 7px; display: grid; gap: 2px; border-bottom: 1px solid #17324a; }
.admin-personal-button {
  width: 100%;
  min-height: 35px;
  padding: 0 8px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #8aa4bd;
  text-align: left;
}
.admin-personal-button:hover { background: #0d2235; color: #dcecff; }
.admin-personal-button.active { border-left-color: #18d4ff; background: #102943; color: #effaff; }
.admin-personal-button > b { width: 22px; height: 22px; display: grid; place-items: center; color: #73a0c0; font-size: 12px; }
.admin-personal-button.active > b { color: #18d4ff; }
.admin-personal-button > span { overflow: hidden; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.admin-personal-button > small { min-width: 18px; padding: 2px 4px; border-radius: 8px; background: #253c50; color: #b8d0e4; font-size: 8px; text-align: center; }
.admin-nav-domain-label { min-height: 27px; padding: 8px 15px 4px; color: #526f88; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.admin-navigation .admin-nav-filter { margin: 5px 8px 2px; }
.admin-primary-nav { padding-bottom: 4px !important; }
.admin-nav-group { min-width: 0; }
.admin-nav-group[hidden] { display: none; }
.admin-primary-nav-button {
  min-height: 36px;
  padding: 0 9px 0 13px;
  grid-template-columns: 18px minmax(0, 1fr) auto 12px;
  gap: 7px;
}
.admin-primary-nav-button > span { font-size: 10px; }
.admin-primary-nav-button > small { max-width: 42px; font-size: 8px; }
.admin-nav-chevron { color: #54718a; font-size: 10px; font-style: normal; transform: rotate(-90deg); transition: transform 140ms ease; }
.admin-nav-group.expanded .admin-nav-chevron { transform: rotate(0); }
.admin-nav-children { display: none; padding: 2px 7px 5px 32px; }
.admin-nav-group.expanded .admin-nav-children { display: grid; }
.admin-nav-child {
  min-width: 0;
  min-height: 30px;
  padding: 0 7px;
  overflow: hidden;
  border: 0;
  border-left: 1px solid #1d3c55;
  background: transparent;
  color: #6f8aa2;
  font-size: 9px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-nav-child[hidden] { display: none; }
.admin-nav-child:hover { border-left-color: #5b8cb0; background: #0b2031; color: #d3e6f6; }
.admin-nav-child.active { border-left-color: #18d4ff; background: #0d293e; color: #63ddf6; }
.admin-all-functions {
  min-height: 38px;
  margin: 4px 8px 8px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-color: #294b68 !important;
  border-radius: 3px !important;
  background: #0a1929 !important;
  color: #b8cee1 !important;
}
.admin-all-functions:hover { border-color: #18d4ff !important; color: #e9fbff !important; }
.admin-all-functions > b { color: #18d4ff; }
body[data-role="ADMIN"] .sidebar-meta { display: none; }

.admin-page-context { margin: 0 0 12px; display: block; border-radius: 3px; overflow: hidden; }
.admin-page-context-header { min-height: 58px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-page-context-identity { min-width: 0; height: auto; padding: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 9px; border-right: 0; }
.admin-page-context-identity > b { width: 30px; height: 30px; grid-row: 1 / 3; font-size: 10px; }
.admin-page-breadcrumb { min-width: 0; display: flex; align-items: center; gap: 6px; color: #6f8ba4; font-size: 8px; }
.admin-page-breadcrumb > strong { overflow: hidden; color: #87a3bc; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.admin-page-context-identity > h1 { min-width: 0; margin: 1px 0 0; overflow: hidden; color: #edf7ff; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.admin-page-context-actions { display: flex; align-items: center; gap: 3px; }
.admin-page-context-actions .btn.icon { width: 31px; min-height: 31px; font-size: 14px; }
.admin-page-group-switch {
  min-width: 186px;
  height: 31px;
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr);
  align-items: center;
  gap: 6px;
  color: #6f8ba4;
  font-size: 8px;
}
.admin-page-group-switch select {
  width: 100%;
  min-width: 0;
  height: 31px;
  padding: 0 26px 0 8px;
  border: 1px solid #294b68;
  border-radius: 3px;
  background: #0a1c2c;
  color: #c9dbea;
  font-size: 9px;
}
.admin-page-siblings { border-top: 1px solid #1c3852; background: #071522; }
.admin-page-siblings button { height: 35px; font-size: 9px; }

.searchable-filter-select {
  grid-column: span 2;
  grid-template-columns: minmax(96px, .9fr) minmax(120px, 1.1fr);
}
.searchable-filter-select > span { grid-column: 1 / -1; }

/* Every admin page inherits the same dense operating-page grammar. */
body[data-role="ADMIN"] :where(.member-filter-bar, .filter-bar, [class$="-filters"], [class*="-filter-bar"]) {
  border-color: #1c3852;
  border-radius: 3px;
  background: #0a1929;
  box-shadow: none;
}
body[data-role="ADMIN"] :where(.member-operations-toolbar, .racing-ops-toolbar, .sports-ops-toolbar, .provider-ops-toolbar) {
  min-height: 42px;
  border-color: #1c3852;
  background: #091827;
}
body[data-role="ADMIN"] :where(.panel, .kpi, .member-filter-bar, .filter-bar) { border-radius: 3px; }
body[data-role="ADMIN"] .panel-header { min-height: 42px; }
body[data-role="ADMIN"] .table-wrap { background: #0d1f31; }
body[data-role="ADMIN"] th { top: 0; z-index: 3; }
body[data-role="ADMIN"] tbody tr:focus-within td { background: #10283d; }
body[data-role="ADMIN"] :where(.table-actions, .agent-tree-actions, .member-operations-actions) { gap: 4px; }

.admin-command-modal { width: min(1120px, calc(100vw - 36px)); max-height: min(820px, calc(100dvh - 36px)); grid-template-rows: auto auto minmax(0, 1fr); }
.admin-command-scope { margin-left: auto; color: #6e8ba4; font-size: 9px; }
.admin-command-modal .modal-head .btn { margin-left: 8px; }
.admin-command-modal .global-search-form { grid-template-columns: 22px minmax(0, 1fr) auto 34px; align-items: center; gap: 7px; background: #071522; }
.admin-command-modal .global-search-form input { height: 38px; border: 0; background: transparent; }
.admin-command-modal .global-search-form input:focus { box-shadow: none; }
.global-search-leading { color: #18d4ff; font-size: 16px; }
.admin-command-modal .global-search-form > small { color: #526f88; font-size: 8px; }
.admin-command-modal .global-search-results { background: #081725; }
.global-search-command-grid { min-width: 900px; display: grid; grid-template-columns: 1.15fr 1fr 1fr; align-items: start; }
.global-search-command-group { min-width: 0; min-height: 100%; border-right: 1px solid #1c3852; }
.global-search-command-group:last-child { border-right: 0; }
.global-search-command-title { min-height: 38px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #1c3852; background: #0a1929; }
.global-search-command-title b { color: #dcecff; font-size: 11px; }
.global-search-command-title span { color: #617e97; font-size: 8px; }
.global-search-result { min-height: 56px; padding: 7px 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; border-bottom-color: #173149; background: #0d1f31; }
.global-search-result:hover { background: #10283d; box-shadow: inset 2px 0 0 #18d4ff; }
.global-search-result-copy { min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.global-search-result-copy b { color: #dbeafe; font-size: 10px; }
.global-search-result-copy small { color: #6f8ba4; font-size: 8px; }
.global-search-result-actions { display: flex; align-items: center; gap: 1px; }
.global-search-result-actions .btn.icon { width: 27px; min-height: 27px; padding: 0; font-size: 11px; }
.global-search-group-empty { min-height: 68px; display: grid; place-items: center; color: #526f88; font-size: 9px; }
.global-search-command-footer { min-height: 34px; padding: 0 12px; display: flex; align-items: center; justify-content: center; gap: 24px; border-top: 1px solid #1c3852; background: #071522; color: #6f8ba4; font-size: 8px; }
.admin-function-directory { min-width: 880px; padding: 12px; display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 10px; }
.admin-function-group { min-width: 0; border: 1px solid #1c3852; background: #0d1f31; }
.admin-function-group-title { min-height: 38px; padding: 0 9px; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 6px; border-bottom: 1px solid #1c3852; background: #0a1929; }
.admin-function-group-title > b { color: #18d4ff; font: 9px/1 ui-monospace, monospace; }
.admin-function-group-title > strong { overflow: hidden; color: #e4f1fc; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-function-group-title > span { color: #607e98; font-size: 8px; }
.admin-function-list .global-search-result { min-height: 42px; }
.admin-function-list .global-search-result-actions .btn:first-child { display: none; }

.admin-shortcut-modal { width: min(560px, calc(100vw - 30px)); max-height: min(720px, calc(100dvh - 30px)); }
.admin-shortcut-list { max-height: 620px; overflow: auto; }
.admin-shortcut-row { min-height: 55px; padding: 6px 8px; display: grid; grid-template-columns: minmax(0, 1fr) 32px; align-items: center; gap: 6px; border-bottom: 1px solid #173149; }
.admin-shortcut-copy { min-width: 0; padding: 5px 7px; border: 0; background: transparent; color: inherit; text-align: left; }
.admin-shortcut-copy b,
.admin-shortcut-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-shortcut-copy b { color: #dbeafe; font-size: 11px; }
.admin-shortcut-copy span { margin-top: 4px; color: #6f8ba4; font-size: 8px; }
.admin-page-help p { margin: 0 0 10px; color: #90a9bf; font-size: 10px; line-height: 1.6; }
.admin-page-help-links { display: flex; flex-wrap: wrap; gap: 6px; }

@media (min-width: 1121px) {
  body[data-role="ADMIN"] .app-shell { grid-template-columns: 200px minmax(0, 1fr); }
  body[data-role="ADMIN"] .app-shell.admin-sidebar-collapsed { grid-template-columns: 68px minmax(0, 1fr); }
  .admin-sidebar-collapsed .sidebar-brand { padding: 0; justify-content: center; }
  .admin-sidebar-collapsed .sidebar-brand .brand-text,
  .admin-sidebar-collapsed .admin-personal-button > span,
  .admin-sidebar-collapsed .admin-personal-button > small,
  .admin-sidebar-collapsed .admin-nav-filter,
  .admin-sidebar-collapsed .admin-nav-domain-label,
  .admin-sidebar-collapsed .admin-nav-children,
  .admin-sidebar-collapsed .admin-primary-nav-button > span,
  .admin-sidebar-collapsed .admin-primary-nav-button > small,
  .admin-sidebar-collapsed .admin-nav-chevron { display: none !important; }
  .admin-sidebar-collapsed .admin-personal-button,
  .admin-sidebar-collapsed .admin-primary-nav-button { padding: 0; grid-template-columns: 1fr; justify-items: center; }
  .admin-sidebar-collapsed .admin-all-functions { min-width: 40px; padding: 0; justify-content: center; overflow: hidden; color: transparent !important; }
  .admin-sidebar-collapsed .admin-all-functions > b { flex: 0 0 auto; color: #18d4ff; }
}

@media (max-width: 1120px) and (min-width: 761px) {
  body[data-role="ADMIN"] .app-shell { grid-template-columns: 72px minmax(0, 1fr); }
  .admin-personal-nav { padding: 5px; }
  .admin-personal-button { min-height: 40px; padding: 0; grid-template-columns: 1fr; justify-items: center; }
  .admin-personal-button > span,
  .admin-personal-button > small,
  .admin-nav-domain-label,
  .admin-all-functions { display: none; }
  .admin-nav-group.expanded .admin-nav-children { display: none; }
  .admin-primary-nav-button { grid-template-columns: 1fr; }
  .admin-primary-nav-button .admin-nav-chevron { display: none; }
  .admin-top-search { width: min(460px, 55vw); }
  .admin-profile-identity { display: none; }
  .admin-profile-summary { min-width: 47px; grid-template-columns: 30px 10px; }
  .admin-sidebar-account-fallback { padding: 6px 12px; }
  .admin-sidebar-profile-menu .admin-profile-summary { min-width: 42px; padding: 0 5px; grid-template-columns: 28px 9px; }
  .global-search-command-grid { grid-template-columns: repeat(3, minmax(280px, 1fr)); }
  .admin-function-directory { grid-template-columns: repeat(3, minmax(190px, 1fr)); }
}

@media (max-width: 760px) {
  body[data-role="ADMIN"] .topbar { height: 56px; padding: 0 10px; }
  .admin-header-leading { flex: 0 1 auto; gap: 3px; }
  .admin-top-search { width: 34px; min-width: 34px; height: 34px; padding: 0; grid-template-columns: 1fr; place-items: center; }
  .admin-top-search > span,
  .admin-top-search > small { display: none; }
  .admin-header-tools { margin-left: auto; gap: 2px; }
  .admin-header-messages,
  .admin-header-fullscreen,
  .admin-header-help { display: none; }
  .admin-language-summary { min-width: 36px; width: 36px; padding: 0; grid-template-columns: 1fr; place-items: center; }
  .admin-language-summary > span,
  .admin-language-summary > i { display: none; }
  .admin-language-list { position: fixed; top: 54px; right: 52px; width: min(224px, calc(100vw - 60px)); }
  .admin-profile-identity { display: none; }
  .admin-profile-summary { min-width: 42px; padding: 0 2px; grid-template-columns: 28px 9px; gap: 3px; border-left: 0; }
  .admin-profile-menu-list { position: fixed; top: 54px; right: 8px; width: min(230px, calc(100vw - 16px)); }
  .admin-sidebar-account-fallback {
    position: fixed;
    right: 6px;
    bottom: 6px;
    z-index: 36;
    width: 42px;
    padding: 0;
    border: 0;
  }
  .admin-sidebar-profile-menu .admin-profile-summary {
    width: 42px;
    min-width: 42px;
    padding: 0 5px;
    grid-template-columns: 28px;
  }
  .admin-sidebar-profile-menu .admin-profile-summary > i { display: none; }
  .admin-sidebar-profile-menu .admin-profile-menu-list {
    position: fixed;
    top: auto;
    right: 6px;
    bottom: 54px;
    left: auto;
  }
  body[data-role="ADMIN"] .sidebar:has(.admin-sidebar-account-fallback) .admin-primary-nav { padding-right: 54px !important; }
  body[data-role="ADMIN"] .content { padding: 10px 10px 26px; }
  body[data-role="ADMIN"] .admin-navigation { height: 62px; }
  .admin-personal-nav,
  .admin-nav-domain-label,
  .admin-all-functions,
  .admin-nav-children,
  .admin-primary-nav-button .admin-nav-chevron { display: none !important; }
  body[data-role="ADMIN"] .admin-primary-nav { padding: 5px 6px !important; }
  body[data-role="ADMIN"] .admin-nav-group { flex: 0 0 64px; }
  body[data-role="ADMIN"] .admin-primary-nav-button { width: 64px; min-height: 52px; }
  .admin-page-context-header { min-height: 54px; padding: 7px 8px; }
  .admin-page-context-identity { grid-template-columns: 26px minmax(0, 1fr); }
  .admin-page-context-identity > b { width: 26px; height: 26px; }
  .admin-page-context-identity > h1 { font-size: 12px; }
  .admin-page-context-actions .btn.icon { width: 29px; min-height: 29px; }
  .admin-page-group-switch { min-width: 138px; grid-template-columns: minmax(0, 1fr); }
  .admin-page-group-switch > span { display: none; }
  .searchable-filter-select {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr);
  }
  .searchable-filter-select > span { grid-column: auto; }
  .admin-command-modal { width: 100%; height: 100dvh; max-height: 100dvh; }
  .admin-command-modal .global-search-form { grid-template-columns: 20px minmax(0, 1fr) 32px; }
  .admin-command-modal .global-search-form > small { display: none; }
  .global-search-command-grid { min-width: 0; display: block; }
  .global-search-command-group { min-height: auto; border-right: 0; border-bottom: 1px solid #1c3852; }
  .global-search-command-footer { position: sticky; bottom: 0; }
  .admin-function-directory { min-width: 0; padding: 8px; grid-template-columns: minmax(0, 1fr); }
}

.admin-workspace-metrics { margin-bottom: 10px; display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 8px; }
.admin-workspace-metric {
  min-height: 74px;
  padding: 11px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid #1c3852;
  border-top: 2px solid #18d4ff;
  border-radius: 3px;
  background: #0d1f31;
}
.admin-workspace-metric > b { color: #91abc1; font-size: 10px; }
.admin-workspace-metric > strong { color: #f1f8ff; font: 700 25px/1 ui-monospace, SFMono-Regular, monospace; }
.admin-workspace-metric.metric-overdue { border-top-color: #ef4444; }
.admin-workspace-metric.metric-overdue > strong { color: #ff6565; }
.admin-workspace-metric.metric-risk { border-top-color: #f59e0b; }
.admin-workspace-metric.metric-risk > strong { color: #ffb13c; }
.admin-workspace-metric.metric-done { border-top-color: #22c55e; }
.admin-workspace-metric.metric-done > strong { color: #55d97c; }
.admin-workspace-layout { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 196px; gap: 10px; }
.admin-workspace-main { min-width: 0; }
.admin-workspace-queues { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(205px, 1fr)); gap: 7px; }
.admin-work-queue { min-width: 0; border: 1px solid #1c3852; border-top: 2px solid #18d4ff; border-radius: 3px; background: #0d1f31; overflow: hidden; }
.admin-work-queue.queue-finance { border-top-color: #22c55e; }
.admin-work-queue.queue-orders { border-top-color: #18d4ff; }
.admin-work-queue.queue-risk { border-top-color: #ef4444; }
.admin-work-queue.queue-settlement { border-top-color: #f59e0b; }
.admin-work-queue-head { min-height: 39px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid #1c3852; background: #0a1929; }
.admin-work-queue-head h3 { margin: 0; color: #e8f3fc; font-size: 11px; }
.admin-work-queue-head > span { color: #607f98; font-size: 8px; }
.admin-work-queue-more { padding: 0; border: 0; background: transparent; color: #18d4ff; font-size: 8px; }
.admin-work-queue-labels { min-height: 27px; padding: 0 7px; display: grid; grid-template-columns: 12px minmax(88px, 1fr) 48px 46px 48px; align-items: center; gap: 5px; border-bottom: 1px solid #173149; background: #091827; color: #5e7b94; font-size: 7px; }
.admin-work-queue-labels span:first-child { color: transparent; }
.admin-work-queue-list { min-height: 296px; }
.admin-work-queue-row { width: 100%; min-height: 42px; padding: 5px 7px; display: grid; grid-template-columns: 12px minmax(88px, 1fr) 48px 46px 48px; align-items: center; gap: 5px; border: 0; border-bottom: 1px solid #173149; background: transparent; color: #8ca5ba; text-align: left; }
.admin-work-queue-row:hover { background: #10283d; }
.admin-work-priority { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.severity-critical .admin-work-priority,
.severity-high .admin-work-priority { background: #ef4444; }
.severity-warning .admin-work-priority,
.severity-watch .admin-work-priority { background: #f59e0b; }
.admin-work-task-copy { min-width: 0; }
.admin-work-task-copy b,
.admin-work-task-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-work-task-copy b { color: #cbdceb; font-size: 8px; }
.admin-work-task-copy small { margin-top: 3px; color: #5f7c95; font-size: 7px; }
.admin-work-queue-row > span:not(.admin-work-task-copy):not(.badge) { overflow: hidden; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.admin-work-queue-row .badge { max-width: 48px; overflow: hidden; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.admin-work-queue-empty { min-height: 100px; display: grid; place-items: center; color: #58738d; font-size: 8px; }
.admin-work-queue-foot { width: 100%; min-height: 32px; border: 0; border-top: 1px solid #1c3852; background: #091827; color: #18d4ff; font-size: 8px; }
.admin-workspace-activity { margin-top: 9px; border: 1px solid #1c3852; border-radius: 3px; background: #0d1f31; overflow: hidden; }
.admin-workspace-activity-row { width: 100%; min-height: 37px; padding: 4px 9px; display: grid; grid-template-columns: 8px 63px 45px minmax(180px, 1.3fr) minmax(120px, .8fr) 62px; align-items: center; gap: 7px; border: 0; border-bottom: 1px solid #173149; background: transparent; color: #819bb2; text-align: left; }
.admin-workspace-activity-row:hover { background: #10283d; }
.admin-workspace-activity-row > i { width: 7px; height: 7px; border-radius: 50%; background: #18d4ff; }
.admin-workspace-activity-row > time,
.admin-workspace-activity-row > span { overflow: hidden; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.admin-workspace-activity-row > b { overflow: hidden; color: #cbdceb; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.admin-workspace-activity-row > strong { color: #18d4ff; font-size: 7px; text-align: right; }
.admin-workspace-rail { min-width: 0; display: grid; align-content: start; gap: 9px; }
.admin-workspace-rail-section { border: 1px solid #1c3852; border-radius: 3px; background: #0d1f31; overflow: hidden; }
.admin-workspace-rail-head,
.admin-workspace-rail-section > h3 { min-height: 38px; margin: 0; padding: 0 9px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #1c3852; background: #0a1929; color: #e2eef8; font-size: 10px; }
.admin-workspace-rail-head h3 { margin: 0; font-size: 10px; }
.admin-workspace-rail-head .btn { min-height: 25px; padding: 0 4px; color: #18d4ff; font-size: 7px; }
.admin-workspace-link { width: 100%; min-height: 34px; padding: 0 8px; display: grid; grid-template-columns: 17px minmax(0, 1fr) 10px; align-items: center; gap: 5px; border: 0; border-bottom: 1px solid #173149; background: transparent; color: #7894ae; text-align: left; }
.admin-workspace-link:hover { background: #10283d; color: #dbeafe; }
.admin-workspace-link > b { color: #7ea8c6; }
.admin-workspace-link > span { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.admin-workspace-link > i { color: #4f7089; font-style: normal; }
.admin-workspace-links-empty { min-height: 64px; padding: 12px; display: grid; place-items: center; color: #526f88; font-size: 8px; text-align: center; }
.admin-workspace-status .member-detail-fact { min-height: 58px; border-right: 0; }

@media (max-width: 1320px) {
  .admin-workspace-layout { grid-template-columns: minmax(0, 1fr); }
  .admin-workspace-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-workspace-queues { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
}

@media (max-width: 760px) {
  .admin-workspace-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-workspace-metric { min-height: 64px; }
  .admin-workspace-metric > strong { font-size: 21px; }
  .admin-workspace-queues { grid-template-columns: minmax(0, 1fr); }
  .admin-workspace-rail { grid-template-columns: minmax(0, 1fr); }
  .admin-workspace-activity-row { grid-template-columns: 8px 56px 42px minmax(120px, 1fr); }
  .admin-workspace-activity-row > span,
  .admin-workspace-activity-row > strong { display: none; }
}

.finance-queue-metrics { grid-template-columns: repeat(5, minmax(130px, 1fr)) !important; margin-bottom: 8px !important; }
.finance-request-stage-tabs { min-height: 42px; margin-bottom: 8px; display: flex; align-items: stretch; overflow-x: auto; border: 1px solid #1c3852; border-radius: 3px; background: #091827; }
.finance-request-stage-tabs button { min-width: 112px; padding: 0 12px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-right: 1px solid #173149; border-bottom: 2px solid transparent; background: transparent; color: #7894ae; font-size: 9px; }
.finance-request-stage-tabs button:hover { background: #10283d; color: #dbeafe; }
.finance-request-stage-tabs button.active { border-bottom-color: #f59e0b; background: #3a290d; color: #ffd27d; }
.finance-request-stage-tabs button b { min-width: 18px; padding: 2px 4px; border-radius: 8px; background: #1a3449; color: #adc6d9; font-size: 7px; }
.finance-toolbar { min-height: 40px !important; margin-bottom: 8px; padding: 4px 8px; display: flex; align-items: center; justify-content: space-between; border: 1px solid #1c3852; border-radius: 3px; background: #091827; }
.finance-tool-switcher { display: flex; align-items: center; gap: 7px; color: #718ca5; font-size: 8px; }
.finance-tool-switcher select { min-width: 150px; height: 30px; padding: 0 8px; border: 1px solid #294b68; border-radius: 3px; background: #071522; color: #c8dcef; font-size: 9px; }
.finance-request-layout { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid #1c3852; border-radius: 3px; background: #0d1f31; overflow: hidden; }
.finance-request-list { min-width: 0; }
.finance-request-list-head { min-height: 42px; padding: 0 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #1c3852; background: #0a1929; }
.finance-request-list-head h3 { margin: 0; color: #e3f0fa; font-size: 11px; }
.finance-request-list-head span { color: #6e8ba4; font-size: 8px; }
.finance-request-filter-bar { padding: 8px 9px; display: grid; gap: 7px; border-bottom: 1px solid #1c3852; background: #091827; }
.finance-request-filter-bar label { min-width: 0; display: grid; gap: 4px; }
.finance-request-filter-bar label > span { color: #7591a9; font-size: 8px; }
.finance-request-filter-bar input,
.finance-request-filter-bar select { width: 100%; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid #294b68; border-radius: 3px; background: #071522; color: #cfe0ee; font-size: 9px; }
.finance-request-filter-primary { min-width: 0; display: grid; grid-template-columns: minmax(240px, 1.6fr) minmax(150px, .7fr) auto; align-items: end; gap: 7px; }
.finance-request-filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.finance-request-filter-actions .btn { min-height: 32px; }
.finance-request-filter-advanced { border-top: 1px solid #173149; }
.finance-request-filter-advanced > summary { width: fit-content; padding: 7px 2px 0; color: #87a4bc; cursor: pointer; font-size: 9px; list-style-position: inside; }
.finance-request-filter-advanced-grid { padding-top: 7px; display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); align-items: end; gap: 7px; }
.finance-request-list table { min-width: 1280px; }
.finance-request-table > .table-workspace-toolbar { display: none; }
.finance-request-selection { width: 42px; text-align: center; }
.finance-request-selection input { width: 15px; height: 15px; accent-color: #18d4ff; }
.finance-request-detail { min-width: 0; border-left: 1px solid #1c3852; background: #0a1929; }
.finance-request-detail-head { min-height: 53px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid #1c3852; background: #0d1f31; }
.finance-request-detail-head span { color: #7b97af; font-size: 8px; }
.finance-request-detail-head h3 { margin: 4px 0 0; color: #eef7ff; font-size: 11px; }
.finance-request-detail-section { padding: 10px; border-bottom: 1px solid #1c3852; }
.finance-request-detail-section h4 { margin: 0 0 7px; color: #dbeafe; font-size: 10px; }
.finance-request-detail-section .member-detail-fact { min-height: 58px; border-right: 0; }
.finance-request-history { display: grid; gap: 0; }
.finance-history-row { position: relative; min-height: 34px; padding: 8px 4px 8px 14px; border-left: 1px solid #2e617f; color: #7894ae; font-size: 8px; }
.finance-history-row::before { content: ""; position: absolute; width: 6px; height: 6px; margin: 2px 0 0 -17px; border-radius: 50%; background: #18d4ff; }
.finance-request-detail-actions { padding: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) 34px; gap: 5px; }
.finance-request-detail-actions > .btn { min-width: 0; }
.finance-request-safety { padding: 10px; }
.finance-request-safety .finance-request-detail-actions { padding: 0; }
.finance-request-more { position: relative; }
.finance-request-more > summary { width: 34px; height: 36px; display: grid; place-items: center; border: 1px solid #315776; border-radius: 3px; background: #0b1c2b; color: #c8dcef; cursor: pointer; list-style: none; }
.finance-request-more > summary::-webkit-details-marker { display: none; }
.finance-request-more[open] > .btn { position: absolute; right: 0; top: 40px; z-index: 4; width: 118px; }
.finance-request-detail-modal { width: min(720px, 100%); max-height: min(820px, 92dvh); display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.finance-request-detail-modal .modal-head p { margin: 4px 0 0; color: #7894ae; font-size: 9px; }
.finance-request-detail-modal-body { min-height: 0; overflow: auto; }
.finance-request-detail-modal .finance-request-detail { border: 0; }
.finance-request-detail-modal .finance-request-detail-section { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.finance-request-detail-modal .finance-request-detail-section h4 { grid-column: 1 / -1; }

@media (max-width: 1180px) {
  .finance-queue-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .finance-request-layout { grid-template-columns: minmax(0, 1fr); }
  .finance-request-detail { border-top: 1px solid #1c3852; border-left: 0; }
  .finance-request-detail-section { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .finance-request-detail-section h4 { grid-column: 1 / -1; }
  .finance-request-filter-advanced-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .finance-queue-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .finance-request-stage-tabs button { min-width: 96px; }
  .finance-toolbar { align-items: stretch; flex-direction: column; }
  .finance-tool-switcher { width: 100%; justify-content: space-between; }
  .finance-tool-switcher select { flex: 1; }
  .finance-request-detail-backdrop { padding: 0; place-items: stretch; }
  .finance-request-detail-modal { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .finance-request-detail-modal .finance-request-detail-section { grid-template-columns: minmax(0, 1fr); }
  .finance-request-filter-primary { grid-template-columns: minmax(0, 1fr) minmax(130px, .7fr); }
  .finance-request-filter-actions { grid-column: 1 / -1; justify-content: flex-start; overflow-x: auto; }
  .finance-request-filter-advanced-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-request-detail-section { grid-template-columns: minmax(0, 1fr); }
  .finance-request-detail-section h4 { grid-column: auto; }
}

@media (max-width: 520px) {
  .finance-request-filter-primary { grid-template-columns: minmax(0, 1fr); }
  .finance-request-filter-actions { grid-column: auto; flex-wrap: wrap; overflow-x: visible; }
  .finance-request-filter-advanced-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Member object workspace: approved detail-page template. */
.member-object-title { min-width: 0; }
.member-object-title > div { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.member-object-title > .member-object-breadcrumb { margin-bottom: 3px; color: #66849d; font-size: 8px; }
.member-object-title h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-object-title p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-object-layout {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
  overflow: hidden;
  background: #081725;
}
.member-object-layout > .member-detail-workspace {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 41px minmax(0, 1fr);
  border-right: 1px solid #1c3852;
}
.member-object-layout .member-detail-workspace .member-detail-tabs {
  min-width: 0;
  padding: 0 8px;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  border-right: 0;
  border-bottom: 1px solid #1c3852;
  background: #091827;
}
.member-object-layout .member-detail-workspace .member-detail-tabs button {
  width: auto;
  min-width: 94px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #7894ae;
  font-size: 9px;
  text-align: center;
}
.member-object-layout .member-detail-workspace .member-detail-tabs button:hover { background: #10283d; color: #dbeafe; }
.member-object-layout .member-detail-workspace .member-detail-tabs button.active {
  border-left: 0;
  border-bottom-color: #22c7a6;
  background: #0d3a35;
  color: #79ebd3;
}
.member-object-layout .member-detail-content { padding: 9px; }
.member-object-rail { min-width: 0; min-height: 0; padding: 8px; display: grid; align-content: start; gap: 8px; overflow-y: auto; background: #071522; }
.member-object-rail-section { min-width: 0; border: 1px solid #1c3852; border-radius: 3px; background: #0d1f31; overflow: hidden; }
.member-object-rail-section > h3 { min-height: 37px; margin: 0; padding: 0 9px; display: flex; align-items: center; border-bottom: 1px solid #1c3852; background: #0a1929; color: #dceaf6; font-size: 10px; }
.member-object-action { width: 100%; min-height: 34px; padding: 0 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; border: 0; border-bottom: 1px solid #173149; background: transparent; color: #829bb2; text-align: left; }
.member-object-action:last-child { border-bottom: 0; }
.member-object-action:hover { background: #10283d; color: #e6f3fc; }
.member-object-action > span { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.member-object-action > b { color: #22c7a6; font-size: 13px; }
.member-object-queue-row { width: 100%; min-height: 46px; padding: 5px 7px; display: grid; grid-template-columns: 8px minmax(0, 1fr) 9px; align-items: center; gap: 7px; border: 0; border-bottom: 1px solid #173149; background: transparent; color: #7f9ab1; text-align: left; }
.member-object-queue-row:hover { background: #10283d; }
.member-object-queue-row > i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.member-object-queue-row > i.queue-withdrawal,
.member-object-queue-row > i.queue-order { background: #f59e0b; }
.member-object-queue-row > b { color: #52738c; }
.member-object-queue-row .primary-cell strong,
.member-object-queue-row .primary-cell small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-object-queue-row .primary-cell strong { color: #c9dbea; font-size: 8px; }
.member-object-queue-row .primary-cell small { color: #66839c; font-size: 7px; }
.member-object-recent-row { min-height: 43px; padding: 6px 8px; display: grid; grid-template-columns: 7px minmax(0, 1fr); align-items: center; gap: 8px; border-bottom: 1px solid #173149; }
.member-object-recent-row:last-child { border-bottom: 0; }
.member-object-recent-row > i { width: 6px; height: 6px; border-radius: 50%; background: #18d4ff; }
.member-object-recent-row .primary-cell strong,
.member-object-recent-row .primary-cell small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-object-recent-row .primary-cell strong { color: #bfd1e0; font-size: 8px; }
.member-object-recent-row .primary-cell small { color: #5f7e97; font-size: 7px; }
.member-object-empty { min-height: 54px; padding: 10px; display: grid; place-items: center; color: #526f88; font-size: 8px; text-align: center; }
.member-quick-order-panel {
  position: absolute;
  right: 264px;
  bottom: 11px;
  z-index: 8;
  width: min(430px, calc(100% - 286px));
  border: 1px solid #315776;
  border-top: 2px solid #22c7a6;
  border-radius: 3px;
  background: #0d1f31;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .42);
  overflow: hidden;
}
.member-quick-order-head { min-height: 39px; padding: 0 7px 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid #1c3852; background: #0a1929; }
.member-quick-order-head h3 { margin: 0; color: #dff7f1; font-size: 9px; }
.member-quick-order-actions { display: flex; align-items: center; gap: 2px; }
.member-quick-order-actions .btn.icon { width: 27px; min-height: 27px; padding: 0; }
.member-quick-order-row { width: 100%; min-height: 47px; padding: 5px 9px; display: grid; grid-template-columns: minmax(0, 1fr) 92px; align-items: center; gap: 8px; border: 0; border-bottom: 1px solid #173149; background: transparent; color: #8aa4ba; text-align: left; }
.member-quick-order-row:last-child { border-bottom: 0; }
.member-quick-order-row:hover { background: #10283d; }
.member-quick-order-row .primary-cell:last-child { text-align: right; }
.member-quick-order-row .primary-cell strong { color: #d5e5f1; font-size: 8px; }
.member-quick-order-row .primary-cell small { color: #66839c; font-size: 7px; }
.member-detail-actions { gap: 5px; }
.member-detail-actions .member-danger-menu { position: relative; margin-left: auto; }
.member-detail-head .member-danger-menu { position: relative; }
.member-detail-head .member-danger-menu > summary { width: 31px; height: 31px; }
.member-detail-head .member-danger-menu-list { top: 36px; bottom: auto; }
.member-danger-menu > summary { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #315776; border-radius: 3px; background: #0b1c2b; color: #c9dbea; cursor: pointer; list-style: none; }
.member-danger-menu > summary::-webkit-details-marker { display: none; }
.member-danger-menu-list { position: absolute; right: 0; bottom: 41px; z-index: 12; width: 132px; padding: 4px; display: grid; gap: 3px; border: 1px solid #315776; border-radius: 3px; background: #071522; box-shadow: 0 12px 30px rgba(0, 0, 0, .4); }
.member-danger-menu:not([open]) .member-danger-menu-list { display: none; }
.member-danger-menu-list .btn { width: 100%; min-width: 0; }

@media (max-width: 1180px) {
  .member-object-layout { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .member-object-layout > .member-detail-workspace { min-height: 520px; border-right: 0; }
  .member-object-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; border-top: 1px solid #1c3852; }
  .member-quick-order-panel { position: static; width: auto; margin: 0 8px 8px; grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .member-detail-head {
    min-width: 0;
    min-height: 0;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 8px;
  }
  .member-detail-head .member-object-title { width: 100%; }
  .member-detail-head .modal-head-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
  }
  .member-detail-head .modal-head-actions > .btn.icon,
  .member-detail-head .modal-head-actions > .member-danger-menu { width: 100%; min-width: 0; }
  .member-detail-head .member-danger-menu > summary { width: 100%; height: 36px; }
  .member-object-title h2 { max-width: 190px; }
  .member-object-layout { display: block; overflow-y: auto; }
  .member-object-layout > .member-detail-workspace { min-height: 540px; grid-template-rows: 41px minmax(0, 1fr); }
  .member-object-layout .member-detail-workspace .member-detail-tabs { padding: 0; }
  .member-object-layout .member-detail-workspace .member-detail-tabs button { min-width: 88px; padding: 0 8px; }
  .member-object-rail { grid-template-columns: minmax(0, 1fr); }
  .member-quick-order-panel { position: static !important; width: auto; margin: 0 8px 8px !important; }
  .member-detail-actions .member-danger-menu { margin-left: 0; }
  .member-detail-actions .member-danger-menu > summary { width: 100%; min-width: 50px; }
}

/* Foundation 1.53: operator clarity, local Lucide icons and API-source bands. */
.lucide-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  flex: 0 0 auto;
  stroke: currentColor;
  vertical-align: middle;
}
.admin-primary-nav-glyph {
  width: 17px;
  height: 17px;
  color: #799bb7;
  font-family: inherit;
}
.admin-nav-chevron {
  width: 12px;
  height: 12px;
  transform: rotate(-90deg);
  transition: transform 140ms ease;
}
.admin-nav-group.expanded .admin-nav-chevron { transform: rotate(0); }
.admin-personal-button > .lucide-icon {
  width: 17px;
  height: 17px;
  color: #73a0c0;
}
.admin-personal-button.active > .lucide-icon { color: #18d4ff; }
.admin-header-command > .lucide-icon {
  width: 17px;
  height: 17px;
}
.admin-header-alerts > .lucide-icon { color: #ff7180; }
.admin-header-tasks > .lucide-icon { color: #ffc15d; }
.admin-top-search > .lucide-icon { width: 16px; height: 16px; color: #8aaac4; }
.admin-page-context-icon {
  width: 30px;
  height: 30px;
  padding: 6px;
  grid-row: 1 / 3;
  border: 1px solid var(--workspace-accent);
  color: var(--workspace-accent);
}
.admin-page-context-actions .btn.active .lucide-icon {
  fill: currentColor;
  color: #facc15;
}
.admin-all-functions > .lucide-icon { width: 16px; height: 16px; color: #18d4ff; }

.product-source-band {
  min-width: 0;
  margin: 0 0 10px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #254761;
  border-left: 3px solid #22c7a6;
  border-radius: 3px;
  background: #0a1929;
}
.product-source-heading {
  min-width: 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}
.product-source-heading > .lucide-icon { color: #22c7a6; }
.product-source-heading > div {
  overflow: hidden;
  color: #dcebf6;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-source-heading > .badge { grid-column: 2; justify-self: start; }
.product-source-flows {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 6px;
}
.product-source-flow {
  min-width: 0;
  min-height: 42px;
  padding: 5px 8px;
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  align-items: center;
  gap: 2px 7px;
  border: 1px solid #1c3852;
  border-radius: 3px;
  background: #0d1f31;
}
.product-source-flow.primary { border-left: 2px solid #18d4ff; }
.product-source-flow > .lucide-icon { grid-row: 1 / 3; color: #74a1c1; }
.product-source-flow > span { color: #7f9bb2; font-size: 8px; }
.product-source-flow > strong {
  min-width: 0;
  overflow: hidden;
  color: #cbddea;
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-source-settings {
  min-width: 98px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.product-source-settings .lucide-icon { width: 14px; height: 14px; }

@media (max-width: 1180px) {
  .product-source-band { grid-template-columns: 160px minmax(0, 1fr); }
  .product-source-settings { grid-column: 1 / -1; justify-self: end; }
}

@media (max-width: 760px) {
  .product-source-band { grid-template-columns: minmax(0, 1fr); }
  .product-source-flows { grid-template-columns: minmax(0, 1fr); }
  .product-source-flow > strong { white-space: normal; }
  .product-source-settings { grid-column: auto; width: 100%; justify-self: stretch; }
}

/* Foundation 1.55: configurable compact operations header. */
.admin-operations-strip {
  min-width: 0;
  position: relative;
  padding: 5px 42px 5px 10px;
  display: grid;
  gap: 4px;
  border-bottom: 1px solid #203a50;
  background: #091827;
}
.admin-operations-row {
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 4px;
}
.admin-operation-metric {
  min-width: 112px;
  min-height: 29px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #203d54;
  border-radius: 3px;
  background: #0d2031;
  color: #90a9bc;
  font-size: 10px;
  white-space: nowrap;
}
.admin-operation-metric:hover {
  border-color: #2d6e8c;
  background: #10283b;
}
.admin-operation-metric b {
  color: #e1edf6;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.admin-operations-urgent .admin-operation-metric:first-child b { color: #ffb863; }
.admin-operations-settings {
  width: 30px;
  height: 30px;
  position: absolute;
  top: 5px;
  right: 7px;
}
.admin-operations-settings .lucide-icon { width: 14px; height: 14px; }
.admin-operations-mobile-toggle { display: none; }
.admin-header-preference-modal { width: min(560px, calc(100vw - 24px)); }
.admin-header-preference-list {
  display: grid;
  gap: 4px;
}
.admin-header-preference-row {
  min-height: 44px;
  padding: 6px 8px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #29445a;
  border-radius: 3px;
  background: #0d2031;
}
.admin-header-preference-row > div:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.admin-header-preference-row b { color: #e1edf6; font-size: 11px; }
.admin-header-preference-row span { color: #829caf; font-size: 9px; }
.admin-header-preference-actions { display: flex; gap: 4px; }
.admin-header-preference-actions .icon { width: 30px; height: 30px; }

@media (max-width: 1120px) {
  .admin-operations-strip { padding-right: 76px; }
  .admin-operations-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .admin-operation-metric { min-width: 0; }
  .admin-operations-mobile-toggle {
    width: 30px;
    height: 30px;
    position: absolute;
    top: 5px;
    right: 41px;
    display: inline-flex;
  }
  .admin-operations-mobile-toggle .lucide-icon { width: 14px; height: 14px; }
  .admin-operations-strip:not(.expanded) .admin-operations-business { display: none; }
}

@media (max-width: 760px) {
  .admin-operations-strip { padding: 5px 76px 5px 6px; }
  .admin-operations-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-operations-strip:not(.expanded) .admin-operations-urgent .admin-operation-metric:nth-child(n + 3) { display: none; }
  .admin-operation-metric {
    min-width: 0;
    min-height: 32px;
    white-space: normal;
  }
  .admin-operation-metric span {
    overflow-wrap: anywhere;
  }
}

.site-settings-workspace {
  min-width: 0;
}
.site-settings-context {
  display: grid;
  grid-template-columns: minmax(220px, 320px) auto auto auto minmax(180px, 1fr);
}
.site-settings-context select {
  min-width: 0;
  width: 100%;
}
.site-settings-workspace .configuration-stack {
  display: grid;
  gap: 10px;
}
.site-settings-workspace .panel {
  min-width: 0;
}
.maintenance-command-center {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #294b68;
  border-left: 3px solid #18d4ff;
  border-radius: 3px;
  background: #091827;
}
.maintenance-command-status { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 8px; }
.maintenance-command-status strong { overflow: hidden; color: #e4f1fa; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.maintenance-command-status span:last-child { grid-column: 1 / -1; color: #7894ae; font-size: 8px; }
.maintenance-command-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
.maintenance-command-actions .btn { min-height: 32px; }
.site-policy-color {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.site-policy-color i {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 1px solid #587085;
  border-radius: 2px;
}
.site-policy-color span {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

@media (max-width: 1120px) {
  .site-settings-context {
    grid-template-columns: minmax(200px, 1fr) repeat(3, auto);
  }
  .site-settings-context > span:last-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .site-settings-context {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .site-settings-context > select,
  .site-settings-context > span:last-child { grid-column: 1 / -1; }
  .maintenance-command-center { grid-template-columns: minmax(0, 1fr); }
  .maintenance-command-actions { justify-content: stretch; }
  .maintenance-command-actions .btn { flex: 1 1 130px; }
}

/* Foundation 1.56: consolidated roles, direct operations, compact member list, and statistical reports. */
.compact-summary-strip {
  min-width: 0;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  border: 1px solid var(--line);
  background: var(--surface);
}
.compact-summary-item {
  min-width: 0;
  min-height: 58px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 2px 8px;
  border-right: 1px solid var(--line);
}
.compact-summary-item:last-child { border-right: 0; }
.compact-summary-item span,
.compact-summary-item small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.compact-summary-item b { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--ink); font-size: 16px; font-variant-numeric: tabular-nums; }

.role-management-layout {
  min-width: 0;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  border: 1px solid var(--line);
  background: var(--surface);
}
.role-management-aside { min-width: 0; border-right: 1px solid var(--line); background: var(--surface-soft); }
.role-management-aside-head { min-height: 48px; padding: 7px; display: flex; align-items: center; justify-content: flex-end; border-bottom: 1px solid var(--line); }
.role-management-list { display: grid; }
.role-management-item {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  padding: 8px 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.role-management-item:hover { background: var(--surface); }
.role-management-item.active { background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }
.role-management-item > span:first-child { min-width: 0; }
.role-management-item b,
.role-management-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-management-item b { font-size: 11px; }
.role-management-item small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.role-management-editor { min-width: 0; }
.role-management-editor-head {
  min-height: 58px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.role-management-editor-head h3 { margin: 0; font-size: 13px; }
.role-management-editor-head p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.role-management-editor-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.role-management-profile {
  min-width: 0;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(220px, 1.4fr) minmax(170px, 0.8fr) auto;
  align-items: end;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}
.role-management-profile label:not(.role-active-field) { min-width: 0; display: grid; gap: 4px; color: var(--muted); font-size: 9px; }
.role-management-profile input:not([type="checkbox"]),
.role-management-profile select { width: 100%; min-width: 0; height: 34px; padding: 0 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.role-active-field { min-height: 34px; display: flex; align-items: center; gap: 7px; color: var(--ink); font-size: 10px; }
.role-management-filters { padding: 7px 10px; display: grid; grid-template-columns: minmax(220px, 1fr) 180px auto; gap: 7px; border-bottom: 1px solid var(--line); }
.role-management-filters input,
.role-management-filters select,
.role-scope-select,
.role-amount-input { min-width: 0; height: 32px; padding: 0 7px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.role-management-editor .table-workspace { border: 0; }
.role-management-editor table { min-width: 820px; }
.role-permission-check { width: 62px; text-align: center; }
.role-permission-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.role-scope-select { width: 128px; }
.role-amount-input { width: 105px; text-align: right; }

.member-filter-bar.member-filter-bar-compact {
  grid-template-columns: minmax(240px, 1.7fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) minmax(180px, 1fr) auto;
  padding: 9px 10px;
}
.member-filter-bar-compact .member-filter-advanced {
  grid-column: 1 / -1;
  display: none;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.member-filter-bar-compact .member-filter-advanced.open { display: grid; }
.member-list-table { min-width: 1180px; table-layout: auto; }
.member-list-table .member-sticky-col-1 { left: 0; width: 180px; min-width: 180px; box-shadow: 1px 0 0 var(--line); }

.ops-command-center { min-width: 0; margin-bottom: 10px; display: grid; gap: 8px; }
.ops-command-actions { min-height: 46px; padding: 7px 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; border: 1px solid var(--line); background: var(--surface-soft); }
.ops-command-result { min-width: 0; display: grid; grid-template-columns: minmax(230px, 0.8fr) minmax(0, 1.4fr); border: 1px solid var(--line); background: var(--surface); }
.ops-command-result-head { min-width: 0; padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-right: 1px solid var(--line); }
.ops-command-result-head > div { min-width: 0; }
.ops-command-result-head b,
.ops-command-result-head span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-command-result-head b { font-size: 11px; }
.ops-command-result-head span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.ops-command-facts { min-width: 0; display: grid; grid-template-columns: repeat(6, minmax(70px, 1fr)); }
.ops-command-facts > div { min-width: 0; padding: 8px; display: grid; align-content: center; gap: 4px; border-right: 1px solid var(--line); }
.ops-command-facts > div:last-child { border-right: 0; }
.ops-command-facts span { color: var(--muted); font-size: 8px; }
.ops-command-facts b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ops-command-empty { min-height: 54px; padding: 10px; display: grid; place-items: center; border: 1px dashed var(--line-strong); color: var(--muted); font-size: 10px; }
.ops-security-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); }
.ops-security-fact { min-width: 0; min-height: 58px; padding: 9px 11px; display: grid; align-content: center; gap: 4px; border-right: 1px solid var(--line); }
.ops-security-fact:last-child { border-right: 0; }
.ops-security-fact span { color: var(--muted); font-size: 9px; }
.ops-security-fact b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ops-security-warning { min-height: 52px; padding: 9px 11px; display: grid; gap: 4px; border: 1px solid var(--line); border-left: 4px solid var(--warning); background: var(--surface-soft); }
.ops-security-warning b { color: var(--ink); font-size: 10px; }
.ops-security-warning span { color: var(--muted); font-size: 9px; line-height: 1.55; }
.ops-cleanup-modal { width: min(900px, calc(100vw - 28px)); }
.ops-cleanup-categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.ops-cleanup-category { min-width: 0; min-height: 54px; padding: 8px 10px; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); }
.ops-cleanup-category input { width: 16px; height: 16px; accent-color: var(--accent); }
.ops-cleanup-category span { min-width: 0; display: grid; gap: 3px; }
.ops-cleanup-category b { overflow: hidden; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ops-cleanup-category small { color: var(--muted); font-size: 8px; }
.ops-cleanup-category.disabled { opacity: 0.55; background: var(--surface-soft); }

.report-filter-toolbar { flex-wrap: wrap; }
.report-period-segment { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); }
.report-period-segment .btn { min-height: 34px; border: 0; border-right: 1px solid var(--line-strong); border-radius: 0; }
.report-period-segment .btn:last-child { border-right: 0; }
.report-period-segment .btn.active { background: var(--accent); color: #fff; }
.report-quick-ranges { display: flex; align-items: center; gap: 4px; }
.report-center-layout { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: start; }
.report-tabbar { min-width: 0; display: flex; align-items: stretch; gap: 8px; overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
.report-tabbar-group { min-width: max-content; display: flex; align-items: stretch; }
.report-tabbar-label { padding: 0 9px; display: flex; align-items: center; border-right: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); font-size: 9px; font-weight: 800; }
.report-tabbar-item { min-height: 38px; padding: 6px 10px; display: flex; align-items: center; gap: 5px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 10px; white-space: nowrap; cursor: pointer; }
.report-tabbar-item:hover { background: var(--surface-soft); }
.report-tabbar-item.active { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); font-weight: 800; }
.report-technical-details { position: relative; width: max-content; max-width: 100%; }
.report-technical-details > summary {
  min-height: 26px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
  white-space: nowrap;
}
.report-technical-details > dl {
  position: absolute;
  right: 0;
  z-index: 8;
  width: min(360px, 70vw);
  margin: 4px 0 0;
  padding: 9px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 8px;
  border: 1px solid var(--line-strong);
  background: var(--raised, var(--surface));
  box-shadow: 0 12px 32px color-mix(in srgb, var(--admin-overlay, #000) 32%, transparent);
}
.report-technical-details dt { color: var(--muted); font-size: 8px; white-space: nowrap; }
.report-technical-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: var(--ink); font: 9px/1.4 ui-monospace, SFMono-Regular, monospace; }
.report-navigation { min-width: 0; position: sticky; top: 8px; display: grid; border: 1px solid var(--line); background: var(--surface); }
.report-navigation-label { min-height: 30px; padding: 8px 9px; border-bottom: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); font-size: 9px; font-weight: 800; }
.report-navigation-item { min-width: 0; min-height: 36px; padding: 7px 9px; display: flex; align-items: center; justify-content: space-between; gap: 6px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.report-navigation-item:hover { background: var(--surface-soft); }
.report-navigation-item.active { background: var(--accent-soft); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); font-weight: 800; }
.report-center-content { min-width: 0; }
.report-center-content .panel + .panel { margin-top: 10px; }
.report-center-content table { min-width: 1050px; }
.report-trend-chart {
  height: 180px;
  padding: 14px 10px 8px;
  display: flex;
  align-items: stretch;
  gap: 6px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.report-trend-column { min-width: 44px; flex: 1 0 44px; display: grid; grid-template-rows: 18px minmax(0, 1fr) 22px; align-items: end; text-align: center; }
.report-trend-column b { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.report-trend-column span { align-self: center; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.report-trend-bar { width: min(26px, 70%); min-height: 2px; margin: 0 auto; background: #18b8a9; box-shadow: inset 0 1px 0 rgba(255,255,255,0.22); }

body[data-role="ADMIN"] :where(.compact-summary-strip, .role-management-layout, .role-management-item, .ops-command-result, .report-navigation, .report-tabbar) {
  border-color: #1c3852;
  background: #0d1f31;
  color: #dbeafe;
}
body[data-role="ADMIN"] :where(.compact-summary-item, .role-management-aside, .role-management-aside-head, .role-management-item, .role-management-editor-head, .role-management-profile, .role-management-filters, .ops-command-actions, .ops-command-result-head, .ops-command-facts > div, .report-navigation-label, .report-navigation-item) {
  border-color: #1c3852;
}
body[data-role="ADMIN"] :where(.role-management-aside, .role-management-profile, .ops-command-actions, .report-navigation-label) { background: #091a2a; }
body[data-role="ADMIN"] .role-management-item:hover,
body[data-role="ADMIN"] .role-management-item.active,
body[data-role="ADMIN"] .report-navigation-item:hover { background: #10283d; }
body[data-role="ADMIN"] .report-navigation-item.active { background: #0d3346; color: #65ddf7; }
body[data-role="ADMIN"] .compact-summary-item b { color: #eff7ff; }
body[data-role="ADMIN"] .modal { border-color: #2b526f; border-top-color: #21c6dd; background: #0b1c2c; box-shadow: 0 28px 90px rgba(0,0,0,0.72), 0 0 0 1px rgba(74,202,228,0.16); }
body[data-role="ADMIN"] .modal-backdrop { background: rgba(1, 8, 15, 0.74); }
body[data-role="ADMIN"] .agent-tree-shell,
body[data-role="ADMIN"] .agent-tree-toolbar,
body[data-role="ADMIN"] .agent-tree-row { border-color: #1c3852; background: #0b1c2c; color: #dbeafe; }
body[data-role="ADMIN"] .agent-tree-toolbar,
body[data-role="ADMIN"] .agent-tree-row:hover { background: #10283d; }
body[data-role="ADMIN"] .agent-tree-branch { border-color: #315776; background: #091a2a; color: #65ddf7; }
body[data-role="ADMIN"] .report-tabbar-label { border-color: #1c3852; background: #091a2a; }
body[data-role="ADMIN"] .report-tabbar-item { border-color: #1c3852; color: #c9dced; }
body[data-role="ADMIN"] .report-tabbar-item:hover { background: #10283d; }
body[data-role="ADMIN"] .report-tabbar-item.active { background: #0d3346; color: #65ddf7; }

@media (max-width: 1180px) {
  .member-filter-bar.member-filter-bar-compact { grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(120px, 1fr)); }
  .member-filter-bar-compact .member-filter-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .ops-command-result { grid-template-columns: minmax(0, 1fr); }
  .ops-command-result-head { border-right: 0; border-bottom: 1px solid var(--line); }
  .ops-command-facts { grid-template-columns: repeat(3, minmax(80px, 1fr)); }
  .ops-command-facts > div:nth-child(3n) { border-right: 0; }
  .ops-security-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-security-fact:nth-child(2n) { border-right: 0; }
}

@media (max-width: 820px) {
  .role-management-layout,
  .report-center-layout { grid-template-columns: minmax(0, 1fr); }
  .role-management-aside { border-right: 0; border-bottom: 1px solid var(--line); }
  .role-management-list { max-height: 220px; overflow: auto; }
  .role-management-profile { grid-template-columns: minmax(0, 1fr); }
  .report-navigation { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-navigation-label { grid-column: 1 / -1; }
  .report-navigation-item { min-width: 0; }
  .member-filter-bar.member-filter-bar-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-filter-bar-compact .member-search-field,
  .member-filter-bar-compact .member-sort-field,
  .member-filter-bar-compact .member-filter-actions { grid-column: 1 / -1; }
  .member-play-limit-toolbar { grid-template-columns: minmax(0, 1fr); }
  .member-limit-game-tabs { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-limit-game-tabs button { min-width: 0; }
  .member-play-limit-grid,
  .member-bet-control-domains { grid-template-columns: minmax(0, 1fr); }
  .member-bet-control-amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-assignment-current-band { grid-template-columns: minmax(0, 1fr); }
  .member-wallet-toolbar { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .compact-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-summary-item:nth-child(2n) { border-right: 0; }
  .role-management-editor-head { align-items: flex-start; flex-direction: column; }
  .role-management-editor-actions { justify-content: flex-start; }
  .role-management-filters,
  .member-filter-bar.member-filter-bar-compact,
  .member-filter-bar-compact .member-filter-advanced { grid-template-columns: minmax(0, 1fr); }
  .member-filter-bar-compact .member-search-field,
  .member-filter-bar-compact .member-sort-field,
  .member-filter-bar-compact .member-filter-actions { grid-column: auto; }
  .member-filter-actions { flex-wrap: wrap; }
  .ops-command-actions .btn { flex: 1 1 calc(50% - 4px); }
  .ops-command-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-command-facts > div:nth-child(3n) { border-right: 1px solid var(--line); }
  .ops-command-facts > div:nth-child(2n) { border-right: 0; }
  .ops-cleanup-categories,
  .ops-security-facts { grid-template-columns: minmax(0, 1fr); }
  .ops-security-fact { border-right: 0; border-bottom: 1px solid var(--line); }
  .ops-security-fact:last-child { border-bottom: 0; }
  .report-filter-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-period-segment,
  .report-quick-ranges,
  .report-filter-toolbar > .btn { grid-column: 1 / -1; }
  .report-period-segment .btn { flex: 1; }
  .report-quick-ranges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .report-navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Foundation 1.59: server-persisted menu, header and operations-console modules. */
.admin-sidebar-title {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #17324a;
  border-radius: 0;
  background: #071522;
  color: #e9f5ff;
  cursor: pointer;
}
.admin-sidebar-title .brand-text {
  min-width: 0;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.admin-sidebar-title .brand-text .lucide-icon { width: 18px; height: 18px; color: #5bdcf4; }
.admin-sidebar-title .brand-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-header-page-name {
  max-width: 180px;
  overflow: hidden;
  color: #e8f7ff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-workspace-settings-modal {
  width: min(1120px, calc(100vw - 24px));
  height: min(860px, calc(100dvh - 24px));
  max-height: min(860px, calc(100dvh - 24px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}
.admin-workspace-settings-modal .modal-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
  scrollbar-width: auto;
  scrollbar-color: #4d7896 #071522;
}
.admin-workspace-settings-modal .modal-body::-webkit-scrollbar { width: 12px; height: 12px; }
.admin-workspace-settings-modal .modal-body::-webkit-scrollbar-track { background: #071522; border-left: 1px solid #203c53; }
.admin-workspace-settings-modal .modal-body::-webkit-scrollbar-thumb { min-height: 42px; border: 2px solid #071522; border-radius: 6px; background: #4d7896; }
.admin-workspace-settings-modal .modal-body::-webkit-scrollbar-thumb:hover { background: #65a5c7; }
.admin-page-guide-trigger { min-height: 32px; display: inline-flex; align-items: center; gap: 6px; }
.admin-page-guide-trigger .lucide { width: 15px; height: 15px; }
.admin-operation-guide-tab {
  position: fixed;
  z-index: 36;
  top: 46%;
  right: 0;
  width: 31px;
  min-height: 116px;
  padding: 9px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #347197;
  border-right: 0;
  border-radius: 3px 0 0 3px;
  background: #0b2739;
  color: #dff8ff;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0;
  writing-mode: vertical-rl;
  cursor: pointer;
  box-shadow: 0 7px 20px rgba(0, 0, 0, .28);
}
.admin-operation-guide-tab:hover,
.admin-operation-guide-tab:focus-visible { border-color: #18d4ff; background: #0e3950; color: #ffffff; outline: none; }
.admin-operation-guide-tab .lucide-icon { width: 15px; height: 15px; writing-mode: horizontal-tb; }
@media (min-width: 901px) {
  body[data-role="ADMIN"] .content { padding-right: 48px; }
}
@media (max-width: 900px) {
  .admin-operation-guide-tab { display: none; }
}
.risk-detail-cell { min-width: 150px; max-width: 360px; display: grid; gap: 4px; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.risk-detail-cell b { color: #dbeafe; font-size: 11px; font-weight: 750; }
.risk-detail-cell span { color: #8eabc2; font-size: 10px; }
body[data-role="ADMIN"] td.risk-explanation-column { min-width: 250px; white-space: normal; }

/* Member operations: desktop uses a large dialog; compact screens and new windows use the routed page. */
.member-detail-page-host { min-width: 0; padding-top: 0 !important; }
.member-detail-dialog-layer {
  z-index: 84;
  padding: 10px;
  place-items: center;
  overscroll-behavior: contain;
  background: rgba(2, 10, 18, .72);
}
.modal.member-detail-desktop-dialog {
  width: min(1680px, calc(100vw - 20px));
  height: calc(100dvh - 20px);
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid #3a6c8d;
  border-top: 2px solid #18d4ff;
  border-radius: 4px;
  background: #081725;
  box-shadow: 0 24px 76px rgba(0, 0, 0, .58);
}
.member-detail-desktop-dialog > .member-detail-page {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.member-detail-page {
  min-width: 0;
  min-height: 680px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #28506b;
  border-top: 2px solid #18d4ff;
  border-radius: 3px;
  background: #081725;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .24);
}
.member-detail-page.member-detail-page-editing { grid-template-rows: auto auto auto minmax(0, 1fr); }
.member-detail-page-head { border-bottom: 1px solid #1c3852; background: #091a2a; }
.member-detail-page .member-detail-identity-band,
.member-detail-page .member-detail-summary { flex: 0 0 auto; }
.member-detail-page .member-detail-workspace {
  min-height: 420px;
  border-top: 1px solid #1c3852;
  border-bottom: 1px solid #1c3852;
}
.member-detail-page-content { min-width: 0; min-height: 0; overflow: auto; }
.member-detail-page-content-editing {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}
.member-detail-page .member-detail-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  border-top: 0;
  background: #091a2a;
}
.member-comprehensive-page {
  min-width: 0;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #1c3852;
  border-radius: 3px;
  background: #081725;
}
.member-comprehensive-page-intro {
  min-width: 0;
  min-height: 52px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #1c3852;
  background: #091a2a;
}
.member-comprehensive-page-intro h2 { margin: 0; color: #e8f4fd; font-size: 13px; }
.member-comprehensive-page-intro .member-profile-member {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #7894ae;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-comprehensive-page-body { min-height: 0; overflow: hidden; }
.member-comprehensive-page-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  border-top: 1px solid #1c3852;
  background: #091a2a;
}
.member-comprehensive-page .member-product-matrix-table { min-width: 920px; }
.member-comprehensive-page .member-comprehensive-sections {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.member-comprehensive-page .table-wrap { max-height: none; }
.member-comprehensive-page .member-play-rule-table.table-workspace { overflow: hidden; }
.member-comprehensive-page .member-play-rule-table .table-scroll { overflow-x: auto; overflow-y: visible; }
body[data-role="ADMIN"] :where(.member-play-rule-intro, .member-play-rule-domain, .member-play-rule-domain-summary, .member-play-rule-domain-body, .member-play-rule-overview, .member-play-rule-table) {
  border-color: #1c3852;
}
body[data-role="ADMIN"] :where(.member-play-rule-intro, .member-play-rule-domain-summary) { background: #091a2a; }
body[data-role="ADMIN"] .member-play-rule-domain { background: #0b1c2c; }
body[data-role="ADMIN"] .member-play-rule-domain-title b,
body[data-role="ADMIN"] .member-play-rule-subhead { color: #e5f1fa; }
.structured-form-grid [hidden] { display: none !important; }
.admin-workspace-settings-tabs {
  position: sticky;
  top: -14px;
  z-index: 2;
  margin: 8px 0;
  background: #0a1a2a;
}
.admin-workspace-settings-content { min-width: 0; }
.admin-module-settings-stack,
.admin-menu-preference-list { display: grid; gap: 6px; }
.admin-module-group {
  overflow: hidden;
  border: 1px solid #29445a;
  border-radius: 3px;
  background: #0a1b2b;
}
.admin-module-group-head { border: 0; border-radius: 0; }
.admin-module-page-list {
  display: grid;
  border-top: 1px solid #203b52;
  background: #071724;
}
.admin-module-page-row {
  min-height: 38px;
  padding: 4px 8px 4px 38px;
  display: grid;
  grid-template-columns: 22px minmax(130px, 1fr) minmax(140px, 1fr) minmax(130px, .8fr) auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #142e43;
}
.admin-module-page-row:last-child { border-bottom: 0; }
.admin-module-page-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c9dceb;
  font-size: 10px;
}
.admin-module-group-identity {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(150px, 260px) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.admin-module-group-identity > span { color: #7794aa; font-size: 9px; }
.admin-menu-name-input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 7px;
  border: 1px solid #2a4961;
  border-radius: 3px;
  background: #071724;
  color: #d7e7f2;
  font-size: 10px;
}
.admin-menu-name-input:focus {
  border-color: #18d4ff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(24, 212, 255, .12);
}
.admin-menu-layout-command {
  min-height: 46px;
  padding: 7px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #29445a;
  background: #0d2031;
}
.admin-menu-layout-command > div { color: #8ba5b9; font-size: 9px; line-height: 1.5; }
.admin-module-page-row .lucide-icon { width: 14px; height: 14px; color: #7697b0; }
.admin-header-module-row {
  min-height: 52px;
  padding: 6px 8px;
  display: grid;
  grid-template-columns: minmax(170px, .75fr) minmax(240px, 2fr) auto;
  align-items: center;
  gap: 6px;
  border: 1px solid #29445a;
  border-radius: 3px;
  background: #0d2031;
}
.admin-header-module-identity { min-width: 0; display: grid; gap: 2px; }
.admin-header-module-identity b { color: #e1edf6; font-size: 11px; }
.admin-header-module-identity small { color: #7794aa; font-size: 9px; }
.admin-header-module-options {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  align-items: center;
  gap: 6px;
}
.admin-workspace-setting-select,
.admin-module-threshold {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 7px;
  border: 1px solid #2a4961;
  border-radius: 3px;
  background: #071724;
  color: #cfdeeb;
  font-size: 9px;
}
.admin-dashboard-module-row {
  min-height: 48px;
  padding: 6px 8px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 130px auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #29445a;
  border-radius: 3px;
  background: #0d2031;
}
.admin-dashboard-module-row > div:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.admin-dashboard-module-row b { color: #e1edf6; font-size: 11px; }
.admin-dashboard-module-row span { color: #829caf; font-size: 9px; }
.admin-operation-item {
  min-width: 126px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: stretch;
  border: 1px solid #203d54;
  border-radius: 3px;
  overflow: hidden;
  background: #0d2031;
}
.admin-operation-item .admin-operation-metric {
  min-width: 0;
  min-height: 28px;
  border: 0;
  border-radius: 0;
}
.admin-operation-new-window {
  width: 24px !important;
  min-height: 28px !important;
  border: 0 !important;
  border-left: 1px solid #203d54 !important;
  border-radius: 0 !important;
}
.admin-operation-new-window .lucide-icon { width: 11px; height: 11px; }
.admin-dashboard-module-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}
.admin-dashboard-module {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #1c3852;
  border-radius: 3px;
  background: #0b1c2c;
}
.admin-dashboard-module.module-size-third { grid-column: span 4; }
.admin-dashboard-module.module-size-half { grid-column: span 6; }
.admin-dashboard-module.module-size-full { grid-column: 1 / -1; }
.admin-dashboard-module-head {
  min-height: 42px;
  padding: 7px 10px;
  display: grid;
  grid-template-columns: 3px minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #1c3852;
  background: #091a2a;
}
.admin-dashboard-module-head > div:first-child { align-self: stretch; background: #24c6dc; }
.admin-dashboard-module-head h3 { margin: 0; color: #e5f1fa; font-size: 12px; }
.admin-dashboard-module-head span { overflow: hidden; color: #7895ab; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.admin-dashboard-module > :not(.admin-dashboard-module-head) { margin: 0; border: 0; border-radius: 0; }
.admin-dashboard-module .admin-workspace-metrics { border: 0; }
.admin-dashboard-module .admin-workspace-queues { padding: 8px; }
.admin-dashboard-compact-list { min-width: 0; display: grid; }
.admin-dashboard-link-row {
  min-width: 0;
  min-height: 38px;
  padding: 5px 9px;
  display: grid;
  grid-template-columns: minmax(90px, .8fr) minmax(120px, 1.5fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid #173149;
  border-radius: 0;
  background: transparent;
  color: #91aabd;
  text-align: left;
}
.admin-dashboard-link-row:last-child { border-bottom: 0; }
.admin-dashboard-link-row:hover { background: #10283b; }
.admin-dashboard-link-row b,
.admin-dashboard-link-row strong { overflow: hidden; color: #dcebf6; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-dashboard-link-row span { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.admin-dashboard-system-grid { padding: 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.operations-guide-search {
  width: min(640px, 100%);
  height: 36px;
  margin: 0 0 10px;
}
.operations-guide-directory,
.operations-guide-page-list { display: grid; gap: 8px; }
.operations-guide-group {
  border-top: 1px solid #1c3852;
  padding-top: 8px;
}
.operations-guide-group-head {
  min-height: 38px;
  display: grid;
  grid-template-columns: 20px auto 1fr;
  align-items: center;
  gap: 8px;
}
.operations-guide-group-head .lucide-icon { width: 16px; height: 16px; color: #5bdcf4; }
.operations-guide-group-head h2 { margin: 0; color: #e4f0f8; font-size: 13px; }
.operations-guide-group-head span { color: #7895ab; font-size: 9px; }
.operations-guide-page {
  min-width: 0;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(0, 2fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #1c3852;
  border-radius: 3px;
  background: #0b1c2c;
}
.operations-guide-page-title { min-width: 0; display: flex; align-items: center; gap: 8px; }
.operations-guide-page-title .lucide-icon { width: 15px; height: 15px; color: #789db6; }
.operations-guide-page-title h3 { margin: 0; color: #ddecf6; font-size: 11px; }
.operations-guide-page-facts { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.operations-guide-page-actions { display: flex; align-items: center; gap: 4px; }

.admin-guide-drawer-backdrop {
  padding: 0;
  display: block;
  background: rgba(3, 10, 17, .58);
}
.admin-guide-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, calc(100vw - 72px));
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-left: 1px solid #315776;
  background: #081725;
  box-shadow: -18px 0 48px rgba(0, 0, 0, .46);
  color: #dcebf6;
  animation: admin-guide-slide-in 160ms ease-out;
}
@keyframes admin-guide-slide-in {
  from { transform: translateX(28px); opacity: .82; }
  to { transform: translateX(0); opacity: 1; }
}
.admin-guide-drawer-head {
  min-height: 86px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #1c3852;
  background: #091a2a;
}
.admin-guide-drawer-identity { min-width: 0; }
.admin-guide-kicker {
  display: block;
  margin-bottom: 5px;
  color: #5bdcf4;
  font-size: 9px;
  font-weight: 750;
}
.admin-guide-drawer-head h2 {
  margin: 0;
  overflow-wrap: anywhere;
  color: #f0f7fb;
  font-size: 18px;
  line-height: 1.25;
}
.admin-guide-drawer-head p {
  margin: 5px 0 0;
  color: #7895ab;
  font-size: 9px;
}
.admin-guide-drawer-head .btn.icon {
  flex: 0 0 auto;
  width: 32px;
  min-height: 32px;
}
.admin-guide-drawer-body {
  min-height: 0;
  overflow: auto;
  padding: 12px 16px 18px;
}
.admin-guide-section {
  padding: 13px 0;
  border-bottom: 1px solid #173149;
}
.admin-guide-section h3,
.admin-guide-related h3 {
  margin: 0 0 8px;
  color: #8ba8bc;
  font-size: 10px;
}
.admin-guide-section p {
  margin: 0;
  color: #d3e2ec;
  font-size: 11px;
  line-height: 1.65;
}
.admin-guide-step-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  list-style: none;
  counter-reset: admin-guide-step;
}
.admin-guide-step-list li {
  min-height: 34px;
  padding: 7px 9px 7px 38px;
  position: relative;
  border: 1px solid #203d54;
  border-radius: 3px;
  background: #0b1c2c;
  color: #d9e8f1;
  font-size: 10px;
  line-height: 1.55;
  counter-increment: admin-guide-step;
}
.admin-guide-step-list li::before {
  content: counter(admin-guide-step);
  position: absolute;
  top: 7px;
  left: 9px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid #2d6e8c;
  border-radius: 50%;
  color: #73dcef;
  font: 750 9px/1 ui-monospace, SFMono-Regular, monospace;
}
.admin-guide-success { border-left: 3px solid #31c77c; padding-left: 10px; }
.admin-guide-caution { border-left: 3px solid #e4a12b; padding-left: 10px; }
.admin-guide-related { padding-top: 14px; }
.admin-guide-drawer .admin-page-help-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.admin-guide-drawer .admin-page-help-links .btn {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 9px;
}
.admin-guide-drawer-actions {
  min-height: 58px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  border-top: 1px solid #1c3852;
  background: #091a2a;
}

@media (max-width: 1180px) {
  .admin-module-page-row { grid-template-columns: 22px minmax(130px, 1fr) minmax(130px, 1fr); }
  .admin-module-page-row > .admin-workspace-setting-select { grid-column: 2; }
  .admin-module-page-row > .admin-header-preference-actions { grid-column: 3; grid-row: 2; justify-content: flex-end; }
  .admin-header-module-row { grid-template-columns: minmax(150px, .7fr) minmax(0, 2fr); }
  .admin-header-module-row .admin-header-preference-actions { justify-content: flex-end; }
  .admin-dashboard-module.module-size-third { grid-column: span 6; }
  .operations-guide-page { grid-template-columns: minmax(140px, .7fr) minmax(0, 2fr); }
  .operations-guide-page-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

@media (max-width: 760px) {
  .admin-header-page-name { display: none; }
  .modal-backdrop:has(.admin-workspace-settings-modal) { padding: 0; place-items: stretch; }
  .admin-workspace-settings-modal { width: 100%; height: 100dvh; max-height: 100dvh; }
  .admin-workspace-settings-tabs { top: -10px; }
  .admin-header-module-row { grid-template-columns: minmax(0, 1fr) auto; }
  .admin-header-module-options { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-header-module-row .admin-header-preference-actions { grid-column: 2; grid-row: 1; }
  .admin-module-page-row { padding-left: 10px; grid-template-columns: 22px minmax(0, 1fr); }
  .admin-module-page-row > :not(input:first-child) { grid-column: 2; }
  .admin-module-page-row > .admin-header-preference-actions { grid-row: auto; justify-content: flex-end; }
  .admin-module-group-identity { grid-template-columns: minmax(0, 1fr); }
  .admin-menu-layout-command { align-items: stretch; flex-direction: column; }
  .admin-dashboard-module-row { grid-template-columns: 22px minmax(0, 1fr) 108px; }
  .admin-dashboard-module-row .admin-header-preference-actions { grid-column: 2 / -1; justify-content: flex-end; }
  .admin-dashboard-module.module-size-third,
  .admin-dashboard-module.module-size-half { grid-column: 1 / -1; }
  .admin-operation-item { min-width: 0; }
  .admin-operations-strip:not(.expanded) .admin-operations-urgent .admin-operation-item:nth-child(n + 3) { display: none; }
  .admin-dashboard-system-grid { grid-template-columns: minmax(0, 1fr); }
  .operations-guide-page { grid-template-columns: minmax(0, 1fr); }
  .operations-guide-page-facts { grid-template-columns: minmax(0, 1fr); }
  .operations-guide-page-actions { grid-column: auto; justify-content: flex-start; }
  .admin-guide-drawer {
    width: min(410px, calc(100vw - 34px));
  }
  .admin-guide-drawer-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .admin-guide-drawer-actions .btn { width: 100%; }
}

/* Foundation 1.60: one-row primary header, sports-reference dashboard and per-category sound controls. */
body[data-role="ADMIN"] .topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.admin-header-leading {
  min-width: 34px;
  flex: 0 0 auto;
  max-width: none;
}
.admin-header-managed-modules {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow: visible;
}
.admin-header-configured-track {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-color: #315776 transparent;
  scrollbar-width: thin;
}
.admin-header-configured-track::-webkit-scrollbar { height: 3px; }
.admin-header-configured-track::-webkit-scrollbar-track { background: transparent; }
.admin-header-configured-track::-webkit-scrollbar-thumb { border-radius: 2px; background: #315776; }
.admin-header-fixed-administrator {
  position: relative;
  z-index: 6;
  margin-left: auto;
  flex: 0 0 auto;
  align-self: stretch;
  border-left: 1px solid #1e3a51;
  background: #071522;
}
.admin-header-module-slot {
  min-width: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}
.admin-header-module-slot.module-globalSearch {
  min-width: 190px;
  max-width: 470px;
  flex: 1 1 300px;
}
.admin-header-module-slot.module-globalSearch .admin-top-search {
  width: 100%;
  min-width: 190px;
}
.admin-header-modules {
  min-width: 0;
  flex: 1 1 auto;
}
.admin-header-inline-metrics {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  overflow: hidden;
}
.admin-header-module-slot.module-type-metric.metric-inline-overflow { display: flex; }
.admin-header-module-slot.module-type-metric .admin-header-metric { width: 100%; }
.admin-header-module-slot.module-type-utility,
.admin-header-module-slot.module-type-automatic { flex: 0 0 auto; }
.admin-header-sound-module { display: flex; align-items: center; gap: 2px; }
.admin-header-metric {
  min-width: 92px;
  height: 34px;
  padding: 3px 7px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border: 1px solid #203d54;
  border-radius: 3px;
  background: #0a1c2c;
  color: #7f9bb2;
  text-align: left;
}
.admin-header-metric:hover,
.admin-header-metric:focus-visible {
  border-color: #2d6e8c;
  background: #10283b;
  outline: none;
}
.admin-header-metric > span {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-header-metric > b {
  color: #e4f0f8;
  font: 700 10px/1 ui-monospace, SFMono-Regular, monospace;
  white-space: nowrap;
}
.admin-header-metric.group-urgent > b { color: #ffbd69; }
.admin-header-module-overflow {
  position: relative;
  flex: 0 0 auto;
}
.admin-header-module-overflow > summary {
  list-style: none;
  cursor: pointer;
}
.admin-header-module-overflow > summary::-webkit-details-marker { display: none; }
.admin-header-module-overflow[open] > summary {
  border-color: #315776;
  background: #10283d;
  color: #e8f7ff;
}
.admin-header-module-menu {
  position: fixed;
  top: 60px;
  right: 198px;
  z-index: 50;
  width: min(440px, calc(100vw - 24px));
  max-height: min(620px, calc(100dvh - 76px));
  overflow: auto;
  border: 1px solid #315776;
  border-radius: 3px;
  background: #071522;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .46);
}
.admin-header-module-menu-head {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 42px;
  padding: 5px 7px 5px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1c3852;
  background: #091a2a;
}
.admin-header-module-menu-head strong { color: #e4f1fa; font-size: 11px; }
.admin-header-module-menu-row {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  border-bottom: 1px solid #173149;
}
.admin-header-module-menu-row .admin-header-module-menu-metric {
  width: 100%;
  height: 41px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.admin-header-module-menu-row > .btn.icon {
  width: 30px;
  min-height: 30px;
}
.admin-header-module-empty {
  min-height: 80px;
  display: grid;
  place-items: center;
  color: #607f98;
  font-size: 9px;
}

.admin-dashboard-toolbar {
  min-height: 34px;
  margin-bottom: 8px;
  padding: 0 4px 0 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-bottom: 1px solid #173149;
  color: #6f8ba3;
  font-size: 8px;
}
.admin-dashboard-toolbar-actions { display: flex; align-items: center; gap: 2px; }
.admin-dashboard-toolbar-actions .btn.icon { width: 28px; min-height: 28px; }
.admin-reference-account-grid {
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 7px;
}
.admin-reference-account-card {
  min-width: 0;
  min-height: 92px;
  padding: 10px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  align-items: center;
  gap: 4px 7px;
  border: 1px solid #203d54;
  border-left: 3px solid #24c6dc;
  border-radius: 3px;
  background: #0d2031;
  color: #819cb3;
  text-align: left;
}
.admin-reference-account-card:hover { border-color: #2d6e8c; background: #10283b; }
.admin-reference-account-card > .lucide-icon {
  width: 19px;
  height: 19px;
  grid-row: 1 / 4;
  color: #5bdcf4;
}
.admin-reference-account-name { overflow: hidden; color: #a9c0d2; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.admin-reference-account-card > strong { color: #f0f7fc; font: 700 21px/1 ui-monospace, SFMono-Regular, monospace; }
.admin-reference-account-card > span {
  grid-column: 2 / -1;
  overflow: hidden;
  color: #7894aa;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-reference-finance-metrics,
.admin-reference-month-summary {
  margin: 0 !important;
  padding: 8px;
  gap: 6px;
}
.admin-reference-finance-metrics { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
.admin-reference-month-summary { grid-template-columns: repeat(5, minmax(120px, 1fr)); }
.admin-reference-live-metrics {
  min-width: 0;
  margin: 0 !important;
  padding: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.admin-reference-live-metrics .admin-workspace-metric {
  min-width: 0;
  min-height: 70px;
  padding: 9px 8px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  gap: 7px;
}
.admin-reference-live-metrics .admin-workspace-metric > b {
  min-width: 0;
  overflow: hidden;
  font-size: 9px;
  line-height: 1.2;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: keep-all;
}
.admin-reference-live-metrics .admin-workspace-metric > strong {
  min-width: 0;
  max-width: 100%;
  justify-self: end;
  font-size: 18px;
  letter-spacing: 0;
  white-space: nowrap;
}
.admin-reference-live-metrics .admin-workspace-metric.metric-medium-value > strong { font-size: 14px; }
.admin-reference-live-metrics .admin-workspace-metric.metric-long-value > strong { font-size: 9px; }
.admin-reference-risk-metrics {
  min-width: 0;
  margin: 0 !important;
  padding: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.admin-reference-risk-metrics .admin-workspace-metric {
  min-width: 0;
  min-height: 70px;
  padding: 9px 8px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  gap: 7px;
}
.admin-reference-risk-metrics .admin-workspace-metric > b {
  min-width: 0;
  overflow: hidden;
  font-size: 9px;
  line-height: 1.2;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: keep-all;
}
.admin-reference-risk-metrics .admin-workspace-metric > strong {
  min-width: 0;
  max-width: 100%;
  justify-self: end;
  font-size: 18px;
  letter-spacing: 0;
  white-space: nowrap;
}
.admin-reference-risk-metrics .admin-workspace-metric.metric-medium-value > strong { font-size: 14px; }
.admin-reference-risk-metrics .admin-workspace-metric.metric-long-value > strong { font-size: 9px; }
.admin-reference-finance-metrics .admin-workspace-metric,
.admin-reference-month-summary .admin-workspace-metric { min-height: 66px; padding: 8px 10px; }
.admin-reference-finance-metrics .admin-workspace-metric > strong,
.admin-reference-month-summary .admin-workspace-metric > strong { font-size: 16px; }
@media (min-width: 761px) and (max-width: 1180px) {
  .admin-reference-live-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-reference-risk-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-reference-live-metrics .admin-workspace-metric > strong { font-size: 16px; }
  .admin-reference-risk-metrics .admin-workspace-metric > strong { font-size: 16px; }
  .admin-reference-live-metrics .admin-workspace-metric.metric-medium-value > strong { font-size: 16px; }
  .admin-reference-risk-metrics .admin-workspace-metric.metric-medium-value > strong { font-size: 16px; }
  .admin-reference-live-metrics .admin-workspace-metric.metric-long-value > strong { font-size: 12px; }
  .admin-reference-risk-metrics .admin-workspace-metric.metric-long-value > strong { font-size: 12px; }
  .admin-reference-finance-metrics .admin-workspace-metric {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
    gap: 4px;
  }
  .admin-reference-finance-metrics .admin-workspace-metric > b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .admin-reference-finance-metrics .admin-workspace-metric > strong { justify-self: end; }
  .admin-reference-finance-metrics .admin-workspace-metric > strong,
  .admin-reference-month-summary .admin-workspace-metric > strong {
    max-width: 100%;
    white-space: nowrap;
  }
  .admin-reference-finance-metrics .admin-workspace-metric.metric-medium-value > strong,
  .admin-reference-month-summary .admin-workspace-metric.metric-medium-value > strong { font-size: 14px; }
  .admin-reference-finance-metrics .admin-workspace-metric.metric-long-value > strong,
  .admin-reference-month-summary .admin-workspace-metric.metric-long-value > strong { font-size: 12px; }
}
@media (max-width: 760px) {
  .admin-reference-live-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-reference-risk-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.admin-reference-activity-grid {
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 6px;
}
.admin-reference-activity-item {
  min-width: 0;
  min-height: 44px;
  padding: 0 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 7px;
  border: 1px solid #203d54;
  border-radius: 3px;
  background: #0d2031;
  color: #89a3b9;
  text-align: left;
}
.admin-reference-activity-item:hover { border-color: #2d6e8c; background: #10283b; }
.admin-reference-activity-item > span { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.admin-reference-activity-item > strong { color: #e9f4fb; font: 700 16px/1 ui-monospace, SFMono-Regular, monospace; }
.admin-reference-activity-item > .lucide-icon { width: 13px; height: 13px; color: #557890; }
.admin-reference-monthly { min-width: 0; }
.admin-reference-month-table { border-top: 1px solid #173149; }
.admin-reference-month-table table { min-width: 880px; }

.alert-sound-control-modal {
  width: min(980px, calc(100vw - 24px));
  max-height: min(860px, calc(100dvh - 24px));
}
.alert-sound-control-heading h2 { margin: 0; }
.alert-sound-control-heading p { margin: 4px 0 0; color: #6f8ba3; font-size: 9px; }
.alert-sound-control-body { min-height: 0; overflow: auto; }
.alert-sound-global-control {
  position: sticky;
  top: -14px;
  z-index: 2;
  min-height: 58px;
  margin-bottom: 8px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 150px minmax(220px, 1fr) 210px;
  align-items: center;
  gap: 12px;
  border: 1px solid #29445a;
  border-radius: 3px;
  background: #091a2a;
}
.alert-sound-switch {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: 1fr;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.alert-sound-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.alert-sound-switch > span {
  width: 34px;
  height: 19px;
  position: relative;
  border: 1px solid #31516a;
  border-radius: 10px;
  background: #132b3e;
}
.alert-sound-switch > span::after {
  content: "";
  width: 13px;
  height: 13px;
  position: absolute;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: #7893a9;
  transition: transform 120ms ease, background 120ms ease;
}
.alert-sound-switch input:checked + span { border-color: #1688a2; background: #0b3d4b; }
.alert-sound-switch input:checked + span::after { transform: translateX(15px); background: #5de5fb; }
.alert-sound-switch > b { overflow: hidden; color: #cfe0eb; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.alert-sound-volume-control { min-width: 0; display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; gap: 8px; }
.alert-sound-volume-control > span { color: #90a9bc; font-size: 9px; }
.alert-sound-volume-control input { width: 100%; accent-color: #24c6dc; }
.alert-sound-mute-select {
  width: 100%;
  height: 34px;
  border: 1px solid #294b68;
  border-radius: 3px;
  background: #071522;
  color: #c5d9e8;
  font-size: 9px;
}
.alert-sound-category-list { display: grid; gap: 6px; }
.alert-sound-category-row {
  min-width: 0;
  min-height: 68px;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: minmax(170px, .9fr) minmax(220px, 1.2fr) 126px 72px;
  align-items: center;
  gap: 10px;
  border: 1px solid #29445a;
  border-left: 3px solid #24c6dc;
  border-radius: 3px;
  background: #0d2031;
}
.alert-sound-category-row.personally-muted { border-left-color: #526b7e; opacity: .68; }
.alert-sound-category-identity,
.alert-sound-category-policy { min-width: 0; display: grid; gap: 4px; }
.alert-sound-category-identity > b,
.alert-sound-category-policy > strong { overflow: hidden; color: #e0edf6; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.alert-sound-category-identity > span,
.alert-sound-category-policy > span { overflow: hidden; color: #7894aa; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.alert-sound-category-identity .badge { justify-self: start; }
.alert-sound-category-actions { display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.alert-sound-category-actions .btn.icon { width: 31px; min-height: 31px; }
.alert-sound-control-actions { justify-content: flex-end; }
.alert-sound-control-actions > :first-child { margin-right: auto; }

@media (max-width: 1360px) {
  .admin-header-module-slot.module-globalSearch { max-width: 360px; }
  .admin-header-inline-metrics .admin-header-metric:nth-child(n + 4) { display: none; }
  .admin-reference-month-summary { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
}

@media (max-width: 1120px) {
  .admin-header-module-slot.module-globalSearch { max-width: 300px; }
  .admin-header-inline-metrics .admin-header-metric:nth-child(n + 3) { display: none; }
  .admin-header-module-menu { right: 58px; }
  .admin-reference-account-grid { grid-template-columns: repeat(2, minmax(170px, 1fr)); }
  .alert-sound-category-row { grid-template-columns: minmax(150px, .9fr) minmax(180px, 1.2fr) 118px 68px; }
}

@media (max-width: 760px) {
  .admin-header-leading { flex: 0 0 auto; }
  .admin-header-managed-modules { justify-content: flex-end; overflow: visible; }
  .admin-header-module-slot.module-globalSearch { min-width: 34px; max-width: 34px; flex: 0 0 34px; }
  .admin-header-module-slot.module-globalSearch .admin-top-search { width: 34px; min-width: 34px; }
  .admin-header-modules { flex: 1 1 auto; }
  .admin-header-inline-metrics { display: none; }
  .admin-header-configured-track .admin-header-messages,
  .admin-header-configured-track .admin-header-fullscreen,
  .admin-header-configured-track .admin-header-help { display: grid; }
  .admin-header-module-menu { top: 54px; right: 50px; width: min(440px, calc(100vw - 58px)); }
  .admin-reference-account-grid,
  .admin-reference-activity-grid,
  .admin-reference-finance-metrics,
  .admin-reference-month-summary { grid-template-columns: minmax(0, 1fr); }
  .admin-reference-account-card { min-height: 82px; }
  .alert-sound-control-modal { width: 100%; height: 100dvh; max-height: 100dvh; }
  .alert-sound-global-control {
    top: -10px;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .alert-sound-category-row {
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 8px;
  }
  .alert-sound-category-policy { grid-column: 1 / -1; }
  .alert-sound-category-switch { grid-column: 1; }
  .alert-sound-category-actions { grid-column: 2; grid-row: 3; }
  .member-detail-page {
    min-height: calc(100dvh - 78px);
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }
  .member-detail-page.member-detail-page-editing { grid-template-rows: auto auto auto minmax(520px, auto); }
  .member-detail-page-content-editing { overflow: auto !important; }
  .member-detail-dialog-layer { padding: 0; place-items: stretch; }
  .modal.member-detail-desktop-dialog { width: 100%; height: 100dvh; border: 0; border-radius: 0; }
  .member-detail-page .member-detail-workspace { min-height: 520px; }
  .member-comprehensive-page-intro {
    min-height: 62px;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .member-comprehensive-page-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    overflow: visible;
  }
  .member-comprehensive-page { height: auto; min-height: 100%; overflow: visible; }
  .member-comprehensive-page .member-comprehensive-directory {
    padding: 5px;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid #1c3852;
  }
  .member-comprehensive-page .member-comprehensive-directory button {
    flex: 0 0 auto;
    min-width: 112px;
    border-left: 0;
    border-bottom: 2px solid transparent;
    text-align: center;
  }
  .member-comprehensive-page .member-comprehensive-sections { overflow: visible; scrollbar-gutter: auto; }
  .member-play-rule-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-play-rule-overview .member-detail-fact { border-bottom: 1px solid var(--line); }
  .member-play-rule-overview .member-detail-fact:nth-child(2n) { border-right: 0; }
  .member-play-rule-overview .member-detail-fact:nth-last-child(-n+2) { border-bottom: 0; }
  .member-play-rule-domain-actions .btn { flex: 1 1 150px; }
  .member-comprehensive-page-actions .btn { flex: 1 1 140px; }
}

/* Foundation 1.65: member frontend integration from the approved unified design set. */
.member-balance-group { display: grid; grid-template-columns: repeat(2, minmax(82px, 1fr)); gap: 4px; }
.member-balance-group .member-balance-control { min-width: 82px; padding: 4px 8px; text-align: left; }
.member-balance-group .member-balance-control:first-child b { color: #e8bb3f; }
.member-balance-group .member-balance-control:last-child b { color: #6bd95f; }
.member-top-command.member-finance-command.deposit { border-color: #b98c24; background: #d4a331; color: #171307; }
.member-top-command.member-finance-command.deposit:hover { border-color: #f0c75d; background: #e2b43f; color: #0d0b05; }
.member-icon-command .lucide-icon { width: 17px; height: 17px; }
.member-event-ticker {
  position: sticky;
  top: 62px;
  z-index: 34;
  min-width: 0;
  height: 34px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  border-bottom: 1px solid #283338;
  background: #0b1013;
  color: #aab6ba;
}
.member-event-ticker > .lucide-icon { width: 14px; height: 14px; flex: 0 0 14px; color: #e3b53a; }
.member-event-ticker > b { flex: 0 0 auto; color: #e3b53a; font-size: 9px; }
.member-event-ticker-item { min-width: 0; height: 24px; padding: 0 12px; display: flex; align-items: center; gap: 7px; border: 0; border-left: 1px solid #344047; background: transparent; color: #aab6ba; white-space: nowrap; }
.member-event-ticker-item:hover { background: #151d21; color: #ffffff; }
.member-event-ticker-item span { color: #e2b844; font-size: 8px; font-weight: 800; }
.member-event-ticker-item strong { max-width: 220px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; }
.member-event-ticker-item small { color: #748188; font-size: 8px; }
.member-body { min-width: 0; display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: start; }
.member-side-nav {
  position: sticky;
  top: 96px;
  min-width: 0;
  height: calc(100dvh - 96px);
  padding: 12px 9px 20px;
  overflow-y: auto;
  border-right: 1px solid #283338;
  background: #0d1418;
}
.member-side-label { min-height: 27px; padding: 7px 8px 5px; color: #637178; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.member-side-service-label { margin-top: 12px; border-top: 1px solid #283338; padding-top: 13px; }
.member-side-link { width: 100%; min-height: 39px; padding: 0 9px; display: grid; grid-template-columns: 19px minmax(0, 1fr) auto; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: #93a0a5; text-align: left; }
.member-side-link:hover { border-color: #334149; background: #151e23; color: #eef3f5; }
.member-side-link.active { border-color: #4b431f; border-left-color: #e0b239; background: #24241b; color: #ffffff; box-shadow: inset 2px 0 0 #e0b239; }
.member-side-link .lucide-icon { width: 15px; height: 15px; }
.member-side-link.active .lucide-icon { color: #e0b239; }
.member-side-link span { overflow: hidden; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.member-side-link small { min-width: 20px; color: #64737a; font-size: 8px; text-align: right; }
.member-body > .member-main { min-width: 0; }
.member-body .member-content { width: 100%; max-width: 1680px; }
.member-app-shell[data-view="home"] .member-product-card { min-height: 0; }
.member-app-shell[data-view="home"] .member-product-copy { min-height: 72px; padding: 11px 13px 9px; }
.member-app-shell[data-view="home"] .member-product-visual { min-height: 72px; aspect-ratio: 16 / 5.6; padding: 10px; }
.member-app-shell[data-view="home"] .member-product-foot { min-height: 35px; padding: 0 12px; }
.member-app-shell[data-view="home"] .member-engagement-section { margin-top: 12px; padding-top: 0; border-top: 0; }
.member-racing-directory-actions { display: flex; align-items: center; gap: 8px; }
.member-racing-directory-actions small { color: #7f8d91; font-size: 8px; white-space: nowrap; }
.member-racing-directory-actions .btn { min-height: 28px; }
.member-racing-venue-grid.compact { max-height: none; padding: 0 0 3px; display: flex; gap: 5px; overflow-x: auto; overflow-y: hidden; }
.member-racing-venue-grid.compact .member-racing-venue { flex: 0 0 176px; min-height: 58px; }
.member-racing-directory:not(.expanded) { padding: 9px 10px 7px; }
.member-racing-directory:not(.expanded) .member-racing-directory-head h1 { font-size: 14px; }
.member-racing-directory:not(.expanded) .member-racing-directory-head p { display: none; }

@media (max-width: 1480px) {
  .member-topbar { grid-template-columns: 166px minmax(340px, 1fr) auto; }
  .member-brand { padding: 0 16px; }
  .member-product-nav button { min-width: 78px; padding: 0 10px; }
  .member-top-actions { gap: 3px; padding-right: 8px; }
  .member-top-command { padding: 0 8px; }
  .member-icon-command { width: 34px; }
}

@media (max-width: 1180px) {
  .member-body { grid-template-columns: minmax(0, 1fr); }
  .member-side-nav { display: none; }
  .member-results-command,
  .member-refresh-command { display: none; }
}

@media (max-width: 760px) {
  .member-topbar { grid-template-columns: 118px minmax(0, 1fr); }
  .member-event-ticker { top: 58px; height: 31px; padding: 0 8px; }
  .member-event-ticker-item { padding: 0 8px; }
  .member-event-ticker-item:nth-of-type(n + 2) { display: none; }
  .member-event-ticker-item strong { max-width: 142px; }
  .member-body { display: block; }
  .member-top-actions { min-width: 0; gap: 2px; padding-right: 6px; }
  .member-balance-group { grid-template-columns: repeat(2, 84px); gap: 2px; }
  .member-balance-group .member-balance-control { min-width: 84px; width: 84px; height: 34px; padding: 3px 5px; }
  .member-balance-group .member-balance-control span { font-size: 7px; }
  .member-balance-group .member-balance-control b { font-size: 8.5px; }
  .member-support-command,
  .member-identity-command,
  .member-refresh-command,
  .member-exit-command { display: none; }
  .member-account-command { width: 34px; height: 34px; }
  .member-command-band { margin-top: 0; }
  .member-racing-directory-actions > small { display: none; }
  .member-racing-venue-grid.compact .member-racing-venue { flex-basis: 150px; }
}

@media (max-width: 360px) {
  .member-topbar { grid-template-columns: 106px minmax(0, 1fr); }
  .member-balance-group { grid-template-columns: repeat(2, 76px); }
  .member-balance-group .member-balance-control { min-width: 76px; width: 76px; }
  .member-balance-group .member-balance-control b { font-size: 8px; }
}

/* Foundation 1.69: desktop operations keep complete fields; phone compaction stops at 760px. */
body[data-role="MEMBER"] .member-account-quick-actions button.member-account-logout {
  background: #281719;
  color: #ffb5b5;
}
body[data-role="MEMBER"] .member-account-quick-actions button.member-account-logout:hover { background: #351d20; }
body[data-role="MEMBER"] .member-account-quick-actions button.member-account-logout span { color: #c98d91; }

@media (min-width: 761px) {
  body[data-role="ADMIN"] .app-shell { grid-template-columns: 200px minmax(0, 1fr); }
  body[data-role="ADMIN"] .sidebar-brand { justify-content: flex-start; padding: 0 14px; }
  body[data-role="ADMIN"] .sidebar-brand .brand-text,
  body[data-role="ADMIN"] .role-chip,
  body[data-role="ADMIN"] .admin-nav-domain-label,
  body[data-role="ADMIN"] .admin-primary-nav-button > span,
  body[data-role="ADMIN"] .admin-primary-nav-button > small,
  body[data-role="ADMIN"] .admin-primary-nav-button .admin-nav-chevron,
  body[data-role="ADMIN"] .admin-personal-button > span,
  body[data-role="ADMIN"] .admin-personal-button > small,
  body[data-role="ADMIN"] .admin-profile-identity,
  body[data-role="ADMIN"] .admin-page-context-identity > span { display: block; }
  body[data-role="ADMIN"] .admin-nav-filter { display: grid; }
  body[data-role="ADMIN"] .admin-all-functions { display: flex; }
  body[data-role="ADMIN"] .admin-nav-group.expanded .admin-nav-children { display: grid; }
  body[data-role="ADMIN"] .admin-personal-button {
    min-height: 35px;
    padding: 0 8px;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    justify-items: stretch;
  }
  body[data-role="ADMIN"] .admin-primary-nav-button {
    min-height: 36px;
    padding: 0 9px 0 13px;
    grid-template-columns: 18px minmax(0, 1fr) auto 12px;
    justify-items: stretch;
  }
  body[data-role="ADMIN"] .app-shell.admin-sidebar-collapsed { grid-template-columns: 68px minmax(0, 1fr); }
  body[data-role="ADMIN"] .admin-sidebar-collapsed .sidebar-brand { justify-content: center; padding: 0; }
  body[data-role="ADMIN"] .admin-sidebar-collapsed .sidebar-brand .brand-text,
  body[data-role="ADMIN"] .admin-sidebar-collapsed .admin-personal-button > span,
  body[data-role="ADMIN"] .admin-sidebar-collapsed .admin-personal-button > small,
  body[data-role="ADMIN"] .admin-sidebar-collapsed .admin-nav-filter,
  body[data-role="ADMIN"] .admin-sidebar-collapsed .admin-nav-domain-label,
  body[data-role="ADMIN"] .admin-sidebar-collapsed .admin-nav-children,
  body[data-role="ADMIN"] .admin-sidebar-collapsed .admin-primary-nav-button > span,
  body[data-role="ADMIN"] .admin-sidebar-collapsed .admin-primary-nav-button > small,
  body[data-role="ADMIN"] .admin-sidebar-collapsed .admin-nav-chevron { display: none !important; }
  body[data-role="ADMIN"] .admin-sidebar-collapsed .admin-personal-button,
  body[data-role="ADMIN"] .admin-sidebar-collapsed .admin-primary-nav-button {
    padding: 0;
    grid-template-columns: 1fr;
    justify-items: center;
  }
  body[data-role="ADMIN"] .admin-sidebar-collapsed .admin-all-functions {
    min-width: 40px;
    padding: 0;
    justify-content: center;
    overflow: hidden;
    color: transparent !important;
  }
  body[data-role="ADMIN"] .content { padding-right: 48px; }
  .admin-operation-guide-tab { display: flex; }
  .admin-operations-mobile-toggle { display: none; }
  .admin-operations-strip:not(.expanded) .admin-operations-business { display: flex; }
  .admin-header-inline-metrics .admin-header-metric:nth-child(n) { display: grid; }

  .member-list-table .member-sticky-col { position: sticky; box-shadow: 1px 0 0 var(--line); }
  .member-detail-identity-band { grid-template-columns: minmax(350px, 1fr) minmax(420px, 1.25fr); }
  .member-overview-facts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .member-detail-wallet-grid { grid-template-columns: repeat(5, minmax(140px, 1fr)); }
  .member-detail-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .member-detail-facts .member-detail-fact,
  .member-detail-facts .member-detail-fact:nth-child(2n),
  .member-detail-facts .member-detail-fact:nth-child(4n) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .member-detail-facts .member-detail-fact:nth-child(4n) { border-right: 0; }
  .member-detail-facts .member-detail-fact:nth-last-child(-n + 4) { border-bottom: 0; }
  .member-profile-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .agent-credit-band { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .agent-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .agent-tree-list { overflow-x: auto; overscroll-behavior-x: contain; }
  .agent-tree-row {
    min-width: 940px;
    grid-template-columns: minmax(250px, 1.4fr) 180px 120px 150px 150px;
  }
  .agent-tree-row > :nth-child(3),
  .agent-tree-row > :nth-child(4) { display: block; }

  .live-order-list { overflow-x: auto; overscroll-behavior-x: contain; }
  .live-order-row {
    min-width: 1050px;
    grid-template-columns: 138px 158px minmax(240px, 1fr) 146px 126px 92px;
  }
  .live-order-row .live-order-metric:nth-of-type(5) { display: grid; }

  .login-signal p,
  .login-foot { display: block; }
  .member-body { grid-template-columns: 190px minmax(0, 1fr); }
  .member-side-nav { display: block; }
  .member-account-quick-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .member-top-command,
  .member-results-command,
  .member-refresh-command { display: inline-flex; align-items: center; justify-content: center; }
  .runner-type { display: block; }
  .sports-toolbar-status { display: flex; }
  .mini-game-rail .sub-cell { display: block; }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .member-topbar {
    height: 106px;
    grid-template-columns: 166px minmax(0, 1fr);
    grid-template-rows: 62px 44px;
  }
  .member-top-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    padding: 3px 8px;
    justify-content: flex-end;
    overflow-x: auto;
    border-top: 1px solid #273238;
  }
  .member-event-ticker { top: 106px; }
  .member-side-nav { top: 140px; height: calc(100dvh - 140px); }
}

@media (min-width: 761px) and (max-width: 1020px) {
  .sports-toolbar { grid-template-columns: auto minmax(0, 1fr); }
  .sports-toolbar-status { grid-column: 1 / -1; justify-content: flex-end; }
  .racing-market-row { grid-template-columns: 32px minmax(120px, 1fr) 82px minmax(140px, .9fr); }
}

/* Foundation 1.71: Casino-style member operation menu and horizontal member workspace. */
@media (min-width: 761px) and (max-width: 1180px) {
  .member-wallet-operation-grid { grid-template-columns: repeat(2, minmax(210px, 1fr)); }
  .member-statistics-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .member-detail-tabs-shell { grid-template-columns: 28px minmax(0, 1fr) 28px; }
  .member-detail-tabs-shell > .btn.icon { width: 28px; min-width: 28px; }
  .member-detail-workspace .member-detail-tabs button { min-width: max-content; padding: 0 10px; }
  .member-wallet-operation-identity { grid-template-columns: minmax(0, 1fr); }
  .member-wallet-operation-grid { grid-template-columns: minmax(0, 1fr); }
  .member-statistics-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-wallet-operation-balances .member-detail-fact { min-width: 0; }
}

/* Foundation 1.72: compact Casino wallet operations, single-line navigation, and unambiguous scrolling. */
:where(
  .admin-personal-button,
  .admin-primary-nav-button,
  .admin-nav-child,
  .admin-all-functions,
  .admin-personal-button > span,
  .admin-primary-nav-button > span,
  .admin-page-siblings button,
  .admin-page-guide-trigger,
  .member-action-menu-command,
  .member-detail-tabs button,
  .agent-view-segment button
) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-page-context-identity {
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: 1fr;
}
.admin-page-context-identity > b { grid-row: auto; }
.admin-page-title-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
}
.admin-page-title-line > span,
.admin-page-title-line > b { flex: 0 0 auto; color: #6f8ba4; font-size: 9px; }
.admin-page-title-line > h1 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #edf7ff;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-object-title-line {
  min-width: 0;
  max-width: 100%;
  display: flex !important;
  align-items: center;
  flex-wrap: nowrap !important;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
}
.member-object-origin,
.member-object-divider { flex: 0 0 auto; color: #6f8ba4; font-size: 9px; }
.member-object-title-line h2 {
  max-width: 170px;
  flex: 0 1 auto;
  margin: 0;
  font-size: 14px;
}
.member-object-name {
  min-width: 36px;
  max-width: 210px;
  flex: 0 1 auto;
  overflow: hidden;
  color: #9bb3c5;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-object-title-line .badge { flex: 0 0 auto; }

.member-detail-page { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.member-detail-page.member-detail-page-editing { grid-template-rows: auto auto minmax(0, 1fr); }
.member-detail-page-content,
.member-detail-workspace .member-detail-content {
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  overscroll-behavior: contain;
}
.member-detail-page-content::-webkit-scrollbar,
.member-detail-workspace .member-detail-content::-webkit-scrollbar { width: 10px; height: 10px; }
.member-detail-page-content::-webkit-scrollbar-track,
.member-detail-workspace .member-detail-content::-webkit-scrollbar-track { background: #071522; }
.member-detail-page-content::-webkit-scrollbar-thumb,
.member-detail-workspace .member-detail-content::-webkit-scrollbar-thumb { border: 2px solid #071522; border-radius: 6px; background: #456b86; }
.modal-backdrop { overflow: auto; overscroll-behavior: contain; }
.member-detail-dialog-layer { overscroll-behavior: contain; }
.member-detail-page-host > .member-detail-page {
  height: auto;
  min-height: calc(100dvh - 96px);
  grid-template-rows: auto auto auto auto;
  overflow: visible;
}
.member-detail-page-host > .member-detail-page.member-detail-page-editing { grid-template-rows: auto auto auto; }
.member-detail-page-host .member-detail-workspace {
  min-height: 0;
  grid-template-rows: 42px auto;
  overflow: visible;
}
.member-detail-page-host .member-detail-page-content,
.member-detail-page-host .member-detail-workspace .member-detail-content {
  overflow: visible;
  scrollbar-gutter: auto;
}
.member-detail-page-host .member-detail-actions {
  position: static;
}

.member-detail-context-strip {
  min-height: 52px;
  padding: 6px 8px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 460px);
  gap: 8px;
  border: 1px solid #1c3852;
  border-left: 3px solid var(--workspace-accent, #18d4ff);
}
.member-detail-context-path { min-width: 0; display: flex; align-items: center; gap: 8px; overflow: hidden; }
.member-detail-context-label { flex: 0 0 auto; color: #7894ae; font-size: 8px; white-space: nowrap; }
.member-detail-context-strip .member-detail-hierarchy-path {
  min-width: 0;
  margin: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.member-detail-context-strip .member-detail-queues { min-width: 300px; }

.member-wallet-operation-page { width: min(900px, 100%); margin: 0 auto; align-content: start; }
.member-wallet-operation-form {
  min-width: 0;
  display: grid;
  border: 1px solid #315776;
  border-top: 2px solid #18d4ff;
  background: #0a1929;
}
.member-wallet-operation-row {
  min-width: 0;
  min-height: 52px;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: stretch;
  border-bottom: 1px solid #1c3852;
}
.member-wallet-operation-label {
  padding: 0 12px;
  display: flex;
  align-items: center;
  border-right: 1px solid #1c3852;
  background: #091827;
  color: #8eabc2;
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}
.member-wallet-operation-row > :last-child:not(.member-wallet-operation-label) { min-width: 0; }
.member-wallet-operation-directions { padding: 7px 9px; display: flex; align-items: center; gap: 5px; }
.member-wallet-operation-direction {
  width: 108px;
  min-height: 34px;
  border: 1px solid #315776;
  border-radius: 3px;
  background: #0b2032;
  color: #8eabc2;
  font-weight: 750;
}
.member-wallet-operation-direction.active { border-color: #18d4ff; background: #123a50; color: #e5fbff; }
.member-wallet-operation-direction:disabled { cursor: not-allowed; opacity: .42; }
.member-wallet-operation-wallet-choice { padding: 7px 9px; display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: center; gap: 8px; }
.member-wallet-operation-wallet-choice select,
.member-wallet-operation-amount-area > input,
.member-wallet-operation-row.reason-row > input {
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 1px solid #315776;
  border-radius: 3px;
  background: #071522;
  color: #dbeafe;
}
.member-wallet-operation-wallet-choice select { padding: 0 30px 0 9px; }
.member-wallet-operation-wallet-state { min-width: 76px; display: flex; justify-content: flex-end; }
.member-wallet-operation-wallet-summary { padding: 7px 9px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 0; }
.member-wallet-operation-balance { min-width: 0; min-height: 36px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-right: 1px solid #1c3852; }
.member-wallet-operation-balance:last-child { border-right: 0; }
.member-wallet-operation-balance span { color: #7894ae; font-size: 8px; }
.member-wallet-operation-balance strong { overflow: hidden; color: #edf7ff; font: 700 11px/1 ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.member-wallet-operation-amount-area { padding: 7px 9px; display: grid; grid-template-columns: minmax(140px, 190px) minmax(0, 1fr); align-items: center; gap: 7px; }
.member-wallet-operation-amount-area > input,
.member-wallet-operation-row.reason-row > input { padding: 0 9px; }
.member-wallet-operation-row.reason-row > input { width: auto; margin: 7px 9px; }
.member-wallet-operation-quick-amounts { min-width: 0; display: grid; grid-template-columns: repeat(6, minmax(64px, 1fr)); gap: 4px; }
.member-wallet-operation-quick-amounts .btn { min-width: 0; padding: 0 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-wallet-operation-form-actions { min-height: 50px; padding: 7px 9px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; background: #091827; }
.member-wallet-operation-form-actions > span { margin-right: auto; color: #7894ae; font-size: 8px; }
.member-wallet-operation-form-actions .btn { min-width: 116px; }

.admin-operation-guide-tab {
  top: calc(50% - 62px);
  right: 0;
  width: 34px;
  height: auto;
  min-height: 124px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 6px 0 0 6px;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0;
  writing-mode: vertical-rl;
  transform: none;
}
.admin-operation-guide-tab .lucide-icon { width: 16px; height: 16px; flex: 0 0 auto; writing-mode: horizontal-tb; }

@media (min-width: 761px) {
  html:has(body[data-role="ADMIN"]) { height: 100%; overflow: hidden; }
  body[data-role="ADMIN"] {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
  }
  body[data-role="ADMIN"] .app-shell {
    height: 100dvh;
    min-height: 0;
    align-items: stretch;
    overflow: hidden;
  }
  body[data-role="ADMIN"] .main {
    height: 100dvh;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
  body[data-role="ADMIN"] .sidebar {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }
  body[data-role="ADMIN"] .sidebar-brand {
    position: relative;
    z-index: 4;
    flex: 0 0 58px;
    background: var(--admin-nav, #071522);
  }
  body[data-role="ADMIN"] .admin-navigation { min-height: 0; flex: 1 1 auto; overflow: hidden; }
  body[data-role="ADMIN"] .admin-primary-nav {
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
  }
  body[data-role="ADMIN"] .admin-primary-nav:hover { scrollbar-color: var(--admin-line-strong) transparent; }
  body[data-role="ADMIN"] .admin-primary-nav::-webkit-scrollbar { width: 7px; }
  body[data-role="ADMIN"] .admin-primary-nav::-webkit-scrollbar-track { background: transparent; }
  body[data-role="ADMIN"] .admin-primary-nav::-webkit-scrollbar-thumb { border-radius: 6px; background: transparent; }
  body[data-role="ADMIN"] .admin-primary-nav:hover::-webkit-scrollbar-thumb { background: var(--admin-line-strong); }
}

@media (max-width: 760px) {
  .admin-page-title-line > span,
  .admin-page-title-line > b { font-size: 8px; }
  .admin-page-title-line > h1 { font-size: 12px; }
  .admin-page-guide-trigger { width: 29px; padding: 0; font-size: 0; }
  .admin-operation-guide-tab { display: none; }
  .member-object-origin { display: none; }
  .member-object-divider { display: none; }
  .member-object-title-line h2 { max-width: 108px; font-size: 12px; }
  .member-object-name { max-width: 110px; }
  .member-detail-context-strip { grid-template-columns: minmax(0, 1fr); }
  .member-detail-context-path { align-items: flex-start; flex-direction: column; gap: 4px; }
  .member-detail-context-strip .member-detail-queues { width: 100%; min-width: 0; }
  .member-detail-page { grid-template-rows: auto auto minmax(520px, auto) auto; }
  .member-detail-page.member-detail-page-editing { grid-template-rows: auto auto minmax(520px, auto); }
  .member-wallet-operation-row { grid-template-columns: minmax(0, 1fr); }
  .member-wallet-operation-label { min-height: 28px; padding: 0 9px; border-right: 0; border-bottom: 1px solid #1c3852; }
  .member-wallet-operation-wallet-choice { grid-template-columns: minmax(0, 1fr) auto; }
  .member-wallet-operation-amount-area { grid-template-columns: minmax(0, 1fr); }
  .member-wallet-operation-quick-amounts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .member-wallet-operation-form-actions { align-items: stretch; flex-direction: column; }
  .member-wallet-operation-form-actions > span { margin-right: 0; }
  .member-wallet-operation-form-actions .btn { width: 100%; }
}

/* Foundation 1.76: complete admin theme tokens and centralized interface editor. */
body[data-role="ADMIN"] {
  --bg: var(--admin-bg, #06111f);
  --surface: var(--admin-surface, #0d1f31);
  --surface-alt: var(--admin-surface-alt, #0a1929);
  --ink: var(--admin-ink, #dbeafe);
  --muted: var(--admin-muted, #8aa4bd);
  --line: var(--admin-line, #1c3852);
  --line-strong: var(--admin-line-strong, #315776);
  --nav: var(--admin-nav, #081522);
  --nav-muted: var(--admin-nav-muted, #91a8be);
  --accent: var(--admin-accent, #246ddf);
  --accent-soft: var(--admin-accent-soft, #102f55);
  --success: var(--admin-success, #76e39b);
  --success-soft: var(--admin-success-soft, #123522);
  --warning: var(--admin-warning, #ffc46b);
  --warning-soft: var(--admin-warning-soft, #36270f);
  --danger: var(--admin-danger, #ff8d97);
  --danger-soft: var(--admin-danger-soft, #3a171d);
  --blue: var(--admin-accent, #246ddf);
  --blue-soft: var(--admin-accent-soft, #102f55);
  --admin-nav-hover: color-mix(in srgb, var(--admin-nav-ink) 7%, var(--admin-nav));
  --admin-nav-selected: color-mix(in srgb, var(--admin-accent) 18%, var(--admin-nav));
  --admin-nav-selected-border: color-mix(in srgb, var(--admin-accent) 54%, var(--admin-nav-ink));
  --admin-nav-icon: color-mix(in srgb, var(--admin-nav-muted) 86%, var(--admin-nav-ink));
  --admin-nav-icon-active: color-mix(in srgb, var(--admin-accent) 68%, var(--admin-nav-ink));
  background: var(--admin-bg, #06111f);
  color: var(--admin-ink, #dbeafe);
}
body[data-role="ADMIN"][data-admin-theme-mode="dark"] { color-scheme: dark; }
body[data-role="ADMIN"][data-admin-theme-mode="light"] { color-scheme: light; }
body[data-role="ADMIN"] .app-shell,
body[data-role="ADMIN"] .main,
body[data-role="ADMIN"] .content { background: var(--admin-bg); color: var(--admin-ink); }
body[data-role="ADMIN"] .sidebar,
body[data-role="ADMIN"] .sidebar-brand { border-color: var(--admin-line); background: var(--admin-nav); color: var(--admin-nav-ink); }
body[data-role="ADMIN"] .sidebar-brand strong,
body[data-role="ADMIN"] .admin-page-title-line > h1,
body[data-role="ADMIN"] .admin-primary-nav-button.active,
body[data-role="ADMIN"] .admin-nav-child.active { color: var(--admin-nav-ink); }
body[data-role="ADMIN"] .sidebar-meta,
body[data-role="ADMIN"] .admin-nav-domain-label { border-color: var(--admin-line); color: var(--admin-nav-muted); }
body[data-role="ADMIN"] .admin-interface-site-name {
  margin-bottom: 3px;
  overflow: hidden;
  color: var(--admin-nav-ink);
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-role="ADMIN"] .admin-primary-nav-button,
body[data-role="ADMIN"] .admin-nav-child,
body[data-role="ADMIN"] .admin-personal-button { color: var(--admin-nav-muted); }
body[data-role="ADMIN"] .admin-primary-nav-button:hover,
body[data-role="ADMIN"] .admin-nav-child:hover,
body[data-role="ADMIN"] .admin-personal-button:hover { background: var(--admin-nav-hover); color: var(--admin-nav-ink); }
body[data-role="ADMIN"] .admin-nav-group.expanded > .admin-primary-nav-button:not(.active) {
  background: var(--admin-nav-hover);
  color: var(--admin-nav-ink);
}
body[data-role="ADMIN"] .admin-primary-nav-button.active,
body[data-role="ADMIN"] .admin-nav-child.active,
body[data-role="ADMIN"] .admin-personal-button.active {
  border-color: transparent;
  background: var(--admin-nav-selected);
  color: var(--admin-nav-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--admin-nav-selected-border) 34%, transparent);
}
body[data-role="ADMIN"] .admin-primary-nav-glyph,
body[data-role="ADMIN"] .admin-nav-glyph {
  border: 0;
  background: transparent;
  color: var(--admin-nav-icon);
}
body[data-role="ADMIN"] .admin-primary-nav-button.active .admin-primary-nav-glyph,
body[data-role="ADMIN"] .admin-nav-button.active .nav-glyph {
  border: 0;
  background: transparent;
  color: var(--admin-nav-icon-active);
}
body[data-role="ADMIN"] .admin-personal-button > .lucide-icon { color: var(--admin-nav-icon); }
body[data-role="ADMIN"] .admin-personal-button.active > .lucide-icon { color: var(--admin-nav-icon-active); }
body[data-role="ADMIN"] .admin-primary-nav-button > small,
body[data-role="ADMIN"] .admin-personal-button > small {
  border: 1px solid color-mix(in srgb, var(--admin-nav-ink) 10%, transparent);
  background: color-mix(in srgb, var(--admin-nav-ink) 7%, var(--admin-nav));
  color: var(--admin-nav-muted);
}
body[data-role="ADMIN"] .admin-nav-children {
  margin: 2px 8px 5px 27px;
  padding: 2px 0 2px 8px;
  border-left: 1px solid color-mix(in srgb, var(--admin-nav-ink) 13%, var(--admin-nav));
}
body[data-role="ADMIN"] .admin-nav-child {
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 3px;
}
body[data-role="ADMIN"] .topbar,
body[data-role="ADMIN"] .admin-header-module-overflow,
body[data-role="ADMIN"] .admin-profile-menu { border-color: var(--admin-line); background: var(--admin-nav); color: var(--admin-nav-ink); }
body[data-role="ADMIN"] :where(
  .panel, .kpi, .event-row, .approval-row, .member-filter-bar, .filter-bar,
  .work-center-batch-bar, .member-profile-strip, .capacity-metric, .store-status-band,
  .configuration-security-strip, .external-feed-card, .admin-page-context,
  .admin-workspace-metric, .admin-work-queue, .admin-operation-card,
  .admin-header-metric, .admin-header-command, .admin-header-search,
  .member-detail-context-strip, .member-wallet-operation-form
) {
  border-color: var(--admin-line);
  background: var(--admin-surface);
  color: var(--admin-ink);
  box-shadow: none;
}
body[data-role="ADMIN"] :where(
  .panel-header, .member-pagination, .member-detail-tabs, .modal-head, .modal-actions,
  .admin-page-context-header, .admin-guide-drawer-head, .admin-guide-drawer-actions,
  .member-wallet-operation-form-actions
) { border-color: var(--admin-line); background: var(--admin-surface-alt); color: var(--admin-ink); }
body[data-role="ADMIN"] :where(.section-head h2, .panel-header h2, .admin-page-context h1, .modal h2, .drawer h2) { color: var(--admin-ink); }
body[data-role="ADMIN"] :where(.section-head p, .panel-header p, .form-note, .admin-page-title-line > span, .admin-page-title-line > b) { color: var(--admin-muted); }
body[data-role="ADMIN"] .page-heading h1,
body[data-role="ADMIN"] .section-head h2,
body[data-role="ADMIN"] .panel-header h2,
body[data-role="ADMIN"] .admin-page-context h1,
body[data-role="ADMIN"] .admin-page-title-line > h1,
body[data-role="ADMIN"] .modal h2,
body[data-role="ADMIN"] .drawer h2 { color: var(--admin-ink); }
body[data-role="ADMIN"] .page-heading p,
body[data-role="ADMIN"] .section-head p,
body[data-role="ADMIN"] .panel-header p,
body[data-role="ADMIN"] .form-note,
body[data-role="ADMIN"] .admin-page-title-line > span,
body[data-role="ADMIN"] .admin-page-title-line > b,
body[data-role="ADMIN"] .admin-page-group-switch { color: var(--admin-muted); }
body[data-role="ADMIN"] :where(input, select, textarea) {
  border-color: var(--admin-line-strong);
  background: var(--admin-input);
  color: var(--admin-ink);
}
body[data-role="ADMIN"] :where(input, textarea)::placeholder { color: var(--admin-muted); opacity: .82; }
body[data-role="ADMIN"] :where(input, select, textarea):focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 3px var(--admin-accent-soft);
}
body[data-role="ADMIN"] .field label,
body[data-role="ADMIN"] .field > span { color: var(--admin-muted); }
body[data-role="ADMIN"] .btn { border-color: var(--admin-line-strong); background: var(--admin-surface-alt); color: var(--admin-ink); }
body[data-role="ADMIN"] .btn:hover { border-color: var(--admin-accent); background: var(--admin-hover); color: var(--admin-ink); }
body[data-role="ADMIN"] .btn.primary {
  border-color: var(--admin-accent);
  background: var(--admin-accent);
  color: var(--admin-accent-ink);
}
body[data-role="ADMIN"] .btn.primary:hover { filter: brightness(1.08); background: var(--admin-accent); color: var(--admin-accent-ink); }
body[data-role="ADMIN"] .agent-view-segment {
  border-color: var(--admin-line);
  background: var(--admin-line);
}
body[data-role="ADMIN"] .agent-view-segment button {
  border-color: var(--admin-line);
  background: var(--admin-surface-alt);
  color: var(--admin-muted);
}
body[data-role="ADMIN"] .agent-view-segment button:hover {
  background: var(--admin-hover);
  color: var(--admin-ink);
}
body[data-role="ADMIN"] .agent-view-segment button.active {
  border-color: var(--workspace-accent);
  background: var(--workspace-accent-soft);
  color: var(--admin-ink);
  box-shadow: inset 0 -2px 0 var(--workspace-accent);
}
body[data-role="ADMIN"] .btn.success { border-color: var(--admin-success); background: var(--admin-success-soft); color: var(--admin-success); }
body[data-role="ADMIN"] .btn.warning { border-color: var(--admin-warning); background: var(--admin-warning-soft); color: var(--admin-warning); }
body[data-role="ADMIN"] .btn.danger { border-color: var(--admin-danger); background: var(--admin-danger-soft); color: var(--admin-danger); }
body[data-role="ADMIN"] table { color: var(--admin-ink); }
body[data-role="ADMIN"] th { border-color: var(--admin-line); background: var(--admin-table-head); color: var(--admin-muted); }
body[data-role="ADMIN"] td { border-color: var(--admin-line); background: var(--admin-surface); color: var(--admin-ink); }
body[data-role="ADMIN"] tbody tr:hover td { background: var(--admin-row-hover); }
body[data-role="ADMIN"] .member-list-table .member-sticky-col { background: var(--admin-surface); }
body[data-role="ADMIN"] .member-list-table th.member-sticky-col { background: var(--admin-table-head); }
body[data-role="ADMIN"] .member-list-table tbody tr:hover .member-sticky-col { background: var(--admin-row-hover); }
body[data-role="ADMIN"] :where(.modal, .drawer, .search-modal, .admin-guide-drawer) {
  border-color: var(--admin-line-strong);
  background: var(--admin-surface);
  color: var(--admin-ink);
}
body[data-role="ADMIN"] .modal-backdrop,
body[data-role="ADMIN"] .admin-guide-drawer-backdrop { background: color-mix(in srgb, var(--admin-overlay) 78%, transparent); }
body[data-role="ADMIN"] .audit-json { border-color: var(--admin-line); background: var(--admin-input); color: var(--admin-ink); }
body[data-role="ADMIN"] .badge.success { background: var(--admin-success-soft); color: var(--admin-success); }
body[data-role="ADMIN"] .badge.warning { background: var(--admin-warning-soft); color: var(--admin-warning); }
body[data-role="ADMIN"] .badge.danger { background: var(--admin-danger-soft); color: var(--admin-danger); }
body[data-role="ADMIN"] .badge.blue { background: var(--admin-info-soft); color: var(--admin-info); }
body[data-role="ADMIN"] :where(.member-detail-page-content, .member-detail-content, .admin-guide-drawer-body) { background: var(--admin-bg); color: var(--admin-ink); }
body[data-role="ADMIN"] :where(.member-detail-fact, .admin-guide-section, .admin-guide-related) { border-color: var(--admin-line); background: var(--admin-surface); }
body[data-role="ADMIN"] :where(.member-wallet-operation-label, .member-wallet-operation-form-actions) { border-color: var(--admin-line); background: var(--admin-table-head); color: var(--admin-muted); }
body[data-role="ADMIN"] .member-detail-page-content::-webkit-scrollbar-track,
body[data-role="ADMIN"] .member-detail-workspace .member-detail-content::-webkit-scrollbar-track { background: var(--admin-input); }
body[data-role="ADMIN"] .member-detail-page-content::-webkit-scrollbar-thumb,
body[data-role="ADMIN"] .member-detail-workspace .member-detail-content::-webkit-scrollbar-thumb { border-color: var(--admin-input); background: var(--admin-line-strong); }

/* Keep every admin workspace on the selected palette, including older dense-operation surfaces. */
body[data-role="ADMIN"] .app-shell {
  --workspace-accent: var(--admin-accent);
}
body[data-role="ADMIN"][data-admin-theme-mode="dark"] .app-shell {
  --workspace-accent-soft: color-mix(in srgb, var(--workspace-accent) 18%, var(--admin-surface));
}
body[data-role="ADMIN"][data-admin-theme-mode="light"] .app-shell {
  --workspace-accent-soft: color-mix(in srgb, var(--workspace-accent) 12%, var(--admin-surface));
}

body[data-role="ADMIN"] :where(
  .admin-top-search, .admin-header-command, .admin-language-summary, .admin-profile-summary,
  .admin-header-language, .admin-header-metric, .admin-page-group-switch select,
  .admin-all-functions, .finance-request-more > summary, .member-danger-menu > summary
) {
  border-color: var(--admin-line-strong) !important;
  background: var(--admin-surface-alt) !important;
  color: var(--admin-ink) !important;
}
body[data-role="ADMIN"] .topbar :where(
  .admin-top-search, .admin-header-command, .admin-language-summary, .admin-profile-summary,
  .admin-header-language, .admin-header-metric
) {
  border-color: color-mix(in srgb, var(--admin-nav-ink) 20%, var(--admin-nav)) !important;
  background: color-mix(in srgb, var(--admin-nav-ink) 7%, var(--admin-nav)) !important;
  color: var(--admin-nav-ink) !important;
}
body[data-role="ADMIN"] .topbar :where(
  .admin-header-metric > span, .admin-top-search > span, .admin-header-command,
  .admin-profile-summary > i
) { color: var(--admin-nav-muted) !important; }
body[data-role="ADMIN"] :where(
  .admin-top-search:hover, .admin-top-search:focus-visible, .admin-header-command:hover,
  .admin-header-command:focus-visible, .admin-language-summary:hover,
  .admin-language-summary:focus-visible, .admin-language-switcher[open] .admin-language-summary,
  .admin-profile-menu-action:hover, .admin-page-siblings button:hover,
  .member-action-menu-command:hover, .report-navigation-item:hover
) { border-color: var(--admin-accent) !important; background: var(--admin-hover) !important; color: var(--admin-ink) !important; }
body[data-role="ADMIN"] :where(
  .admin-language-list, .admin-profile-menu-list, .member-action-menu, .member-hover-preview,
  .global-search-results, .admin-command-modal
) { border-color: var(--admin-line-strong); background: var(--admin-surface); color: var(--admin-ink); }
body[data-role="ADMIN"] :where(
  .admin-language-option, .admin-profile-menu-action, .admin-page-siblings button,
  .member-action-menu-command, .global-search-result
) { border-color: var(--admin-line); color: var(--admin-muted); }
body[data-role="ADMIN"] .admin-language-option.active { border-color: var(--admin-accent); background: var(--admin-accent-soft); color: var(--admin-ink); }
body[data-role="ADMIN"] :where(.admin-language-option > b, .admin-all-functions > b, .admin-all-functions > .lucide-icon) { color: var(--admin-accent); }
body[data-role="ADMIN"] .admin-profile-avatar { border-color: var(--admin-line-strong); background: var(--admin-raised); color: var(--admin-accent); }
body[data-role="ADMIN"] :where(.admin-primary-nav-glyph, .admin-nav-glyph) {
  border: 0;
  background: transparent;
  color: var(--admin-nav-icon);
}
body[data-role="ADMIN"] .topbar :where(
  .admin-top-search, .admin-header-command, .admin-language-summary,
  .admin-profile-summary, .admin-header-language, .admin-header-metric
):hover,
body[data-role="ADMIN"] .topbar :where(
  .admin-top-search, .admin-header-command, .admin-language-summary,
  .admin-profile-summary, .admin-header-language, .admin-header-metric
):focus-visible {
  border-color: var(--admin-nav-selected-border) !important;
  background: var(--admin-nav-selected) !important;
  color: var(--admin-nav-ink) !important;
}
body[data-role="ADMIN"] .admin-header-alerts > .lucide-icon { color: var(--admin-danger); }
body[data-role="ADMIN"] .admin-header-tasks > .lucide-icon { color: var(--admin-warning); }
body[data-role="ADMIN"] .admin-top-search > .lucide-icon { color: var(--admin-nav-muted); }
body[data-role="ADMIN"] .admin-sidebar-title .brand-text .lucide-icon,
body[data-role="ADMIN"] .admin-all-functions > .lucide-icon { color: var(--admin-nav-icon-active); }
body[data-role="ADMIN"] :where(.admin-profile-identity strong, .admin-page-title-line > h1) { color: var(--admin-nav-ink); }
body[data-role="ADMIN"] :where(.admin-profile-identity small, .admin-profile-menu-status) { color: var(--admin-success); }
body[data-role="ADMIN"] :where(.admin-top-search > small, .admin-language-summary > i, .admin-profile-summary > i) { border-color: var(--admin-line); color: var(--admin-nav-muted); }
body[data-role="ADMIN"] .sidebar-brand { background: var(--admin-nav) !important; }
body[data-role="ADMIN"] .sidebar .admin-all-functions {
  border-color: color-mix(in srgb, var(--admin-nav-ink) 16%, var(--admin-nav)) !important;
  background: var(--admin-nav-hover) !important;
  color: var(--admin-nav-ink) !important;
}
body[data-role="ADMIN"] .sidebar .admin-all-functions:hover,
body[data-role="ADMIN"] .sidebar .admin-all-functions:focus-visible {
  border-color: var(--admin-nav-selected-border) !important;
  background: var(--admin-nav-selected) !important;
  color: var(--admin-nav-ink) !important;
}
body[data-role="ADMIN"] .admin-page-siblings { border-color: var(--admin-line); background: var(--admin-input); }
body[data-role="ADMIN"] .admin-page-siblings button.active { background: var(--workspace-accent-soft); color: var(--workspace-accent); }
body[data-role="ADMIN"] .admin-page-context-icon {
  border-color: var(--admin-line-strong);
  border-radius: 4px;
  background: var(--workspace-accent-soft);
  color: var(--workspace-accent);
}
body[data-role="ADMIN"] :where(
  .admin-personal-button, .admin-primary-nav-button, .admin-nav-child,
  .admin-all-functions, .admin-page-siblings button
):focus-visible {
  outline: 2px solid var(--admin-nav-selected-border);
  outline-offset: -2px;
}
body[data-role="ADMIN"] :where(.table-wrap, tbody tr:focus-within td) { background: var(--admin-surface); }

body[data-role="ADMIN"] :where(
  .finance-flow-workspace, .finance-flow-card, .member-comprehensive-section,
  .member-play-rule-domain, .member-object-rail-section, .member-product-baseline,
  .agent-tree-row, .compact-summary-strip, .role-management-layout, .role-management-item,
  .ops-command-result, .report-navigation, .report-tabbar, .product-source-flow
) { border-color: var(--admin-line); background: var(--admin-surface); color: var(--admin-ink); }
body[data-role="ADMIN"] :where(
  .finance-flow-title, .finance-request-list-head, .finance-request-detail-head,
  .member-comprehensive-section > summary, .member-play-rule-intro,
  .member-play-rule-domain-summary, .member-object-rail-section > h3,
  .member-quick-order-head, .member-detail-tabs, .role-management-aside,
  .role-management-profile, .ops-command-actions, .report-navigation-label,
  .report-tabbar-label, .product-source-band, .global-search-command-title
) { border-color: var(--admin-line); background: var(--admin-surface-alt); color: var(--admin-ink); }
body[data-role="ADMIN"] :where(
  .member-comprehensive-directory, .member-object-rail, .member-danger-menu-list,
  .admin-command-modal .global-search-form, .admin-command-modal .global-search-results,
  .global-search-command-footer
) { border-color: var(--admin-line); background: var(--admin-input); color: var(--admin-muted); }
body[data-role="ADMIN"] :where(
  .finance-flow-card p, .member-object-action, .member-object-queue-row,
  .member-object-recent-row, .member-object-empty, .member-detail-context-label,
  .member-wallet-operation-balance span, .member-wallet-operation-form-actions > span,
  .role-management-item small, .report-navigation-label, .global-search-result-copy small
) { color: var(--admin-muted); }
body[data-role="ADMIN"] :where(
  .member-comprehensive-section > summary b, .member-play-rule-domain-title b,
  .member-play-rule-subhead, .member-object-rail-section > h3,
  .member-object-queue-row .primary-cell strong, .member-object-recent-row .primary-cell strong,
  .member-wallet-operation-balance strong, .compact-summary-item b,
  .global-search-command-title b, .global-search-result-copy b
) { color: var(--admin-ink); }
body[data-role="ADMIN"] :where(
  .member-object-action:hover, .member-object-queue-row:hover, .member-quick-order-row:hover,
  .global-search-result:hover, .agent-tree-row:hover, .role-management-item:hover,
  .role-management-item.active
) { background: var(--admin-row-hover); color: var(--admin-ink); }
body[data-role="ADMIN"] :where(.member-detail-context-strip, .member-wallet-operation-form, .member-wallet-operation-row, .member-wallet-operation-balance) { border-color: var(--admin-line); }
body[data-role="ADMIN"] :where(
  .member-wallet-operation-wallet-choice select, .member-wallet-operation-amount-area > input,
  .member-wallet-operation-row.reason-row > input
) { border-color: var(--admin-line-strong); background: var(--admin-input); color: var(--admin-ink); }
body[data-role="ADMIN"] .member-wallet-operation-direction { border-color: var(--admin-line-strong); background: var(--admin-surface-alt); color: var(--admin-muted); }
body[data-role="ADMIN"] .member-wallet-operation-direction.active { border-color: var(--workspace-accent); background: var(--workspace-accent-soft); color: var(--admin-ink); }
body[data-role="ADMIN"] .modal { border-color: var(--admin-line-strong); border-top-color: var(--admin-accent); background: var(--admin-surface); box-shadow: 0 28px 90px color-mix(in srgb, var(--admin-overlay) 72%, transparent); }

body[data-role="ADMIN"] :where(
  .racing-ops-layout, .racing-ops-center, .racing-monitor-toolbar,
  .racing-reference-command, .racing-event-command, .racing-catalog-command,
  .racing-reference-workspace, .racing-reference-main, .racing-reference-rail,
  .racing-reference-products, .racing-odds-cell, .racing-ops-filter-line,
  .order-product-tabs, .order-monitor-status-strip, .order-monitor-status-fact,
  .live-order-row, .racing-event-detail, .racing-wager-tabs, .racing-wager-summary,
  .report-status-band, .report-trend-chart, .report-tabbar,
  .sports-ops-layout, .sports-ops-center, .sports-monitor-toolbar,
  .provider-monitor-stack, .provider-ops-layout, .risk-ops-layout
) {
  border-color: var(--admin-line) !important;
  background: var(--admin-surface) !important;
  color: var(--admin-ink) !important;
}
body[data-role="ADMIN"] :where(
  .racing-monitor-toolbar, .racing-reference-command, .racing-catalog-command,
  .order-monitor-status-strip, .report-status-band, .sports-monitor-toolbar
) { background: var(--admin-surface-alt) !important; }
body[data-role="ADMIN"] :where(
  .order-product-tabs button, .racing-wager-tabs button, .racing-ops-filter-line button,
  .racing-reference-products button, .report-tabbar-item
) {
  border-color: var(--admin-line) !important;
  background: var(--admin-surface-alt) !important;
  color: var(--admin-muted) !important;
}
body[data-role="ADMIN"] :where(
  .order-product-tabs button.active, .racing-wager-tabs button.active,
  .racing-ops-filter-line button.active, .racing-reference-products button.active,
  .report-tabbar-item.active
) {
  border-color: var(--workspace-accent) !important;
  background: var(--workspace-accent-soft) !important;
  color: var(--admin-ink) !important;
}
body[data-role="ADMIN"] :where(
  .order-monitor-status-fact small, .racing-monitor-count, .racing-reference-command p,
  .live-order-row span, .report-tabbar-label, .report-technical-details > summary
) { color: var(--admin-muted) !important; }
body[data-role="ADMIN"] :where(
  .order-monitor-status-fact strong, .live-order-row strong,
  .racing-reference-command h2, .racing-event-command h2
) { color: var(--admin-ink) !important; }

.admin-dialog-help-button { flex: 0 0 auto; }
.admin-dialog-help-panel {
  min-width: 0;
  padding: 10px 14px;
  display: grid;
  gap: 6px;
  border-bottom: 1px solid var(--admin-line);
  background: var(--admin-info-soft);
  color: var(--admin-ink);
  font-size: 10px;
  line-height: 1.55;
}
.admin-dialog-help-panel[hidden] { display: none; }
.admin-dialog-help-panel > strong { color: var(--admin-info); font-size: 11px; }
.admin-dialog-help-panel p { margin: 0; }
.admin-dialog-help-panel ol { margin: 0; padding-left: 18px; color: var(--admin-muted); }
.admin-dialog-help-panel .admin-dialog-help-success { color: var(--admin-success); }
.admin-dialog-help-panel .admin-dialog-help-caution { color: var(--admin-warning); }

.admin-interface-workspace { min-width: 0; }
.admin-interface-main-tabs { width: max-content; max-width: 100%; margin-bottom: 14px; overflow-x: auto; }
.admin-interface-copy-workspace { min-width: 0; display: grid; gap: 12px; }
.admin-interface-language-tabs,
.admin-interface-section-tabs { width: max-content; max-width: 100%; overflow-x: auto; }
.admin-interface-copy-actions {
  min-height: 48px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
}
.admin-interface-copy-actions > span { margin-right: auto; color: var(--muted); font-size: 10px; }
.admin-interface-editor-section { min-width: 0; border-top: 2px solid var(--accent); }
.admin-interface-editor-section > h2 { margin: 0; padding: 14px 14px 0; font-size: 15px; }
.admin-interface-editor-section > p { margin: 5px 0 0; padding: 0 14px 13px; color: var(--muted); font-size: 10px; }
.admin-interface-editor-section > .table-wrap { margin: 0; border-top: 1px solid var(--line); }
.admin-interface-editor-section table { min-width: 780px; }
.admin-interface-form-grid { padding: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border: 1px solid var(--line); }
.admin-interface-form-grid .field { margin: 0; }
.admin-interface-form-grid .field-wide { grid-column: 1 / -1; }
.admin-interface-scope-note {
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 10px;
  box-shadow: inset 2px 0 0 var(--blue);
}
.admin-interface-scope-note .lucide-icon { width: 15px; height: 15px; color: var(--blue); }
.admin-interface-inline-input { width: 100%; min-width: 150px; height: 34px; padding: 0 9px; }
.admin-interface-note-input { min-width: 320px; }
.admin-interface-page-toolbar { min-height: 46px; padding: 7px 10px; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.admin-interface-page-toolbar input { width: min(420px, 100%); height: 34px; padding: 0 10px; }
.admin-interface-page-toolbar span { margin-left: auto; color: var(--muted); font-size: 10px; white-space: nowrap; }

.admin-theme-workspace { min-width: 0; display: grid; gap: 12px; }
.admin-theme-preview-bar {
  min-height: 48px;
  padding: 7px 9px 7px 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
}
.admin-theme-preview-bar > span { margin-right: auto; font-weight: 750; }
.admin-theme-grid { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.admin-theme-card {
  min-width: 0;
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}
.admin-theme-card.active { border-color: var(--success); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--success) 28%, transparent); }
.admin-theme-card.previewing { border-color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent); }
.admin-theme-card-head { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.admin-theme-card-head > div { min-width: 0; display: grid; gap: 3px; }
.admin-theme-card-head b { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.admin-theme-card-head small { color: var(--muted); font-size: 9px; }
.admin-theme-card > p { min-height: 34px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.admin-theme-swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); height: 19px; overflow: hidden; border: 1px solid var(--line); border-radius: 3px; }
.admin-theme-swatches span { min-width: 0; }
.admin-theme-mini-preview {
  min-width: 0;
  aspect-ratio: 16 / 8;
  display: grid;
  grid-template-columns: 29% minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--preview-line);
  border-radius: 4px;
  background: var(--preview-bg);
  color: var(--preview-ink);
}
.admin-theme-mini-nav { min-width: 0; padding: 9px 6px; display: grid; align-content: start; gap: 5px; background: var(--preview-nav); color: var(--preview-nav-muted); }
.admin-theme-mini-nav b { margin-bottom: 2px; overflow: hidden; color: var(--preview-nav-ink); font-size: 8px; text-overflow: ellipsis; }
.admin-theme-mini-nav span { min-height: 17px; padding: 3px 4px; overflow: hidden; display: flex; align-items: center; gap: 4px; border-radius: 2px; font-size: 6px; text-overflow: ellipsis; white-space: nowrap; }
.admin-theme-mini-nav span .lucide-icon { width: 7px; height: 7px; color: color-mix(in srgb, var(--preview-nav-muted) 86%, var(--preview-nav-ink)); }
.admin-theme-mini-nav span.active {
  background: color-mix(in srgb, var(--preview-accent) 18%, var(--preview-nav));
  color: var(--preview-nav-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--preview-accent) 32%, transparent);
}
.admin-theme-mini-nav span.active .lucide-icon { color: color-mix(in srgb, var(--preview-accent) 66%, var(--preview-nav-ink)); }
.admin-theme-mini-main { min-width: 0; display: grid; grid-template-rows: 24px minmax(0, 1fr); background: var(--preview-bg); }
.admin-theme-mini-top { min-width: 0; padding: 0 7px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--preview-line); background: var(--preview-nav); color: var(--preview-nav-muted); font-size: 6px; }
.admin-theme-mini-top b { color: var(--preview-nav-ink); }
.admin-theme-mini-surface { margin: 7px; padding: 7px; overflow: hidden; border: 1px solid var(--preview-line); background: var(--preview-surface); }
.admin-theme-mini-surface h4 { margin: 0; color: var(--preview-ink); font-size: 8px; }
.admin-theme-mini-surface p { margin: 3px 0 6px; overflow: hidden; color: var(--preview-muted); font-size: 6px; text-overflow: ellipsis; white-space: nowrap; }
.admin-theme-mini-surface input { width: 100%; height: 20px; margin-bottom: 5px; padding: 0 5px; border: 1px solid var(--preview-line-strong); background: var(--preview-input); color: var(--preview-ink); font-size: 6px; box-shadow: none; }
body[data-role="ADMIN"] .admin-theme-mini-preview .admin-theme-mini-surface .btn { min-height: 20px; padding: 0 6px; border-color: var(--preview-line-strong); background: var(--preview-surface-alt); color: var(--preview-ink); font-size: 6px; filter: none; }
body[data-role="ADMIN"] .admin-theme-mini-preview .admin-theme-mini-surface .btn.primary { border-color: var(--preview-accent); background: var(--preview-accent); color: var(--preview-accent-ink); }
.admin-theme-contrast { color: var(--muted); font-size: 9px; }
.admin-theme-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.admin-theme-card-actions .btn { width: 100%; min-width: 0; }

.admin-interface-phrase-controls {
  min-height: 50px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
}
.admin-interface-phrase-controls input { width: 100%; min-width: 0; height: 34px; padding: 0 10px; }
.admin-interface-phrase-list { min-width: 0; display: grid; border: 1px solid var(--line); border-top: 0; }
.admin-interface-phrase-row {
  min-width: 0;
  min-height: 54px;
  padding: 7px 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.admin-interface-phrase-row:last-child { border-bottom: 0; }
.admin-interface-phrase-row > div { min-width: 0; display: grid; gap: 4px; }
.admin-interface-phrase-row span,
.admin-interface-phrase-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-interface-phrase-row span { color: var(--muted); font-size: 9px; }
.admin-interface-phrase-row strong { color: var(--ink); font-size: 11px; }

.admin-inline-edit-toolbar {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 880;
  min-height: 42px;
  max-width: calc(100vw - 36px);
  padding: 6px 7px 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--admin-warning);
  border-radius: 5px;
  background: var(--admin-surface);
  color: var(--admin-ink);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--admin-overlay) 58%, transparent);
}
.admin-inline-edit-toolbar .lucide-icon { width: 16px; height: 16px; color: var(--admin-warning); }
.admin-inline-edit-toolbar > span { color: var(--admin-muted); font-size: 9px; }
.admin-inline-edit-toolbar > small { color: var(--admin-muted); font-size: 9px; }
.admin-inline-edit-toolbar .btn { min-height: 30px; }

body[data-role="ADMIN"][data-admin-inline-text-edit="true"] .admin-inline-edit-target {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--admin-warning) !important;
  outline-offset: 2px;
  cursor: text !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--admin-warning) 22%, transparent) !important;
}

.admin-inline-copy-modal { width: min(620px, calc(100vw - 28px)); }
.admin-inline-copy-body { display: grid; gap: 12px; }
.admin-inline-copy-source {
  min-width: 0;
  padding: 9px 10px;
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
}
.admin-inline-copy-source span { color: var(--muted); font-size: 9px; }
.admin-inline-copy-source strong { overflow-wrap: anywhere; color: var(--ink); font-size: 11px; line-height: 1.5; }
.admin-inline-copy-body textarea { min-height: 116px; resize: vertical; }

.admin-page-copy-editor-layer { padding: 16px; place-items: center; overflow: hidden; }
body.admin-page-copy-editor-open { overflow: hidden !important; }
.admin-page-copy-editor {
  width: min(1120px, calc(100vw - 32px));
  height: min(780px, calc(100dvh - 32px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}
.admin-page-copy-editor-head > div { min-width: 0; }
.admin-page-copy-editor-head h2,
.admin-page-copy-editor-head p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-page-copy-editor-head p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.admin-page-copy-editor-body { min-height: 0; padding: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.admin-page-copy-editor-toolbar {
  min-width: 0;
  min-height: 54px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-alt);
}
.admin-page-copy-editor-search {
  min-width: 0;
  height: 36px;
  padding: 0 9px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  background: var(--input, var(--surface));
}
.admin-page-copy-editor-search .lucide-icon { width: 16px; height: 16px; color: var(--muted); }
.admin-page-copy-editor-search input { min-width: 0; height: 32px; padding: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.admin-page-copy-editor-search input:focus { outline: none; }
.admin-page-copy-editor-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.admin-page-copy-editor-count { color: var(--ink); font-size: 9px; font-weight: 750; white-space: nowrap; }
.admin-page-copy-editor-toolbar > small { color: var(--muted); font-size: 8px; white-space: nowrap; }
.admin-page-copy-editor-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.admin-page-copy-editor-row {
  min-width: 0;
  min-height: 68px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(220px, .75fr) minmax(320px, 1.25fr) 34px 64px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.admin-page-copy-editor-row.changed { box-shadow: inset 3px 0 0 var(--warning); }
.admin-page-copy-editor-row[hidden] { display: none; }
.admin-page-copy-editor-source { min-width: 0; display: grid; gap: 3px; }
.admin-page-copy-editor-source span,
.admin-page-copy-editor-source strong,
.admin-page-copy-editor-source small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-page-copy-editor-source span { color: var(--muted); font-size: 8px; }
.admin-page-copy-editor-source strong { color: var(--ink); font-size: 10px; }
.admin-page-copy-editor-source small { color: var(--muted); font-size: 8px; }
.admin-page-copy-editor-row > input,
.admin-page-copy-editor-row > textarea { width: 100%; min-width: 0; height: 36px; padding: 0 9px; }
.admin-page-copy-editor-row > textarea { min-height: 54px; padding: 7px 9px; resize: vertical; }
.admin-page-copy-editor-status { color: var(--muted); font-size: 8px; text-align: center; white-space: nowrap; }
.admin-page-copy-editor-row.changed .admin-page-copy-editor-status { color: var(--warning); font-weight: 750; }
.admin-page-copy-editor-actions > span { margin-right: auto; color: var(--muted); font-size: 8px; }

@media (max-width: 1180px) {
  .admin-theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 761px) and (max-width: 1120px) {
  body[data-role="ADMIN"] .app-shell { grid-template-columns: 72px minmax(0, 1fr); }
  body[data-role="ADMIN"] .admin-personal-nav { padding: 5px; }
  body[data-role="ADMIN"] .admin-personal-button,
  body[data-role="ADMIN"] .admin-primary-nav-button {
    min-height: 40px;
    padding: 0;
    grid-template-columns: 1fr;
    justify-items: center;
  }
  body[data-role="ADMIN"] .admin-personal-button > span,
  body[data-role="ADMIN"] .admin-personal-button > small,
  body[data-role="ADMIN"] .admin-primary-nav-button > span,
  body[data-role="ADMIN"] .admin-primary-nav-button > small,
  body[data-role="ADMIN"] .admin-primary-nav-button .admin-nav-chevron,
  body[data-role="ADMIN"] .admin-nav-domain-label,
  body[data-role="ADMIN"] .admin-nav-children,
  body[data-role="ADMIN"] .admin-all-functions { display: none !important; }
  body[data-role="ADMIN"] .admin-profile-identity { display: none !important; }
  body[data-role="ADMIN"] .admin-profile-summary {
    min-width: 47px;
    padding: 0 3px;
    grid-template-columns: 30px 9px;
    gap: 3px;
  }
  body[data-role="ADMIN"] .admin-header-module-slot.module-globalSearch { max-width: 240px; }
}

@media (max-width: 760px) {
  .admin-interface-workspace > .section-head { align-items: stretch; flex-direction: column; }
  .admin-interface-main-tabs,
  .admin-interface-language-tabs,
  .admin-interface-section-tabs { width: 100%; }
  .admin-interface-copy-actions { align-items: stretch; flex-direction: column; }
  .admin-interface-copy-actions > span { width: 100%; margin-right: 0; }
  .admin-interface-copy-actions .btn { width: 100%; }
  .admin-interface-form-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-interface-form-grid .field-wide { grid-column: auto; }
  .admin-interface-page-toolbar { align-items: stretch; flex-direction: column; }
  .admin-interface-page-toolbar input { width: 100%; }
  .admin-interface-page-toolbar span { margin-left: 0; }
  .admin-theme-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-theme-preview-bar { align-items: stretch; flex-direction: column; }
  .admin-theme-preview-bar > span { margin-right: 0; }
  .admin-theme-preview-bar .btn { width: 100%; }
  .admin-interface-phrase-controls { grid-template-columns: minmax(0, 1fr); }
  .admin-interface-phrase-row { grid-template-columns: minmax(0, 1fr) repeat(2, auto); }
  .admin-inline-edit-toolbar { right: 8px; bottom: 8px; left: 8px; max-width: none; }
  .admin-inline-edit-toolbar > small { display: none; }
  .admin-inline-edit-toolbar > span { margin-right: auto; }
  .admin-page-copy-editor-layer { padding: 0; place-items: stretch; }
  .admin-page-copy-editor { width: 100%; height: 100dvh; max-height: none; border-radius: 0; }
  .admin-page-copy-editor-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .admin-page-copy-editor-toolbar > small { display: none; }
  .admin-page-copy-editor-row { grid-template-columns: minmax(0, 1fr) 34px; padding: 9px; }
  .admin-page-copy-editor-source { grid-column: 1 / -1; }
  .admin-page-copy-editor-row > input,
  .admin-page-copy-editor-row > textarea { grid-column: 1; }
  .admin-page-copy-editor-status { grid-column: 1 / -1; text-align: left; }
  .admin-page-copy-editor-actions { align-items: stretch; flex-direction: column; }
  .admin-page-copy-editor-actions > span { margin-right: 0; }
  .admin-page-copy-editor-actions .btn { width: 100%; }
}

/* Member live workflows: real schedules, rounds and finance requests. */
html:has(body[data-role="MEMBER"]),
body[data-role="MEMBER"],
.member-app-shell {
  max-width: 100%;
  overflow-x: clip;
}
.racing-live-toolbar,
.racing-session-bar,
.racing-live-workbench,
.mini-workspace,
.member-funds-workspace { max-width: 100%; }
.racing-live-toolbar {
  min-width: 0;
  margin-bottom: 7px;
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr) auto;
  align-items: stretch;
  border: 1px solid #334247;
  background: #101719;
  color: #eef3f2;
}
.racing-live-heading {
  min-width: 150px;
  padding: 8px 11px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 3px 8px;
  border-right: 1px solid #334247;
}
.racing-live-heading > div { font-size: 12px; font-weight: 800; }
.racing-live-heading > span { grid-column: 1 / -1; color: #829195; font-size: 8px; white-space: nowrap; }
.racing-live-heading .badge { grid-column: 2; grid-row: 1; }
.racing-live-products,
.racing-live-status-tabs { min-width: 0; display: flex; align-items: stretch; overflow-x: auto; }
.racing-live-products button,
.racing-live-status-tabs button:not(.btn) {
  min-width: 90px;
  min-height: 48px;
  padding: 6px 9px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 0;
  border-right: 1px solid #334247;
  background: #161e21;
  color: #8d9a9e;
  white-space: nowrap;
}
.racing-live-products button span,
.racing-live-status-tabs button span { font-size: 9px; }
.racing-live-products button b,
.racing-live-status-tabs button b { color: #cbd5d6; font-size: 9px; font-variant-numeric: tabular-nums; }
.racing-live-products button.active { background: #07645f; color: #ffffff; box-shadow: inset 0 -2px 0 #32d5c9; }
.racing-live-products button.active b { color: #c9fffa; }
.racing-live-status-tabs { border-left: 1px solid #334247; }
.racing-live-status-tabs button:not(.btn).active { background: #2d2919; color: #f1d75d; box-shadow: inset 0 -2px 0 #d6b959; }
.racing-live-status-tabs > .btn { align-self: center; min-width: 32px; margin: 0 4px; flex: 0 0 auto; white-space: nowrap; }
.racing-live-status-tabs > .btn:not(.icon) { min-width: 96px; }
.racing-live-workbench .racing-odds-pane { min-height: 620px; }
.racing-live-odds { min-width: 0; }
.racing-live-odds-grid {
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 5px;
}
.racing-live-odd {
  min-width: 0;
  min-height: 55px;
  padding: 7px 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 3px 8px;
  border: 1px solid #3d494c;
  background: #20282b;
}
.racing-live-odd span,
.racing-live-odd small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.racing-live-odd span { color: #dce4e5; font-size: 9px; }
.racing-live-odd strong { color: #58d8cd; font-size: 13px; font-variant-numeric: tabular-nums; }
.racing-live-odd small { grid-column: 1 / -1; color: #78878b; font-size: 7px; }
.racing-live-matrix-scroll { min-height: 520px; }
.racing-matrix-cell.readonly { cursor: default; }
.racing-matrix-cell.readonly:hover { box-shadow: none; }
.racing-live-empty {
  min-height: 280px;
  display: grid;
  place-items: center;
  color: #849296;
  font-size: 10px;
}
.racing-live-empty-state { gap: 7px; justify-items: center; }
.racing-live-empty-state strong { color: #dce4e5; font-size: 13px; }
.racing-live-empty-state span { color: #849296; font-size: 9px; }
.racing-live-media {
  aspect-ratio: 16 / 9;
  min-height: 210px;
  padding: 16px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  border-bottom: 1px solid #343d3f;
  background: #090e10;
  text-align: center;
}
.racing-live-media strong { color: #dce4e5; font-size: 12px; }
.racing-live-media span { max-width: 38ch; color: #748387; font-size: 8px; line-height: 1.55; }
.racing-live-result {
  min-height: 46px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  border-top: 1px solid #303a3d;
  border-bottom: 1px solid #303a3d;
}
.racing-live-result span { margin-right: auto; color: #829093; font-size: 8px; white-space: nowrap; }
.racing-live-result b { min-width: 48px; padding: 6px 7px; border: 1px solid #4a4630; background: #282515; color: #efd866; font-size: 9px; text-align: center; white-space: nowrap; }
.racing-feed-bet-state { position: sticky; top: 70px; }
.racing-feed-bet-message { min-height: 190px; padding: 18px; display: grid; align-content: center; gap: 8px; }
.racing-feed-bet-message strong { color: #e7edef; font-size: 13px; }
.racing-feed-bet-message p { margin: 0; color: #8c9a9e; font-size: 9px; line-height: 1.65; }
.racing-feed-bet-message small { color: #d5bd55; font-size: 8px; }

.mini-live-stage { min-height: 245px; }
.mini-live-result-visual { min-height: 132px; display: grid; place-content: center; }
.mini-live-number-grid {
  max-width: 560px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(8, 34px);
  gap: 5px;
}
.mini-live-number-grid span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #4b585b;
  border-radius: 50%;
  background: #253034;
  color: #e7edef;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.mini-live-result-facts {
  width: min(620px, 100%);
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 5px;
}
.mini-live-result-facts > div {
  min-height: 58px;
  padding: 8px;
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid #3c484b;
  background: #151b1d;
}
.mini-live-result-facts span { color: #7d8a8e; font-size: 8px; }
.mini-live-result-facts b { color: #5ad6cc; font-size: 12px; }
.mini-live-result-empty { grid-column: 1 / -1; color: #7d8a8e; font-size: 9px; text-align: center; }
.mini-round-link-state {
  grid-column: 1 / -1;
  min-height: 150px;
  padding: 18px;
  display: grid;
  place-content: center;
  gap: 7px;
  background: #171d1f;
  text-align: center;
}
.mini-round-link-state strong { color: #e4ebec; font-size: 12px; }
.mini-round-link-state span { max-width: 62ch; color: #839195; font-size: 9px; line-height: 1.6; }
.mini-game-favorite:disabled { visibility: hidden; }

.member-funds-workspace {
  min-width: 0;
  margin-top: 14px;
  border: 1px solid #303b40;
  background: #10171a;
  color: #e8eef0;
}
.member-funds-head {
  min-height: 54px;
  padding-left: 14px;
  display: grid;
  grid-template-columns: minmax(140px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 14px;
  border-bottom: 1px solid #303b40;
  background: #0d1417;
}
.member-funds-head > div:first-child { font-size: 13px; font-weight: 800; }
.member-funds-head > span { color: #839095; font-size: 9px; }
.member-funds-tabs { height: 100%; display: flex; align-items: stretch; }
.member-funds-tabs button {
  min-width: 92px;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid #303b40;
  background: #151d20;
  color: #8c999d;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}
.member-funds-tabs button.active { background: #07645f; color: #ffffff; box-shadow: inset 0 -3px 0 #32d5c9; }
.member-funds-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid #303b40; background: #172023; }
.member-funds-steps > div { min-height: 48px; padding: 7px 10px; display: flex; align-items: center; gap: 8px; border-right: 1px solid #303b40; }
.member-funds-steps > div:last-child { border-right: 0; }
.member-funds-steps b { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #2bb9af; color: #5ce0d5; font-size: 9px; }
.member-funds-steps span { color: #b4c0c2; font-size: 9px; white-space: nowrap; }
.member-funds-body { min-width: 0; display: grid; grid-template-columns: minmax(280px, .85fr) minmax(420px, 1.4fr); }
.member-funds-account { min-width: 0; padding: 15px; display: grid; align-content: start; gap: 12px; border-right: 1px solid #303b40; background: #121a1d; }
.member-funds-account-status { min-height: 144px; padding: 13px; display: grid; align-content: center; gap: 8px; border: 1px solid #374348; background: #0d1417; }
.member-funds-account-status strong { color: #e2e9ea; font-size: 11px; }
.member-funds-account-status b { color: #5ad6cc; font-size: 13px; font-variant-numeric: tabular-nums; }
.member-funds-account-status small,
.member-funds-waiting { color: #809095; font-size: 9px; line-height: 1.6; }
.member-funds-account-action { display: grid; gap: 7px; }
.member-funds-account-action .btn { width: 100%; }
.member-funds-form { min-width: 0; padding: 15px; display: grid; align-content: start; gap: 11px; background: #12191d; }
.member-funds-single { max-width: 900px; }
.member-funds-form-title { display: grid; gap: 4px; }
.member-funds-form-title strong { font-size: 12px; }
.member-funds-form-title span { color: #819095; font-size: 9px; }
.member-funds-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.member-funds-field { min-width: 0; display: grid; gap: 5px; }
.member-funds-field > span { color: #8c9a9e; font-size: 9px; }
.member-funds-field :where(input, select) {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 9px;
  border: 1px solid #3d4a4f;
  border-radius: 2px;
  outline: none;
  background: #0b1114;
  color: #edf2f3;
  font-size: 10px;
}
.member-funds-field :where(input, select):focus { border-color: #25b8ae; box-shadow: 0 0 0 3px rgba(37,184,174,.16); }
.member-funds-available { min-height: 32px; padding: 0 9px; display: flex; align-items: center; border: 1px solid #3d4a4f; background: #0b1114; color: #e0c856; font-size: 10px; font-variant-numeric: tabular-nums; }
.member-funds-presets { display: grid; grid-template-columns: repeat(8, minmax(54px, 1fr)); gap: 4px; }
.member-funds-presets .btn { min-width: 0; padding: 0 4px; }
.member-funds-form > .btn.primary { min-height: 42px; }
.member-funds-feedback { min-height: 20px; color: #829095; font-size: 9px; line-height: 1.5; }
.member-funds-feedback.loading { color: #e0c856; }
.member-funds-feedback.error { color: #ff8d8d; }
.member-funds-form-blocked { min-height: 120px; padding: 16px; display: grid; place-content: center; border: 1px solid #493d2c; background: #211b13; color: #d8bb79; font-size: 9px; line-height: 1.6; text-align: center; }
.member-funds-payout-account { min-height: 48px; padding: 7px 9px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; border: 1px solid #374348; background: #0d1417; }
.member-funds-payout-account > span { color: #829095; font-size: 8px; }
.member-funds-payout-account > strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.member-funds-records { min-width: 0; }
.member-funds-record { min-height: 62px; padding: 8px 11px; display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; align-items: center; gap: 10px; border-bottom: 1px solid #2d383d; }
.member-funds-record:last-child { border-bottom: 0; }
.member-funds-record > div:first-child { min-width: 0; display: grid; gap: 3px; }
.member-funds-record strong,
.member-funds-record span,
.member-funds-record small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-funds-record strong { font-size: 10px; }
.member-funds-record span,
.member-funds-record small { color: #7f8e93; font-size: 8px; }
.member-funds-record-amount { display: grid; justify-items: end; gap: 4px; }
.member-funds-record-amount b { font-size: 11px; font-variant-numeric: tabular-nums; }
.member-funds-record-actions { display: flex; gap: 4px; }
.member-funds-record-empty { min-height: 150px; padding: 16px; display: grid; place-content: center; color: #829095; font-size: 9px; text-align: center; }

@media (max-width: 1180px) {
  .racing-live-toolbar { grid-template-columns: minmax(140px, auto) minmax(0, 1fr); }
  .racing-live-status-tabs { grid-column: 1 / -1; border-top: 1px solid #334247; border-left: 0; }
  .member-funds-body { grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); }
  .member-funds-presets { grid-template-columns: repeat(4, minmax(60px, 1fr)); }
}

@media (max-width: 760px) {
  .racing-live-toolbar { grid-template-columns: minmax(0, 1fr); }
  .racing-live-heading { min-width: 0; border-right: 0; border-bottom: 1px solid #334247; }
  .racing-live-products { overflow-x: auto; }
  .racing-live-products button { min-width: 98px; }
  .racing-live-status-tabs { overflow-x: auto; }
  .racing-live-status-tabs button:not(.btn) { min-width: 104px; }
  .racing-live-status-tabs > .btn:not(.icon) { min-width: 110px; }
  .racing-live-status-tabs > .btn.primary { order: -1; min-width: 96px; }
  .racing-live-workbench .racing-odds-pane { min-height: 0; }
  .racing-live-matrix-scroll { min-height: 390px; }
  .racing-live-media { min-height: 190px; }
  .racing-feed-bet-state { position: static; }
  .mini-live-number-grid { grid-template-columns: repeat(6, 32px); }
  .mini-live-number-grid span { width: 32px; height: 32px; }
  .mini-live-result-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-funds-head { padding: 10px; grid-template-columns: minmax(0, 1fr); }
  .member-funds-head > span { grid-row: 2; }
  .member-funds-tabs { grid-row: 3; width: 100%; min-height: 42px; border: 1px solid #303b40; }
  .member-funds-tabs button { flex: 1; min-width: 0; border-left: 0; border-right: 1px solid #303b40; }
  .member-funds-tabs button:last-child { border-right: 0; }
  .member-funds-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-funds-steps > div:nth-child(2n) { border-right: 0; }
  .member-funds-steps > div:nth-child(-n+2) { border-bottom: 1px solid #303b40; }
  .member-funds-body { grid-template-columns: minmax(0, 1fr); }
  .member-funds-account { border-right: 0; border-bottom: 1px solid #303b40; }
  .member-funds-form-grid { grid-template-columns: minmax(0, 1fr); }
  .member-funds-presets { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .member-funds-record { grid-template-columns: minmax(0, 1fr) auto; }
  .member-funds-record-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

@media (max-width: 390px) {
  .mini-live-number-grid { grid-template-columns: repeat(5, 31px); }
  .mini-live-number-grid span { width: 31px; height: 31px; }
  .member-funds-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-funds-steps span { font-size: 8px; }
}

/* Member P0 delivery workspaces: list-first racing, actionable Mini and honest Casino availability. */
.member-app-shell[data-view="racing"] .member-view-racing,
.member-app-shell[data-view="mini"] .member-view-mini,
.member-app-shell[data-view="casino"] .member-view-casino {
  width: min(1680px, 100%);
  min-width: 0;
}

.member-racing-list {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #344247;
  background: #101719;
  color: #e8edef;
}
.member-racing-list-head {
  min-height: 48px;
  padding: 0 13px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid #344247;
  background: #172024;
}
.member-racing-list-head > div { font-size: 12px; font-weight: 850; }
.member-racing-list-head > span { color: #7f8f95; font-size: 9px; }
.member-racing-list-head > b { color: #d8bf4e; font-size: 10px; font-variant-numeric: tabular-nums; }
.member-racing-table-shell { min-width: 0; overflow-x: auto; }
.member-racing-table { width: 100%; min-width: 930px; border-collapse: collapse; table-layout: fixed; }
.member-racing-table th {
  height: 38px;
  padding: 0 9px;
  border-right: 1px solid #2d393e;
  border-bottom: 1px solid #344247;
  background: #1d272b;
  color: #8e9ca1;
  font-size: 9px;
  font-weight: 750;
  text-align: center;
  white-space: nowrap;
}
.member-racing-table th:nth-child(1) { width: 132px; }
.member-racing-table th:nth-child(2) { width: 142px; }
.member-racing-table th:nth-child(3) { width: 76px; }
.member-racing-table th:nth-child(4),
.member-racing-table th:nth-child(5) { width: 68px; }
.member-racing-table th:nth-child(6) { width: 92px; }
.member-racing-table th:nth-child(7) { width: 128px; }
.member-racing-table th:nth-child(8) { width: 112px; }
.member-racing-table th:nth-child(9) { width: 98px; }
.member-racing-table td {
  height: 47px;
  padding: 0 9px;
  overflow: hidden;
  border-right: 1px solid #29353a;
  border-bottom: 1px solid #29353a;
  color: #c6d0d2;
  font-size: 9px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.member-racing-table tbody tr:nth-child(2n) { background: #131c20; }
.member-racing-table tbody tr:hover { background: #1c292e; }
.member-racing-table tbody tr.bettable { box-shadow: inset 3px 0 0 #d8bc43; }
.member-racing-product { color: #8da0a5; }
.member-racing-row-link {
  width: 100%;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #eef3f4;
  font-size: 10px;
  font-weight: 800;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-racing-row-link:hover { color: #5ed8cf; text-decoration: underline; }
.member-racing-status { display: inline-flex; min-height: 22px; padding: 0 7px; align-items: center; border: 1px solid #465359; color: #a9b6b9; }
.member-racing-status.open,
.member-racing-status.live { border-color: #287a66; background: #143b31; color: #76e4ba; }
.member-racing-status.upcoming { border-color: #5e5934; background: #302d1d; color: #e0ca62; }
.member-racing-status.cancelled { border-color: #6c3637; background: #351d1f; color: #ef9598; }
.member-racing-mobile-list { display: none; }
.member-racing-pagination {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-top: 1px solid #344247;
}
.member-racing-pagination > span { color: #8d9a9e; font-size: 9px; font-variant-numeric: tabular-nums; }

.racing-p0-navigation {
  min-width: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid #344247;
  background: #11191c;
}
.racing-list-back {
  min-height: 62px;
  border: 0;
  border-right: 1px solid #344247;
  border-radius: 0;
  background: #20292d;
  color: #dbe3e5;
  font-size: 10px;
  font-weight: 800;
}
.racing-list-back::before { content: "←"; margin-right: 7px; color: #58d8ce; }
.racing-p0-event-tabs { min-width: 0; display: flex; overflow-x: auto; }
.racing-p0-event-tabs button {
  min-width: 114px;
  min-height: 62px;
  padding: 7px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 3px 7px;
  border: 0;
  border-right: 1px solid #344247;
  background: #172024;
  color: #88979c;
  text-align: left;
}
.racing-p0-event-tabs button > span { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.racing-p0-event-tabs button > b { color: #e0e6e7; font-size: 10px; }
.racing-p0-event-tabs button > small { grid-column: 1 / -1; color: #6f8085; font-size: 8px; }
.racing-p0-event-tabs button.active { background: #5b191c; box-shadow: inset 0 -3px 0 #d84f50; color: #ffc8ca; }
.racing-p0-event-tabs button.active > b { color: #ffffff; }
.racing-p0-workbench {
  min-width: 0;
  margin-top: 7px;
  display: grid;
  grid-template-columns: minmax(0, 58fr) minmax(360px, 42fr);
  gap: 7px;
  align-items: start;
}
.racing-p0-main {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #344247;
  background: #11191c;
  color: #edf2f3;
}
.racing-p0-main .racing-race-head { min-height: 66px; background: #1b2428; }
.racing-p0-main .racing-race-metrics > strong {
  min-height: 32px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #5b5735;
  background: #2c291a;
  color: #e5cf65;
  font-size: 10px;
  white-space: nowrap;
}
.racing-p0-play-tabs { border-top: 0; }
.racing-p0-play-tabs button { min-width: 82px; }
.racing-p0-main .racing-matrix-scroll {
  min-height: 0;
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
}
.racing-p0-main .racing-market-matrix { min-height: 0; }
.racing-feed-participant-board { min-height: 0; background: #11191c; }
.racing-feed-participant-head {
  min-height: 40px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #344247;
}
.racing-feed-participant-head strong { font-size: 10px; }
.racing-feed-participant-head span { color: #7c8c91; font-size: 8px; }
.racing-feed-participant-row {
  min-height: 48px;
  padding: 0 11px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 64px 78px;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid #2b373c;
}
.racing-feed-participant-row:last-child { border-bottom: 0; }
.racing-feed-runner-number { width: 28px; height: 28px; display: grid; place-content: center; background: #e3e7e7; color: #11191c; font-size: 10px; }
.racing-feed-participant-row > strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.racing-feed-participant-row > span { color: #77d9b1; font-size: 8px; text-align: center; }
.racing-feed-participant-row > small { color: #d7c25c; font-size: 8px; text-align: right; }
.racing-feed-no-odds-status {
  min-height: 38px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #344247;
  border-bottom: 1px solid #344247;
  background: #11191c;
}
.racing-feed-no-odds-status strong { color: #e1c95c; font-size: 9px; }
.racing-feed-no-odds-status span { color: #849398; font-size: 8px; text-align: right; }
.racing-feed-pending-odds-grid {
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 5px;
}
.racing-feed-pending-odd {
  min-width: 0;
  min-height: 54px;
  padding: 7px 9px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 8px;
  border: 1px solid #3a474b;
  background: #20282b;
}
.racing-feed-pending-odd > span { overflow: hidden; color: #dce4e5; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.racing-feed-pending-odd > strong { color: #b9c2c4; font-size: 14px; }
.racing-feed-pending-odd > small { grid-column: 2 / -1; color: #8e8147; font-size: 7px; }
.racing-p0-side { min-width: 0; display: grid; gap: 7px; }
.racing-p0-side .member-bet-slip { position: static; top: auto; }
.racing-broadcast-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #344247;
  background: #0e1518;
  color: #e8edef;
}
.racing-broadcast-head {
  min-height: 42px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #344247;
}
.racing-broadcast-head > div { font-size: 10px; font-weight: 800; }
.racing-broadcast-source-tabs {
  min-height: 34px;
  padding: 5px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid #344247;
  background: #171f22;
}
.racing-broadcast-source-tabs button {
  min-height: 24px;
  padding: 0 7px;
  flex: 0 0 auto;
  border: 1px solid #2c7891;
  border-radius: 2px;
  background: #21799a;
  color: #f4f9fa;
  font-size: 7px;
  white-space: nowrap;
}
.racing-broadcast-source-tabs button.active { border-color: #42b7dc; background: #278caf; }
.racing-broadcast-source-tabs button:disabled { cursor: default; opacity: 1; }
.racing-broadcast-media { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 0; overflow: hidden; background: #080d0f; }
.racing-broadcast-media img { width: 100%; height: 100%; display: block; object-fit: cover; }
.racing-broadcast-standby {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  background: #0b1215;
  color: #e7edef;
}
.racing-broadcast-standby::before,
.racing-broadcast-standby::after {
  content: "";
  position: absolute;
  right: 12%;
  left: 12%;
  height: 1px;
  background: #27383d;
}
.racing-broadcast-standby::before { top: 34%; }
.racing-broadcast-standby::after { bottom: 34%; }
.racing-broadcast-standby > span { color: #21b9c8; font-size: 9px; font-weight: 800; }
.racing-broadcast-standby > strong { font-size: 18px; }
.racing-broadcast-standby > small { color: #78898e; font-size: 8px; }
.racing-broadcast-player-placeholder { padding-bottom: 72px; background: #1b1e1f; }
.racing-broadcast-player-placeholder::before,
.racing-broadcast-player-placeholder::after { display: none; }
.racing-broadcast-player-placeholder > .racing-broadcast-signal-icon { width: 24px; height: 24px; color: #475156; }
.racing-broadcast-player-placeholder > strong { color: #929b9e; font-size: 10px; }
.racing-broadcast-player-placeholder > small { color: #697579; }
.racing-broadcast-player-controls {
  position: absolute;
  right: 0;
  bottom: 52px;
  left: 0;
  z-index: 2;
  min-height: 32px;
  padding: 0 9px;
  display: grid;
  grid-template-columns: 16px auto minmax(30px, 1fr) 16px 16px;
  align-items: center;
  gap: 7px;
  background: rgba(4, 6, 7, .9);
  color: #e5eaeb;
}
.racing-broadcast-player-controls time { font-size: 8px; font-variant-numeric: tabular-nums; }
.racing-player-control-icon { width: 12px; height: 12px; color: #c4cbcd; }
.racing-broadcast-player-progress { height: 2px; background: #515a5d; }
.racing-broadcast-media figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 52px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(5, 9, 11, .88);
}
.racing-broadcast-media figcaption strong { font-size: 11px; }
.racing-broadcast-media figcaption span { color: #9aabad; font-size: 8px; text-align: right; }
.racing-broadcast-footer {
  min-height: 38px;
  padding: 0 11px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #344247;
  color: #829196;
  font-size: 8px;
}
.racing-broadcast-footer b { color: #c8d1d3; font-size: 9px; }
.racing-broadcast-footer strong { color: #dfc84f; font-size: 9px; }
.racing-quick-add-modal {
  width: min(980px, calc(100vw - 32px));
  max-height: min(840px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.racing-quick-add-form { min-height: 0; overflow-y: auto; }
.racing-quick-add-setup {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(150px, 1.2fr) minmax(140px, .8fr) minmax(100px, .55fr) auto;
  align-items: end;
  gap: 8px;
}
.racing-quick-add-setup .field { margin: 0; }
.racing-quick-add-setup > .btn { min-width: 72px; min-height: 36px; }
.racing-quick-add-editor { min-height: 0; margin-top: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.racing-quick-add-empty { min-height: 112px; display: grid; place-items: center; color: var(--muted); font-size: 10px; }
.racing-quick-add-table-shell { width: 100%; overflow-x: auto; }
.racing-quick-add-table { width: 100%; min-width: 620px; border-collapse: collapse; table-layout: fixed; }
.racing-quick-add-table th,
.racing-quick-add-table td { height: 44px; padding: 5px 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.racing-quick-add-table th:last-child,
.racing-quick-add-table td:last-child { border-right: 0; }
.racing-quick-add-table th { background: var(--surface-alt); color: var(--muted); font-size: 8px; }
.racing-quick-add-table td b { display: block; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.racing-quick-add-input { width: 100%; min-width: 0; height: 32px; padding: 0 7px; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--input); color: var(--text); text-align: center; }
.racing-quick-add-advanced { margin-top: 10px; border-bottom: 1px solid var(--line); }
.racing-quick-add-advanced summary { min-height: 34px; display: flex; align-items: center; color: var(--muted); cursor: pointer; font-size: 9px; }
.racing-quick-add-advanced .field { margin-bottom: 9px; }
.racing-recent-orders,
.mini-recent-orders { border-top: 1px solid #344247; background: #11191c; }
.racing-recent-orders-head,
.mini-recent-orders-head {
  min-height: 40px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #344247;
}
.racing-recent-orders-head > div,
.mini-recent-orders-head > div { font-size: 10px; font-weight: 800; }
.racing-recent-orders-head > span,
.mini-recent-orders-head > span { color: #7d8c91; font-size: 8px; }
.racing-recent-orders-empty,
.mini-recent-orders-empty { min-height: 70px; display: grid; place-content: center; color: #748389; font-size: 9px; }
.racing-recent-order,
.mini-recent-order {
  min-height: 42px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) 92px auto auto;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid #29353a;
  font-size: 8px;
}
.racing-recent-order:last-child,
.mini-recent-order:last-child { border-bottom: 0; }
.racing-recent-order > span,
.mini-recent-order > span { color: #7d8d91; }
.racing-recent-order > b,
.mini-recent-order > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.racing-recent-order > strong,
.mini-recent-order > strong { color: #ddca64; text-align: right; font-variant-numeric: tabular-nums; }

.member-mini-catalog-p0 {
  min-width: 0;
  margin-bottom: 7px;
  overflow: hidden;
  border: 1px solid #344247;
  background: #101719;
  color: #e8edef;
}
.member-mini-catalog-tools {
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  align-items: stretch;
  border-bottom: 1px solid #344247;
}
.member-mini-category-tabs { min-width: 0; display: flex; overflow-x: auto; }
.member-mini-category-tabs button {
  min-width: 82px;
  min-height: 43px;
  padding: 5px 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border: 0;
  border-right: 1px solid #344247;
  background: #172024;
  color: #8b999e;
  font-size: 9px;
  white-space: nowrap;
}
.member-mini-category-tabs button b { color: #c2ccce; font-size: 8px; }
.member-mini-category-tabs button.active { background: #075f5b; color: #ffffff; box-shadow: inset 0 -2px 0 #3bd7cc; }
.member-mini-search { padding: 5px; display: grid; grid-template-columns: minmax(0, 1fr) 54px; gap: 4px; }
.member-mini-search input {
  min-width: 0;
  height: 32px;
  padding: 0 9px;
  border: 1px solid #3c494e;
  border-radius: 2px;
  outline: none;
  background: #0c1215;
  color: #e5ebec;
  font-size: 9px;
}
.member-mini-search input:focus { border-color: #32c9bf; }
.member-mini-game-strip { min-width: 0; padding: 6px; display: flex; gap: 5px; overflow-x: auto; }
.member-mini-game-item {
  position: relative;
  min-width: 158px;
  height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 29px;
  border: 1px solid #364449;
  background: #172024;
}
.member-mini-game-item.active { border-color: #d4b843; box-shadow: inset 0 -3px 0 #d4b843; }
.member-mini-game-select {
  min-width: 0;
  padding: 6px 7px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  gap: 2px 7px;
  border: 0;
  background: transparent;
  color: #dce4e5;
  text-align: left;
}
.member-mini-game-select > :first-child { grid-row: 1 / 3; }
.member-mini-game-select > span:not(.mini-game-mark):not(.badge) { overflow: hidden; font-size: 9px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.member-mini-game-select > small { color: #78878c; font-size: 8px; }
.member-mini-game-select > .badge { grid-column: 3; grid-row: 1 / 3; }
.member-mini-favorite { width: 28px; height: 100%; border: 0; border-left: 1px solid #344247; background: #11191c; color: #6f7d82; font-size: 14px; }
.member-mini-favorite.active { color: #e2c84f; }
.mini-p0-workbench {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 36%);
  gap: 7px;
  align-items: start;
}
.mini-p0-workbench > .mini-game-area { overflow: hidden; }
.mini-p0-workbench > .member-bet-slip { position: static; top: auto; }
.mini-p0-workbench .mini-live-stage { min-height: 245px; }
.mini-p0-workbench .mini-market-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.member-app-shell[data-view="wallet"] .member-wallet-band { min-height: 72px; margin-top: 10px; padding: 12px 16px; }
.member-app-shell[data-view="wallet"] .member-wallet-band strong { font-size: 20px; }
.member-app-shell[data-view="wallet"] .member-wallet-grid { margin-top: 7px; gap: 7px; }
.member-app-shell[data-view="wallet"] .member-wallet-card { min-height: 104px; padding: 11px; }
.member-app-shell[data-view="wallet"] .member-wallet-card > strong { margin-top: 12px; font-size: 18px; }

.casino-entrance-only {
  position: relative;
  min-height: clamp(430px, 68vh, 720px);
  overflow: hidden;
  border: 1px solid #344247;
  background: #091013;
  color: #f0f3f4;
}
.casino-entrance-media { position: absolute; inset: 0; }
.casino-entrance-media img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 82% center; opacity: .72; }
.casino-entrance-media::after { content: ""; position: absolute; inset: 0; background: rgba(3, 8, 10, .42); }
.casino-entrance-copy {
  position: relative;
  z-index: 1;
  width: min(560px, 72%);
  min-height: 350px;
  padding: 68px 56px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.casino-entrance-copy > span { color: #dfc94e; font-size: 10px; font-weight: 850; }
.casino-entrance-copy h1 { margin: 12px 0 0; font-size: 34px; }
.casino-entrance-copy p { margin: 14px 0; color: #a9b7ba; font-size: 11px; line-height: 1.7; }
.casino-entrance-facts {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 1;
  min-height: 58px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.2fr) auto;
  align-items: center;
  gap: 1px;
  border: 1px solid #465156;
  background: rgba(8, 14, 17, .92);
}
.casino-entrance-facts .primary-cell { padding: 0 12px; color: #e9eeef; font-size: 10px; }
.casino-entrance-facts .sub-cell { margin-top: 4px; color: #839297; font-size: 8px; }
.casino-availability-banner {
  min-height: 0;
  margin-bottom: 8px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 18px;
  overflow: visible;
  border-color: #40506c;
  background: #111a2b;
}
.casino-availability-copy { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 5px 12px; }
.casino-availability-copy > span { color: #d8b45f; font-size: 9px; font-weight: 850; }
.casino-availability-copy > strong { color: #f0f3f8; font-size: 14px; }
.casino-availability-copy > p { grid-column: 1 / -1; margin: 0; color: #a9b5c7; font-size: 10px; line-height: 1.55; }
.casino-availability-facts { display: flex; align-items: center; gap: 1px; border: 1px solid #35445f; background: #35445f; }
.casino-availability-facts .primary-cell { min-width: 116px; padding: 8px 11px; background: #0e1727; color: #e5eaf2; }
.casino-availability-facts .sub-cell { margin-top: 3px; color: #94a3ba; font-size: 9px; }
.casino-availability-facts > .badge { margin: 0 10px; white-space: nowrap; }
.casino-game-art.preview-only { cursor: default; }
.casino-game-art.preview-only::after { content: "API"; position: absolute; right: 8px; bottom: 8px; z-index: 2; padding: 3px 6px; border: 1px solid rgba(255,255,255,.28); background: rgba(8,12,20,.78); color: #d9e0eb; font-size: 8px; font-weight: 800; }

@media (max-width: 1180px) {
  .racing-p0-workbench { grid-template-columns: minmax(0, 1fr) minmax(330px, 40%); }
  .racing-p0-play-tabs button { min-width: 78px; }
  .mini-p0-workbench { grid-template-columns: minmax(0, 1fr) 320px; }
}

@media (max-width: 900px) and (min-width: 761px) {
  .racing-p0-workbench,
  .mini-p0-workbench { grid-template-columns: minmax(0, 1fr) 300px; }
  .racing-p0-navigation { grid-template-columns: 98px minmax(0, 1fr); }
  .racing-p0-event-tabs button { min-width: 104px; }
  .racing-broadcast-media { aspect-ratio: 4 / 3; }
  .member-mini-catalog-tools { grid-template-columns: minmax(0, 1fr) 190px; }
  .racing-quick-add-setup { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
  .casino-availability-banner { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .casino-availability-facts { width: 100%; }
  .casino-availability-facts .primary-cell { flex: 1 1 0; min-width: 0; }
}

@media (max-width: 760px) {
  .casino-availability-banner { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px; }
  .casino-availability-copy { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .casino-availability-copy > p { grid-column: auto; }
  .casino-availability-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .casino-availability-facts .primary-cell { min-width: 0; }
  .casino-availability-facts > .badge { margin: 8px 10px; }
  .member-racing-table-shell { display: none; }
  .member-racing-mobile-list { display: grid; }
  .member-racing-list-head { grid-template-columns: minmax(0, 1fr) auto; padding: 9px 10px; }
  .member-racing-list-head > span { grid-column: 1 / -1; grid-row: 2; }
  .member-racing-mobile-row {
    min-width: 0;
    padding: 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 9px;
    border-bottom: 1px solid #2c383d;
    background: #11191c;
  }
  .member-racing-mobile-row.bettable { box-shadow: inset 3px 0 0 #d7ba43; }
  .member-racing-mobile-row > div:first-child { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 7px; }
  .member-racing-mobile-row > div:first-child span { color: #779096; font-size: 8px; }
  .member-racing-mobile-row > div:first-child b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .member-racing-mobile-row > div:first-child small { color: #dfc95d; font-size: 8px; }
  .member-racing-mobile-facts { grid-column: 1; display: flex; align-items: center; gap: 7px; color: #78888d; font-size: 8px; }
  .member-racing-mobile-facts strong { margin-left: auto; color: #d6c356; }
  .member-racing-mobile-row > .btn { grid-column: 2; grid-row: 1 / 3; min-height: 42px; align-self: center; }
  .racing-p0-navigation { grid-template-columns: 84px minmax(0, 1fr); min-height: 56px; }
  .racing-list-back { min-height: 54px; font-size: 9px; }
  .racing-p0-event-tabs button { min-width: 96px; min-height: 54px; }
  .racing-p0-workbench { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
  .racing-p0-side { display: block; }
  .racing-p0-main .racing-matrix-scroll { min-height: 0; overflow-x: auto; overflow-y: visible; }
  .racing-p0-main .racing-race-head { min-height: 60px; }
  .racing-p0-main .racing-race-metrics > strong { min-height: 30px; }
  .racing-broadcast-media { aspect-ratio: 16 / 10; }
  .racing-feed-no-odds-status { padding: 7px 9px; align-items: flex-start; flex-direction: column; gap: 3px; }
  .racing-feed-no-odds-status span { text-align: left; }
  .racing-quick-add-modal { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); }
  .racing-quick-add-form { min-height: 0; }
  .racing-quick-add-setup { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .racing-quick-add-setup > .btn { grid-column: 1 / -1; }
  .racing-recent-order,
  .mini-recent-order { grid-template-columns: 88px minmax(0, 1fr) 72px auto auto; padding: 0 7px; gap: 6px; }
  .member-mini-catalog-tools { grid-template-columns: minmax(0, 1fr); }
  .member-mini-search { border-top: 1px solid #344247; }
  .member-mini-game-strip { padding: 5px; }
  .member-mini-game-item { min-width: 146px; }
  .mini-p0-workbench { grid-template-columns: minmax(0, 1fr); }
  .mini-p0-workbench .mini-market-groups { grid-template-columns: minmax(0, 1fr); }
  .casino-entrance-only { min-height: calc(100dvh - 150px); }
  .casino-entrance-only.casino-availability-banner { min-height: 0; }
  .casino-entrance-copy { width: 100%; min-height: 330px; padding: 38px 24px; justify-content: flex-start; }
  .casino-entrance-copy h1 { font-size: 28px; }
  .casino-entrance-facts { grid-template-columns: minmax(0, 1fr); padding: 7px; }
  .casino-entrance-facts .primary-cell { padding: 7px 8px; }
  .casino-entrance-facts .btn { width: 100%; }
}

@media (max-width: 390px) {
  .member-racing-mobile-row { grid-template-columns: minmax(0, 1fr) 82px; }
  .member-racing-mobile-facts span:nth-child(3) { display: none; }
  .racing-p0-play-tabs button { min-width: 74px; padding: 0 8px; }
  .racing-recent-order,
  .mini-recent-order { grid-template-columns: minmax(0, 1fr) 68px auto auto; }
  .racing-recent-order > span,
  .mini-recent-order > span { display: none; }
  .casino-entrance-copy { padding: 30px 19px; }
}

/* Foundation 1.76 r16: Korean racing reference workbench and in-place finance. */
.member-app-shell[data-view="racing"] {
  min-height: 100vh;
  background: #000000;
}
.member-app-shell[data-view="racing"] > .member-event-ticker,
.member-app-shell[data-view="racing"] .member-side-nav { display: none; }
.member-app-shell[data-view="racing"] .member-body {
  width: 100%;
  display: block;
  background: #000000;
}
.member-app-shell[data-view="racing"] .member-main {
  min-height: calc(100vh - 76px);
  background: #000000;
}
.member-app-shell[data-view="racing"] .member-content {
  width: min(1300px, 100%);
  max-width: 1300px;
  margin: 0 auto;
  padding: 0;
  background: #3f3f3f;
  color: #f4f4f4;
}

.member-racing-reference-header {
  position: sticky;
  top: 0;
  z-index: 40;
  width: min(1300px, 100%);
  height: 76px;
  margin: 0 auto;
  padding: 5px;
  display: grid;
  grid-template-columns: minmax(0, 745px) minmax(0, 540px);
  gap: 5px;
  border: 0;
  background: #3f3f3f;
}
.member-racing-reference-products,
.member-racing-reference-actions {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.member-racing-reference-products { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.member-racing-reference-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.member-racing-reference-products button,
.member-racing-reference-actions button {
  min-width: 0;
  min-height: 0;
  padding: 0 5px;
  overflow: hidden;
  border: 1px solid #171717;
  border-radius: 3px;
  background: linear-gradient(#555555, #393939);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  color: #f3f3f3;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-racing-reference-products button {
  border-color: #321111;
  background: linear-gradient(#a23a3c, #6e2022);
}
.member-racing-reference-products button:hover,
.member-racing-reference-products button.active {
  border-color: #ffd2d2;
  background: linear-gradient(#d04b4e, #8c2427);
  color: #ffffff;
}
.member-racing-reference-actions button:hover,
.member-racing-reference-actions button.active {
  border-color: #f1c35a;
  background: linear-gradient(#e1aa35, #a66d12);
  color: #161007;
}

.racing-reference-workbench {
  width: 100%;
  height: 742px;
  padding: 0 5px 5px;
  display: grid;
  grid-template-columns: minmax(0, 745px) minmax(0, 540px);
  grid-template-rows: 435px 297px;
  grid-template-areas:
    "odds utility"
    "controls orders";
  gap: 5px;
  overflow: hidden;
  background: #3f3f3f;
}
.racing-reference-odds-panel,
.racing-reference-utility-panel,
.racing-reference-controls,
.racing-reference-orders-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 5px solid #141414;
  border-radius: 5px;
  background: #202020;
}
.racing-reference-odds-panel { grid-area: odds; }
.racing-reference-utility-panel { grid-area: utility; }
.racing-reference-controls { grid-area: controls; }
.racing-reference-orders-panel { grid-area: orders; }

.racing-reference-odds-panel {
  display: grid;
  grid-template-rows: 35px minmax(0, 1fr);
  color: #161616;
}
.racing-reference-odds-head {
  min-width: 0;
  display: grid;
  grid-template-columns: 84px auto minmax(0, 1fr);
  align-items: stretch;
  gap: 1px;
  background: #151515;
}
.racing-reference-odds-head button {
  min-width: 0;
  border: 1px solid #090909;
  border-radius: 2px;
  background: #5a5a5a;
  color: #f7f7f7;
  font-size: 10px;
  font-weight: 800;
}
.racing-reference-odds-head button:hover,
.racing-reference-odds-head button.active { background: #c1393e; }
.racing-reference-odds-head button:disabled { opacity: .45; cursor: default; }
.racing-reference-odds-tabs { display: grid; grid-template-columns: repeat(2, 56px); gap: 1px; }
.racing-reference-odds-identity {
  min-width: 0;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: #eeeeee;
}
.racing-reference-odds-identity strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.racing-reference-odds-identity span { color: #bdbdbd; font-size: 9px; white-space: nowrap; }
.racing-reference-odds-meta { display: none; }
.racing-reference-odds-panel > .racing-odds-board,
.racing-reference-odds-panel > .racing-odds-board > .racing-matrix-scroll {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
}
.racing-reference-odds-panel .racing-matrix-scroll {
  overflow: auto;
  overscroll-behavior: contain;
  background: #f2f2f2;
}
.racing-reference-odds-panel .racing-symmetric-matrix {
  width: 100%;
  min-width: max(100%, calc(40px + var(--racing-runner-count) * 46px));
  height: 100%;
  min-height: 100%;
  grid-template-columns: 40px repeat(var(--racing-runner-count), minmax(46px, 1fr));
  grid-template-rows: repeat(var(--racing-matrix-size), minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  border-color: #161616;
}
.racing-reference-odds-panel :where(.racing-matrix-corner, .racing-matrix-header, .racing-matrix-cell) {
  min-width: 0;
  min-height: 0;
  border-color: #181818;
  border-radius: 0;
  font-size: 10px;
}
.racing-reference-odds-panel :where(.racing-matrix-corner, .racing-matrix-header) {
  background: #3e3e3e;
  color: #ffffff;
}
.racing-reference-odds-panel .racing-matrix-cell.diagonal { background: #252525; }
.racing-reference-odds-panel .racing-matrix-cell.unavailable { background: #d9d9d9; color: #777777; }
.member-app-shell[data-view="racing"] .racing-reference-odds-panel .racing-matrix-cell.odds {
  background: #f7f7f7;
  color: #111111;
}
.member-app-shell[data-view="racing"] .racing-reference-odds-panel .racing-matrix-cell.odds.lower { background: #e1e1e1; }
.member-app-shell[data-view="racing"] .racing-reference-odds-panel .racing-matrix-cell.odds.selected {
  background: #d33c42;
  color: #ffffff;
  box-shadow: inset 0 0 0 2px #7d1519;
}
.racing-reference-odds-panel .racing-market-matrix {
  height: 100%;
  overflow-y: auto;
  background: #f2f2f2;
}
.racing-reference-odds-panel .racing-market-row {
  min-height: 38px;
  grid-template-columns: 42px minmax(0, 1fr) 100px 94px;
  border-color: #1c1c1c;
  background: #f2f2f2;
  color: #171717;
}

.racing-reference-utility-panel > .racing-broadcast-panel {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: 36px minmax(0, 1fr);
  overflow: hidden;
  border: 0;
  background: #111111;
}
.racing-reference-utility-panel .racing-broadcast-head { min-height: 0; height: 0; padding: 0; overflow: hidden; border: 0; }
.racing-reference-utility-panel .racing-broadcast-source-tabs {
  min-height: 34px;
  padding: 3px;
  gap: 2px;
  border-color: #151515;
  background: #252525;
}
.racing-reference-utility-panel .racing-broadcast-source-tabs button {
  min-height: 26px;
  padding: 0 8px;
  border-color: #171717;
  background: #4c4c4c;
  color: #f1f1f1;
  font-size: 9px;
}
.racing-reference-utility-panel .racing-broadcast-source-tabs button.active { background: #2d85a3; }
.racing-reference-utility-panel .racing-broadcast-media {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  background: #050505;
}
.racing-reference-utility-panel .racing-broadcast-standby { background: #050505; }
.racing-reference-utility-panel .racing-broadcast-empty-label {
  padding: 5px 8px;
  border: 1px solid #202522;
  color: #69726d;
  font-size: 8px;
  font-weight: 700;
}
.racing-reference-utility-panel .racing-broadcast-media figcaption { display: none; }
.racing-reference-utility-panel .racing-broadcast-footer {
  min-height: 30px;
  padding: 0 8px;
  background: #252525;
  border-color: #111111;
  color: #bdbdbd;
}

.racing-reference-controls {
  display: flex;
  flex-direction: column;
  color: #eeeeee;
}
.racing-reference-event-bar {
  min-height: 36px;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 82px;
  border-bottom: 1px solid #101010;
  background: #2d2d2d;
}
.racing-reference-event-bar > button {
  min-width: 0;
  border: 0;
  border-right: 1px solid #151515;
  border-radius: 0;
  background: #4a4a4a;
  color: #eeeeee;
  font-size: 9px;
  font-weight: 800;
}
.racing-reference-event-bar > button:last-child { border-right: 0; border-left: 1px solid #151515; }
.racing-reference-event-bar > button:disabled { color: #777777; cursor: default; }
.racing-reference-current-event {
  min-width: 0;
  padding: 0 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
}
.racing-reference-current-event span {
  overflow: hidden;
  color: #d0d0d0;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.racing-reference-current-event strong { font-size: 10px; white-space: nowrap; }
.racing-reference-current-event b { color: #f1d158; font-size: 10px; white-space: nowrap; }
.racing-reference-play-tabs {
  min-height: 40px;
  padding: 2px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  border: 0;
  border-bottom: 1px solid #111111;
  background: #252525;
}
.racing-reference-play-tabs button {
  min-width: 78px;
  min-height: 34px;
  padding: 0 8px;
  flex: 0 0 auto;
  border: 1px solid #111111;
  border-radius: 2px;
  background: #5a5a5a;
  color: #f2f2f2;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.member-app-shell[data-view="racing"] .racing-reference-play-tabs button.active {
  border-color: #ffb4b7;
  background: #bd3035;
  color: #ffffff;
}
.racing-reference-play-tabs button:disabled { opacity: .35; cursor: default; }
.racing-reference-controls .racing-runner-picker {
  padding: 3px 4px;
  border: 0;
  border-bottom: 1px solid #111111;
  background: #343434;
}
.racing-reference-controls .racing-runner-picker-copy,
.racing-reference-controls .racing-runner-picker-status { display: none; }
.racing-reference-controls .racing-runner-picker-lanes { display: grid; gap: 2px; }
.racing-reference-controls .racing-runner-picker-lane {
  min-height: 30px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 3px;
}
.racing-reference-controls .racing-runner-picker-lane > strong {
  min-height: 28px;
  display: grid;
  place-content: center;
  background: #171717;
  color: #f1f1f1;
  font-size: 9px;
}
.racing-reference-controls .racing-runner-picker-controls {
  min-width: 0;
  display: flex;
  gap: 2px;
  overflow-x: auto;
}
.racing-reference-controls .racing-runner-picker-controls button {
  min-width: 39px;
  height: 28px;
  padding: 0;
  flex: 1 0 39px;
  border: 1px solid #171717;
  border-radius: 2px;
  background: #efefef;
  color: #151515;
}
.racing-reference-controls .racing-runner-picker-controls button b { font-size: 11px; }
.racing-reference-controls .racing-runner-picker-controls button span { display: none; }
.racing-reference-controls .racing-runner-picker-controls button.selected {
  border-color: #ffb2b5;
  background: #bd3035;
  color: #ffffff;
  box-shadow: none;
}
.racing-reference-controls .racing-runner-picker-controls button:disabled { background: #707070; color: #a7a7a7; }

.racing-reference-slip {
  min-height: 0;
  flex: 1 1 auto;
  padding: 3px 4px 4px;
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  grid-template-rows: 33px minmax(0, 1fr);
  gap: 3px 5px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #202020;
}
.racing-reference-slip > .racing-reference-asset-selector {
  grid-column: 1;
  grid-row: 1 / 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  border: 0;
  background: transparent;
}
.racing-reference-slip .racing-reference-asset-selector button {
  min-width: 0;
  min-height: 30px;
  padding: 3px 7px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid #101010;
  border-radius: 2px;
  background: #4b4b4b;
  color: #eeeeee;
  text-align: left;
}
.racing-reference-slip .racing-reference-asset-selector button.active {
  border-color: #e5c552;
  background: #6a5518;
  color: #ffffff;
}
.racing-reference-slip .racing-reference-asset-selector span { font-size: 8px; }
.racing-reference-slip .racing-reference-asset-selector b { color: #f2d45b; font-size: 10px; }
.racing-reference-slip > .member-slip-balance { display: none; }
.racing-reference-slip > .member-slip-body {
  grid-column: 2;
  grid-row: 1 / 3;
  min-width: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) 142px;
  grid-template-rows: 34px minmax(0, 1fr);
  gap: 3px;
}
.racing-reference-slip .racing-slip-selections { display: none; }
.racing-reference-slip .member-amount-field {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  min-height: 34px;
  margin: 0;
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr);
  align-items: center;
  gap: 3px;
}
.racing-reference-slip .member-amount-field > span { color: #d0d0d0; font-size: 8px; }
.racing-reference-slip .member-amount-field input {
  width: 100%;
  height: 30px;
  padding: 0 6px;
  border: 1px solid #111111;
  border-radius: 2px;
  background: #f2f2f2;
  color: #111111;
  font-size: 10px;
  text-align: right;
}
.racing-reference-slip .member-stake-presets {
  grid-column: 2;
  grid-row: 1 / 3;
  min-width: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
}
.racing-reference-slip .member-stake-presets button {
  min-width: 0;
  min-height: 28px;
  padding: 0 3px;
  border: 1px solid #101010;
  border-radius: 2px;
  background: #545454;
  color: #f1f1f1;
  font-size: 8px;
  font-weight: 750;
}
.racing-reference-slip .member-stake-presets button:hover { background: #707070; }
.racing-reference-slip .member-stake-presets .racing-stake-reset { background: #303030; color: #e5c75c; }
.racing-reference-slip .racing-slip-totals {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  padding: 2px 4px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1px 4px;
  border: 1px solid #101010;
  background: #2c2c2c;
}
.racing-reference-slip .racing-slip-totals .primary-cell { min-width: 0; }
.racing-reference-slip .racing-slip-totals .primary-cell > strong { color: #bdbdbd; font-size: 7px; }
.racing-reference-slip .racing-slip-totals .primary-cell > .sub-cell { display: none; }
.racing-reference-slip .racing-slip-totals > b { color: #f2d45a; font-size: 8px; text-align: right; }
.racing-reference-slip .racing-slip-balance-state {
  position: absolute;
  left: 188px;
  bottom: 2px;
  color: #c9c9c9;
  font-size: 7px;
}
.racing-reference-slip > .member-slip-body { position: relative; }
.racing-reference-slip .member-submit-bet {
  grid-column: 3;
  grid-row: 1 / 3;
  min-height: 0;
  margin: 0;
  border: 1px solid #6d1216;
  border-radius: 2px;
  background: linear-gradient(#d64b50, #971e23);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}
.racing-reference-slip .member-submit-bet:disabled {
  border-color: #222222;
  background: #4a4a4a;
  color: #999999;
}
.racing-reference-pending-message {
  min-height: 24px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #151515;
  background: #4a351b;
  color: #f4cf79;
  font-size: 9px;
}

.racing-reference-orders-panel .racing-recent-orders {
  height: 100%;
  overflow: hidden;
  border: 0;
  background: #202020;
}
.racing-reference-orders-panel .racing-recent-orders-head {
  min-height: 36px;
  padding: 0 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 7px;
  border-color: #101010;
  background: #303030;
}
.racing-reference-orders-panel .racing-recent-orders-head > div { color: #f0f0f0; font-size: 10px; }
.racing-reference-orders-panel .racing-recent-orders-head > span { color: #b0b0b0; font-size: 8px; }
.racing-reference-orders-panel .racing-recent-orders-head button {
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid #111111;
  border-radius: 2px;
  background: #565656;
  color: #eeeeee;
  font-size: 8px;
}
.racing-reference-orders-table {
  height: calc(100% - 36px);
  display: grid;
  grid-template-columns: 74px repeat(3, 34px) 34px minmax(68px, 1fr) 46px 62px 54px;
  grid-auto-rows: minmax(28px, 1fr);
  align-content: stretch;
  overflow: hidden;
  background: #181818;
}
.racing-reference-orders-table > * {
  min-width: 0;
  min-height: 0;
  padding: 0 3px;
  display: grid;
  place-content: center;
  overflow: hidden;
  border-right: 1px solid #111111;
  border-bottom: 1px solid #111111;
  color: #e4e4e4;
  font-size: 8px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.racing-reference-orders-table > strong { background: #474747; color: #ffffff; }
.racing-reference-orders-table > span:nth-child(9n + 6) { color: #f1d25d; font-weight: 800; }
.member-order-cancel {
  min-height: 26px;
  padding-inline: 9px;
  white-space: nowrap;
}
.member-order-cancel-unavailable { color: var(--muted); font-size: 8px; white-space: nowrap; }
.racing-reference-order-action .member-order-cancel { min-height: 22px; padding-inline: 6px; font-size: 8px; }
.finance-direct-actions { flex-wrap: nowrap; }
.finance-direct-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(160px, 220px) auto 36px;
  gap: 8px;
  align-items: end;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.finance-direct-filter-bar > input,
.finance-direct-filter-bar label,
.finance-direct-filter-bar select { min-width: 0; }
.member-funds-record[role="button"] { cursor: pointer; }
.member-funds-record[role="button"]:hover,
.member-funds-record[role="button"]:focus-visible {
  background: var(--surface-hover);
  outline: none;
}
.finance-direct-finished { color: var(--muted); white-space: nowrap; }
.finance-reference-list { display: grid; gap: 8px; }

@media (max-width: 760px) {
  .finance-direct-filter-bar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto 36px;
  }
  .finance-reference-table .table-scroll {
    overflow: visible;
  }
  .finance-reference-table table,
  .finance-reference-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .finance-reference-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
  }
  .finance-reference-table tbody {
    display: grid;
    gap: 8px;
    padding: 8px;
  }
  .finance-reference-table tbody tr:not(.table-empty-row) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    padding: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
  }
  .finance-reference-table tbody tr:not(.table-empty-row) > td {
    display: grid;
    grid-template-columns: minmax(52px, auto) minmax(0, 1fr);
    gap: 6px;
    min-width: 0;
    padding: 0;
    border: 0;
    align-items: center;
    white-space: normal;
    text-align: left;
  }
  .finance-reference-table tbody tr:not(.table-empty-row) > td::before {
    content: attr(data-column-label);
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
  }
  .finance-reference-table tbody tr:not(.table-empty-row) > td:last-child {
    grid-column: 1 / -1;
  }
  .finance-reference-table tbody tr:not(.table-empty-row) > td:last-child::before {
    align-self: start;
    padding-top: 7px;
  }
  .finance-reference-table .finance-direct-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }
}
.racing-reference-orders-panel .racing-recent-orders-empty {
  height: calc(100% - 36px);
  color: #a9a9a9;
}

.racing-reference-finance {
  height: 100%;
  padding: 0 8px 6px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f3f3f3;
  color: #1c1c1c;
}
.racing-reference-finance-head {
  min-height: 38px;
  margin: 0 -8px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #b8b8b8;
  background: #424242;
  color: #ffffff;
}
.racing-reference-finance-head strong { font-size: 13px; }
.racing-reference-finance-head button,
.racing-reference-finance-records {
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid #202020;
  border-radius: 2px;
  background: #696969;
  color: #ffffff;
  font-size: 8px;
}
.racing-reference-finance-notice {
  min-height: 38px;
  margin: 5px 0;
  padding: 5px 7px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  border: 1px solid #c9b47a;
  background: #fff8df;
}
.racing-reference-finance-notice b { color: #a96500; font-size: 9px; }
.racing-reference-finance-notice span { color: #4b4230; font-size: 8px; }
.racing-reference-account-invitation {
  min-height: 62px;
  padding: 6px 7px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border: 1px solid #bcbcbc;
  background: #ffffff;
}
.racing-reference-account-invitation > div:first-child { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 7px; }
.racing-reference-account-invitation span,
.racing-reference-account-invitation small { color: #777777; font-size: 8px; }
.racing-reference-account-invitation strong,
.racing-reference-account-invitation b { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.racing-reference-account-invitation small { grid-column: 1 / -1; }
.racing-reference-account-invitation > .btn { min-height: 30px; border-radius: 2px; }
.racing-reference-account-invitation > .member-funds-feedback { grid-column: 1 / -1; }
.racing-reference-finance-form {
  min-height: 0;
  margin-top: 5px;
  padding: 6px 7px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  gap: 5px 7px;
  border: 1px solid #bcbcbc;
  border-radius: 0;
  background: #ffffff;
}
.racing-reference-finance-form .member-funds-form-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.racing-reference-finance-form .member-funds-field {
  min-width: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
}
.racing-reference-finance-form .member-funds-field > span { color: #4d4d4d; font-size: 8px; }
.racing-reference-finance-form :where(input, select) {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 6px;
  border: 1px solid #a9a9a9;
  border-radius: 2px;
  background: #ffffff;
  color: #171717;
  font-size: 9px;
}
.racing-reference-finance-form .member-funds-payout-account {
  grid-column: 1 / -1;
  min-height: 32px;
  padding: 0 5px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  border: 1px solid #c8c8c8;
  color: #282828;
}
.racing-reference-finance-form .member-funds-available {
  grid-column: 1;
  min-height: 28px;
  display: flex;
  align-items: center;
  color: #555555;
  font-size: 8px;
}
.racing-reference-finance-form .member-funds-presets {
  grid-column: 1 / -1;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 2px;
}
.racing-reference-finance-form .member-funds-presets .btn {
  min-width: 0;
  min-height: 27px;
  padding: 0 2px;
  border: 1px solid #9b9b9b;
  border-radius: 2px;
  background: #eeeeee;
  color: #222222;
  font-size: 8px;
}
.racing-reference-finance-form > .btn.primary {
  grid-column: 2;
  grid-row: 3;
  min-width: 118px;
  min-height: 30px;
  border-radius: 2px;
  background: #2f9eda;
  color: #ffffff;
}
.racing-reference-finance-form .member-funds-feedback {
  grid-column: 1 / -1;
  min-height: 0;
  font-size: 8px;
}
.racing-reference-finance-form .member-funds-form-blocked {
  grid-column: 1 / -1;
  min-height: 58px;
  display: grid;
  place-content: center;
  color: #7b5e1d;
  font-size: 9px;
}
.racing-reference-finance-records { margin-top: 5px; align-self: flex-end; background: #555555; }
.racing-reference-finance-loading { flex: 1; display: grid; place-content: center; color: #666666; font-size: 10px; }

@media (min-width: 1181px) {
  .member-app-shell[data-view="racing"] .member-bottom-nav { display: none; }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .member-racing-reference-header {
    height: 90px;
    grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
  }
  .member-app-shell[data-view="racing"] .member-main { min-height: calc(100vh - 90px); }
  .member-app-shell[data-view="racing"] .member-content { width: 100%; }
  .racing-reference-workbench {
    height: auto;
    min-height: calc(100vh - 90px);
    grid-template-columns: minmax(0, 58fr) minmax(340px, 42fr);
    grid-template-rows: 420px 320px;
  }
  .member-racing-reference-products button,
  .member-racing-reference-actions button { font-size: 9px; }
  .racing-reference-slip { grid-template-columns: 142px minmax(0, 1fr); }
  .racing-reference-slip > .member-slip-body { grid-template-columns: 96px minmax(0, 1fr) 112px; }
  .racing-reference-slip .member-stake-presets { grid-template-columns: repeat(3, minmax(48px, 1fr)); overflow-x: auto; }
}

@media (max-width: 900px) {
  .member-racing-reference-header {
    position: static;
    width: 100%;
    height: auto;
    min-height: 112px;
    padding: 4px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 44px 62px;
    gap: 3px;
  }
  .member-racing-reference-products {
    grid-template-columns: repeat(6, minmax(96px, 1fr));
    overflow-x: auto;
  }
  .member-racing-reference-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .member-racing-reference-products button,
  .member-racing-reference-actions button { font-size: 9px; }
  .member-app-shell[data-view="racing"] .member-main { min-height: 0; }
  .member-app-shell[data-view="racing"] .member-content {
    width: 100%;
    padding: 4px 4px 72px;
    background: #2e2e2e;
  }
  .racing-reference-workbench {
    height: auto;
    padding: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 420px auto 390px auto;
    grid-template-areas:
      "odds"
      "controls"
      "utility"
      "orders";
    gap: 4px;
    overflow: visible;
    background: #2e2e2e;
  }
  .racing-reference-odds-panel,
  .racing-reference-utility-panel,
  .racing-reference-controls,
  .racing-reference-orders-panel { border-width: 3px; border-radius: 3px; }
  .racing-reference-odds-panel {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
  }
  .racing-reference-controls { overflow: visible; }
  .racing-reference-play-tabs { overscroll-behavior-x: contain; }
  .racing-reference-slip {
    min-height: 150px;
    grid-template-columns: 126px minmax(0, 1fr);
  }
  .racing-reference-slip > .member-slip-body {
    grid-template-columns: 92px minmax(0, 1fr) 104px;
  }
  .racing-reference-slip .member-stake-presets {
    grid-template-columns: repeat(3, minmax(48px, 1fr));
    overflow: visible;
  }
  .racing-reference-orders-panel { min-height: 260px; }
  .racing-reference-orders-table {
    min-width: 500px;
    overflow: visible;
  }
  .racing-reference-orders-panel .racing-recent-orders { overflow-x: auto; }
}

@media (max-width: 560px) {
  .member-racing-reference-header { grid-template-rows: 42px 66px; }
  .member-racing-reference-products { grid-template-columns: repeat(6, 94px); }
  .member-racing-reference-actions button { padding: 0 2px; font-size: 8px; }
  .racing-reference-workbench { grid-template-rows: 368px auto 330px auto; }
  .racing-reference-odds-panel { grid-template-rows: 34px minmax(0, 1fr); }
  .racing-reference-odds-head { grid-template-columns: 72px 88px minmax(0, 1fr); }
  .racing-reference-odds-tabs { grid-template-columns: repeat(2, 44px); }
  .racing-reference-odds-identity span { display: none; }
  .racing-reference-event-bar { grid-template-columns: 64px minmax(0, 1fr) 64px; }
  .racing-reference-event-bar > button { font-size: 8px; }
  .racing-reference-current-event { grid-template-columns: minmax(0, 1fr) auto; }
  .racing-reference-current-event span { display: none; }
  .racing-reference-play-tabs button { min-width: 72px; }
  .racing-reference-controls .racing-runner-picker-lane { grid-template-columns: 36px minmax(0, 1fr); }
  .racing-reference-slip {
    min-height: 224px;
    padding: 3px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 66px auto;
  }
  .racing-reference-slip > .racing-reference-asset-selector {
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .racing-reference-slip > .member-slip-body {
    grid-column: 1;
    grid-row: 2;
    min-height: 150px;
    grid-template-columns: 84px minmax(0, 1fr) 94px;
  }
  .racing-reference-slip .member-stake-presets { grid-template-columns: repeat(2, minmax(46px, 1fr)); }
  .racing-reference-slip .racing-slip-balance-state { left: 3px; }
  .racing-reference-finance { padding-right: 5px; padding-left: 5px; overflow-y: auto; }
  .racing-reference-finance-head { margin-right: -5px; margin-left: -5px; }
  .racing-reference-finance-form .member-funds-form-grid { grid-template-columns: minmax(0, 1fr); }
  .racing-reference-finance-form .member-funds-presets { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .racing-reference-finance-form > .btn.primary { grid-column: 1 / -1; grid-row: auto; }
}

/* Foundation 1.76 r17: premium member lobby and production racing workflow. */
.member-app-shell[data-view="home"] {
  --lobby-line: #303632;
  --lobby-panel: #121715;
  --lobby-panel-raised: #191f1c;
  --lobby-gold: #ddb84f;
  --lobby-teal: #32cbbd;
  --lobby-coral: #dc5658;
  background: #080a09;
}
.member-app-shell[data-view="home"] .member-main,
.member-app-shell[data-view="home"] .member-content { background: #080a09; }
.member-app-shell[data-view="home"] .member-content {
  width: min(1540px, 100%);
  max-width: 1540px;
  padding: 16px 18px 40px;
}
.member-lobby-hero {
  position: relative;
  min-height: 212px;
  padding: 28px 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 326px);
  align-items: center;
  gap: 26px;
  overflow: hidden;
  border: 1px solid #3a423d;
  border-radius: 4px;
  background-image:
    linear-gradient(90deg, rgba(5,8,7,.95) 0%, rgba(5,8,7,.72) 50%, rgba(5,8,7,.5) 100%),
    url("/assets/member/gaming-command-panorama-v1.png");
  background-position: center;
  background-size: cover;
  box-shadow: 0 18px 42px rgba(0,0,0,.32);
}
.member-lobby-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ddb84f 34%, #32cbbd 72%, transparent);
}
.member-lobby-hero > * { position: relative; z-index: 1; }
.member-lobby-hero .member-command-title { align-content: center; }
.member-lobby-hero .member-command-title h1 {
  margin: 0;
  color: #f5f4ee;
  font-size: 38px;
  font-weight: 760;
  letter-spacing: 0;
}
.member-lobby-hero .member-command-title p {
  margin: 8px 0 0;
  color: #b9c3bd;
  font-size: 11px;
}
.member-lobby-live-state {
  width: fit-content;
  margin-top: 22px;
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(214,224,217,.22);
  background: rgba(7,10,9,.74);
}
.member-lobby-live-item {
  min-width: 104px;
  min-height: 42px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: auto auto;
  align-content: center;
  gap: 1px 7px;
  border: 0;
  border-right: 1px solid rgba(214,224,217,.18);
  background: transparent;
  color: #dce3df;
  text-align: left;
}
.member-lobby-live-item:last-child { border-right: 0; }
.member-lobby-live-item:hover { background: rgba(50,203,189,.12); }
.member-lobby-live-item span { font-size: 8px; }
.member-lobby-live-item b { color: #32cbbd; font-size: 13px; font-variant-numeric: tabular-nums; }
.member-lobby-live-item small { grid-column: 1 / -1; color: #8f9b95; font-size: 7px; }
.member-lobby-hero .member-command-account {
  width: 100%;
  min-height: 156px;
  padding: 18px;
  align-content: center;
  border: 1px solid rgba(218,226,221,.22);
  border-radius: 4px;
  background: rgba(8,12,10,.84);
  box-shadow: 0 14px 34px rgba(0,0,0,.3);
}
.member-lobby-hero .member-command-account > span { color: #aab5af; font-size: 9px; }
.member-lobby-hero .member-command-account > strong { color: #e6c45e; font-size: 25px; }
.member-lobby-hero .member-command-account > b { color: #64d9ad; font-size: 13px; }
.member-lobby-quick-actions {
  margin-top: 13px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
.member-lobby-quick-actions button {
  min-width: 0;
  min-height: 34px;
  padding: 0 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #3d4741;
  border-radius: 3px;
  background: linear-gradient(#252c28, #171c19);
  color: #d8dfda;
  font-size: 8px;
  font-weight: 750;
  white-space: nowrap;
}
.member-lobby-quick-actions button:hover { border-color: #d6b651; color: #f2d77d; }
.member-lobby-quick-actions svg { width: 13px; height: 13px; }

.member-app-shell[data-view="home"] .member-brand-banner {
  margin-top: 10px;
  min-height: 50px;
  border: 1px solid var(--lobby-line);
  border-radius: 3px;
  background: #101512;
}
.member-app-shell[data-view="home"] .member-product-grid {
  margin-top: 10px;
  gap: 8px;
}
.member-app-shell[data-view="home"] .member-product-card {
  min-height: 274px;
  display: grid;
  grid-template-rows: 136px minmax(84px, auto) 40px;
  overflow: hidden;
  border: 1px solid var(--lobby-line);
  border-radius: 4px;
  background: var(--lobby-panel);
  color: #eef2ef;
  box-shadow: 0 12px 26px rgba(0,0,0,.2);
  transition: border-color 160ms ease-out, background 160ms ease-out, transform 160ms ease-out;
}
.member-app-shell[data-view="home"] .member-product-card:hover {
  z-index: 1;
  border-color: #68746c;
  background: var(--lobby-panel-raised);
  transform: translateY(-2px);
}
.member-app-shell[data-view="home"] .member-product-card:focus-visible {
  outline: 2px solid var(--lobby-gold);
  outline-offset: 2px;
}
.member-app-shell[data-view="home"] .member-product-visual {
  position: relative;
  min-height: 0;
  aspect-ratio: auto;
  padding: 0;
  overflow: hidden;
  order: -1;
  border: 0;
  border-bottom: 1px solid var(--lobby-line);
  background: #090c0a;
}
.member-product-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 280ms ease-out, filter 280ms ease-out;
}
.member-product-visual.racing .member-product-scene { object-position: 4% center; }
.member-product-visual.sports .member-product-scene { object-position: 53% center; }
.member-product-visual.casino .member-product-scene { object-position: 87% center; }
.member-product-visual.mini .member-product-scene { object-position: 100% 70%; }
.member-product-card:hover .member-product-scene { transform: scale(1.055); filter: saturate(1.08) brightness(1.05); }
.member-product-scene-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4,7,6,.06), rgba(4,7,6,.76));
}
.member-product-live-state {
  position: absolute;
  left: 10px;
  bottom: 9px;
  min-height: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(237,241,238,.25);
  border-radius: 3px;
  background: rgba(7,10,9,.82);
  color: #e8eee9;
  font-size: 8px;
}
.member-product-live-state svg { width: 13px; height: 13px; color: var(--lobby-teal); }
.member-product-live-state span { color: #aab6af; }
.member-product-live-state b { color: #f0cb62; font-variant-numeric: tabular-nums; }
.member-app-shell[data-view="home"] .member-product-copy {
  min-height: 0;
  padding: 13px 14px 10px;
  align-content: center;
  border: 0;
}
.member-app-shell[data-view="home"] .member-product-copy > span { color: #8e9a93; font-size: 8px; }
.member-app-shell[data-view="home"] .member-product-copy h2 { margin-top: 4px; color: #f4f5f1; font-size: 18px; }
.member-app-shell[data-view="home"] .member-product-copy p { margin-top: 6px; color: #a7b1ab; font-size: 9px; line-height: 1.45; }
.member-app-shell[data-view="home"] .member-product-foot {
  min-height: 40px;
  padding: 0 13px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 14px;
  gap: 7px;
  border-top: 1px solid var(--lobby-line);
  background: #0d120f;
}
.member-app-shell[data-view="home"] .member-product-foot b { color: #45d5c7; font-size: 9px; }
.member-app-shell[data-view="home"] .member-product-foot span { color: #c9d1cc; font-size: 8px; }
.member-app-shell[data-view="home"] .member-product-foot svg { width: 13px; height: 13px; color: #ddb84f; }
.member-app-shell[data-view="home"] .member-home-section {
  margin-top: 12px;
  border: 1px solid var(--lobby-line);
  border-radius: 3px;
  background: var(--lobby-panel);
}
.member-app-shell[data-view="home"] .member-section-title {
  min-height: 45px;
  padding: 0 13px;
  border-bottom: 1px solid var(--lobby-line);
  background: #171d19;
}
.member-app-shell[data-view="home"] .member-home-events { border: 0; }
.member-app-shell[data-view="home"] .member-home-event {
  min-height: 54px;
  padding: 0 12px;
  grid-template-columns: 88px minmax(0, 1fr) 138px 16px;
  border-bottom: 1px solid #29302c;
  background: #101512;
  color: #e5ebe7;
}
.member-app-shell[data-view="home"] .member-home-event:hover { background: #18201c; }
.member-app-shell[data-view="home"] .member-home-event .event-code {
  min-height: 25px;
  border: 1px solid #44504a;
  border-radius: 2px;
  background: #1d2521;
  color: #b9c6bf;
}
.member-app-shell[data-view="home"] .member-home-event > div b { font-size: 10px; }
.member-app-shell[data-view="home"] .member-home-event > div span { color: #87948d; font-size: 8px; }
.member-home-event-time { display: grid; justify-items: end; gap: 3px; }
.member-app-shell[data-view="home"] .member-home-event-time span { color: #8f9c95; font-size: 8px; }
.member-app-shell[data-view="home"] .member-home-event-time strong { color: #e5c45e; font-size: 9px; font-variant-numeric: tabular-nums; }
.member-app-shell[data-view="home"] .member-home-event > svg { width: 14px; height: 14px; color: #657269; }

.member-app-shell[data-view="racing"] {
  --race-bg: #060807;
  --race-panel: #111513;
  --race-panel-raised: #181d1a;
  --race-line: #303732;
  --race-line-strong: #465148;
  --race-text: #eef2ee;
  --race-muted: #94a098;
  --race-teal: #29c8bb;
  --race-gold: #dbb84f;
  --race-coral: #d94f52;
  background: var(--race-bg);
}
.member-app-shell[data-view="racing"] .member-body,
.member-app-shell[data-view="racing"] .member-main { background: var(--race-bg); }
.member-app-shell[data-view="racing"] .member-content {
  width: min(1400px, 100%);
  max-width: 1400px;
  background: #0b0e0c;
  color: var(--race-text);
}
.member-racing-reference-header {
  width: min(1400px, 100%);
  height: 82px;
  padding: 5px;
  grid-template-columns: 72px minmax(0, 748px) minmax(0, 566px);
  gap: 4px;
  border-bottom: 1px solid #3b443e;
  background: #0a0d0b;
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
}
.member-racing-reference-home,
.member-racing-reference-products button,
.member-racing-reference-actions button {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #363d38;
  border-radius: 3px;
  background: linear-gradient(#262c28, #151916);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 3px 8px rgba(0,0,0,.18);
  color: #d9e0db;
  font-weight: 760;
}
.member-racing-reference-home {
  display: grid;
  place-content: center;
  gap: 4px;
  color: #e7c865;
}
.member-racing-reference-home svg { width: 17px; height: 17px; margin: auto; }
.member-racing-reference-home span { font-size: 7px; }
.member-racing-reference-products { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; }
.member-racing-reference-products,
.racing-live-products,
.racing-live-status-tabs,
.racing-reference-play-tabs,
.racing-runner-picker-controls {
  scrollbar-width: none;
}
.member-racing-reference-products::-webkit-scrollbar,
.racing-live-products::-webkit-scrollbar,
.racing-live-status-tabs::-webkit-scrollbar,
.racing-reference-play-tabs::-webkit-scrollbar,
.racing-runner-picker-controls::-webkit-scrollbar { display: none; }
.member-racing-reference-products button {
  padding: 0 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  text-align: left;
}
.member-racing-reference-products button span {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-racing-reference-products button small { color: #78857d; font-size: 7px; white-space: nowrap; }
.member-racing-reference-products button:hover { border-color: #66736a; background: linear-gradient(#303833, #1b211d); }
.member-racing-reference-products button.active {
  border-color: #55cfc4;
  background: linear-gradient(#167e75, #0d4f49);
  color: #ffffff;
  box-shadow: inset 0 2px 0 rgba(127,244,230,.38), 0 4px 12px rgba(0,0,0,.24);
}
.member-racing-reference-products button.active small { color: #b9f0ea; }
.member-racing-reference-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 3px; }
.member-racing-reference-actions button {
  padding: 0 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 8px;
  white-space: nowrap;
}
.member-racing-reference-actions button svg { width: 13px; height: 13px; color: #87958c; }
.member-racing-reference-actions button:hover { border-color: #d0ae49; color: #f1d87d; }
.member-racing-reference-actions button:hover svg { color: #f1d87d; }
.member-racing-reference-actions button.active {
  border-color: #d9b54c;
  background: linear-gradient(#98752a, #5f4616);
  color: #fff5d3;
}
.member-racing-reference-actions button.active svg { color: #fff0b8; }
.member-racing-reference-home:active,
.member-racing-reference-products button:active,
.member-racing-reference-actions button:active,
.racing-reference-play-tabs button:active,
.racing-reference-controls .racing-runner-picker-controls button:active,
.racing-reference-slip .member-stake-presets button:active { transform: translateY(1px); }
.member-racing-reference-header :where(button):focus-visible {
  outline: 2px solid #f0cf69;
  outline-offset: 1px;
}

.member-app-shell[data-view="racing"] .racing-live-toolbar {
  min-height: 104px;
  border: 1px solid var(--race-line);
  background: #101412;
}
.member-app-shell[data-view="racing"] .racing-live-heading { border-color: var(--race-line); background: #171c19; }
.member-app-shell[data-view="racing"] .racing-live-heading > div { color: #f0f2ee; font-size: 12px; }
.member-app-shell[data-view="racing"] .racing-live-heading > span { color: var(--race-muted); }
.member-app-shell[data-view="racing"] .racing-live-products { background: #0f1311; }
.member-app-shell[data-view="racing"] .racing-live-products button,
.member-app-shell[data-view="racing"] .racing-live-status-tabs button {
  border-color: #2e3530;
  background: #151a17;
  color: #aeb9b2;
}
.member-app-shell[data-view="racing"] .racing-live-products button:hover,
.member-app-shell[data-view="racing"] .racing-live-status-tabs button:hover { background: #202722; color: #eef2ee; }
.member-app-shell[data-view="racing"] .racing-live-products button.active {
  border-color: #2dc9bc;
  background: #123c36;
  color: #73e0d5;
  box-shadow: inset 0 -2px 0 #31c9bd;
}
.member-app-shell[data-view="racing"] .racing-live-status-tabs { border-color: var(--race-line); background: #101412; }
.member-app-shell[data-view="racing"] .racing-live-status-tabs button.active {
  border-color: #d3b14b;
  background: #3e3216;
  color: #f0d77b;
}
.racing-live-refresh {
  width: 34px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-content: center;
  border: 1px solid #445047;
  border-radius: 3px;
  background: #1b211d;
  color: #cdd5cf;
}
.racing-live-refresh:hover { border-color: #38cbbf; color: #60ddd2; }
.racing-live-refresh svg { width: 15px; height: 15px; }

.member-app-shell[data-view="racing"] .member-racing-list {
  border-color: var(--race-line);
  background: #0e1210;
}
.member-app-shell[data-view="racing"] .member-racing-list-head {
  min-height: 50px;
  border-color: var(--race-line);
  background: #181e1a;
}
.member-app-shell[data-view="racing"] .member-racing-table th {
  height: 38px;
  border-color: #303732;
  background: #202621;
  color: #a8b3ac;
}
.member-app-shell[data-view="racing"] .member-racing-table td {
  height: 45px;
  border-color: #272e29;
  color: #cbd3ce;
}
.member-app-shell[data-view="racing"] .member-racing-table tbody tr { background: #0f1311; }
.member-app-shell[data-view="racing"] .member-racing-table tbody tr:nth-child(2n) { background: #131815; }
.member-app-shell[data-view="racing"] .member-racing-table tbody tr:hover { background: #1c241f; }
.member-app-shell[data-view="racing"] .member-racing-table tbody tr.bettable { box-shadow: inset 2px 0 0 #d9b64e; }
.member-app-shell[data-view="racing"] .member-racing-table tbody tr.state-live { box-shadow: inset 2px 0 0 #d95052; }
.member-app-shell[data-view="racing"] .member-racing-row-link { color: #f0f3ef; }
.member-app-shell[data-view="racing"] .member-racing-row-link:hover { color: #5ed8cc; text-decoration: none; }
.member-app-shell[data-view="racing"] .member-racing-status {
  border-radius: 2px;
  background: #1b211d;
}
.member-app-shell[data-view="racing"] .member-racing-status.open,
.member-app-shell[data-view="racing"] .member-racing-status.live { border-color: #287e69; background: #15392f; color: #7ce3bb; }
.member-app-shell[data-view="racing"] .member-racing-status.upcoming { border-color: #6a5b2d; background: #352d16; color: #ead27b; }
.member-app-shell[data-view="racing"] .racing-preview-action {
  border-color: #475249;
  background: #1b211d;
  color: #c3cdc6;
}
.member-app-shell[data-view="racing"] .racing-preview-action:hover { border-color: #35c8bb; color: #68ddd2; }

.racing-reference-workbench {
  width: 100%;
  height: 790px;
  padding: 5px;
  grid-template-columns: minmax(0, 59fr) minmax(0, 41fr);
  grid-template-rows: 454px 326px;
  gap: 5px;
  background: #0b0e0c;
}
.racing-reference-odds-panel,
.racing-reference-utility-panel,
.racing-reference-controls,
.racing-reference-orders-panel {
  border: 1px solid var(--race-line-strong);
  border-radius: 4px;
  background: var(--race-panel);
  box-shadow: 0 9px 22px rgba(0,0,0,.2);
}
.racing-reference-odds-panel { grid-template-rows: 38px minmax(0, 1fr); }
.racing-reference-odds-head {
  grid-template-columns: 90px 116px minmax(0, 1fr);
  gap: 0;
  border-bottom: 1px solid #333b35;
  background: #171c19;
}
.racing-reference-odds-head button {
  border: 0;
  border-right: 1px solid #333b35;
  border-radius: 0;
  background: #242a26;
  color: #d7ded9;
}
.racing-reference-odds-head button:hover,
.racing-reference-odds-head button.active { background: #8e3033; }
.racing-reference-odds-tabs { grid-template-columns: repeat(2, 58px); }
.racing-reference-odds-identity { color: #f0f2ee; }
.racing-reference-odds-identity span { color: #93a097; }
.racing-reference-odds-panel .racing-matrix-scroll { background: #eeeee9; scrollbar-color: #6d756f #d2d4ce; }
.racing-reference-odds-panel .racing-symmetric-matrix {
  min-width: max(100%, calc(40px + var(--racing-runner-count) * 48px));
  grid-template-columns: 40px repeat(var(--racing-runner-count), minmax(48px, 1fr));
}
.racing-reference-odds-panel :where(.racing-matrix-corner, .racing-matrix-header) { background: #252a27; color: #f4f4ef; }
.racing-reference-odds-panel .racing-matrix-cell.diagonal { background: #242925; color: #ffffff; }
.racing-reference-odds-panel .racing-matrix-cell.unavailable { background: #e5e5df; color: #81847f; }
.member-app-shell[data-view="racing"] .racing-reference-odds-panel .racing-matrix-cell.odds { background: #f7f7f1; color: #111310; }
.member-app-shell[data-view="racing"] .racing-reference-odds-panel .racing-matrix-cell.odds.lower { background: #dfe2dc; }
.member-app-shell[data-view="racing"] .racing-reference-odds-panel .racing-matrix-cell.odds:hover { background: #fff4cb; }
.member-app-shell[data-view="racing"] .racing-reference-odds-panel .racing-matrix-cell.odds.selected {
  background: #bd3d40;
  color: #ffffff;
  box-shadow: inset 0 0 0 2px #7a1f22;
}
.racing-reference-odds-panel .racing-market-matrix { background: #ecece6; }
.racing-reference-odds-panel .racing-market-row { border-color: #b7bcb6; background: #efefe9; color: #151814; }
.racing-reference-odds-panel .racing-pending-market-row .primary-cell strong { color: #242a25; }
.racing-reference-odds-panel .racing-pending-market-row .primary-cell small { color: #6d756f; }
.racing-pending-odd-value {
  min-height: 30px;
  display: grid;
  place-content: center;
  border: 1px solid #b8bcb7;
  background: #dadcd6;
  color: #777d77;
}

.racing-reference-utility-panel > .racing-broadcast-panel { background: #050706; }
.racing-reference-utility-panel .racing-broadcast-source-tabs {
  min-height: 36px;
  border-color: #303732;
  background: #171c19;
}
.racing-reference-utility-panel .racing-broadcast-source-tabs button {
  min-height: 28px;
  border-color: #39413b;
  border-radius: 2px;
  background: linear-gradient(#2a302c, #1c211e);
  color: #cbd3ce;
}
.racing-reference-utility-panel .racing-broadcast-source-tabs button.active { background: #176d67; color: #ffffff; }
.racing-reference-utility-panel .racing-broadcast-media { background: #020302; }
.racing-reference-utility-panel .racing-broadcast-footer { background: #171c19; color: #aab4ad; }

.racing-reference-controls { background: #101411; }
.racing-reference-event-bar { min-height: 38px; border-color: #303732; background: #1b211d; }
.racing-reference-event-bar > button {
  border-color: #303732;
  background: linear-gradient(#2d342f, #1c211e);
  color: #d6ddd8;
}
.racing-reference-event-bar > button:hover:not(:disabled) { color: #f0d67b; }
.racing-reference-current-event b { color: #f0ca61; }
.racing-reference-play-tabs {
  min-height: 42px;
  padding: 3px;
  border-color: #303732;
  background: #171c19;
  scrollbar-color: #566159 #111513;
}
.racing-reference-play-tabs button {
  min-width: 78px;
  min-height: 34px;
  border-color: #3b433d;
  border-radius: 3px;
  background: linear-gradient(#2c332e, #1b201d);
  color: #c9d2cc;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.racing-reference-play-tabs button:hover:not(:disabled) { border-color: #6e7a71; color: #ffffff; }
.member-app-shell[data-view="racing"] .racing-reference-play-tabs button.active {
  border-color: #ec7c7e;
  background: linear-gradient(#c2474a, #8e292c);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 3px 8px rgba(0,0,0,.2);
}
.racing-reference-controls .racing-runner-picker {
  padding: 4px;
  border-color: #303732;
  background: #202622;
}
.racing-reference-controls .racing-runner-picker-lanes { gap: 3px; }
.racing-reference-controls .racing-runner-picker-lane { min-height: 31px; grid-template-columns: 45px minmax(0, 1fr); gap: 3px; }
.racing-reference-controls .racing-runner-picker-lane > strong {
  min-height: 29px;
  border: 1px solid #343b36;
  border-radius: 2px;
  background: #111512;
  color: #aeb9b2;
}
.racing-reference-controls .racing-runner-picker-controls { gap: 3px; scrollbar-color: #58635b #171c19; }
.racing-reference-controls .racing-runner-picker-controls button {
  min-width: 40px;
  height: 29px;
  flex: 1 0 40px;
  border: 1px solid #3a423c;
  border-radius: 2px;
  background: linear-gradient(#303732, #1b201d);
  color: #e5ebe6;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  display: grid;
  place-content: center;
  grid-template-columns: none;
  padding: 0 8px;
  text-align: center;
}
.racing-reference-controls .racing-runner-picker-controls button b {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.racing-reference-controls .racing-runner-picker-controls button:hover:not(:disabled) { border-color: #d5b54d; color: #f3d87a; }
.racing-reference-controls .racing-runner-picker-controls button.selected {
  border-color: #f08a8c;
  background: linear-gradient(#ca4d50, #90272a);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 2px 6px rgba(0,0,0,.24);
}
.racing-reference-controls .racing-runner-picker-controls button:disabled {
  border-color: #2b302c;
  background: #171b18;
  color: #515a54;
}
.racing-reference-pending-message {
  min-height: 26px;
  border-color: #5d4c24;
  background: #332a14;
  color: #eed47c;
}

.racing-reference-slip {
  padding: 4px;
  grid-template-columns: 164px minmax(0, 1fr);
  grid-template-rows: 34px minmax(0, 1fr);
  gap: 4px;
  background: #101411;
}
.racing-reference-slip .racing-reference-asset-selector button {
  border-color: #3a423c;
  border-radius: 3px;
  background: linear-gradient(#2a302c, #1a1f1c);
  color: #d8e0da;
}
.racing-reference-slip .racing-reference-asset-selector button:hover { border-color: #69756c; }
.racing-reference-slip .racing-reference-asset-selector button.active {
  border-color: #e2bd53;
  background: linear-gradient(#66501c, #3e3010);
  color: #fff4cb;
}
.racing-reference-slip .racing-reference-asset-selector b { color: #f0ce6e; }
.racing-reference-slip > .member-slip-body { grid-template-columns: 120px minmax(0, 1fr) 150px; gap: 4px; }
.racing-reference-slip .member-amount-field input {
  border-color: #90998f;
  border-radius: 2px;
  background: #f5f5ef;
  color: #10130f;
  font-size: 11px;
  font-weight: 780;
}
.racing-reference-slip .member-amount-field input:focus { outline: 2px solid #35cabe; outline-offset: 0; }
.racing-reference-slip .member-stake-presets { gap: 3px; }
.racing-reference-slip .member-stake-presets button {
  min-height: 29px;
  border-color: #3c443e;
  border-radius: 3px;
  background: linear-gradient(#303732, #1b201d);
  color: #dce3de;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
}
.racing-reference-slip .member-stake-presets button:hover { border-color: #d5b54d; background: linear-gradient(#413a24, #282112); color: #f4da80; }
.racing-reference-slip .member-stake-presets button.selected {
  border-color: #4ad1c5;
  background: linear-gradient(#177b72, #0d4d47);
  color: #ffffff;
}
.racing-reference-slip .member-stake-presets .racing-stake-reset { background: #151a17; color: #d9bd65; }
.racing-reference-slip .racing-slip-totals { border-color: #343b36; border-radius: 2px; background: #1a201c; }
.racing-reference-slip .racing-slip-totals > b { color: #f0cf6e; font-size: 9px; }
.racing-reference-slip .racing-slip-balance-state { color: #b7c1ba; }
.racing-reference-slip .member-submit-bet {
  border: 1px solid #f0ce6b;
  border-radius: 3px;
  background: linear-gradient(#edca62, #b88c28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 5px 14px rgba(0,0,0,.28);
  color: #211a08;
  font-size: 11px;
}
.racing-reference-slip .member-submit-bet:hover:not(:disabled) { filter: brightness(1.08); }
.racing-reference-slip .member-submit-bet:disabled {
  border-color: #454c46;
  background: #252b27;
  box-shadow: none;
  color: #747e77;
}
.racing-slip-preview {
  min-height: 30px;
  padding: 0 7px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border: 1px solid #3e4740;
  background: #171d19;
}
.racing-slip-preview span { color: #9ca9a0; font-size: 8px; }
.racing-slip-preview strong { overflow: hidden; color: #e8eee9; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.racing-slip-preview b { color: #e8ca6a; font-size: 9px; }

.racing-reference-orders-panel .racing-recent-orders { background: #101411; }
.racing-reference-orders-panel .racing-recent-orders-head { border-color: #303732; background: #1b211d; }
.racing-reference-orders-panel .racing-recent-orders-head button {
  border-color: #414a43;
  border-radius: 3px;
  background: #252c27;
}
.racing-reference-orders-table { background: #0c0f0d; }
.racing-reference-orders-table > * { border-color: #29302b; color: #d3dbd5; }
.racing-reference-orders-table > strong { background: #252c27; color: #f0f2ef; }
.racing-reference-orders-table > span:nth-child(9n + 6) { color: #e9c75f; }

.racing-reference-finance {
  padding: 0 9px 7px;
  background: #101411;
  color: #e7ece8;
}
.racing-reference-finance-head {
  min-height: 40px;
  margin: 0 -9px;
  border-color: #303732;
  background: #1b211d;
}
.racing-reference-finance-head button,
.racing-reference-finance-records {
  border-color: #414a43;
  border-radius: 3px;
  background: #252c27;
  color: #dbe2dd;
}
.racing-reference-finance-notice {
  border-color: #68582b;
  border-radius: 2px;
  background: #2f2815;
}
.racing-reference-finance-notice b { color: #f2cf6c; }
.racing-reference-finance-notice span { color: #d6c79b; }
.racing-reference-account-invitation,
.racing-reference-finance-form {
  border-color: #39423b;
  background: #171d19;
  color: #e7ece8;
}
.racing-reference-account-invitation span,
.racing-reference-account-invitation small { color: #8f9c94; }
.racing-reference-finance-form .member-funds-field > span { color: #9aa69e; }
.racing-reference-finance-form :where(input, select) {
  border-color: #4a554c;
  background: #0d110e;
  color: #edf1ee;
}
.racing-reference-finance-form :where(input, select):focus { outline: 2px solid #35cabe; border-color: #35cabe; }
.racing-reference-finance-form .member-funds-payout-account { border-color: #3d463f; color: #e1e8e3; }
.racing-reference-finance-form .member-funds-available { color: #dfc66a; }
.racing-reference-finance-form .member-funds-presets .btn {
  border-color: #465047;
  border-radius: 3px;
  background: linear-gradient(#2d342f, #1b201d);
  color: #dbe2dd;
}
.racing-reference-finance-form .member-funds-presets .btn:hover { border-color: #d5b54d; color: #f2d77b; }
.racing-reference-finance-form > .btn.primary {
  border: 1px solid #45d4c7;
  border-radius: 3px;
  background: linear-gradient(#1ba99d, #116a63);
  color: #ffffff;
}
.racing-reference-finance-form .member-funds-form-blocked { color: #d4bd7c; }

@media (min-width: 1181px) {
  .member-app-shell[data-view="racing"] .member-main { min-height: calc(100vh - 82px); }
}

@media (max-width: 1180px) {
  .member-lobby-hero { min-height: 196px; }
  .member-app-shell[data-view="home"] .member-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-racing-reference-header {
    height: 94px;
    grid-template-columns: 66px minmax(0, 58fr) minmax(370px, 42fr);
  }
  .member-racing-reference-products button { padding: 0 5px; }
  .member-racing-reference-products button small { display: none; }
  .racing-reference-workbench {
    height: auto;
    min-height: calc(100vh - 94px);
    grid-template-columns: minmax(0, 58fr) minmax(350px, 42fr);
    grid-template-rows: 440px 334px;
  }
  .racing-reference-slip { grid-template-columns: 142px minmax(0, 1fr); }
  .racing-reference-slip > .member-slip-body { grid-template-columns: 100px minmax(0, 1fr) 116px; }
}

@media (max-width: 900px) {
  .member-app-shell[data-view="home"] .member-content { padding: 12px 12px 82px; }
  .member-lobby-hero { min-height: 220px; padding: 22px; }
  .member-lobby-hero .member-command-account { width: min(300px, 44%); }
  .member-racing-reference-header {
    min-height: 112px;
    padding: 4px;
    grid-template-columns: 60px minmax(0, 1fr);
    grid-template-rows: 44px 62px;
  }
  .member-racing-reference-home { grid-column: 1; grid-row: 1; }
  .member-racing-reference-products { grid-column: 2; grid-row: 1; grid-template-columns: repeat(6, 108px); overflow-x: auto; }
  .member-racing-reference-actions { grid-column: 1 / -1; grid-row: 2; }
  .member-app-shell[data-view="racing"] .member-content { padding: 4px 4px 72px; background: #090c0a; }
  .racing-reference-workbench {
    height: auto;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 430px auto 370px auto;
    gap: 5px;
    background: #090c0a;
  }
  .racing-reference-odds-panel,
  .racing-reference-utility-panel,
  .racing-reference-controls,
  .racing-reference-orders-panel { border-width: 1px; }
  .racing-reference-slip { min-height: 160px; }
}

@media (max-width: 600px) {
  .member-lobby-hero .member-command-title h1 { font-size: 30px; }
  .member-app-shell[data-view="home"] .member-product-grid { grid-template-columns: minmax(0, 1fr); }
  .member-app-shell[data-view="home"] .member-product-card { min-height: 246px; grid-template-rows: 126px minmax(78px, auto) 40px; }
  .member-lobby-hero {
    min-height: 330px;
    padding: 20px 16px;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    align-content: space-between;
    background-position: 25% center;
  }
  .member-lobby-hero .member-command-account { width: 100%; min-height: 118px; padding: 13px; }
  .member-lobby-live-state { width: 100%; margin-top: 16px; }
  .member-lobby-live-item { min-width: 0; flex: 1; padding: 0 8px; }
  .member-lobby-quick-actions { margin-top: 8px; }
  .member-app-shell[data-view="home"] .member-home-event {
    min-height: 64px;
    grid-template-columns: 72px minmax(0, 1fr) 16px;
  }
  .member-app-shell[data-view="home"] .member-home-event-time { display: none; }
  .member-racing-reference-header { grid-template-rows: 44px 66px; }
  .member-racing-reference-products { grid-template-columns: repeat(6, 100px); }
  .member-racing-reference-actions button { padding: 0 3px; font-size: 9px; }
  .member-racing-reference-actions button svg { width: 11px; height: 11px; }
  .racing-reference-workbench { grid-template-rows: 374px auto 334px auto; }
  .racing-reference-odds-head { grid-template-columns: 72px 90px minmax(0, 1fr); }
  .racing-reference-controls .racing-runner-picker-lane { grid-template-columns: 38px minmax(0, 1fr); }
  .racing-reference-slip {
    min-height: 272px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 64px auto;
  }
  .racing-reference-slip > .racing-reference-asset-selector { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .racing-reference-slip > .member-slip-body {
    min-height: 198px;
    grid-template-columns: minmax(0, 1fr) 112px;
    grid-template-rows: 38px auto 58px auto;
  }
  .racing-reference-slip .member-amount-field {
    grid-column: 1 / -1;
    grid-row: 1;
    grid-template-columns: 72px minmax(0, 1fr);
  }
  .racing-reference-slip .member-stake-presets {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .racing-reference-slip .racing-slip-totals { grid-column: 1; grid-row: 3; }
  .racing-reference-slip .racing-slip-balance-state { grid-column: 1 / -1; grid-row: 4; }
  .racing-reference-slip .member-submit-bet { grid-column: 2; grid-row: 3; min-height: 58px; }
  .racing-reference-finance { overflow-y: auto; }
  .racing-reference-finance-form .member-funds-form-grid { grid-template-columns: minmax(0, 1fr); }
  .racing-reference-finance-form .member-funds-presets { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .racing-reference-finance-form > .btn.primary { grid-column: 1 / -1; grid-row: auto; }
}

/* Compact admin workspaces: one page title, inline facts, recent pages, and table-first list views. */
body[data-role="ADMIN"] .admin-page-context {
  margin: 0 0 8px;
  display: block;
  overflow: visible;
  border-radius: 3px;
}
body[data-role="ADMIN"] .admin-page-context-header {
  min-height: 54px;
  padding: 0 9px;
  display: grid;
  grid-template-columns: minmax(168px, 220px) minmax(0, 1fr) max-content;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid var(--admin-line);
  background: var(--admin-surface-alt);
}
body[data-role="ADMIN"] .admin-page-context-identity {
  min-width: 0;
  height: 54px;
  padding: 0 10px 0 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: 1fr;
  align-items: center;
  gap: 8px;
  border-right: 1px solid var(--admin-line);
}
body[data-role="ADMIN"] .admin-page-context-icon {
  width: 30px;
  height: 30px;
}
body[data-role="ADMIN"] .admin-page-title-line {
  min-width: 0;
  display: block;
  overflow: hidden;
}
body[data-role="ADMIN"] .admin-page-title-line > h1 {
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-role="ADMIN"] .admin-page-context-metrics {
  min-width: 0;
  height: 54px;
  display: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(76px, 1fr);
  align-items: stretch;
  overflow: hidden;
}
body[data-role="ADMIN"] .admin-page-context.has-page-metrics .admin-page-context-metrics { display: grid; }
body[data-role="ADMIN"] .admin-page-context-metrics > :is(.kpi, .compact-summary-item, .order-monitor-status-fact) {
  min-width: 0;
  min-height: 54px;
  margin: 0;
  padding: 7px 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  gap: 3px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid var(--admin-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body[data-role="ADMIN"] .admin-page-context-metrics > :is(.kpi, .compact-summary-item, .order-monitor-status-fact):last-child { border-right: 0; }
body[data-role="ADMIN"] .admin-page-context-metrics .kpi-label {
  min-width: 0;
  display: block;
  overflow: hidden;
  color: var(--admin-muted);
  font-size: 8px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-role="ADMIN"] .admin-page-context-metrics .kpi-tone { display: none; }
body[data-role="ADMIN"] .admin-page-context-metrics .kpi-value {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--admin-ink);
  font-size: 15px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-role="ADMIN"] .admin-page-context-metrics .kpi-note { display: none; }
body[data-role="ADMIN"] .admin-page-context-metrics .compact-summary-item > span,
body[data-role="ADMIN"] .admin-page-context-metrics .compact-summary-item > small,
body[data-role="ADMIN"] .admin-page-context-metrics .order-monitor-status-fact > small {
  min-width: 0;
  display: block;
  overflow: hidden;
  color: var(--admin-muted);
  font-size: 8px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-role="ADMIN"] .admin-page-context-metrics .compact-summary-item > b,
body[data-role="ADMIN"] .admin-page-context-metrics .order-monitor-status-fact > strong {
  min-width: 0;
  grid-row: auto;
  grid-column: auto;
  margin: 0;
  overflow: hidden;
  color: var(--admin-ink);
  font-size: 15px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-role="ADMIN"] .admin-page-context-actions {
  min-width: max-content;
  height: 54px;
  padding-left: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  border-left: 1px solid var(--admin-line);
}
body[data-role="ADMIN"] .admin-page-context-actions .btn { white-space: nowrap; }
body[data-role="ADMIN"] .admin-page-context-actions .btn.icon { width: 30px; min-height: 30px; }
body[data-role="ADMIN"] .admin-page-context-actions .admin-page-copy-editor-placeholder {
  visibility: hidden;
  pointer-events: none;
}
body[data-role="ADMIN"] .admin-page-context-actions .admin-page-guide-trigger { max-width: 116px; min-height: 30px; padding: 0 8px; }

body[data-role="ADMIN"] .admin-page-context-toolbar {
  min-width: 0;
  min-height: 37px;
  display: grid;
  grid-template-columns: minmax(190px, .9fr) minmax(220px, 1.2fr) max-content;
  align-items: stretch;
  background: var(--admin-input);
}
body[data-role="ADMIN"] .admin-page-context-toolbar > * { min-width: 0; }
body[data-role="ADMIN"] .admin-page-siblings {
  min-width: 0;
  display: flex;
  overflow: hidden;
  border: 0;
  border-right: 1px solid var(--admin-line);
  background: transparent;
}
body[data-role="ADMIN"] .admin-page-siblings button {
  min-width: 0;
  height: 36px;
  padding: 0 9px;
  flex: 1 1 auto;
  overflow: hidden;
  border-right: 1px solid var(--admin-line);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-role="ADMIN"] .admin-page-siblings button:last-child { border-right: 0; }
body[data-role="ADMIN"] .admin-page-group-switch {
  min-width: 0;
  width: 100%;
  height: 36px;
  padding: 0 8px;
  grid-template-columns: auto minmax(100px, 1fr);
  border-right: 1px solid var(--admin-line);
}
body[data-role="ADMIN"] .admin-page-group-switch select { height: 28px; }
body[data-role="ADMIN"] .admin-page-recent {
  min-width: 0;
  height: 36px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  border-right: 1px solid var(--admin-line);
}
body[data-role="ADMIN"] .admin-page-recent-label {
  min-width: max-content;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--admin-muted);
  font-size: 8px;
}
body[data-role="ADMIN"] .admin-page-recent-label .lucide-icon { width: 12px; height: 12px; }
body[data-role="ADMIN"] .admin-page-recent button {
  min-width: 48px;
  max-width: 132px;
  height: 26px;
  padding: 0 8px;
  flex: 1 1 auto;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--admin-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-role="ADMIN"] .admin-page-recent button:hover { border-color: var(--admin-line-strong); background: var(--admin-hover); color: var(--admin-ink); }
body[data-role="ADMIN"] .admin-page-recent button.active { border-color: var(--workspace-accent); background: var(--workspace-accent-soft); color: var(--workspace-accent); }
body[data-role="ADMIN"] .admin-page-context-page-actions {
  min-width: 0;
  min-height: 36px;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  overflow: hidden;
}
body[data-role="ADMIN"] .admin-page-context-page-actions:empty { display: none; }
body[data-role="ADMIN"] .admin-page-context-page-actions .btn {
  min-width: 30px;
  min-height: 29px;
  padding: 0 9px;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-role="ADMIN"] .admin-page-context-page-actions .btn.icon { width: 30px; padding: 0; }
body[data-role="ADMIN"] .admin-page-context-page-actions :is(.order-monitor-refresh-state, .order-monitor-mode-actions) {
  min-width: 0;
  height: 29px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
body[data-role="ADMIN"] .admin-page-context-page-actions .order-monitor-refresh-state {
  padding: 0 7px;
  color: var(--admin-muted);
  font-size: 8px;
}
body[data-role="ADMIN"] .admin-page-context-page-actions .order-monitor-refresh-state .lucide-icon { width: 11px; height: 11px; }

body[data-role="ADMIN"] .admin-integrated-list-panel { margin-top: 0; }
body[data-role="ADMIN"] .admin-integrated-list-panel > .panel-header {
  min-height: 39px;
  padding: 6px 10px;
}
body[data-role="ADMIN"] .admin-integrated-list-panel > .panel-header > div:first-child {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
body[data-role="ADMIN"] .admin-integrated-list-panel > .panel-header h2,
body[data-role="ADMIN"] .admin-integrated-list-panel > .panel-header p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-role="ADMIN"] .admin-integrated-list-panel > .admin-compact-filter-bar {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 7px 9px;
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(104px, 1fr)) auto auto;
  align-items: center;
  gap: 6px;
  border: 0;
  border-bottom: 1px solid var(--admin-line);
  border-radius: 0;
  background: var(--admin-surface-alt);
}
body[data-role="ADMIN"] .admin-compact-filter-bar > label.member-filter-field {
  min-width: 0;
  display: block;
}
body[data-role="ADMIN"] .admin-compact-filter-bar > label.member-filter-field > span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body[data-role="ADMIN"] .admin-compact-filter-bar > label.member-filter-field :is(input, select) { height: 32px; }
body[data-role="ADMIN"] .admin-compact-filter-bar > .searchable-filter-select { grid-column: auto; display: block; }
body[data-role="ADMIN"] .admin-compact-filter-bar > .searchable-filter-select > input { display: none; }
body[data-role="ADMIN"] .admin-compact-filter-bar > .searchable-filter-select > select { display: block; }
body[data-role="ADMIN"] .admin-compact-filter-bar > .member-filter-actions {
  min-width: max-content;
  display: flex;
  align-items: center;
  gap: 5px;
}
body[data-role="ADMIN"] .admin-compact-filter-bar > .member-filter-actions .btn { min-height: 32px; padding: 0 10px; font-size: 10px; }
body[data-role="ADMIN"] .admin-filter-more {
  position: relative;
  min-width: max-content;
  align-self: center;
  z-index: 8;
}
body[data-role="ADMIN"] .admin-filter-more > summary {
  min-height: 32px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--admin-line-strong);
  border-radius: 3px;
  background: var(--admin-surface);
  color: var(--admin-ink);
  font-size: 9px;
  list-style: none;
  cursor: pointer;
}
body[data-role="ADMIN"] .admin-filter-more > summary::-webkit-details-marker { display: none; }
body[data-role="ADMIN"] .admin-filter-more > summary .lucide-icon { width: 12px; height: 12px; color: var(--admin-muted); }
body[data-role="ADMIN"] .admin-filter-more[open] > summary { border-color: var(--admin-accent); background: var(--admin-hover); }
body[data-role="ADMIN"] .admin-filter-more-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  width: min(460px, calc(100vw - 64px));
  padding: 9px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--admin-line-strong);
  border-radius: 4px;
  background: var(--admin-surface);
  box-shadow: 0 14px 36px color-mix(in srgb, var(--admin-overlay) 42%, transparent);
}
body[data-role="ADMIN"] .admin-filter-more-menu .member-filter-field {
  min-width: 0;
  display: grid;
  gap: 5px;
}
body[data-role="ADMIN"] .admin-filter-more-menu .searchable-filter-select { grid-column: 1 / -1; }
body[data-role="ADMIN"] .admin-filter-more-menu :is(input, select) { height: 32px; }
body[data-role="ADMIN"] .admin-panel-view-segment {
  min-width: 132px;
  margin-left: auto;
}
body[data-role="ADMIN"] .admin-panel-view-segment button { min-height: 28px; padding: 0 9px; font-size: 9px; }
body[data-role="ADMIN"] .admin-duplicate-title-removed {
  min-width: 0;
}
body[data-role="ADMIN"] .benefit-stack {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}
body[data-role="ADMIN"] .benefit-stack > .panel {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
body[data-role="ADMIN"] .benefit-stack .table-wrap {
  min-width: 0;
  max-width: 100%;
}

body[data-role="ADMIN"] .content[data-layout-family="report"] > .report-filter-toolbar,
body[data-role="ADMIN"] .content[data-layout-family="monitor"] > .order-monitor-filters {
  min-height: 42px;
  margin-bottom: 8px;
  padding: 6px 8px;
  gap: 6px;
}
body[data-role="ADMIN"] .content[data-layout-family="report"] > .report-status-band { margin-bottom: 8px; }
body[data-role="ADMIN"] .content[data-layout-family="report"] > .admin-compact-report-filter {
  flex-wrap: nowrap;
  align-items: flex-end;
}
body[data-role="ADMIN"] .admin-compact-report-filter .report-period-segment { flex: 0 0 auto; }
body[data-role="ADMIN"] .admin-compact-report-filter .report-period-segment .btn {
  min-height: 32px;
  padding: 0 9px;
  font-size: 10px;
}
body[data-role="ADMIN"] .admin-compact-report-filter .report-quick-ranges {
  flex: 0 1 auto;
  gap: 3px;
}
body[data-role="ADMIN"] .admin-compact-report-filter .report-quick-ranges .btn {
  min-height: 32px;
  padding: 0 8px;
  font-size: 9px;
  white-space: nowrap;
}
body[data-role="ADMIN"] .admin-compact-report-filter > .report-filter-field {
  min-width: 120px;
  flex: 1 1 128px;
  gap: 3px;
  font-size: 8px;
}
body[data-role="ADMIN"] .admin-compact-report-filter > .report-filter-field :is(input, select) { min-height: 32px; padding: 4px 7px; }
body[data-role="ADMIN"] .admin-compact-report-filter > .btn.primary { min-height: 32px; padding: 0 10px; font-size: 10px; white-space: nowrap; }
body[data-role="ADMIN"] .admin-report-filter-more .admin-filter-more-menu {
  width: 330px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body[data-role="ADMIN"] .admin-report-filter-more .report-filter-field {
  min-width: 0;
  display: grid;
  gap: 5px;
}
body[data-role="ADMIN"] .admin-report-filter-more .report-filter-check { min-height: 32px; }

@media (max-width: 1380px) {
  body[data-role="ADMIN"] .admin-page-context-header { grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) max-content; }
  body[data-role="ADMIN"] .admin-page-context-metrics > :nth-child(n + 6) { display: none; }
  body[data-role="ADMIN"] .admin-page-recent > button:nth-of-type(n + 4) { display: none; }
}

@media (max-width: 1120px) {
  body[data-role="ADMIN"] .admin-page-context-header { grid-template-columns: minmax(145px, 176px) minmax(0, 1fr) max-content; }
  body[data-role="ADMIN"] .admin-page-context-metrics > :nth-child(n + 4) { display: none; }
  body[data-role="ADMIN"] .admin-page-context-toolbar { grid-template-columns: minmax(180px, 1fr) minmax(170px, 1fr) max-content; }
  body[data-role="ADMIN"] .admin-page-recent > button:nth-of-type(n + 3) { display: none; }
  body[data-role="ADMIN"] .admin-page-context-page-actions .order-monitor-refresh-state { display: none; }
  body[data-role="ADMIN"] .admin-integrated-list-panel > .admin-compact-filter-bar {
    grid-template-columns: minmax(180px, 1.4fr) repeat(2, minmax(110px, 1fr)) auto auto;
  }
  body[data-role="ADMIN"] .admin-compact-filter-bar > label.member-filter-field:nth-of-type(n + 4) { display: none; }
  body[data-role="ADMIN"] .content[data-layout-family="report"] > .admin-compact-report-filter { flex-wrap: wrap; }
}

@media (max-width: 820px) {
  body[data-role="ADMIN"] .admin-page-context-header {
    grid-template-columns: minmax(0, 1fr) max-content;
    padding: 0 7px;
  }
  body[data-role="ADMIN"] .admin-page-context-metrics {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 46px;
    border-top: 1px solid var(--admin-line);
  }
  body[data-role="ADMIN"] .admin-page-context-metrics > :is(.kpi, .compact-summary-item, .order-monitor-status-fact) { min-height: 46px; padding: 5px 8px; }
  body[data-role="ADMIN"] .admin-page-context-actions { grid-column: 2; grid-row: 1; border-left: 0; }
  body[data-role="ADMIN"] .admin-page-context-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  body[data-role="ADMIN"] .admin-page-recent { grid-column: 1 / -1; grid-row: 2; border-top: 1px solid var(--admin-line); }
  body[data-role="ADMIN"] .admin-page-context-page-actions { grid-column: 2; grid-row: 1; }
  body[data-role="ADMIN"] .admin-integrated-list-panel > .admin-compact-filter-bar {
    grid-template-columns: minmax(160px, 1fr) minmax(110px, .8fr) auto auto;
  }
  body[data-role="ADMIN"] .admin-compact-filter-bar > label.member-filter-field:nth-of-type(n + 3) { display: none; }
}

@media (max-width: 600px) {
  body[data-role="ADMIN"] .admin-page-context-actions .admin-page-guide-trigger { width: 30px; padding: 0; font-size: 0; }
  body[data-role="ADMIN"] .admin-page-context-actions .admin-page-guide-trigger .lucide-icon { margin: 0; }
  body[data-role="ADMIN"] .admin-page-context-metrics { grid-auto-columns: minmax(0, 1fr); }
  body[data-role="ADMIN"] .admin-page-context-metrics > :nth-child(n + 3) { display: none; }
  body[data-role="ADMIN"] .admin-page-context-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); }
  body[data-role="ADMIN"] .admin-page-siblings,
  body[data-role="ADMIN"] .admin-page-group-switch,
  body[data-role="ADMIN"] .admin-page-context-page-actions,
  body[data-role="ADMIN"] .admin-page-recent { grid-column: 1; }
  body[data-role="ADMIN"] .admin-page-context-page-actions { grid-row: 2; border-top: 1px solid var(--admin-line); }
  body[data-role="ADMIN"] .admin-page-recent { grid-row: 3; }
  body[data-role="ADMIN"] .admin-integrated-list-panel > .admin-compact-filter-bar {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  body[data-role="ADMIN"] .admin-compact-filter-bar > label.member-filter-field:nth-of-type(n + 2) { display: none; }
  body[data-role="ADMIN"] .admin-filter-more-menu { width: min(340px, calc(100vw - 30px)); grid-template-columns: minmax(0, 1fr); }
  body[data-role="ADMIN"] .admin-filter-more-menu .searchable-filter-select { grid-column: auto; }
}

/* Foundation 1.76: refined operator controls with theme-aware depth and feedback. */
body[data-role="ADMIN"] {
  --admin-control-highlight: color-mix(in srgb, var(--admin-ink) 10%, transparent);
  --admin-control-shadow: 0 1px 2px color-mix(in srgb, var(--admin-overlay) 34%, transparent), inset 0 1px 0 var(--admin-control-highlight);
  --admin-control-shadow-hover: 0 3px 8px color-mix(in srgb, var(--admin-overlay) 30%, transparent), inset 0 1px 0 color-mix(in srgb, var(--admin-ink) 13%, transparent);
  --admin-control-shadow-pressed: inset 0 2px 3px color-mix(in srgb, var(--admin-overlay) 34%, transparent);
  --admin-control-ease: cubic-bezier(.2, .8, .2, 1);
}

body[data-role="ADMIN"] :where(
  .btn,
  .admin-header-command,
  .admin-header-module-overflow,
  .admin-header-metric,
  .admin-page-siblings button,
  .admin-page-recent button,
  .agent-view-segment button,
  .member-detail-tabs button,
  .admin-primary-nav-button,
  .admin-nav-child,
  .admin-personal-button,
  .admin-filter-more > summary
) {
  transition:
    transform 140ms var(--admin-control-ease),
    border-color 140ms ease-out,
    background-color 140ms ease-out,
    box-shadow 140ms ease-out,
    color 140ms ease-out,
    filter 140ms ease-out;
}

body[data-role="ADMIN"] .btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
  border-radius: 6px;
  background: color-mix(in srgb, var(--admin-surface-alt) 90%, var(--admin-raised));
  box-shadow: var(--admin-control-shadow);
  white-space: nowrap;
}
body[data-role="ADMIN"] .btn .lucide-icon { width: 14px; height: 14px; flex: 0 0 auto; stroke-width: 1.8; }
body[data-role="ADMIN"] .btn.primary {
  border-color: color-mix(in srgb, var(--admin-accent) 76%, var(--admin-overlay));
  background: var(--admin-accent);
  color: var(--admin-accent-ink);
  box-shadow:
    0 2px 5px color-mix(in srgb, var(--admin-overlay) 38%, transparent),
    inset 0 1px 0 color-mix(in srgb, white 18%, transparent);
}
body[data-role="ADMIN"] .btn.success {
  box-shadow: var(--admin-control-shadow);
}
body[data-role="ADMIN"] .btn.warning {
  box-shadow: var(--admin-control-shadow);
}
body[data-role="ADMIN"] .btn.danger {
  box-shadow: var(--admin-control-shadow);
}
body[data-role="ADMIN"] .btn.ghost:not(.icon) { border-color: transparent; background: transparent; box-shadow: none; }
body[data-role="ADMIN"] .btn.ghost.icon {
  border-color: color-mix(in srgb, var(--admin-line-strong) 74%, transparent);
  background: color-mix(in srgb, var(--admin-surface-alt) 86%, transparent);
  box-shadow: inset 0 1px 0 var(--admin-control-highlight);
}
body[data-role="ADMIN"] .btn.icon { border-radius: 6px; }
body[data-role="ADMIN"] .btn.small { border-radius: 5px; }

body[data-role="ADMIN"] :where(.admin-header-command, .admin-header-module-overflow) {
  border-radius: 6px;
  background: color-mix(in srgb, var(--admin-nav-ink) 5%, var(--admin-nav));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--admin-nav-ink) 10%, transparent);
}
body[data-role="ADMIN"] :where(.admin-header-command, .admin-header-module-overflow) .lucide-icon { stroke-width: 1.8; }
body[data-role="ADMIN"] .admin-header-metric {
  border-radius: 6px;
  background: color-mix(in srgb, var(--admin-nav-ink) 4%, var(--admin-nav));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--admin-nav-ink) 8%, transparent);
}

body[data-role="ADMIN"] .admin-primary-nav-button,
body[data-role="ADMIN"] .admin-personal-button { border-radius: 6px; }
body[data-role="ADMIN"] .admin-primary-nav-glyph,
body[data-role="ADMIN"] .admin-nav-glyph,
body[data-role="ADMIN"] .admin-personal-button > .lucide-icon {
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
}
body[data-role="ADMIN"] .admin-primary-nav-button.active .admin-primary-nav-glyph,
body[data-role="ADMIN"] .admin-nav-button.active .nav-glyph,
body[data-role="ADMIN"] .admin-personal-button.active > .lucide-icon {
  background: color-mix(in srgb, var(--admin-accent) 18%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--admin-accent) 28%, transparent);
}

body[data-role="ADMIN"] .admin-page-siblings,
body[data-role="ADMIN"] .agent-view-segment {
  padding: 3px;
  gap: 2px;
  background: var(--admin-surface-alt);
}
body[data-role="ADMIN"] .admin-page-siblings button,
body[data-role="ADMIN"] .agent-view-segment button {
  height: 30px;
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--admin-muted);
  box-shadow: none;
}
body[data-role="ADMIN"] .admin-page-siblings button.active,
body[data-role="ADMIN"] .agent-view-segment button.active {
  border-color: color-mix(in srgb, var(--workspace-accent) 38%, var(--admin-line));
  background: var(--workspace-accent-soft);
  color: color-mix(in srgb, var(--workspace-accent) 54%, var(--admin-ink));
  box-shadow: 0 1px 2px color-mix(in srgb, var(--admin-overlay) 22%, transparent), inset 0 1px 0 var(--admin-control-highlight);
}
body[data-role="ADMIN"] .admin-page-recent button { border-radius: 5px; }
body[data-role="ADMIN"] .admin-page-recent button.active {
  color: color-mix(in srgb, var(--workspace-accent) 54%, var(--admin-ink));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--workspace-accent) 16%, transparent);
}
body[data-role="ADMIN"] .member-detail-tabs button.active {
  background: color-mix(in srgb, var(--workspace-accent) 8%, var(--admin-surface));
  color: color-mix(in srgb, var(--workspace-accent) 58%, var(--admin-ink));
}
body[data-role="ADMIN"] .admin-filter-more > summary {
  border-radius: 6px;
  background: color-mix(in srgb, var(--admin-surface-alt) 90%, var(--admin-raised));
  box-shadow: var(--admin-control-shadow);
}

body[data-role="ADMIN"] :where(
  .btn,
  .admin-header-command,
  .admin-header-module-overflow,
  .admin-header-metric,
  .admin-page-siblings button,
  .admin-page-recent button,
  .agent-view-segment button,
  .member-detail-tabs button,
  .admin-primary-nav-button,
  .admin-nav-child,
  .admin-personal-button,
  .admin-filter-more > summary
):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--admin-accent) 72%, var(--admin-ink));
  outline-offset: 2px;
}

@media (hover: hover) {
  body[data-role="ADMIN"] .btn:hover:not(:disabled),
  body[data-role="ADMIN"] :where(.admin-header-command, .admin-header-module-overflow):hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--admin-control-shadow-hover);
  }
  body[data-role="ADMIN"] .btn.primary:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--admin-accent) 68%, var(--admin-overlay));
    background: var(--admin-accent);
    color: var(--admin-accent-ink);
    filter: none;
    box-shadow:
      0 4px 9px color-mix(in srgb, var(--admin-overlay) 42%, transparent),
      inset 0 1px 0 color-mix(in srgb, white 20%, transparent);
  }
  body[data-role="ADMIN"] .admin-header-command:hover:not(:disabled) .lucide-icon { color: var(--admin-nav-icon-active); }
  body[data-role="ADMIN"] .admin-header-metric:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--admin-accent) 38%, var(--admin-line));
    background: color-mix(in srgb, var(--admin-accent) 8%, var(--admin-nav));
  }
  body[data-role="ADMIN"] :where(.admin-page-siblings button, .admin-page-recent button, .agent-view-segment button):hover:not(.active) {
    border-color: color-mix(in srgb, var(--admin-line-strong) 72%, transparent);
    background: var(--admin-hover);
    color: var(--admin-ink);
  }
}

body[data-role="ADMIN"] :where(
  .btn,
  .admin-header-command,
  .admin-header-module-overflow,
  .admin-page-siblings button,
  .admin-page-recent button,
  .agent-view-segment button,
  .admin-primary-nav-button,
  .admin-nav-child,
  .admin-personal-button,
  .admin-filter-more > summary
):active:not(:disabled) {
  transform: translateY(0);
  box-shadow: var(--admin-control-shadow-pressed);
}
body[data-role="ADMIN"] :where(button, .btn):disabled {
  transform: none;
  filter: saturate(.55);
  box-shadow: none;
  opacity: .48;
}

@media (prefers-reduced-motion: reduce) {
  body[data-role="ADMIN"] :where(button, .btn) { transition-duration: 0ms; }
  body[data-role="ADMIN"] :where(button, .btn):hover,
  body[data-role="ADMIN"] :where(button, .btn):active { transform: none; }
}

/* Keep the page guide attached to the viewport even though it uses the shared button component. */
body[data-role="ADMIN"] button.admin-operation-guide-tab {
  position: fixed;
  z-index: 36;
  top: calc(50% - 62px);
  right: 0;
  bottom: auto;
  left: auto;
  width: 34px;
  height: auto;
  min-height: 124px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--admin-accent) 48%, var(--admin-line));
  border-right: 0;
  border-radius: 6px 0 0 6px;
  background: linear-gradient(180deg, var(--admin-nav), var(--admin-surface-alt));
  color: var(--admin-nav-ink);
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  writing-mode: vertical-rl;
  transform: none;
  box-shadow: -3px 7px 18px color-mix(in srgb, var(--admin-overlay) 26%, transparent), inset 0 1px 0 var(--admin-control-highlight);
}
body[data-role="ADMIN"] button.admin-operation-guide-tab:hover:not(:disabled),
body[data-role="ADMIN"] button.admin-operation-guide-tab:focus-visible {
  border-color: var(--admin-accent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--admin-accent) 14%, var(--admin-nav)), var(--admin-surface-alt));
  color: var(--admin-nav-icon-active);
}
body[data-role="ADMIN"] button.admin-operation-guide-tab:active:not(:disabled) { transform: translateY(1px); }

/* Foundation 1.76: original portal-specific login identities. */
.login-page-admin-commerce,
.login-page-member-editorial {
  min-height: 100vh;
  color: #17211d;
}

.login-page-admin-commerce {
  grid-template-columns: minmax(0, 1.3fr) minmax(390px, .7fr);
  background: #eef1ec;
}
.login-page-admin-commerce .login-brand {
  padding: 48px;
  border-right: 0;
  background-color: #18201c;
  background-image: url("/assets/member/admin-commerce-login-v1.png");
  background-position: center;
  background-size: cover;
}
.login-page-admin-commerce .login-brand::before {
  background: rgba(9, 16, 13, .58);
}
.login-page-admin-commerce .brand-mark {
  width: 36px;
  height: 36px;
  padding: 8px;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 3px;
  border: 1px solid rgba(255, 255, 255, .42);
  background: rgba(15, 27, 22, .54);
}
.login-page-admin-commerce .brand-mark span { width: 100%; border-radius: 0; background: #d9e6dc; }
.login-page-admin-commerce .brand-mark span:nth-child(1) { height: 8px; }
.login-page-admin-commerce .brand-mark span:nth-child(2) { height: 18px; background: #8eb59b; }
.login-page-admin-commerce .brand-mark span:nth-child(3) { height: 13px; background: #c6a96a; }
.login-page-admin-commerce .brand-lockup { gap: 14px; }
.login-page-admin-commerce .brand-lockup strong {
  display: block;
  color: #ffffff;
  font-size: 15px;
  font-weight: 720;
  letter-spacing: 0;
}
.login-page-admin-commerce .brand-lockup small {
  display: block;
  margin-top: 3px;
  color: #bdc9c0;
  font-size: 11px;
}
.login-page-admin-commerce .login-signal { max-width: 590px; }
.login-page-admin-commerce .login-signal h1 {
  max-width: 520px;
  margin-bottom: 16px;
  color: #ffffff;
  font-size: 44px;
  line-height: 1.12;
  font-weight: 680;
}
.login-page-admin-commerce .login-signal p {
  max-width: 500px;
  color: #d1dad3;
  font-size: 15px;
  line-height: 1.75;
}
.login-page-admin-commerce .signal-grid { gap: 0; margin-top: 32px; border-top: 1px solid rgba(255, 255, 255, .24); }
.login-page-admin-commerce .signal-cell {
  min-width: 0;
  padding: 16px 18px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.login-page-admin-commerce .signal-cell + .signal-cell { padding-left: 18px; border-left: 1px solid rgba(255, 255, 255, .2); }
.login-page-admin-commerce .signal-cell b { color: #ffffff; font-size: 16px; font-weight: 680; }
.login-page-admin-commerce .signal-cell span { color: #aebdb2; font-size: 11px; }
.login-page-admin-commerce .login-foot { color: #b5c1b8; font-size: 10px; }
.login-page-admin-commerce .login-main {
  padding: 48px;
  border-left: 0;
  background: #eef1ec;
}
.login-page-admin-commerce .login-panel {
  width: min(420px, 100%);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #17211d;
  box-shadow: none;
}
.login-page-admin-commerce .login-panel .eyebrow {
  margin-bottom: 12px;
  color: #557160;
  font-size: 11px;
}
.login-page-admin-commerce .login-panel h2 { color: #17211d; font-size: 30px; font-weight: 700; }
.login-page-admin-commerce .login-panel > p { margin: 10px 0 30px; color: #69766f; }
.login-page-admin-commerce .login-panel .field { gap: 8px; margin-bottom: 18px; }
.login-page-admin-commerce .login-panel .field label { color: #46524c; font-size: 12px; }
.login-page-admin-commerce .login-panel .field input {
  min-height: 48px;
  border-color: #b9c2bc;
  border-radius: 5px;
  background: #fbfcfa;
  color: #17211d;
  box-shadow: inset 0 1px 0 #ffffff;
}
.login-page-admin-commerce .login-panel .field input:focus {
  border-color: #557d63;
  box-shadow: 0 0 0 3px rgba(85, 125, 99, .14);
}
.login-page-admin-commerce .login-panel .btn.primary {
  min-height: 48px;
  border-color: #244b34;
  border-radius: 5px;
  background: #2f5e40;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(25, 63, 40, .2), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: transform 140ms ease-out, background-color 140ms ease-out, box-shadow 140ms ease-out;
}
.login-page-admin-commerce .login-panel .login-register {
  min-height: 44px;
  border-color: #aeb9b1;
  border-radius: 5px;
  background: transparent;
  color: #365542;
}
.login-page-admin-commerce .login-panel .login-register:hover { border-color: #557d63; background: #e1e8e2; color: #244b34; }
.login-page-admin-commerce .login-panel .login-security-notice { border-left-color: #aa7d27; background: #f4ecd9; color: #665424; }
.login-page-admin-commerce .login-panel .demo-accounts { margin-top: 28px; padding-top: 18px; border-top-color: #cbd2cd; }
.login-page-admin-commerce .login-panel .demo-accounts > span { color: #7b857f; }
.login-page-admin-commerce .login-panel .account-buttons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.login-page-admin-commerce .login-panel .account-button {
  min-width: 0;
  min-height: 36px;
  overflow: hidden;
  border-color: #c5cdc7;
  border-radius: 4px;
  background: #f7f9f6;
  color: #59665f;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.login-page-admin-commerce .login-panel .account-button:hover { border-color: #668170; background: #e8ede9; color: #244b34; }

.login-page-member-editorial {
  grid-template-columns: minmax(0, 1.45fr) minmax(390px, .55fr);
  background: #f4f1ec;
}
.login-page-member-editorial .login-brand {
  padding: 46px 52px;
  border-right: 0;
  color: #161616;
  background-color: #e8e5e0;
  background-image: url("/assets/member/member-fashion-login-v1.png");
  background-position: 58% center;
  background-size: cover;
}
.login-page-member-editorial .login-brand::before { background: rgba(249, 247, 243, .1); }
.login-page-member-editorial .brand-mark {
  display: block;
  width: 30px;
  height: 3px;
  background: #b72f28;
}
.login-page-member-editorial .brand-mark span { display: none; }
.login-page-member-editorial .brand-lockup { align-items: flex-start; gap: 13px; }
.login-page-member-editorial .brand-lockup strong {
  display: block;
  color: #111111;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}
.login-page-member-editorial .brand-lockup small {
  display: block;
  margin-top: 3px;
  color: #5f5c58;
  font-size: 10px;
}
.login-page-member-editorial .login-signal { max-width: 520px; }
.login-page-member-editorial .login-signal h1 {
  max-width: 460px;
  margin-bottom: 16px;
  color: #111111;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 52px;
  line-height: 1.05;
  font-weight: 600;
}
.login-page-member-editorial .login-signal p { max-width: 420px; color: #494642; font-size: 14px; line-height: 1.8; }
.login-page-member-editorial .signal-grid { gap: 18px; margin-top: 34px; }
.login-page-member-editorial .signal-cell {
  min-width: 0;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid rgba(21, 21, 21, .45);
  border-radius: 0;
  background: transparent;
}
.login-page-member-editorial .signal-cell b { color: #151515; font-size: 11px; font-weight: 750; }
.login-page-member-editorial .signal-cell span { color: #57534f; font-size: 10px; }
.login-page-member-editorial .login-foot { color: #484541; font-size: 10px; }
.login-page-member-editorial .login-main {
  padding: 48px;
  border-left: 1px solid #d5d0c9;
  background: #f4f1ec;
}
.login-page-member-editorial .login-panel {
  width: min(410px, 100%);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #161616;
  box-shadow: none;
}
.login-page-member-editorial .login-panel .eyebrow { margin-bottom: 14px; color: #a12722; font-size: 10px; }
.login-page-member-editorial .login-panel h2 {
  color: #111111;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 600;
}
.login-page-member-editorial .login-panel > p { margin: 10px 0 30px; color: #706b65; }
.login-page-member-editorial .login-panel .field { gap: 8px; margin-bottom: 18px; }
.login-page-member-editorial .login-panel .field label { color: #4e4944; font-size: 12px; }
.login-page-member-editorial .login-panel .field input {
  min-height: 48px;
  border-color: #bdb7b0;
  border-radius: 0;
  background: rgba(255, 255, 255, .74);
  color: #111111;
  box-shadow: none;
}
.login-page-member-editorial .login-panel .field input:focus { border-color: #1d1d1d; box-shadow: 0 0 0 2px rgba(29, 29, 29, .12); }
.login-page-member-editorial .login-panel .btn.primary {
  min-height: 48px;
  border-color: #111111;
  border-radius: 0;
  background: #111111;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(18, 18, 18, .16);
  transition: transform 140ms ease-out, background-color 140ms ease-out, box-shadow 140ms ease-out;
}
.login-page-member-editorial .login-panel .login-register {
  min-height: 44px;
  border-color: #8b8680;
  border-radius: 0;
  background: transparent;
  color: #211f1d;
}
.login-page-member-editorial .login-panel .login-register:hover { border-color: #b72f28; background: #eee3df; color: #8c211d; }
.login-page-member-editorial .login-panel .login-security-notice { border-left-color: #b72f28; background: #eee3df; color: #6e302d; }
.login-page-member-editorial .login-panel .demo-accounts { margin-top: 28px; padding-top: 18px; border-top-color: #d0cbc4; }
.login-page-member-editorial .login-panel .demo-accounts > span { color: #817b75; }
.login-page-member-editorial .login-panel .account-buttons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.login-page-member-editorial .login-panel .account-button {
  min-width: 0;
  min-height: 34px;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid #a9a39c;
  border-radius: 0;
  background: transparent;
  color: #5f5a55;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.login-page-member-editorial .login-panel .account-button:hover { border-bottom-color: #b72f28; background: transparent; color: #8c211d; }

@media (hover: hover) {
  .login-page-admin-commerce .login-panel .btn.primary:hover:not(:disabled) {
    transform: translateY(-1px);
    background: #244b34;
    box-shadow: 0 10px 24px rgba(25, 63, 40, .24), inset 0 1px 0 rgba(255, 255, 255, .2);
  }
  .login-page-member-editorial .login-panel .btn.primary:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: #8f221d;
    background: #a12722;
    box-shadow: 0 10px 24px rgba(139, 31, 26, .2);
  }
}
.login-page-admin-commerce :is(button, input):focus-visible,
.login-page-member-editorial :is(button, input):focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.login-page-admin-commerce .login-panel .btn.primary:active:not(:disabled),
.login-page-member-editorial .login-panel .btn.primary:active:not(:disabled) { transform: translateY(0); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .2); }

@media (max-width: 920px) {
  .login-page-admin-commerce,
  .login-page-member-editorial { grid-template-columns: minmax(0, 1fr); }
  .login-page-admin-commerce .login-brand,
  .login-page-member-editorial .login-brand { min-height: 340px; padding: 30px; border-right: 0; border-bottom: 1px solid rgba(0, 0, 0, .16); }
  .login-page-admin-commerce .login-signal h1 { font-size: 36px; }
  .login-page-member-editorial .login-signal h1 { font-size: 40px; }
  .login-page-admin-commerce .login-main,
  .login-page-member-editorial .login-main { min-height: auto; padding: 40px 28px; border-left: 0; }
}

@media (max-width: 640px) {
  .login-page-admin-commerce .login-brand,
  .login-page-member-editorial .login-brand { min-height: 290px; padding: 24px; }
  .login-page-admin-commerce .login-signal h1,
  .login-page-member-editorial .login-signal h1 { font-size: 32px; }
  .login-page-admin-commerce .login-signal p,
  .login-page-member-editorial .login-signal p { display: block; font-size: 12px; }
  .login-page-admin-commerce .signal-grid,
  .login-page-member-editorial .signal-grid { margin-top: 20px; }
  .login-page-admin-commerce .login-main,
  .login-page-member-editorial .login-main { padding: 32px 20px; }
  .login-page-admin-commerce .login-panel .account-buttons,
  .login-page-member-editorial .login-panel .account-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Foundation 1.76 dual-track module catalog */
.admin-module-catalog {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.admin-module-catalog-status,
.admin-module-catalog-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--admin-line, #263b4c);
  border-radius: 6px;
  background: var(--admin-surface-alt, #111f2c);
  color: var(--admin-muted, #91a5b7);
}
.admin-module-catalog-status > span:last-child { margin-left: auto; }
.admin-module-catalog-summary {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--admin-line, #263b4c);
  border-radius: 6px;
  background: var(--admin-surface, #0e1c29);
  overflow: hidden;
}
.admin-module-catalog-summary-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 2px 8px;
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--admin-line, #263b4c);
}
.admin-module-catalog-summary-cell:last-child { border-right: 0; }
.admin-module-catalog-summary-cell > span {
  min-width: 0;
  overflow: hidden;
  color: var(--admin-muted, #91a5b7);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-module-catalog-summary-cell > strong {
  color: var(--admin-ink, #dfe9f2);
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}
.admin-module-catalog-summary-cell > small {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  color: var(--admin-muted, #91a5b7);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-module-catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) minmax(150px, .75fr) minmax(170px, .85fr) auto auto;
  align-items: end;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--admin-line, #263b4c);
  border-radius: 6px;
  background: var(--admin-surface, #0e1c29);
}
.admin-module-catalog-toolbar .field { margin: 0; }
.admin-module-catalog-toolbar .btn { min-height: 38px; }
.admin-module-security-cell {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}
.admin-module-security-cell small {
  color: var(--admin-muted, #91a5b7);
  white-space: nowrap;
}
.admin-module-catalog .table-scroll table { min-width: 1120px; }
.admin-module-catalog-foot { justify-content: space-between; font-size: 12px; }

.admin-module-center-tabs {
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.admin-module-center-tabs > button { flex: 0 0 auto; white-space: nowrap; }
.admin-module-layout-workspace,
.admin-module-interface-workspace {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.admin-module-release-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--admin-line, #263b4c);
  border-radius: 6px;
  background: var(--admin-surface-alt, #111f2c);
  color: var(--admin-muted, #91a5b7);
}
.admin-module-release-status > span:nth-last-child(1) { margin-left: auto; }
.admin-module-release-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--admin-line, #263b4c);
  border-radius: 6px;
  background: var(--admin-surface, #0e1c29);
  overflow: hidden;
}
.admin-module-release-fact {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 11px 14px;
  border-right: 1px solid var(--admin-line, #263b4c);
}
.admin-module-release-fact:last-child { border-right: 0; }
.admin-module-release-fact > span,
.admin-module-release-fact > small {
  overflow: hidden;
  color: var(--admin-muted, #91a5b7);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-module-release-fact > strong {
  overflow: hidden;
  color: var(--admin-ink, #dfe9f2);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-module-drift-note {
  padding: 9px 12px;
  border-left: 3px solid var(--admin-warning, #e5b45a);
  background: var(--admin-warning-soft, #352a18);
  color: var(--admin-ink, #dfe9f2);
  font-size: 12px;
}
.admin-module-draft-section {
  min-width: 0;
  border: 1px solid var(--admin-line, #263b4c);
  border-radius: 6px;
  background: var(--admin-surface, #0e1c29);
  overflow: hidden;
}
.admin-module-draft-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--admin-line, #263b4c);
  background: var(--admin-surface-alt, #111f2c);
}
.admin-module-draft-head h3 { margin: 0; color: var(--admin-ink, #dfe9f2); font-size: 15px; }
.admin-module-draft-head p { margin: 3px 0 0; color: var(--admin-muted, #91a5b7); font-size: 11px; }
.admin-module-draft-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.admin-module-draft-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--admin-line, #263b4c);
  color: var(--admin-muted, #91a5b7);
  font-size: 11px;
}
.admin-module-validation { display: grid; padding: 6px 14px 10px; }
.admin-module-validation-row {
  display: grid;
  grid-template-columns: 18px minmax(120px, .45fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border-bottom: 1px solid color-mix(in srgb, var(--admin-line, #263b4c) 70%, transparent);
  color: var(--admin-muted, #91a5b7);
  font-size: 11px;
}
.admin-module-validation-row:last-child { border-bottom: 0; }
.admin-module-validation-row b { color: var(--admin-ink, #dfe9f2); }
.admin-module-validation-row .lucide-icon { width: 15px; height: 15px; }
.admin-module-validation-row.passed .lucide-icon { color: var(--admin-success, #66c98a); }
.admin-module-validation-row.failed .lucide-icon { color: var(--admin-danger, #e17a83); }
.admin-module-empty-state { padding: 24px 14px; color: var(--admin-muted, #91a5b7); text-align: center; }
.admin-module-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--admin-warning, #e5b45a);
  background: var(--admin-warning-soft, #352a18);
  color: var(--admin-ink, #dfe9f2);
}
.admin-module-preview-bar > div { display: flex; align-items: center; gap: 9px; min-width: 0; }
.admin-module-preview-bar span { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.admin-module-preview-actions { flex: 0 0 auto; }
.admin-page-layout-settings { min-width: 0; }
.admin-page-layout-chooser {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--admin-line, #263b4c);
  border-radius: 6px;
  background: var(--admin-surface-alt, #111f2c);
}
.admin-page-layout-chooser .field { margin: 0; }
.admin-page-layout-chooser-actions { display: flex; align-items: center; gap: 6px; }
.admin-page-layout-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--admin-line, #263b4c);
  border-radius: 6px;
  background: var(--admin-surface, #0e1c29);
}
.admin-page-layout-control-grid .field { min-width: 0; margin: 0; }
.admin-page-table-layouts {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--admin-line, #263b4c);
  border-radius: 6px;
  background: var(--admin-surface, #0e1c29);
}
.admin-page-table-layouts-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.admin-page-table-layouts-head h3 { margin: 0; color: var(--admin-ink, #dfe9f2); font-size: 14px; }
.admin-page-table-layouts-head p { margin: 4px 0 0; color: var(--admin-muted, #91a5b7); font-size: 11px; }
.admin-page-table-layout {
  border: 1px solid var(--admin-line, #263b4c);
  border-radius: 5px;
  background: var(--admin-surface-alt, #111f2c);
  overflow: hidden;
}
.admin-page-table-layout > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 8px 12px;
  cursor: pointer;
}
.admin-page-table-layout > summary strong,
.admin-page-table-layout > summary span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-page-table-layout > summary span { color: var(--admin-muted, #91a5b7); font-size: 11px; }
.admin-page-table-column-list { display: grid; border-top: 1px solid var(--admin-line, #263b4c); }
.admin-page-table-column-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--admin-line, #263b4c) 72%, transparent);
}
.admin-page-table-column-row:last-child { border-bottom: 0; }
.admin-page-table-column-toggle { display: flex; align-items: center; gap: 8px; min-width: 0; }
.admin-page-table-column-toggle > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-page-block-settings {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--admin-line, #263b4c);
  border-radius: 6px;
  background: var(--admin-surface, #0e1c29);
}
.admin-page-block-list {
  display: grid;
  min-width: 0;
  border: 1px solid var(--admin-line, #263b4c);
  border-radius: 5px;
  background: var(--admin-surface-alt, #111f2c);
  overflow: hidden;
}
.admin-page-block-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(120px, .32fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 7px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--admin-line, #263b4c) 72%, transparent);
}
.admin-page-block-row:last-child { border-bottom: 0; }
.admin-page-block-enabled { display: flex; align-items: center; gap: 9px; min-width: 0; }
.admin-page-block-identity { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; }
.admin-page-block-identity > b { min-width: 0; overflow: hidden; color: var(--admin-ink, #dfe9f2); text-overflow: ellipsis; white-space: nowrap; }
.admin-page-block-identity > small { grid-column: 1; min-width: 0; overflow: hidden; color: var(--admin-muted, #91a5b7); text-overflow: ellipsis; white-space: nowrap; }
.admin-page-block-identity > .badge { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.admin-module-block-grid {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}
.admin-module-block-grid > * { min-width: 0; grid-column: 1 / -1; }
.admin-module-block-grid > [data-module-width="3"] { grid-column: span 3; }
.admin-module-block-grid > [data-module-width="4"] { grid-column: span 4; }
.admin-module-block-grid > [data-module-width="6"] { grid-column: span 6; }
.admin-module-block-grid > [data-module-width="8"] { grid-column: span 8; }
.admin-module-block-grid > [data-module-width="12"] { grid-column: 1 / -1; }
.shared-object-identity { width: 100%; justify-content: flex-start; text-align: left; }
.admin-object-menu-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, .65fr) minmax(0, 1fr);
  align-items: end;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--admin-line, #263b4c);
  border-radius: 6px;
  background: var(--admin-surface-alt, #111f2c);
}
.admin-object-menu-toolbar .field { margin: 0; }
.admin-object-menu-toolbar p { margin: 0 0 5px; color: var(--admin-muted, #91a5b7); font-size: 11px; }
.admin-object-menu-list {
  display: grid;
  min-width: 0;
  border: 1px solid var(--admin-line, #263b4c);
  border-radius: 6px;
  background: var(--admin-surface, #0e1c29);
  overflow: hidden;
}
.admin-object-menu-row {
  display: grid;
  grid-template-columns: minmax(145px, .65fr) minmax(180px, 1fr) minmax(120px, .55fr) minmax(130px, .6fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--admin-line, #263b4c) 72%, transparent);
}
.admin-object-menu-row:last-child { border-bottom: 0; }
.admin-object-menu-enabled { display: flex; align-items: center; gap: 8px; min-width: 0; }
.admin-object-menu-enabled span { overflow: hidden; color: var(--admin-muted, #91a5b7); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.content[data-module-density="COMFORTABLE"] { gap: 16px; padding-bottom: 22px; }
.content[data-module-density="COMFORTABLE"] > .panel,
.content[data-module-density="COMFORTABLE"] > section:not(.admin-page-context) { margin-bottom: 4px; }

@media (max-width: 1180px) {
  .admin-module-catalog-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .admin-module-catalog-summary-cell:nth-child(4) { border-right: 0; }
  .admin-module-catalog-summary-cell:nth-child(-n + 4) { border-bottom: 1px solid var(--admin-line, #263b4c); }
  .admin-module-catalog-toolbar { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(150px, .7fr)) auto auto; }
  .admin-module-release-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-module-release-fact:nth-child(2) { border-right: 0; }
  .admin-module-release-fact:nth-child(-n + 2) { border-bottom: 1px solid var(--admin-line, #263b4c); }
  .admin-page-layout-control-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .admin-object-menu-row { grid-template-columns: minmax(130px, .7fr) minmax(180px, 1fr) minmax(120px, .6fr) minmax(120px, .6fr) auto; }
}

@media (max-width: 760px) {
  .admin-module-catalog-status > span:last-child { width: 100%; margin-left: 0; }
  .admin-module-catalog-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-module-catalog-summary-cell,
  .admin-module-catalog-summary-cell:nth-child(4) { border-right: 1px solid var(--admin-line, #263b4c); }
  .admin-module-catalog-summary-cell:nth-child(even) { border-right: 0; }
  .admin-module-catalog-summary-cell:nth-child(-n + 4) { border-bottom: 1px solid var(--admin-line, #263b4c); }
  .admin-module-catalog-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .admin-module-catalog-search { grid-column: 1 / -1; }
  .admin-module-catalog-toolbar .btn:not(.icon) { width: 100%; }
  .admin-module-catalog-foot { align-items: flex-start; flex-direction: column; }
  .admin-module-draft-head { align-items: flex-start; flex-direction: column; }
  .admin-module-draft-actions { width: 100%; justify-content: flex-start; }
  .admin-module-draft-actions .btn { flex: 1 1 120px; }
  .admin-module-validation-row { grid-template-columns: 18px minmax(0, 1fr); padding: 6px 0; }
  .admin-module-validation-row > span { grid-column: 2; }
  .admin-module-preview-bar { align-items: flex-start; flex-direction: column; }
  .admin-module-preview-actions { width: 100%; }
  .admin-module-preview-actions .btn { flex: 1 1 0; }
  .admin-page-layout-chooser { grid-template-columns: minmax(0, 1fr); }
  .admin-page-layout-chooser-actions .btn:not(.icon) { flex: 1 1 0; }
  .admin-page-layout-control-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-page-table-layouts-head { align-items: flex-start; flex-direction: column; }
  .admin-page-block-row { grid-template-columns: minmax(0, 1fr) auto; }
  .admin-page-block-row > .admin-workspace-setting-select { grid-column: 1 / -1; }
  .admin-module-block-grid > [data-module-width] { grid-column: 1 / -1; }
  .admin-object-menu-toolbar { grid-template-columns: minmax(0, 1fr); }
  .admin-object-menu-row { grid-template-columns: minmax(0, 1fr) auto; }
  .admin-object-menu-row > .admin-menu-name-input,
  .admin-object-menu-row > .admin-workspace-setting-select { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .admin-module-release-facts { grid-template-columns: minmax(0, 1fr); }
  .admin-module-release-fact,
  .admin-module-release-fact:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--admin-line, #263b4c); }
  .admin-module-release-fact:last-child { border-bottom: 0; }
}

/* Approved operations UI V2 · 2026-08-04 */
body[data-role="ADMIN"] {
  height: 100dvh;
  overflow: hidden;
  padding: 0;
  letter-spacing: 0;
}

body[data-role="ADMIN"] .app-shell {
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) !important;
  overflow: hidden;
}

body[data-role="ADMIN"] .sidebar {
  position: relative;
  inset: auto;
  width: auto;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--admin-line);
}

body[data-role="ADMIN"] .sidebar-brand.admin-sidebar-search {
  width: 100%;
  min-width: 0;
  height: 92px;
  flex: 0 0 92px;
  padding: 0 14px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-content: center;
  gap: 9px;
  border: 0 !important;
  border-bottom: 1px solid var(--admin-line) !important;
  border-radius: 0;
  background: var(--admin-nav) !important;
  color: var(--admin-nav-muted) !important;
  text-align: left;
}

body[data-role="ADMIN"] .sidebar-brand.admin-sidebar-search:hover,
body[data-role="ADMIN"] .sidebar-brand.admin-sidebar-search:focus-visible {
  background: var(--admin-nav-hover) !important;
  color: var(--admin-nav-ink) !important;
}

body[data-role="ADMIN"] .sidebar-brand.admin-sidebar-search > .lucide-icon {
  width: 18px;
  height: 18px;
  color: var(--admin-nav-icon-active);
}

body[data-role="ADMIN"] .sidebar-brand.admin-sidebar-search > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

body[data-role="ADMIN"] .sidebar-brand.admin-sidebar-search > small {
  padding: 2px 5px;
  border: 1px solid color-mix(in srgb, var(--admin-nav-ink) 15%, var(--admin-nav));
  border-radius: 4px;
  color: var(--admin-nav-muted);
  font-size: 8px;
  white-space: nowrap;
}

body[data-role="ADMIN"] .admin-navigation {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 8px;
}

body[data-role="ADMIN"] .admin-personal-nav {
  flex: 0 0 auto;
  padding: 0 0 5px;
  border-bottom: 1px solid var(--admin-line);
}

body[data-role="ADMIN"] .admin-personal-button,
body[data-role="ADMIN"] .admin-primary-nav-button {
  width: 100%;
  min-height: 34px !important;
  padding: 0 9px !important;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto 13px !important;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  text-align: left;
}

body[data-role="ADMIN"] .admin-personal-button {
  grid-template-columns: 18px minmax(0, 1fr) !important;
}

body[data-role="ADMIN"] .admin-primary-nav {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-auto-rows: 34px;
  align-content: start;
  gap: 2px;
  overflow: hidden !important;
  padding: 0;
  scrollbar-width: none;
}

body[data-role="ADMIN"] .admin-primary-nav::-webkit-scrollbar { display: none; }
body[data-role="ADMIN"] .admin-nav-group { min-width: 0; height: 34px; }
body[data-role="ADMIN"] .admin-nav-children { display: none !important; }
body[data-role="ADMIN"] .admin-nav-domain-label {
  flex: 0 0 26px;
  min-height: 26px;
  padding: 9px 8px 4px;
  border: 0;
  font-size: 8px;
}

body[data-role="ADMIN"] .admin-primary-nav-button > span,
body[data-role="ADMIN"] .admin-personal-button > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

body[data-role="ADMIN"] .admin-primary-nav-button > small {
  min-width: 20px;
  padding: 1px 4px;
  border-radius: 8px;
  font-size: 7px;
  text-align: center;
}

body[data-role="ADMIN"] .admin-primary-nav-button .admin-nav-chevron {
  width: 13px;
  height: 13px;
  transform: none !important;
}

body[data-role="ADMIN"] .admin-all-functions {
  min-height: 34px;
  flex: 0 0 34px;
  margin-top: 5px;
  border-radius: 5px;
  font-size: 10px;
}

body[data-role="ADMIN"] .sidebar-meta { display: none; }

body[data-role="ADMIN"] .main {
  width: 100%;
  height: 100dvh;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 92px minmax(0, 1fr);
  overflow: hidden !important;
}

body[data-role="ADMIN"] .topbar {
  position: relative;
  top: auto;
  z-index: 50;
  width: 100%;
  height: 92px !important;
  min-width: 0;
  padding: 0 !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 47px 45px;
  align-items: stretch;
  justify-content: stretch;
  gap: 0;
  border-bottom: 1px solid var(--admin-line);
}

body[data-role="ADMIN"] .admin-header-module-overflow:not([open]) > .admin-header-module-menu {
  display: none;
}

body[data-role="ADMIN"] .admin-topbar-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
}

body[data-role="ADMIN"] .admin-topbar-recent {
  border-top: 1px solid color-mix(in srgb, var(--admin-line) 72%, transparent);
}

body[data-role="ADMIN"] .admin-header-leading { flex: 0 0 auto; }
body[data-role="ADMIN"] .admin-sidebar-toggle { display: none; }
body[data-role="ADMIN"] .admin-header-modules {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  overflow: visible;
}

body[data-role="ADMIN"] .admin-header-configured-track {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

body[data-role="ADMIN"] .admin-header-module-slot { flex: 0 0 auto; }
body[data-role="ADMIN"] .admin-header-module-slot.module-type-metric { max-width: 180px; }
body[data-role="ADMIN"] .admin-header-metric {
  min-width: 112px;
  height: 31px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 5px;
  font-size: 9px;
}

body[data-role="ADMIN"] .admin-header-metric > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-role="ADMIN"] .admin-header-metric > b {
  margin-left: auto;
  color: var(--admin-nav-ink);
  font: 750 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}

body[data-role="ADMIN"] .admin-header-command,
body[data-role="ADMIN"] .admin-profile-summary {
  min-width: 31px;
  width: 31px;
  height: 31px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 5px;
}

body[data-role="ADMIN"] .admin-header-command-label { display: none; }
body[data-role="ADMIN"] .admin-header-command > .lucide-icon { width: 15px; height: 15px; }
body[data-role="ADMIN"] .admin-header-command > small {
  position: absolute;
  transform: translate(10px, -10px);
  min-width: 14px;
  padding: 1px 3px;
  border-radius: 7px;
  background: var(--admin-danger);
  color: var(--admin-danger-ink, #fff);
  font-size: 7px;
}

body[data-role="ADMIN"] .admin-header-fixed-administrator {
  flex: 0 0 auto;
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--admin-line);
}

body[data-role="ADMIN"] .admin-profile-summary {
  width: auto;
  min-width: 98px;
  padding: 0 7px;
  grid-template-columns: minmax(0, 1fr) 10px;
  text-align: right;
}

body[data-role="ADMIN"] .admin-profile-identity { min-width: 0; display: grid !important; }
body[data-role="ADMIN"] .admin-profile-identity strong,
body[data-role="ADMIN"] .admin-profile-identity small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-role="ADMIN"] .admin-profile-identity strong { font-size: 9px; }
body[data-role="ADMIN"] .admin-profile-identity small { color: var(--admin-nav-muted); font-size: 8px; }

body[data-role="ADMIN"] .admin-top-recent {
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
body[data-role="ADMIN"] .admin-top-recent::-webkit-scrollbar { display: none; }
body[data-role="ADMIN"] .admin-top-recent-label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--admin-nav-muted);
  font-size: 9px;
  white-space: nowrap;
}
body[data-role="ADMIN"] .admin-top-recent-label .lucide-icon { width: 13px; height: 13px; }
body[data-role="ADMIN"] .admin-top-recent-tab {
  height: 28px;
  max-width: 170px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--admin-nav-ink) 15%, var(--admin-nav));
  border-radius: 5px;
  background: color-mix(in srgb, var(--admin-nav-ink) 5%, var(--admin-nav));
}
body[data-role="ADMIN"] .admin-top-recent-tab.active {
  border-color: var(--admin-nav-selected-border);
  background: var(--admin-nav-selected);
}
body[data-role="ADMIN"] .admin-top-recent-open {
  min-width: 0;
  max-width: 130px;
  height: 26px;
  padding: 0 4px 0 8px;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--admin-nav-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-role="ADMIN"] .admin-top-recent-tab.active .admin-top-recent-open { color: var(--admin-nav-ink); }
body[data-role="ADMIN"] .admin-top-recent-close {
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
  border: 0 !important;
  background: transparent !important;
}
body[data-role="ADMIN"] .admin-top-recent-close .lucide-icon { width: 11px; height: 11px; }

body[data-role="ADMIN"] .content {
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 10px 48px 18px 12px;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body[data-role="ADMIN"] .admin-page-context {
  margin: 0 0 8px;
  overflow: visible;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  background: var(--admin-surface);
}
body[data-role="ADMIN"] .admin-page-context-header {
  min-height: 58px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--admin-line);
  background: var(--admin-surface);
}
body[data-role="ADMIN"] .admin-page-context-identity {
  width: 150px;
  min-width: 150px;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 8px;
}
body[data-role="ADMIN"] .admin-page-context-icon {
  width: 31px;
  height: 31px;
  border: 1px solid color-mix(in srgb, var(--workspace-accent) 46%, var(--admin-line));
  border-radius: 5px;
  background: var(--workspace-accent-soft);
  color: var(--workspace-accent);
}
body[data-role="ADMIN"] .admin-page-title-line > h1 { font-size: 13px; }
body[data-role="ADMIN"] .admin-page-context-metrics {
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 0;
}
body[data-role="ADMIN"] .admin-page-context-metrics > * {
  min-width: 58px;
  min-height: 34px;
  padding: 2px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 0;
  border-left: 1px solid var(--admin-line);
  background: transparent;
}
body[data-role="ADMIN"] .admin-page-context-metrics :where(span, small) { color: var(--admin-muted); font-size: 7px; white-space: nowrap; }
body[data-role="ADMIN"] .admin-page-context-metrics b { color: var(--admin-ink); font-size: 12px; white-space: nowrap; }
body[data-role="ADMIN"] .admin-page-context-actions,
body[data-role="ADMIN"] .admin-page-context-page-actions {
  margin-left: auto;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
body[data-role="ADMIN"] .admin-page-context-actions .btn,
body[data-role="ADMIN"] .admin-page-context-page-actions .btn {
  min-height: 31px;
  border-radius: 5px;
}
body[data-role="ADMIN"] .admin-page-context-toolbar {
  min-width: 0;
  min-height: 38px;
  padding: 0 7px;
  display: flex;
  align-items: stretch;
  gap: 8px;
  border: 0;
  background: var(--admin-surface-alt);
}
body[data-role="ADMIN"] .admin-page-siblings-scroll {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
body[data-role="ADMIN"] .admin-page-siblings-scroll::-webkit-scrollbar { display: none; }
body[data-role="ADMIN"] .admin-page-siblings button {
  min-width: max-content;
  height: 38px;
  padding: 0 10px;
  flex: 0 0 auto;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0;
  background: transparent !important;
  color: var(--admin-muted);
  font-size: 9px;
}
body[data-role="ADMIN"] .admin-page-siblings button.active {
  border-bottom-color: var(--workspace-accent) !important;
  color: var(--admin-ink) !important;
}

body[data-role="ADMIN"] .admin-page-siblings {
  border: 1px solid var(--admin-line);
  border-radius: 5px;
  background: var(--admin-input);
}
body[data-role="ADMIN"] .admin-page-siblings-label {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: max-content;
  height: 38px;
  padding: 0 12px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  border-right: 1px solid var(--admin-line);
  box-shadow: 5px 0 10px color-mix(in srgb, var(--admin-bg) 72%, transparent);
  background: var(--admin-surface-alt);
  color: var(--admin-ink);
  font-size: 10px;
  white-space: nowrap;
}
body[data-role="ADMIN"] .admin-page-siblings-label .lucide-icon {
  width: 14px;
  height: 14px;
  color: var(--workspace-accent);
}
body[data-role="ADMIN"] .admin-page-siblings button {
  padding: 0 12px;
  font-size: 10px;
}
body[data-role="ADMIN"] .admin-page-siblings button.active {
  background: var(--workspace-accent-soft) !important;
  color: var(--workspace-accent) !important;
  font-weight: 700;
}
body[data-role="ADMIN"] .admin-page-siblings-attention {
  animation: admin-submenu-attention 720ms ease-out;
}
@keyframes admin-submenu-attention {
  0%, 100% { box-shadow: none; }
  35% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--workspace-accent) 52%, transparent); }
}

@media (max-width: 760px) {
  body[data-role="ADMIN"] .admin-page-siblings-label { padding: 0 9px; font-size: 9px; }
  body[data-role="ADMIN"] .admin-page-siblings button { padding: 0 10px; font-size: 9px; }
}

body[data-role="ADMIN"] .admin-page-inline-filter {
  min-width: 0;
  flex: 1 1 auto;
  display: flex !important;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
}
body[data-role="ADMIN"] .admin-page-inline-filter > .member-filter-field { min-width: 82px; width: 92px; margin: 0; }
body[data-role="ADMIN"] .admin-page-inline-filter > .member-search-field { width: 145px; min-width: 120px; flex: 1 1 145px; }
body[data-role="ADMIN"] .admin-page-inline-filter > .member-sort-field { width: 104px; }
body[data-role="ADMIN"] .admin-page-inline-filter .member-filter-field > span { display: none; }
body[data-role="ADMIN"] .admin-page-inline-filter :where(input, select) { width: 100%; height: 32px; min-width: 0; padding: 0 7px; font-size: 8px; }
body[data-role="ADMIN"] .admin-page-inline-filter .member-filter-actions { display: flex; gap: 3px; }
body[data-role="ADMIN"] .admin-page-inline-filter .member-filter-actions .btn { width: 31px; min-width: 31px; height: 31px; padding: 0; }
body[data-role="ADMIN"] .admin-page-inline-filter .member-filter-advanced {
  position: absolute;
  top: 56px;
  right: 150px;
  z-index: 70;
  width: min(470px, calc(100vw - 280px));
  padding: 8px;
  border: 1px solid var(--admin-line-strong);
  border-radius: 5px;
  background: var(--admin-surface);
  box-shadow: 0 14px 32px color-mix(in srgb, var(--admin-overlay) 32%, transparent);
}
body[data-role="ADMIN"] .admin-page-inline-filter .member-filter-advanced:not(.open) { display: none; }

body[data-role="ADMIN"] .panel,
body[data-role="ADMIN"] .bank-directory-workspace,
body[data-role="ADMIN"] .mini-approved-operations {
  border-radius: 6px;
}
body[data-role="ADMIN"] .panel-header { min-height: 40px; padding: 6px 9px; }
body[data-role="ADMIN"] .panel-header h2 { font-size: 11px; }
body[data-role="ADMIN"] .panel-header p { margin-top: 2px; font-size: 8px; }
body[data-role="ADMIN"] .admin-integrated-list-panel > .panel-header { min-height: 34px; }
body[data-role="ADMIN"] table { font-size: 9px; }
body[data-role="ADMIN"] th { height: 34px; padding: 0 7px; font-size: 8px; white-space: nowrap; }
body[data-role="ADMIN"] td { height: 39px; padding: 4px 7px; }
body[data-role="ADMIN"] .btn {
  min-height: 31px;
  padding: 0 9px;
  border-radius: 5px;
  font-size: 9px;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease, transform 120ms ease;
}
body[data-role="ADMIN"] .btn:hover { transform: translateY(-1px); }
body[data-role="ADMIN"] .btn:active { transform: translateY(0); }
body[data-role="ADMIN"] .btn.icon { width: 31px; min-width: 31px; padding: 0; }
body[data-role="ADMIN"] .btn .lucide-icon { width: 14px; height: 14px; }

/* Member list */
body[data-role="ADMIN"] .member-list-workspace > .compact-summary-strip,
body[data-role="ADMIN"] .member-list-workspace > .member-filter-bar { margin: 0; }
body[data-role="ADMIN"] .member-list-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}
body[data-role="ADMIN"] .member-list-table :is(th, td) { white-space: nowrap; }
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="channel"] { width: 132px; min-width: 132px; }
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="memberId"] { width: 118px; min-width: 118px; }
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="nickname"] { width: 154px; min-width: 154px; }
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="statusSimple"] { width: 88px; min-width: 88px; }
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="coinBalance"],
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="pointBalance"],
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="balance"],
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="potentialPayout"],
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="settledWinLoss"] { width: 132px; min-width: 132px; }
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="referrer"],
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="levelActivity"],
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="checkins"],
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="status"],
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="risk"] { width: 142px; min-width: 142px; }
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="depositToday"],
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="withdrawalToday"],
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="depositTotal"],
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="withdrawalTotal"],
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="racing"],
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="sports"],
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="casino"],
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="mini"] { width: 136px; min-width: 136px; }
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="ordersTotal"],
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="operatingAssets"] { width: 156px; min-width: 156px; }
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="lastLogin"],
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="createdAt"] { width: 140px; min-width: 140px; }
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="accessContext"] { width: 188px; min-width: 188px; }
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="region"] { width: 102px; min-width: 102px; }
body[data-role="ADMIN"] .member-list-table :is(th, td)[data-column-id="actions"] { width: 92px; min-width: 92px; }
body[data-role="ADMIN"] .member-channel-compact { max-width: 140px; }
body[data-role="ADMIN"] .member-channel-compact :where(span, b, small),
body[data-role="ADMIN"] .member-nickname-cell b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-role="ADMIN"] .member-account-state-compact { display: inline-flex; align-items: center; gap: 4px; }
body[data-role="ADMIN"] .member-account-state-compact .online { color: var(--admin-success); font-size: 8px; }
body[data-role="ADMIN"] .member-money-value { font: 750 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
body[data-role="ADMIN"] .coin-value { color: var(--admin-warning); }
body[data-role="ADMIN"] .point-value { color: var(--admin-success); }
body[data-role="ADMIN"] .member-direct-edit { min-width: 68px; }

/* Member desktop workspace */
body[data-role="ADMIN"] .member-detail-dialog-layer { padding: 2.5vh 2vw; overflow: hidden; place-items: center; }
body[data-role="ADMIN"] .modal.member-detail-desktop-dialog {
  width: 96vw;
  max-width: 1780px;
  height: 95vh;
  max-height: 95vh;
  overflow: hidden;
  border-radius: 7px;
}
body[data-role="ADMIN"] .member-detail-page {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
  overflow: hidden;
}
body[data-role="ADMIN"] .member-detail-page.member-detail-page-editing { grid-template-rows: 72px minmax(0, 1fr); }
body[data-role="ADMIN"] .member-detail-page-head {
  min-width: 0;
  min-height: 72px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--admin-line-strong);
  background: var(--admin-nav);
}
body[data-role="ADMIN"] .member-detail-back { flex: 0 0 31px; }
body[data-role="ADMIN"] .member-object-title { width: 205px; min-width: 160px; }
body[data-role="ADMIN"] .member-object-title-line { gap: 5px; }
body[data-role="ADMIN"] .member-object-title-line h2 { max-width: 90px; font-size: 12px; }
body[data-role="ADMIN"] .member-object-name { max-width: 100px; font-size: 9px; }
body[data-role="ADMIN"] .member-detail-page-head .member-detail-summary {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 0;
  background: transparent;
}
body[data-role="ADMIN"] .member-detail-page-head .member-detail-fact {
  min-width: 82px;
  flex: 1 1 88px;
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 0;
  border-left: 1px solid var(--admin-line);
  background: transparent;
}
body[data-role="ADMIN"] .member-detail-page-head .member-detail-fact span { font-size: 7px; }
body[data-role="ADMIN"] .member-detail-page-head .member-detail-fact b { margin-top: 3px; font-size: 11px; white-space: nowrap; }
body[data-role="ADMIN"] .member-detail-page-head .member-detail-fact small { display: none; }
body[data-role="ADMIN"] .member-detail-page-head .modal-head-actions {
  min-width: max-content;
  margin-left: 0;
  gap: 4px;
}
body[data-role="ADMIN"] .member-detail-workspace {
  min-height: 0;
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr);
  overflow: hidden;
}
body[data-role="ADMIN"] .member-detail-tabs-shell {
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid var(--admin-line);
  background: var(--admin-surface-alt);
}
body[data-role="ADMIN"] .member-detail-tabs {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
body[data-role="ADMIN"] .member-detail-tabs::-webkit-scrollbar { display: none; }
body[data-role="ADMIN"] .member-detail-tabs button,
body[data-role="ADMIN"] .member-detail-more-tabs > summary {
  min-width: 66px;
  height: 41px;
  padding: 0 8px;
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--admin-muted);
  font-size: 8px;
  white-space: nowrap;
}
body[data-role="ADMIN"] .member-detail-tabs button.active,
body[data-role="ADMIN"] .member-detail-more-tabs > summary.active {
  border-bottom-color: var(--admin-accent);
  color: var(--admin-ink);
}
body[data-role="ADMIN"] .member-detail-more-tabs { position: relative; flex: 0 0 64px; }
body[data-role="ADMIN"] .member-detail-more-tabs > summary { cursor: pointer; list-style: none; }
body[data-role="ADMIN"] .member-detail-more-tabs > summary::-webkit-details-marker { display: none; }
body[data-role="ADMIN"] .member-detail-more-tabs-list {
  position: absolute;
  top: 42px;
  right: 0;
  z-index: 90;
  width: 190px;
  padding: 5px;
  display: grid;
  gap: 2px;
  border: 1px solid var(--admin-line-strong);
  border-radius: 5px;
  background: var(--admin-surface);
  box-shadow: 0 16px 34px color-mix(in srgb, var(--admin-overlay) 36%, transparent);
}
body[data-role="ADMIN"] .member-detail-more-tabs:not([open]) .member-detail-more-tabs-list { display: none; }
body[data-role="ADMIN"] .member-detail-more-tabs-list button {
  min-height: 31px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--admin-muted);
  font-size: 9px;
  text-align: left;
}
body[data-role="ADMIN"] .member-detail-more-tabs-list button:hover,
body[data-role="ADMIN"] .member-detail-more-tabs-list button.active { background: var(--admin-hover); color: var(--admin-ink); }
body[data-role="ADMIN"] .member-detail-content {
  min-width: 0;
  min-height: 0;
  padding: 9px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
body[data-role="ADMIN"] .member-detail-page-host .member-detail-workspace .member-detail-content {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
body[data-role="ADMIN"] .member-profile-direct-page,
body[data-role="ADMIN"] .member-limit-direct-page {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 9px;
}
body[data-role="ADMIN"] .member-profile-direct-section,
body[data-role="ADMIN"] .member-limit-direct-page {
  min-width: 0;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--admin-surface);
}
body[data-role="ADMIN"] .member-profile-direct-section-head,
body[data-role="ADMIN"] .member-limit-direct-head {
  min-height: 39px;
  padding: 6px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--admin-line);
  background: var(--admin-surface-alt);
}
body[data-role="ADMIN"] .member-profile-direct-section-head h3,
body[data-role="ADMIN"] .member-limit-direct-head h3 {
  margin: 0;
  color: var(--admin-ink);
  font-size: 10px;
  font-weight: 750;
}
body[data-role="ADMIN"] .member-profile-direct-section-head small,
body[data-role="ADMIN"] .member-limit-direct-head small {
  min-width: 0;
  overflow: hidden;
  color: var(--admin-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-role="ADMIN"] .member-profile-direct-facts {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  border: 0;
  background: var(--admin-line);
}
body[data-role="ADMIN"] .member-profile-direct-facts .member-detail-fact {
  min-height: 62px;
  padding: 8px 9px;
  border: 0 !important;
  background: var(--admin-surface);
}
body[data-role="ADMIN"] .member-profile-direct-facts .member-detail-fact > b { margin-top: 5px; font-size: 10px; }
body[data-role="ADMIN"] .member-profile-direct-facts .member-detail-fact > small { margin-top: 3px; font-size: 8px; }
body[data-role="ADMIN"] .member-profile-direct-inline-actions {
  min-height: 42px;
  padding: 5px 9px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  border-top: 1px solid var(--admin-line);
}
body[data-role="ADMIN"] .member-profile-direct-fields,
body[data-role="ADMIN"] .member-profile-direct-toggles,
body[data-role="ADMIN"] .member-profile-direct-settings > .member-tag-editor,
body[data-role="ADMIN"] .member-profile-direct-settings > .member-comprehensive-reason {
  margin: 9px 9px 0;
}
body[data-role="ADMIN"] .member-profile-direct-toggles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
body[data-role="ADMIN"] .member-profile-direct-toggles .member-priority-toggle {
  min-height: 42px;
  margin: 0;
  color: var(--admin-ink);
  font-size: 9px;
}
body[data-role="ADMIN"] .member-profile-direct-toggles .field { margin: 0; }
body[data-role="ADMIN"] .member-profile-direct-settings > .member-tag-editor { margin-bottom: 0; }
body[data-role="ADMIN"] .member-profile-direct-settings > .member-comprehensive-reason { margin-bottom: 9px; }
body[data-role="ADMIN"] .member-profile-direct-actions {
  position: sticky;
  bottom: -9px;
  z-index: 20;
  min-height: 45px;
  margin: 0 -9px -9px;
  border-top: 1px solid var(--admin-line-strong);
  background: color-mix(in srgb, var(--admin-surface-alt) 96%, transparent);
}
body[data-role="ADMIN"] .member-limit-direct-page > .member-play-limit-workspace { padding: 9px; }
body[data-role="ADMIN"] .member-comprehensive-page { height: auto; min-height: 100%; overflow: visible; }
body[data-role="ADMIN"] .member-comprehensive-page-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  overflow: visible;
}
body[data-role="ADMIN"] .member-comprehensive-sections { min-width: 0; overflow: visible; }
body[data-role="ADMIN"] .member-comprehensive-section {
  margin-bottom: 7px;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--admin-surface);
}
body[data-role="ADMIN"] .member-comprehensive-section > summary { min-height: 42px; padding: 6px 9px; background: var(--admin-surface-alt); }
body[data-role="ADMIN"] .member-comprehensive-section-body { padding: 8px; }
body[data-role="ADMIN"] .member-comprehensive-page-actions {
  position: sticky;
  bottom: -9px;
  z-index: 20;
  margin: 8px -9px -9px;
  border-top: 1px solid var(--admin-line-strong);
  background: color-mix(in srgb, var(--admin-surface-alt) 96%, transparent);
}

/* Racing reference workspace */
body[data-role="ADMIN"] .racing-ops-toolbar,
body[data-role="ADMIN"] .mini-ops-stack { margin-top: 0; }
body[data-role="ADMIN"] .racing-ops-toolbar {
  min-height: 34px;
  padding: 0 0 5px;
  display: flex;
  justify-content: flex-end;
  border: 0;
  background: transparent;
}
body[data-role="ADMIN"] .racing-management-menu { position: relative; }
body[data-role="ADMIN"] .racing-management-menu > summary {
  min-height: 31px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  border: 1px solid var(--admin-line-strong);
  border-radius: 5px;
  background: var(--admin-surface-alt);
  color: var(--admin-muted);
  cursor: pointer;
  font-size: 9px;
  list-style: none;
}
body[data-role="ADMIN"] .racing-management-menu > summary::-webkit-details-marker { display: none; }
body[data-role="ADMIN"] .racing-management-menu-list {
  position: absolute;
  top: 35px;
  right: 0;
  z-index: 80;
  width: 190px;
  padding: 5px;
  display: grid;
  gap: 2px;
  border: 1px solid var(--admin-line-strong);
  border-radius: 5px;
  background: var(--admin-surface);
  box-shadow: 0 16px 32px color-mix(in srgb, var(--admin-overlay) 34%, transparent);
}
body[data-role="ADMIN"] .racing-management-menu-list button {
  min-height: 31px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--admin-muted);
  font-size: 9px;
  text-align: left;
}
body[data-role="ADMIN"] .racing-management-menu-list button:hover,
body[data-role="ADMIN"] .racing-management-menu-list button.active { background: var(--admin-hover); color: var(--admin-ink); }
body[data-role="ADMIN"] .racing-reference-workspace { display: block; }
body[data-role="ADMIN"] .racing-reference-main { min-width: 0; }
body[data-role="ADMIN"] .racing-product-strip,
body[data-role="ADMIN"] .mini-game-strip {
  min-height: 40px;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--admin-line);
  border-radius: 6px 6px 0 0;
  background: var(--admin-surface-alt);
  scrollbar-width: none;
}
body[data-role="ADMIN"] .racing-product-strip::-webkit-scrollbar,
body[data-role="ADMIN"] .mini-game-strip::-webkit-scrollbar { display: none; }
body[data-role="ADMIN"] .racing-product-strip-track { display: flex; min-width: max-content; }
body[data-role="ADMIN"] .racing-product-tab,
body[data-role="ADMIN"] .mini-game-tab {
  min-width: 84px;
  min-height: 39px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-right: 1px solid var(--admin-line);
  background: transparent;
  color: var(--admin-muted);
  font-size: 8px;
  white-space: nowrap;
}
body[data-role="ADMIN"] .mini-game-tab { min-width: 112px; }
body[data-role="ADMIN"] .racing-product-tab.active,
body[data-role="ADMIN"] .mini-game-tab.active {
  background: var(--workspace-accent);
  color: var(--admin-accent-ink);
  font-weight: 750;
}
body[data-role="ADMIN"] .racing-product-tab b,
body[data-role="ADMIN"] .mini-game-tab b { font-size: 7px; }
body[data-role="ADMIN"] .racing-reference-command {
  min-height: 48px;
  padding: 6px 8px;
  border: 1px solid var(--admin-line);
  border-top: 0;
  border-radius: 0;
  background: var(--admin-surface);
}
body[data-role="ADMIN"] .racing-reference-command h2 { font-size: 11px; }
body[data-role="ADMIN"] .racing-reference-command p { font-size: 8px; }
body[data-role="ADMIN"] .racing-reference-table-wrap { border-radius: 0 0 6px 6px; }
body[data-role="ADMIN"] .racing-reference-table { min-width: 1320px; table-layout: fixed; }
body[data-role="ADMIN"] .racing-reference-table th,
body[data-role="ADMIN"] .racing-reference-table td { height: 34px; padding: 0 4px; font-size: 8px; text-align: center; white-space: nowrap; }
body[data-role="ADMIN"] .racing-reference-table th:first-child,
body[data-role="ADMIN"] .racing-reference-table td:first-child { width: 145px; text-align: left; }
body[data-role="ADMIN"] .racing-reference-table .racing-play-total { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
body[data-role="ADMIN"] .racing-reference-table .racing-play-total-all { color: var(--admin-warning); font-weight: 750; }
body[data-role="ADMIN"] .racing-sync-history {
  margin-top: 7px;
  border: 1px solid var(--admin-line);
  border-radius: 5px;
  background: var(--admin-surface);
}
body[data-role="ADMIN"] .racing-sync-history > summary { min-height: 34px; padding: 0 9px; display: flex; align-items: center; color: var(--admin-muted); cursor: pointer; font-size: 9px; }
body[data-role="ADMIN"] .racing-sync-history > .panel { margin: 0; border: 0; border-top: 1px solid var(--admin-line); border-radius: 0; }
body[data-role="ADMIN"] .racing-quick-add-modal { width: min(980px, calc(100vw - 30px)); }
body[data-role="ADMIN"] .racing-quick-add-setup {
  grid-template-columns: 130px minmax(130px, .8fr) minmax(170px, 1fr) 90px auto;
  gap: 7px;
}
body[data-role="ADMIN"] .racing-quick-add-table th,
body[data-role="ADMIN"] .racing-quick-add-table td { height: 40px; }

/* Mini API rounds and live orders */
body[data-role="ADMIN"] .mini-approved-workspace { min-width: 0; width: 100%; display: grid; gap: 0; }
body[data-role="ADMIN"] .mini-game-strip { border-radius: 6px 6px 0 0; }
body[data-role="ADMIN"] .mini-approved-operations {
  min-width: 0;
  width: 100%;
  min-height: 520px;
  display: grid;
  grid-template-rows: repeat(2, minmax(240px, 1fr));
  border: 1px solid var(--admin-line);
  border-top: 0;
  overflow: hidden;
  background: var(--admin-surface);
}
body[data-role="ADMIN"] .mini-approved-operations > .panel {
  min-width: 0;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
}
body[data-role="ADMIN"] .mini-approved-operations > .panel + .panel { border-top: 1px solid var(--admin-line-strong); }
body[data-role="ADMIN"] .mini-approved-operations .table-workspace,
body[data-role="ADMIN"] .mini-approved-operations .table-scroll { min-width: 0; width: 100%; max-width: 100%; }
body[data-role="ADMIN"] .mini-approved-operations .table-scroll { max-height: none; }
body[data-role="ADMIN"] .mini-api-round-table,
body[data-role="ADMIN"] .mini-live-order-table { min-width: 980px; }

/* Bank names only */
body[data-role="ADMIN"] .bank-directory-workspace {
  overflow: hidden;
  border: 1px solid var(--admin-line);
  background: var(--admin-surface);
}
body[data-role="ADMIN"] .bank-directory-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
body[data-role="ADMIN"] .bank-directory-add-row {
  min-height: 58px;
  padding: 7px 9px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(190px, .7fr) 90px auto 31px;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--admin-line);
  background: var(--admin-surface-alt);
}
body[data-role="ADMIN"] .bank-directory-add-copy { min-width: 0; display: grid; gap: 3px; }
body[data-role="ADMIN"] .bank-directory-add-copy strong { font-size: 10px; }
body[data-role="ADMIN"] .bank-directory-add-copy span { overflow: hidden; color: var(--admin-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
body[data-role="ADMIN"] .bank-directory-add-row > input { height: 32px; padding: 0 8px; }
body[data-role="ADMIN"] .bank-directory-status { display: inline-flex; align-items: center; gap: 5px; color: var(--admin-muted); font-size: 9px; }
body[data-role="ADMIN"] .bank-directory-table { min-width: 760px; }
body[data-role="ADMIN"] .bank-directory-row {
  min-height: 42px;
  padding: 4px 8px;
  display: grid;
  grid-template-columns: 90px minmax(230px, 1.4fr) 130px minmax(150px, .8fr) 150px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--admin-line);
  font-size: 9px;
}
body[data-role="ADMIN"] .bank-directory-row-head { min-height: 34px; background: var(--admin-table-head); color: var(--admin-muted); font-size: 8px; }
body[data-role="ADMIN"] .bank-directory-order,
body[data-role="ADMIN"] .bank-directory-actions { display: flex; align-items: center; gap: 3px; }
body[data-role="ADMIN"] .bank-directory-order .btn { width: 25px; min-width: 25px; height: 25px; min-height: 25px; }
body[data-role="ADMIN"] .bank-directory-name {
  min-width: 0;
  padding: 7px 8px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--admin-ink);
  font-size: 10px;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-role="ADMIN"] .bank-directory-name:hover { border-color: var(--admin-line-strong); background: var(--admin-input); }
body[data-role="ADMIN"] .bank-directory-status-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: var(--admin-muted);
  font-size: 9px;
}
body[data-role="ADMIN"] .bank-directory-switch {
  width: 28px;
  height: 16px;
  position: relative;
  border: 1px solid var(--admin-line-strong);
  border-radius: 9px;
  background: var(--admin-input);
}
body[data-role="ADMIN"] .bank-directory-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--admin-muted);
}
body[data-role="ADMIN"] .bank-directory-status-control.active .bank-directory-switch { border-color: var(--admin-success); background: var(--admin-success-soft); }
body[data-role="ADMIN"] .bank-directory-status-control.active .bank-directory-switch::after { left: 14px; background: var(--admin-success); }
body[data-role="ADMIN"] .bank-directory-modified { min-width: 0; display: flex; align-items: center; gap: 7px; }
body[data-role="ADMIN"] .bank-directory-modified strong { font-size: 9px; }
body[data-role="ADMIN"] .bank-directory-modified span { color: var(--admin-muted); font-size: 8px; }
body[data-role="ADMIN"] .bank-directory-foot {
  min-height: 45px;
  padding: 6px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--admin-muted);
  font-size: 8px;
}

body[data-role="ADMIN"] .admin-operation-guide-tab {
  position: fixed;
  right: 0;
  top: 46%;
  z-index: 60;
  width: 38px;
  min-width: 38px;
  min-height: 108px;
  padding: 8px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--admin-line-strong);
  border-right: 0;
  border-radius: 6px 0 0 6px;
  background: var(--admin-surface-alt);
  color: var(--admin-muted);
  writing-mode: vertical-rl;
}
body[data-role="ADMIN"] .admin-operation-guide-tab .lucide-icon { width: 15px; height: 15px; }

@media (max-width: 1180px) and (min-width: 761px) {
  body[data-role="ADMIN"] .app-shell { grid-template-columns: 68px minmax(0, 1fr) !important; }
  body[data-role="ADMIN"] .sidebar-brand.admin-sidebar-search { height: 80px; flex-basis: 80px; padding: 0; grid-template-columns: 1fr; place-items: center; }
  body[data-role="ADMIN"] .sidebar-brand.admin-sidebar-search > span,
  body[data-role="ADMIN"] .sidebar-brand.admin-sidebar-search > small { display: none; }
  body[data-role="ADMIN"] .admin-navigation { padding: 5px; }
  body[data-role="ADMIN"] .admin-nav-domain-label,
  body[data-role="ADMIN"] .admin-primary-nav-button > span,
  body[data-role="ADMIN"] .admin-primary-nav-button > small,
  body[data-role="ADMIN"] .admin-primary-nav-button .admin-nav-chevron,
  body[data-role="ADMIN"] .admin-personal-button > span,
  body[data-role="ADMIN"] .admin-all-functions { display: none !important; }
  body[data-role="ADMIN"] .admin-primary-nav-button,
  body[data-role="ADMIN"] .admin-personal-button { padding: 0 !important; grid-template-columns: 1fr !important; place-items: center; }
  body[data-role="ADMIN"] .main { grid-template-rows: 80px minmax(0, 1fr); }
  body[data-role="ADMIN"] .topbar { height: 80px !important; grid-template-rows: 40px 40px; }
  body[data-role="ADMIN"] .admin-header-module-slot.metric-rank-4,
  body[data-role="ADMIN"] .admin-header-module-slot.metric-rank-5 { display: none; }
  body[data-role="ADMIN"] .admin-header-metric { min-width: 95px; }
  body[data-role="ADMIN"] .admin-page-context-header { flex-wrap: wrap; }
  body[data-role="ADMIN"] .admin-page-context-identity { width: 135px; min-width: 135px; }
  body[data-role="ADMIN"] .admin-page-inline-filter { order: 4; width: 100%; flex-basis: 100%; }
  body[data-role="ADMIN"] .member-comprehensive-page-body { grid-template-columns: minmax(0, 1fr); }
  body[data-role="ADMIN"] .member-profile-direct-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body[data-role="ADMIN"] .member-detail-page-head .member-detail-fact:nth-child(n + 5) { display: none; }
  body[data-role="ADMIN"] .member-detail-save-all { font-size: 0; width: 31px; min-width: 31px; padding: 0; }
  body[data-role="ADMIN"] .member-detail-save-all::before { content: "✓"; font-size: 12px; }
}

@media (max-width: 760px) {
  body[data-role="ADMIN"] { height: 100dvh; overflow: hidden; }
  body[data-role="ADMIN"] .app-shell { display: block; height: 100dvh; overflow: hidden; }
  body[data-role="ADMIN"] .main {
    height: calc(100dvh - 62px);
    display: grid;
    grid-template-rows: 78px minmax(0, 1fr);
  }
  body[data-role="ADMIN"] .topbar { height: 78px !important; grid-template-rows: 39px 39px; }
  body[data-role="ADMIN"] .admin-topbar-row { padding: 0 7px; }
  body[data-role="ADMIN"] .admin-sidebar-toggle { display: grid; }
  body[data-role="ADMIN"] .admin-header-module-slot.module-type-metric { display: none; }
  body[data-role="ADMIN"] .admin-header-configured-track { justify-content: flex-end; }
  body[data-role="ADMIN"] .admin-header-fixed-administrator { margin-left: 3px; padding-left: 4px; }
  body[data-role="ADMIN"] .admin-profile-summary { min-width: 74px; }
  body[data-role="ADMIN"] .admin-profile-identity { display: grid !important; }
  body[data-role="ADMIN"] .admin-profile-identity strong { font-size: 8px; }
  body[data-role="ADMIN"] .admin-top-recent-label span { display: none; }
  body[data-role="ADMIN"] .content { padding: 7px 7px 16px; overflow-y: auto; }
  body[data-role="ADMIN"] .sidebar {
    position: fixed;
    inset: auto 0 0;
    z-index: 100;
    width: 100%;
    height: 62px;
    display: block;
    border: 0;
    border-top: 1px solid var(--admin-line);
  }
  body[data-role="ADMIN"] .sidebar-brand,
  body[data-role="ADMIN"] .admin-personal-nav,
  body[data-role="ADMIN"] .admin-nav-domain-label,
  body[data-role="ADMIN"] .admin-all-functions,
  body[data-role="ADMIN"] .sidebar-meta { display: none !important; }
  body[data-role="ADMIN"] .admin-navigation { width: 100%; height: 62px; padding: 4px; display: block; overflow: hidden; }
  body[data-role="ADMIN"] .admin-primary-nav {
    width: 100%;
    height: 54px;
    display: flex;
    align-items: stretch;
    gap: 3px;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none;
  }
  body[data-role="ADMIN"] .admin-nav-group { width: 58px; min-width: 58px; height: 54px; }
  body[data-role="ADMIN"] .admin-primary-nav-button {
    width: 58px;
    min-height: 54px !important;
    padding: 5px 2px !important;
    display: grid;
    grid-template-columns: 1fr !important;
    grid-template-rows: 21px 15px;
    place-items: center;
    gap: 2px;
    text-align: center;
  }
  body[data-role="ADMIN"] .admin-primary-nav-button > span { display: block; width: 54px; font-size: 7px; }
  body[data-role="ADMIN"] .admin-primary-nav-button > small,
  body[data-role="ADMIN"] .admin-primary-nav-button .admin-nav-chevron { display: none; }
  body[data-role="ADMIN"] .admin-page-context-header { min-height: 52px; flex-wrap: wrap; }
  body[data-role="ADMIN"] .admin-page-context-identity { width: calc(100% - 145px); min-width: 140px; }
  body[data-role="ADMIN"] .admin-page-context-metrics { order: 3; width: 100%; overflow-x: auto; }
  body[data-role="ADMIN"] .admin-page-context-metrics > * { min-width: 72px; }
  body[data-role="ADMIN"] .admin-page-inline-filter { order: 4; width: 100%; flex-basis: 100%; overflow-x: auto; }
  body[data-role="ADMIN"] .admin-page-inline-filter > .member-filter-field { min-width: 100px; }
  body[data-role="ADMIN"] .admin-page-inline-filter > .member-search-field { min-width: 150px; }
  body[data-role="ADMIN"] .admin-page-inline-filter .member-filter-advanced { position: fixed; inset: auto 7px 68px; width: auto; }
  body[data-role="ADMIN"] .admin-page-context-actions .admin-page-copy-editor-trigger,
  body[data-role="ADMIN"] .admin-page-context-actions .admin-page-guide-trigger { display: none; }
  body[data-role="ADMIN"] .admin-operation-guide-tab { display: none; }
  body[data-role="ADMIN"] .modal.member-detail-desktop-dialog { width: 100%; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
  body[data-role="ADMIN"] .member-detail-dialog-layer { padding: 0; place-items: stretch; }
  body[data-role="ADMIN"] .member-detail-page { grid-template-rows: auto minmax(0, 1fr); }
  body[data-role="ADMIN"] .member-detail-page.member-detail-page-editing { grid-template-rows: auto minmax(0, 1fr); }
  body[data-role="ADMIN"] .member-detail-page-head { min-height: 112px; padding: 6px; flex-wrap: wrap; }
  body[data-role="ADMIN"] .member-object-title { width: calc(100% - 78px); }
  body[data-role="ADMIN"] .member-detail-page-head .member-detail-summary { order: 4; width: 100%; flex-basis: 100%; overflow-x: auto; }
  body[data-role="ADMIN"] .member-detail-page-head .member-detail-fact { min-width: 92px; }
  body[data-role="ADMIN"] .member-detail-page-head .modal-head-actions { margin-left: auto; }
  body[data-role="ADMIN"] .member-detail-page-head .modal-head-actions > :nth-child(-n + 3),
  body[data-role="ADMIN"] .member-detail-page-head .member-danger-menu { display: none; }
  body[data-role="ADMIN"] .member-detail-tabs button { min-width: 74px; flex: 0 0 auto; }
  body[data-role="ADMIN"] .member-comprehensive-page-body { grid-template-columns: minmax(0, 1fr); }
  body[data-role="ADMIN"] .member-profile-direct-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-role="ADMIN"] .member-profile-direct-toggles { grid-template-columns: minmax(0, 1fr); }
  body[data-role="ADMIN"] .member-profile-direct-inline-actions { justify-content: flex-start; flex-wrap: wrap; }
  body[data-role="ADMIN"] .racing-quick-add-setup { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-role="ADMIN"] .racing-quick-add-setup > .btn { grid-column: 1 / -1; }
  body[data-role="ADMIN"] .mini-approved-operations { grid-template-rows: repeat(2, auto); min-height: 0; }
  body[data-role="ADMIN"] .bank-directory-add-row { grid-template-columns: minmax(0, 1fr) auto; }
  body[data-role="ADMIN"] .bank-directory-add-copy { grid-column: 1 / -1; }
  body[data-role="ADMIN"] .bank-directory-add-row > input { grid-column: 1 / -1; }
  body[data-role="ADMIN"] .bank-directory-scroll { overflow-x: auto; }
  body[data-role="ADMIN"] .bank-directory-foot { align-items: flex-start; flex-direction: column; }
}

/* Preserve the pre-2026-08-04 desktop menu interaction while keeping the compact V2 pages. */
@media (min-width: 1181px) {
  body[data-role="ADMIN"] .admin-primary-nav {
    display: block !important;
    grid-auto-rows: initial;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overflow-anchor: none;
    scrollbar-width: none;
  }
  body[data-role="ADMIN"] .admin-primary-nav::-webkit-scrollbar { display: none; }
  body[data-role="ADMIN"] .admin-nav-group {
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 34px;
  }
  body[data-role="ADMIN"] .admin-nav-children { display: none !important; }
  body[data-role="ADMIN"] .admin-nav-group.expanded .admin-nav-children { display: grid !important; }
  body[data-role="ADMIN"] .admin-primary-nav-button .admin-nav-chevron {
    display: block;
    transform: rotate(-90deg) !important;
    transition: transform 140ms ease;
  }
  body[data-role="ADMIN"] .admin-nav-group.expanded .admin-nav-chevron { transform: rotate(0) !important; }
  body[data-role="ADMIN"] .admin-sidebar-collapsed .admin-nav-children { display: none !important; }
}

@media (max-width: 1180px) {
  body[data-role="ADMIN"] .admin-nav-children { display: none !important; }
}

/* 2026-08-05 stability pass: reconcile stacked legacy rules without changing page structure. */
body[data-role="ADMIN"] .main { scrollbar-gutter: auto; }

body[data-role="ADMIN"] .admin-page-context-header {
  min-height: 46px;
  padding: 5px 8px;
  align-items: center;
}
body[data-role="ADMIN"] .admin-page-context-identity {
  height: auto;
  min-height: 34px;
  padding: 0 8px 0 0;
  border-right: 0;
}
body[data-role="ADMIN"] .admin-page-context-metrics {
  height: auto;
  min-height: 34px;
}
body[data-role="ADMIN"] .admin-page-context-metrics > :is(.kpi, .compact-summary-item, .order-monitor-status-fact) {
  min-height: 34px;
  padding: 3px 8px;
}
body[data-role="ADMIN"] .admin-page-context-actions,
body[data-role="ADMIN"] .admin-page-context-page-actions {
  height: auto;
  min-height: 34px;
  padding-left: 6px;
  border-left: 0;
}
body[data-role="ADMIN"] .admin-page-context-toolbar {
  min-height: 38px;
  padding: 0 7px;
}
body[data-role="ADMIN"] .admin-page-siblings {
  height: 38px;
  padding: 0;
  gap: 0;
}
body[data-role="ADMIN"] .admin-page-siblings-scroll,
body[data-role="ADMIN"] .admin-page-siblings-label,
body[data-role="ADMIN"] .admin-page-siblings button {
  height: 36px;
  min-height: 36px;
}

body[data-role="ADMIN"] .btn.ghost.icon {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
body[data-role="ADMIN"] .btn.ghost.icon:focus-visible {
  border-color: color-mix(in srgb, var(--admin-accent) 58%, var(--admin-line));
  background: var(--admin-hover);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--admin-accent) 20%, transparent);
}
body[data-role="ADMIN"] .btn.ghost.icon:active:not(:disabled) {
  background: color-mix(in srgb, var(--admin-accent) 10%, var(--admin-hover));
  box-shadow: none;
}

body[data-role="ADMIN"] .admin-primary-nav-button.active .admin-primary-nav-glyph,
body[data-role="ADMIN"] .admin-nav-button.active .nav-glyph,
body[data-role="ADMIN"] .admin-personal-button.active > .lucide-icon {
  background: transparent;
  box-shadow: none;
}

body[data-role="ADMIN"] .admin-header-module-row,
body[data-role="ADMIN"] .admin-dashboard-module-row {
  border-color: var(--admin-line);
  background: var(--admin-surface-alt);
}
body[data-role="ADMIN"] .admin-header-module-row.module-fixed {
  border-color: color-mix(in srgb, var(--admin-accent) 28%, var(--admin-line));
  background: color-mix(in srgb, var(--admin-accent) 5%, var(--admin-surface-alt));
}
body[data-role="ADMIN"] .admin-header-module-identity b { color: var(--admin-ink); }
body[data-role="ADMIN"] .admin-header-module-identity small,
body[data-role="ADMIN"] .admin-header-fixed-note { color: var(--admin-muted); }
body[data-role="ADMIN"] :is(.admin-workspace-setting-select, .admin-module-threshold) {
  border-color: var(--admin-line-strong);
  background: var(--admin-input);
  color: var(--admin-ink);
}

@media (hover: hover) {
  body[data-role="ADMIN"] .btn.ghost.icon:hover:not(:disabled) {
    border-color: var(--admin-line-strong);
    background: var(--admin-hover);
    box-shadow: none;
  }
}

@media (max-width: 1180px) {
  body[data-role="ADMIN"] .admin-page-context-header { min-height: 46px; }
  body[data-role="ADMIN"] .admin-page-context-identity { height: auto; min-height: 34px; }
  body[data-role="ADMIN"] .admin-page-context-metrics,
  body[data-role="ADMIN"] .admin-page-context-actions { height: auto; }
}

@media (max-width: 760px) {
  body[data-role="ADMIN"] .admin-page-context-header { min-height: 48px; }
  body[data-role="ADMIN"] .admin-page-context-toolbar { min-height: 38px; }
}

/* 2026-08-05 Korean full audit: stable two-row top modules and unclipped menu. */
body[data-role="ADMIN"] .admin-header-configured-track {
  overflow: visible;
}
body[data-role="ADMIN"] .admin-header-module-overflow {
  transform: none !important;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}
body[data-role="ADMIN"] .admin-header-module-overflow > summary.admin-header-command,
body[data-role="ADMIN"] .topbar :where(.admin-header-command, .admin-header-metric, .admin-profile-summary) {
  transform: none !important;
  box-shadow: none !important;
}
body[data-role="ADMIN"] .admin-header-module-menu {
  z-index: 500;
}

@media (hover: hover) {
  body[data-role="ADMIN"] .admin-header-module-overflow:hover,
  body[data-role="ADMIN"] .admin-header-module-overflow[open],
  body[data-role="ADMIN"] .topbar :where(.admin-header-command, .admin-header-metric, .admin-profile-summary):hover {
    transform: none !important;
    box-shadow: none !important;
  }
}

@media (min-width: 1181px) {
  body[data-role="ADMIN"] .main.admin-topbar-two-lines {
    grid-template-rows: 118px minmax(0, 1fr);
  }
  body[data-role="ADMIN"] .topbar.admin-topbar-two-lines {
    height: 118px !important;
    grid-template-rows: 73px 45px;
  }
  body[data-role="ADMIN"] .admin-topbar-two-lines .admin-topbar-primary {
    align-items: stretch;
    padding-block: 3px;
  }
  body[data-role="ADMIN"] .admin-header-two-lines .admin-header-configured-track {
    height: 67px;
    flex-wrap: wrap;
    align-content: center;
    row-gap: 4px;
  }
  body[data-role="ADMIN"] .admin-header-two-lines .admin-header-fixed-administrator {
    align-self: center;
  }
  body[data-role="ADMIN"] .admin-topbar-two-lines .admin-header-module-menu {
    top: 74px;
    right: 132px;
  }
}

@media (max-width: 1180px) and (min-width: 761px) {
  body[data-role="ADMIN"] .admin-header-module-slot:is(
    .metric-rank-4, .metric-rank-5, .metric-rank-6, .metric-rank-7,
    .metric-rank-8, .metric-rank-9, .metric-rank-10
  ) { display: none; }
  body[data-role="ADMIN"] .admin-header-module-menu {
    top: 42px;
    right: 86px;
  }
}

@media (max-width: 760px) {
  body[data-role="ADMIN"] .admin-header-configured-track { overflow: visible; }
  body[data-role="ADMIN"] .admin-header-module-menu {
    top: 40px;
    right: 7px;
  }
}

/* 2026-08-08 member Mini Game: verified official live media. */
body[data-role="MEMBER"] .mini-live-stage {
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #0b1216;
}
body[data-role="MEMBER"] .mini-live-stage .mini-stage-top {
  min-height: 42px;
  padding: 0 10px 0 12px;
  border-bottom: 1px solid #26343b;
  background: #121b20;
}
.mini-stage-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
.mini-official-live-refresh {
  width: 30px;
  height: 30px;
  border-color: #34464f;
  color: #a8bbc3;
}
.mini-official-live-screen {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  width: 100%;
  min-height: 0;
  aspect-ratio: 830 / 660;
  overflow: hidden;
  border-bottom: 1px solid #26343b;
  background: #050809;
  color: #f4f8fa;
}
.mini-official-live-frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 830px;
  max-width: none;
  height: 660px;
  display: block;
  border: 0;
  background: #050809;
  transform: scale(calc(100cqw / 830px));
  transform-origin: top left;
}
.mini-official-live-connecting {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  background: #0a1115;
  color: #aebdc3;
  font-size: 11px;
  transition: opacity 180ms ease-out, visibility 180ms ease-out;
}
.mini-official-live-connecting .lucide-icon {
  width: 28px;
  height: 28px;
  color: #4fc9bd;
  animation: mini-official-media-spin 900ms linear infinite;
}
.mini-official-live-screen.is-loaded .mini-official-live-connecting {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.mini-official-live-unavailable {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
  background: #0b1216;
}
.mini-official-live-unavailable .lucide-icon {
  width: 42px;
  height: 42px;
  color: #738991;
}
.mini-official-live-unavailable strong {
  color: #e8f0f2;
  font-size: 16px;
  line-height: 1.35;
}
.mini-official-live-unavailable span {
  max-width: 48ch;
  color: #9db0b7;
  font-size: 11px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
body[data-role="MEMBER"] .mini-live-stage .mini-result-meta {
  min-height: 44px;
  border: 0;
  border-top: 1px solid #26343b;
  background: #10181c;
}

@keyframes mini-official-media-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 760px) {
  .mini-official-live-unavailable {
    padding: 20px;
  }
  .mini-official-live-unavailable .lucide-icon {
    width: 34px;
    height: 34px;
  }
  .mini-official-live-unavailable strong {
    font-size: 14px;
  }
  body[data-role="MEMBER"] .mini-live-stage .mini-result-meta {
    grid-template-columns: minmax(0, 1fr);
    padding: 8px 10px;
    text-align: left;
  }
  body[data-role="MEMBER"] .mini-live-stage .mini-result-meta > span:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mini-official-live-connecting .lucide-icon {
    animation: none;
  }
}

/* 2026-08-11 admin theme and risk clarity hardening. */
body[data-role="ADMIN"] .search-spotlight {
  min-width: 0;
  align-items: flex-start;
  border: 1px solid var(--admin-line-strong);
  border-left-width: 1px;
  background: var(--admin-surface-alt);
  color: var(--admin-ink);
  box-shadow: inset 0 2px 0 var(--admin-accent);
}
body[data-role="ADMIN"] .search-spotlight > div {
  min-width: 0;
  display: grid;
  gap: 4px 12px;
}
body[data-role="ADMIN"] .search-spotlight b { color: var(--admin-ink); }
body[data-role="ADMIN"] .search-spotlight span:not(.badge) {
  margin-top: 0;
  color: var(--admin-muted);
}
body[data-role="ADMIN"] .risk-search-spotlight > div {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body[data-role="ADMIN"] .risk-search-spotlight b,
body[data-role="ADMIN"] .risk-search-spotlight .search-spotlight-meta {
  grid-column: 1 / -1;
}
body[data-role="ADMIN"] .risk-search-spotlight .search-spotlight-detail {
  overflow: visible;
  color: var(--admin-muted);
  line-height: 1.45;
  text-overflow: clip;
  white-space: normal;
}

body[data-role="ADMIN"] .risk-detail-cell b { color: var(--admin-ink); }
body[data-role="ADMIN"] .risk-detail-cell span { color: var(--admin-muted); }
body[data-role="ADMIN"] .risk-detail-cell .risk-detail-cell-note {
  color: color-mix(in srgb, var(--admin-info) 74%, var(--admin-ink));
}

body[data-role="ADMIN"] .admin-dashboard-toolbar {
  border-color: var(--admin-line);
  color: var(--admin-muted);
}
body[data-role="ADMIN"] .admin-dashboard-module {
  border-color: var(--admin-line);
  background: var(--admin-surface);
  color: var(--admin-ink);
}
body[data-role="ADMIN"] .admin-dashboard-module-head {
  border-color: var(--admin-line);
  background: var(--admin-surface-alt);
}
body[data-role="ADMIN"] .admin-dashboard-module-head > div:first-child { background: var(--admin-accent); }
body[data-role="ADMIN"] .admin-dashboard-module-head h3 { color: var(--admin-ink); }
body[data-role="ADMIN"] .admin-dashboard-module-head span { color: var(--admin-muted); }
body[data-role="ADMIN"] .admin-dashboard-link-row {
  border-color: var(--admin-line);
  color: var(--admin-muted);
}
body[data-role="ADMIN"] .admin-dashboard-link-row:hover { background: var(--admin-row-hover); }
body[data-role="ADMIN"] .admin-dashboard-link-row b,
body[data-role="ADMIN"] .admin-dashboard-link-row strong { color: var(--admin-ink); }

body[data-role="ADMIN"] .admin-workspace-metric {
  border-color: var(--admin-line);
  border-top-color: var(--admin-accent);
  background: var(--admin-surface);
  color: var(--admin-ink);
}
body[data-role="ADMIN"] .admin-workspace-metric > b { color: var(--admin-muted); }
body[data-role="ADMIN"] .admin-workspace-metric > strong { color: var(--admin-ink); }
body[data-role="ADMIN"] .admin-workspace-metric.metric-overdue { border-top-color: var(--admin-danger); }
body[data-role="ADMIN"] .admin-workspace-metric.metric-overdue > strong { color: var(--admin-danger); }
body[data-role="ADMIN"] .admin-workspace-metric.metric-risk { border-top-color: var(--admin-warning); }
body[data-role="ADMIN"] .admin-workspace-metric.metric-risk > strong { color: var(--admin-warning); }
body[data-role="ADMIN"] .admin-workspace-metric.metric-done { border-top-color: var(--admin-success); }
body[data-role="ADMIN"] .admin-workspace-metric.metric-done > strong { color: var(--admin-success); }

body[data-role="ADMIN"] .admin-reference-account-card,
body[data-role="ADMIN"] .admin-reference-activity-item {
  border-color: var(--admin-line);
  background: var(--admin-surface-alt);
  color: var(--admin-muted);
}
body[data-role="ADMIN"] .admin-reference-account-card {
  border-left-color: var(--admin-accent);
}
body[data-role="ADMIN"] .admin-reference-account-card:hover,
body[data-role="ADMIN"] .admin-reference-activity-item:hover {
  border-color: var(--admin-accent);
  background: var(--admin-hover);
}
body[data-role="ADMIN"] .admin-reference-account-card > .lucide-icon { color: var(--admin-accent); }
body[data-role="ADMIN"] .admin-reference-account-name,
body[data-role="ADMIN"] .admin-reference-account-card > strong,
body[data-role="ADMIN"] .admin-reference-activity-item > strong { color: var(--admin-ink); }
body[data-role="ADMIN"] .admin-reference-account-card > span,
body[data-role="ADMIN"] .admin-reference-activity-item > span { color: var(--admin-muted); }
body[data-role="ADMIN"] .admin-reference-activity-item > .lucide-icon { color: var(--admin-muted); }
body[data-role="ADMIN"] .admin-reference-month-table { border-color: var(--admin-line); }

@media (max-width: 760px) {
  body[data-role="ADMIN"] .risk-search-spotlight {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  body[data-role="ADMIN"] .risk-search-spotlight > div {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr);
  }
  body[data-role="ADMIN"] .risk-search-spotlight b,
  body[data-role="ADMIN"] .risk-search-spotlight .search-spotlight-meta {
    grid-column: auto;
  }
}

body[data-role="ADMIN"] .admin-page-context-metrics .compact-summary-item.metric-medium-value > b { font-size: 13px; }
body[data-role="ADMIN"] .admin-page-context-metrics .compact-summary-item.metric-long-value > b { font-size: 12px; }
body[data-role="ADMIN"] .admin-page-context-metrics .compact-summary-item.metric-extra-long-value > b { font-size: 10.5px; }
