:root {
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #0b172a;
  --ink-soft: #33445c;
  --muted: #65758b;
  --muted-strong: #4b5e77;
  --canvas: #f4f7fb;
  --surface: #ffffff;
  --surface-muted: #f7f9fc;
  --surface-blue: #f1f6ff;
  --line: #dce3ec;
  --line-strong: #c7d1de;
  --brand: #245bdc;
  --brand-hover: #1849bf;
  --brand-soft: #eaf1ff;
  --cyan: #49b8e8;
  --success: #087a55;
  --success-bg: #e9f8f2;
  --warning: #976006;
  --warning-bg: #fff6dc;
  --danger: #b23a48;
  --danger-bg: #fff0f2;
  --info: #1e5dc6;
  --info-bg: #edf4ff;
  --navy: #071426;
  --navy-soft: #0d1d32;
  --focus: #78a7ff;
  --radius-xs: 6px;
  --radius-sm: 9px;
  --radius-md: 13px;
  --radius-lg: 18px;
  --shadow-xs: 0 1px 2px rgba(8, 20, 39, .04);
  --shadow-sm: 0 8px 24px rgba(8, 20, 39, .06);
  --shadow-lg: 0 24px 65px rgba(3, 15, 33, .16);
  --sidebar: 264px;
  --content: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); font-family: var(--font-sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
body.sidebar-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }
img, svg { display: block; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.14; letter-spacing: -.025em; }
p { color: var(--muted-strong); }
.skip-link { position: fixed; z-index: 999; top: 10px; left: 10px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.icon { width: 18px; height: 18px; fill: currentColor; flex: 0 0 auto; }

/* Brand and public account header */
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 17px; font-weight: 760; letter-spacing: -.035em; white-space: nowrap; }
.brand-lockup img { width: 34px; height: 34px; }
.brand-period { color: var(--brand); }
.app-navbar { position: relative; z-index: 80; border-bottom: 1px solid rgba(220,227,236,.9); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); }
.app-navbar-inner { width: min(100% - 40px, 1240px); height: 72px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.navbar-logo { color: var(--ink); }
.guest-nav { display: flex; align-items: center; gap: 26px; font-size: 13px; font-weight: 650; }
.guest-nav > a:not(.btn) { color: var(--muted-strong); }
.mobile-user { display: none; align-items: center; gap: 10px; margin-left: auto; font-size: 12px; color: var(--muted); }
.mobile-user a, .avatar, .user-chip > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 800; }
.icon-button { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); cursor: pointer; }
.sidebar-toggle, .sidebar-close { display: none; }

