:root {
  color-scheme: light;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --radius: 8px;
  --radius-sm: 6px;
  --sidebar-width: 272px;
  --topbar-height: 78px;
  --shadow-sm: 0 1px 2px rgba(20, 31, 47, .08);
  --shadow-md: 0 12px 32px rgba(20, 31, 47, .12);
  --shadow-lg: 0 24px 80px rgba(20, 31, 47, .18);
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f9fafc;
  --sidebar: #253041;
  --sidebar-2: #1d2634;
  --text: #152033;
  --muted: #637083;
  --border: #dde3ed;
  --brand: #2d6cdf;
  --brand-2: #144fb8;
  --accent: #f2b705;
  --accent-2: #d99c00;
  --success: #1f9d7a;
  --danger: #d94848;
  --orange: #e56f2f;
  --neutral: #697386;
  --info: #2b78d4;
  --gold-soft: #fff4ca;
  --green-soft: #ddf6ed;
  --red-soft: #fde4e4;
  --orange-soft: #ffe8d8;
  --blue-soft: #e3efff;
  --neutral-soft: #eef1f5;
}

body[data-scheme="gold-graphite"] {
  --sidebar: #253041;
  --sidebar-2: #1d2634;
  --brand: #2d6cdf;
  --brand-2: #164fae;
  --accent: #f2b705;
  --accent-2: #d99c00;
  --success: #1f9d7a;
  --danger: #d94848;
  --orange: #e56f2f;
}

body[data-scheme="aurora-teal"] {
  --sidebar: #183c3d;
  --sidebar-2: #102b2d;
  --brand: #0f766e;
  --brand-2: #075f5a;
  --accent: #f1b91f;
  --accent-2: #cf9700;
  --success: #2b9c67;
  --danger: #d85f53;
  --orange: #e78132;
  --info: #3867d6;
}

body[data-scheme="cobalt-citrus"] {
  --sidebar: #203762;
  --sidebar-2: #172946;
  --brand: #2357c6;
  --brand-2: #173f96;
  --accent: #f5bd1f;
  --accent-2: #d39c00;
  --success: #2c9f67;
  --danger: #d94862;
  --orange: #e67f34;
  --info: #2884b8;
}

body[data-scheme="plum-saffron"] {
  --sidebar: #34284d;
  --sidebar-2: #261d3a;
  --brand: #6f3cc3;
  --brand-2: #5426a4;
  --accent: #efb21a;
  --accent-2: #c98e00;
  --success: #1b9aaa;
  --danger: #da5c53;
  --orange: #e28630;
  --info: #3867d6;
}

body[data-scheme="ruby-sage"] {
  --sidebar: #463034;
  --sidebar-2: #332328;
  --brand: #a23e48;
  --brand-2: #7b2c35;
  --accent: #f1b51c;
  --accent-2: #ca9300;
  --success: #4d8f63;
  --danger: #c73f4a;
  --orange: #df7a2f;
  --info: #2f6f9f;
}

body[data-mode="dark"] {
  color-scheme: dark;
  --bg: #111722;
  --surface: #182232;
  --surface-2: #202c3d;
  --text: #eef3fb;
  --muted: #a8b4c7;
  --border: #304055;
  --gold-soft: rgba(242, 183, 5, .2);
  --green-soft: rgba(31, 157, 122, .2);
  --red-soft: rgba(217, 72, 72, .2);
  --orange-soft: rgba(229, 111, 47, .2);
  --blue-soft: rgba(45, 108, 223, .2);
  --neutral-soft: rgba(105, 115, 134, .24);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% -10%, rgba(242, 183, 5, .15), transparent 26rem),
    linear-gradient(180deg, var(--surface-2), var(--bg));
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .62;
}

a {
  color: var(--brand);
  text-decoration: none;
}

code,
pre {
  font-family: var(--font-mono);
}

code {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 16px;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  color: #fff;
  overflow-y: auto;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), #ffe08a);
  color: #1d2634;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup strong {
  line-height: 1.1;
  font-size: 16px;
}

.brand-lockup small {
  margin-top: 3px;
  color: rgba(255, 255, 255, .66);
  font-size: 12px;
}

.sidebar-nav,
.sidebar-group {
  display: grid;
  gap: 6px;
}

