@charset "UTF-8";

:root {
  --nav: #14211f;
  --nav-2: #1d302c;
  --ink: #1a2725;
  --text: #3d4d4a;
  --muted: #7a8986;
  --canvas: #f2f5f4;
  --surface: #ffffff;
  --soft: #f7f9f8;
  --line: #dfe7e4;
  --line-strong: #cbd8d4;
  --brand: #167d6d;
  --brand-deep: #0e675a;
  --brand-soft: #e8f5f1;
  --mint: #45c6a5;
  --blue: #4d67df;
  --blue-soft: #eef1ff;
  --warning: #aa6a16;
  --warning-soft: #fff5e5;
  --danger: #bc4a54;
  --danger-soft: #fff0f1;
  --success: #147c65;
  --success-soft: #e9f6f1;
  --paper: #fffdf7;
  --shadow: 0 12px 34px rgba(20, 33, 31, .07);
  --radius: 13px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); font-size: 14px; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(22,125,109,.22); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .44; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.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; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 218px; padding: 25px 17px 20px; display: flex; flex-direction: column; color: #fff; background: var(--nav); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.17); border-radius: 12px; color: var(--mint); background: rgba(255,255,255,.06); }
.brand-mark .icon { width: 22px; height: 22px; }
.brand-name { font-size: 19px; font-weight: 680; letter-spacing: .04em; }
.brand-name small { display: block; margin-top: 4px; color: rgba(255,255,255,.4); font: 8px/1.2 ui-monospace,monospace; letter-spacing: .17em; }
.nav-caption { margin: 34px 12px 11px; color: rgba(255,255,255,.32); font: 9px/1.4 ui-monospace,monospace; letter-spacing: .15em; }
.side-nav { display: grid; gap: 5px; }
.nav-item { position: relative; width: 100%; min-height: 46px; padding: 0 13px; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 9px; color: rgba(255,255,255,.55); background: transparent; text-align: left; transition: .18s; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-item.active { color: #fff; background: rgba(69,198,165,.13); box-shadow: inset 3px 0 var(--mint); }
.nav-item .icon { width: 17px; height: 17px; }
.nav-label { font-size: 12px; font-weight: 550; }
.nav-count { margin-left: auto; min-width: 21px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 10px; color: #c9f7e9; background: rgba(255,255,255,.09); font-size: 9px; }
.sidebar-foot { margin-top: auto; padding: 18px 10px 0; }
.local-badge { display: flex; align-items: center; gap: 7px; color: rgba(255,255,255,.72); font-size: 10px; }
.local-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(69,198,165,.09); }
.sidebar-foot p { margin: 9px 0 0; color: rgba(255,255,255,.34); font-size: 9px; line-height: 1.75; }
.copyright { margin-top: 20px; color: rgba(255,255,255,.25); font-size: 8px; line-height: 1.7; }

.main-shell { min-height: 100vh; margin-left: 218px; }
.topbar { position: sticky; top: 0; z-index: 25; height: 64px; padding: 0 26px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid rgba(203,216,212,.75); background: rgba(255,255,255,.84); backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%); }
.breadcrumb { min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.breadcrumb .icon { width: 15px; height: 15px; color: var(--brand); }
.breadcrumb strong { overflow: hidden; color: var(--text); font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.demo-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); background: rgba(255,255,255,.7); font-size: 9px; white-space: nowrap; }
.demo-chip i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.role-control { display: flex; align-items: center; gap: 7px; }
.role-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--brand-deep); background: var(--brand-soft); font-size: 10px; font-weight: 700; }
.role-control select { max-width: 126px; padding: 7px 24px 7px 7px; border: 0; color: var(--text); background: transparent; font-size: 11px; font-weight: 550; }
.icon-btn { width: 35px; height: 35px; padding: 0; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #fff; }
.icon-btn:hover { color: var(--brand); border-color: #a9cdc3; background: var(--brand-soft); }
.icon-btn .icon { width: 16px; height: 16px; }
.mobile-nav { display: none; }
.view { width: 100%; max-width: 1680px; margin: 0 auto; padding: 25px 26px 42px; }
.page-head { margin-bottom: 21px; display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.kicker { margin-bottom: 6px; color: var(--brand); font: 9px/1.4 ui-monospace,monospace; letter-spacing: .14em; text-transform: uppercase; }
.page-head h1 { margin: 0; font-size: 24px; line-height: 1.3; letter-spacing: -.035em; font-weight: 680; }
.page-head p { max-width: 720px; margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn { min-height: 36px; padding: 8px 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); background: #fff; font-size: 11px; font-weight: 550; line-height: 1.2; transition: .17s; }
.btn:hover:not(:disabled) { border-color: #a8bcb6; background: var(--soft); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn .icon { width: 15px; height: 15px; }
.btn-primary { border-color: var(--brand); color: #fff; background: var(--brand); box-shadow: 0 4px 12px rgba(22,125,109,.16); }
.btn-primary:hover:not(:disabled) { border-color: var(--brand-deep); color: #fff; background: var(--brand-deep); }
.btn-danger { border-color: #edc8cc; color: var(--danger); background: #fff; }
.btn-danger:hover:not(:disabled) { border-color: #e2a5ac; background: var(--danger-soft); }
.btn-ghost { border-color: transparent; color: var(--muted); background: transparent; }
.btn-ghost:hover:not(:disabled) { border-color: transparent; color: var(--brand); background: var(--brand-soft); }
.btn-sm { min-height: 30px; padding: 6px 10px; font-size: 10px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-head { min-height: 55px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.panel-title { display: flex; align-items: center; gap: 8px; }
.panel-title h2, .panel-title h3 { margin: 0; font-size: 13px; font-weight: 650; }
.panel-title .icon { width: 16px; height: 16px; color: var(--brand); }
.panel-sub { color: var(--muted); font-size: 9px; }
.panel-body { padding: 18px; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 6px; font-size: 9px; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-inbox { color: var(--blue); background: var(--blue-soft); }
.status-review { color: var(--warning); background: var(--warning-soft); }
.status-ready, .status-exported { color: var(--success); background: var(--success-soft); }
.status-processing { color: var(--brand); background: var(--brand-soft); }
.status-blocked, .status-cancelled { color: var(--danger); background: var(--danger-soft); }
.empty { padding: 36px 18px; color: var(--muted); text-align: center; font-size: 11px; }
.empty .icon { width: 26px; height: 26px; margin: 0 auto 10px; color: #a4b1ae; }

.metric-row { margin-bottom: 19px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.metric { min-height: 103px; padding: 19px 21px; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; }
.metric-label .icon { width: 14px; height: 14px; color: #9aaaa6; }
.metric-value { margin-top: 8px; font-size: 28px; line-height: 1.1; letter-spacing: -.04em; font-weight: 680; }
.metric-value small { margin-left: 4px; color: var(--muted); font-size: 10px; font-weight: 450; letter-spacing: 0; }
.metric-note { margin-top: 7px; color: var(--muted); font-size: 9px; }
.inbox-layout { display: grid; grid-template-columns: minmax(0,1fr) 315px; gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; }
.toolbar { padding: 12px 15px; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1; max-width: 300px; }
.search .icon { position: absolute; top: 50%; left: 10px; width: 14px; height: 14px; color: #98a8a4; transform: translateY(-50%); }
.search input { width: 100%; height: 34px; padding: 7px 9px 7px 32px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--soft); font-size: 10px; }
.select { min-height: 34px; padding: 7px 27px 7px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: #fff; font-size: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--muted); background: #fafcfb; font-size: 9px; font-weight: 500; white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid #edf1ef; color: var(--text); font-size: 10px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdfc; }
.order-name { min-width: 225px; color: var(--ink); font-size: 11px; font-weight: 620; }
.order-meta { margin-top: 3px; color: var(--muted); font: 8px/1.5 ui-monospace,monospace; }
.source-tag { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.source-tag .icon { width: 13px; height: 13px; color: var(--muted); }
.confidence-bar { width: 72px; height: 5px; border-radius: 5px; background: #e7eeeb; overflow: hidden; }
.confidence-bar span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.confidence-bar.low span { background: var(--warning); }
.confidence-text { margin-top: 4px; color: var(--muted); font-size: 8px; }
.batch-visual { position: relative; min-height: 178px; padding: 20px; overflow: hidden; color: #fff; background: var(--nav-2); }
.batch-visual::after { content: ""; position: absolute; right: -30px; bottom: -50px; width: 170px; height: 170px; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255,255,255,.025),0 0 0 56px rgba(255,255,255,.018); }
.batch-label { color: var(--mint); font: 8px/1.4 ui-monospace,monospace; letter-spacing: .14em; }
.batch-visual h3 { position: relative; z-index: 1; max-width: 200px; margin: 13px 0 7px; font-size: 19px; line-height: 1.45; }
.batch-visual p { position: relative; z-index: 1; margin: 0; color: rgba(255,255,255,.5); font-size: 10px; line-height: 1.7; }
.batch-flow { padding: 16px 18px; display: grid; gap: 12px; }
.batch-step { display: flex; align-items: center; gap: 9px; color: var(--text); font-size: 10px; }
.batch-step span { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; color: var(--brand); background: var(--brand-soft); font: 9px/1 ui-monospace,monospace; }
.activity-list { padding: 17px; }
.activity { position: relative; padding: 0 0 17px 18px; border-left: 1px solid var(--line); }
.activity:last-child { padding-bottom: 0; border-left-color: transparent; }
.activity::before { content: ""; position: absolute; top: 4px; left: -4px; width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: #75b9a8; box-shadow: 0 0 0 1px #c9ddd7; }
.activity-head { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 8px; }
.activity p { margin: 4px 0 0; color: var(--text); font-size: 10px; line-height: 1.6; }

.review-summary { margin-bottom: 13px; padding: 11px 15px; display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.review-summary strong { font-size: 10px; }
.progress-track { flex: 1; height: 5px; border-radius: 5px; background: #e8efec; overflow: hidden; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width .3s; }
.review-hint { color: var(--muted); font-size: 9px; white-space: nowrap; }
.review-grid { display: grid; grid-template-columns: 340px minmax(390px,1fr) 310px; gap: 13px; align-items: start; }
.document-panel { overflow: hidden; }
.doc-toolbar { min-height: 54px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.file-info { min-width: 0; display: flex; align-items: center; gap: 8px; }
.file-icon { width: 31px; height: 35px; display: grid; place-items: center; border-radius: 7px; color: var(--danger); background: var(--danger-soft); }
.file-icon .icon { width: 16px; height: 16px; }
.file-name { max-width: 210px; overflow: hidden; color: var(--text); font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { margin-top: 2px; color: var(--muted); font-size: 8px; }
.doc-toolbar select { max-width: 67px; padding: 5px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: #fff; font-size: 9px; }
.doc-canvas { padding: 16px; background: #e7edeb; }
.order-paper { position: relative; min-height: 590px; padding: 29px 23px 25px; border: 1px solid #dedbcf; color: #363c39; background: var(--paper); box-shadow: 0 6px 20px rgba(31,45,41,.09); font-family: "Kaiti SC", "STKaiti", "Songti SC", serif; transform: rotate(-.25deg); }
.order-paper::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(180deg,transparent 0 33px,rgba(90,120,110,.045) 34px); }
.paper-head { position: relative; text-align: center; }
.paper-head h2 { margin: 0; font-size: 23px; letter-spacing: .35em; font-weight: 600; }
.paper-head p { margin: 7px 0 20px; color: #8a8b80; font: 8px/1.5 ui-monospace,monospace; letter-spacing: .08em; }
.paper-meta { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding-bottom: 14px; border-bottom: 1px solid #b9b9ae; font-size: 11px; }
.paper-table { position: relative; width: 100%; margin-top: 14px; border-collapse: collapse; font-size: 10px; }
.paper-table th, .paper-table td { padding: 8px 5px; border: 1px solid #c9c8bb; background: transparent; color: inherit; text-align: left; }
.paper-table th { color: #686c64; font-weight: 500; }
.paper-note { position: relative; margin-top: 18px; font-size: 11px; line-height: 1.9; }
.paper-sign { position: relative; margin-top: 29px; text-align: right; font-size: 11px; }
.paper-demo { position: absolute; right: 16px; bottom: 11px; color: #aaa99c; font: 7px/1.4 ui-monospace,monospace; }
.ocr-anchor { position: relative; padding: 1px 2px; border: 1px solid transparent; border-radius: 3px; color: inherit; background: transparent; font: inherit; text-align: left; }
.ocr-anchor.issue { border-color: #d99c48; background: #fff0ce; }
.ocr-anchor.critical { border-color: #d6767c; background: #ffe3e5; }
.ocr-anchor.selected { box-shadow: 0 0 0 3px rgba(22,125,109,.17); border-color: var(--brand); }
.ocr-anchor.resolved { border-color: #75b9a8; background: #e8f5ef; }
.ocr-anchor .anchor-id { position: absolute; top: -9px; right: -5px; min-width: 14px; height: 14px; padding: 0 3px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: var(--warning); font: 7px/1 ui-sans-serif,sans-serif; }
.ocr-anchor.critical .anchor-id { background: var(--danger); }
.ocr-anchor.resolved .anchor-id { background: var(--success); }
.quality-warning { margin: 12px; padding: 11px; display: flex; align-items: flex-start; gap: 8px; border: 1px solid #efd7a8; border-radius: 8px; color: var(--warning); background: var(--warning-soft); font-size: 9px; line-height: 1.6; }
.quality-warning .icon { width: 14px; height: 14px; margin-top: 1px; }
.structured-panel { overflow: hidden; }
.review-mode-tabs { padding: 10px 13px; display: flex; gap: 4px; border-bottom: 1px solid var(--line); background: #fafcfb; }
.mode-tab { padding: 6px 10px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 9px; }
.mode-tab.active { color: var(--brand-deep); background: var(--brand-soft); font-weight: 600; }
.form-section { padding: 16px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; }
.section-title { margin: 0 0 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; font-weight: 650; }
.section-title small { color: var(--muted); font-size: 8px; font-weight: 400; }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.field { min-width: 0; display: grid; gap: 5px; color: var(--muted); font-size: 8px; }
.field.full { grid-column: 1/-1; }
.field-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field input, .field select, .field textarea, .line-input { width: 100%; min-width: 0; padding: 8px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: #fff; font-size: 10px; }
.field input:focus, .field select:focus, .line-input:focus { border-color: #8fc4b6; }
.field textarea { min-height: 55px; resize: vertical; }
.field.has-issue input, .field.has-issue select { border-color: #dfb563; background: #fffaf0; }
.confidence { display: inline-flex; align-items: center; gap: 3px; font-size: 7px; white-space: nowrap; }
.confidence.high { color: var(--success); }
.confidence.medium { color: var(--warning); }
.confidence.low { color: var(--danger); }
.line-items { display: grid; gap: 10px; }
.line-card { position: relative; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfc; }
.line-card.has-issue { border-color: #e6c27f; background: #fffcf5; }
.line-card.resolved { border-color: #bfddd4; background: #f8fcfa; }
.line-head { margin-bottom: 10px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.line-name { color: var(--ink); font-size: 10px; font-weight: 650; }
.line-raw { margin-top: 3px; color: var(--muted); font-size: 8px; }
.line-index { color: var(--muted); font: 8px/1.4 ui-monospace,monospace; }
.line-grid { display: grid; grid-template-columns: minmax(130px,1.4fr) .55fr .55fr .7fr; gap: 8px; }
.line-field { min-width: 0; display: grid; gap: 4px; color: var(--muted); font-size: 7px; }
.line-amount { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 8px; }
.line-amount strong { color: var(--ink); font-size: 11px; }
.sku-candidates { margin-top: 10px; display: grid; gap: 6px; }
.sku-option { width: 100%; padding: 8px 9px; display: flex; align-items: center; justify-content: space-between; gap: 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: #fff; text-align: left; font-size: 8px; }
.sku-option:hover { border-color: #96c8bb; background: var(--brand-soft); }
.sku-option strong { display: block; color: var(--ink); font-size: 9px; }
.sku-option small { display: block; margin-top: 2px; color: var(--muted); }
.match-score { color: var(--brand); font: 8px/1.4 ui-monospace,monospace; white-space: nowrap; }
.total-row { padding: 14px 16px; display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; background: #f7faf8; }
.total-item span { display: block; color: var(--muted); font-size: 8px; }
.total-item strong { display: block; margin-top: 4px; font-size: 13px; font-weight: 650; }
.total-item:last-child strong { color: var(--brand-deep); }
.exception-panel { overflow: hidden; }
.exception-list { max-height: 350px; overflow-y: auto; }
.exception-item { width: 100%; padding: 12px 14px; display: block; border: 0; border-bottom: 1px solid #edf1ef; color: var(--text); background: #fff; text-align: left; }
.exception-item:hover, .exception-item.selected { background: #fffaf2; }
.exception-item.selected { box-shadow: inset 3px 0 var(--warning); }
.exception-item.resolved { background: #fbfdfc; }
.exception-top { display: flex; align-items: center; gap: 6px; }
.severity { display: inline-flex; align-items: center; gap: 4px; font-size: 8px; }
.severity::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.severity-critical { color: var(--danger); }
.severity-warning { color: var(--warning); }
.severity-info { color: var(--blue); }
.exception-code { margin-left: auto; color: var(--muted); font: 7px/1.4 ui-monospace,monospace; }
.exception-title { margin-top: 6px; color: var(--ink); font-size: 10px; line-height: 1.55; font-weight: 600; }
.exception-status { margin-top: 5px; color: var(--muted); font-size: 8px; }
.exception-status.resolved { color: var(--success); }
.exception-detail { padding: 15px; border-top: 1px solid var(--line); background: #fbfcfc; }
.exception-detail h3 { margin: 0; font-size: 11px; line-height: 1.6; }
.exception-detail > p { margin: 8px 0 12px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.evidence { margin-bottom: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.evidence label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 7px; letter-spacing: .06em; }
.evidence div { color: var(--text); font-size: 9px; line-height: 1.6; overflow-wrap: anywhere; }
.exception-actions { margin-top: 10px; display: flex; gap: 7px; }
.exception-actions .btn { flex: 1; }
.lock-note { margin-top: 10px; display: flex; align-items: flex-start; gap: 6px; color: var(--muted); font-size: 8px; line-height: 1.6; }
.lock-note .icon { width: 12px; height: 12px; margin-top: 1px; }
.validation-list { padding: 13px; display: grid; gap: 8px; border-top: 1px solid var(--line); }
.validation-row { display: flex; align-items: flex-start; gap: 8px; color: var(--text); font-size: 8px; line-height: 1.6; }
.validation-row .icon { width: 13px; height: 13px; margin-top: 1px; }
.validation-row.pass .icon { color: var(--success); }
.validation-row.fail .icon { color: var(--danger); }
.validation-row.warn .icon { color: var(--warning); }

.mapping-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 18px; align-items: start; }
.mapping-name { min-width: 200px; color: var(--ink); font-size: 11px; font-weight: 620; }
.mapping-target { margin-top: 4px; color: var(--brand); font-size: 10px; }
.scope { display: inline-block; padding: 3px 7px; border-radius: 5px; color: var(--text); background: #eef2f0; font-size: 8px; white-space: nowrap; }
.switch { position: relative; width: 33px; height: 19px; padding: 0; border: 0; border-radius: 10px; background: #ccd7d3; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.17); transition: transform .18s; }
.switch.on { background: var(--brand); }
.switch.on::after { transform: translateX(14px); }
.mapping-card { padding: 20px; }
.mapping-card h3 { margin: 0 0 8px; font-size: 14px; }
.mapping-card > p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.mapping-flow { margin-top: 20px; display: grid; gap: 0; }
.mapping-step { position: relative; padding: 0 0 20px 27px; }
.mapping-step:last-child { padding-bottom: 0; }
.mapping-step::before { content: ""; position: absolute; top: 20px; bottom: 0; left: 9px; width: 1px; background: var(--line); }
.mapping-step:last-child::before { display: none; }
.mapping-step > span { position: absolute; left: 0; top: 0; width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; color: var(--brand); background: var(--brand-soft); font: 8px/1 ui-monospace,monospace; }
.mapping-step strong { display: block; font-size: 10px; }
.mapping-step p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }

.orders-layout { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(340px,.9fr); gap: 18px; align-items: start; }
.ready-order { padding: 15px 17px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.ready-order:last-child { border-bottom: 0; }
.order-preview { overflow: hidden; }
.preview-tabs { padding: 10px 13px; display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.business-document { margin: 18px; padding: 28px; border: 1px solid var(--line); color: #27322f; background: #fff; box-shadow: 0 5px 18px rgba(20,33,31,.05); }
.business-head { padding-bottom: 17px; border-bottom: 2px solid #27322f; text-align: center; }
.business-head h2 { margin: 0; font-size: 20px; letter-spacing: .15em; }
.business-head p { margin: 6px 0 0; color: var(--muted); font: 8px/1.4 ui-monospace,monospace; }
.business-meta { margin: 17px 0; display: grid; grid-template-columns: repeat(2,1fr); gap: 8px 15px; font-size: 9px; }
.business-doc-table th, .business-doc-table td { padding: 8px 7px; font-size: 8px; }
.business-total { margin-top: 15px; text-align: right; font-size: 10px; }
.business-total strong { margin-left: 10px; color: var(--brand-deep); font-size: 17px; }
.business-foot { margin-top: 22px; padding-top: 12px; border-top: 1px dashed var(--line-strong); color: var(--muted); font-size: 8px; line-height: 1.7; }
.json-preview { max-height: 560px; margin: 0; padding: 20px; overflow: auto; color: #d7eee6; background: #172421; font: 9px/1.8 ui-monospace,monospace; white-space: pre-wrap; word-break: break-word; }
.audit-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 18px; align-items: start; }
.audit-filter { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.audit-filter select { width: 100%; }
.audit-timeline { padding: 19px; }
.audit-node { position: relative; padding: 0 0 22px 22px; border-left: 1px solid var(--line); }
.audit-node:last-child { border-left-color: transparent; }
.audit-node::before { content: ""; position: absolute; top: 3px; left: -5px; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: #70b6a4; box-shadow: 0 0 0 1px #c7dad4; }
.audit-node-head { display: flex; justify-content: space-between; gap: 12px; }
.audit-node-head strong { color: var(--brand); font-size: 9px; }
.audit-node-head span { color: var(--muted); font: 8px/1.4 ui-monospace,monospace; }
.audit-node p { margin: 5px 0 0; color: var(--text); font-size: 10px; line-height: 1.65; }
.field-history { padding: 16px; display: grid; gap: 10px; }
.history-item { padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--soft); }
.history-item strong { display: block; font-size: 9px; }
.history-item p { margin: 5px 0 0; color: var(--muted); font-size: 8px; line-height: 1.6; }

.guide-card { position: fixed; z-index: 35; left: 242px; bottom: 22px; width: 330px; padding: 15px; border: 1px solid rgba(255,255,255,.8); border-radius: 16px; color: var(--ink); background: rgba(255,255,255,.82); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); box-shadow: 0 16px 42px rgba(20,33,31,.16),inset 0 1px 0 rgba(255,255,255,.9); }
.guide-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.guide-step-label { color: var(--brand); font: 8px/1.4 ui-monospace,monospace; letter-spacing: .1em; }
.guide-close { width: 25px; height: 25px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--muted); background: rgba(255,255,255,.55); }
.guide-close .icon { width: 13px; height: 13px; }
.guide-card h3 { margin: 8px 0 5px; font-size: 13px; }
.guide-card p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.65; }
.guide-bottom { margin-top: 12px; display: flex; align-items: center; gap: 10px; }
.guide-progress { flex: 1; display: flex; gap: 4px; }
.guide-progress i { flex: 1; height: 3px; border-radius: 3px; background: #dce7e3; }
.guide-progress i.done { background: var(--brand); }
.guide-bottom .btn { flex: none; }
.guide-highlight { position: relative; z-index: 34; box-shadow: 0 0 0 4px rgba(69,198,165,.25) !important; }

dialog { width: min(580px,calc(100vw - 30px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid rgba(255,255,255,.75); border-radius: 17px; color: var(--ink); background: rgba(255,255,255,.96); box-shadow: 0 28px 80px rgba(20,33,31,.25); overflow: auto; }
dialog::backdrop { background: rgba(12,25,22,.5); backdrop-filter: blur(4px); }
.dialog-head { padding: 20px 22px 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 17px; }
.dialog-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.dialog-body { padding: 20px 22px; }
.dialog-actions { padding: 14px 22px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); background: #fafcfb; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.form-field { min-width: 0; display: grid; gap: 6px; color: var(--text); font-size: 10px; font-weight: 550; }
.form-field.full { grid-column: 1/-1; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink); background: #fff; font-size: 11px; font-weight: 400; }
.form-field textarea { min-height: 75px; resize: vertical; }
.sample-options { display: grid; gap: 8px; }
.sample-option { width: 100%; padding: 11px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: #fff; text-align: left; }
.sample-option.active { border-color: #8cc4b5; background: var(--brand-soft); }
.sample-option .icon { color: var(--brand); }
.sample-option strong { display: block; font-size: 10px; }
.sample-option small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.upload-meta { padding: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px dashed var(--line-strong); border-radius: 8px; background: var(--soft); }
.upload-meta strong { display: block; max-width: 280px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.upload-meta small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.upload-meta input { display: none; }
.dialog-note { margin-top: 15px; padding: 10px 11px; display: flex; align-items: flex-start; gap: 7px; border-radius: 7px; color: #736c54; background: #fff7e7; font-size: 9px; line-height: 1.65; }
.dialog-note .icon { width: 13px; height: 13px; margin-top: 1px; flex: none; color: var(--warning); }
.scan-steps { display: grid; gap: 15px; }
.scan-step { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; }
.scan-indicator { width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; }
.scan-indicator .icon { width: 12px; height: 12px; }
.scan-step.active { color: var(--brand); font-weight: 600; }
.scan-step.active .scan-indicator { border: 2px solid #c4e2d9; border-top-color: var(--brand); animation: spin .8s linear infinite; }
.scan-step.done { color: var(--success); }
.scan-step.done .scan-indicator { border-color: var(--success); color: #fff; background: var(--success); }
.scan-progress { height: 4px; margin-top: 23px; border-radius: 4px; background: #e7eeeb; overflow: hidden; }
.scan-progress span { display: block; height: 100%; background: var(--brand); transition: width .35s; }
@keyframes spin { to { transform: rotate(360deg); } }
#toast { position: fixed; z-index: 100; bottom: 24px; left: calc(50% + 109px); max-width: min(430px,calc(100vw - 30px)); padding: 11px 15px; border-radius: 9px; color: #fff; background: var(--nav); box-shadow: 0 12px 32px rgba(20,33,31,.2); font-size: 10px; opacity: 0; pointer-events: none; transform: translate(-50%,14px); transition: .2s; }
#toast.show { opacity: 1; transform: translate(-50%,0); }
#toast.error { background: #9e3d47; }
.noscript { margin: 30px; padding: 20px; border: 1px solid var(--line); background: #fff; text-align: center; }

@media (max-width: 1380px) {
  .review-grid { grid-template-columns: 300px minmax(360px,1fr) 285px; }
  .order-paper { padding-right: 17px; padding-left: 17px; }
  .inbox-layout { grid-template-columns: minmax(0,1fr) 285px; }
}
@media (max-width: 1180px) {
  .sidebar { width: 200px; }
  .main-shell { margin-left: 200px; }
  .review-grid { grid-template-columns: 310px minmax(0,1fr); }
  .exception-panel { grid-column: 1/-1; }
  .exception-list { display: grid; grid-template-columns: repeat(3,1fr); max-height: none; }
  .exception-item { border-right: 1px solid var(--line); }
  .exception-detail { border-top: 1px solid var(--line); }
  .guide-card { left: 220px; }
  #toast { left: calc(50% + 100px); }
}
@media (max-width: 980px) {
  .sidebar { display: none; }
  .main-shell { margin-left: 0; padding-bottom: 92px; }
  .topbar { padding: 0 18px; }
  .breadcrumb { display: none; }
  .top-actions { width: 100%; justify-content: space-between; }
  .top-actions::before { content: "识单 · OrderLens"; color: var(--ink); font-size: 13px; font-weight: 680; }
  .mobile-nav { --active-index: 0; position: fixed; right: 13px; bottom: calc(17px + env(safe-area-inset-bottom)); left: 13px; z-index: 45; height: 66px; padding: 6px; display: grid; grid-template-columns: repeat(5,1fr); border: 1px solid rgba(255,255,255,.88); border-radius: 29px; background: rgba(255,255,255,.76); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); box-shadow: 0 15px 38px rgba(20,33,31,.16),inset 0 1px 0 rgba(255,255,255,.95); overflow: hidden; }
  .liquid-slider { position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px)/5); border: 1px solid rgba(255,255,255,.85); border-radius: 23px; background: rgba(218,240,233,.82); box-shadow: 0 4px 13px rgba(22,125,109,.1),inset 0 1px 0 #fff; transform: translateX(calc(var(--active-index)*100%)); transition: transform .32s cubic-bezier(.22,1.12,.36,1); }
  .mobile-nav .nav-item { z-index: 1; min-height: 52px; padding: 5px 2px; flex-direction: column; justify-content: center; gap: 3px; border-radius: 20px; color: #667a75; box-shadow: none; }
  .mobile-nav .nav-item.active { color: var(--brand-deep); background: transparent; }
  .mobile-nav .nav-item:hover { color: var(--brand-deep); background: transparent; }
  .mobile-nav .nav-label { font-size: 8px; }
  .mobile-nav .nav-count { display: none; }
  .mobile-nav .icon { width: 18px; height: 18px; }
  .view { padding: 21px 18px 34px; }
  .inbox-layout, .mapping-layout, .orders-layout, .audit-layout { grid-template-columns: 1fr; }
  .metric-row { grid-template-columns: repeat(2,1fr); }
  .metric:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .metric:nth-child(4) { border-top: 1px solid var(--line); }
  .guide-card { left: 18px; bottom: 99px; }
  #toast { bottom: 98px; left: 50%; }
}
@media (max-width: 700px) {
  .topbar { height: 59px; padding: 0 14px; }
  .demo-chip { display: none; }
  .role-avatar { display: none; }
  .role-control select { max-width: 115px; }
  .view { padding: 19px 13px 30px; }
  .page-head { flex-direction: column; gap: 13px; }
  .page-head h1 { font-size: 21px; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
  .metric { padding: 16px; }
  .metric-value { font-size: 25px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search { max-width: none; }
  .toolbar .select { width: 100%; }
  .review-summary { flex-wrap: wrap; gap: 8px 12px; }
  .review-hint { width: 100%; white-space: normal; }
  .review-grid { grid-template-columns: 1fr; }
  .exception-panel { grid-column: auto; }
  .exception-list { display: block; max-height: 290px; }
  .doc-canvas { padding: 12px; }
  .order-paper { min-height: 560px; }
  .line-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .field-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .total-row { padding: 13px; gap: 8px; }
  .ready-order { grid-template-columns: 1fr; }
  .business-document { margin: 12px; padding: 20px 15px; }
  .business-meta { grid-template-columns: 1fr; }
  .guide-card { right: 13px; left: 13px; width: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .dialog-head, .dialog-body { padding-right: 17px; padding-left: 17px; }
  .dialog-actions { padding-right: 17px; padding-left: 17px; }
  .upload-meta { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 380px) {
  .mobile-nav { right: 9px; left: 9px; }
  .mobile-nav .nav-label { font-size: 7px; }
  .order-paper { padding-right: 14px; padding-left: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

.role-control .role-tabs{display:flex;align-items:center;gap:3px;padding:3px;border:1px solid var(--line);border-radius:12px;background:var(--surface,#fff);overflow-x:auto}.role-tabs button{min-height:44px;padding:7px 11px;border:0;border-radius:9px;background:transparent;color:var(--muted);font-size:10px;white-space:nowrap}.role-tabs button.active{background:var(--brand);color:#fff}@media(max-width:760px){.role-control .role-tabs{max-width:calc(100vw - 150px)}}
