:root {
  color-scheme: dark;
  --bg: #071324;
  --bg-2: #0a1a2f;
  --sidebar: #06111f;
  --surface: #0e1b2d;
  --surface-2: #0a1728;
  --surface-3: #14243a;
  --line: #263a55;
  --line-soft: #1b2a41;
  --line-strong: #435a78;
  --text: #eaf2ff;
  --text-strong: #f7fbff;
  --muted: #9fb0c8;
  --muted-2: #7487a2;
  --gold: #f2b84b;
  --gold-2: #ffd27a;
  --gold-soft: rgba(242, 184, 75, 0.14);
  --teal: #2dd4bf;
  --teal-2: #5eead4;
  --teal-soft: rgba(45, 212, 191, 0.14);
  --violet: #9b8cff;
  --violet-soft: rgba(155, 140, 255, 0.13);
  --red: #d64b59;
  --red-2: #ff7a86;
  --red-soft: rgba(214, 75, 89, 0.18);
  --green: #36d083;
  --green-soft: rgba(54, 208, 131, 0.14);
  --blue: #7db6ff;
  --blue-soft: rgba(125, 182, 255, 0.13);
  --accent: var(--teal);
  --accent-2: var(--teal-2);
  --accent-soft: var(--teal-soft);
  --accent-ink: #031a1a;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
}

:root[data-theme-color="cyan"] {
  --accent: #2dd4bf;
  --accent-2: #5eead4;
  --accent-soft: rgba(45, 212, 191, 0.14);
  --accent-ink: #031a1a;
}

:root[data-theme-color="blue"] {
  --accent: #5aa7ff;
  --accent-2: #9dccff;
  --accent-soft: rgba(90, 167, 255, 0.16);
  --accent-ink: #061426;
}

:root[data-theme-color="violet"] {
  --accent: #9b8cff;
  --accent-2: #c4baff;
  --accent-soft: rgba(155, 140, 255, 0.16);
  --accent-ink: #120c28;
}

:root[data-theme-color="amber"] {
  --accent: #f2b84b;
  --accent-2: #ffd27a;
  --accent-soft: rgba(242, 184, 75, 0.16);
  --accent-ink: #1b1002;
}

:root[data-theme-color="rose"] {
  --accent: #ff6b8f;
  --accent-2: #ffa1b7;
  --accent-soft: rgba(255, 107, 143, 0.16);
  --accent-ink: #260610;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  background:
    linear-gradient(90deg, rgba(45, 212, 191, 0.04), transparent 34%),
    linear-gradient(180deg, #0a0e14, var(--bg));
}

.sidebar {
  border-right: 1px solid var(--line);
  background: var(--sidebar);
  padding: 18px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 31%),
    linear-gradient(145deg, #102a46, #071324 58%, #050b14);
  border: 1px solid color-mix(in srgb, var(--accent-2) 54%, transparent);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 -16px 24px rgba(0, 0, 0, 0.24),
    0 12px 26px rgba(0, 0, 0, 0.26);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 7px;
  transform: rotate(45deg);
}

.brand-logo {
  width: 34px;
  height: 34px;
  display: block;
  position: relative;
  z-index: 1;
}

.brand-logo-plate {
  fill: rgba(5, 13, 23, 0.5);
  stroke: color-mix(in srgb, var(--accent-2) 36%, transparent);
  stroke-width: 1.2;
}

.brand-logo-track,
.brand-logo-link {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-logo-track {
  stroke: var(--accent-2);
  stroke-width: 3.2;
}

.brand-logo-link {
  stroke: var(--gold-2);
  stroke-width: 2.1;
}

.brand-logo-node {
  fill: #081526;
  stroke-width: 1.8;
}

.brand-logo-node.is-a,
.brand-logo-node.is-d {
  stroke: var(--accent-2);
}

.brand-logo-node.is-b,
.brand-logo-node.is-c {
  stroke: var(--gold-2);
}

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

.brand-copy strong {
  color: var(--text-strong);
  letter-spacing: 0;
}

.brand-copy span {
  color: var(--accent-2);
  font-size: 12px;
  margin-top: 3px;
}

.brand-copy .env-label {
  display: none;
}

.tabs {
  display: grid;
  gap: 6px;
}

.tabs button {
  border: 1px solid transparent;
  background: transparent;
  color: #c8ced8;
  text-align: left;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  min-height: 38px;
}

.tabs button.is-active {
  background: linear-gradient(90deg, rgba(21, 51, 86, 0.98), rgba(11, 32, 56, 0.96));
  border-color: color-mix(in srgb, var(--accent-2) 34%, transparent);
  color: var(--accent-2);
  font-weight: 700;
  box-shadow: 0 10px 26px var(--accent-soft);
}

.tabs button:hover {
  background: var(--surface-3);
  color: var(--text-strong);
}

.workspace {
  min-width: 0;
  background: linear-gradient(180deg, rgba(16, 23, 34, 0.72), rgba(7, 10, 15, 0.96));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 12, 18, 0.94);
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(8px);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 21px;
  line-height: 1.2;
  color: var(--accent-2);
  font-weight: 800;
}

h2 {
  font-size: 15px;
  line-height: 1.3;
  color: var(--text-strong);
  font-weight: 750;
}

.topbar p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}

