@font-face { font-family: Inter; font-style: normal; font-weight: 400 800; font-display: swap; src: url('/fonts/inter-latin.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 400 800; font-display: swap; src: url('/fonts/inter-cyrillic.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
:root {
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --canvas: #10141c;
  --sidebar: #0f131b;
  --surface: #1b222f;
  --surface-raised: #222e42;
  --line: #282e3a;
  --line-strong: #3a4557;
  --ink: #f4f5f7;
  --muted: #98a3b7;
  --quiet: #98a3b7;
  --primary: #2df58b;
  --primary-hover: #22dc7a;
  --bg: var(--canvas);
  --panel: var(--surface);
  --raised: var(--surface-raised);
  --accent: var(--primary);
  --accent-ink: #102219;
  --danger: #f47389;
  --warn: #e5b969;
  --radius: 16px;
  --sidebar-width: 264px;
  --workspace-gutter: 40px;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.symbols { display: none; }
svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); line-height: 1.5; }
.mono, pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.mono { font-size: .8rem; overflow-wrap: anywhere; }
.eyebrow { color: var(--quiet); font-size: .69rem; font-weight: 740; letter-spacing: .11em; line-height: 1.4; }

.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); }
.brand { display: inline-flex; align-items: baseline; color: var(--ink); font-size: 34px; line-height: 1; font-weight: 800; font-style: italic; letter-spacing: -1.7px; }
.brand-period { color: var(--primary); }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px;
  border: 1px solid var(--line-strong); border-radius: 10px; color: var(--accent); background: var(--surface);
}
.brand-mark svg { width: 23px; height: 23px; }

.auth-view { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
.auth-hero {
  position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  min-height: 100vh; padding: clamp(27px, 5vw, 75px);
  border-right: 1px solid var(--line); background: radial-gradient(ellipse at 70% 84%, var(--surface-raised) 0%, transparent 63%), var(--sidebar);
}
.auth-message { position: relative; z-index: 1; max-width: 600px; padding-block: 72px 145px; }
.auth-message .eyebrow { color: var(--accent); }
.auth-message h1 { margin-block: 13px 17px; font-size: clamp(2.4rem, 5vw, 5rem); letter-spacing: -.075em; line-height: 1; }
.auth-message > p:last-child { max-width: 40ch; color: var(--muted); line-height: 1.6; font-size: 1rem; }
.auth-orbit {
  position: absolute; right: -92px; bottom: -85px; width: 330px; height: 330px; display: grid; place-items: center;
  color: #2df58b5c; border: 1px solid #2df58b47; border-radius: 50%; transform: rotate(-12deg);
}
.auth-orbit::before, .auth-orbit::after { content: ""; position: absolute; inset: 22px; border: 1px solid #2df58b38; border-radius: inherit; }
.auth-orbit::after { inset: 45px; }
.auth-orbit svg { width: 130px; height: 130px; stroke-width: .7; }
.auth-main { display: grid; place-items: center; padding: clamp(20px, 5vw, 72px); }
.auth-panel { width: min(100%, 410px); }
.auth-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--sidebar); }
.segment { border: 0; border-radius: 7px; padding: 9px 12px; background: transparent; color: var(--muted); font-size: .84rem; font-weight: 650; cursor: pointer; }
.segment:hover { color: var(--ink); }
.segment[aria-pressed="true"] { color: var(--ink); background: var(--surface-raised); }
.auth-panel h2 { margin-top: 25px; font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.05em; }
.auth-panel > .muted { margin: 7px 0 22px; }

