@font-face {
  font-family: "Invoice Sans";
  src: url("./fonts/invoice-sans-sc.woff2?v=e003496ed92a") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
/* finesse · register=product · A=sage-ledger+amber · B=system-sans+tabular · C=dark-rail+dense-table · D=feedback-only · E=paper-ledger · SOUL=5 SPECTACLE=2 DENSITY=8 */
.recognition-review { min-width: 0; border: 1px solid #bd8c32; border-radius: 12px; padding: 16px; background: #fff8e8; color: #413016; }
.recognition-review h3 { margin: 0 0 8px; font-size: 17px; }
.recognition-review > p { font-size: 14px; line-height: 1.6; }
.recognition-review-card { min-width: 0; padding: 12px 0; border-top: 1px solid #dcc99e; }
.recognition-review-card .shared-detail-list div { min-width: 0; }
.recognition-review-card dt, .recognition-review-card dd { white-space: normal; overflow-wrap: anywhere; }
.recognition-review-card .shared-button { min-height: 44px; }
:root {
  --page: #e9eee9;
  --surface: #fbfcfa;
  --surface-strong: #f6f8f5;
  --surface-soft: #eff3ef;
  --surface-hover: #e7eee9;
  --ink-1: #15231c;
  --ink-2: #3d4c44;
  --ink-3: #65776d;
  --ink-inverse: #f2f6f3;
  --rail: #14251e;
  --rail-2: #1b3027;
  --rail-ink: #aebdb5;
  --rail-active: #f3f7f4;
  --accent: #2f6b4f;
  --accent-strong: #24573f;
  --accent-soft: #dfece4;
  --accent-muted: #b8d2c1;
  --accent-2: #b57d2e;
  --accent-2-soft: #f4e8d3;
  --teal: #2c7380;
  --teal-soft: #dcebed;
  --success: #2d7652;
  --success-soft: #deeee5;
  --danger: #b6453c;
  --danger-strong: #94382f;
  --danger-soft: #f5dfdc;
  --warning: #a86d17;
  --warning-soft: #f5e9d5;
  --info: #3b678d;
  --info-soft: #e0eaf3;
  --purple: #76579c;
  --purple-soft: #ece4f3;
  --muted-soft: #e9eeeb;
  --border: rgba(21, 35, 28, 0.08);
  --border-strong: rgba(21, 35, 28, 0.14);
  --rail-border: rgba(242, 246, 243, 0.08);
  --overlay: rgba(12, 23, 18, 0.44);
  --shadow: 0 1px 3px rgba(20, 50, 34, 0.055);
  --shadow-md: 0 12px 36px -24px rgba(20, 50, 34, 0.34);
  --shadow-lg: 0 34px 90px -46px rgba(20, 50, 34, 0.52);
  --focus: rgba(47, 107, 79, 0.22);
  --danger-focus: rgba(182, 69, 60, 0.2);
  --radius-card: 18px;
  --radius-control: 12px;
  --radius-small: 9px;
  --sidebar-width: 238px;
  --topbar-height: 76px;
  --transition: 180ms ease;
  --font: "Invoice Sans", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --type-regular: 400;
  --type-medium: 500;
  --type-semibold: 600;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: clip; }
body { background: var(--page); color: var(--ink-1); font-family: var(--font); font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, label, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
h1, h2 { overflow-wrap: anywhere; min-width: 0; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
button { white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; z-index: 1000; top: 10px; left: 10px; transform: translateY(-160%); padding: 10px 14px; border-radius: var(--radius-control); background: var(--surface); color: var(--ink-1); box-shadow: var(--shadow-md); transition: transform var(--transition); }
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100dvh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; z-index: 40; display: flex; flex-direction: column; padding: 22px 14px 16px; background: var(--rail); color: var(--rail-ink); border-right: 1px solid var(--rail-border); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 24px; color: var(--rail-active); }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: var(--rail); background: var(--rail-active); font-size: 20px; font-weight: 850; box-shadow: 0 10px 28px -16px var(--accent-muted); }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 17px; letter-spacing: .01em; }
.brand span { margin-top: 2px; color: var(--rail-ink); font-size: 11px; }
.nav-list { display: grid; gap: 5px; }
.nav-item { min-height: 46px; display: flex; align-items: center; gap: 12px; width: 100%; padding: 0 13px; border: 0; border-radius: var(--radius-control); background: transparent; color: inherit; cursor: pointer; text-align: left; transition: background var(--transition), color var(--transition), transform var(--transition); }
.nav-item > span:first-child { width: 20px; color: inherit; font-size: 17px; text-align: center; }
.nav-item:hover { background: var(--rail-2); color: var(--rail-active); }
.nav-item.is-active { background: var(--rail-active); color: var(--rail); font-weight: 700; box-shadow: 0 10px 26px -20px var(--ink-inverse); }
.nav-item:active { transform: translateY(1px); }
.sidebar-bottom { display: grid; gap: 3px; margin-top: auto; }
.nav-item.subtle { min-height: 40px; font-size: 12px; }
.file-trigger { cursor: pointer; }
.demo-badge { display: flex; align-items: center; gap: 8px; margin: 0 10px 12px; padding: 10px 11px; border: 1px solid var(--rail-border); border-radius: var(--radius-control); color: var(--rail-ink); font-size: 11px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-muted); box-shadow: 0 0 0 4px var(--rail-2); }

.app-main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; min-height: var(--topbar-height); display: flex; align-items: center; gap: 24px; padding: 12px 24px 12px 28px; background: color-mix(in srgb, var(--page) 90%, transparent); border-bottom: 1px solid var(--border); backdrop-filter: blur(16px); }
.page-heading { min-width: 210px; }
.page-heading span { display: block; color: var(--ink-3); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.page-heading h1 { margin-top: 2px; font-size: 20px; line-height: 1.2; letter-spacing: -.02em; }
.topbar-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-left: auto; }
.global-search { position: relative; width: min(400px, 34vw); display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 10px 0 13px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); box-shadow: var(--shadow); }
.global-search:focus-within { border-color: var(--accent-muted); box-shadow: 0 0 0 3px var(--focus); }
.global-search > span { color: var(--ink-3); font-size: 20px; line-height: 1; }
.global-search input { min-width: 0; flex: 1; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink-1); }
.global-search input::placeholder { color: var(--ink-3); }
kbd { padding: 2px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-soft); color: var(--ink-3); font-family: var(--font); font-size: 10px; }
.search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 80; max-height: 480px; overflow-y: auto; padding: 8px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-lg); }
.search-result-head { padding: 7px 9px 9px; color: var(--ink-3); font-size: 11px; font-weight: 700; }
.search-results button { width: 100%; min-height: 56px; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; }
.search-results button:hover { background: var(--surface-soft); }
.search-results button > span:nth-child(2) { min-width: 0; }
.search-results strong, .search-results small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-results small { margin-top: 2px; color: var(--ink-3); font-size: 11px; }
.result-type { display: grid; place-items: center; width: 42px; height: 32px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 750; }
.search-empty { padding: 26px 12px; color: var(--ink-3); text-align: center; }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--radius-control); cursor: pointer; font-weight: 680; transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition); }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.primary { background: var(--accent); color: var(--ink-inverse); box-shadow: 0 10px 24px -16px var(--accent); }
.button.primary:hover { background: var(--accent-strong); }
.button.ghost { border-color: var(--border-strong); background: var(--surface); color: var(--ink-2); }
.button.secondary { border-color: var(--accent-muted); background: var(--accent-soft); color: var(--accent-strong); }
.button.danger { background: var(--danger); color: var(--ink-inverse); }
.button.danger:hover { background: var(--danger-strong); }
.button.danger-soft { margin-left: auto; border-color: color-mix(in srgb, var(--danger) 24%, transparent); background: var(--danger-soft); color: var(--danger-strong); }
.button.tiny { min-height: 34px; padding: 0 11px; border-radius: 9px; font-size: 12px; }
.button.full { width: 100%; }
.icon-button { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink-2); cursor: pointer; font-size: 20px; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--accent); cursor: pointer; font-weight: 700; }
.mobile-only { display: none; }

main { padding: 22px 24px 48px 28px; }
.view { display: none; }
.view.is-active { display: block; animation: view-in 170ms ease both; }
@keyframes view-in { from { opacity: .6; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.priority-banner { min-height: 74px; display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--danger) 18%, transparent); border-radius: var(--radius-card); background: color-mix(in srgb, var(--danger-soft) 72%, var(--surface)); box-shadow: var(--shadow); }
.priority-banner > div:nth-child(2) { min-width: 0; }
.priority-banner strong { font-size: 14px; }
.priority-banner p { margin-top: 3px; color: var(--ink-2); font-size: 12px; }
.priority-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; background: var(--danger); color: var(--ink-inverse); font-size: 18px; font-weight: 850; }
.priority-icon.done { background: var(--success); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 16px; }
.metric-card { min-width: 0; min-height: 136px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr auto; gap: 3px 10px; padding: 17px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; text-align: left; transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.metric-card:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.metric-icon { grid-row: 1; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; font-size: 12px; font-weight: 800; }
.metric-card.amber .metric-icon { background: var(--warning-soft); color: var(--warning); }
.metric-card.teal .metric-icon { background: var(--teal-soft); color: var(--teal); }
.metric-card.red .metric-icon { background: var(--danger-soft); color: var(--danger); }
.metric-card.green .metric-icon { background: var(--success-soft); color: var(--success); }
.metric-label { align-self: center; color: var(--ink-3); font-size: 12px; font-weight: 700; }
.metric-card > strong { grid-column: 1 / -1; align-self: end; margin-top: 9px; font-size: 26px; line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.metric-card small { grid-column: 1 / -1; color: var(--ink-3); font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.panel { border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow); }
.panel-header { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 17px; border-bottom: 1px solid var(--border); }
.panel-header.compact { border-bottom: 0; padding-bottom: 8px; }
.section-kicker { display: block; margin-bottom: 2px; color: var(--ink-3); font-size: 10px; font-weight: 750; letter-spacing: .08em; }
.panel-header h2 { font-size: 16px; letter-spacing: -.01em; }
.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-soft); }
.segmented button { min-height: 32px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 11px; font-weight: 700; }
.segmented button.is-active { background: var(--surface); color: var(--ink-1); box-shadow: var(--shadow); }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { min-width: 0; padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { height: 40px; padding-top: 8px; padding-bottom: 8px; background: var(--surface-strong); color: var(--ink-3); font-size: 10.5px; font-weight: 760; letter-spacing: .025em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-soft) 56%, transparent); }
td { height: 58px; color: var(--ink-2); font-size: 12px; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.strong { color: var(--ink-1); font-weight: 750; }
.actions-cell { width: 1%; text-align: right; }
.table-link { min-width: 138px; display: block; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.table-link.single { min-width: 112px; }
.table-link strong, .table-link span, .cell-sub { display: block; }
.table-link strong { color: var(--ink-1); font-size: 12px; }
.table-link span, .cell-sub { margin-top: 2px; color: var(--ink-3); font-size: 10.5px; }
.table-link:hover strong { color: var(--accent); }
.status-badge { min-height: 25px; display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 750; white-space: nowrap; }
.status-badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-badge.warning { background: var(--warning-soft); color: var(--warning); }
.status-badge.danger { background: var(--danger-soft); color: var(--danger); }
.status-badge.info { background: var(--info-soft); color: var(--info); }
.status-badge.purple { background: var(--purple-soft); color: var(--purple); }
.status-badge.success { background: var(--success-soft); color: var(--success); }
.status-badge.muted { background: var(--muted-soft); color: var(--ink-3); }
.age { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.age.late { color: var(--danger); font-weight: 700; }
.flow-checklist { list-style: none; display: grid; gap: 2px; margin: 0; padding: 0 15px 12px; }
.flow-checklist li { min-height: 72px; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--border); }
.flow-checklist li:last-child { border-bottom: 0; }
.flow-index { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 800; }
.flow-checklist strong { font-size: 12px; }
.flow-checklist p { margin-top: 2px; color: var(--ink-3); font-size: 10.5px; }
.flow-checklist b { min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-soft); font-variant-numeric: tabular-nums; }
.mini-note { display: flex; gap: 10px; margin: 0 15px 15px; padding: 12px; border-radius: 13px; background: var(--surface-soft); }
.mini-note > span { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; background: var(--success-soft); color: var(--success); font-weight: 800; }
.mini-note p { color: var(--ink-3); font-size: 10.5px; }
.mini-note strong { color: var(--ink-2); font-size: 11px; }

.view-toolbar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-chip { min-height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink-3); cursor: pointer; font-size: 11px; font-weight: 700; }
.filter-chip.is-active { border-color: var(--accent-muted); background: var(--accent-soft); color: var(--accent-strong); }
.result-count { color: var(--ink-3); font-size: 11px; }
.table-panel { overflow: hidden; }
.table-wrap.wide table { min-width: 980px; }
.accent-text { color: var(--accent-strong) !important; }
.order-tags { display: flex; flex-wrap: wrap; gap: 4px; max-width: 220px; }
.order-tags b { padding: 3px 6px; border-radius: 6px; background: var(--surface-soft); color: var(--ink-2); font-size: 9.5px; font-weight: 680; }
.table-empty { min-height: 220px; display: grid; place-items: center; align-content: center; gap: 5px; color: var(--ink-3); text-align: center; }
.table-empty > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-soft); font-size: 20px; }
.table-empty strong { color: var(--ink-2); }
.table-empty p { font-size: 11px; }