.topbar p.is-error {
  color: var(--red-2);
}

.top-actions,
.button-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.content {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 18px 24px 36px;
}

.global-kpi-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(118px, 1fr));
  gap: 10px;
  position: sticky;
  top: 76px;
  z-index: 1;
  padding: 0 0 2px;
  background: linear-gradient(180deg, rgba(7, 19, 36, 0.98), rgba(7, 19, 36, 0.74));
  backdrop-filter: blur(8px);
}

.kpi-card {
  min-width: 0;
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-top: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 26, 37, 0.98), rgba(10, 23, 40, 0.96));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.kpi-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.kpi-card strong {
  min-width: 0;
  color: var(--text-strong);
  font-size: 17px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.kpi-card.is-warning {
  border-color: rgba(242, 184, 75, 0.58);
  border-top-color: rgba(242, 184, 75, 0.82);
  background: linear-gradient(180deg, rgba(242, 184, 75, 0.13), rgba(10, 23, 40, 0.96));
}

.kpi-card.is-danger {
  border-color: rgba(255, 122, 134, 0.62);
  border-top-color: rgba(255, 122, 134, 0.86);
  background: linear-gradient(180deg, rgba(214, 75, 89, 0.17), rgba(10, 23, 40, 0.96));
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: grid;
  gap: 16px;
}

.overview-stack {
  display: grid;
  gap: 16px;
}

.overview-ledger-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.overview-ledger-panel {
  padding: 0;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--gold) 36%, var(--line));
  background: linear-gradient(180deg, rgba(9, 19, 34, 0.98), rgba(6, 14, 26, 0.98));
}

.overview-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(242, 184, 75, 0.24);
  background: linear-gradient(180deg, rgba(242, 184, 75, 0.1), rgba(9, 19, 34, 0));
}

.overview-panel-head h2 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  color: var(--gold-2);
  font-size: 16px;
  line-height: 1.2;
}