.shell { min-height: 100dvh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-width); display: flex; flex-direction: column;
  background: var(--sidebar); border-right: 1px solid var(--line); overflow-y: auto;
}
.sidebar-brand-row { height: 88px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.project-picker { position: relative; flex-shrink: 0; margin: 0 16px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.project-picker summary { display: flex; align-items: center; gap: 10px; min-height: 66px; padding: 12px; list-style: none; border-radius: inherit; cursor: pointer; }
.project-picker summary::-webkit-details-marker { display: none; }
.project-icon { width: 20px; height: 20px; color: var(--muted); }
.project-chevron { width: 16px; height: 16px; }
.project-picker-label { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.project-picker-label small { color: var(--muted); font-size: 11px; }
.project-picker-label strong { color: var(--ink); font-size: 13px; font-weight: 500; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.project-picker[open] { border-color: #536076; }
.project-picker[open] .project-chevron { transform: rotate(180deg); }
.project-options { position: absolute; left: -1px; right: -1px; z-index: 50; top: calc(100% + 8px); padding: 6px; background: var(--surface-raised); border: 1px solid #3b485c; border-radius: 12px; box-shadow: 0 12px 28px #0005; }
.project-options-list { max-height: min(45dvh, 320px); overflow-y: auto; }
.project-option { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 10px; text-align: left; background: transparent; border: 0; border-radius: 8px; font-size: 13px; cursor: pointer; }
.project-option span { overflow-wrap: anywhere; }
.project-option svg { width: 16px; height: 16px; }
.project-option:hover, .project-option:focus-visible { background: #ffffff08; }
.project-option:focus-visible { outline-offset: -2px; }
.project-option[aria-current="true"] { color: var(--primary); }
.project-options-list:not([hidden]) + .project-picker-actions { margin-top: 6px; padding-top: 6px; border-top: 1px solid #3b485c; }
.project-create { justify-content: flex-start; color: var(--primary); }
.nav { flex: 1; padding-bottom: 24px; }
.nav-caption { padding: 0 24px; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 24px; color: var(--ink); font-size: 14px; font-weight: 500; transition: color .15s, background .15s; }
.nav a:hover { background: #ffffff05; }
.nav a:focus-visible { outline-offset: -4px; }
.nav a[aria-current="page"], .nav a[aria-current="page"] svg { color: var(--primary); }
.nav a[aria-current="page"] { background: #2df58b05; }
.nav a[aria-current="page"]::before { position: absolute; content: ""; inset: 0 auto 0 0; width: 2px; background: var(--primary); }
.nav svg { width: 20px; height: 20px; color: var(--muted); }
.sidebar-bottom { border-top: 1px solid var(--line); padding: 12px 0 16px; }
.profile { display: flex; align-items: center; gap: 10px; margin: 12px 16px 0; padding: 10px 12px; border-radius: 28px; background: var(--surface); }
.avatar { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; background: #2e394b; color: #d5dbe5; font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.profile-name { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 1px; }
.profile-name strong, .profile-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-name strong { font-size: 13px; font-weight: 500; }
.profile-name small { color: var(--muted); font-size: 11px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-button:hover { color: var(--ink); background: var(--surface-raised); border-color: #465269; }
.icon-button svg { width: 18px; height: 18px; }
.profile-logout { width: 32px; height: 32px; border: 0; flex-shrink: 0; }
.profile { gap: 6px; padding-inline: 9px; }
.project-option-label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.project-subtitle { font-size: 11px; color: var(--muted); font-weight: 400; overflow-wrap: anywhere; }
.text-danger { color: var(--danger, #ff7d8d); }
.project-meta { color: var(--muted); }
.account-projects { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.account-projects a { color: var(--primary); font-size: 13px; }
.account-projects a:hover { text-decoration: underline; }
.users-table { min-width: 880px; }
.users-table td:first-child { min-width: 190px; }
.users-table td:nth-child(2) { min-width: 150px; }
.account-actions { justify-content: flex-end; }
.account-actions .button { white-space: nowrap; }
#auth-registration-note { margin-top: 18px; }
#auth-back { margin-top: 16px; padding-inline: 0; }
.mobile-menu, .mobile-close, .sidebar-backdrop { display: none; }

.workspace { min-width: 0; min-height: 100dvh; margin-left: var(--sidebar-width); padding: 0 var(--workspace-gutter) 48px; }
.topbar { display: flex; align-items: center; gap: 16px; min-height: 88px; margin-inline: calc(-1 * var(--workspace-gutter)); padding: 18px var(--workspace-gutter); border-bottom: 1px solid var(--line); }
.topbar-label { font-size: 14px; font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.view { max-width: 1360px; margin: 36px auto 0; min-width: 0; }
.view-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; }
.view-heading h1 { font-size: 30px; font-weight: 600; letter-spacing: -.8px; line-height: 1.25; overflow-wrap: anywhere; }
.view-heading h1:focus { outline: none; }
.view-heading p { margin-top: 7px; font-size: 13px; }
.button {
  min-height: 44px; display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  border: 1px solid transparent; border-radius: 14px; padding: 11px 18px; font-size: 13px; font-weight: 600;
  line-height: 1.4; cursor: pointer; text-align: center; transition: background .15s, border-color .15s;
}
.button svg { width: 18px; height: 18px; }
.button-primary { background: var(--accent); color: var(--accent-ink); }
.button-primary:hover { background: var(--primary-hover); }
.button-secondary { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.button-secondary:hover { background: #ffffff05; border-color: #66738a; }
.button-danger { background: #f473890c; border-color: #f4738933; color: var(--danger); }
.button-danger:hover { background: #f4738919; }
.button-quiet { background: transparent; color: var(--muted); }
.button-quiet:hover { background: var(--raised); color: var(--ink); }
button:disabled { opacity: .55; cursor: default; }
.button:disabled:hover { filter: none; }
.notice { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; font-size: .83rem; line-height: 1.45; overflow-wrap: anywhere; }
.notice-error { color: var(--danger); background: #f473890c; border-color: #f4738933; }
#page-error { margin-top: 13px; }
.empty { padding: 27px 17px; color: var(--muted); font-size: .9rem; text-align: center; }
.empty-block { padding: 27px 18px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); text-align: center; line-height: 1.5; }

input, textarea, select {
  width: 100%; min-width: 0; min-height: 40px; padding: 8px 12px; color: var(--ink); background: var(--canvas);
  border: 1px solid var(--line-strong); border-radius: 12px; font-size: 13px;
}
input::placeholder, textarea::placeholder { color: var(--quiet); }
textarea { resize: vertical; }
.form { display: grid; gap: 13px; }
.form label { display: grid; gap: 6px; color: var(--muted); font-size: .83rem; font-weight: 630; }
.form .button-primary { justify-self: stretch; }
.form-help { margin-top: 2px; color: var(--quiet); font-size: .75rem; font-weight: 500; line-height: 1.4; }
.form .diagnostic label { margin-top: 10px; }
.scope-options { min-width: 0; margin: 0; padding: 7px 10px 10px; border: 1px solid var(--line); border-radius: 8px; }
.scope-options legend { padding-inline: 4px; color: var(--muted); font-size: .83rem; font-weight: 630; }
.form .scope-options label { display: flex; align-items: center; gap: 8px; padding-block: 4px; }
.scope-options input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--accent); }

.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 14px; }
.searchbox { position: relative; display: flex; align-items: center; flex: 1 1 225px; min-width: 0; }
.searchbox svg { position: absolute; left: 11px; width: 17px; height: 17px; color: var(--quiet); pointer-events: none; }
.searchbox input { padding-left: 35px; }
.filter-status { flex: 0 1 185px; }
.table-panel, .panel, .integration-panel { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.table-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 17px; }
.table-toolbar h2, .panel h2, .integration-panel h2 { font-size: 1.02rem; letter-spacing: -.025em; }
.table-toolbar .muted { font-size: .77rem; }
.table-scroll { position: relative; overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }
.checks-table { width: 100%; min-width: 555px; border-collapse: collapse; text-align: left; }
.checks-table th, .checks-table td { padding: 11px 13px; border-top: 1px solid var(--line); font-size: .82rem; }
.checks-table th { color: var(--muted); background: #151c28; font-size: 12px; font-weight: 400; }
.checks-table th:first-child, .checks-table td:first-child { padding-left: 17px; }
.checks-table th:last-child, .checks-table td:last-child { padding-right: 17px; text-align: right; }
.checks-table tbody tr:hover { background: #ffffff03; }
.check-person { display: block; font-weight: 680; overflow-wrap: anywhere; }
.check-id { display: block; margin-top: 4px; color: var(--quiet); font-size: .69rem; }
.dossier-main { display: grid; gap: 20px; min-width: 0; }
.dossier-actions { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.dossier-action-menu { position: relative; }
.dossier-action-menu > summary { list-style: none; font-size: 22px; cursor: pointer; }
.dossier-action-menu > summary::-webkit-details-marker { display: none; }
.dossier-action-options {
  position: absolute; z-index: 12; top: calc(100% + 7px); right: 0; min-width: 190px;
  padding: 5px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface);
  box-shadow: 0 12px 30px #0004;
}
.dossier-action-options .button { width: 100%; justify-content: flex-start; white-space: nowrap; }
.manual-review-summary { margin: -8px 0 20px; border: 1px solid #2df58b33; border-radius: 10px; background: #2df58b06; font-size: 12px; }
.manual-review-summary > summary { padding: 12px 15px; cursor: pointer; }
.manual-review-summary > summary strong { color: var(--primary); margin-right: 10px; }
.manual-review-content { display: grid; gap: 7px; padding: 0 15px 14px; overflow-wrap: anywhere; white-space: pre-wrap; }
.dossier-antifraud .panel-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.fraud-title { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; }
.fraud-risk { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.fraud-risk::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.fraud-risk[data-level="low"] { color: var(--primary); }
.fraud-risk[data-level="medium"] { color: var(--warn); }
.fraud-risk[data-level="high"], .fraud-risk[data-level="critical"] { color: var(--danger); }
.fraud-score { flex-shrink: 0; color: var(--muted); font: 12px ui-monospace, SFMono-Regular, Consolas, monospace; cursor: help; }
.fraud-content { padding: 15px 20px; font-size: 12px; }
.fraud-signals { display: grid; gap: 8px; }
.fraud-signal { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--canvas); }
.fraud-signal > summary { padding: 11px 12px; cursor: pointer; overflow-wrap: anywhere; }
.fraud-signal > summary strong { font-weight: 500; }
.fraud-related-count { display: inline-block; margin-left: 7px; min-width: 19px; padding: 2px 5px; border-radius: 5px; background: #ffffff08; color: var(--muted); text-align: center; font-size: 10px; }
.fraud-signal-content { display: grid; gap: 10px; padding: 0 12px 12px; color: var(--muted); overflow-wrap: anywhere; }
.fraud-related { display: grid; gap: 5px; }
.fraud-related-link { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 8px; color: var(--primary); font-size: 12px; }
.fraud-related-link small { color: var(--muted); font-size: 10px; }
.fraud-related-link svg { width: 13px; height: 13px; flex-shrink: 0; }
.fraud-related-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.fraud-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; margin-top: 13px; color: var(--quiet); font-size: 10px; }
.fraud-coverage { margin-top: 12px; color: var(--muted); font-size: 11px; }
@media (max-width: 560px) {
  .dossier-main { gap: 13px; }
  .dossier-actions { max-width: 100%; }
  .fraud-content { padding: 12px 14px; }
  .manual-review-summary > summary .muted { display: block; margin-top: 4px; }
}
.table-footer { border-top: 1px solid var(--line); padding: 12px; display: flex; justify-content: center; }
.status {
  display: inline-flex; align-items: center; gap: 6px; width: max-content; max-width: 100%; padding: 5px 8px;
  border: 1px solid var(--line-strong); border-radius: 22px; background: #ffffff05; color: var(--muted); font-size: .73rem; font-weight: 600; line-height: 1.2;
}
.status::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: currentColor; }
.status[data-status="passed"], .status[data-status="accepted"] { background: #2df58b0e; border-color: #2df58b33; color: var(--primary); }
.status[data-status="failed"], .status[data-status="rejected"] { background: #f473890c; border-color: #f4738933; color: var(--danger); }
.status[data-status="in_progress"], .status[data-status="retry"], .status[data-status="retry_required"], .status[data-status="started"] { background: #e5b9690e; border-color: #e5b96933; color: var(--warn); }

.panel { padding: clamp(13px, 2vw, 20px); }
.panel > .muted, .integration-panel > .muted { margin-top: 7px; font-size: .84rem; }
.breadcrumb { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .84rem; margin-bottom: 12px; }
.breadcrumb svg { width: 16px; height: 16px; transform: rotate(180deg); }
.breadcrumb:hover { color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.inline-link { color: var(--primary); font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.inline-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.data-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; margin: 0; }
.data-grid > div { min-width: 0; }
.data-grid dt { color: var(--muted); font-size: .74rem; overflow-wrap: anywhere; }
.data-grid dd { margin: 3px 0 0; font-size: .89rem; overflow-wrap: anywhere; }
.data-grid small { display: block; margin-top: 3px; font-size: .69rem; color: var(--muted); }
.diagnostic { margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); }
.diagnostic summary { cursor: pointer; color: var(--muted); font-size: .82rem; }

.dashboard-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.dashboard-toolbar > p { font-size: 12px; }
.dashboard-periods { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--sidebar); }
.dashboard-periods .segment { padding: 6px 10px; font-size: 12px; white-space: nowrap; }
.dashboard-content { display: grid; gap: 16px; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dashboard-metric { display: grid; align-content: space-between; gap: 6px; min-width: 0; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.dashboard-metric[data-series="total"] { background: linear-gradient(125deg, #17352b, var(--panel) 85%); border-color: #2d5944; }
.dashboard-metric strong { font-size: clamp(22px, 2vw, 29px); font-weight: 600; line-height: 1.1; letter-spacing: -.04em; overflow-wrap: anywhere; }
.dashboard-metric[data-series="total"] strong { color: var(--primary); }
.dashboard-series { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.dashboard-series::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; background: var(--series-color, var(--muted)); }
.dashboard-metric[data-series="total"] > .dashboard-series { --series-color: var(--primary); }
.dashboard-metric strong, .dashboard-tooltip b, .dashboard-plot text { font-variant-numeric: tabular-nums; }
.dashboard-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dashboard-chart { padding: 14px 14px 8px; }
.dashboard-chart h2 { margin-inline: 3px; }
.dashboard-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 8px 3px; min-height: 18px; }
.dashboard-plot { position: relative; min-width: 0; height: 230px; border-radius: 7px; }
.dashboard-plot svg { width: 100%; height: 100%; }
.dashboard-plot text { font-size: 11px; fill: var(--muted); stroke: none; }
.dashboard-gridline { stroke: #334050; stroke-width: 1; }
.dashboard-curve { stroke: var(--series-color); stroke-width: 2; fill: none; }
.dashboard-guide { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.dashboard-dot { fill: var(--series-color); stroke: var(--panel); stroke-width: 2; }
.dashboard-hit { fill: transparent; stroke: none; cursor: crosshair; touch-action: pan-y; }
.dashboard-tooltip { position: absolute; z-index: 1; top: 3px; width: max-content; min-width: 132px; max-width: calc(100% - 12px); pointer-events: none; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 10px; background: #101925f5; box-shadow: 0 6px 20px #0005; font-size: 12px; }
.dashboard-tooltip > strong { color: var(--ink); display: block; margin-bottom: 4px; font-weight: 600; }
.dashboard-tooltip-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.dashboard-tooltip-row > b { flex-shrink: 0; }
.dashboard-empty { display: grid; justify-items: center; gap: 12px; }
#dashboard-content [data-series="total"] { --series-color: #769cff; }
#dashboard-content [data-series="passed"] { --series-color: var(--primary); }
#dashboard-content [data-series="in_progress"], #dashboard-content [data-series="rejected"] { --series-color: var(--warn); }
#dashboard-content [data-series="failed"] { --series-color: var(--danger); }
#dashboard-content [data-series="canceled"] { --series-color: #b5a1ee; }
#dashboard-content [data-series="expired"] { --series-color: var(--muted); }

.integration-content { display: grid; gap: 12px; }
.integration-panel { padding: clamp(13px, 2vw, 20px); }
.webhook-actions { margin-top: 10px; }
.keys { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.key-head, .key-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 7px 12px; }
.key-head h3 { font-size: .94rem; }
.key-row { margin-top: 7px; padding: 8px 10px; border-radius: 8px; background: var(--canvas); font-size: 13px; }
.key-row small { display: block; color: var(--quiet); margin-top: 4px; }
.integration-panel h3 { margin-top: 12px; font-size: .88rem; }
.code-block { margin-top: 8px; }
.code-block pre { margin: 0; padding: 11px; max-height: 230px; overflow: auto; color: #c7d1df; background: var(--canvas); border: 1px solid var(--line); border-radius: 8px; font-size: 12px; line-height: 1.5; }
.code-block .button { margin-top: 7px; }

.api-key-panel .table-toolbar { flex-wrap: wrap; padding: 16px 20px; }
.api-key-table { width: 100%; min-width: 560px; border-collapse: collapse; text-align: left; }
.api-key-table th, .api-key-table td { padding: 12px 16px; border-top: 1px solid var(--line); }
.api-key-table th { color: var(--muted); background: #151c28; font-size: 12px; font-weight: 500; }
.api-key-table td { font-size: 13px; }
.api-key-table th:last-child, .api-key-table td:last-child { text-align: right; }
.api-key-table .button { min-height: 34px; padding: 7px 12px; border-radius: 10px; font-size: 12px; }
.api-key-table .status[data-status="active"] { color: var(--primary); background: #2df58b0e; border-color: #2df58b33; }
.api-legacy-key { display: block; margin-top: 2px; font-size: 11px; }
.api-credential-field { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.api-credential-field > label { flex: 1 1 180px; }
.api-credential-field > .button { min-height: 40px; }

.dialog[open]:has(.api-docs) { display: flex; flex-direction: column; width: min(740px, calc(100vw - 28px)); overflow: hidden; }
.api-docs { display: grid; gap: 12px; min-height: 0; overflow-y: auto; }
.api-docs > section { min-width: 0; padding: clamp(12px, 2.3vw, 18px); border: 1px solid var(--line-strong); border-radius: 12px; }
.api-docs h3 { font-size: 15px; font-weight: 650; }
.api-docs p { margin-top: 6px; color: var(--muted); line-height: 1.55; overflow-wrap: anywhere; }
.api-docs code { color: var(--primary); font-size: .9em; overflow-wrap: anywhere; }
.api-formula { display: block; margin-top: 8px; padding: 8px 10px; border-radius: 6px; background: var(--canvas); }
.api-auth-fields { display: grid; gap: 0; margin: 10px 0 0; }
.api-auth-fields > div { display: grid; grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr); gap: 6px 12px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 12px; }
.api-auth-fields dt { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); overflow-wrap: anywhere; }
.api-auth-fields dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.api-endpoint { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); }
.api-endpoint h4 { font-size: 13px; }
.api-docs .code-block pre { max-height: none; }

.dialog {
  width: min(500px, calc(100vw - 28px)); max-height: calc(100dvh - 34px); overflow: auto; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 14px; padding: 19px; box-shadow: 0 18px 65px #0008;
}
.dialog::backdrop { background: #0009; }
.dialog[open]:has(.passport-preview) { width: min(680px, calc(100vw - 28px)); }
.passport-preview .form { gap: 9px; }
.passport-preview .form .button-primary { justify-self: start; }
.passport-preview-result.dossier-grid { grid-template-columns: minmax(0, 1fr); margin-top: 15px; }
.passport-preview-result:empty { display: none; }
.passport-preview-progress { font-size: 13px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.dialog-head h2 { font-size: 1.3rem; letter-spacing: -.03em; }
.dialog > .muted { margin: -3px 0 12px; font-size: .87rem; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.toast { position: fixed; z-index: 45; right: 16px; bottom: 17px; max-width: calc(100% - 32px); padding: 10px 13px; color: var(--ink); background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: 9px; font-size: 13px; line-height: 1.4; box-shadow: 0 8px 25px #0007; }

@media (max-width: 1240px) {
  :root { --sidebar-width: 240px; --workspace-gutter: 28px; }
  .view { margin-top: 28px; }
}
@media (max-width: 960px) {
  .sidebar { width: 280px; max-width: calc(100vw - 40px); transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
  .workspace { margin-left: 0; }
  .mobile-menu, .mobile-close { display: inline-flex; flex-shrink: 0; }
  .menu-open { overflow: hidden; }
  .menu-open .sidebar { transform: translateX(0); visibility: visible; transition: transform .2s ease; }
  .sidebar-backdrop:not([hidden]) { position: fixed; inset: 0; z-index: 35; display: block; width: 100%; padding: 0; border: 0; background: #0009; }
  .sidebar-brand-row { height: 80px; }
  .topbar { min-height: 72px; padding-block: 12px; }
}
@media (max-width: 690px) {
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-charts { grid-template-columns: minmax(0, 1fr); }
  .dashboard-plot { height: 190px; }
  .auth-view { grid-template-columns: minmax(0, 1fr); }
  .auth-hero { min-height: auto; padding: 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-message { padding: 22px 0 7px; max-width: 480px; }
  .auth-message h1 { font-size: clamp(1.9rem, 8vw, 2.8rem); }
  .auth-message > p:last-child { font-size: .85rem; }
  .auth-orbit { opacity: .5; }
  .auth-main { padding: 19px 20px 36px; }
  .data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-status { flex: 1 1 120px; }
}
@media (max-width: 640px) {
  :root { --workspace-gutter: 16px; }
  .workspace { padding-bottom: 32px; }
  .topbar { min-height: 64px; padding-block: 10px; gap: 10px; }
  .topbar-label { font-size: 12px; }
  .view { margin-top: 24px; }
  .view-heading { align-items: flex-start; gap: 12px; margin-bottom: 24px; }
  .view-heading h1 { font-size: 25px; }
  .view-heading p { font-size: 12px; }
  .view-heading .button { min-height: 40px; padding: 10px 12px; font-size: 12px; }
  .view-heading .button svg { width: 16px; height: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .sidebar, .menu-open .sidebar { transition: none; }
}