/* Buttons */
.btn { min-height: 42px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--radius-sm); font-size: 13px; font-weight: 720; line-height: 1; cursor: pointer; text-decoration: none; transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 5px 14px rgba(36,91,220,.18); }
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-secondary { border-color: #ced9e8; background: var(--surface); color: var(--ink); }
.btn-secondary:hover, .btn-outline:hover { border-color: #aebbd0; background: var(--surface-muted); color: var(--ink); }
.btn-outline { border-color: var(--line); background: var(--surface); color: var(--ink-soft); }
.btn-ghost { background: transparent; color: var(--muted-strong); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #982f3c; color: #fff; }
.btn-sm { min-height: 36px; padding-inline: 13px; font-size: 12px; }
.btn-lg { min-height: 48px; padding-inline: 21px; font-size: 14px; }
.btn-block { width: 100%; }

/* Guest authentication */
.auth-screen { background: var(--surface); }
.auth-screen .app-navbar { position: absolute; inset: 0 0 auto; border: 0; background: transparent; }
.auth-screen .app-navbar-inner { width: calc(100% - 64px); max-width: none; }
.auth-screen .navbar-logo .brand-lockup { color: #fff; }
.auth-screen .guest-nav > a:not(.btn) { color: #41546c; }
.auth-screen .guest-nav .btn { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.1); box-shadow: none; }
.auth-layout { min-height: calc(100vh - 48px); display: grid; grid-template-columns: minmax(420px, .92fr) minmax(520px, 1.08fr); }
.auth-context { position: relative; overflow: hidden; display: grid; place-items: center; min-height: 720px; padding: 132px 64px 80px; background: var(--navy); color: #fff; }
.auth-context::before { content: ""; position: absolute; width: 620px; height: 620px; top: -340px; left: -270px; border: 1px solid rgba(83,137,255,.18); border-radius: 50%; box-shadow: 0 0 0 70px rgba(44,99,225,.035), 0 0 0 140px rgba(44,99,225,.025); }
.auth-context::after { content: ""; position: absolute; width: 420px; height: 420px; right: -260px; bottom: -180px; background: radial-gradient(circle, rgba(36,91,220,.32), transparent 66%); }
.auth-context-inner { position: relative; z-index: 1; width: min(100%, 520px); }
.eyebrow { margin-bottom: 18px; color: #79a5ff; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.auth-context h2 { max-width: 520px; margin-bottom: 20px; color: #fff; font-size: clamp(34px, 4vw, 54px); letter-spacing: -.055em; }
.auth-context > div > p:not(.eyebrow) { max-width: 470px; color: #a8b7cb; font-size: 16px; }
.auth-signal-card { margin-top: 42px; padding: 16px; border: 1px solid rgba(160,185,220,.16); border-radius: var(--radius-md); background: rgba(14,31,54,.82); box-shadow: 0 28px 70px rgba(0,0,0,.2); }
.signal-head { display: flex; justify-content: space-between; padding: 3px 4px 14px; color: #93a5bb; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; }
.signal-head i { width: 7px; height: 7px; border-radius: 50%; background: #22c997; box-shadow: 0 0 0 4px rgba(34,201,151,.11); }
.signal-row { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; padding: 12px; border-top: 1px solid rgba(160,185,220,.1); color: #dce6f2; font-size: 12px; }
.signal-row small { color: #7f93aa; }
.signal-check { color: #38d39f; }
.signal-result { display: flex; justify-content: space-between; margin-top: 8px; padding: 14px 15px; border-radius: 9px; background: rgba(15,124,86,.17); color: #9fb2c8; font-size: 12px; }
.signal-result strong { color: #65e0b2; }
.auth-trust { display: flex; gap: 24px; margin-top: 25px; color: #8396ad; font-size: 11px; }
.auth-trust span::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 8px 1px 0; border-radius: 50%; background: #4da6ff; }
.auth-panel { display: grid; place-items: center; padding: 120px 64px 72px; background: var(--surface); }
.auth-panel-inner { width: min(100%, 450px); }
.auth-card-head { margin-bottom: 29px; }
.auth-card-head .auth-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 23px; border-radius: 13px; background: var(--brand-soft); color: var(--brand); }
.auth-card-head .auth-icon.success { background: var(--success-bg); color: var(--success); }
.auth-card-head .auth-icon.danger { background: var(--danger-bg); color: var(--danger); }
.auth-card-head .auth-icon .icon { width: 23px; height: 23px; }
.auth-card-head h1 { margin-bottom: 9px; font-size: 30px; letter-spacing: -.045em; }
.auth-card-head p { margin-bottom: 0; color: var(--muted); font-size: 14px; }
.auth-note { margin: 23px 0; padding: 15px 16px; border: 1px solid #d8e4f5; border-radius: var(--radius-sm); background: var(--surface-blue); color: var(--ink-soft); font-size: 13px; }
.auth-note strong { color: var(--ink); }
.auth-switch { margin-top: 25px; padding-top: 22px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 13px; }
.auth-switch a { font-weight: 720; }
.auth-footer, .compact-footer { min-height: 48px; background: var(--surface); color: var(--muted); font-size: 11px; }
.auth-footer { position: relative; display: flex; justify-content: flex-end; align-items: center; gap: 34px; padding: 0 40px; }
.auth-footer nav, .compact-footer nav { display: flex; gap: 20px; }
.auth-footer a, .compact-footer a { color: var(--muted); }

/* Forms */
.form-group { margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 720; }
.form-label a { font-weight: 650; }
.form-control, .form-input, input[type="text"], input[type="email"], input[type="password"], input[type="tel"], select, textarea { width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); outline: 0; background: var(--surface); color: var(--ink); transition: border-color .16s, box-shadow .16s, background .16s; }
textarea { min-height: 110px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(36,91,220,.11); }
input[readonly] { background: var(--surface-muted); color: var(--muted-strong); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 60px; }
.password-toggle { position: absolute; top: 50%; right: 9px; transform: translateY(-50%); border: 0; background: transparent; color: var(--brand); font-size: 11px; font-weight: 750; cursor: pointer; }
.form-checkbox { display: flex; align-items: flex-start; gap: 9px; }
.form-checkbox input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--brand); }
.form-checkbox label { color: var(--muted-strong); font-size: 12px; }
.help-text, .field-help { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.error-text, .errorlist { margin: 5px 0 0; color: var(--danger); font-size: 11px; }
.errorlist { padding-left: 17px; }

/* Product shell */
.app-screen > .app-navbar { display: none; }
.app-layout { min-height: 100vh; display: flex; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 70; width: var(--sidebar); display: flex; flex-direction: column; border-right: 1px solid #17283e; background: var(--navy); color: #c2cede; }
.sidebar-head { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid rgba(164,184,208,.12); }
.sidebar-head .brand-lockup { color: #fff; }
.sidebar-head .brand-lockup img { width: 32px; height: 32px; }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 22px 13px; }
.sidebar-group + .sidebar-group { margin-top: 24px; }
.sidebar-group > p { margin: 0 11px 7px; color: #6f849d; font-size: 9px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.sidebar-group ul { margin: 0; padding: 0; list-style: none; }
.sidebar-group a { min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 0 11px; border-radius: 8px; color: #aab9cc; font-size: 12px; font-weight: 630; transition: background .14s, color .14s; }
.sidebar-group a:hover { background: rgba(255,255,255,.055); color: #fff; }
.sidebar-group a.active { background: linear-gradient(90deg, rgba(53,111,238,.25), rgba(53,111,238,.1)); color: #fff; box-shadow: inset 3px 0 #4f82f3; }
.sidebar-group a .icon { width: 17px; height: 17px; }
.sidebar-group .icon-end { width: 13px; height: 13px; margin-left: auto; color: #60738b; }
.sidebar-account { padding: 14px; border-top: 1px solid rgba(164,184,208,.12); }
.account-summary { display: flex; align-items: center; gap: 10px; min-width: 0; color: #dbe5f0; }
.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 { font-size: 12px; }
.account-summary small { color: #7f91a7; font-size: 10px; }
.logout-button { margin: 10px 0 0 44px; padding: 0; border: 0; background: transparent; color: #8ea0b5; font-size: 10px; cursor: pointer; }
.logout-button:hover { color: #fff; }
.app-workspace { width: calc(100% - var(--sidebar)); min-width: 0; margin-left: var(--sidebar); }
.workspace-topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.91); backdrop-filter: blur(12px); }
.workspace-label, .workspace-status { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.workspace-dot { display: inline-block; width: 5px; height: 5px; margin: 0 10px 2px; border-radius: 50%; background: #29b787; }
.workspace-actions { display: flex; align-items: center; gap: 13px; }
.user-chip { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 11px; }
.user-chip > span { width: 32px; height: 32px; }
.app-content { width: min(100%, calc(var(--content) + 68px)); margin: 0 auto; padding: 38px 34px 70px; }
.page-container { width: min(100% - 40px, 1100px); min-height: calc(100vh - 140px); margin: 0 auto; padding: 50px 0; }
.page-shell { width: min(100%, var(--content)); margin: 0 auto; }
.page-shell.narrow { max-width: 850px; }
.page-shell.medium { max-width: 980px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.page-head h1 { margin-bottom: 6px; font-size: 29px; }
.page-head p { max-width: 650px; margin-bottom: 0; font-size: 13px; }
.page-kicker { display: block; margin-bottom: 8px; color: var(--brand); font-size: 9px; font-weight: 820; letter-spacing: .15em; text-transform: uppercase; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--muted-strong); font-size: 11px; font-weight: 650; }

/* Panels, metrics and actions */
.card, .panel { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-xs); }
.panel { overflow: hidden; }
.panel-head, .card-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3, .card-title { margin-bottom: 3px; font-size: 15px; }
.panel-head p, .card-subtitle { margin-bottom: 0; color: var(--muted); font-size: 11px; }
.panel-body { padding: 24px; }
.metric-grid, .metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.metric-card, .metric-box { position: relative; min-height: 132px; padding: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.metric-card::after { content: ""; position: absolute; right: -28px; bottom: -38px; width: 92px; height: 92px; border-radius: 50%; background: var(--surface-blue); }
.metric-icon { display: grid; place-items: center; width: 31px; height: 31px; margin-bottom: 17px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); }
.metric-icon .icon { width: 16px; height: 16px; }
.metric-label, .metric-box-title { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.metric-value, .metric-box-value { position: relative; z-index: 1; display: block; margin-bottom: 3px; color: var(--ink); font-size: 27px; font-weight: 780; line-height: 1.1; letter-spacing: -.035em; }
.metric-meta { position: relative; z-index: 1; color: var(--muted); font-size: 10px; }
.action-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin: 23px 0; }
.action-card { min-height: 155px; display: flex; flex-direction: column; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
.action-card:hover { border-color: #b4c5df; color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.action-card .metric-icon { margin-bottom: auto; }
.action-card h2 { margin: 18px 0 5px; font-size: 14px; }
.action-card p { margin: 0; font-size: 11px; }
.empty-state { padding: 54px 24px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 17px; border-radius: 15px; background: var(--surface-blue); color: var(--brand); }
.empty-icon .icon { width: 24px; height: 24px; }
.empty-state h3 { margin-bottom: 7px; font-size: 17px; }
.empty-state p { max-width: 420px; margin: 0 auto 20px; font-size: 12px; }

/* Alerts, badges and progress */
.message-stack { margin-bottom: 20px; }
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; border: 1px solid; border-radius: var(--radius-sm); font-size: 12px; }
.alert + .alert { margin-top: 8px; }
.alert-success { border-color: #b9e7d5; background: var(--success-bg); color: #075c42; }
.alert-error { border-color: #f0c8ce; background: var(--danger-bg); color: #8e2735; }
.alert-info { border-color: #c8daf7; background: var(--info-bg); color: #174d9f; }
.alert-warning { border-color: #efdfae; background: var(--warning-bg); color: #75500b; }
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 3px 9px; border: 1px solid transparent; border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.badge-success, .badge-deliverable, .badge-status-deliverable { border-color: #bae4d5; background: var(--success-bg); color: #076b4b; }
.badge-warning, .badge-risky, .badge-status-risky { border-color: #ebd79d; background: var(--warning-bg); color: #815609; }
.badge-error, .badge-undeliverable, .badge-status-undeliverable { border-color: #ecc4cb; background: var(--danger-bg); color: #9d2f3e; }
.badge-info { border-color: #c6daf9; background: var(--info-bg); color: #1d55ad; }
.badge-neutral, .badge-unknown, .badge-status-unknown { border-color: var(--line); background: var(--surface-muted); color: #56677e; }
.progress-bar-container { height: 8px; overflow: hidden; border-radius: 99px; background: #e5eaf1; }
.progress-bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #5188ff); transition: width .35s ease; }
.progress-stat { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted-strong); font-size: 11px; font-weight: 650; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Tables */
.table-container { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.table th { padding: 12px 15px; border-bottom: 1px solid var(--line); background: var(--surface-muted); color: var(--muted-strong); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.table td { padding: 14px 15px; border-bottom: 1px solid #e8edf3; color: var(--ink-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fbfcfe; }
.table .primary-cell { color: var(--ink); font-weight: 680; }
.table .muted-cell { color: var(--muted); font-size: 11px; }
.table code { color: var(--ink-soft); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }
.table-actions { text-align: right; white-space: nowrap; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.pagination-nav { display: flex; gap: 7px; }
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.filter-label { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-pill { min-height: 30px; display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--muted-strong); font-size: 10px; font-weight: 700; }
.filter-pill:hover, .filter-pill.active { border-color: var(--brand); background: var(--brand); color: #fff; }

/* Upload, analysis and results */
.upload-panel { padding: 28px; }
.upload-dropzone { min-height: 320px; display: grid; place-items: center; padding: 40px; border: 1.5px dashed #b9c6d7; border-radius: var(--radius-md); background: linear-gradient(180deg,#fbfcff,#f6f9fd); text-align: center; cursor: pointer; transition: border-color .16s, background .16s, transform .16s; }
.upload-dropzone:hover, .upload-dropzone.is-dragging { border-color: var(--brand); background: var(--surface-blue); }
.upload-dropzone.has-file { border-style: solid; border-color: #9fbee9; background: var(--surface-blue); }
.upload-illustration { display: grid; place-items: center; width: 66px; height: 66px; margin: 0 auto 20px; border: 1px solid #d5e3f8; border-radius: 18px; background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
.upload-illustration .icon { width: 29px; height: 29px; }
.upload-dropzone h2 { margin-bottom: 8px; font-size: 18px; }
.upload-dropzone p { margin-bottom: 0; font-size: 12px; }
.file-badges { display: flex; justify-content: center; gap: 7px; margin-top: 16px; }
.file-badges span { padding: 4px 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--muted-strong); font-size: 9px; font-weight: 800; }
.upload-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 19px; }
.upload-actions p { margin: 0; font-size: 10px; }
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 18px; }
.step-note { padding: 17px; border-top: 2px solid #dbe6f8; background: rgba(255,255,255,.55); }
.step-note span { display: block; margin-bottom: 9px; color: var(--brand); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.step-note h3 { margin-bottom: 5px; font-size: 12px; }
.step-note p { margin: 0; font-size: 10px; }
.analysis-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }
.analysis-stat { min-height: 112px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-muted); }
.analysis-stat.emphasis { border-color: #c5d7f4; background: var(--surface-blue); }
.analysis-stat span { display: block; color: var(--muted-strong); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.analysis-stat strong { display: block; margin: 9px 0 4px; color: var(--ink); font-size: 23px; }
.analysis-stat small { color: var(--success); font-size: 9px; }
.credit-confirmation { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 22px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--line); }
.credit-confirmation > div { padding: 20px; background: var(--surface); }
.credit-confirmation span { display: block; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.credit-confirmation strong { display: block; margin: 4px 0; font-size: 29px; }
.credit-confirmation small { color: var(--muted); font-size: 10px; }
.confirm-bar { margin-top: 16px; padding: 19px 21px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.confirm-bar h3 { margin-bottom: 4px; font-size: 14px; }
.confirm-bar p { margin: 0; font-size: 11px; }
.result-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 20px; }
.result-card { position: relative; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); }
.result-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; border-radius: var(--radius-md) 0 0 var(--radius-md); background: currentColor; }
.result-card.deliverable { color: var(--success); }.result-card.risky { color: var(--warning); }.result-card.undeliverable { color: var(--danger); }.result-card.unknown { color: var(--muted); }
.result-card span { display: block; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.result-card strong { display: block; margin: 7px 0 2px; font-size: 26px; }
.result-card small { color: var(--muted); font-size: 9px; }
.progress-panel { padding: 25px; }
.progress-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 25px; }
.progress-head h2 { margin-bottom: 4px; font-size: 18px; }
.progress-head p { margin: 0; font-size: 10px; }
.progress-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin: 23px 0; }
.progress-metric { padding: 14px; border-radius: 8px; background: var(--surface-muted); }
.progress-metric span { display: block; color: var(--muted-strong); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.progress-metric strong { display: block; margin-top: 4px; font-size: 18px; }
.panel-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 19px; border-top: 1px solid var(--line); }
.panel-actions > div { display: flex; gap: 9px; }
.dev-mock-banner { margin-bottom: 20px; }

/* Account */
.settings-layout { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 22px; align-items: start; }
.settings-nav { padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.settings-nav a { display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 10px; border-radius: 7px; color: var(--muted-strong); font-size: 11px; font-weight: 650; }
.settings-nav a.active, .settings-nav a:hover { background: var(--brand-soft); color: var(--brand); }
.profile-summary { display: flex; align-items: center; gap: 14px; padding-bottom: 21px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.profile-summary .avatar { width: 49px; height: 49px; border-radius: 14px; font-size: 16px; }
.profile-summary h2 { margin: 0 0 3px; font-size: 16px; }
.profile-summary p { margin: 0; font-size: 10px; }
.profile-summary .badge { margin-left: auto; }
.security-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-muted); }
.security-row h3 { margin: 0 0 3px; font-size: 13px; }
.security-row p { margin: 0; font-size: 10px; }
.settings-section + .settings-section { margin-top: 18px; }
.panel-body p a, .form-checkbox a { text-decoration: underline; text-underline-offset: 2px; }

/* Error states and utilities */
.state-page { max-width: 520px; margin: 50px auto; text-align: center; }
.state-card { padding: 46px 36px; }
.state-code { margin-bottom: 14px; color: var(--brand); font-size: 56px; font-weight: 800; line-height: 1; }
.state-card h1 { margin-bottom: 10px; font-size: 25px; }
.state-card p { margin-bottom: 24px; font-size: 13px; }
.compact-footer > div { width: min(100% - 40px, 1100px); height: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.code-inline { padding: 2px 5px; border-radius: 4px; background: var(--surface-muted); font-family: ui-monospace, monospace; font-size: .9em; }

@keyframes pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }

@media (max-width: 1100px) {
  .metric-grid, .metrics-grid, .action-grid { grid-template-columns: repeat(2,1fr); }
  .analysis-grid { grid-template-columns: repeat(3,1fr); }
  .auth-layout { grid-template-columns: .85fr 1.15fr; }
  .auth-context { padding-inline: 42px; }
}
@media (max-width: 1024px) {
  .app-screen > .app-navbar { display: block; position: sticky; top: 0; }
  .app-screen .app-navbar-inner { width: calc(100% - 32px); height: 64px; justify-content: flex-start; gap: 12px; }
  .app-screen .navbar-logo .brand-lockup > span { display: none; }
  .app-screen .navbar-logo .brand-lockup img { width: 32px; height: 32px; }
  .sidebar-toggle, .sidebar-close { display: inline-grid; }
  .mobile-user { display: flex; }
  .sidebar { transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 60; display: none; border: 0; background: rgba(3,12,25,.54); }
  .sidebar-open .sidebar-scrim { display: block; }
  .app-workspace { width: 100%; margin-left: 0; }
  .workspace-topbar { display: none; }
  .app-content { padding: 29px 25px 60px; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-context { display: none; }
  .auth-screen .app-navbar { position: relative; border-bottom: 1px solid var(--line); }
  .auth-screen .app-navbar-inner { width: calc(100% - 32px); }
  .auth-screen .navbar-logo .brand-lockup { color: var(--ink); }
  .auth-screen .guest-nav > a:not(.btn) { color: var(--muted-strong); }
  .auth-screen .guest-nav .btn { border-color: transparent; background: var(--brand); }
  .auth-panel { min-height: calc(100vh - 120px); padding: 64px 28px; }
  .auth-footer { justify-content: center; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { display: flex; overflow-x: auto; }
  .settings-nav a { white-space: nowrap; }
}
@media (max-width: 680px) {
  .guest-nav > a:first-child { display: none; }
  .guest-nav { gap: 13px; }
  .app-content { padding: 25px 17px 52px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-head h1 { font-size: 25px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .metric-grid, .metrics-grid, .action-grid, .result-grid, .progress-metrics, .analysis-grid, .steps-grid, .credit-confirmation { grid-template-columns: 1fr 1fr; }
  .action-grid { margin-block: 18px; }
  .action-card { min-height: 140px; }
  .analysis-stat:last-child { grid-column: 1 / -1; }
  .filter-bar { align-items: flex-start; flex-direction: column; }
  .confirm-bar, .upload-actions, .panel-actions, .progress-head, .security-row { align-items: flex-start; flex-direction: column; }
  .confirm-bar .btn, .upload-actions .btn { width: 100%; }
  .panel-actions > div { width: 100%; flex-wrap: wrap; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .auth-panel { padding-inline: 20px; }
  .auth-card-head h1 { font-size: 27px; }
  .auth-footer { height: auto; padding: 16px 20px; flex-direction: column; gap: 8px; }
  .table { min-width: 720px; }
  .compact-footer > div { padding-block: 14px; flex-direction: column; gap: 8px; }
}
@media (max-width: 430px) {
  .app-navbar-inner { width: calc(100% - 24px); }
  .brand-lockup { font-size: 15px; }
  .brand-lockup img { width: 31px; height: 31px; }
  .guest-nav .btn { display: none; }
  .metric-grid, .metrics-grid, .action-grid, .result-grid, .progress-metrics, .analysis-grid, .steps-grid, .credit-confirmation { grid-template-columns: 1fr; }
  .analysis-stat:last-child { grid-column: auto; }
  .metric-card { min-height: 112px; }
  .auth-panel { padding-top: 44px; }
}
