/* ============================================================
   Phase 2 — additional surfaces (Registro): ficha, family, SOP,
   config, register modal, receipt, import/export, column mgr, toast.
   ============================================================ */

/* generic content column */
.pad { padding:18px 24px 28px; }
.backlink { display:inline-flex; align-items:center; gap:7px; color:var(--accent); font-weight:600; font-size:12.5px; margin:14px 24px 0; }
.card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-card); box-shadow:var(--shadow-card); }
.card-h { padding:14px 18px; border-bottom:1px solid var(--line); display:flex; align-items:center; gap:10px; }
.card-h b { font-family:var(--font-display); font-weight:var(--fw-display); font-size:16px; }
.card-b { padding:16px 18px; }
.grid2 { display:grid; grid-template-columns:1.4fr 1fr; gap:18px; align-items:start; }
.row-kv { display:flex; justify-content:space-between; align-items:center; padding:11px 0; border-bottom:1px solid var(--line-rule); font-size:13px; }
.row-kv:last-child { border-bottom:none; }
.row-kv .k { color:var(--text-muted); font-weight:600; white-space:nowrap; padding-right:14px; }
.row-kv .v { font-weight:600; color:var(--text); }
.row-kv .v.money { font-family:var(--font-money); }

/* student header banner */
.stu-banner { display:flex; align-items:center; gap:16px; padding:18px; }
.stu-banner .big-av { width:64px; height:64px; border-radius:16px; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:24px; flex:none; }
.stu-banner h2 { font-family:var(--font-display); font-weight:var(--fw-display); font-size:24px; margin:0; }
.stu-banner .meta { font-size:13px; color:var(--text-muted); margin-top:3px; display:flex; gap:10px; align-items:center; flex-wrap:wrap; }

/* payment history month grid */
.histgrid { display:grid; grid-template-columns:repeat(7,1fr); gap:8px; }
.histcell { border:1px solid var(--line); border-radius:var(--radius-input); padding:10px 8px; text-align:center; }
.histcell .mo { font-size:10px; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); font-weight:700; }
.histcell .mk { font-size:15px; font-weight:800; margin-top:5px; }
.histcell.paid { background:var(--cell-paid); border-color:transparent; } .histcell.paid .mk { color:var(--st-good); }
.histcell.mora { background:var(--cell-mora); border-color:transparent; } .histcell.mora .mk { color:var(--st-mora2); }
.histcell.cur { box-shadow:inset 0 0 0 2px var(--cell-current); }
.histcell.future .mk { color:var(--text-muted); opacity:.5; }

/* family statement table */
.fam-table { width:100%; border-collapse:separate; border-spacing:0; font-size:13px; }
.fam-table th { text-align:left; font-size:10.5px; text-transform:uppercase; letter-spacing:.07em; color:var(--text-muted); font-weight:700; padding:10px 14px; border-bottom:1px solid var(--line-strong); }
.fam-table th.r, .fam-table td.r { text-align:right; }
.fam-table td { padding:13px 14px; border-bottom:1px solid var(--line-rule); }
.fam-table td.money { font-family:var(--font-money); font-weight:600; }
.fam-table tr.total td { font-weight:800; border-top:2px solid var(--line-strong); border-bottom:none; background:var(--surface-2); }
.fam-big { display:flex; align-items:baseline; gap:12px; padding:18px; }
.fam-big .lbl { font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-muted); font-weight:700; }
.fam-big .amt { font-family:var(--font-money); font-weight:800; font-size:30px; color:var(--st-mora2); }

/* SOP */

