:root {
  color-scheme: dark;
  --bg: #080a0f;
  --sidebar: #10131a;
  --panel: #151922;
  --panel-2: #1b202b;
  --line: #2a3140;
  --line-soft: #202633;
  --text: #f6f8fc;
  --muted: #929caf;
  --gold: #f0be55;
  --green: #46d68c;
  --red: #ff7068;
  --blue: #66a7ff;
  --violet: #a78bfa;
}

* {
  box-sizing: border-box;
}

[v-cloak] {
  display: none;
}

body {
  margin: 0;
  min-width: 1180px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  height: 36px;
  border: 1px solid #8b6427;
  border-radius: 7px;
  background: linear-gradient(180deg, #f5d67a, #c98a2e);
  color: #2d1600;
  font-weight: 800;
  cursor: pointer;
  padding: 0 14px;
  white-space: nowrap;
}

button:hover:not(:disabled) {
  filter: brightness(1.05);
}

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

button.danger {
  border-color: #9c3d35;
  background: linear-gradient(180deg, #ffb0a9, #da5248);
  color: #300400;
}

button.secondary {
  border-color: var(--line);
  background: #10141c;
  color: var(--text);
}

#app {
  display: grid;
  grid-template-columns: 246px 1fr;
  width: 100%;
  min-height: 100vh;
}

#app > * {
  min-width: 0;
}

.auth-screen {
  display: grid;
  grid-column: 1 / -1;
  min-height: 100vh;
  place-items: center;
  background:
    linear-gradient(rgba(8, 10, 15, 0.9), rgba(8, 10, 15, 0.97)),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(240, 190, 85, 0.035) 80px);
  padding: 24px;
}