.overview-panel-head h2 span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.overview-link {
  border: 0;
  background: transparent;
  color: var(--teal-2);
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.overview-link:hover {
  color: var(--gold-2);
}

.overview-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.overview-table {
  min-width: 640px;
  table-layout: fixed;
  border-collapse: collapse;
  background: transparent;
}

.overview-table th,
.overview-table td {
  padding: 10px 11px;
  border-bottom: 1px solid rgba(67, 90, 120, 0.24);
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  vertical-align: middle;
}

.overview-table th {
  color: var(--gold-2);
  background: rgba(4, 10, 19, 0.62);
  font-size: 12px;
  font-weight: 850;
}

.overview-table td strong {
  color: var(--text-strong);
  font-weight: 850;
}

.overview-table tbody tr:hover {
  background: rgba(242, 184, 75, 0.07);
}

.overview-cell-stack {
  display: grid;
  gap: 3px;
}

.overview-cell-stack span {
  color: var(--muted);
  font-size: 12px;
}

.overview-result {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(159, 176, 200, 0.24);
  color: var(--muted);
  background: rgba(159, 176, 200, 0.08);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.overview-result.is-success {
  border-color: rgba(54, 208, 131, 0.42);
  color: var(--green);
  background: rgba(54, 208, 131, 0.12);
}

.overview-result.is-danger {
  border-color: rgba(255, 122, 134, 0.44);
  color: var(--red-2);
  background: rgba(214, 75, 89, 0.14);
}

.overview-result.is-muted {
  border-color: rgba(125, 182, 255, 0.3);
  color: var(--blue);
  background: rgba(125, 182, 255, 0.1);
}

.round-history-panel .overview-table-wrap {
  border: 1px solid rgba(242, 184, 75, 0.18);
  border-radius: 8px;
  background: rgba(6, 14, 26, 0.72);
}

.round-history-table {
  min-width: 1080px;
}

.round-history-table th,
.round-history-table td {
  white-space: nowrap;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.dashboard-grid,
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 16px;
}

.panel,
.login-form,
.health-card,
.risk-item {
  background: linear-gradient(180deg, rgba(18, 26, 37, 0.98), rgba(11, 17, 25, 0.98));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 15px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 11px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-kicker {
  color: var(--gold);
  font-size: 12px;
}

.health-card {
  padding: 14px;
  min-height: 112px;
  display: grid;
  align-content: start;
  gap: 7px;
}

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

.health-card strong {
  color: var(--text-strong);
  font-size: 18px;
  line-height: 1.2;
}

.health-card.is-ok {
  border-color: rgba(52, 208, 111, 0.42);
  background: linear-gradient(180deg, var(--green-soft), rgba(10, 23, 40, 0.98));
}

.health-card.is-warning {
  border-color: rgba(242, 184, 75, 0.56);
  background: linear-gradient(180deg, var(--gold-soft), rgba(10, 23, 40, 0.98));
}

.health-card.is-critical {
  border-color: rgba(255, 122, 134, 0.58);
  background: linear-gradient(180deg, var(--red-soft), rgba(10, 23, 40, 0.98));
}

.health-card.is-neutral {
  border-color: rgba(155, 140, 255, 0.44);
  background: linear-gradient(180deg, var(--violet-soft), rgba(10, 23, 40, 0.98));
}

.risk-list,
.record-list {
  display: grid;
  gap: 8px;
}

.risk-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  padding: 11px;
  box-shadow: none;
}

.risk-item > span {
  align-self: start;
  border-radius: 999px;
  padding: 4px 8px;
  text-align: center;
  color: var(--accent-ink);
  background: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
}

.risk-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-strong);
}

.risk-item p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.risk-item.is-ok {
  border-color: rgba(52, 208, 111, 0.42);
  background: rgba(52, 208, 111, 0.08);
}

.risk-item.is-ok > span {
  background: var(--green);
}

.risk-item.is-warning {
  border-color: rgba(242, 184, 75, 0.58);
  background: rgba(242, 184, 75, 0.1);
}

.risk-item.is-warning > span {
  background: var(--gold-2);
}

.risk-item.is-critical {
  border-color: rgba(239, 89, 89, 0.62);
  background: rgba(199, 53, 53, 0.13);
}

.risk-item.is-critical > span {
  color: #fff5ee;
  background: var(--red);
}

.button,
.icon-button {
  border: 1px solid color-mix(in srgb, var(--accent-2) 52%, transparent);
  background: linear-gradient(180deg, var(--accent-soft), rgba(12, 85, 92, 0.26));
  color: var(--accent-2);
  border-radius: 6px;
  min-height: 36px;
  padding: 7px 12px;
  cursor: pointer;
  font-weight: 750;
}

.icon-button {
  width: 36px;
  padding: 0;
  font-size: 18px;
}

.button:hover,
.icon-button:hover {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 22%, transparent), rgba(12, 85, 92, 0.34));
}

.button.secondary {
  background: rgba(11, 17, 25, 0.62);
  color: var(--text);
  border-color: rgba(125, 182, 255, 0.42);
}

.button.secondary:hover {
  color: var(--blue);
  background: rgba(125, 182, 255, 0.12);
}

