/* AuditStudio enterprise design system */
:root {
  --bg:#F8FAFC;
  --surface:#FFFFFF;
  --ink:#0F172A;
  --muted:#64748B;
  --line:#E2E8F0;
  --primary:#2563EB;
  --primary-hover:#1D4ED8;
  --primary-soft:#EFF6FF;
  --nav:#0F172A;
  --nav-hover:#1E293B;
  --success:#15803D;
  --success-bg:#F0FDF4;
  --amber:#B45309;
  --amber-bg:#FFFBEB;
  --red:#B91C1C;
  --red-bg:#FEF2F2;
  --blue:#1D4ED8;
  --soft:#F1F5F9;
  --green:var(--primary);
  --green-dark:var(--primary-hover);
  --radius:12px;
  --sidebar-width:250px;
  --shadow:0 1px 2px #0F172A04;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:14px;
  line-height:1.5;
  color:var(--ink);
  font-synthesis:none;
  -webkit-font-smoothing:antialiased;
}

/* Foundations */
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); }
button,input,select,textarea { font:inherit; }
button { border:0; background:none; color:inherit; cursor:pointer; }
button,a,input,select,textarea,summary { -webkit-tap-highlight-color:transparent; }
button:disabled { cursor:not-allowed; opacity:.55; }
a { color:var(--primary-hover); text-decoration:none; }
a:hover { text-decoration:underline; }
svg { flex-shrink:0; vertical-align:middle; }
h1,h2,h3,h4,p { margin:0; }
h1 { font-size:28px; line-height:1.25; letter-spacing:-.75px; font-weight:650; }
h2 { font-size:17px; line-height:1.4; letter-spacing:-.3px; font-weight:650; }
h3 { font-size:15px; font-weight:650; line-height:1.45; }
h4 { font-size:13px; font-weight:650; }
small,.caption { font-size:12px; color:var(--muted); }
.muted { color:var(--muted); }
.eyebrow { color:var(--muted); font-size:10px; line-height:1.5; font-weight:650; letter-spacing:1.2px; text-transform:uppercase; }
.row { display:flex; align-items:center; gap:12px; min-width:0; }
.between { justify-content:space-between; }
.wrap { flex-wrap:wrap; }
.stack { display:flex; flex-direction:column; gap:20px; min-width:0; }
.grow { flex:1; min-width:0; }
.hidden { display:none!important; }
.full { grid-column:1 / -1; }
.gap-8 { gap:8px; }
.mb-8 { margin-bottom:8px; }
.mb-12 { margin-bottom:12px; }
.mb-16 { margin-bottom:16px; }
.mb-20 { margin-bottom:20px; }
.mb-24 { margin-bottom:24px; }
.mt-12 { margin-top:12px; }
.mt-16 { margin-top:16px; }
.mt-24 { margin-top:24px; }
.actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.grid-2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; min-width:0; align-items:start; }
:focus-visible { outline:3px solid #93C5FD; outline-offset:3px; }
input:focus-visible,select:focus-visible,textarea:focus-visible { outline:2px solid var(--primary); outline-offset:1px; }
summary { cursor:pointer; }
summary:focus-visible { border-radius:4px; }
hr { border:0; border-top:1px solid var(--line); margin:24px 0; }
code,pre { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; }
input[type=checkbox],input[type=radio] { accent-color:var(--primary); width:16px; height:16px; flex-shrink:0; }

/* Shared controls */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:38px; padding:8px 14px; border:1px solid #CBD5E1; border-radius:8px; background:var(--surface); color:#334155; font-size:13px; font-weight:600; line-height:20px; text-align:center; text-decoration:none; white-space:nowrap; }
.btn:hover:not(:disabled) { background:var(--soft); border-color:#94A3B8; text-decoration:none; }
.btn:active:not(:disabled) { background:#E2E8F0; }
.btn.primary { background:var(--primary); border-color:var(--primary); color:#FFF; }
.btn.primary:hover:not(:disabled) { background:var(--primary-hover); border-color:var(--primary-hover); }
.btn.small { min-height:34px; padding:6px 10px; font-size:12px; }
.btn.wide { width:100%; }
.btn.ghost { border-color:transparent; background:transparent; }
.btn.danger,[data-audit-action=archive] { color:var(--red); border-color:#FECACA; }
.icon-btn { display:grid; place-items:center; width:34px; height:34px; padding:0; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:#475569; flex-shrink:0; }
.icon-btn:hover { background:var(--soft); }
.input,select,textarea { width:100%; min-width:0; min-height:40px; padding:9px 12px; border:1px solid #CBD5E1; border-radius:8px; background:var(--surface); color:var(--ink); font-size:13px; line-height:20px; }
.input::placeholder,textarea::placeholder { color:#8290A3; opacity:1; }
.input:hover,select:hover,textarea:hover { border-color:#94A3B8; }
.input:focus,select:focus,textarea:focus { border-color:var(--primary); box-shadow:0 0 0 3px #2563EB12; }
input:disabled,select:disabled,textarea:disabled,fieldset:disabled .input { color:#64748B; background:#F1F5F9; cursor:not-allowed; }
textarea { resize:vertical; min-height:92px; line-height:1.65; }
select { padding-right:26px; }
select[multiple] { min-height:120px; padding:6px; }
select[multiple] option { padding:6px; }
input[type=file] { padding:12px; height:auto; border:1px dashed #CBD5E1; border-radius:8px; width:100%; font-size:12px; background:var(--bg); }
input[type=file]::file-selector-button { margin-right:12px; border:1px solid #CBD5E1; border-radius:5px; background:#FFF; padding:6px 10px; color:#334155; cursor:pointer; }
.field { min-width:0; }
.field label,.field-label { display:block; font-size:12px; font-weight:600; color:#334155; margin-bottom:7px; }
.field .caption { font-weight:400; }
.required { color:var(--red); margin-left:4px; }
.help { font-size:12px; color:var(--muted); line-height:1.6; margin-top:7px; }
.error-text { color:var(--red); font-size:12px; margin-top:6px; }
.field.invalid .input,.field.invalid select,.field.invalid textarea { border-color:var(--red); }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 24px; min-width:0; }
.form-grid .full { grid-column:1 / -1; }
.search-field { position:relative; flex:1; min-width:200px; }
.search-field input { padding-left:36px; }
.search-field>svg { position:absolute; left:12px; top:12px; color:var(--muted); pointer-events:none; }
.pill { display:inline-flex; align-items:center; gap:5px; max-width:100%; padding:3px 8px; border-radius:5px; font-size:11px; font-weight:600; line-height:18px; white-space:nowrap; }
.pill.neutral { background:#F1F5F9; color:#475569; }
.pill.green { background:#DCFCE7; color:#166534; }
.pill.amber { background:#FEF3C7; color:#92400E; }
.pill.red { background:#FEE2E2; color:#991B1B; }
.pill.blue { background:#DBEAFE; color:#1E40AF; }
.pill.outline { background:var(--surface); border:1px solid var(--line); padding:2px 8px; color:#475569; }
.avatar { width:40px; height:40px; display:grid; place-items:center; flex-shrink:0; background:#EFF6FF; color:#1D4ED8; border:1px solid #DBEAFE; border-radius:9px; font-size:13px; font-weight:650; }
.avatar.user { width:32px; height:32px; border-radius:50%; font-size:11px; background:#F1F5F9; border-color:var(--line); color:#475569; }
.card { min-width:0; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); }
.card-pad { padding:24px; }
.card-head { padding:20px 24px; border-bottom:1px solid var(--line); }
.card-head p { margin-top:4px; font-size:12px; color:var(--muted); }
.card-pad>h2,.card-pad>h3 { margin-bottom:16px; }
.card-pad>h4 { margin:16px 0 8px; }
.card-pad>.audit-prose { color:#475569; }
.alert-box { display:flex; align-items:flex-start; gap:10px; padding:14px 16px; border:1px solid #FDE68A; border-radius:8px; color:#92400E; background:var(--amber-bg); font-size:12px; line-height:1.65; overflow-wrap:anywhere; }
.alert-box>svg { margin-top:2px; }
.alert-box>div { min-width:0; flex:1; }
.alert-box.info { color:#1E40AF; background:var(--primary-soft); border-color:#BFDBFE; }
.alert-box.error { color:var(--red); background:var(--red-bg); border-color:#FECACA; }
.alert-box strong { display:block; margin-bottom:2px; font-weight:650; }
.alert-box .btn { margin-top:8px; }
.content>.alert-box { margin-bottom:16px; }
.empty { padding:48px 24px; text-align:center; color:var(--muted); }
.empty-icon { display:grid; place-items:center; width:48px; height:48px; margin:0 auto 16px; border:1px solid var(--line); border-radius:12px; background:var(--bg); color:#64748B; }
.empty h3 { color:var(--ink); margin-bottom:7px; }
.empty p { font-size:13px; max-width:430px; margin:0 auto 20px; }
.progress { height:5px; overflow:hidden; border-radius:8px; background:#E2E8F0; }
.progress>span { display:block; height:100%; border-radius:8px; background:var(--primary); }
.kv { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; padding:11px 0; border-bottom:1px solid #F1F5F9; font-size:12px; }
.kv:last-child { border-bottom:0; }
.kv>span { color:var(--muted); max-width:50%; }
.kv>strong { color:#334155; font-weight:600; text-align:right; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.report-link { display:inline-flex; align-items:center; gap:5px; color:var(--primary-hover); font-size:12px; }

/* Application shell */
.app-shell { min-height:100vh; }
.sidebar { position:fixed; inset:0 auto 0 0; z-index:30; width:var(--sidebar-width); padding:24px 14px 16px; background:var(--nav); color:#CBD5E1; display:flex; flex-direction:column; }
.brand { display:flex; align-items:center; gap:10px; }
.brand img { width:34px; height:34px; }
.brand strong { display:block; font-size:20px; line-height:1.25; letter-spacing:-.6px; font-weight:650; }
.brand span { display:block; margin-top:4px; font-size:9px; letter-spacing:1.2px; color:#94A3B8; }
.sidebar>.brand { padding:0 10px 22px; color:#F8FAFC; }
.workspace-context { display:flex; align-items:center; gap:10px; padding:12px 10px; margin-bottom:12px; border:1px solid #334155; border-radius:8px; background:#172236; text-align:left; }
.workspace-context-icon { display:grid; place-items:center; width:30px; height:30px; border:1px solid #475569; border-radius:6px; background:#1E293B; color:#CBD5E1; flex-shrink:0; }
.workspace-context small { display:block; color:#94A3B8; font-size:9px; letter-spacing:.8px; }
.workspace-context strong { display:block; max-width:155px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-top:3px; font-size:12px; font-weight:550; color:#E2E8F0; }
.sidebar-nav { display:flex; flex-direction:column; flex:1; min-height:0; overflow-y:auto; overflow-x:hidden; scrollbar-width:thin; scrollbar-color:#475569 transparent; padding:0 1px 12px; }
.nav-group { margin-bottom:12px; }
.nav-label { padding:8px 12px 5px; font-size:9px; text-transform:uppercase; letter-spacing:1px; color:#94A3B8; font-weight:600; }
.nav-item { display:flex; align-items:center; gap:10px; position:relative; width:100%; padding:9px 12px; margin:2px 0; border-radius:7px; color:#CBD5E1; text-align:left; font-size:12px; line-height:1.5; min-height:36px; }
.nav-item>span:first-of-type { flex:1; min-width:0; }
.nav-item:hover { background:var(--nav-hover); color:#FFF; }
.nav-item.active { background:#1E3A5F; color:#BFDBFE; font-weight:600; }
.nav-item.active::before { content:""; position:absolute; left:0; top:8px; bottom:8px; width:3px; border-radius:2px; background:#60A5FA; }
.nav-item .count { flex:0 0 auto; color:#DBEAFE; background:#2B4B74; padding:0 5px; border-radius:4px; font-size:10px; font-variant-numeric:tabular-nums; }
.sidebar-account { border-top:1px solid #334155; padding:16px 8px 0; flex-shrink:0; }
.account-identity { gap:10px; }
.sidebar-account .avatar { color:#DBEAFE; background:#1E3A5F; border-color:#334155; }
.sidebar-account strong { display:block; font-size:12px; color:#E2E8F0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar-account small { display:block; color:#94A3B8; font-size:11px; margin-top:2px; }
.sidebar-logout { width:100%; justify-content:flex-start; margin-top:12px; background:transparent; border-color:#334155; color:#CBD5E1; }
.sidebar-logout:hover:not(:disabled) { background:var(--nav-hover); border-color:#475569; color:#FFF; }
.main-shell { width:calc(100% - var(--sidebar-width)); margin-left:var(--sidebar-width); min-width:0; }
.topbar { height:64px; position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:0 32px; background:#FFF; border-bottom:1px solid var(--line); }
.top-context { display:flex; align-items:center; gap:12px; flex:1; min-width:0; }
.breadcrumb { display:flex; align-items:center; gap:12px; min-width:0; font-size:12px; color:var(--muted); }
.breadcrumb-company { display:flex; align-items:center; gap:8px; padding:4px 0; min-width:0; }
.breadcrumb-company strong { max-width:240px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#334155; font-size:12px; font-weight:550; }
.breadcrumb-page { white-space:nowrap; }
.breadcrumb-separator { color:#CBD5E1; }
.top-right { display:flex; align-items:center; gap:12px; flex-shrink:0; }
.saved { display:flex; align-items:center; gap:5px; color:#64748B; font-size:11px; white-space:nowrap; }
.saved>svg { color:var(--success); }
.saved.save-error { color:var(--red); }
.saved.save-dirty { color:var(--amber); }
.top-divider { width:1px; height:24px; background:var(--line); }
.content { min-width:0; max-width:1600px; padding:32px 32px 56px; margin:auto; }
.page-header { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:28px; min-width:0; }
.page-header>div:first-child { min-width:0; }
.page-header h1 { overflow-wrap:anywhere; }
.page-header .eyebrow { margin-bottom:7px; }
.page-header .actions { justify-content:flex-end; flex-shrink:0; }
.mobile-menu,.sidebar-close,.nav-backdrop { display:none; }

/* Company directory and engagement overview */
.stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:28px; }
.stat { padding:20px; }
.stat .label { display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:12px; color:#475569; }
.stat-icon { display:grid; place-items:center; width:30px; height:30px; color:#64748B; background:var(--bg); border-radius:7px; flex-shrink:0; }
.stat .number { margin-top:10px; font-size:30px; line-height:1.25; letter-spacing:-.8px; font-weight:650; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.stat .foot { font-size:11px; margin-top:8px; line-height:1.5; color:var(--muted); }
.stat .foot:empty { display:none; }
.company-directory { overflow:hidden; }
.company-directory-head { display:flex; justify-content:space-between; align-items:center; gap:20px; padding:24px; }
.company-directory-head p { font-size:12px; color:var(--muted); margin-top:4px; }
.company-search { flex:0 1 320px; }
.directory-columns,.company-row { display:grid; grid-template-columns:minmax(220px,1.6fr) 100px 150px 150px 50px; gap:20px; align-items:center; }
.directory-columns { padding:12px 24px; background:var(--bg); border-block:1px solid var(--line); font-size:10px; text-transform:uppercase; letter-spacing:.6px; color:var(--muted); font-weight:600; }
.engagement-list { display:flex; flex-direction:column; }
.engagement-row { width:100%; padding:22px 24px; border-bottom:1px solid var(--line); text-align:left; }
.engagement-row:last-child { border-bottom:0; }
.engagement-row:hover { background:#F8FAFC; }
.engagement-row h3 { font-size:13px; font-weight:600; line-height:1.5; overflow-wrap:anywhere; }
.engagement-row p { margin-top:4px; font-size:12px; color:var(--muted); }
.company-period small { display:none; }
.company-period strong { font-size:12px; font-weight:500; color:#475569; white-space:nowrap; }
.company-row>.pill { justify-self:start; }
.eng-progress .row { margin-bottom:8px; gap:5px; font-size:11px; color:var(--muted); }
.eng-progress .row span:last-child { color:#334155; font-weight:600; }
.company-open { display:flex; align-items:center; gap:3px; color:var(--primary-hover); font-size:12px; font-weight:600; }
.journey { display:flex; align-items:center; gap:16px; padding:24px; border-bottom:1px solid var(--line); }
.journey:last-child { border-bottom:0; }
.step-bubble { display:grid; place-items:center; width:30px; height:30px; border:1px solid var(--line); border-radius:50%; background:var(--bg); color:#64748B; font-size:12px; font-weight:600; flex-shrink:0; }
.step-bubble.done { background:#DCFCE7; color:#166534; border-color:#BBF7D0; }
.journey p { margin-top:5px; font-size:12px; color:var(--muted); }
.audit-overview { margin:0 0 28px; }
.audit-overview>.row { flex-wrap:wrap; gap:12px; }
.audit-overview .audit-stats { grid-template-columns:repeat(3,minmax(0,1fr)); margin:20px 0; }
.audit-overview .audit-stat { border-radius:8px; background:var(--bg); box-shadow:none; }
.audit-overview .audit-stat strong { font-size:22px; }

/* Company profile, review and applicability */
.optional-strip { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:12px 16px; margin-bottom:20px; border:1px solid var(--line); border-radius:8px; background:#FFF; color:#475569; font-size:12px; }
.optional-strip>svg { color:var(--primary); }
.optional-strip .btn { margin-left:auto; }
.steps { display:flex; gap:4px; margin-bottom:24px; padding:6px; border:1px solid var(--line); border-radius:10px; background:#FFF; overflow-x:auto; }
.step-tab { display:flex; flex:1; align-items:center; justify-content:center; gap:8px; padding:10px 8px; min-width:100px; color:#64748B; border-radius:6px; font-size:12px; white-space:nowrap; }
.step-tab .num { display:grid; place-items:center; width:22px; height:22px; border:1px solid var(--line); border-radius:50%; font-size:10px; flex-shrink:0; }
.step-tab:hover { background:var(--bg); }
.step-tab.active { color:var(--primary-hover); background:var(--primary-soft); font-weight:600; }
.step-tab.active .num { color:#FFF; background:var(--primary); border-color:var(--primary); }
.step-tab.done:not(.active) .num { color:var(--success); background:#F0FDF4; border-color:#BBF7D0; }
.profile-layout { display:grid; grid-template-columns:minmax(0,1fr) 270px; gap:24px; align-items:start; }
.profile-main { min-width:0; }
.profile-main>.card>.form-grid { padding:24px; }
.profile-main .card-head>svg { color:#64748B; }
.form-footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:18px 24px; border-top:1px solid var(--line); background:#F8FAFC; border-radius:0 0 var(--radius) var(--radius); }
.form-footer small { font-size:11px; }
.profile-aside { position:sticky; top:88px; display:flex; flex-direction:column; gap:16px; }
.aside-progress,.aside-list { padding:20px; }
.aside-progress .big { font-size:30px; line-height:1.25; letter-spacing:-.8px; font-weight:650; }
.aside-progress .readiness-unit { font-size:14px; }
.aside-progress .progress { margin-top:16px; }
.aside-list h4 { font-size:13px; }
.aside-item { display:flex; justify-content:space-between; gap:16px; border-bottom:1px solid var(--line); padding:13px 0; font-size:12px; color:var(--muted); }
.aside-item:last-child { border-bottom:0; padding-bottom:0; }
.aside-item strong { font-weight:550; text-align:right; color:#334155; }
.choices { display:flex; flex-wrap:wrap; gap:8px; }
.choice { display:flex; align-items:center; gap:8px; min-height:38px; padding:8px 12px; border:1px solid #CBD5E1; border-radius:7px; font-size:12px; color:#475569; }
.choice .radio { width:14px; height:14px; border:1px solid #94A3B8; border-radius:50%; flex-shrink:0; }
.choice:hover,.multi-option:hover { background:var(--bg); border-color:#94A3B8; }
.choice.selected,.multi-option.selected { background:var(--primary-soft); border-color:#93C5FD; color:#1E40AF; }
.choice.selected .radio { border:4px solid var(--primary); background:#FFF; }
.multi { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.multi-option { display:flex; align-items:center; gap:9px; padding:12px; min-height:44px; border:1px solid #CBD5E1; border-radius:8px; color:#475569; font-size:12px; text-align:left; }
.tickbox { display:grid; place-items:center; width:16px; height:16px; border:1px solid #94A3B8; border-radius:4px; background:#FFF; color:transparent; flex-shrink:0; }
.selected .tickbox { color:#FFF; background:var(--primary); border-color:var(--primary); }
.money-input { position:relative; }
.money-input input { padding-left:46px; padding-right:60px; font-variant-numeric:tabular-nums; }
.money-input .prefix,.money-input .suffix { position:absolute; top:12px; font-size:11px; color:var(--muted); pointer-events:none; }
.money-input .prefix { left:12px; }
.money-input .suffix { right:12px; }
.origin { display:inline-flex; align-items:center; gap:4px; color:var(--primary-hover); font-size:11px; margin-top:7px; text-align:left; }
.summary-grid,.decision-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-bottom:24px; }
.summary-block,.decision { padding:20px; }
.summary-block h4 { margin-bottom:12px; }
.summary-block .row>button { color:var(--muted); }
.missing-list { display:flex; flex-wrap:wrap; gap:7px; margin-top:12px; }
.missing-chip { padding:5px 9px; border:1px solid #FDE68A; border-radius:5px; background:#FFF; color:#92400E; font-size:11px; text-align:left; }
.decision .heading { display:flex; justify-content:space-between; gap:12px; }
.decision p { color:#475569; font-size:13px; line-height:1.7; margin-top:14px; }
.decision details { margin-top:16px; font-size:12px; }
.decision summary { color:var(--primary-hover); }
.decision .basis { border-top:1px solid var(--line); padding-top:12px; margin-top:12px; }

/* Checklist and binder */
.checklist-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; margin-bottom:20px; padding:20px 0; background:#FFF; border:1px solid var(--line); border-radius:var(--radius); }
.checklist-summary>div { padding:0 24px; border-right:1px solid var(--line); }
.checklist-summary>div:last-child { border-right:0; }
.checklist-summary span { display:block; font-size:12px; color:var(--muted); }
.checklist-summary strong { display:block; margin-top:8px; font-size:28px; line-height:1.2; font-weight:650; letter-spacing:-.6px; font-variant-numeric:tabular-nums; }
.checklist-run-status { display:flex; align-items:center; flex-wrap:wrap; gap:10px 16px; padding:12px 16px; margin-bottom:20px; border:1px solid var(--line); border-radius:8px; background:#FFF; color:#475569; font-size:12px; }
.checklist-run-status>div { display:flex; align-items:center; gap:8px; }
.checklist-run-status>div>svg { color:var(--primary); }
.checklist-run-status>details { flex-basis:100%; }
.checklist-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:12px; margin-bottom:24px; border:1px solid var(--line); border-radius:10px; background:#FFF; }
.checklist-toolbar select { width:150px; }
.checklist-toolbar #status-filter { width:172px; }
.scope-toggle { display:flex; gap:3px; padding:3px; border:1px solid var(--line); border-radius:7px; background:var(--bg); }
.scope-toggle button { padding:6px 9px; border-radius:4px; font-size:11px; color:#64748B; white-space:nowrap; }
.scope-toggle button.active { color:var(--primary-hover); background:#FFF; box-shadow:0 1px 3px #0F172A14; font-weight:600; }
.check-layout,.audit-binder { display:grid; grid-template-columns:190px minmax(0,1fr); gap:24px; align-items:start; }
.area-filter,.workpaper-sections { min-width:0; position:sticky; top:88px; }
.area-filter>.eyebrow,.workpaper-sections>.eyebrow { padding:8px 10px 12px; }
.area-item,.workpaper-section { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; margin:2px 0; padding:10px; border-radius:7px; text-align:left; font-size:12px; color:#475569; line-height:1.45; }
.area-item:hover,.workpaper-section:hover { background:#EDF2F7; }
.area-item.active,.workpaper-section.active { color:#1D4ED8; background:#E8F0FE; font-weight:600; }
.area-item span:last-child,.workpaper-section small { flex-shrink:0; font-size:11px; font-variant-numeric:tabular-nums; }
.checklist-procedures { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:var(--radius); background:#FFF; }
.check-area+.check-area { border-top:1px solid var(--line); }
.check-area-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 18px; background:#F1F5F9; border-bottom:1px solid var(--line); }
.check-area-head h3 { font-size:13px; }
.check-area-head small { font-size:11px; white-space:nowrap; }
.check-row { display:grid; grid-template-columns:20px minmax(0,1fr) auto auto 16px; align-items:center; gap:10px; width:100%; padding:16px 18px; border-top:1px solid #F1F5F9; background:#FFF; text-align:left; }
.check-row:hover { background:#F8FAFC; }
.check-status-icon { color:#94A3B8; }
.check-status-icon.completed { color:var(--success); }
.check-title { display:block; font-size:13px; font-weight:550; line-height:1.55; }
.check-ref { display:flex; flex-wrap:wrap; gap:4px 10px; margin-top:4px; color:#64748B; font-size:11px; line-height:1.5; }
.check-ref>span:first-child { color:#475569; font-variant-numeric:tabular-nums; }
.check-ref .risk-attention { color:var(--amber); }
.check-row-meta { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:5px 8px; }
.check-kind { font-size:11px; font-weight:550; color:#64748B; white-space:nowrap; }
.check-kind.automated { color:#1D4ED8; }
.check-row[data-check-type=Automated] { box-shadow:inset 2px 0 #93C5FD; }
.check-row .arrow { color:#94A3B8; }
.check-footer { padding:14px 18px; color:#64748B; font-size:12px; border-top:1px solid var(--line); background:#F8FAFC; }
.workpaper-section>span { display:flex; align-items:baseline; gap:9px; }
.workpaper-section-code { font-size:11px; font-weight:650; color:#64748B; width:13px; }
.workpaper-list { overflow:hidden; }
.workpaper-list-head { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:18px 20px; border-bottom:1px solid var(--line); }
.workpaper-list-head h2 { font-size:15px; }
.workpaper-toolbar select { width:190px; }
.workpaper-list .audit-table td:first-child { min-width:240px; width:44%; }
.workpaper-list .audit-link { color:var(--ink); text-decoration:none; font-weight:600; }
.workpaper-list .audit-link:hover { color:var(--primary); text-decoration:underline; }
.workpaper-status { display:flex; flex-wrap:wrap; gap:5px; }

/* Documents, sources, team and activity */
.dropzone { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:24px; padding:28px; border:1px dashed #94A3B8; border-radius:var(--radius); background:#FFF; }
.upload-icon { display:grid; place-items:center; width:48px; height:48px; border:1px solid var(--line); border-radius:10px; color:var(--primary); background:var(--primary-soft); flex-shrink:0; }
.dropzone h3 { font-size:14px; }
.dropzone p { margin-top:5px; color:var(--muted); font-size:12px; }
.dropzone.dragging { border-color:var(--primary); background:var(--primary-soft); }
.document-row { display:flex; align-items:center; gap:16px; width:100%; padding:20px 24px; border-bottom:1px solid var(--line); text-align:left; }
.document-row:last-child { border-bottom:0; }
.document-row:hover { background:var(--bg); }
.doc-icon,.source-icon { display:grid; place-items:center; width:40px; height:44px; border:1px solid var(--line); border-radius:8px; color:#64748B; background:var(--bg); flex-shrink:0; }
.document-row strong { font-size:13px; font-weight:600; overflow-wrap:anywhere; }
.document-row p { margin-top:5px; font-size:11px; color:var(--muted); line-height:1.6; }
.document-row>svg { color:#94A3B8; }
.team-row { display:flex; align-items:center; gap:16px; padding:20px 24px; border-bottom:1px solid var(--line); }
.team-row:last-child { border-bottom:0; }
.team-row strong { font-size:13px; font-weight:600; }
.team-row p { margin-top:4px; font-size:12px; color:var(--muted); overflow-wrap:anywhere; }
.source-row { display:flex; align-items:flex-start; gap:16px; padding:22px 24px; border-bottom:1px solid var(--line); }
.source-row:last-child { border-bottom:0; }
.source-row a { font-size:13px; font-weight:600; line-height:1.6; }
.source-row p { margin-top:6px; color:var(--muted); font-size:12px; line-height:1.7; }
.source-row .source-icon { height:36px; width:36px; }
.timeline { padding:8px 24px; }
.timeline-item { display:flex; gap:16px; padding:20px 0; position:relative; }
.timeline-item:not(:last-child)::after { content:""; position:absolute; width:1px; top:48px; bottom:-20px; left:13px; background:var(--line); }
.timeline-dot { display:grid; place-items:center; width:28px; height:28px; flex-shrink:0; border:1px solid var(--line); border-radius:50%; background:var(--bg); color:#64748B; }
.timeline-item p { margin:6px 0; font-size:13px; color:#475569; overflow-wrap:anywhere; }
.timeline-item small { font-size:11px; }

/* Financial tables and audit planning */
.audit-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin:20px 0 24px; }
.audit-financial-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
.audit-stat { padding:20px; }
.audit-stat>.caption { color:#475569; }
.audit-stat>strong { display:block; font-size:26px; line-height:1.35; margin:10px 0 5px; font-weight:650; letter-spacing:-.6px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.audit-stat>small { display:block; font-size:11px; line-height:1.5; }
.audit-stat>small:empty { display:none; }
.audit-financial-stats .audit-stat>strong { font-size:23px; }
.audit-gap { margin-top:24px; }
.audit-block { display:block; margin-top:5px; }
.audit-prose { white-space:pre-wrap; font-size:13px; line-height:1.7; overflow-wrap:anywhere; }
.audit-table-wrap { max-width:100%; overflow:auto; border-radius:10px; overscroll-behavior-x:contain; scrollbar-width:thin; scrollbar-color:#CBD5E1 #F8FAFC; }
.audit-table { width:100%; border-collapse:collapse; font-size:12px; font-variant-numeric:tabular-nums; }
.audit-table th { position:sticky; top:0; z-index:1; padding:12px 16px; background:#F8FAFC; border-bottom:1px solid var(--line); text-align:left; font-size:10px; font-weight:650; text-transform:uppercase; letter-spacing:.55px; color:#64748B; white-space:nowrap; }
.audit-table td { padding:15px 16px; border-top:1px solid var(--line); vertical-align:top; min-width:105px; line-height:1.6; color:#334155; }
.audit-table tbody tr:first-child td { border-top:0; }
.audit-table tr:hover td { background:#F8FAFC; }
.audit-table small { font-size:11px; color:#64748B; }
.audit-table select { min-width:240px; max-width:360px; }
.audit-table input:not([type=checkbox]) { min-width:200px; }
.audit-table .btn { white-space:nowrap; }
.audit-table [data-column="Debit"],.audit-table [data-column="Credit"],.audit-table [data-column="Amount"],.audit-table [data-column="Opening"],.audit-table [data-column="GL movement"],.audit-table [data-column="Expected closing"],.audit-table [data-column="TB closing"],.audit-table [data-column="Difference"],.audit-table [data-column="Flags"],.audit-table [data-column="Weight"] { text-align:right; white-space:nowrap; }
.audit-financial-accounts .audit-table-wrap,.gl-page .audit-table-wrap { max-height:640px; }
.audit-financial-accounts .audit-table th:first-child,.audit-financial-accounts .audit-table td:first-child { min-width:44px; width:44px; }
.audit-financial-accounts .audit-table td:nth-child(2) { min-width:220px; }
.audit-financial-accounts .audit-table td:nth-child(5) { min-width:210px; }
.audit-clamp { display:block; min-width:150px; max-width:360px; max-height:96px; overflow:auto; overflow-wrap:anywhere; }
.audit-empty { padding:36px 20px; text-align:center; color:var(--muted); font-size:13px; }
.audit-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:16px; border-bottom:1px solid var(--line); }
.audit-toolbar input { flex:1; min-width:220px; }
.audit-toolbar select { width:auto; min-width:160px; max-width:360px; }
.audit-toolbar label { font-size:12px; font-weight:600; color:#475569; }
.audit-pager { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px; border-top:1px solid var(--line); }
.audit-tabs,.drawer-tabs { display:flex; align-items:stretch; gap:20px; overflow-x:auto; border-bottom:1px solid var(--line); }
.audit-tabs { margin:0 0 24px; }
.audit-tabs button,.drawer-tabs button { padding:12px 2px; border-bottom:2px solid transparent; color:#64748B; font-size:12px; white-space:nowrap; }
.audit-tabs button:hover,.drawer-tabs button:hover { color:var(--ink); }
.audit-tabs button.active,.drawer-tabs button.active { color:var(--primary-hover); border-bottom-color:var(--primary); font-weight:650; }
.audit-link { padding:0; color:var(--primary-hover); font-size:12px; font-weight:550; text-align:left; text-decoration:underline; text-underline-offset:3px; }
.audit-link:hover { color:#1E3A8A; }
.audit-import-history { overflow:hidden; }
.audit-import-history>summary { padding:18px 24px; font-size:13px; font-weight:600; }
.audit-import-history[open]>summary { border-bottom:1px solid var(--line); }
.audit-import-history>.help { padding:0 24px 16px; }
.audit-balance-details { margin-top:10px; }
.audit-balance-details>summary { color:#64748B; font-size:11px; }
.audit-balance-details .kv { gap:12px; padding:6px 0; font-size:11px; white-space:nowrap; }
.audit-balance-details .input { margin-top:12px; }
.audit-refs,.audit-tiles { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:14px 0; }
.audit-ref { display:inline-flex; align-items:center; gap:5px; padding:5px 8px; max-width:100%; border:1px solid #DBEAFE; border-radius:5px; background:#F8FAFC; color:var(--primary-hover); font-size:11px; text-align:left; overflow-wrap:anywhere; }
.audit-ref:hover { background:var(--primary-soft); }
.audit-export-links { display:flex; flex-direction:column; align-items:stretch; gap:10px; margin:20px 0 0; }
.audit-export-links .btn { justify-content:flex-start; }
.audit-flow-actions { margin-top:20px; }
.audit-saving { display:flex; align-items:center; gap:8px; font-size:12px; margin:8px 0 20px; color:var(--primary-hover); }

/* Dialogs, drawers and secondary records */
body.modal-open { overflow:hidden; }
.overlay,.audit-overlay { position:fixed; inset:0; background:#0F172A66; z-index:80; }
.drawer { --drawer-width:640px; position:fixed; inset:0 0 0 auto; z-index:81; display:flex; flex-direction:column; width:min(var(--drawer-width),100vw); height:100dvh; background:#FFF; box-shadow:-12px 0 40px #0F172A12; }
.drawer.wide { --drawer-width:820px; }
.drawer-head { display:flex; align-items:flex-start; gap:16px; flex-shrink:0; padding:24px 28px; border-bottom:1px solid var(--line); }
.drawer-head>div { min-width:0; }
.drawer-head h2 { margin-top:8px; font-size:20px; line-height:1.45; overflow-wrap:anywhere; }
.drawer-head>.icon-btn { margin-left:auto; }
.drawer-body { flex:1; min-height:0; padding:24px 28px 108px; overflow-y:auto; overscroll-behavior:contain; }
.drawer-body .field { margin-bottom:20px; }
.drawer-body .grid-2 { gap:20px; }
.drawer-section { padding-bottom:22px; margin-bottom:22px; border-bottom:1px solid var(--line); }
.drawer-section h4 { margin-bottom:10px; font-size:13px; }
.drawer-section p,.drawer-section ul { font-size:13px; color:#475569; line-height:1.75; }
.drawer-section ul { padding-left:20px; }
.drawer-section summary { color:#334155; font-size:13px; font-weight:600; }
.drawer-section[open]>summary { margin-bottom:12px; }
.drawer-section .actions { margin:12px 0; }
.drawer-section .row.between,.suggestion>.row.between,.audit-note>.row.between { flex-wrap:wrap; align-items:flex-start; gap:8px; }
.drawer-section .row.between>.btn { flex:1 1 220px; min-width:0; justify-content:flex-start; white-space:normal; overflow-wrap:anywhere; }
.drawer-section details>.btn { max-width:100%; white-space:normal; overflow-wrap:anywhere; text-align:left; }
.drawer-footer { position:fixed; right:0; bottom:0; z-index:5; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; width:min(var(--drawer-width),100vw); padding:18px 28px; border-top:1px solid var(--line); background:#FFF; box-shadow:0 -3px 12px #0F172A05; }
.drawer-tabs { flex-shrink:0; padding:0 28px; }
.evidence-option { display:flex; align-items:flex-start; gap:9px; margin:14px 0; font-size:12px; line-height:1.6; color:#334155; }
.evidence-option input { margin-top:2px; }
.suggestion { padding:18px; margin-bottom:16px; border:1px solid var(--line); border-radius:10px; background:#FFF; }
.suggestion-header { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.suggestion-header strong { flex:1; font-size:13px; }
.suggestion-header input { margin:0; }
.suggestion-values { display:grid; grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr); align-items:center; gap:12px; margin-top:16px; }
.suggestion-values>div { padding:12px; border:1px solid var(--line); border-radius:7px; background:var(--bg); min-height:70px; }
.suggestion-values>div:last-child { background:var(--primary-soft); border-color:#DBEAFE; }
.suggestion-values small { display:block; font-size:10px; margin-bottom:5px; color:#64748B; }
.suggestion-values strong { display:block; font-size:12px; font-weight:600; color:#334155; overflow-wrap:anywhere; }
.suggestion-values>svg { color:#94A3B8; }
.suggestion blockquote { margin:14px 0; padding:12px 14px; border-left:3px solid #CBD5E1; border-radius:0 5px 5px 0; background:#F8FAFC; color:#475569; font-size:12px; line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; }
.suggestion>.audit-prose { margin-top:12px; }
.doc-text { max-width:100%; padding:18px; border:1px solid var(--line); border-radius:8px; background:#F8FAFC; color:#334155; font:12px/1.8 ui-monospace,SFMono-Regular,Consolas,monospace; overflow-wrap:anywhere; }
.doc-text h4 { margin-bottom:8px; font:600 11px/1.6 Inter,sans-serif; color:#64748B; }
.doc-text h4:not(:first-child) { margin-top:24px; padding-top:18px; border-top:1px solid var(--line); }
.doc-text pre { margin:0; font:inherit; white-space:pre-wrap; overflow-wrap:anywhere; }
.modal-wrap { position:fixed; inset:0; z-index:90; display:flex; justify-content:center; align-items:center; padding:24px; }
.modal-wrap>.overlay { z-index:0; }
.modal { position:relative; z-index:1; display:flex; flex-direction:column; width:min(540px,100%); max-height:calc(100dvh - 48px); background:#FFF; border:1px solid var(--line); border-radius:12px; box-shadow:0 24px 64px #0F172A20; overflow:hidden; }
.modal-custom,.modal-upload,.modal-export { width:min(640px,100%); }
.modal-head,.audit-dialog-head { display:flex; align-items:center; justify-content:space-between; flex-shrink:0; gap:16px; padding:20px 24px; border-bottom:1px solid var(--line); background:#FFF; }
.modal-head h2,.audit-dialog-head h2 { font-size:18px; line-height:1.5; overflow-wrap:anywhere; }
.modal-head>.icon-btn { margin-left:auto; }
.modal-body { padding:24px; overflow:auto; }
.modal .field { margin-bottom:20px; }
.modal .grid-2 { gap:16px; }
.modal-body>.alert-box { margin-bottom:20px; }
.modal-footer { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; padding-top:20px; margin-top:24px; border-top:1px solid var(--line); }
.modal-switch .stack>.btn { white-space:normal; text-align:left; padding:14px; }
.modal-switch .stack>.btn>span:first-child { min-width:0; overflow-wrap:anywhere; }
.company-switch-row { justify-content:space-between; }
.file-fingerprint { word-break:break-all; font-size:10px; }
.export-option { justify-content:flex-start; gap:14px; padding:18px; white-space:normal; text-align:left; }
.export-option>svg { color:var(--primary); }
.export-option strong,.export-option small { display:block; }
.export-option small { font-weight:400; line-height:1.6; margin-top:5px; }
.audit-overlay { z-index:95; display:flex; align-items:center; justify-content:center; padding:24px; }
.audit-dialog { display:flex; flex-direction:column; width:min(1040px,100%); max-height:calc(100dvh - 48px); overflow:hidden; border:1px solid var(--line); border-radius:12px; background:#FFF; box-shadow:0 24px 64px #0F172A20; }
.audit-dialog-entity { width:min(900px,100%); }
.audit-dialog-action,.audit-dialog-check-review,.audit-dialog-check-classify,.audit-dialog-check-link { width:min(580px,100%); }
.audit-dialog-import,.audit-dialog-report,.audit-dialog-snapshot { width:min(1120px,100%); }
.audit-dialog-head>.btn { flex-shrink:0; }
.audit-dialog-body { padding:24px; overflow:auto; overscroll-behavior:contain; }
.audit-dialog .form-grid { gap:20px; }
.audit-dialog .field { margin:0; }
.audit-dialog .alert-box { margin:16px 0; }
.audit-dialog-body>form>.btn { margin-top:20px; }
.audit-dialog-body>form>.form-grid { margin-bottom:20px; }
.audit-fieldset { border:0; margin:20px 0 0; padding:0; min-width:0; }
.audit-fieldset[disabled] { opacity:.75; }
.audit-form-footer { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-top:24px; padding-top:20px; border-top:1px solid var(--line); }
.audit-form-intro { font-size:13px; color:#475569; line-height:1.7; }
.audit-subsection { border-top:1px solid var(--line); margin-top:24px; padding-top:20px; }
.audit-subsection h3 { margin-bottom:16px; }
.audit-more { border:1px solid var(--line); border-radius:8px; background:var(--bg); }
.audit-more>summary { padding:14px 16px; font-size:12px; color:#334155; font-weight:600; }
.audit-more>.form-grid { padding:4px 16px 20px; }
.audit-check { display:flex; align-items:flex-start; gap:8px; margin:12px 0; color:#475569; font-size:12px; line-height:1.6; }
.audit-check input { margin:2px 0 0; }
.audit-pick { border:1px solid #CBD5E1; border-radius:8px; background:#FFF; min-width:0; }
.audit-pick>summary { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; color:#334155; font-size:12px; font-weight:600; }
.audit-pick>summary::after { content:'+'; color:var(--muted); font-size:16px; font-weight:400; }
.audit-pick[open]>summary::after { content:'−'; }
.audit-pick>summary span { margin-left:auto; color:#64748B; font-size:11px; font-weight:400; white-space:nowrap; }
.audit-pick-options { padding:8px 12px; max-height:220px; overflow:auto; border-top:1px solid var(--line); }
.audit-pick-options label { display:flex; align-items:flex-start; gap:8px; margin:0; padding:7px 0; color:#475569; font-size:12px; line-height:1.5; font-weight:400; }
.audit-pick-options input { margin:2px 0 0; }
.audit-record-toolbar { flex-wrap:wrap; gap:14px; margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid var(--line); }
.audit-record-toolbar .caption { margin-left:8px; }
.audit-record-actions { margin-left:auto; }
.audit-record-toolbar+.alert-box { margin-top:0; }
.audit-inline-evidence { padding:18px; border:1px solid #BFDBFE; border-radius:8px; background:#F8FBFF; }
.audit-inline-evidence h3 { margin-bottom:12px; font-size:13px; }
.audit-inline-evidence .suggestion { margin:0; padding:0; border:0; background:none; }
.audit-assessment-details { margin-top:14px; }
.audit-assessment-details summary { font-size:12px; color:var(--primary-hover); }
.audit-risk-rating,.audit-test-conclusion { padding-top:20px; border-top:1px solid var(--line); }
.audit-risk-rating h3,.audit-test-conclusion h3 { margin-bottom:16px; font-size:14px; }
.audit-risk-ratings { grid-template-columns:1fr 1fr 1.4fr; align-items:start; }
.audit-risk-ratings>.audit-pick { margin-top:24px; }
.audit-test-sample { grid-template-columns:repeat(3,minmax(0,1fr)); }
.audit-test-conclusion .form-grid { grid-template-columns:1fr 2fr; }
.audit-specific { display:grid; grid-template-columns:1fr 1fr 2fr auto; align-items:end; gap:12px; margin:16px 0; }
.audit-note { padding:16px; margin:12px 0; border:1px solid var(--line); border-radius:8px; background:var(--bg); }
.audit-note p { margin:12px 0; font-size:13px; white-space:pre-wrap; overflow-wrap:anywhere; }
.audit-note .actions { margin-top:12px; }
.audit-preview { max-height:340px; overflow:auto; padding:16px; margin:24px 0; border:1px solid var(--line); border-radius:8px; }
.audit-preview h3 { margin-bottom:12px; }
.audit-code { width:100%; padding:18px; border:1px solid var(--line); border-radius:8px; background:var(--bg); color:#334155; font:12px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace; tab-size:2; }
.audit-snapshot { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; max-height:68vh; overflow:auto; }
.audit-exception-context { padding:18px; border:1px solid var(--line); border-radius:8px; background:var(--bg); font-size:13px; }
.audit-exception-context>strong,.audit-exception-context>span { margin-right:16px; }
.audit-exception-context p { margin:12px 0; }
.workpaper-evidence { border-block:1px solid var(--line); padding:20px 0; }
.workpaper-outcome { align-items:start; }
.workpaper-detail { margin-top:0; border-top:1px solid var(--line); }
.workpaper-detail>summary { padding:18px 0; font-size:13px; font-weight:600; color:#334155; }
.workpaper-detail>summary span { float:right; color:var(--muted); font-size:11px; font-weight:400; }
.workpaper-detail-body { padding:0 0 20px; }
.workpaper-detail-body>form { margin-top:20px; }
.workpaper-detail-body>form>.btn { margin-top:16px; }

/* Authentication */
.auth { display:grid; grid-template-columns:minmax(400px,46%) minmax(0,1fr); min-height:100dvh; background:#FFF; }
.auth-left { position:relative; display:flex; flex-direction:column; justify-content:space-between; overflow:hidden; padding:48px 56px; background:var(--nav); color:#F8FAFC; }
.auth-left>.brand,.auth-copy,.auth-brand-footer { position:relative; z-index:1; }
.auth-left .brand img { width:38px; height:38px; }
.auth-left .brand strong { font-size:22px; }
.auth-copy { padding:72px 0; max-width:520px; }
.auth-copy>.eyebrow { color:#93C5FD; font-size:10px; letter-spacing:1.5px; }
.auth-copy h1 { font-size:clamp(32px,3vw,48px); line-height:1.2; font-weight:550; letter-spacing:-1.5px; margin:20px 0; }
.auth-copy>p { max-width:350px; font-size:14px; color:#94A3B8; line-height:1.8; }
.auth-principles { display:flex; flex-direction:column; gap:20px; padding-top:40px; }
.auth-principles>div { display:flex; align-items:center; gap:12px; font-size:12px; color:#CBD5E1; }
.auth-principles svg { color:#93C5FD; }
.auth-brand-footer { display:flex; justify-content:space-between; gap:20px; padding-top:24px; border-top:1px solid #334155; font-size:10px; color:#94A3B8; }
.auth-geometry { position:absolute; bottom:80px; right:-170px; width:420px; height:420px; transform:rotate(-30deg); pointer-events:none; }
.auth-geometry i { position:absolute; inset:0; border:1px solid #33415570; border-radius:32px; }
.auth-geometry i:nth-child(2) { inset:50px; }
.auth-geometry i:nth-child(3) { inset:100px; }
.auth-right { display:flex; align-items:center; justify-content:center; padding:48px; }
.auth-card { width:100%; max-width:380px; }
.auth-card>.eyebrow { margin-bottom:10px; }
.auth-card h2 { font-size:28px; font-weight:650; letter-spacing:-.8px; }
.auth-card>p { color:var(--muted); font-size:13px; line-height:1.7; margin-top:10px; }
.auth-card form { margin-top:28px; }
.auth-card .field { margin-bottom:20px; }
.auth-card .btn { width:100%; min-height:42px; }
.auth-card>.alert-box { margin-top:20px; }
.auth-mobile-brand { display:none; }
.divider { display:flex; align-items:center; gap:12px; margin:24px 0; color:#64748B; font-size:9px; font-weight:600; letter-spacing:.8px; }
.divider::before,.divider::after { content:""; height:1px; flex:1; background:var(--line); }
.auth-card>.auth-sample-note { text-align:center; font-size:11px; margin-top:10px; }
.auth-switch { margin-top:24px; font-size:12px; text-align:center; color:var(--muted); }
.auth-switch button { color:var(--primary-hover); font-weight:600; }
.auth-footer { padding-top:28px; margin-top:28px; border-top:1px solid var(--line); font-size:11px; color:var(--muted); text-align:center; }

/* Feedback and loading */
.boot { min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; font-size:13px; color:var(--muted); }
.spinner { display:inline-block; width:22px; height:22px; border:2px solid #DBEAFE; border-top-color:var(--primary); border-radius:50%; animation:spin .7s linear infinite; flex-shrink:0; }
.spinner.small { width:13px; height:13px; border-width:1.5px; }
.btn.primary .spinner { border-color:#FFFFFF66; border-top-color:#FFF; }
#toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); z-index:110; max-width:calc(100vw - 32px); border:1px solid #334155; border-radius:8px; background:#0F172A; color:#FFF; padding:12px 18px; font-size:12px; line-height:1.6; opacity:0; pointer-events:none; box-shadow:0 4px 16px #0F172A18; }
#toast.visible { opacity:1; }
#toast.error { background:#991B1B; border-color:#991B1B; }
@keyframes spin { to { transform:rotate(360deg); } }

/* Responsive layouts */
@media (min-width:1800px) {
  .content { padding-top:40px; }
}
@media (max-width:1350px) {
  .topbar { padding-inline:24px; gap:12px; }
  .top-right { gap:8px; }
  .breadcrumb-company strong { max-width:180px; }
  .breadcrumb-page { max-width:160px; white-space:normal; font-size:11px; }
  .content { padding:28px 24px 48px; }
  .directory-columns,.company-row { grid-template-columns:minmax(200px,1fr) 100px 148px; gap:12px 20px; }
  .directory-columns>span:nth-child(n+4) { display:none; }
  .company-row>.eng-progress { grid-column:1; width:180px; margin-left:52px; }
  .company-open { grid-column:3; justify-self:end; }
  .profile-layout { grid-template-columns:minmax(0,1fr) 240px; gap:20px; }
  .stats { gap:12px; }
  .stat { padding:18px; }
  .stat-icon { width:24px; height:24px; }
  .check-layout,.audit-binder { grid-template-columns:170px minmax(0,1fr); gap:20px; }
  .check-row { grid-template-columns:20px minmax(0,1fr) auto 16px; }
  .check-row-meta { grid-column:2; grid-row:2; justify-content:flex-start; }
  .check-row>.arrow { grid-column:4; grid-row:1; }
  .auth-left { padding:40px; }
}
@media (max-width:1100px) {
  :root { --sidebar-width:230px; }
  .topbar { height:auto; min-height:64px; flex-wrap:wrap; padding:12px 24px; gap:10px; }
  .top-context { flex-basis:100%; }
  .top-right { width:100%; justify-content:flex-end; }
  .saved { margin-right:auto; }
  .breadcrumb-company strong { max-width:260px; }
  .breadcrumb-page { max-width:none; }
  .page-header { align-items:flex-start; flex-wrap:wrap; }
  .page-header .actions { justify-content:flex-start; }
  .stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .grid-2 { grid-template-columns:1fr; }
  .profile-layout { grid-template-columns:1fr; }
  .profile-aside { position:static; display:grid; grid-template-columns:1fr 1fr; }
  .profile-aside .aside-progress { align-self:start; }
  .audit-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .audit-overview .audit-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .audit-stat { padding:16px; }
  .audit-stat>strong,.audit-financial-stats .audit-stat>strong { font-size:22px; }
  .checklist-toolbar .search-field { flex-basis:100%; }
  .checklist-toolbar select { flex:1; }
  .check-layout,.audit-binder { grid-template-columns:1fr; }
  .area-filter,.workpaper-sections { position:static; display:flex; align-items:center; gap:6px; overflow:auto; padding-bottom:5px; }
  .area-filter>.eyebrow,.workpaper-sections>.eyebrow { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .area-item,.workpaper-section { width:auto; flex:0 0 auto; max-width:230px; white-space:nowrap; padding:10px 12px; border:1px solid var(--line); background:#FFF; }
  .check-row { grid-template-columns:20px minmax(0,1fr) auto 16px; }
  .dropzone { flex-wrap:wrap; }
  .auth { grid-template-columns:42% minmax(0,1fr); }
  .auth-left { padding:32px; }
  .auth-copy h1 { font-size:34px; }
  .auth-brand-footer { flex-direction:column; gap:5px; }
  .auth-right { padding:40px; }
}
@media (max-width:800px) {
  .sidebar { width:250px; transform:translateX(-100%); visibility:hidden; }
  .sidebar.open { transform:translateX(0); visibility:visible; }
  .main-shell { margin-left:0; width:100%; }
  .mobile-menu,.sidebar-close { display:grid; }
  .sidebar-close { margin-left:auto; width:28px; height:28px; border:0; background:#1E293B; color:#CBD5E1; }
  .sidebar>.brand { padding-inline:6px; gap:8px; }
  .sidebar>.brand strong { font-size:18px; }
  .sidebar>.brand img { width:30px; height:30px; }
  .nav-backdrop { display:block; position:fixed; inset:0; z-index:29; background:#0F172A66; width:100%; height:100%; }
  .topbar { padding:12px 20px; }
  .top-context { flex-basis:auto; }
  .top-right { flex-wrap:wrap; }
  .content { padding:28px 20px 40px; }
  .auth { display:block; }
  .auth-left { display:none; }
  .auth-right { min-height:100dvh; padding:40px 24px; }
  .auth-mobile-brand { display:flex; margin-bottom:40px; }
  .auth-card>.eyebrow { display:none; }
}
@media (max-width:600px) {
  h1 { font-size:26px; }
  .content { padding:24px 16px 40px; }
  .topbar { padding:10px 16px; gap:10px; }
  .top-context { width:100%; }
  .breadcrumb { flex:1; gap:8px; justify-content:space-between; }
  .breadcrumb-company { flex:1; gap:6px; }
  .breadcrumb-company strong { max-width:145px; font-size:11px; }
  .breadcrumb-company>svg:first-child,.breadcrumb-separator { display:none; }
  .breadcrumb-page { max-width:130px; font-size:11px; text-align:right; }
  .top-right { gap:6px; }
  .top-right .pill { font-size:10px; padding:2px 6px; }
  .top-right .avatar { width:25px; height:25px; font-size:9px; }
  .top-divider { display:none; }
  .saved { font-size:10px; }
  .page-header { margin-bottom:24px; gap:16px; }
  .page-header .actions { width:100%; gap:8px; }
  .page-header .actions .btn { font-size:12px; padding:8px 10px; white-space:normal; }
  .stats { gap:10px; margin-bottom:24px; }
  .stat { padding:16px; }
  .stat .label { font-size:11px; }
  .stat-icon { display:none; }
  .stat .number { font-size:28px; }
  .stat .foot { font-size:10px; }
  .card-pad,.card-head { padding:20px; }
  .grid-2,.stack { gap:16px; }
  .company-directory-head { padding:20px; flex-direction:column; align-items:stretch; gap:16px; }
  .company-search { flex:auto; min-width:0; }
  .directory-columns { display:none; }
  .company-row { grid-template-columns:minmax(0,1fr) auto; gap:14px 12px; padding:20px; }
  .company-row>.row { grid-column:1 / -1; }
  .company-row .avatar { width:36px; height:36px; }
  .company-period { grid-column:1; }
  .company-period small { display:block; font-size:10px; margin-bottom:3px; }
  .company-row>.pill { grid-column:2; }
  .company-row>.eng-progress { margin-left:0; grid-column:1; width:100%; }
  .company-open { grid-column:2; }
  .journey { padding:20px; gap:12px; }
  .profile-aside,.summary-grid,.decision-grid,.form-grid,.multi { grid-template-columns:1fr; }
  .profile-main>.card>.form-grid { padding:20px; }
  .form-grid .field,.form-grid .full { grid-column:1; }
  .form-grid { gap:20px; }
  .steps { margin-bottom:20px; }
  .step-tab { flex:0 0 auto; padding:10px; }
  .optional-strip .btn { margin-left:0; }
  .form-footer { padding:16px 20px; }
  .form-footer small { max-width:110px; }
  .choices { gap:6px; }
  .choice { padding:8px 10px; }
  .checklist-summary { grid-template-columns:repeat(2,minmax(0,1fr)); padding:0; }
  .checklist-summary>div { padding:16px 20px; border-bottom:1px solid var(--line); }
  .checklist-summary>div:nth-child(2n) { border-right:0; }
  .checklist-summary>div:nth-last-child(-n+2) { border-bottom:0; }
  .checklist-summary strong { font-size:26px; }
  .checklist-summary span { font-size:11px; }
  .checklist-toolbar { padding:10px; gap:8px; }
  .checklist-toolbar select,.checklist-toolbar #status-filter { min-width:0; width:calc(50% - 4px); font-size:11px; }
  .scope-toggle { width:100%; }
  .scope-toggle button { flex:1; }
  .check-row { grid-template-columns:20px minmax(0,1fr) 16px; gap:8px 10px; padding:16px; }
  .check-row>.grow { grid-column:2; }
  .check-row>.pill { grid-column:2; grid-row:2; justify-self:start; }
  .check-row-meta { grid-column:2; grid-row:3; }
  .check-row>.arrow { grid-column:3; grid-row:1; }
  .check-ref { font-size:10px; }
  .check-area-head { padding:14px 16px; }
  .dropzone { padding:20px; gap:20px; }
  .dropzone>.row { align-items:flex-start; }
  .upload-icon { width:36px; height:38px; border-radius:7px; }
  .upload-icon>svg { width:20px; }
  .dropzone>.btn { width:100%; }
  .document-row { padding:20px; gap:12px; flex-wrap:wrap; }
  .document-row .grow { flex-basis:calc(100% - 64px); }
  .document-row>.pill { margin-left:52px; }
  .document-row>svg { margin-left:auto; }
  .team-row { padding:20px; gap:12px; }
  .source-row { padding:20px; gap:12px; }
  .timeline { padding-inline:20px; }
  .audit-stats,.audit-overview .audit-stats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .audit-stat { padding:16px; }
  .audit-stat>strong,.audit-financial-stats .audit-stat>strong { font-size:20px; line-height:1.4; }
  .audit-stat>.caption { font-size:11px; }
  .audit-overview .audit-stat { padding:12px; }
  .audit-overview .audit-stat>strong { font-size:18px; }
  .audit-overview .actions .btn { white-space:normal; text-align:left; }
  .audit-table th,.audit-table td { padding:12px; }
  .audit-toolbar { padding:12px; gap:8px; }
  .audit-toolbar input,.audit-toolbar select { width:100%; min-width:0; max-width:none; flex:auto; }
  .audit-toolbar>.btn { width:100%; }
  .audit-pager { flex-wrap:wrap; }
  .audit-tabs { gap:20px; }
  .audit-tabs button { font-size:11px; }
  .modal-wrap,.audit-overlay { padding:8px; }
  .modal,.audit-dialog { max-height:calc(100dvh - 16px); border-radius:10px; }
  .modal-head,.audit-dialog-head { padding:16px; gap:12px; }
  .modal-head h2,.audit-dialog-head h2 { font-size:16px; }
  .modal-body,.audit-dialog-body { padding:20px 16px; }
  .modal .grid-2 { grid-template-columns:1fr; gap:0; }
  .modal-footer .btn { flex:1; white-space:normal; }
  .audit-dialog .form-grid,.audit-dialog .audit-test-sample,.audit-dialog .audit-risk-ratings,.audit-test-conclusion .form-grid { grid-template-columns:1fr; gap:18px; }
  .audit-risk-ratings>.audit-pick { margin-top:0; }
  .audit-specific { grid-template-columns:1fr; }
  .audit-record-actions { margin-left:0; }
  .audit-record-toolbar { align-items:flex-start; }
  .audit-form-footer>.btn { width:100%; }
  .workpaper-detail>summary span { float:none; margin-left:8px; }
  .drawer-head { padding:20px; }
  .drawer-head h2 { font-size:18px; }
  .drawer-tabs { padding-inline:20px; gap:16px; }
  .drawer-tabs button { font-size:11px; }
  .drawer-body { padding:20px 20px 108px; }
  .drawer-footer { padding:16px 20px; }
  .drawer-body .grid-2 { grid-template-columns:1fr; gap:0; }
  .suggestion { padding:14px; }
  .suggestion-header .pill { margin-left:24px; }
  .suggestion-values { grid-template-columns:1fr; gap:8px; }
  .suggestion-values>svg { display:none; }
  .auth-card h2 { font-size:26px; }
  .auth-right { padding:32px 24px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}
