:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --sidebar: #111827;
  --sidebar-muted: #94a3b8;
  --sidebar-hover: #1e293b;
  --text: #172033;
  --text-strong: #0f172a;
  --muted: #657084;
  --line: #dfe4eb;
  --line-strong: #cbd3df;
  --primary: #2857d9;
  --primary-hover: #1f47b9;
  --primary-soft: #eaf0ff;
  --success: #137a4b;
  --success-soft: #e7f7ef;
  --warning: #8a5a00;
  --warning-soft: #fff6d8;
  --danger: #b42318;
  --danger-soft: #ffebe9;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 6%);
  --shadow-lg: 0 20px 45px rgb(15 23 42 / 18%);
  --radius-sm: 6px;
  --radius-md: 10px;
  --sidebar-width: 248px;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgb(40 87 217 / 22%); outline-offset: 2px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-160%); padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface); }
.skip-link:focus { transform: translateY(0); }

.portal-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; min-height: 600px; flex-direction: column; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; background: var(--sidebar); color: #f8fafc; }
.sidebar::-webkit-scrollbar { display: none; }
.sidebar-brand { padding: 24px 22px 18px; border-bottom: 1px solid rgb(255 255 255 / 8%); }
.sidebar-brand > a { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; color: #fff; text-decoration: none; }
.brand-logo { display: block; width: 120px; height: auto; max-width: 100%; object-fit: contain; }
.brand-product { padding: 2px 6px; border: 1px solid rgb(255 255 255 / 18%); border-radius: 5px; color: #cbd5e1; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.sidebar-nav { flex: 1; padding: 14px 12px; }
.nav-section + .nav-section { margin-top: 16px; }
.nav-heading { margin: 0 10px 5px; color: #728097; font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.nav-item { display: flex; min-height: 38px; align-items: center; gap: 11px; margin: 2px 0; padding: 8px 10px; border-radius: 7px; color: #cbd5e1; font-weight: 560; }
.nav-item:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.nav-item.active { background: #263453; color: #fff; box-shadow: inset 2px 0 0 #7da2ff; }
.nav-marker { width: 7px; height: 7px; flex: 0 0 7px; border: 1px solid currentColor; border-radius: 2px; opacity: .7; }
.nav-item.active .nav-marker { border-color: #8cafff; background: #8cafff; opacity: 1; }
.sidebar-account { padding: 15px 16px 18px; border-top: 1px solid rgb(255 255 255 / 8%); }
.account-team { margin-bottom: 11px; overflow: hidden; color: #b8c4d7; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.account-summary { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; }
.account-summary > span:last-child { min-width: 0; }
.account-summary strong, .account-summary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-summary strong { color: #f8fafc; font-size: 13px; }
.account-summary small { color: var(--sidebar-muted); font-size: 11px; }
.account-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #314264; color: #dbe7ff; font-weight: 750; }
.account-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.account-actions a, .text-button { color: #cbd5e1; font-size: 12px; }
.account-actions form { margin: 0; }
.text-button { width: auto; min-height: 0; padding: 0; border: 0; background: transparent; }
.text-button:hover { background: transparent; color: #fff; text-decoration: underline; }
.language-switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; color: #94a3b8; font-size: 11px; }
.language-options { display: flex; align-items: center; gap: 6px; }
.language-options button { width: auto; min-height: 0; padding: 0; border: 0; background: transparent; color: #94a3b8; font-size: 11px; font-weight: 650; }
.language-options button:hover, .language-options button.active { background: transparent; color: #fff; text-decoration: underline; }

.portal-workspace { min-width: 0; }
.mobile-toolbar { display: none; }
main { width: 100%; max-width: 1680px; margin: 0 auto; padding: 28px 30px 48px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-heading-copy { min-width: 0; }
.page-kicker { margin: 0 0 3px; color: var(--primary); font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
h1 { margin: 0; color: var(--text-strong); font-size: 40px; font-weight: 800; line-height: 1.3; letter-spacing: -.025em; }
h2 { margin: 0; color: var(--text-strong); font-size: 16px; line-height: 1.35; }
.page-subtitle { max-width: 760px; margin-top: 5px; color: var(--muted); }
.page-subtitle:empty { display: none; }
.page-header-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 9px; }

.panel, .metric-card { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel { margin-bottom: 18px; padding: 18px; }
.panel-flush { padding: 0; overflow: hidden; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.panel-heading p { margin: 4px 0 0; color: var(--muted); }
.padded-heading { margin-bottom: 0; padding: 15px 18px 12px; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.summary { margin: 0; color: var(--muted); font-size: 12px; }
.scope-note { margin: 0 0 16px; padding: 10px 12px; border-left: 3px solid #d5a72f; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--warning-soft); color: #704d00; }

.identity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.identity-grid div { min-width: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-subtle); }
.identity-grid dt { color: var(--muted); font-size: 11px; }
.identity-grid dd { margin: 3px 0 0; overflow: hidden; color: var(--text-strong); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-section { margin-bottom: 22px; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; }
.metrics-grid-compact { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
.metric-card { display: flex; min-height: 116px; flex-direction: column; padding: 15px 16px; color: inherit; }
.metric-card:hover { border-color: #b9c7e3; box-shadow: 0 4px 12px rgb(15 23 42 / 8%); text-decoration: none; }
.metric-card dl { display: block; margin: 0; }
.metric-card dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.metric-card dd { margin: 8px 0 0; color: var(--text-strong); font-size: 27px; font-weight: 760; line-height: 1; }
.metric-card > span { margin-top: auto; padding-top: 9px; color: var(--muted); font-size: 11px; }
.metric-card.metric-success { border-color: #c6e7d5; }
.metric-card.metric-danger { border-color: #f0b8b3; background: #fffafa; }
.metric-card.metric-warning { border-color: #ead28a; background: #fffdf5; }

.table-wrap { width: 100%; overflow: auto; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px 12px; border-bottom: 1px solid var(--line); }
table { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { position: sticky; top: 0; z-index: 1; background: var(--surface-subtle); color: #576277; font-size: 10px; font-weight: 750; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; }
tbody tr:hover { background: #f9fbfe; }
tbody tr:last-child td { border-bottom: 0; }
td { max-width: 330px; }
.cell-primary { color: var(--text-strong); font-weight: 650; }
.cell-secondary { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.cell-truncate { display: inline-block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; }
.cell-actions { min-width: 110px; white-space: nowrap; }
.cell-time { color: #4e5b70; font-size: 12px; white-space: nowrap; }
.mono, pre { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }
.api-key-cell { width: 290px; max-width: 360px; }
.portal-api-key-value.is-revealed { display: block; max-width: 100%; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.api-key-actions { display: flex; min-width: 190px; flex-wrap: wrap; gap: 6px; white-space: normal; }
.api-key-actions [hidden] { display: none; }

.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 23px; padding: 2px 8px; border: 1px solid transparent; border-radius: 999px; font-size: 11px; font-weight: 750; line-height: 1.2; white-space: nowrap; }
.badge::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.badge.success, .badge.enabled { border-color: #b9e4cf; background: var(--success-soft); color: var(--success); }
.badge.failed, .badge.disabled { border-color: #f2bbb7; background: var(--danger-soft); color: var(--danger); }
.badge.pending { border-color: #ead28a; background: var(--warning-soft); color: var(--warning); }
.badge.uncertain { border-color: #efc09f; background: #fff0e6; color: #9a4314; }

.empty-state { padding: 40px 20px !important; color: var(--muted); text-align: center; }
.empty-state strong { display: block; margin-bottom: 3px; color: #445066; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.pagination-links { display: flex; gap: 7px; }
.pagination a, .pagination-disabled { display: inline-flex; min-width: 76px; min-height: 32px; align-items: center; justify-content: center; padding: 5px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.pagination a:hover { border-color: #aebce0; background: var(--primary-soft); text-decoration: none; }
.pagination-disabled { color: #9ca5b5; background: #f5f6f8; }

.filter-panel { padding: 14px 16px; }
.filter-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.filter-header p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: end; }
.filters label, .analytics-filters label, .auth-form label { display: flex; flex-direction: column; gap: 5px; color: #536075; font-size: 11px; font-weight: 650; }
.filters .wide-field { grid-column: span 2; }
.filter-actions { display: flex; min-height: 36px; align-items: center; gap: 8px; }

input, select { width: 100%; min-height: 36px; border: 1px solid #bfc8d5; border-radius: var(--radius-sm); background: #fff; color: var(--text); padding: 7px 9px; }
input:hover, select:hover { border-color: #9eabbd; }
button, .button { display: inline-flex; width: auto; min-height: 34px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 7px 13px; background: var(--primary); color: #fff; cursor: pointer; font-weight: 650; text-decoration: none; }
button:hover, .button:hover { background: var(--primary-hover); text-decoration: none; }
button:disabled { cursor: wait; opacity: .62; }
.button-secondary { border-color: var(--line-strong); background: var(--surface); color: var(--text); }
.button-secondary:hover { background: var(--surface-subtle); }
.text-button-inline { min-height: 0; padding: 0; border: 0; background: transparent; color: var(--primary); font-size: 12px; }
.text-button-inline:hover { background: transparent; text-decoration: underline; }

.form-error { margin: 0 0 14px; padding: 10px 12px; border: 1px solid #e58e86; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); }
.client-feedback { position: sticky; top: 10px; z-index: 8; margin-bottom: 18px; padding: 12px 14px; border: 1px solid #dfbd58; border-left-width: 4px; border-radius: var(--radius-sm); background: var(--warning-soft); color: #704d00; box-shadow: var(--shadow-sm); }
.auth-form { display: grid; gap: 14px; }
.auth-intro { margin: 5px 0 20px; color: var(--muted); }
.auth-form button { margin-top: 4px; }
.change-password-panel { max-width: 620px; }

.details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0; margin: 0; overflow: hidden; }
.details-grid div { min-width: 0; padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.details-grid dt { color: var(--muted); font-size: 11px; }
.details-grid dd { margin: 3px 0 0; overflow-wrap: anywhere; color: var(--text-strong); font-weight: 650; }
pre { margin: 0; padding: 14px; overflow: auto; border-radius: var(--radius-sm); background: #101828; color: #dce5f2; white-space: pre-wrap; overflow-wrap: anywhere; }
.not-found { padding: 52px 24px; text-align: center; }

.analytics-filters { display: grid; grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(170px, .6fr)); align-items: start; gap: 14px; }
.analytics-filters > label small, .analytics-event-field small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.analytics-event-field { grid-column: 1 / -1; }
.analytics-event-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.analytics-event-field select { width: 100%; min-height: 176px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.analytics-filters .filter-actions { grid-column: 1 / -1; }
.analytics-results { margin-top: 18px; }
.analytics-table { min-width: max-content; }
.analytics-table th, .analytics-table td { min-width: 100px; white-space: nowrap; }
.analytics-table th:first-child { position: sticky; left: 0; z-index: 2; min-width: 150px; background: var(--surface); }
.analytics-table thead th:first-child { z-index: 3; }
.analytics-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.analytics-table .summary-row th, .analytics-table .summary-row td { background: #eef4ff; font-weight: 700; }
.analytics-table .summary-row th:first-child { background: #eef4ff; }
.analytics-empty { padding: 48px 20px; }

.developer-docs-layout { display: block; width: min(100%, 1440px); margin-inline: auto; padding-inline: clamp(0px, 1vw, 16px); }
.developer-docs-subnav { display: grid; gap: 1px; margin: 2px 0 4px 19px; padding: 3px 0 3px 10px; border-left: 1px solid #34435e; }
.developer-docs-subnav a { display: block; overflow: hidden; padding: 5px 8px; border-radius: 5px; color: #9eacc1; font-size: 14px; font-weight: 520; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.developer-docs-subnav a:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.developer-docs-subnav a.active { background: #263453; color: #fff; font-weight: 700; box-shadow: inset 2px 0 0 #7da2ff; }
.developer-docs-content { width: 100%; min-width: 0; }
.docs-section { scroll-margin-top: 18px; padding: 22px; font-size: 17px; font-weight: 480; line-height: 1.8; }
.docs-section > p { width: 100%; color: var(--text-strong); }
.docs-section > h3 { margin: 24px 0 9px; color: var(--text-strong); font-size: 25px; font-weight: 750; line-height: 1.4; }
.docs-section-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.docs-section-heading h2 { font-size: 30px; font-weight: 780; line-height: 1.35; letter-spacing: -.015em; }
.docs-section-heading > span { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 7px; background: var(--primary-soft); color: var(--primary); font-size: 14px; font-weight: 800; }
.docs-steps { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 0; list-style: none; counter-reset: docs-step; }
.docs-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px 10px; padding: 15px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-subtle); counter-increment: docs-step; }
.docs-steps li::before { grid-row: 1 / span 2; color: var(--primary); font-weight: 800; content: counter(docs-step); }
.docs-step-copy > span { color: var(--text-strong); font-size: 17px; }
.docs-step-copy small { display: block; margin-top: 4px; color: var(--text-strong); font-size: 15px; font-style: italic; line-height: 1.75; }
.docs-step-copy .docs-term { font-weight: 750; }
.docs-callout { margin-top: 16px; padding: 12px 14px; border-left: 3px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--primary-soft); }
.docs-callout-danger { border-left-color: var(--danger); background: var(--danger-soft); }
.docs-callout-warning { border-left-color: #ebbf43; background: #fdfaf0; }
.docs-callout-note { border-left-color: #5ba259; background: #f2f8f2; }
.docs-callout-alert { border-left-color: #dc6f66; background: #fcf4f3; }
.docs-callout-heading { display: flex; align-items: center; gap: 8px; }
.docs-warning-icon { display: grid; width: 20px; height: 18px; flex: 0 0 20px; padding-top: 3px; place-items: center; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: #ebbf43; color: #fff; font-size: 11px; font-style: normal; font-weight: 850; line-height: 1; }
.docs-note-icon { display: grid; width: 20px; height: 20px; flex: 0 0 20px; place-items: center; border-radius: 50%; background: #5ba259; }
.docs-note-icon svg { width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.docs-alert-icon { display: grid; width: 17px; height: 17px; flex: 0 0 17px; margin-inline: 2px 1px; place-items: center; transform: rotate(45deg); border-radius: 2px; background: #dc6f66; color: #fff; font-size: 11px; font-style: normal; font-weight: 850; line-height: 1; }
.docs-alert-icon::before { content: "!"; transform: rotate(-45deg); }
.docs-callout-note .docs-callout-heading strong { color: #5ba259; }
.docs-callout-alert .docs-callout-heading strong { color: #dc6f66; }
.docs-callout strong, .docs-callout-heading strong { color: var(--text-strong); font-size: 17px; }
.docs-callout p { margin: 3px 0 0; color: var(--text-strong); font-size: 17px; }
.docs-callout small { display: block; margin-top: 4px; color: var(--text-strong); font-size: 15px; font-style: italic; line-height: 1.75; }
.docs-inline-code { margin: 13px 0; padding: 12px 14px; overflow: auto; border: 1px solid #c8d5f2; border-radius: var(--radius-sm); background: var(--primary-soft); color: #173a94; white-space: nowrap; }
.docs-definition-list, .docs-status-list { margin: 14px 0; }
.docs-definition-list > div, .docs-status-list > div { display: grid; grid-template-columns: minmax(190px, .35fr) minmax(0, 1fr); gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.docs-definition-list dt { color: var(--text-strong); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 700; }
.docs-definition-list dd, .docs-status-list dd { margin: 0; color: var(--text-strong); }
.docs-click-parameters { margin-top: 22px; overflow: hidden; border: 1px solid #dde2fb; border-radius: var(--radius-sm); }
.docs-click-parameters > div { grid-template-columns: minmax(210px, .28fr) minmax(0, 1fr); gap: 0; padding: 0; border-bottom: 2px solid #fff; }
.docs-click-parameters > div:last-child { border-bottom: 0; }
.docs-click-parameters dt { display: flex; align-items: center; padding: 14px; border-right: 2px solid #fff; background: #dde2fb; }
.docs-click-parameters dd { padding: 14px; background: #f4f8fa; }
.docs-click-parameters > .docs-click-parameters-heading > * { background: #dde2fb; font-family: inherit; font-weight: 750; }
.docs-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; }
.docs-flow span { padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-subtle); font-size: 17px; }
.docs-flow b { color: #8a96a8; }
.docs-muted { color: var(--text-strong) !important; font-size: 17px; }
.docs-code-example { margin: 14px 0; border: 1px solid #29364c; border-radius: var(--radius-sm); overflow: hidden; background: #101828; }
.docs-example-language-title { margin: 22px 0 8px; color: var(--text-strong); font-size: 20px; font-weight: 700; line-height: 1.45; }
.docs-code-heading { display: flex; min-height: 40px; align-items: center; justify-content: space-between; gap: 14px; padding: 6px 8px 6px 14px; border-bottom: 1px solid #29364c; color: #a9b8cd; font-size: 11px; font-weight: 700; }
.docs-code-heading .docs-copy { min-height: 27px; padding: 3px 9px; border-color: #435169; background: #18243a; color: #dce5f2; font-size: 11px; }
.docs-code-heading .docs-copy:hover { background: #25344d; }
.docs-code-example pre { max-height: 520px; border-radius: 0; font-size: 14px; line-height: 1.65; white-space: pre; overflow-wrap: normal; }
.docs-code-example pre, .docs-code-example code { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
.docs-code-example code { color: #dce5f2; }
.docs-code-example .docs-token-comment { color: #8b9bb4; font-style: italic; }
.docs-code-example .docs-token-keyword { color: #c792ea; }
.docs-code-example .docs-token-string { color: #a6e3a1; }
.docs-code-example .docs-token-number { color: #f5c2e7; }
.docs-code-example .docs-token-property { color: #82aaff; }
.docs-code-example .docs-token-boolean, .docs-code-example .docs-token-null { color: #ff9cac; }
.docs-code-example .docs-token-function { color: #ffd580; }
.docs-code-example .docs-token-variable { color: #f78c6c; }
.docs-code-example .docs-token-option, .docs-code-example .docs-token-operator { color: #89ddff; }
.docs-code-example .docs-token-punctuation { color: #b7c3d7; }
.docs-table-wrap { margin: 14px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.docs-section > .docs-table-wrap, .docs-section > .docs-code-example, .docs-section > .docs-definition-list { width: 100%; }
.docs-table { min-width: 650px; }
.docs-api-config-table { min-width: 720px; }
.docs-fields-table { min-width: 760px; }
.docs-standard-properties-table { min-width: 900px; table-layout: fixed; }
.docs-standard-properties-table th:nth-child(1), .docs-standard-properties-table td:nth-child(1) { width: 15%; }
.docs-standard-properties-table th:nth-child(2), .docs-standard-properties-table td:nth-child(2) { width: 55%; }
.docs-standard-properties-table th:nth-child(3), .docs-standard-properties-table td:nth-child(3) { width: 15%; }
.docs-standard-properties-table th:nth-child(4), .docs-standard-properties-table td:nth-child(4) { width: 15%; }
.docs-standard-properties-table code { color: #183b8f; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .95em; font-weight: 700; }
.docs-table th { font-size: 16px; }
.docs-table td { font-size: 17px; }
.docs-colored-table-wrap { border-color: #dde2fb; }
.docs-colored-table th { position: static; border-bottom: 2px solid #fff; background: #dde2fb; color: var(--text-strong); letter-spacing: 0; text-transform: none; }
.docs-colored-table th + th, .docs-colored-table td + td { border-left: 2px solid #fff; }
.docs-colored-table tbody td { border-bottom: 2px solid #fff; background: #f4f8fa; }
.docs-colored-table tbody td:first-child { background: #dde2fb; font-weight: 700; }
.docs-colored-table tbody tr:last-child td { border-bottom: 0; }
.docs-fields-table code { color: #183b8f; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .95em; font-weight: 700; }
.docs-data-intro code, .docs-data-overview code, .docs-data-meaning-list code, .docs-data-optional code { color: #183b8f; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .95em; font-weight: 700; }
.docs-inline-term { color: #183b8f; font-family: inherit; font-size: inherit; font-weight: 700; white-space: nowrap; }
.docs-data-meaning-list { margin: 10px 0; padding-left: 24px; color: var(--text-strong); }
.docs-events-table td:first-child, .docs-errors-table td:nth-child(2) { color: #183b8f; font-weight: 650; white-space: nowrap; }
.docs-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.docs-mini-card { padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-subtle); }
.docs-mini-card h3 { margin: 0 0 6px; color: var(--text-strong); font-size: 35px; line-height: 1.4; }
.docs-mini-card p { margin: 0; color: var(--text-strong); font-size: 17px; }
.docs-idempotency-same-text { color: #49a568; }
.docs-idempotency-different-text { color: #d64545; }
.docs-limit-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 24px; margin: 14px 0; padding-left: 20px; color: var(--text-strong); }
.auth-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: #101827; }
.auth-shell { width: min(430px, 100%); padding: 0; }
.auth-brand { margin-bottom: 20px; color: #fff; text-align: center; }
.auth-logo { display: block; width: 154px; height: auto; margin: 0 auto 5px; object-fit: contain; }
.auth-brand span { color: #94a3b8; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.auth-panel { width: 100%; padding: 26px; }
.auth-panel h1 { margin-bottom: 6px; font-size: 22px; }

.sidebar-backdrop { display: none; }

@media (max-width: 1200px) {
  :root { --sidebar-width: 224px; }
  main { padding-right: 22px; padding-left: 22px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
}

@media (max-width: 900px) {
  .portal-shell { display: block; }
  .sidebar { position: fixed; left: 0; z-index: 30; width: min(280px, 86vw); transform: translateX(-105%); box-shadow: var(--shadow-lg); transition: transform 160ms ease; }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 20; width: 100%; height: 100%; min-height: 0; border-radius: 0; background: rgb(15 23 42 / 46%); }
  .sidebar-backdrop:hover { background: rgb(15 23 42 / 46%); }
  .sidebar-open .sidebar-backdrop { display: block; }
  .mobile-toolbar { display: flex; min-height: 52px; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
  .menu-button { min-height: 32px; border-color: var(--line); background: var(--surface); color: var(--text); }
  .menu-button:hover { background: var(--surface-subtle); }
  main { padding: 20px 16px 40px; }
}

@media (max-width: 680px) {
  h1 { font-size: 40px; }
  .page-header { flex-direction: column; }
  .page-header-actions { width: 100%; justify-content: flex-start; }
  .identity-grid, .metrics-grid, .metrics-grid-compact { grid-template-columns: 1fr; }
  .table-toolbar { align-items: flex-start; flex-direction: column; }
  .filters .wide-field { grid-column: auto; }
  .pagination { align-items: flex-start; flex-direction: column; }
  .analytics-filters { grid-template-columns: 1fr; }
  .docs-section { padding: 17px; }
  .docs-steps, .docs-card-grid, .docs-limit-list { grid-template-columns: 1fr; }
  .docs-definition-list > div, .docs-status-list > div { grid-template-columns: 1fr; gap: 5px; }
  .docs-click-parameters > div { gap: 0; }
  .docs-click-parameters dt { border-right: 0; border-bottom: 2px solid #fff; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