.button.warning {
  color: #190f04;
  background: linear-gradient(180deg, var(--gold-2), #a56d16);
}

.button.danger {
  color: #fff5ee;
  border-color: rgba(239, 89, 89, 0.7);
  background: linear-gradient(180deg, rgba(199, 53, 53, 0.96), rgba(119, 27, 27, 0.96));
}

.button.mini {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.login-panel {
  max-width: 420px;
  margin: 60px auto;
}

.login-form,
.settings-form,
.inline-form {
  display: grid;
  gap: 12px;
}

.login-form {
  padding: 22px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input,
select {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #0a1018;
  color: var(--text-strong);
  min-height: 36px;
  padding: 7px 10px;
}

input::placeholder {
  color: var(--muted-2);
}

input:focus,
select:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.form-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.toggle-field {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
}

.toggle-field input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
  padding: 0;
}

.banker-rate-form input[type="number"] {
  font-weight: 800;
  text-align: right;
}

.banker-rate-form input[type="range"] {
  min-height: 28px;
  padding: 0;
}

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

.rate-presets .setting-action {
  min-height: 36px;
  border-color: color-mix(in srgb, var(--accent-2) 32%, var(--line));
  background: rgba(8, 21, 38, 0.72);
  color: var(--text);
}

.rate-presets .setting-action.is-active {
  border-color: color-mix(in srgb, var(--accent-2) 72%, transparent);
  background: linear-gradient(180deg, var(--accent-soft), rgba(12, 85, 92, 0.32));
  color: var(--accent-2);
  box-shadow: 0 10px 22px var(--accent-soft);
}

.sync-lock {
  margin: 0;
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line));
  border-radius: 6px;
  background: rgba(45, 212, 191, 0.08);
  color: var(--accent-2);
  font-size: 13px;
  line-height: 1.35;
}

.limit-rules-form {
  gap: 10px;
}

.settings-card-wide {
  grid-column: 1 / -1;
}

.settings-rule-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 12px;
}

.settings-table-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(10, 23, 40, 0.92), rgba(7, 15, 27, 0.96));
}

.settings-table-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(20, 36, 58, 0.42);
}

.settings-table-title strong {
  color: var(--text-strong);
  font-size: 14px;
}

.settings-table-title span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.settings-table-card .settings-list {
  padding: 0 12px;
}

.limit-rules-form label {
  grid-template-columns: minmax(116px, 1fr) minmax(128px, 1fr);
  align-items: center;
  min-height: 40px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
}

.limit-rules-form label:last-of-type {
  border-bottom: 0;
}

.limit-rules-form input {
  text-align: right;
  font-weight: 800;
}

.settings-edit-form {
  display: grid;
  gap: 14px;
}

.settings-edit-field {
  display: grid;
  gap: 8px;
}

.settings-edit-field span {
  color: var(--muted);
  font-size: 13px;
}

.settings-edit-field small {
  color: var(--muted-2);
  line-height: 1.45;
}

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

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

.theme-option {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #0a1018;
  padding: 8px 10px;
  min-height: 40px;
  cursor: pointer;
}

.theme-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text-strong);
}

.theme-option input {
  width: 14px;
  height: 14px;
  min-height: 0;
  padding: 0;
  accent-color: var(--accent);
}

.theme-swatch {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.18);
}

.theme-swatch.is-navy {
  background: #071324;
}

.theme-swatch.is-cyan {
  background: #2dd4bf;
}

.theme-swatch.is-blue {
  background: #5aa7ff;
}

.theme-swatch.is-violet {
  background: #9b8cff;
}

.theme-swatch.is-amber {
  background: #f2b84b;
}

.theme-swatch.is-rose {
  background: #ff6b8f;
}

.appearance-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-soft), rgba(10, 23, 40, 0.88));
}

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

.appearance-preview strong {
  color: var(--accent-2);
}

.settings-console {
  display: grid;
  gap: 14px;
}

.settings-subtabs {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
}

.settings-subtabs button {
  min-height: 38px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0 2px;
  cursor: pointer;
  font-weight: 750;
}

.settings-subtabs button.is-active {
  color: var(--gold-2);
  border-bottom-color: var(--gold);
}

.settings-section {
  display: none;
}

.settings-section.is-active {
  display: grid;
  gap: 14px;
}

.settings-board,
.settings-announcement-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr) minmax(280px, 0.86fr);
  gap: 14px;
}

.settings-announcement-grid {
  grid-template-columns: minmax(300px, 0.92fr) minmax(360px, 1.08fr);
}

.settings-card {
  padding: 13px;
  box-shadow: none;
}

.settings-list {
  display: grid;
  gap: 0;
}

.settings-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.82fr) minmax(112px, 1fr) 58px;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border-bottom: 1px solid var(--line-soft);
}

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

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