.customer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.finance-portal-shell { display: grid; gap: 16px; }
.finance-boundary-banner { display: flex; align-items: flex-start; gap: 12px; padding: 15px 17px; border: 1px solid color-mix(in srgb, var(--warning) 28%, var(--border)); border-radius: var(--radius-card); background: linear-gradient(135deg, color-mix(in srgb, var(--warning-soft) 78%, var(--surface)) 0%, var(--surface) 72%); box-shadow: var(--shadow); }
.finance-boundary-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: var(--warning); color: var(--ink-inverse); font-weight: 850; }
.finance-boundary-banner strong, .finance-boundary-banner p { display: block; }
.finance-boundary-banner p { margin-top: 3px; color: var(--ink-2); font-size: 11px; }
.finance-portal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: stretch; }
.finance-search-panel, .finance-steps-panel, .finance-result-panel { overflow: hidden; }
.finance-lookup-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; padding: 0 17px 14px; }
.finance-lookup-form .button { min-width: 142px; }
.finance-lookup-message { min-height: 38px; margin: 0 17px 17px; padding: 10px 11px; border-radius: 10px; background: var(--surface-soft); color: var(--ink-3); font-size: 10.5px; }
.finance-steps { display: grid; gap: 0; margin: 0; padding: 0 17px 12px; list-style: none; }
.finance-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 9px; min-height: 54px; border-bottom: 1px solid var(--border); }
.finance-steps li:last-child { border-bottom: 0; }
.finance-steps b { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 11px; }
.finance-steps strong, .finance-steps small { display: block; }
.finance-steps strong { font-size: 11px; }
.finance-steps small { margin-top: 2px; color: var(--ink-3); font-size: 9.5px; }
.finance-result-list { display: grid; gap: 9px; padding: 14px 17px 17px; }
.finance-result-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-strong); }
.finance-result-main { min-width: 0; }
.finance-result-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.finance-result-heading strong { font-size: 14px; letter-spacing: .01em; }
.finance-result-main > p { margin-top: 4px; color: var(--ink-2); font-size: 11px; }
.finance-result-meta { display: flex; flex-wrap: wrap; gap: 14px; margin: 11px 0 0; }
.finance-result-meta div { min-width: 105px; }
.finance-result-meta dt { color: var(--ink-3); font-size: 9.5px; }
.finance-result-meta dd { margin: 2px 0 0; color: var(--ink-1); font-size: 11px; font-weight: 700; }
.finance-result-action { flex: 0 0 auto; }
.finance-result-note { display: block; max-width: 170px; color: var(--ink-3); font-size: 10px; line-height: 1.5; text-align: right; }
.finance-target-summary { display: grid; gap: 2px; margin: 16px 18px 0; padding: 12px 13px; border: 1px solid var(--accent-muted); border-radius: 12px; background: var(--accent-soft); }
.finance-target-summary strong { color: var(--accent-strong); font-size: 14px; }
.finance-target-summary > span:last-child { color: var(--ink-2); font-size: 10.5px; }
.finance-target-label { color: var(--accent-strong); font-size: 9.5px; font-weight: 800; letter-spacing: .06em; }
.finance-file-error { color: var(--danger); font-size: 11px; font-weight: 700; }
.customer-card { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow); }
.customer-card-main { width: 100%; min-height: 76px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 15px; border: 0; background: transparent; cursor: pointer; text-align: left; }
.customer-card-main:hover { background: var(--surface-strong); }
.customer-avatar { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; background: var(--accent-soft); color: var(--accent-strong); font-size: 16px; font-weight: 850; }
.customer-avatar.large { width: 52px; height: 52px; border-radius: 16px; font-size: 20px; }
.customer-heading { min-width: 0; }
.customer-heading strong, .customer-heading span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-heading span { margin-top: 3px; color: var(--ink-3); font-size: 10.5px; }
.count-pill { padding: 4px 7px; border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: 9.5px; font-weight: 750; }
.count-pill.danger { background: var(--danger-soft); color: var(--danger); }
.customer-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 14px 15px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-strong); }
.customer-stats div { min-width: 0; }
.customer-stats dt { color: var(--ink-3); font-size: 9.5px; }
.customer-stats dd { margin: 4px 0 0; color: var(--ink-1); font-size: 14px; font-weight: 780; font-variant-numeric: tabular-nums; }
.customer-card-foot { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 15px; color: var(--ink-3); font-size: 10px; }
.customer-card-foot .text-button { font-size: 10.5px; }
.empty-card { grid-column: 1 / -1; min-height: 260px; display: grid; place-items: center; align-content: center; gap: 5px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); color: var(--ink-3); }

.drawer-backdrop { position: fixed; inset: 0; z-index: 90; opacity: 0; background: var(--overlay); backdrop-filter: blur(2px); transition: opacity 220ms ease; }
.drawer-backdrop.is-open { opacity: 1; }
.detail-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(520px, 94vw); display: flex; flex-direction: column; transform: translateX(104%); background: var(--surface); box-shadow: var(--shadow-lg); transition: transform 220ms ease; }
.detail-drawer.is-open { transform: translateX(0); }
.drawer-header { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.drawer-header h2 { font-size: 18px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px 30px; }
.drawer-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px; border-radius: 15px; background: var(--surface-soft); }
.drawer-summary > div { min-width: 0; padding: 4px 6px; }
.drawer-summary span, .drawer-summary strong { display: block; }
.drawer-summary > div > span { color: var(--ink-3); font-size: 10px; }
.drawer-summary strong { margin-top: 4px; font-size: 16px; font-variant-numeric: tabular-nums; }
.drawer-section { margin-top: 20px; }
.drawer-section h3 { margin-bottom: 10px; font-size: 13px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; min-height: 58px; }
.timeline li::after { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 1px; background: var(--border-strong); }
.timeline li:last-child::after { display: none; }
.timeline i { width: 28px; height: 28px; display: grid; place-items: center; border: 2px solid var(--border-strong); border-radius: 50%; background: var(--surface); color: var(--surface); font-style: normal; font-size: 10px; }
.timeline li.done i { border-color: var(--accent); background: var(--accent); color: var(--ink-inverse); }
.timeline strong, .timeline span { display: block; }
.timeline strong { padding-top: 4px; font-size: 12px; }
.timeline span { margin-top: 2px; color: var(--ink-3); font-size: 10px; }
.detail-list { margin: 0; border-top: 1px solid var(--border); }
.detail-list div { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.detail-list dt { color: var(--ink-3); font-size: 10.5px; }
.detail-list dd { margin: 0; color: var(--ink-2); font-size: 11.5px; overflow-wrap: anywhere; }
.linked-list { display: grid; gap: 6px; }
.linked-list > button { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-strong); cursor: pointer; text-align: left; }
.linked-list > button:hover { border-color: var(--accent-muted); background: var(--accent-soft); }
.linked-list strong, .linked-list small { display: block; }
.linked-list small { margin-top: 2px; color: var(--ink-3); font-size: 10px; }
.linked-list b { color: var(--ink-1); font-size: 11px; font-variant-numeric: tabular-nums; }
.inline-empty { padding: 18px; border-radius: 11px; background: var(--surface-soft); color: var(--ink-3); font-size: 11px; text-align: center; }
.note-box { padding: 12px; border-radius: 12px; background: var(--warning-soft); color: var(--ink-2); font-size: 11px; }
.drawer-actions { position: sticky; bottom: -30px; display: flex; justify-content: flex-end; gap: 8px; margin: 20px -18px -30px; padding: 13px 18px calc(13px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); }
.action-stack { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.identity-block { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 4px; }
.identity-block strong, .identity-block span, .identity-block small { display: block; }
.identity-block span, .identity-block small { margin-top: 2px; color: var(--ink-3); font-size: 10.5px; }

.modal { width: min(600px, calc(100vw - 28px)); max-height: min(88dvh, 900px); padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); color: var(--ink-1); box-shadow: var(--shadow-lg); }
.modal.large { width: min(860px, calc(100vw - 28px)); }
.modal::backdrop { background: var(--overlay); backdrop-filter: blur(3px); }
.modal form { max-height: inherit; display: flex; flex-direction: column; }
.modal-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 18px; }
.order-dialog-body { flex: 1; min-height: 0; overflow-y: auto; }
.order-dialog-body > .form-grid { overflow: visible; }
.screenshot-recognizer { position: relative; margin: 16px 18px 0; padding: 15px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border)); border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 78%, var(--surface)) 0%, var(--surface) 58%, color-mix(in srgb, var(--warning-soft) 42%, var(--surface)) 100%); }
.screenshot-recognizer::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 34%, var(--warning))); }
.recognizer-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.recognizer-heading h3 { margin-top: 3px; font-size: 14px; }
.recognizer-heading p { max-width: 420px; margin-top: 4px; color: var(--ink-3); font-size: 10.5px; }
.recognizer-kicker { color: var(--accent-strong); font-size: 9.5px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.screenshot-dropzone { min-height: 82px; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 2px 11px; margin-top: 12px; padding: 12px; border: 1px dashed var(--accent-muted); border-radius: 13px; outline: 0; background: color-mix(in srgb, var(--surface) 78%, transparent); cursor: pointer; transition: border-color var(--transition), background var(--transition), transform var(--transition); }
.screenshot-dropzone:hover, .screenshot-dropzone:focus-visible, .screenshot-dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.dropzone-icon { grid-row: 1 / span 2; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: var(--ink-inverse); font-size: 20px; font-weight: 850; }
.screenshot-dropzone strong { align-self: end; font-size: 11.5px; }
.screenshot-dropzone small { align-self: start; color: var(--ink-3); font-size: 9.5px; }

.invoice-image-dropzone { min-height: 108px; display: grid; place-content: center; gap: 7px; padding: 20px; border: 1px dashed var(--accent-muted); border-radius: 14px; background: var(--accent-soft); text-align: center; cursor: pointer; outline: 0; transition: border-color var(--transition), background var(--transition), transform var(--transition); }
.invoice-image-dropzone strong { font-size: 14px; }
.invoice-image-dropzone small { color: var(--ink-3); }
.invoice-image-dropzone:hover, .invoice-image-dropzone:focus-visible, .invoice-image-dropzone.is-dragging { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 72%, white); transform: translateY(-1px); }
.screenshot-preview-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 7px; margin-top: 10px; }
.screenshot-preview-item { min-width: 0; display: grid; grid-template-columns: 46px minmax(0, 1fr) 26px; align-items: center; gap: 7px; padding: 6px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.screenshot-preview-item img { width: 46px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--surface-soft); }
.screenshot-preview-item strong, .screenshot-preview-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screenshot-preview-item strong { font-size: 9.5px; }
.screenshot-preview-item small { margin-top: 2px; color: var(--ink-3); font-size: 8.5px; }
.screenshot-remove { width: 26px; height: 26px; border: 0; border-radius: 8px; background: var(--danger-soft); color: var(--danger); cursor: pointer; font-weight: 800; }
.recognizer-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.recognizer-actions > span { color: var(--ink-3); font-size: 10px; font-weight: 700; }
.recognizer-status { min-height: 0; margin-top: 8px; color: var(--ink-3); font-size: 10.5px; }
.recognizer-status.is-loading { color: var(--accent-strong); font-weight: 750; }
.recognizer-status.is-error { color: var(--danger); font-weight: 750; }
.recognition-results { display: grid; gap: 7px; margin-top: 10px; }
.recognition-result { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.recognition-result.is-applied { border-color: var(--accent-muted); background: var(--accent-soft); }
.recognition-result-index { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-soft); color: var(--ink-2); font-size: 10px; font-weight: 850; }
.recognition-result strong, .recognition-result small { display: block; }
.recognition-result strong { font-size: 10.5px; }
.recognition-result small { margin-top: 2px; color: var(--ink-3); font-size: 9.5px; }
.recognition-result .button { min-height: 32px; padding: 0 9px; font-size: 9.5px; }
.recognizer-safety { margin-top: 9px; padding-left: 9px; border-left: 2px solid var(--warning); color: var(--ink-3); font-size: 9.5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 14px; padding: 18px; overflow-y: auto; }
.workflow-form { display: grid; gap: 12px; overflow-y: auto; padding: 15px 16px 4px; background: var(--surface-strong); }
.field { min-width: 0; display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field > span:first-child { color: var(--ink-2); font-size: 11px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 10px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-control); outline: 0; background: var(--surface); color: var(--ink-1); transition: border-color var(--transition), box-shadow var(--transition); }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.money-input { display: flex; align-items: center; min-height: 44px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-control); background: var(--surface); }
.money-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.money-input b { padding-left: 11px; color: var(--ink-3); }
.money-input input { min-width: 0; flex: 1; border: 0; outline: 0; box-shadow: none !important; font-variant-numeric: tabular-nums; }
.money-input.compact { width: 154px; min-height: 40px; }
.money-input.compact input { min-height: 38px; padding: 7px; }
.form-section { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.form-section .form-grid { padding: 12px 0 0; overflow: visible; }
.section-number { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 850; }
.section-number.small { display: inline-grid; margin-right: 7px; }
.section-content h3 { padding-top: 3px; font-size: 13px; }
.helper { margin-top: 4px; color: var(--ink-3); font-size: 10.5px; }
.allocation-list { display: grid; gap: 7px; margin-top: 12px; }
.allocation-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-strong); }
.allocation-row.is-selected { border-color: var(--accent-muted); background: var(--accent-soft); }
.allocation-row > label { min-width: 0; display: flex; align-items: center; gap: 9px; cursor: pointer; }
.allocation-row input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.checkmark { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; border: 1.5px solid var(--border-strong); border-radius: 7px; background: var(--surface); color: transparent; font-size: 10px; }
.allocation-row input:checked + .checkmark { border-color: var(--accent); background: var(--accent); color: var(--ink-inverse); }
.allocation-row label strong, .allocation-row label small { display: block; }
.allocation-row label strong { font-size: 11.5px; }
.allocation-row label small, .allocation-row > div > small, .allocation-row em { color: var(--ink-3); font-size: 9.5px; font-style: normal; }
.allocation-row > div { display: grid; justify-items: end; gap: 3px; }
.allocation-empty { padding: 24px 14px; border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--surface-strong); color: var(--ink-3); font-size: 11px; text-align: center; }
.submit-check { padding: 14px 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.check-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.check-head > div { display: flex; align-items: center; }
.check-head > b { padding: 4px 8px; border-radius: 999px; font-size: 10px; }
.check-head > b.blocking { background: var(--danger-soft); color: var(--danger); }
.check-head > b.ready { background: var(--success-soft); color: var(--success); }
.submit-check ul { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 11px 0 0; padding: 0; }
.submit-check li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 7px; padding: 8px; border-radius: 10px; background: var(--surface-strong); }
.submit-check li > span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; font-size: 10px; font-weight: 850; }
.submit-check li.pass > span { background: var(--success-soft); color: var(--success); }
.submit-check li.block > span { background: var(--danger-soft); color: var(--danger); }
.submit-check li strong, .submit-check li small { display: block; }
.submit-check li strong { font-size: 10.5px; }
.submit-check li small { margin-top: 1px; color: var(--ink-3); font-size: 9.5px; overflow-wrap: anywhere; }
.form-message { min-height: 0; padding: 0 18px; color: var(--danger); font-size: 11px; font-weight: 650; }
.form-message:not(:empty) { padding-top: 10px; }
.modal-actions { min-height: 70px; display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface); }
.modal-actions.sticky { position: sticky; bottom: 0; }
.draft-note { margin-right: auto; color: var(--ink-3); font-size: 10px; }

