    :root {
      color: #172033;
      background: #eef3f8;
      font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
      --page: #eef3f8;
      --surface: #ffffff;
      --surface-soft: #f7fafc;
      --line: #d8e2ed;
      --line-strong: #c3d0df;
      --text: #172033;
      --muted: #66768a;
      --primary: #0f766e;
      --primary-strong: #0b5f59;
      --secondary: #344256;
      --warning: #b45309;
      --danger: #b42318;
      --blue: #2563eb;
      --shadow: 0 16px 40px rgba(15, 23, 42, .08);
      --shadow-small: 0 8px 22px rgba(15, 23, 42, .08);
    }
    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body { margin: 0; min-height: 100vh; background: var(--page); }
    body:before { content: ""; position: fixed; inset: 0 0 auto; height: 260px; background: linear-gradient(180deg, #dfece9 0%, rgba(238, 243, 248, 0) 100%); pointer-events: none; z-index: -1; }
    header { position: sticky; top: 0; z-index: 20; min-height: 62px; padding: 14px 28px; background: rgba(13, 94, 86, .96); color: white; display: flex; justify-content: space-between; align-items: center; gap: 14px; box-shadow: 0 8px 24px rgba(15, 23, 42, .16); backdrop-filter: blur(10px); }
    h1 { margin: 0; font-size: 21px; font-weight: 760; }
    h2 { margin: 0 0 14px; font-size: 18px; font-weight: 760; color: #102033; }
    h3 { margin: 0 0 10px; font-size: 15px; color: #1f2f43; }
    .app-shell { width: min(1440px, calc(100vw - 32px)); margin: 0 auto; padding: 22px 0 72px; display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 18px; align-items: start; }
    .sidebar { position: sticky; top: 82px; z-index: 18; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .94); box-shadow: var(--shadow-small); padding: 10px; backdrop-filter: blur(10px); }
    .sidebar-title { padding: 8px 10px 11px; color: #526071; font-size: 12px; font-weight: 760; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
    nav { display: grid; gap: 6px; }
    nav a { color: #334155; text-decoration: none; border: 1px solid transparent; border-radius: 8px; padding: 10px 11px; font-size: 13px; font-weight: 650; white-space: nowrap; transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease; }
    nav a:hover { background: #edf7f5; border-color: #cae5df; color: var(--primary-strong); transform: translateX(2px); }
    nav a.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 8px 18px rgba(15, 118, 110, .24); }
    main { min-width: 0; }
    section { background: rgba(255, 255, 255, .96); border: 1px solid var(--line); border-radius: 8px; padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow-small); scroll-margin-top: 128px; }
    section[id^="page-"] { min-height: 120px; }
    .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    label { display: grid; gap: 7px; color: #526071; font-size: 13px; font-weight: 650; }
    input, textarea, select { width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; min-height: 38px; padding: 7px 11px; font-size: 14px; font-family: inherit; background: white; color: var(--text); outline: none; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
    input:focus, textarea:focus, select:focus, .rich-remark:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15, 118, 110, .13); }
    textarea { min-height: 88px; resize: vertical; }
    button { border: 0; border-radius: 8px; min-height: 38px; padding: 0 15px; background: var(--primary); color: white; font-weight: 720; cursor: pointer; box-shadow: 0 8px 18px rgba(15, 118, 110, .18); transition: transform .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease; }
    button:hover { transform: translateY(-1px); background: var(--primary-strong); box-shadow: 0 12px 24px rgba(15, 118, 110, .23); }
    button:active { transform: translateY(0); }
    button:disabled { cursor: not-allowed; opacity: .58; transform: none; box-shadow: none; }
    button.secondary { background: var(--secondary); box-shadow: 0 8px 18px rgba(52, 66, 86, .16); }
    button.secondary:hover { background: #263244; }
    button.warning { background: var(--warning); box-shadow: 0 8px 18px rgba(180, 83, 9, .18); }
    button.warning:hover { background: #92400e; }
    .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
    .muted { color: var(--muted); font-size: 13px; line-height: 1.55; }
    .pill { display: inline-flex; align-items: center; border-radius: 999px; background: #e6f4f1; color: var(--primary); padding: 5px 11px; font-size: 13px; font-weight: 700; }
    .badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 760; background: #e2e8f0; color: #334155; }
    .badge.pending { background: #fef3c7; color: #92400e; }
    .badge.ready { background: #dcfce7; color: #166534; }
    .badge.done { background: #dbeafe; color: #1d4ed8; }
    .badge.blocked { background: #fee2e2; color: #991b1b; }
    .panel-muted { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 8px; padding: 13px; margin-top: 12px; }
    .panel-muted.error { border-color: #fecaca; background: #fff7f7; color: var(--danger); }
    .panel-muted.warning { border-color: #f2cd7d; background: #fffaf0; color: #8a5200; }
    .warning-text { color: #9a5d00; }
    .cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
    .metric { border: 1px solid var(--line); border-radius: 8px; padding: 15px; background: white; box-shadow: 0 8px 20px rgba(15, 23, 42, .05); }
    .metric strong { display: block; font-size: 28px; margin-top: 8px; color: #0f172a; }
    .product-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
    .product-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
    .product-fact { border: 1px solid var(--line); border-radius: 8px; background: white; padding: 10px 12px; min-height: 62px; }
    .product-fact span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
    .product-fact strong { display: block; color: var(--text); word-break: break-word; }
    .product-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 10px 0 16px; }
    .product-image-card { border: 1px solid var(--line); border-radius: 8px; background: white; padding: 10px; display: grid; gap: 8px; }
    .product-image-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; }
    .product-image-card strong { min-height: 20px; word-break: break-word; }
    .product-image-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
    .work-order-detail { border: 1px solid var(--line); border-radius: 8px; background: white; padding: 12px; margin-top: 10px; }
    .work-order-section { margin-top: 12px; border-top: 1px solid var(--line); }
    .work-order-section > summary { cursor: pointer; padding: 12px 2px; font-weight: 760; color: var(--text); }
    .work-order-section > summary:hover { color: var(--primary); }
    .work-order-section[open] > summary { margin-bottom: 4px; }
    .json-block { max-height: 460px; overflow: auto; background: #0f172a; color: #dbeafe; border-radius: 8px; padding: 12px; font-size: 12px; }
    .chip { display: inline-flex; gap: 7px; align-items: center; border-radius: 999px; background: #e0f2fe; color: #075985; padding: 6px 10px; font-size: 12px; font-weight: 700; }
    .chip.warn { background: #fef3c7; color: #92400e; }
    .chip button { min-height: 22px; padding: 0 7px; border-radius: 999px; background: #0369a1; font-size: 11px; box-shadow: none; }
    .mention-block { margin-top: 10px; display: grid; gap: 6px; }
    .mention-block-title { color: #526071; font-size: 12px; font-weight: 760; }
    .memory-chip { display: inline-flex; align-items: stretch; border-radius: 999px; overflow: hidden; background: #e0f2fe; color: #075985; font-size: 12px; font-weight: 700; }
    .memory-chip.warn { background: #fef3c7; color: #92400e; }
    .memory-chip button { min-height: 28px; padding: 0 9px; border-radius: 0; background: transparent; color: inherit; box-shadow: none; }
    .memory-chip button:hover { background: rgba(15, 23, 42, .08); transform: none; box-shadow: none; }
    .memory-chip .memory-chip-main { border-right: 1px solid rgba(15, 23, 42, .12); }
    .memory-chip .memory-chip-remove { width: 30px; padding: 0; font-weight: 900; }
    .search-results { display: grid; gap: 6px; margin-top: 8px; }
    .search-results button { background: white; color: var(--text); border: 1px solid var(--line); text-align: left; font-weight: 600; box-shadow: none; }
    .search-results button:hover { background: #f5faf8; color: var(--primary-strong); }
    .suggest-wrap { position: relative; min-width: min(360px, 100%); }
    .suggest-wrap input { width: 100%; }
    .suggest-menu { position: absolute; z-index: 25; top: calc(100% + 6px); left: 0; right: 0; display: grid; gap: 5px; max-height: 280px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 18px 42px rgba(15, 23, 42, .16); }
    .suggest-menu.hidden { display: none; }
    .suggest-menu button { background: white; color: var(--text); border: 1px solid #e2e8f0; text-align: left; font-weight: 600; min-height: 36px; box-shadow: none; }
    .suggest-menu button:hover { background: #f0f9f7; color: var(--primary-strong); }
    .rich-remark { border: 1px solid var(--line-strong); border-radius: 8px; min-height: 112px; padding: 11px 12px; background: white; outline: none; line-height: 1.6; }
    .rich-remark:empty:before { content: attr(data-placeholder); color: #94a3b8; }
    .mention-token { display: inline-flex; align-items: center; gap: 4px; margin: 0 2px; padding: 2px 6px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-weight: 700; white-space: nowrap; }
    .mention-token.external { background: #f1f5f9; color: #475569; }
    .mention-token-remove { border: 0; background: transparent; color: inherit; padding: 0 0 0 2px; min-height: auto; line-height: 1; box-shadow: none; font-weight: 900; cursor: pointer; }
    .mention-token-remove:hover { background: transparent; transform: none; box-shadow: none; }
    .thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
    .thumb { border: 1px solid var(--line); border-radius: 8px; padding: 7px; background: white; display: inline-flex; align-items: center; gap: 7px; box-shadow: 0 4px 14px rgba(15, 23, 42, .05); }
    .thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; cursor: zoom-in; }
    .image-lightbox { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(15, 23, 42, .86); }
    .image-lightbox.hidden { display: none; }
    .image-lightbox img { display: block; max-width: min(94vw, 1500px); max-height: 86vh; object-fit: contain; }
    .image-lightbox-close { position: absolute; top: 18px; right: 20px; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.94); color: #0f172a; font-size: 28px; line-height: 1; box-shadow: 0 8px 24px rgba(0,0,0,.28); }
    .image-lightbox-caption { position: absolute; left: 24px; right: 24px; bottom: 14px; color: white; text-align: center; font-size: 13px; }
    .queue-item { border: 1px solid var(--line); border-radius: 8px; padding: 13px; margin-top: 10px; background: white; box-shadow: 0 8px 22px rgba(15, 23, 42, .05); }
    .queue-item.uploading { border-color: #bfdbfe; background: #eff6ff; }
    .queue-item.success { border-color: #bbf7d0; background: #f0fdf4; }
    .queue-item.failed { border-color: #fecaca; background: #fff7f7; }
    .modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .48); display: flex; align-items: center; justify-content: center; z-index: 30; padding: 18px; }
    .modal { width: min(960px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: white; border-radius: 8px; padding: 18px; box-shadow: 0 24px 70px rgba(15, 23, 42, .28); }
    .order-collaboration-edit-error { margin-top: 12px; border: 1px solid #fca5a5; border-radius: 8px; padding: 10px 12px; background: #fff1f2; color: var(--danger); font-size: 13px; font-weight: 700; }
    .order-collaboration-edit-modal [aria-invalid="true"] { border-color: #dc2626; background: #fff7f7; box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
    .contact-layout { display: grid; grid-template-columns: 300px 1fr; gap: 14px; }
    .contact-tree, .contact-users { border: 1px solid var(--line); border-radius: 8px; padding: 10px; min-height: 340px; max-height: 480px; overflow: auto; background: var(--surface-soft); }
    .contact-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px; border-bottom: 1px solid #e9eef5; }
    .order-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-top: 10px; background: white; box-shadow: 0 8px 22px rgba(15, 23, 42, .05); }
    .order-card.blocked { border-color: #fecaca; background: #fff7f7; }
    .order-card.ready { border-color: #bbf7d0; background: #f7fff9; }
    .order-card.skipped { opacity: .75; }
    .order-collaboration-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
    .order-collaboration-heading h2 { margin: 0 0 4px; }
    .order-collaboration-filters { display: grid; grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(150px, 1fr)) auto; gap: 10px; align-items: end; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
    .order-collaboration-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 14px 0; }
    .order-collaboration-stat { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: white; }
    .order-collaboration-stat span { display: block; color: var(--muted); font-size: 12px; }
    .order-collaboration-stat strong { display: block; margin-top: 4px; font-size: 22px; }
    .order-collaboration-list { display: grid; gap: 10px; }
    .order-collaboration-item { border: 1px solid var(--line); border-radius: 8px; background: white; overflow: hidden; }
    .order-collaboration-item-head { display: grid; grid-template-columns: minmax(160px, 1.2fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(120px, .8fr) auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface-soft); }
    .order-collaboration-item-head small { display: block; color: var(--muted); margin-bottom: 3px; }
    .order-collaboration-lines { overflow-x: auto; }
    .order-collaboration-lines table { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
    .order-collaboration-lines th, .order-collaboration-lines td { padding: 9px 12px; }
    .order-collaboration-edit-modal { width: min(1120px, 100%); }
    .order-collaboration-edit-grid { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 10px; margin-top: 16px; }
    .order-collaboration-edit-lines { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
    .order-collaboration-edit-lines table { min-width: 760px; margin: 0; border: 0; box-shadow: none; }
    .order-collaboration-edit-lines input { min-width: 120px; margin: 0; }
    .order-collaboration-edit-lines input[data-field="sku"] { min-width: 180px; }
    .order-collaboration-edit-lines .order-copy-select { width: 48px; min-width: 48px; text-align: center; }
    .order-collaboration-edit-lines .order-copy-select input { width: 18px; min-width: 18px; min-height: 18px; margin: 0 auto; padding: 0; }
    .order-collaboration-edit-lines tr.copy-excluded { opacity: .48; background: #f8fafc; }
    .order-collaboration-edit-lines td.readonly { color: var(--muted); background: var(--surface-soft); }
    @media (max-width: 1050px) {
      .order-collaboration-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .order-collaboration-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .order-collaboration-item-head { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .order-collaboration-edit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    .precheck-progress { border: 1px solid var(--line); border-radius: 8px; background: white; padding: 13px; margin: 10px 0 14px; box-shadow: 0 8px 20px rgba(15, 23, 42, .05); }
    .precheck-progress-bar { height: 8px; border-radius: 999px; background: #e5edf5; overflow: hidden; margin: 10px 0; }
    .precheck-progress-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #2563eb); transition: width .2s ease; }
    .precheck-progress-steps, .precheck-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
    .precheck-step, .precheck-stat { border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: var(--surface-soft); color: var(--muted); font-size: 12px; line-height: 1.45; }
    .precheck-step.active { border-color: #99f6e4; background: #ecfdf5; color: var(--primary-strong); font-weight: 760; }
    .precheck-step.done { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
    .precheck-stat strong { display: block; margin-top: 3px; color: #0f172a; font-size: 16px; }
    .action-cell { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
    .action-link { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 11px; border-radius: 8px; border: 1px solid #b7d9d2; background: #f0fdfa; color: var(--primary-strong); font-weight: 760; text-decoration: none; }
    .action-link:hover { background: #ccfbf1; }
    .danger-button { min-height: 32px; padding: 0 11px; border-radius: 8px; background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; box-shadow: none; }
    .danger-button:hover { background: #ffe4e6; color: #9f1239; transform: translateY(-1px); }
    .file-preview-list { display: grid; gap: 8px; margin: 10px 0 14px; }
    .file-preview-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: white; }
    .file-preview-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
    .file-preview-panel { border: 1px solid var(--line); border-radius: 8px; background: white; padding: 12px; margin-top: 10px; overflow: auto; }
    .file-preview-frame { width: 100%; height: min(72vh, 760px); border: 1px solid var(--line); border-radius: 8px; background: white; }
    .file-preview-image { display: block; max-width: 100%; max-height: 72vh; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: white; }
    .file-preview-table { max-height: 560px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
    #page-bom_batch, #page-warehouse_purchase_outbound, #page-warehouse_inventory_adjust { min-height: calc(100vh - 176px); padding: 0; overflow: hidden; }
    .warehouse-tool-embed { display: block; width: 100%; height: calc(100vh - 176px); min-height: 720px; border: 0; background: white; }
    #page-output_monitor { padding: 0; border: 0; background: transparent; box-shadow: none; }
    .monitor-surface { background: white; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-small); overflow: hidden; }
    .monitor-heading { min-height: 58px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
    .monitor-heading h2 { margin: 0; }
    .monitor-sync-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; text-align: right; }
    .monitor-sync-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; flex: 0 0 auto; }
    .monitor-sync-dot.busy { background: #d97706; }
    .monitor-sync-dot.error { background: #dc2626; }
    .monitor-sync-progress { padding: 11px 18px 13px; background: white; border-bottom: 1px solid var(--line); }
    .monitor-sync-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-size: 12px; }
    .monitor-sync-progress-head strong { color: var(--text); }
    .monitor-sync-progress-head span { color: var(--primary-strong); font-weight: 760; }
    .monitor-sync-progress-track { width: 100%; height: 8px; overflow: hidden; border-radius: 4px; background: #e8eef4; }
    .monitor-sync-progress-bar { width: 0; height: 100%; border-radius: 4px; background: var(--primary); transition: width .22s ease; }
    .monitor-sync-progress.failed .monitor-sync-progress-bar { background: var(--danger); }
    .monitor-sync-progress.completed .monitor-sync-progress-bar { background: #16a34a; }
    .monitor-sync-progress-detail { margin-top: 6px; color: var(--muted); font-size: 11px; }
    .monitor-toolbar { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)) auto; gap: 10px; align-items: end; padding: 14px 18px; background: #f8fafc; border-bottom: 1px solid var(--line); }
    .monitor-toolbar label { gap: 5px; font-size: 12px; }
    .monitor-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .monitor-actions button { min-height: 38px; white-space: nowrap; }
    .monitor-check { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; color: var(--text); font-size: 13px; white-space: nowrap; }
    .monitor-check input { width: 17px; min-height: 17px; margin: 0; }
    .monitor-rest-panel { padding: 14px 18px 16px; background: white; border-bottom: 1px solid var(--line); }
    .monitor-rest-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
    .monitor-rest-heading h3 { margin: 0; font-size: 15px; }
    .monitor-rest-list { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
    .monitor-rest-row { display: grid; grid-template-columns: 130px 18px 130px 38px; align-items: end; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: #f8fafc; }
    .monitor-rest-row label { gap: 4px; font-size: 11px; }
    .monitor-rest-row input { min-width: 0; min-height: 36px; }
    .monitor-rest-arrow { align-self: center; padding-top: 17px; color: var(--muted); text-align: center; }
    .monitor-rest-remove, .monitor-rest-close { min-width: 36px; min-height: 36px; padding: 0; background: #eef2f6; color: #526071; }
    .monitor-rest-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
    .monitor-rest-readonly { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: #f8fafc; font-weight: 700; }
    .monitor-metrics { display: grid; grid-template-columns: repeat(6, minmax(105px, 1fr)); border-bottom: 1px solid var(--line); }
    .monitor-metric { min-height: 78px; padding: 13px 16px; border-right: 1px solid var(--line); background: white; }
    .monitor-metric:last-child { border-right: 0; }
    .monitor-metric span { display: block; color: var(--muted); font-size: 12px; }
    .monitor-metric strong { display: block; margin-top: 6px; font-size: 23px; color: #172033; }
    .monitor-metric.alert strong { color: #b42318; }
    .monitor-analysis { display: grid; grid-template-columns: minmax(290px, .78fr) minmax(520px, 1.7fr); min-height: 350px; border-bottom: 1px solid var(--line); }
    .monitor-summary-panel { border-right: 1px solid var(--line); overflow: auto; }
    .monitor-panel-title { min-height: 48px; margin: 0; padding: 14px 16px 10px; font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
    .monitor-summary-table { min-width: 0; font-size: 12px; }
    .monitor-summary-table th, .monitor-summary-table td { padding: 8px 10px; }
    .monitor-summary-table tbody tr { cursor: pointer; }
    .monitor-summary-table tbody tr.selected td { background: #e6f4f1; color: var(--primary-strong); font-weight: 700; }
    .monitor-summary-total td { background: #edf3fa; font-weight: 760; }
    .monitor-chart-panel { min-width: 0; padding: 0 16px 12px; }
    .monitor-chart-wrap { position: relative; width: 100%; height: 285px; }
    #outputMonitorChart { display: block; width: 100%; height: 285px; cursor: pointer; }
    .monitor-empty-chart { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; pointer-events: none; }
    .monitor-detail-heading { padding: 13px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
    .monitor-detail-heading h3 { margin: 0; }
    .monitor-table-wrap { max-height: 590px; overflow: auto; }
    .monitor-detail-table { min-width: 1540px; font-size: 12px; }
    .monitor-detail-table th { top: 0; white-space: nowrap; }
    .monitor-detail-table td { vertical-align: middle; white-space: nowrap; max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
    .monitor-tag { display: inline-flex; align-items: center; min-height: 24px; margin: 2px 4px 2px 0; padding: 2px 8px; border-radius: 999px; background: #fee2e2; color: #b42318; font-weight: 760; white-space: nowrap; }
    .monitor-tag.warn { background: #fef3c7; color: #92400e; }
    .monitor-tag.normal { background: #dcfce7; color: #166534; }
    .monitor-admin-box { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
    #lineTable, #users, #entryList, #settings { overflow-x: auto; }
    #page-pmc_prices { max-width: 100%; overflow: hidden; }
    .reconciliation-actions { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin: 12px 0; }
    .reconciliation-actions > input { width: min(220px, 100%); }
    .reconciliation-overview { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)) auto; gap: 10px; align-items: stretch; margin-top: 14px; }
    .reconciliation-summary-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: white; min-width: 0; }
    .reconciliation-summary-item span { display: block; color: var(--muted); font-size: 12px; }
    .reconciliation-summary-item strong { display: block; margin-top: 4px; font-size: 18px; color: var(--text); overflow-wrap: anywhere; }
    .reconciliation-file { max-width: 100%; overflow: hidden; }
    .reconciliation-file-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
    .reconciliation-file-header h3 { margin-bottom: 4px; overflow-wrap: anywhere; }
    .reconciliation-mapping { margin: 8px 0; }
    .reconciliation-mapping summary { cursor: pointer; color: var(--primary-strong); font-weight: 720; }
    .reconciliation-mapping p { margin: 8px 0 0; }
    .reconciliation-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
    .reconciliation-pager-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .reconciliation-pager select { width: auto; min-height: 34px; padding: 4px 28px 4px 9px; }
    .reconciliation-pager button { min-height: 34px; padding: 0 11px; box-shadow: none; }
    .reconciliation-table-shell { width: 100%; max-height: min(58vh, 560px); overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line-strong); border-radius: 8px; background: white; }
    .reconciliation-table { width: max-content; min-width: 1760px; }
    .reconciliation-table th { top: 0; z-index: 3; white-space: nowrap; }
    .reconciliation-table td { background: white; }
    .reconciliation-table tr:hover td { background: #f7fafc; }
    .reconciliation-table th:nth-child(1), .reconciliation-table td:nth-child(1) { position: sticky; left: 0; width: 112px; min-width: 112px; max-width: 112px; z-index: 2; }
    .reconciliation-table th:nth-child(2), .reconciliation-table td:nth-child(2) { position: sticky; left: 112px; width: 150px; min-width: 150px; max-width: 150px; z-index: 2; box-shadow: 1px 0 0 var(--line-strong); }
    .reconciliation-table th:nth-child(1), .reconciliation-table th:nth-child(2) { z-index: 5; background: #f1f5f9; }
    .reconciliation-table td:nth-child(1), .reconciliation-table td:nth-child(2) { background: white; }
    .reconciliation-table td:nth-child(3) { min-width: 300px; }
    .reconciliation-table td:nth-child(13) { min-width: 230px; max-width: 300px; white-space: normal; }
    .reconciliation-table td input { min-width: 88px; }
    .page-tabs { display: flex; width: max-content; max-width: 100%; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #f1f5f9; margin-bottom: 14px; overflow-x: auto; }
    .page-tabs button { min-height: 34px; padding: 0 14px; background: transparent; color: var(--secondary); box-shadow: none; }
    .page-tabs button:hover { background: white; color: var(--primary-strong); box-shadow: none; transform: none; }
    .page-tabs button.active { background: white; color: var(--primary-strong); box-shadow: 0 3px 10px rgba(15, 23, 42, .1); }
    .price-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) 180px auto; gap: 10px; align-items: end; margin-bottom: 12px; }
    .price-record-summary { margin-bottom: 10px; }
    .price-table-shell { width: 100%; max-height: min(62vh, 620px); overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line-strong); border-radius: 8px; background: white; }
    .price-table { width: max-content; min-width: 1250px; }
    .price-table th { top: 0; z-index: 3; white-space: nowrap; }
    .price-table td { background: white; }
    .price-table tr:hover td { background: #f7fafc; }
    .price-progress { width: 150px; height: 7px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
    .price-progress span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
    .price-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin: 12px 0; }
    .price-detail-actions input { width: 150px; }
    .revision-fields { display: flex; gap: 6px; flex-wrap: wrap; min-width: 260px; }
    .revision-field { display: inline-flex; gap: 4px; align-items: center; padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); font-size: 12px; }
    table { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; font-size: 13px; background: white; }
    th, td { border-bottom: 1px solid #e7edf5; padding: 9px; vertical-align: top; }
    th { position: sticky; top: 0; z-index: 1; text-align: left; color: #526071; background: #f8fafc; font-weight: 760; }
    td input { width: 100%; min-width: 110px; }
    tr:hover td { background: #fafcff; }
    pre { white-space: pre-wrap; background: #111827; color: #e5eefb; padding: 14px; border-radius: 8px; max-height: 320px; overflow: auto; line-height: 1.55; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
    a { color: var(--blue); font-weight: 650; }
    .hidden { display: none !important; }
    .error { color: var(--danger); }
    body:before { display: none; }
    body { background: #f4f6f8; color: var(--text); }
    header.app-header { min-height: 64px; padding: 0 24px; background: #fff; color: var(--text); border-bottom: 1px solid #dde4ec; box-shadow: 0 2px 10px rgba(15, 23, 42, .05); backdrop-filter: none; }
    .brand-link { display: inline-flex; align-items: center; gap: 11px; min-width: 236px; color: var(--text); text-decoration: none; }
    .brand-mark { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 8px; background: var(--primary); color: #fff; }
    .brand-mark svg { width: 21px; height: 21px; }
    .brand-copy { display: grid; gap: 1px; }
    .brand-copy strong { font-size: 16px; line-height: 1.2; letter-spacing: 0; }
    .brand-copy span { color: var(--muted); font-size: 11px; font-weight: 600; }
    .header-context { min-width: 0; margin-right: auto; padding-left: 22px; border-left: 1px solid var(--line); }
    .header-context span { display: block; color: var(--muted); font-size: 11px; line-height: 1.2; }
    .header-context strong { display: block; margin-top: 3px; overflow: hidden; color: #263548; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
    .header-user { display: flex; align-items: center; gap: 10px; }
    .user-avatar { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 50%; background: #e7f4f1; color: var(--primary-strong); font-size: 13px; font-weight: 800; }
    .user-copy { display: grid; gap: 1px; text-align: right; }
    .user-copy strong { color: #29384a; font-size: 13px; }
    .user-copy span { color: var(--muted); font-size: 11px; }
    .icon-button { display: inline-flex; width: 38px; height: 38px; min-height: 38px; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--line); background: #fff; color: var(--secondary); box-shadow: none; }
    .icon-button:hover { border-color: #b8cbc7; background: #f3f8f7; color: var(--primary-strong); box-shadow: none; }
    .icon-button svg { width: 18px; height: 18px; }
    .mobile-menu-button { display: none; }
    .app-shell { width: 100%; max-width: 1680px; margin: 0 auto; padding: 18px 24px 56px; grid-template-columns: 236px minmax(0, 1fr); gap: 18px; }
    .sidebar { top: 82px; max-height: calc(100dvh - 100px); overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; border-color: #dde4ec; border-radius: 6px; background: #fff; box-shadow: none; padding: 12px 10px; backdrop-filter: none; }
    .sidebar-title { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px 12px; color: #7b8797; font-size: 11px; letter-spacing: 0; }
    .sidebar-title strong { color: #2f3f52; font-size: 13px; }
    .nav-group { display: grid; gap: 3px; margin-top: 10px; }
    .nav-group:first-child { margin-top: 0; }
    .nav-group-label { padding: 6px 10px 4px; color: #8a96a5; font-size: 10px; font-weight: 750; }
    nav { gap: 0; }
    nav a { display: flex; align-items: center; gap: 10px; min-height: 40px; border: 0; border-left: 3px solid transparent; border-radius: 4px; padding: 8px 10px 8px 9px; color: #415064; font-size: 12px; font-weight: 680; }
    nav a svg { width: 17px; height: 17px; flex: 0 0 auto; color: #718096; }
    nav a:hover { border-color: transparent; border-left-color: #9dcfc6; background: #f0f7f6; color: var(--primary-strong); transform: none; }
    nav a.active { border-color: transparent; border-left-color: var(--primary); background: #e6f3f1; color: var(--primary-strong); box-shadow: none; }
    nav a.active svg { color: var(--primary); }
    .sidebar-foot { margin: 14px 5px 2px; padding: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.55; }
    .sidebar-foot strong { display: block; margin-bottom: 3px; color: #425166; font-size: 12px; }
    main { min-width: 0; }
    .page-context { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; min-height: 58px; padding: 2px 2px 15px; }
    .page-context-copy { min-width: 0; }
    .page-breadcrumb { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; color: #8894a3; font-size: 11px; }
    .page-context h1 { overflow: hidden; color: #1b2a3a; font-size: 20px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
    .page-context p { max-width: 760px; margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
    .page-context-actions { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
    section { border-color: #dde4ec; border-radius: 6px; background: #fff; box-shadow: none; }
    main > section:not(#page-dashboard):not(#page-login):not(#page-auth_pending):not(#page-auth_disabled) > h2:first-child { display: none; }
    #page-dashboard { padding: 0; border: 0; background: transparent; box-shadow: none; }
    .dashboard-welcome { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border: 1px solid #dbe4e9; border-left: 4px solid var(--primary); border-radius: 6px; background: #fff; }
    .dashboard-welcome h2 { margin: 0; font-size: 18px; }
    .dashboard-welcome p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
    .dashboard-date { color: #4f5f72; font-size: 12px; font-weight: 700; white-space: nowrap; }
    .dashboard-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 10px; }
    .dashboard-section-head h3 { margin: 0; color: #263548; font-size: 14px; }
    .dashboard-section-head span { color: var(--muted); font-size: 11px; }
    .dashboard-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
    .dashboard-metric { display: block; min-width: 0; min-height: 108px; padding: 14px; border: 1px solid #dde4ec; border-radius: 6px; background: #fff; color: inherit; text-decoration: none; }
    .dashboard-metric:hover { border-color: #b8d8d2; background: #fbfdfd; color: inherit; }
    .dashboard-metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #627185; font-size: 11px; }
    .dashboard-metric-icon { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 6px; background: #eaf2ff; color: #2563eb; }
    .dashboard-metric-icon.teal { background: #e7f5f2; color: var(--primary); }
    .dashboard-metric-icon.amber { background: #fff3dc; color: #b66a00; }
    .dashboard-metric-icon.red { background: #fff0f0; color: #c2413b; }
    .dashboard-metric-icon svg { width: 16px; height: 16px; }
    .dashboard-metric strong { display: block; margin-top: 12px; overflow: hidden; color: #162536; font-size: 24px; line-height: 1; text-overflow: ellipsis; }
    .dashboard-metric small { display: block; margin-top: 8px; overflow: hidden; color: #7a8796; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
    .dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .7fr); gap: 14px; margin-top: 14px; }
    .dashboard-panel { min-width: 0; border: 1px solid #dde4ec; border-radius: 6px; background: #fff; }
    .dashboard-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 15px; border-bottom: 1px solid #e6ebf0; }
    .dashboard-panel-head h3 { margin: 0; font-size: 13px; }
    .dashboard-panel-head span { color: var(--muted); font-size: 10px; }
    .dashboard-activity { min-height: 244px; }
    .dashboard-activity-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 15px; border-bottom: 1px solid #edf1f5; color: inherit; text-decoration: none; }
    .dashboard-activity-row:hover { background: #f8fbfb; color: inherit; }
    .dashboard-activity-row:last-child { border-bottom: 0; }
    .dashboard-activity-row strong { display: block; overflow: hidden; color: #344256; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
    .dashboard-activity-row span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
    .dashboard-activity-row .badge { margin: 0; white-space: nowrap; }
    .dashboard-empty { padding: 52px 18px; color: var(--muted); font-size: 12px; text-align: center; }
    .dashboard-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; }
    .dashboard-shortcut { display: flex; min-height: 68px; align-items: center; gap: 9px; padding: 10px; border: 1px solid #e1e7ed; border-radius: 6px; background: #fafbfc; color: #405064; text-decoration: none; }
    .dashboard-shortcut:hover { border-color: #b8d8d2; background: #f0f8f6; color: var(--primary-strong); }
    .dashboard-shortcut svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--primary); }
    .dashboard-shortcut strong { display: block; font-size: 11px; }
    .dashboard-shortcut span { display: block; margin-top: 3px; color: #8793a2; font-size: 9px; font-weight: 500; }
    .dashboard-system { display: grid; gap: 0; padding: 2px 14px 8px; }
    .dashboard-system-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 2px; border-bottom: 1px solid #edf1f5; color: #506074; font-size: 11px; }
    .dashboard-system-row:last-child { border-bottom: 0; }
    .status-dot { display: inline-flex; align-items: center; gap: 6px; color: #68778a; }
    .status-dot:before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #9aa6b4; }
    .status-dot.ok:before { background: #22a06b; }
    .status-dot.warn:before { background: #df8b16; }
    .finance-toolbar { display: grid; grid-template-columns: minmax(180px, 1fr) 180px auto; gap: 10px; align-items: end; margin-bottom: 14px; }
    .finance-inline-check { display: inline-flex; min-height: 42px; align-items: center; gap: 8px; white-space: nowrap; }
    .finance-inline-check input { width: auto; margin: 0; }
    .finance-create { margin-bottom: 16px; padding: 16px; border: 1px solid #dfe7ee; border-radius: 8px; background: #f8fafc; }
    .finance-create-grid { display: grid; grid-template-columns: 180px 180px minmax(220px, 1fr) minmax(240px, 1.4fr) auto; gap: 10px; align-items: end; }
    .finance-list { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
    .finance-list table, .finance-check-table, .finance-line-table { width: 100%; border-collapse: collapse; }
    .finance-list th, .finance-list td, .finance-check-table th, .finance-check-table td, .finance-line-table th, .finance-line-table td { padding: 10px 11px; border-bottom: 1px solid #e8edf2; text-align: left; vertical-align: top; font-size: 11px; }
    .finance-list th, .finance-check-table th, .finance-line-table th { background: #f6f8fa; color: #66758a; font-weight: 700; white-space: nowrap; }
    .finance-list tbody tr:hover { background: #f7fbfa; }
    .finance-report-panel { margin: 0 0 16px; padding: 16px; border: 1px solid #dfe7ee; border-radius: 8px; background: #fff; }
    .mapping-toolbar { display:flex; flex-wrap:wrap; gap:9px; align-items:end; margin-bottom:14px; }
    .mapping-toolbar .file-field { flex:1 1 360px; }
    .mapping-section { margin-top:14px; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:#fff; }
    .mapping-section-head { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:12px 14px; background:#f7fafc; border-bottom:1px solid var(--line); }
    .mapping-table-shell { max-height:360px; overflow:auto; }
    .mapping-table { width:100%; border-collapse:collapse; font-size:12px; }
    .mapping-table th, .mapping-table td { padding:9px 12px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
    .mapping-table th { position:sticky; top:0; background:#f3f7fa; z-index:1; }
    .finance-report-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
    .finance-report-heading h3 { margin: 0; }
    .finance-report-filters { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 9px; align-items: end; }
    .finance-report-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; white-space: nowrap; }
    .finance-report-result { margin-top: 14px; max-height: 430px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
    .finance-report-result table { width: 100%; border-collapse: collapse; }
    .finance-report-result th, .finance-report-result td { padding: 9px 10px; border-bottom: 1px solid #e8edf2; text-align: left; vertical-align: top; font-size: 11px; }
    .finance-report-result th { position: sticky; top: 0; z-index: 1; background: #f6f8fa; color: #66758a; white-space: nowrap; }
    .finance-result-detail { min-width: 220px; }
    .finance-result-alert { padding: 8px 10px; border: 1px solid #efaaa5; border-radius: 6px; background: #fff1f0; color: #a72f28; }
    .finance-result-alert strong, .finance-result-alert span { display: block; }
    .finance-result-alert span { margin-top: 3px; font-weight: 700; white-space: nowrap; }
    .finance-result-ok { color: #146b51; font-weight: 700; white-space: nowrap; }
    .finance-result-count { margin-top: 5px; color: var(--muted); font-size: 10px; }
    .finance-analysis-progress { margin: 10px 0 14px; padding: 13px 14px; border: 1px solid #b9d8d2; border-radius: 8px; background: #f0f9f7; }
    .finance-analysis-progress.error { border-color: #efaaa5; background: #fff6f5; }
    .finance-analysis-progress.complete { border-color: #a7d7c8; background: #effaf5; }
    .finance-analysis-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .finance-analysis-progress-head strong { color: #23473f; }
    .finance-analysis-progress-track { height: 9px; margin: 9px 0 7px; overflow: hidden; border-radius: 999px; background: #d9e7e4; }
    .finance-analysis-progress-fill { height: 100%; min-width: 0; border-radius: inherit; background: linear-gradient(90deg, #2f7f73, #49a999); transition: width .25s ease; }
    .finance-analysis-progress-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: #607168; font-size: 10px; }
    .pmc-arrival-sync-progress { margin: 0 0 9px; padding: 10px 12px; border: 1px solid #b9d8d2; border-radius: 8px; background: #f0f9f7; }
    .pmc-arrival-sync-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #28584f; }
    .pmc-arrival-sync-progress-head span { flex: 0 0 auto; color: #58756f; font-size: 10px; }
    .pmc-arrival-sync-progress-track { height: 7px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: #d7e8e4; }
    .pmc-arrival-sync-progress-track span { display: block; width: 38%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2f7f73, #55b3a4); animation: pmc-arrival-sync-slide 1.35s ease-in-out infinite; }
    body.modal-open { overflow: hidden; }
    .pmc-arrival-order-link { display: inline; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--primary-strong); box-shadow: none; font: inherit; font-weight: 800; text-decoration: underline; text-decoration-color: #aad5cd; text-underline-offset: 3px; }
    .pmc-arrival-order-link:hover { background: transparent; color: #075f58; box-shadow: none; transform: none; text-decoration-color: currentColor; }
    .pmc-arrival-order-link-hint { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
    .pmc-arrival-product-lines { min-width: 360px; display: grid; gap: 5px; }
    .pmc-arrival-product-line { display: grid; grid-template-columns: 20px 1fr; gap: 7px; align-items: start; padding-bottom: 5px; border-bottom: 1px dashed #e4e9ee; line-height: 1.35; }
    .pmc-arrival-product-line:last-child { padding-bottom: 0; border-bottom: 0; }
    .pmc-arrival-product-index { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; border-radius: 50%; background: #e7f4f1; color: #167267; font-size: 9px; font-weight: 800; }
    .pmc-arrival-product-line small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
    .pmc-po-detail-modal { width: min(1500px, calc(100vw - 32px)); height: min(920px, calc(100vh - 32px)); max-height: none; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; padding: 0; border-radius: 10px; }
    .pmc-po-detail-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding: 18px 22px 15px; border-bottom: 1px solid var(--line); }
    .pmc-po-detail-title-row { display: flex; align-items: center; gap: 10px; }
    .pmc-po-detail-title-row h2 { margin: 0; font-size: 20px; }
    .pmc-po-detail-header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
    .pmc-po-close { width: 38px; min-height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: #f4f7f9; color: var(--text); box-shadow: none; }
    .pmc-po-close svg { width: 18px; height: 18px; }
    .pmc-po-detail-body { min-height: 0; overflow: auto; background: #f7f9fb; }
    .pmc-po-tabs { position: sticky; top: 0; z-index: 4; display: flex; justify-content: center; gap: 34px; padding: 0 22px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.98); }
    .pmc-po-tabs button { min-height: 50px; padding: 0 3px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: #445164; box-shadow: none; font-size: 14px; }
    .pmc-po-tabs button:hover, .pmc-po-tabs button.active { background: transparent; color: var(--primary); box-shadow: none; transform: none; border-bottom-color: var(--primary); }
    .pmc-po-tabs button span { margin-left: 5px; padding: 1px 6px; border-radius: 999px; background: #e7f4f1; font-size: 9px; }
    .pmc-po-feedback { margin: 14px 22px -4px; padding: 10px 12px; border: 1px solid; border-radius: 7px; font-size: 11px; line-height: 1.55; }
    .pmc-po-feedback.error { border-color: #efaaa5; background: #fff6f5; color: #9f302a; }
    .pmc-po-feedback.success { border-color: #b9ded4; background: #f2faf7; color: #176d58; }
    .pmc-po-panel { margin: 18px 22px; padding: 20px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
    .pmc-po-panel h3 { margin: 0 0 15px; font-size: 16px; }
    .pmc-po-info-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
    .pmc-po-info-item { min-height: 70px; padding: 11px 13px; border: 1px solid #e3e9ee; border-radius: 7px; background: #fbfcfd; }
    .pmc-po-info-item span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; }
    .pmc-po-info-item strong { display: block; overflow-wrap: anywhere; font-size: 13px; }
    .pmc-po-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
    .pmc-po-section-heading h3 { margin-bottom: 4px; }
    .pmc-po-section-heading p { margin: 0; color: var(--muted); font-size: 11px; }
    .pmc-po-section-heading > span { padding: 4px 9px; border-radius: 999px; background: #e7f4f1; color: #136f65; font-size: 10px; font-weight: 800; }
    .pmc-po-lines-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
    .pmc-po-lines-table { min-width: 1120px; width: 100%; border-collapse: collapse; }
    .pmc-po-lines-table th, .pmc-po-lines-table td { padding: 10px 11px; border-bottom: 1px solid #e7ecef; text-align: left; vertical-align: middle; font-size: 11px; }
    .pmc-po-lines-table th { position: sticky; top: 0; z-index: 2; background: #f4f7f9; color: #66758a; white-space: nowrap; }
    .pmc-po-lines-table td small { display: block; margin-top: 3px; color: var(--muted); }
    .pmc-po-lines-table tfoot td { position: sticky; bottom: 0; background: #f7faf9; color: #204940; font-weight: 800; }
    .pmc-po-edit-input { min-width: 118px; width: 100%; margin: 0; padding: 8px 9px; border-color: #b9cdc8; background: #fbfffe; }
    .pmc-po-edit-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20, 125, 113, .12); }
    .pmc-po-detail-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 22px; border-top: 1px solid var(--line); background: #fff; }
    .pmc-po-detail-footer > span { color: var(--muted); font-size: 11px; }
    @media (max-width: 980px) {
      .pmc-po-detail-modal { width: 100%; height: calc(100vh - 16px); }
      .pmc-po-tabs { justify-content: flex-start; gap: 18px; overflow-x: auto; }
      .pmc-po-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    @media (max-width: 620px) {
      .pmc-po-info-grid { grid-template-columns: 1fr; }
      .pmc-po-detail-footer { align-items: flex-end; }
      .pmc-po-detail-footer > span { display: none; }
    }
    @keyframes pmc-arrival-sync-slide {
      from { transform: translateX(-105%); }
      to { transform: translateX(275%); }
    }
    .finance-decision-gate { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 10px 0 16px; padding: 16px 18px; border: 2px solid #e45a50; border-radius: 9px; background: #fff2f0; box-shadow: 0 5px 16px rgba(183, 49, 40, .10); }
    .finance-decision-gate.warning { border-color: #e2a32f; background: #fff8e8; box-shadow: 0 5px 16px rgba(169, 111, 4, .09); }
    .finance-decision-gate-copy { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
    .finance-decision-gate-icon { display: inline-flex; flex: 0 0 34px; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 50%; background: #d94339; color: #fff; font-size: 20px; font-weight: 900; }
    .finance-decision-gate.warning .finance-decision-gate-icon { background: #d78b00; }
    .finance-decision-gate strong { display: block; margin-bottom: 4px; color: #9d2923; font-size: 15px; }
    .finance-decision-gate.warning strong { color: #8a5900; }
    .finance-decision-gate p { margin: 0; color: #6f3b37; line-height: 1.6; }
    .finance-decision-gate.warning p { color: #6e5528; }
    .finance-decision-gate button { flex: 0 0 auto; white-space: nowrap; }
    .finance-status { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 999px; background: #edf2f7; color: #556477; font-size: 10px; font-weight: 700; white-space: nowrap; }
    .finance-status.pending_pmc, .finance-status.pending_finance, .finance-status.warning { background: #fff1d6; color: #9a5d00; }
    .finance-status.approved, .finance-status.pass, .finance-status.manual_confirmed { background: #dff4ec; color: #146b51; }
    .finance-status.returned, .finance-status.fail { background: #fde6e4; color: #a43d36; }
    .finance-case-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
    .finance-case-head h2 { margin: 0 0 6px; }
    .finance-case-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
    .finance-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 16px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
    .finance-summary-item { min-height: 82px; padding: 12px; border-right: 1px solid var(--line); }
    .finance-summary-item:last-child { border-right: 0; }
    .finance-summary-item span { display: block; color: var(--muted); font-size: 10px; }
    .finance-summary-item strong { display: block; margin-top: 8px; color: #29384d; font-size: 16px; overflow-wrap: anywhere; }
    .finance-summary-item.danger strong { color: #bd3028; }
    .finance-section { margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
    .finance-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 15px; border-bottom: 1px solid var(--line); background: #f7f9fb; }
    .finance-section-head h3 { margin: 0; font-size: 13px; }
    .finance-section-collapse > summary.finance-section-head { cursor: pointer; list-style: none; border-bottom: 0; user-select: none; }
    .finance-section-collapse > summary.finance-section-head::-webkit-details-marker { display: none; }
    .finance-section-collapse > summary.finance-section-head::after { content: '展开'; flex: 0 0 auto; padding: 3px 8px; border-radius: 999px; background: #e8eef4; color: #536277; font-size: 10px; font-weight: 700; }
    .finance-section-collapse[open] > summary.finance-section-head { border-bottom: 1px solid var(--line); }
    .finance-section-collapse[open] > summary.finance-section-head::after { content: '收起'; }
    .finance-doc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; }
    .finance-blacklake-panel { margin: 14px; border: 1px solid #cddfdc; border-radius: 8px; background: #f7fbfa; overflow: hidden; }
    .finance-blacklake-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px; }
    .finance-blacklake-query { min-width: 0; padding: 12px; border: 1px solid #dbe7e4; border-radius: 7px; background: #fff; }
    .finance-blacklake-query h4 { margin: 0 0 4px; }
    .finance-blacklake-query textarea { min-height: 76px; resize: vertical; }
    .finance-blacklake-results { display: grid; gap: 8px; margin-top: 10px; }
    .finance-blacklake-row { padding: 10px; border: 1px solid #dce5e9; border-radius: 6px; background: #fff; }
    .finance-blacklake-row.failed { border-color: #efaaa5; background: #fff8f7; }
    .finance-blacklake-row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
    .finance-blacklake-row-fields { display: grid; gap: 4px; margin-top: 7px; color: #607083; font-size: 10px; }
    .finance-blacklake-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 9px; }
    .finance-blacklake-fallback { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-top: 8px; }
    .finance-doc-card { min-width: 0; padding: 13px; border: 1px solid #dfe6ed; border-radius: 7px; background: #fbfcfd; }
    .finance-doc-card.required-missing { border-color: #e8aaa5; background: #fff8f7; }
    .finance-doc-card-head, .finance-document-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
    .finance-doc-card-head h4, .finance-document h4 { margin: 0; font-size: 12px; }
    .finance-paste-target { display: flex; align-items: center; gap: 9px; margin-top: 10px; padding: 10px 12px; border: 1px dashed #aab8c7; border-radius: 6px; background: #fff; color: #536274; cursor: text; outline: none; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
    .finance-paste-target:hover, .finance-paste-target:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(54, 125, 116, .12); background: #f7fbfa; }
    .finance-paste-target.uploading { pointer-events: none; opacity: .65; }
    .finance-paste-target svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--primary); }
    .finance-paste-target strong, .finance-paste-target small { display: block; }
    .finance-paste-target strong { color: #334257; font-size: 11px; }
    .finance-paste-target small { margin-top: 2px; color: var(--muted); font-size: 9px; }
    .finance-pending-files { display: grid; gap: 6px; margin-top: 8px; padding: 8px; border: 1px solid #cfe0dc; border-radius: 6px; background: #f3f9f7; }
    .finance-pending-head, .finance-pending-file { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
    .finance-pending-head { color: #346f68; font-size: 10px; }
    .finance-pending-file { padding-top: 6px; border-top: 1px solid #dceae7; color: #566477; font-size: 9px; }
    .finance-pending-file span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .finance-pending-file button { flex: 0 0 auto; padding: 4px 7px; font-size: 9px; }
    .finance-upload-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
    .finance-upload-row input { min-width: 0; flex: 1; }
    .finance-document { margin-top: 10px; padding: 10px; border: 1px solid #e3e8ee; border-radius: 6px; background: #fff; }
    .finance-document-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 7px; color: #778496; font-size: 10px; }
    .finance-document-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; margin-top: 9px; font-size: 10px; }
    .finance-document-fields span { color: #6b7889; overflow-wrap: anywhere; }
    .finance-document-overview { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; padding: 12px; }
    .finance-document-overview-card { min-width: 0; overflow: hidden; border: 1px solid #dfe6ed; border-radius: 7px; background: #fff; }
    .finance-document-overview-card.warning { border-color: #efd18e; }
    .finance-document-overview-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; background: #f7f9fb; }
    .finance-document-overview-head strong { min-width: 0; overflow: hidden; color: #334257; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
    .finance-document-thumb { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 132px; min-height: 132px; padding: 0; overflow: hidden; border: 0; border-radius: 0; background: #edf2f6; color: #4d5d70; box-shadow: none; cursor: zoom-in; }
    .finance-document-thumb:hover { background: #e5eeeb; box-shadow: none; transform: none; }
    .finance-document-thumb img { width: 100%; height: 100%; object-fit: cover; }
    .finance-document-thumb.preview-failed img { width: auto; height: auto; padding: 12px; color: #657386; font-size: 10px; object-fit: contain; }
    .finance-document-thumb-file { display: grid; justify-items: center; gap: 6px; font-weight: 800; }
    .finance-document-thumb-file svg { width: 32px; height: 32px; }
    .finance-document-thumb-hint { position: absolute; right: 7px; bottom: 7px; padding: 3px 7px; border-radius: 999px; background: rgba(15, 23, 42, .76); color: #fff; font-size: 9px; font-weight: 700; }
    .finance-document-overview-body { padding: 10px; }
    .finance-document-overview-body h4 { margin: 0; overflow: hidden; color: #28384c; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
    .finance-document-overview-fields { display: grid; gap: 5px; margin-top: 8px; color: #657386; font-size: 9px; }
    .finance-document-overview-fields span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .finance-document-overview-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
    .finance-document-overview-actions button, .finance-document-overview-actions a { min-height: 28px; padding: 4px 8px; font-size: 9px; }
    .finance-document-detail { margin-top: 8px; border-top: 1px dashed #dbe2e8; }
    .finance-document-detail > summary { padding-top: 8px; color: #526174; cursor: pointer; font-size: 9px; font-weight: 700; }
    .finance-document-missing { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 12px 0; }
    .pmc-finance-document-viewer { position: fixed; inset: 0; z-index: 95; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; padding: 16px 70px; background: rgba(15, 23, 42, .91); }
    .pmc-finance-document-viewer.hidden { display: none; }
    .pmc-finance-document-viewer-stage { display: flex; align-items: center; justify-content: center; min-height: 0; overflow: hidden; }
    .pmc-finance-document-viewer-stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center center; transition: transform .18s ease; }
    .pmc-finance-document-viewer-stage iframe { width: min(1100px, 100%); height: 100%; border: 0; border-radius: 6px; background: #fff; }
    .pmc-finance-document-viewer-structured { width: min(1100px, 100%); max-height: 100%; overflow: auto; padding: 18px; border-radius: 6px; background: #fff; color: var(--text); }
    .pmc-finance-document-viewer-structured h3 { margin: 0 0 10px; }
    .pmc-finance-document-viewer-toolbar { display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; }
    .pmc-finance-document-viewer-toolbar strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .pmc-finance-document-viewer-rotate-tools { display: inline-flex; align-items: center; gap: 6px; }
    .pmc-finance-document-viewer-rotate-tools button { min-height: 30px; padding: 5px 10px; border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.14); color: #fff; font-size: 11px; box-shadow: none; }
    .pmc-finance-document-viewer-rotate-tools button:hover { background: rgba(255,255,255,.25); transform: none; }
    .pmc-finance-document-viewer-rotate-tools button:disabled { opacity: .45; cursor: default; }
    .pmc-finance-document-viewer-rotation { min-width: 58px; color: rgba(255,255,255,.82); font-size: 11px; text-align: center; }
    .pmc-finance-document-viewer-close { position: absolute; top: 14px; right: 18px; width: 42px; min-height: 42px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.94); color: #0f172a; font-size: 26px; box-shadow: 0 8px 24px rgba(0,0,0,.28); }
    .pmc-finance-document-viewer-nav { position: absolute; top: 50%; width: 46px; min-height: 58px; padding: 0; transform: translateY(-50%); background: rgba(255,255,255,.9); color: #0f172a; font-size: 28px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
    .pmc-finance-document-viewer-nav:hover { transform: translateY(-50%); }
    .pmc-finance-document-viewer-nav.previous { left: 14px; }
    .pmc-finance-document-viewer-nav.next { right: 14px; }
    .finance-line-wrap, .finance-check-wrap { overflow-x: auto; }
    .finance-check-table tr.fail td { background: #fff6f5; }
    .finance-check-table tr.warning td { background: #fffaf0; }
    .finance-check-table tr.manual_confirmed td { background: #f3fbf8; }
    .finance-check-guide { padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fbfcfd; color: #58687a; line-height: 1.6; }
    .finance-check-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; font-size: 10px; }
    .finance-check-cards { display: grid; gap: 10px; padding: 14px; }
    .finance-check-card { padding: 13px 14px; border: 1px solid #dfe6ed; border-left-width: 5px; border-radius: 7px; background: #fff; }
    .finance-check-card.pass, .finance-check-card.manual_confirmed { border-left-color: #4ca98d; background: #f7fcfa; }
    .finance-check-card.warning { border-left-color: #e0a33b; background: #fffbf2; }
    .finance-check-card.fail { border-left-color: #d85b53; background: #fff7f6; }
    .finance-check-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
    .finance-check-card-head h4 { margin: 0; color: #27364a; font-size: 12px; }
    .finance-check-message { margin: 8px 0 0; color: #46576b; line-height: 1.65; }
    .finance-check-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 10px; }
    .finance-check-value { padding: 9px 10px; border: 1px solid #e1e7ed; border-radius: 6px; background: rgba(255,255,255,.86); }
    .finance-check-value > span { display: block; margin-bottom: 5px; color: #718096; font-size: 10px; font-weight: 700; }
    .finance-check-value > strong, .finance-check-value-line { display: block; color: #28384c; line-height: 1.55; overflow-wrap: anywhere; }
    .finance-check-action { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 11px; padding-top: 10px; border-top: 1px dashed #d8e0e7; }
    .finance-check-action .muted { flex: 1 1 280px; line-height: 1.55; }
    .finance-check-reason-select { width: min(420px, 100%); min-height: 36px; background: #fff; font-weight: 700; }
    .pmc-finance-return-reasons { display: grid; gap: 8px; margin: 12px 0 16px; }
    .pmc-finance-return-option { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: flex-start; padding: 11px 12px; border: 1px solid #e0e6ed; border-radius: 7px; background: #fbfcfd; cursor: pointer; }
    .pmc-finance-return-option.fail { border-color: #efaaa5; background: #fff6f5; }
    .pmc-finance-return-option.warning { border-color: #efd18e; background: #fffaf0; }
    .pmc-finance-return-option input { width: auto; margin: 3px 0 0; }
    .pmc-finance-return-option strong, .pmc-finance-return-option span { display: block; }
    .pmc-finance-return-option span { margin-top: 3px; color: #526174; line-height: 1.55; }
    .pmc-finance-return-extra { width: 100%; min-height: 92px; resize: vertical; }
    .pmc-finance-supplier-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; margin: 14px 0; padding: 12px 14px; border: 1px solid #cfe0dc; border-radius: 7px; background: #f3f9f7; }
    .pmc-finance-supplier-summary span { color: #627083; }
    .pmc-finance-supplier-options { display: grid; gap: 8px; margin: 12px 0 16px; }
    .pmc-finance-supplier-option { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid #d9e2e9; border-radius: 7px; background: #fbfcfd; cursor: pointer; }
    .pmc-finance-supplier-option:has(input:checked) { border-color: #72ae9f; background: #f0faf7; box-shadow: inset 0 0 0 1px #72ae9f; }
    .pmc-finance-supplier-option input { width: auto; margin: 0; }
    .pmc-finance-supplier-option strong { display: block; color: #28384c; }
    .pmc-finance-supplier-option small { display: block; margin-top: 3px; color: #718096; }
    .finance-json { max-width: 260px; white-space: pre-wrap; overflow-wrap: anywhere; color: #5f6d80; font-size: 10px; }
    .finance-ocr-text { max-height: 240px; margin-top: 9px; padding: 10px; overflow: auto; border: 1px solid #e4e9ee; border-radius: 5px; background: #f8fafc; color: #566477; font-size: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
    .finance-events { display: grid; padding: 4px 14px 10px; }
    .finance-event { display: grid; grid-template-columns: 150px 100px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid #edf1f5; font-size: 10px; }
    .finance-event:last-child { border-bottom: 0; }
    .finance-empty { padding: 22px 14px; color: var(--muted); text-align: center; font-size: 11px; }
    .finance-empty.compact { padding: 12px; }
    .settlement-page { display: grid; gap: 14px; }
    .settlement-heading, .settlement-subhead { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
    .settlement-heading h3 { margin: 0 0 4px; color: #233247; font-size: 18px; }
    .settlement-create, .settlement-filter, .settlement-box, .settlement-work-card { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
    .settlement-create { padding: 16px; border-color: #b9d9d1; background: #f7fcfa; }
    .settlement-form-grid, .settlement-filter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
    .settlement-form-grid { margin: 14px 0; }
    .settlement-filter { grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 14px; }
    .settlement-filter label, .settlement-form-grid label { min-width: 0; }
    .settlement-filter-actions { display: flex; align-items: end; gap: 8px; }
    .settlement-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
    .settlement-summary > div { min-height: 74px; padding: 14px 16px; border-right: 1px solid var(--line); }
    .settlement-summary > div:last-child { border-right: 0; }
    .settlement-summary span, .settlement-aging span { display: block; color: var(--muted); font-size: 10px; }
    .settlement-summary strong { display: block; margin-top: 7px; color: #233247; font-size: 17px; }
    .settlement-summary.detail { margin: 12px 0; }
    .settlement-two-column { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }
    .settlement-box > .settlement-subhead, .settlement-work-card > .settlement-subhead { padding: 13px 15px; border-bottom: 1px solid var(--line); background: #f8fafc; }
    .settlement-queue { display: grid; gap: 7px; padding: 10px; max-height: 250px; overflow-y: auto; }
    .settlement-queue button { display: grid; gap: 3px; width: 100%; padding: 10px 12px; text-align: left; color: #8a302d; border: 1px solid #efb4af; background: #fff7f6; box-shadow: none; }
    .settlement-queue button span { color: #6d4e4c; font-size: 10px; font-weight: 500; }
    .settlement-aging { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); }
    .settlement-aging > div { min-height: 68px; padding: 12px; background: #fff; }
    .settlement-aging strong { display: block; margin-top: 7px; color: #26364b; }
    .settlement-box .table-shell { overflow-x: auto; }
    .settlement-list-table { min-width: 980px; }
    .settlement-list-table td { vertical-align: top; }
    .settlement-status { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 999px; color: #536174; background: #edf2f6; font-size: 10px; font-weight: 800; white-space: nowrap; }
    .settlement-status.paid, .settlement-status.approved, .settlement-status.closed { color: #11765f; background: #ddf4ed; }
    .settlement-status.partially_paid, .settlement-status.pending_finance, .settlement-status.pending { color: #9a6210; background: #fff0ce; }
    .settlement-status.exception, .settlement-status.overpaid, .settlement-status.overdue, .settlement-status.returned { color: #ad332d; background: #ffe4e1; }
    .compact-button { min-height: 32px; padding: 6px 10px; }
    .settlement-detail { scroll-margin-top: 82px; }
    .settlement-detail > .settlement-heading { padding: 15px; border-bottom: 1px solid var(--line); }
    .settlement-detail > .settlement-summary { margin: 14px; }
    .settlement-tabs-content { display: grid; gap: 12px; padding: 14px; }
    .settlement-work-card { overflow: hidden; }
    .settlement-work-card > .row, .settlement-work-card > .finance-empty { margin: 12px; }
    .settlement-alert, .settlement-ok { margin: 0 14px 14px; padding: 11px 13px; border-radius: 7px; line-height: 1.55; }
    .settlement-alert { color: #94352f; border: 1px solid #efaaa5; background: #fff6f5; }
    .settlement-alert strong { display: block; margin-bottom: 5px; }
    .settlement-alert.compact { margin: 8px 0; }
    .settlement-ok { color: #176d58; border: 1px solid #b9ded4; background: #f2faf7; }
    .settlement-inline-form, .settlement-payment-form { display: grid; grid-template-columns: 150px 150px minmax(180px, 1fr) 150px auto; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fafcfd; }
    .settlement-payment-form { grid-template-columns: 130px 120px 145px minmax(130px, 1fr) minmax(130px, 1fr) minmax(160px, 1.2fr) minmax(170px, 1fr) auto; }
    .settlement-file-input { display: grid; gap: 4px; align-content: center; color: var(--muted); font-size: 10px; }
    .settlement-file-input input { min-width: 0; }
    .settlement-file-list { display: grid; gap: 1px; background: var(--line); }
    .settlement-file-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: #fff; }
    .settlement-file-list strong, .settlement-file-list span { display: block; }
    .settlement-file-list span { margin-top: 3px; color: var(--muted); font-size: 10px; }
    .settlement-review-row { background: #fff9eb; }
    .settlement-classify { display: flex; align-items: center; gap: 6px; min-width: 260px; }
    .settlement-classify select { min-width: 150px; }
    .settlement-schedule { display: grid; }
    .settlement-schedule > div { display: grid; grid-template-columns: 34px 160px 180px 180px 90px auto; gap: 8px; align-items: center; padding: 9px 12px; border-bottom: 1px solid #edf1f5; }
    .settlement-schedule-index { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: #fff; background: var(--primary); font-weight: 800; }
    .settlement-payment { padding: 12px 14px; border-top: 1px solid var(--line); }
    .settlement-payment:first-of-type { border-top: 0; }
    .settlement-payment-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
    .settlement-payment-head strong, .settlement-payment-head span { display: block; }
    .settlement-payment-head div > span { margin-top: 4px; color: var(--muted); font-size: 10px; }
    .settlement-allocation { display: flex; flex-wrap: wrap; gap: 7px; margin: 9px 0; }
    .settlement-allocation > span { padding: 5px 8px; border-radius: 5px; color: #45566b; background: #f0f4f7; font-size: 10px; }
    .settlement-log { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
    .settlement-log summary { padding: 12px 14px; cursor: pointer; background: #f8fafc; font-weight: 800; }
    .settlement-log > div { display: grid; grid-template-columns: 150px minmax(0, 1fr) 120px; gap: 10px; padding: 9px 14px; border-top: 1px solid #edf1f5; font-size: 10px; }
    .finance-return-box { min-width: 260px; }
    .sidebar-backdrop { display: none; min-height: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
    .auth-mode .sidebar, .auth-mode .page-context, .auth-mode .header-context, .auth-mode .header-user { display: none; }
    .auth-mode .app-shell { grid-template-columns: minmax(0, 520px); justify-content: center; padding-top: 64px; }
    .auth-mode .brand-link { min-width: 0; }
    .back-to-top { position: fixed; right: 22px; bottom: 22px; z-index: 24; width: 44px; min-height: 44px; padding: 0; border-radius: 50%; background: var(--secondary); box-shadow: 0 10px 26px rgba(15, 23, 42, .18); }
    ::-webkit-scrollbar { width: 10px; height: 10px; }
    ::-webkit-scrollbar-thumb { background: #b7c5d4; border-radius: 999px; border: 2px solid #eef3f8; }
    ::-webkit-scrollbar-thumb:hover { background: #8fa1b5; }
    @media (max-width: 900px) {
      header.app-header { min-height: 58px; padding: 0 14px; }
      .brand-link { min-width: 0; }
      .brand-copy span, .header-context { display: none; }
      .mobile-menu-button { display: inline-flex; }
      .app-shell { width: 100%; padding: 14px 12px 64px; display: block; }
      .sidebar { position: fixed; top: 58px; bottom: 0; left: 0; z-index: 40; width: min(286px, 88vw); max-height: none; margin: 0; overflow-y: auto; overscroll-behavior-y: contain; border-width: 0 1px 0 0; border-radius: 0; transform: translateX(-105%); transition: transform .2s ease; }
      body.sidebar-open .sidebar { transform: translateX(0); }
      .sidebar-backdrop { position: fixed; inset: 58px 0 0; z-index: 35; background: rgba(15, 23, 42, .32); }
      body.sidebar-open .sidebar-backdrop { display: block; }
      nav { display: grid; min-width: 0; }
      .page-context { align-items: flex-start; padding: 1px 2px 12px; }
      .page-context-actions { display: none; }
      .dashboard-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .dashboard-grid { grid-template-columns: 1fr; }
      section { padding: 14px; }
      .grid, .cards, .product-facts, .contact-layout, .precheck-progress-steps, .precheck-stat-grid { grid-template-columns: 1fr; }
      .reconciliation-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .reconciliation-overview > button { grid-column: 1 / -1; }
      .reconciliation-table-shell { max-height: min(56vh, 500px); }
      .price-toolbar { grid-template-columns: 1fr; }
      .price-detail-actions { align-items: stretch; }
      .price-detail-actions input { width: 100%; }
      .row { align-items: stretch; }
      .row > button { flex: 0 0 auto; }
      .back-to-top { right: 14px; bottom: 14px; }
      .monitor-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .monitor-actions { grid-column: 1 / -1; }
      .monitor-rest-row { grid-template-columns: minmax(110px, 1fr) 18px minmax(110px, 1fr) 38px; }
      .monitor-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .monitor-metric:nth-child(3) { border-right: 0; }
      .monitor-analysis { grid-template-columns: 1fr; }
      .monitor-summary-panel { border-right: 0; border-bottom: 1px solid var(--line); max-height: 330px; }
      .monitor-chart-panel { min-height: 330px; }
      .finance-create-grid, .finance-toolbar, .finance-report-filters { grid-template-columns: 1fr; }
      .settlement-form-grid, .settlement-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .settlement-two-column { grid-template-columns: 1fr; }
      .settlement-inline-form, .settlement-payment-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .settlement-schedule > div { grid-template-columns: 32px minmax(120px, 1fr) minmax(110px, 1fr); }
      .finance-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .finance-summary-item:nth-child(even) { border-right: 0; }
      .finance-doc-grid { grid-template-columns: 1fr; }
      .finance-blacklake-grid { grid-template-columns: 1fr; }
      .finance-document-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px; }
      .pmc-finance-document-viewer { padding: 12px 52px; }
      .finance-check-values { grid-template-columns: 1fr; }
      .finance-case-head { flex-direction: column; }
      .finance-case-actions { justify-content: flex-start; }
      .finance-event { grid-template-columns: 1fr; gap: 3px; }
    }
    @media (max-width: 560px) {
      .brand-copy strong { font-size: 14px; }
      .user-copy { display: none; }
      .page-context h1 { font-size: 18px; white-space: normal; }
      .dashboard-welcome { align-items: flex-start; padding: 15px; }
      .dashboard-date { display: none; }
      .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .dashboard-metric { min-height: 100px; padding: 12px; }
      .dashboard-shortcuts { grid-template-columns: 1fr; }
      .monitor-heading { align-items: flex-start; }
      .monitor-toolbar { grid-template-columns: 1fr; }
      .monitor-actions { grid-column: auto; }
      .monitor-rest-row { width: 100%; grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr) 36px; }
      .monitor-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .monitor-metric { border-right: 1px solid var(--line); }
      .monitor-metric:nth-child(even) { border-right: 0; }
      .finance-document-overview { grid-template-columns: 1fr; }
      .settlement-form-grid, .settlement-filter, .settlement-summary { grid-template-columns: 1fr; }
      .settlement-summary > div { border-right: 0; border-bottom: 1px solid var(--line); }
      .settlement-summary > div:last-child { border-bottom: 0; }
      .settlement-aging, .settlement-inline-form, .settlement-payment-form { grid-template-columns: 1fr; }
      .settlement-schedule > div { grid-template-columns: 28px 1fr; }
      .pmc-finance-document-viewer { padding: 10px 42px; }
      .pmc-finance-document-viewer-nav { width: 38px; min-height: 48px; }
      .pmc-finance-document-viewer-nav.previous { left: 3px; }
      .pmc-finance-document-viewer-nav.next { right: 3px; }
    }
  
