:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#1c2b24;background:#f5f7f3;line-height:1.5}
*{box-sizing:border-box}body{margin:0}a{color:inherit}button,select{font:inherit}button{cursor:pointer;border:0;border-radius:11px;padding:12px 18px;font-weight:700;background:#007a3d;color:white}button:hover{filter:brightness(.94)}button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #d4af37;outline-offset:3px}.secondary{background:#e6efe8;color:#254d32}.danger{background:#a82d31}.top{background:#254d32;color:white;padding:16px max(22px,calc((100vw - 1120px)/2));display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.brand{text-decoration:none;font-size:1.2rem;font-weight:800}.brand em{color:#f0d47c;font-style:normal}.top nav{display:flex;gap:16px;flex-wrap:wrap}.top nav a{text-decoration:none}.top nav a[aria-current=page]{text-decoration:underline;text-decoration-color:#d4af37;text-decoration-thickness:3px;text-underline-offset:6px}.notice{background:#fff5d9;border-bottom:1px solid #eed99b;padding:10px 20px;text-align:center;font-size:.88rem;color:#634b12}.wrap{max-width:1120px;margin:auto;padding:30px 20px 70px}.eyebrow{color:#007a3d;font-weight:800;letter-spacing:.1em;text-transform:uppercase;font-size:.78rem;margin:0 0 6px}h1{font-size:clamp(2rem,4vw,3rem);line-height:1.12;margin:0 0 12px;color:#254d32}h2{margin:0 0 14px;color:#254d32;font-size:1.25rem}p{margin:0 0 16px}.muted{color:#617167}.panel{background:white;border:1px solid #e1e9e0;border-radius:18px;padding:23px;box-shadow:0 6px 22px #1c36230a}.hero{padding:38px 0}.hero p{max-width:660px;font-size:1.1rem}.actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:25px}.actions a,.linkbtn{display:inline-block;text-decoration:none;border-radius:11px;background:#007a3d;color:white;font-weight:700;padding:13px 18px}.actions a:nth-child(2){background:#254d32}.featuregrid,.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.featuregrid{grid-template-columns:repeat(3,minmax(0,1fr))}.stat strong{font-size:2rem;color:#254d32;display:block}.stat span{font-size:.85rem;color:#617167}.toolbar{display:flex;justify-content:space-between;align-items:end;gap:18px;flex-wrap:wrap;margin-bottom:22px}.toolbar label{display:grid;gap:5px;font-weight:700}.toolbar select{padding:10px 35px 10px 12px;border:1px solid #b9c9bd;border-radius:9px;background:white}.stack{display:grid;gap:20px;margin-top:20px}.roster{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.student{background:#f8faf8;border:1px solid #dfe9e0;border-radius:13px;padding:14px;display:flex;justify-content:space-between;gap:8px;align-items:center}.status{font-size:.73rem;border-radius:99px;padding:5px 9px;background:#e3eee5;color:#254d32;font-weight:800;white-space:nowrap}.status.out{background:#ffebcf;color:#88531d}.kioskgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.kioskstudent{background:white;color:#254d32;border:2px solid #cfe2d3;border-radius:18px;min-height:144px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;padding:16px;text-align:center;box-shadow:0 5px 15px #254d320a}.kioskstudent .studentname{font-size:1.32rem;font-weight:800}.kioskstudent .timelabel{font-variant-numeric:tabular-nums;font-size:1.05rem}.kioskstudent.out{border-color:#c68d2d;background:#fff5e4}.kioskstudent.overtime{border-color:#b33333;background:#fff0ee}.kioskstudent .state{font-size:.75rem;letter-spacing:.08em;font-weight:900}.kioskstudent.out .state{color:#9a611f}.kioskstudent.overtime .state{color:#a82d31}.tablewrap{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left}th,td{padding:12px 9px;border-bottom:1px solid #e4ebe4}th{font-size:.8rem;color:#617167}td{font-size:.92rem}.empty{padding:25px;color:#617167;text-align:center}.footnote{font-size:.83rem;color:#617167;margin-top:18px}dialog{border:0;border-radius:20px;max-width:min(440px,calc(100vw - 30px));width:100%;box-shadow:0 24px 80px #0005;padding:28px}dialog::backdrop{background:#10261b99}dialog h2{font-size:1.5rem}dialog .actions{justify-content:flex-end}dialog .actions button{min-width:100px}.error{color:#a82d31;min-height:1.4em}.setting-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.setting-row label{font-weight:700}.setting-row input{width:90px;padding:11px;border:1px solid #b9c9bd;border-radius:9px;font:inherit}.limit-note{display:inline-block;background:#e3eee5;color:#254d32;border-radius:9px;padding:9px 14px;font-weight:700;margin:0 0 20px}@media(max-width:800px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.roster,.kioskgrid,.featuregrid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:530px){.top{padding:15px 18px}.wrap{padding:23px 14px 60px}.roster,.kioskgrid,.featuregrid{grid-template-columns:1fr}.stats{gap:9px}.panel{padding:17px}.kioskstudent{min-height:118px}.toolbar{align-items:stretch}}

.reviewitem{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid #e4ebe4}.reviewitem span{flex:1;min-width:220px}.restriction{color:#a82d31}.student{flex-wrap:wrap}.student button{font-size:.75rem;padding:8px 10px}.kioskstudent:has(.state){transition:background .2s}.kioskstudent .timelabel{overflow-wrap:anywhere}
dialog label{display:block;margin:12px 0 6px;font-weight:700}dialog select,dialog textarea{display:block;width:100%;max-width:100%;padding:10px;border:1px solid #b9c9bd;border-radius:8px;background:white;font:inherit}dialog [hidden]{display:none!important}#pause-current{font-weight:700;color:#254d32}

.emergency-panel{border:2px solid #a82d31}.emergency-panel #emergency-current{font-weight:800;color:#a82d31}.emergency-note:not(:empty){background:#ffe5e5;color:#8f2429;border:1px solid #c97c80}.emergency-note:empty{display:none}

/* V0.5 roster controls */
#roster-form {flex-wrap:wrap;align-items:end;}
#roster-form input {min-width:180px;}
#roster-form select {min-width:120px;}
.roster .student small {overflow-wrap:anywhere;font-size:.72rem;flex-basis:100%;}
.roster .student button {font-size:.8rem;}

/* V0.5.1: distinguish duplicate names without changing trip identity. */
.history-student-id{display:block;color:#617167;font-size:.72rem;overflow-wrap:anywhere;margin-top:3px;}

/* V0.6 reporting filters and responsive tables */
.report-filters{display:flex;gap:14px;flex-wrap:wrap}.report-filters label{display:grid;gap:6px;font-weight:700}.report-filters select{padding:10px 12px;border:1px solid #b9c9bd;border-radius:9px;background:white;font:inherit}.report-filters select:focus-visible{outline:3px solid #d4af37}.tablewrap{overflow-x:auto}.tablewrap table{min-width:580px}.tablewrap small{display:block}.panel .actions{margin-bottom:12px}

/* V0.7 accessibility and responsive usability */
:root{color-scheme:light}html{scroll-behavior:smooth}button,select,input,textarea{font:inherit;min-height:44px}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #a97700;outline-offset:3px}a:not(.brand):not(.linkbtn):hover{text-decoration:underline} .skip-link{position:absolute;left:12px;top:-90px;z-index:1000;background:white;color:#254d32;padding:12px 16px;border:3px solid #a97700;border-radius:8px}.skip-link:focus{top:10px}.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}.tablewrap{max-width:100%;overscroll-behavior-x:contain}.tablewrap:focus-visible{outline:3px solid #a97700;outline-offset:2px}.tablewrap table{min-width:640px}.tablewrap th{white-space:nowrap}.tablewrap td,.tablewrap th{vertical-align:top}.tablewrap .history-student-id{overflow-wrap:anywhere}.report-filters select{max-width:100%}.kioskstudent:focus-visible{outline:4px solid #a97700;outline-offset:3px}.error:not(:empty){font-weight:700}dialog{max-height:calc(100dvh - 30px);overflow-y:auto}dialog .actions{position:relative}@media(max-width:600px){.report-filters{display:grid;grid-template-columns:1fr}.report-filters label{min-width:0}.report-filters select{width:100%}.tablewrap{border:1px solid #dfe9e0;border-radius:10px}.kioskstudent{min-height:120px}.actions button{max-width:100%}.top nav{gap:10px}.top nav a{padding:6px 0}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* V0.8.1 PDF preview */
#pdf-import input[type=file]{max-width:100%;font:inherit}#pdf-import-preview[hidden]{display:none}#pdf-import-rows input{min-width:170px;max-width:230px;width:100%;padding:8px;border:1px solid #b9c9bd;border-radius:7px}#pdf-import-rows select{padding:8px;border:1px solid #b9c9bd;border-radius:7px}#pdf-import-commit:disabled{opacity:.5;cursor:not-allowed}

/* V1.1 backend connection controls */
[hidden]{display:none!important}
#backend-status:not(:empty){padding:12px;background:#fff0ee;border:1px solid #b33333;border-radius:9px}
#sync-status{font-size:.85rem;color:#617167}
#auth-panel,#pair-panel{margin-bottom:20px}
#auth-panel input,#pair-panel input,dialog input{font:inherit;padding:10px;border:1px solid #b9c9bd;border-radius:8px;max-width:100%}
#pairing-code{display:block;overflow-wrap:anywhere;user-select:all;margin-top:12px}
button:disabled{cursor:not-allowed;opacity:.55}

/* Teacher login visual refinement; original shared styles retained. */
.teacher-page{min-height:100vh;display:flex;flex-direction:column;background:#fafbf8}
.teacher-page>.top{background:#254D32;padding:20px max(24px,calc((100vw - 1356px)/2))}
.teacher-page .top .brand{font-family:Georgia,"Times New Roman",serif;font-size:clamp(1.5rem,2.5vw,2.4rem);font-weight:700}
.teacher-page .top .brand em{color:#D4AF37}
.teacher-page>.wrap{width:100%;flex:1;padding-top:44px;padding-bottom:32px}
#auth-panel{width:100%;max-width:650px;margin:0 auto 24px;padding:30px 48px 36px;background:#FFFFFF;border:1px solid #d6ded8;border-radius:20px;box-shadow:0 12px 40px rgba(37,77,50,.07);text-align:center}
#auth-panel .signin-crest{display:block;width:148px;max-width:45%;height:auto;object-fit:contain;margin:0 auto 18px}
#auth-panel h1{font-family:Georgia,"Times New Roman",serif;color:#254D32;font-size:clamp(1.7rem,3.6vw,2.65rem);line-height:1.15;margin:0 0 16px}
#auth-panel .signin-subtitle{display:flex;align-items:center;justify-content:center;gap:18px;color:#254D32;font-size:1rem;font-weight:700;letter-spacing:.18em;margin:0 0 28px}
#auth-panel .signin-subtitle::before,#auth-panel .signin-subtitle::after{content:"";height:1px;flex:1;max-width:78px;background:#D4AF37}
#auth-panel #login-form.setting-row{display:flex;flex-direction:column;align-items:stretch;gap:22px;margin:0;text-align:left}
#auth-panel #login-form label{display:flex;flex-direction:column;gap:7px;width:100%;min-width:0;color:#1c2b24;font-weight:700}
#auth-panel .signin-field{display:block;position:relative;width:100%}
#auth-panel #login-form input{display:block;width:100%;max-width:100%;min-width:0;min-height:56px;padding:13px 16px 13px 54px;border:1px solid #cdd6d0;border-radius:11px;background:#FFFFFF;color:#1c2b24;font:inherit;font-weight:400}
#auth-panel #login-form input::placeholder{color:#63706a;opacity:1}
#auth-panel .signin-icon{position:absolute;left:18px;top:50%;transform:translateY(-50%);width:23px;height:23px;fill:none;stroke:#63706a;stroke-width:1.8;pointer-events:none}
#auth-panel #login-button{display:flex;align-items:center;justify-content:center;gap:22px;width:100%;min-height:58px;margin-top:4px;background:#007A3D;color:#FFFFFF;border:1px solid #007A3D;border-radius:11px;font-size:1.2rem}
#auth-panel #login-button svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2}
#auth-panel #login-button:hover:not(:disabled){background:#254D32;border-color:#254D32;filter:none}
#auth-panel #login-form input:focus-visible,#auth-panel #login-button:focus-visible{outline:3px solid #a97700;outline-offset:3px}
#auth-panel .signin-help{margin:24px 0 0;color:#617167;font-size:.85rem;line-height:1.55}
.teacher-page .signin-footer{background:#254D32;color:#FFFFFF;padding:22px max(24px,calc((100vw - 1336px)/2))}
.teacher-page .signin-footer span{display:block;font-family:Georgia,"Times New Roman",serif;font-size:1.35rem;letter-spacing:.1em}
.teacher-page .signin-footer small{display:block;margin-top:3px;font-size:.65rem;letter-spacing:.38em}
@media(max-width:650px){.teacher-page>.top{padding:16px 20px}.teacher-page>.wrap{padding-top:24px}#auth-panel{padding:24px 22px 28px}#auth-panel .signin-subtitle{font-size:.8rem;gap:10px;letter-spacing:.14em}#auth-panel .signin-crest{width:130px}.teacher-page .signin-footer{text-align:center;padding:20px 16px}}

/* Login-only optional controls. No credential persistence or recovery behavior. */
#auth-panel #login-form #login-password{padding-right:58px}
#auth-panel .signin-password-toggle{position:absolute;right:6px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:44px;min-height:44px;padding:10px;background:transparent;color:#63706a;border-radius:8px}
#auth-panel .signin-password-toggle svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8}
#auth-panel .signin-password-toggle:focus-visible,#auth-panel .signin-kiosk:focus-visible{outline:3px solid #a97700;outline-offset:3px}
#auth-panel .signin-options{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
#auth-panel #login-form label.signin-remember{display:flex;flex-direction:row;align-items:center;gap:10px;width:auto;font-weight:400;flex-shrink:0}
#auth-panel #login-form #login-remember{width:20px;min-width:20px;min-height:20px;height:20px;padding:0;margin:0;accent-color:#007A3D}
#auth-panel .signin-recovery{display:flex;flex-direction:column;align-items:flex-end;gap:4px;text-align:right}
#auth-panel #login-forgot{background:transparent;color:#007A3D;min-height:24px;padding:0;font-weight:500;opacity:1}
#auth-panel .signin-recovery small,#auth-panel .signin-unavailable{font-size:.78rem;line-height:1.45;color:#617167}
#auth-panel .signin-unavailable{margin:-10px 0 0}
#auth-panel .signin-or{display:flex;align-items:center;gap:18px;margin:22px 0 18px;color:#617167;font-size:.85rem}
#auth-panel .signin-or::before,#auth-panel .signin-or::after{content:"";flex:1;height:1px;background:#b9c9bd}
#auth-panel .signin-kiosk{display:flex;align-items:center;justify-content:center;gap:16px;min-height:58px;padding:12px 16px;border-radius:11px;background:#e6efe8;color:#254D32;font-weight:700;text-decoration:none}
#auth-panel .signin-kiosk:hover{background:#dce9df}
#auth-panel .signin-kiosk svg{width:28px;height:28px;fill:none;stroke:#007A3D;stroke-width:1.6}
#auth-panel .signin-kiosk-help{margin:12px 0 0;font-size:.82rem;line-height:1.5;color:#617167}
@media(max-width:440px){#auth-panel .signin-options{flex-direction:column;gap:12px}#auth-panel .signin-recovery{align-items:flex-start;text-align:left}#auth-panel .signin-unavailable{margin:0}}
/* PDF roster review only: preserve the branded login and other dashboard styles. */
#pdf-import .pdf-review-class{min-width:0;margin:24px 0;padding:22px;border:1px solid #b9c9bd;border-radius:14px;background:#f8faf8}
#pdf-import .pdf-review-class legend{padding:0 8px;color:#007a3d;font-weight:800}
#pdf-import .pdf-review-class h3{margin:0 0 16px;color:#254d32;font-size:1.05rem}
#pdf-import .pdf-review-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px}
#pdf-import .pdf-review-field{display:flex;flex-direction:column;gap:6px;min-width:0;color:#254d32;font-weight:700;font-size:.88rem}
#pdf-import .pdf-review-field:first-child{grid-column:1 / -1}
#pdf-import .pdf-review-details input,#pdf-import .pdf-review-table input{display:block;width:100%;min-width:0;max-width:100%;min-height:44px;padding:10px 12px;border:1px solid #b9c9bd;border-radius:8px;background:white;color:#1c2b24;font:inherit;font-weight:400}
#pdf-import .pdf-review-warnings{margin:18px 0 24px;padding:12px 14px;border-left:3px solid #d4af37;background:#fff5d9;color:#634b12;font-size:.85rem;overflow-wrap:anywhere}
#pdf-import .pdf-review-roster{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;border:1px solid #dfe9e0;border-radius:10px;background:white}
#pdf-import .pdf-review-roster:focus-visible{outline:3px solid #a97700;outline-offset:3px}
#pdf-import .pdf-review-table{width:100%;min-width:660px;table-layout:fixed}
#pdf-import .pdf-review-table th{background:#e6efe8;color:#254d32;font-weight:700}
#pdf-import .pdf-review-table th,#pdf-import .pdf-review-table td{padding:12px;vertical-align:top;overflow-wrap:anywhere}
#pdf-import .pdf-review-table th:nth-child(1){width:23%}
#pdf-import .pdf-review-table th:nth-child(2){width:35%}
#pdf-import .pdf-review-table th:nth-child(3){width:14%}
#pdf-import .pdf-review-table th:nth-child(4){width:28%}
@media(max-width:600px){
 #pdf-import .pdf-review-class{padding:14px}
 #pdf-import .pdf-review-details{grid-template-columns:minmax(0,1fr);gap:14px}
 #pdf-import .pdf-review-table th,#pdf-import .pdf-review-table td{padding:10px}
}
/* V1.1 teacher-managed student queues */
.queue-list { display: grid; gap: .75rem; }
.queue-entry { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; padding: .75rem 0; border-bottom: 1px solid var(--gold, #c9a84c); }
.queue-entry .actions { margin-left: auto; flex-wrap: wrap; }
#kiosk-queue { list-style: none; padding-left: 0; }
#kiosk-queue li { padding: .35rem 0; }
@media (max-width: 600px) { .queue-entry .actions { margin-left: 0; width: 100%; } }
.queue-entry strong { overflow-wrap: anywhere; min-width: 0; }
