body.academy-staff-mode { --staff-page:#FAF7F5; --staff-accent:#3A2733; --navy:#3A2733; --navy-press:#2B1C26; --focus:#9E4D60; background:#FAF7F5; }
.academy-staff-mode .staff { width:min(1440px,calc(100% - 48px)); max-width:none; }
.academy-staff-mode a,.academy-staff-mode a:visited {color:#3A2733;}
.academy-staff-mode .staff > nav {display:flex;gap:8px;border-bottom:1px solid #EADCD9;padding-bottom:12px;margin-bottom:24px;flex-wrap:wrap;}
.academy-staff-mode [aria-current=page] {background:#3A2733;color:white;border-color:#3A2733;}
.academy-workspace {background:white;padding:24px;border:1px solid #EADCD9;border-radius:8px;min-width:0;}
.academy-workspace h2 {margin:0;font-size:26px;}.academy-workspace h3{margin-top:28px;}
.academy-workspace button,.academy-workspace input,.academy-workspace select{min-height:44px;}
.academy-workspace button{cursor:pointer;border:1px solid #CFB6BD;border-radius:5px;padding:8px 14px;background:white;color:#3A2733;}
.academy-workspace button.primary{background:#3A2733;color:white;border-color:#3A2733;}
.academy-workspace button:hover{border-color:#3A2733;background:#F6E9E7;}.academy-workspace button.primary:hover{background:#2B1C26;color:white;}
.academy-workspace button:disabled{opacity:.5;cursor:default;}
.academy-workspace input:focus-visible,.academy-workspace select:focus-visible,.academy-workspace button:focus-visible,.academy-workspace textarea:focus-visible{outline:2px solid #9E4D60;outline-offset:3px;}
.academy-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin:0 0 20px;}
.academy-toolbar p{margin:0;}.academy-toolbar .actions{margin:0;}
.academy-filters{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin-bottom:24px;}.academy-filters label{flex:1 1 200px;}
.academy-workspace label{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:600;margin-bottom:14px;}
.academy-workspace input,.academy-workspace select,.academy-workspace textarea{width:100%;border:1px solid #CFB6BD;border-radius:5px;padding:10px;background:white;color:#3A2733;font-size:16px;font-weight:400;min-width:0;}
.academy-workspace .academy-check,.academy-checks label{display:flex;flex-direction:row;align-items:center;gap:10px;font-weight:400;}
.academy-workspace input[type=checkbox]{width:20px;height:20px;min-height:20px;accent-color:#3A2733;flex:none;}
.academy-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px;}.academy-checks{display:flex;gap:12px 24px;flex-wrap:wrap;}
.academy-table-wrap{overflow:auto;margin:16px 0 24px;}.academy-table{border-collapse:collapse;width:100%;text-align:left;font-size:14px;}.academy-table th{font-weight:600;background:#FAF7F5;}.academy-table th,.academy-table td{padding:12px;border-bottom:1px solid #EADCD9;overflow-wrap:anywhere;}.academy-table .text-btn{padding:0;border:0;text-align:left;}
.academy-list article{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:18px 0;border-bottom:1px solid #EADCD9;}.academy-list p{margin:5px 0 0;color:#6F6066;}
.academy-template-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;flex:none;}
.academy-workspace .academy-template-actions button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:104px;border-radius:5px;white-space:nowrap;}
@media(max-width:600px){.academy-template-actions{width:100%;}.academy-workspace .academy-template-actions button{flex:1 1 0;}}
.academy-question{border:1px solid #EADCD9;border-radius:6px;margin:18px 0;padding:16px;}.academy-question legend{padding:0 6px;}
.academy-history article,.academy-answer{border-bottom:1px solid #EADCD9;padding:16px 0;}.academy-history p{margin:4px 0;}
.academy-subnav{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:24px;}.academy-workspace .academy-subnav [aria-current=page]{background:#3A2733;color:white;}
.academy-email-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;}.academy-email-preview{min-width:0;}.academy-email-preview h3{margin-top:0;}
.academy-workspace iframe{border:1px solid #EADCD9;width:100%;height:680px;background:white;border-radius:6px;}.academy-email-editor{border:1px solid #CFB6BD;border-radius:0 0 5px 5px;min-height:300px;max-height:650px;overflow:auto;padding:16px;line-height:1.6;}.academy-email-editor img{max-width:100%;}.academy-editor-tools{display:flex;flex-wrap:wrap;gap:5px;padding:8px;background:#FAF7F5;border:1px solid #CFB6BD;border-bottom:0;border-radius:5px 5px 0 0;}.academy-editor-tools button{padding:5px 9px;font-size:13px;}.academy-editor-tools label{margin:0;font-size:12px;}.academy-editor-tools input[type=color]{padding:2px;width:44px;height:28px;min-height:28px;}
.academy-workspace details{margin:16px 0;}.academy-workspace details summary{cursor:pointer;min-height:40px;}.academy-workspace .actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px;}.academy-status{font-size:14px;color:#6F6066;}.academy-error{color:#8f1d1d;background:#F6E9E7;padding:12px;}.academy-notice{background:#F6E9E7;color:#3A2733;padding:12px;}.academy-workspace .hint{font-size:14px;color:#6F6066;}
@media(max-width:900px){.academy-email-grid{grid-template-columns:1fr;}.academy-workspace iframe{height:520px;}}
@media(max-width:600px){.academy-staff-mode .staff{width:calc(100% - 24px);}.academy-workspace{padding:16px;}.academy-fields{grid-template-columns:1fr;}.academy-filters{display:block;}.academy-filters button{margin:4px 8px 8px 0;}.academy-list article{align-items:flex-start;flex-direction:column;}.academy-table{min-width:530px;}.academy-toolbar{gap:10px;}.academy-workspace h2{font-size:23px;}.academy-workspace .actions button{flex:1 1 auto;}}
.academy-email-grid,.academy-email-grid>div,.academy-workspace fieldset{min-width:0;}
.academy-email-editor{max-width:100%;overflow-x:auto;}
@media(max-width:900px){.academy-email-grid{grid-template-columns:minmax(0,1fr);}}
.academy-email-editor table{width:100%!important;max-width:100%!important;table-layout:fixed;}
.academy-email-editor td{box-sizing:border-box;max-width:100%;overflow-wrap:anywhere;}
.academy-email-editor *{max-width:100%;}
.academy-email-grid{grid-template-columns:minmax(0,1fr);gap:18px;}
.academy-email-preview{order:-1;}
.academy-email-preview-heading{display:flex;align-items:start;justify-content:space-between;gap:16px;flex-wrap:wrap;}
.academy-email-preview-heading h3{margin:0;}
.academy-email-preview-heading .hint{margin:5px 0 8px;}
.academy-email-preview iframe{display:block;height:780px;}
.academy-template-edit{border:1px solid #EADCD9;border-radius:5px;padding:12px 16px;}
.academy-template-edit>summary{font-weight:600;color:#3A2733;}
.academy-template-edit[open]>summary{margin-bottom:14px;}
@media(max-width:600px){.academy-email-preview iframe{height:630px;}.academy-email-preview-heading button{width:100%;}}

body.academy-staff-mode,body.academy-staff-mode .staff,.academy-workspace{font-family:"Inter",-apple-system,sans-serif;color:#2A2226;background:#FAF7F5;}
.academy-workspace{background:#FFFFFF;border-color:#EADCD9;border-radius:4px;}
.academy-workspace h2,.academy-workspace h3,.academy-staff-mode .academy-staff-header h1{font-family:"Fraunces",Georgia,serif;font-weight:400;color:#3A2733;}
.academy-workspace button.primary,.academy-staff-mode .staff>nav [aria-current=page],.academy-workspace .academy-subnav [aria-current=page]{background:#B9576B;border-color:#B9576B;color:#FFFFFF;}
.academy-workspace button.primary:hover,.academy-staff-mode .staff>nav [aria-current=page]:hover{background:#9E4D60;border-color:#9E4D60;}
.academy-workspace button:focus-visible,.academy-workspace input:focus-visible,.academy-workspace select:focus-visible,.academy-workspace textarea:focus-visible{outline-color:#9E4D60;}
.academy-workspace input[type=checkbox]{accent-color:#9E4D60;}
.academy-workspace a,.academy-workspace a:visited,.academy-staff-mode a:visited{color:#9E4D60;}
.academy-compose-documents{border:1px solid #EADCD9;border-radius:6px;padding:16px;margin:20px 0 0;background:#FAF7F5;}
.academy-compose-documents legend{padding:0 6px;font-weight:600;color:#3A2733;}
.academy-compose-documents .hint{margin:0 0 12px;}
.academy-compose-documents .academy-checks{display:grid;gap:8px;margin-bottom:12px;}
.academy-compose-documents .academy-checks label{margin:0;min-height:32px;overflow-wrap:anywhere;}
.academy-compose-upload{margin:14px 0 0!important;}
.academy-compose-upload input[type=file]{background:#fff;padding:8px;}
.academy-compose-upload input[type=file]::file-selector-button{border:1px solid #CFB6BD;border-radius:5px;background:#fff;color:#3A2733;padding:10px 14px;margin-right:12px;font:inherit;cursor:pointer;}
.academy-workspace .academy-notice{background:#F6E9E7;color:#3A2733;}
.academy-failed-list{display:grid;gap:12px;}
.academy-failed-attempt{padding:18px 20px;background:#fff;border:1px solid #EADCD9;border-radius:4px;min-width:0;}
.academy-failed-heading{display:flex;justify-content:space-between;align-items:start;gap:12px;}
.academy-failed-heading h3{margin:0;font-size:21px;}
.academy-failed-heading p{margin:5px 0 0;color:#6F6066;}
.academy-failed-heading time{color:#6F6066;font-size:13px;white-space:nowrap;}
.academy-failed-reason{margin:14px 0;color:#3A2733;line-height:1.5;}
.academy-failed-attempt details{margin:0;padding-top:12px;border-top:1px solid #EADCD9;}
.academy-failed-attempt summary{color:#9E4D60;font-weight:600;}
.academy-failed-attempt dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 20px;margin:16px 0 0;}
.academy-failed-attempt dl div{min-width:0;}
.academy-failed-attempt dt{font-size:12px;font-weight:600;color:#6F6066;text-transform:uppercase;letter-spacing:.04em;}
.academy-failed-attempt dd{margin:3px 0 0;overflow-wrap:anywhere;}
.academy-failed-pagination{justify-content:flex-end;margin-top:20px;}
@media(max-width:600px){.academy-failed-heading{display:block;}.academy-failed-heading time{display:block;margin-top:7px;}.academy-failed-attempt dl{grid-template-columns:1fr;}.academy-failed-pagination{justify-content:space-between;}}

/* The Academy administration follows Acuity's simple left-navigation rhythm. */
.academy-staff-mode .staff.academy-admin-shell{display:grid;grid-template-columns:236px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);width:100%;max-width:none;min-height:100vh;margin:0;padding:0;--staff-accent:#B9576B;--navy:#3A2733;--ink:#2A2226;--line:#EADCD9;--focus:#9E4D60;font-family:"Inter",sans-serif;color:#2A2226;background:#FAF7F5;}
.staff header.academy-admin-header{display:grid;grid-template-columns:120px minmax(0,1fr) auto;grid-column:1/-1;align-items:center;gap:18px;min-height:84px;margin:0;padding:12px 28px;border-bottom:1px solid #EADCD9;background:#FAF7F5;}
.academy-admin-header .staff-business-logo{width:120px;height:45px;object-fit:contain;}
.academy-admin-header h1{margin:0;text-align:center;font:400 clamp(22px,2.4vw,30px)/1.2 "Fraunces",Georgia,serif;color:#3A2733;}
.academy-admin-header-actions{display:flex;align-items:center;gap:10px;justify-self:end;}
.academy-admin-header-actions button{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;height:44px;min-height:44px;border:1px solid #CFB6BD;border-radius:4px;background:white;color:#3A2733;}
.academy-admin-header-actions .academy-student-view-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 18px;border-color:#B9576B;background:#B9576B;color:#fff;font-weight:600;line-height:1.2;text-align:center;white-space:nowrap;cursor:pointer;}
.academy-admin-header-actions .academy-student-view-link:hover{background:#9E4D60;border-color:#9E4D60;}
.academy-history .academy-cancel-enrollment{margin-left:12px;padding:8px 12px;border:1px solid #9E4D60;border-radius:4px;background:#fff;color:#9E4D60;cursor:pointer;}
.academy-history .academy-cancel-enrollment:hover{background:#F6E9E7;}
.academy-admin-menu{display:none;}
.academy-admin-sidebar{position:sticky;top:0;align-self:start;display:flex;flex-direction:column;min-height:calc(100vh - 84px);max-height:calc(100vh - 84px);overflow-y:auto;padding:22px 14px;border-right:1px solid #EADCD9;background:#F6E9E7;}
.staff .academy-admin-sidebar nav{display:grid;gap:3px;margin:0;}
.academy-admin-sidebar nav p{margin:18px 12px 5px;font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#786A70;}
.academy-admin-sidebar nav p:first-child{margin-top:0;}
.academy-admin-sidebar nav button{min-height:44px;padding:10px 13px;border:0;border-radius:4px;background:transparent;color:#3A2733;cursor:pointer;font:600 15px/1.4 "Inter",sans-serif;text-align:left;}
.academy-admin-sidebar nav button:hover{background:#EFDCD9;}
.academy-admin-sidebar nav button[aria-current=page]{background:white;color:#9E4D60;box-shadow:0 0 0 1px #EADCD9;}
.academy-admin-zone{margin:auto 12px 0;padding-top:24px;color:#786A70;font-size:12px;line-height:1.45;}
.academy-admin-main{min-width:0;width:100%;padding:28px 32px 60px;background:#FAF7F5;}
.academy-admin-main>.academy-workspace,.academy-admin-main>.panel{margin-top:0;}
.academy-admin-main .panel{border-color:#EADCD9;border-radius:4px;}
.academy-admin-main h2,.academy-admin-main h3{color:#3A2733;}
.academy-admin-main .staff-course-picker h2,.academy-admin-main .staff-course-detail-heading h2{font-family:"Fraunces",Georgia,serif;font-weight:400;}
.academy-admin-main .staff-course-buttons button{border-color:#CFB6BD;border-radius:4px;color:#3A2733;}
.academy-admin-main .staff-course-buttons button[aria-pressed=true]{background:#B9576B;border-color:#B9576B;color:white;}
.academy-admin-main .staff-course-buttons button:hover{border-color:#B9576B;}
.academy-admin-main .staff-course-start,.academy-admin-main .staff-roster li{border-color:#EADCD9;}
.academy-admin-main .staff-course-start .academy-session-list small,.academy-admin-main .staff-start-kind,.academy-admin-main .staff-start-status,.academy-admin-main .staff-calendar-status{color:#786A70;}
.academy-admin-main .staff-new-class{background:#F6E9E7;border-radius:4px;}
.academy-new-student-class{margin:20px 0;padding:16px;border:1px solid #EADCD9;border-radius:4px;display:grid;gap:12px;}
.academy-new-student-class legend{padding:0 6px;color:#3A2733;font-family:"Fraunces",Georgia,serif;font-size:20px;}
.academy-new-student-class label{display:grid;gap:6px;}
.academy-new-student-class select{width:100%;min-height:44px;}
.academy-new-student-class .hint{margin:0;}
.academy-admin-main .staff-holiday-closures{background:#F6E9E7;}
.academy-admin-main .staff-holiday-closures>summary::after{border-color:#9E4D60;}
.academy-admin-main .staff-holiday-closures>summary small,.academy-admin-main .staff-holiday-content p,.academy-admin-main .staff-holiday-list small,.academy-admin-main .staff-holiday-closed{color:#786A70;}
.academy-admin-main .staff-holiday-list li{border-color:#EADCD9;}
.academy-admin-shell button:focus-visible,.academy-admin-shell a:focus-visible{outline:2px solid #9E4D60;outline-offset:2px;}
.academy-workspace .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.academy-students-table th:first-child,.academy-students-table td:first-child{width:44px;}
.academy-students-table th{white-space:nowrap;}
@media(max-width:900px){.academy-staff-mode .staff.academy-admin-shell{grid-template-columns:minmax(0,1fr);}.staff header.academy-admin-header{grid-template-columns:120px minmax(0,1fr) auto;padding:12px 18px;}.academy-admin-menu{display:inline-flex;}.academy-admin-sidebar{position:static;display:none;grid-column:1;min-height:0;max-height:none;padding:10px 18px 20px;border-right:0;border-bottom:1px solid #EADCD9;}.academy-admin-shell.nav-open .academy-admin-sidebar{display:flex;}.academy-admin-main{padding:22px 18px 44px;}}
@media(max-width:600px){.staff header.academy-admin-header{grid-template-columns:110px minmax(0,1fr);gap:8px 12px;}.academy-admin-header .staff-business-logo{width:110px;height:42px;}.academy-admin-header h1{text-align:right;font-size:20px;}.academy-admin-header-actions{grid-column:1/-1;justify-self:stretch;justify-content:space-between;gap:6px;}.academy-admin-header-actions button{min-height:44px;padding:8px 10px;font-size:13px;}.academy-admin-main{padding:18px 12px 36px;}}
@media(max-width:600px){.academy-students-table{display:block;min-width:0!important;}.academy-students-table thead{display:none;}.academy-students-table tbody{display:grid;gap:10px;}.academy-students-table tr{display:grid;grid-template-columns:28px minmax(0,1fr);gap:2px 12px;padding:12px;border:1px solid #EADCD9;border-radius:4px;}.academy-students-table td{display:block;padding:2px 0;border:0;min-width:0;overflow-wrap:anywhere;}.academy-students-table td:first-child{grid-row:1/5;width:auto;align-self:start;}.academy-students-table td:nth-child(2){font-weight:600;}.academy-students-table td:nth-child(4):before{content:"Phone: ";color:#786A70;}.academy-students-table td:nth-child(5):before{content:"Course: ";color:#786A70;}.academy-students-table tr:has(td[colspan]){display:block;}}
@media print{.academy-admin-sidebar,.academy-admin-header{display:none!important;}.academy-staff-mode .staff.academy-admin-shell{display:block;}.academy-admin-main{padding:0;}}

.academy-workspace [hidden]{display:none!important;}
.academy-attendance-followups{margin:20px 0 28px;padding:18px;border:1px solid #EADCD9;border-radius:4px;background:#fff;}
.academy-attendance-followups h3{margin:0 0 12px;}
.academy-attendance-session{margin:18px 0;padding:18px;border:1px solid #EADCD9;border-radius:4px;background:#fff;}
.academy-attendance-session h3{margin:0 0 5px;}
.academy-attendance-row{display:grid;grid-template-columns:minmax(130px,1fr) minmax(130px,1fr) minmax(120px,.8fr) minmax(180px,1.5fr) auto auto;gap:12px;align-items:end;padding:14px 0;border-top:1px solid #EADCD9;}
.academy-attendance-row>*{min-width:0;overflow-wrap:anywhere;}
.academy-attendance-row label{margin:0;}
.academy-attendance-row button{min-height:42px;}
@media(max-width:1100px){.academy-attendance-row{grid-template-columns:repeat(2,minmax(0,1fr));}.academy-attendance-row button{justify-self:start;}}
@media(max-width:600px){.academy-attendance-session,.academy-attendance-followups{padding:14px;}.academy-attendance-row{grid-template-columns:minmax(0,1fr);gap:8px;}.academy-attendance-row button{width:100%;}}

/* Filter fields and their actions share one baseline and one control height. */
.academy-workspace #attendance-filter{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px;}
.academy-workspace #student-search{display:grid;grid-template-columns:repeat(2,minmax(0,1fr)) repeat(2,120px);align-items:end;gap:12px;}
.academy-workspace .academy-filters label{min-width:0;margin:0;}
.academy-workspace .academy-filters input,.academy-workspace .academy-filters select,.academy-workspace .academy-filters button,.academy-workspace .academy-filters a{box-sizing:border-box;height:46px;min-height:46px;}
.academy-workspace .academy-filters button,.academy-workspace .academy-filters a,.academy-workspace .academy-filters a:visited{display:inline-flex;align-items:center;justify-content:center;padding:0 16px;border:1px solid #B9576B;border-radius:4px;background:#B9576B;color:#fff;font:600 14px/1.2 "Inter",sans-serif;text-align:center;text-decoration:none;white-space:nowrap;cursor:pointer;}
.academy-workspace .academy-filters button:hover,.academy-workspace .academy-filters a:hover{border-color:#9E4D60;background:#9E4D60;color:#fff;}
@media(max-width:700px){.academy-workspace #attendance-filter{grid-template-columns:minmax(0,1fr);}.academy-workspace #attendance-filter button{width:100%;margin:0;}.academy-workspace #student-search{grid-template-columns:repeat(2,minmax(0,1fr));}.academy-workspace #student-search label{grid-column:1/-1;}.academy-workspace #student-search button,.academy-workspace #student-search a{width:100%;margin:0;}}

/* Email history actions keep the same tap target and the Academy tab colour. */
.academy-email-history-table td:last-child{min-width:288px;}
.academy-email-row-actions{display:flex;align-items:center;gap:8px;white-space:nowrap;}
.academy-workspace .academy-email-row-actions button{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:84px;height:44px;min-height:44px;padding:0 8px;border-radius:5px;font:600 14px/1.2 "Inter",sans-serif;text-align:center;}
.academy-workspace .academy-email-delete{border-color:#B9576B;background:#B9576B;color:#fff;}
.academy-workspace .academy-email-delete:hover{border-color:#9E4D60;background:#9E4D60;color:#fff;}
.academy-email-delete-dialog{max-width:min(440px,calc(100vw - 32px));}
.academy-email-delete-dialog #delete-email-detail{overflow-wrap:anywhere;font-weight:600;}
.academy-forward-dialog{max-width:min(460px,calc(100vw - 32px));}
.academy-forward-dialog #forward-email-detail{overflow-wrap:anywhere;font-weight:600;}
.academy-forward-dialog label{display:block;margin:18px 0;}
.academy-forward-dialog input[type=email]{box-sizing:border-box;width:100%;margin-top:8px;}
@media(max-width:1500px){
  .academy-email-history-table{display:block;min-width:0!important;}
  .academy-email-history-table thead{display:none;}
  .academy-email-history-table tbody{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,460px),1fr));gap:12px;}
  .academy-email-history-table tr{display:grid;grid-template-columns:minmax(0,1fr);align-content:start;gap:7px;padding:16px;border:1px solid #EADCD9;border-radius:4px;background:#fff;}
  .academy-email-history-table td{display:block;min-width:0;padding:0;border:0;overflow-wrap:anywhere;}
  .academy-email-history-table td:last-child{min-width:0;margin-top:8px;padding-top:10px;border-top:1px solid #EADCD9;}
  .academy-email-history-table td:first-child{color:#786A70;font-size:13px;}
  .academy-email-history-table td:nth-child(3) .text-btn{font-size:15px;font-weight:600;color:#3A2733;line-height:1.4;}
  .academy-email-history-table td:nth-child(4){white-space:normal;}
  .academy-email-history-table td:nth-child(4)::before{content:'Status: ';color:#786A70;}
  .academy-email-history-table .academy-email-row-actions{flex-wrap:wrap;}
  .academy-email-history-table tr:has(td[colspan]){display:block;}
}

/* Equal action controls and clear destructive actions throughout Academy staff. */
.academy-workspace .academy-subnav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 620px; }
.academy-workspace .academy-subnav button { width: 100%; text-align: center; }
.academy-automatic-email-list { display: grid; gap: 12px; margin: 22px 0; }
.academy-automatic-email-list article { display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 1px solid #EADCD9; border-radius: 5px; padding: 18px; background: #fff; }
.academy-automatic-email-list p { margin: 5px 0 0; color: #6F6066; }
.academy-automatic-email-list button { flex: 0 0 auto; }
.academy-automatic-email-preview iframe { display: block; box-sizing: border-box; width: 100%; min-height: 700px; border: 1px solid #EADCD9; border-radius: 5px; background: #fff; }
@media(max-width:600px) { .academy-automatic-email-list article { display: block; } .academy-automatic-email-list button { width: 100%; margin-top: 14px; } .academy-automatic-email-preview iframe { min-height: 800px; } }
.academy-admin-header-actions #logout,
.academy-admin-header-actions #staff-menu-toggle { box-sizing: border-box; width: 88px; height: 44px; min-height: 44px; padding: 8px; }
.academy-workspace .academy-student-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.academy-workspace .academy-student-actions button { width: 100%; min-height: 46px; }
.academy-workspace .academy-student-pagination,
.academy-workspace .academy-failed-pagination,
.academy-workspace .academy-email-pagination { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.academy-workspace .academy-student-pagination button,
.academy-workspace .academy-failed-pagination button,
.academy-workspace .academy-email-pagination button { box-sizing: border-box; width: min(120px, 100%); height: 46px; min-height: 46px; margin: 0; text-align: center; }
.academy-workspace .academy-student-pagination button:last-child,
.academy-workspace .academy-failed-pagination button:last-child,
.academy-workspace .academy-email-pagination button:last-child { justify-self: end; }
.academy-student-pagination span,
.academy-failed-pagination span,
.academy-email-pagination span { white-space: nowrap; text-align: center; }
.academy-workspace .academy-students-add { box-sizing: border-box; width: 160px; height: 46px; min-height: 46px; }
.academy-student-list-actions { display: grid; grid-template-columns: repeat(2, 160px); gap: 10px; }
.academy-workspace .academy-student-list-actions button { box-sizing: border-box; width: 100%; height: 46px; min-height: 46px; margin: 0; padding: 8px 10px; text-align: center; }
.academy-workspace #remove-selected { border-color: #9E4D60; color: #9E4D60; }
.academy-history-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.academy-student-title { gap: 16px; flex-wrap: wrap; }
.academy-student-overview { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 16px 0 24px; }
.academy-student-overview p { margin: 0; padding: 16px; background: #F6E9E7; border: 1px solid #EADCD9; border-radius: 4px; line-height: 1.55; }
.academy-student-section { border-top: 1px solid #EADCD9; padding: 20px 0 8px; }
.academy-student-section h3 { margin-top: 0; }
.academy-student-class { padding: 18px 0; border-bottom: 1px solid #EADCD9; }
.academy-student-class h4 { margin: 0 0 8px; }
.academy-student-class ol { margin: 12px 0; padding-left: 24px; }
.academy-student-class li { margin: 4px 0; }
.academy-student-email-pagination, .academy-system-pagination { justify-content: space-between; gap: 12px; margin: 14px 0; }
.academy-student-email-pagination button, .academy-system-pagination button { box-sizing: border-box; min-width: 110px; min-height: 44px; }
.academy-system-search { display: flex; align-items: end; gap: 12px; margin: 18px 0; }
.academy-system-search label { flex: 1; }
.academy-system-search button { min-height: 44px; }
.academy-system-messages { display: grid; gap: 8px; }
.academy-system-messages button { display: grid; gap: 4px; width: 100%; padding: 14px; text-align: left; border: 1px solid #CFB6BD; border-radius: 4px; background: #fff; color: #3A2733; cursor: pointer; }
.academy-system-messages button[aria-pressed="true"], .academy-system-messages button:hover { border-color: #B85770; background: #F6E9E7; }
.academy-system-messages span { font-size: .9em; color: #66545D; }
.academy-system-preview { border-top: 1px solid #EADCD9; margin-top: 20px; padding-top: 20px; }
.academy-system-preview iframe, .academy-student-section iframe { box-sizing: border-box; width: 100%; min-height: 520px; margin-top: 14px; border: 1px solid #EADCD9; border-radius: 4px; background: white; }
@media (max-width: 900px) {
  .academy-student-section .academy-email-history-table { display: block; min-width: 0; }
  .academy-student-section .academy-email-history-table thead { display: none; }
  .academy-student-section .academy-email-history-table tbody { display: grid; gap: 10px; }
  .academy-student-section .academy-email-history-table tr { display: grid; grid-template-columns: minmax(0,1fr); gap: 5px; padding: 14px; border: 1px solid #EADCD9; border-radius: 4px; }
  .academy-student-section .academy-email-history-table td { display: block; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
  .academy-student-section .academy-email-history-table td:last-child { margin-top: 8px; }
  .academy-student-section .academy-email-history-table td:first-child { color: #786A70; font-size: 12px; }
  .academy-student-section .academy-email-history-table td:nth-child(4)::before { content: 'Status: '; color: #786A70; }
  .academy-student-section .academy-email-history-table tr:has(td[colspan]) { display: block; }
}
.academy-workspace .academy-history-actions button { box-sizing: border-box; width: 190px; min-height: 44px; margin: 0; padding: 8px 12px; border: 1px solid #CFB6BD; border-radius: 4px; text-align: center; }
.academy-workspace .academy-history-actions .academy-cancel-enrollment { border-color: #9E4D60; }
.academy-document-list article { display: grid; grid-template-columns: minmax(0, 1fr) auto 140px 140px 140px; }
.academy-document-list a { min-width: 0; overflow-wrap: anywhere; }
.academy-document-list { max-height: none; overflow-y: visible; padding-right: 0; }
.academy-workspace .academy-document-list article button { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 140px; height: 46px; min-height: 46px; margin: 0; padding: 8px 10px; font-size: 14px; line-height: 1.2; text-align: center; }
.academy-compose-documents .academy-checks { max-height: none; overflow-y: visible; padding-right: 0; }
.academy-workspace .academy-document-delete { border-color: #9E4D60; color: #9E4D60; }
.academy-failed-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; }
.academy-workspace .academy-failed-actions .academy-check { margin: 0; }
.academy-workspace .academy-delete-selected { border-color: #9E4D60; color: #9E4D60; }
.academy-failed-select { margin: 2px 0 0 !important; }
@media (max-width: 600px) {
  .academy-workspace .academy-student-pagination button,
  .academy-workspace .academy-failed-pagination button,
  .academy-workspace .academy-email-pagination button { padding: 8px; font-size: 14px; }
  .academy-workspace .academy-email-pagination { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .academy-email-pagination span { grid-column: 1 / -1; grid-row: 1; }
  .academy-workspace .academy-email-pagination button { width: 100%; grid-row: 2; }
  .academy-email-pagination #history-prev { grid-column: 1; }
  .academy-email-pagination #history-next { grid-column: 2; }
  .academy-workspace .academy-subnav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .academy-workspace .academy-student-actions { grid-template-columns: 1fr; }
  .academy-student-overview { grid-template-columns: 1fr; }
  .academy-system-search { display: grid; }
  .academy-system-search button { width: 100%; }
  .academy-workspace .academy-student-actions button,
  .academy-workspace .academy-history-actions button { width: 100%; height: 46px; min-height: 46px; }
  .academy-history-actions { display: grid; grid-template-columns: 1fr; }
  .academy-document-list article { grid-template-columns: minmax(0, 1fr) auto; }
  .academy-document-list a { grid-column: 1 / -1; }
  .academy-document-list article > span { grid-column: 1 / -1; }
  .academy-document-list article { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .academy-workspace .academy-document-list article button { width: 100%; }
  .academy-failed-actions { flex-direction: column; align-items: stretch; }
  .academy-workspace .academy-delete-selected { width: 100%; }
}


@media (max-width: 600px) { .academy-admin-header-actions #logout, .academy-admin-header-actions #staff-menu-toggle { width: 76px; flex: 0 0 76px; } .academy-admin-header-actions .academy-student-view-link { min-width: 0; flex: 1 1 auto; padding-inline: 7px; } }
@media (max-width: 600px) {
  .academy-workspace .academy-students-add { width: calc((100% - 10px) / 2); }
  .academy-student-list-actions { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .academy-student-summary p { flex-basis: 100%; }
}
@media (max-width: 360px) {
  .academy-workspace .academy-students-add { width: 100%; }
  .academy-student-list-actions { grid-template-columns: 1fr; }
}

/* Student removal confirmation uses the Academy's established action palette. */
.academy-workspace #remove-selected-confirm #confirm-remove-selected {
  background: #B9576B;
  border-color: #B9576B;
  color: #fff;
}
.academy-workspace #remove-selected-confirm #confirm-remove-selected:hover {
  background: #9E4D60;
  border-color: #9E4D60;
}
.academy-workspace #remove-selected-confirm #keep-selected {
  background: #F6E9E7;
  border-color: #CFB6BD;
  color: #3A2733;
}
.academy-workspace #remove-selected-confirm #keep-selected:hover {
  background: #EFDCD9;
  border-color: #9E4D60;
}

.academy-compose-students { margin: 20px 0; padding: 18px; border: 1px solid #CFB6BD; border-radius: 4px; min-width: 0; }
.academy-recipient-search { display: grid; grid-template-columns: minmax(0,1fr) 110px; gap: 12px; align-items: end; }
.academy-recipient-search label { margin: 0; }
.academy-recipient-search button { height: 44px; margin: 0; }
.academy-recipient-results { max-height: 280px; overflow-y: auto; }
.academy-workspace .academy-recipient-row { display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 12px 0; margin: 0; border-bottom: 1px solid #EBD9DC; cursor: pointer; }
.academy-recipient-row input[type=checkbox] { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; }
.academy-recipient-row > span { min-width: 0; overflow-wrap: anywhere; }
.academy-recipient-row > span > span { display: block; font-size: 14px; font-weight: 400; }
.academy-recipient-count { font-weight: 600; margin: 18px 0 4px; }
@media (max-width: 600px) { .academy-compose-students { padding: 12px; } .academy-recipient-search { grid-template-columns: minmax(0,1fr) 90px; gap: 8px; } }

/* Saved email and document selection use the same app dialog controls. */
.academy-message-viewer { width:min(1000px,calc(100vw - 32px)); max-width:1000px; max-height:90dvh; overflow:auto; }
.academy-message-viewer iframe { width:100%; height:60dvh; border:1px solid var(--border,#e4d5d8); border-radius:6px; background:white; }
.academy-message-metadata { display:grid; grid-template-columns:90px minmax(0,1fr); gap:8px 16px; }
.academy-message-metadata dd { margin:0; overflow-wrap:anywhere; }
.academy-message-viewer pre { white-space:pre-wrap; overflow-wrap:anywhere; }
.academy-document-picker { width:min(680px,calc(100vw - 32px)); max-height:90dvh; overflow:auto; }
.academy-document-picker-list { max-height:42dvh; overflow:auto; margin:16px 0; border:1px solid var(--border,#e4d5d8); border-radius:6px; padding:12px; }
.academy-document-picker-list label { display:flex; align-items:flex-start; gap:12px; padding:12px 4px; overflow-wrap:anywhere; }
.academy-document-picker-list label[hidden] { display:none; }
.academy-recipient-summary { border:1px solid var(--border,#e4d5d8); border-radius:6px; padding:16px; margin:16px 0; }
.academy-recipient-summary ul { max-height:260px; overflow:auto; padding-left:20px; }
.academy-recipient-summary li { margin:10px 0; overflow-wrap:anywhere; }
.academy-recipient-summary li span,.academy-recipient-summary li small { display:block; }
.academy-welcome-config { display:grid; gap:12px; margin:20px 0; }
.academy-document-picker .actions,.academy-document-rename .actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.academy-document-picker .actions button,.academy-document-rename .actions button { width:100%; min-height:44px; margin:0; }
@media(max-width:600px) { .academy-message-metadata { grid-template-columns:1fr; gap:4px; } .academy-message-metadata dd { margin-bottom:10px; } }

/* Original desktop grid and sizing; show compact metadata within each box. */
.academy-admin-main .staff-course-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; margin-top: 5px; }
.academy-admin-main .staff-course-meta small { margin-top: 0; font-size: 13px; line-height: 1.25; }
.academy-admin-main .staff-course-occupancy { font-variant-numeric: tabular-nums; }
@media (max-width: 719px) {
  .academy-admin-main .staff-course-buttons { grid-auto-rows: 1fr; }
  .academy-admin-main .staff-course-buttons button { min-height: 112px; }
  .academy-admin-main .staff-course-buttons strong { display: flex; align-items: center; justify-content: center; min-height: 2.5em; }
  .academy-admin-main .staff-course-meta { flex-direction: column; gap: 5px; }
}

/* Current and completed student lists share the existing Academy controls. */
.academy-workspace .academy-student-tabs{grid-template-columns:repeat(3,minmax(0,1fr));max-width:720px;margin-bottom:12px;}
.academy-record-completed{margin-top:24px;}
.academy-record-completed summary{cursor:pointer;color:#9E4D60;font-weight:600;padding:12px 0;}
.academy-record-completed form{margin-top:12px;}
@media(max-width:600px){.academy-workspace .academy-student-tabs{grid-template-columns:1fr;}.academy-students-table td:first-child{grid-row:1/7;}.academy-students-table td:nth-child(6):before{content:"Last completion: ";color:#786A70;}}

/* Keep the short Status heading and values intact beside email actions. */
.academy-email-history-table .academy-email-status-heading{width:80px;min-width:80px;white-space:nowrap;overflow-wrap:normal;word-break:normal;}
.academy-email-history-table .academy-email-status{white-space:nowrap;overflow-wrap:normal;word-break:normal;}

/* Keep document names readable at tablet widths. */
@media (min-width:601px) and (max-width:900px){
 .academy-document-list article{grid-template-columns:repeat(2,minmax(0,1fr));}
 .academy-document-list a,.academy-document-list article > span{grid-column:1/-1;}
 .academy-workspace .academy-document-list article button{width:100%;}
}
#template-form textarea[name="text_body"]{min-height:400px;resize:vertical;}
@media(max-width:600px){#template-form textarea[name="text_body"]{min-height:320px;}}

.academy-history-audience{display:grid;grid-template-columns:repeat(3,minmax(0,150px));gap:8px;margin:0 0 16px;}
.academy-workspace .academy-history-audience button{width:100%;height:46px;margin:0;padding:8px 12px;}
.academy-history-audience button[aria-pressed="true"]{background:#B9576B;border-color:#B9576B;color:#fff;}
.academy-student-course-name{display:block;}
@media(max-width:600px){.academy-history-audience{grid-template-columns:repeat(3,minmax(0,1fr));}}

/* Staff class calendar: the day grid stays readable at phone widths. */
.academy-calendar-workspace { --calendar-nail:#813B55; --calendar-lash:#31616A; }
.academy-calendar-intro { display:flex; align-items:start; justify-content:space-between; gap:18px; margin-bottom:20px; }
.academy-calendar-intro p { margin:8px 0 0; color:#6F6066; line-height:1.5; }
.academy-calendar-legend { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.academy-calendar-status-legend { display:flex; flex-wrap:wrap; gap:9px 18px; align-items:center; margin:-4px 0 15px; color:#5A4E54; font-size:12px; font-weight:600; }
.academy-calendar-status-legend > span { display:inline-flex; align-items:center; gap:6px; }
.academy-calendar-status-legend i { display:inline-block; width:16px; height:16px; border:1px solid #D5C9C9; border-radius:3px; }
.academy-calendar-status-legend i.is-empty { background:#F0EEEE; }
.academy-calendar-status-legend i.is-scheduled { background:#F6E6E9; }
.academy-calendar-status-legend i.is-booked { background:#DDA8B5; border-color:#A66B7B; }
.academy-calendar-marker { display:inline-block; border-radius:4px; padding:3px 7px; font:600 12px/1.35 "Inter",sans-serif; white-space:nowrap; }
.academy-calendar-marker.is-nail { color:#fff; background:var(--calendar-nail); }
.academy-calendar-marker.is-lash { color:#fff; background:var(--calendar-lash); }
.academy-calendar-marker.is-other { color:#3A2733; background:#EADCD9; }
.academy-calendar-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; border-top:1px solid #EADCD9; padding:16px 0; }
.academy-calendar-toolbar h3 { margin:0; font-size:23px; }
.academy-calendar-navigation { display:flex; align-items:center; gap:8px; }
.academy-workspace .academy-calendar-navigation button { min-width:44px; min-height:44px; margin:0; }
.academy-calendar-layout { display:grid; grid-template-columns:minmax(0,1.9fr) minmax(270px,1fr); align-items:start; gap:20px; }
.academy-calendar-grid-wrap { min-width:0; }
.academy-calendar-weekdays,.academy-calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.academy-calendar-weekdays { background:#F6E9E7; border:1px solid #EADCD9; border-bottom:0; }
.academy-calendar-weekdays span { text-align:center; padding:9px 2px; color:#66555D; font-size:12px; font-weight:700; }
.academy-calendar-grid { border-top:1px solid #EADCD9; border-left:1px solid #EADCD9; }
.academy-workspace .academy-calendar-day { display:flex; flex-direction:column; align-items:flex-start; gap:4px; width:100%; min-width:0; min-height:92px; margin:0; padding:8px; border:0; border-right:1px solid #EADCD9; border-bottom:1px solid #EADCD9; border-radius:0; background:#F0EEEE; text-align:left; }
.academy-workspace .academy-calendar-day.is-scheduled { background:#F6E6E9; }
.academy-workspace .academy-calendar-day.is-booked { background:#DDA8B5; }
.academy-workspace .academy-calendar-day:hover { filter:brightness(.96); }
.academy-workspace .academy-calendar-day[aria-pressed="true"] { box-shadow:inset 0 0 0 2px #813B55; }
.academy-workspace .academy-calendar-day.is-adjacent { opacity:.66; color:#806F76; }
.academy-calendar-day-number { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; font-size:14px; font-weight:600; }
.academy-calendar-day[aria-current="date"] .academy-calendar-day-number { border-radius:50%; background:#3A2733; color:white; }
.academy-calendar-day.has-classes .academy-calendar-day-number { font-weight:800; }
.academy-calendar-markers { display:grid; gap:3px; max-width:100%; }
.academy-calendar-markers .academy-calendar-marker { max-width:100%; white-space:normal; overflow:visible; text-overflow:clip; text-align:center; }
.academy-calendar-detail { min-width:0; border:1px solid #EADCD9; border-radius:4px; background:#FAF7F5; }
.academy-calendar-detail-heading { padding:16px; border-bottom:1px solid #EADCD9; }
.academy-calendar-detail-heading p { margin:0 0 5px; color:#786A70; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
.academy-calendar-detail-heading h3 { margin:0; font-size:21px; }
.academy-calendar-events { list-style:none; margin:0; padding:0; }
.academy-calendar-event { padding:16px; border-bottom:1px solid #EADCD9; }
.academy-calendar-event:last-child { border-bottom:0; }
.academy-calendar-event h4 { margin:10px 0 4px; color:#3A2733; font-size:16px; line-height:1.4; }
.academy-calendar-event p { margin:4px 0 10px; color:#5A4E54; line-height:1.45; }
.academy-calendar-event .academy-calendar-conflict { color:#8F1D1D; font-weight:600; }
.academy-workspace .academy-calendar-open { margin-top:2px; font-weight:600; }
.academy-calendar-empty { margin:0; padding:22px 16px; color:#6F6066; }
@media(max-width:1050px) { .academy-calendar-layout { grid-template-columns:minmax(0,1fr); } }
@media(max-width:600px) {
  .academy-calendar-intro { display:block; }
  .academy-calendar-legend { justify-content:flex-start; margin-top:14px; }
  .academy-calendar-toolbar { flex-wrap:wrap; }
  .academy-calendar-toolbar h3 { font-size:20px; }
  .academy-workspace .academy-calendar-day { min-height:76px; padding:5px 3px; }
  .academy-calendar-day-number { width:23px; height:23px; font-size:12px; }
  .academy-calendar-markers { width:100%; min-width:0; }
  .academy-calendar-markers .academy-calendar-marker { width:100%; padding:2px 1px; font-size:12px; letter-spacing:normal; white-space:normal; overflow:visible; text-overflow:clip; text-align:center; }
  .academy-calendar-detail { margin-top:2px; }
}
@media(max-width:360px) { .academy-admin-header-actions .academy-student-view-link { white-space:normal; font-size:12px; padding-block:6px; } }

/* Keep preview navigation with its related action, including on narrow screens. */
.academy-email-preview-actions{display:flex;gap:8px;flex:none;}
.academy-workspace .academy-email-preview-actions button{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:150px;height:44px;min-height:44px;margin:0;padding:0 10px;border-radius:5px;text-align:center;white-space:nowrap;}
@media(max-width:700px){.academy-email-preview-heading{display:block;}.academy-email-preview-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;margin:12px 0 8px;}.academy-workspace .academy-email-preview-actions button{width:100%;padding:0 8px;}}
.academy-welcome-actions{display:flex;justify-content:flex-end;margin:8px 0 10px;}
.academy-workspace .academy-welcome-actions button{box-sizing:border-box;min-width:180px;height:46px;min-height:46px;margin:0;border-radius:5px;}
.academy-template-document-actions{display:flex;gap:8px;flex-wrap:wrap;}
.academy-workspace .academy-template-document-actions button{box-sizing:border-box;min-width:170px;height:46px;min-height:46px;margin:0;border-radius:5px;}
@media(max-width:600px){.academy-welcome-actions,.academy-template-document-actions{display:grid;grid-template-columns:1fr;width:100%;}.academy-workspace .academy-welcome-actions button,.academy-workspace .academy-template-document-actions button{width:100%;}}