.sidebar-eyebrow {
  margin: 8px 10px 4px;
  color: rgba(255, 255, 255, .52);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-link {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: var(--radius);
  padding: 10px 12px;
  background: transparent;
  color: rgba(255, 255, 255, .76);
  text-align: left;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.nav-link i {
  width: 20px;
  color: rgba(255, 255, 255, .74);
  text-align: center;
}

.nav-link:hover {
  background: rgba(255, 255, 255, .09);
  color: #fff;
}

.nav-link.active {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-link.active i {
  color: var(--accent);
}

.nav-link.subtle {
  min-height: 38px;
  font-size: 14px;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .08);
}

.mini-health {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: #34d399;
  box-shadow: 0 0 0 5px rgba(52, 211, 153, .12);
}

.app-main {
  min-width: 0;
  padding: 0 28px 40px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(245, 247, 251, .88) 72%, rgba(245, 247, 251, 0) 100%);
  backdrop-filter: blur(14px);
}

body[data-mode="dark"] .topbar {
  background: linear-gradient(180deg, var(--bg) 0%, rgba(17, 23, 34, .9) 72%, rgba(17, 23, 34, 0) 100%);
}

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.page-kicker {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

.btn,
.btn-icon,
.segmented button,
.tab-list button,
.pagination-lite button,
.palette-card,
.public-tabs button {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  letter-spacing: 0;
}

.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  font-weight: 750;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  border-color: var(--brand);
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
  border-color: var(--brand-2);
  color: #fff;
  filter: brightness(.98);
}

.btn-outline {
  border-color: var(--border);
  background: var(--surface);
}

.btn-muted {
  background: var(--surface-2);
}

.btn-danger,
.btn-danger-soft {
  border-color: var(--danger);
  color: #fff;
}

.btn-danger {
  background: var(--danger);
}

.btn-danger-soft {
  background: var(--red-soft);
  color: var(--danger);
}

.btn-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  flex: 0 0 auto;
}

.btn-icon.ghost {
  border-color: transparent;
  background: transparent;
}

.sidebar-footer .btn-icon {
  color: #fff;
}

.mobile-menu {
  display: none;
}

.scheme-select {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 8px 5px 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.scheme-select span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.scheme-select select {
  min-width: 142px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 750;
  outline: 0;
}

.user-menu {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px 6px 6px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-soft);
  color: #7a5600;
  font-size: 12px;
  font-weight: 900;
}

.user-copy strong,
.user-copy small {
  display: block;
}

.user-copy strong {
  font-size: 13px;
  line-height: 1.1;
}

.user-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.view {
  display: none;
  animation: fadeIn .18s ease-out;
}

.view.active,
.public-view.active {
  display: block;
}

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

.screen-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 8px 0 22px;
}

.screen-head.compact {
  align-items: center;
}

.screen-head h2 {
  margin: 10px 0 6px;
  font-size: 28px;
  font-weight: 850;
}

.screen-head p,
.panel-head p,
.metric-card small,
.metric-card span,
.key-title p,
.details-list dt,
.plan-card p,
.docs-section p,
.response-box p,
.utility-card p,
.auth-art p {
  color: var(--muted);
}

.screen-head p {
  max-width: 760px;
  margin: 0;
}

.date-chip,
.status-pill,
.badge-soft,
.toast-preview {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.date-chip {
  border: 1px solid var(--border);
  background: var(--surface);
}

.status-pill.success,
.badge-soft.success,
.alert-compact.success {
  background: var(--green-soft);
  color: var(--success);
}

.status-pill.gold,
.badge-soft.gold {
  background: var(--gold-soft);
  color: #7a5600;
}

.toast-preview {
  background: var(--green-soft);
  color: var(--success);
}

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

.metric-card,
.panel,
.state-strip article,
.palette-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric-card {
  position: relative;
  min-height: 152px;
  padding: 18px;
  overflow: hidden;
}

.metric-card:before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--brand);
}

.metric-card.accent-green:before {
  background: var(--success);
}

.metric-card.accent-gold:before {
  background: var(--accent);
}

.metric-card.accent-coral:before {
  background: var(--danger);
}

.metric-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: var(--brand);
}

.accent-green .metric-icon {
  background: var(--green-soft);
  color: var(--success);
}

.accent-gold .metric-icon {
  background: var(--gold-soft);
  color: #7a5600;
}

.accent-coral .metric-icon {
  background: var(--red-soft);
  color: var(--danger);
}

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

.metric-card span {
  font-size: 13px;
  font-weight: 800;
}

