/* CHIFRANDO DEBIT BOOK — SHARED FOUNDATIONS */
:root{--blue:#204da7;--ink:#17243b;--muted:#748196;--line:#e6ebf3}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Inter,system-ui,-apple-system,'Segoe UI',Arial,sans-serif;font-size:14px;line-height:1.5;color:var(--ink);background:#f5f7fb}button,input,select,textarea{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #204da7;outline-offset:2px}.hidden{display:none!important}
.app{display:flex;min-height:100vh;align-items:stretch}.side{width:244px;flex:0 0 244px;background:#163a83;color:white;min-height:100vh;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;padding:23px 14px;z-index:1001}.brand{font-size:19px;font-weight:800;padding:7px 12px 24px}.nav{display:flex;flex-direction:column;gap:7px}.navbtn{display:flex;align-items:center;gap:13px;text-align:left;color:#dbe7ff;background:transparent;border:0;border-radius:12px;padding:12px 15px;width:100%;font-weight:500}.navbtn span{font-size:21px;min-width:25px}.navbtn b{font-weight:600}.navbtn.active,.navbtn:hover{background:rgba(255,255,255,.16);color:#fff}.side-bottom{margin-top:auto;display:flex;flex-direction:column;gap:5px}.main{flex:1;min-width:0;padding:24px 28px 40px;max-width:100%}.mobile-overlay{display:none}.mobile-top{display:flex;align-items:center;gap:13px;min-width:0}.hamburger{display:none;background:#edf3ff;border:0;border-radius:10px;width:39px;height:39px;color:#204da7;font-size:20px;flex-shrink:0}
h1,h2,h3,p{margin-top:0}h3{font-size:17px;margin-bottom:10px}.card{background:#fff;padding:22px;margin-bottom:18px}.head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:16px}.head h3,.head p{margin:0}.head p{margin-top:4px}.muted{color:#7b8799;font-size:12px}.btn{border:1px solid #e4eaf3;background:white;color:#204da7;padding:10px 15px;font-size:13px;font-weight:650;display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:normal}.btn.primary{background:#204da7;color:white;border-color:#204da7}.btn.success{background:#e4f8ec;color:#137e42;border-color:#d4eedf}.btn.light{background:#f4f7fc;color:#204da7}.btn:hover{filter:brightness(.97)}input,select,textarea{display:block;width:100%;border:1px solid #dce4ef;background:white;border-radius:11px;padding:12px 13px;min-height:43px;color:#18253b}input[type=file]{padding:7px;min-height:0}label{display:block;margin-bottom:6px;font-weight:650;font-size:12px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:15px}.actions{display:flex;gap:9px;flex-wrap:wrap;align-items:center}.tablewrap{overflow-x:auto;width:100%}table{width:100%;border-collapse:collapse;text-align:left}th,td{padding:13px 11px;border-bottom:1px solid #e8edf4;font-size:13px}th{color:#69758a;background:#f7f9fc;font-weight:700}td.amount,th.amount{text-align:right}.ledger .date td{background:#eef3fb;font-weight:700;color:#204da7}.ledger .payment td{background:#e4f7ea;color:#127b43}.summary{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:22px;background:#f4f7fc;border-radius:13px;padding:17px}.summary>div{min-width:0}.summary small{display:block;color:#77849a;margin-bottom:7px}.summary strong{font-size:16px;overflow-wrap:anywhere}.current-card,.closed-card{background:#fff}.paid-badge{background:#e5f7ec;color:#118444;border-radius:100px;padding:5px 10px;font-size:11px}.icon-edit,.icon-delete{border:0;border-radius:9px;padding:9px 11px;background:#edf3ff;color:#204da7}.icon-delete{background:#fff0f0;color:#d93045}.modal{display:none;position:fixed;inset:0;z-index:2000;background:rgba(15,25,45,.55);padding:20px;align-items:center;justify-content:center}.modal.show{display:flex}.modalbox{width:min(600px,100%);max-height:calc(100vh - 40px);overflow-y:auto;background:white;border-radius:19px;padding:22px;box-shadow:0 20px 70px rgba(0,0,0,.2)}.modalhead{display:flex;justify-content:space-between;align-items:center;margin-bottom:17px}.modalhead h2{font-size:20px;margin:0}.close{border:0;background:#f2f5fa;border-radius:10px;width:36px;height:36px;font-size:25px}.empty{color:#7b8799}.customer-debits .head{margin-top:15px}
@media(max-width:900px){.side{width:210px;flex-basis:210px}.main{padding:18px}}
@media(max-width:700px){.side{position:fixed;top:0;bottom:0;left:0;width:270px;height:100dvh;transform:translateX(-105%);transition:transform .2s ease;box-shadow:12px 0 30px rgba(0,0,0,.12)}.side.open{transform:translateX(0)}.mobile-overlay.show{display:block;position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:1000}.hamburger{display:inline-grid;place-items:center}.main{padding:14px 13px 100px}.card{padding:16px}.grid{grid-template-columns:1fr}.summary{gap:7px;padding:12px}.summary strong{font-size:13px}.modalbox{padding:17px}.head{align-items:flex-start}}
@media print{body{background:#fff}.side,.mobile-overlay,.no-print,.bottom-nav{display:none!important}.main{padding:0;width:100%}.card{border:0;box-shadow:none}.app{display:block}}