.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 260px; max-width: 400px; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 9px; padding: 11px 13px; transform: translateY(12px); opacity: 0; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-lg); transition: opacity 220ms ease, transform 220ms ease; }
.toast.show { transform: none; opacity: 1; }
.toast > span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--success-soft); color: var(--success); font-weight: 850; }
.toast.error > span { background: var(--danger-soft); color: var(--danger); }
.toast p { color: var(--ink-2); font-size: 11.5px; }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .finance-portal-grid { grid-template-columns: minmax(0, 1fr); }
  .side-summary { display: grid; grid-template-columns: 260px minmax(0, 1fr) 280px; align-items: center; }
  .side-summary .panel-header { align-self: stretch; }
  .flow-checklist { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 8px; }
  .flow-checklist li { grid-template-columns: 28px minmax(0, 1fr); border: 0; }
  .flow-checklist li b { grid-column: 1 / -1; width: 100%; }
  .mini-note { margin: 10px; }
  .topbar { gap: 12px; }
  .page-heading { min-width: 180px; }
}

@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; width: min(280px, 86vw); transform: none; clip-path: inset(0 100% 0 0); visibility: hidden; pointer-events: none; box-shadow: var(--shadow-lg); transition: clip-path 220ms ease, visibility 0s linear 220ms; }
  .sidebar.is-mobile-open { clip-path: inset(0); visibility: visible; pointer-events: auto; transition: clip-path 220ms ease; }
  .mobile-only { display: grid; }
  .topbar { padding: 10px 14px; }
  .page-heading { min-width: 0; }
  .page-heading span { display: none; }
  .page-heading h1 { font-size: 16px; }
  .topbar-actions .button.ghost { display: none; }
  .global-search { width: min(300px, 38vw); }
  main { padding: 16px 14px 40px; }
  .side-summary { display: block; }
  .flow-checklist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .customer-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 680px) {
  :root { --topbar-height: 66px; }
  .topbar { flex-wrap: wrap; align-content: center; gap: 8px; }
  .page-heading { flex: 1; }
  .topbar-actions { width: 100%; order: 3; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .global-search { width: 100%; }
  .topbar-actions .button.primary { position: static; z-index: auto; min-width: 132px; box-shadow: 0 10px 24px -16px var(--accent); }
  .topbar { min-height: 120px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .metric-card { min-height: 124px; padding: 13px; }
  .metric-card > strong { font-size: 22px; }
  .priority-banner { align-items: flex-start; flex-wrap: wrap; }
  .priority-banner .button { width: 100%; margin-left: 0; }
  .finance-boundary-banner { padding: 13px; }
  .finance-lookup-form { grid-template-columns: minmax(0, 1fr); }
  .finance-lookup-form .button { width: 100%; }
  .finance-result-card { align-items: stretch; flex-direction: column; gap: 12px; }
  .finance-result-action { width: 100%; }
  .finance-result-action .button { width: 100%; }
  .finance-result-note { max-width: none; text-align: left; }
  .panel-header { align-items: flex-start; flex-direction: column; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
  .queue-panel .table-wrap { overflow: visible; padding: 0 10px 10px; }
  .queue-panel table, .queue-panel tbody, .queue-panel tr, .queue-panel td { display: block; width: 100%; }
  .queue-panel thead { display: none; }
  .queue-panel tbody { display: grid; gap: 8px; }
  .queue-panel tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; padding: 11px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-strong); }
  .queue-panel tbody td { width: auto; height: auto; padding: 0; border: 0; }
  .queue-panel tbody td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .queue-panel tbody td:nth-child(2) { grid-column: 2; grid-row: 1; align-self: center; }
  .queue-panel tbody td:nth-child(3) { grid-column: 1; grid-row: 2; }
  .queue-panel tbody td:nth-child(4) { grid-column: 1; grid-row: 3; }
  .queue-panel tbody td:nth-child(5) { grid-column: 2; grid-row: 2 / span 2; align-self: end; }
  .queue-panel .table-link { min-width: 0; }
  .queue-panel .table-empty { min-height: 160px; }
  .flow-checklist { grid-template-columns: minmax(0, 1fr); }
  .flow-checklist li { grid-template-columns: 28px minmax(0, 1fr) 34px; border-bottom: 1px solid var(--border); }
  .flow-checklist li b { grid-column: auto; width: auto; }
  .view-toolbar { align-items: flex-start; flex-direction: column; }
  .customer-stats dd { font-size: 12px; }
  .detail-list div { grid-template-columns: 104px minmax(0, 1fr); }
  .recognizer-heading { align-items: flex-start; }
  .recognizer-heading .button { flex: 0 0 auto; }
  .screenshot-preview-list { grid-template-columns: minmax(0, 1fr); }
  .recognition-result { grid-template-columns: 28px minmax(0, 1fr); }
  .recognition-result .button { grid-column: 1 / -1; width: 100%; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .field.full { grid-column: auto; }
  .allocation-row { grid-template-columns: minmax(0, 1fr); }
  .allocation-row > div { justify-items: stretch; }
  .money-input.compact { width: 100%; }
  .submit-check ul { grid-template-columns: minmax(0, 1fr); }
  .modal { max-height: 94dvh; }
  .modal-actions { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .draft-note { display: none; }
  .drawer-summary, .drawer-summary.three { grid-template-columns: minmax(0, 1fr); }
  .toast-stack { right: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); left: 10px; }
  .toast { min-width: 0; max-width: none; }
}

@media (max-width: 390px) {
  .metric-grid { grid-template-columns: minmax(0, 1fr); }
  .metric-card { min-height: 110px; }
  .filter-row { flex-wrap: nowrap; width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .filter-chip { flex: 0 0 auto; }
  .customer-card-main { grid-template-columns: 42px minmax(0, 1fr); }
  .customer-card-main .count-pill { grid-column: 1 / -1; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* Shared finance workspace */
body.shared-mode { background: #eef1ee; color: #1f2924; }
body.shared-mode > .app-shell { display: none; }
.shared-app-shell { min-height: 100vh; background: linear-gradient(135deg, #eef2ef 0%, #f9fbf8 48%, #e9f0ec 100%); }
.shared-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(18px, 5vw, 72px); border-bottom: 1px solid #d9e2dc; background: rgba(255,255,255,.86); }
.shared-brand, .shared-account, .shared-upload-actions, .shared-request-actions, .shared-search-controls { display: flex; align-items: center; gap: 12px; }
.shared-brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: #193128; color: #f4f8f5; font-weight: 800; }
.shared-brand strong, .shared-brand small { display: block; }
.shared-brand strong { font-size: 15px; }
.shared-brand small, .shared-account { color: #66746b; font-size: 12px; }
.shared-main { width: min(980px, calc(100% - 36px)); margin: 0 auto; padding: 52px 0 80px; }
.shared-main-wide { width: min(1480px, calc(100% - 36px)); }
.shared-workspace-grid { display: grid; grid-template-columns: minmax(320px, 390px) minmax(0, 1fr); align-items: start; gap: 24px; }
.shared-workspace-rail { position: sticky; top: 18px; max-height: calc(100vh - 36px); overflow: hidden; }
.shared-workspace-rail .shared-records-card { display: flex; flex-direction: column; max-height: calc(100vh - 36px); margin: 0; }
.shared-workspace-rail .shared-search-copy h2 { font-size: 19px; }
.shared-workspace-rail .shared-stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shared-workspace-rail .shared-records-card > .shared-record-list { min-height: 0; overflow-y: auto; padding-right: 5px; overscroll-behavior: contain; }
.shared-workspace-rail .shared-record-summary { gap: 8px 12px; }
.shared-workspace-rail .shared-record-owner, .shared-workspace-rail .shared-record-time { white-space: normal; }
.shared-workspace-content { min-width: 0; }
.shared-workspace-grid [hidden] { display: none !important; }
.shared-workspace-content .shared-welcome { margin-bottom: 20px; }
.shared-selection-empty { display: flex; align-items: flex-start; gap: 16px; min-height: 188px; margin-top: 18px; padding: 30px 28px; border: 1px dashed #b8cdbd; border-radius: 16px; background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(242,248,243,.92)); }
.shared-selection-empty-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 13px; background: #e5f1e9; color: #2d735d; font-size: 25px; font-weight: 800; }
.shared-selection-empty h2 { margin: 7px 0 6px; color: #193128; font-size: 23px; letter-spacing: -.03em; }
.shared-selection-empty p { max-width: 560px; }
.shared-secondary-details { margin-top: 22px; border: 1px solid #d5e0d8; border-radius: 16px; background: rgba(255,255,255,.72); box-shadow: 0 12px 30px rgba(38,64,49,.05); }
.shared-secondary-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px; color: #193128; cursor: pointer; list-style: none; }
.shared-secondary-details > summary::-webkit-details-marker { display: none; }
.shared-secondary-details > summary::after { content: '+'; color: #2d735d; font-size: 23px; font-weight: 500; line-height: 1; }
.shared-secondary-details[open] > summary { border-bottom: 1px solid #e1e9e3; }
.shared-secondary-details .shared-kicker { margin-right: 8px; }

/* 左右两栏可切换工作区 */
.shared-tab-row { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.shared-tab-button { appearance: none; border: 1px solid #d5e0d8; background: rgba(255,255,255,.75); color: #3d4a41; padding: 7px 14px; border-radius: 999px; font: inherit; font-size: 13.5px; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.shared-tab-button:hover { border-color: #2d735d; color: #2d735d; }
.shared-tab-button.is-active { background: #193128; border-color: #193128; color: #fff; }
.shared-workspace-rail .shared-tab-row { margin-bottom: 10px; }

/* 客户查找面板 */
.shared-lookup-panel { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.shared-lookup-copy .shared-kicker { display: block; margin-bottom: 4px; }
.shared-lookup-copy h2 { margin: 0 0 2px; font-size: 17px; letter-spacing: -.02em; }
.shared-customer-lookup:empty { display: none; }
.shared-lookup-head { display: flex; flex-direction: column; gap: 2px; }
.shared-lookup-head strong { font-size: 15px; color: #193128; }
.shared-lookup-head small { color: #748078; font-size: 12px; word-break: break-all; }
.shared-operator-mount { min-width: 0; }
.shared-operator-mount .shared-workspace-rail { top: calc(var(--topbar-height) + 18px); }
.shared-operator-mount .shared-welcome h1 { font-size: clamp(30px, 3.3vw, 44px); }
.shared-operator-mount .shared-operator-form { scroll-margin-top: calc(var(--topbar-height) + 18px); }
.operator-server-mode .global-search,
.operator-server-mode .nav-item[data-view="orders"],
.operator-server-mode .nav-item[data-view="invoices"],
.operator-server-mode .nav-item[data-view="customers"],
.operator-server-mode .sidebar-bottom { display: none; }
.operator-server-mode .topbar-actions { flex-wrap: wrap; }
.shared-secondary-details[open] > summary::after { content: '−'; }
.shared-secondary-details > summary > span { display: grid; gap: 3px; }
.shared-secondary-details > summary strong { font-size: 16px; }
.shared-secondary-details > summary small { color: #748078; font-size: 12px; }
.shared-secondary-details .shared-ranking-card { margin: 0; padding: 20px; border: 0; border-radius: 0 0 16px 16px; box-shadow: none; background: transparent; }
.shared-date-filter-bar { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 11px 12px; border: 1px solid #dce6de; border-radius: 10px; background: #fbfdfb; }
.shared-date-filter-label { display: grid; gap: 5px; color: #52645a; font-size: 12px; font-weight: 700; }
.shared-date-filter { min-width: 170px; min-height: 38px; padding: 7px 30px 7px 10px; border: 1px solid #cddbd1; border-radius: 8px; background: #fff; color: #193128; font: inherit; }
.shared-date-filter-bar small { color: #748078; font-size: 12px; }
.shared-date-range { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.shared-date-range .shared-date-filter-label { flex: 1 1 130px; min-width: 0; }
.shared-date-range input.shared-date-filter { width: 100%; min-width: 0; min-height: 44px; padding: 7px 10px; }
.shared-date-range-separator { padding-bottom: 12px; color: #52645a; }
.shared-records-card .shared-date-filter-bar .shared-date-shortcuts { display: flex; flex-wrap: wrap; gap: 4px; grid-column: 1 / -1; width: 100%; }
.shared-date-shortcut { min-width: 44px; min-height: 44px; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #52645a; font: inherit; font-size: 13px; cursor: pointer; }
.shared-date-shortcut[aria-pressed="true"] { color: #fff; background: #176c6b; border-color: #176c6b; }
.shared-date-shortcut:focus-visible, .shared-date-calendar-button:focus-visible { outline: 2px solid #176c6b; outline-offset: 2px; }
.shared-date-input-wrap { display: flex; align-items: center; min-width: 0; border: 1px solid #cddbd1; border-radius: 8px; background: #fff; }
.shared-date-input-wrap:focus-within { outline: 2px solid #176c6b; outline-offset: 1px; }
.shared-date-range .shared-date-input-wrap input.shared-date-filter { border: 0; background: transparent; width: calc(100% - 44px); flex: 1; outline: none; cursor: pointer; padding-right: 2px; }
.shared-date-input-wrap input::-webkit-calendar-picker-indicator { display: none; }
.shared-date-calendar-button { flex: 0 0 44px; width: 44px; height: 44px; border: 0; border-radius: 7px; background: transparent; color: #176c6b; cursor: pointer; display: grid; place-items: center; font-size: 23px; }
.shared-date-calendar-button:hover { background: #edf5f3; }
.shared-date-filter-bar .shared-date-range-error { flex-basis: 100%; color: #9c2f2f; }
@media (max-width: 600px) {
  .shared-date-range { width: 100%; }
  .shared-date-range-separator { display: none; }
}
.shared-ranking-card { margin-bottom: 20px; padding: 20px; border: 1px solid #d5e0d8; border-radius: 16px; background: rgba(255,255,255,.91); box-shadow: 0 18px 45px rgba(38,64,49,.07); }
.shared-ranking-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.shared-ranking-head h2 { margin: 5px 0; color: #193128; font-size: 22px; }
.shared-ranking-filters { display: flex; align-items: flex-end; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.shared-ranking-filters .shared-field { min-width: 145px; margin-top: 0; }
.shared-ranking-filters input { min-height: 42px; padding: 8px 10px; border: 1px solid #cbd8cf; border-radius: 9px; background: #fff; color: #1f2924; font: inherit; }
.shared-ranking-filters .shared-button { min-height: 42px; }
.shared-ranking-table-wrap { margin-top: 15px; overflow-x: auto; border: 1px solid #dce6de; border-radius: 11px; }
.shared-ranking-table { width: 100%; min-width: 760px; border-collapse: collapse; background: #fff; }
.shared-ranking-table th, .shared-ranking-table td { padding: 12px 13px; border-bottom: 1px solid #e4ebe6; text-align: left; vertical-align: middle; }
.shared-ranking-table th { background: #f3f7f4; color: #607067; font-size: 12px; font-weight: 800; white-space: nowrap; }
.shared-ranking-table td { color: #26372f; font-size: 13px; overflow-wrap: anywhere; }
.shared-ranking-table td:nth-child(1) { width: 56px; color: #aa6236; font-weight: 850; }
.shared-ranking-table td:nth-child(4), .shared-ranking-table td:nth-child(5), .shared-ranking-table td:nth-child(6) { font-weight: 750; white-space: nowrap; }
.shared-ranking-table tbody tr:last-child td { border-bottom: 0; }
.shared-ranking-empty { height: 94px; color: #728078 !important; text-align: center !important; font-weight: 500 !important; }
.shared-date-group { display: grid; gap: 8px; }
.shared-date-group + .shared-date-group { margin-top: 18px; }
.shared-date-group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 2px; color: #52645a; }
.shared-date-group-head strong { color: #193128; font-size: 13px; }
.shared-date-group-head span { color: #8a958e; font-size: 12px; }
.shared-record-list-in-group { margin-top: 0; }
.shared-workspace-rail .shared-date-group + .shared-date-group { margin-top: 14px; }
.shared-welcome { max-width: 760px; margin-bottom: 26px; }
.shared-welcome h1, .shared-login-story h1 { margin: 8px 0 12px; color: #193128; font-size: clamp(32px, 5vw, 54px); letter-spacing: -.055em; line-height: 1.06; }
.shared-welcome p, .shared-login-story p { max-width: 640px; margin: 0; color: #66746b; font-size: 15px; line-height: 1.7; }
.shared-kicker { color: #aa6236; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.shared-howto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.shared-howto > div { display: flex; align-items: center; gap: 11px; padding: 14px; border: 1px solid #d9e2dc; border-radius: 12px; background: rgba(255,255,255,.68); }
.shared-howto b { color: #b66a3c; font-size: 20px; }
.shared-howto strong, .shared-howto small { display: block; }
.shared-howto small { margin-top: 3px; color: #748078; font-size: 12px; }
.shared-order-pool-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.shared-order-pool-toolbar .shared-status-note { flex: 1; min-width: 220px; margin: 0; }
.shared-order-pool-list { display: grid; gap: 8px; margin-top: 14px; }
.shared-order-pool-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 150px auto; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid #dce6de; border-radius: 10px; background: #fbfdfb; cursor: pointer; }
.shared-order-pool-row strong, .shared-order-pool-row small { display: block; }
.shared-order-pool-row small { color: #728078; font-size: 11px; }
.shared-order-pool-available { display: grid; gap: 2px; color: #193128; font-weight: 700; }
.shared-order-pool-available input { min-height: 38px !important; font-size: 14px !important; }
.shared-order-pool-row em { padding: 3px 7px; border-radius: 999px; background: #f4e8d3; color: #8a5c11; font-size: 11px; font-style: normal; font-weight: 700; }
.shared-order-pool-empty { padding: 14px; border: 1px dashed #cbd8cf; border-radius: 10px; color: #728078; font-size: 13px; }
.shared-new-order-actions { display: flex; justify-content: flex-start; margin: 14px 0; }
.shared-order-total { display: flex; justify-content: flex-end; margin-top: 14px; padding: 11px 13px; border: 1px solid #d8e3db; border-radius: 10px; background: #f5f9f6; color: #193128; font-size: 14px; font-weight: 800; }
.shared-new-order-list { display: grid; gap: 12px; margin-bottom: 18px; }
.shared-new-order-row { padding: 14px; border: 1px solid #dce6de; border-radius: 12px; background: #fbfdfb; }
.shared-new-order-row-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.shared-optional-details { margin-top: 16px; border: 1px solid #d8e3db; border-radius: 10px; background: #fbfdfb; }
.shared-optional-details summary { min-height: 46px; display: flex; align-items: center; padding: 0 14px; color: #254437; font-weight: 800; cursor: pointer; }
.shared-optional-details[open] summary { border-bottom: 1px solid #e1e9e3; }
.shared-optional-details > .shared-form-grid { padding: 0 14px 14px; }
.shared-confirmation-dialog { width: min(520px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 16px; background: #fff; color: #1f2924; box-shadow: 0 30px 90px rgba(18,39,29,.26); }
.shared-confirmation-dialog::backdrop { background: rgba(17,31,24,.52); backdrop-filter: blur(3px); }
.shared-confirmation-head { padding: 22px 22px 14px; }
.shared-confirmation-head h2 { margin: 6px 0 5px; color: #193128; font-size: 24px; }
.shared-confirmation-summary { display: grid; gap: 0; margin: 0 22px; border: 1px solid #d8e3db; border-radius: 12px; overflow: hidden; }
.shared-confirmation-summary > div { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 14px; padding: 12px 14px; border-bottom: 1px solid #e5ece7; }
.shared-confirmation-summary > div:last-child { border-bottom: 0; }
.shared-confirmation-summary dt { color: #728078; font-size: 13px; }
.shared-confirmation-summary dd { margin: 0; color: #193128; font-weight: 800; overflow-wrap: anywhere; }
.shared-confirmation-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 22px 22px; }
.shared-cancel-dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
.shared-cancel-dialog .shared-confirmation-summary dt { color: var(--ink-2); }
.shared-cancel-dialog .shared-button, .shared-cancel-request-button { min-height: 44px; min-width: 44px; }
.shared-button-danger { background: var(--danger-strong); border-color: var(--danger-strong); color: var(--ink-inverse); }
.shared-button-danger:hover { background: var(--danger); }
.shared-button-danger-soft { color: var(--danger-strong); border-color: var(--danger); background: var(--danger-soft); }
.shared-button-danger-soft:disabled { opacity: 1; color: var(--ink-2); background: var(--surface); border-color: var(--border); cursor: not-allowed; }
.shared-cancel-warning { margin: 16px 22px 0; padding: 14px; background: var(--warning-soft); color: var(--ink); border-radius: var(--radius-small); font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.shared-cancel-warning p + p { margin-top: 8px; }
.shared-cancel-note { margin: 12px 0; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.shared-status-pill.cancelled { color: var(--ink-2); background: var(--muted-soft); }
.shared-detail-top-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 640px) { .shared-order-pool-row { grid-template-columns: auto minmax(0, 1fr); } .shared-order-pool-available { grid-column: 2; } .shared-order-pool-row em { grid-column: 2; justify-self: start; } }

.shared-search-card, .shared-operator-form, .shared-request-card, .shared-upload-panel, .shared-order-pool-section { border: 1px solid #d5e0d8; border-radius: 16px; background: rgba(255,255,255,.91); box-shadow: 0 18px 45px rgba(38,64,49,.07); }
.shared-search-card { padding: 22px; }
.shared-search-copy h2, .shared-request-card h2, .shared-upload-panel h3, .shared-form-section h2 { margin: 6px 0 5px; color: #193128; font-size: 22px; letter-spacing: -.03em; }
.shared-muted { margin: 0; color: #728078; font-size: 13px; line-height: 1.55; }
.shared-search-controls { margin-top: 18px; }
.shared-search-controls input, .shared-field input, .shared-field textarea, .shared-field select { min-height: 46px; width: 100%; padding: 10px 12px; border: 1px solid #cbd8cf; border-radius: 9px; background: #fff; color: #1f2924; font-size: 16px; }
.shared-search-controls input { flex: 1; }
.shared-button { min-height: 46px; padding: 0 16px; border: 1px solid transparent; border-radius: 9px; font-weight: 750; }
.shared-button-primary { background: #193128; color: #f8fbf8; }
.shared-button-primary:hover { background: #2b4c3d; }
.shared-button-secondary { border-color: #b8c9bd; background: #edf4ee; color: #254437; }
.shared-button-quiet { border-color: #d3ddd6; background: transparent; color: #52645a; }
.shared-status-note { margin: 15px 0 0; color: #66746b; font-size: 13px; line-height: 1.5; }
.shared-status-note.is-error { color: #a3443d; }
.shared-status-note.is-success { color: #2b7861; }
.shared-status-note.is-loading { color: #a46732; }
.shared-result-slot { margin-top: 18px; }
.shared-request-card { padding: 22px; }
.shared-request-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.shared-status-pill { padding: 7px 10px; border-radius: 999px; background: #e8f1eb; color: #2d735d; font-size: 12px; font-weight: 750; white-space: nowrap; }
.shared-status-pill.sent_finance, .shared-status-pill.finance_processing { background: #fff0df; color: #9b5d2c; }
.shared-status-pill.issued { background: #f9e6e0; color: #a84d3d; }
.shared-request-summary { display: grid; grid-template-columns: 1.5fr .7fr 1.3fr; gap: 12px; margin: 20px 0; padding: 14px; border-radius: 10px; background: #f1f6f2; }
.shared-request-summary span, .shared-request-summary strong { display: block; }
.shared-request-summary span { color: #748078; font-size: 12px; }
.shared-request-summary strong { margin-top: 5px; overflow-wrap: anywhere; font-size: 14px; }
.shared-request-section { padding-top: 16px; border-top: 1px solid #e1e9e3; }
.shared-request-section h3 { margin: 0 0 10px; font-size: 14px; }
.shared-order-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.shared-order-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid #e1e9e3; border-radius: 9px; }
.shared-order-list strong, .shared-order-list small { display: block; }
.shared-order-list small { margin-top: 3px; color: #748078; font-size: 12px; }
.shared-request-actions { justify-content: space-between; margin-top: 18px; padding-top: 15px; border-top: 1px solid #e1e9e3; }
.shared-record-item.is-clickable { cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.shared-record-item.is-clickable:hover { border-color: #9ebfae; box-shadow: 0 12px 30px rgba(38,64,49,.1); transform: translateY(-1px); }
.shared-record-item.is-clickable:focus-visible { outline: 3px solid rgba(45,115,93,.22); outline-offset: 2px; }
.shared-record-artifact { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.shared-record-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.shared-view-inline { min-height: 36px; padding: 7px 11px; }
.shared-artifact-link { min-width: 0; overflow-wrap: anywhere; color: #2d735d; font-size: 13px; font-weight: 700; }
.shared-record-copy-area { min-width: 0; max-width: 100%; flex: 1 1 240px; display: grid; gap: 7px; }
.shared-record-artifact-primary { min-width: 0; max-width: 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.shared-copy-invoice-button { flex: 0 0 auto; min-width: 88px; min-height: 44px; padding: 8px 12px; color: #254437; background: #f7faf8; }
.shared-copy-invoice-button:hover { border-color: #8eae9c; background: #edf5f0; }
.shared-copy-invoice-button[aria-busy="true"] { cursor: progress; }
.shared-artifact-action-status { display: block; min-height: 0; color: #65776d; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.shared-artifact-action-status:empty { display: none; }
.shared-artifact-action-status.is-loading { color: #52645a; }
.shared-artifact-action-status.is-success { color: #2d735d; }
.shared-artifact-action-status.is-error { color: #a33b32; }
.shared-record-artifact-chooser { min-width: 0; display: grid; gap: 8px; padding: 9px; border: 1px solid #d5e0d8; border-radius: 9px; background: #f8faf8; }
.shared-record-artifact-chooser[hidden] { display: none; }
.shared-record-artifact-choice { min-width: 0; display: grid; gap: 5px; padding-bottom: 8px; border-bottom: 1px dashed #d5e0d8; }
.shared-record-artifact-choice:last-child { padding-bottom: 0; border-bottom: 0; }
.shared-records-card { margin-bottom: 18px; }
.shared-record-list { display: grid; gap: 12px; margin-top: 6px; }
.shared-record-item { padding: 15px 16px; border: 1px solid #e1e9e3; border-radius: 12px; background: #fff; }
.shared-record-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.shared-record-head h3 { margin: 3px 0 0; color: #193128; font-size: 18px; letter-spacing: -.02em; }
.shared-record-summary { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 10px; color: #52645a; font-size: 13px; }
.shared-record-title { font-weight: 700; color: #1f2924; overflow-wrap: anywhere; }
.shared-record-amount { font-weight: 750; color: #2d735d; white-space: nowrap; }
.shared-record-time { color: #8a958e; font-size: 12px; white-space: nowrap; }
.shared-record-artifact { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e1e9e3; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.shared-not-yet { color: #b66a3c; font-size: 13px; font-weight: 700; }
.shared-upload-inline { margin-left: auto; }
.shared-stats-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 16px 0 6px; }
.shared-stat { padding: 12px 14px; border: 1px solid #e1e9e3; border-radius: 12px; background: #fbfdfb; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.shared-stat strong { display: block; color: #193128; font-size: 24px; letter-spacing: -.03em; line-height: 1.1; }
.shared-stat span { display: block; margin-top: 4px; color: #748078; font-size: 12px; }
.shared-stat:hover { border-color: #b6ccc0; background: #f4faf6; transform: translateY(-1px); }
.shared-stat.is-active { border-color: #2d735d; background: #eef6f1; box-shadow: inset 0 0 0 1px #2d735d; }
.shared-stat.is-active strong, .shared-stat.is-active span { color: #2d735d; }
.shared-record-owner { color: #2d735d; font-size: 12px; font-weight: 800; white-space: nowrap; }
@media (max-width: 1100px) {
  .shared-main-wide { width: min(980px, calc(100% - 36px)); }
  .shared-workspace-grid { display: block; }
  .shared-workspace-rail { position: static; max-height: none; margin-bottom: 18px; overflow: visible; }
  .shared-workspace-rail .shared-records-card { max-height: none; }
  .shared-workspace-rail .shared-record-list { max-height: 520px; overflow-y: auto; }
  .shared-operator-mount .shared-workspace-grid { display: flex; flex-direction: column; }
  .shared-operator-mount .shared-workspace-content { order: 1; width: 100%; }
  .shared-operator-mount .shared-workspace-rail { order: 2; width: 100%; margin: 22px 0 0; }
}
@media (max-width: 860px) { .shared-stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .shared-ranking-head { align-items: stretch; flex-direction: column; }
  .shared-ranking-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
  .shared-ranking-filters .shared-field { min-width: 0; }
  .shared-ranking-filters .shared-button { grid-column: 1 / -1; width: 100%; }
  .shared-ranking-table-wrap { margin-right: -8px; }
  .shared-record-head, .shared-record-summary { align-items: flex-start; flex-direction: column; gap: 8px; }
  .shared-record-artifact { align-items: flex-start; flex-direction: column; }
  .shared-record-actions { width: 100%; justify-content: flex-start; }
  .shared-record-copy-area { width: 100%; flex: 0 1 auto; }
  .shared-record-artifact-primary { width: 100%; }
}
.shared-evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.shared-evidence-thumb { display: block; border: 1px solid #e1e9e3; border-radius: 9px; overflow: hidden; background: #f4f7f4; }
.shared-evidence-thumb img { display: block; width: 100%; height: 130px; object-fit: cover; transition: transform .18s ease; }
.shared-evidence-thumb:hover img { transform: scale(1.04); }
.shared-aicheck-section { border-top: 1px dashed #dce5df; }
.shared-aicheck { margin-top: 2px; }
.shared-aicheck-state { display: flex; flex-direction: column; gap: 7px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 1px solid #e1e9e3; background: #f8faf8; font-size: 14px; line-height: 1.55; }
.shared-aicheck-state.is-busy { flex-direction: row; align-items: center; color: #5b6b61; }
.shared-aicheck-state.is-ok { background: #eef7ef; border-color: #bfe3c6; }
.shared-aicheck-state.is-warn { background: #fdf6e8; border-color: #f0dcae; }
.shared-aicheck-state.is-error { background: #fdf0ef; border-color: #f0c3bf; }
.shared-aicheck-state.is-muted { color: #748078; }
.shared-aicheck-badge { font-weight: 700; color: #2f6b3a; }
.is-warn .shared-aicheck-badge { color: #a06a12; }
.shared-aicheck-reasons { margin: 0; padding-left: 18px; color: #7a4a0b; }
.shared-spinner { display: inline-block; width: 15px; height: 15px; border: 2px solid #cfe0d3; border-top-color: #2f6b3a; border-radius: 50%; animation: sharedSpin .7s linear infinite; }
@keyframes sharedSpin { to { transform: rotate(360deg); } }
.shared-detail-list { display: grid; gap: 9px; margin: 0; }
.shared-detail-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 12px; border: 1px solid #e1e9e3; border-radius: 9px; }
.shared-detail-list dt { color: #748078; font-size: 12px; flex: none; }
.shared-detail-list dd { margin: 0; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; text-align: right; }
.shared-requester-callout { display: flex; align-items: flex-start; gap: 11px; margin: 16px 0; padding: 13px 14px; border: 1px solid #bad1c3; border-radius: 11px; background: #eef6f1; }
.shared-requester-icon { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 30px; border-radius: 9px; background: #2d735d; color: #fff; font-size: 12px; font-weight: 850; }
.shared-requester-callout strong, .shared-requester-callout small { display: block; }
.shared-requester-callout strong { color: #193128; font-size: 14px; }
.shared-requester-callout small { margin-top: 3px; color: #52645a; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.shared-needs-info-callout { display: flex; align-items: flex-start; gap: 11px; margin: 14px 0; padding: 14px; border: 1px solid #efc68d; border-radius: 11px; background: #fff7e8; }
.shared-needs-info-callout.is-resolved { border-color: #bad1c3; background: #eef6f1; }
.shared-needs-info-mark { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 30px; border-radius: 9px; background: #b86824; color: #fff; font-weight: 850; }
.shared-needs-info-callout.is-resolved .shared-needs-info-mark { background: #2d735d; }
.shared-needs-info-callout strong, .shared-needs-info-callout p, .shared-needs-info-callout small { display: block; margin: 0; }
.shared-needs-info-callout p { margin-top: 4px; color: #573b22; line-height: 1.55; overflow-wrap: anywhere; }
.shared-needs-info-callout small { margin-top: 5px; color: #52645a; line-height: 1.5; }
.shared-button-warning { border-color: #c47b36; background: #fff5e8; color: #8a4d19; }
.shared-button-warning:hover, .shared-button-warning:focus-visible { border-color: #a55f20; background: #ffedd7; }
.shared-record-needs-info { margin-top: 9px; padding: 9px 10px; border-left: 3px solid #c47b36; border-radius: 4px 8px 8px 4px; background: #fff7e8; color: #74451e; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.shared-workflow-action { border: 1px solid #c9dbcf; border-radius: 12px; background: #f6faf7; }
.shared-workflow-action > .shared-button { margin-top: 12px; }
.shared-timeline-list { list-style: none; margin: 10px 0 0; padding: 0; }
.shared-timeline-item { position: relative; display: grid; grid-template-columns: 18px minmax(0,1fr); gap: 9px; padding: 0 0 18px; }
.shared-timeline-item:not(:last-child)::before { content: ''; position: absolute; left: 6px; top: 13px; bottom: 0; width: 2px; background: #dbe6de; }
.shared-timeline-dot { position: relative; z-index: 1; width: 14px; height: 14px; margin-top: 3px; border: 3px solid #e7f0ea; border-radius: 50%; background: #6c8f7c; }
.shared-timeline-item.is-current .shared-timeline-dot { border-color: #cce3d6; background: #2d735d; }
.shared-timeline-item strong, .shared-timeline-item small { display: block; }
.shared-timeline-item small { margin-top: 2px; color: #748078; font-size: 12px; }
.shared-timeline-item p { margin: 5px 0 0; padding: 7px 9px; border-radius: 7px; background: #f4f7f5; color: #4f5e55; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.shared-upload-panel { margin-top: 18px; padding: 22px; }
.shared-upload-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.shared-upload-preview { display: block; width: 100%; max-height: 260px; margin-top: 0; border: 1px solid #d5e0d8; border-radius: 10px; object-fit: contain; background: #f4f7f4; }
.shared-invoice-preview-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-top: 12px; }
.shared-invoice-preview-card { min-width: 0; display: grid; gap: 10px; padding: 12px; border: 1px solid #dbe6de; border-radius: 12px; background: #fff; }
.shared-invoice-preview-card .shared-field { margin-top: 0; }
.shared-invoice-preview-card > small { color: #748078; overflow-wrap: anywhere; }
.shared-invoice-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.shared-invoice-preview-head .shared-button { min-height: 36px; padding: 7px 10px; }
.shared-artifact-preview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 10px; }
.shared-artifact-preview-card { min-width: 0; overflow: hidden; display: grid; grid-template-rows: 150px auto; border: 1px solid #d5e2da; border-radius: 13px; background: #f7faf8; color: #193128; text-decoration: none; box-shadow: 0 8px 24px rgba(36,67,50,.07); transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.shared-artifact-preview-card:hover, .shared-artifact-preview-card:focus-visible { border-color: #2d735d; outline: 3px solid rgba(45,115,93,.15); transform: translateY(-2px); box-shadow: 0 13px 30px rgba(36,67,50,.12); }
.shared-artifact-preview-media { min-width: 0; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid #dce6df; background: #eef4f0; }
.shared-artifact-preview-media img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.shared-artifact-preview-fallback { padding: 18px; color: #6f7e75; text-align: center; font-size: 12px; line-height: 1.5; }
.shared-artifact-preview-copy { min-width: 0; display: grid; gap: 3px; padding: 11px 12px 12px; }
.shared-artifact-preview-copy small { color: #78867d; font-size: 11px; font-weight: 750; }
.shared-artifact-preview-copy strong { overflow-wrap: anywhere; color: #193128; font-size: 13px; }
.shared-artifact-preview-copy > span { color: #2d735d; font-size: 12px; font-weight: 750; }
.shared-artifact-preview-card.is-load-failed { grid-template-rows: 96px auto; }
.shared-invoice-result-section { padding: 16px; border: 1px solid #dce6df; border-radius: 13px; background: #fbfdfb; }
.shared-customer-lookup { display: grid; gap: 12px; }
.shared-company-choice { display: grid; gap: 12px; padding: 14px; border: 1px solid #dbe6de; border-radius: 13px; background: #fff; }
.shared-company-choice-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.shared-company-choice-head > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.shared-company-choice-head strong { color: #193128; font-size: 15px; }
.shared-company-choice-head small { color: #748078; overflow-wrap: anywhere; }
.shared-company-choice-head > span { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: #edf5f0; color: #2d735d; font-size: 11px; font-weight: 800; }
.shared-company-account-list { display: grid; gap: 7px; }
.shared-company-account-button { min-width: 0; min-height: 46px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid #d5e0d8; border-radius: 10px; background: #f8faf8; color: #193128; text-align: left; cursor: pointer; }
.shared-company-account-button:hover, .shared-company-account-button:focus-visible { border-color: #2d735d; background: #edf5f0; outline: 3px solid rgba(45,115,93,.14); }
.shared-company-account-button span { color: #748078; font-size: 11px; font-weight: 800; }
.shared-company-account-button strong { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.shared-company-account-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px; }
.shared-company-account-row > .shared-button { min-height: 44px; white-space: nowrap; }
.shared-lookup-section-title { margin: 16px 0 0; color: #243d37; font-size: 15px; }
.shared-invoice-history-slot:empty { display: none; }
.shared-invoice-history { display: grid; gap: 11px; min-width: 0; margin-top: 12px; padding: 13px; border: 1px solid #dbe6de; border-radius: 12px; background: #f8fbf9; }
.shared-invoice-history-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.shared-invoice-history-heading strong { color: #193128; font-size: 15px; }
.shared-invoice-history-heading small { color: #748078; font-size: 11px; }
.shared-invoice-history-profile-label { color: #748078; font-size: 11px; }
.shared-invoice-history-profiles { display: flex; flex-wrap: wrap; gap: 5px; }
.shared-invoice-history-profile { max-width: 100%; padding: 4px 8px; border-radius: 7px; background: #edf5f0; color: #40594c; font-size: 11px; overflow-wrap: anywhere; }
.shared-invoice-history-entity { display: grid; gap: 10px; min-width: 0; padding: 11px; border: 1px solid #dbe6de; border-radius: 10px; background: #fff; }
.shared-invoice-history-entity.is-unverified { border-color: #e7d5ae; background: #fffdf8; }
.shared-invoice-history-entity-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 12px; }
.shared-invoice-history-entity-head > div { display: grid; gap: 2px; min-width: 0; }
.shared-invoice-history-entity-head strong { color: #193128; font-size: 13px; overflow-wrap: anywhere; }
.shared-invoice-history-entity-head small { color: #748078; font-size: 10.5px; overflow-wrap: anywhere; }
.shared-invoice-history-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.shared-invoice-history-stats > div { display: grid; align-content: center; gap: 3px; min-width: 0; padding: 9px; border: 1px solid #e0e9e3; border-radius: 9px; background: #fff; }
.shared-invoice-history-stats small { color: #748078; font-size: 10px; line-height: 1.35; }
.shared-invoice-history-stats strong { color: #176c6b; font-size: 14px; overflow-wrap: anywhere; }
.shared-invoice-history-caveat { margin: 0; color: #6b6252; font-size: 11px; line-height: 1.5; }
.shared-invoice-history-caveat.is-warning { padding: 9px; border-radius: 8px; background: #fff2d2; color: #765322; }
.shared-invoice-history-list { display: grid; gap: 8px; max-height: 620px; overflow: auto; overscroll-behavior: contain; }
.shared-invoice-history-row { display: grid; gap: 8px; min-width: 0; padding: 11px; border: 1px solid #e0e9e3; border-radius: 10px; background: #fff; }
.shared-invoice-history-row-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.shared-invoice-history-row-head > strong { color: #193128; font-size: 13px; }
.shared-invoice-history-row-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: #66766d; font-size: 11px; }
.shared-invoice-history-documents { display: grid; gap: 5px; padding-top: 7px; border-top: 1px solid #edf1ee; }
.shared-invoice-history-document { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: #40594c; font-size: 11px; overflow-wrap: anywhere; }
.shared-invoice-history-document a { color: #176c6b; font-weight: 750; }
.shared-invoice-history-document em { padding: 2px 6px; border-radius: 999px; background: #fff2d2; color: #765322; font-size: 10px; font-style: normal; }
.shared-invoice-history-row .shared-status-pill.red_flushed { background: #f4e7e5; color: #8e4840; }
.shared-invoice-history-empty { margin: 0; padding: 12px; border-radius: 9px; background: #fff; color: #748078; font-size: 12px; line-height: 1.5; }
.shared-company-new-email { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; padding-top: 11px; border-top: 1px dashed #dbe6de; }
.shared-company-new-email .shared-field { margin-top: 0; }
.shared-company-email-note { grid-column: 1 / -1; color: #748078; line-height: 1.45; }
.shared-company-email-note.is-error { color: #a33b32; font-weight: 700; }
.shared-field { display: grid; gap: 7px; margin-top: 15px; color: #52645a; font-size: 13px; font-weight: 700; }
.shared-upload-actions { justify-content: flex-end; margin-top: 18px; }
.shared-operator-form { display: grid; gap: 20px; padding: 22px; }
.shared-form-section { padding-bottom: 20px; border-bottom: 1px solid #e1e9e3; }
.shared-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.shared-form-grid .shared-field:last-child { grid-column: 1 / -1; }
.shared-login-page { width: min(1100px, calc(100% - 36px)); min-height: 100vh; display: grid; grid-template-columns: 1fr 390px; align-items: center; gap: 70px; margin: 0 auto; padding: 50px 0; }
.shared-login-story { padding: 20px 0; }
.shared-login-steps { display: grid; gap: 13px; margin: 28px 0; padding: 0; list-style: none; }
.shared-login-steps li { display: flex; align-items: center; gap: 12px; }
.shared-login-steps b { color: #b66a3c; font-size: 12px; letter-spacing: .1em; }
.shared-login-steps strong, .shared-login-steps small { display: block; }
.shared-login-steps small { margin-top: 2px; color: #748078; font-size: 12px; }
.shared-login-footnote { padding-left: 12px; border-left: 3px solid #b66a3c; font-size: 13px !important; }
.shared-login-card { display: grid; gap: 8px; padding: 30px; border: 1px solid #d5e0d8; border-radius: 16px; background: #fff; box-shadow: 0 24px 70px rgba(38,64,49,.12); }
.shared-login-card h2 { margin: 7px 0 2px; color: #193128; font-size: 25px; letter-spacing: -.04em; }
.shared-login-card .shared-button { margin-top: 10px; }

@media (max-width: 760px) {
  .shared-invoice-history-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shared-company-account-row { grid-template-columns: minmax(0, 1fr); }
  .shared-company-account-row > .shared-button { width: 100%; }
  .shared-invoice-history-row-meta { display: grid; gap: 4px; }
  .shared-header { min-height: auto; align-items: flex-start; padding-top: 14px; padding-bottom: 14px; }
  .shared-account { align-items: flex-end; flex-direction: column; gap: 6px; text-align: right; }
  .shared-account > span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .shared-main { width: min(100% - 24px, 680px); padding: 30px 0 70px; }
  .shared-welcome h1, .shared-login-story h1 { font-size: 34px; }
  .shared-howto { grid-template-columns: 1fr; }
  .shared-search-controls, .shared-request-actions, .shared-upload-actions { align-items: stretch; flex-direction: column; }
  .shared-search-controls .shared-button, .shared-request-actions .shared-button, .shared-upload-actions .shared-button { width: 100%; }
  .shared-company-choice-head { align-items: stretch; flex-direction: column; }
  .shared-company-choice-head > span { align-self: flex-start; }
  .shared-company-new-email { grid-template-columns: 1fr; }
  .shared-company-new-email .shared-button { width: 100%; }
  .shared-artifact-preview-grid { grid-template-columns: 1fr; }
  .shared-artifact-preview-card { grid-template-rows: 190px auto; }
  .shared-request-summary, .shared-form-grid { grid-template-columns: 1fr; }
  .shared-confirmation-summary > div { grid-template-columns: 1fr; gap: 4px; }
  .shared-confirmation-actions { align-items: stretch; flex-direction: column-reverse; }
  .shared-confirmation-actions .shared-button { width: 100%; }
  .shared-login-page { width: min(100% - 24px, 560px); min-height: auto; grid-template-columns: 1fr; gap: 24px; padding: 28px 0 58px; }
  .shared-login-story { padding: 0 5px; }
  .shared-login-card { padding: 22px; }
  .shared-brand small { display: none; }
}


/* 申请工作台信息层级：公司、金额、状态、下一步优先 */
.shared-request-summary { grid-template-columns: minmax(0, 1.4fr) minmax(120px, .7fr) minmax(120px, .7fr) auto; align-items: center; border-left: 4px solid #2d735d; }
.shared-edit-top-button { min-height: 42px; justify-self: end; }
.shared-record-title { flex: 1 1 240px; font-size: 15px; }
.shared-record-amount { font-size: 15px; }
.shared-record-item { border-left: 4px solid #d5e0d8; }
.shared-record-item.is-clickable:hover { border-left-color: #2d735d; }
.shared-record-needs-info { background: #f7f9f7; border-left-color: #8a958e; color: #52645a; }
.shared-operator-board > .shared-request-scroll { max-height: calc(100vh - 360px); min-height: 280px; overflow-y: auto; padding-right: 6px; overscroll-behavior: contain; }
.shared-operator-board .shared-record-item { padding: 10px 12px; }
.shared-artifact-result-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 10px; }
.shared-artifact-result-head strong { color: #193128; font-size: 16px; }
.shared-artifact-result-head small { color: #748078; font-size: 12px; }
@media (max-width: 760px) { .shared-request-summary { grid-template-columns: 1fr 1fr; } .shared-edit-top-button { grid-column: 1 / -1; width: 100%; } }

/* 操作员电脑端：把“找申请、取发票”放在首屏，不让说明和统计挤掉列表 */
@media (min-width: 1101px) {
  .shared-operator-board { padding: 14px; }
  .shared-operator-board > .shared-search-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px; margin-bottom: 4px; }
  .shared-operator-board > .shared-search-copy .shared-kicker { grid-column: 1 / -1; }
  .shared-operator-board > .shared-search-copy h2 { margin: 2px 0; font-size: 16px; line-height: 1.2; }
  .shared-operator-board > .shared-search-copy p { display: none; }
  .shared-operator-board > .shared-search-copy .shared-button { grid-column: 2; grid-row: 2; min-height: 34px; padding: 0 10px; font-size: 12px; }
  .shared-operator-board > .shared-status-note { margin: 4px 0 6px; font-size: 12px; line-height: 1.3; }
  .shared-operator-board > .shared-date-filter-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 6px; padding: 6px 8px; }
  .shared-operator-board .shared-date-filter-label { gap: 2px; font-size: 10px; }
  .shared-operator-board .shared-date-filter { min-width: 0; min-height: 32px; padding: 4px 22px 4px 7px; font-size: 12px; }
  .shared-operator-board .shared-date-filter-bar small { display: none; }
  .shared-operator-board > .shared-stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin: 0 0 6px; }
  .shared-operator-board .shared-stat { padding: 6px 7px; border-radius: 8px; }
  .shared-operator-board .shared-stat strong { font-size: 17px; }
  .shared-operator-board .shared-stat span { margin-top: 1px; font-size: 10px; white-space: nowrap; }
  .shared-operator-board > .shared-request-scroll { height: calc(100vh - 226px); max-height: none; min-height: 420px; margin-top: 0; }
  .shared-operator-board .shared-date-group-head { padding: 3px 2px; }
  .shared-operator-board .shared-date-group + .shared-date-group { margin-top: 5px; }
  .shared-operator-board .shared-record-list-in-group { gap: 5px; }
  .shared-operator-board .shared-record-item { padding: 7px 9px; border-radius: 9px; }
  .shared-operator-board .shared-record-head h3 { font-size: 14px; }
  .shared-operator-board .shared-record-summary { gap: 5px 9px; margin-top: 4px; font-size: 12px; }
  .shared-operator-board .shared-record-artifact { margin-top: 5px; padding-top: 5px; }
}

@media (max-width: 1100px) {
  .shared-operator-board > .shared-request-scroll { max-height: 520px; }
}

/* ===== 2026-10-20 UI 重构：紧凑工作台 + 登记页左右分栏 ===== */
/* 1) 工作台页头做减法：标题收紧，说明文字变小，空间还给业务内容 */
.shared-workspace-content .shared-welcome { margin-bottom: 12px; max-width: none; }
.shared-workspace-content .shared-welcome h1 {
  margin: 2px 0 6px;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.15;
  letter-spacing: -.02em;
}
.shared-workspace-content .shared-welcome p { font-size: 13px; line-height: 1.55; }

/* 2) 左栏看板紧凑化（财务团队总览 + 操作员队列）：表格化行卡片 */
.shared-workspace-rail .shared-stats-row { gap: 8px; margin: 12px 0 4px; }
.shared-workspace-rail .shared-stat { padding: 7px 10px; border-radius: 9px; }
.shared-workspace-rail .shared-stat strong { font-size: 17px; }
.shared-workspace-rail .shared-stat span { margin-top: 2px; font-size: 10.5px; }
.shared-workspace-rail .shared-record-list { gap: 6px; }
.shared-workspace-rail .shared-date-group { gap: 6px; }
.shared-workspace-rail .shared-date-group + .shared-date-group { margin-top: 12px; }
.shared-workspace-rail .shared-date-group-head { padding: 2px 2px 0; }
.shared-workspace-rail .shared-date-group-head strong { font-size: 11.5px; }
.shared-workspace-rail .shared-date-group-head span { font-size: 11px; }
.shared-workspace-rail .shared-record-item {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 8px 11px;
  border: 1px solid #e3eae5;
  border-left: 3px solid #d8e3db;
  border-radius: 9px;
  background: #fbfdfb;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.shared-workspace-rail .shared-record-item.is-clickable { cursor: pointer; }
.shared-workspace-rail .shared-record-item.is-clickable:hover {
  border-color: #b6ccc0;
  border-left-color: #2d735d;
  background: #f4faf6;
  transform: translateY(-1px);
}
.shared-workspace-rail .shared-record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.shared-workspace-rail .shared-record-head > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.shared-workspace-rail .shared-record-head .shared-kicker { display: none; }
.shared-workspace-rail .shared-record-head h3 {
  margin: 0;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.shared-workspace-rail .shared-status-pill { padding: 2px 8px; font-size: 10.5px; }
.shared-workspace-rail .shared-record-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
}
.shared-workspace-rail .shared-record-title {
  flex: 1 1 100%;
  font-size: 13px;
  font-weight: 700;
  color: #193128;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shared-workspace-rail .shared-record-amount { font-size: 12px; font-weight: 800; color: #193128; }
.shared-workspace-rail .shared-record-owner,
.shared-workspace-rail .shared-record-time { font-size: 11px; color: #748078; }
.shared-workspace-rail .shared-record-artifact { font-size: 11px; }
.shared-workspace-rail .shared-record-artifact .shared-artifact-link,
.shared-workspace-rail .shared-record-artifact .shared-muted { font-size: 11px; }
.shared-workspace-rail .shared-record-actions { display: flex; gap: 6px; margin-top: 4px; }
.shared-workspace-rail .shared-record-actions .shared-button { padding: 4px 10px; font-size: 11.5px; }
.shared-workspace-rail .shared-record-needs-info,
.shared-workspace-rail .shared-status-note { font-size: 11px; }

/* 3) 登记申请页：左原始资料 / 右核对填写，底部固定合计与提交 */
.intake-columns {
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.intake-left {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  display: grid;
  gap: 12px;
  align-content: start;
  padding-right: 2px;
  overscroll-behavior: contain;
}
.intake-left .shared-form-section { border-bottom: 0; padding-bottom: 0; }
.intake-right { display: grid; gap: 14px; min-width: 0; }
.intake-right .shared-form-section { border-bottom: 0; padding-bottom: 0; }
.intake-sticky-bar {
  position: sticky;
  bottom: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
  padding: 10px 14px;
  border: 1px solid #d8e3db;
  border-radius: 12px;
  background: rgba(251, 253, 251, .97);
  box-shadow: 0 -10px 28px rgba(38, 64, 49, .10);
  backdrop-filter: blur(6px);
}
.intake-sticky-bar .shared-order-total {
  flex: 1;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  justify-content: flex-start;
  font-size: 15px;
}
.intake-sticky-bar .shared-button-primary { min-width: 168px; }
@media (max-width: 1100px) {
  .intake-columns { grid-template-columns: minmax(0, 1fr); }
  .intake-left { position: static; max-height: none; overflow: visible; }
  .intake-sticky-bar { flex-wrap: wrap; }
  .intake-sticky-bar .shared-button-primary { flex: 1; }
}

/* One task per surface: intake and overview no longer compete for width. */
.shared-operator-workspace [hidden] { display: none !important; }
.shared-operator-workspace { min-width: 0; }
.operator-server-mode { --sidebar-width: 190px; }
.operator-server-mode .page-heading h1 { font-size: 18px; }
.shared-operator-mount .shared-welcome h1 { font-size: 26px; letter-spacing: -.02em; }
.shared-operator-workspace .shared-welcome { display: none; }
.shared-operator-workspace .shared-tab-row { padding-bottom: 12px; margin-bottom: 0; gap: 8px; }
.shared-tab-button { min-height: 44px; border-radius: 9px; }
.shared-operator-workspace .shared-operator-form { padding: 0; gap: 0; border: 0; box-shadow: none; background: transparent; }
.intake-columns { grid-template-columns: minmax(280px, .9fr) minmax(0, 1.2fr); align-items: stretch; gap: 20px; }
.intake-left, .intake-right { padding: 20px; border: 1px solid #d5e0d8; border-radius: 14px; background: #fbfcfa; }
.intake-left { position: static; max-height: none; overflow: visible; }
.intake-left .shared-form-section, .intake-right .shared-form-section { min-width: 0; }
.intake-columns .shared-form-section h2 { font-size: 18px; line-height: 1.4; }
.intake-columns .shared-form-section > .shared-muted { font-size: 12px; margin-bottom: 8px; }
.intake-left .recognizer-heading { flex-wrap: wrap; }
.intake-left .recognizer-heading p { font-size: 13px; max-width: none; }
.intake-left .screenshot-dropzone { min-height: 130px; }
.intake-left .screenshot-dropzone strong { font-size: 14px; }
.intake-left .screenshot-dropzone small, .intake-left .recognizer-status, .intake-left .recognizer-safety { font-size: 12px; }
.intake-left .recognizer-actions { flex-wrap: wrap; }
.intake-left .recognizer-actions > span { font-size: 12px; }
.intake-left .recognition-result { grid-template-columns: 28px minmax(0, 1fr); }
.intake-left .recognition-result .button { grid-column: 1 / -1; }
.intake-right { gap: 18px; }
.intake-right .shared-field { margin-top: 10px; }
.intake-right .shared-form-grid { gap: 8px 14px; }
.intake-right .shared-form-grid > .shared-field:last-child { grid-column: auto; }
.intake-left .screenshot-recognizer { padding: 0; border: 0; background: transparent; box-shadow: none; overflow: visible; }
.intake-columns input, .intake-columns select, .intake-columns textarea { font-family: var(--font); font-weight: 400; }
.intake-columns input::placeholder, .intake-columns textarea::placeholder { font-weight: 400; color: #65776d; }
.intake-sticky-bar .shared-order-total { align-items: center; gap: 12px; }
.intake-sticky-bar .shared-order-total strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.intake-left, .intake-right, .shared-request-scroll, .shared-result-slot { scrollbar-width: thin; scrollbar-color: #a7bdb0 transparent; }
.intake-left::after, .intake-right::after { content: '可在本栏继续向下滚动'; display: block; margin-top: 12px; font-size: 12px; color: #52645a; }
.intake-right .shared-order-pool-section { box-shadow: none; padding: 14px; background: #f2f6f3; }
.intake-sticky-bar { border-radius: 0 0 14px 14px; background: #fbfcfa; box-shadow: 0 -3px 14px #1931280a; margin-top: 12px; min-height: 70px; }
.intake-sticky-bar .shared-order-total { color: #254437; }
.shared-operator-workspace .shared-secondary-details { margin-top: 16px; box-shadow: none; }
.shared-overview-board { padding: 18px; box-shadow: none; }
.shared-overview-board .shared-search-copy h2 { font-size: 20px; }
.shared-overview-board .shared-stats-row { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.shared-overview-board .shared-stat { min-height: 54px; padding: 9px 12px; }
.shared-overview-board .shared-stat strong { font-size: 19px; }
.shared-overview-board .shared-date-filter-bar { background: transparent; padding: 0; border: 0; }
.shared-overview-board > .shared-request-scroll { max-height: 62vh; overflow-y: auto; overscroll-behavior: contain; }
.shared-overview-columns { display: grid; grid-template-columns: minmax(180px, 2fr) 100px 90px 120px 100px 140px 150px; gap: 10px; padding: 13px 12px 8px; font-size: 12px; color: #52645a; border-bottom: 1px solid #d5e0d8; }
@media (min-width: 1250px) {
  .shared-overview-board .shared-record-list { gap: 0; }
  .shared-overview-board .shared-record-item { display: grid; grid-template-columns: minmax(180px, 2fr) 100px 90px 120px 100px 140px 150px; grid-template-rows: auto auto; align-items: center; gap: 2px 10px; border: 0; border-bottom: 1px solid #e1e9e3; border-radius: 0; padding: 12px; box-shadow: none; }
  .shared-overview-board .shared-record-item:hover { transform: none; background: #f2f6f3; }
  .shared-overview-board .shared-record-head, .shared-overview-board .shared-record-summary { display: contents; }
  .shared-overview-board .shared-record-head > div { grid-column: 1; grid-row: 2; }
  .shared-overview-board .shared-record-head .shared-kicker { display: none; }
  .shared-overview-board .shared-record-head h3 { margin: 0; font-size: 12px; color: #65776d; font-weight: 500; }
  .shared-overview-board .shared-record-title { grid-column: 1; grid-row: 1; font-size: 14px; }
  .shared-overview-board .shared-invoice-type { grid-column: 2; grid-row: 1 / 3; white-space: normal; background: transparent; padding: 0; }
  .shared-overview-board .shared-record-head > .shared-status-pill { grid-column: 3; grid-row: 1 / 3; justify-self: start; padding: 4px 8px; }
  .shared-overview-board .shared-record-amount { grid-column: 4; grid-row: 1 / 3; white-space: normal; font-size: 13px; }
  .shared-overview-board .shared-record-owner { grid-column: 5; grid-row: 1 / 3; white-space: normal; font-size: 12px; }
  .shared-overview-board .shared-record-time { grid-column: 6; grid-row: 1 / 3; white-space: normal; font-size: 12px; }
  .shared-overview-board .shared-record-artifact { grid-column: 7; grid-row: 1 / 3; margin: 0; padding: 0; border: 0; gap: 4px; font-size: 12px; }
  .shared-overview-board .shared-record-artifact > .shared-not-yet { display: none; }
  .shared-overview-board .shared-record-needs-info { grid-column: 1 / -1; grid-row: 3; font-size: 12px; }
}
@media (max-width: 1249px) {
  .shared-overview-columns { display: none; }
  .shared-overview-board .shared-record-item { padding: 12px; }
}
/* Finance: compact queue; current request owns the working area. */
.shared-finance-mount .shared-main, .shared-mode .shared-main { padding-top: 24px; }
.shared-workspace-rail .shared-search-copy h2 { font-size: 17px; line-height: 1.4; }
.shared-workspace-rail .shared-search-copy > .shared-muted, .shared-workspace-rail .shared-date-filter-bar small { display: none; }
.shared-workspace-rail .shared-search-card { padding: 16px; box-shadow: none; }
.shared-workspace-rail .shared-stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shared-workspace-rail .shared-stat { min-height: 52px; }
.shared-workspace-rail .shared-date-filter-bar { padding: 0; background: transparent; border: 0; gap: 8px; }
.shared-workspace-rail .shared-date-filter-label { min-width: 0; flex: 1; }
.shared-workspace-rail .shared-date-filter { min-width: 0; width: 100%; font-size: 12px; min-height: 44px; }
.shared-workspace-rail .shared-record-item { flex-shrink: 0; }
.shared-workspace-rail .shared-record-summary { margin-top: 4px; }
.shared-workspace-rail .shared-record-artifact { margin-top: 4px; padding-top: 4px; }
.shared-workspace-rail .shared-record-actions { display: none; }
.shared-workspace-rail .shared-record-artifact:has(.shared-not-yet) { display: none; }
.shared-workspace-rail .shared-record-owner::before { content: '申请人 '; color: #65776d; }
.shared-workspace-rail .shared-search-copy h2::after { content: ' · 点击单据处理'; font-size: 12px; font-weight: 400; color: #52645a; }
.shared-workspace-rail .shared-record-item { padding: 10px 11px; }
.shared-workspace-rail .shared-record-summary { gap: 4px 9px; }
.shared-record-item[aria-current="true"] { border-color: #2d735d; background: #eaf3ed; box-shadow: inset 3px 0 #2d735d; }
.shared-workspace-content .shared-request-card { box-shadow: none; }
.shared-workspace-content .shared-request-actions { position: sticky; bottom: 0; z-index: 2; padding: 12px; margin: 14px -8px -8px; border: 1px solid #d5e0d8; border-radius: 10px; background: #fbfcfa; }
.shared-workspace-content .shared-upload-panel { padding: 18px; box-shadow: none; }
.shared-workspace-rail .shared-record-owner, .shared-workspace-rail .shared-record-time { color: #52645a; font-size: 12px; }
.shared-workspace-rail .shared-record-head h3 { font-size: 13px; }
@media (min-width: 1101px) {
  .shared-operator-workspace .shared-operator-form { height: calc(100dvh - var(--topbar-height) - 134px); min-height: 0; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; }
  .intake-columns { height: auto; min-height: 0; }
  .intake-left, .intake-right { overflow-y: auto; min-height: 0; overscroll-behavior: contain; align-content: start; }
  .intake-sticky-bar { position: static; margin-top: 0; }
  .shared-workspace-rail .shared-records-card { height: calc(100dvh - 146px); min-height: 500px; }
  .shared-workspace-rail .shared-records-card > .shared-request-scroll { flex: 1; max-height: none; }
  .shared-workspace-grid > .shared-workspace-content { height: calc(100dvh - 146px); min-height: 500px; display: flex; flex-direction: column; }
  .shared-workspace-grid > .shared-workspace-content > .shared-result-slot { flex: 1; min-height: 0; overflow-y: auto; margin-top: 0; }
  .shared-workspace-grid > .shared-workspace-content > .shared-upload-panel { flex: 1; min-height: 0; overflow-y: auto; margin-top: 10px; }
  .shared-workspace-grid > .shared-workspace-content > .shared-secondary-details { flex-shrink: 0; margin-top: 10px; }
  .shared-workspace-grid > .shared-workspace-content > .shared-secondary-details[open] { max-height: 45vh; overflow-y: auto; }
}
@media (max-width: 1100px) {
  .intake-columns { grid-template-columns: minmax(0, 1fr); }
  .intake-left, .intake-right { padding: 16px; }
  .shared-operator-workspace .shared-overview-board > .shared-request-scroll { max-height: 65vh; }
}
@media (max-width: 640px) {
  .shared-header { padding: 12px 16px; gap: 10px; flex-wrap: wrap; }
  .shared-account { flex-wrap: wrap; }
  .shared-main { width: calc(100% - 24px); }
  .intake-columns .shared-form-grid { grid-template-columns: minmax(0, 1fr); }
  .intake-sticky-bar { padding: 10px; gap: 10px; bottom: env(safe-area-inset-bottom, 0px); }
  .intake-sticky-bar .shared-button-primary { width: 100%; min-width: 0; }
  .intake-sticky-bar .shared-order-total { font-size: 14px; }
  .shared-overview-board .shared-stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shared-overview-board .shared-record-head { flex-direction: row; }
  .shared-overview-board .shared-record-summary { gap: 6px; }
  .shared-overview-board .shared-record-summary > span { overflow-wrap: anywhere; white-space: normal; }
  .shared-workspace-content .shared-request-actions { flex-wrap: wrap; }
  .shared-workspace-content .shared-request-actions > .shared-button { min-height: 44px; flex: 1; }
  .shared-workspace-rail .shared-record-actions .shared-button { min-height: 44px; }
  .shared-field input, .shared-field textarea, .shared-field select { min-width: 0; }
}

/* Shared typography: real 400/500/600 weights, calm headings, readable data. */
body { font-synthesis: none; }
:is(.operator-server-mode, .shared-mode) :is(h1, h2, h3) {
  font-weight: var(--type-semibold);
  letter-spacing: 0;
  line-height: 1.45;
}
:is(.operator-server-mode, .shared-mode) strong { font-weight: var(--type-semibold); }
.operator-server-mode .page-heading h1 { font-size: 20px; }
.operator-server-mode .page-heading > span { font-size: 12px; font-weight: var(--type-medium); letter-spacing: .02em; }
.shared-workspace-content .shared-welcome h1 { font-size: 24px; font-weight: var(--type-semibold); line-height: 1.45; letter-spacing: 0; }
.shared-workspace-content .shared-welcome p { font-size: 14px; line-height: 1.65; }
.shared-kicker, .shared-date-filter-label { font-size: 12px; font-weight: var(--type-medium); letter-spacing: .02em; }
.shared-tab-button, .shared-button, .button { font-size: 14px; font-weight: var(--type-medium); line-height: 1.5; }
.shared-field > span { font-size: 14px; font-weight: var(--type-medium); line-height: 1.6; }
.shared-field :is(input, select, textarea), .shared-search-controls input { font-size: 15px; font-weight: var(--type-regular); line-height: 1.6; }
.shared-field :is(input, textarea)::placeholder { color: #65776d; font-size: inherit; font-weight: var(--type-regular); }
.intake-columns .shared-form-section h2 { font-size: 18px; font-weight: var(--type-semibold); letter-spacing: 0; }
.intake-columns .shared-form-section > .shared-muted,
.intake-left .recognizer-heading p, .intake-left .screenshot-dropzone small,
.intake-left .recognizer-status, .intake-left .recognizer-safety,
.intake-left .recognizer-actions > span { font-size: 13px; line-height: 1.65; }
.intake-left .screenshot-dropzone strong { font-size: 15px; font-weight: var(--type-medium); }
.shared-workspace-rail .shared-search-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; }
.shared-workspace-rail .shared-search-copy > .shared-kicker { grid-column: 1; grid-row: 1; }
.shared-workspace-rail .shared-search-copy > h2 { grid-column: 1; grid-row: 2; }
.shared-workspace-rail .shared-search-copy > .shared-button { grid-column: 2; grid-row: 1 / 3; margin: 0; }
.shared-workspace-rail .shared-search-copy h2::after { content: none; }
.shared-workspace-rail .shared-record-head h3 { font-size: 12px; font-weight: var(--type-regular); color: #52645a; letter-spacing: 0; }
.shared-workspace-rail .shared-record-title { font-size: 14px; font-weight: var(--type-medium); line-height: 1.6; }
.shared-workspace-rail .shared-record-amount { font-size: 14px; font-weight: var(--type-semibold); }
.shared-record-owner, .shared-workspace-rail .shared-record-owner { font-weight: var(--type-regular); }
.shared-workspace-rail .shared-stat span, .shared-workspace-rail .shared-status-pill { font-size: 12px; font-weight: var(--type-medium); }
.shared-workspace-rail .shared-record-time { line-height: 1.6; }
.shared-overview-board .shared-record-title { font-size: 14px; font-weight: var(--type-medium); }
.shared-record-artifact .shared-artifact-link { font-size: 13px; font-weight: var(--type-medium); }
.shared-request-card h2 { font-size: 22px; font-weight: var(--type-semibold); letter-spacing: 0; }
.shared-detail-list dt { font-size: 13px; color: #52645a; line-height: 1.6; }
.shared-detail-list dd { font-size: 14px; font-weight: var(--type-medium); line-height: 1.6; }
.shared-request-section h3 { font-size: 15px; font-weight: var(--type-medium); }
.shared-request-summary strong { font-size: 15px; font-weight: var(--type-medium); }
.shared-muted, .shared-status-note { line-height: 1.65; }
:is(.shared-record-amount, .shared-stat strong, .shared-order-total strong, .shared-request-summary strong, input[type="number"]) { font-variant-numeric: tabular-nums lining-nums; }
.intake-sticky-bar .shared-order-total strong { font-size: 24px; font-weight: var(--type-semibold); letter-spacing: 0; }
@media (max-width: 640px) {
  .shared-field :is(input, select, textarea), .shared-search-controls input { font-size: 16px; }
  .shared-workspace-content .shared-welcome h1 { font-size: 22px; }
}

/* Date-range controls override legacy compact-board small-text hiding. */
.shared-records-card .shared-date-filter-bar .shared-date-range { grid-column: 1 / -1; }
.shared-records-card .shared-date-filter-bar .shared-date-range-error:not([hidden]),
.shared-records-card .shared-date-filter-bar .shared-date-range-hint { display: block; grid-column: 1 / -1; }

/* UI refresh release 2026-10
   Production-only shell and shared workspaces. The localhost prototype keeps its
   original layout and data behavior. */
[hidden] { display: none !important; }

html[data-ui-release="invoice-refresh-2026-10"] {
  color-scheme: light;
  background: #f3f6f4;
}
html[data-ui-release="invoice-refresh-2026-10"] body {
  background: #f3f6f4;
}
html[data-ui-release="invoice-refresh-2026-10"] :is(button, a, summary, [role="button"]) {
  touch-action: manipulation;
}
html[data-ui-release="invoice-refresh-2026-10"] :is(.shared-kicker, .section-kicker) {
  color: #176c6b;
  letter-spacing: .06em;
}
html[data-ui-release="invoice-refresh-2026-10"] :is(.shared-button-primary, .button.primary) {
  border-color: #176c6b;
  background: #176c6b;
  color: #fcfefd;
}
html[data-ui-release="invoice-refresh-2026-10"] :is(.shared-button-primary, .button.primary):hover {
  border-color: #115451;
  background: #115451;
}
html[data-ui-release="invoice-refresh-2026-10"] .shared-app-shell {
  background: #f3f6f4;
}
html[data-ui-release="invoice-refresh-2026-10"] .shared-header {
  min-height: 64px;
  border-color: #d8e2dd;
  background: rgba(252, 254, 253, .96);
  backdrop-filter: blur(10px);
}
html[data-ui-release="invoice-refresh-2026-10"] :is(.shared-search-card, .shared-operator-form, .shared-request-card, .shared-upload-panel, .shared-order-pool-section, .shared-login-card) {
  border-color: #d8e2dd;
  border-radius: 12px;
  background: #fcfefd;
  box-shadow: 0 8px 24px rgba(24, 52, 42, .055);
}
html[data-ui-release="invoice-refresh-2026-10"] :is(.shared-brand-mark, .brand-mark) {
  position: relative;
  overflow: visible;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  box-shadow: none;
}
html[data-ui-release="invoice-refresh-2026-10"] :is(.shared-brand-mark, .brand-mark)::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 11px;
  height: 11px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  background: inherit;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

/* Public operator: compact horizontal navigation for shared-data business views. */
.operator-server-mode.ui-refresh-release {
  --topbar-height: 62px;
  --page: #f3f6f4;
  --surface: #fcfefd;
  --surface-soft: #e7eeeb;
  --accent: #176c6b;
  --accent-strong: #115451;
  --accent-soft: #e2efec;
  --ink-1: #22332f;
  --ink-2: #40534d;
  --ink-3: #586b65;
  --border: rgba(34, 51, 47, .11);
  --border-strong: rgba(34, 51, 47, .2);
}
.operator-server-mode.ui-refresh-release .app-shell {
  display: block;
  min-width: 0;
}
.operator-server-mode.ui-refresh-release .sidebar {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  height: auto;
  min-height: 60px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 8px clamp(14px, 2.5vw, 36px);
  border: 0;
  border-bottom: 1px solid #29443a;
  background: #20352e;
  color: #cbddd3;
  clip-path: none;
  visibility: visible;
  pointer-events: auto;
  box-shadow: none;
  transition: none;
}
.operator-server-mode.ui-refresh-release .brand {
  gap: 9px;
  min-width: max-content;
  padding: 0;
}
.operator-server-mode.ui-refresh-release .brand-mark {
  width: 30px;
  height: 34px;
  border-color: #eff7f3;
  border-radius: 3px;
  background: #20352e;
  color: #eff7f3;
  font-size: 14px;
}
.operator-server-mode.ui-refresh-release .brand strong { font-size: 15px; }
.operator-server-mode.ui-refresh-release .brand span { margin: 0; color: #9fc4b3; font-size: 10px; }
.operator-server-mode.ui-refresh-release .server-primary-nav,
.operator-server-mode.ui-refresh-release .server-secondary-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.operator-server-mode.ui-refresh-release .server-primary-nav {
  padding-left: 12px;
  border-left: 1px solid #385b4c;
}
.operator-server-mode.ui-refresh-release .server-nav-action,
.operator-server-mode.ui-refresh-release .server-secondary-nav .nav-item {
  width: auto;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cbddd3;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.operator-server-mode.ui-refresh-release .server-nav-action:hover,
.operator-server-mode.ui-refresh-release .server-secondary-nav .nav-item:hover {
  background: #29443a;
  color: #fff;
}
.operator-server-mode.ui-refresh-release .server-nav-action[aria-current="page"],
.operator-server-mode.ui-refresh-release .server-secondary-nav .nav-item.is-active {
  background: #355549;
  color: #fff;
  box-shadow: inset 0 -2px #8ac5b1;
}
.operator-server-mode.ui-refresh-release .server-secondary-nav {
  justify-content: flex-end;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}
.operator-server-mode.ui-refresh-release .server-secondary-nav .nav-item {
  display: inline-flex;
  flex: 0 0 auto;
}
.operator-server-mode.ui-refresh-release .server-secondary-nav .nav-item:is([data-view="orders"], [data-view="invoices"], [data-view="customers"]) { display: none; }
.operator-server-mode.ui-refresh-release .server-secondary-nav .nav-item > span:first-child {
  display: none;
}
.operator-server-mode.ui-refresh-release .topbar {
  top: 60px;
  min-height: var(--topbar-height);
  gap: 16px;
  padding: 8px clamp(14px, 2.5vw, 36px);
  border-color: #d8e2dd;
  background: rgba(243, 246, 244, .96);
}
.operator-server-mode.ui-refresh-release .page-heading { min-width: 190px; }
.operator-server-mode.ui-refresh-release .page-heading h1 { margin-top: 0; font-size: 17px; }
.operator-server-mode.ui-refresh-release .topbar-actions { flex-wrap: nowrap; }
.operator-server-mode.ui-refresh-release #main {
  width: 100%;
  min-width: 0;
  padding: 16px clamp(14px, 2.5vw, 36px) 48px;
}
.operator-server-mode.ui-refresh-release #dashboardView { min-width: 0; }
.operator-server-mode.ui-refresh-release .shared-operator-mount { width: 100%; }
.operator-server-mode.ui-refresh-release .shared-operator-workspace .shared-tab-row {
  gap: 4px;
  padding: 0 0 12px;
}
.operator-server-mode.ui-refresh-release .shared-tab-button {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  background: transparent;
}
.operator-server-mode.ui-refresh-release .shared-tab-button.is-active {
  border-color: #b4c6be;
  background: #fcfefd;
  color: #22332f;
  box-shadow: inset 0 -2px #176c6b;
}

/* Intake: source and recognition remain beside customer, invoice and amount editing. */
.operator-server-mode.ui-refresh-release .intake-columns {
  grid-template-columns: minmax(300px, .86fr) minmax(0, 1.14fr);
  gap: 16px;
}
.operator-server-mode.ui-refresh-release :is(.intake-left, .intake-right) {
  border-color: #d8e2dd;
  border-radius: 11px;
  background: #fcfefd;
}
.operator-server-mode.ui-refresh-release .intake-left::after,
.operator-server-mode.ui-refresh-release .intake-right::after { content: none; }
.operator-server-mode.ui-refresh-release .intake-sticky-bar {
  border-color: #b4c6be;
  background: rgba(252, 254, 253, .98);
  box-shadow: 0 -8px 22px rgba(24, 52, 42, .08);
}
.operator-server-mode.ui-refresh-release .intake-sticky-bar .shared-order-total strong { color: #176c6b; }

/* Queue master-detail: one route, one set of filters, one in-place detail pane. */
.shared-queue-workspace {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(330px, .78fr) minmax(420px, 1.22fr);
  align-items: stretch;
  gap: 16px;
}
.shared-queue-master,
.shared-queue-detail {
  min-width: 0;
  height: calc(100dvh - 222px);
  min-height: 520px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #d8e2dd;
  border-radius: 11px;
  background: #fcfefd;
}
.shared-queue-master {
  display: flex;
  flex-direction: column;
  padding: 14px;
}
.shared-queue-master > .shared-request-scroll {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.shared-queue-master .shared-overview-columns { display: none; }
.shared-queue-master > .shared-search-copy h2 { font-size: 17px; }
.shared-queue-master > .shared-search-copy p { display: none; }
.shared-queue-master > .shared-stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shared-queue-master .shared-stat { min-height: 52px; padding: 7px 9px; }
.shared-queue-master .shared-stat strong { font-size: 18px; }
.shared-queue-master .shared-stat span { font-size: 11px; }
.shared-queue-workspace .shared-queue-master .shared-record-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  gap: 4px 10px;
  padding: 11px 12px;
  border: 1px solid #e0e8e3;
  border-left: 3px solid #d8e2dd;
  border-radius: 8px;
  background: #fcfefd;
  box-shadow: none;
}
.shared-queue-workspace .shared-queue-master .shared-record-item:hover,
.shared-queue-workspace .shared-queue-master .shared-record-item[aria-current="true"] {
  border-color: #9ebfb1;
  border-left-color: #176c6b;
  background: #eaf3ef;
  transform: none;
}
.shared-queue-workspace .shared-queue-master :is(.shared-record-head, .shared-record-summary) { display: contents; }
.shared-queue-workspace .shared-queue-master .shared-record-head > div { grid-column: 1; grid-row: 2; }
.shared-queue-workspace .shared-queue-master .shared-record-head > .shared-status-pill { grid-column: 2; grid-row: 1; justify-self: end; }
.shared-queue-workspace .shared-queue-master .shared-record-title { grid-column: 1; grid-row: 1; min-width: 0; }
.shared-queue-workspace .shared-queue-master .shared-record-amount { grid-column: 2; grid-row: 2; }
.shared-queue-workspace .shared-queue-master .shared-record-owner { grid-column: 1; grid-row: 3; }
.shared-queue-workspace .shared-queue-master .shared-record-time { grid-column: 2; grid-row: 3; }
.shared-queue-workspace .shared-queue-master .shared-invoice-type { grid-column: 1 / -1; grid-row: 4; justify-self: start; }
.shared-queue-workspace .shared-queue-master .shared-record-needs-info { grid-column: 1 / -1; grid-row: auto; }
.shared-queue-workspace .shared-queue-master .shared-record-artifact {
  grid-column: 1 / -1;
  grid-row: auto;
  margin-top: 4px;
  padding-top: 7px;
}
.shared-queue-workspace .shared-queue-master .shared-record-actions .shared-button { min-height: 44px; }
.shared-queue-detail {
  display: flex;
  flex-direction: column;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.shared-queue-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #d8e2dd;
}
.shared-queue-detail-head h2 { margin: 2px 0 0; font-size: 18px; }
.shared-process-lookup {
  margin-top: 12px;
  border: 1px solid #d8e2dd;
  border-radius: 8px;
  background: #f3f6f4;
}
.shared-process-lookup > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #40534d;
  font-weight: 600;
  cursor: pointer;
}
.shared-process-lookup-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 0 12px 12px;
  border-top: 1px solid #d8e2dd;
}
.shared-process-lookup-fields .shared-field { margin-top: 10px; }
.shared-process-lookup-fields .shared-button { min-height: 44px; }
.shared-queue-detail > .shared-result-slot { min-height: 0; margin-top: 12px; }
.shared-queue-detail .shared-selection-empty { min-height: 190px; margin: 0; border-radius: 9px; }
.shared-queue-detail .shared-request-card { padding: 18px; border: 0; box-shadow: none; }
.shared-queue-detail .shared-request-actions {
  position: sticky;
  bottom: -16px;
  z-index: 3;
  margin: 16px -2px -2px;
  padding: 12px;
  border: 1px solid #d8e2dd;
  border-radius: 9px;
  background: rgba(252, 254, 253, .98);
}
.shared-queue-detail .shared-return-to-queue { display: none; }

/* Login and finance share the same restrained visual system; their real forms and routes are untouched. */
html[data-ui-release="invoice-refresh-2026-10"] .shared-login-page {
  width: min(960px, calc(100% - 32px));
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: clamp(32px, 7vw, 72px);
}
html[data-ui-release="invoice-refresh-2026-10"] .shared-login-story h1 {
  max-width: 560px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.22;
  letter-spacing: -.025em;
}
html[data-ui-release="invoice-refresh-2026-10"] .shared-login-steps b,
html[data-ui-release="invoice-refresh-2026-10"] .shared-login-footnote { color: #176c6b; }
html[data-ui-release="invoice-refresh-2026-10"] .shared-finance-mount .shared-main {
  padding-top: 20px;
}

/* ui-contract-1440: full horizontal nav and side-by-side work areas are the default. */
@media (max-width: 1100px) {
  /* ui-contract-1024 */
  .operator-server-mode.ui-refresh-release .sidebar {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 14px;
  }
  .operator-server-mode.ui-refresh-release .server-secondary-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-top: 4px;
    border-top: 1px solid #385b4c;
  }
  .operator-server-mode.ui-refresh-release .topbar { position: relative; top: auto; }
  .operator-server-mode.ui-refresh-release .intake-columns { grid-template-columns: minmax(0, 1fr); }
  .operator-server-mode.ui-refresh-release .shared-operator-form { height: auto; }
  .operator-server-mode.ui-refresh-release :is(.intake-left, .intake-right) { overflow: visible; }
  .operator-server-mode.ui-refresh-release .intake-sticky-bar {
    position: sticky;
    bottom: 0;
    z-index: 8;
  }
  .shared-queue-workspace { grid-template-columns: minmax(0, 1fr); }
  .shared-queue-master,
  .shared-queue-detail { height: auto; min-height: 0; overflow: visible; }
  .shared-queue-master > .shared-request-scroll { max-height: 520px; }
  .shared-queue-detail .shared-return-to-queue { display: inline-flex; }
}

@media (max-width: 800px) {
  /* ui-contract-768 */
  .operator-server-mode.ui-refresh-release .sidebar {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    padding: 8px 12px;
  }
  .operator-server-mode.ui-refresh-release .brand { display: none; }
  .operator-server-mode.ui-refresh-release .server-primary-nav {
    width: 100%;
    padding: 0;
    border: 0;
  }
  .operator-server-mode.ui-refresh-release .server-nav-action { flex: 1 1 0; padding: 0 8px; }
  .operator-server-mode.ui-refresh-release .server-secondary-nav { grid-column: auto; }
  .operator-server-mode.ui-refresh-release .topbar { align-items: center; padding: 8px 12px; }
  .operator-server-mode.ui-refresh-release .page-heading { display: none; }
  .operator-server-mode.ui-refresh-release .topbar-actions { width: 100%; }
  .operator-server-mode.ui-refresh-release .topbar-actions .button { flex: 1 1 0; min-width: 0; padding: 0 10px; }
  .operator-server-mode.ui-refresh-release #main { padding: 12px 12px 40px; }
  .shared-queue-master { padding: 12px; }
  .shared-queue-master > .shared-stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-ui-release="invoice-refresh-2026-10"] .shared-login-page {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 28px 0 48px;
  }
}

@media (max-width: 390px) {
  /* ui-contract-375 */
  .operator-server-mode.ui-refresh-release .server-nav-action,
  .operator-server-mode.ui-refresh-release .server-secondary-nav .nav-item { min-height: 44px; font-size: 12px; }
  .operator-server-mode.ui-refresh-release .intake-left,
  .operator-server-mode.ui-refresh-release .intake-right,
  .shared-queue-detail { padding: 12px; }
  .shared-process-lookup-fields { grid-template-columns: minmax(0, 1fr); }
  .shared-process-lookup-fields .shared-button { width: 100%; }
  .shared-queue-workspace .shared-queue-master .shared-record-item { grid-template-columns: minmax(0, 1fr); }
  .shared-queue-workspace .shared-queue-master .shared-record-head > .shared-status-pill,
  .shared-queue-workspace .shared-queue-master .shared-record-amount { grid-column: 1; justify-self: start; }
  .shared-queue-workspace .shared-queue-master .shared-record-head > .shared-status-pill { grid-row: 3; }
  .shared-queue-workspace .shared-queue-master .shared-record-amount { grid-row: 4; }
  .shared-queue-workspace .shared-queue-master :is(.shared-record-owner, .shared-record-time, .shared-invoice-type) { grid-column: 1; grid-row: auto; }
  .shared-queue-detail-head { align-items: flex-start; }
  .shared-queue-detail .shared-request-card { padding: 12px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-ui-release="invoice-refresh-2026-10"] *,
  html[data-ui-release="invoice-refresh-2026-10"] *::before,
  html[data-ui-release="invoice-refresh-2026-10"] *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

