/* ==========================================================================
   WindPower UI 路 design system
   ========================================================================== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC",
    "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .2s ease, color .2s ease;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: rgba(13, 148, 136, .18); }

:root {
  --bg: #f3f6fa;
  --bg-grid: rgba(15, 118, 110, .035);
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef3f8;
  --border: #e3e9f1;
  --border-strong: #cfd9e5;
  --text: #0f1f2e;
  --text-soft: #5a6b7d;
  --text-mute: #8b99aa;
  --brand: #0f766e;
  --brand-strong: #0b5f58;
  --brand-soft: #e7f5f2;
  --accent: #0ea5e9;
  --accent-soft: #e6f4fd;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --success: #059669;
  --success-soft: #ecfdf5;
  --sidebar: #0a1926;
  --sidebar-2: #07131f;
  --sidebar-text: #c3d1df;
  --sidebar-mute: #7d92a6;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 28px -16px rgba(16, 24, 40, .22);
  --radius: 16px;
  --radius-sm: 10px;
}
html[data-theme="dark"] {
  --bg: #07111a;
  --bg-grid: rgba(45, 212, 191, .04);
  --surface: #0e1a24;
  --surface-2: #122230;
  --surface-3: #17293a;
  --border: #1e3141;
  --border-strong: #2a4156;
  --text: #e7eff7;
  --text-soft: #a8b8c7;
  --text-mute: #7d90a3;
  --brand: #2dd4bf;
  --brand-strong: #5eead4;
  --brand-soft: #0d2b2a;
  --accent: #38bdf8;
  --accent-soft: #0b2536;
  --danger: #f87171;
  --danger-soft: #2a1618;
  --warning: #fbbf24;
  --warning-soft: #2a2110;
  --success: #34d399;
  --success-soft: #0d2a22;
  --sidebar: #060e16;
  --sidebar-2: #040a10;
  --sidebar-text: #b9c9d8;
  --sidebar-mute: #74889b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 16px 40px -20px rgba(0, 0, 0, .65);
}

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex: 0 0 248px;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  color: var(--sidebar-text);
  display: flex; flex-direction: column;
  padding: 22px 16px 16px;
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  border-right: 1px solid rgba(255, 255, 255, .04);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 8px 22px; color: #fff;
}
.brand:hover { color: #fff; }
.brand img { filter: drop-shadow(0 4px 14px rgba(45, 212, 191, .25)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 17px; letter-spacing: .4px; }
.brand-text small { font-size: 11px; color: var(--sidebar-mute); letter-spacing: .3px; }
.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--sidebar-text); font-size: 14px; font-weight: 500;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(45, 212, 191, .18), rgba(45, 212, 191, .05));
  color: #fff; box-shadow: inset 2px 0 0 #2dd4bf;
}
.nav-item .icon { color: var(--sidebar-mute); }
.nav-item.active .icon, .nav-item:hover .icon { color: #2dd4bf; }
.nav-divider { height: 1px; background: rgba(255, 255, 255, .07); margin: 12px 4px; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.user-card {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 12px; padding: 10px;
}
.user-card .user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.user-card .user-meta strong { font-size: 13px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card .user-meta span { font-size: 11px; color: var(--sidebar-mute); }
.user-card .icon-btn { margin-left: auto; color: var(--sidebar-mute); }
.user-card .icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.version { text-align: center; font-size: 11px; color: var(--sidebar-mute); }

.main { flex: 1; min-width: 0; margin-left: 248px; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 28px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.page-heading h1 { font-size: 20px; font-weight: 650; letter-spacing: -.2px; }
.page-heading p { font-size: 12.5px; color: var(--text-mute); margin-top: 2px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.status-dot {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-mute);
  padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface);
}
.status-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.topbar .menu-btn { display: none; }
.content { padding: 24px 28px 8px; max-width: 1540px; width: 100%; margin: 0 auto; flex: 1; }
.footer {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 26px 4px 18px; color: var(--text-mute); font-size: 12px;
}

/* ---------- icons / buttons ---------- */
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-soft);
  cursor: pointer; transition: all .15s ease;
}
.icon-btn:hover { color: var(--brand); border-color: var(--border-strong); background: var(--surface-2); }
.icon-btn.ghost { border-color: transparent; background: transparent; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-weight: 600; font-size: 13.5px;
  cursor: pointer; white-space: nowrap; transition: all .15s ease;
}
.btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
  border: 1px solid transparent; color: #fff;
  background: linear-gradient(135deg, #0f766e, #0e7490);
  box-shadow: 0 8px 18px -10px rgba(15, 118, 110, .75);
}
.btn-primary:hover { background: linear-gradient(135deg, #0b5f58, #0c6480); color: #fff; }
.btn-soft { border-color: transparent; background: var(--brand-soft); color: var(--brand-strong); }
.btn-soft:hover { background: var(--brand-soft); filter: brightness(.97); }
.btn-danger { border-color: transparent; background: var(--danger-soft); color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn .icon { width: 16px; height: 16px; }

/* theme toggle */
.theme-moon { display: none; }
html[data-theme="dark"] .theme-sun { display: none; }
html[data-theme="dark"] .theme-moon { display: block; }

/* user menu */
.user-menu { position: relative; }
.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 5px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  transition: all .15s ease;
}
.user-chip:hover { border-color: var(--border-strong); }
.user-chip-name { font-size: 13px; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .chevron { width: 14px; height: 14px; color: var(--text-mute); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #14b8a6, #0ea5e9);
  color: #fff; font-weight: 700; font-size: 13px; flex: 0 0 auto;
}
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.user-card .avatar { width: 30px; height: 30px; font-size: 12px; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 178px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; display: none; z-index: 60;
}
.user-menu.open .dropdown { display: block; animation: pop .14s ease; }
.dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px; color: var(--text); font-size: 13px;
}
.dropdown a:hover { background: var(--surface-2); }
.dropdown a.danger { color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border); margin: 5px 4px; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- cards & grids ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 20px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h3 { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-head h3 .icon { color: var(--brand); }
.card-head .sub { font-size: 12px; color: var(--text-mute); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--text-mute); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 650; color: var(--text-soft); display: flex; align-items: center; gap: 6px; }
.field .hint { font-size: 11.5px; color: var(--text-mute); line-height: 1.5; }
.input, select.input, textarea.input {
  width: 100%; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.input:hover { border-color: var(--border-strong); }
.input:focus, select.input:focus, textarea.input:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-mute) 50%), linear-gradient(135deg, var(--text-mute) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
.check {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); transition: all .15s ease; font-size: 13px;
}
.check:hover { border-color: var(--border-strong); }
.check input { width: 16px; height: 16px; }
.check.checked { border-color: var(--brand); background: var(--brand-soft); }
.seg { display: inline-flex; padding: 3px; background: var(--surface-3); border-radius: 10px; gap: 2px; }
.seg button {
  border: 0; background: transparent; padding: 6px 12px; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--text-soft); cursor: pointer;
}
.seg button.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }

