:root {
  --ink:#111827;
  --ink-soft:#344054;
  --muted:#667085;
  --muted-2:#98a2b3;
  --canvas:#f6f8fc;
  --surface:#ffffff;
  --line:#e4e9f1;
  --line-strong:#cfd7e4;
  --blue:#2d63e2;
  --blue-dark:#1f4fc3;
  --blue-soft:#edf3ff;
  --red:#df493f;
  --red-soft:#fff1ef;
  --amber:#d97706;
  --amber-soft:#fff5e8;
  --green:#159a63;
  --green-soft:#eaf9f2;
  --purple:#7557d3;
  --purple-soft:#f2efff;
  --shadow:0 8px 26px rgba(42,56,82,.07);
  --sidebar:216px;
}

* { box-sizing:border-box; }
html { min-width:320px; background:var(--canvas); }
body { margin:0; color:var(--ink); background:var(--canvas); font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; font-variant-numeric:tabular-nums; -webkit-font-smoothing:antialiased; }
button,input,select,textarea { font:inherit; }
button,a { -webkit-tap-highlight-color:transparent; }
button { color:inherit; }
a { color:inherit; }
svg { width:18px; height:18px; stroke-width:1.8; }
[hidden] { display:none!important; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link { position:fixed; top:-60px; left:12px; z-index:200; padding:10px 14px; color:#fff; background:var(--ink); }
.skip-link:focus { top:12px; }

.app-shell { min-height:100vh; display:grid; grid-template-columns:var(--sidebar) minmax(0,1fr); }
.sidebar { min-height:100vh; padding:20px 14px 18px; position:sticky; top:0; display:flex; flex-direction:column; align-self:start; color:var(--ink); background:#fff; border-right:1px solid var(--line); }
.product-brand { min-width:0; padding:2px 4px 22px; display:flex; align-items:center; gap:11px; text-decoration:none; border-bottom:1px solid var(--line); }
.brand-mark { width:36px; height:36px; flex:0 0 36px; display:block; object-fit:contain; border-radius:50%; }
.product-brand>span:last-child { min-width:0; display:grid; gap:1px; }
.product-brand b { overflow:hidden; text-overflow:ellipsis; font-size:1rem; line-height:1.25; letter-spacing:-.02em; white-space:nowrap; }
.product-brand small { color:var(--muted); font-size:.64rem; }
.product-nav { padding:18px 0; display:grid; gap:5px; }
.product-nav button { width:100%; min-height:44px; padding:0 12px; position:relative; display:grid; grid-template-columns:22px 1fr auto; align-items:center; gap:9px; color:#566174; background:transparent; border:0; border-radius:8px; font-size:.76rem; text-align:left; cursor:pointer; transition:background .16s ease,color .16s ease; }
.product-nav button:hover { color:var(--blue); background:#f6f8fc; }
.product-nav button.active { color:var(--blue); background:var(--blue-soft); font-weight:700; }
.product-nav button.active::before { content:""; width:3px; height:22px; position:absolute; left:0; top:11px; background:var(--blue); border-radius:0 3px 3px 0; }
.product-nav button b { min-width:21px; padding:3px 6px; color:var(--blue); background:#dce8ff; border-radius:10px; text-align:center; font-size:.61rem; }
.sidebar-foot { margin-top:auto; padding:15px 8px 2px; display:grid; grid-template-columns:9px 1fr; gap:9px; align-items:start; border-top:1px solid var(--line); }
.status-dot { width:8px; height:8px; margin-top:4px; border-radius:50%; background:var(--green); box-shadow:0 0 0 4px rgba(21,154,99,.1); }
.sidebar-foot div { display:grid; gap:3px; }
.sidebar-foot b { color:var(--ink-soft); font-size:.68rem; }
.sidebar-foot small { color:var(--muted-2); font-size:.6rem; }

.workspace { min-width:0; }
.topbar { min-height:72px; padding:0 24px; position:sticky; top:0; z-index:50; display:flex; align-items:center; justify-content:space-between; gap:24px; background:rgba(255,255,255,.94); border-bottom:1px solid var(--line); backdrop-filter:blur(14px); }
.topbar-title { min-width:0; display:flex; align-items:center; gap:16px; }
.topbar-title>p { margin:0; padding:6px 8px; color:var(--blue); background:var(--blue-soft); border-radius:5px; font:750 .58rem ui-monospace,SFMono-Regular,Menlo,monospace; }
.topbar-title>div { min-width:0; display:flex; align-items:baseline; gap:14px; }
.topbar h1 { margin:0; font-size:1.22rem; line-height:1.2; letter-spacing:-.025em; }
.topbar-title>div>span { color:var(--muted-2); font-size:.64rem; white-space:nowrap; }
.topbar-actions { display:flex; align-items:center; gap:10px; }
.language-switch { height:34px; padding:3px; display:flex; align-items:center; gap:2px; background:#edf1f7; border:1px solid #e1e6ee; border-radius:8px; }
.language-switch button { min-width:30px; height:26px; padding:0 7px; color:var(--muted); background:transparent; border:0; border-radius:6px; font-size:.58rem; font-weight:750; cursor:pointer; }
.language-switch button.active { color:var(--blue); background:#fff; box-shadow:0 2px 6px rgba(36,50,75,.1); }
.organization-chip { min-height:36px; padding:0 10px; display:inline-flex; align-items:center; gap:7px; color:var(--ink-soft); background:#fff; border:1px solid var(--line); border-radius:7px; font-size:.68rem; font-weight:650; }
.organization-chip svg { width:16px; height:16px; color:var(--blue); }
.operator-avatar { width:34px; height:34px; display:grid; place-items:center; color:#fff; background:linear-gradient(145deg,#4e77e7,#244fc2); border:3px solid #edf3ff; border-radius:50%; font-size:.68rem; font-weight:800; }
.icon-button { width:38px; height:38px; padding:0; display:grid; place-items:center; background:#fff; border:1px solid var(--line-strong); border-radius:7px; cursor:pointer; }
.icon-button:hover { color:var(--blue); background:var(--blue-soft); border-color:#b8c9ef; }
.button { min-height:38px; padding:0 14px; display:inline-flex; align-items:center; justify-content:center; gap:8px; border:1px solid transparent; border-radius:7px; font-size:.7rem; font-weight:750; cursor:pointer; text-decoration:none; transition:transform .16s ease,box-shadow .16s ease,background .16s ease; }
.button.primary { color:#fff; background:var(--blue); border-color:var(--blue); box-shadow:0 4px 10px rgba(45,99,226,.18); }
.button.primary:hover { background:var(--blue-dark); box-shadow:0 6px 14px rgba(45,99,226,.24); transform:translateY(-1px); }
.button:disabled { color:var(--muted); background:#eef1f5; border-color:#e1e6ee; box-shadow:none; cursor:not-allowed; transform:none; }
.button.secondary { color:var(--ink-soft); background:#fff; border-color:var(--line-strong); }
.button.secondary:hover { color:var(--blue); background:var(--blue-soft); border-color:#b6c8f0; }
.button.full { width:100%; }
.text-button { padding:4px 0; display:inline-flex; align-items:center; gap:6px; color:var(--blue); background:transparent; border:0; font-size:.66rem; font-weight:750; cursor:pointer; }
.text-button svg { width:14px; height:14px; }
.text-button.muted { color:var(--muted); font-weight:650; }

.view { padding:20px 22px 38px; }
.decision-cockpit { min-height:206px; display:grid; grid-template-columns:minmax(420px,1.3fr) minmax(280px,.8fr) 240px; overflow:hidden; background:linear-gradient(105deg,#fff6f5 0%,#fffafa 58%,#fff 100%); border:1px solid #ffd3ce; border-radius:12px; box-shadow:0 8px 30px rgba(199,72,62,.06); }
.decision-primary { min-width:0; padding:24px 24px 20px; display:grid; align-content:center; gap:12px; }
.risk-label { display:flex; align-items:center; gap:9px; }
.risk-label>i,.risk-label>svg { width:28px; height:28px; padding:6px; color:#fff; background:var(--red); border-radius:8px; }
.risk-label span { font-size:.9rem; font-weight:800; }
.risk-label em { padding:4px 7px; color:var(--red); background:#ffe2df; border-radius:5px; font-size:.58rem; font-style:normal; font-weight:750; }
.decision-primary>strong { max-width:600px; font-size:1.08rem; line-height:1.45; letter-spacing:-.012em; }
.risk-object { display:flex; align-items:center; gap:10px; }
.risk-object b { color:#182230; font-size:.76rem; }
.risk-object span { color:var(--muted); font-size:.64rem; }
.decision-primary>#decision-consequence { max-width:570px; color:#5e6776; font-size:.69rem; line-height:1.55; }
.evidence-status { display:flex; align-items:center; gap:7px; color:var(--muted); font-size:.62rem; }
.evidence-status>svg { width:15px; height:15px; color:var(--green); }
.evidence-status>b { color:var(--green); }
.evidence-status small { color:var(--muted-2); }
.decision-visual { min-width:0; display:grid; place-items:center; }
.decision-visual svg { width:100%; height:auto; max-height:190px; }
.decision-next { padding:24px 22px; display:flex; flex-direction:column; align-items:stretch; justify-content:center; gap:14px; border-left:1px solid #f1ddda; }
.decision-next>div { display:grid; grid-template-columns:auto auto; justify-content:start; gap:4px 9px; }
.decision-next>div span { color:var(--ink-soft); font-size:.66rem; font-weight:700; }
.decision-next>div span b { font-weight:800; }
.decision-next>div small { color:var(--muted); font-size:.62rem; }
.decision-action { width:100%; min-height:46px; padding:0 17px; display:flex; align-items:center; justify-content:center; gap:9px; color:#fff; background:var(--blue); border:0; border-radius:8px; box-shadow:0 8px 18px rgba(45,99,226,.2); font-size:.76rem; font-weight:800; cursor:pointer; }
.decision-action:hover { background:var(--blue-dark); transform:translateY(-1px); }
.decision-next>#decision-next-meta { color:var(--muted-2); font-size:.6rem; line-height:1.4; text-align:center; }

.metric-strip { margin-top:14px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.metric-strip>div { min-width:0; min-height:96px; padding:15px 16px; display:grid; grid-template-columns:42px 1fr 16px; align-items:center; gap:12px; background:#fff; border:1px solid var(--line); border-radius:10px; box-shadow:0 4px 16px rgba(40,54,79,.035); }
.metric-strip>div>div { min-width:0; display:grid; grid-template-columns:1fr auto; align-items:end; gap:2px 8px; }
.metric-strip>div>div>span { grid-column:1 / -1; color:var(--muted); font-size:.67rem; }
.metric-strip strong { font-size:1.42rem; line-height:1.1; letter-spacing:-.035em; }
.metric-strip small { color:var(--muted-2); font-size:.59rem; white-space:nowrap; }
.metric-strip>div>svg { width:15px; height:15px; color:#a8b2c2; }
.metric-icon { width:42px; height:42px; display:grid; place-items:center; color:var(--blue); background:var(--blue-soft); border-radius:50%; }
.metric-icon svg { width:19px; height:19px; }
.metric-strip .warning .metric-icon { color:var(--amber); background:var(--amber-soft); }
.metric-strip .warning strong { color:#b96704; }
.metric-strip .danger .metric-icon { color:var(--red); background:var(--red-soft); }
.metric-strip .danger strong { color:var(--red); }
.metric-strip .accent .metric-icon { color:var(--purple); background:var(--purple-soft); }
.metric-strip .accent strong { color:var(--purple); }

.overview-grid { margin-top:14px; display:grid; grid-template-columns:minmax(360px,1.18fr) minmax(270px,.78fr) minmax(300px,.92fr); gap:12px; align-items:stretch; }
.work-panel,.table-panel { min-width:0; background:#fff; border:1px solid var(--line); border-radius:10px; box-shadow:0 4px 18px rgba(40,54,79,.035); }
.panel-heading { min-height:60px; padding:14px 16px; display:flex; align-items:center; justify-content:space-between; gap:16px; border-bottom:1px solid var(--line); }
.panel-heading h2 { margin:0; font-size:.83rem; letter-spacing:-.012em; }
.panel-heading p,.view-intro p:first-child,.audit-header p,.drawer-head p,.dialog-head p,.extraction-guide>p,.quick-entry>div p { margin:0 0 4px; color:var(--muted-2); font:750 .54rem ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.04em; }
.attention-list { display:grid; }
.attention-item { min-height:51px; padding:8px 14px; display:grid; grid-template-columns:30px minmax(0,1fr) auto; align-items:center; gap:9px; border-bottom:1px solid #edf0f5; }
.attention-item:last-child { border-bottom:0; }
.attention-icon { width:28px; height:28px; display:grid; place-items:center; color:var(--amber); background:var(--amber-soft); border-radius:7px; }
.attention-icon svg { width:14px; height:14px; }
.attention-item.danger .attention-icon { color:var(--red); background:var(--red-soft); }
.attention-item>div:nth-child(2) { min-width:0; display:grid; gap:3px; }
.attention-item b { overflow:hidden; text-overflow:ellipsis; font-size:.66rem; white-space:nowrap; }
.attention-item small { color:var(--muted); font-size:.58rem; }
.attention-item>span:last-child { max-width:145px; color:var(--muted); font-size:.57rem; font-weight:650; line-height:1.35; text-align:right; }
.flow-summary { padding:18px 16px 14px; }
.flow-visual { display:grid; grid-template-columns:132px minmax(100px,1fr); align-items:center; gap:12px; }
.flow-ring { width:118px; height:118px; display:grid; place-items:center; position:relative; border-radius:50%; background:conic-gradient(var(--blue) 0 var(--flow-angle),#ff9b24 var(--flow-angle) calc(var(--flow-angle) + 42deg),#61c98c calc(var(--flow-angle) + 42deg) calc(var(--flow-angle) + 90deg),#edf1f6 0); }
.flow-ring::before { content:""; width:84px; height:84px; position:absolute; background:#fff; border-radius:50%; }
.flow-ring>div { position:relative; display:grid; place-items:center; gap:2px; }
.flow-ring strong { font-size:1.2rem; letter-spacing:-.04em; }
.flow-ring small { color:var(--muted); font-size:.54rem; }
.flow-legend { display:grid; gap:10px; }
.flow-row { display:grid; grid-template-columns:8px 1fr auto; align-items:center; gap:8px; }
.flow-row>i { width:7px; height:7px; background:var(--blue); border-radius:50%; }
.flow-row.calibrating>i { background:#7097ee; }
.flow-row.review>i { background:#ff9b24; }
.flow-row.completed>i { background:#53bc7e; }
.flow-row span { color:var(--muted); font-size:.61rem; }
.flow-row b { font-size:.66rem; }
.flow-trend { margin-top:16px; padding:10px 11px; display:grid; grid-template-columns:1fr auto 82px; align-items:center; gap:7px; background:#f8fafc; border:1px solid #edf1f5; border-radius:8px; color:var(--muted); font-size:.58rem; }
.flow-trend b,.flow-trend .positive { color:var(--green); }
.flow-trend svg { width:82px; height:24px; }
.flow-trend svg path:first-child { fill:none; stroke:#3fbe79; stroke-width:2; }
.flow-trend svg path:last-child { fill:none; stroke:#e3e8ef; }
.review-callout { margin:0 16px 14px; padding:10px; display:grid; grid-template-columns:24px 1fr; gap:8px; color:#355444; background:var(--green-soft); border-radius:7px; }
.review-callout svg { width:17px; height:17px; margin-top:2px; color:var(--green); }
.review-callout div { display:grid; gap:3px; }
.review-callout b { font-size:.61rem; }
.review-callout span { color:#628071; font-size:.55rem; line-height:1.4; }
.activity-table { min-width:0; }
.activity-row { min-height:53px; padding:8px 13px; display:grid; grid-template-columns:70px minmax(0,1fr) 72px; align-items:center; gap:9px; border-bottom:1px solid #edf0f5; }
.activity-row:last-child { border-bottom:0; }
.activity-row time { color:var(--muted-2); font-size:.55rem; line-height:1.35; }
.activity-row>div { min-width:0; display:grid; gap:3px; }
.activity-row>div b,.activity-row>div span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.activity-row>div b { font-size:.62rem; }
.activity-row>div span { color:var(--muted); font-size:.55rem; }
.activity-person { min-width:0; display:flex; align-items:center; gap:5px; overflow:hidden; color:var(--muted); font-size:.55rem; text-overflow:ellipsis; white-space:nowrap; }
.activity-person i { width:22px; height:22px; flex:0 0 auto; display:grid; place-items:center; color:var(--blue); background:var(--blue-soft); border-radius:50%; font-size:.52rem; font-style:normal; font-weight:800; }
.quick-entry { margin-top:14px; padding:14px 16px; display:grid; grid-template-columns:145px repeat(4,minmax(150px,1fr)); gap:10px; align-items:center; background:#fff; border:1px solid var(--line); border-radius:10px; }
.quick-entry h2 { margin:0; font-size:.8rem; }
.quick-entry>button { min-width:0; min-height:58px; padding:9px 11px; display:grid; grid-template-columns:32px 1fr 14px; align-items:center; gap:9px; color:var(--ink-soft); background:#fbfcfe; border:1px solid var(--line); border-radius:8px; text-align:left; cursor:pointer; }
.quick-entry>button:hover { color:var(--blue); background:var(--blue-soft); border-color:#c6d5f6; }
.quick-entry>button>svg:first-child { width:30px; height:30px; padding:7px; color:var(--blue); background:var(--blue-soft); border-radius:7px; }
.quick-entry>button>svg:last-child { width:13px; height:13px; color:#a5afbe; }
.quick-entry>button span { min-width:0; display:grid; gap:3px; }
.quick-entry>button b { font-size:.62rem; }
.quick-entry>button small { overflow:hidden; color:var(--muted-2); font-size:.54rem; text-overflow:ellipsis; white-space:nowrap; }

.toolbar { margin-bottom:14px; display:flex; justify-content:space-between; gap:12px; }
.search-field { width:min(420px,100%); height:40px; padding:0 12px; display:flex; align-items:center; gap:9px; background:#fff; border:1px solid var(--line-strong); border-radius:7px; }
.search-field svg { flex:0 0 auto; color:var(--muted); }
.search-field input { min-width:0; width:100%; border:0; outline:0; font-size:.69rem; }
.segmented { padding:3px; display:flex; background:#e9edf4; border-radius:7px; }
.segmented button { min-width:58px; padding:0 10px; background:transparent; border:0; border-radius:5px; font-size:.65rem; cursor:pointer; }
.segmented button.active { color:var(--blue); background:#fff; box-shadow:0 1px 4px rgba(33,46,70,.1); font-weight:750; }
.table-summary { min-height:48px; padding:0 16px; display:flex; align-items:center; justify-content:space-between; gap:20px; border-bottom:1px solid var(--line); }
.table-summary span { font-size:.71rem; font-weight:750; }
.table-summary small { color:var(--muted); font-size:.61rem; }
.table-scroll { overflow-x:auto; }
.table-scroll th:last-child { position:relative; }
table { width:100%; min-width:820px; border-collapse:collapse; }
th,td { height:52px; padding:0 14px; text-align:left; border-bottom:1px solid #edf0f5; font-size:.66rem; white-space:nowrap; }
th { height:40px; color:var(--muted); background:#fafbfc; font-size:.57rem; font-weight:750; text-transform:uppercase; }
tbody tr:last-child td { border-bottom:0; }
tbody tr:hover { background:#f8faff; }
td strong { display:block; font-weight:680; }
td small { display:block; margin-top:3px; color:var(--muted); font-size:.57rem; }
.status { display:inline-flex; align-items:center; gap:6px; padding:5px 8px; border-radius:5px; font-size:.58rem; font-weight:750; }
.status::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.status.active,.status.approved { color:var(--green); background:var(--green-soft); }
.status.due,.status.review { color:var(--amber); background:var(--amber-soft); }
.status.overdue,.status.blocked { color:var(--red); background:var(--red-soft); }
.status.inactive { color:var(--muted); background:#eef1f5; }
.status.progress { color:var(--blue); background:var(--blue-soft); }
.row-action { width:31px; height:31px; padding:0; display:grid; place-items:center; color:var(--muted); background:#fff; border:1px solid var(--line); border-radius:6px; cursor:pointer; }
.row-action:hover { color:var(--blue); background:var(--blue-soft); border-color:#b8caf1; }
.instrument-mobile-list { display:none; }
.overdue-note { color:var(--red)!important; font-weight:700; }

.certificate-layout { display:grid; grid-template-columns:1.2fr .8fr; gap:14px; }
.upload-zone { min-height:235px; padding:28px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; background:#fff; border:1px dashed #aac0ee; border-radius:10px; box-shadow:var(--shadow); }
.upload-zone.dragging { background:var(--blue-soft); border-color:var(--blue); }
.upload-zone>input { display:none; }
.upload-zone>svg { width:44px; height:44px; padding:11px; margin-bottom:12px; color:var(--blue); background:var(--blue-soft); border-radius:12px; }
.upload-zone h2 { margin:0; font-size:.96rem; }
.upload-zone p { max-width:500px; margin:8px 0 16px; color:var(--muted); font-size:.65rem; line-height:1.55; }
.extraction-guide { min-height:235px; padding:23px; color:var(--ink); background:#fff; border:1px solid var(--line); border-radius:10px; box-shadow:var(--shadow); }
.extraction-guide>p { color:var(--blue); }
.extraction-guide h2 { margin:0 0 20px; font-size:1rem; }
.extraction-guide ol { margin:0; padding:0; display:grid; gap:16px; list-style:none; }
.extraction-guide li { display:grid; grid-template-columns:30px 1fr; gap:11px; }
.extraction-guide li>span { width:28px; height:28px; display:grid; place-items:center; color:var(--blue); background:var(--blue-soft); border-radius:8px; font-size:.58rem; font-weight:800; }
.extraction-guide li div { display:grid; gap:4px; }
.extraction-guide li b { font-size:.68rem; }
.extraction-guide li small { color:var(--muted); font-size:.59rem; }
.certificate-table-panel { margin-top:14px; }

.section-heading { min-height:54px; padding:0 15px; display:flex; align-items:center; justify-content:space-between; gap:16px; border-bottom:1px solid var(--line); }
.section-heading>div { min-width:0; }
.section-heading p { color:var(--blue); }
.section-heading h2 { margin:2px 0 0; font-size:.8rem; }
.section-heading>span { color:var(--muted); font-size:.59rem; text-align:right; }
.exception-panel { margin-top:14px; overflow:hidden; background:#fff; border:1px solid #f3d3cf; border-radius:10px; box-shadow:var(--shadow); }
.exception-list { display:grid; }
.exception-item { min-height:76px; padding:12px 15px; display:grid; grid-template-columns:32px minmax(0,1fr) auto; align-items:center; gap:11px; border-bottom:1px solid #f2e8e6; }
.exception-item:last-child { border-bottom:0; }
.exception-item>svg { width:30px; height:30px; padding:7px; color:var(--red); background:var(--red-soft); border-radius:8px; }
.exception-item>div { min-width:0; display:grid; gap:4px; }
.exception-item b { font-size:.68rem; }
.exception-item small { overflow:hidden; color:var(--muted); font-size:.58rem; text-overflow:ellipsis; white-space:nowrap; }
.exception-item footer { display:flex; align-items:center; gap:10px; }
.empty-state { padding:24px; color:var(--muted); font-size:.63rem; text-align:center; }

.view-intro { margin-bottom:16px; display:flex; align-items:end; justify-content:space-between; gap:40px; }
.view-intro h2,.audit-header h2 { margin:0; font-size:1.14rem; }
.view-intro>p:last-child { max-width:510px; margin:0; color:var(--muted); font-size:.65rem; line-height:1.55; }
.workflow-command { margin-bottom:14px; padding:18px 20px; display:flex; align-items:center; justify-content:space-between; gap:24px; color:var(--ink); background:linear-gradient(110deg,#eef4ff,#fff); border:1px solid #d5e0f7; border-radius:11px; }
.workflow-command-copy { min-width:0; }
.workflow-command-copy p { color:var(--blue); }
.workflow-command-copy h2 { margin:3px 0 7px; font-size:1rem; }
.workflow-command-copy span { color:var(--muted); font-size:.63rem; line-height:1.5; }
.workflow-metrics { flex:0 0 auto; display:grid; grid-template-columns:repeat(3,112px); gap:8px; }
.workflow-metrics>div { min-height:66px; padding:10px 12px; display:grid; align-content:center; gap:5px; background:rgba(255,255,255,.82); border:1px solid #dbe4f5; border-radius:8px; }
.workflow-metrics span { color:var(--muted); font-size:.57rem; }
.workflow-metrics strong { font-size:1.12rem; }
.workflow-grid { margin-bottom:14px; display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.plan-panel,.order-panel { min-width:0; overflow:hidden; }
.plan-list,.dispatch-order-list { max-height:294px; overflow:auto; }
.plan-item,.dispatch-order { min-height:74px; padding:11px 14px; display:grid; align-items:center; gap:11px; border-bottom:1px solid #edf0f5; }
.plan-item { grid-template-columns:32px minmax(0,1fr) auto; }
.plan-item:last-child,.dispatch-order:last-child { border-bottom:0; }
.plan-item>span { width:30px; height:30px; display:grid; place-items:center; color:var(--amber); background:var(--amber-soft); border-radius:8px; font-size:.55rem; font-weight:800; }
.plan-item.danger>span { color:var(--red); background:var(--red-soft); }
.plan-item>div,.dispatch-order>div { min-width:0; display:grid; gap:4px; }
.plan-item b,.dispatch-order b { overflow:hidden; font-size:.66rem; text-overflow:ellipsis; white-space:nowrap; }
.plan-item small,.dispatch-order small { color:var(--muted); font-size:.57rem; line-height:1.4; }
.dispatch-order { grid-template-columns:minmax(0,1fr) auto; }
.dispatch-order header { display:flex; align-items:center; gap:8px; }
.dispatch-order footer { margin-top:3px; display:flex; flex-wrap:wrap; gap:10px; color:var(--muted); font-size:.56rem; }
.dispatch-order-actions { display:grid; justify-items:end; gap:7px; }
.board-heading { margin:4px 0 10px; padding:0; border:0; }
.kanban { min-height:520px; display:grid; grid-template-columns:repeat(4,minmax(220px,1fr)); gap:12px; overflow-x:auto; }
.kanban-column { min-width:220px; padding:0 10px 12px; background:#f0f3f8; border:1px solid var(--line); border-radius:9px; }
.kanban-head { height:46px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); }
.kanban-head b { font-size:.68rem; }
.kanban-head span { width:23px; height:23px; display:grid; place-items:center; color:var(--blue); background:#fff; border-radius:6px; font-size:.59rem; }
.kanban-list { padding-top:10px; display:grid; gap:9px; }
.kanban-card { padding:13px; background:#fff; border:1px solid var(--line); border-radius:8px; box-shadow:0 4px 12px rgba(40,54,79,.04); }
.kanban-card>span { color:var(--blue); font-size:.57rem; font-weight:750; }
.kanban-card h3 { margin:8px 0 4px; font-size:.7rem; }
.kanban-card p { margin:0 0 11px; color:var(--muted); font-size:.59rem; }
.kanban-card footer { padding-top:10px; display:flex; justify-content:space-between; align-items:center; border-top:1px solid #edf0f5; }
.kanban-card footer small { color:var(--muted); font-size:.56rem; }
.kanban-card footer button { padding:3px 0; color:var(--blue); background:transparent; border:0; font-size:.57rem; font-weight:750; cursor:pointer; }
.empty-column { color:var(--muted); font-size:.62rem; }

.audit-header { margin-bottom:16px; padding:20px; display:flex; align-items:end; justify-content:space-between; gap:30px; color:var(--ink); background:linear-gradient(110deg,#f2f6ff,#fff); border:1px solid #d6e1f8; border-radius:10px; }
.audit-header p { color:var(--blue); }
.audit-header>div:first-child>span { margin-top:8px; display:block; color:var(--muted); font-size:.62rem; }
.audit-actions { display:flex; align-items:end; gap:9px; }
.audit-actions label { display:grid; gap:5px; color:var(--muted); font-size:.59rem; }
.audit-actions select { min-width:150px; height:38px; padding:0 10px; color:var(--ink); background:#fff; border:1px solid var(--line-strong); border-radius:7px; }
.evidence-steps { margin-bottom:14px; display:grid; grid-template-columns:repeat(4,1fr); background:#fff; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.evidence-steps>div { min-height:82px; padding:15px; display:grid; grid-template-columns:34px 1fr; gap:10px; align-items:center; border-right:1px solid var(--line); }
.evidence-steps>div:last-child { border-right:0; }
.evidence-steps>div>svg { padding:8px; width:32px; height:32px; color:var(--blue); background:var(--blue-soft); border-radius:8px; }
.evidence-steps>div.complete>svg { color:var(--green); background:var(--green-soft); }
.evidence-steps span { display:grid; gap:4px; }
.evidence-steps b { font-size:.66rem; }
.evidence-steps small { color:var(--muted); font-size:.57rem; }

.review-drawer,.asset-drawer { width:min(600px,100%); height:100vh; padding:0 24px 28px; position:fixed; z-index:120; top:0; right:0; overflow-y:auto; background:#fff; box-shadow:-24px 0 70px rgba(22,35,59,.2); opacity:0; visibility:hidden; pointer-events:none; transition:opacity .18s ease,visibility 0s linear .18s; }
.asset-drawer { width:min(680px,100%); }
.review-drawer.open,.asset-drawer.open { opacity:1; visibility:visible; pointer-events:auto; transition-delay:0s; }
.drawer-backdrop { position:fixed; inset:0; z-index:110; background:rgba(21,32,51,.44); border:0; backdrop-filter:blur(2px); }
.drawer-head { min-height:74px; position:sticky; top:0; z-index:2; display:flex; align-items:center; justify-content:space-between; background:#fff; border-bottom:1px solid var(--line); }
.drawer-head p,.dialog-head p { color:var(--blue); }
.drawer-head h2,.dialog-head h2 { margin:0; font-size:1rem; }
.release-snapshot { margin:0 -24px; display:grid; grid-template-columns:1.25fr 1fr 1fr; background:#f5f8ff; border-bottom:1px solid #dbe5f8; }
.release-snapshot>div { min-height:72px; padding:12px 15px; display:grid; align-content:space-between; gap:6px; border-right:1px solid #dbe5f8; }
.release-snapshot>div:last-child { border-right:0; }
.release-snapshot span { color:var(--muted); font-size:.57rem; }
.release-snapshot strong { color:var(--ink-soft); font-size:.67rem; }
.release-snapshot .critical strong { color:var(--red); }
.document-preview { margin:16px 0 0; padding:14px; display:grid; place-items:center; background:#f1f4f8; border:1px solid var(--line); border-radius:10px; }
.calibration-illustration { width:100%; height:auto; max-height:246px; border-radius:8px; box-shadow:0 8px 24px rgba(31,42,36,.1); }
.review-drawer form { padding-top:18px; display:grid; gap:13px; }
.review-drawer label,.asset-drawer label,.product-dialog label { display:grid; gap:6px; color:var(--ink-soft); font-size:.63rem; font-weight:650; }
.review-drawer input,.review-drawer select,.asset-drawer input,.asset-drawer select,.product-dialog input,.product-dialog select,.product-dialog textarea { width:100%; min-width:0; height:40px; padding:0 11px; color:var(--ink); background:#fff; border:1px solid var(--line-strong); border-radius:7px; outline:0; }
.product-dialog textarea { height:auto; min-height:92px; padding:10px 11px; resize:vertical; }
.review-drawer input:focus,.review-drawer select:focus,.asset-drawer input:focus,.asset-drawer select:focus,.product-dialog input:focus,.product-dialog select:focus,.product-dialog textarea:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(45,99,226,.1); }
.review-drawer input[readonly] { color:var(--muted); background:#f7f8fa; }
.field-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.confidence { margin-left:6px; padding:3px 6px; display:inline-block; border-radius:4px; font-size:.53rem; }
.confidence.high { color:var(--green); background:var(--green-soft); }
.confidence.medium { color:var(--amber); background:var(--amber-soft); }
.review-warning { padding:11px; display:grid; grid-template-columns:22px 1fr; gap:8px; align-items:start; color:#8a5506; background:var(--amber-soft); border-radius:7px; font-size:.59rem; line-height:1.5; }
.review-warning svg { width:16px; height:16px; }
.product-dialog { width:min(620px,calc(100% - 28px)); max-height:calc(100vh - 30px); padding:0; color:var(--ink); background:#fff; border:1px solid var(--line-strong); border-radius:10px; box-shadow:0 24px 70px rgba(20,34,58,.24); }
.product-dialog::backdrop { background:rgba(21,32,51,.5); backdrop-filter:blur(2px); }
.product-dialog form { padding:0 24px 24px; }
.dialog-head { min-height:74px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); }
.product-dialog form>label,.product-dialog .field-row { margin-top:13px; }
.asset-identity { margin:0 -24px; padding:18px 24px; display:flex; align-items:center; justify-content:space-between; gap:18px; background:linear-gradient(110deg,#f0f5ff,#fff); border-bottom:1px solid #dce5f7; }
.asset-identity>div { min-width:0; }
.asset-identity span:first-child { color:var(--blue); font-size:.59rem; font-weight:800; }
.asset-identity h3 { margin:5px 0 3px; font-size:1.05rem; }
.asset-identity p { margin:0; color:var(--muted); font-size:.62rem; }
.asset-actions { padding:16px 0; display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.asset-form { padding:0!important; display:grid; gap:13px; }
.asset-form .section-heading,.asset-evidence .section-heading { padding:0; }
.asset-evidence { margin-top:20px; }
.asset-timeline { display:grid; }
.timeline-item { padding:13px 0 13px 24px; position:relative; display:grid; gap:4px; border-bottom:1px solid #edf0f5; }
.timeline-item::before { content:""; width:8px; height:8px; position:absolute; left:4px; top:17px; background:var(--blue); border:3px solid #dce8ff; border-radius:50%; box-sizing:content-box; }
.timeline-item::after { content:""; width:1px; position:absolute; left:10px; top:31px; bottom:-7px; background:#dfe5ef; }
.timeline-item:last-child::after { display:none; }
.timeline-item b { font-size:.65rem; }
.timeline-item span { color:var(--muted); font-size:.57rem; line-height:1.5; }
.asset-picker { margin-top:14px; padding:10px; display:grid; grid-template-columns:1fr 1fr; gap:8px; max-height:170px; overflow:auto; background:#f7f9fc; border:1px solid var(--line); border-radius:8px; }
.asset-picker label { padding:9px; display:flex; align-items:flex-start; gap:8px; background:#fff; border:1px solid var(--line); border-radius:7px; cursor:pointer; }
.asset-picker input { width:16px; height:16px; padding:0; flex:0 0 auto; }
.asset-picker span { display:grid; gap:3px; }
.asset-picker b { font-size:.61rem; }
.asset-picker small { color:var(--muted); font-size:.55rem; }
.exception-context { margin-top:14px; padding:12px; display:grid; gap:5px; color:#77403c; background:var(--red-soft); border-radius:8px; }
.exception-context b { font-size:.68rem; }
.exception-context span { font-size:.59rem; line-height:1.5; }
.toast { min-width:240px; padding:12px 16px; position:fixed; z-index:180; right:20px; bottom:20px; color:#fff; background:#172033; border-radius:8px; box-shadow:0 12px 30px rgba(20,29,44,.25); font-size:.66rem; }

@media (max-width:1180px) {
  :root { --sidebar:198px; }
  .decision-cockpit { grid-template-columns:minmax(380px,1.25fr) minmax(240px,.7fr) 210px; }
  .decision-visual svg { transform:scale(.9); }
  .overview-grid { grid-template-columns:1.15fr .85fr; }
  .activity-panel { grid-column:1 / -1; }
  .activity-table { display:grid; grid-template-columns:1fr 1fr; }
  .activity-row { grid-template-columns:65px minmax(0,1fr) 68px; }
  .quick-entry { grid-template-columns:130px repeat(2,1fr); }
  .quick-entry>div { grid-row:1 / 3; }
}

@media (max-width:900px) {
  .topbar-title>p,.topbar-title>div>span { display:none; }
  .decision-cockpit { grid-template-columns:1fr 210px; }
  .decision-visual { display:none; }
  .metric-strip { grid-template-columns:1fr 1fr; }
  .overview-grid { grid-template-columns:1fr; }
  .activity-panel { grid-column:auto; }
  .certificate-layout { grid-template-columns:1fr; }
  .workflow-grid { grid-template-columns:1fr; }
  .kanban { grid-template-columns:repeat(4,260px); }
  .evidence-steps { grid-template-columns:1fr 1fr; }
  .evidence-steps>div:nth-child(2) { border-right:0; }
  .evidence-steps>div:nth-child(-n+2) { border-bottom:1px solid var(--line); }
}

@media (max-width:760px) {
  html { max-width:100%; overflow-x:clip; }
  body { padding-bottom:66px; }
  .app-shell { display:block; }
  .sidebar { min-height:0; height:64px; padding:0; position:fixed; z-index:90; top:auto; right:0; bottom:0; left:0; display:block; border:0; border-top:1px solid var(--line); box-shadow:0 -8px 24px rgba(31,44,67,.08); }
  .product-brand,.sidebar-foot { display:none; }
  .product-nav { height:64px; padding:0 5px; display:grid; grid-template-columns:repeat(5,1fr); gap:0; }
  .product-nav button { min-width:0; min-height:64px; padding:7px 2px 5px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; border-radius:0; text-align:center; font-size:.57rem; }
  .product-nav button.active { background:transparent; }
  .product-nav button.active::before { width:26px; height:3px; top:0; left:50%; border-radius:0 0 3px 3px; transform:translateX(-50%); }
  .product-nav button svg { width:19px; height:19px; }
  .product-nav button b { display:none; }
  .topbar { min-height:64px; padding:0 14px; }
  .topbar h1 { font-size:1.08rem; }
  .organization-chip,.operator-avatar { display:none; }
  .language-switch { height:32px; }
  .language-switch button { min-width:27px; height:24px; padding:0 5px; }
  .topbar-actions .button span { display:none; }
  .topbar-actions .button { width:38px; padding:0; }
  .view { padding:12px 11px 24px; }
  .decision-cockpit { display:flex; flex-direction:column; border-radius:10px; }
  .decision-primary { padding:18px 17px 14px; gap:10px; }
  .risk-label>i,.risk-label>svg { width:26px; height:26px; }
  .decision-primary>strong { font-size:.92rem; }
  .risk-object { align-items:flex-start; flex-direction:column; gap:3px; }
  .decision-primary>#decision-consequence { font-size:.64rem; }
  .evidence-status { flex-wrap:wrap; }
  .decision-next { padding:14px 17px 17px; border-top:1px solid #f1ddda; border-left:0; }
  .decision-action { width:100%; }
  .metric-strip { gap:9px; margin-top:10px; }
  .metric-strip>div { min-height:92px; padding:12px; grid-template-columns:36px 1fr; gap:9px; }
  .metric-strip>div>svg { display:none; }
  .metric-icon { width:36px; height:36px; }
  .metric-strip>div>div { display:grid; grid-template-columns:1fr; }
  .metric-strip>div>div>span { grid-column:auto; }
  .metric-strip strong { font-size:1.25rem; }
  .metric-strip small { white-space:normal; }
  .overview-grid { gap:10px; margin-top:10px; }
  .panel-heading { padding:13px; }
  .attention-item { padding:10px 12px; grid-template-columns:30px minmax(0,1fr); }
  .attention-item>span:last-child { display:none; }
  .flow-visual { grid-template-columns:122px 1fr; }
  .activity-table { display:block; }
  .activity-row { grid-template-columns:62px minmax(0,1fr) 65px; }
  .quick-entry { margin-top:10px; padding:12px; grid-template-columns:1fr 1fr; }
  .quick-entry>div { grid-column:1 / -1; grid-row:auto; }
  .quick-entry>button { grid-template-columns:28px 1fr; }
  .quick-entry>button>svg:last-child { display:none; }
  .toolbar { flex-direction:column; }
  .search-field { width:100%; }
  .segmented { overflow-x:auto; }
  .segmented button { min-width:60px; height:34px; }
  #view-instruments .table-scroll { display:none; }
  .instrument-mobile-list { padding:10px; display:grid; gap:9px; }
  .instrument-card { padding:13px; background:#fff; border:1px solid var(--line); border-radius:9px; }
  .instrument-card.danger { border-left:4px solid var(--red); }
  .instrument-card-head { display:flex; align-items:start; justify-content:space-between; gap:10px; }
  .instrument-card-head>div { min-width:0; display:grid; gap:4px; }
  .instrument-card-head strong { color:var(--muted); font-size:.59rem; }
  .instrument-card-head b { overflow:hidden; text-overflow:ellipsis; font-size:.75rem; }
  .instrument-card-head .status { flex:0 0 auto; }
  .instrument-card dl { margin:13px 0 0; display:grid; grid-template-columns:1fr 1fr; gap:10px 13px; }
  .instrument-card dl div { min-width:0; display:grid; gap:4px; }
  .instrument-card dt { color:var(--muted); font-size:.57rem; }
  .instrument-card dd { margin:0; overflow:hidden; text-overflow:ellipsis; font-size:.64rem; }
  .instrument-card-foot { margin-top:12px; padding-top:9px; display:flex; align-items:center; justify-content:space-between; color:var(--muted); border-top:1px solid var(--line); font-size:.59rem; }
  .certificate-layout { gap:10px; }
  .upload-zone,.extraction-guide { min-height:215px; padding:19px 15px; }
  .view-intro,.audit-header { align-items:start; flex-direction:column; gap:16px; }
  .view-intro .button { width:100%; }
  .workflow-command { padding:15px; align-items:stretch; flex-direction:column; }
  .workflow-metrics { grid-template-columns:repeat(3,1fr); }
  .workflow-metrics>div { min-width:0; }
  .plan-item { grid-template-columns:30px minmax(0,1fr); }
  .plan-item .text-button { grid-column:2; justify-self:start; }
  .dispatch-order { grid-template-columns:1fr; }
  .dispatch-order-actions { justify-items:start; }
  .exception-item { grid-template-columns:30px minmax(0,1fr); }
  .exception-item footer { grid-column:2; }
  .audit-actions { width:100%; align-items:stretch; flex-direction:column; }
  .audit-actions select,.audit-actions .button { width:100%; }
  .evidence-steps { grid-template-columns:1fr; }
  .evidence-steps>div { min-height:70px; border-right:0; border-bottom:1px solid var(--line); }
  .evidence-steps>div:last-child { border-bottom:0; }
  .field-row { grid-template-columns:1fr; }
  .release-snapshot { margin:0 -16px; grid-template-columns:1fr; }
  .release-snapshot>div { min-height:62px; border-right:0; border-bottom:1px solid #dbe5f8; }
  .release-snapshot>div:last-child { border-bottom:0; }
  .review-drawer,.asset-drawer { padding:0 16px 20px; }
  .asset-identity { margin:0 -16px; padding:16px; }
  .asset-picker { grid-template-columns:1fr; }
  .product-dialog form { padding:0 16px 18px; }
  .toast { left:11px; right:11px; bottom:78px; }
}

@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; }
}
