:root{--navy:#142c45;--blue:#255de0;--ink:#172e45;--muted:#617286;--line:#dfe6ef;--bg:#f3f6fa;--green:#087c71;--radius:18px;font-family:Tahoma,Arial,sans-serif;color:var(--ink);font-size:16px;line-height:1.65;background:var(--bg)}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,select,summary{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}a{color:var(--blue);text-decoration:none}a:hover{text-decoration:underline}[hidden]{display:none!important}:focus-visible{outline:3px solid #578dff;outline-offset:3px}h1,h2,p{margin-top:0}h1{font-size:2rem;line-height:1.4;margin-bottom:8px}h2{font-size:1.25rem;line-height:1.5;margin-bottom:12px}small{font-size:.8125rem}.muted{color:var(--muted);font-size:.9375rem}button:disabled{cursor:wait;opacity:.6}.topbar{height:96px;padding:0 max(5vw,24px);display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:#fff}.brand{display:flex;align-items:center;gap:12px;color:var(--navy);font-size:1.6rem;font-weight:bold}.brand:hover{text-decoration:none}.brand small{display:block;font-size:.75rem;font-weight:normal;color:var(--muted)}.brand-symbol{display:grid;place-items:center;width:45px;height:45px;border-radius:14px;background:var(--navy);color:white}.header-end{display:flex;align-items:center;gap:20px;font-size:.875rem;color:var(--muted)}.button{border:1px solid transparent;border-radius:10px;padding:11px 20px;font-weight:bold;font-size:.9375rem;min-height:46px}.primary{background:var(--blue);color:white}.primary:hover{background:#1647ba}.secondary{background:#edf2fb;color:#244c85;border-color:#d8e3f5}.ghost{background:white;border-color:var(--line);color:var(--ink)}.danger{background:#fff2f2;color:#ad2939;border-color:#f4d7da}.full{width:100%}.text-button{background:none;border:0;color:var(--blue);width:100%;margin-top:20px;font-size:.875rem}.auth-layout{max-width:1080px;margin:64px auto;display:grid;grid-template-columns:1fr 1fr;min-height:545px;border-radius:24px;overflow:hidden;box-shadow:0 14px 55px #2039550b;background:white}.intro{padding:60px 44px;background:var(--navy);color:white;display:flex;flex-direction:column}.eyebrow{font-size:.8125rem;font-weight:bold;color:var(--green);display:block;margin-bottom:12px}.intro .eyebrow{color:#9dbde8}.intro h1{font-size:3.3rem;line-height:1.5;margin:35px 0 20px}.intro p{color:#cad7e5;font-size:1.0625rem;line-height:2}.intro-footer{margin-top:auto;font-size:.8125rem;color:#b5cbe0;padding-top:42px}.line{display:inline-block;width:30px;height:2px;background:#88b7ff;vertical-align:middle;margin-left:10px}.auth-card{padding:38px 42px}.tabs{display:flex;background:var(--bg);padding:5px;border-radius:12px;margin-bottom:30px}.tab{flex:1;border:0;background:none;color:var(--muted);padding:9px;border-radius:8px;font-size:.9375rem}.tab.active{background:white;color:var(--navy);font-weight:bold;box-shadow:0 2px 5px #142c4510}label{display:block;font-size:.875rem;font-weight:bold;margin-bottom:18px}input,select{display:block;width:100%;background:#fff;border:1px solid #cbd6e4;color:var(--ink);border-radius:9px;padding:11px 13px;margin-top:7px;min-height:48px;min-width:0;font-size:1rem}input::placeholder{color:#7b8798}label small{display:block;margin-top:6px;color:var(--muted);font-weight:normal}.workspace{max-width:1250px;padding:40px 30px;margin:auto}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:28px}.page-heading p{margin-bottom:0}.tag{display:inline-block;white-space:nowrap;color:var(--green);background:#e0f1ed;font-size:.8125rem;padding:5px 12px;border-radius:7px}.subtle{background:#edf2fb;color:#4a6592}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-bottom:24px}.stats article{background:white;border:1px solid var(--line);padding:20px 25px;border-radius:var(--radius);border-top:3px solid var(--navy)}.stats article:nth-child(2){border-top-color:var(--blue)}.stats article:nth-child(3){border-top-color:var(--green)}.stats span{display:block;font-size:.875rem;color:var(--muted)}.stats strong{font-size:2.25rem;line-height:1.4;display:block;margin-top:12px;font-weight:500}.stats .text-stat{font-size:1.375rem;line-height:2.3}.panel{background:white;border:1px solid var(--line);padding:26px;border-radius:var(--radius);margin-bottom:24px;min-width:0}.admin-grid{display:grid;grid-template-columns:1.4fr 1fr;gap:24px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.section-heading h2{margin:0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.upload-zone{background:#f7f9ff;border:1px dashed #9bb3dd;text-align:center;border-radius:12px;padding:22px;cursor:pointer}.upload-zone input{font-size:.875rem;border:0;background:transparent;padding:10px 0;min-height:unset}.upload-zone span{font-size:.8125rem;color:var(--muted);font-weight:normal}.upload-help{direction:ltr;text-align:right;font-size:.8125rem}.download-links{display:flex;justify-content:center;gap:25px;font-size:.875rem;margin-top:16px}.invite-panel{background:#f9fcfd}.invite-panel h2{font-size:1.65rem;margin:20px 0 12px}.invite-panel small{display:block;color:var(--muted);margin-top:20px}.secret-result{direction:ltr;white-space:pre-wrap;overflow-wrap:anywhere;user-select:all;background:#eaf3fb;border:1px solid #c2d8ed;border-radius:10px;padding:18px;margin:18px 0;font-family:monospace;font-size:1rem}.table-wrap{width:100%;overflow-x:auto;overscroll-behavior-x:contain}table{width:100%;border-collapse:collapse;text-align:right;font-size:.875rem}th{background:#f5f7fb;color:#536880;font-weight:normal;padding:13px 16px;white-space:nowrap}td{padding:17px 16px;border-bottom:1px solid #edf1f5;vertical-align:middle;overflow-wrap:anywhere}tbody tr:last-child td{border-bottom:0}td .button{white-space:nowrap;padding:7px 12px;min-height:38px;font-size:.8125rem}.empty{text-align:center;color:var(--muted);padding:34px 12px}.search-label{margin:0;max-width:300px;flex:1}.search-label input{margin:0;font-size:.875rem}summary{cursor:pointer;font-size:1.0625rem;font-weight:bold}details[open]>summary{margin-bottom:22px}.student-grid{display:grid;grid-template-columns:minmax(0,1fr) 275px;gap:24px}.attendance-card{border-radius:18px;background:var(--navy);color:white;padding:28px;margin-bottom:24px}.attendance-card>span{color:#b0c6df;font-size:.875rem}.attendance-card h2{font-weight:normal;font-size:1.0625rem;margin-top:16px}.attendance-card strong{display:block;font-size:4rem;line-height:1.4;font-weight:normal}.attendance-card p{color:#bdd0e6;font-size:.875rem;margin-top:12px}.grades-table{text-align:center;margin-top:22px}.grades-table td{font-size:1.5rem;padding:28px 16px;font-weight:bold;color:var(--blue)}.grades-table th{min-width:130px}.password-form{max-width:480px}.password-page{max-width:600px;margin:60px auto;padding:0 20px}#notice{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 40px);padding:15px 24px;border-radius:12px;background:var(--navy);color:white;z-index:100;box-shadow:0 8px 30px #172e452a;font-size:.9375rem}#notice.error{background:#9a273c}dialog{border:0;border-radius:18px;padding:32px;max-width:500px;width:calc(100% - 32px);color:var(--ink);box-shadow:0 24px 80px #12243840}dialog::backdrop{background:#11263d80}.dialog-close{float:left;border:0;background:#edf1f6;color:var(--ink);border-radius:50%;width:34px;height:34px;font-size:1.25rem}.dialog-actions{display:flex;gap:12px;margin-top:25px}footer{display:flex;justify-content:space-between;gap:20px;max-width:1190px;margin:35px auto 0;padding:22px 24px;color:var(--muted);border-top:1px solid var(--line);font-size:.8125rem}.loading{text-align:center;padding:100px 20px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@media(max-width:800px){.auth-layout{margin:30px 20px;grid-template-columns:1fr;max-width:540px}.intro{padding:26px 30px}.intro h1{font-size:2rem;margin:8px 0}.intro h1 br{display:none}.intro p,.intro-footer{display:none}.intro .eyebrow{margin:0}.auth-card{padding:28px}.admin-grid,.student-grid{grid-template-columns:1fr}.attendance-card{display:grid;grid-template-columns:1fr auto;align-items:center;gap:0 20px}.attendance-card strong{grid-column:2;grid-row:1/4;font-size:3.5rem}.attendance-card h2,.attendance-card p{margin:5px 0}.workspace{padding:30px 18px}.stats{gap:10px}.stats article{padding:15px}.stats .text-stat{font-size:1rem}.panel{padding:20px}.header-end>span{display:none}}@media(max-width:480px){.topbar{height:80px;padding:0 20px}.brand{font-size:1.375rem}.brand small{font-size:.75rem}.button{padding:10px 14px}.form-grid{grid-template-columns:1fr;gap:0}.stats{grid-template-columns:1fr 1fr}.stats article:last-child{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between}.stats article:last-child strong{margin:0;line-height:1.5}.page-heading{align-items:flex-start}.page-heading .tag{display:none}.page-heading h1{font-size:1.6rem}.section-heading{flex-wrap:wrap}.search-label{min-width:100%}.auth-card{padding:24px}.header-end{gap:0}.header-end .button{font-size:.8125rem}.download-links{gap:18px}.panel{padding:18px}.attendance-card{padding:24px}footer{margin-top:15px}}
.section-form{display:grid;grid-template-columns:1fr 1fr auto;gap:15px;align-items:end;margin-bottom:22px}.section-form label{margin:0}.section-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:16px}.section-card{border:1px solid var(--line);border-radius:14px;padding:20px;background:#f8faff}.section-card h3{margin:0 0 8px}.section-card p{color:var(--muted);font-size:.875rem}.section-card .button{width:100%;font-size:.875rem}.member-tools{margin-top:22px}.member-tools summary{font-size:.9375rem}.attendance-cta{background:#fff;color:var(--navy);width:100%;font-size:.875rem;margin-top:12px}.attendance-cta:disabled,.attendance-success{background:#d8f6e5;color:#075e3a;opacity:1;cursor:default}.attendance-status-row{display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid var(--line);padding:16px 0}.attendance-status-row:last-child{border:0}.attendance-status-row h3{font-size:1rem;margin:0 0 6px}.attendance-status-row p{font-size:.875rem;color:var(--muted);margin:0}.attendance-status-row .button{font-size:.8125rem}.projector{max-width:none;width:100vw;height:100dvh;max-height:100dvh;border-radius:0;padding:24px 5vw;text-align:center;margin:0;background:#fff;overflow:auto}.projector-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;text-align:right}.projector-heading h1{margin:0;font-size:clamp(1.4rem,3vw,2.6rem)}.projector-heading p{margin:6px 0;color:var(--muted)}.projector .eyebrow{margin-bottom:4px}.danger-solid{background:#c3293e;color:white}.qr-stage{display:grid;place-items:center;min-height:200px;margin:16px auto;background:white}.qr-stage canvas{width:min(57vh,80vw);height:min(57vh,80vw);image-rendering:pixelated}.projector-bottom{display:flex;justify-content:center;gap:45px;font-size:1.25rem}.projector-bottom p{margin:8px}.projector-bottom strong{font-size:1.8rem}.scanner-dialog{max-width:530px;padding:24px}.scanner-dialog video{display:block;width:100%;max-height:50vh;aspect-ratio:1;object-fit:cover;background:#122438;border-radius:14px}.scanner-dialog #scannerStatus{padding-top:16px;font-size:.9375rem}.scanner-dialog.success #scannerStatus{color:#087047;font-weight:bold}.scanner-dialog.success video{display:none}@media(max-width:700px){.section-form{grid-template-columns:1fr}.attendance-status-row{flex-direction:column;align-items:stretch}.projector-heading{flex-direction:column;text-align:center}.projector-bottom{gap:10px;font-size:1rem}.projector{padding:18px}.projector-bottom strong{font-size:1.4rem}.attendance-card .attendance-cta{grid-column:1/-1}}

.student-attendance-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 0;border-bottom:1px solid var(--line);flex-wrap:wrap}.student-attendance-row:last-child{border-bottom:0}.badge-success{background:#d8f6e5;color:#075e3a;padding:7px 12px;border-radius:10px;font-size:.875rem;font-weight:bold}.attendance-cta:disabled{background:#e6eaf0;color:#526176}.attendance-cta.success:disabled{background:#d8f6e5;color:#075e3a}
/* Check: a compact academic surface, with the login form first. */
:root{font-family:Arial,Tahoma,sans-serif;font-size:16px;--radius:12px;--blue:#1f4aa8;--bg:#f5f7fb}.topbar{height:auto;min-height:76px;padding:16px max(4vw,20px);gap:16px}.brand{font-size:1.25rem;white-space:nowrap}.brand-symbol{height:36px;width:36px;border-radius:9px}.header-end{gap:12px;flex-wrap:wrap}.auth-layout{display:block;max-width:460px;min-height:0;margin:40px auto;border:1px solid var(--line);border-radius:14px;box-shadow:0 5px 22px #142c4508}.auth-card{padding:28px}.auth-card h2{margin-bottom:20px}.auth-card p:empty{display:none}.admin-grid{grid-template-columns:1fr}.workspace{max-width:1200px}.panel{border-radius:12px}.verification-notice{padding:16px 20px;background:#fff5dc;border:1px solid #e1c67b;border-radius:10px;color:#594617}.projector-heading{text-align:start}input,select,button{max-width:100%}.table-wrap{text-align:start}th,td{text-align:start}.dialog-close{left:auto;right:14px}[dir=rtl] .dialog-close{right:auto;left:14px}footer{font-size:.875rem}.button{font-size:.875rem}.text-stat{font-size:1rem}body{overflow-wrap:anywhere}#languageSwitch{white-space:nowrap}.auth-layout .tabs{margin-bottom:24px}@media(max-width:600px){.topbar{align-items:center;padding:12px 16px}.header-end{gap:8px}.header-end #roleLabel{display:none}.auth-layout{margin:24px 16px}.auth-card{padding:24px}.brand{font-size:1rem}.brand-symbol{width:30px;height:30px}.header-end .button{padding:8px 10px}.workspace{padding-inline:16px}.projector-heading{text-align:center}}

.password-toggle{margin:0 0 16px;text-align:start;font-size:.875rem;min-height:36px;width:auto}

#adminAccountDialog{width:min(480px,calc(100vw - 32px));max-height:90dvh;overflow:auto}#adminAccountError{color:#a52035;background:#fff0f2;padding:12px;border-radius:8px}
#testVideo{display:block;width:100%;aspect-ratio:1;object-fit:cover;background:#142c45;border-radius:12px;margin:16px 0}#testQR{display:block;max-width:100%;height:auto!important;margin:16px auto}#cameraResult{padding:12px}

.heading-actions{display:flex;gap:.75rem;flex-wrap:wrap;align-items:center}.heading-actions a{text-decoration:none}.template-tools{margin-bottom:1.5rem;padding:1rem;border:1px solid var(--border,#d6e1ec);border-radius:12px}.template-tools form{margin-block:1rem}.saved-templates a{overflow-wrap:anywhere}#sectionForm{grid-template-columns:minmax(0,1fr) auto}@media(max-width:700px){#sectionForm{grid-template-columns:1fr}.heading-actions{width:100%}.heading-actions .button{flex:1;text-align:center}.template-tools{padding:.8rem}}

.section-card .button+.button{margin-top:.75rem}#studentSectionResults .panel{margin-bottom:1rem}#studentSectionResults details{margin-top:.9rem}.section-absence{padding:1rem;background:#edf4ff;color:#142c45;border-radius:10px;font-weight:700}#sectionView .heading-actions{margin-bottom:1rem}

.roster-joined td{background:#e8f6ed;color:#155b34}.roster-missing td{background:#fff0f0;color:#972727}#rosterSummary{font-weight:700}#rosterBody .button,#sectionResultsBody .button{margin:3px;white-space:nowrap}#rosterUploadForm{margin-bottom:20px}