/* ---------- kpi ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 14px; }
.kpi {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 18px; overflow: hidden;
}
.kpi::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: linear-gradient(180deg, #14b8a6, #0ea5e9); opacity: .85;
}
.kpi-label { font-size: 12px; color: var(--text-mute); display: flex; align-items: center; gap: 6px; }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -.5px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi-unit { font-size: 12px; font-weight: 500; color: var(--text-mute); margin-left: 3px; }
.kpi-sub { font-size: 11.5px; color: var(--text-mute); margin-top: 2px; }
.kpi.good .kpi-value { color: var(--success); }
.kpi.warn .kpi-value { color: var(--warning); }
.kpi.bad .kpi-value { color: var(--danger); }

/* ---------- chart ---------- */
.chart { width: 100%; height: 430px; }
.chart-sm { height: 320px; }
.chart-empty { display: flex; align-items: center; justify-content: center; height: 430px; color: var(--text-mute); flex-direction: column; gap: 10px; }
.chart-loading { position: relative; }
.chart-loading::after {
  content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--surface) 55%, transparent);
  backdrop-filter: blur(1px); border-radius: 12px;
}
.model-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--text-soft);
  cursor: pointer; transition: all .15s ease;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--chip-color, var(--text-mute)); }
.chip:hover { border-color: var(--border-strong); }
.chip.active { color: var(--text); border-color: color-mix(in srgb, var(--chip-color, var(--brand)) 45%, var(--border)); background: color-mix(in srgb, var(--chip-color, var(--brand)) 8%, var(--surface)); }
.chip:not(.active) { opacity: .55; }

