.ledger-actions{display:flex;gap:8px;flex-wrap:wrap}.ledger-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin:24px 0}.ledger-stat{padding:22px;border:1px solid #dce2d3;background:#fffef9;border-radius:14px;display:flex;flex-direction:column;gap:10px}.ledger-stat span,.ledger-stat small{font-size:12px;color:#738368}.ledger-stat strong{font:28px Georgia,serif}.ledger-filters{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin:24px 0}.ledger-filters label{font-size:12px;color:#62725a;display:grid;gap:6px}.ledger-filters input[type=search]{width:180px}.check{display:flex!important;align-items:center;gap:8px;font-size:12px!important}.check input[type=checkbox]{width:18px;height:18px;flex-shrink:0;accent-color:#244c3d}.ledger-subtabs{display:flex;gap:8px;flex-wrap:wrap}.ledger-subtabs [aria-pressed=true]{background:#e6eddc;border-color:#899d78}.ledger-row{width:100%;display:flex;align-items:center;justify-content:space-between;gap:20px;text-align:left;background:#fffef9;border:1px solid #e1e5d8;border-radius:12px;padding:16px 18px;margin:8px 0;color:#324631}.ledger-row:disabled{cursor:default;opacity:.8}.row-copy{display:grid;gap:8px}.row-copy strong{font-size:14px}.row-copy small{font-size:11px;color:#7a856f;line-height:1.6}.row-price{font-family:Georgia,serif;white-space:nowrap;font-size:18px}.receipt-drafts{background:#f1eddc;border-radius:12px;padding:0 18px}.receipt-drafts:has(.draft-row){padding:18px}.receipt-drafts h3{font-size:15px;margin:0 0 12px}.draft-row{display:flex;align-items:center;gap:12px;margin:8px 0}.draft-delete,.line-remove{border:0;background:transparent;color:#985c43;padding:10px;cursor:pointer}#ledger-error,#receipt-save-error,#review-warnings:not(:empty){padding:14px;background:#f4e9d6;color:#775334;border-radius:10px;font-size:13px;line-height:1.7}dialog{color:#2e4436;background:#fffef9;border:1px solid #d8dfce;border-radius:18px;padding:25px;max-height:92dvh;max-width:1140px;width:calc(100% - 36px);overflow-y:auto}dialog::backdrop{background:#243c3277;backdrop-filter:blur(4px)}.review-top{display:flex;align-items:center;justify-content:space-between;gap:15px}.review-top h2{margin:0}.review-layout{display:grid;grid-template-columns:minmax(220px,1fr) minmax(0,1.7fr);gap:26px;margin-top:20px}.review-photo{align-self:start;position:sticky;top:0}.review-photo img{width:100%;max-height:68vh;object-fit:contain;background:#eee;border-radius:8px}.review-photo p{font-size:12px}.receipt-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.receipt-fields label,#receipt-form>label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#66745d;margin-bottom:10px}#receipt-form input:not([type=checkbox]),#receipt-form select,#receipt-form textarea{width:100%;min-width:0;font-size:14px}#receipt-form textarea{font:inherit;min-height:65px;border:1px solid #d7dfca;border-radius:9px;padding:10px;resize:vertical}#receipt-form h3{font-size:16px;margin-top:20px}.receipt-line{display:grid;grid-template-columns:minmax(110px,2fr) minmax(85px,1fr) minmax(65px,1fr) auto;gap:7px;align-items:center;background:#f5f6ef;border:1px solid #e5e8db;border-radius:10px;padding:10px;margin:8px 0}.line-uncertain{grid-column:1 / 4}.line-remove{grid-column:4;grid-row:1 / 3;font-size:12px;padding:6px}.totals{margin-top:25px}#receipt-reconciliation{font-size:13px;padding:12px;background:#edf1e3;border-radius:10px}.receipt-save-actions{display:flex;justify-content:space-between;gap:12px;margin-top:20px}.receipt-save-actions .button{font-size:13px}.button:disabled{opacity:.5;cursor:wait}#receipt-display{max-width:650px}#receipt-display-image{max-width:100%;display:block;margin:0 auto}#receipt-display-summary,#receipt-display-note{font-size:13px}#ledger-count{font-size:12px}@media(max-width:720px){.ledger-summary{gap:8px}.ledger-stat{padding:14px 10px}.ledger-stat strong{font-size:22px}.ledger-stat span,.ledger-stat small{font-size:10px}.ledger-filters{gap:8px}.ledger-filters label{flex:1;min-width:40%}.ledger-filters select,.ledger-filters input[type=search]{width:100%}.ledger-row{padding:14px 12px;gap:8px}.row-copy strong{font-size:13px}.row-price{font-size:16px}dialog{padding:18px;width:calc(100% - 20px);max-height:94dvh}.review-layout{display:flex;flex-direction:column;gap:12px}.review-photo{position:static;max-height:260px;overflow:auto}.review-photo img{max-height:230px}.review-photo p{margin:0}.receipt-line{grid-template-columns:minmax(100px,2fr) minmax(80px,1fr) 44px}.line-name{grid-column:1 / 3}.line-category{grid-column:1;grid-row:2}.line-amount{grid-column:2;grid-row:2}.line-uncertain{grid-column:1 / 3;grid-row:3}.line-remove{grid-column:3;grid-row:1 / 4}.receipt-save-actions{flex-wrap:wrap}.receipt-save-actions .button{flex:1}.receipt-fields{gap:8px}.ledger-actions{margin-top:16px}}

.ledger-analysis{padding:20px;border:1px solid #dce2d2;border-radius:14px;margin-bottom:25px;background:#fffef9}.ledger-analysis summary{cursor:pointer;font-size:14px;font-weight:600}.ledger-charts{display:grid;grid-template-columns:1fr 1fr;gap:30px;margin-top:24px}.ledger-charts h3{font-size:14px;color:#64745c}.chart-row{margin:12px 0}.chart-caption{display:flex;justify-content:space-between;gap:14px;font-size:11px;margin-bottom:6px}.chart-caption span{overflow-wrap:anywhere}.chart-caption strong{white-space:nowrap;font-weight:500}.chart-track{background:#edf1e6;border-radius:4px;height:6px;overflow:hidden}.chart-fill{height:6px;background:#789568;border-radius:4px}.chart-fill.negative{background:#bd7758}@media(max-width:640px){.ledger-charts{grid-template-columns:1fr;gap:15px}}

/* Receipt upload batch */
.receipt-batch{margin:16px 0;padding:18px;border:1px solid #d9e4df;border-radius:14px;background:#f5f9f6}
.batch-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.batch-heading h3{margin:0}
#receipt-batch-list{padding:0;list-style:none;display:grid;gap:8px;max-height:420px;overflow:auto}
.receipt-batch-row{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid #dce5de;background:#fff;border-radius:10px}
.receipt-batch-copy{flex:1;min-width:0}.receipt-batch-copy strong,.receipt-batch-copy small{display:block;overflow-wrap:anywhere}
.receipt-batch-copy small{margin-top:5px;color:#52665c}.receipt-batch-row[data-state="needs_review"] small,.receipt-batch-row[data-state="failed"] small,.receipt-batch-row[data-state="unknown"] small{color:#a33225}
.receipt-batch-row button{flex-shrink:0}.receipt-batch [hidden]{display:none!important}
@media(max-width:600px){.receipt-batch{padding:12px}.receipt-batch-row{align-items:stretch;flex-direction:column}.receipt-batch-row button{width:100%}}

#receipt-analysis{padding:14px;background:#f5f6ef;border:1px solid #d8dfce;border-radius:12px;margin:12px 0}.receipt-copy-notice{font-weight:600}.receipt-conflict-note{color:#8c392a;overflow-wrap:anywhere}.receipt-copy-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px}.receipt-copy{padding:12px;border:1px solid #d8dfce;border-radius:8px;background:#fffef9;overflow-wrap:anywhere}.receipt-copy summary{cursor:pointer;font-weight:600}.receipt-copy p,.receipt-copy li{font-size:13px;line-height:1.6}#receipt-conflicts-wrap[hidden],#receipt-analysis[hidden]{display:none!important}

#receipt-history{width:min(920px,94vw);max-height:90vh;overflow:auto}.history-event{margin:.75rem 0;padding:.75rem;border:1px solid #9ca3af;border-radius:.5rem}.history-event summary{cursor:pointer;font-weight:600}.history-event ul{padding-left:1.4rem}.history-event li,.history-event p{overflow-wrap:anywhere;white-space:pre-wrap}.history-document,.history-comparison{margin:.65rem 0}.history-document summary,.history-comparison summary{font-weight:500}

.receipt-feedback{margin:1rem 0;padding:1rem;border:1px solid #d7e0da;border-radius:14px;background:#fff}
.receipt-feedback>summary{cursor:pointer;font-weight:700}.feedback-toolbar{display:flex;flex-wrap:wrap;gap:.7rem;align-items:center}.feedback-toolbar label{display:flex;gap:.5rem;align-items:center}.feedback-toolbar select{max-width:100%;padding:.5rem;border:1px solid #cbd7ce;border-radius:8px;background:#fff}.receipt-feedback .ledger-summary{margin:1rem 0}.receipt-feedback li{margin:.4rem 0;overflow-wrap:anywhere}#receipt-feedback-error{color:#a52e27}#receipt-feedback-examples{display:flex;flex-direction:column;gap:.5rem}#receipt-feedback-examples button{text-align:left;white-space:normal;overflow-wrap:anywhere}.receipt-feedback .footnote{overflow-wrap:anywhere}
