:root {
  color-scheme: light;
  --navy: #18324b;
  --blue: #1f6feb;
  --blue-soft: #eaf2ff;
  --ink: #152233;
  --muted: #677589;
  --line: #dfe5ec;
  --surface: #ffffff;
  --background: #f3f6f9;
  --success: #13795b;
  --warning: #a96700;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); }
button, input, select, textarea { font: inherit; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 16px; display: flex; flex-direction: column; overflow: hidden; background: var(--navy); color: #fff; }
.brand { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 4px 8px 26px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(135deg,#ff8a34,#f05f2f); font-size: 23px; font-weight: 800; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 17px; }
.brand span { margin-top: 3px; color: #b9c8d5; font-size: 12px; }
nav { min-height: 0; flex: 1 1 auto; display: grid; align-content: start; gap: 7px; margin-top: 24px; padding: 0 5px 8px 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.28) transparent; }
nav::-webkit-scrollbar { width: 6px; }
nav::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(255,255,255,.28); }
nav::-webkit-scrollbar-track { background: transparent; }
.nav-item { width: 100%; padding: 13px 12px; display: grid; grid-template-columns: 27px 1fr auto; align-items: center; border: 0; border-radius: 9px; background: transparent; color: #d7e1ea; text-align: left; cursor: pointer; }
.nav-item span { font-weight: 700; color: #91a8bc; }
.nav-item.active { background: #ffd54f; color: var(--navy); font-weight: 700; box-shadow: 0 2px 10px rgba(0,0,0,.16); }
.nav-item.active span { color: var(--navy); }
.nav-item em { font-size: 10px; font-style: normal; color: #8396a7; }
.nav-item.muted { cursor: default; opacity: .72; }
.nav-group { min-width: 0; }
.nav-group-title { list-style: none; width: 100%; padding: 13px 12px; display: grid; grid-template-columns: 27px 1fr auto; align-items: center; border-radius: 9px; color: #d7e1ea; cursor: pointer; user-select: none; }
.nav-group-title::-webkit-details-marker { display: none; }
.nav-group-title span { color: #91a8bc; font-weight: 700; }
.nav-group-title::after { content: "⌄"; color: #91a8bc; transition: transform .15s ease; }
.nav-group[open] .nav-group-title::after { transform: rotate(180deg); }
.nav-group[open] .nav-group-title, .nav-group-title:hover { background: rgba(72,145,255,.12); }
.nav-group:has(.nav-item.active) .nav-group-title { color: #fff; }
.nav-group-title:focus-visible { outline: 2px solid #91bfff; outline-offset: 2px; }
.nav-group-items { display: grid; gap: 4px; margin: 3px 0 4px 20px; padding-left: 7px; border-left: 1px solid rgba(255,255,255,.16); }
.nav-group-items .nav-item { padding: 10px 9px; font-size: 14px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.office-identity { font-size: 13px; color: #37516a; font-weight: 600; }
.auth-page { min-height: 100vh; display: grid; place-items: center; background: #eef3f8; padding: 20px; }
.auth-card { width: min(100%, 420px); background: #fff; padding: 32px; border: 1px solid #dce5ee; border-radius: 16px; box-shadow: 0 14px 45px #1d3e6517; }
.auth-card h1 { margin: 12px 0 6px; font-size: 24px; }
.auth-card > p { color: #5c7084; }
.auth-demo-entry { margin: 20px 0 0; text-align: center; font-size: 13px; }
.auth-demo-entry a { color: #176bd8; font-weight: 700; }
.auth-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #1967d2; color: #fff; font-weight: 700; }
.auth-form { display: grid; gap: 13px; margin-top: 20px; }
.staff-password-form { padding: 0 22px 22px; }
.staff-password-form .dialog-actions { padding: 16px 0 0; }
.staff-password-message { color: #a33f37 !important; }
.staff-password-message.success { color: #14715a !important; }
.mfa-dialog-content { padding: 20px 22px 24px; overflow-y: auto; }
.mfa-dialog-content > p { margin: 0 0 12px; color: #4f6479; line-height: 1.6; }
.mfa-dialog-content .dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.mfa-secret, .mfa-recovery-codes { display: block; padding: 14px; border: 1px solid #cbd8e5; border-radius: 8px; background: #f4f8fc; color: #173c62; overflow-wrap: anywhere; white-space: pre-wrap; }
.mfa-secret { font-size: 17px; letter-spacing: 1px; }
.mfa-recovery-codes { font-size: 15px; line-height: 1.8; }
.assistant-panel { padding-bottom: 24px; }
.assistant-scope-note { margin: 18px 24px 0; color: #52677d; line-height: 1.6; }
.assistant-prompts { display: flex; gap: 9px; flex-wrap: wrap; margin: 20px 24px; }
.assistant-prompts button { padding: 8px 12px; border: 1px solid #c8d8e8; border-radius: 20px; background: #f3f8fc; color: #25517c; cursor: pointer; }
.assistant-prompts button:hover { background: #e5f1fd; }
.assistant-messages { display: grid; align-content: start; gap: 13px; min-height: 180px; max-height: 48vh; overflow-y: auto; margin: 0 24px; padding: 18px; border: 1px solid #dbe5ef; border-radius: 12px; background: #f8fbfe; }
.assistant-empty { margin: 0; color: #6c7e90; }
.assistant-message { max-width: min(740px, 100%); padding: 13px 16px; border-radius: 12px; background: white; border: 1px solid #e0e8f0; }
.assistant-message.question { justify-self: end; background: #eaf3ff; border-color: #c9ddf7; }
.assistant-message strong { display: block; font-size: 13px; color: #244d76; }
.assistant-query-conditions { margin-top: 8px; padding: 6px 9px; border-radius: 6px; background: #f0f6fc; color: #315a7a; font-size: 13px; line-height: 1.5; }
.assistant-message p { margin: 7px 0 0; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-message.with-overview { max-width: min(980px, 100%); width: 100%; box-sizing: border-box; }
.assistant-overview { display: grid; gap: 10px; margin-top: 10px; }
.assistant-overview h3 { margin: 0; font-size: 17px; color: #173b60; }
.assistant-overview-time { color: #657c90; font-size: 12px; }
.assistant-overview-card { padding: 13px; border: 1px solid #d5e3f2; border-radius: 10px; background: #f9fcff; }
.assistant-overview-card h4 { margin: 0 0 7px; color: #1c4b77; font-size: 15px; }
.assistant-overview-metrics { display: flex; gap: 7px 18px; flex-wrap: wrap; font-weight: 700; color: #123d69; }
.assistant-overview-formula { margin-top: 8px; color: #48647d; font-size: 12px; }
.assistant-overview-formula summary { width: fit-content; cursor: pointer; color: #1769b0; }
.assistant-overview-formula p { margin: 5px 0 0; }
.assistant-overview-list { display: grid; gap: 0; margin: 9px 0 0; padding: 0; list-style: none; }
.assistant-overview-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid #e3ebf3; }
.assistant-overview-list li span { min-width: 0; overflow-wrap: anywhere; }
.assistant-overview-list li strong, .assistant-overview-list li small { display: block; }
.assistant-overview-list li small { margin-top: 3px; color: #60758a; font-weight: 400; }
.assistant-overview-list a, .assistant-overview-card > a { flex: none; color: #1769b0; font-size: 13px; }
.assistant-message .assistant-overview-note, .assistant-message .assistant-overview-footnote { margin: 9px 0 0; color: #61758a; font-size: 12px; }
.assistant-message .assistant-overview-footnote { margin-top: 1px; }
.assistant-raw-answer { margin-top: 10px; color: #315a7a; font-size: 13px; }
.assistant-raw-answer summary { cursor: pointer; }
.assistant-message small { display: block; margin-top: 9px; color: #647b90; }
.assistant-sources { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 9px; }
.assistant-sources a { color: #1769b0; font-size: 13px; }
.assistant-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 12px; color: #5b7187; font-size: 12px; }
.assistant-feedback[hidden], .assistant-feedback-review[hidden] { display: none !important; }
.assistant-feedback button { padding: 4px 10px; border: 1px solid #cbd8e5; border-radius: 15px; background: #fff; color: #24547c; cursor: pointer; }
.assistant-feedback button:hover { background: #edf5fc; }
.assistant-feedback button:disabled { opacity: .6; cursor: wait; }
.assistant-feedback-review { margin: 14px 24px 20px; padding: 12px; border: 1px solid #d5e3f2; border-radius: 10px; background: #f9fcff; }
.assistant-feedback-review summary { cursor: pointer; color: #25517c; font-weight: 700; }
.assistant-feedback-review p { color: #61758a; font-size: 12px; }
.assistant-feedback-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #e3ebf3; font-size: 13px; }
.assistant-feedback-row button { border: 1px solid #cbd8e5; border-radius: 7px; background: #fff; color: #24547c; cursor: pointer; }
.assistant-quick-panel { margin-top: 16px; padding: 14px 20px; }
.assistant-quick-panel h2 { margin: 0 0 6px; font-size: 17px; }
.assistant-quick-panel p { margin: 0 0 10px; color: #60758a; font-size: 13px; }
.assistant-quick-panel .assistant-prompts { margin: 0; }
.assistant-form { display: grid; gap: 9px; margin: 18px 24px 0; }
.assistant-form label { font-weight: 700; color: #29415a; }
.assistant-form textarea { box-sizing: border-box; width: 100%; min-height: 88px; padding: 12px; border: 1px solid #cbd8e5; border-radius: 9px; resize: vertical; font: inherit; }
.assistant-keyboard-hint { color: #5e7388; font-size: 12px; }
.assistant-contract-suggestions { display: grid; gap: 3px; max-height: 210px; overflow-y: auto; padding: 7px; border: 1px solid #cbd8e5; border-radius: 9px; background: #fff; box-shadow: 0 8px 20px #17324b12; }
.assistant-contract-suggestions[hidden] { display: none; }
.assistant-contract-suggestion-caption { padding: 5px 8px; color: #61758a; font-size: 12px; }
.assistant-contract-suggestions .assistant-contract-suggestion { justify-self: stretch; padding: 9px 10px; border: 0; border-radius: 6px; background: transparent; color: #1b4166; text-align: left; cursor: pointer; }
.assistant-contract-suggestion strong, .assistant-contract-suggestion small { display: block; margin: 0; }
.assistant-contract-suggestion small { margin-top: 3px; color: #60758a; font-size: 12px; }
.assistant-contract-suggestions .assistant-contract-suggestion:hover, .assistant-contract-suggestions .assistant-contract-suggestion:focus-visible { background: #eaf2ff; outline: none; }
.assistant-linked-row { outline: 3px solid #f4bb35; outline-offset: -3px; background: #fff8dd !important; }
@media (max-width: 640px) {
  .assistant-overview-list li { align-items: flex-start; flex-direction: column; }
  .assistant-overview-list a { align-self: flex-start; }
}
.assistant-form button { justify-self: end; }
.staff-page .assistant-panel .assistant-prompts, .staff-page .assistant-panel .assistant-messages, .staff-page .assistant-panel .assistant-form { margin-left: 0; margin-right: 0; }
.auth-form label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: #29415a; }
.auth-form input, .auth-form select, .auth-form textarea { box-sizing: border-box; width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #cbd8e5; border-radius: 8px; font: inherit; }
.auth-form p { margin: 0; color: #687b8e; font-size: 12px; }
.auth-error { min-height: 22px; color: #b64035; font-size: 13px; }
.staff-page { min-height: 100vh; background: #eef3f8; }
.staff-shell { max-width: 1500px; margin: auto; padding: 24px 32px 46px; }
.staff-main { min-width: 0; }
.staff-topbar { height: auto; min-height: 86px; padding-top: 14px; padding-bottom: 14px; gap: 18px; }
.staff-header { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 20px; }
.staff-header strong { font-size: 22px; }
.staff-header p { color: #687b8e; margin: 5px 0 0; }
.staff-header > div:last-child { display: flex; gap: 12px; align-items: center; }
.staff-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.staff-grid .panel { padding: 22px; }
.staff-grid h2, .staff-history h2 { margin: 0 0 16px; }
.staff-grid h3 { margin: 24px 0 0; font-size: 16px; }
#staffExpenseSection { width: 100%; max-width: 1120px; margin-inline: auto; box-sizing: border-box; }
#staffExpenseSection h2 { margin-bottom: 18px; padding-bottom: 15px; border-bottom: 1px solid #e4ebf3; }
#staffExpenseSection .table-wrap { border: 1px solid #e1e9f2; border-radius: 10px; }
#staffExpenseSection .table-wrap table { min-width: 0; table-layout: fixed; }
#staffExpenseSection .table-wrap th, #staffExpenseSection .table-wrap td { padding: 12px 14px; }
#staffExpenseSection .table-wrap td[colspan] { padding: 22px 14px; color: #6b7f94; text-align: center; }
#staffExpenseSection h3 { margin: 24px 0 0; padding-top: 22px; border-top: 1px solid #e4ebf3; }
#staffExpenseForm.auth-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 20px; margin-top: 18px; padding: 20px; border: 1px solid #dce8f4; border-radius: 12px; background: #f8fbff; }
#staffExpenseForm label { min-width: 0; gap: 7px; font-size: 13px; }
#staffExpenseForm :is(input, textarea) { min-width: 0; background: #fff; }
#staffExpenseForm textarea { min-height: 82px; resize: vertical; }
#staffExpenseForm .staff-expense-full { grid-column: 1 / -1; }
#staffExpenseForm .button { justify-self: end; min-width: 166px; padding-inline: 18px; }
@media (max-width: 720px) {
  #staffExpenseSection { padding: 16px; }
  #staffExpenseSection .table-wrap table { min-width: 620px; }
  #staffExpenseForm.auth-form { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px; }
  #staffExpenseForm .staff-expense-full { grid-column: auto; }
  #staffExpenseForm .button { justify-self: stretch; }
}
.staff-history { margin-top: 16px; padding: 22px; }
.staff-shell > [data-staff-view]:first-of-type { margin-top: 0; }
.staff-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.staff-overview > div { border: 1px solid var(--line); border-radius: 10px; padding: 18px; background: #f8fbff; }
.staff-overview span, .staff-overview strong { display: block; }
.staff-overview span { color: var(--muted); font-size: 13px; }
.staff-overview strong { margin-top: 8px; font-size: 26px; }
.staff-personnel-profile strong { font-size: 19px; overflow-wrap: anywhere; }
.staff-workflow-view { min-width: 0; }
.staff-workflow-view .workflow-map-panel { padding: 0 0 22px; }
.staff-workflow-view .workflow-map { margin: 0 22px; }
.staff-workflow-view .workflow-list-panel { overflow: hidden; }
.staff-workflow-view .workflow-filters input { min-width: 210px; }
.staff-workflow-view .workflow-table { min-width: 1080px; }
.staff-workflow-view .workflow-table th, .staff-workflow-view .workflow-table td { padding: 11px 9px; vertical-align: top; }
.staff-workflow-view .workflow-table td:first-child { min-width: 175px; }
.staff-workflow-view .workflow-table td:first-child strong { display: block; }
.staff-workflow-view .workflow-table td small { display: block; margin-top: 4px; color: var(--muted); font-weight: 400; }
.staff-scope-note { margin: 8px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.staff-header + .staff-history { margin-top: 0; }
.staff-history:not(.hidden) + .staff-grid { margin-top: 16px; }
.staff-suggestions { display: grid; gap: 4px; max-height: 160px; overflow: auto; }
.staff-suggestions button { border: 1px solid #dce5ee; background: #f7faff; border-radius: 6px; padding: 8px; text-align: left; cursor: pointer; }
.staff-suggestions button:hover, .staff-suggestions button:focus-visible { border-color: #78a9e7; background: #edf5ff; }
.staff-suggestions button strong, .staff-suggestions button small { display: block; }
.staff-suggestions button small { margin-top: 3px; color: #657b8f; }
.auth-form .staff-contract-match-status { margin-top: -7px; line-height: 1.5; }
.auth-form .staff-contract-match-status.matched { color: #14715a; }
.auth-form .staff-contract-match-status.unmatched { color: #a56018; }
.auth-form .staff-invoice-reuse-status { padding: 9px 11px; border: 1px solid #b9d9ca; border-radius: 7px; background: #f1faf5; color: #14715a; line-height: 1.5; }
.staff-project-view { margin-top: 0; }
.staff-project-view .summary-card strong { overflow-wrap: anywhere; }
.staff-project-panel { padding: 0 0 18px; }
.staff-project-panel .staff-scope-note { margin: 10px 22px 16px; }
.staff-project-panel .staff-related-heading { padding: 20px 22px 8px; }
.staff-project-panel .staff-related-heading input { width: min(100%, 320px); min-height: 38px; padding: 8px 10px; border: 1px solid #cfd7df; border-radius: 7px; }
.staff-project-table { min-width: 1160px; }
.staff-project-table th, .staff-project-table td { padding: 12px 10px; }
.staff-project-table td:first-child { min-width: 170px; font-weight: 600; }
.staff-project-table td:nth-child(2) { min-width: 135px; }
.staff-project-table td:nth-child(n+4):nth-child(-n+7) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.staff-project-table button { padding: 5px 9px; border: 1px solid #b9d1f3; border-radius: 6px; background: #eef5ff; color: #175dbd; cursor: pointer; }
.staff-project-actions { display: grid; justify-items: start; gap: 6px; }
.staff-project-actions .staff-project-open-detail { background: #e2f0ff; color: #124e9b; font-weight: 700; white-space: nowrap; }
.staff-project-contracts { padding: 10px 12px; background: #f8fbff; }
.staff-project-contracts table { min-width: 0; }
.staff-project-detail-dialog { width: min(1060px, calc(100vw - 32px)); }
.staff-project-detail { padding: 22px 24px 28px; max-height: min(72vh, 720px); overflow: auto; }
.staff-project-detail h3 { margin: 22px 0 10px; font-size: 16px; color: #183b5c; }
.staff-project-detail p { margin: 7px 0; color: #536a82; line-height: 1.6; }
.staff-project-detail .table-wrap { margin-top: 8px; border: 1px solid #e0e9f2; border-radius: 9px; }
.staff-project-detail table { min-width: 650px; }
.staff-project-detail .staff-project-detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.staff-project-detail-summary > div { padding: 14px; border: 1px solid #dce7f3; border-radius: 9px; background: #f6faff; }
.staff-project-detail-summary span, .staff-project-detail-summary strong { display: block; }
.staff-project-detail-summary span { color: #58718a; font-size: 12px; }
.staff-project-detail-summary strong { margin-top: 6px; color: #183b5c; font-size: 19px; overflow-wrap: anywhere; }
@media (max-width: 700px) { .staff-project-detail .staff-project-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .staff-project-view .legacy-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .staff-project-view .legacy-summary-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .staff-overview { grid-template-columns: 1fr; } .staff-topbar { align-items: flex-start; flex-direction: column; } .staff-shell { padding: 20px 18px 36px; } }
.side-note { flex: 0 0 auto; margin: 14px 8px 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.1); color: #91a1af; font-size: 12px; line-height: 1.7; }
main { min-width: 0; }
.topbar { height: 86px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; font-size: 22px; }
.topbar p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.system-state { padding: 8px 12px; border-radius: 999px; background: #edf8f4; color: var(--success); font-size: 12px; font-weight: 700; }
.system-state i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #20a77a; }
.content { width: min(1500px, 100%); margin: 0 auto; padding: 26px 32px 46px; }
.office-load-notice { margin-bottom: 18px; padding: 12px 16px; border: 1px solid #e9c7b5; border-left: 4px solid #d27850; border-radius: 8px; color: #7b3b23; background: #fff5ef; line-height: 1.6; }
.page-view { display: none; }
.page-view.active { display: block; }
.summary-grid.page-view.active { display: grid; }
.summary-grid.page-view:not(.active) { display: none; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 16px; }
.legacy-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 16px; }
.expense-summary-grid { grid-template-columns: repeat(2, minmax(170px, 1fr)); }
.seal-summary-grid { grid-template-columns: repeat(2, minmax(170px, 1fr)); }
.document-seal-summary-grid { grid-template-columns: repeat(3, minmax(170px, 1fr)); }
.backup-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 16px; }
.backup-summary-time { font-size: 17px !important; line-height: 1.35; }
.backup-disabled-state { color: #8a5b1c; }
.backup-center-panel { margin-top: 20px; }
.backup-safety-note { margin: 18px 22px 0; padding: 13px 15px; display: grid; gap: 5px; border: 1px solid #dce6f1; border-radius: 9px; background: #f5f9fe; }
.backup-safety-note strong { color: #214e78; font-size: 13px; }
.backup-safety-note span { color: var(--muted); font-size: 12px; line-height: 1.6; }
.backup-table { min-width: 980px; }
.backup-table .backup-download { text-decoration: none; }
.summary-card { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 3px 14px rgba(24,50,75,.04); }
.summary-card span, .summary-card small { display: block; color: var(--muted); }
.summary-card span { font-size: 13px; }
.summary-card strong { display: block; margin: 10px 0 5px; font-size: 25px; }
.summary-card small { font-size: 11px; }
.dashboard-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 16px; }
.dashboard-card { padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-align: left; box-shadow: 0 3px 14px rgba(24,50,75,.04); cursor: pointer; }
.dashboard-card:hover { border-color: #a9c7ec; transform: translateY(-1px); }
.dashboard-card span, .dashboard-card small { display: block; color: var(--muted); }
.dashboard-card span { font-size: 13px; }
.dashboard-card strong { display: block; margin: 10px 0 5px; font-size: 25px; }
.dashboard-card small { font-size: 11px; }
.dashboard-card.danger strong { color: #a33b35; }
.dashboard-card.warning strong { color: #9a5b00; }
.dashboard-task-panel { margin-top: 20px; }
.dashboard-task-table { min-width: 1060px; }
.dashboard-milestone-panel { margin-top: 20px; }
.dashboard-milestone-table { min-width: 1060px; }
.dashboard-milestone-summary { display: flex; flex-wrap: wrap; gap: 8px; }
.dashboard-milestone-summary .status strong { margin-left: 4px; }
.dashboard-milestone-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.dashboard-milestone-actions label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.dashboard-milestone-actions select { min-width: 145px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.dashboard-owner-milestone-panel { margin-top: 20px; }
.dashboard-owner-milestone-table { min-width: 1040px; }
.panel { margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 3px 14px rgba(24,50,75,.04); overflow: hidden; }
.panel-heading { padding: 20px 22px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; font-size: 17px; }
.panel-heading p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.contracts-heading-actions { display: flex; align-items: center; gap: 10px; }
#contractsPanel .contracts-heading { flex-wrap: wrap; }
#contractsPanel .contracts-heading-actions { flex-wrap: wrap; }
#contractsPanel .contract-manager-search-box { width: 250px; }
.settlement-heading-actions { flex-wrap: wrap; justify-content: flex-end; }
.settlement-heading-actions .settlement-search-box { width: min(240px, 25vw); min-width: 210px; }
.header-action { min-height: 39px; white-space: nowrap; }
.step-badge { padding: 6px 10px; border-radius: 7px; color: #1f5baa; background: var(--blue-soft); font-size: 11px; font-weight: 700; }
.upload-row { padding: 18px 22px; display: flex; align-items: stretch; gap: 10px; }
.file-picker { min-width: 340px; flex: 1; padding: 12px 14px; display: flex; align-items: center; gap: 13px; border: 1px dashed #aab8c6; border-radius: 9px; cursor: pointer; background: #fbfcfe; }
.file-picker input { display: none; }
.file-picker span { padding: 7px 10px; border-radius: 6px; background: var(--blue-soft); color: #1f5baa; font-size: 12px; font-weight: 700; }
.file-picker strong { color: var(--muted); font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.button { min-width: 108px; border: 0; border-radius: 8px; padding: 0 16px; font-weight: 700; cursor: pointer; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button.primary { background: var(--blue); color: #fff; }
.button.secondary { color: #24537e; background: #e9eff6; }
.import-result { margin: 0 22px 20px; padding: 14px; border-radius: 9px; background: #f7f9fb; border: 1px solid var(--line); font-size: 13px; }
.result-summary { display: flex; flex-wrap: wrap; gap: 18px; }
.result-summary strong { color: var(--navy); }
.result-errors { margin-top: 10px; color: #9a4d00; }
.result-corrections { margin-top: 10px; padding: 9px 11px; color: #14633e; background: #edf8f2; border-radius: 7px; }
.reconciliation-section, .payment-overview-section, .receivable-section, .receivable-analysis-section { margin: 0 22px 22px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; }
.reconciliation-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.reconciliation-heading h3 { margin: 0 0 5px; font-size: 17px; color: var(--ink); }
.reconciliation-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.reconciliation-totals { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.reconciliation-totals span { padding: 8px 11px; border-radius: 8px; background: #edf3fb; color: var(--muted); font-size: 12px; }
.reconciliation-totals strong { margin-left: 5px; color: var(--ink); }
.reconciliation-table-wrap { max-height: 470px; border: 1px solid var(--line); border-radius: 9px; }
.reconciliation-table { min-width: 1180px; }
.reconciliation-table td:last-child { min-width: 210px; color: var(--muted); }
.reconciliation-actions { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.match-explanation { display: grid; gap: 3px; min-width: 190px; max-width: 290px; line-height: 1.35; }
.match-explanation small { display: block; color: var(--muted); white-space: normal; overflow-wrap: anywhere; }
.match-explanation .match-warning { color: #a14e22; }
.match-score { display: inline-block; padding: 2px 6px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.match-score.high { color: #176445; background: #e4f5eb; }
.match-score.medium { color: #795400; background: #fff3d4; }
.match-score.low { color: #9b3d33; background: #fce9e6; }
.overview-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.overview-toolbar .reconciliation-totals { margin-bottom: 0; }
.table-search { min-width: 290px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.payment-overview-table-wrap { max-height: 470px; border: 1px solid var(--line); border-radius: 9px; }
.payment-overview-table { min-width: 1320px; }
.receivable-aging-grid { margin-bottom: 16px; display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 10px; }
.aging-card { min-height: 108px; padding: 13px 14px; border: 1px solid #dce5ef; border-radius: 9px; background: #fff; }
.aging-card span, .aging-card small { display: block; color: var(--muted); }
.aging-card span { font-size: 11px; font-weight: 700; }
.aging-card strong { display: block; margin: 8px 0 4px; color: #214e78; font-size: 17px; }
.aging-card small { font-size: 10px; }
.aging-bar { height: 5px; margin-top: 10px; border-radius: 999px; background: #e8eef5; overflow: hidden; }
.aging-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4a8de4, #77a9e8); }
.owner-analysis-table-wrap { max-height: 380px; border: 1px solid var(--line); border-radius: 9px; }
.owner-analysis-table { min-width: 900px; }
.owner-amount { min-width: 190px; }
.owner-amount strong { display: block; }
.owner-amount-bar { display: block; width: 100%; height: 4px; margin-top: 6px; border-radius: 999px; background: #e8eef5; overflow: hidden; }
.owner-amount-bar i { display: block; height: 100%; border-radius: inherit; background: #5f96df; }
.receivable-table-wrap { max-height: 470px; border: 1px solid var(--line); border-radius: 9px; }
.receivable-table { min-width: 1280px; }
.receivable-note { max-width: 260px; color: var(--muted); line-height: 1.45; }
.receivable-filters { display: flex; align-items: center; gap: 9px; }
.receivable-filters select { min-width: 155px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.receivable-batch-toolbar { margin-bottom: 12px; padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #dce6f1; border-radius: 9px; background: #f5f9fe; }
.receivable-batch-toolbar strong, .receivable-batch-toolbar span { display: block; }
.receivable-batch-toolbar strong { color: #214e78; font-size: 13px; }
.receivable-batch-toolbar span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.checkbox-cell { width: 42px; min-width: 42px; text-align: center; }
.checkbox-cell input { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }
.status.overdue { background: #fdeaea; color: #a33b35; }
.status.due-soon { background: #fff0d8; color: #9a5b00; }
.receivable-history-section { padding: 0; overflow: visible; }
.receivable-history-section .audit-heading { padding-top: 4px; }
.row-count { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 400; }
.search-box { width: 310px; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfd; }
.search-box span { color: #718196; font-size: 18px; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1060px; }
th, td { padding: 13px 15px; border-bottom: 1px solid #e7ebef; text-align: left; vertical-align: middle; }
th { color: #607084; background: #f7f9fb; font-size: 12px; font-weight: 700; }
td { font-size: 12px; }
tbody tr:hover { background: #f8fbff; }
td.number, th.number { text-align: right; font-variant-numeric: tabular-nums; }
.contract-name { max-width: 310px; font-weight: 600; line-height: 1.45; }
.contract-report { max-width: 220px; min-width: 120px; line-height: 1.45; overflow-wrap: anywhere; }
.unit-name { max-width: 220px; color: #46576a; }
.status { display: inline-block; padding: 5px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status.confirmed { background: #e8f6f1; color: var(--success); }
.status.draft { background: #fff3dc; color: var(--warning); }
.status.ready { background: #e8f6f1; color: #13795b; }
.status.review { background: #eaf2ff; color: #1f5baa; }
.status.warning { background: #fdeaea; color: #a33b35; }
.detail-button { border: 0; color: var(--blue); background: transparent; font-weight: 700; cursor: pointer; }
.row-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.empty { height: 180px; text-align: center; color: #8a97a5; }
.pagination { padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; }
.page-button { margin-left: 6px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.page-button:disabled { color: #adb7c1; cursor: not-allowed; }
dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 50px); padding: 0; border: 0; border-radius: 13px; box-shadow: 0 22px 65px rgba(17,32,49,.25); overflow: hidden; }
.wide-dialog { width: min(920px, calc(100vw - 32px)); }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: rgba(20,35,51,.42); }
.dialog-heading { padding: 20px 22px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog-heading span { color: var(--muted); font-size: 12px; }
.dialog-heading h2 { margin: 5px 0 0; font-size: 18px; }
.dialog-heading button { border: 0; background: transparent; font-size: 27px; color: #718196; cursor: pointer; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; padding: 10px 22px 25px; overflow-y: auto; }
.contract-payment-detail-content { overflow-y: auto; }
.compact-detail-grid { grid-template-columns: repeat(3, 1fr); padding-bottom: 12px; overflow: visible; }
.payment-detail-section { overflow: visible; }
.detail-item { padding: 13px 0; border-bottom: 1px solid #edf0f3; }
.detail-item:nth-child(odd) { padding-right: 22px; }
.detail-item span, .detail-item strong { display: block; }
.detail-item span { color: var(--muted); font-size: 11px; }
.detail-item strong { margin-top: 5px; font-size: 13px; line-height: 1.5; }
.audit-section { padding: 0 22px 18px; overflow-y: auto; }
.entry-audit-section, #expenseClaimAuditSection, #expenseLedgerAuditSection, #costInvoiceAuditSection, #settlementEntryAuditSection, #financeEntryAuditSection, #invoiceEntryAuditSection, #paymentAuditSection, #operationalRecordAuditSection { max-height: 190px; }
.audit-heading { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 10px; border-top: 1px solid var(--line); }
.audit-heading h3 { margin: 0; font-size: 14px; }
.audit-heading span { color: var(--muted); font-size: 11px; }
.audit-list { display: grid; gap: 9px; }
.audit-entry { padding: 10px 12px; border: 1px solid #e2e8ef; border-radius: 8px; background: #f8fafc; }
.audit-entry-top { display: flex; justify-content: space-between; gap: 12px; }
.audit-entry strong { color: #214e78; font-size: 12px; }
.audit-entry time { color: var(--muted); font-size: 11px; }
.audit-entry p { margin: 6px 0 0; color: #435568; font-size: 12px; line-height: 1.5; }
.audit-entry small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.audit-empty { padding: 13px; border-radius: 8px; background: #f6f8fa; color: var(--muted); font-size: 12px; text-align: center; }
.dialog-actions { padding: 16px 22px 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); }
.dialog-actions .button { min-height: 40px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; padding: 20px 22px; max-height: 62vh; overflow-y: auto; }
.form-grid label { display: grid; gap: 7px; color: #536477; font-size: 12px; font-weight: 700; }
.form-grid label.wide { grid-column: 1 / -1; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; padding: 10px 11px; border: 1px solid #cfd7df; border-radius: 7px; outline: 0; color: var(--ink); background: #fff; resize: vertical; }
.form-grid input[readonly] { color: #45596d; background: #edf1f5; cursor: not-allowed; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: #5992df; box-shadow: 0 0 0 3px rgba(31,111,235,.10); }
.project-table { min-width: 760px; }
.project-summary-grid { margin-bottom: 18px; }
.project-portfolio-panel { margin-top: 0; }
.portfolio-heading-actions { flex-wrap: wrap; justify-content: flex-end; }
.portfolio-heading-actions select { min-width: 135px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.portfolio-heading-actions .search-box { width: 300px; }
.project-portfolio-scroll-guide { padding: 8px 14px 2px; color: #56738d; font-size: 11px; }
.project-portfolio-top-scroll { height: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-color: #8fb6da #eaf1f8; scrollbar-width: auto; }
.project-portfolio-top-scroll-content { height: 1px; }
.project-portfolio-table-wrap { max-height: none; }
.project-portfolio-table { width: 100%; min-width: 1120px; table-layout: fixed; }
.project-portfolio-table th:nth-child(1) { width: 15%; }
.project-portfolio-table th:nth-child(2) { width: 10%; }
.project-portfolio-table th:nth-child(3) { width: 5%; }
.project-portfolio-table th:nth-child(4) { width: 4%; }
.project-portfolio-table th:nth-child(5) { width: 7%; }
.project-portfolio-table th:nth-child(6) { width: 6.5%; }
.project-portfolio-table th:nth-child(7) { width: 7%; }
.project-portfolio-table th:nth-child(8) { width: 8.5%; }
.project-portfolio-table th:nth-child(9) { width: 7.5%; }
.project-portfolio-table th:nth-child(10) { width: 10.5%; }
.project-portfolio-table th:nth-child(11) { width: 6%; }
.project-portfolio-table th:nth-child(12) { width: 13%; }
.project-portfolio-table td { white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.project-portfolio-table td:first-child, .project-portfolio-table td:nth-child(2) { max-width: none; line-height: 1.45; }
#projectsPanel .project-portfolio-table th { padding: 8px 5px; font-size: 11px; white-space: normal; }
#projectsPanel .project-portfolio-table td { padding: 6px 5px; vertical-align: middle; line-height: 1.3; font-size: 12px; }
#projectsPanel .project-portfolio-table td.number { font-size: 11px; }
#projectsPanel .project-portfolio-table td:last-child { white-space: nowrap; overflow-wrap: normal; }
#projectsPanel .project-portfolio-table .row-actions { display: flex; flex-wrap: nowrap; gap: 3px; }
#projectsPanel .project-portfolio-table .business-row-review { margin-left: 0; vertical-align: middle; }
#projectsPanel .project-portfolio-table .business-row-unlock { margin-left: 4px; vertical-align: middle; }
.portfolio-name-link { max-width: 100%; padding: 0; border: 0; background: transparent; color: var(--blue); font: inherit; font-weight: inherit; line-height: inherit; text-align: left; white-space: normal; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.portfolio-name-link:hover { color: #124c9c; }
.portfolio-name-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
.portfolio-count-pair { display: grid; gap: 4px; color: #42566b; }
.portfolio-count-pair small { color: var(--muted); }
.portfolio-review-state { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; white-space: normal; }
.portfolio-review-state small { order: 2; flex-basis: 100%; color: var(--muted); font-size: 10px; line-height: 1.3; }
.portfolio-review-manual { display: flex; flex-wrap: wrap; gap: 5px; }
#projectsPanel .portfolio-review-manual { order: 1; }
.portfolio-review-manual span { padding: 3px 6px; border-radius: 999px; background: #edf1f5; color: #516273; font-size: 9px; font-weight: 700; }
.project-detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.portfolio-heading-actions select { min-width: 150px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.project-detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.project-detail-actions .button { min-height: 39px; }
.project-back-button { min-height: 39px; }
.project-overview-card { margin-top: 18px; overflow: visible; }
.project-overview-heading { padding: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.project-overview-heading h2 { margin: 11px 0 6px; font-size: 23px; line-height: 1.45; }
.project-overview-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.project-manager-chip { max-width: 420px; padding: 9px 12px; border-radius: 8px; color: #315f89; background: #edf3fb; font-size: 12px; line-height: 1.5; }
.project-detail-metrics { padding: 18px 22px; display: grid; grid-template-columns: repeat(6, minmax(145px, 1fr)); gap: 12px; }
.project-detail-metrics article { padding: 14px; border: 1px solid #e0e6ed; border-radius: 9px; background: #fbfcfe; }
.project-detail-metrics span, .project-detail-metrics small { display: block; color: var(--muted); }
.project-detail-metrics span { font-size: 11px; }
.project-detail-metrics strong { display: block; margin: 8px 0 5px; color: var(--navy); font-size: 19px; }
.project-detail-metrics small { font-size: 10px; line-height: 1.45; }
.project-detail-metrics .metric-warning strong { color: #a05b00; }
.portfolio-pending { color: #8a5600; background: #fff2d9; }
.project-match-note { margin: 0 22px 20px; padding: 11px 13px; border-radius: 8px; color: #526980; background: #f1f6fc; font-size: 11px; line-height: 1.6; }
.project-link-check-panel { margin-top: 16px; }
.portfolio-check-grid { padding: 18px 22px 14px; display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 12px; }
.portfolio-check-card { min-width: 0; padding: 14px; border: 1px solid #dde5ee; border-radius: 10px; background: #fbfcfe; }
.portfolio-check-card > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.portfolio-check-card > div strong { color: var(--navy); font-size: 14px; }
.portfolio-check-card b { display: block; margin: 13px 0 5px; color: #244c72; font-size: 25px; }
.portfolio-check-card small { display: block; color: var(--muted); font-size: 10px; }
.portfolio-check-card p { margin: 10px 0 0; color: #536477; font-size: 11px; line-height: 1.5; }
.status.neutral { color: #5d6c7b; background: #edf1f5; }
.portfolio-alert-list { padding: 0 22px 20px; display: grid; gap: 9px; }
.portfolio-alert { padding: 11px 13px; display: grid; grid-template-columns: minmax(135px, auto) 1fr; gap: 12px; align-items: start; border: 1px solid #dce5ee; border-radius: 8px; background: #f8fafc; font-size: 11px; line-height: 1.55; }
.portfolio-alert strong { color: #304b65; }
.portfolio-alert span { color: #536477; }
.portfolio-alert.pending { border-color: #ebd4a5; background: #fff8e8; }
.portfolio-alert.pending strong { color: #895800; }
.portfolio-alert.warning { border-color: #efc1b8; background: #fff3f0; }
.portfolio-alert.warning strong { color: #a33b35; }
.portfolio-alert.info { border-color: #bfd7f1; background: #f1f7fd; }
.portfolio-alert.info strong { color: #245d91; }
.portfolio-alert.success { border-color: #b9dfd0; background: #eef9f4; }
.portfolio-alert.success strong { color: var(--success); }
.portfolio-review-register { margin: 0 22px 20px; padding: 14px; display: grid; grid-template-columns: 1fr auto; gap: 11px 16px; align-items: center; border: 1px solid #cfdae7; border-radius: 10px; background: #f7faff; }
.portfolio-review-register-main { display: grid; grid-template-columns: repeat(3, minmax(120px, auto)); gap: 12px; }
.portfolio-review-register-main span, .portfolio-review-register-main strong { display: block; }
.portfolio-review-register-main span { color: var(--muted); font-size: 10px; }
.portfolio-review-register-main strong { margin-top: 5px; color: #244c72; font-size: 12px; }
.portfolio-review-register p { grid-column: 1 / -1; margin: 0; color: #536477; font-size: 11px; line-height: 1.55; }
.portfolio-review-register .button { grid-column: 2; grid-row: 1; min-height: 38px; }
.project-detail-section { margin-top: 16px; }
.project-detail-section .panel-heading { padding-top: 16px; padding-bottom: 16px; }
.portfolio-contract-table { min-width: 1160px; }
.portfolio-settlement-table { min-width: 1080px; }
.portfolio-invoice-table { min-width: 1180px; }
.portfolio-cost-table { min-width: 1160px; }
.portfolio-seal-table { min-width: 1180px; }
.portfolio-application-table { min-width: 1100px; }
.portfolio-document-table { min-width: 1050px; }
.portfolio-milestone-table { min-width: 1050px; }
.milestone-reminder-grid { padding: 0 22px 18px; display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 10px; }
.milestone-reminder-grid article { padding: 12px 14px; border: 1px solid #dfe6ed; border-radius: 9px; background: #f8fafc; }
.milestone-reminder-grid span { display: block; color: var(--muted); font-size: 10px; }
.milestone-reminder-grid strong { display: block; margin-top: 6px; color: #244c72; font-size: 20px; }
.project-document-checklist-wrap { margin: 0 22px 18px; padding: 14px; border: 1px solid #dbe4ee; border-radius: 10px; background: #f8fbfe; }
.project-document-checklist-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.project-document-checklist-heading strong, .project-document-checklist-heading span { display: block; }
.project-document-checklist-heading strong { color: #244c72; font-size: 13px; }
.project-document-checklist-heading span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.project-document-checklist-heading p { margin: 0; max-width: 620px; color: #536477; font-size: 11px; line-height: 1.55; text-align: right; }
.project-document-checklist { margin-top: 12px; display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 9px; }
.document-check-item { min-height: 54px; padding: 9px 10px; border: 1px solid #d8e1ea; border-radius: 8px; color: #536477; background: #fff; text-align: left; cursor: pointer; }
.document-check-item strong, .document-check-item small { display: block; }
.document-check-item strong { color: #304b65; font-size: 11px; }
.document-check-item small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.document-check-item.present { border-color: #b9d9c9; background: #f2fbf6; }
.document-check-item.present strong { color: #24704a; }
.document-check-item.missing { border-color: #edd6a7; background: #fff9ed; }
.document-check-item.missing strong { color: #946000; }
.document-check-item.loading { display: grid; place-items: center; grid-column: 1 / -1; cursor: default; }
.project-detail-section .empty { height: 110px; }
.portfolio-audit-section { max-height: 340px; padding-top: 0; }
.portfolio-audit-section .audit-entry { background: #fbfcfe; }
.portfolio-handling-section { max-height: 300px; padding-top: 0; }
.portfolio-handling-section .audit-entry { border-color: #d7e3ef; background: #f7fbff; }
.source-stack strong, .source-stack small { display: block; }
.source-stack small { margin-top: 4px; max-width: 250px; color: var(--muted); line-height: 1.4; }
.personnel-table { min-width: 760px; }
.payment-table { min-width: 900px; }
.settlement-table { width: 100%; min-width: 0; table-layout: fixed; }
.settlement-table th, .settlement-table td { padding: 9px 5px; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.settlement-table th { white-space: normal; text-align: center; }
.settlement-table th:nth-child(1) { width: 6%; }
.settlement-table th:nth-child(2), .settlement-table th:nth-child(3) { width: 7%; }
.settlement-table th:nth-child(4), .settlement-table th:nth-child(7) { width: 18%; }
.settlement-table th:nth-child(5) { width: 6%; }
.settlement-table th:nth-child(6) { width: 9%; }
.settlement-table th:nth-child(8) { width: 10%; }
.settlement-table th:nth-child(9) { width: 8%; }
.settlement-table th:nth-child(10) { width: 11%; }
.settlement-table td:nth-child(2), .settlement-table td:nth-child(6), .settlement-table td:nth-child(8) { white-space: nowrap; font-size: 11px; }
.settlement-table td:nth-child(4) { line-height: 1.45; }
.settlement-table td .status { max-width: 100%; padding: 4px; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.settlement-deductions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 8px; margin: 0; }
.settlement-deductions > div { min-width: 0; }
.settlement-deductions dt { color: var(--muted); font-size: 10px; }
.settlement-deductions dd { margin: 1px 0 0; color: var(--ink); font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.settlement-row-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: center; gap: 4px; }
.settlement-row-actions .detail-button, .settlement-row-actions .business-row-review { min-width: 0; margin: 0; padding: 3px 2px; font-size: 11px; text-align: center; white-space: nowrap; }
@media (max-width: 900px) {
  .settlement-table { min-width: 900px; }
}
.settlement-print-dialog { width: min(850px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; background: #edf0f3; }
.settlement-print-paper { width: min(750px, calc(100% - 32px)); margin: 20px auto; padding: 42px 42px 28px; border: 1px solid #a7a7a7; background: #fff; color: #000; font-family: "SimSun", "宋体", serif; font-size: 12px; }
.settlement-print-paper h2 { width: max-content; margin: 0 auto 14px; padding: 0 28px 4px; border-bottom: 3px double #000; font-size: 18px; font-weight: 700; letter-spacing: .35em; }
.settlement-print-meta { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 3px; }
.settlement-print-table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; border-top: 1px solid #000; border-bottom: 1px solid #000; }
.settlement-print-table .print-label { width: 14%; }
.settlement-print-table .print-value { width: 36%; }
.settlement-print-table th, .settlement-print-table td { height: 25px; padding: 3px 5px; border-right: 1px solid #000; border-bottom: 1px solid #000; color: #000; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.settlement-print-table tr:last-child th, .settlement-print-table tr:last-child td { border-bottom: 0; }
.settlement-print-table tr > :last-child { border-right: 0; }
.settlement-print-table th { font-weight: 400; white-space: nowrap; text-align: center; }
.settlement-print-table td { text-align: center; }
#settlementPrintProject { text-align: left; }
#settlementPrintUpperAmount { font-weight: 700; text-align: left; }
.deposit-print-project { text-align: left !important; }
#depositPrintUpperAmount { font-weight: 700; text-align: left; }
#depositPrintPaper .settlement-print-table .print-label { width: 18%; }
#depositPrintPaper .settlement-print-table .print-value { width: 32%; }
#depositPrintPaper .settlement-print-table th { white-space: normal; overflow-wrap: anywhere; }
.settlement-print-remarks { min-height: 52px; padding: 9px 20px 3px; display: flex; gap: 12px; line-height: 1.5; }
.settlement-print-remarks strong { flex: 0 0 auto; font-weight: 400; }
.settlement-print-remarks span { white-space: pre-wrap; overflow-wrap: anywhere; }
.settlement-print-confirm { width: 46%; margin: 0 4% 25px auto; text-align: center; font-weight: 700; }
.settlement-print-confirm span { display: block; margin-top: 4px; border-bottom: 1px solid #000; }
.settlement-print-signatures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 0 10px 16px; }
.settlement-print-bottom { height: 12px; border-top: 1px dashed #000; border-bottom: 1px dashed #000; }
.settlement-print-actions { background: #fff; }
.invoice-table-wrap { max-height: 620px; overflow: auto; }
.invoice-table { min-width: 1260px; table-layout: fixed; }
.invoice-table th, .invoice-table td { padding: 9px 4px; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.invoice-table th { position: sticky; top: 0; z-index: 1; background: #f0f5fb; text-align: center; white-space: normal; vertical-align: middle; }
.invoice-table td { vertical-align: top; }
.invoice-table tbody tr:nth-child(even) { background: #fbfdff; }
.invoice-table td.number { padding-left: 2px; padding-right: 2px; font-size: 10px; }
.invoice-table th:nth-child(1) { width: 5.5%; }
.invoice-table th:nth-child(2) { width: 6%; }
.invoice-table th:nth-child(3) { width: 6.5%; }
.invoice-table th:nth-child(4), .invoice-table th:nth-child(5) { width: 5%; }
.invoice-table th:nth-child(6) { width: 12.5%; }
.invoice-table th:nth-child(7) { width: 8.5%; }
.invoice-table th:nth-child(8) { width: 6.5%; }
.invoice-table th:nth-child(9) { width: 7%; }
.invoice-table th:nth-child(10) { width: 5%; }
.invoice-table th:nth-child(11), .invoice-table th:nth-child(12) { width: 7.5%; }
.invoice-table th:nth-child(13) { width: 8%; }
.invoice-table th:nth-child(14) { width: 10%; }
.invoice-table .contract-name, .invoice-table .unit-name { max-width: none; }
.invoice-table .status { max-width: 100%; padding: 4px; white-space: normal; }
.invoice-table .row-actions { justify-content: center; flex-wrap: wrap; gap: 4px 6px; white-space: normal; }
.invoice-table .detail-button { padding: 0; font-size: 10px; }
.invoice-list-pagination { border-top: 1px solid var(--line); }
.invoice-list-pagination .page-button { white-space: nowrap; }
.finance-table { width: 100%; min-width: 1120px; table-layout: fixed; }
.finance-table th, .finance-table td { padding: 8px 6px; overflow-wrap: anywhere; }
.finance-table th { white-space: nowrap; }
.finance-table th:nth-child(1) { width: 8%; }
.finance-table th:nth-child(2) { width: 5%; }
.finance-table th:nth-child(3) { width: 20%; }
.finance-table th:nth-child(4) { width: 9%; }
.finance-table th:nth-child(5) { width: 7%; }
.finance-table th:nth-child(6) { width: 9%; }
.finance-table th:nth-child(7) { width: 8%; }
.finance-table th:nth-child(8) { width: 10%; }
.finance-table th:nth-child(9) { width: 5%; }
.finance-table th:nth-child(10) { width: 8%; }
.finance-table th:nth-child(11) { width: 11%; }
.compact-upload { padding-bottom: 12px; }
.invoice-totals { padding: 0 22px 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.invoice-totals span { padding: 8px 11px; border-radius: 7px; background: #f4f7fa; color: var(--muted); font-size: 11px; }
.invoice-totals strong { margin-left: 5px; color: var(--navy); font-size: 12px; }
.invoice-pending-section { margin: 0 22px 18px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fbfdff; }
.invoice-pending-section .panel-heading { padding: 15px 16px 10px; }
.invoice-pending-section .panel-heading h2 { font-size: 16px; }
.invoice-pending-section .table-wrap { margin: 0; }
.invoice-pending-table { width: 100%; min-width: 760px; table-layout: fixed; }
.invoice-pending-table th, .invoice-pending-table td { padding: 10px 8px; font-size: 11px; overflow-wrap: anywhere; }
.invoice-pending-table th { background: #f0f5fb; }
.invoice-pending-table th:nth-child(1), .invoice-pending-table th:nth-child(2) { width: 10%; }
.invoice-pending-table th:nth-child(3) { width: 24%; }
.invoice-pending-table th:nth-child(4) { width: 20%; }
.invoice-pending-table th:nth-child(5) { width: 12%; }
.invoice-pending-table th:nth-child(6) { width: 12%; }
.invoice-pending-table th:nth-child(7) { width: 12%; }
.invoice-pending-table .row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.invoice-receipt-body { padding: 18px 22px; }
.invoice-receipt-body .form-note { margin: 0 0 14px; }
.invoice-receipt-body .invoice-totals { padding: 0 0 14px; }
.invoice-receipt-table-wrap { max-height: 430px; border: 1px solid var(--line); border-radius: 9px; }
.invoice-receipt-table-wrap .reconciliation-table { min-width: 760px; }
.invoice-receipt-table-wrap .reconciliation-table td:last-child { min-width: 100px; }
.invoice-receipt-help { margin: -2px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.invoice-legacy-check-section { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--line); }
.legacy-invoice-check-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.legacy-invoice-check-filters select { min-width: 145px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.legacy-invoice-check-filters input { min-width: 210px; }
.legacy-invoice-check-table-wrap { max-height: 500px; overflow: auto; }
.legacy-invoice-check-table { min-width: 900px; table-layout: fixed; }
.legacy-invoice-check-table th { position: sticky; top: 0; z-index: 1; background: #f0f5fb; }
.legacy-invoice-check-table th:first-child { width: 31%; }
.legacy-invoice-check-table th:nth-child(2), .legacy-invoice-check-table th:nth-child(3), .legacy-invoice-check-table th:nth-child(4), .legacy-invoice-check-table th:nth-child(5) { width: 12%; }
.legacy-invoice-check-table th:nth-child(6) { width: 13%; }
.legacy-invoice-check-table th:last-child { width: 8%; }
.legacy-invoice-check-table .source-stack small { line-height: 1.4; white-space: normal; }
.legacy-invoice-check-table .difference { font-weight: 700; color: #a33b35; }
#legacyInvoiceCheckDialog form { display: flex; flex-direction: column; max-height: calc(100vh - 50px); }
#legacyInvoiceCheckDialog .invoice-receipt-body { overflow-y: auto; }
.legacy-invoice-check-form-grid { padding: 16px 0 0; max-height: none; overflow: visible; }
.legacy-invoice-check-form-grid label { min-width: 0; }
.invoice-application-section { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--line); }
.invoice-application-section.page-view { margin-top: 0; padding-top: 0; border-top: 0; }
.invoice-application-filters { display: flex; align-items: center; gap: 10px; }
.invoice-application-filters select { min-width: 145px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.invoice-application-table { min-width: 2150px; table-layout: fixed; }
.invoice-application-table th, .invoice-application-table td { padding: 10px 7px; font-size: 11px; overflow-wrap: anywhere; }
.invoice-application-table th { position: sticky; top: 0; z-index: 1; background: #f0f5fb; white-space: normal; }
.invoice-application-table-wrap { max-height: 560px; overflow: auto; }
.invoice-application-table td:nth-child(4), .invoice-application-table td:nth-child(7), .invoice-application-table td:nth-child(8), .invoice-application-table td:nth-child(13), .invoice-application-table td:nth-child(14) { max-width: 380px; line-height: 1.45; }
.finance-totals { padding: 16px 22px; display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; }
.finance-totals span { padding: 12px 14px; border-radius: 8px; background: #f4f7fa; color: var(--muted); font-size: 11px; }
.finance-totals strong { display: block; margin-top: 6px; color: var(--navy); font-size: 17px; }
.finance-category-section { border-top: 1px solid var(--line); }
.category-breakdown { padding: 8px 22px 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.category-breakdown span { padding: 7px 10px; border-radius: 999px; background: #edf3fb; color: #315f89; font-size: 11px; }
.category-breakdown strong { margin-left: 4px; color: var(--navy); }
.category-breakdown .category-empty { color: var(--muted); background: #f4f7fa; }
.finance-filters { padding: 14px 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.finance-filters select { flex: 0 1 auto; min-width: 0; height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; font-size: 13px; }
.finance-filters #financeTypeFilter { width: 130px; }
.finance-filters #financeCategoryFilter, .finance-filters #financeExpenseCategoryFilter { width: 170px; }
.finance-date-range { display: flex; align-items: center; gap: 6px; min-width: 0; }
.finance-date-caption { color: var(--muted); font-size: 12px; white-space: nowrap; }
.finance-date-separator { color: var(--muted); }
.finance-date-range input { box-sizing: border-box; width: 145px; min-width: 0; height: 42px; padding: 0 7px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; font-size: 12px; }
.finance-filter-total { display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; border-radius: 8px; background: #edf8f4; color: var(--success); font-size: 12px; white-space: nowrap; }
.finance-filter-total strong { font-size: 14px; font-variant-numeric: tabular-nums; }
#financeFilteredAmount strong { color: #b42318; }
.finance-search-group { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 1 1 360px; min-width: 320px; margin-left: auto; }
.finance-search-group .search-box { flex: 1 1 220px; width: auto; max-width: 310px; min-width: 0; }
.finance-account-section { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--line); }
.finance-account-filters { display: flex; align-items: center; gap: 10px; }
.finance-account-filters select { min-width: 145px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.finance-account-note { margin: 0 22px 14px; }
.finance-account-table { min-width: 1490px; }
.finance-account-table-wrap { max-height: 480px; }
.finance-account-table td:nth-child(3), .finance-account-table td:nth-child(8), .finance-account-table td:nth-child(11) { max-width: 360px; line-height: 1.45; }
.subsection-title { padding: 16px 22px 8px; font-weight: 700; color: var(--text); border-top: 1px solid var(--border); }
.payment-status-summary { padding: 7px 10px; border-radius: 7px; background: #edf8f4; color: var(--success); font-size: 11px; font-weight: 700; white-space: nowrap; }
.payment-section { padding: 0 22px 18px; max-height: 175px; overflow-y: auto; }
#detailDialog .detail-grid { flex: 1 1 auto; min-height: 150px; }
#detailDialog .audit-section { flex: 0 1 175px; }
.role-badge { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #edf3fb; color: #315f89; font-size: 11px; font-weight: 700; white-space: nowrap; }
.account-card { margin: 18px 22px 22px; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.account-card strong { font-size: 14px; }
.account-card p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.account-action { min-height: 42px; }
.legacy-catalog-panel { margin-top: 16px; }
.legacy-source-row { padding: 14px 22px; display: flex; flex-wrap: wrap; gap: 30px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.legacy-source-row div { min-width: 260px; }
.legacy-source-row span, .legacy-source-row strong { display: block; }
.legacy-source-row span { margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.legacy-source-row strong { font-size: 12px; overflow-wrap: anywhere; }
.legacy-toolbar { padding: 14px 22px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.legacy-toolbar select { min-width: 160px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.legacy-toolbar .search-box { margin-left: auto; }
.legacy-file-table { min-width: 980px; }
.legacy-file-name strong, .legacy-file-name small { display: block; }
.legacy-file-name small { margin-top: 4px; color: var(--muted); }
.legacy-status-archived { background: #edf3fb; color: #315f89; }
.legacy-status-backup { background: #f0f1f3; color: #5f6874; }
.legacy-status-failed { background: #fdeaea; color: #a33b35; }
.legacy-sheet-dialog { width: min(1320px, calc(100vw - 32px)); }
.legacy-sheet-controls { padding: 14px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.legacy-sheet-context { display: flex; align-items: center; gap: 12px; min-width: 0; }
.legacy-sheet-context select { min-width: 200px; max-width: 420px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.legacy-sheet-context span { color: var(--muted); font-size: 11px; }
.legacy-sheet-table-wrap { flex: 1 1 auto; max-height: calc(100vh - 250px); }
.legacy-sheet-table { width: max-content; min-width: 100%; }
.legacy-sheet-table th, .legacy-sheet-table td { min-width: 130px; max-width: 310px; white-space: pre-wrap; overflow-wrap: anywhere; }
.legacy-sheet-table th:first-child, .legacy-sheet-table td:first-child { position: sticky; left: 0; z-index: 1; min-width: 72px; width: 72px; background: #f7f9fb; }
.expense-panel { margin-top: 16px; }
.migration-note { margin: 14px 22px 0; padding: 10px 12px; border-radius: 8px; background: #f1f6fc; color: #526980; font-size: 11px; line-height: 1.55; }
.expense-claim-table { min-width: 1180px; }
.expense-claim-table-wrap { max-height: 520px; }
.expense-claim-table td:nth-child(5) { max-width: 360px; color: var(--muted); line-height: 1.45; }
.expense-ledger-table { min-width: 0; table-layout: fixed; }
.expense-ledger-table-wrap { max-height: 520px; }
.expense-ledger-table th, .expense-ledger-table td { padding: 10px 5px; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.expense-ledger-table th { white-space: normal; }
.expense-ledger-table th:nth-child(1) { width: 7%; }
.expense-ledger-table th:nth-child(2) { width: 8%; }
.expense-ledger-table th:nth-child(3) { width: 6%; }
.expense-ledger-table th:nth-child(4) { width: 19%; }
.expense-ledger-table th:nth-child(n+5):nth-child(-n+7) { width: 9%; }
.expense-ledger-table th:nth-child(8), .expense-ledger-table th:nth-child(9) { width: 8%; }
.expense-ledger-table th:nth-child(10) { width: 11%; }
.expense-ledger-table th:nth-child(11) { width: 6%; }
.expense-ledger-table td:nth-child(4), .expense-ledger-table td:nth-child(10) { line-height: 1.45; }
.expense-ledger-table td .status { max-width: 100%; padding: 4px; white-space: normal; }
.expense-ledger-table .detail-button { padding: 0; white-space: nowrap; font-size: 11px; }
@media (max-width: 1220px) {
  .expense-ledger-table { min-width: 860px; }
}
.expense-ledger-heading, .expense-ledger-actions { flex-wrap: wrap; }
.expense-ledger-actions { justify-content: flex-end; margin-left: auto; }
.readonly-label { color: var(--muted); font-size: 11px; }
.expense-filters { display: flex; align-items: center; gap: 10px; }
.expense-filters select { min-width: 145px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.expense-detail-summary { margin: 16px 22px 0; padding: 11px 13px; border-radius: 8px; background: #edf3fb; color: #315f89; font-size: 12px; line-height: 1.55; }
.expense-detail-table-wrap { margin-top: 14px; max-height: 480px; overflow-y: auto; }
.expense-detail-table { min-width: 780px; }
.expense-claim-dialog { width: min(1180px, calc(100vw - 32px)); }
.expense-print-dialog { width: min(850px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; background: #edf0f3; }
.expense-print-paper { width: min(750px, calc(100% - 32px)); margin: 20px auto; padding: 42px 40px 28px; border: 1px solid #a7a7a7; background: #fff; color: #000; font-family: "SimSun", "宋体", serif; font-size: 12px; }
.expense-print-paper h2 { width: max-content; margin: 0 auto 14px; padding: 0 28px 4px; border-bottom: 3px double #000; font-size: 18px; font-weight: 700; letter-spacing: .3em; }
.expense-print-meta { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 4px; }
.expense-print-table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; border: 1px solid #000; }
.expense-print-index { width: 9%; }
.expense-print-category { width: 14%; }
.expense-print-item { width: 36%; }
.expense-print-price, .expense-print-quantity { width: 12%; }
.expense-print-amount { width: 17%; }
.expense-print-table th, .expense-print-table td { padding: 4px 5px; border: 1px solid #000; color: #000; font-size: 12px; line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
.expense-print-table th { font-weight: 400; background: #fff; }
.expense-print-table .expense-print-item-name { text-align: left; }
.expense-print-summary { margin: 17px 8px 7px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-weight: 700; }
.expense-print-summary strong, .expense-print-upper strong { font-weight: 700; }
.expense-print-summary span { white-space: pre-wrap; overflow-wrap: anywhere; }
.expense-print-upper { margin: 0 8px; font-weight: 700; }
.expense-print-signatures { margin: 23px 8px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.expense-print-timestamp { margin: 28px 8px 18px; text-align: right; }
.expense-print-bottom { height: 1px; border-top: 1px dashed #000; }
.expense-print-actions { background: #fff; }
.expense-claim-form-grid { max-height: 66vh; }
.expense-detail-editor-section { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafc; }
.expense-detail-editor-heading { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.expense-detail-editor-heading strong, .expense-detail-editor-heading span { display: block; }
.expense-detail-editor-heading strong { color: var(--ink); font-size: 13px; }
.expense-detail-editor-heading span { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 400; }
.expense-detail-editor-heading .button { min-height: 36px; }
.expense-detail-editor { display: grid; gap: 9px; overflow-x: auto; }
.expense-detail-editor-row { min-width: 900px; padding: 10px; display: grid; grid-template-columns: 145px minmax(240px, 1fr) 110px 90px 120px 34px; align-items: end; gap: 9px; border: 1px solid #dfe6ee; border-radius: 8px; background: #fff; }
.expense-detail-editor-row label { gap: 5px; }
.expense-detail-remove { width: 34px; height: 39px; border: 0; border-radius: 7px; background: #fdeaea; color: #a33b35; font-size: 20px; cursor: pointer; }
.expense-claim-total { margin-top: 12px; padding-top: 11px; display: flex; justify-content: flex-end; gap: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.expense-claim-total strong { color: var(--navy); font-size: 17px; }
.personnel-section { margin-top: 16px; }
.personnel-history-table { min-width: 1250px; }
.personnel-history-table-wrap { max-height: 460px; }
.personnel-history-table td:last-child { min-width: 155px; }
.legacy-person-link-cell { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.legacy-person-link-cell .status { font-size: 10px; }
.legacy-person-new-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.legacy-person-new-fields.hidden { display: none; }
.legacy-person-new-fields label { display: flex; flex-direction: column; gap: 6px; }
.legacy-person-new-fields .wide { grid-column: 1 / -1; }
.payroll-difference-warning, .legacy-difference-warning { padding: 10px 12px; border: 1px solid #f1c77f; border-radius: 8px; color: #8a4c00; background: #fff8e9; }
.payroll-period-table { min-width: 1120px; }
.payroll-period-table-wrap { max-height: 520px; }
.social-security-table { min-width: 1160px; }
.social-security-table-wrap { max-height: 560px; }
.holiday-fee-table { min-width: 860px; }
.holiday-fee-table td:nth-child(4) { max-width: 360px; line-height: 1.5; }
.personnel-payroll-filters { display: flex; align-items: center; gap: 10px; }
.personnel-payroll-filters select { min-width: 150px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.payroll-detail-table-wrap { margin-top: 14px; max-height: 520px; overflow: auto; }
.payroll-detail-table { min-width: 1320px; }
.payroll-print-dialog { width: min(1530px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; background: #edf0f3; }
.payroll-print-drag-handle { position: sticky; top: 0; z-index: 2; padding: 8px 16px; border-bottom: 1px solid #c9d4e2; background: #edf4fd; color: #25456d; font-size: 12px; cursor: grab; touch-action: none; user-select: none; }
.payroll-print-dialog.payroll-print-dragging .payroll-print-drag-handle { cursor: grabbing; }
.payroll-print-paper { width: 1122px; min-height: 794px; margin: 16px auto; padding: 30px 26px 26px; border: 1px solid #a7a7a7; background: #fff; color: #000; font-family: "SimSun", "宋体", serif; page: payroll-sheet; }
.payroll-print-paper h2 { width: max-content; margin: 0 auto 20px; padding: 0 28px 4px; border-bottom: 3px double #000; font-size: 25px; letter-spacing: .35em; }
.payroll-print-meta, .payroll-print-submeta { display: flex; justify-content: space-between; gap: 20px; }
.payroll-print-meta { margin: 0 8px 7px; font-size: 15px; }
.payroll-print-submeta { margin: 0 8px 7px; font-size: 15px; }
.payroll-print-table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; border: 1px solid #000; }
.payroll-print-table th, .payroll-print-table td { padding: 5px 3px; border: 1px solid #000; color: #000; background: #fff; font-size: 15px; font-weight: 400; line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
.payroll-print-table th:nth-child(1) { width: 3%; }
.payroll-print-table th:nth-child(2) { width: 5%; }
.payroll-print-table th:nth-child(3) { width: 8%; }
.payroll-print-table th:nth-child(4) { width: 12%; }
.payroll-print-table th:nth-child(5) { width: 5%; }
.payroll-print-table th:nth-child(6), .payroll-print-table th:nth-child(7), .payroll-print-table th:nth-child(9), .payroll-print-table th:nth-child(10), .payroll-print-table th:nth-child(12), .payroll-print-table th:nth-child(13) { width: 7%; }
.payroll-print-table th:nth-child(8), .payroll-print-table th:nth-child(11) { width: 6%; }
.payroll-print-table th:nth-child(14) { width: 7%; }
.payroll-print-table td:nth-child(3), .payroll-print-table td:nth-child(4), .payroll-print-table td:nth-child(n+5):nth-child(-n+12) { white-space: nowrap; overflow-wrap: normal; word-break: normal; font-variant-numeric: tabular-nums; }
.payroll-print-table .payroll-print-number { display: inline-block; white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.payroll-print-table td:nth-child(14) { text-align: left; white-space: pre-wrap; }
.payroll-print-table.no-remarks tr > :last-child { display: none; }
.payroll-print-table tfoot th, .payroll-print-table tfoot td { font-weight: 700; }
.payroll-print-notice { min-height: 34px; margin: 9px 8px 0; font-size: 11px; line-height: 1.45; }
.payroll-print-notice.warning { color: #8a3d16; font-weight: 700; }
.payroll-print-signatures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin: 22px 8px 14px; font-size: 15px; }
.payroll-print-actions { align-items: center; background: #fff; }
.payroll-print-actions > span { margin-right: auto; color: #536477; font-size: 12px; }
.cost-invoice-panel { margin-top: 16px; }
.cost-owner-table { min-width: 860px; }
.cost-invoice-table { width: 100%; min-width: 0; table-layout: fixed; }
.cost-invoice-table-wrap { max-height: none; overflow: visible; }
.cost-invoice-table th, .cost-invoice-table td { padding: 10px 4px; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.cost-invoice-table th { position: sticky; top: 0; z-index: 1; background: #f0f5fb; color: #425a75; font-size: 11px; text-align: center; white-space: normal; vertical-align: middle; }
.cost-invoice-table td { vertical-align: top; }
.cost-invoice-table tbody tr:nth-child(even) { background: #fbfdff; }
.cost-invoice-table tbody tr:hover { background: #eef6ff; }
.cost-invoice-table th:nth-child(1) { width: 5%; }
.cost-invoice-table th:nth-child(2) { width: 4.5%; }
.cost-invoice-table th:nth-child(3) { width: 12.5%; }
.cost-invoice-table th:nth-child(4) { width: 5.5%; }
.cost-invoice-table th:nth-child(5), .cost-invoice-table th:nth-child(8) { width: 6%; }
.cost-invoice-table th:nth-child(6), .cost-invoice-table th:nth-child(7),
.cost-invoice-table th:nth-child(9), .cost-invoice-table th:nth-child(10),
.cost-invoice-table th:nth-child(11) { width: 6.5%; }
.cost-invoice-table th:nth-child(12) { width: 5.5%; }
.cost-invoice-table th:nth-child(13) { width: 4.5%; }
.cost-invoice-table th:nth-child(14), .cost-invoice-table th:nth-child(15) { width: 9%; }
.cost-invoice-table td:nth-child(1) { white-space: nowrap; overflow-wrap: normal; }
.cost-invoice-table td:nth-child(3), .cost-invoice-table td:nth-child(14) { line-height: 1.5; }
.cost-invoice-table td.number { font-variant-numeric: tabular-nums; }
.cost-invoice-clamp { display: block; white-space: normal; overflow-wrap: anywhere; }
.cost-invoice-table .status, .cost-invoice-table .role-badge { max-width: 100%; padding: 4px; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.cost-invoice-table .detail-button { padding: 1px 0; font-size: 11px; white-space: nowrap; }
.cost-invoice-table td:last-child { white-space: normal; overflow-wrap: normal; }
.cost-invoice-table td:last-child .business-row-review { margin-left: 4px; padding: 2px 5px; font-size: 10px; vertical-align: middle; }
.cost-invoice-table td:last-child .business-row-unlock { display: block; width: max-content; max-width: 100%; margin: 2px 0 0; }
.cost-invoice-list-panel .panel-heading { flex-wrap: wrap; align-items: flex-start; gap: 14px; }
.cost-invoice-list-panel .panel-heading > div:first-child { flex: 1 1 100%; min-width: 0; }
.cost-invoice-list-panel .contracts-heading-actions { width: 100%; }
.cost-invoice-list-panel .cost-invoice-filters { flex: 1 1 auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.cost-invoice-list-panel .cost-invoice-filters .table-search { min-width: 210px; flex: 1 1 240px; }
.cost-invoice-filters { display: flex; align-items: center; gap: 10px; }
.cost-invoice-filters select { min-width: 145px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.seal-panel { margin-top: 16px; }
.project-seal-summary-grid { grid-template-columns: repeat(3, minmax(170px, 1fr)); }
#sealsPanel .contracts-heading { flex-wrap: wrap; gap: 12px; }
#sealsPanel .contracts-heading > div:first-child { flex: 1 1 100%; }
#sealsPanel .contracts-heading-actions { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
#sealsPanel .seal-filters { flex: 1 1 370px; flex-wrap: wrap; justify-content: flex-end; }
#sealsPanel .seal-filters select { min-width: 156px; }
#sealsPanel .seal-filters .table-search { min-width: 200px; flex: 1 1 230px; }
.project-seal-table { width: 100%; min-width: 960px; table-layout: fixed; }
.project-seal-table-wrap { max-height: 520px; overflow: auto; }
.project-seal-table th, .project-seal-table td { padding: 9px 5px; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.project-seal-table th { position: sticky; top: 0; z-index: 1; background: #f0f5fb; text-align: center; white-space: normal; }
.project-seal-table td { vertical-align: top; }
.project-seal-table tbody tr:nth-child(even) { background: #fbfdff; }
.project-seal-table th:nth-child(1) { width: 7%; }
.project-seal-table th:nth-child(2) { width: 23%; }
.project-seal-table th:nth-child(3) { width: 12%; }
.project-seal-table th:nth-child(4), .project-seal-table th:nth-child(5) { width: 8%; }
.project-seal-table th:nth-child(6) { width: 12%; }
.project-seal-table th:nth-child(7) { width: 9%; }
.project-seal-table th:nth-child(8) { width: 7%; }
.project-seal-table th:nth-child(9) { width: 8%; }
.project-seal-table th:nth-child(10) { width: 6%; }
.project-seal-table .status { max-width: 100%; white-space: normal; padding: 4px; }
.project-seal-table .detail-button { white-space: nowrap; }
.document-seal-table { width: 100%; min-width: 980px; table-layout: fixed; }
.document-seal-table-wrap { max-height: 620px; overflow: auto; }
.document-seal-table th, .document-seal-table td { padding: 9px 5px; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.document-seal-table th { position: sticky; top: 0; z-index: 1; background: #f0f5fb; color: #425a75; font-size: 11px; text-align: center; white-space: normal; vertical-align: middle; }
.document-seal-table td { vertical-align: top; }
.document-seal-table tbody tr:nth-child(even) { background: #fbfdff; }
.document-seal-table tbody tr:hover { background: #eef6ff; }
.document-seal-table th:nth-child(1) { width: 7%; }
.document-seal-table th:nth-child(2) { width: 8%; }
.document-seal-table th:nth-child(3) { width: 17%; }
.document-seal-table th:nth-child(4) { width: 16%; }
.document-seal-table th:nth-child(5) { width: 12%; }
.document-seal-table th:nth-child(6) { width: 13%; }
.document-seal-table th:nth-child(7) { width: 8%; }
.document-seal-table th:nth-child(8) { width: 8%; }
.document-seal-table th:nth-child(9) { width: 5%; }
.document-seal-table th:nth-child(10) { width: 6%; }
.document-seal-table td:nth-child(1) { font-size: 11px; white-space: nowrap; overflow-wrap: normal; }
.document-seal-table td:nth-child(2) { font-size: 10.5px; white-space: nowrap; }
.document-seal-table td:nth-child(3), .document-seal-table td:nth-child(4), .document-seal-table td:nth-child(8) { line-height: 1.5; }
.document-seal-table .status, .document-seal-table .duplicate-badge { max-width: 100%; padding: 4px; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.document-seal-table .detail-button { padding: 1px 0; font-size: 11px; white-space: nowrap; }
.document-seal-application-panel { margin-top: 16px; }
.document-seal-application-panel .panel-heading { flex-wrap: wrap; align-items: flex-start; gap: 14px; }
.document-seal-application-panel .panel-heading > div:first-child { flex: 1 1 100%; min-width: 0; }
.document-seal-application-panel .contracts-heading-actions { width: 100%; flex-wrap: wrap; }
.document-seal-application-panel .contracts-heading-actions select,
.document-seal-application-panel .contracts-heading-actions input { min-height: 40px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.document-seal-application-panel .contracts-heading-actions .table-search { flex: 1 1 220px; min-width: 180px; }
.document-seal-application-table-wrap { max-height: 620px; overflow: auto; }
.document-seal-application-table { width: 100%; min-width: 940px; table-layout: fixed; }
.document-seal-application-table th, .document-seal-application-table td { padding: 10px 6px; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; vertical-align: top; }
.document-seal-application-table th { position: sticky; top: 0; z-index: 1; background: #f0f5fb; color: #425a75; white-space: normal; text-align: center; }
.document-seal-application-table tbody tr:nth-child(even) { background: #fbfdff; }
.document-seal-application-table tbody tr:hover { background: #eef6ff; }
.document-seal-application-table th:nth-child(1) { width: 10%; }
.document-seal-application-table th:nth-child(2) { width: 9%; }
.document-seal-application-table th:nth-child(3) { width: 19%; }
.document-seal-application-table th:nth-child(4) { width: 17%; }
.document-seal-application-table th:nth-child(5) { width: 9%; }
.document-seal-application-table th:nth-child(6) { width: 9%; }
.document-seal-application-table th:nth-child(7) { width: 10%; }
.document-seal-application-table th:nth-child(8) { width: 9%; }
.document-seal-application-table th:nth-child(9) { width: 8%; }
.document-seal-application-table .status { max-width: 100%; padding: 4px; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.document-seal-application-table .row-actions { display: grid; gap: 4px; }
.document-seal-application-table .detail-button { padding: 2px 0; white-space: nowrap; }
#documentSealsPanel .panel-heading { flex-wrap: wrap; align-items: flex-start; gap: 14px; }
#documentSealsPanel .panel-heading > div:first-child { flex: 1 1 100%; min-width: 0; }
#documentSealsPanel .contracts-heading-actions { width: 100%; }
#documentSealsPanel .seal-filters { flex: 1 1 auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
#documentSealsPanel .seal-filters select { min-width: 136px; }
#documentSealsPanel .seal-filters .table-search { min-width: 210px; flex: 1 1 240px; }
.seal-filters { display: flex; align-items: center; gap: 10px; }
.seal-filters select { min-width: 145px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.duplicate-badge { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #fdeaea; color: #a33b35; font-size: 11px; font-weight: 700; white-space: nowrap; }
.credential-panel { margin-top: 16px; }
.credential-action-panel { margin-top: 16px; }
.credential-action-panel .panel-heading { margin-bottom: 12px; }
.credential-action-wrap { max-height: 380px; overflow: auto; }
.credential-action-table { width: 100%; min-width: 920px; table-layout: fixed; }
.credential-action-table th, .credential-action-table td { padding: 9px 7px; font-size: 12px; overflow-wrap: anywhere; vertical-align: middle; }
.credential-action-table th { background: #f0f5fb; color: #425a75; white-space: normal; }
.credential-action-table th:nth-child(1) { width: 10%; }
.credential-action-table th:nth-child(2) { width: 22%; }
.credential-action-table th:nth-child(3) { width: 12%; }
.credential-action-table th:nth-child(4) { width: 12%; }
.credential-action-table th:nth-child(5) { width: 13%; }
.credential-action-table th:nth-child(6) { width: 12%; }
.credential-action-table th:nth-child(7) { width: 12%; }
.credential-action-table th:nth-child(8) { width: 7%; }
.credential-person-link { display: block; margin-top: 3px; color: #64748b; font-size: 10px; }
.credential-panel .panel-heading { flex-wrap: wrap; align-items: flex-start; gap: 14px; }
.credential-panel .panel-heading > div:first-child { flex: 1 1 100%; min-width: 0; }
.credential-panel .contracts-heading-actions { width: 100%; flex-wrap: wrap; }
.credential-table { width: 100%; min-width: 1060px; table-layout: fixed; }
.credential-table-wrap { max-height: 620px; overflow: auto; }
.credential-table th, .credential-table td { padding: 9px 5px; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; vertical-align: top; }
.credential-table th { position: sticky; top: 0; z-index: 1; background: #f0f5fb; color: #425a75; font-size: 11px; text-align: center; white-space: normal; }
.credential-table tbody tr:nth-child(even) { background: #fbfdff; }
.credential-table tbody tr:hover { background: #eef6ff; }
.credential-table th:nth-child(1) { width: 7%; }
.credential-table th:nth-child(2) { width: 11%; }
.credential-table th:nth-child(3) { width: 16%; }
.credential-table th:nth-child(4) { width: 12%; }
.credential-table th:nth-child(5) { width: 12%; }
.credential-table th:nth-child(6) { width: 9%; }
.credential-table th:nth-child(7) { width: 13%; }
.credential-table th:nth-child(8) { width: 7%; }
.credential-table th:nth-child(9) { width: 6%; }
.credential-table th:nth-child(10) { width: 7%; }
.credential-table .status, .credential-table .duplicate-badge { max-width: 100%; padding: 4px; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.credential-table .detail-button { padding: 2px 0; white-space: nowrap; }
.credential-filters { display: flex; align-items: center; gap: 10px; }
.credential-filters select { min-width: 145px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.credential-filters { flex: 1 1 auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.credential-filters .table-search { min-width: 210px; flex: 1 1 240px; }
.read-only-badge { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #f0f2f4; color: #738092; font-size: 10px; white-space: nowrap; }
.operational-record-dialog { width: min(1180px, calc(100vw - 32px)); }
.operational-record-dialog.payroll-draggable .dialog-heading { cursor: grab; touch-action: none; user-select: none; }
.operational-record-dialog.payroll-dragging .dialog-heading { cursor: grabbing; }
.operational-record-dialog.payroll-draggable .dialog-heading button { cursor: pointer; }
.payroll-drag-hint { display: block; margin-top: 5px; color: #58738b; font-size: 11px; }
.payroll-drag-hint[hidden] { display: none; }
.operational-record-fields { max-height: 68vh; }
.operational-record-dialog:has(.operational-save-error:not(.hidden)) .operational-record-fields { max-height: calc(68vh - 64px); }
.operational-save-error { margin: 0 22px 10px; padding: 10px 12px; border: 1px solid #f2b8b5; border-radius: 7px; background: #fff1f0; color: #9a302b; font-size: 13px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.project-seal-contract-field { display: grid; gap: 7px; }
.project-seal-contract-field .ai-project-suggestions { max-height: 240px; overflow-y: auto; }
.form-grid .checkbox-label { align-content: center; grid-template-columns: auto 1fr; justify-content: start; align-items: center; padding-top: 22px; }
.form-grid .checkbox-label input { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); }
.operational-detail-editor-section { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafc; overflow-x: auto; }
.operational-editor-heading { margin-bottom: 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.operational-editor-heading strong, .operational-editor-heading small { display: block; }
.operational-editor-heading strong { color: var(--ink); font-size: 13px; }
.operational-editor-heading small { margin-top: 4px; color: var(--muted); font-weight: 400; }
.operational-editor-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.operational-import-note { margin-bottom: 10px; }
#payrollDetailEditor, #socialSecurityDetailEditor, #holidayFeeDetailEditor { display: grid; gap: 9px; }
.operational-detail-row { min-width: 760px; padding: 10px; display: grid; align-items: end; gap: 9px; border: 1px solid #dfe6ee; border-radius: 8px; background: #fff; }
.payroll-detail-edit-row { min-width: 1160px; grid-template-columns: 140px 92px repeat(5, 116px) minmax(150px, 1fr) 54px; }
.social-security-detail-edit-row { min-width: 900px; grid-template-columns: 130px 112px 112px 110px 130px minmax(160px, 1fr) 54px; }
.holiday-fee-detail-edit-row { grid-template-columns: 180px 140px minmax(240px, 1fr) 54px; }
.operational-detail-row label { gap: 5px; }
.remove-detail-button { height: 39px; border: 0; border-radius: 7px; background: #fdeaea; color: #a33b35; cursor: pointer; }
.personnel-month-review { display: grid; gap: 10px; padding: 14px; border: 1px solid #cbdff2; border-radius: 9px; background: #f6faff; color: var(--ink); font-size: 12px; line-height: 1.5; }
.personnel-month-review p { margin: 0; }
.personnel-month-review-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.personnel-month-review-heading strong { font-size: 14px; }
.personnel-month-review-heading span { color: var(--muted); }
.personnel-month-review-metrics, .personnel-month-differences > div { display: flex; flex-wrap: wrap; gap: 7px; }
.personnel-month-review-metrics span, .personnel-month-differences > div span { padding: 5px 9px; border-radius: 6px; background: #e8f2fd; }
.personnel-month-differences { display: grid; gap: 7px; }
.personnel-month-differences > strong { font-size: 12px; }
.personnel-month-differences small { color: var(--muted); }
.personnel-month-review-errors { padding: 9px 11px; border: 1px solid #f2b8b5; border-radius: 7px; background: #fff1f0; color: #9a302b; font-weight: 700; }
.personnel-month-review-ok { color: #18724b; }
.form-note { margin: 0; padding: 11px 12px; border-radius: 7px; background: #f1f6fc; color: #526980; font-size: 11px; line-height: 1.6; }
.account-permissions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 14px; margin: 0; padding: 13px 15px; border: 1px solid #cfd7df; border-radius: 8px; }
.account-permissions legend { padding: 0 5px; color: #536477; font-size: 12px; font-weight: 700; }
.form-grid .account-permissions label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.form-grid .account-permissions input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.account-permissions label:has(input:disabled) { color: #9aa7b4; }
.manager-module-grid { grid-column: 1 / -1; display: grid; gap: 5px; width: 100%; }
.manager-module-row { display: grid; grid-template-columns: minmax(130px, 1fr) 115px 145px; align-items: center; gap: 10px; padding: 7px 9px; border-bottom: 1px solid #e5eaf0; }
.manager-module-row:last-child { border-bottom: 0; }
.manager-module-row > span { color: #243a50; font-size: 13px; font-weight: 650; }
.form-grid .manager-module-row label { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
@media (max-width: 640px) { .manager-module-row { grid-template-columns: minmax(90px, 1fr) 80px 112px; gap: 5px; padding-inline: 2px; } }
@media (max-width: 640px) { .account-permissions { grid-template-columns: 1fr; } }
.staff-related-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding: 18px 22px 4px; }
.staff-related-heading h2 { margin: 0 0 5px; }
.staff-related-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.staff-related-heading label { display: grid; gap: 6px; min-width: 210px; color: #536477; font-size: 12px; font-weight: 700; }
.staff-related-heading select { width: 100%; padding: 9px 11px; border: 1px solid #cfd7df; border-radius: 7px; color: var(--ink); background: #fff; }
.staff-contract-summary-grid { margin-bottom: 18px; }
.staff-contract-panel { margin: 0; }
.staff-contract-panel .table-wrap table { min-width: 950px; }
.staff-contract-panel .table-wrap th, .staff-contract-panel .table-wrap td { padding: 14px 12px; }
.staff-contract-records { margin-top: 18px; }
.staff-contract-records .staff-related-heading { padding-top: 0; }
.staff-contract-records .staff-related-heading h2 small { color: var(--muted); font-size: 12px; font-weight: 400; }
.staff-contract-view .search-box input { width: min(28vw, 330px); }
.staff-contract-view dialog .detail-grid { flex: 1 1 auto; min-height: 150px; }
.staff-payment-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 18px 22px; }
.staff-payment-load-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 22px 0; padding: 12px 14px; border: 1px solid #c7d9f0; border-radius: 8px; color: #24527e; background: #f2f7fd; line-height: 1.5; }
.staff-payment-load-notice.failed { border-color: #e9c7b5; color: #8b3a20; background: #fff5ef; }
.staff-payment-load-notice .button { flex: 0 0 auto; }
.staff-business-tools { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 0 22px 16px; }
.staff-business-tools label { display: grid; gap: 5px; min-width: min(100%, 290px); color: #536477; font-size: 12px; font-weight: 700; }
.staff-business-tools input { width: min(42vw, 360px); max-width: 100%; padding: 9px 11px; border: 1px solid #cfd7df; border-radius: 7px; color: var(--ink); background: #fff; font: inherit; }
.staff-business-tools span { color: var(--muted); font-size: 12px; }
.staff-payment-evidence, .staff-payment-history-empty { margin: 0 22px 16px; padding: 10px 14px; border-left: 3px solid #8cb5e4; border-radius: 6px; color: #315a83; background: #f3f8fd; line-height: 1.6; }
.staff-payment-history-empty { margin-top: 4px; }
.staff-payment-summary strong { font-size: clamp(18px, 1.8vw, 25px); }
.staff-payment-table table { min-width: 860px; }
.staff-payment-table .text-button { padding: 4px 0; border: 0; background: transparent; color: #1260c9; font: inherit; font-weight: 700; white-space: nowrap; cursor: pointer; }
.staff-payment-table .text-button:hover { text-decoration: underline; }
#staffPaymentOverview > .staff-scope-note { margin: 0 22px 16px; }
#staffPaymentOverview > h3 { margin: 12px 22px; font-size: 15px; }
.staff-payment-tools { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 22px 16px; }
.staff-payment-tools label { display: grid; gap: 5px; color: #536477; font-size: 12px; font-weight: 700; }
.staff-payment-tools input, .staff-payment-tools select { min-width: 210px; padding: 9px 11px; border: 1px solid #cfd7df; border-radius: 7px; color: var(--ink); background: #fff; font: inherit; }
.staff-payment-tools input { width: min(35vw, 340px); }
.staff-payment-detail { padding: 20px 24px 28px; max-height: min(70vh, 680px); overflow: auto; }
.staff-payment-detail h3 { margin: 20px 0 8px; font-size: 16px; }
.staff-payment-detail p { margin: 6px 0; color: #526980; line-height: 1.6; }
.staff-payment-detail .table-wrap { margin-top: 8px; }
.staff-payment-detail table { min-width: 600px; }
@media (max-width: 760px) { .staff-payment-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .staff-payment-tools input, .staff-payment-tools select { width: 100%; } .staff-payment-tools label { flex: 1 1 100%; } }
@media (max-width: 760px) { .staff-payment-load-notice { align-items: flex-start; flex-direction: column; } }
@media (max-width: 760px) { .staff-business-tools input { width: 100%; } .staff-business-tools label { flex: 1 1 100%; } }
.staff-new-contract-note { margin: 0; padding: 14px 22px 0; color: #526980; font-size: 12px; line-height: 1.6; }
#staffNewContractForm { display: flex; flex-direction: column; min-height: 0; }
#staffNewContractForm .form-grid { overflow-y: auto; }
@media (max-width: 760px) { .staff-contract-view .search-box input { width: 100%; } }
.staff-history > h3 { margin: 17px 22px 7px; font-size: 14px; }
.staff-history > h3 small { color: var(--muted); font-size: 12px; font-weight: 400; }
@media (max-width: 640px) { .staff-related-heading { align-items: stretch; flex-direction: column; } .staff-related-heading label { min-width: 0; } }
.ai-project-input { position: relative; }
.form-grid .ai-project-input input { padding-right: 78px; }
.ai-project-badge { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); padding: 4px 8px; border-radius: 999px; background: linear-gradient(135deg, #e6f0ff, #e9f8f2); color: #19614a; font-size: 10px; font-weight: 800; letter-spacing: .04em; pointer-events: none; }
.ai-project-match-status { min-height: 18px; color: #6b7f91; font-size: 11px; font-weight: 500; line-height: 1.55; }
.ai-project-match-status.searching { color: #315f89; }
.ai-project-match-status.matched { color: #14715a; font-weight: 700; }
.ai-project-match-status.unmatched { color: #9a6415; }
.ai-project-suggestions { display: grid; gap: 7px; padding: 8px; border: 1px solid #dbe5ef; border-radius: 8px; background: #f8fbfe; }
.settlement-contract-field .ai-project-suggestions { max-height: 230px; overflow-y: auto; }
.deposit-project-field .ai-project-suggestions { max-height: 230px; overflow-y: auto; }
.finance-project-field .ai-project-suggestions { max-height: 230px; overflow-y: auto; }
.ai-project-suggestion { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; width: 100%; padding: 9px 10px; border: 1px solid transparent; border-radius: 7px; background: #fff; color: #24384d; text-align: left; cursor: pointer; }
.ai-project-suggestion:hover, .ai-project-suggestion:focus { border-color: #75a7e7; box-shadow: 0 0 0 2px rgba(31,111,235,.08); outline: 0; }
.ai-project-suggestion strong { overflow-wrap: anywhere; font-size: 12px; line-height: 1.45; }
.ai-project-suggestion span { align-self: start; color: #1f6feb; font-size: 11px; font-weight: 800; white-space: nowrap; }
.ai-project-suggestion small { grid-column: 1 / -1; color: #6b7f91; font-size: 10px; font-weight: 500; line-height: 1.45; }
.finance-project-link { margin-top: 4px; }
.finance-project-link small { color: #14715a; }
.toast { position: fixed; right: 26px; bottom: 26px; max-width: 420px; padding: 13px 17px; border-radius: 9px; background: #17314a; color: #fff; box-shadow: 0 12px 35px rgba(22,42,61,.25); font-size: 13px; }
.hidden { display: none !important; }
.page-view[data-manager-readonly="true"] button[id^="add"],
.page-view[data-manager-readonly="true"] button[id^="edit"],
.page-view[data-manager-readonly="true"] button[id^="establish"],
.page-view[data-manager-readonly="true"] button[id^="review"],
.page-view[data-manager-readonly="true"] button[class*="-edit"],
.page-view[data-manager-readonly="true"] button[class*="-link"],
.page-view[data-manager-readonly="true"] button[class*="-confirm"],
.page-view[data-manager-readonly="true"] button[class*="-issue"] { display: none !important; }

.workflow-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 14px; margin-bottom: 16px; }
.workflow-map-panel { padding: 20px 22px; }
.workflow-map-panel h2 { margin: 0 0 16px; font-size: 16px; }
.workflow-map { display: grid; grid-template-columns: repeat(6, minmax(106px, 1fr) 22px) minmax(106px, 1fr); align-items: center; gap: 5px; overflow-x: auto; }
.workflow-map > div { min-height: 76px; padding: 10px; display: grid; align-content: center; justify-items: center; text-align: center; border: 1px solid #d8e3ee; border-radius: 10px; background: linear-gradient(180deg, #fff, #f4f8fc); color: var(--navy); line-height: 1.4; }
.workflow-map > div b { width: 22px; height: 22px; display: grid; place-items: center; margin-bottom: 4px; border-radius: 50%; background: #dceffc; color: #176ca5; font-size: 10px; }
.workflow-map > div strong { font-size: 12px; }
.workflow-map > div span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.workflow-map > i { color: #6c90ad; font-size: 18px; font-style: normal; text-align: center; }
.workflow-list-panel { margin-top: 16px; }
.workflow-list-heading { gap: 18px; }
.workflow-filters { display: flex; align-items: center; gap: 9px; }
.workflow-filters select, .workflow-filters input { min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.workflow-table { min-width: 1220px; }
.workflow-table th, .workflow-table td { padding: 11px 10px; }
.workflow-table td { vertical-align: top; }
.workflow-cell, .workflow-support, .workflow-next { display: grid; gap: 6px; }
.workflow-support span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.workflow-next { min-width: 135px; }
.workflow-next .status { width: fit-content; }
.project-workflow-actions-panel { margin-top: 16px; padding: 18px 22px; }
.project-workflow-actions-panel h2 { margin: 0 0 6px; font-size: 16px; }
.project-workflow-actions-panel p { margin: 0 0 14px; color: var(--muted); font-size: 11px; }
.project-workflow-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.project-workflow-actions button { min-height: 38px; padding: 8px 13px; border: 1px solid #c9d9e8; border-radius: 8px; background: #f5f9fd; color: #285b84; font-weight: 700; cursor: pointer; }
.project-workflow-actions button:hover { border-color: var(--blue); background: #eaf4fd; }
.project-workflow-actions button:disabled { cursor: not-allowed; opacity: .45; }
.portfolio-expense-table { min-width: 980px; }
.approval-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 14px; margin-bottom: 16px; }
.approval-process-panel { padding: 22px; display: grid; grid-template-columns: minmax(260px, .9fr) minmax(520px, 1.4fr); align-items: center; gap: 26px; }
.approval-process-copy h2 { margin: 5px 0 8px; color: var(--navy); font-size: 18px; }
.approval-process-copy p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.approval-kicker { color: #1773a9; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.approval-process-flow { display: grid; grid-template-columns: 1fr 28px 1fr 28px 1fr; align-items: center; gap: 5px; }
.approval-process-flow > div { min-height: 88px; padding: 12px; display: grid; align-content: center; justify-items: center; border: 1px solid #d8e3ee; border-radius: 10px; background: linear-gradient(180deg, #fff, #f2f8fc); }
.approval-process-flow b { width: 24px; height: 24px; display: grid; place-items: center; margin-bottom: 5px; border-radius: 50%; background: #dceffc; color: #176ca5; font-size: 10px; }
.approval-process-flow strong { color: var(--navy); font-size: 12px; }
.approval-process-flow span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.approval-process-flow i { color: #6c90ad; font-size: 18px; font-style: normal; text-align: center; }
.approval-warning { margin: 14px 0; padding: 12px 14px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; border-radius: 9px; font-size: 11px; }
.approval-warning.warning { border: 1px solid #efd69e; background: #fff8e9; color: #805a12; }
.approval-warning.ready { border: 1px solid #bfe2d4; background: #eef9f4; color: #246a50; }
.approval-warning strong { white-space: nowrap; }
.approval-list-panel { margin-top: 14px; }
.approval-list-heading { gap: 18px; }
.approval-filters { display: flex; align-items: center; gap: 9px; }
.approval-filters select, .approval-filters input { min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.approval-table { min-width: 1380px; }
.approval-table td:nth-child(3) { max-width: 350px; }
.approval-review-dialog { width: min(960px, calc(100vw - 32px)); }
.approval-review-summary { margin: 16px 22px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.approval-review-summary > div { padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.approval-review-summary span, .approval-review-summary strong { display: block; }
.approval-review-summary span { margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.approval-review-summary strong { color: var(--navy); font-size: 12px; overflow-wrap: anywhere; }
.approval-review-summary .approval-draft-detail { grid-column: 1 / -1; }
.approval-draft-detail p { margin: 6px 0; color: var(--ink); font-size: 12px; overflow-wrap: anywhere; }
.approval-draft-detail b { color: var(--navy); }
.approval-history { margin: 14px 22px 0; max-height: 230px; display: grid; gap: 8px; overflow-y: auto; }
.approval-history article { padding: 11px 12px; border-left: 3px solid #8bb9d8; border-radius: 6px; background: #f5f8fb; }
.approval-history article > div { display: flex; justify-content: space-between; gap: 12px; }
.approval-history p { margin: 5px 0; color: var(--ink); font-size: 11px; }
.approval-history small, .approval-history time { color: var(--muted); font-size: 10px; }
.approval-review-fields { margin-top: 14px; }
.dashboard-approval-panel { margin-bottom: 16px; }
.dashboard-approval-summary { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.dashboard-approval-summary .status { white-space: nowrap; }
.dashboard-approval-table { min-width: 980px; }
.dashboard-approval-table td:nth-child(2) { max-width: 360px; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 78px 1fr; }
  .sidebar { padding: 20px 10px; }
  .brand > div:last-child, .nav-item em, .side-note { display: none; }
  .brand { justify-content: center; padding: 0 0 20px; }
  .nav-item, .nav-item.active { display: block; padding: 11px 6px; text-align: center; font-size: 11px; }
  .nav-item span, .nav-item.active span { display: block; margin: 0 0 4px; font-size: 16px; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .legacy-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .backup-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .receivable-aging-grid { grid-template-columns: repeat(3, 1fr); }
  .content { padding: 20px; }
  .project-detail-metrics { grid-template-columns: repeat(3, 1fr); }
  .portfolio-check-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow-map { min-width: 900px; }
  .approval-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-approval-summary { justify-content: flex-start; }
  .approval-process-panel { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .app-shell { display: block; }
  .sidebar { position: static; display: block; width: 100%; height: auto; padding: 8px 10px; overflow-x: auto; }
  .sidebar .brand, .sidebar .side-note { display: none; }
  .sidebar nav { display: flex; width: max-content; gap: 6px; margin: 0; padding: 0; overflow: visible; }
  .sidebar .nav-item, .sidebar .nav-item:not(.active), .sidebar .nav-item.active { display: block; width: auto; min-width: 98px; padding: 10px 12px; text-align: center; white-space: nowrap; }
  .sidebar .nav-item span { margin-right: 5px; }
  .sidebar .nav-item em { display: none; }
  .topbar { padding: 0 18px; }
  .content { padding: 16px; }
  .summary-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .legacy-summary-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .backup-summary-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dashboard-summary-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .receivable-aging-grid { grid-template-columns: 1fr; }
  .summary-card { padding: 14px; }
  .reconciliation-section, .payment-overview-section, .receivable-section, .receivable-analysis-section { margin-left: 0; margin-right: 0; padding: 14px; }
  .reconciliation-heading { align-items: stretch; flex-direction: column; }
  .payment-status-summary { align-self: flex-start; white-space: normal; }
  .panel-heading, .upload-row { align-items: stretch; flex-direction: column; }
  .portfolio-heading-actions, .project-detail-toolbar, .project-overview-heading { align-items: stretch; flex-direction: column; }
  .portfolio-heading-actions select, .portfolio-heading-actions .search-box { width: 100%; }
  .portfolio-review-register { grid-template-columns: 1fr; }
  .portfolio-review-register-main { grid-template-columns: 1fr; }
  .portfolio-review-register .button { grid-column: 1; grid-row: auto; min-height: 40px; }
  .project-document-checklist-heading { display: grid; }
  .project-document-checklist-heading p { text-align: left; }
  .project-document-checklist { grid-template-columns: 1fr; }
  .milestone-reminder-grid { grid-template-columns: 1fr 1fr; padding-left: 16px; padding-right: 16px; }
  .portfolio-heading-actions .search-box { width: 100%; }
  .portfolio-heading-actions select { width: 100%; }
  .project-detail-actions { justify-content: flex-start; }
  .project-detail-metrics { grid-template-columns: 1fr 1fr; }
  .portfolio-check-grid { grid-template-columns: 1fr; padding-left: 16px; padding-right: 16px; }
  .portfolio-alert-list { padding-left: 16px; padding-right: 16px; }
  .portfolio-alert { grid-template-columns: 1fr; gap: 4px; }
  .account-card { align-items: stretch; flex-direction: column; }
  .contracts-heading-actions { align-items: stretch; flex-direction: column; }
  .document-seal-application-panel .contracts-heading-actions .table-search { flex: 0 0 auto; width: 100%; min-height: 40px; }
  .finance-totals { grid-template-columns: 1fr 1fr; }
  .finance-filters { align-items: stretch; flex-direction: column; }
  .invoice-application-filters { align-items: stretch; flex-direction: column; }
  .finance-account-filters { align-items: stretch; flex-direction: column; }
  .finance-filters select, .finance-filters .search-box { width: 100%; margin-left: 0; }
  .finance-filters #financeTypeFilter, .finance-filters #financeCategoryFilter, .finance-filters #financeExpenseCategoryFilter { width: 100%; }
  .finance-date-range { width: 100%; }
  .finance-date-caption { display: none; }
  .finance-date-range input { flex: 1 1 0; width: auto; }
  .finance-search-group { flex: 0 0 auto; width: 100%; min-width: 0; margin-left: 0; }
  .finance-filters .finance-search-group .search-box { flex: 1 1 0; width: auto; max-width: none; }
  .finance-filter-total { flex-direction: column; align-items: flex-start; gap: 0; padding: 5px 8px; font-size: 10px; }
  .finance-filter-total strong { font-size: 12px; }
  .invoice-application-filters select, .invoice-application-filters .table-search { width: 100%; }
  .finance-account-filters select, .finance-account-filters .table-search { width: 100%; }
  .legacy-toolbar, .legacy-sheet-controls { align-items: stretch; flex-direction: column; }
  .expense-filters { align-items: stretch; flex-direction: column; }
  .personnel-payroll-filters { align-items: stretch; flex-direction: column; }
  .cost-invoice-filters { align-items: stretch; flex-direction: column; }
  .seal-filters { align-items: stretch; flex-direction: column; }
  .credential-filters { align-items: stretch; flex-direction: column; }
  .workflow-summary-grid { grid-template-columns: 1fr 1fr; }
  .workflow-list-heading, .workflow-filters { align-items: stretch; flex-direction: column; }
  .workflow-filters select, .workflow-filters input { width: 100%; }
  .approval-summary-grid { grid-template-columns: 1fr 1fr; }
  .approval-list-heading, .approval-filters { align-items: stretch; flex-direction: column; }
  .approval-filters select, .approval-filters input { width: 100%; }
  .approval-process-flow { min-width: 620px; }
  .approval-process-panel { overflow-x: auto; }
  .approval-warning { grid-template-columns: 1fr; }
  .approval-review-summary { grid-template-columns: 1fr 1fr; }
  .legacy-toolbar select, .legacy-toolbar .search-box, .legacy-sheet-controls .table-search { width: 100%; margin-left: 0; }
  .expense-filters select, .expense-filters .table-search { width: 100%; }
  .personnel-payroll-filters select, .personnel-payroll-filters .table-search { width: 100%; }
  .cost-invoice-filters select, .cost-invoice-filters .table-search { width: 100%; }
  .seal-filters select, .seal-filters .table-search { width: 100%; }
  .credential-filters select, .credential-filters .table-search { width: 100%; }
  .credential-filters .table-search { flex: 0 0 auto; min-height: 40px; }
  .legacy-sheet-context { align-items: stretch; flex-direction: column; }
  .legacy-sheet-context select { width: 100%; max-width: none; }
  .overview-toolbar { align-items: stretch; flex-direction: column; }
  .receivable-filters { align-items: stretch; flex-direction: column; }
  .receivable-filters select { width: 100%; }
  .table-search { width: 100%; min-width: 0; }
  .file-picker, .search-box { width: 100%; min-width: 0; }
  .button { min-height: 42px; }
  .detail-grid { grid-template-columns: 1fr; }
  .compact-detail-grid { grid-template-columns: 1fr; }
  .detail-item:nth-child(odd) { padding-right: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid label.wide { grid-column: auto; }
  .dialog-actions { flex-wrap: wrap; }
}

@page payroll-sheet { size: A4 landscape; margin: 8mm; }

@media print {
  @page { size: A4 portrait; margin: 15mm; }
  html, body { width: auto; min-height: 0; margin: 0; background: #fff !important; }
  body.settlement-print-active > :not(#settlementPrintDialog) { display: none !important; }
  body.settlement-print-active #settlementPrintDialog {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  body.settlement-print-active #settlementPrintDialog::backdrop { display: none !important; }
  body.settlement-print-active #settlementPrintPaper { width: 100%; margin: 0; padding: 0; border: 0; break-inside: avoid; }
  body.settlement-print-active .settlement-print-actions { display: none !important; }
  body.deposit-print-active > :not(#depositPrintDialog) { display: none !important; }
  body.deposit-print-active #depositPrintDialog {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  body.deposit-print-active #depositPrintDialog::backdrop { display: none !important; }
  body.deposit-print-active #depositPrintPaper { width: 100%; margin: 0; padding: 0; border: 0; break-inside: avoid; }
  body.deposit-print-active .settlement-print-actions { display: none !important; }
  body.expense-print-active > :not(#expensePrintDialog) { display: none !important; }
  body.expense-print-active #expensePrintDialog {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  body.expense-print-active #expensePrintDialog::backdrop { display: none !important; }
  body.expense-print-active #expensePrintPaper { width: 100%; margin: 0; padding: 0; border: 0; }
  body.expense-print-active .expense-print-actions { display: none !important; }
  body.payroll-print-active > :not(#payrollPrintDialog) { display: none !important; }
  body.payroll-print-active #payrollPrintDialog { page: payroll-sheet; position: static !important; display: block !important; width: 100% !important; max-width: none !important; max-height: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; overflow: visible !important; }
  body.payroll-print-active #payrollPrintDialog::backdrop { display: none !important; }
  body.payroll-print-active .payroll-print-drag-handle { display: none !important; }
  body.payroll-print-active #payrollPrintPaper { width: 100% !important; min-width: 0 !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; }
  body.payroll-print-active .payroll-print-actions { display: none !important; }
  body.payroll-print-active .payroll-print-table thead { display: table-header-group; }
  body.payroll-print-active .payroll-print-table tfoot { display: table-row-group; }
  body.payroll-print-active .payroll-print-table tr, body.payroll-print-active .payroll-print-signatures { break-inside: avoid; }
}

.site-filing {
  position: fixed;
  inset: auto 0 0;
  z-index: 20;
  padding: 5px 12px;
  background: #f7f9fc;
  border-top: 1px solid #dce5ee;
  color: #5c7084;
  font-size: 12px;
  text-align: center;
}
.site-filing a { color: inherit; text-decoration: none; }
.site-filing a:hover { text-decoration: underline; }
body:has(.site-filing) { padding-bottom: 27px; }
@media print { .site-filing { display: none !important; } }
.business-row-review {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff0cc;
  color: #805400;
  font-size: 12px;
  white-space: nowrap;
}
.business-row-review[data-status="已审核"] { background: #e5f5ed; color: #176548; }
.business-row-review[data-status="已解锁"] { background: #e6efff; color: #2158aa; }
.business-row-unlock { margin-left: 6px; }
.business-review-detail-content {
  max-width: min(920px, 86vw);
  max-height: 65vh;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 16px;
  background: #f3f6fb;
  color: #243954;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.65;
}
