*{font-family:Manrope,system-ui,sans-serif}.scrollbar-none::-webkit-scrollbar{display:none}.nav-pill{display:flex;align-items:center;gap:.45rem;white-space:nowrap;border-radius:.7rem;padding:.6rem .75rem;font-size:.75rem;font-weight:700;color:#64748b;transition:.15s}.nav-pill svg{width:1rem;height:1rem}.nav-pill:hover{background:#f1f5f9;color:#17202a}.nav-pill.active{background:#17202a;color:#fff}.menu-item{display:flex;align-items:center;gap:.65rem;border-radius:.65rem;padding:.65rem .75rem;font-size:.8rem;font-weight:650}.menu-item:hover{background:#f6f7f9}.menu-item svg{width:1rem;height:1rem}.eyebrow{margin-bottom:.35rem;font-size:.65rem;font-weight:800;text-transform:uppercase;letter-spacing:.14em;color:#ff5c35}.card{border:1px solid #e7e9ee;border-radius:1.1rem;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.03)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;border-radius:.75rem;padding:.65rem .9rem;font-size:.78rem;font-weight:750;transition:.15s}.btn svg{width:1rem;height:1rem}.btn-primary{background:#ff5c35;color:white}.btn-primary:hover{background:#e84d27}.btn-dark{background:#17202a;color:#fff}.btn-soft{border:1px solid #e2e8f0;background:#fff;color:#334155}.btn-soft:hover{background:#f8fafc}.field{width:100%;border:1px solid #dfe3e8;border-radius:.75rem;background:#fff;padding:.68rem .8rem;font-size:.8rem;outline:none}.field:focus{border-color:#ff5c35;box-shadow:0 0 0 3px #ff5c3520}.label{display:block;margin-bottom:.35rem;font-size:.68rem;font-weight:800;color:#475569}.table-wrap{overflow:auto}.data-table{width:100%;min-width:760px;border-collapse:separate;border-spacing:0}.data-table th{border-bottom:1px solid #e7e9ee;background:#fafbfc;padding:.7rem .8rem;text-align:left;font-size:.62rem;font-weight:800;text-transform:uppercase;letter-spacing:.07em;color:#64748b}.data-table td{border-bottom:1px solid #eef0f3;padding:.78rem .8rem;font-size:.76rem}.data-table tr:last-child td{border-bottom:0}.data-table tbody tr:not([class*="bg-"]):hover{background:#fcfcfd}.badge{display:inline-flex;align-items:center;gap:.32rem;border-radius:999px;padding:.28rem .5rem;font-size:.64rem;font-weight:800}.metric{padding:1.15rem}.metric-label{font-size:.7rem;font-weight:700;color:#64748b}.metric-value{margin-top:.45rem;font-size:1.6rem;font-weight:800;letter-spacing:-.04em}.metric-change{margin-top:.35rem;font-size:.65rem;font-weight:700;color:#16a34a}.modal{position:fixed;left:50%;top:50%;z-index:50;display:none;max-height:88vh;width:calc(100% - 2rem);max-width:680px;transform:translate(-50%,-50%);overflow:auto;border-radius:1.25rem;background:white;box-shadow:0 24px 70px rgba(15,23,42,.25)}.modal.open{display:block}.modal-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e7e9ee;padding:1.1rem 1.25rem}.modal-body{padding:1.25rem}.modal-foot{display:flex;justify-content:flex-end;gap:.6rem;border-top:1px solid #e7e9ee;padding:1rem 1.25rem}.attendance-cell{width:2.15rem;height:2.15rem;border-radius:.6rem;font-size:.72rem;font-weight:800;transition:.15s}.attendance-cell:hover{transform:scale(1.08)}@media(max-width:640px){.data-table{min-width:680px}.metric-value{font-size:1.35rem}}
/* Readable controls for everyday desk and touch use. */
body{font-size:16px}.btn,.field,.nav-pill,.menu-item{font-size:.9rem;min-height:44px}.label,.metric-label{font-size:.8rem}.data-table td{font-size:.9rem}.data-table th{font-size:.75rem}.attendance-cell{min-width:40px;min-height:40px}.btn:focus-visible,button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #2563eb;outline-offset:2px}.errorlist{color:#b91c1c;font-size:.85rem;margin-top:.3rem}.table-wrap{scrollbar-gutter:stable}.data-table thead th{position:sticky;top:0;z-index:1}

/* Attendance is a journal, not a collection of cards: every lesson is a full cell. */
.attendance-grid{width:100%;table-layout:fixed;min-width:max(100%,calc(256px + var(--attendance-days,8)*64px));border-collapse:separate;border-spacing:0}
.attendance-grid th,.attendance-grid td{border-right:1px solid #d8dee7;border-bottom:1px solid #d8dee7;vertical-align:middle}
.attendance-grid tr>:last-child{border-right:0}
.attendance-grid tbody tr:last-child td{border-bottom:0}
.attendance-grid .attendance-person-cell{position:sticky;width:256px;min-width:256px;max-width:256px;padding:.25rem .45rem;border-right-color:#c4ccd7}
.attendance-grid .attendance-person-cell>a{padding:.3rem .45rem}
.attendance-grid .attendance-date-cell{width:64px;min-width:64px;padding:.42rem .18rem;background:#f8fafc;text-align:center!important}
.attendance-grid .attendance-date-cell>*{width:100%;text-align:center}
.attendance-grid .attendance-mark-cell{position:relative;width:64px;min-width:64px;height:52px;padding:0;text-align:center}
.attendance-grid .attendance-mark-cell.attendance-subscription-default{background:#fff}
.attendance-grid .attendance-mark-cell.attendance-subscription-expired{background:#fecaca}
.attendance-grid .attendance-mark-cell.attendance-subscription-renewed{background:#d9fdd3}
.attendance-grid .attendance-mark-cell.attendance-today{box-shadow:none}
.attendance-grid .attendance-cell{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-width:0;min-height:52px;border:0;border-radius:0;background:transparent!important;font-size:1rem;font-weight:850;transition:color .12s,box-shadow .12s}
.attendance-grid .attendance-cell:hover:not(:disabled){position:relative;z-index:1;transform:none;box-shadow:inset 0 0 0 2px #ff5c35}
.attendance-grid .attendance-cell:disabled{opacity:1;color:#94a3b8}
.attendance-grid .attendance-mark-cell>div{position:absolute;right:2px;bottom:1px;left:2px;margin:0;pointer-events:none}
.attendance-grid .attendance-present{color:#334155}
.attendance-grid .attendance-absent{color:#64748b}
.attendance-grid .attendance-row-action{position:absolute;right:.25rem;bottom:.2rem;z-index:3}
.attendance-grid tbody tr:hover .attendance-person-cell{background:#f8fafc}
@media(max-width:640px){.attendance-grid{min-width:calc(210px + var(--attendance-days,8)*56px)}.attendance-grid .attendance-person-cell{width:210px;min-width:210px;max-width:210px}.attendance-grid .attendance-date-cell,.attendance-grid .attendance-mark-cell{width:56px;min-width:56px}}

/* Shared modal behavior: one scroll contract for common and legacy overlays. */
body.modal-open{overflow:hidden}
.modal{max-height:min(88vh,calc(100dvh - 2rem));overflow:hidden}
.modal.open{display:flex;min-height:0;flex-direction:column;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.modal>form{display:flex;max-height:inherit;min-height:0;width:100%;flex:1 1 auto;flex-direction:column;overflow:hidden}
.modal>.modal-body{flex:0 0 auto;overflow:visible}
.modal>form>.modal-body{flex:1 1 auto;overflow-y:auto;scrollbar-gutter:stable;-webkit-overflow-scrolling:touch}
.modal-head,.modal-foot{flex:0 0 auto}
.modal-body{min-height:0;overscroll-behavior:contain}
.crm-overlay-panel{max-height:calc(100dvh - 2rem);overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;-webkit-overflow-scrolling:touch}

/* Application rows keep their workflow color on hover. */
.data-table tbody tr[data-lead-row]{--lead-hover-bg:#f8fafc}
.data-table tbody tr[data-lead-visual="work"]{--lead-hover-bg:#fef3c7}
.data-table tbody tr[data-lead-visual="trial"]{--lead-hover-bg:#a7f3d0}
.data-table tbody tr[data-lead-visual="paid"]{--lead-hover-bg:#bae6fd}
.data-table tbody tr[data-lead-visual="closed"]{--lead-hover-bg:#fee2e2}
.data-table tbody tr[data-lead-row]:hover,
.data-table tbody tr[data-lead-row]:hover>td{background:var(--lead-hover-bg)!important}