/* config tabs */
.tabs { display:flex; gap:2px; padding:0 24px; border-bottom:1px solid var(--line); }
.tab { padding:13px 16px; font-size:13.5px; font-weight:600; color:var(--text-muted); border-bottom:2px solid transparent; cursor:pointer; }
.tab.on { color:var(--accent); border-bottom-color:var(--accent); }
.fee-row { display:flex; align-items:center; justify-content:space-between; padding:11px 0; border-bottom:1px solid var(--line-rule); }
.fee-row .nm { font-size:13px; color:var(--text-soft); font-weight:600; }
.fee-input { display:flex; align-items:center; gap:8px; border:1px solid var(--line-strong); border-radius:var(--radius-input); padding:8px 12px; background:var(--surface); min-width:160px; }
.fee-input span { color:var(--text-muted); } .fee-input b { font-family:var(--font-money); font-weight:700; margin-left:auto; }
.sec-label { font-size:10.5px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-muted); font-weight:700; padding:16px 0 8px; }
.switch-row { display:flex; align-items:center; justify-content:space-between; padding:14px 0; border-bottom:1px solid var(--line-rule); }
.switch-row .sl b { font-size:13.5px; } .switch-row .sl div { font-size:12px; color:var(--text-muted); margin-top:2px; }
.sw { width:42px; height:24px; border-radius:999px; background:var(--st-good); position:relative; flex:none; }
.sw.off { background:var(--surface-3); } .sw::after { content:""; position:absolute; top:3px; left:21px; width:18px; height:18px; border-radius:50%; background:#fff; transition:left .15s; }
.sw.off::after { left:3px; }
.roadmap { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.rm { border:1px solid var(--line); border-radius:var(--radius-card); padding:14px; }
.rm .soon { font-size:9.5px; font-weight:800; letter-spacing:.06em; color:var(--accent-dark); background:var(--accent-soft); padding:2px 7px; border-radius:var(--radius-pill); }
.rm b { display:block; font-size:13.5px; margin:9px 0 3px; } .rm span { font-size:12px; color:var(--text-muted); }

/* ============================================================
   OVERLAYS
   ============================================================ */
.scrim { position:absolute; inset:0; background:rgba(15,22,30,.46); display:flex; align-items:center; justify-content:center; z-index:80; padding:16px; }
/* P4 — flex column with a bounded height so the body scrolls internally and the footer (the
   primary action) is ALWAYS visible, even on short viewports. */
.modal { width:520px; max-width:100%; max-height:92vh; display:flex; flex-direction:column; background:var(--surface); border-radius:calc(var(--radius-card) + 2px); box-shadow:var(--shadow-pop); border:1px solid var(--line); overflow:hidden; }
.modal .modal-h, .modal .steps, .modal .modal-f { flex:none; }
/* P4 — the body is the only scroller; footer stays pinned below it. */
.modal .modal-b { flex:1 1 auto; min-height:0; overflow:auto; }
.modal-h { padding:18px 20px 14px; border-bottom:1px solid var(--line); }
.modal-h .ey { font-size:10.5px; text-transform:uppercase; letter-spacing:.09em; color:var(--text-muted); font-weight:700; }
.modal-h h3 { font-family:var(--font-display); font-weight:var(--fw-display); font-size:21px; margin:5px 0 2px; }
.modal-h .sub { font-size:12.5px; color:var(--text-muted); }
.steps { display:flex; align-items:center; gap:8px; padding:13px 20px; border-bottom:1px solid var(--line); }
.steps .stp { display:flex; align-items:center; gap:8px; font-size:12px; font-weight:600; color:var(--text-muted); }
.steps .stp .n { width:20px; height:20px; border-radius:50%; background:var(--surface-3); color:var(--text-muted); display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; }
.steps .stp.on { color:var(--text); } .steps .stp.on .n { background:var(--accent); color:var(--on-accent); }
.steps .stp.done .n { background:var(--st-good); color:#fff; }
.steps .arr { color:var(--text-muted); }
.modal-b { padding:18px 20px; }
.concept-box { border:1px solid var(--line); border-radius:var(--radius-card); overflow:hidden; margin-bottom:16px; }
.concept-box .cr { display:flex; justify-content:space-between; align-items:center; padding:11px 14px; border-bottom:1px solid var(--line-rule); font-size:13px; }
.concept-box .cr:last-child { border-bottom:none; }
.concept-box .cr .k { color:var(--text-muted); font-weight:600; }
.concept-box .cr .v { font-weight:700; } .concept-box .cr .v.money { font-family:var(--font-money); font-size:18px; }
.method-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.method { border:1px solid var(--line-strong); border-radius:var(--radius-card); padding:16px 12px; text-align:center; cursor:pointer; }
.method:hover { border-color:var(--text-muted); }
.method.on { border-color:var(--accent); background:var(--accent-soft); box-shadow:0 0 0 1px var(--accent); }
.method.disabled { opacity:.5; cursor:not-allowed; }
.method .mi { width:40px; height:40px; border-radius:50%; margin:0 auto 9px; display:flex; align-items:center; justify-content:center; }
.method.m-cash .mi { background:var(--m-cash-bg); color:var(--m-cash); } .method.m-transfer .mi { background:var(--m-transfer-bg); color:var(--m-transfer); } .method.m-card .mi { background:var(--m-card-bg); color:var(--m-card); }
.method b { font-size:13px; } .method .soon { font-size:9.5px; font-weight:800; color:var(--text-muted); }
.field { margin-bottom:14px; } .field label { display:block; font-size:12px; font-weight:600; color:var(--text-soft); margin-bottom:6px; }
.field input { width:100%; border:1px solid var(--line-strong); border-radius:var(--radius-input); padding:10px 12px; font-size:13.5px; color:var(--text); background:var(--surface); }
.modal-f { padding:14px 20px; border-top:1px solid var(--line); display:flex; gap:10px; justify-content:flex-end; align-items:center; }
.modal-note { font-size:11.5px; color:var(--text-muted); margin-right:auto; }

/* receipt */
.receipt { width:430px; }
.rcpt-ok { display:flex; align-items:center; gap:10px; padding:14px 18px; background:var(--st-good-bg); color:var(--st-good); font-weight:700; font-size:14px; border-radius:var(--radius-card); margin-bottom:14px; }
.rcpt-ok .ck { width:26px; height:26px; border-radius:50%; background:var(--st-good); color:#fff; display:flex; align-items:center; justify-content:center; }

/* import/export */
.io-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.io { border:1px solid var(--line-strong); border-radius:var(--radius-card); padding:22px 16px; text-align:center; }
.io .ii { width:44px; height:44px; border-radius:12px; margin:0 auto 11px; display:flex; align-items:center; justify-content:center; background:var(--accent-soft); color:var(--accent); }
.io b { font-size:14px; } .io p { font-size:12px; color:var(--text-muted); margin:5px 0 13px; line-height:1.5; }
.io .iob { display:inline-flex; align-items:center; gap:8px; border-radius:var(--radius-ctrl); font-size:12.5px; font-weight:700; padding:8px 14px; }

/* column manager popover */
/* P8 — anchor right-aligned just under the toolbar (right:24px = the table's right margin),
   NOT the old top:252px;right:430px that assumed an open 330px WhatsApp rail. With the rail now
   collapsed by default this sits under the columns button; max-height keeps it on-screen. */
.cbx { width:18px; height:18px; border-radius:4px; border:1.5px solid var(--line-strong); flex:none; display:flex; align-items:center; justify-content:center; }
.cbx.on { background:var(--accent); border-color:var(--accent); color:var(--on-accent); }

/* toast */
.toast { position:absolute; bottom:24px; left:50%; transform:translateX(-50%); z-index:90; display:flex; align-items:center; gap:11px; background:var(--text); color:var(--surface); padding:13px 18px; border-radius:var(--radius-ctrl); box-shadow:var(--shadow-pop); font-size:13.5px; font-weight:600; }
.toast .tk { width:22px; height:22px; border-radius:50%; background:var(--st-good); color:#fff; display:flex; align-items:center; justify-content:center; flex:none; }

.skel { background:linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size:400% 100%; animation:sk 1.4s ease infinite; border-radius:6px; }
@keyframes sk { 0%{background-position:100% 0} 100%{background-position:0 0} }


/* ============================================================
   v4 — CAMPAÑAS dashboard
   v54 (DEF-033) — the dead Campañas/analytics CSS families (cmp-*/fn-*/jt-*/jtable, plus
   states-bar/state-pill, idx-*, sect-h/link/foot, grid3, modal-x, cfg-link and their mobile
   reflows) were REMOVED: their surfaces were rebuilt in later versions and every class greps
   0 in js/html. Same mechanism as the original DEF-033 sweep (2026-06-04).
   ============================================================ */
.sect { margin-bottom:18px; }
.wahealth { display:grid; grid-template-columns:repeat(4,1fr); gap:1px; background:var(--line); }
.wh { background:var(--surface); padding:16px 18px; }
.wh-v { font-family:var(--font-money); font-weight:700; font-size:20px; }
.wh-v.good { color:var(--st-good); } .wh-v.alert { color:var(--st-mora2); }
.wh-l { font-size:11px; color:var(--text-muted); margin-top:5px; font-weight:600; }

/* auto config-summary placeholder (right column when no node selected) */
.cfg-sum { padding:15px 16px; }
.cfg-row { display:flex; justify-content:space-between; align-items:center; padding:11px 0; border-bottom:1px solid var(--line-rule); }
.cfg-row .k { color:var(--text-muted); font-weight:700; text-transform:uppercase; font-size:10.5px; letter-spacing:.07em; }
.cfg-row .v { font-weight:700; font-size:13px; }
.cfg-note { font-size:12px; color:var(--text-muted); padding:14px 16px 8px; line-height:1.55; }
.jsw { width:32px; height:18px; border-radius:999px; background:var(--st-good); position:relative; flex:none; }
.jsw.off { background:var(--surface-3); }
.jsw::after { content:""; position:absolute; top:2.5px; left:16px; width:13px; height:13px; border-radius:50%; background:#fff; transition:left .15s; }
.jsw.off::after { left:2.5px; }

/* ============================================================
   v4 — MOBILE (.rz-root.mobile) — Campañas + Automatizaciones reflow
   ============================================================ */
.rz-root.mobile .hd-school span, .rz-root.mobile .hd-sub { display:none; } /* v54 (DEF-033) — dead .hd-saved selector removed */
.rz-root.mobile .hd-school b { font-size:13px; }
.rz-root.mobile .app-header { gap:8px; padding:0 12px; }
.rz-root.mobile .page-head { padding:14px 16px 10px; }
.rz-root.mobile .pad { padding:14px 16px 24px; }
.rz-root.mobile .wahealth { grid-template-columns:repeat(2,1fr); }
.rz-root.mobile .au { flex-direction:column; }
.rz-root.mobile .au-list, .rz-root.mobile .au-canvas, .rz-root.mobile .au-side { width:100%; flex:none; border-left:none; border-right:none; border-bottom:1px solid var(--line); }
.rz-root.mobile .au-journeys { max-height:260px; }
.rz-root.mobile .fnode, .rz-root.mobile .fbranch { width:auto; max-width:100%; }
.rz-root.mobile .flow .fconn { margin-left:0; }

/* config — editable controls (DEF-032 fix) */
.cfg-num{width:108px;border:1px solid var(--line-strong,#d4d9e0);border-radius:var(--radius-input,8px);padding:5px 8px;font:inherit;font-family:"IBM Plex Mono",ui-monospace,monospace;text-align:right;color:var(--text,#1a2230);background:var(--surface,#fff)}
.cfg-num:focus{outline:none;border-color:var(--accent,#0C6E86);box-shadow:0 0 0 2px rgba(12,110,134,.22)}
.cfg-num:disabled{background:var(--surface-2,#f5f7fa);color:var(--text-muted,#7b8794)}
.cfg-sel{border:1px solid var(--line-strong,#d4d9e0);border-radius:var(--radius-input,8px);padding:5px 10px;font:inherit;background:var(--surface,#fff);color:var(--text,#1a2230);cursor:pointer}
.cfg-save{background:var(--accent,#0C6E86);color:#fff;border:none;border-radius:var(--radius-input,8px);padding:9px 20px;font:inherit;font-weight:600;cursor:pointer}
.cfg-save:hover{filter:brightness(.94)}
.cfg-saved{display:inline-flex;align-items:center;gap:5px;color:var(--st-good,#0F8A5F);font-weight:600;font-size:12.5px}
.cfg-note{display:flex;align-items:center;gap:6px;background:var(--surface-2,#f5f7fa);border:1px solid var(--line,#e6e9ef);border-radius:var(--radius-input,8px);padding:8px 12px;margin-bottom:14px;font-size:13px;color:var(--text-soft,#4a5568)}
.sw{cursor:pointer}

/* ============================================================
   REGISTER MODAL v5 — multi-month select, editable amount,
   printable letter-size receipt (Registro style + handwritten echo)
   ============================================================ */

/* multi-month select (chips with checkbox) */
/* P4 — cap the month list so ~7 payable months scroll INSIDE the modal instead of pushing the
   method grid + footer below the fold; the chips still wrap their own internal scroll. */
.month-chips{display:flex;flex-direction:column;gap:8px;max-height:34vh;overflow:auto;}
.mchip{display:flex;align-items:center;gap:10px;border:1px solid var(--line-strong);border-radius:var(--radius-input);padding:10px 13px;cursor:pointer;font-size:13px;transition:border-color .12s,background .12s;}
.mchip:hover{border-color:var(--text-muted);}
.mchip.on{border-color:var(--accent);background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent);}
.mchip.mora .mc-mo{color:var(--st-mora2);}
.mchip .mc-mo{font-weight:700;min-width:42px;}
.mchip .mc-amt{font-family:var(--font-money);color:var(--text-soft);margin-left:auto;}
.mchip .mc-tag{font-size:9.5px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--st-mora2);background:var(--cell-mora);padding:2px 7px;border-radius:var(--radius-pill);margin-left:8px;}

/* editable amount input */
.amt-input{display:flex;align-items:center;gap:8px;border:1px solid var(--line-strong);border-radius:var(--radius-input);padding:8px 12px;background:var(--surface);}
.amt-input .cur{font-family:var(--font-money);font-weight:700;color:var(--text-muted);font-size:16px;}
.amt-input .cur2{font-size:11px;color:var(--text-muted);font-weight:700;}
.amt-input input{flex:1;border:none;outline:none;background:transparent;font-family:var(--font-money);font-weight:700;font-size:18px;color:var(--text);width:100%;}
.amt-helper{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:600;margin-top:9px;padding:8px 11px;border-radius:var(--radius-input);}
.amt-helper.exact,.amt-helper.over{color:var(--st-good);background:var(--st-good-bg);}
.amt-helper.partial{color:var(--st-mora2);background:var(--cell-mora);}
.amt-helper.abono{color:var(--accent-dark);background:var(--accent-soft);}
.amt-helper.none{color:var(--text-muted);background:var(--surface-2);}

/* emphasized field (Bancolombia when method=transfer) */
.field--hi label{color:var(--accent-dark);}
.field--hi input{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft);}

/* wider modal for the receipt step */
.modal--rcpt{width:600px;max-width:94%;}
.modal-b--rcpt{padding:16px 18px 20px;}

/* ---- the printable receipt 'paper' ---- */
.rcpt-print{background:#fff;color:#1a1a1a;border:1px solid var(--line);border-radius:var(--radius-card);padding:24px 26px 20px;box-shadow:var(--shadow-card);font-size:12.5px;line-height:1.5;}
.rcpt-head{display:grid;grid-template-columns:auto 1fr auto;align-items:flex-start;gap:14px;}
.rcpt-crest{flex:none;}
.rcpt-school{min-width:0;}
.rcpt-sname{font-family:var(--font-display);font-weight:var(--fw-display);font-size:16px;color:#7a1020;letter-spacing:.01em;line-height:1.2;}
.rcpt-smotto{font-size:11px;font-style:italic;color:#555;margin-top:2px;}
.rcpt-splace{font-size:10.5px;color:#777;margin-top:2px;text-transform:uppercase;letter-spacing:.08em;}
.rcpt-meta{text-align:right;flex:none;}
.rcpt-title{font-family:var(--font-display);font-weight:800;font-size:13px;letter-spacing:.06em;color:#7a1020;border:1.5px solid #7a1020;border-radius:6px;padding:4px 10px;display:inline-block;}
.rcpt-no{font-family:var(--font-money);font-weight:700;font-size:12px;margin-top:6px;color:#1a1a1a;}
.rcpt-date{font-family:var(--font-money);font-size:11.5px;color:#444;margin-top:2px;}
.rcpt-rule{height:2px;background:linear-gradient(90deg,#7a1020,#c98a93 60%,transparent);margin:12px 0 14px;border-radius:2px;}
.rcpt-idgrid{display:grid;grid-template-columns:1fr 1fr;gap:8px 18px;margin-bottom:14px;}
.rcpt-idcell{display:flex;flex-direction:column;border-bottom:1px solid #e3e3e3;padding-bottom:5px;}
.rcpt-idcell .l{font-size:9.5px;text-transform:uppercase;letter-spacing:.07em;color:#888;font-weight:700;}
.rcpt-idcell .v{font-size:13px;font-weight:700;color:#1a1a1a;margin-top:2px;}
.rcpt-table{width:100%;border-collapse:collapse;margin-bottom:12px;}
.rcpt-table th{text-align:left;font-size:9.5px;text-transform:uppercase;letter-spacing:.06em;color:#888;font-weight:700;padding:6px 8px;border-bottom:1.5px solid #888;}
.rcpt-table th.r,.rcpt-table td.r{text-align:right;}
.rcpt-table td{padding:8px;border-bottom:1px solid #ececec;font-size:12.5px;}
.rcpt-table td.money{font-family:var(--font-money);font-weight:600;}
.rcpt-table tfoot .tot td{font-weight:800;border-top:2px solid #888;border-bottom:none;padding-top:9px;font-size:13px;}
.rcpt-table.slim td{padding:5px 8px;font-size:11.5px;}
.rcpt-pay{display:flex;flex-direction:column;gap:5px;background:#faf7f2;border:1px solid #ece5da;border-radius:8px;padding:10px 12px;margin-bottom:16px;}
.rcpt-payrow{display:flex;justify-content:space-between;align-items:center;font-size:12px;}
.rcpt-payrow .l{color:#777;font-weight:600;}
.rcpt-payrow .v{font-weight:700;color:#1a1a1a;}
.rcpt-payrow .v.mono{font-family:var(--font-money);}
.rcpt-sumhead,.rcpt-subhead{font-family:var(--font-display);font-weight:700;font-size:11px;letter-spacing:.07em;color:#7a1020;text-transform:uppercase;margin:4px 0 9px;border-bottom:1px solid #e3d2d5;padding-bottom:5px;}
.rcpt-subhead{color:#555;border-bottom-color:#e9e9e9;margin-top:14px;}
.rcpt-histgrid{display:grid;grid-template-columns:repeat(12,1fr);gap:5px;margin-bottom:12px;} /* v46 — matrícula + costos tiles join the 10 months */
.rcpt-hcell.fee{border-style:double;border-width:3px;}
.rcpt-hcell{display:flex;flex-direction:column;align-items:center;border:1px solid #e3e3e3;border-radius:6px;padding:6px 2px;text-align:center;}
.rcpt-hcell .mo{font-size:8.5px;text-transform:uppercase;letter-spacing:.04em;color:#999;font-weight:700;}
.rcpt-hcell .mk{font-size:14px;font-weight:800;margin:2px 0;line-height:1;}
.rcpt-hcell .am{font-family:var(--font-money);font-size:8.5px;color:#999;}
.rcpt-hcell.paid{background:#eaf6ef;border-color:#bfe3cd;}.rcpt-hcell.paid .mk{color:#1d9b63;}
.rcpt-hcell.mora{background:#fdeaea;border-color:#f2c4c4;}.rcpt-hcell.mora .mk{color:#c0392b;}
.rcpt-hcell.future .mk{color:#bbb;}
.rcpt-hcell.now{box-shadow:0 0 0 2px #7a1020;border-color:transparent;}
.rcpt-sumrow{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:6px;}
.rcpt-sumbox{display:flex;flex-direction:column;border:1px solid #e3e3e3;border-radius:8px;padding:9px 11px;}
.rcpt-sumbox .l{font-size:9.5px;text-transform:uppercase;letter-spacing:.06em;color:#888;font-weight:700;}
.rcpt-sumbox .v{font-size:15px;font-weight:800;color:#1a1a1a;margin-top:3px;}
.rcpt-sumbox .v.money{font-family:var(--font-money);}
.rcpt-sumbox.alert .v{color:#c0392b;}.rcpt-sumbox.ok .v{color:#1d9b63;}
.rcpt-aldia{font-size:12px;color:#1d9b63;font-weight:600;background:#eaf6ef;border:1px solid #bfe3cd;border-radius:8px;padding:9px 12px;margin-top:6px;}
/* v44 — compact upcoming-dues summary lines (replaces the page-2-driving table) */
.rcpt-upline{font-size:11.5px;font-weight:600;color:#444;padding:3px 0;font-family:var(--font-money);}
.rcpt-upline.alert{color:#c0392b;}
/* v44 — reserved expansion space for future real-world fields (kept subtle on screen) */
.rcpt-reserve{min-height:10px;}
/* WAVE 3 — DELIVERY RECORD (Constancia de entrega) — replaces the physical-signature block. */
.rcpt-delivery{margin-top:22px;border:1px solid #d9e6df;border-radius:9px;padding:12px 14px;background:#f6fbf8;}
.rcpt-delivery-h{font-family:var(--font-display);font-weight:700;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#1d7a55;display:flex;align-items:center;gap:6px;margin-bottom:8px;}
.rcpt-delivery-rows{display:flex;flex-direction:column;gap:5px;}
.rcpt-delivery .rd-row{display:flex;gap:10px;font-size:11px;line-height:1.4;}
.rcpt-delivery .rd-row .l{flex:0 0 88px;text-transform:uppercase;letter-spacing:.05em;color:#888;font-weight:700;font-size:9.5px;padding-top:1px;}
.rcpt-delivery .rd-row .v{flex:1;color:#1a1a1a;font-weight:600;}
.rcpt-delivery .rd-row .v.mono{font-family:var(--font-money);}
.rcpt-delivery .rd-row .v.ok{color:#1d9b63;}
.rcpt-delivery .rd-row .v.pend{color:#b06a00;}
.rcpt-delivery-note{margin-top:9px;padding-top:8px;border-top:1px dashed #cfe2d8;font-size:9.5px;font-style:italic;color:#7a8a82;}
.rcpt-foot{margin-top:16px;padding-top:10px;border-top:1px dashed #d8d8d8;font-size:9.5px;color:#999;text-align:center;}

/* ============================================================
   PRINT — show ONLY the receipt, letter size, black on white
   ============================================================ */
@media print{
  @page{size:letter;margin:14mm;}
  html,body{background:#fff !important;height:auto !important;}
  /* hide all app chrome + the scrim's dimming */
  .app-header,.leftnav,.warail,.toast{display:none !important;} /* v54 (DEF-033) — dead .idx-sheet/.states-bar selectors removed */
  .app-body{display:none !important;} /* v45 — the emptied app-body still held its flex height, creating the dead band above the receipt */
  .rz-root{height:auto !important;display:block !important;}
  .scrim{position:static !important;inset:auto !important;background:none !important;display:block !important;z-index:auto !important;padding:0 !important;}
  .modal,.modal--rcpt{margin:0 !important;} /* v44 — no dead band above the letterhead in print */
  .modal,.modal--rcpt{position:static !important;display:block !important;width:auto !important;max-width:none !important;max-height:none !important;overflow:visible !important;border:none !important;box-shadow:none !important;background:#fff !important;border-radius:0 !important;}
  /* inside the modal, keep only the receipt body */
  .modal-h,.steps,.modal-f,.rcpt-ok{display:none !important;}
  /* P4 — undo the on-screen flex/scroll model for print so the full receipt prints. */
  .modal-b,.modal-b--rcpt{padding:0 !important;flex:none !important;overflow:visible !important;min-height:0 !important;}
  .month-chips{max-height:none !important;overflow:visible !important;}
  .rcpt-print{border:none !important;box-shadow:none !important;border-radius:0 !important;padding:0 !important;color:#000 !important;font-size:10pt;}
  .rcpt-print *{-webkit-print-color-adjust:exact !important;print-color-adjust:exact !important;}
  .rcpt-hcell.now{box-shadow:0 0 0 1.5pt #7a1020 !important;}
  /* ── v44 — ONE-PAGE GUARANTEE: compact print rhythm + a hard reserve at the bottom ──
     Every receipt type (matrícula · costos · 1-month · multi-month · credit lines) must fit
     ONE letter page with ≥1in of free space left for future real-world fields. */
  .rcpt-table td{padding:4px 8px !important;font-size:9.5pt !important;}
  .rcpt-table th{padding:3px 8px !important;}
  .rcpt-table tfoot .tot td{padding-top:5px !important;font-size:10.5pt !important;}
  .rcpt-idgrid{gap:5px 16px !important;margin-bottom:9px !important;}
  .rcpt-idcell{padding-bottom:3px !important;}
  .rcpt-rule{margin:8px 0 9px !important;}
  .rcpt-pay{padding:7px 10px !important;margin-bottom:10px !important;gap:3px !important;}
  .rcpt-histgrid{gap:4px !important;margin-bottom:8px !important;}
  .rcpt-hcell{padding:4px 2px !important;}
  .rcpt-sumrow{gap:8px !important;margin-bottom:5px !important;}
  .rcpt-sumbox{padding:6px 9px !important;}
  .rcpt-sumbox .v{font-size:12pt !important;}
  .rcpt-sumhead,.rcpt-subhead{margin:3px 0 6px !important;padding-bottom:3px !important;}
  .rcpt-subhead{margin-top:9px !important;}
  .rcpt-delivery{margin-top:11px !important;padding:8px 11px !important;}
  .rcpt-delivery-rows{gap:3px !important;}
  .rcpt-delivery-note{margin-top:6px !important;padding-top:5px !important;}
  .rcpt-foot{margin-top:8px !important;padding-top:7px !important;}
  .rcpt-reserve{min-height:1in !important;}
  .rcpt-head,.rcpt-idgrid,.rcpt-table,.rcpt-pay,.rcpt-histgrid,.rcpt-sumrow,.rcpt-delivery{break-inside:avoid;page-break-inside:avoid;}
}

/* ============================================================
   v4 — PAYMENT-LEDGER FIXES (2026-06-05)
   FIX 1 rail recipients · FIX 4 household groups · FIX 5 saved views + col-mgr note
   ============================================================ */

/* FIX 5 — column-manager: labeled toggle text (DEF-027) + the "use the month filter" note (DEF-028) */

/* FIX 5 — saved (custom) view pills */
.tpill--editing{cursor:default;}

/* FIX 4 — Households view: full-width group-header row */
.ledger tbody tr.fam-grouprow td.fam-grouphead{
  position:sticky;left:0;background:var(--surface-2);
  border-top:1px solid var(--line-strong);border-bottom:1px solid var(--line-strong);
  padding:9px 14px;height:auto;white-space:nowrap;
  display:flex;align-items:center;gap:10px;
}
.ledger tbody tr.fam-grouprow:hover td{background:var(--surface-2);}
.fam-gicon{width:24px;height:24px;border-radius:7px;background:var(--accent-soft);color:var(--accent-dark);display:flex;align-items:center;justify-content:center;flex:none;}
.fam-gname{font-family:var(--font-display);font-weight:var(--fw-display);font-size:14px;color:var(--text);}
.fam-gcount{font-size:11.5px;color:var(--text-muted);font-weight:600;}
.fam-gsaldo{margin-left:auto;font-family:var(--font-money);font-size:12.5px;font-weight:700;color:var(--text-muted);}
.fam-gsaldo.alert{color:var(--st-mora2);}

/* FIX 1 — WhatsApp rail recipients (selected ledger rows) */
.wa-empty{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;padding:14px 6px;color:var(--text-muted);font-size:12.5px;line-height:1.45;}
.wa-empty-ic{width:42px;height:42px;border-radius:12px;background:var(--surface-2);display:flex;align-items:center;justify-content:center;color:var(--text-muted);}
.wa-recip-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px;}
.wa-recip-head .wr-count{font-size:12px;font-weight:700;color:var(--text);}
.wa-recip-head .wr-clear{border:0;background:transparent;color:var(--accent);font-size:11.5px;font-weight:700;cursor:pointer;padding:2px 4px;}
.wa-recip-list{display:flex;flex-direction:column;gap:2px;max-height:184px;overflow:auto;margin:0 -4px 4px;padding:0 4px;}
.wa-recip-item{display:flex;align-items:center;gap:9px;padding:6px 4px;border-bottom:1px solid var(--line-rule);}
.wa-recip-item:last-child{border-bottom:none;}
.wa-recip-item .wr-main{flex:1;min-width:0;}
.wa-recip-item .wr-main b{display:block;font-size:12px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.wa-recip-item .wr-meta{font-size:11px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.wr-tag{width:18px;height:18px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;}
.wr-tag.ok{background:var(--st-good-bg);color:var(--st-good);}
.wr-tag.no{background:var(--st-mora1-bg);color:var(--st-mora1);}
.wa-step--off{opacity:.5;}
.wa-send.disabled{background:var(--surface-3);color:var(--text-muted);cursor:not-allowed;}

/* ============================================================
   PAYMENT-LEDGER FIXES (2026-06-05) — P1 · P7
   ============================================================ */

/* P7 — "N pueden recibir / can receive" summary line (distinct from the icon-only .wr-tag.ok). */
.wa-recip .wa-canrx{font-size:11.5px;color:var(--st-good);font-weight:600;margin-top:6px;display:flex;gap:6px;align-items:center;}
.wa-recip .wa-canrx .wa-canrx-txt{color:var(--st-good);}

/* P1 / DEF-018 — disabled state for the modal footer buttons once a commit is in flight, so a
   rapid 3× click on "Registrar pago" books exactly one record. */
.modal-f .btn[disabled],.modal-f .btn.is-busy{opacity:.55;cursor:not-allowed;pointer-events:none;}
.modal-f .btn--primary.is-busy{background:var(--surface-3);border-color:var(--line-strong);color:var(--text-muted);}

/* ============================================================
   RESPONSIVE — phone (<=640): modal becomes a near-full-screen
   bottom-sheet; content surfaces stack. Preserves the v4m bounded-
   modal model (.modal-b is the only scroller) and the @media print
   receipt above (print uses !important and only fires when printing).
   ============================================================ */
@media (max-width:640px){
  /* scrim hugs the screen, no centering gutter — the sheet rises from the bottom */
  .scrim { padding:0; align-items:flex-end; }
  /* near-full-screen sheet: full width, rounded top only, the body still scrolls */
  .modal, .modal--rcpt {
    width:100%; max-width:none; max-height:100vh;
    border-radius:calc(var(--radius-card) + 4px) calc(var(--radius-card) + 4px) 0 0;
    border-bottom:0;
  }
  .modal-h { padding:16px 16px 12px; }
  .modal-h h3 { font-size:19px; }
  .modal-b, .modal-b--rcpt { padding:16px; }
  .modal-f { padding:12px 16px; gap:8px; flex-wrap:wrap; }
  .modal-f .btn { flex:1 1 auto; justify-content:center; }
  .modal-note { flex:1 1 100%; margin:0 0 4px; }
  /* month list + receipt 'paper' get a touch more room on a tall phone sheet */
  .month-chips { max-height:42vh; }
  .method-grid { grid-template-columns:repeat(3,1fr); gap:8px; }
  .method { padding:12px 8px; }
  .rcpt-print { padding:18px 16px 16px; }
  .rcpt-histgrid { grid-template-columns:repeat(5,1fr); }

  /* ----- content pages: stack so nothing overflows ----- */
  .pad { padding:14px 14px 24px; }
  .grid2 { grid-template-columns:1fr; gap:14px; }
  .roadmap { grid-template-columns:1fr; }
  .histgrid { grid-template-columns:repeat(4,1fr); }
  .io-grid { grid-template-columns:1fr; }
  .stu-banner { padding:14px; gap:12px; }
  .stu-banner h2 { font-size:20px; }
  .stu-banner .big-av { width:52px; height:52px; font-size:20px; }
  .fam-big .amt { font-size:24px; }
  /* config tabs scroll horizontally instead of wrapping/overflowing */
  .tabs { overflow-x:auto; -webkit-overflow-scrolling:touch; white-space:nowrap; }
  .tab { flex:none; }
  .fee-input { min-width:0; }

  /* message center is a 3-pane desktop layout — on a phone show one pane (the thread),
     hide the list + profile rails so it does not overflow horizontally. */
  .mc-list, .mc-profile { display:none; }
  .mc-thread { width:100%; }

  /* column-manager popover spans the screen cleanly */

  /* toast stays clear of the bottom-sheet / FAB */
  .toast { left:14px; right:14px; transform:none; bottom:18px; justify-content:center; }
}

/* ============================================================
   WAVE 2 — shared TemplatePicker, ConfirmDialog rows, WhatsApp
   scheduled queue, pay-now checkbox + when radios.
   ============================================================ */

/* TemplatePicker — category tabs reuse .seg2; this styles the template chooser list. */
.tpl-picker { margin-top:9px; }
.tpl-list { margin-top:8px; display:flex; flex-direction:column; gap:4px; }
.tpl-opt { display:flex; align-items:center; gap:9px; padding:8px 10px; border:1px solid var(--line); border-radius:var(--radius-input); background:var(--surface); cursor:pointer; font-size:12.5px; color:var(--text-soft); }
.tpl-opt:hover { border-color:var(--line-strong); }
.tpl-opt.on { border-color:var(--accent); background:var(--accent-soft); color:var(--text); }
.tpl-opt:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.tpl-radio { width:14px; height:14px; border-radius:50%; border:1.5px solid var(--line-strong); flex:none; box-sizing:border-box; }
.tpl-radio.on { border:4px solid var(--accent); background:var(--surface); }
.tpl-label { flex:1; }
.tpl-paytag { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--accent-dark); background:var(--accent-soft); border-radius:5px; padding:2px 6px; }
.tpl-empty { font-size:12px; color:var(--text-muted); padding:8px 10px; }

/* pay-now checkbox — the real <input> is visually hidden; the .box mirrors it. */
.wa-check-input { position:absolute; opacity:0; width:0; height:0; }
.wa-check .box.off { background:var(--surface); border:1.5px solid var(--line-strong); }
.wa-check-input:focus-visible + .box { outline:2px solid var(--accent); outline-offset:1px; }

/* scheduled-send queue — pinned at the top of the rail. */
.wa-queue { border:1px solid var(--line); border-radius:var(--radius-card); padding:11px 12px; background:var(--surface-2); }
.wa-queue-h { display:flex; align-items:center; gap:6px; font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-muted); font-weight:700; margin-bottom:8px; }
.wa-queue-n { color:var(--text-soft); }
.wa-queue-empty { font-size:12px; color:var(--text-muted); font-style:italic; }
.wa-queue-list { display:flex; flex-direction:column; gap:6px; }
.wa-queue-item { display:flex; align-items:center; gap:8px; padding:8px 10px; border:1px solid var(--line); border-radius:var(--radius-input); background:var(--surface); }
.wa-queue-item .wq-main { flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; }
.wa-queue-item .wq-main b { font-size:12.5px; color:var(--text); font-family:var(--font-money); }
.wa-queue-item .wq-meta { font-size:11px; color:var(--text-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wq-cancel { flex:none; border:1px solid var(--line-strong); background:var(--surface); color:var(--text-soft); border-radius:var(--radius-ctrl); font-size:11.5px; font-weight:600; padding:5px 9px; cursor:pointer; }
.wq-cancel:hover { border-color:var(--st-mora2); color:var(--st-mora2); }

/* schedule date/time inputs */
.wa-sched-date, .wa-sched-time { flex:1; border:1px solid var(--line-strong); border-radius:var(--radius-input); padding:8px 10px; background:var(--surface); color:var(--text); font-size:12.5px; font-family:var(--font-money); }

/* ConfirmDialog detail rows */
.confirm-rows { display:flex; flex-direction:column; gap:2px; }
.confirm-row { display:flex; justify-content:space-between; gap:14px; padding:9px 2px; border-bottom:1px solid var(--line); font-size:13px; }
.confirm-row:last-child { border-bottom:0; }
.confirm-row .cr-k { color:var(--text-muted); }
.confirm-row .cr-v { color:var(--text); font-weight:600; text-align:right; }