.metric-card strong {
  display: block;
  margin: 4px 0 2px;
  font-size: 30px;
  line-height: 1.1;
}

.metric-card small {
  font-size: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, .8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-grid.lower {
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .72fr);
}

.panel {
  min-width: 0;
  padding: 18px;
}

.dashboard-grid > *,
.docs-grid > *,
.settings-grid > *,
.plan-summary > *,
.state-strip > *,
.key-list > *,
.palette-grid > *,
.stat-grid > * {
  min-width: 0;
}

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

.panel-head h3,
.key-row h3,
.docs-section h3,
.response-box h3,
.docs-aside h3,
.plan-wide h3,
.utility-card h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 850;
}

.panel-head p,
.key-title p,
.docs-section p,
.response-box p,
.utility-card p {
  margin: 4px 0 0;
  font-size: 13px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.segmented button {
  min-height: 30px;
  border: 0;
  padding: 5px 10px;
  background: transparent;
  font-size: 12px;
  font-weight: 850;
  color: var(--muted);
}

.segmented button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.chart-card {
  min-height: 286px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.chart-card svg {
  width: 100%;
  height: 230px;
  overflow: visible;
}

.chart-grid {
  stroke: var(--border);
  stroke-width: 1;
}

.chart-area {
  fill: url(#usageFill);
}

.chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-dots circle {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 4;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.key-callout {
  display: flex;
  flex-direction: column;
}

.key-box,
.key-value-line,
.endpoint-box {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.key-box {
  padding: 10px;
  margin-bottom: 18px;
}

.key-box code,
.key-value-line code,
.endpoint-box code {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-meter {
  margin-bottom: 18px;
}

.usage-meter-top,
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

.progress {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--neutral-soft);
}

.progress.slim {
  height: 8px;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.app-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.app-table th,
.app-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
  white-space: nowrap;
}

.app-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: left;
}

.app-table tr:last-child td {
  border-bottom: 0;
}

.text-end {
  text-align: right !important;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.status-badge.success {
  background: var(--green-soft);
  color: var(--success);
}

.status-badge.danger {
  background: var(--red-soft);
  color: var(--danger);
}

.status-badge.orange {
  background: var(--orange-soft);
  color: var(--orange);
}

.status-badge.warning {
  background: var(--gold-soft);
  color: #7a5600;
}

.status-badge.neutral {
  background: var(--neutral-soft);
  color: var(--neutral);
}

.plan-card {
  display: flex;
  flex-direction: column;
}

.plan-radial {
  width: 144px;
  height: 144px;
  display: grid;
  place-items: center;
  align-self: center;
  margin: 8px 0 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--surface) 0 54%, transparent 55%),
    conic-gradient(var(--accent) calc(var(--value) * 1%), var(--neutral-soft) 0);
}

.plan-radial strong,
.plan-radial span {
  grid-area: 1 / 1;
}

.plan-radial strong {
  margin-top: -10px;
  font-size: 28px;
}

.plan-radial span {
  margin-top: 42px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.details-list,
.plan-data {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.details-list div,
.plan-data div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.details-list dt,
.details-list dd,
.plan-data dt,
.plan-data dd {
  margin: 0;
}

.details-list dd,
.plan-data dd {
  font-weight: 800;
  text-align: right;
}

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

.state-strip article {
  min-height: 96px;
  padding: 16px;
}

.mini-title {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.empty-compact,
.alert-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border-radius: var(--radius);
  padding: 10px 12px;
  font-weight: 800;
}

.empty-compact {
  background: var(--surface-2);
  color: var(--muted);
}

.alert-compact.danger {
  background: var(--red-soft);
  color: var(--danger);
}

.alert-compact.warning {
  background: var(--gold-soft);
  color: #7a5600;
}

.alert-compact.full {
  grid-column: 1 / -1;
}

.skeleton-lines {
  display: grid;
  gap: 10px;
}

.skeleton-lines i {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--neutral-soft), var(--surface-2), var(--neutral-soft));
}

.skeleton-lines i:nth-child(2) {
  width: 74%;
}

.skeleton-lines i:nth-child(3) {
  width: 46%;
}

.key-list {
  display: grid;
  gap: 16px;
}

.key-row {
  display: grid;
  gap: 16px;
}

.key-row.primary-key {
  border-top: 3px solid var(--accent);
}

.key-row-main,
.key-title,
.key-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.key-row-main {
  justify-content: space-between;
}

.key-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px var(--green-soft);
}

.key-dot.alt {
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--gold-soft);
}

.key-value-line {
  padding: 8px;
}

.key-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.key-meta-grid div,
.param-grid div,
.plan-data div {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-2);
}