.settings-row strong {
  color: var(--text-strong);
  font-size: 13px;
  text-align: right;
  overflow-wrap: anywhere;
}

.setting-action {
  min-height: 28px;
  border: 1px solid color-mix(in srgb, var(--gold) 72%, transparent);
  border-radius: 4px;
  background: rgba(242, 184, 75, 0.08);
  color: var(--gold-2);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.setting-action:not(:disabled):hover {
  background: rgba(242, 184, 75, 0.2);
}

.setting-action.is-readonly,
.setting-action:disabled {
  opacity: 0.58;
  cursor: default;
}

.notice-preview {
  min-height: 122px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #0a1018;
}

.notice-preview.is-large {
  min-height: 230px;
}

.notice-copy {
  display: grid;
  gap: 8px;
}

.notice-copy p {
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.notice-actions {
  display: grid;
  gap: 8px;
}

.notice-actions span {
  display: block;
  min-height: 30px;
  padding: 7px 10px;
  border: 1px solid rgba(242, 184, 75, 0.58);
  border-radius: 4px;
  color: var(--gold-2);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.button.full-width {
  width: 100%;
}

.panel.is-attention {
  outline: 2px solid color-mix(in srgb, var(--gold) 76%, transparent);
  box-shadow: 0 0 0 4px rgba(242, 184, 75, 0.12);
}

.inline-form {
  grid-template-columns: 1fr 1fr auto;
  margin-top: 14px;
}

.atmosphere-member-form {
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.sim-login-form {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) auto;
  gap: 10px;
  margin: 0 0 12px;
}

.sim-login-form[hidden] {
  display: none;
}

.sim-login-table {
  min-width: 760px;
}

.record {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}

.record:last-child {
  border-bottom: 0;
}

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

.record strong {
  color: var(--text-strong);
  text-align: right;
  overflow-wrap: anywhere;
}

.game-control-panel {
  display: grid;
  gap: 12px;
  border-color: rgba(242, 184, 75, 0.38);
  background:
    linear-gradient(180deg, rgba(12, 25, 42, 0.98), rgba(7, 17, 29, 0.98)),
    var(--surface);
}

.game-control-panel .panel-head {
  border-bottom-color: rgba(242, 184, 75, 0.24);
}

.game-control-table {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(242, 184, 75, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(36, 31, 19, 0.28), rgba(8, 20, 35, 0.95)),
    rgba(9, 22, 37, 0.96);
}

.game-control-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr 1fr 0.8fr 1fr;
  min-width: 980px;
}

.game-control-cell {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 18px 14px;
  border-right: 1px solid rgba(242, 184, 75, 0.28);
  text-align: center;
}

.game-control-cell:last-child {
  border-right: 0;
}

.game-control-cell span {
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 800;
}

.game-control-cell strong {
  color: #fff7df;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.game-control-cell.is-muted strong {
  color: var(--muted);
}

.game-control-cell.is-state strong {
  display: inline-flex;
  justify-content: center;
}

.game-control-cell .status-pill {
  min-width: 76px;
  justify-content: center;
  font-size: 13px;
}

.game-control-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(132px, 1fr));
  gap: 10px;
}

.game-control-actions .button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  justify-content: center;
}

.game-group-panel {
  border-color: rgba(125, 182, 255, 0.32);
}

.game-observer-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-color: #203a55;
  background:
    linear-gradient(180deg, rgba(9, 24, 39, 0.98), rgba(5, 15, 27, 0.98)),
    var(--surface);
}

.game-observer {
  display: grid;
  gap: 18px;
}

.game-observer-panel > .panel-head h2,
.game-detail-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.game-observer-panel > .panel-head h2::before,
.game-detail-title::before {
  content: "";
  width: 5px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent-soft);
}

.game-detail-title {
  margin-top: 0;
  font-size: 24px;
  line-height: 1.2;
}

.round-summary-line,
.round-area-list,
.round-empty-state {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(8, 22, 37, 0.92);
  box-shadow: inset 0 0 32px rgba(125, 182, 255, 0.035);
}

.round-summary-line {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 0.9fr 0.8fr 0.65fr;
  gap: 0;
  overflow: hidden;
  min-height: 102px;
  background: linear-gradient(180deg, rgba(15, 32, 52, 0.96), rgba(8, 23, 39, 0.94));
}

