/* Surety 2.0.0 production architecture, design, layout, and interaction layer */
:root {
  --surety-ink-950:#0b1220;
  --surety-ink-900:#111a2e;
  --surety-ink-800:#1b2741;
  --surety-indigo-700:#4438c7;
  --surety-indigo-600:#5b50df;
  --surety-indigo-500:#7067ef;
  --surety-cyan-600:#087f8c;
  --surety-cyan-500:#0da6b6;
  --surety-gold-500:#bb7a17;
  --surety-grid:8px;
  --sidebar-min:236px;
  --sidebar-max:380px;
  --page-gutter:clamp(18px,3vw,48px);
  --content-reading:940px;
  --content-form:1040px;
  --content-wide:1640px;
  --surface-raised:color-mix(in srgb,var(--surface) 97%,var(--primary) 3%);
  --surface-sunken:color-mix(in srgb,var(--bg) 76%,var(--surface) 24%);
  --surface-selected:color-mix(in srgb,var(--primary-soft) 72%,var(--surface));
  --line-soft:color-mix(in srgb,var(--line) 68%,transparent);
  --line-accent:color-mix(in srgb,var(--primary) 30%,var(--line));
  --shadow-1:0 1px 2px rgba(11,18,32,.04),0 8px 26px rgba(11,18,32,.045);
  --shadow-2:0 18px 48px rgba(11,18,32,.11);
  --shadow-3:0 30px 90px rgba(11,18,32,.18);
  --font-display:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --font-body:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --font-mono:"SFMono-Regular",Consolas,"Liberation Mono",monospace;
}

/* 101–109: brand, type, grid, surfaces, color, status, iconography, motifs, dark mode */
html { font-size:16px; }
body { font-family:var(--font-body); font-size:.9375rem; line-height:1.58; font-kerning:normal; background:var(--bg); }
body::before { content:""; position:fixed; inset:0; z-index:-2; pointer-events:none; background-image:linear-gradient(color-mix(in srgb,var(--line) 16%,transparent) 1px,transparent 1px),linear-gradient(90deg,color-mix(in srgb,var(--line) 16%,transparent) 1px,transparent 1px); background-size:48px 48px; mask-image:linear-gradient(to bottom,rgba(0,0,0,.28),transparent 42%); }
h1,h2,h3,h4,h5,h6 { font-family:var(--font-display); font-weight:780; text-wrap:balance; }
h1 { font-size:clamp(2.1rem,3.35vw,3.55rem); line-height:1.01; letter-spacing:-.052em; }
h2 { font-size:clamp(1.28rem,1.7vw,1.72rem); line-height:1.16; letter-spacing:-.03em; }
h3 { font-size:1.025rem; line-height:1.32; letter-spacing:-.015em; }
p { max-width:76ch; }
code,kbd,pre,.hash,.fingerprint { font-family:var(--font-mono); font-variant-ligatures:none; }
.section-label,.eyebrow,.nav-label,.topbar-context span { font-size:.6875rem!important; line-height:1.2; font-weight:850!important; letter-spacing:.105em!important; text-transform:uppercase; }
.eyebrow { display:inline-flex; align-items:center; gap:8px; color:var(--primary); }
.eyebrow::before { content:""; width:18px; height:2px; border-radius:2px; background:linear-gradient(90deg,var(--primary),var(--surety-cyan-500)); }
.brand-mark { position:relative; isolation:isolate; }
.brand-mark::after { content:""; position:absolute; inset:-5px; z-index:-1; border:1px solid color-mix(in srgb,var(--primary) 25%,transparent); border-radius:12px; transform:rotate(45deg); }
.brand-word strong { letter-spacing:-.04em; }
.brand-word small { letter-spacing:.15em; }