.login-panel {
  width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151922;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  padding: 28px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.login-brand h1 {
  font-size: 23px;
}

.login-intro {
  margin: 18px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.login-panel .field {
  display: block;
  margin-top: 14px;
}

.login-error {
  margin-top: 14px;
  border-left: 3px solid var(--red);
  background: rgba(255, 112, 104, 0.08);
  color: #ffc0bc;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}

.login-submit {
  width: 100%;
  margin-top: 18px;
}

.auth-loading {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: var(--text);
}

.auth-loading .brand-mark {
  margin-bottom: 6px;
}

.auth-loading span {
  color: var(--muted);
  font-size: 13px;
}

.admin-identity {
  display: inline-flex;
  height: 36px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0d1017;
  color: var(--gold);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #11151f, #0e1118);
  overflow-y: auto;
  padding: 22px 16px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #8a6124;
  border-radius: 8px;
  background: linear-gradient(145deg, #ffe794, #df9f31 58%, #7d3218);
  color: #2b1200;
  font-size: 24px;
  font-weight: 950;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.field span,
.panel p,
.side-card small,
.metric small {
  color: var(--muted);
}

.tabs {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.tabs button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border-color: transparent;
  background: transparent;
  color: #c9d0dd;
}

.tabs button span {
  color: var(--gold);
  font-size: 12px;
}

.tabs button.active,
.tabs button:hover {
  border-color: var(--line);
  background: var(--panel-2);
  color: var(--text);
}

.tabs button.loading::after {
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.docs-link {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  margin-top: 7px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #c9d0dd;
  padding: 8px 13px;
  text-decoration: none;
}

.docs-link span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
}

.docs-link:hover,
.docs-link:focus-visible {
  border-color: var(--line);
  background: var(--panel-2);
  color: var(--text);
  outline: none;
}

.side-card {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0e14;
  padding: 14px;
}

.side-card span,
.side-card strong,
.side-card small {
  display: block;
}

.side-card strong {
  margin: 6px 0 4px;
  color: var(--gold);
  overflow-wrap: anywhere;
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar,
.connection,
.panel,
.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 25, 34, 0.96);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 17px;
}

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

.auto-refresh {
  display: inline-flex;
  height: 36px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.auto-refresh input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

.force-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(320px, 0.8fr);
  gap: 16px;
  align-items: start;
  margin-top: 14px;
}

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

.symbol-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 8px;
  max-width: 440px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0e14;
}

.symbol-grid select {
  min-width: 0;
  text-align: center;
}

.hint {
  display: block;
  margin: 8px 0 10px;
  color: var(--muted);
}

.status {
  display: inline-flex;
  min-width: 220px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0d1017;
  color: var(--muted);
  padding: 0 12px;
}

.status.ok {
  color: var(--green);
}

.status.error {
  color: var(--red);
}

.status.ok,
.status.error {
  font-weight: 800;
}

.connection {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr 1fr;
  gap: 13px;
  margin: 16px 0;
  padding: 15px;
}

.api-readonly {
  min-width: 0;
}

.api-readonly span,
.api-readonly strong {
  display: block;
}

.api-readonly span {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.api-readonly strong {
  overflow: hidden;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0d1018;
  color: var(--gold);
  padding: 9px 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field span {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 800;
}

.field.compact {
  display: block;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0d1018;
  color: var(--text);
  outline: none;
}

input,
select {
  height: 38px;
  padding: 0 11px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
}

textarea {
  min-height: 82px;
  resize: vertical;
  padding: 10px 11px;
  line-height: 1.45;
}

input:disabled,
select:disabled,
textarea:disabled {
  color: #7f899b;
  cursor: not-allowed;
  opacity: 0.72;
}

.secret-field {
  position: relative;
}

.secret-field > input {
  padding-right: 58px;
}

.secret-field > label {
  position: absolute;
  top: 1px;
  right: 1px;
  display: grid;
  width: 52px;
  height: 36px;
  place-items: center;
  border-left: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

.secret-field > label input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.secret-field > label span {
  margin: 0;
  color: inherit;
  font-size: 12px;
}

.field.check {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0d1018;
  padding: 0 11px;
}

.field.check span {
  margin: 0;
}

.field.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  padding: 0;
}

.view {
  animation: enter 0.16s ease-out;
}

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

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

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

.metric {
  min-width: 0;
  min-height: 128px;
  padding: 17px;
}

.metric span,
.metric strong,
.metric small {
  display: block;
}

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

.metric strong {
  margin: 9px 0 6px;
  color: var(--gold);
  font-size: 28px;
  overflow-wrap: anywhere;
}

.metric strong.metric-time {
  font-size: 22px;
  line-height: 1.25;
}

.model-metric strong {
  font-size: 22px;
  line-height: 1.25;
}

.screen-view {
  min-height: calc(100vh - 190px);
}

.platform-rtp-section {
  margin-bottom: 18px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #111722;
}

.platform-rtp-head,
.platform-rtp-trend-head,
.tenant-scope-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.platform-rtp-head {
  padding: 0 20px 16px;
}

.platform-rtp-head > div {
  min-width: 0;
}

.platform-rtp-head h2,
.platform-rtp-head p,
.platform-rtp-primary span,
.platform-rtp-primary strong,
.platform-rtp-primary small,
.platform-rtp-warning {
  margin: 0;
}

.platform-rtp-head > div > span {
  color: #79b6ff;
  font-size: 11px;
  font-weight: 900;
}

.platform-rtp-head h2 {
  margin-top: 4px;
  font-size: 24px;
}

.platform-rtp-head p,
.platform-rtp-head time,
.platform-rtp-primary small,
.platform-rtp-trend-head span {
  color: var(--muted);
  font-size: 12px;
}

.platform-rtp-head p {
  margin-top: 5px;
  line-height: 1.45;
}

.platform-rtp-head time {
  flex: 0 0 auto;
}

.platform-rtp-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.7fr) minmax(0, 1.7fr);
  gap: 20px;
  padding: 0 20px;
}

.platform-rtp-summary {
  min-width: 0;
  border-right: 1px solid var(--line-soft);
  padding-right: 20px;
}

.platform-rtp-primary span,
.platform-rtp-facts dt {
  color: var(--muted);
  font-size: 12px;
}

.platform-rtp-primary strong {
  display: block;
  margin: 7px 0 5px;
  color: var(--gold);
  font-size: 46px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.platform-rtp-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
  margin: 17px 0 0;
}

.platform-rtp-facts div {
  min-width: 0;
  border-top: 1px solid var(--line-soft);
  padding: 10px 0;
}

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

.platform-rtp-facts dd {
  margin-top: 4px;
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.platform-rtp-warning {
  border-left: 3px solid var(--gold);
  padding: 8px 10px;
  color: #ffd881;
  background: #211b12;
  font-size: 12px;
  line-height: 1.45;
}

.platform-rtp-trend {
  min-width: 0;
}

.platform-rtp-trend-head {
  min-height: 30px;
  margin-bottom: 10px;
}

.platform-rtp-trend-head > div {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.platform-rtp-trend-head > span {
  color: #79b6ff;
  font-weight: 800;
}

.platform-daily-rtp-chart {
  height: 270px;
}

.daily-rtp-line.platform-rtp-line {
  stroke: #66a7ff;
  filter: drop-shadow(0 0 5px rgba(102, 167, 255, 0.32));
}

.daily-rtp-point.platform-rtp-point {
  fill: #66a7ff;
}

.tenant-scope-heading {
  min-height: 32px;
  margin-bottom: 10px;
}

.tenant-scope-heading strong {
  font-size: 17px;
}

.tenant-scope-heading span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
  text-align: right;
}

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

.screen-card,
.screen-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 25, 34, 0.96);
}

.screen-card {
  min-height: 118px;
  padding: 17px;
}

.screen-card span,
.screen-card strong,
.screen-card small {
  display: block;
}

.screen-card span,
.screen-card small {
  color: var(--muted);
}

.screen-card strong {
  margin: 9px 0 7px;
  color: var(--gold);
  font-size: 30px;
}

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

.screen-panel {
  min-width: 0;
  min-height: 260px;
  padding: 16px;
}

.screen-panel.wide {
  grid-column: span 2;
}

.screen-panel.full {
  grid-column: 1 / -1;
}

.screen-panel-head {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.screen-panel-head span {
  color: var(--gold);
  font-weight: 900;
}

.screen-panel-head h2,
.screen-panel-head p,
.multiplier-section-title h3,
.multiplier-section-title p {
  margin: 0;
}

.screen-panel-head p,
.multiplier-section-title p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.multiplier-screen-panel {
  min-height: 390px;
}

.multiplier-chart-legend {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.multiplier-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.multiplier-chart-legend i {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.multiplier-chart-legend i.actual,
.multiplier-bars i.actual {
  background: var(--gold);
}

.multiplier-chart-legend i.expected,
.multiplier-bars i.expected {
  background: #66a7ff;
}

.multiplier-chart-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 10px;
  scrollbar-color: #566074 #0b0e14;
  scrollbar-width: thin;
}

.multiplier-chart {
  display: grid;
  width: max-content;
  min-width: 100%;
  grid-auto-flow: column;
  grid-auto-columns: minmax(76px, 1fr);
  gap: 6px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding: 0 6px 8px;
}

.multiplier-column {
  display: grid;
  min-width: 0;
  grid-template-rows: 210px auto auto auto;
  gap: 4px;
  text-align: center;
}

.multiplier-bars {
  display: flex;
  height: 210px;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  border-bottom: 1px solid var(--line-soft);
}

.multiplier-bars i {
  display: block;
  width: 17px;
  min-height: 0;
  border-radius: 3px 3px 0 0;
  transition: height 180ms ease;
}

.multiplier-column:hover {
  background: rgba(255, 255, 255, 0.025);
}

.multiplier-column b,
.multiplier-column span,
.multiplier-column small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiplier-column b {
  color: var(--text);
}

.multiplier-column span {
  color: var(--gold);
  font-size: 11px;
}

.multiplier-column small {
  color: #8ebcff;
  font-size: 10px;
}

.daily-rtp-panel,
.operations-monthly-panel {
  min-height: 0;
}

.daily-rtp-chart-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #0d1119;
  scrollbar-color: #566074 #0b0e14;
  scrollbar-width: thin;
}

.daily-rtp-chart {
  width: 100%;
  min-width: 760px;
  height: 300px;
  padding: 4px 8px 0;
}

.daily-rtp-chart svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.daily-rtp-grid-line {
  stroke: #293140;
  stroke-width: 1;
}

.daily-rtp-axis-label,
.daily-rtp-date-label,
.daily-rtp-no-data {
  fill: var(--muted);
  font-size: 12px;
}

.daily-rtp-target-line {
  stroke: var(--green);
  stroke-width: 2;
  stroke-dasharray: 7 7;
  opacity: 0.75;
}

.daily-rtp-target-label {
  fill: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.daily-rtp-line {
  fill: none;
  stroke: var(--gold);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px rgba(247, 184, 67, 0.32));
}

.daily-rtp-point-guide {
  stroke: rgba(142, 188, 255, 0.2);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.daily-rtp-point {
  fill: var(--gold);
  stroke: #0d1119;
  stroke-width: 3;
}

.daily-rtp-point-value {
  fill: #fff;
  font-size: 12px;
  font-weight: 900;
}

.daily-rtp-no-data {
  font-size: 11px;
}

.operations-table-scroll {
  overflow: auto;
  border: 1px solid var(--line-soft);
  scrollbar-color: #566074 #0b0e14;
  scrollbar-width: thin;
}

.operations-table-scroll .table-wrap {
  min-width: 780px;
  border: 0;
}

.operations-table-scroll table {
  margin: 0;
}

.operations-table-scroll th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #171c26;
}

.operations-table-scroll td:last-child {
  color: var(--gold);
  font-weight: 800;
}

.monthly-operations-table {
  max-height: 560px;
}

.operations-legend {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.operations-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.operations-legend i {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.operations-legend i.bet,
.monthly-bars i.bet {
  background: var(--gold);
}

.operations-legend i.win,
.monthly-bars i.win {
  background: #66a7ff;
}

.monthly-chart-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 10px;
  scrollbar-color: #566074 #0b0e14;
  scrollbar-width: thin;
}

.monthly-chart {
  display: grid;
  min-width: 1040px;
  grid-template-columns: repeat(12, minmax(76px, 1fr));
  gap: 8px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding: 0 6px 8px;
}

.monthly-column {
  display: grid;
  min-width: 0;
  grid-template-rows: 210px auto auto auto;
  gap: 5px;
  text-align: center;
}

.monthly-column:hover {
  background: rgba(255, 255, 255, 0.025);
}

.monthly-bars {
  display: flex;
  height: 210px;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  border-bottom: 1px solid var(--line-soft);
}

.monthly-bars i {
  display: block;
  width: 20px;
  min-height: 0;
  border-radius: 3px 3px 0 0;
  transition: height 180ms ease;
}

.monthly-column b,
.monthly-column strong,
.monthly-column small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-column strong {
  color: var(--gold);
}

.monthly-column small {
  color: var(--muted);
  font-size: 10px;
}

.top-volume-panel {
  min-height: 0;
}

.top-volume-table {
  max-height: 520px;
}

.top-volume-row {
  display: grid;
  min-width: 940px;
  grid-template-columns: 58px minmax(180px, 1.4fr) minmax(180px, 1.2fr) minmax(130px, 1fr) minmax(130px, 1fr) 100px;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid var(--line-soft);
  padding: 8px 14px;
}

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

.top-volume-row.header {
  position: sticky;
  z-index: 1;
  top: 0;
  min-height: 42px;
  background: #171c26;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.volume-rank,
.volume-rtp {
  color: var(--gold);
}

.volume-player,
.volume-rounds {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.volume-player b,
.volume-player small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.volume-player small {
  color: var(--muted);
}

.volume-rounds span {
  overflow: hidden;
  height: 5px;
  border-radius: 3px;
  background: #0b0e14;
}

.volume-rounds i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #66a7ff;
}

.gauge-row {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 18px;
  align-items: center;
}

.gauge-ring {
  display: grid;
  width: 168px;
  height: 168px;
  place-items: center;
  border-radius: 50%;
}

.gauge-ring > div {
  display: grid;
  width: 124px;
  height: 124px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #0d1018;
  text-align: center;
}

.gauge-ring strong,
.gauge-ring small {
  display: block;
}

.gauge-ring strong {
  color: var(--text);
  font-size: 23px;
}

.gauge-ring small {
  color: var(--muted);
  font-size: 12px;
}

.screen-kv {
  display: grid;
  gap: 10px;
}

.screen-kv div {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.screen-kv span,
.screen-kv b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-kv span {
  color: var(--muted);
}

.bar-list,
.stack-list,
.event-feed {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(100px, 140px) minmax(100px, 1fr) minmax(74px, 100px) minmax(88px, 112px);
  gap: 10px;
  align-items: center;
}

.bar-row span,
.bar-row b,
.bar-row small,
.stack-row span,
.stack-row b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row span,
.bar-row small,
.stack-row span {
  color: var(--muted);
}

.bar-row b,
.stack-row b {
  text-align: right;
}

.bar-track,
.stack-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #0b0e14;
}

.bar-track i,
.stack-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), #fff0a3);
}

.stack-row {
  display: grid;
  grid-template-columns: 86px 1fr 44px;
  gap: 10px;
  align-items: center;
}

.stack-track i.player_risk,
.stack-track i.high {
  background: linear-gradient(90deg, #ff7068, #ffc0bc);
}

.stack-track i.system_control,
.stack-track i.medium {
  background: linear-gradient(90deg, #f0be55, #ffe39c);
}

.stack-track i.config_audit,
.stack-track i.low {
  background: linear-gradient(90deg, #66a7ff, #b7d4ff);
}

.stack-track i.admin_audit {
  background: linear-gradient(90deg, #a78bfa, #d7c9ff);
}

.screen-rank {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.screen-rank li {
  display: grid;
  grid-template-columns: 34px 1fr 96px;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 9px;
}

.screen-rank span {
  color: var(--gold);
  font-weight: 900;
}

.screen-rank b,
.screen-rank strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-rank strong {
  text-align: right;
}

.feed-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 9px;
}

.feed-item small {
  grid-column: 2;
  color: var(--muted);
}

.empty-chart {
  display: grid;
  min-height: 120px;
  place-items: center;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 14px;
}

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

.panel {
  margin-bottom: 14px;
  padding: 16px;
}

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

.panel-head > div:first-child {
  min-width: 0;
}

.panel-head .actions {
  flex: 0 0 auto;
}

.panel-head p {
  margin-top: 5px;
}

.kv {
  display: grid;
}

.kv div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 0;
}

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

.kv b {
  overflow-wrap: anywhere;
}

.filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 140px;
  gap: 11px;
  margin-bottom: 12px;
}

.event-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
}

.event-summary button {
  height: 30px;
  border-color: var(--line);
  background: #0e121a;
  color: #cbd4e4;
  font-size: 12px;
}

.event-summary button.active {
  border-color: #8b6427;
  background: linear-gradient(180deg, #3a2a12, #1b202b);
  color: var(--gold);
}

.subtabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.subtabs button {
  border-color: var(--line);
  background: #0e121a;
  color: #dce2ee;
}

.subtabs button.active {
  border-color: #8b6427;
  background: linear-gradient(180deg, #3a2a12, #1b202b);
  color: var(--gold);
}

.run-state {
  display: inline-flex;
  height: 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0d1018;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 0 10px;
}

.run-state.running,
.run-state.pass {
  border-color: rgba(70, 214, 140, 0.45);
  color: var(--green);
}

.run-state.investigate {
  border-color: rgba(255, 112, 104, 0.5);
  color: var(--red);
}

.run-state.insufficient_sample {
  border-color: rgba(240, 190, 85, 0.5);
  color: var(--gold);
}

.stress-presets {
  margin-top: -2px;
}

.stress-progress {
  overflow: hidden;
  height: 10px;
  margin-top: 16px;
  border-radius: 5px;
  background: #090c12;
}

.stress-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  transition: width 0.25s ease;
}

.stress-progress.running i,
.stress-progress.pass i {
  background: var(--green);
}

.stress-progress.investigate i {
  background: var(--red);
}

.stress-progress-copy {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.stress-progress-copy b {
  color: var(--text);
}

.stress-progress-copy span:last-child {
  text-align: right;
}

.stress-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 18px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.stress-kpis > div {
  min-width: 0;
  padding: 14px;
}

.stress-kpis > div + div {
  border-left: 1px solid var(--line-soft);
}

.stress-kpis span,
.stress-kpis strong,
.stress-kpis small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stress-kpis span,
.stress-kpis small {
  color: var(--muted);
  font-size: 12px;
}

.stress-kpis strong {
  margin: 7px 0 4px;
  color: var(--gold);
  font-size: 21px;
}

.stress-results {
  align-items: start;
}

.stress-section {
  min-width: 0;
  padding: 4px 0 12px;
}

.stress-section.wide {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
}

.stress-multiplier-chart .multiplier-column {
  grid-template-rows: 180px auto auto auto;
}

.stress-multiplier-chart .multiplier-bars {
  height: 180px;
}

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

.section-title h3 {
  margin: 0;
  font-size: 15px;
}

.section-title span {
  color: var(--muted);
  font-size: 12px;
}

.stress-band {
  display: grid;
  grid-template-columns: 72px minmax(120px, 1fr) 72px 72px;
  gap: 10px;
  align-items: center;
}

.stress-band > b,
.stress-band > small {
  text-align: right;
}

.stress-band > small,
.stress-band > span {
  color: var(--muted);
}

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

.validation-list > div {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-left: 3px solid var(--line);
  background: #10141c;
  padding: 8px 11px;
}

.validation-list > div.pass {
  border-left-color: var(--green);
}

.validation-list > div.fail {
  border-left-color: var(--red);
}

.validation-list span {
  color: var(--muted);
}

.distribution-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-soft);
}

.distribution-grid > div {
  min-width: 0;
  background: var(--panel);
  padding: 12px;
}

.distribution-grid span,
.distribution-grid b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.distribution-grid span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.stress-errors {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  border-left: 3px solid var(--red);
  background: rgba(255, 112, 104, 0.06);
  padding: 11px 13px;
}

.stress-errors code {
  overflow-wrap: anywhere;
  color: #ffc0bc;
}

.raw-result {
  margin-top: 12px;
  color: var(--muted);
}

.raw-result summary {
  cursor: pointer;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #10141c;
}

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

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #171c26;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

tbody tr {
  cursor: default;
}

tbody tr:hover td {
  background: #181e2a;
}

tbody tr.is-clickable {
  cursor: pointer;
}

tbody tr.is-clickable:focus {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

td.empty {
  height: 90px;
  color: var(--muted);
  text-align: center;
}

.badge {
  display: inline-flex;
  min-width: 54px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
}

.badge.high {
  border-color: #94443c;
  color: var(--red);
  background: rgba(255, 112, 104, 0.13);
}

.badge.medium {
  border-color: #8b6427;
  color: var(--gold);
  background: rgba(240, 190, 85, 0.13);
}

.badge.low {
  border-color: #356ca3;
  color: var(--blue);
  background: rgba(102, 167, 255, 0.12);
}

.badge.normal {
  border-color: #2f7653;
  color: var(--green);
  background: rgba(70, 214, 140, 0.1);
}

.badge.player_risk {
  border-color: #94443c;
  color: var(--red);
  background: rgba(255, 112, 104, 0.13);
}

.badge.system_control {
  border-color: #8b6427;
  color: var(--gold);
  background: rgba(240, 190, 85, 0.13);
}

.badge.config_audit {
  border-color: #356ca3;
  color: var(--blue);
  background: rgba(102, 167, 255, 0.12);
}

.badge.admin_audit {
  border-color: #6a54a3;
  color: var(--violet);
  background: rgba(167, 139, 250, 0.12);
}

.badge.miss {
  border-color: #515966;
  color: var(--muted);
  background: rgba(148, 158, 173, 0.1);
}

.badge.single_line {
  border-color: #356ca3;
  color: var(--blue);
  background: rgba(102, 167, 255, 0.12);
}

.badge.composite {
  border-color: #8b6427;
  color: var(--gold);
  background: rgba(240, 190, 85, 0.13);
}

.badge.full_screen {
  border-color: #94443c;
  color: var(--red);
  background: rgba(255, 112, 104, 0.13);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
}

.pager button {
  height: 32px;
  border-color: var(--line);
  background: #10141c;
  color: var(--text);
}

.pager strong {
  color: var(--text);
}

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

.field span em {
  margin-left: 6px;
  color: var(--gold);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.field-help {
  display: block;
  min-height: 30px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.form-error {
  margin-top: 12px;
  border-left: 3px solid var(--red);
  background: rgba(255, 112, 104, 0.08);
  color: #ffc0bc;
  padding: 9px 11px;
  font-size: 13px;
}

.form-grid.stress {
  grid-template-columns: 1.5fr repeat(4, minmax(110px, 1fr));
}

.tenant-admin-grid {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(560px, 1.35fr);
  align-items: start;
  gap: 14px;
}

.tenant-admin-column {
  min-width: 0;
}

.tenant-admin-view .table-wrap {
  max-height: 360px;
}

.tenant-editor,
.package-editor {
  min-width: 0;
}

.package-editor fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.form-span-full {
  grid-column: 1 / -1;
}

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

.input-action button {
  height: 38px;
}

.category-field > span {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 800;
}

.category-options {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0d1018;
  padding: 7px 11px;
}

.category-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.category-options input {
  width: 17px;
  height: 17px;
  accent-color: var(--gold);
}

.field.short {
  width: 160px;
  margin-bottom: 12px;
}

.jsonbox {
  overflow: auto;
  max-height: 320px;
  margin: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #0b0e14;
  color: #e4ebff;
  padding: 14px;
}

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

.window-card {
  border: 1px solid var(--line);
  background: var(--panel-2);
  padding: 14px;
  min-width: 0;
}

.window-card header,
.window-card > div,
.release-bands > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.window-card header {
  padding-bottom: 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.window-card header span,
.window-card > div span,
.release-bands span {
  color: var(--muted);
}

.window-card > div {
  padding-top: 8px;
}

.hash-metric strong {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.math-release-panel {
  margin-bottom: 14px;
}

.release-bands {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.release-bands > div {
  background: var(--panel-2);
  padding: 12px;
}

.experience-profile {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding-top: 12px;
}

.multiplier-distribution {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

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

.distribution-head span,
.distribution-item small {
  color: var(--muted);
}

.distribution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
}

.distribution-item {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel-2);
  padding: 10px;
}

.distribution-item b {
  color: var(--gold);
}

.experience-profile > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.experience-profile span {
  color: var(--muted);
  font-size: 12px;
}

.experience-profile b {
  color: var(--gold);
  font-size: 16px;
}

.healthy-empty {
  min-height: 180px;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 6px;
  color: var(--green);
}

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

.notice.warning {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-left: 3px solid var(--gold);
  background: rgba(240, 190, 85, 0.08);
  color: #f7d48b;
  font-size: 13px;
}

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

.overview-warning {
  display: grid;
  gap: 4px;
}

.overview-warning span {
  overflow-wrap: anywhere;
}

.settlement-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(80px, .45fr)) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  padding: 12px;
}

.settlement-row > div:first-child {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  min-width: 0;
}

.settlement-row > div:first-child small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.settlement-row > div:not(:first-child) {
  display: grid;
  gap: 4px;
}

.settlement-row > div:not(:first-child) span,
.settlement-row p {
  color: var(--muted);
  font-size: 12px;
}

.settlement-row p {
  margin: 0;
  overflow-wrap: anywhere;
}

.badge.debit_pending,
.badge.credit_pending,
.badge.manual_review {
  color: var(--gold);
  border-color: #8b6427;
}

.badge.completed,
.badge.debit_confirmed,
.badge.credit_confirmed {
  color: var(--green);
  border-color: #2f7653;
}

@media (max-width: 900px) {
  body {
    min-width: 0;
  }

  #app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px;
  }

  .brand {
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .sidebar > .field.compact {
    display: grid;
    grid-template-columns: 52px 1fr;
    align-items: center;
    gap: 8px;
  }

  .sidebar > .field.compact span {
    margin: 0;
  }

  .tabs {
    display: flex;
    width: calc(100% + 24px);
    max-width: calc(100% + 24px);
    min-width: 0;
    overflow-x: auto;
    gap: 6px;
    margin: 12px -12px 0;
    padding: 0 12px 8px;
    scrollbar-width: thin;
  }

  .tabs button {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }

  .docs-link {
    width: auto;
    margin: 0;
  }

  .side-card {
    display: none;
  }

  .main {
    padding: 12px;
  }

  .connection,
  .metrics,
  .metric-grid,
  .screen-kpi,
  .screen-layout,
  .grid.two,
  .filters,
  .form-grid,
  .form-grid.stress,
  .stress-kpis,
  .distribution-grid {
    grid-template-columns: 1fr;
  }

  .platform-rtp-head,
  .platform-rtp-layout {
    padding-right: 14px;
    padding-left: 14px;
  }

  .platform-rtp-layout {
    grid-template-columns: 1fr;
  }

  .platform-rtp-summary {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
    padding-right: 0;
    padding-bottom: 14px;
  }

  .tenant-admin-grid {
    grid-template-columns: 1fr;
  }

  .form-span-full {
    grid-column: auto;
  }

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

  .release-bands,
  .experience-profile {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settlement-row {
    grid-template-columns: 1fr 1fr;
  }

  .settlement-row > div:first-child,
  .settlement-row p {
    grid-column: 1 / -1;
  }

  .screen-panel.wide {
    grid-column: auto;
  }

  .stress-section.wide {
    grid-column: auto;
  }

  .stress-kpis > div + div {
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }

  .stress-band {
    grid-template-columns: 68px minmax(90px, 1fr) 66px 66px;
  }

  .gauge-row,
  .bar-row,
  .screen-rank li,
  .feed-item {
    grid-template-columns: 1fr;
  }

  .gauge-ring {
    margin: 0 auto;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .top-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr auto;
  }

  .top-actions .status {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
  }

  .panel-head {
    flex-wrap: wrap;
  }

  .panel-head .actions {
    margin-left: auto;
  }

  .model-metric strong {
    font-size: 20px;
  }
}