.round-summary-item {
  display: grid;
  gap: 10px;
  min-height: 100px;
  padding: 20px 28px;
  border-right: 1px solid #29425e;
  align-content: center;
  text-align: center;
}

.round-summary-item:last-child {
  border-right: 0;
}

.round-summary-item span,
.round-area-head,
.round-area-row span,
.round-empty-state span,
.muted-line {
  color: var(--muted);
  font-size: 15px;
}

.round-summary-item strong {
  color: var(--text-strong);
  font-size: 26px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  font-weight: 850;
}

.round-summary-item.is-accent strong {
  color: var(--accent-2);
}

.round-summary-item.is-hot strong {
  color: var(--gold-2);
}

.round-area-list {
  display: grid;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(12, 28, 47, 0.96), rgba(6, 20, 35, 0.96));
}

.round-area-head,
.round-area-row {
  display: grid;
  grid-template-columns: 1fr 0.85fr 1fr 1.35fr 1fr;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 0 28px;
  border-bottom: 1px solid #1d344c;
}

.round-area-head {
  min-height: 54px;
  color: #e8f2ff;
  background: rgba(18, 34, 54, 0.72);
  font-weight: 800;
  text-align: center;
  font-size: 17px;
}

.round-area-row strong {
  color: var(--text-strong);
  font-size: 19px;
  font-weight: 820;
}

.round-area-row {
  text-align: center;
}

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

.round-area-row.is-focus {
  border-left: 5px solid var(--accent);
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.16), rgba(10, 58, 62, 0.22), rgba(8, 22, 37, 0.82));
  padding-left: 23px;
}

.round-area-row.is-player strong:first-child,
.area-label.is-player,
.round-area-row.is-player .share-cell em {
  color: var(--teal-2);
}

.round-area-row.is-banker strong:first-child,
.area-label.is-banker,
.round-area-row.is-banker .share-cell em {
  color: var(--gold-2);
}

.round-area-row.is-multi strong:first-child,
.area-label.is-multi,
.round-area-row.is-multi .share-cell em {
  color: #5aa7ff;
}

.round-area-row.is-empty {
  opacity: 0.62;
}

.round-area-row.is-total {
  background: rgba(20, 36, 58, 0.34);
  font-weight: 800;
}

.share-cell {
  display: grid;
  grid-template-columns: 82px minmax(180px, 1fr);
  gap: 18px;
  align-items: center;
}

.share-cell em {
  color: var(--text);
  font-style: normal;
}

.area-share-bar {
  display: block;
  height: 12px;
  overflow: hidden;
  border-radius: 3px;
  background: #263248;
}

.area-share-bar i {
  display: block;
  width: var(--share);
  min-width: 4px;
  max-width: 100%;
  height: 100%;
  background: var(--accent);
}

.round-area-row.is-banker .area-share-bar i {
  background: var(--gold);
}

.round-area-row.is-multi .area-share-bar i {
  background: #5aa7ff;
}

.area-label {
  font-weight: 800;
}

.detail-total-row td {
  color: var(--text-strong);
  font-weight: 800;
  background: rgba(20, 36, 58, 0.34);
}

.game-observer-panel .table-wrap {
  border-color: #203a55;
  background: linear-gradient(180deg, rgba(11, 27, 45, 0.96), rgba(6, 19, 33, 0.96));
}

.game-observer-panel table {
  min-width: 980px;
}

.game-observer-panel thead th {
  height: 46px;
  color: #e8f2ff;
  background: rgba(18, 34, 54, 0.72);
  text-align: center;
  font-size: 16px;
}

.game-observer-panel tbody td {
  height: 44px;
  color: #dce9fb;
  text-align: center;
  font-size: 16px;
  border-bottom-color: #1d344c;
}

.game-observer-panel tbody td strong {
  color: inherit;
}

.game-observer-panel .muted-line {
  color: #9fb0c8;
  font-size: 12px;
}

.round-empty-state {
  min-height: 94px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 14px;
}

.round-empty-state strong {
  color: var(--text-strong);
}

.muted-line {
  display: block;
  margin-top: 3px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  background: transparent;
}

th,
td {
  text-align: left;
  padding: 10px 9px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
  overflow-wrap: anywhere;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--teal-2);
  background: #0c121b;
}