.key-meta-grid span,
.param-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.key-meta-grid strong,
.param-grid strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muted-preview {
  opacity: .86;
}

.filter-panel {
  margin-bottom: 16px;
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(180px, .7fr) auto auto;
  gap: 12px;
  align-items: end;
}

label {
  display: grid;
  gap: 7px;
}

label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  background: var(--surface);
  color: var(--text);
  outline: 0;
}

input:focus,
select:focus,
.btn:focus,
.btn-icon:focus,
.nav-link:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(45, 108, 223, .12);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--neutral);
}

.legend-dot.success {
  background: var(--success);
}

.legend-dot.danger {
  background: var(--danger);
}

.legend-dot.orange {
  background: var(--orange);
}

.legend-dot.warning {
  background: var(--accent);
}

.table-footer {
  margin: 0;
  padding-top: 14px;
  color: var(--muted);
}

.pagination-lite {
  display: inline-flex;
  gap: 5px;
}

.pagination-lite button {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  font-weight: 850;
}

.pagination-lite button.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.docs-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
  gap: 18px;
}

.docs-main {
  display: grid;
  gap: 22px;
}

.endpoint-box {
  padding: 10px;
}

.endpoint-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.docs-section,
.response-box {
  display: grid;
  gap: 12px;
}

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

.code-tabs {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #111827;
  color: #e5edf7;
}

.tab-list {
  display: flex;
  gap: 4px;
  padding: 8px;
  background: rgba(255, 255, 255, .05);
}

.tab-list button {
  min-height: 32px;
  border: 0;
  padding: 6px 10px;
  background: transparent;
  color: #aab7c8;
  font-weight: 850;
}

.tab-list button.active {
  background: var(--accent);
  color: #1d2634;
}

.code-panel {
  display: none;
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  color: #e5edf7;
  font-size: 13px;
}

.code-panel.active {
  display: block;
}

.response-box pre {
  margin: 0;
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
}

.status-reference {
  display: grid;
  gap: 11px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.status-reference li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
}

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

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

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

.form-grid .btn {
  justify-self: start;
}

.plan-wide {
  display: grid;
  gap: 22px;
}

.plan-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .42fr);
  gap: 24px;
  align-items: center;
}

.plan-summary h3 {
  margin: 12px 0 8px;
  font-size: 30px;
}

.plan-summary p,
.plan-usage-block span {
  color: var(--muted);
}

.plan-usage-block {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface-2);
}

.plan-usage-block strong {
  font-size: 22px;
}

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

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

.palette-card {
  display: grid;
  gap: 10px;
  min-height: 142px;
  padding: 14px;
  text-align: left;
}

.palette-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(242, 183, 5, .18);
}

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

.palette-card small {
  color: var(--muted);
}

.swatches {
  display: flex;
  gap: 6px;
}

.swatches i {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 50%;
}

.palette-preview {
  display: grid;
  gap: 16px;
}

.mini-dashboard {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.mini-sidebar {
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
}

.mini-content {
  display: grid;
  grid-template-rows: 44px 88px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
}

.mini-top,
.mini-cards i,
.mini-chart {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.mini-top {
  max-width: 420px;
}

.mini-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.mini-chart {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 18px;
}

.mini-chart span {
  flex: 1;
  min-height: 22%;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: linear-gradient(180deg, var(--accent), var(--brand));
}

.public-stage {
  min-height: 100vh;
}

.public-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(14px);
}

body[data-mode="dark"] .public-bar {
  background: rgba(24, 34, 50, .9);
}

.public-bar .brand-lockup small {
  color: var(--muted);
}

.public-bar .brand-lockup strong {
  color: var(--text);
}

.public-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.public-tabs button {
  min-height: 38px;
  padding: 8px 12px;
  color: var(--muted);
  font-weight: 850;
}

.public-tabs button.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.public-main {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 76px);
  padding: 36px 24px;
}

.public-view {
  display: none;
  width: min(1060px, 100%);
}

