/* Functional additions only: preserve the approved sheet. */
.hero{height:auto;aspect-ratio:6.6667}.official-brand{position:absolute;left:3.8%;top:4%;width:21%;height:85%;background:transparent;display:flex;align-items:center;justify-content:center}.official-brand img{width:94%;height:100%;object-fit:contain}
.admin-nav{position:fixed;left:0;top:49px;bottom:0;width:205px;background:#f1f4f7;padding:24px 16px;overflow-y:auto;z-index:3;border-right:1px solid #dfe6ec}.nav-title{font-size:15px;font-weight:700;margin-bottom:18px;display:flex;justify-content:space-between}.nav-title button{display:none}.nav-add{font-size:12px;padding:10px;background:#e1ebf3;border-radius:8px;margin-bottom:22px;width:100%;text-align:left}.admin-nav details{font-size:12px;margin:5px 0}.admin-nav summary{cursor:pointer;padding:12px 4px;list-style:none;font-weight:600;display:flex;align-items:center;gap:8px}.school-dot{width:7px;height:7px;border-radius:50%;background:#c1c8ce;display:inline-block}.admin-nav details button{display:block;text-align:left;width:100%;font-size:12px;padding:10px 12px;border-radius:7px;margin:3px 0;color:#526c82}.admin-nav details button.selected{background:#fff;color:#123d61;box-shadow:0 2px 7px #10283b07;font-weight:600}.admin-nav .count{margin-left:auto;color:#8797a6;font-size:10px}.has-nav .sheet{margin-left:220px;margin-right:15px;max-width:none}.has-nav .utility{margin-left:205px;max-width:none}.nav-toggle{display:none}.view-student .admin-nav,.view-student .year-tools,.view-student .nav-toggle{display:none}.view-student .sheet{margin-left:auto;margin-right:auto;max-width:1340px}.view-student .utility{margin-left:auto;max-width:1340px}.year-tools{display:flex;align-items:center;justify-content:flex-end;gap:18px;font-size:10px;padding:0 8px 10px;color:#8092a2}.contact{display:flex!important;gap:6px;align-items:baseline}.contact small{font-size:9px;color:#8697a6;white-space:nowrap}.calendar-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:12px 9px 4px;font-size:10px}.legend{display:flex;gap:13px;color:#7c8c9c}.legend b{color:#294d6c;margin-right:4px}#recovery-balance{color:#607990}.balance-total{color:#173f61;font-weight:600;margin-left:10px}.recovery-row{background:#f0f7fa}.recovery-mark{font-weight:700;color:#27657f}.lesson-time{display:block;font-size:10px;color:#8092a3;margin-top:4px}.recovery-caption{font-size:10px;color:#537a8b}.history-group h3{font-size:16px;margin:20px 0 8px}.history-group ul{padding-left:20px;font-size:13px;line-height:1.9}.checklist{display:grid;grid-column:1/-1;gap:7px;max-height:220px;overflow:auto}.checklist label{display:flex!important;align-items:center;gap:10px;padding:7px;background:#f5f8fa;border-radius:6px}.checklist input{width:17px!important;min-height:17px!important}.form-grid .inline-action{justify-self:start;font-size:12px;color:#275b80;padding:6px 0;text-decoration:underline}.invite-link{overflow-wrap:anywhere;background:#f3f7fa;padding:12px;border-radius:8px;font-size:12px}.notice{background:#fff4e9;padding:12px;font-size:12px;color:#715238;border-radius:8px;grid-column:1/-1;line-height:1.6}.form-grid .compact-info{grid-column:1/-1;font-size:12px;color:#70899e}.nav-empty{font-size:11px;color:#92a0ad;padding:5px 12px 10px}.profile dl{grid-template-columns:140px 1fr}.profile{gap:18px}.form-grid .wide{grid-column:1/-1}
@media(max-width:1250px) and (min-width:761px){.has-nav .profile{grid-template-columns:1fr 1fr}.has-nav .profile-actions{grid-column:1/-1;display:flex;justify-content:flex-end;align-items:center;border-top:1px solid #e1e9ef;padding-top:12px}.has-nav .profile dl:last-of-type{border:0}.has-nav .profile-actions p{display:none}.has-nav .signature{font-size:22px}.has-nav h1{font-size:40px}}
@media(max-width:760px){.hero{height:125px;aspect-ratio:auto}.official-brand{left:0;top:0;bottom:0;height:100%;width:46%;background:transparent;padding:10px 17px;justify-content:flex-start}.official-brand img{width:115px;max-height:110px}.has-nav .sheet{margin-left:0;margin-right:0}.has-nav .utility{margin-left:0}.nav-toggle{display:block;font-size:18px;padding:3px 7px}.admin-nav{transform:translateX(-105%);transition:transform .2s;top:0;width:260px;box-shadow:20px 0 90px #12355222;background:#f8fafc;padding-top:25px;z-index:20}.nav-open .admin-nav{transform:translateX(0)}.nav-title button{display:block;font-size:25px}.year-tools{justify-content:flex-start;padding:0 6px 13px;gap:12px;flex-wrap:wrap}#access-label{font-size:9px}.utility{gap:3px}.utility-actions{gap:8px}.calendar-foot{font-size:9px;gap:10px}.legend{gap:8px}.balance-total{display:block;margin-left:0;margin-top:4px}.profile dl{grid-template-columns:140px 1fr}.contact small{font-size:8px}.section-tools .quiet{font-size:10px}.section-heading h2{font-size:19px}}
.school-0{background:#91bfa0}.school-1{background:#8fc1e7}.school-2{background:#b8a1d4}.school-3{background:#dfabc2}.school-4{background:#decc7a}.school-5{background:#b69b81}.school-6{background:#aab4bc}.contact{flex-wrap:wrap}.contact>span{min-width:0;overflow-wrap:anywhere}.profile dd{min-width:0}
@media(max-width:760px){.admin-nav{visibility:hidden}.nav-open .admin-nav{visibility:visible}}

.hero{background-image:url("assets/header-clean.svg")}
@media(max-width:760px){.hero::before{content:'';position:absolute;inset:0;background:linear-gradient(100deg,#fff 0%,#fff 29%,#fffffff0 34%,#ffffff80 43%,#ffffff00 59%);pointer-events:none}.official-brand{z-index:1}}

footer{justify-content:center;text-align:center}.history-group li{margin:8px 0}.history-group li button{margin-left:12px}.history-group li button:disabled{cursor:default}.utility .nav-toggle{display:block;font-size:18px;flex-shrink:0}.utility .demo-label{margin-right:auto}.view-student .utility .nav-toggle{display:none}
@media(min-width:761px){.sidebar-collapsed .admin-nav{display:none}.has-nav.sidebar-collapsed .sheet{margin-left:15px}.has-nav.sidebar-collapsed .utility{margin-left:0}}

.app-loading .sheet,.app-loading .utility,.app-loading .admin-nav{visibility:hidden}

.access-blocked .sheet,.access-blocked .admin-nav{display:none}.access-unavailable{max-width:640px;margin:40px auto;padding:28px}.access-unavailable p{line-height:1.6}

.form-grid input[readonly]{background:#f1f5f8;color:#526d84;cursor:default}
@media(max-width:760px){dialog input,dialog select,dialog textarea{font-size:16px}dialog .quiet,dialog .primary{min-height:44px}}

.modal-footer .danger{color:#a22e2e;margin-right:auto}.modal-footer{flex-wrap:wrap;gap:10px}

.birth-picker{border:0;padding:0;margin:0;min-width:0}.birth-picker legend{font-size:13px;margin-bottom:6px;color:#526d84}.birth-parts{display:grid;grid-template-columns:1fr 1.4fr 1fr;gap:6px}.birth-parts label{min-width:0;font-size:12px}.birth-parts select{width:100%;min-width:0;padding:10px 5px}
/* Only the attendance control; keep native popup options. */
#modal #f-attendance{appearance:none;-webkit-appearance:none;box-sizing:border-box;height:43px;min-height:43px;width:100%;border:1px solid #ccdce7;border-radius:9px;padding:11px 30px 11px 11px;font:inherit;color:#173653;background:#fcfdfe url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23173653' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 11px center}
/* Birth-date pilot only: native top-layer popover, never in form flow. */
.birth-pilot-control{position:relative;width:100%;min-width:0}.birth-pilot-control input{padding-right:42px}.birth-pilot-control>button{position:absolute;right:2px;top:2px;bottom:2px;width:38px;background:transparent;color:#173653;display:grid;place-items:center}.birth-pilot-panel{position:fixed;inset:auto;margin:0;box-sizing:border-box;width:300px;max-width:calc(100vw - 16px);overflow:auto;padding:10px;border:1px solid #ccdce7;border-radius:12px;background:#fcfdfe;color:#173653;font:13px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;box-shadow:0 8px 28px #10355226}.birth-pilot-panel::backdrop{background:transparent;pointer-events:none}.birth-pilot-head{display:flex;justify-content:space-between;gap:4px}.birth-pilot-panel button{min-height:36px;padding:6px;border:0;border-radius:7px;background:#eef4f8;color:#173653;font:inherit;cursor:pointer}.birth-pilot-panel button:focus-visible{outline:2px solid #205b91;outline-offset:1px}.birth-pilot-panel button:disabled{opacity:.35;cursor:default}.birth-pilot-grid{display:grid;gap:3px;margin:8px 0}.birth-pilot-grid.days{grid-template-columns:repeat(7,minmax(0,1fr))}.birth-pilot-grid.years{grid-template-columns:repeat(4,minmax(0,1fr))}.birth-pilot-grid.months{grid-template-columns:repeat(3,minmax(0,1fr))}.birth-pilot-grid span{text-align:center;font-size:12px}.birth-pilot-grid .selected{background:#103552;color:#fff}
@media(max-width:760px){#modal #f-attendance{font-size:16px}}

/* Only Scuola/Giorno in Nuovo allievo and Scuola e orario. */
#modal.annual-select-sizing #f-school,#modal.annual-select-sizing #f-weekday{appearance:none;-webkit-appearance:none;box-sizing:border-box;height:43px;min-height:43px;width:100%;border:1px solid #ccdce7;border-radius:9px;padding:11px 30px 11px 11px;font:inherit;color:#173653;background:#fcfdfe url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23173653' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 11px center}
@media(max-width:760px){#modal.annual-select-sizing #f-school,#modal.annual-select-sizing #f-weekday{font-size:16px}}

/* Same visible table width in student view, including empty tables. */
.view-student .calendar-table th:nth-child(6){width:32%}
.view-student .songs-table th:nth-child(4){width:19%}
.view-student .concerts-table th:nth-child(4){width:47%}
/* Existing annual form treatment also covers Un nuovo anno; no global form changes. */
#modal.annual-select-sizing #f-academic_year{appearance:none;-webkit-appearance:none;min-height:43px;padding-right:30px;background:#fcfdfe url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23173653' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 11px center}
#modal.annual-select-sizing .form-grid>label{min-width:0}

/* Month boundary: an inset line keeps row and table geometry unchanged. */
.calendar-table tr.month-start>td{box-shadow:inset 0 2px 0 #d6e1e9}

/* Nuovo allievo only: standalone fields keep the right column empty. */
#modal.new-student-layout #f-academic_year{background:#f1f5f8;padding-right:11px}
@media(min-width:761px){
 #modal.new-student-layout .form-grid>label:is([for=f-academic_year],[for=f-school],[for=f-access_until]){grid-column:1}
 #modal.new-student-layout .form-grid>label:is([for=f-first_name],[for=f-weekday]){grid-column:1}
}