/* ---------- tables ---------- */
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.data th {
  position: sticky; top: 0; z-index: 1;
  background: var(--surface-2); color: var(--text-soft);
  font-weight: 650; font-size: 12px; text-align: left; white-space: nowrap;
  padding: 11px 14px; border-bottom: 1px solid var(--border);
}
table.data td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tr.row-best { background: color-mix(in srgb, var(--brand) 7%, transparent); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.err-pos { color: var(--danger); }
table.data td.err-neg { color: var(--accent); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.pager .info { font-size: 12px; color: var(--text-mute); }
.pager .btns { display: flex; gap: 8px; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 650;
  background: var(--surface-3); color: var(--text-soft); white-space: nowrap;
}
.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.warn { background: var(--warning-soft); color: var(--warning); }
.badge.bad { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--accent-soft); color: var(--accent); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- alerts / notes ---------- */
.note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px; font-size: 12.5px; line-height: 1.6;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-soft);
}
.note .icon { margin-top: 1px; color: var(--text-mute); }
.note.info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, var(--border)); color: var(--text); }
.note.warn { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 25%, var(--border)); color: var(--text); }
.note.danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 25%, var(--border)); color: var(--text); }
.note.success { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 25%, var(--border)); color: var(--text); }
.note .icon { flex: 0 0 auto; }
.note strong { color: var(--text); }

/* ---------- empty / loading ---------- */
.empty { text-align: center; padding: 56px 20px; color: var(--text-mute); }
.empty .icon { width: 40px; height: 40px; margin-bottom: 12px; color: var(--border-strong); }
.empty h3 { font-size: 15px; color: var(--text); margin-bottom: 6px; }
.empty p { font-size: 13px; margin-bottom: 16px; }
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--brand) 25%, transparent);
  border-top-color: var(--brand); animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- toast ---------- */
.toast-root { position: fixed; right: 20px; top: 18px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast {
  min-width: 240px; max-width: 380px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-left: 3px solid var(--brand);
  border-radius: 12px; box-shadow: var(--shadow);
  padding: 11px 14px; font-size: 13px; animation: toastIn .18s ease;
  display: flex; gap: 10px; align-items: flex-start;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warning); }
.toast .icon { margin-top: 1px; }
.toast.leaving { animation: toastOut .18s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-6px); } }

/* ---------- progress ---------- */
.progress { height: 10px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #14b8a6, #0ea5e9); transition: width .35s ease; }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--text-mute); margin-top: 8px; }
.job-stage { font-size: 13px; color: var(--text-soft); margin-top: 10px; min-height: 20px; }
.job-error { margin-top: 12px; }

/* ---------- dropzone ---------- */
.dropzone {
  border: 1.5px dashed var(--border-strong); border-radius: 14px;
  padding: 28px 20px; text-align: center; cursor: pointer;
  background: var(--surface-2); transition: all .18s ease;
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .icon { width: 30px; height: 30px; color: var(--brand); margin-bottom: 10px; }
.dropzone strong { display: block; font-size: 14px; margin-bottom: 4px; }
.dropzone span { font-size: 12px; color: var(--text-mute); }
.dropzone.has-file { border-style: solid; border-color: var(--brand); background: var(--brand-soft); }
.file-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
  padding: 6px 12px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--border); font-size: 12px; color: var(--text);
}