.panel,.admin-section,.case-card,.market-card,.billing-summary-card,.billing-plan-card,.billing-usage-card,.billing-api-plan {
  border-color:var(--line-soft)!important;
  background:var(--surface-raised)!important;
  box-shadow:var(--shadow-1)!important;
}
.panel:hover:not(:has(input,select,textarea,button)),.admin-section:hover:not(:has(input,select,textarea,button)) { border-color:var(--line); }
.panel-inset,.surface-sunken,.table-tools,.filter-toolbar { background:var(--surface-sunken); }
.status-badge,.case-status,.billing-status,.trust-badge,.integration-status,.market-status-pill { border-width:1px; box-shadow:inset 0 0 0 1px rgba(255,255,255,.15); }
.case-status.success,.status-badge.approved,.status-badge.active,.status-badge.complete,.billing-status.paid { color:#087443!important; background:#e9f8f0!important; border-color:#9fdec0!important; }
.case-status.danger,.status-badge.revoked,.status-badge.rejected,.status-badge.failed,.billing-status.failed { color:#a5202c!important; background:#fff0f1!important; border-color:#efb3b9!important; }
.case-status.warning,.status-badge.pending,.status-badge.expired,.billing-status.past-due { color:#855807!important; background:#fff7e5!important; border-color:#eccb87!important; }
.case-status.info,.status-badge.submitted,.status-badge.review,.billing-status.open { color:#245ea9!important; background:#edf4ff!important; border-color:#b6cef3!important; }
.icon-button i,.primary-button i,.secondary-button i,.nav-link i,.metric-icon i { width:1em; text-align:center; }

:root[data-theme="dark"] {
  --bg:#090f1b;
  --surface:#121a2a;
  --surface-soft:#182235;
  --surface-raised:#141e30;
  --surface-sunken:#0d1523;
  --surface-selected:#25234a;
  --line:#2a3650;
  --line-strong:#3a4865;
  --line-soft:#253149;
  --text:#dce4f2;
  --text-strong:#f5f7fb;
  --muted:#9aa8bd;
  --muted-2:#75849b;
  --primary:#968fff;
  --primary-soft:#28254d;
  --blue-soft:#172b48;
  --green-soft:#112d25;
  --red-soft:#371d25;
  --amber-soft:#352914;
  --shadow-1:0 1px 2px rgba(0,0,0,.24),0 14px 34px rgba(0,0,0,.2);
  --shadow-2:0 22px 60px rgba(0,0,0,.34);
  --shadow-3:0 34px 100px rgba(0,0,0,.46);
}
:root[data-theme="dark"] body::before { opacity:.46; }
:root[data-theme="dark"] .case-status.success,:root[data-theme="dark"] .status-badge.approved,:root[data-theme="dark"] .status-badge.active,:root[data-theme="dark"] .status-badge.complete,:root[data-theme="dark"] .billing-status.paid { color:#78d9ac!important; background:#123225!important; border-color:#24634b!important; }
:root[data-theme="dark"] .case-status.danger,:root[data-theme="dark"] .status-badge.revoked,:root[data-theme="dark"] .status-badge.rejected,:root[data-theme="dark"] .status-badge.failed,:root[data-theme="dark"] .billing-status.failed { color:#ff9da6!important; background:#3a1d25!important; border-color:#71333e!important; }
:root[data-theme="dark"] .case-status.warning,:root[data-theme="dark"] .status-badge.pending,:root[data-theme="dark"] .status-badge.expired,:root[data-theme="dark"] .billing-status.past-due { color:#f4c66f!important; background:#352814!important; border-color:#6a4d1b!important; }
:root[data-theme="dark"] .case-status.info,:root[data-theme="dark"] .status-badge.submitted,:root[data-theme="dark"] .status-badge.review,:root[data-theme="dark"] .billing-status.open { color:#97bff5!important; background:#172b48!important; border-color:#315a8e!important; }

/* 103, 111–120: grid, shell, navigation, page templates */
.sidebar { width:clamp(var(--sidebar-min),var(--sidebar-w),var(--sidebar-max)); background:color-mix(in srgb,var(--surface) 96%,transparent); backdrop-filter:blur(20px); }
.sidebar::after { content:""; position:absolute; inset:0 0 auto; height:160px; z-index:-1; pointer-events:none; background:radial-gradient(circle at 25% 10%,color-mix(in srgb,var(--primary) 15%,transparent),transparent 68%); }
.sidebar-resize-handle { position:absolute; inset:0 -5px 0 auto; z-index:8; width:10px; border:0; background:transparent; cursor:col-resize; touch-action:none; }
.sidebar-resize-handle::after { content:""; position:absolute; inset:18px 4px; width:2px; border-radius:2px; background:transparent; transition:background .16s ease; }
.sidebar-resize-handle:hover::after,.sidebar-resize-handle.dragging::after { background:var(--primary); }
body.sidebar-resizing { cursor:col-resize; user-select:none; }
body.sidebar-collapsed .sidebar-resize-handle { display:none; }
.primary-nav { padding-bottom:20px; }
.nav-label { display:flex; align-items:center; gap:8px; }
.nav-link { position:relative; }
.nav-link::before { content:""; position:absolute; left:2px; width:3px; height:18px; border-radius:3px; background:transparent; }
.nav-link.active::before { background:linear-gradient(var(--primary),var(--surety-cyan-500)); }
.nav-link.active { box-shadow:none!important; background:linear-gradient(90deg,color-mix(in srgb,var(--primary-soft) 85%,var(--surface)),transparent); }
.topbar { border-bottom:1px solid color-mix(in srgb,var(--line) 78%,transparent); background:color-mix(in srgb,var(--surface) 88%,transparent); backdrop-filter:blur(18px) saturate(130%); }
.main,.admin-main,.case-main,.panel-workspace { transition:margin-left .18s ease,width .18s ease; }
.page { width:min(var(--content-wide),100%); padding-inline:var(--page-gutter); }
.page-template-reading { width:min(var(--content-reading),100%); margin-inline:auto; }
.page-template-form { width:min(var(--content-form),100%); margin-inline:auto; }
.page-template-wide { width:min(var(--content-wide),100%); }
.page.page-template-reading > .page-heading { margin-bottom:clamp(22px,3vw,34px); }
.page.page-template-reading > section + section { margin-top:clamp(18px,2.4vw,28px); }
.context-nav { position:sticky; top:var(--topbar-h); z-index:34; margin:-12px 0 22px; padding:8px; display:flex; align-items:center; gap:5px; overflow:auto; border:1px solid var(--line-soft); border-radius:14px; background:color-mix(in srgb,var(--surface) 92%,transparent); box-shadow:var(--shadow-1); backdrop-filter:blur(18px); scrollbar-width:none; }
.context-nav a { min-height:38px; padding:0 13px; display:inline-flex; align-items:center; gap:8px; border-radius:9px; color:var(--muted); font-size:.78rem; font-weight:760; white-space:nowrap; }
.context-nav a:hover { color:var(--text-strong); background:var(--surface-soft); }
.context-nav a.active { color:var(--primary); background:var(--primary-soft); }
.context-nav-label { margin-right:4px; padding:0 8px; color:var(--muted-2); font-size:.66rem; font-weight:850; letter-spacing:.1em; text-transform:uppercase; }
.workspace-hero,.panel-hero,.admin-heading,.case-heading,.page-heading { min-height:220px; align-items:center; border-color:var(--line-accent); background:linear-gradient(130deg,color-mix(in srgb,var(--primary-soft) 76%,var(--surface)) 0%,var(--surface) 52%,color-mix(in srgb,var(--blue-soft) 52%,var(--surface)) 100%); box-shadow:var(--shadow-1); }
.workspace-hero::before,.panel-hero::before,.admin-heading::before,.case-heading::before,.page-heading::before { content:""; position:absolute; inset:auto -80px -130px auto; width:330px; height:330px; border:1px solid color-mix(in srgb,var(--primary) 18%,transparent); border-radius:50%; box-shadow:0 0 0 34px color-mix(in srgb,var(--primary) 4%,transparent),0 0 0 70px color-mix(in srgb,var(--surety-cyan-500) 3%,transparent); }
.workspace-hero::after,.panel-hero::after,.admin-heading::after,.case-heading::after,.page-heading::after { width:160px!important; height:160px!important; right:48px!important; top:30px!important; border:1px dashed color-mix(in srgb,var(--primary) 24%,transparent); background:transparent!important; }
.page-header-meta { margin-top:14px; display:flex; flex-wrap:wrap; gap:8px; }
.page-header-meta span { padding:6px 9px; display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); border-radius:999px; color:var(--muted); background:color-mix(in srgb,var(--surface) 72%,transparent); font-size:.72rem; font-weight:700; }
.sticky-action-bar { position:fixed; left:calc((100vw + var(--sidebar-w)) / 2); bottom:18px; z-index:120; transform:translateX(-50%) translateY(16px); max-width:min(900px,calc(100vw - var(--sidebar-w) - 40px)); padding:9px; display:flex; align-items:center; gap:8px; border:1px solid color-mix(in srgb,var(--line) 82%,transparent); border-radius:16px; background:color-mix(in srgb,var(--surface) 92%,transparent); box-shadow:var(--shadow-2); backdrop-filter:blur(20px); opacity:0; pointer-events:none; transition:.2s ease; }
.sticky-action-bar.visible { transform:translateX(-50%); opacity:1; pointer-events:auto; }
.sticky-action-bar > span { padding:0 8px; color:var(--muted); font-size:.75rem; font-weight:750; }
.sticky-action-bar .primary-button,.sticky-action-bar .secondary-button,.sticky-action-bar .icon-button { min-height:40px; }
body.focus-mode .sidebar,body.focus-mode .topbar,body.focus-mode .mobile-dock,body.focus-mode .context-nav,body.focus-mode .ux-breadcrumbs { display:none!important; }
body.focus-mode .main,body.focus-mode .admin-main,body.focus-mode .case-main,body.focus-mode .panel-workspace { width:100%!important; margin-left:0!important; padding-top:24px!important; }
body.focus-mode .page,body.focus-mode .admin-main,body.focus-mode .case-main { max-width:1720px; }
.focus-mode-exit { position:fixed; top:14px; right:14px; z-index:300; }
.focus-mode-exit[hidden],body:not(.focus-mode) .focus-mode-exit { display:none!important; }
body.focus-mode .focus-mode-exit:not([hidden]) { display:inline-flex!important; }
.ux-split-pane { --split-primary:68%; position:relative; grid-template-columns:minmax(0,var(--split-primary)) minmax(280px,1fr)!important; }
.split-pane-handle { position:absolute; top:0; bottom:0; left:var(--split-primary); z-index:12; width:18px; transform:translateX(-9px); cursor:col-resize; touch-action:none; }
.split-pane-handle::after { content:""; position:absolute; top:18px; bottom:18px; left:8px; width:2px; border-radius:3px; background:var(--line); }
.split-pane-handle:hover::after,.split-pane-handle.dragging::after { background:var(--primary); box-shadow:0 0 0 4px var(--primary-soft); }
.ux-drawer { width:min(600px,100vw)!important; }
.ux-drawer>header { min-height:82px!important; }

/* 121–130: dashboards, attention, metrics, charts, configurability */
.workspace-stats,.admin-metric-grid,.validator-metrics,.market-metrics,.organization-summary,.organization-kpis { grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); }
.workspace-stats > article,.admin-metric-grid > article,.validator-metrics > article,.market-metrics > article,.organization-summary > div,.organization-kpis > article { position:relative; min-height:150px; align-content:center; overflow:hidden; }
.workspace-stats > article::after,.admin-metric-grid > article::after,.validator-metrics > article::after,.market-metrics > article::after { content:""; position:absolute; inset:auto -30px -42px auto; width:110px; height:110px; border:1px solid color-mix(in srgb,var(--primary) 10%,transparent); border-radius:50%; }
.metric-icon,.workspace-stats > article > span:first-child { width:50px; height:50px; color:var(--primary); background:linear-gradient(145deg,var(--primary-soft),color-mix(in srgb,var(--blue-soft) 65%,var(--surface))); }
.metric-context { grid-column:1/-1; margin-top:9px; display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--muted); font-size:.72rem; }
.metric-context b { color:var(--text-strong); font-size:.72rem; }
.metric-trend { display:inline-flex; align-items:center; gap:5px; }
.metric-trend.good { color:var(--green); }
.metric-trend.warning { color:var(--amber); }
.metric-trend.danger { color:var(--red); }
.attention-rail { margin:0 0 24px; padding:14px; display:grid; grid-template-columns:auto minmax(0,1fr); gap:14px; align-items:start; border:1px solid color-mix(in srgb,var(--amber) 30%,var(--line)); border-radius:18px; background:linear-gradient(120deg,color-mix(in srgb,var(--amber-soft) 74%,var(--surface)),var(--surface)); box-shadow:var(--shadow-1); }
.attention-rail > span { width:42px; height:42px; display:grid; place-items:center; border-radius:13px; color:var(--amber); background:var(--amber-soft); }
.attention-rail header { display:flex; justify-content:space-between; gap:16px; align-items:center; }
.attention-rail h2 { margin:0; font-size:1rem; }
.attention-items { margin-top:10px; display:flex; gap:8px; overflow:auto; scrollbar-width:thin; }
.attention-items a { min-width:230px; padding:11px 12px; display:grid; gap:3px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.attention-items small { color:var(--muted); }
.dashboard-layout-controls,.chart-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
.dashboard-layout-controls button,.chart-toolbar button { min-height:36px; padding:0 10px; border:1px solid var(--line); border-radius:9px; color:var(--muted); background:var(--surface); font-size:.73rem; font-weight:750; cursor:pointer; }
.dashboard-layout-controls button.active,.chart-toolbar button.active { color:var(--primary); border-color:var(--line-accent); background:var(--primary-soft); }
[data-dashboard-card] { transition:opacity .15s ease,transform .15s ease; }
[data-dashboard-edit="true"] [data-dashboard-card] { cursor:grab; outline:1px dashed color-mix(in srgb,var(--primary) 30%,var(--line)); outline-offset:3px; }
[data-dashboard-card].dragging { opacity:.45; transform:scale(.985); }
.dashboard-card-hidden { display:none!important; }
.dashboard-restore { padding:14px; display:flex; flex-wrap:wrap; gap:8px; border:1px dashed var(--line-strong); border-radius:14px; background:var(--surface-sunken); }
.chart-card .section-head { align-items:center; }
.chart-frame { min-height:300px; }
.chart-frame canvas { filter:saturate(.9); }
.mini-progress { height:7px; overflow:hidden; border-radius:999px; background:var(--surface-soft); }
.mini-progress span { height:100%; display:block; border-radius:inherit; background:linear-gradient(90deg,var(--primary),var(--surety-cyan-500)); }
.operational-heatmap { display:grid; grid-template-columns:repeat(7,minmax(24px,1fr)); gap:5px; }
.operational-heatmap span { aspect-ratio:1; display:grid; place-items:center; border-radius:6px; background:color-mix(in srgb,var(--primary) calc(var(--heat,0) * 1%),var(--surface-soft)); font-size:.62rem; }

/* 131–140: dense operational tables */
.admin-table-wrap,.table-scroll,.billing-table-wrap { box-shadow:var(--shadow-1); }
table { border-collapse:separate!important; border-spacing:0!important; }
thead th { position:sticky; top:0; z-index:5; background:color-mix(in srgb,var(--surface) 95%,var(--bg))!important; backdrop-filter:blur(12px); }
thead th:first-child,tbody td:first-child { position:sticky; left:0; z-index:4; background:inherit; box-shadow:8px 0 14px -14px rgba(11,18,32,.55); }
thead th:last-child[data-actions],tbody td:last-child[data-actions],table[data-sticky-actions] thead th:last-child,table[data-sticky-actions] tbody td:last-child { position:sticky; right:0; z-index:4; background:inherit; box-shadow:-8px 0 14px -14px rgba(11,18,32,.55); }
tbody tr { --row-accent:transparent; }
tbody tr:hover { --row-accent:var(--surface-soft); }
tbody tr:focus-within { --row-accent:var(--primary-soft); outline:2px solid color-mix(in srgb,var(--primary) 32%,transparent); outline-offset:-2px; }
tbody tr.is-selected { --row-accent:var(--surface-selected); }
tbody td { background:var(--row-accent,var(--surface)); }
.record-identity { display:grid; gap:2px; min-width:180px; }
.record-identity strong { font-size:.875rem; }
.record-identity small,.record-identity code { color:var(--muted); font-size:.7rem; }
.table-row-toggle { width:34px; height:34px; display:grid; place-items:center; border:1px solid var(--line); border-radius:8px; background:var(--surface); cursor:pointer; }
.table-row-detail td { position:static!important; padding:0!important; box-shadow:none!important; }
.table-row-detail>td>div { padding:18px; display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; border-top:1px solid var(--line); background:var(--surface-sunken); }
.table-row-detail dl { margin:0; }
.table-row-detail dt { color:var(--muted); font-size:.68rem; text-transform:uppercase; letter-spacing:.07em; }
.table-row-detail dd { margin:3px 0 0; font-weight:700; overflow-wrap:anywhere; }
.table-group-row td { position:static!important; padding:10px 13px!important; color:var(--muted); background:var(--surface-sunken)!important; font-size:.7rem; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
.bulk-action-bar { position:fixed; left:calc((100vw + var(--sidebar-w)) / 2); bottom:18px; z-index:140; transform:translateX(-50%) translateY(18px); padding:9px 11px; display:flex; align-items:center; gap:8px; border:1px solid var(--line-accent); border-radius:15px; color:var(--text); background:color-mix(in srgb,var(--surface) 94%,transparent); box-shadow:var(--shadow-2); backdrop-filter:blur(18px); opacity:0; pointer-events:none; transition:.2s ease; }
.bulk-action-bar.visible { transform:translateX(-50%); opacity:1; pointer-events:auto; }
.bulk-action-bar strong { padding:0 7px; }
.filter-chip-row { margin:8px 0 13px; display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
.filter-chip { min-height:31px; padding:0 9px; display:inline-flex; align-items:center; gap:7px; border:1px solid var(--line); border-radius:999px; color:var(--muted); background:var(--surface); font-size:.7rem; font-weight:720; }
.filter-chip button { width:20px; height:20px; display:grid; place-items:center; border-radius:50%; color:inherit; background:var(--surface-soft); cursor:pointer; }
.record-preview-popover { position:fixed; z-index:500; width:min(420px,calc(100vw - 24px)); max-height:min(520px,calc(100vh - 24px)); padding:18px; overflow:auto; border:1px solid var(--line); border-radius:17px; background:var(--surface); box-shadow:var(--shadow-3); }
.record-preview-popover header { margin-bottom:12px; display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.record-preview-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.record-preview-grid div { padding:10px; border-radius:10px; background:var(--surface-soft); }
.record-preview-grid span,.record-preview-grid strong { display:block; }
.record-preview-grid span { color:var(--muted); font-size:.65rem; text-transform:uppercase; letter-spacing:.06em; }

/* 141–150: forms, review, workflow, completion */
form:not(.global-search):not(.private-signout):not(.topbar-signout):not(.inline-auth-action) { --field-gap:15px; }
.form-section { padding:20px; display:grid; gap:15px; border:1px solid var(--line); border-radius:16px; background:var(--surface-raised); }
.form-section + .form-section { margin-top:15px; }
.form-section-head { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:12px; align-items:start; }
.form-section-head > span { width:36px; height:36px; display:grid; place-items:center; border-radius:11px; color:var(--primary); background:var(--primary-soft); font-weight:850; }
.form-section-head h2,.form-section-head h3,.form-section-head p { margin:0; }
.form-section-head p { margin-top:3px; color:var(--muted); }
label[data-field-width="short"],.field-short { max-width:220px; }
label[data-field-width="medium"],.field-medium { max-width:480px; }
label[data-field-width="wide"],.field-wide { max-width:760px; }
label[data-field-width="full"],.field-full { max-width:none; }
.form-with-summary { display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,360px); gap:20px; align-items:start; }
.form-context-summary { position:sticky; top:calc(var(--topbar-h) + 18px); padding:19px; border:1px solid var(--line-accent); border-radius:17px; background:linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--primary-soft) 35%,var(--surface))); box-shadow:var(--shadow-1); }
.form-context-summary h2,.form-context-summary h3 { margin:.25rem 0 .7rem; }
.form-context-summary dl { margin:0; display:grid; grid-template-columns:1fr auto; gap:10px; }
.form-context-summary dt { color:var(--muted); }
.form-context-summary dd { margin:0; font-weight:780; text-align:right; }
.file-drop-zone { position:relative; min-height:150px; padding:24px; display:grid; place-items:center; align-content:center; gap:8px; border:1.5px dashed var(--line-strong); border-radius:16px; background:var(--surface-sunken); text-align:center; cursor:pointer; }
.file-drop-zone.dragover { border-color:var(--primary); background:var(--primary-soft); box-shadow:var(--focus-ring); }
.file-drop-content { display:grid; place-items:center; gap:8px; }
.file-drop-content>i { font-size:1.55rem; color:var(--primary); }
.file-drop-original { color:var(--muted); font-size:.76rem; font-weight:600; }
.file-drop-zone input[type="file"] { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.file-preview-list { margin-top:10px; display:grid; gap:8px; }
.file-preview-item { padding:10px; display:grid; grid-template-columns:36px minmax(0,1fr) auto; gap:10px; align-items:center; border:1px solid var(--line); border-radius:11px; background:var(--surface); }
.file-preview-item>span:first-child { width:36px; height:36px; display:grid; place-items:center; border-radius:9px; color:var(--primary); background:var(--primary-soft); }
.select-enhanced { position:relative; }
.select-enhanced-trigger { width:100%; min-height:46px; padding:0 12px; display:flex; align-items:center; justify-content:space-between; gap:10px; border:1px solid var(--line-strong); border-radius:11px; color:var(--text); background:var(--surface); cursor:pointer; }
.select-enhanced-menu { position:absolute; inset:calc(100% + 6px) 0 auto; z-index:120; max-height:310px; padding:8px; overflow:auto; border:1px solid var(--line); border-radius:13px; background:var(--surface); box-shadow:var(--shadow-2); }
.select-enhanced-menu input { position:sticky; top:0; z-index:2; width:100%; margin-bottom:7px; }
.select-enhanced-option { width:100%; min-height:40px; padding:8px 10px; display:grid; gap:1px; border-radius:8px; text-align:left; background:transparent; cursor:pointer; }
.select-enhanced-option:hover,.select-enhanced-option.active { color:var(--primary); background:var(--primary-soft); }
.select-enhanced-option:disabled { opacity:.55; cursor:not-allowed; }
.form-error-summary { margin-bottom:15px; padding:15px 16px; display:grid; grid-template-columns:auto 1fr; gap:11px; border:1px solid color-mix(in srgb,var(--red) 38%,var(--line)); border-radius:14px; color:var(--red); background:var(--red-soft); }
.form-error-summary ul { margin:4px 0 0; padding-left:18px; }
.draft-status { min-height:32px; padding:0 9px; display:inline-flex; align-items:center; gap:7px; border-radius:999px; color:var(--muted); background:var(--surface-soft); font-size:.7rem; font-weight:720; }
.draft-status.dirty { color:var(--amber); background:var(--amber-soft); }
.draft-status.saving i { animation:suretySpin .8s linear infinite; }
.draft-status.saved { color:var(--green); background:var(--green-soft); }
.draft-status.offline,.draft-status.conflict { color:var(--amber); background:var(--amber-soft); }
.compare-view { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.compare-column { min-width:0; padding:17px; border:1px solid var(--line); border-radius:15px; background:var(--surface); }
.compare-column.current { background:var(--surface-sunken); }
.compare-column.proposed { border-color:var(--line-accent); background:color-mix(in srgb,var(--primary-soft) 34%,var(--surface)); }
.compare-row { padding:10px 0; display:grid; grid-template-columns:minmax(120px,.45fr) minmax(0,1fr); gap:12px; border-bottom:1px solid var(--line); }
.compare-row:last-child { border-bottom:0; }
.compare-row span { color:var(--muted); font-size:.72rem; }
.workflow-progress { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:0; }
.workflow-progress-step { position:relative; padding:46px 12px 10px; text-align:center; }
.workflow-progress-step::before { content:""; position:absolute; top:17px; left:50%; right:-50%; height:2px; background:var(--line); }
.workflow-progress-step:last-child::before { display:none; }
.workflow-progress-step>span { position:absolute; top:2px; left:50%; z-index:1; width:32px; height:32px; transform:translateX(-50%); display:grid; place-items:center; border:2px solid var(--line); border-radius:50%; color:var(--muted); background:var(--surface); font-weight:850; }
.workflow-progress-step.complete::before,.workflow-progress-step.complete>span { border-color:var(--green); background:var(--green); color:#fff; }
.workflow-progress-step.active>span { border-color:var(--primary); color:#fff; background:var(--primary); box-shadow:0 0 0 6px var(--primary-soft); }
.workflow-progress-step.blocked>span { border-color:var(--red); color:var(--red); background:var(--red-soft); }
.completion-panel { position:relative; padding:clamp(24px,4vw,44px); overflow:hidden; border:1px solid color-mix(in srgb,var(--green) 32%,var(--line)); border-radius:22px; background:linear-gradient(135deg,color-mix(in srgb,var(--green-soft) 72%,var(--surface)),var(--surface)); box-shadow:var(--shadow-1); }
.completion-panel::after { content:"✓"; position:absolute; right:22px; top:-28px; color:color-mix(in srgb,var(--green) 10%,transparent); font-size:150px; font-weight:900; line-height:1; }
.completion-panel>span { width:52px; height:52px; display:grid; place-items:center; border-radius:16px; color:#fff; background:var(--green); box-shadow:0 10px 24px color-mix(in srgb,var(--green) 25%,transparent); }
.completion-panel h1,.completion-panel h2 { margin:14px 0 7px; }
.completion-actions { margin-top:18px; display:flex; flex-wrap:wrap; gap:9px; }

/* 110: live visual QA gallery */
.style-guide-page { display:grid; gap:22px; }
.style-guide-index { display:flex; flex-wrap:wrap; gap:7px; }
.style-guide-index a { min-height:36px; padding:0 11px; display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:999px; color:var(--muted); background:var(--surface); font-size:.72rem; font-weight:750; }
.style-guide-section { scroll-margin-top:calc(var(--topbar-h) + 26px); }
.style-guide-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:14px; }
.swatch-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:9px; }
.swatch { min-height:100px; padding:12px; display:flex; align-items:flex-end; border:1px solid var(--line); border-radius:13px; background:var(--swatch); }
.swatch span { padding:4px 7px; border-radius:7px; background:color-mix(in srgb,var(--surface) 88%,transparent); font-size:.68rem; font-weight:750; }
.component-demo { padding:18px; border:1px solid var(--line); border-radius:15px; background:var(--surface-sunken); }
.component-demo-row { display:flex; align-items:center; flex-wrap:wrap; gap:9px; }

@media (max-width:1180px) {
  .form-with-summary { grid-template-columns:1fr; }
  .form-context-summary { position:relative; top:auto; }
  .ux-split-pane { grid-template-columns:1fr!important; }
  .split-pane-handle { display:none; }
}
@media (max-width:980px) {
  .sidebar-resize-handle { display:none; }
  .sticky-action-bar,.bulk-action-bar { left:50%; max-width:calc(100vw - 24px); }
  .context-nav { top:var(--topbar-h); margin-inline:-6px; }
}
@media (max-width:760px) {
  body::before { display:none; }
  h1 { font-size:2rem; }
  .workspace-hero,.panel-hero,.admin-heading,.case-heading,.page-heading { min-height:auto; }
  .workspace-hero::before,.panel-hero::before,.admin-heading::before,.case-heading::before,.page-heading::before,.workspace-hero::after,.panel-hero::after,.admin-heading::after,.case-heading::after,.page-heading::after { display:none; }
  .context-nav { top:var(--topbar-h); border-radius:12px; }
  .sticky-action-bar { bottom:84px; width:calc(100vw - 20px); overflow:auto; justify-content:flex-start; }
  .bulk-action-bar { bottom:84px; max-width:calc(100vw - 20px); overflow:auto; }
  thead th:first-child,tbody td:first-child,thead th:last-child[data-actions],tbody td:last-child[data-actions],table[data-sticky-actions] thead th:last-child,table[data-sticky-actions] tbody td:last-child { position:static; box-shadow:none; }
  tbody tr { background:var(--surface); }
  tbody td { background:transparent; }
  .record-preview-grid,.compare-view { grid-template-columns:1fr; }
  .form-section { padding:16px; }
  .form-section-head { grid-template-columns:auto minmax(0,1fr); }
  .form-section-head>*:last-child:not(:nth-child(2)) { grid-column:1/-1; }
  label[data-field-width],.field-short,.field-medium,.field-wide,.field-full { max-width:none; }
  .workflow-progress { grid-template-columns:1fr; }
  .workflow-progress-step { min-height:58px; padding:8px 10px 8px 54px; text-align:left; }
  .workflow-progress-step::before { top:34px; left:25px; right:auto; bottom:-25px; width:2px; height:auto; }
  .workflow-progress-step>span { top:8px; left:25px; transform:translateX(-50%); }
}
@media (prefers-reduced-motion:reduce) {
  .sticky-action-bar,.bulk-action-bar,.sidebar-resize-handle::after,[data-dashboard-card] { transition:none!important; }
}
.table-row-select { width:17px; height:17px; margin:0 9px 0 0; vertical-align:-3px; accent-color:var(--primary); }
td:has(> .table-row-select) { min-width:210px; }
.compact-select { min-height:38px; max-width:180px; padding:0 30px 0 10px; border:1px solid var(--line); border-radius:9px; color:var(--text); background:var(--surface); font-size:.72rem; font-weight:720; }
@media (max-width:760px) {
  .table-row-select { position:absolute; top:12px; right:10px; margin:0; }
  tbody tr { position:relative; }
  td:has(> .table-row-select) { min-width:0; padding-right:38px!important; }
}
.dashboard-card-hide { position:absolute; top:9px; right:9px; z-index:3; width:34px!important; min-width:34px!important; height:34px!important; min-height:34px!important; display:none; }
[data-dashboard-edit="true"] .dashboard-card-hide { display:grid; }
.metric-context a { color:var(--primary); font-weight:760; }
.record-identity { display:inline-grid; vertical-align:middle; }
.table-row-toggle { display:inline-grid; margin-left:8px; vertical-align:middle; }
.design-context-summary { position:sticky; top:calc(var(--topbar-h) + 18px); }
.design-comparison article { border-color:var(--line-accent)!important; background:linear-gradient(90deg,var(--surface-sunken) 0 48%,color-mix(in srgb,var(--primary-soft) 40%,var(--surface)) 52% 100%)!important; }
.form-section>legend { padding:0 6px; color:var(--text-strong); font-size:1rem; font-weight:800; }
@media(max-width:760px){.design-context-summary{position:relative;top:auto}.design-comparison article{background:var(--surface)!important}.table-row-toggle{float:right}}
.case-status::before,.billing-status::before { content:""; width:6px; height:6px; margin-right:6px; flex:0 0 auto; border-radius:50%; background:currentColor; box-shadow:0 0 0 3px color-mix(in srgb,currentColor 12%,transparent); }
.page.page-template-wide { width:min(var(--content-wide),100%); }
/* Public wide templates use the complete desktop canvas; page gutters provide the breathing room. */
body:not([data-layout="workspace"]) .main > .page.page-template-wide { width:100%; max-width:none; margin-inline:0; }
.admin-main.page-template-wide,.case-main.page-template-wide,.panel-workspace.page-template-wide { width:min(var(--content-wide),calc(100% - var(--sidebar-w))); }
.admin-main.page-template-form,.case-main.page-template-form,.panel-workspace.page-template-form { width:min(var(--content-form),calc(100% - var(--sidebar-w))); }
.admin-main.page-template-reading,.case-main.page-template-reading,.panel-workspace.page-template-reading { width:min(var(--content-reading),calc(100% - var(--sidebar-w))); }
@media(max-width:980px){.admin-main.page-template-wide,.case-main.page-template-wide,.panel-workspace.page-template-wide,.admin-main.page-template-form,.case-main.page-template-form,.panel-workspace.page-template-form,.admin-main.page-template-reading,.case-main.page-template-reading,.panel-workspace.page-template-reading{width:100%}}

/* 1.9.1 consistency fixes */
.auth-alert.success.completion-enhanced,.panel-scoped-alert.success.completion-enhanced { position:relative; display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; padding-right:12px; }
.completion-enhanced-icon { width:30px; height:30px; display:grid; place-items:center; border-radius:10px; color:#fff; background:var(--green); }
.completion-dismiss { margin-left:auto; }

/* 2.0 production architecture workspaces */
.platform-workspace { display:grid; gap:20px; }
.platform-loading { min-height:220px; display:grid; place-items:center; align-content:center; gap:9px; color:var(--muted); text-align:center; }
.platform-loading strong { color:var(--text-strong); font-size:1rem; }
.platform-loading small { max-width:46ch; }
.platform-spinner { width:34px; height:34px; border:3px solid var(--line); border-top-color:var(--primary); border-radius:50%; animation:platform-spin .8s linear infinite; }
@keyframes platform-spin { to { transform:rotate(360deg); } }
.platform-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; }
.platform-metric { min-height:128px; padding:17px; display:grid; grid-template-columns:42px minmax(0,1fr); gap:12px; border:1px solid var(--line-soft); border-radius:16px; background:var(--surface-raised); box-shadow:var(--shadow-1); }
.platform-metric > span { width:42px; height:42px; display:grid; place-items:center; border-radius:13px; color:var(--primary); background:var(--primary-soft); }
.platform-metric small,.platform-metric p { color:var(--muted); }
.platform-metric strong { display:block; margin:2px 0 4px; color:var(--text-strong); font-size:1.35rem; line-height:1.1; }
.platform-metric p { margin:0; font-size:.72rem; line-height:1.45; }
.platform-metric.is-success > span { color:var(--green); background:var(--green-soft); }
.platform-metric.is-warning > span,.platform-metric.is-amber > span { color:var(--amber); background:var(--amber-soft); }
.platform-metric.is-danger > span { color:var(--red); background:var(--red-soft); }
.platform-two-column { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(320px,.8fr); gap:18px; align-items:start; }
.platform-section { min-width:0; }
.platform-section > .platform-table-wrapper { margin-inline:-4px; }
.platform-status { width:max-content; max-width:100%; min-height:26px; padding:3px 8px; display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:999px; color:var(--muted); background:var(--surface-sunken); font-size:.67rem; font-weight:800; letter-spacing:.015em; white-space:nowrap; }
.platform-status::before { content:""; width:6px; height:6px; margin-right:6px; border-radius:50%; background:currentColor; }
.platform-status.is-active,.platform-status.is-enabled,.platform-status.is-pass,.platform-status.is-passed,.platform-status.is-published,.platform-status.is-matched,.platform-status.is-healthy,.platform-status.is-ready,.platform-status.is-resolved { color:var(--green); background:var(--green-soft); border-color:color-mix(in srgb,var(--green) 35%,var(--line)); }
.platform-status.is-failed,.platform-status.is-fail,.platform-status.is-critical,.platform-status.is-dead,.platform-status.is-disabled,.platform-status.is-review-required,.platform-status.is-open { color:var(--red); background:var(--red-soft); border-color:color-mix(in srgb,var(--red) 35%,var(--line)); }
.platform-status.is-pending,.platform-status.is-prepared,.platform-status.is-queued,.platform-status.is-warning,.platform-status.is-medium,.platform-status.is-paused,.platform-status.is-not-run { color:var(--amber); background:var(--amber-soft); border-color:color-mix(in srgb,var(--amber) 35%,var(--line)); }
.platform-table td strong,.platform-table td small { display:block; }
.platform-table td small { margin-top:3px; max-width:52ch; color:var(--muted); font-size:.68rem; line-height:1.35; }
.platform-table td code { overflow-wrap:anywhere; }
.platform-table td:last-child { white-space:normal; }
.platform-table td:last-child .secondary-button + .secondary-button { margin-left:5px; }
.platform-empty { min-height:130px; display:grid; place-items:center; align-content:center; gap:8px; padding:25px; color:var(--muted); text-align:center; }
.platform-empty > i { color:var(--primary); font-size:1.35rem; }
.platform-empty p { margin:0; }
.platform-form-card { padding:19px; display:grid; gap:17px; border:1px solid var(--line-soft); border-radius:16px; background:var(--surface-raised); box-shadow:var(--shadow-1); }
.platform-form-card > div:first-child h3 { margin:0 0 5px; }
.platform-form-card > div:first-child p { margin:0; color:var(--muted); font-size:.8rem; }
.platform-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.platform-form-grid label { min-width:0; }
.platform-form-grid input,.platform-form-grid select,.platform-form-grid textarea { width:100%; }
.platform-field-wide { grid-column:1/-1; }
.platform-form-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.platform-form-actions [role="status"] { color:var(--muted); font-size:.74rem; }
.platform-command-bar { position:sticky; top:calc(var(--topbar-h) + 8px); z-index:29; padding:10px; display:flex; align-items:center; flex-wrap:wrap; gap:8px; border:1px solid var(--line-soft); border-radius:16px; background:color-mix(in srgb,var(--surface) 91%,transparent); box-shadow:var(--shadow-1); backdrop-filter:blur(18px); }
.platform-domain-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; }
.platform-domain-grid article { min-height:112px; padding:16px; display:grid; grid-template-columns:38px minmax(0,1fr); gap:12px; border:1px solid var(--line-soft); border-radius:15px; background:var(--surface-raised); }
.platform-domain-grid article > i { width:38px; height:38px; padding:10px; color:var(--primary); background:var(--primary-soft); border-radius:12px; }
.platform-domain-grid strong,.platform-domain-grid span,.platform-domain-grid small { display:block; }
.platform-domain-grid strong { color:var(--text-strong); font-size:1.25rem; }
.platform-domain-grid span { font-weight:760; }
.platform-domain-grid small { margin-top:3px; color:var(--muted); }
.platform-template-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; }
.platform-template-grid article { padding:16px; border:1px solid var(--line-soft); border-radius:14px; background:var(--surface-sunken); }
.platform-template-grid strong,.platform-template-grid span { display:block; }
.platform-template-grid span { margin:8px 0; color:var(--primary); font-size:1.35rem; font-weight:850; }
.platform-template-grid p { margin:0; color:var(--muted); font-size:.76rem; }
.platform-error { display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:center; gap:14px; border-color:color-mix(in srgb,var(--red) 40%,var(--line))!important; }
.platform-error > i { color:var(--red); font-size:1.5rem; }
.platform-error h2,.platform-error p { margin:0; }
.platform-error p { color:var(--muted); }
.platform-notice { position:fixed; right:18px; bottom:18px; z-index:600; max-width:min(420px,calc(100vw - 36px)); padding:12px 15px; border:1px solid var(--line); border-radius:12px; color:var(--text-strong); background:var(--surface); box-shadow:var(--shadow-2); font-size:.78rem; font-weight:750; }
.platform-notice.is-error { border-color:color-mix(in srgb,var(--red) 45%,var(--line)); background:var(--red-soft); }
.passkey-panel { min-height:180px; }
.passkey-manager-head { display:flex; justify-content:space-between; align-items:flex-start; gap:15px; }
.passkey-manager-head h3,.passkey-manager-head p { margin:0; }
.passkey-manager-head p { margin-top:4px; color:var(--muted); }
.passkey-list { margin-top:16px; display:grid; gap:8px; }
.passkey-list article { padding:12px; display:grid; grid-template-columns:38px minmax(0,1fr) auto; align-items:center; gap:11px; border:1px solid var(--line-soft); border-radius:13px; background:var(--surface-sunken); }
.passkey-list article > span { width:38px; height:38px; display:grid; place-items:center; border-radius:11px; color:var(--primary); background:var(--primary-soft); }
.passkey-list strong,.passkey-list small { display:block; }
.passkey-list small { color:var(--muted); }
.passkey-list .is-revoked { opacity:.62; }
.auth-divider { margin:17px 0; display:flex; align-items:center; gap:12px; color:var(--muted); font-size:.72rem; text-transform:uppercase; letter-spacing:.08em; }
.auth-divider::before,.auth-divider::after { content:""; height:1px; flex:1; background:var(--line); }
.auth-passkey-button { width:100%; justify-content:center; }
.auth-passkey-status { min-height:1.3em; margin:8px 0 0; color:var(--muted); font-size:.74rem; text-align:center; }
.public-verification-page { min-height:100vh; padding:clamp(20px,5vw,64px); background:var(--bg); }
.verification-result-shell { width:min(900px,100%); margin-inline:auto; display:grid; gap:18px; }
.verification-result-card { padding:clamp(24px,5vw,50px); border:1px solid var(--line); border-radius:24px; background:var(--surface-raised); box-shadow:var(--shadow-2); }
.verification-result-card.is-valid { border-color:color-mix(in srgb,var(--green) 38%,var(--line)); }
.verification-result-card.is-invalid { border-color:color-mix(in srgb,var(--red) 38%,var(--line)); }
.verification-result-icon { width:58px; height:58px; margin-bottom:18px; display:grid; place-items:center; border-radius:18px; color:var(--primary); background:var(--primary-soft); font-size:1.55rem; }
.verification-result-card.is-valid .verification-result-icon { color:var(--green); background:var(--green-soft); }
.verification-result-card.is-invalid .verification-result-icon { color:var(--red); background:var(--red-soft); }
@media (max-width:1180px) { .platform-two-column { grid-template-columns:1fr; } }
@media (max-width:760px) {
  .platform-metrics { grid-template-columns:1fr; }
  .platform-form-grid { grid-template-columns:1fr; }
  .platform-field-wide { grid-column:auto; }
  .platform-command-bar { top:calc(var(--topbar-h) + 4px); overflow:auto; flex-wrap:nowrap; }
  .platform-command-bar button { flex:0 0 auto; }
  .platform-error { grid-template-columns:38px minmax(0,1fr); }
  .platform-error button { grid-column:1/-1; }
  .passkey-manager-head { align-items:stretch; flex-direction:column; }
  .passkey-list article { grid-template-columns:34px minmax(0,1fr) auto; }
}
@media (prefers-reduced-motion:reduce) { .platform-spinner { animation:none; } }
