:root { color-scheme: light; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #192f48; background: #f3f6fa; line-height: 1.5; --navy: #142c49; --blue: #215eb3; --border: #d9e2ee; --muted: #52657c; }
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, input, select, textarea, summary { min-height: 44px; }
button { border: 1px solid var(--blue); border-radius: 7px; background: var(--blue); color: #fff; padding: .6rem 1rem; font-weight: 600; cursor: pointer; }
button:hover { background: #174984; }
button.secondary { background: #fff; color: var(--navy); border-color: #aebfd3; }
button.secondary:hover { background: #edf3fc; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid #db8700; outline-offset: 3px; }
a { color: #174f94; text-underline-offset: 3px; }
.skip-link { position: absolute; top: -80px; left: 1rem; background: #fff; padding: .75rem; z-index: 10; }
.skip-link:focus { top: 1rem; }
.topbar { padding: 1.6rem max(1.2rem, calc((100vw - 1400px) / 2)); background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar .eyebrow { color: #c5d5eb; }
.topbar > div { min-width: 0; overflow-wrap: anywhere; }
.topbar > button { flex-shrink: 0; }
h1 { font-size: clamp(1.45rem, 3vw, 2rem); margin: .2rem 0 0; font-weight: 650; letter-spacing: -.03em; }
h2 { font-size: 1.35rem; margin: .25rem 0 .5rem; letter-spacing: -.02em; }
h3 { font-size: 1.05rem; }
p { margin: .6rem 0 1rem; }
.eyebrow { color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.verification { padding: .9rem max(1.2rem, calc((100vw - 1400px) / 2)); color: #624800; background: #fff3d3; border-bottom: 1px solid #e0c889; display: grid; gap: .15rem; }
.verification span { font-size: .9rem; }
main { max-width: 1440px; margin: auto; padding: 0 1.2rem 2rem; }
.notice { overflow-wrap: anywhere; margin: 1rem 0; }
.notice:empty { margin: 0; }
.notice.error { padding: .8rem; background: #fff0ee; color: #9b251d; border: 1px solid #ecc4be; border-radius: 7px; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: 12px; margin: 1rem 0; padding: 1.5rem; box-shadow: 0 2px 6px #142c4905; scroll-margin-top: 1rem; }
.login-panel { max-width: 480px; margin: 2.5rem auto; }
.login-panel form { display: grid; gap: .7rem; }
.section-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding: 1.25rem 0 .1rem; }
.section-nav a { font-weight: 600; padding: .4rem 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.section-heading.compact { margin: 1rem 0 .5rem; }
.section-heading p { margin: 0; }
label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .4rem; }
input, select, textarea { display: block; width: 100%; color: var(--navy); background: #fff; border: 1px solid #aebfd3; border-radius: 6px; padding: .55rem .65rem; }
input[type="file"] { padding: .5rem; background: #f6f9fe; }
input[type="checkbox"] { width: 20px; min-height: 20px; accent-color: var(--blue); }
small, .muted { color: var(--muted); font-size: .85rem; }
small { display: block; margin-top: .4rem; }
.upload-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1rem; align-items: start; padding: 1rem; border: 1px dashed #aebfd3; border-radius: 9px; background: #fafcfe; }
.upload-grid > button { justify-self: start; }
.filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: end; }
.filters > button { justify-self: start; }
details { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: .5rem; }
summary { cursor: pointer; padding: .65rem 0; font-weight: 600; }
fieldset { margin: .5rem 0 1rem; padding: 1rem; border: 1px solid var(--border); border-radius: 6px; }
legend { font-size: .85rem; padding: 0 .4rem; }
.columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.column-option { display: flex; align-items: center; gap: .45rem; padding: .35rem .5rem; background: #f3f6fa; border-radius: 6px; }
.column-option label { display: flex; align-items: center; gap: .5rem; margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.column-option button { min-width: 35px; padding: .25rem; }
.template-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: .75rem; align-items: end; }
.table-scroll { max-width: 100%; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; text-align: left; }
caption { text-align: left; background: #f8fafd; color: var(--muted); padding: .65rem .85rem; font-size: .8rem; }
th { background: #edf2f8; color: #304965; font-size: .8rem; font-weight: 700; white-space: nowrap; }
td, th { padding: .75rem .85rem; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8faff; }
td { max-width: 340px; overflow-wrap: anywhere; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty { padding: 1.5rem; text-align: center; color: var(--muted); }
.actions { display: flex; gap: .45rem; flex-wrap: wrap; min-width: 190px; }
.actions button { font-size: .8rem; padding: .4rem .65rem; }
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: .25rem .5rem; border-radius: 5px; color: #314b68; background: #eaf0f7; white-space: normal; }
.badge.warning { background: #fff1d1; color: #715000; }
.badge.error { background: #ffebe8; color: #9b251d; }
.document-id { display: block; font-size: .73rem; color: var(--muted); margin-top: .35rem; }
.totals { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1rem 0; }
.total-card { padding: 1rem 1.2rem; border: 1px solid var(--border); border-left: 3px solid var(--blue); border-radius: 7px; min-width: 180px; background: #f8fafd; }
.total-card span { display: block; font-size: .8rem; color: var(--muted); }
.total-card strong { display: block; margin-top: .25rem; font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.batch-panel { margin-top: 1rem; padding: 1rem; background: #f4f8fe; border-radius: 7px; }
progress { width: 100%; height: 12px; accent-color: var(--blue); }
.batch-results { max-height: 260px; overflow: auto; font-size: .85rem; padding-left: 1.4rem; }
.batch-results li { padding: .25rem; overflow-wrap: anywhere; }
dialog { border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; width: min(920px, calc(100% - 2rem)); max-height: 90dvh; color: var(--navy); overflow: auto; }
dialog::backdrop { background: #10243bc2; }
.source-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.source-controls label { margin: 0; }
.source-controls input { width: 90px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .85rem; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; background: #f4f7fb; padding: 1rem; border: 1px solid var(--border); border-radius: 7px; max-height: 380px; overflow: auto; }
.source-text { max-height: 50dvh; }
.correction-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.wide { grid-column: 1 / -1; }
.badge.confirmed { background: #e6f1ea; color: #1f5a35; }
tbody tr.confirmed-row { background: #f6fbf7; }
.badge.double { background: #f3ecdc; color: #6b4e12; }
tbody tr.double-row { background: #fbf8f1; color: #5b5546; }
tbody tr.double-row td.numeric { text-decoration: line-through; }
.badge.stale { background: #fbe9e7; color: #8a2a16; }
.badge.possible { background: #fff4d6; color: #6b5200; }
tbody tr.stale-row { background: #fdf5f3; }
.total-card.double { border-style: dashed; opacity: .85; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .35rem 1rem; margin: .5rem 0 1rem; }
.facts dt { font-weight: 600; color: var(--muted); font-size: .85rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.evidence { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .8rem; white-space: pre-wrap; }
.evidence-list li, .proposal-totals li { overflow-wrap: anywhere; padding: .15rem 0; }
.evidence-list li { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .8rem; }
.difference { font-weight: 600; color: #9b251d; }
.difference.zero { color: #1f5a35; }
.proposal-form { display: grid; gap: .75rem; margin-top: 1rem; padding: 1rem; border: 1px solid var(--border); border-radius: 9px; background: #fafcfe; }
.proposal-form > button { justify-self: start; }
.badge.ok { background: #e6f1ea; color: #1f5a35; }
.bank-hint { padding: .75rem 1rem; background: #f4f8fe; border-left: 3px solid var(--blue); border-radius: 6px; }
.bank-grid { margin-bottom: .5rem; }
.bank-statements { margin-top: .5rem; }
.bank-detail-row, .bank-detail-row:hover { background: #fafcfe; }
.bank-detail { max-width: none; }
.bank-detail h4 { margin: .75rem 0 .35rem; font-size: .9rem; }
.bank-detail ul { margin: 0 0 .5rem; padding-left: 1.2rem; }
.bank-documents li { padding: .3rem 0; overflow-wrap: anywhere; }
.bank-documents button { margin-left: .5rem; font-size: .8rem; padding: .3rem .6rem; }
.error-text { color: #9b251d; }
footer { text-align: center; padding: 1rem; font-size: .8rem; color: var(--muted); }
@media (max-width: 1050px) { .template-grid { grid-template-columns: 1fr 1fr; } .columns { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { main { padding: 0 .75rem 1.5rem; } .topbar { padding: 1.25rem 1rem; } .verification { padding: .9rem 1rem; } .panel { padding: 1rem; } .section-heading { align-items: flex-start; flex-wrap: wrap; } .upload-grid, .filters, .template-grid, .correction-grid, .columns { grid-template-columns: 1fr; } .template-grid > button, .upload-grid > button, .filters > button { width: 100%; } .total-card { flex: 1; min-width: 140px; } dialog { padding: 1rem; } .section-nav { gap: .4rem 1rem; font-size: .9rem; } }
@media (prefers-reduced-motion: no-preference) { button { transition: background-color .15s ease; } }
.session-box { display: flex; align-items: center; gap: .8rem; flex-shrink: 0; min-width: 0; }
.session-box .muted { color: #c5d5eb; overflow-wrap: anywhere; }
button.secondary.danger { color: #9b1c1c; border-color: #d9a3a3; }
button.secondary.danger:hover { background: #fdf0f0; }
