:root {
  --bg: #0b1118;
  --surface: #121b25;
  --surface-2: #182431;
  --surface-3: #223243;
  --text: #edf3f8;
  --muted: #a8b5c2;
  --line: #2c3b4b;
  --accent: #68afe7;
  --accent-dark: #9bcdf3;
  --accent-soft: #17344c;
  --good: #68d39d;
  --good-soft: #17382b;
  --warn: #f2c15f;
  --warn-soft: #3a2f17;
  --bad: #f38a81;
  --bad-soft: #3d2324;
  --info: #c0a7f2;
  --info-soft: #2c2542;
  --shadow: 0 18px 50px rgba(0, 0, 0, .38);
  --radius: 14px;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); min-width: 320px; }
button, input, select { font: inherit; }
button, a.button { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; height: 68px; display: flex; align-items: center; gap: 12px; padding: 0 22px; background: rgba(18,27,37,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.reset-practice-button { position: absolute; left: 50%; min-width: 96px; transform: translateX(-50%); box-shadow: 0 0 0 1px rgba(255,255,255,.08),0 8px 22px rgba(0,0,0,.25); }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: white; font-weight: 750; }
.brand-copy { min-width: 210px; }
.brand-copy strong, .brand-copy span { display: block; }
.brand-copy strong { font-size: .92rem; font-weight: 650; }
.brand-copy span { margin-top: 2px; color: var(--muted); font-size: .76rem; }
.search { flex: 1; display: flex; justify-content: flex-end; }
.search input { width: min(360px, 100%); min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--text); }
.local-badge { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 0; border-radius: 999px; background: var(--good-soft); color: var(--good); font-size: .75rem; font-weight: 650; white-space: nowrap; }
.local-badge span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.shared-workspace-button { cursor: pointer; }
.shared-workspace-button.disconnected { background: var(--warn-soft); color: var(--warn); }
.shared-workspace-button.connected { background: #173f2b; color: #8ef0b4; box-shadow: inset 0 0 0 1px rgba(142, 240, 180, .38); }
.shared-workspace-button.syncing { background: var(--accent-soft); color: var(--accent-dark); }
.shared-workspace-button b { font: inherit; }
.role { display: grid; grid-template-columns: 34px auto; column-gap: 8px; align-items: center; }
.role strong { grid-row: 1 / 3; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); font-size: .75rem; }
.role span { color: var(--muted); font-size: .75rem; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 1.25rem; }