tbody tr:hover {
  background: rgba(216, 168, 79, 0.06);
}

th {
  color: var(--teal-2);
  font-size: 12px;
  font-weight: 800;
}

td {
  color: #e2e6ee;
  font-size: 13px;
}

.mono {
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  color: #c7d2e5;
  white-space: normal;
}

.withdrawal-review-table {
  min-width: 1280px;
}

.withdrawal-bulkbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #20324a;
  border-radius: 6px;
  background: #081526;
}

.withdrawal-bulkbar strong {
  display: block;
  color: #f5f8ff;
  font-size: 13px;
}

.withdrawal-bulkbar span {
  display: block;
  margin-top: 3px;
  color: #8fa2bc;
  font-size: 12px;
}

.withdrawal-review-wrap {
  border-color: #20324a;
  background: #07111f;
}

.withdrawal-review-wrap .withdrawal-review-table {
  width: 100%;
  min-width: 1280px;
  table-layout: fixed;
  border-collapse: collapse;
  background: #07111f;
}

.withdrawal-review-table .withdrawal-col-time {
  width: 190px;
}

.withdrawal-review-table .withdrawal-col-player {
  width: 170px;
}

.withdrawal-review-table .withdrawal-col-rm {
  width: 150px;
}

.withdrawal-review-table .withdrawal-col-usdt {
  width: 170px;
}

.withdrawal-review-table .withdrawal-col-address {
  width: 250px;
}

.withdrawal-review-table .withdrawal-col-status {
  width: 120px;
}

.withdrawal-review-table .withdrawal-col-actions {
  width: 230px;
}

.withdrawal-review-wrap .withdrawal-review-table thead th {
  height: 38px;
  padding: 8px 10px;
  color: #9fb0c8;
  background: #0b1524;
  border-bottom: 1px solid #253852;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.withdrawal-review-wrap .withdrawal-review-table thead th > span {
  display: block;
  margin-top: 2px;
  color: #7f92ad;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
}

.withdrawal-review-wrap .withdrawal-review-table thead th:first-child {
  text-align: left;
}

.withdrawal-review-wrap .withdrawal-review-table tbody tr {
  min-height: 52px;
  background: #07111f;
}

.withdrawal-review-wrap .withdrawal-review-table tbody tr.is-selected {
  background: rgba(242, 184, 75, 0.13);
}

.withdrawal-review-wrap .withdrawal-review-table tbody tr:hover {
  background: rgba(242, 184, 75, 0.08);
}

.withdrawal-review-wrap .withdrawal-review-table tbody td {
  height: 54px;
  padding: 8px 10px;
  border-bottom: 1px solid #1d2c42;
  color: #dce9fb;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
}

.withdrawal-review-wrap .withdrawal-review-table tbody td:first-child {
  text-align: left;
}

.withdrawal-review-wrap .withdrawal-review-table tbody td:nth-child(1),
.withdrawal-review-wrap .withdrawal-review-table thead th:nth-child(1) {
  text-align: left;
}

.withdrawal-review-wrap .withdrawal-review-table thead th:nth-child(2),
.withdrawal-review-wrap .withdrawal-review-table thead th:nth-child(3),
.withdrawal-review-wrap .withdrawal-review-table thead th:nth-child(4),
.withdrawal-review-wrap .withdrawal-review-table thead th:nth-child(5),
.withdrawal-review-wrap .withdrawal-review-table thead th:nth-child(6),
.withdrawal-review-wrap .withdrawal-review-table thead th:nth-child(7),
.withdrawal-review-wrap .withdrawal-review-table tbody td:nth-child(2),
.withdrawal-review-wrap .withdrawal-review-table tbody td:nth-child(3),
.withdrawal-review-wrap .withdrawal-review-table tbody td:nth-child(4),
.withdrawal-review-wrap .withdrawal-review-table tbody td:nth-child(5),
.withdrawal-review-wrap .withdrawal-review-table tbody td:nth-child(6),
.withdrawal-review-wrap .withdrawal-review-table tbody td:nth-child(7) {
  text-align: center;
}

.withdrawal-review-wrap .withdrawal-review-table tbody td strong {
  color: #f5f8ff;
  font-size: 12px;
}