.auth-card {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(360px, .7fr);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.auth-card.compact-auth {
  width: min(480px, 100%);
  min-height: 0;
  margin: 0 auto;
  grid-template-columns: 1fr;
}

.auth-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, 0)),
    linear-gradient(160deg, var(--sidebar), var(--brand));
  color: #fff;
}

.auth-art h1 {
  max-width: 520px;
  margin: 18px 0 12px;
  font-size: 42px;
  line-height: 1.05;
}

.auth-art p {
  max-width: 420px;
  color: rgba(255, 255, 255, .75);
}

.auth-sparkline {
  height: 150px;
  display: flex;
  align-items: end;
  gap: 12px;
  margin-top: 44px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .1);
}

.auth-sparkline i {
  flex: 1;
  min-height: 20%;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: linear-gradient(180deg, var(--accent), rgba(255, 255, 255, .46));
}

.auth-form {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 44px;
}

.auth-form h2 {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 850;
}

.auth-form a {
  justify-self: center;
  font-weight: 850;
}

.auth-state-list {
  display: grid;
  gap: 10px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.auth-state-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .1);
  font-weight: 800;
}

.spinner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 13px 0 0 rgba(255, 255, 255, .58), 26px 0 0 rgba(255, 255, 255, .3);
}

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

.utility-card {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.big-code {
  color: var(--accent);
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
}

.utility-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--red-soft);
  color: var(--danger);
  font-size: 28px;
}

.modal-lite {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .54);
}

.modal-card {
  width: min(440px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.modal-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--red-soft);
  color: var(--danger);
  font-size: 22px;
}

.modal-card h2,
.modal-card p {
  margin: 0;
}

.modal-card p {
  color: var(--muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  pointer-events: none;
}

.toast-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease;
}

.toast-card.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-card i {
  color: var(--success);
}

body.public-mode .app-shell {
  display: none;
}

body.public-mode .public-stage {
  display: block;
}

body.sidebar-collapsed {
  --sidebar-width: 88px;
}

body.sidebar-collapsed .app-sidebar {
  align-items: center;
  padding-inline: 12px;
}

body.sidebar-collapsed .brand-lockup span:not(.brand-mark),
body.sidebar-collapsed .nav-link span,
body.sidebar-collapsed .sidebar-eyebrow,
body.sidebar-collapsed .mini-health {
  display: none;
}

body.sidebar-collapsed .nav-link {
  justify-content: center;
  width: 50px;
}

body.sidebar-collapsed .nav-link i {
  width: auto;
}

body.sidebar-collapsed .sidebar-footer {
  justify-content: center;
  padding: 8px;
}

.mobile-scrim {
  display: none;
}

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

  .dashboard-grid,
  .dashboard-grid.lower,
  .docs-grid,
  .settings-grid,
  .plan-summary {
    grid-template-columns: 1fr;
  }

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

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

  .app-sidebar {
    position: fixed;
    z-index: 50;
    left: 0;
    display: none;
    width: 286px;
    transform: none;
  }

  body.sidebar-open .app-sidebar {
    display: flex;
  }

  body.sidebar-open .mobile-scrim {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    background: rgba(15, 23, 42, .42);
  }

  .mobile-menu {
    display: inline-grid;
  }

  .app-main {
    padding-inline: 16px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .user-copy,
  .scheme-select span {
    display: none;
  }

  .scheme-select select {
    min-width: 132px;
  }

  .screen-head,
  .panel-head,
  .key-row-main,
  .key-actions,
  .table-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-grid,
  .param-grid,
  .state-strip,
  .form-grid,
  .utility-grid,
  .auth-card,
  .auth-card.split {
    grid-template-columns: 1fr;
  }

  .auth-art {
    min-height: 330px;
  }

  .auth-art h1 {
    font-size: 34px;
  }

  .public-bar {
    grid-template-columns: 1fr;
  }

  .public-tabs {
    justify-content: flex-start;
    overflow-x: auto;
  }
}

@media (max-width: 620px) {
  .stat-grid,
  .key-meta-grid,
  .palette-grid,
  .plan-data {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-left,
  .topbar-actions {
    justify-content: space-between;
  }

  .screen-head h2 {
    font-size: 24px;
  }

  .metric-card strong,
  .plan-summary h3 {
    font-size: 26px;
  }

  .mini-dashboard {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .auth-form,
  .auth-art {
    padding: 26px;
  }

  .auth-art h1 {
    font-size: 30px;
  }
}