.main-grid { display: grid; grid-template-columns: 210px minmax(0,1fr); min-height: calc(100vh - 68px); }
.sidebar { position: sticky; top: 68px; align-self: start; height: calc(100vh - 68px); padding: 18px 12px; background: var(--surface); border-right: 1px solid var(--line); }
.nav-label { padding: 4px 10px 8px; color: var(--muted); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.nav-button { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; padding: 9px 11px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); text-align: left; font-size: .88rem; cursor: pointer; }
.nav-button:hover { background: var(--surface-2); color: var(--text); }
.nav-button.active { background: var(--accent-soft); color: var(--accent-dark); font-weight: 650; }
.nav-button b { min-width: 23px; padding: 2px 6px; border-radius: 999px; background: var(--surface-3); font-size: .68rem; text-align: center; }
.nav-button.attention-tab.has-issues { background: var(--bad-soft); color: var(--bad); }
.nav-button.attention-tab.has-issues:hover, .nav-button.attention-tab.has-issues.active { background: #552729; color: #ffaaa2; }
.nav-button.attention-tab.has-issues b { background: #7b3032; color: #fff; }

.workspace { min-width: 0; padding: 26px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.page-actions { display: flex; align-items: stretch; justify-content: flex-end; gap: 10px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-size: 1.42rem; line-height: 1.25; font-weight: 670; }
h2 { margin-bottom: 0; font-size: 1rem; line-height: 1.3; font-weight: 660; }
h3 { margin-bottom: 0; font-size: .9rem; font-weight: 660; }
.page-head p, .section-title p, .dialog-head p { margin-bottom: 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.teams-folder-controls { min-width: 230px; display: grid; grid-template-columns: auto auto; align-items: center; justify-items: end; gap: 5px 8px; }
.teams-folder-controls > span { grid-column: 1 / -1; color: var(--warn); font-size: .68rem; font-weight: 700; }
.teams-folder-controls > span.connected { color: var(--good); }
.teams-save-confirmation { color: var(--good); font-weight: 700; }
.teams-save-warning { color: var(--warn); }

.button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 13px; border: 1px solid transparent; border-radius: 9px; text-decoration: none; font-weight: 650; font-size: .82rem; cursor: pointer; }
.button:disabled { cursor: not-allowed; opacity: .5; }
.button.primary { background: var(--accent); color: #08131d; }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { background: var(--surface); border-color: var(--line); }
.button.quiet { min-height: 34px; padding: 6px 9px; background: transparent; color: var(--accent-dark); }
.button.danger { border-color: #a94b4b; background: #8d3535; color: #fff; }
.button.danger:hover { border-color: #cf6762; background: #a54242; }
.add-credit-cta { border-color: #47795f; background: rgba(62,137,93,.15); color: #9bd3b2; }
.add-credit-cta:hover { border-color: #62a47e; background: rgba(62,137,93,.25); }
.add-credit-cta span:last-child, .upload-pr-cta span:last-child { display: grid; text-align: left; }
.add-credit-cta strong, .upload-pr-cta strong { font-size: .82rem; }
.add-credit-cta small, .upload-pr-cta small { font-size: .66rem; font-weight: 550; opacity: .78; }
.icon-button { width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; font-size: 1.45rem; line-height: 1; cursor: pointer; }
.icon-button:hover { background: var(--surface-2); }

.balances { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.balance-card { padding: 14px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.balance-card span { display: block; color: var(--muted); font-size: .75rem; }
.balance-card strong { display: block; margin-top: 6px; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.balance-card button { margin-top: 4px; padding: 3px 0; border: 0; background: transparent; color: var(--accent-dark); font-size: .72rem; cursor: pointer; }
.attention-dashboard-panel { overflow: visible; }
.attention-dashboard { padding: 0 18px 18px; }
.attention-overview { display: flex; flex-wrap: wrap; gap: 0; margin: 0 -18px; padding: 13px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.attention-overview span { display: flex; align-items: baseline; gap: 6px; min-width: 150px; padding: 5px 18px 5px 0; color: var(--muted); font-size: .75rem; }
.attention-overview b { color: var(--text); font-size: 1.12rem; font-variant-numeric: tabular-nums; }
.attention-section { padding: 18px 0 0; }
.attention-section + .attention-section { margin-top: 18px; border-top: 1px solid var(--line); }
.attention-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.attention-section-heading h2 { margin-bottom: 3px; }
.attention-section-heading p { margin: 0; color: var(--muted); font-size: .74rem; line-height: 1.45; }
.attention-section-heading > b { flex: 0 0 auto; color: var(--muted); font-size: .72rem; }
.system-889-list, .policy-source-failures { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.system-889-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: #0f1822; }
.system-889-row span { min-width: 0; }
.system-889-row strong, .system-889-row small { display: block; }
.system-889-row strong { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.system-889-row small { margin-top: 2px; color: var(--muted); font-size: .7rem; }
.system-889-row b { flex: 0 0 auto; font-size: .74rem; }
.system-889-row.renew-soon b { color: var(--warn); }
.system-889-row.expired b { color: var(--bad); }
.policy-source-summary, .attention-section > p { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.policy-source-failures { margin-top: 8px; }
.policy-source-failures li { padding: 9px 10px; border-left: 3px solid var(--bad); background: var(--bad-soft); }
.policy-source-failures strong, .policy-source-failures span { display: block; font-size: .75rem; }
.policy-source-failures span { margin-top: 2px; color: var(--bad); }
.system-clear { color: var(--good); font-size: .76rem; line-height: 1.45; }
.credit-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.credit-fields .form-message { grid-column: 1 / -1; }

.review-layout { display: grid; grid-template-columns: minmax(440px,1.08fr) minmax(360px,.92fr); gap: 14px; align-items: start; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 5px 18px rgba(31,45,60,.05); }
.panel-head { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.panel-head > span { color: var(--muted); font-size: .75rem; }
.compliance-head { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); }
.compliance-head h2 { justify-self: start; }
.compliance-view-button { min-width: 104px; justify-self: center; box-shadow: 0 7px 18px rgba(89,183,239,.2); }
.compliance-delete-button { justify-self: end; border-color: var(--line); color: var(--muted); font-size: .75rem; font-weight: 600; }
.compliance-delete-button:hover { border-color: #7c4b4b; background: rgba(243,138,129,.07); color: var(--bad); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 9px 12px; background: var(--surface-2); color: var(--muted); font-size: .68rem; font-weight: 700; text-align: left; text-transform: uppercase; letter-spacing: .045em; white-space: nowrap; }
td { padding: 11px 12px; border-top: 1px solid var(--line); font-size: .8rem; vertical-align: middle; }
tbody tr[data-id] { cursor: pointer; }
tbody tr[data-id].office-PSA { background: rgba(52, 168, 103, .14); }
tbody tr[data-id].office-PSD { background: rgba(218, 171, 47, .16); }
tbody tr[data-id].office-PSM { background: rgba(76, 146, 204, .18); }
tbody tr[data-id].office-Gift-Funds { background: rgba(224, 128, 42, .19); }
tbody tr[data-id].office-PSA:hover, tbody tr[data-id].office-PSA.selected { background: rgba(52, 168, 103, .27); }
tbody tr[data-id].office-PSD:hover, tbody tr[data-id].office-PSD.selected { background: rgba(218, 171, 47, .29); }
tbody tr[data-id].office-PSM:hover, tbody tr[data-id].office-PSM.selected { background: rgba(76, 146, 204, .32); }
tbody tr[data-id].office-Gift-Funds:hover, tbody tr[data-id].office-Gift-Funds.selected { background: rgba(224, 128, 42, .34); }
td strong { display: block; font-size: .81rem; }
td small { display: block; margin-top: 3px; color: var(--muted); font-size: .7rem; }
.amount { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 999px; font-size: .68rem; font-weight: 650; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.good { color: var(--good); background: var(--good-soft); }
.pill.warn { color: var(--warn); background: var(--warn-soft); }
.pill.bad { color: var(--bad); background: var(--bad-soft); }
.pill.info { color: var(--info); background: var(--info-soft); }

.detail-body { padding: 15px; }
.detail-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.detail-title h2 { font-size: 1.02rem; }
.detail-id { margin-top: 4px; color: var(--muted); font-size: .73rem; }
.meta-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 14px 0; }
.meta { padding: 9px 10px; border-radius: 9px; background: var(--surface-2); }
.meta span { display: block; margin-bottom: 3px; color: var(--muted); font-size: .68rem; }
.meta strong { display: block; overflow-wrap: anywhere; font-size: .79rem; font-weight: 650; }
.itemized-section { margin: 0 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #0f1822; }
.itemized-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 43px; padding: 9px 11px; border: 0; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; }
.itemized-toggle:hover { background: var(--surface-2); }
.itemized-toggle span { font-size: .78rem; font-weight: 680; }
.itemized-toggle b { color: var(--accent-dark); font-size: .69rem; }
.itemized-list { padding: 0 11px 10px; border-top: 1px solid var(--line); }
.itemized-row { display: grid; grid-template-columns: minmax(0,2.4fr) minmax(72px,.55fr) minmax(92px,.7fr) minmax(92px,.7fr); align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.itemized-row span small, .itemized-row span strong { display: block; }
.itemized-row span small { margin-bottom: 2px; color: var(--muted); font-size: .64rem; text-transform: uppercase; letter-spacing: .04em; }
.itemized-row span strong { font-size: .75rem; }
.itemized-value { text-align: right; font-variant-numeric: tabular-nums; }
.itemized-list p { margin: 9px 0 0; color: var(--muted); font-size: .66rem; line-height: 1.45; }
.notice, .info-box, .rule-notice { padding: 10px 11px; border-radius: 9px; font-size: .76rem; line-height: 1.5; }
.notice { background: var(--info-soft); color: var(--info); }
.info-box { margin-bottom: 14px; background: var(--accent-soft); color: var(--accent-dark); }
.rule-notice { margin-bottom: 14px; border: 1px solid #6f5725; background: var(--warn-soft); color: var(--warn); }
.detail-section { margin-top: 16px; }
.detail-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.detail-section-head span { color: var(--muted); font-size: .7rem; }
.finding { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; gap: 8px; align-items: start; padding: 9px 0; border-top: 1px solid var(--line); }
.finding:first-of-type { border-top: 0; }
.finding-mark { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; font-size: .72rem; font-weight: 800; }
.finding-mark.good { background: var(--good-soft); color: var(--good); }
.finding-mark.warn { background: var(--warn-soft); color: var(--warn); }
.finding-mark.bad { background: var(--bad-soft); color: var(--bad); }
.finding-copy strong { display: block; font-size: .79rem; }
.finding-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.reference-link { padding: 3px 0; border: 0; background: transparent; color: var(--accent-dark); font-size: .69rem; white-space: nowrap; cursor: pointer; }
.required-list { display: grid; gap: 6px; }
.required-item { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: .75rem; }
.required-item a { margin-left: auto; color: var(--accent-dark); font-weight: 650; text-decoration: none; }
.standard-item { background: var(--good-soft); color: var(--good); }
.decision-row { display: flex; gap: 8px; margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); }
.decision-row .primary { flex: 1; }
.decision-note { margin-top: 8px; color: var(--good); font-size: .74rem; }
.file-button input, .support-actions input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.signature-actions { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); }
.signature-instruction { padding: 10px 11px; border-radius: 9px; background: var(--accent-soft); }
.signature-instruction strong, .signature-instruction span { display: block; }
.signature-instruction strong { font-size: .78rem; }
.signature-instruction span { margin-top: 3px; color: var(--accent-dark); font-size: .71rem; line-height: 1.45; }
.signature-fallback { margin-top: 9px; color: var(--muted); font-size: .69rem; }
.signature-fallback summary { cursor: pointer; }
.signature-fallback .button { display: inline-flex; margin-top: 8px; }
.status-document { display: flex; align-items: center; gap: 7px; }
.status-document button, .support-actions button, .support-actions label { padding: 4px 6px; border: 0; border-radius: 6px; background: var(--surface-3); color: var(--accent-dark); font-size: .67rem; cursor: pointer; white-space: nowrap; }
.document-buttons { display: flex; gap: 8px; margin: 12px 0 16px; }
.document-buttons .button { flex: 1; }
.support-section { margin-top: 18px; }
.support-heading-actions { display: flex; align-items: center; gap: 8px; }
.add-document-button { min-height: 30px; padding: 5px 9px; border-color: #3e7aa4; color: var(--accent-dark); font-size: .7rem; }
.simulate-documents-button { min-height: 30px; padding: 5px 9px; border-color: #8d6d2e; background: rgba(141,109,46,.14); color: var(--warn); font-size: .7rem; }
.simulate-documents-button:hover { border-color: var(--warn); background: rgba(141,109,46,.28); }
.simulate-documents-button.active { border-color: #4d9a70; background: rgba(42,111,75,.34); color: var(--good); }
.support-list { display: grid; gap: 7px; }
.support-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.support-row.complete { border-color: #4d9a70; background: linear-gradient(90deg,rgba(42,111,75,.34),var(--good-soft)); box-shadow: inset 4px 0 0 #55b57e; }
.document-preview-card { cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.document-preview-card:hover, .document-preview-card:focus-visible { border-color: #75c2f4; background: linear-gradient(90deg,rgba(29,95,145,.32),var(--surface-2)); outline: none; transform: translateY(-1px); }
.document-preview-hint { flex: 0 0 auto; color: var(--accent-dark); font-size: .67rem; font-weight: 750; white-space: nowrap; }
.support-complete-badge { display: inline-flex; align-items: center; align-self: flex-start; margin-top: 5px; padding: 3px 7px; border-radius: 999px; background: #245b40; color: #baf2cf; font-size: .64rem; font-weight: 750; }
.support-copy { min-width: 0; }
.support-copy strong, .support-copy span, .support-copy small { display: block; }
.support-copy strong { font-size: .74rem; }
.support-copy span { margin-top: 3px; color: var(--muted); font-size: .67rem; line-height: 1.4; }
.support-copy small { margin-top: 4px; overflow-wrap: anywhere; color: var(--accent-dark); font-size: .65rem; }
.support-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 5px; }
.support-actions:has(.support-select) { max-width: 54%; flex-wrap: wrap; justify-content: flex-end; }
.support-select { min-width: 220px; max-width: 100%; min-height: 32px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 7px; background: #0f1822; color: var(--text); font-size: .67rem; }
.support-actions .support-dropzone { display: inline-grid; grid-template-columns: auto 1fr; align-items: center; gap: 1px 5px; width: 138px; min-width: 138px; min-height: 42px; padding: 6px 8px; border: 1px dashed #4c91bf; border-radius: 7px; background: rgba(29,95,145,.14); color: var(--text); text-align: left; white-space: normal; transition: border-color .15s ease, background .15s ease; }
.support-actions .support-dropzone:hover, .support-actions .support-dropzone.dragging { border-color: #75c2f4; background: rgba(29,95,145,.3); }
.support-dropzone > span { grid-row: 1 / span 2; color: #75c2f4; font-size: .9rem; }
.support-dropzone > strong { font-size: .67rem; line-height: 1.15; }
.support-dropzone > small { color: var(--muted); font-size: .61rem; line-height: 1.1; }
.support-unavailable { color: var(--muted); font-size: .65rem; }
.document-expiry-warning, .document-expiry-current { display: block; margin-top: 5px; font-size: .66rem; font-style: normal; font-weight: 700; }
.document-expiry-warning { color: var(--warn); }
.document-expiry-current { color: var(--good); }
.support-footnote { margin: 8px 0 0; color: var(--muted); font-size: .65rem; line-height: 1.4; }
.package-list { margin-top: 14px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.package-list h3 { padding: 9px 11px; background: var(--surface-2); }
.package-list > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-top: 1px solid var(--line); font-size: .72rem; }
.package-list > div small { color: var(--muted); }
.secondary-files { opacity: .9; }
.package-missing, .signature-warning { margin-top: 12px; padding: 10px 11px; border-radius: 9px; }
.package-order-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 10px 11px; border: 1px solid #315e7e; border-radius: 9px; background: var(--accent-soft); }
.package-order-note strong { color: var(--accent-dark); font-size: .74rem; }
.package-order-note span { color: var(--text); font-size: .68rem; text-align: right; }
.package-missing { background: var(--warn-soft); color: var(--warn); }
.signature-warning { background: var(--info-soft); color: var(--info); }
.package-missing strong, .package-missing span, .signature-warning strong, .signature-warning span { display: block; }
.package-missing strong, .signature-warning strong { font-size: .74rem; }
.package-missing span, .signature-warning span { margin-top: 4px; font-size: .68rem; line-height: 1.45; }
.package-extract { width: 100%; margin-top: 13px; }
.completed-package { margin-top: 13px; padding: 11px; border: 1px solid #356b52; border-radius: 9px; background: var(--good-soft); }
.completed-package strong, .completed-package span { display: block; }
.completed-package strong { font-size: .76rem; }
.completed-package span { margin: 4px 0 10px; color: var(--good); font-size: .68rem; }
.upload-pr-cta { min-width: 224px; min-height: 58px; justify-content: flex-start; gap: 11px; padding: 10px 16px; border: 1px solid #4aa3e2; box-shadow: 0 10px 24px rgba(24,119,181,.28); }
.upload-pr-cta > span:first-child { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; background: rgba(255,255,255,.15); font-size: 1.35rem; line-height: 1; }
.upload-pr-cta > span:last-child { display: block; text-align: left; }
.upload-pr-cta strong, .upload-pr-cta small { display: block; }
.upload-pr-cta strong { font-size: .86rem; }
.upload-pr-cta small { margin-top: 2px; color: #d9efff; font-size: .68rem; font-weight: 500; }
.active-document-panel { border-color: #315e7e; box-shadow: 0 16px 40px rgba(0,0,0,.18); }
.active-document-column { min-width: 0; }
.signed-office-filters { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; margin-bottom: 9px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #0f1822; box-shadow: 0 8px 22px rgba(0,0,0,.16); }
.signed-office-filters button { min-height: 34px; padding: 6px 8px; border: 1px solid transparent; border-radius: 7px; color: #fff; font-size: .72rem; font-weight: 800; cursor: pointer; transition: filter .16s ease, box-shadow .16s ease, transform .16s ease; }
.signed-office-filters button[data-office="PSA"] { background: #27734f; }
.signed-office-filters button[data-office="PSM"] { background: #2d668f; }
.signed-office-filters button[data-office="PSD"] { background: #d5ad38; color: #201b0e; }
.signed-office-filters button[data-office="Gift Funds"] { background: #59636e; }
.signed-office-filters button[data-office="All"] { background: #755095; }
.signed-office-filters button:hover { filter: brightness(1.14); transform: translateY(-1px); }
.signed-office-filters button.active { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.28), 0 6px 15px rgba(0,0,0,.25); }
.active-upload-section { margin-top: 14px; }
.purchase-dropzone { position: relative; min-height: 86px; display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 10px; padding: 12px 14px; border: 2px dashed #3e7aa4; border-radius: 10px; background: linear-gradient(145deg,rgba(29,95,145,.18),rgba(29,95,145,.05)); text-align: left; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.purchase-dropzone:hover, .purchase-dropzone.dragging { border-color: #75c2f4; background: rgba(29,95,145,.28); transform: translateY(-1px); }
.purchase-dropzone input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.purchase-dropzone .drop-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: var(--accent); color: white; font-size: 1rem; }
.drop-copy { display: grid; gap: 3px; }
.purchase-dropzone strong { font-size: .8rem; }
.purchase-dropzone small { max-width: 500px; color: var(--muted); font-size: .7rem; line-height: 1.4; }
.uploaded-document-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.uploaded-document-list span { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 5px 8px; border: 1px solid #356b52; border-radius: 999px; background: var(--good-soft); color: var(--text); font-size: .66rem; overflow-wrap: anywhere; }
.uploaded-document-list b { color: var(--good); }
.finalization-result { margin-bottom: 11px; }
.finalize-purchase { width: 100%; min-height: 48px; margin-top: 15px; font-size: .86rem; box-shadow: 0 10px 22px rgba(29,95,145,.2); }
.finalization-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.finalization-files > div > span { display: grid; gap: 2px; }
.document-drag-link { flex: 0 0 auto; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--accent-dark); font-size: .67rem; font-weight: 700; text-decoration: none; cursor: grab; }
.document-drag-link:active { cursor: grabbing; }
.document-preview-dialog { width: min(1080px,94vw); max-width: none; height: min(880px,92vh); padding: 0; overflow: hidden; }
.document-preview-dialog[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.document-preview-body { min-height: 0; padding: 0 14px 14px; background: #0b1118; }
.document-preview-body iframe { width: 100%; height: 100%; border: 1px solid var(--line); border-radius: 10px; background: #202733; }
.archive-purchase { width: 100%; min-height: 44px; margin-top: 12px; border-color: #52677c; }
.empty-state { min-height: 160px; display: grid; place-content: center; justify-items: center; gap: 7px; padding: 24px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--text); font-size: .9rem; }
.empty-state span { max-width: 330px; font-size: .78rem; line-height: 1.45; }

.office-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.office-tabs button { min-width: 76px; padding: 8px 12px; border: 1px solid transparent; border-radius: 9px; color: #fff; font-weight: 800; cursor: pointer; transition: filter .16s ease, box-shadow .16s ease, transform .16s ease; }
.office-tabs button[data-office="PSA"] { background: #27734f; }
.office-tabs button[data-office="PSM"] { background: #2d668f; }
.office-tabs button[data-office="PSD"] { background: #c5962d; color: #19140a; }
.office-tabs button[data-office="Gift Funds"] { background: #59636e; }
.office-tabs button[data-office="All"] { background: #755095; }
.office-tabs button:hover { filter: brightness(1.14); transform: translateY(-1px); }
.office-tabs button.active { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.28), 0 6px 15px rgba(0,0,0,.25); }

.purchase-history-panel { overflow: hidden; }
.purchase-history-table { min-width: 1820px; }
.purchase-history-table th, .purchase-history-table td { min-width: 112px; }
.purchase-history-table th:nth-child(2), .purchase-history-table td:nth-child(2) { min-width: 148px; }
.purchase-history-table th:nth-child(6), .purchase-history-table td:nth-child(6), .purchase-history-table th:nth-child(11), .purchase-history-table td:nth-child(11) { min-width: 190px; }
.history-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 10px 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: .69rem; font-weight: 700; }
.history-legend span { display: inline-flex; align-items: center; gap: 6px; }
.history-swatch { width: 11px; height: 11px; border: 1px solid rgba(255,255,255,.22); border-radius: 3px; background: #343d48; }
.history-swatch.psa { background: #255f45; }
.history-swatch.psm { background: #285b80; }
.history-swatch.psd { background: #b28a27; }
.history-swatch.gift { background: #252d36; }
.purchase-history-table tbody tr { transition: background .16s ease, border-color .16s ease; }
.purchase-history-table tbody tr.purchase-history-row.pending { background: rgba(91,101,113,.22); }
.purchase-history-table tbody tr.purchase-history-row.finalized.history-office-psa { background: rgba(52,168,103,.25); }
.purchase-history-table tbody tr.purchase-history-row.finalized.history-office-psm { background: rgba(76,146,204,.29); }
.purchase-history-table tbody tr.purchase-history-row.finalized.history-office-psd { background: rgba(218,171,47,.30); }
.purchase-history-table tbody tr.purchase-history-row.finalized.history-office-gift-funds { background: rgba(48,57,67,.72); }
.purchase-history-table td:first-child strong, .purchase-history-table td:nth-child(2) strong { display: block; }
.purchase-history-table td small { display: block; margin-top: 3px; color: var(--muted); font-size: .66rem; }
.purchase-history-table tr.finalized td small { color: rgba(255,255,255,.72); }
.history-fiscal-header th { padding: 11px 14px; border-top: 9px solid #0b121a; border-bottom: 1px solid #52677c; background: #172534; text-align: left; }
.history-fiscal-header:first-child th { border-top: 0; }
.history-fiscal-header span { display: inline-block; margin-right: 9px; color: #f3f7fb; font-size: .82rem; }
.history-fiscal-header small { color: var(--muted); font-size: .68rem; font-weight: 650; }
.history-edit-button { display: block; min-width: 58px; margin: 7px 0 0 auto; padding: 5px 9px; border: 1px solid #6f8295; border-radius: 7px; background: rgba(10,18,27,.44); color: #eaf2f8; font-size: .68rem; font-weight: 750; cursor: pointer; }
.history-edit-button:hover { border-color: var(--accent); background: var(--accent-soft); }
.purchase-history-row.editing td { vertical-align: top; }
.history-edit-field { display: grid; gap: 4px; margin-bottom: 7px; text-align: left; }
.history-edit-field span { color: rgba(255,255,255,.74); font-size: .65rem; font-weight: 700; }
.history-edit-field input, .history-edit-field select { width: 100%; min-width: 0; padding: 7px 8px; border: 1px solid #637589; border-radius: 7px; background: #0d1721; color: #f3f7fb; font: inherit; font-size: .73rem; }
.history-number-fields { display: grid; grid-template-columns: minmax(58px,.8fr) minmax(70px,1fr); gap: 7px; }
.history-edit-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.history-edit-actions .button { min-height: 31px; padding: 6px 9px; font-size: .67rem; }
.history-entry-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.history-entry-grid .field { margin: 0; }
.history-entry-wide { grid-column: 1 / -1; }
.retention-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid #52677c; border-radius: 10px; background: var(--surface-2); }
.retention-banner strong, .retention-banner span { display: block; }
.retention-banner strong { font-size: .78rem; }
.retention-banner span { margin-top: 3px; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.retention-banner a { flex: 0 0 auto; color: var(--accent-dark); font-size: .73rem; font-weight: 650; text-decoration: none; }
.archive-browser { display: grid; gap: 13px; padding: 14px; border-bottom: 1px solid var(--line); background: #0f1822; }
.archive-current > span, .archive-period-group h3 { display: block; margin: 0 0 7px; color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.month-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.month-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; }
.month-card:hover, .month-card.active { border-color: var(--accent); background: var(--accent-soft); }
.month-card strong { font-size: .76rem; }
.month-card span { color: var(--muted); font-size: .68rem; white-space: nowrap; }
.fiscal-folder { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.fiscal-folder-button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.fiscal-folder-button span strong, .fiscal-folder-button span small { display: block; }
.fiscal-folder-button span strong { font-size: .8rem; }
.fiscal-folder-button span small { margin-top: 3px; color: var(--muted); font-size: .67rem; }
.fiscal-folder-button b { color: var(--accent-dark); font-size: .7rem; }
.month-cards.nested { padding: 0 10px 10px; }
.archive-no-history { color: var(--muted); font-size: .72rem; }
.retention-detail { margin: 12px 0; padding: 10px 11px; border: 1px solid #52677c; border-radius: 9px; background: var(--surface-2); }
.retention-detail strong, .retention-detail span { display: block; }
.retention-detail strong { font-size: .74rem; }
.retention-detail span { margin-top: 4px; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.library-section + .library-section { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.section-title { margin-bottom: 12px; }
.section-title p { margin-top: 4px; }
.library-section-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.document-card { display: flex; flex-direction: column; min-height: 164px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.document-type { width: fit-content; padding: 4px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-dark); font-size: .67rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.document-card h3 { margin-top: 12px; font-size: .85rem; }
.document-card p { flex: 1; margin: 6px 0 12px; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.document-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: .68rem; }
.document-meta a { color: var(--accent-dark); font-weight: 650; text-decoration: none; }
.document-meta button { padding: 0; border: 0; background: transparent; color: var(--accent-dark); font-size: .68rem; font-weight: 650; cursor: pointer; }
.current-889-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.current-889-summary span { padding: 6px 9px; border-radius: 999px; background: var(--good-soft); color: var(--good); font-size: .68rem; }
.current-889-summary span.renew { background: var(--warn-soft); color: var(--warn); }
.current-889-summary span.blocked { background: var(--bad-soft); color: var(--bad); }
.vendor-889-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.vendor-889-card { display: flex; flex-direction: column; gap: 10px; min-height: 174px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.vendor-889-card.renew-soon { border-color: #826923; background: #211e16; }
.vendor-889-card.expired, .vendor-889-card.unknown { border-color: #713b3d; background: #21181b; }
.vendor-889-status { display: inline-flex; padding: 4px 7px; border-radius: 999px; background: var(--good-soft); color: var(--good); font-size: .63rem; font-weight: 750; }
.vendor-889-card.renew-soon .vendor-889-status { background: var(--warn-soft); color: var(--warn); }
.vendor-889-card.expired .vendor-889-status, .vendor-889-card.unknown .vendor-889-status { background: var(--bad-soft); color: var(--bad); }
.vendor-889-card h4 { margin: 9px 0 0; font-size: .84rem; }
.vendor-889-card p { margin: 4px 0 0; overflow-wrap: anywhere; color: var(--muted); font-size: .68rem; }
.vendor-889-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: auto 0 0; }
.vendor-889-card dl div { padding: 7px; border-radius: 7px; background: var(--surface-2); }
.vendor-889-card dt { color: var(--muted); font-size: .6rem; text-transform: uppercase; }
.vendor-889-card dd { margin: 3px 0 0; font-size: .68rem; font-weight: 650; }
.vendor-889-card button { align-self: flex-start; padding: 5px 7px; border: 0; border-radius: 6px; background: var(--surface-3); color: var(--accent-dark); font-size: .67rem; cursor: pointer; }
.vendor-889-empty { grid-column: 1 / -1; padding: 20px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-align: center; }
.vendor-889-empty strong, .vendor-889-empty span { display: block; }
.vendor-889-empty strong { color: var(--text); font-size: .78rem; }
.vendor-889-empty span { margin-top: 4px; font-size: .7rem; }

dialog { width: min(570px,calc(100% - 28px)); max-height: calc(100vh - 34px); padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
#reference-dialog { width: min(760px,calc(100% - 28px)); }
#vendor-889-library-dialog { width: min(900px,calc(100% - 28px)); }
#vendor-889-library-dialog .vendor-889-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
dialog::backdrop { background: rgba(15,24,34,.56); backdrop-filter: blur(2px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin-bottom: 4px; }
.dialog-body { max-height: calc(100vh - 190px); padding: 17px; overflow-y: auto; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 17px 16px; border-top: 1px solid var(--line); }
.question-message { margin: 0; color: var(--text); font-size: .95rem; line-height: 1.65; white-space: pre-line; }
.intake-notice-dialog { width: min(520px,calc(100% - 28px)); }
.intake-notice-head { justify-content: center; border-bottom-color: #713b3d; background: var(--bad-soft); text-align: center; }
.intake-notice-head h2 { margin: 0; color: var(--bad); letter-spacing: .08em; }
.intake-notice-acknowledgment { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--text); font-size: .82rem; line-height: 1.5; cursor: pointer; }
.intake-notice-acknowledgment input { flex: 0 0 auto; margin-top: 3px; accent-color: var(--accent); }
.intake-notice-dialog .dialog-actions { justify-content: center; }
.intake-notice-dialog .dialog-actions .button { min-width: 112px; }
.field { display: block; margin-top: 13px; }
.field > span { display: block; margin-bottom: 6px; font-size: .76rem; font-weight: 650; }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--text); }
.field textarea { resize: vertical; line-height: 1.45; }
.field > span small { color: var(--muted); font-size: .68rem; font-weight: 500; }
.vendor-889-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.vendor-889-wide { grid-column: 1 / -1; }
.vendor-889-expiry { margin-top: 13px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--muted); font-size: .72rem; line-height: 1.45; }
.vendor-889-expiry.current { border-color: #356b52; background: var(--good-soft); color: var(--good); }
.vendor-889-expiry.renew-soon { border-color: #826923; background: var(--warn-soft); color: var(--warn); }
.vendor-889-expiry.expired, .vendor-889-expiry.unknown { border-color: #713b3d; background: var(--bad-soft); color: var(--bad); }
.screening-options { display: grid; gap: 8px; margin: 15px 0 0; padding: 0; border: 0; }
.screening-options legend { margin-bottom: 1px; font-size: .76rem; font-weight: 650; }
.upload-mode-options { margin: 0 0 15px; }
.upload-mode-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.confirmation-check { display: grid; grid-template-columns: 20px minmax(0,1fr); align-items: start; gap: 10px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.confirmation-check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.confirmation-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.confirmation-check strong, .confirmation-check small { display: block; }
.confirmation-check strong { font-size: .78rem; }
.confirmation-check small { margin-top: 4px; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.form-message { min-height: 18px; margin-top: 9px; color: var(--bad); font-size: .74rem; }
.ao-document-help { margin: 11px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.delete-warning { padding: 13px 14px; border: 1px solid #7c3c3c; border-radius: 10px; background: var(--bad-soft); }
.delete-warning strong, .delete-warning span { display: block; }
.delete-warning strong { color: var(--bad); font-size: .82rem; }
.delete-warning span { margin-top: 5px; color: var(--text); font-size: .74rem; line-height: 1.5; }
.analysis-progress { margin-top: 15px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.progress-bar { height: 6px; margin-bottom: 9px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.progress-bar span { display: block; width: 4%; height: 100%; border-radius: inherit; background: var(--accent); transition: width .2s ease; }
.analysis-progress strong, .analysis-progress > span { display: block; }
.analysis-progress strong { font-size: .78rem; }
.analysis-progress > span { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.reference-list { display: grid; grid-template-columns: 125px minmax(0,1fr); gap: 8px 12px; margin: 0 0 14px; }
.reference-list dt { color: var(--muted); font-size: .73rem; }
.reference-list dd { margin: 0; font-size: .75rem; font-weight: 650; }
.reference-summary { padding: 14px 15px; border: 1px solid color-mix(in srgb,var(--accent) 55%,var(--line)); border-radius: 10px; background: var(--accent-soft); }
.reference-summary span, .reference-purchaser span, .reference-language span { color: var(--accent-dark); font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.reference-summary p, .reference-purchaser p { margin: 6px 0 0; font-size: .78rem; line-height: 1.55; }
.reference-purchaser { margin-top: 11px; padding: 14px 15px; border: 1px solid #3d6c55; border-radius: 10px; background: color-mix(in srgb,#244c39 32%,var(--surface-2)); }
.reference-language { margin-bottom: 11px; padding: 14px 15px; border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--surface-2); }
.reference-language blockquote { margin: 7px 0 0; color: var(--text); font-size: .78rem; font-style: italic; line-height: 1.55; }
.reference-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 11px; }
.reference-action-grid section, .reference-checks { padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.reference-action-grid h3, .reference-checks h3 { margin: 0; font-size: .78rem; }
.reference-action-grid ul, .reference-checks ul { margin: 9px 0 0; padding-left: 18px; }
.reference-action-grid li, .reference-checks li { margin-top: 6px; color: var(--muted); font-size: .73rem; line-height: 1.45; }
.reference-checks { margin-top: 11px; }
.reference-excerpt { margin-top: 11px; padding: 12px 14px; border-left: 3px solid var(--accent); border-radius: 0 9px 9px 0; background: var(--surface-2); }
.reference-excerpt summary { cursor: pointer; font-size: .76rem; font-weight: 700; }
.reference-excerpt p { margin: 8px 0 0; font-size: .73rem; line-height: 1.55; }
.reference-sources { margin-top: 11px; }
.reference-sources h3 { margin: 0 0 8px; font-size: .78rem; }
.reference-sources > div { display: grid; gap: 8px; }
.reference-sources article { padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.reference-sources article a, .reference-sources article strong { display: inline-block; color: var(--accent); font-size: .75rem; font-weight: 750; }
.reference-sources article span, .reference-sources article small { display: block; margin-top: 3px; color: var(--muted); font-size: .68rem; }
.reference-sources article p { margin: 6px 0 0; font-size: .72rem; line-height: 1.45; }
.signature-prompt { padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.signature-prompt span, .signature-prompt strong { display: block; }
.signature-prompt span { color: var(--muted); font-size: .69rem; }
.signature-prompt strong { margin-top: 4px; font-size: .82rem; }
.signature-steps { margin: 14px 0 0; padding-left: 22px; }
.signature-steps li { margin-top: 7px; font-size: .76rem; line-height: 1.45; }
.signature-message { color: var(--muted); }

@media (max-width: 1000px) {
  .review-layout { grid-template-columns: 1fr; }
  .attention-overview span { min-width: 135px; }
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .history-entry-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .vendor-889-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .topbar { padding: 0 12px; }
  .reset-practice-button { position: static; min-width: 72px; margin-left: auto; transform: none; }
  .mobile-menu { display: block; }
  .brand-copy, .local-badge, .role span { display: none; }
  .role { grid-template-columns: 34px; }
  .search input { width: 100%; }
  .main-grid { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 68px; bottom: 0; left: 0; z-index: 30; width: 230px; height: auto; transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .workspace { padding: 18px 14px; }
  .itemized-row { grid-template-columns: 1fr 1fr 1fr; }
  .itemized-description { grid-column: 1 / -1; }
  .upload-mode-grid { grid-template-columns: 1fr; }
  .page-head { display: grid; }
  .page-actions { width: 100%; justify-content: stretch; }
  .page-actions .button { flex: 1; }
  .credit-fields { grid-template-columns: 1fr; }
  .credit-fields .form-message { grid-column: auto; }
  .balances { grid-template-columns: 1fr; }
  .retention-banner { align-items: flex-start; flex-direction: column; }
  .month-cards { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; }
  .page-head .button { width: 100%; }
  .history-entry-grid { grid-template-columns: 1fr; }
  .history-entry-wide { grid-column: auto; }
  .vendor-889-grid { grid-template-columns: 1fr; }
  #vendor-889-library-dialog .vendor-889-grid { grid-template-columns: 1fr; }
  .library-section-title { flex-direction: column; }
  .library-section-title .button { width: 100%; }
  .support-row { align-items: flex-start; flex-direction: column; }
  .support-actions:has(.support-select) { width: 100%; max-width: none; justify-content: flex-start; }
  .support-select { width: 100%; }
}
@media (max-width: 500px) {
  .compliance-head { grid-template-columns: 1fr auto; }
  .compliance-head h2 { grid-column: 1 / -1; }
  .compliance-view-button { justify-self: start; }
  .meta-grid { grid-template-columns: 1fr; }
  .finding { grid-template-columns: 22px minmax(0,1fr); }
  .reference-link { grid-column: 2; justify-self: start; }
  .reference-action-grid { grid-template-columns: 1fr; }
  .decision-row, .dialog-actions { flex-direction: column-reverse; }
  .decision-row .button, .dialog-actions .button { width: 100%; }
  .reference-list { grid-template-columns: 1fr; }
  .vendor-889-form-grid { grid-template-columns: 1fr; }
  .vendor-889-wide { grid-column: auto; }
}