.withdrawal-review-wrap .withdrawal-review-table .withdrawal-subtext,
.withdrawal-review-wrap .withdrawal-review-table .amount-stack span {
  margin-top: 3px;
  color: #8fa2bc;
  font-size: 11px;
}

.withdrawal-review-wrap .withdrawal-review-table .amount-stack {
  display: grid;
  gap: 2px;
  justify-items: center;
}

.withdrawal-review-wrap .withdrawal-select-label {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.withdrawal-review-wrap .withdrawal-select-label input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--gold);
  cursor: pointer;
}

.withdrawal-review-wrap .withdrawal-select-label input:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.withdrawal-review-wrap .withdrawal-row-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.withdrawal-review-wrap .withdrawal-review-table .address-cell {
  grid-template-columns: minmax(120px, max-content) auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: none;
}

.withdrawal-review-wrap .withdrawal-review-table .address-cell code {
  display: block;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #c9d5e8;
  font-size: 11px;
}

.withdrawal-review-wrap .withdrawal-review-table .withdrawal-actions {
  justify-content: center;
  gap: 6px;
}

.withdrawal-review-wrap .withdrawal-review-table .button {
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.withdrawal-subtext,
.amount-stack span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

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

.address-cell {
  display: grid;
  gap: 8px;
  max-width: 310px;
}

.address-cell code,
.copy-line code,
.detail-field code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.withdrawal-actions {
  align-items: flex-start;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 8, 17, 0.72);
  z-index: 20;
}

.modal-panel {
  width: min(780px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: linear-gradient(180deg, #101d30, #071324);
  box-shadow: var(--shadow);
  padding: 18px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 14px;
}

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

.detail-field {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}

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

.detail-field p {
  color: var(--text-strong);
  overflow-wrap: anywhere;
}

.copy-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.copy-line code {
  flex: 1;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(151, 160, 176, 0.12);
  font-size: 12px;
  font-weight: 800;
}

.status-pill.is-ok {
  border-color: rgba(52, 208, 111, 0.5);
  color: var(--green);
  background: var(--green-soft);
}

.status-pill.is-warning {
  border-color: rgba(242, 184, 75, 0.56);
  color: var(--gold-2);
  background: var(--gold-soft);
}

.status-pill.is-danger,
.status-pill.is-critical {
  border-color: rgba(239, 89, 89, 0.62);
  color: #ff8585;
  background: var(--red-soft);
}

.table-actions,
.rename-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.table-actions .button {
  min-width: 64px;
}

.rename-control input {
  width: 180px;
  min-width: 140px;
}

.inline-status {
  color: var(--red-2);
  min-height: 20px;
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(440px, calc(100vw - 36px));
  background: #111827;
  color: var(--text-strong);
  padding: 12px 14px;
  border: 1px solid rgba(94, 234, 212, 0.42);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}

[hidden] {
  display: none !important;
}

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

  .global-kpi-strip {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    top: 70px;
  }

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

  .tabs {
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  }

  .tabs button {
    text-align: center;
  }

  .topbar {
    align-items: flex-start;
    padding: 16px;
  }

  .content {
    padding: 16px;
  }

  .dashboard-grid,
  .split,
  .overview-ledger-grid,
  .inline-form,
  .sim-login-form,
  .settings-board,
  .settings-announcement-grid,
  .settings-rule-groups {
    grid-template-columns: 1fr;
  }

  .settings-subtabs {
    overflow-x: auto;
  }

  .round-summary-line {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    overflow-x: auto;
  }

  .game-control-actions {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .round-area-list {
    overflow-x: auto;
  }

  .round-area-head,
  .round-area-row {
    grid-template-columns: 110px 92px 120px 190px 120px;
    min-width: 632px;
  }

  .risk-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .global-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: static;
  }

  .settings-row {
    grid-template-columns: minmax(84px, 0.8fr) minmax(96px, 1fr) 54px;
  }

  .limit-rules-form label {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .limit-rules-form input {
    text-align: left;
  }

  .kpi-card {
    min-height: 70px;
    padding: 10px;
  }

  .kpi-card strong {
    font-size: 15px;
  }

  .round-summary-item {
    min-height: 62px;
    padding: 10px 12px;
  }

  .round-summary-item strong {
    font-size: 16px;
  }

  .game-control-actions {
    grid-template-columns: 1fr;
  }
}