/* ---------- verdict ---------- */
.verdict {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px; border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, #0f766e, #0e7490);
}
.verdict.fail { background: linear-gradient(135deg, #b91c1c, #dc2626); }
.verdict.partial { background: linear-gradient(135deg, #b45309, #d97706); }
.verdict .icon { width: 28px; height: 28px; }
.verdict h2 { font-size: 20px; font-weight: 700; }
.verdict p { font-size: 12.5px; opacity: .85; margin-top: 2px; }
.verdict .score { margin-left: auto; text-align: right; }
.verdict .score strong { font-size: 26px; font-weight: 750; letter-spacing: -.5px; }
.verdict .score span { font-size: 11.5px; opacity: .85; display: block; }

/* ---------- report sections ---------- */
.section-title { font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.section-title .icon { color: var(--brand); }
.ai-block { display: flex; flex-direction: column; gap: 14px; }
.ai-block .ai-item { border-left: 3px solid var(--brand); padding: 2px 0 2px 14px; }
.ai-block .ai-item h4 { font-size: 13px; color: var(--brand); margin-bottom: 4px; }
.ai-block .ai-item p { font-size: 13px; color: var(--text-soft); white-space: pre-wrap; line-height: 1.75; }
.report-plot { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #fff; }
.report-plot img { width: 100%; height: auto; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.02fr .98fr; background: var(--bg); }
.auth-aside {
  position: relative; overflow: hidden; color: #e6f7f5;
  background:
    radial-gradient(900px 460px at 8% 12%, rgba(45, 212, 191, .28), transparent 60%),
    radial-gradient(700px 420px at 92% 88%, rgba(14, 165, 233, .22), transparent 60%),
    linear-gradient(160deg, #07131f 0%, #0a2230 55%, #062b2a 100%);
  padding: 48px 54px; display: flex; flex-direction: column;
}
.auth-aside::before, .auth-aside::after {
  content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(94, 234, 212, .16);
}
.auth-aside::before { width: 620px; height: 620px; right: -220px; top: -160px; }
.auth-aside::after { width: 420px; height: 420px; right: -110px; top: -60px; border-color: rgba(56, 189, 248, .14); }
.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.auth-brand strong { font-size: 18px; letter-spacing: .5px; }
.auth-brand small { display: block; font-size: 11px; color: #7fa6b5; letter-spacing: .4px; }
.auth-hero { margin-top: auto; margin-bottom: auto; position: relative; z-index: 1; max-width: 460px; }
.auth-hero h1 { font-size: 34px; line-height: 1.25; font-weight: 700; letter-spacing: -.5px; }
.auth-hero h1 em { font-style: normal; color: #5eead4; }
.auth-hero p { margin-top: 14px; color: #a9c4cf; font-size: 14px; line-height: 1.8; }
.auth-features { margin-top: 30px; display: flex; flex-direction: column; gap: 14px; }
.auth-feature { display: flex; gap: 12px; align-items: flex-start; }
.auth-feature .ico {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: rgba(45, 212, 191, .12); border: 1px solid rgba(45, 212, 191, .22); color: #5eead4;
}
.auth-feature strong { font-size: 13.5px; display: block; }
.auth-feature span { font-size: 12px; color: #8fb0bd; }
.auth-foot { position: relative; z-index: 1; font-size: 11.5px; color: #6d92a1; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 36px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 26px; font-weight: 700; letter-spacing: -.3px; }
.auth-card .lead { color: var(--text-mute); font-size: 13px; margin-top: 6px; margin-bottom: 26px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.auth-switch { text-align: center; font-size: 13px; color: var(--text-mute); margin-top: 18px; }
.auth-switch a { font-weight: 650; }
.auth-error {
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--border));
  color: var(--danger); border-radius: 10px; padding: 10px 12px; font-size: 12.5px;
}
.auth-error .icon { width: 16px; height: 16px; margin-top: 1px; }
.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-row .input { flex: 1; }
.captcha-img { width: 132px; height: 40px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: var(--surface-2); }

/* ---------- error page ---------- */
.error-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.error-card { text-align: center; max-width: 440px; }
.error-code { font-size: 76px; font-weight: 800; letter-spacing: -3px; background: linear-gradient(135deg, #14b8a6, #0ea5e9); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.error-card h1 { font-size: 20px; margin: 12px 0 8px; }
.error-card p { color: var(--text-mute); font-size: 13px; margin-bottom: 22px; }

/* ---------- misc ---------- */
.stat-line { display: flex; align-items: baseline; gap: 8px; }
.stat-line strong { font-size: 20px; }
.stat-line span { font-size: 12px; color: var(--text-mute); }
.scrim { position: fixed; inset: 0; background: rgba(3, 10, 18, .5); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.meta-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.meta-item span { display: block; font-size: 11.5px; color: var(--text-mute); }
.meta-item strong { display: block; font-size: 14px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.toolbar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.toolbar .field { min-width: 170px; }
.toolbar .field.grow { flex: 1; min-width: 240px; }
.pill-note { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-mute); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
  .app.sidebar-open .sidebar { transform: none; }
  .app.sidebar-open .scrim { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .topbar .menu-btn { display: inline-flex; }
}
@media (max-width: 900px) {
  .content { padding: 18px 16px 6px; }
  .topbar { padding: 12px 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .chart { height: 360px; }
}
@media (max-width: 640px) {
  .page-heading h1 { font-size: 17px; }
  .page-heading p { display: none; }
  .status-dot { display: none; }
  .user-chip-name { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-value { font-size: 23px; }
  .card { padding: 16px; }
  .verdict { flex-wrap: wrap; }
  .verdict .score { margin-left: 0; text-align: left; }
  .toolbar .field { min-width: 100%; }
}