*{box-sizing:border-box}body{margin:0;background:#f5f9fc;color:#123e56;font:17px/1.7 system-ui,sans-serif}header{display:flex;gap:14px;align-items:center;padding:16px 5%;background:white;border-bottom:5px solid #fae200;color:#005f94;font-weight:700}header small{display:block;font-size:13px;font-weight:400}header a{margin-left:auto}main{max-width:1180px;margin:24px auto;padding:0 24px 48px}h1{font-size:27px}h2{font-size:22px}a{color:#005f94}section{background:white;padding:26px;border:1px solid #d3e2ed;border-radius:18px;margin-bottom:22px}.login{max-width:530px;margin:30px auto}label{display:block;margin:14px 0}input,select,button{font:inherit;min-height:52px;border:1px solid #87a9be;border-radius:9px;padding:10px 14px}input:not([type=checkbox]),select{width:100%;background:white;color:#123e56}input[type=checkbox]{min-height:auto;width:22px;height:22px;vertical-align:middle}button{background:#005f94;color:white;cursor:pointer}button.secondary{background:white;color:#005f94}button:disabled{opacity:.6;cursor:wait}.actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:18px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.field-row{display:grid;grid-template-columns:1fr 2fr;gap:14px}small,.muted{font-size:14px;color:#517183}#message{color:#a52d30;min-height:30px;overflow-wrap:anywhere}table{width:100%;border-collapse:collapse}td,th{text-align:left;padding:12px 8px;border-bottom:1px solid #d3e2ed;overflow-wrap:anywhere}th{font-size:14px}td button{padding:8px 12px}.table-wrap{overflow-x:auto}.badge{display:inline-block;background:#fff5a0;color:#123e56;padding:3px 10px;border-radius:20px}.device{padding:14px 0;border-bottom:1px solid #d3e2ed;display:flex;justify-content:space-between;gap:14px;align-items:center}.device span{overflow-wrap:anywhere}.login button[type=submit]{width:100%}:focus-visible{outline:3px solid #fae200;outline-offset:3px}@media(max-width:800px){.grid{grid-template-columns:1fr}main{padding:0 16px 32px}section{padding:20px}}
[hidden]{display:none!important}.presence{white-space:nowrap;font-size:14px;color:#678094}.presence.online{color:#006c58;background:#e6f5ee;padding:5px 8px;border-radius:20px;font-weight:700}.student-link{font-weight:700;font-size:19px}.table-wrap td{vertical-align:middle}#roster{padding:16px;margin-top:20px}td:nth-child(3){max-width:280px}
/* Keep the page in normal flow; measured space is removed after keyboard close. */
body{padding-bottom:var(--entry-viewport-gap,0px)}
.login input,.login select{scroll-margin-block:40px 16px}
@media(max-height:600px){main{margin-top:12px}.login{margin-top:12px}.login h1{margin-top:0}}
/* Landscape tablets: keep ID near the top even when Safari does not report
   keyboard occlusion. Normal flow still allows scrolling to the submit button. */
body[data-entry="student"] main{margin-top:12px}
body[data-entry="student"] #message:empty{min-height:0}
body[data-entry="student"] .login{margin-top:12px}
body[data-entry="student"] .login h1{margin:0 0 16px}
@media(min-width:600px){
 body[data-entry="student"] .login{max-width:720px}
 form[data-form="student-login"]{display:grid;grid-template-columns:minmax(150px,1fr) minmax(220px,2fr);gap:16px}
 form[data-form="student-login"] label{margin:0}
 form[data-form="student-login"] button{grid-column:1/-1}
}

.batch-book{border:1px solid #d3e2ed;border-radius:12px;margin:18px 0;padding:16px;min-width:0}
.batch-book legend label{margin:0;font-weight:700}
.batch-range-row{display:grid;grid-template-columns:minmax(100px,1fr) auto minmax(100px,1fr) auto auto;gap:10px;align-items:end;max-width:720px;margin-bottom:10px}
.batch-range-row label{margin:0}.batch-range-row>span{align-self:center;padding-top:25px}
#range-editor p{overflow-wrap:anywhere}
@media(max-width:600px){.batch-range-row{grid-template-columns:minmax(75px,1fr) auto minmax(75px,1fr)}.batch-range-row button{grid-row:2}}
