.cash-sheet { --cs-ink:#142d50; --cs-muted:#506682; --cs-line:#cbd9e9; color:var(--cs-ink); background:#fff; border:1px solid var(--cs-line); border-radius:18px; padding:24px; margin:18px 0 28px; min-width:0; isolation:isolate; font-family:system-ui,sans-serif; }
.cash-sheet * { box-sizing:border-box; }
.cash-sheet h2,.cash-sheet h3,.cash-sheet p,.cash-sheet label,.cash-sheet span,.cash-sheet strong,.cash-sheet small,.cash-sheet b { color:inherit; }
.cash-sheet h2 { margin:4px 0 6px; font-size:26px; line-height:1.2; }
.cash-sheet h3 { margin:0 0 14px; font-size:17px; }
.cash-sheet p { margin:6px 0; }
.cash-sheet .cs-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; }
.cash-sheet .cs-eyebrow { font-size:11px; letter-spacing:.09em; color:#2468aa; font-weight:700; }
.cash-sheet .cs-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; }
.cash-sheet .button { background:#f5f8fc; color:#143658; border:1px solid #b9cadf; padding:10px 14px; border-radius:9px; font:600 13px/1.3 system-ui,sans-serif; min-height:40px; max-width:100%; white-space:normal; }
.cash-sheet .button.primary { background:#075cc4; color:#fff; border-color:#075cc4; }
.cash-sheet .button:disabled { opacity:.6; cursor:default; }
.cash-sheet .cs-date { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; border-bottom:1px solid var(--cs-line); padding:16px 0; margin-bottom:18px; }
.cash-sheet .cs-date label { display:flex; align-items:center; gap:10px; font-weight:650; }
.cash-sheet input,.cash-sheet select,.cash-sheet textarea { background:#fff; color:var(--cs-ink); border:1px solid #b9cadf; border-radius:8px; padding:10px; font:400 16px/1.3 system-ui,sans-serif; width:100%; min-width:0; max-width:100%; height:auto; text-align:left; }
.cash-sheet input:focus,.cash-sheet select:focus,.cash-sheet textarea:focus { outline:2px solid #267bdd; outline-offset:2px; }
.cash-sheet input[readonly] { background:#edf3fa; }
.cash-sheet .cs-date input { width:170px; }
.cash-sheet .cs-header-form,.cash-sheet .cs-entry,.cash-sheet .cs-exit { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:16px 0 22px; padding:18px; background:#f4f8fd; border:1px solid var(--cs-line); border-radius:12px; }
.cash-sheet .cs-header-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
.cash-sheet .cs-field { display:flex; flex-direction:column; gap:6px; min-width:0; font-size:12px; font-weight:650; }
.cash-sheet .cs-wide { grid-column:1/-1; }
.cash-sheet .cs-helper { color:var(--cs-muted); font-size:12px; font-weight:400; line-height:1.5; }
.cash-sheet .cs-adjust { display:flex; gap:10px; align-items:center; font-size:14px; }
.cash-sheet .cs-adjust input { width:20px; height:20px; flex:0 0 20px; accent-color:#075cc4; }
.cash-sheet .cs-entry-result { grid-column:span 3; display:flex; flex-direction:column; gap:4px; align-items:flex-start; padding:4px 0; }
.cash-sheet .cs-entry-result strong { font-size:24px; white-space:nowrap; }
.cash-sheet .cs-entry-result small { color:var(--cs-muted); }
.cash-sheet .cs-client-results { display:flex; flex-wrap:wrap; gap:8px; padding-top:8px; }
.cash-sheet .cs-client-results .button { text-align:left; display:flex; flex-direction:column; gap:4px; }
.cash-sheet .cs-client-results .button small { color:#506682; }
.cash-sheet .cs-selected { padding:8px 12px; border-left:3px solid #138559; background:#e8f6ef; }
.cash-sheet .cs-table-wrap { overflow-x:auto; width:100%; min-width:0; }
.cash-sheet .cs-table { border-collapse:collapse; width:100%; min-width:720px; table-layout:auto; background:#fff; color:var(--cs-ink); }
.cash-sheet .cs-table th { background:#083f85; color:#fff; text-align:left; padding:10px 9px; font-size:12px; }
.cash-sheet .cs-table td { background:#fff; color:var(--cs-ink); border-bottom:1px solid var(--cs-line); padding:10px 9px; font-size:13px; vertical-align:top; max-width:340px; }
.cash-sheet .cs-table strong,.cash-sheet .cs-table small { display:block; overflow-wrap:anywhere; }
.cash-sheet .cs-table small { color:var(--cs-muted); margin-top:4px; }
.cash-sheet .cs-table .button { padding:6px 8px; min-height:32px; margin:0 4px 4px 0; }
.cash-sheet .cs-money { white-space:nowrap; font-weight:700; }
.cash-sheet .cs-method { display:inline-block; border-radius:6px; padding:5px 8px; background:#e9f0f9; font-size:12px; font-weight:600; }
.cash-sheet .method-abandonado { background:#f8e7e4; color:#8b3025; }
.cash-sheet .method-credito { background:#fff1d4; color:#745009; }
.cash-sheet .cs-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:22px 0; }
.cash-sheet .cs-summary article { min-width:0; padding:18px; border:1px solid var(--cs-line); border-radius:12px; background:#fff; }
.cash-sheet .cs-total { display:flex; flex-direction:column; gap:4px; margin-bottom:11px; min-width:0; }
.cash-sheet .cs-total span { font-size:12px; color:var(--cs-muted); }
.cash-sheet .cs-total strong { font-size:20px; line-height:1.3; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.cash-sheet .cs-total small { font-size:11px; color:var(--cs-muted); }
.cash-sheet .cs-grand { padding:10px; background:#e6effc; border-radius:8px; }
.cash-sheet .cs-grand .cs-total { margin:0; }
.cash-sheet .cs-noncash { display:grid; grid-template-columns:1fr 1fr; gap:12px; border-top:1px solid var(--cs-line); margin-top:12px; padding-top:12px; }
.cash-sheet .cs-noncash strong { font-size:16px; }
.cash-sheet .cs-note { background:#edf4fd; padding:12px; border-radius:8px; font-size:13px; line-height:1.5; }
.cash-sheet .cs-history { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.cash-sheet .cs-exits { list-style:none; padding:0; }
.cash-sheet .cs-exits li { display:flex; flex-wrap:wrap; gap:10px; align-items:center; padding:10px 0; border-bottom:1px solid var(--cs-line); }
.cash-sheet .cs-exits li span { flex:1 1 180px; overflow-wrap:anywhere; }
/* The ledger has its own paper surface across every app theme. */
html[data-theme][data-design] body .cash-sheet.cash-sheet { background:#fff!important; color:#142d50!important; }
html[data-theme][data-design] body .cash-sheet.cash-sheet h2,html[data-theme][data-design] body .cash-sheet.cash-sheet h3,html[data-theme][data-design] body .cash-sheet.cash-sheet p,html[data-theme][data-design] body .cash-sheet.cash-sheet label,html[data-theme][data-design] body .cash-sheet.cash-sheet span,html[data-theme][data-design] body .cash-sheet.cash-sheet strong,html[data-theme][data-design] body .cash-sheet.cash-sheet small,html[data-theme][data-design] body .cash-sheet.cash-sheet b { color:#142d50!important; }
html[data-theme][data-design] body .cash-sheet.cash-sheet input,html[data-theme][data-design] body .cash-sheet.cash-sheet select,html[data-theme][data-design] body .cash-sheet.cash-sheet textarea { background:#fff!important; color:#142d50!important; border-color:#b9cadf!important; color-scheme:light; }
html[data-theme][data-design] body .cash-sheet.cash-sheet input[readonly] { background:#edf3fa!important; }
html[data-theme][data-design] body .cash-sheet.cash-sheet .button { background:#f5f8fc!important; color:#143658!important; border-color:#b9cadf!important; }
html[data-theme][data-design] body .cash-sheet.cash-sheet .button.primary,html[data-theme][data-design] body .cash-sheet.cash-sheet .button.primary * { background:#075cc4!important; color:#fff!important; border-color:#075cc4!important; }
html[data-theme][data-design] body .cash-sheet.cash-sheet .cs-helper,html[data-theme][data-design] body .cash-sheet.cash-sheet .cs-total span,html[data-theme][data-design] body .cash-sheet.cash-sheet .cs-total small,html[data-theme][data-design] body .cash-sheet.cash-sheet .cs-table small { color:#506682!important; }
html[data-theme][data-design] body .cash-sheet.cash-sheet .cs-table th { background:#083f85!important; color:#fff!important; }
html[data-theme][data-design] body .cash-sheet.cash-sheet .cs-table td { background:#fff!important; color:#142d50!important; }
html[data-theme][data-design] body .cash-sheet.cash-sheet .cs-summary article { background:#fff!important; }
@media(max-width:700px) { html[data-theme][data-design] body .cash-sheet.cash-sheet .cs-table,html[data-theme][data-design] body .cash-sheet.cash-sheet .cs-table tbody,html[data-theme][data-design] body .cash-sheet.cash-sheet .cs-table tr { min-width:0!important; width:100%!important; max-width:100%!important; } html[data-theme][data-design] body .cash-sheet.cash-sheet .cs-table td { min-width:0!important; max-width:100%!important; } html[data-theme][data-design] body .cash-sheet.cash-sheet .cs-table .button { width:auto!important; min-width:0!important; flex:0 1 auto!important; } }
@media(max-width:1100px) { .cash-sheet .cs-entry,.cash-sheet .cs-exit { grid-template-columns:repeat(2,minmax(0,1fr)); } .cash-sheet .cs-entry-result { grid-column:auto; } .cash-sheet .cs-summary { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:700px) { .cash-sheet { padding:14px; border-radius:12px; } .cash-sheet h2 { font-size:23px; } .cash-sheet .cs-header-form,.cash-sheet .cs-entry,.cash-sheet .cs-exit,.cash-sheet .cs-summary { grid-template-columns:minmax(0,1fr); padding:12px; } .cash-sheet .cs-summary { padding:0; } .cash-sheet .cs-table { min-width:0; } .cash-sheet .cs-table thead { display:none; } .cash-sheet .cs-table,.cash-sheet .cs-table tbody { display:block; } .cash-sheet .cs-table tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); border:1px solid var(--cs-line); border-radius:10px; margin:10px 0; overflow:hidden; } .cash-sheet .cs-table td { display:flex; flex-direction:column; gap:4px; max-width:none; border:0; white-space:normal; min-width:0; } .cash-sheet .cs-table td::before { content:attr(data-label); font-size:10px; color:var(--cs-muted); font-weight:400; } .cash-sheet .cs-table td:nth-child(2) { grid-column:1/-1; grid-row:1; } .cash-sheet .cs-table td:nth-child(1) { display:none; } .cash-sheet .cs-table td:last-child { grid-column:1/-1; flex-direction:row; flex-wrap:wrap; } .cash-sheet .cs-table td:last-child::before { width:100%; } .cash-sheet .cs-table .cs-money { font-size:18px; } .cash-sheet .cs-actions .button { flex:1 1 auto; } }

.cash-sheet { container-name:cash-ledger; container-type:inline-size; }
.cash-scan .cs-scan-photo,.cash-scan .cs-scan-original { background:#eef3fa; border:1px solid #cbd9e9; border-radius:10px; margin:16px 0; padding:10px; }
.cash-scan img { display:block; object-fit:contain; max-width:100%; max-height:460px; margin:10px auto; }
.cash-scan .cs-scan-original img { max-height:600px; }
.cash-scan .cs-scan-crop,.cash-scan .cs-scan-header,.cash-scan .cs-scan-row-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:16px 0; }
.cash-scan .cs-scan-row { border:1px solid #b9cadf; border-radius:12px; padding:16px; margin:14px 0; background:#fff; }
.cash-scan .cs-scan-reviewed { padding:12px; background:#eef5ff; border-radius:8px; }
.cash-scan .cs-scan-exit { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:14px; border:1px solid #cbd9e9; margin:10px 0 20px; }
.cash-scan [data-scan-error] { background:#fff0ef; color:#922418!important; border:1px solid #eaa49b; border-radius:8px; padding:12px; }
.cash-scan [data-scan-error][hidden] { display:none!important; }
html[data-theme][data-design] body .cash-scan.cash-sheet img { width:auto!important; max-width:100%!important; height:auto!important; }
html[data-theme][data-design] body .modal .cash-scan.cash-sheet.cash-scan :is(input,select,textarea) { color:#142d50!important; background:#fff!important; border-color:#b9cadf!important; }
html[data-theme][data-design] body .modal .cash-scan.cash-sheet.cash-scan :is(label,span,p,h3,strong,small,b,summary) { color:#142d50!important; }
html[data-theme][data-design] body .modal .cash-scan.cash-sheet.cash-scan :is(.cs-scan-row,.cs-scan-exit) { color:#142d50!important; background:#fff!important; }
html[data-theme][data-design] body .modal .cash-scan.cash-sheet.cash-scan .button { color:#143658!important; background:#f5f8fc!important; border:1px solid #b9cadf!important; }
html[data-theme][data-design] body .modal .cash-scan.cash-sheet.cash-scan .button.primary { color:#fff!important; background:#075cc4!important; }
html[data-theme][data-design] body .cash-scan.cash-sheet .cs-adjust input { width:20px!important; height:20px!important; min-width:20px!important; flex:0 0 20px!important; }
@container cash-ledger (max-width:600px) { .cash-scan .cs-scan-header,.cash-scan .cs-scan-row-fields,.cash-scan .cs-scan-exit { grid-template-columns:minmax(0,1fr); } .cash-scan .cs-scan-row { padding:12px; } }
html[data-theme][data-design] body .cash-sheet.cash-sheet .cs-table { min-width:720px; }
@container cash-ledger (max-width:700px) { html[data-theme][data-design] body .cash-sheet.cash-sheet .cs-table,html[data-theme][data-design] body .cash-sheet.cash-sheet .cs-table tbody,html[data-theme][data-design] body .cash-sheet.cash-sheet .cs-table tr { min-width:0!important; width:100%!important; max-width:100%!important; } html[data-theme][data-design] body .cash-sheet.cash-sheet .cs-table td { min-width:0!important; max-width:100%!important; } html[data-theme][data-design] body .cash-sheet.cash-sheet .cs-table .button { width:auto!important; min-width:0!important; flex:0 1 auto!important; } }
@container cash-ledger (max-width:1100px) { .cash-sheet .cs-entry,.cash-sheet .cs-exit { grid-template-columns:repeat(2,minmax(0,1fr)); } .cash-sheet .cs-entry-result { grid-column:auto; } .cash-sheet .cs-summary { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@container cash-ledger (max-width:700px) { .cash-sheet { padding:14px; border-radius:12px; } .cash-sheet h2 { font-size:23px; } .cash-sheet .cs-header-form,.cash-sheet .cs-entry,.cash-sheet .cs-exit,.cash-sheet .cs-summary { grid-template-columns:minmax(0,1fr); padding:12px; } .cash-sheet .cs-summary { padding:0; } .cash-sheet .cs-table { min-width:0; } .cash-sheet .cs-table thead { display:none; } .cash-sheet .cs-table,.cash-sheet .cs-table tbody { display:block; } .cash-sheet .cs-table tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); border:1px solid var(--cs-line); border-radius:10px; margin:10px 0; overflow:hidden; } .cash-sheet .cs-table td { display:flex; flex-direction:column; gap:4px; max-width:none; border:0; white-space:normal; min-width:0; } .cash-sheet .cs-table td::before { content:attr(data-label); font-size:10px; color:var(--cs-muted); font-weight:400; } .cash-sheet .cs-table td:nth-child(2) { grid-column:1/-1; grid-row:1; } .cash-sheet .cs-table td:nth-child(1) { display:none; } .cash-sheet .cs-table td:last-child { grid-column:1/-1; flex-direction:row; flex-wrap:wrap; } .cash-sheet .cs-table td:last-child::before { width:100%; } .cash-sheet .cs-table .cs-money { font-size:18px; } .cash-sheet .cs-actions .button { flex:1 1 auto; } }
