:root {
  color-scheme: dark;
  --bg: #0a0f0d;
  --panel: #111916;
  --line: #28352f;
  --text: #edf4f0;
  --muted: #97a69f;
  --accent: #75e0a7;
  --danger: #ff705f;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(circle at 20% 0, #173026 0, var(--bg) 32rem);
  color: var(--text);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, "Microsoft YaHei", sans-serif;
}
header, main { width: min(1180px, calc(100% - 40px)); margin: auto; }
header { display: flex; align-items: center; justify-content: space-between; padding: 42px 0 24px; }
header form { display: flex; align-items: center; gap: 12px; }
.admin-session-actions { display: flex; align-items: center; gap: 12px; }
.quiet-link {
  padding: 9px 13px;
  border: 1px solid #3b574b;
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
}
.quiet-link:hover { border-color: var(--accent); }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(28px, 5vw, 48px); letter-spacing: -0.04em; margin-bottom: 0; }
h2 { margin-bottom: 0; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.summary-grid article, .panel, .login-card {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: 0 16px 60px #0005;
}
.summary-grid article { padding: 18px; border-radius: 14px; }
.summary-grid span { display: block; color: var(--muted); margin-bottom: 9px; }
.summary-grid strong { font-size: 22px; }
.summary-grid small { display: block; color: var(--muted); margin-top: 5px; }
.panel { margin-top: 18px; padding: 22px; border-radius: 16px; }
.panel-title { display: flex; justify-content: space-between; margin-bottom: 18px; }
.plain-status {
  align-self: flex-start;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
  white-space: nowrap;
}
.plain-status.normal,
.plain-status.success { color: #78d99e; }
.plain-status.warning { color: #d4ae69; }
.plain-status.failed,
.plain-status.rejected { color: #e18a7e; }
.contract-registry-panel { padding: 0; }
.contract-registry-summary {
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  list-style: none;
  cursor: pointer;
}
.contract-registry-summary::-webkit-details-marker { display: none; }
.contract-registry-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}
.contract-registry-action {
  width: 54px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}
.contract-registry-action::before { content: "展开 ↓"; }
.contract-registry-panel[open] .contract-registry-action::before { content: "收起 ↑"; }
.contract-registry-panel[open] .contract-registry-summary {
  border-bottom: 1px solid var(--line);
}
.contract-registry-content { padding: 0 22px 22px; }
.binance-source-intro { max-width: 900px; }
.binance-source-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--line);
}
.binance-source-status article {
  min-height: 96px;
  padding: 17px;
  background: #0b1310;
}
.binance-source-status span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
}
.binance-source-status strong { font-size: 17px; }
.binance-position-diagnostic { margin-top: 18px; }
.binance-source-actions,
.binance-source-connect {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  margin-top: 18px;
}
.binance-source-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.binance-source-actions form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}
.binance-source-actions label,
.binance-source-connect label { margin: 0; }
.binance-source-actions button,
.binance-source-connect button { min-height: 44px; }
.binance-permission-guide {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid #365347;
  border-radius: 13px;
  background: #0b1511;
}
.binance-permission-guide ul { margin-bottom: 0; }
.binance-source-replace {
  margin-top: 18px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.binance-source-replace summary {
  color: var(--accent);
  font-weight: 750;
  cursor: pointer;
}
.controls { display: flex; flex-wrap: wrap; gap: 10px; }
.strategy-module-control {
  display: grid;
  gap: 7px;
  min-width: min(360px, 100%);
}
.strategy-module-control small {
  color: var(--muted);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 11px;
}
button {
  border: 1px solid #3b574b; border-radius: 9px; padding: 10px 14px;
  color: #07120d; background: var(--accent); font: inherit; font-weight: 750; cursor: pointer;
}
button.quiet { color: var(--text); background: transparent; }
button.danger { color: white; border-color: #8d332a; background: #6e261f; }
button:disabled { opacity: .4; cursor: not-allowed; }
.muted { color: var(--muted); margin: 16px 0 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 10px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
td small { display: block; color: var(--muted); margin-top: 4px; }
code { color: #b6eaca; }
.badge {
  display: inline-block; border: 1px solid var(--line); border-radius: 999px;
  padding: 2px 8px; color: var(--text); background: #1a2722; font-size: 12px;
}
.badge.hot, .badge.warning, .badge.partial { border-color: #9e752e; background: #4b3617; }
.badge.normal, .badge.success { border-color: #2d7652; background: #173d2c; }
.badge.interrupted, .badge.failed, .badge.rejected { border-color: #8d332a; background: #4b211c; }
.badge.event { border-color: #3e6f8a; background: #173446; }
.centered { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(420px, 100%); padding: 30px; border-radius: 18px; }
label { display: grid; gap: 7px; margin: 16px 0; color: var(--muted); }
select,
input {
  width: 100%; border: 1px solid var(--line); border-radius: 9px;
  padding: 11px 12px; background: #09100d; color: var(--text); font: inherit;
}
.alert { padding: 10px 12px; border-left: 3px solid var(--danger); background: #411d1966; }
.success-message { padding: 10px 12px; border-left: 3px solid var(--accent); background: #173d2c; }
.auth-link { margin: 18px 0 0; color: var(--muted); }
a { color: var(--accent); }
.current-user { color: var(--muted); }
.settings-note { margin-top: -8px; margin-bottom: 18px; }
.copy-config-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.copy-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #0b1310; }
.copy-card-title { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.copy-card-title small { display: block; margin-top: 3px; }
.copy-card label { margin: 12px 0; }
.toggle { display: flex; grid-template-columns: auto auto; align-items: center; gap: 7px; margin: 0; }
.toggle input { width: auto; }
.registration-table { margin-top: 18px; }
.member-observer-form {
  max-width: 760px;
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}
.member-observer-form label { margin: 0; }
.member-observer-form button { min-height: 44px; }
@media (max-width: 720px) {
  .member-observer-form { grid-template-columns: 1fr; }
}
.control-state-layout {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(320px, 1.3fr);
  gap: 16px;
  align-items: stretch;
}
.current-control-state {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid #365347;
  border-radius: 13px;
  background: #0b1511;
}
.current-control-state span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.current-control-state strong {
  margin: 7px 0 3px;
  font-size: 25px;
}
.current-control-state code { font-size: 12px; }
.control-state-form {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #0b1310;
}
.control-state-form label { margin: 0; }
.control-state-form select { margin-top: 7px; }
.control-state-description {
  min-height: 23px;
  margin: 11px 0 14px;
  color: var(--muted);
  font-size: 13px;
}
.strategy-toggle.active {
  color: #07120d;
  border-color: #75e0a7;
  background: #75e0a7;
  box-shadow: 0 0 0 3px #75e0a71f;
}
.strategy-toggle.inactive {
  color: #7f8d86;
  border-color: #34423c;
  background: #151c19;
}
.strategy-toggle.inactive:hover {
  color: #b7c2bc;
  border-color: #52645b;
  background: #1b2420;
}
.admin-allocation-form {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid #365347;
  border-radius: 14px;
  background: #0b1511;
}
.admin-allocation-heading,
.admin-allocation-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.admin-allocation-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.admin-allocation-total {
  min-width: 92px;
  padding: 8px 12px;
  border: 1px solid #785f31;
  border-radius: 10px;
  color: #ffd58a;
  background: #302817;
  text-align: center;
  font-size: 18px;
  font-weight: 850;
}
.admin-allocation-total.ready {
  border-color: #3e8060;
  color: #9cf0bc;
  background: #173d2c;
}
.admin-allocation-total.invalid {
  border-color: #8d4d40;
  color: #ffb3a9;
  background: #411d19;
}
.admin-allocation-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.admin-allocation-grid label {
  margin: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #09100d;
}
.admin-allocation-grid label > span:first-child {
  min-height: 40px;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}
.admin-parts-input { position: relative; }
.admin-parts-input input {
  height: 44px;
  padding-right: 38px;
  font-size: 18px;
  font-weight: 850;
}
.admin-parts-input small {
  position: absolute;
  right: 12px;
  top: 12px;
  color: var(--muted);
}
.admin-allocation-actions { margin-top: 14px; }
.admin-allocation-actions small { color: var(--muted); }
.allocation-request-parts {
  min-width: 250px;
  display: grid;
  gap: 4px;
}
.allocation-request-parts span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}
.allocation-request-parts strong { color: var(--text); }
.admin-confirm-dialog {
  width: min(460px, calc(100% - 32px));
  padding: 28px;
  border: 1px solid #3a4d44;
  border-radius: 18px;
  color: var(--text);
  background: #111916;
  box-shadow: 0 28px 90px #000a;
}
.admin-confirm-dialog::backdrop {
  background: #020604c7;
  backdrop-filter: blur(4px);
}
.admin-confirm-dialog .eyebrow { margin-bottom: 8px; }
.admin-confirm-dialog h2 { font-size: 25px; }
.admin-confirm-symbol {
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  border: 1px solid #9b6c27;
  border-radius: 12px;
  color: #ffd68d;
  background: #4b3617;
  font-size: 22px;
  font-weight: 900;
}
.admin-confirm-message {
  margin: 14px 0 24px;
  color: var(--muted);
}
.admin-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
@media (max-width: 800px) {
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .binance-source-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .binance-source-connect,
  .binance-source-actions,
  .binance-source-actions form { grid-template-columns: 1fr; }
}
@media (max-width: 900px) { .copy-config-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .admin-allocation-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .control-state-layout { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .summary-grid { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
  header { align-items: flex-start; gap: 18px; }
  .admin-session-actions { align-items: flex-end; flex-direction: column; }
  .admin-allocation-heading,
  .admin-allocation-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Dense administrator console */
.admin-console {
  background:
    linear-gradient(#070c0aeb, #070c0af5),
    radial-gradient(circle at 18% 0, #214333 0, transparent 42rem);
}
.admin-console-header,
.admin-console-main {
  width: min(1560px, calc(100% - 32px));
}
.admin-console-header {
  min-height: 70px;
  padding: 12px 2px;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid #25342e;
  background: #0a100dee;
  backdrop-filter: blur(14px);
}
.admin-console-header h1 {
  font-size: clamp(24px, 2.3vw, 34px);
  letter-spacing: -.025em;
}
.admin-console-header .eyebrow { margin-bottom: 2px; }
.admin-console-header .quiet-link,
.admin-console-header button {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
}
.admin-console-header .admin-session-actions { gap: 7px; }
.admin-console-header form { gap: 8px; }
.admin-console-main {
  padding: 12px 0 30px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.admin-console-main > * {
  min-width: 0;
  grid-column: 1 / -1;
}
.admin-console-main > .success-message,
.admin-console-main > .security-warning { order: 0; margin: 0; }
.admin-summary-grid {
  order: 10;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--line);
}
.admin-summary-grid article {
  min-height: 74px;
  padding: 11px 13px;
  border: 0;
  border-radius: 0;
  background: #101814;
  box-shadow: none;
}
.admin-summary-grid span {
  margin-bottom: 4px;
  font-size: 11px;
}
.admin-summary-grid strong {
  display: block;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.25;
  text-overflow: ellipsis;
}
.admin-summary-grid small { margin-top: 3px; font-size: 11px; }
.admin-section-nav {
  order: 11;
  min-height: 42px;
  padding: 5px;
  display: flex;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0d1511;
}
.admin-section-nav a {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 6px;
  color: #a9b7b0;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.admin-section-nav a:hover,
.admin-section-nav a:focus-visible {
  color: #0a120e;
  background: var(--accent);
  outline: none;
}
.admin-console-main > .panel {
  margin: 0;
  padding: 15px 17px;
  border-radius: 11px;
  box-shadow: 0 8px 28px #0003;
}
.admin-console-main .panel-title {
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.admin-console-main .panel-title h2 {
  font-size: 20px;
  line-height: 1.25;
}
.admin-console-main .panel-title .eyebrow { margin-bottom: 3px; }
.admin-console-main .muted {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
}
.admin-console-main .table-wrap {
  scrollbar-color: #51685d #111915;
  scrollbar-width: thin;
}
.admin-console-main table { font-size: 13px; }
.admin-console-main th,
.admin-console-main td {
  padding: 8px 8px;
  line-height: 1.35;
}
.admin-console-main th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #111916;
  font-size: 10px;
  letter-spacing: .055em;
}
.admin-console-main td small { margin-top: 2px; font-size: 11px; }
.admin-console-main .registration-table { margin-top: 9px; }
.admin-console-main .controls { gap: 6px; }
.admin-console-main button {
  min-height: 35px;
  padding: 7px 11px;
  border-radius: 7px;
  font-size: 13px;
}
.admin-console-main input,
.admin-console-main select {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 7px;
}
.admin-control-panel {
  grid-column: span 6 !important;
  order: 20;
}
.admin-live-source-panel { order: 30; }
.admin-strategy-panel { order: 40; }
.admin-member-observer-panel {
  grid-column: span 5 !important;
  order: 50;
}
.admin-allocation-review-panel {
  grid-column: span 7 !important;
  order: 51;
}
#member-access { order: 52; }
.admin-account-review-panel { order: 53; }
.admin-source-position-panel {
  grid-column: span 6 !important;
  order: 60;
}
.admin-event-panel {
  grid-column: span 6 !important;
  order: 61;
}
.admin-recovery-panel { order: 62; }
.admin-low-priority-panel { order: 70; }
.contract-registry-panel { order: 80; }
.admin-table-panel > .table-wrap {
  max-height: 310px;
  overflow: auto;
}
.admin-live-source-panel > .table-wrap { max-height: 270px; overflow: auto; }
.admin-collapsible-panel { padding: 0 !important; }
.admin-collapsible-summary {
  min-height: 64px;
  margin: 0 !important;
  padding: 13px 17px;
  list-style: none;
  cursor: pointer;
}
.admin-collapsible-summary::-webkit-details-marker { display: none; }
.admin-collapsible-summary::after {
  content: "展开";
  margin-left: 3px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}
.admin-collapsible-panel[open] > .admin-collapsible-summary {
  border-bottom: 1px solid var(--line);
}
.admin-collapsible-panel[open] > .admin-collapsible-summary::after { content: "收起"; }
.admin-collapsible-content { padding: 12px 17px 15px; }
.admin-collapsible-content > :first-child { margin-top: 0; }
.admin-collapsible-content > :last-child { margin-bottom: 0; }
.admin-console-main .control-state-layout {
  grid-template-columns: minmax(150px, .62fr) minmax(240px, 1.38fr);
  gap: 9px;
}
.admin-console-main .current-control-state,
.admin-console-main .control-state-form {
  padding: 12px 14px;
  border-radius: 9px;
}
.admin-console-main .current-control-state strong {
  margin: 3px 0 1px;
  font-size: 20px;
}
.admin-console-main .control-state-description {
  min-height: 19px;
  margin: 6px 0 8px;
  font-size: 12px;
}
.admin-console-main .member-observer-form {
  max-width: none;
  margin-top: 10px;
  gap: 8px;
}
.admin-console-main .binance-source-status {
  margin-top: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-radius: 9px;
}
.admin-console-main .binance-source-status article {
  min-height: 66px;
  padding: 10px 12px;
}
.admin-console-main .binance-source-status span { margin-bottom: 3px; }
.admin-console-main .binance-source-status strong { font-size: 14px; }
.admin-console-main .binance-position-diagnostic,
.admin-console-main .binance-source-actions,
.admin-console-main .binance-source-connect,
.admin-console-main .binance-source-replace { margin-top: 10px; }
.admin-console-main .admin-allocation-form {
  margin-top: 12px;
  padding: 13px;
  border-radius: 9px;
}
.admin-console-main .admin-allocation-grid { margin-top: 10px; }
.admin-console-main .admin-allocation-grid label {
  padding: 9px;
  border-radius: 8px;
}
.admin-console-main .admin-allocation-grid label > span:first-child { min-height: 31px; }
.admin-console-main .admin-allocation-actions { margin-top: 9px; }
.admin-console-main .strategy-module-control {
  min-width: min(300px, 100%);
  gap: 3px;
}
.admin-console-main .strategy-toggle { padding: 8px 10px; }
.admin-console-main .contract-registry-panel { padding: 0; }
.admin-console-main .contract-registry-summary { padding: 14px 17px; }
.admin-console-main .contract-registry-content { padding: 0 17px 15px; }

@media (max-width: 1100px) {
  .admin-control-panel,
  .admin-member-observer-panel,
  .admin-allocation-review-panel,
  .admin-source-position-panel,
  .admin-event-panel {
    grid-column: 1 / -1 !important;
  }
  .admin-console-main .binance-source-status {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .admin-console-header,
  .admin-console-main { width: min(100% - 20px, 1560px); }
  .admin-console-header {
    position: static;
    align-items: flex-start;
    gap: 9px;
  }
  .admin-console-header .admin-session-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .admin-console-header form {
    align-items: stretch;
    flex-direction: column;
  }
  .admin-console-main { display: block; }
  .admin-console-main > * { margin-bottom: 10px; }
  .admin-summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
  .admin-console-main .binance-source-status { grid-template-columns: 1fr; }
}

/* Public member access */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 34px;
  color: #17231e;
  background:
    radial-gradient(circle at 5% 5%, #dcefe3 0, transparent 28rem),
    radial-gradient(circle at 95% 90%, #ebe0c6 0, transparent 25rem),
    #f4f6f2;
}
.auth-shell {
  width: min(1080px, 100%);
  min-height: 660px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
  overflow: hidden;
  border: 1px solid #d8e0da;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 32px 90px #243c2f24;
}
.auth-story {
  min-height: 660px;
  padding: 42px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  color: #f4faf6;
  background:
    radial-gradient(circle at 82% 16%, #5f936e 0, transparent 17rem),
    linear-gradient(145deg, #10271d 0%, #1f4834 68%, #2f6448 100%);
}
.auth-story::after {
  content: "";
  width: 380px;
  height: 380px;
  position: absolute;
  right: -230px;
  bottom: -160px;
  border: 1px solid #ffffff29;
  border-radius: 50%;
  box-shadow: 0 0 0 64px #ffffff0a, 0 0 0 128px #ffffff08;
}
.register-story {
  background:
    radial-gradient(circle at 82% 16%, #786b9a 0, transparent 17rem),
    linear-gradient(145deg, #19241f 0%, #354838 63%, #665f46 100%);
}
.admin-auth-story {
  background:
    radial-gradient(circle at 82% 16%, #79564a 0, transparent 17rem),
    linear-gradient(145deg, #171d1a 0%, #263c31 62%, #60483d 100%);
}
.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.auth-brand strong, .auth-brand small { display: block; }
.auth-brand strong { color: #fff; letter-spacing: -.01em; }
.auth-brand small { margin-top: 2px; color: #a9c2b3; font-size: 10px; letter-spacing: .12em; }
.auth-story-copy { position: relative; z-index: 1; }
.auth-kicker {
  display: block;
  margin-bottom: 14px;
  color: #80dda8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
}
.auth-story-copy h1 {
  margin: 0 0 20px;
  color: #fff;
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -.055em;
}
.auth-story-copy p {
  max-width: 430px;
  margin: 0;
  color: #c1d1c7;
  font-size: 16px;
}
.auth-principles {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  position: relative;
  z-index: 1;
}
.auth-principles span {
  padding: 7px 11px;
  border: 1px solid #ffffff24;
  border-radius: 999px;
  color: #d8e4dc;
  background: #ffffff0a;
  font-size: 11px;
  font-weight: 700;
}
.auth-card {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 64px 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 0;
  border-radius: 0;
  color: #17231e;
  background: #fff;
  box-shadow: none;
}
.auth-card-heading > span {
  color: #3f855e;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .15em;
}
.auth-card-heading h2 {
  margin: 8px 0 6px;
  color: #18271f;
  font-size: 36px;
  letter-spacing: -.04em;
}
.auth-card-heading p { margin: 0 0 24px; color: #7a877f; }
.auth-card label {
  margin: 16px 0;
  color: #4c5d53;
  font-size: 12px;
  font-weight: 750;
}
.auth-card input {
  height: 50px;
  border: 1px solid #ced8d1;
  border-radius: 11px;
  color: #17231e;
  background: #f8faf7;
}
.auth-card input:focus {
  outline: 3px solid #4a966d20;
  border-color: #4a966d;
}
.auth-submit {
  width: 100%;
  margin-top: 6px;
  padding: 13px 16px;
  display: flex;
  justify-content: space-between;
  border: 1px solid #234f39;
  border-radius: 11px;
  color: #fff;
  background: #234f39;
}
.auth-submit:hover { background: #173d2c; }
.auth-divider {
  margin: 25px 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #9aa49e;
  font-size: 11px;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e1e6e2;
}
.auth-secondary {
  width: 100%;
  padding: 12px 15px;
  display: block;
  border: 1px solid #cbd7cf;
  border-radius: 11px;
  color: #2d6046;
  background: #f8faf7;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}
.auth-secondary:hover { border-color: #78a88b; background: #f0f6f2; }
.auth-footnote { margin: 14px 0 0; color: #929d96; font-size: 11px; text-align: center; }
.auth-footnote a { color: #397454; }
.auth-card .alert {
  margin: 18px 0 0;
  border: 1px solid #e5bdb7;
  border-left: 3px solid #c5574b;
  border-radius: 8px;
  color: #8a3f37;
  background: #fff3f1;
}
.auth-error {
  display: grid;
  gap: 3px;
}
.auth-error strong { color: #77362f; }
.auth-error span { color: #98564e; }
.field-hint {
  color: #8b9790;
  font-size: 11px;
  font-weight: 500;
}
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.application-result { padding: 36px 0 0; text-align: center; }
.application-result > span {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #3e8e63;
  font-size: 23px;
  font-weight: 900;
}
.application-result.closed > span { background: #9b8554; }
.application-result h3 { margin: 0 0 8px; color: #1c2d24; font-size: 24px; }
.application-result p { margin: 0 0 24px; color: #748178; }

/* Member portal */
.member-portal {
  min-height: 100vh;
  color: #17231e;
  background:
    radial-gradient(circle at 8% 0, #d9efe3 0, transparent 28rem),
    radial-gradient(circle at 96% 12%, #eee4cc 0, transparent 24rem),
    #f5f7f3;
}
.member-nav {
  width: 100%;
  padding: 0;
  color: #17231e;
  background: #fbfcf9d9;
  border-bottom: 1px solid #dce4dd;
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.member-nav-inner {
  width: min(1180px, calc(100% - 48px));
  min-height: 76px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.member-brand, .member-actions, .member-actions form {
  display: flex;
  align-items: center;
}
.member-brand { gap: 12px; }
.member-brand strong, .member-brand small { display: block; }
.member-brand strong { font-size: 15px; letter-spacing: -.01em; }
.member-brand small { margin-top: 1px; color: #718078; font-size: 12px; }
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #f5fff8;
  background: linear-gradient(145deg, #193d2d, #2d7552);
  box-shadow: 0 8px 24px #235a3f36;
  font: 800 18px/1 ui-sans-serif, system-ui, sans-serif;
}
.member-actions { gap: 18px; }
.member-actions form { gap: 9px; margin: 0; }
.admin-return-link {
  padding: 7px 11px;
  border: 1px solid #c9d8ce;
  border-radius: 999px;
  color: #315d46;
  background: #edf6f0;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.admin-return-link:hover { border-color: #83ae93; background: #e3f1e7; }
.environment-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid #d4dfd7;
  border-radius: 999px;
  color: #53645b;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}
.environment-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #42a775;
  box-shadow: 0 0 0 4px #42a7751f;
}
.environment-pill.state-disabled i {
  background: #9aa49e;
  box-shadow: 0 0 0 4px #9aa49e1f;
}
.environment-pill.state-close_only i {
  background: #d19a3e;
  box-shadow: 0 0 0 4px #d19a3e1f;
}
.member-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #f8fff9;
  background: #274d3a;
  font-weight: 800;
}
.member-name { color: #35443c; font-size: 13px; font-weight: 700; }
.text-button {
  padding: 5px 4px;
  border: 0;
  color: #718078;
  background: transparent;
  font-size: 13px;
}
.text-button:hover { color: #173d2c; }
.member-main {
  width: min(1180px, calc(100% - 48px));
  padding: 54px 0 28px;
}
.member-toast {
  margin: 0 0 22px;
  padding: 13px 16px;
  border: 1px solid #b9d8c4;
  border-radius: 12px;
  color: #235a3f;
  background: #e6f5eb;
  font-weight: 700;
}
.member-hero {
  min-height: 258px;
  padding: 42px 46px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 38px;
  overflow: hidden;
  position: relative;
  border: 1px solid #234b38;
  border-radius: 26px;
  color: #f5faf7;
  background:
    linear-gradient(105deg, #132d22 0%, #204b36 58%, #386a4d 100%);
  box-shadow: 0 28px 70px #1637272b;
}
.member-hero::before,
.member-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.member-hero::before {
  width: 320px;
  height: 320px;
  right: -70px;
  top: -180px;
  border: 1px solid #ffffff24;
  box-shadow: 0 0 0 55px #ffffff08, 0 0 0 110px #ffffff05;
}
.member-hero::after {
  width: 160px;
  height: 160px;
  right: 28%;
  bottom: -132px;
  background: #d7bf7740;
  filter: blur(4px);
}
.hero-copy, .allocation-total { position: relative; z-index: 1; }
.member-kicker {
  display: block;
  margin-bottom: 9px;
  color: #79d8a3;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
}
.hero-copy h1 {
  max-width: 680px;
  margin: 0 0 13px;
  color: #fff;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.04;
}
.hero-copy p {
  max-width: 630px;
  margin: 0;
  color: #c4d4cb;
  font-size: 16px;
}
.allocation-total {
  min-width: 236px;
  padding: 22px 24px;
  border: 1px solid #ffffff24;
  border-radius: 18px;
  background: #ffffff0d;
  backdrop-filter: blur(10px);
}
.allocation-total span, .allocation-total small { display: block; color: #bdcec4; }
.allocation-total strong {
  display: block;
  margin: 6px 0 2px;
  color: #fff;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -.04em;
}
.member-metrics {
  margin: 22px 0 50px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #dce4dd;
  border-radius: 18px;
  background: #fbfcf9;
  box-shadow: 0 14px 40px #2c443714;
}
.member-metrics article { padding: 21px 25px; }
.member-metrics article + article { border-left: 1px solid #dce4dd; }
.member-metrics span, .member-metrics small { display: block; color: #78867e; }
.member-metrics span { font-size: 12px; font-weight: 750; }
.member-metrics strong {
  display: block;
  margin: 5px 0 2px;
  color: #1e3027;
  font-size: 22px;
}
.first-execution-acceptance {
  margin: -28px 0 50px;
  overflow: hidden;
  border: 1px solid #303934;
  border-radius: 18px;
  background: #191d1b;
  box-shadow: 0 16px 46px #0004;
}
.first-execution-header {
  padding: 22px 24px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid #303934;
}
.first-execution-header h2 {
  margin: 4px 0 5px;
  color: #dfe5e1;
  font-size: clamp(22px, 2.6vw, 30px);
}
.first-execution-header p {
  margin: 0;
  color: #8f9993;
}
.first-execution-badge {
  flex: none;
  padding: 8px 12px;
  border: 1px solid #46524b;
  border-radius: 999px;
  color: #b9c3bd;
  background: #222825;
  font-size: 12px;
  font-weight: 850;
}
.first-execution-acceptance.status-passed .first-execution-badge {
  border-color: #3b6e52;
  color: #8bd6a8;
  background: #193125;
}
.first-execution-acceptance.status-processing .first-execution-badge {
  border-color: #756633;
  color: #e4ca6a;
  background: #302a19;
}
.first-execution-acceptance.status-no_fill .first-execution-badge {
  border-color: #48637a;
  color: #9fc6e5;
  background: #1b2934;
}
.first-execution-acceptance.status-failed .first-execution-badge {
  border-color: #82483f;
  color: #ef9a8c;
  background: #361f1b;
}
.first-execution-stages {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.first-execution-stage {
  min-width: 0;
  padding: 18px 17px 19px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
}
.first-execution-stage + .first-execution-stage {
  border-left: 1px solid #303934;
}
.first-execution-stage-index {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #47514b;
  border-radius: 50%;
  color: #8f9993;
  background: #202522;
  font-size: 11px;
  font-weight: 900;
}
.first-execution-stage span,
.first-execution-stage strong,
.first-execution-stage small {
  display: block;
}
.first-execution-stage span {
  color: #8f9993;
  font-size: 11px;
  font-weight: 800;
}
.first-execution-stage strong {
  margin: 3px 0 5px;
  color: #c9d1cc;
  font-size: 14px;
}
.first-execution-stage small {
  color: #707a74;
  line-height: 1.45;
}
.first-execution-stage.status-passed .first-execution-stage-index {
  border-color: #47795b;
  color: #91d5aa;
  background: #1d3326;
}
.first-execution-stage.status-processing .first-execution-stage-index {
  border-color: #7b6a35;
  color: #e4ca6a;
  background: #302a19;
}
.first-execution-stage.status-failed .first-execution-stage-index {
  border-color: #82483f;
  color: #ef9a8c;
  background: #361f1b;
}
.first-execution-stage.status-no_fill .first-execution-stage-index,
.first-execution-stage.status-skipped .first-execution-stage-index {
  border-color: #48637a;
  color: #9fc6e5;
  background: #1b2934;
}
.first-execution-footer {
  padding: 11px 24px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid #303934;
  color: #707a74;
  background: #171a18;
  font-size: 11px;
}
.account-overview {
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid #303934;
  border-radius: 18px;
  background: #191d1b;
  box-shadow: 0 16px 46px #0004;
}
.account-overview-header {
  min-height: 74px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #303934;
  background: #1b201d;
}
.account-overview-header h1 {
  margin: 2px 0 0;
  color: #e5ebe7;
  font-size: 25px;
  letter-spacing: -.025em;
}
.account-status-line {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}
.account-status-line span,
.account-status-line a {
  padding: 6px 9px;
  border: 1px solid #3b443f;
  border-radius: 999px;
  color: #98a39c;
  background: #222724;
  font-size: 10px;
  font-weight: 800;
}
.account-status-line .state-enabled {
  border-color: #3d6a50;
  color: #9bc7aa;
  background: #203128;
}
.account-status-line .state-close_only {
  border-color: #6b5937;
  color: #d0b784;
  background: #332d20;
}
.account-status-line .state-disabled {
  border-color: #5a4441;
  color: #c39b95;
  background: #302422;
}
.account-status-line a { color: #9fc3ac; }
.account-overview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.account-overview-grid article {
  min-width: 0;
  padding: 16px 22px 17px;
}
.account-overview-grid article + article {
  border-left: 1px solid #303934;
}
.account-overview-grid span,
.account-overview-grid small {
  display: block;
  color: #7f8a83;
  font-size: 10px;
}
.account-overview-grid strong {
  display: inline-block;
  margin: 5px 4px 2px 0;
  color: #dce3de;
  font-size: 22px;
  letter-spacing: -.025em;
}
.account-overview-grid .value-positive { color: #72c993; }
.account-overview-grid .value-negative { color: #da8d83; }

.execution-alert-center {
  margin: 12px 0 22px;
  border: 1px solid #303934;
  border-radius: 14px;
  background: #171b19;
}
.execution-alert-center.has-alerts {
  overflow: hidden;
  border-color: #6c4939;
  box-shadow: 0 14px 36px #0004;
}
.execution-alert-ok {
  min-height: 48px;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.execution-alert-ok-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #6fc28e;
  box-shadow: 0 0 0 5px #6fc28e18;
}
.execution-alert-ok strong {
  color: #bdd1c4;
  font-size: 12px;
}
.execution-alert-ok small {
  color: #748078;
  font-size: 11px;
}
.execution-alert-header {
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #47362e;
  background: #211c19;
}
.execution-alert-header .member-kicker {
  color: #d59a76;
}
.execution-alert-header h2 {
  margin: 3px 0 0;
  color: #ece3dd;
  font-size: 18px;
}
.execution-alert-count {
  padding: 5px 9px;
  border: 1px solid #704b3d;
  border-radius: 999px;
  color: #dfaa94;
  background: #35241e;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}
.execution-alert-list {
  display: grid;
}
.execution-alert-item {
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  background: #1a1d1b;
}
.execution-alert-item + .execution-alert-item {
  border-top: 1px solid #353a37;
}
.execution-alert-item.severity-critical {
  background: linear-gradient(90deg, #3b211d80, #1a1d1b 40%);
}
.execution-alert-item.severity-warning {
  background: linear-gradient(90deg, #3c311b70, #1a1d1b 40%);
}
.execution-alert-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #765044;
  border-radius: 8px;
  color: #efb4a2;
  background: #3d251f;
  font-size: 14px;
  font-weight: 950;
}
.severity-warning .execution-alert-icon {
  border-color: #766137;
  color: #e4c177;
  background: #3b311d;
}
.execution-alert-body {
  min-width: 0;
}
.execution-alert-title {
  display: flex;
  align-items: center;
  gap: 9px;
}
.execution-alert-title span {
  color: #df9c88;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}
.severity-warning .execution-alert-title span {
  color: #d6b466;
}
.execution-alert-title h3 {
  margin: 0;
  color: #e8e4e1;
  font-size: 15px;
}
.execution-alert-body p {
  margin: 7px 0 8px;
  color: #aeb5b0;
  font-size: 12px;
  line-height: 1.65;
}
.execution-alert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.execution-alert-meta span,
.execution-alert-meta time {
  padding: 3px 7px;
  border: 1px solid #3d4540;
  border-radius: 999px;
  color: #828d86;
  font-size: 9px;
}
.execution-alert-action {
  margin-top: 9px;
  display: block;
  color: #d0b5a8;
  font-size: 11px;
  line-height: 1.55;
}
.severity-warning .execution-alert-action {
  color: #cabd98;
}
.first-execution-compact {
  margin: 0 0 30px;
  overflow: hidden;
  border: 1px solid #303934;
  border-radius: 13px;
  color: #8e9992;
  background: #171a18;
}
.first-execution-compact summary {
  min-height: 48px;
  padding: 8px 13px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}
.first-execution-compact summary::-webkit-details-marker { display: none; }
.first-execution-compact summary > strong {
  color: #cfd7d2;
  font-size: 12px;
}
.first-execution-compact summary > span:not(.first-execution-badge),
.first-execution-compact summary > small {
  overflow: hidden;
  color: #78827c;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.first-execution-compact summary > small { color: #94b49f; }
.first-execution-compact[open] summary {
  border-bottom: 1px solid #303934;
}
.first-execution-compact .first-execution-badge {
  padding: 5px 8px;
  font-size: 10px;
}
.first-execution-compact.status-passed .first-execution-badge {
  border-color: #3b6e52;
  color: #8bd6a8;
  background: #193125;
}
.first-execution-compact.status-processing .first-execution-badge {
  border-color: #756633;
  color: #e4ca6a;
  background: #302a19;
}
.first-execution-compact.status-no_fill .first-execution-badge {
  border-color: #48637a;
  color: #9fc6e5;
  background: #1b2934;
}
.first-execution-compact.status-failed .first-execution-badge {
  border-color: #82483f;
  color: #ef9a8c;
  background: #361f1b;
}
.member-execution-section { margin-bottom: 50px; }
.execution-section-heading { align-items: end; }
.execution-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
.execution-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d4ded7;
  border-radius: 18px;
  background: #fbfcf9;
  box-shadow: 0 16px 46px #263d3010;
}
.position-panel { grid-column: auto; }
.execution-panel-heading {
  min-height: 84px;
  padding: 20px 22px 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #e1e7e2;
}
.execution-panel-heading > div > span {
  display: block;
  margin-bottom: 4px;
  color: #43815f;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
}
.execution-panel-heading h3 {
  margin: 0;
  color: #1b2b23;
  font-size: 21px;
}
.execution-panel-heading > small {
  color: #7b8880;
  font-size: 11px;
  text-align: right;
}
.member-table-wrap {
  width: 100%;
  max-height: 360px;
  overflow: auto;
  scrollbar-gutter: stable;
}
.member-data-table {
  min-width: 940px;
  color: #28382f;
  background: transparent;
}
.member-data-table th,
.member-data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #e4e9e5;
  white-space: nowrap;
}
.member-data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #7a8780;
  background: #f4f7f3;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
}
.member-data-table td {
  color: #526159;
  font-size: 12px;
}
.member-data-table tbody tr:last-child td { border-bottom: 0; }
.member-data-table td strong { color: #1d3026; }
.member-data-table time { color: #78857d; font-size: 11px; }
.member-result {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid #d7dfda;
  border-radius: 999px;
  color: #536159;
  background: #f0f3f0;
  font-size: 11px;
  font-weight: 800;
}
.member-result.result-filled {
  border-color: #b8dac6;
  color: #286b49;
  background: #e8f5ed;
}
.member-result.result-partial,
.member-result.result-cancelled,
.member-result.result-target-skipped {
  border-color: #e5cca0;
  color: #835d1d;
  background: #fbf3e5;
}
.member-result.result-rejected {
  border-color: #e4bbb3;
  color: #984437;
  background: #fbece9;
}
.member-result.result-submitting,
.member-result.result-open,
.member-result.result-unknown {
  border-color: #bfd3dd;
  color: #3f6a7d;
  background: #eaf3f7;
}
.event-feed {
  max-height: 360px;
  padding: 4px 20px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.event-feed-row {
  min-height: 66px;
  padding: 12px 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e3e8e4;
}
.event-feed-row:last-child { border-bottom: 0; }
.event-kind {
  min-width: 68px;
  padding: 5px 7px;
  border-radius: 8px;
  color: #2b6a49;
  background: #e7f3eb;
  text-align: center;
  font-size: 11px;
  font-weight: 850;
}
.event-feed-row strong,
.event-feed-row small {
  display: block;
}
.event-feed-row strong { color: #21352a; font-size: 13px; }
.event-feed-row small { color: #78857d; font-size: 10px; }
.event-feed-row time {
  color: #68766e;
  font-size: 10px;
  text-align: right;
}
.execution-empty {
  min-height: 150px;
  padding: 34px 24px;
  display: grid;
  place-content: center;
  color: #56645c;
  text-align: center;
}
.execution-empty.compact { min-height: 190px; }
.execution-empty strong { color: #2c3d34; }
.execution-empty p {
  max-width: 420px;
  margin: 5px 0 0;
  color: #849087;
  font-size: 12px;
}
.allocation-section { margin-bottom: 50px; }
.allocation-panel {
  padding: 28px;
  border: 1px solid #cfdcd3;
  border-radius: 22px;
  background: #fbfcf9;
  box-shadow: 0 18px 50px #263d3010;
}
.allocation-panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}
.allocation-panel-heading h2 {
  margin: 0 0 8px;
  color: #1b2b23;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -.035em;
}
.allocation-panel-heading p {
  max-width: 680px;
  margin: 0;
  color: #6f7d74;
}
.allocation-counter {
  min-width: 148px;
  padding: 13px 16px;
  border: 1px solid #d8e2db;
  border-radius: 13px;
  background: #fff;
}
.allocation-counter span,
.allocation-counter small {
  display: block;
  color: #7c8981;
  font-size: 11px;
}
.allocation-counter strong {
  display: block;
  margin: 3px 0;
  color: #9a5d22;
  font-size: 24px;
}
.allocation-counter strong.ready { color: #27714c; }
.allocation-counter strong.invalid { color: #a34f3d; }
.allocation-parts-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.allocation-part {
  min-width: 0;
  padding: 16px;
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 13px;
  border: 1px solid #d9e2dc;
  border-radius: 14px;
  background: #fff;
}
.allocation-part-accent {
  width: 5px;
  height: 38px;
  border-radius: 999px;
  background: #c29343;
}
.allocation-part.theme-dynamic .allocation-part-accent { background: #8a6ec1; }
.allocation-part.theme-balanced .allocation-part-accent { background: #4e9a70; }
.allocation-part-name {
  color: #26372e;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}
.allocation-part-input { position: relative; }
.allocation-part-input input {
  width: 100%;
  height: 44px;
  padding: 0 35px 0 12px;
  border: 1px solid #c9d7ce;
  border-radius: 10px;
  color: #17251e;
  background: #f7faf7;
  font-size: 18px;
  font-weight: 850;
}
.allocation-part-input input:focus {
  outline: 3px solid #46956d24;
  border-color: #4f9a70;
}
.allocation-part-input span {
  position: absolute;
  right: 11px;
  top: 12px;
  color: #7b8981;
  font-size: 12px;
  font-weight: 800;
}
.allocation-panel-actions {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.allocation-panel-actions p {
  margin: 0;
  color: #78857d;
  font-size: 12px;
}
.unified-form-actions {
  margin-top: 20px;
  padding: 18px 2px 0;
  border-top: 1px solid #dce4dd;
}
.allocation-save-button {
  width: auto;
  min-width: 190px;
  margin-top: 0;
}
.allocation-save-button:disabled {
  border-color: #cbd4ce;
  color: #8a958e;
  background: #e8ece9;
  cursor: not-allowed;
}
.section-heading {
  margin-bottom: 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}
.section-heading .member-kicker { color: #39805a; }
.section-heading h2 {
  color: #1b2b23;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -.035em;
}
.section-heading p { max-width: 350px; margin: 0; color: #748178; text-align: right; }
.unified-strategy-section { margin-top: 0; }
.unified-strategy-form {
  padding: 28px;
  border: 1px solid #cfdcd3;
  border-radius: 22px;
  background: #fbfcf9;
  box-shadow: 0 18px 50px #263d3010;
}
.unified-section-heading {
  align-items: center;
  margin-bottom: 24px;
}
.unified-section-heading > div:first-child { min-width: 0; }
.unified-section-heading p {
  max-width: 730px;
  text-align: left;
}
.strategy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.strategy-card {
  min-width: 0;
  overflow: hidden;
  position: relative;
  border: 1px solid #dce4dd;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 50px #263d3012;
  transition: transform .2s ease, box-shadow .2s ease;
}
.strategy-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 56px #263d3021;
}
.strategy-accent { height: 6px; background: #c29343; }
.theme-dynamic .strategy-accent { background: #8a6ec1; }
.theme-balanced .strategy-accent { background: #4e9a70; }
.strategy-card-body { padding: 24px; }
.strategy-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #77847c;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.risk-chip {
  padding: 4px 8px;
  border-radius: 999px;
  color: #76561e;
  background: #f7edda;
  letter-spacing: 0;
}
.theme-dynamic .risk-chip { color: #624d8d; background: #eee9f7; }
.theme-balanced .risk-chip { color: #2d704c; background: #e5f2ea; }
.strategy-card h3 {
  min-height: 58px;
  margin: 18px 0 9px;
  color: #17251e;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -.03em;
}
.strategy-card p {
  min-height: 66px;
  margin: 0;
  color: #718078;
  font-size: 14px;
}
.allocation-metric-label,
.parts-control label {
  margin: 0 0 8px;
  color: #4c5e54;
  font-size: 12px;
  font-weight: 750;
}
.allocation-metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.allocation-metric-label small {
  color: #7b8981;
  font-size: 10px;
  font-weight: 800;
}
.parts-control label {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.parts-control label small {
  padding: 2px 6px;
  border-radius: 999px;
  color: #8a641e;
  background: #f7edda;
  font-size: 10px;
}
.strategy-config-controls {
  margin-top: 25px;
  padding-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 126px;
  align-items: end;
  gap: 20px;
  border-top: 1px solid #e6ebe7;
}
.strategy-config-controls .parts-control {
  min-width: 0;
  padding-left: 20px;
  border-left: 1px solid #e6ebe7;
}
.amount-input { position: relative; }
.derived-amount-display {
  min-height: 42px;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  color: #17251e;
}
.derived-amount-display strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 28px;
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.derived-amount-display span {
  flex: 0 0 auto;
  color: #7b8981;
  font-size: 11px;
  font-weight: 800;
}
.strategy-config-controls .allocation-part-input input {
  height: 42px;
  padding-right: 60px;
}
.amount-input input {
  height: 52px;
  padding: 0 70px 0 14px;
  border: 1px solid #ccd8d0;
  border-radius: 12px;
  color: #17251e;
  background: #f8faf7;
  font-size: 18px;
  font-weight: 800;
}
.amount-input input:focus {
  outline: 3px solid #46956d24;
  border-color: #4f9a70;
}
.amount-input span {
  position: absolute;
  right: 14px;
  top: 16px;
  color: #7b8981;
  font-size: 12px;
  font-weight: 800;
}
.save-allocation {
  width: 100%;
  margin-top: 12px;
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  border: 1px solid #234f39;
  border-radius: 11px;
  color: #fff;
  background: #234f39;
}
.save-allocation:hover { background: #173d2c; }
.empty-strategies {
  grid-column: 1 / -1;
  padding: 46px;
  border: 1px dashed #bfcac2;
  border-radius: 18px;
  color: #526159;
  text-align: center;
  background: #ffffff80;
}
.empty-strategies p { margin: 7px 0 0; color: #7a877f; }
.member-notice {
  margin-top: 28px;
  padding: 18px 20px;
  display: flex;
  gap: 13px;
  border: 1px solid #ddd7c8;
  border-radius: 15px;
  color: #5e594c;
  background: #faf7ee;
}
.notice-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #9a8350;
  font-family: Georgia, serif;
  font-weight: 700;
}
.member-notice p { margin: 3px 0 0; color: #7b7465; }
.member-footer {
  width: min(1180px, calc(100% - 48px));
  margin: 26px auto 0;
  padding: 24px 0 34px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #dce4dd;
  color: #839087;
  font-size: 12px;
}
.security-main {
  width: min(900px, calc(100% - 36px));
}
.security-warning {
  margin: 0 0 18px;
  padding: 14px 18px;
  border: 1px solid #d7a44c;
  border-radius: 12px;
  color: #62450f;
  background: #fff5df;
}
.security-warning a {
  color: inherit;
  font-weight: 800;
}
.security-card {
  max-width: 760px;
  margin-inline: auto;
}
.security-card h2 {
  margin-top: 0;
}
.security-form {
  max-width: 520px;
  margin-top: 22px;
  display: grid;
  gap: 14px;
}
.security-form label {
  display: grid;
  gap: 7px;
  color: #30483b;
  font-size: 13px;
  font-weight: 750;
}
.security-form input {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #cbd7cf;
  border-radius: 10px;
  background: #fbfdfb;
}
.security-form input:focus {
  outline: 3px solid #46956d24;
  border-color: #4f9a70;
}
.totp-enrollment {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 210px 1fr;
  align-items: center;
  gap: 24px;
}
.totp-qr {
  width: 210px;
  height: 210px;
  padding: 10px;
  border: 1px solid #dce5df;
  border-radius: 14px;
  background: #fff;
}
.totp-secret {
  display: block;
  max-width: 100%;
  padding: 12px;
  overflow-wrap: anywhere;
  border-radius: 9px;
  background: #eef4f0;
  font-size: 15px;
  letter-spacing: .08em;
}
.security-state {
  padding: 12px 15px;
  border-radius: 10px;
}
.security-state.good {
  color: #1e623f;
  background: #e7f5ec;
}
.danger-zone {
  border-color: #ead0cc;
}
.gate-account-main {
  display: grid;
  gap: 18px;
}
.gate-account-hero {
  min-height: 230px;
}
.gate-effective-state {
  width: min(320px, 100%);
  padding: 22px;
  border: 1px solid #d8e2db;
  border-radius: 18px;
  background: rgba(255, 255, 255, .72);
}
.gate-effective-state span,
.gate-effective-state small {
  display: block;
  color: #718078;
}
.gate-effective-state strong {
  display: block;
  margin: 7px 0 5px;
  color: #163e2d;
  font-size: 25px;
}
.gate-effective-state.state-enabled {
  border-color: #7dcda6;
  background: #e7f8ee;
}
.gate-effective-state.state-close_only {
  border-color: #dfc887;
  background: #fff9e9;
}
.gate-status-grid,
.gate-account-grid,
.gate-danger-grid {
  display: grid;
  gap: 16px;
}
.gate-status-grid {
  grid-template-columns: repeat(3, 1fr);
}
.gate-status-grid article,
.gate-account-card {
  border: 1px solid #dce4dd;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(29, 58, 44, .06);
}
.gate-status-grid article {
  padding: 20px 22px;
}
.gate-status-grid span,
.gate-status-grid small {
  display: block;
  color: #718078;
  font-size: 12px;
}
.gate-status-grid strong {
  display: block;
  margin: 7px 0 4px;
  color: #163e2d;
  font-size: 20px;
}
.gate-account-grid {
  grid-template-columns: 1.18fr .82fr;
}
.gate-account-card {
  padding: 26px;
}
.gate-account-card h2 {
  margin: 6px 0 10px;
  color: #142d22;
}
.gate-account-card > p {
  color: #64736b;
}
.gate-card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}
.gate-status-chip {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.gate-status-chip.good {
  color: #1b6541;
  background: #e3f5ea;
}
.gate-status-chip.bad {
  color: #963d35;
  background: #fbe9e6;
}
.gate-account-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 20px 0;
  border: 1px solid #e3eae5;
  border-radius: 14px;
  overflow: hidden;
}
.gate-account-details div {
  padding: 14px 16px;
  border-bottom: 1px solid #e8eee9;
}
.gate-account-details div:nth-child(odd) {
  border-right: 1px solid #e8eee9;
}
.gate-account-details dt {
  margin-bottom: 5px;
  color: #78867e;
  font-size: 12px;
}
.gate-account-details dd {
  margin: 0;
  color: #253d31;
  font-weight: 750;
}
.gate-inline-warning,
.gate-account-error {
  padding: 13px 15px;
  border: 1px solid #efd298;
  border-radius: 12px;
  color: #73511d;
  background: #fff8e8;
}
.gate-account-error {
  margin: 0;
  border-color: #e8b4ad;
  color: #8b342c;
  background: #fff1ef;
}
.gate-inline-form,
.gate-credential-form,
.gate-control-form {
  display: grid;
  gap: 13px;
}
.gate-inline-form {
  grid-template-columns: 1fr auto;
  align-items: end;
}
.gate-inline-form label,
.gate-credential-form label,
.gate-control-form label {
  display: grid;
  gap: 7px;
  color: #2d4739;
  font-size: 13px;
  font-weight: 750;
}
.gate-inline-form input,
.gate-credential-form input,
.gate-control-form input,
.gate-control-form select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #cad8cf;
  border-radius: 11px;
  color: #142d22;
  background: #fbfdfb;
}
.gate-inline-form button,
.gate-credential-form button,
.gate-control-form button {
  min-height: 45px;
}
.gate-replace-card,
.gate-connect-card {
  margin-top: 0;
}
.gate-danger-grid {
  grid-template-columns: 1fr .75fr;
  align-items: start;
  margin-top: 18px;
}
.gate-revoke-form {
  padding: 18px;
  border: 1px solid #ecd1cd;
  border-radius: 14px;
  background: #fff8f7;
}
.gate-permission-guide {
  margin: 18px 0;
  padding: 16px 18px;
  border-radius: 14px;
  color: #31513f;
  background: #edf6f0;
}
.gate-permission-guide ul {
  margin: 9px 0 0;
  padding-left: 20px;
}
@media (max-width: 920px) {
  .auth-page { padding: 20px; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story { min-height: 360px; padding: 34px; }
  .auth-story-copy h1 { font-size: 45px; }
  .strategy-grid { grid-template-columns: 1fr; }
  .allocation-parts-grid { grid-template-columns: 1fr; }
  .member-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-metrics article:nth-child(3) {
    border-top: 1px solid #dce4dd;
    border-left: 0;
  }
  .member-metrics article:nth-child(4) { border-top: 1px solid #dce4dd; }
  .account-overview-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .account-status-line { justify-content: flex-start; }
  .account-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .account-overview-grid article:nth-child(4) {
    border-top: 1px solid #303934;
    border-left: 0;
  }
  .account-overview-grid article:nth-child(5) {
    border-top: 1px solid #303934;
  }
  .first-execution-stages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .first-execution-stage {
    border-bottom: 1px solid #303934;
  }
  .first-execution-stage:nth-child(odd) { border-left: 0; }
  .first-execution-stage:last-child { border-bottom: 0; }
  .execution-board { grid-template-columns: 1fr; }
  .position-panel { grid-column: auto; }
  .strategy-card h3, .strategy-card p { min-height: auto; }
  .member-hero { align-items: start; flex-direction: column; }
  .allocation-total { width: 100%; }
  .totp-enrollment { grid-template-columns: 1fr; }
  .gate-effective-state { width: 100%; }
  .gate-account-grid,
  .gate-danger-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .auth-page { padding: 0; background: #fff; }
  .auth-shell { min-height: 100vh; border: 0; border-radius: 0; }
  .auth-story { min-height: 310px; padding: 26px 24px; }
  .auth-story-copy h1 { font-size: 38px; }
  .auth-story-copy p { font-size: 14px; }
  .auth-principles { display: none; }
  .auth-card { padding: 38px 24px 46px; }
  .form-pair { grid-template-columns: 1fr; gap: 0; }
  .member-nav-inner, .member-main, .member-footer {
    width: min(100% - 28px, 1180px);
  }
  .member-actions { gap: 8px; }
  .member-name, .environment-pill { display: none; }
  .member-main { padding-top: 24px; }
  .member-hero { min-height: 0; padding: 30px 24px; border-radius: 20px; }
  .hero-copy h1 { font-size: 36px; }
  .member-metrics { grid-template-columns: 1fr; }
  .gate-status-grid { grid-template-columns: 1fr; }
  .gate-account-details { grid-template-columns: 1fr; }
  .gate-account-details div:nth-child(odd) { border-right: 0; }
  .gate-inline-form { grid-template-columns: 1fr; }
  .member-metrics article + article { border-left: 0; border-top: 1px solid #dce4dd; }
  .account-overview-grid { grid-template-columns: 1fr; }
  .account-overview-grid article + article {
    border-top: 1px solid #303934;
    border-left: 0;
  }
  .first-execution-compact summary {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .first-execution-compact summary > span:not(.first-execution-badge),
  .first-execution-compact summary > small {
    display: none;
  }
  .first-execution-acceptance { margin-top: -30px; }
  .first-execution-header,
  .first-execution-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .first-execution-stages { grid-template-columns: 1fr; }
  .first-execution-stage + .first-execution-stage { border-left: 0; }
  .section-heading { align-items: start; flex-direction: column; }
  .section-heading p { text-align: left; }
  .allocation-panel { padding: 22px 18px; }
  .unified-strategy-form { padding: 22px 18px; }
  .strategy-config-controls {
    grid-template-columns: minmax(0, 1fr) 122px;
    gap: 14px;
  }
  .strategy-config-controls .parts-control { padding-left: 14px; }
  .derived-amount-display { gap: 6px; }
  .derived-amount-display strong { font-size: 25px; }
  .derived-amount-display span { font-size: 10px; }
  .allocation-panel-heading,
  .allocation-panel-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .allocation-counter,
  .allocation-save-button { width: 100%; }
  .member-footer { gap: 12px; flex-direction: column; }
}

/* Member portal eye-care theme */
.member-portal {
  color-scheme: dark;
  color: #d7ddd8;
  background:
    radial-gradient(circle at 8% 0, #1b2821 0, transparent 30rem),
    radial-gradient(circle at 96% 12%, #25251d 0, transparent 26rem),
    #101311;
}
.member-portal * {
  scrollbar-color: #526158 #151917;
}
.member-portal .member-nav {
  color: #dfe5e1;
  background: #141816e8;
  border-bottom-color: #2c342f;
}
.member-portal .member-brand strong,
.member-portal .member-name { color: #dfe5e1; }
.member-portal .member-brand small,
.member-portal .text-button { color: #89938d; }
.member-portal .text-button:hover { color: #c8d4cc; }
.member-portal .brand-mark {
  color: #e5eee8;
  background: linear-gradient(145deg, #27312c, #385244);
  box-shadow: 0 8px 24px #0006;
}
.member-portal .admin-return-link {
  border-color: #39463f;
  color: #a9cbb7;
  background: #1d2521;
}
.member-portal .admin-return-link:hover {
  border-color: #5f806d;
  background: #252f29;
}
.member-portal .environment-pill {
  border-color: #353e39;
  color: #aab4ae;
  background: #1b201d;
}
.member-portal .member-toast {
  border-color: #3f6a51;
  color: #a9d0b7;
  background: #1c2c23;
}
.member-portal .member-hero {
  border-color: #35433b;
  background: linear-gradient(105deg, #171c19 0%, #202a24 58%, #2c3d33 100%);
  box-shadow: 0 28px 70px #0007;
}
.member-portal .member-hero::after { background: #8f80502b; }
.member-portal .member-kicker { color: #7ab892; }
.member-portal .hero-copy h1,
.member-portal .allocation-total strong { color: #edf2ee; }
.member-portal .hero-copy p,
.member-portal .allocation-total span,
.member-portal .allocation-total small { color: #a4afa8; }
.member-portal .allocation-total {
  border-color: #ffffff17;
  background: #ffffff08;
}
.member-portal .member-metrics,
.member-portal .execution-panel,
.member-portal .unified-strategy-form,
.member-portal .allocation-panel,
.member-portal .gate-status-grid article,
.member-portal .gate-account-card {
  border-color: #303934;
  background: #191d1b;
  box-shadow: 0 16px 46px #0004;
}
.member-portal .member-metrics article + article {
  border-left-color: #303934;
}
.member-portal .member-metrics span,
.member-portal .member-metrics small,
.member-portal .execution-panel-heading > small,
.member-portal .section-heading p,
.member-portal .allocation-panel-heading p,
.member-portal .allocation-panel-actions p {
  color: #87918b;
}
.member-portal .member-metrics strong,
.member-portal .section-heading h2,
.member-portal .allocation-panel-heading h2,
.member-portal .execution-panel-heading h3 {
  color: #dfe5e1;
}
.member-portal .section-heading .member-kicker,
.member-portal .execution-panel-heading > div > span {
  color: #73a989;
}
.member-portal .execution-panel-heading,
.member-portal .unified-form-actions {
  border-bottom-color: #303934;
  border-top-color: #303934;
}
.member-portal .member-data-table {
  color: #bfc7c1;
}
.member-portal .member-data-table th {
  color: #8f9993;
  background: #202522;
}
.member-portal .member-data-table th,
.member-portal .member-data-table td,
.member-portal .event-feed-row {
  border-bottom-color: #2d3430;
}
.member-portal .member-data-table td { color: #a9b2ac; }
.member-portal .member-data-table td strong,
.member-portal .event-feed-row strong,
.member-portal .execution-empty strong {
  color: #d8dfda;
}
.member-portal .member-data-table time,
.member-portal .event-feed-row small,
.member-portal .event-feed-row time,
.member-portal .execution-empty p {
  color: #818b85;
}
.member-portal .event-kind {
  color: #9ac3aa;
  background: #24352b;
}
.member-portal .member-result {
  border-color: #3a433e;
  color: #aeb7b1;
  background: #252b27;
}
.member-portal .member-result.result-filled {
  border-color: #3d6a50;
  color: #9bc7aa;
  background: #203128;
}
.member-portal .member-result.result-partial,
.member-portal .member-result.result-cancelled,
.member-portal .member-result.result-target-skipped {
  border-color: #6b5937;
  color: #d0b784;
  background: #332d20;
}
.member-portal .member-result.result-rejected {
  border-color: #6c403b;
  color: #d5a09a;
  background: #352422;
}
.member-portal .member-result.result-submitting,
.member-portal .member-result.result-open,
.member-portal .member-result.result-unknown {
  border-color: #3d5965;
  color: #9ab9c7;
  background: #202e34;
}
.member-portal .execution-empty { color: #9da7a1; }
.member-portal .allocation-counter,
.member-portal .allocation-part,
.member-portal .strategy-card {
  border-color: #303934;
  background: #1d211f;
}
.member-portal .allocation-counter span,
.member-portal .allocation-counter small,
.member-portal .strategy-meta,
.member-portal .strategy-card p {
  color: #89938d;
}
.member-portal .allocation-counter strong { color: #c0a878; }
.member-portal .allocation-counter strong.ready { color: #8dbca0; }
.member-portal .allocation-counter strong.invalid { color: #cf938a; }
.member-portal .allocation-part-name,
.member-portal .strategy-card h3 {
  color: #dce2de;
}
.member-portal .strategy-card:hover {
  box-shadow: 0 22px 56px #0006;
}
.member-portal .risk-chip,
.member-portal .parts-control label small {
  color: #c5aa76;
  background: #342e21;
}
.member-portal .theme-dynamic .risk-chip {
  color: #b6a8d0;
  background: #2d2838;
}
.member-portal .theme-balanced .risk-chip {
  color: #91bda2;
  background: #223229;
}
.member-portal .strategy-config-controls,
.member-portal .strategy-config-controls .parts-control {
  border-top-color: #303934;
  border-left-color: #303934;
}
.member-portal .allocation-metric-label,
.member-portal .parts-control label,
.member-portal .security-form label,
.member-portal .gate-inline-form label,
.member-portal .gate-credential-form label,
.member-portal .gate-control-form label {
  color: #aab4ae;
}
.member-portal .allocation-metric-label small {
  color: #7fad8f;
}
.member-portal .amount-input input,
.member-portal .allocation-part-input input,
.member-portal .security-form input,
.member-portal .gate-inline-form input,
.member-portal .gate-credential-form input,
.member-portal .gate-control-form input,
.member-portal .gate-control-form select {
  border-color: #3a443e;
  color: #dbe2dd;
  background: #121614;
}
.member-portal .derived-amount-display { color: #e4e9e6; }
.member-portal .derived-amount-display span {
  color: #828d86;
}
.member-portal input:focus,
.member-portal select:focus {
  outline-color: #5b8e702e;
  border-color: #608a70;
}
.member-portal .amount-input span,
.member-portal .allocation-part-input span {
  color: #828d86;
}
.member-portal button,
.member-portal .save-allocation {
  border-color: #5a876b;
  color: #0e1511;
  background: #76ad88;
}
.member-portal button:hover,
.member-portal .save-allocation:hover {
  background: #86ba97;
}
.member-portal button.danger {
  border-color: #70433e;
  color: #e3c2bd;
  background: #432824;
}
.member-portal .allocation-save-button:disabled {
  border-color: #343b37;
  color: #737d77;
  background: #242926;
}
.member-portal .empty-strategies {
  border-color: #3b443f;
  color: #a4aea8;
  background: #191d1b;
}
.member-portal .empty-strategies p { color: #838d87; }
.member-portal .member-notice {
  border-color: #4a4535;
  color: #c4b99c;
  background: #242219;
}
.member-portal .notice-icon {
  color: #171712;
  background: #aa9863;
}
.member-portal .member-notice p { color: #9e957e; }
.member-portal .member-footer {
  border-top-color: #2d3530;
  color: #737d77;
}
.member-portal .gate-effective-state {
  border-color: #3a433e;
  background: #1d2320b8;
}
.member-portal .gate-effective-state span,
.member-portal .gate-effective-state small,
.member-portal .gate-status-grid span,
.member-portal .gate-status-grid small,
.member-portal .gate-account-details dt,
.member-portal .gate-account-card > p {
  color: #89938d;
}
.member-portal .gate-effective-state strong,
.member-portal .gate-status-grid strong,
.member-portal .gate-account-card h2,
.member-portal .gate-account-details dd {
  color: #dce3de;
}
.member-portal .gate-effective-state.state-enabled {
  border-color: #3e6e52;
  background: #1f3027;
}
.member-portal .gate-effective-state.state-close_only {
  border-color: #6d5b35;
  background: #302b1f;
}
.member-portal .gate-status-chip.good {
  color: #9bc7aa;
  background: #203329;
}
.member-portal .gate-status-chip.bad {
  color: #d39a93;
  background: #352421;
}
.member-portal .gate-account-details,
.member-portal .gate-account-details div,
.member-portal .gate-account-details div:nth-child(odd) {
  border-color: #303934;
}
.member-portal .gate-inline-warning {
  border-color: #655536;
  color: #c8b17d;
  background: #2d291e;
}
.member-portal .gate-account-error {
  border-color: #6d403a;
  color: #d49a93;
  background: #352321;
}
.member-portal .gate-revoke-form {
  border-color: #573936;
  background: #261d1c;
}
.member-portal .gate-permission-guide {
  color: #adc4b5;
  background: #202b25;
}
.member-portal code { color: #9cc8ad; }
.member-portal .totp-qr {
  border-color: #3b443f;
  background: #e5e8e5;
}
.member-portal .totp-secret {
  color: #b7c9bd;
  background: #202722;
}
@media (max-width: 920px) {
  .member-portal .member-metrics article:nth-child(3),
  .member-portal .member-metrics article:nth-child(4) {
    border-top-color: #303934;
  }
}
@media (max-width: 680px) {
  .member-portal .member-metrics article + article {
    border-top-color: #303934;
  }
}

/* Public and administrator access eye-care theme */
.auth-page {
  color-scheme: dark;
  color: #d7ddd8;
  background:
    radial-gradient(circle at 5% 5%, #1b2821 0, transparent 28rem),
    radial-gradient(circle at 95% 90%, #28251c 0, transparent 25rem),
    #101311;
}
.auth-shell {
  border-color: #303934;
  background: #191d1b;
  box-shadow: 0 32px 90px #0008;
}
.auth-story {
  background:
    radial-gradient(circle at 82% 16%, #3f5b48 0, transparent 17rem),
    linear-gradient(145deg, #151a17 0%, #202b25 68%, #2e4035 100%);
}
.register-story {
  background:
    radial-gradient(circle at 82% 16%, #4c465c 0, transparent 17rem),
    linear-gradient(145deg, #171b19 0%, #292f2a 63%, #444136 100%);
}
.admin-auth-story {
  background:
    radial-gradient(circle at 82% 16%, #523f39 0, transparent 17rem),
    linear-gradient(145deg, #151816 0%, #252c28 62%, #443832 100%);
}
.auth-card {
  color: #d7ddd8;
  background: #191d1b;
}
.auth-card-heading > span { color: #75a98a; }
.auth-card-heading h2,
.application-result h3 { color: #e0e6e2; }
.auth-card-heading p,
.auth-footnote,
.application-result p { color: #87918b; }
.auth-card label { color: #aab4ae; }
.auth-card input {
  border-color: #3a443e;
  color: #dbe2dd;
  background: #121614;
}
.auth-card input:focus {
  outline-color: #5b8e702e;
  border-color: #608a70;
}
.auth-submit {
  border-color: #5a876b;
  color: #0e1511;
  background: #76ad88;
}
.auth-submit:hover { background: #86ba97; }
.auth-divider { color: #7d8781; }
.auth-divider::before,
.auth-divider::after { background: #303934; }
.auth-secondary {
  border-color: #3b4840;
  color: #a8cbb6;
  background: #1d2420;
}
.auth-secondary:hover {
  border-color: #5e806c;
  background: #242d28;
}
.auth-footnote a { color: #8ab89c; }
.auth-card .alert {
  border-color: #69413c;
  border-left-color: #b65f55;
  color: #d3a09a;
  background: #352422;
}
.auth-error strong { color: #ddb0aa; }
.auth-error span { color: #c98f88; }
.field-hint { color: #818b85; }
.application-result > span {
  color: #101512;
  background: #76ad88;
}
.application-result.closed > span { background: #aa9863; }
@media (max-width: 680px) {
  .auth-page { background: #101311; }
  .auth-shell { border-color: #303934; }
}

/* Per-strategy operation center */
.strategy-management-section {
  margin-bottom: 50px;
}
.strategy-management-heading {
  align-items: center;
}
.compact-heading {
  margin-bottom: 13px;
}
.compact-heading h2 {
  font-size: 27px;
}
.strategy-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 13px;
}
.member-portal .strategy-selector-tab {
  min-width: 0;
  min-height: 104px;
  padding: 15px;
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr);
  align-items: stretch;
  gap: 13px;
  border: 1px solid #303934;
  border-radius: 14px;
  color: #a8b1ab;
  background: #171b19;
  box-shadow: none;
  text-align: left;
}
.member-portal .strategy-selector-tab:hover {
  border-color: #46534c;
  color: #dce3de;
  background: #1d221f;
}
.member-portal .strategy-selector-tab.active {
  border-color: #5a7867;
  color: #e7ece8;
  background: #222a25;
  box-shadow: inset 0 0 0 1px #6b89772b, 0 12px 30px #0004;
}
.strategy-selector-accent {
  align-self: stretch;
  border-radius: 999px;
  background: #bd9145;
}
.theme-dynamic .strategy-selector-accent { background: #9173ca; }
.theme-balanced .strategy-selector-accent { background: #58a478; }
.strategy-selector-content {
  min-width: 0;
}
.strategy-selector-heading {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.strategy-selector-heading > span { min-width: 0; }
.strategy-selector-heading small,
.strategy-selector-heading strong {
  display: block;
}
.strategy-selector-heading small {
  margin-bottom: 5px;
  color: #78837c;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
}
.strategy-selector-heading strong {
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.strategy-selector-heading em {
  flex: none;
  padding: 4px 7px;
  border: 1px solid #46504a;
  border-radius: 999px;
  color: #919b95;
  background: #222724;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}
.strategy-selector-heading em.state-active,
.strategy-selector-heading em.state-ready {
  border-color: #3d6a50;
  color: #9bc7aa;
  background: #203128;
}
.strategy-selector-heading em.state-attention {
  border-color: #76443d;
  color: #d69a91;
  background: #35231f;
}
.strategy-selector-metrics {
  margin-top: 12px;
  display: block;
}
.strategy-selector-metrics > span { min-width: 0; }
.strategy-selector-metrics small,
.strategy-selector-metrics strong {
  display: block;
}
.strategy-selector-metrics small {
  color: #707a74;
  font-size: 9px;
  font-weight: 700;
}
.strategy-selector-metrics strong {
  margin-top: 2px;
  overflow: hidden;
  color: #cbd3ce;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.strategy-detail-card {
  overflow: hidden;
  border: 1px solid #303934;
  border-radius: 20px;
  background: #191d1b;
  box-shadow: 0 18px 52px #0005;
}
.strategy-detail-card[hidden],
.strategy-record-panel[hidden] {
  display: none;
}
.strategy-detail-header {
  padding: 18px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #303934;
  background:
    linear-gradient(100deg, #ffffff03, transparent 50%),
    #1b201d;
}
.strategy-detail-header h3 {
  margin: 3px 0 0;
  color: #dce3de;
  font-size: 18px;
}
.strategy-detail-title {
  display: flex;
  align-items: center;
  gap: 14px;
}
.strategy-detail-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid #6c5937;
  border-radius: 10px;
  color: #d2b778;
  background: #302a20;
  font-size: 14px;
  font-weight: 900;
}
.strategy-detail-card.theme-dynamic .strategy-detail-mark {
  border-color: #594b74;
  color: #b9a6dd;
  background: #2a2533;
}
.strategy-detail-card.theme-balanced .strategy-detail-mark {
  border-color: #3f6a50;
  color: #94c4a7;
  background: #213128;
}
.strategy-detail-title .member-kicker {
  margin-bottom: 4px;
}
.strategy-detail-title h3 {
  margin: 0;
  color: #e4e9e6;
  font-size: clamp(20px, 3vw, 27px);
  letter-spacing: -.025em;
}
.strategy-detail-tags {
  margin: 14px 0 0 52px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.strategy-detail-tags span {
  padding: 5px 9px;
  border: 1px solid #38423c;
  border-radius: 999px;
  color: #919b95;
  background: #222724;
  font-size: 10px;
  font-weight: 750;
}
.strategy-account-link {
  color: #92b9a1;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.strategy-account-link:hover { color: #b3d0be; }
.strategy-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.strategy-detail-actions a {
  padding: 7px 11px;
  border: 1px solid #46534c;
  border-radius: 7px;
  color: #aec4b6;
  background: #252c28;
  font-size: 11px;
  font-weight: 800;
}
.strategy-detail-actions a:first-child {
  border-color: #806b2f;
  color: #17170e;
  background: #d5b24c;
}
.strategy-detail-actions a:hover { filter: brightness(1.08); }
.strategy-detail-tags span.state-active,
.strategy-detail-tags span.state-ready {
  border-color: #3d6a50;
  color: #9bc7aa;
  background: #203128;
}
.strategy-detail-tags span.state-attention {
  border-color: #76443d;
  color: #d69a91;
  background: #35231f;
}
.strategy-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #303934;
}
.strategy-kpi-grid > div {
  min-width: 0;
  padding: 16px 22px;
  border-bottom: 1px solid #303934;
}
.strategy-kpi-grid > div + div { border-left: 1px solid #303934; }
.strategy-kpi-grid > div:nth-child(5) { border-left: 0; }
.strategy-kpi-grid > div:nth-child(n + 5) { border-bottom: 0; }
.strategy-kpi-grid span,
.strategy-kpi-grid small {
  display: block;
  overflow: hidden;
  color: #7f8a83;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.strategy-kpi-grid strong {
  display: inline-block;
  max-width: 100%;
  margin: 5px 4px 2px 0;
  overflow: hidden;
  color: #dce3de;
  font-size: 20px;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.strategy-kpi-grid .value-positive { color: #72c993; }
.strategy-kpi-grid .value-negative { color: #da8d83; }
.strategy-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #303934;
}
.strategy-overview-grid > div {
  min-width: 0;
  padding: 20px 26px;
}
.strategy-overview-grid > div + div {
  border-left: 1px solid #303934;
}
.strategy-overview-grid span,
.strategy-overview-grid small {
  display: block;
  color: #7f8a83;
  font-size: 11px;
}
.strategy-overview-grid strong {
  display: inline-block;
  margin: 6px 5px 3px 0;
  color: #dce3de;
  font-size: 23px;
  letter-spacing: -.025em;
}
.strategy-record-tabs {
  overflow-x: auto;
  padding: 0 18px;
  display: flex;
  gap: 5px;
  border-bottom: 1px solid #303934;
  background: #171b19;
  scrollbar-width: thin;
}
.member-portal .strategy-record-tabs button {
  width: auto;
  min-width: max-content;
  min-height: 54px;
  padding: 0 12px;
  position: relative;
  border: 0;
  border-radius: 0;
  color: #818b85;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
}
.member-portal .strategy-record-tabs button:hover {
  color: #c4cec7;
  background: transparent;
}
.member-portal .strategy-record-tabs button.active {
  color: #dce5df;
  background: transparent;
}
.member-portal .strategy-record-tabs button.active::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #72ad87;
}
.strategy-record-tabs button span {
  margin-left: 5px;
  color: #6f7a73;
  font-size: 10px;
}
.strategy-record-tabs button.active span { color: #9ab7a5; }
.member-portal .strategy-record-tabs button.record-tab-alert,
.member-portal .strategy-record-tabs button.record-tab-alert span {
  color: #df9b82;
}
.member-portal .strategy-record-tabs button.record-tab-alert.active::after {
  background: #c96f53;
}
.strategy-record-panel {
  min-height: 248px;
}
.strategy-table-wrap {
  max-height: 420px;
}
.strategy-data-table {
  min-width: 1160px;
}
.strategy-record-panel[data-record-panel="current"] .strategy-data-table {
  min-width: 1320px;
}
.strategy-position-table th,
.strategy-position-table td {
  vertical-align: middle;
  white-space: nowrap;
}
.strategy-position-table th:first-child,
.strategy-position-table td:first-child {
  min-width: 128px;
}
.strategy-position-table th:nth-child(2),
.strategy-position-table td:nth-child(2),
.strategy-position-table th:nth-child(4),
.strategy-position-table td:nth-child(4),
.strategy-position-table th:nth-child(8),
.strategy-position-table td:nth-child(8) {
  min-width: 150px;
}
.strategy-position-table th:last-child,
.strategy-position-table td:last-child {
  min-width: 235px;
}
.strategy-position-table td strong {
  display: block;
  font-size: 13px;
  font-weight: 850;
}
.strategy-data-table td small {
  display: block;
  margin-top: 3px;
  color: #737d77;
  font-size: 10px;
}
.strategy-failure-table {
  min-width: 1680px;
}
.strategy-failure-reason {
  max-width: 360px;
  white-space: normal;
  line-height: 1.55;
}
.failure-recovery {
  display: inline-flex;
  min-height: 25px;
  padding: 4px 8px;
  align-items: center;
  border: 1px solid #465048;
  border-radius: 999px;
  color: #aab3ad;
  background: #242925;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.failure-recovery.state-resolved {
  border-color: #35664a;
  color: #8fd1a7;
  background: #1b3425;
}
.failure-recovery.state-checking {
  border-color: #806b38;
  color: #e4c176;
  background: #332c1c;
}
.failure-recovery.state-unresolved {
  border-color: #78483a;
  color: #e3a18b;
  background: #35231e;
}
.strategy-record-empty {
  min-height: 248px;
  padding: 50px 24px;
  display: grid;
  place-content: center;
  text-align: center;
}
.strategy-record-empty strong {
  color: #d6ddd8;
  font-size: 15px;
}
.strategy-record-empty p {
  max-width: 560px;
  margin: 8px auto 0;
  color: #7e8882;
  font-size: 12px;
}
.strategy-execution-state {
  display: inline-flex;
  min-height: 26px;
  padding: 4px 8px;
  align-items: center;
  border: 1px solid #3b443f;
  border-radius: 999px;
  color: #aab3ad;
  background: #252b27;
  font-size: 10px;
  font-weight: 800;
}
.strategy-execution-state.state-ready {
  border-color: #3d6a50;
  color: #9bc7aa;
  background: #203128;
}
.strategy-execution-state.state-waiting {
  border-color: #6b5937;
  color: #d0b784;
  background: #332d20;
}
.strategy-execution-state.state-skipped {
  border-color: #5a4441;
  color: #c39b95;
  background: #302422;
}
.strategy-execution-state.state-observed {
  border-color: #4b5966;
  color: #a7bac9;
  background: #222b32;
}
.member-portal .member-data-table .value-positive { color: #7fc49a; }
.member-portal .member-data-table .value-negative { color: #d48f87; }

.service-monitor {
  position: relative;
  overflow: hidden;
  padding: 0;
  border-color: #35433d;
}
.service-monitor.monitor-critical {
  border-color: #8b3d36;
  box-shadow: 0 0 0 1px #ff705f22, 0 18px 70px #0008;
}
.service-monitor.monitor-warning { border-color: #78623b; }
.service-monitor-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #15221d, #111714);
}
.service-monitor-head h2 { font-size: 28px; }
.service-monitor-head .muted {
  max-width: 760px;
  margin: 8px 0 0;
}
.service-monitor-head-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.monitor-notification-button {
  min-width: 148px;
  white-space: nowrap;
}
.monitor-overall {
  display: inline-flex;
  min-height: 40px;
  padding: 9px 13px;
  align-items: center;
  border: 1px solid #43534b;
  border-radius: 10px;
  background: #1b2420;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}
.monitor-overall-critical {
  border-color: #a3473f;
  color: #ff9a8f;
  background: #321b18;
}
.monitor-overall-warning {
  border-color: #806a3c;
  color: #e3c379;
  background: #2d281b;
}
.monitor-overall-healthy {
  border-color: #3a7053;
  color: #8be5b2;
  background: #172c21;
}
.monitor-fetch-error {
  margin: 16px 22px 0;
  padding: 13px 15px;
  border: 1px solid #b94f45;
  border-radius: 10px;
  color: #ffb0a7;
  background: #351b18;
  font-weight: 800;
}
.monitor-refresh-failed { border-color: #d15247; }
.monitor-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr)) minmax(240px, 1.8fr);
  border-bottom: 1px solid var(--line);
}
.monitor-stat {
  min-width: 0;
  padding: 16px 18px;
}
.monitor-stat + .monitor-stat { border-left: 1px solid var(--line); }
.monitor-stat span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}
.monitor-stat strong {
  display: block;
  overflow: hidden;
  color: #dfe9e3;
  font-size: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.monitor-stat.critical strong { color: #ff8c80; }
.monitor-stat.warning strong { color: #dabc73; }
.monitor-stat.healthy strong { color: #75dca1; }
.monitor-stat.inactive strong { color: #8e9a94; }
.monitor-stat.updated strong { font-size: 13px; }
.monitor-alert-stack {
  max-height: 380px;
  padding: 18px 22px;
  overflow-y: auto;
  border-bottom: 1px solid var(--line);
  background: #0d1310;
}
.monitor-alert {
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr);
  gap: 13px;
  padding: 13px 14px;
  border: 1px solid #3b4641;
  border-radius: 11px;
  background: #151c18;
}
.monitor-alert + .monitor-alert { margin-top: 9px; }
.monitor-alert-marker {
  width: 5px;
  min-height: 100%;
  border-radius: 999px;
  background: #d3ad64;
}
.monitor-alert-critical {
  border-color: #763832;
  background: #211512;
}
.monitor-alert-critical .monitor-alert-marker { background: #ff705f; }
.monitor-alert-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.monitor-alert-title span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.monitor-alert p {
  margin: 5px 0;
  color: #ced9d3;
}
.monitor-alert small { color: #9eb0a6; }
.monitor-clear-state {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  color: #8fd8ac;
  background: #102218;
}
.monitor-groups { padding: 16px 22px 20px; }
.monitor-group {
  border: 1px solid #2e3b35;
  border-radius: 11px;
  background: #0f1512;
}
.monitor-group + .monitor-group { margin-top: 10px; }
.monitor-group > summary,
.monitor-login-audit > summary {
  display: flex;
  padding: 13px 15px;
  justify-content: space-between;
  gap: 20px;
  color: #dfe8e3;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}
.monitor-group > summary::-webkit-details-marker,
.monitor-login-audit > summary::-webkit-details-marker { display: none; }
.monitor-group > summary span:last-child,
.monitor-login-audit > summary span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.monitor-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}
.monitor-check {
  min-width: 0;
  padding: 13px;
  border: 1px solid #304039;
  border-radius: 9px;
  background: #151c18;
}
.monitor-check-critical {
  border-color: #773c35;
  background: #211614;
}
.monitor-check-warning {
  border-color: #685832;
  background: #201e15;
}
.monitor-check-inactive { opacity: .72; }
.monitor-check-heading {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.monitor-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7ce0a7;
  box-shadow: 0 0 0 4px #75e0a713;
}
.monitor-check-warning .monitor-status-dot {
  background: #ddb763;
  box-shadow: 0 0 0 4px #ddb76313;
}
.monitor-check-critical .monitor-status-dot {
  background: #ff705f;
  box-shadow: 0 0 0 4px #ff705f18;
}
.monitor-check-inactive .monitor-status-dot {
  background: #6f7b75;
  box-shadow: none;
}
.monitor-check-state {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.monitor-check-summary {
  margin: 10px 0 5px;
  color: #e8f0ec;
  font-weight: 800;
}
.monitor-check p:not(.monitor-check-summary) {
  margin: 0 0 5px;
  color: #aebbb4;
  font-size: 13px;
}
.monitor-check small { color: #7e8c85; }
.monitor-check .monitor-check-action {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid #3c443f;
  color: #d1b477;
}
.monitor-login-audit {
  margin: 0 22px 22px;
  border: 1px solid #2e3b35;
  border-radius: 11px;
  overflow: hidden;
}
.monitor-login-table { max-height: 320px; }
.plain-status.critical { color: #ff8c80; }
.plain-status.healthy { color: #78d99e; }
.monitor-page {
  min-height: 100vh;
  background: #0b100d;
}
.monitor-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 24px 28px 14px;
}
.monitor-page-header h1 { margin: 3px 0 5px; }
.monitor-page-header form {
  display: flex;
  align-items: center;
  gap: 14px;
}
.monitor-page-main {
  max-width: 1500px;
  margin: 0 auto;
  padding: 14px 28px 36px;
}

@media (max-width: 980px) {
  .monitor-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .monitor-stat.updated { grid-column: span 2; }
  .monitor-stat:nth-child(3) { border-left: 0; }
  .monitor-stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .monitor-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strategy-selector {
    grid-template-columns: 1fr;
  }
  .strategy-selector-tab strong {
    white-space: normal;
  }
  .strategy-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .strategy-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .strategy-kpi-grid > div {
    border-bottom: 1px solid #303934;
  }
  .strategy-kpi-grid > div:nth-child(odd) { border-left: 0; }
  .strategy-kpi-grid > div:nth-child(n + 7) { border-bottom: 0; }
  .strategy-overview-grid > div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid #303934;
  }
  .strategy-overview-grid > div:nth-child(4) {
    border-top: 1px solid #303934;
  }
}
@media (max-width: 680px) {
  .monitor-page-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px 16px 8px;
  }
  .monitor-page-main { padding: 12px 16px 24px; }
  .service-monitor-head,
  .service-monitor-head-actions,
  .monitor-alert-title {
    align-items: stretch;
    flex-direction: column;
  }
  .service-monitor-head-actions { display: flex; }
  .monitor-summary { grid-template-columns: 1fr 1fr; }
  .monitor-stat.updated { grid-column: span 2; }
  .monitor-check-grid { grid-template-columns: 1fr; }
  .strategy-management-heading,
  .strategy-detail-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .strategy-management-heading p {
    max-width: none;
    text-align: left;
  }
  .strategy-selector-tab {
    grid-template-columns: 4px minmax(0, 1fr);
  }
  .strategy-detail-header {
    padding: 20px;
  }
  .strategy-detail-tags {
    margin-left: 0;
  }
  .strategy-overview-grid {
    grid-template-columns: 1fr;
  }
  .strategy-kpi-grid { grid-template-columns: 1fr; }
  .strategy-kpi-grid > div + div {
    border-left: 0;
    border-top: 0;
  }
  .strategy-kpi-grid > div { border-bottom: 1px solid #303934; }
  .strategy-kpi-grid > div:last-child { border-bottom: 0; }
  .strategy-detail-actions {
    width: 100%;
  }
  .strategy-detail-actions a {
    flex: 1;
    text-align: center;
  }
  .strategy-overview-grid > div + div {
    border-left: 0;
    border-top: 1px solid #303934;
  }
  .strategy-overview-grid > div {
    padding: 16px 20px;
  }
}
