:root {
  --workspace-canvas: #eef3f7;
  --workspace-surface: #ffffff;
  --workspace-surface-soft: #f7fafc;
  --workspace-line: #d7e0e8;
  --workspace-line-strong: #bcc9d5;
  --workspace-ink: #0d1b2a;
  --workspace-muted: #64748b;
  --workspace-accent: #0f766e;
  --workspace-accent-bright: #2dd4bf;
  --workspace-warn: #c47a13;
  --workspace-danger: #dc2626;
  --workspace-profit: #e12d27;
  --workspace-loss: #2563eb;
  --workspace-shadow: 0 10px 28px rgba(15, 35, 55, 0.07);
}

body {
  background: var(--workspace-canvas);
  color: var(--workspace-ink);
}

.content {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(238, 243, 247, 0) 260px),
    var(--workspace-canvas);
}

.topbar {
  border-bottom-color: var(--workspace-line-strong);
}

.topbar > div:first-child > h1 {
  color: var(--workspace-ink);
  font-size: clamp(27px, 2vw, 34px);
}

.panel {
  border-color: var(--workspace-line);
  background: var(--workspace-surface);
  box-shadow: var(--workspace-shadow);
}

.panel-head {
  align-items: flex-start;
  gap: 18px;
}

.panel-head h2 {
  color: var(--workspace-ink);
  font-size: 19px;
}

.workspace-kicker,
.panel .eyebrow {
  color: var(--workspace-accent);
}

button,
.secondary,
select,
input {
  border-radius: 5px;
}

.dashboard-secondary-disclosure {
  margin-top: 18px;
  border: 1px solid var(--workspace-line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 7px 20px rgba(15, 35, 55, 0.045);
}

.dashboard-secondary-disclosure > summary {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  cursor: pointer;
  list-style: none;
}

.dashboard-secondary-disclosure > summary::-webkit-details-marker {
  display: none;
}

.dashboard-secondary-disclosure > summary::after {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--workspace-line-strong);
  border-radius: 50%;
  color: var(--workspace-accent);
  content: "+";
  font-size: 18px;
  font-weight: 800;
}

.dashboard-secondary-disclosure[open] > summary::after {
  content: "−";
}

.dashboard-secondary-disclosure > summary > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dashboard-secondary-disclosure > summary span {
  color: var(--workspace-accent);
  font-size: 11px;
  font-weight: 900;
}

.dashboard-secondary-disclosure > summary strong {
  font-size: 16px;
}

.dashboard-secondary-disclosure > summary small {
  margin-left: auto;
  color: var(--workspace-muted);
}

.dashboard-secondary-content {
  display: grid;
  gap: 16px;
  padding: 0 16px 16px;
  border-top: 1px solid var(--workspace-line);
}

.dashboard-secondary-content > .panel:first-child {
  margin-top: 16px;
}

.dashboard-secondary-content .panel {
  margin-bottom: 0;
  box-shadow: none;
}

.today-trust-gate {
  min-height: 0;
}

.today-trust-gate:not(:empty) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 12px 0 4px;
  padding: 13px 15px;
  border: 1px solid var(--workspace-line);
  border-left: 3px solid var(--workspace-accent);
  border-radius: 5px;
  background: var(--workspace-surface-soft);
}

.today-trust-gate.warn {
  border-left-color: var(--workspace-warn);
}

.today-trust-gate.danger {
  border-left-color: var(--workspace-danger);
}

.today-trust-gate > span {
  color: var(--workspace-muted);
  font-size: 11px;
  font-weight: 900;
}

.today-trust-gate > strong {
  font-size: 14px;
}

.today-trust-gate > small {
  color: var(--workspace-muted);
  text-align: right;
}

.market-data-basis-row {
  gap: 6px !important;
  padding: 6px 0 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.market-data-basis-row span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid var(--workspace-line);
  border-radius: 4px;
  background: var(--workspace-surface-soft);
  color: var(--workspace-muted);
}

.market-data-basis-row span b {
  margin: 0;
  color: #475569;
  font-size: 10px;
}

