*{box-sizing:border-box}body{margin:0;background:#f2f5f9;color:#172337;font:15px Arial,sans-serif}header{background:#17365d;color:white;padding:16px max(18px,calc((100% - 1080px)/2));display:flex;justify-content:space-between;align-items:center}header div{display:flex;flex-direction:column;gap:4px}header span{font-size:12px;color:#d7e3f1}main{max-width:1080px;margin:24px auto;padding:0 14px}.panel{background:white;border:1px solid #dce4ee;border-radius:14px;padding:18px;margin-bottom:16px;box-shadow:0 3px 12px #17365d0a}h1{font-size:24px;margin:0 0 6px}h2{font-size:18px;margin:0 0 14px}.welcome,.between{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:8px 0 16px}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}label{display:block;font-size:12px;font-weight:700;color:#526178;margin:10px 0}input,textarea,select{display:block;width:100%;margin-top:6px;border:1px solid #cbd5e1;border-radius:8px;padding:11px;font:inherit;color:#172337;background:#fff}button{background:#176b45;color:#fff;border:0;border-radius:8px;padding:11px 15px;font-weight:700;cursor:pointer}button.secondary{background:#e8eef6;color:#17365d}button.ghost{background:transparent;border:1px solid #ffffff70}button.danger{background:#fff0ef;color:#9b2823}.hidden{display:none!important}.pill{background:#e7f4ec;color:#176b45;padding:6px 10px;border-radius:20px;font-size:12px;font-weight:bold}.msg{color:#176b45;font-size:13px}.hint{font-size:12px;color:#65748a}.payment{border:1px solid #e1e7ef;padding:12px;border-radius:10px;margin:10px 0}.paymentgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.totals{background:#f4f8fc;padding:12px;border-radius:9px;margin-top:12px;font-weight:bold;line-height:1.8}.reportlist{display:grid;gap:10px}.report{background:white;border:1px solid #dce4ee;border-radius:10px;padding:14px}.reporthead{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}.status{font-size:11px;font-weight:bold;padding:5px 8px;border-radius:20px;background:#eaf1fb;color:#17365d}.status.approved{background:#e6f5eb;color:#176b45}.status.returned{background:#fff3d9;color:#865800}.adminrow{border-top:1px solid #e3e9f1;padding:14px 0}.adminrow textarea{margin-bottom:8px}footer{text-align:center;color:#718096;font-size:12px;padding:22px}@media(max-width:700px){main{margin:14px auto}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.paymentgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.panel{padding:14px}}@media(max-width:430px){.grid,.paymentgrid{grid-template-columns:1fr}h1{font-size:21px}}
/* Admin collections report */
.summarygrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}.summarycard{background:#f4f8fc;border:1px solid #e1e8f0;border-radius:10px;padding:13px}.summarycard span{display:block;color:#617187;font-size:12px;margin-bottom:7px}.summarycard strong{font-size:20px;color:#17365d}.filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;align-items:end;margin:12px 0 16px}.filters label{margin:0}.filterclear{margin-bottom:10px}.tablewrap{overflow:auto;border:1px solid #dce4ee;border-radius:10px;max-width:100%}.collectiontable{border-collapse:collapse;width:100%;min-width:1150px;font-size:13px;background:#fff}.collectiontable th,.collectiontable td{padding:10px 11px;border-bottom:1px solid #e7edf4;text-align:left;white-space:nowrap}.collectiontable th{background:#f4f7fb;color:#43536a;position:sticky;top:0;z-index:1}.collectiontable tbody tr:hover{background:#f8fbff}.collectiontable td.num{text-align:right;font-variant-numeric:tabular-nums}.collectiontable td.empty{text-align:center;color:#718096;padding:24px}.statuscell{font-weight:700;font-size:11px}.statuscell.approved{color:#176b45}.statuscell.returned{color:#946200}.statuscell.submitted{color:#24558a}.statuscell.draft{color:#65748a}@media(max-width:800px){.summarygrid{grid-template-columns:repeat(2,minmax(0,1fr))}.filters{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:430px){.summarygrid,.filters{grid-template-columns:1fr}.summarycard strong{font-size:18px}}

/* Individual report print/export */
.report-tools{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.report-tools button{padding:8px 11px;font-size:12px}.report-document{font-family:Arial,sans-serif;color:#172337}.report-document h1{font-size:22px;color:#17365d}.report-document h2{font-size:16px;margin:20px 0 8px;color:#17365d}.report-document table{width:100%;border-collapse:collapse;margin:8px 0 16px}.report-document th,.report-document td{border:1px solid #cbd5e1;padding:7px;text-align:left;font-size:12px}.report-document th{background:#eef3f8}.report-document .report-total{font-weight:bold;background:#f4f8fc;padding:12px;margin:12px 0}.report-document .muted{color:#64748b;font-size:12px}@media print{body{background:#fff}.report-document{padding:0}.report-document h1{font-size:20px}}

/* Control de cobranzas agrupado por rendición */
.collection-groups{display:grid;gap:12px;margin:12px 0}.collection-report{border:1px solid #dce4ee;border-radius:12px;background:#fff;padding:14px}.collection-report-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}.collection-report-title{font-size:15px;font-weight:700;color:#17365d}.collection-report-meta{font-size:12px;color:#64748b;margin-top:6px}.collection-report-totals{display:flex;gap:18px;flex-wrap:wrap;background:#f4f8fc;border-radius:8px;padding:10px;margin-top:12px;font-size:13px}.collection-report-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.collection-report-actions button{font-size:12px;padding:9px 11px}.collection-report-detail{margin-top:12px}.collection-empty{padding:22px;text-align:center;color:#64748b;border:1px dashed #cbd5e1;border-radius:10px;background:#fff}.collection-report .tablewrap{margin-top:8px}.collection-report .collectiontable{min-width:850px}@media(max-width:600px){.collection-report-totals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}}
.payment-section-title{margin:18px 0 8px;padding:9px 12px;background:#eef3f8;border-left:4px solid #1d4b78;color:#17365d;font-size:14px;font-weight:700;border-radius:4px}
.collection-report-detail .grand-total th{background:#e6eef7;font-weight:700}