.market-data-basis-row span em {
  color: var(--workspace-accent);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.market-data-basis-row span small {
  color: #8593a6;
  font-size: 9px;
}

.market-data-basis-row span.stale {
  border-color: #efd4aa;
  background: #fffaf2;
}

.market-data-basis-row span.stale em {
  color: var(--workspace-warn);
}

.admin-console-home {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-console-home.hidden {
  display: none;
}

.admin-console-home > .admin-page-intro { order: 1; }
.admin-console-home > .admin-user-panel { order: 2; }
.admin-console-home > .signup-approval-panel { order: 3; }
.admin-console-home > .admin-api-panel { order: 4; }
.admin-console-home > .admin-operations-panel { order: 5; }
.admin-console-home > .market-calendar-panel { order: 6; }

.admin-console-home > .panel,
.admin-console-page > .panel {
  margin-bottom: 0;
}

.admin-operations-issues:has(.admin-operations-attention-list) {
  border-color: #efd4aa;
  background: #fffaf2;
}

.admin-operations-issues:not(:has(.admin-operations-attention-list)) {
  padding: 13px 15px;
  border: 1px solid #b9e1d4;
  background: #f2fbf7;
}

.admin-automatic-audit {
  margin-top: 14px;
  border: 1px solid var(--workspace-line);
  background: #f8fafc;
}

.admin-automatic-audit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--workspace-line);
  background: #fff;
}

.admin-automatic-audit-head span {
  color: var(--workspace-teal);
  font-size: 10px;
  font-weight: 800;
}

.admin-automatic-audit-head h3 {
  margin: 3px 0 0;
  font-size: 17px;
}

.admin-automatic-audit-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.admin-automatic-audit-list article {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 0 10px;
  min-height: 112px;
  padding: 15px;
  border-right: 1px solid var(--workspace-line);
}

.admin-automatic-audit-list article:last-child {
  border-right: 0;
}

.admin-audit-status {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: #15936f;
  box-shadow: 0 0 0 4px #dff6ed;
}

.admin-automatic-audit-list article.warn .admin-audit-status {
  background: #c77a12;
  box-shadow: 0 0 0 4px #fff0d6;
}

.admin-automatic-audit-list article.danger .admin-audit-status {
  background: #d33a32;
  box-shadow: 0 0 0 4px #fde4e1;
}

.admin-automatic-audit-list article div {
  min-width: 0;
}

.admin-automatic-audit-list article strong,
.admin-automatic-audit-list article small,
.admin-automatic-audit-list article b {
  display: block;
}

.admin-automatic-audit-list article strong {
  font-size: 13px;
}

.admin-automatic-audit-list article small {
  margin-top: 6px;
  color: var(--workspace-muted);
  font-size: 11px;
  line-height: 1.45;
}

.admin-automatic-audit-list article b {
  grid-column: 2;
  margin-top: 12px;
  font-size: 15px;
}

@media (max-width: 1180px) and (min-width: 761px) {
  .admin-automatic-audit-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-automatic-audit-list article {
    border-bottom: 1px solid var(--workspace-line);
  }

  .admin-automatic-audit-list article:nth-child(2n) {
    border-right: 0;
  }
}

.news-admin-action {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #e4b7b2;
  background: #fff7f6;
  color: #b42318;
  font-size: 11px;
}

.news-event-admin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--workspace-line);
}

.news-event-admin-actions small {
  color: var(--workspace-muted);
  font-size: 10px;
}

@media (max-width: 760px) {
  .content {
    background: var(--workspace-canvas);
  }

  .dashboard-secondary-disclosure > summary {
    align-items: flex-start;
    min-height: 0;
    padding: 14px;
  }

  .dashboard-secondary-disclosure > summary small {
    display: none;
  }

  .dashboard-secondary-content {
    padding: 0 10px 10px;
  }

  .today-trust-gate:not(:empty) {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .today-trust-gate > small {
    text-align: left;
  }

  .admin-automatic-audit-head {
    align-items: flex-start;
  }

  .admin-automatic-audit-list {
    grid-template-columns: 1fr;
  }

  .admin-automatic-audit-list article {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--workspace-line);
  }

  .admin-automatic-audit-list article:last-child {
    border-bottom: 0;
  }
}
