:root{
    --student-purple-950:#1d0b35;
    --student-purple-900:#281044;
    --student-purple-800:#3b1763;
    --student-purple-700:#55228a;
    --student-purple-600:#6d2eaa;
    --student-gold:#f5c518;
    --student-green:#08723a;
    --student-bg:#f5f6fa;
    --student-card:#ffffff;
    --student-text:#172033;
    --student-muted:#667085;
    --student-border:#e3e7ef;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body.student-app{margin:0;background:var(--student-bg);color:var(--student-text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;min-height:100vh;min-height:100dvh;padding-bottom:env(safe-area-inset-bottom)}
button,input,select{font:inherit}
button,a{-webkit-tap-highlight-color:transparent}
.student-app-topbar{position:sticky;top:0;z-index:40;background:linear-gradient(90deg,var(--student-purple-950),var(--student-purple-800));color:#fff;border-bottom:4px solid var(--student-gold);padding-top:env(safe-area-inset-top)}
.student-app-topbar-inner{max-width:1500px;margin:auto;min-height:76px;padding:12px 24px;display:flex;align-items:center;justify-content:space-between;gap:18px}
.student-app-brand{display:flex;align-items:center;gap:13px;min-width:0}
.student-app-brand img{width:50px;height:50px;border-radius:14px;object-fit:cover;background:var(--student-purple-900);border:2px solid var(--student-gold);flex:0 0 auto}
.student-app-brand strong{display:block;font-size:1rem;line-height:1.25}.student-app-brand span{display:block;color:#ded5e8;font-size:.82rem;margin-top:2px}
.student-app-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;justify-content:flex-end}
.student-app-actions a,.student-app-actions button,.student-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;border-radius:10px;padding:9px 12px;text-decoration:none;font-size:.86rem;font-weight:800;cursor:pointer;min-height:40px}
.student-app-actions a{color:#fff;border:1px solid rgba(255,255,255,.24);background:transparent}.student-app-actions a:hover{background:rgba(255,255,255,.1)}
.student-install-button{border:1px solid var(--student-gold);background:var(--student-gold);color:var(--student-purple-900);box-shadow:0 8px 22px rgba(245,197,24,.18)}
.student-install-button.is-installed{background:#e9edf4;border-color:#e9edf4;color:#667085;box-shadow:none;cursor:default}
.student-network-status{display:inline-flex;align-items:center;gap:7px;color:#d9fbe8;font-size:.78rem;font-weight:800}.student-network-status::before{content:"";width:8px;height:8px;border-radius:50%;background:#32d583;box-shadow:0 0 0 4px rgba(50,213,131,.12)}.student-network-status.is-offline{color:#ffd6d6}.student-network-status.is-offline::before{background:#f04438;box-shadow:0 0 0 4px rgba(240,68,56,.13)}
.student-readonly-badge{font-size:.78rem;font-weight:850;color:var(--student-gold);padding:9px 4px;letter-spacing:.04em}
.student-page{max-width:1500px;margin:auto;padding:26px 24px 52px}
.student-card{background:#fff;border:1px solid var(--student-border);border-radius:18px;box-shadow:0 10px 30px rgba(34,15,58,.07)}

/* Login */
body.student-login-page{display:grid;place-items:center;padding:24px;background:linear-gradient(135deg,var(--student-purple-950) 0%,var(--student-purple-800) 55%,#111b55 100%)}
.student-login-shell{width:min(1000px,100%);display:grid;grid-template-columns:1.05fr .95fr;background:#fff;border-radius:26px;overflow:hidden;box-shadow:0 30px 90px rgba(0,0,0,.30)}
.student-login-brand{position:relative;padding:52px;background:radial-gradient(circle at 20% 15%,rgba(245,197,24,.22),transparent 17rem),linear-gradient(160deg,var(--student-purple-900),var(--student-purple-950));color:#fff;display:flex;flex-direction:column;justify-content:center;min-height:640px}
.student-login-brand::after{content:"";position:absolute;inset:auto 0 0;height:7px;background:linear-gradient(90deg,var(--student-gold),#ffd84d,#0b8a47)}
.student-login-brand img{width:118px;height:118px;object-fit:cover;border-radius:28px;background:var(--student-purple-900);border:4px solid var(--student-gold);box-shadow:0 0 0 8px rgba(245,197,24,.12);margin-bottom:28px}
.student-login-brand h1{font-size:clamp(1.8rem,3.5vw,2.65rem);line-height:1.08;margin:0 0 14px}.student-login-brand p{margin:0;color:#ded5e8;font-size:1.05rem;line-height:1.65;max-width:470px}
.student-feature-list{display:grid;gap:12px;margin-top:30px}.student-feature{display:flex;gap:12px;align-items:flex-start;color:#f4eff9}.student-feature span:first-child{color:var(--student-gold);font-size:1.2rem}
.student-login-panel{padding:52px 46px;display:flex;flex-direction:column;justify-content:center;background:#fff}
.student-eyebrow{color:var(--student-purple-600);font-size:.78rem;font-weight:850;letter-spacing:.12em;text-transform:uppercase}.student-login-panel h2{font-size:2rem;color:var(--student-purple-900);margin:10px 0 8px}.student-subtitle{color:var(--student-muted);margin:0 0 26px;line-height:1.6}
.student-notice{padding:12px 14px;border-radius:10px;margin-bottom:18px;font-size:.92rem}.student-notice.error{background:#fef3f2;color:#b42318;border:1px solid #fecdca}.student-notice.success{background:#ecfdf3;color:#08723a;border:1px solid #abefc6}
.student-field{margin-bottom:18px}.student-field label{display:block;font-size:.88rem;font-weight:800;color:#344054;margin:0 0 7px}.student-field input,.student-field select{width:100%;border:1px solid #d0d5dd;border-radius:11px;padding:13px 14px;font-size:1rem;color:var(--student-text);outline:none;background:#fff}.student-field input:focus,.student-field select:focus{border-color:var(--student-purple-600);box-shadow:0 0 0 4px rgba(109,46,170,.13)}
.student-primary-button{width:100%;border:0;border-radius:11px;padding:13px 16px;background:linear-gradient(135deg,var(--student-purple-600),var(--student-purple-800));color:#fff;font-weight:850;font-size:1rem;cursor:pointer;box-shadow:0 10px 24px rgba(85,34,138,.22)}.student-primary-button:hover{filter:brightness(1.05)}
.student-field-note{display:block;margin-top:7px;color:var(--student-muted);font-size:.8rem;line-height:1.4}.student-help{margin-top:18px;padding:13px 14px;border-radius:10px;background:#faf7fe;color:var(--student-purple-700);border:1px solid #e6d8f5;font-size:.88rem;line-height:1.55}
.student-login-install{margin-top:18px;display:grid;gap:9px}.student-login-install .student-install-button{width:100%;padding:13px 16px;border-radius:11px;font-size:.98rem}.student-login-network{display:flex;justify-content:center;margin-top:4px}

/* Portal */
.student-hero{padding:24px;display:flex;justify-content:space-between;gap:24px;align-items:center}.student-profile{display:flex;align-items:center;gap:18px;min-width:0}.student-avatar,.student-avatar-placeholder{width:86px;height:86px;border-radius:18px;border:3px solid var(--student-gold);background:#f1e9fb;flex:0 0 auto}.student-avatar{object-fit:cover}.student-avatar-placeholder{display:grid;place-items:center;font-size:2rem}.student-hero h1{margin:0 0 7px;color:var(--student-purple-900);font-size:clamp(1.45rem,3vw,2.1rem);overflow-wrap:anywhere}.student-meta{display:flex;gap:8px;flex-wrap:wrap;color:var(--student-muted);font-size:.9rem}.student-chip{display:inline-flex;padding:6px 10px;border-radius:999px;background:#faf7fe;color:var(--student-purple-700);border:1px solid #e4d5f4;font-weight:750}
.student-filter-card{min-width:min(470px,100%)}.student-filter-row{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end}.student-filter-row label,.student-dtr-controls label{display:block;font-size:.78rem;font-weight:800;color:#475467;margin-bottom:5px}.student-filter-row input,.student-dtr-controls input,.student-dtr-controls select{width:100%;border:1px solid #d0d5dd;border-radius:9px;padding:9px 10px;background:#fff;min-height:42px}.student-filter-row button{border:0;border-radius:9px;padding:10px 15px;background:var(--student-purple-700);color:#fff;font-weight:850;cursor:pointer;min-height:42px}.student-quick-links{display:flex;gap:10px;margin-top:9px;justify-content:flex-end}.student-quick-links a{font-size:.82rem;color:var(--student-purple-700);font-weight:750;text-decoration:none}
.student-alert{padding:14px 16px;border-radius:12px;background:#fef3f2;color:#b42318;border:1px solid #fecdca;margin-top:18px}
.student-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px;margin:20px 0}.student-metric{background:#fff;border:1px solid var(--student-border);border-radius:14px;padding:17px;border-left:4px solid var(--student-purple-600)}.student-metric-label{font-size:.74rem;color:var(--student-muted);text-transform:uppercase;letter-spacing:.06em;font-weight:850}.student-metric-value{font-size:1.55rem;font-weight:850;color:var(--student-purple-900);margin-top:5px}.student-metric-note{font-size:.77rem;color:var(--student-muted);margin-top:3px}
.student-dtr-panel{margin:20px 0;padding:20px;display:grid;grid-template-columns:1fr auto;gap:20px;align-items:center;border-left:5px solid var(--student-gold)}.student-dtr-panel h2{margin:0 0 6px;color:var(--student-purple-900);font-size:1.15rem}.student-dtr-panel p{margin:0;color:var(--student-muted);font-size:.88rem;line-height:1.55}.student-dtr-controls{display:grid;grid-template-columns:150px 170px auto auto;gap:9px;align-items:end}.student-dtr-action{border:0;border-radius:10px;padding:10px 13px;min-height:42px;color:#fff;font-weight:850;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap}.student-dtr-view{background:var(--student-purple-700)}.student-dtr-download{background:#08723a}
.student-section{background:#fff;border:1px solid var(--student-border);border-radius:16px;box-shadow:0 8px 26px rgba(34,15,58,.055);margin-top:20px;overflow:hidden}.student-section-head{padding:18px 20px;border-bottom:1px solid var(--student-border);display:flex;justify-content:space-between;align-items:center;gap:12px}.student-section-head h2{margin:0;color:var(--student-purple-900);font-size:1.12rem}.student-section-head p{margin:4px 0 0;color:var(--student-muted);font-size:.84rem}.student-count-badge{padding:6px 10px;border-radius:999px;background:#f1e9fb;color:var(--student-purple-700);font-weight:850;font-size:.78rem;white-space:nowrap}.student-table-wrap{overflow:auto}.student-table{width:100%;border-collapse:collapse;min-width:880px}.student-table th{background:#faf7fe;color:var(--student-purple-700);font-size:.76rem;text-transform:uppercase;letter-spacing:.045em;text-align:left;padding:12px 14px;border-bottom:1px solid var(--student-border)}.student-table td{padding:13px 14px;border-bottom:1px solid #edf0f4;font-size:.88rem;vertical-align:middle}.student-table tbody tr:hover{background:#fcfaff}.student-muted{color:var(--student-muted)}.student-empty{padding:34px;text-align:center;color:var(--student-muted)}
.student-type-badge,.student-action-badge,.student-status-badge{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:.75rem;font-weight:850}.type-gate{background:#eaf3ff;color:#1849a9}.type-classroom{background:#ecfdf3;color:#08723a}.type-activity{background:#fff7d6;color:#7a4a00}.action-time_in{background:#ecfdf3;color:#08723a}.action-time_out{background:#f1e9fb;color:var(--student-purple-700)}.action-legacy{background:#f2f4f7;color:#475467}.status-complete{background:#ecfdf3;color:#08723a}.status-late{background:#fff7d6;color:#8a5300}.status-partial{background:#fef0c7;color:#934d00}.status-absent{background:#fef3f2;color:#b42318}.status-upcoming{background:#eaf3ff;color:#1849a9}.student-money{font-variant-numeric:tabular-nums;font-weight:750}.student-balance-due{color:#b42318}.student-balance-zero{color:#08723a}
.student-pagination{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 18px;border-top:1px solid var(--student-border);background:#fcfbfe}.student-pagination-info{font-size:.82rem;color:var(--student-muted)}.student-pagination-links{display:flex;gap:8px}.student-pagination-links a,.student-pagination-links span{display:inline-flex;align-items:center;justify-content:center;min-width:88px;padding:8px 11px;border-radius:9px;border:1px solid #d8c8e9;text-decoration:none;color:var(--student-purple-700);font-size:.82rem;font-weight:850;background:#fff}.student-pagination-links span{opacity:.45;cursor:not-allowed}

/* DTR preview */
body.student-dtr-page{background:#e7e9ef}.student-dtr-toolbar{position:sticky;top:0;z-index:30;background:#fff;border-bottom:1px solid #d9dde7;box-shadow:0 8px 24px rgba(21,17,31,.08);padding:12px max(14px,env(safe-area-inset-left))}.student-dtr-toolbar-inner{max-width:1180px;margin:auto;display:flex;gap:10px;align-items:end;justify-content:center;flex-wrap:wrap}.student-dtr-toolbar .student-field{margin:0;min-width:150px}.student-dtr-toolbar label{display:block;font-size:.76rem;font-weight:850;color:#475467;margin-bottom:4px}.student-dtr-toolbar input,.student-dtr-toolbar select{width:100%;border:1px solid #cfd4dc;border-radius:9px;padding:9px 10px;min-height:40px;background:#fff}.student-toolbar-button{border:0;border-radius:9px;padding:10px 13px;min-height:40px;color:#fff;font-weight:850;text-decoration:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.student-toolbar-load{background:var(--student-purple-700)}.student-toolbar-pdf{background:#08723a}.student-toolbar-print{background:#0e7490}.student-toolbar-back{background:#64748b}
.student-dtr-document{display:flex;justify-content:center;gap:20px;max-width:1120px;margin:20px auto;padding:0 14px}.student-dtr-copy{background:#fff;width:48%;padding:15px 20px;box-shadow:0 0 10px rgba(0,0,0,.18);color:#000;display:flex;flex-direction:column;min-height:277mm;font-family:Arial,sans-serif}.student-dtr-header{text-align:center;margin-bottom:10px}.student-dtr-header .cs-form{font-size:10px;font-style:italic;text-align:left;margin-bottom:5px;font-weight:bold}.student-dtr-header h1{margin:0 0 10px;font-size:18px;line-height:1.2}.student-dtr-scan-type{font-size:11px;font-weight:normal;letter-spacing:1px;color:#333}.student-dtr-name{border-bottom:1px solid #000;width:100%;text-align:center;font-size:14px;font-weight:bold;padding-bottom:2px;margin-bottom:2px}.student-dtr-name-label{text-align:center;font-size:11px;margin-bottom:4px}.student-dtr-id{text-align:center;font-size:10px;font-weight:bold;margin-bottom:8px}.student-dtr-month{font-size:12px;margin-bottom:10px}.student-dtr-month span{border-bottom:1px solid #000;font-weight:bold;padding:0 10px;display:inline-block;min-width:150px;text-align:center}.student-dtr-hours{font-size:11px;margin-bottom:10px;line-height:1.6}.student-dtr-hours .underline{border-bottom:1px solid #000;display:inline-block;width:80px}.student-dtr-table{width:100%;border-collapse:collapse;font-size:11px;text-align:center;flex-grow:1;margin-bottom:10px}.student-dtr-table th,.student-dtr-table td{border:1px solid #000;padding:2px}.student-dtr-table th{font-weight:normal;height:1%}.student-dtr-table tr{height:2.6%}.student-dtr-footer{font-size:11px;line-height:1.4;text-align:justify;margin-top:auto}.student-signature-line{border-bottom:1px solid #000;width:80%;margin:25px auto 5px}.student-signature-label{text-align:center;margin-bottom:10px}.student-verified{font-size:11px}.student-verified-line{border-bottom:1px solid #000;width:80%;margin:15px 0 5px}.student-verified-label{font-style:italic}.student-dtr-summary{max-width:1120px;margin:0 auto 18px;padding:0 14px;color:#475467;font-size:.84rem;text-align:center}

/* Install help */
.student-pwa-help-overlay{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:20px;background:rgba(17,8,31,.72);backdrop-filter:blur(5px)}.student-pwa-help-dialog{width:min(390px,100%);background:#fff;border-radius:20px;padding:26px;text-align:center;box-shadow:0 25px 80px rgba(0,0,0,.32);color:var(--student-text)}.student-pwa-help-dialog img{width:84px;height:84px;border-radius:20px}.student-pwa-help-dialog h2{margin:16px 0 8px;color:var(--student-purple-900);font-size:1.3rem}.student-pwa-help-dialog p{margin:0;color:var(--student-muted);line-height:1.6}.student-pwa-help-dialog button{width:100%;margin-top:20px;border:0;border-radius:11px;padding:12px;background:var(--student-purple-700);color:#fff;font-weight:850;cursor:pointer}

@media(max-width:1200px){.student-metrics{grid-template-columns:repeat(3,1fr)}.student-hero{align-items:flex-start;flex-direction:column}.student-filter-card{width:100%}.student-dtr-panel{grid-template-columns:1fr}.student-dtr-controls{grid-template-columns:1fr 1fr auto auto}}
@media(max-width:820px){
    body.student-login-page{padding:0;background:#fff;display:block}.student-login-shell{display:block;border-radius:0;box-shadow:none;min-height:100vh;min-height:100dvh}.student-login-brand{min-height:auto;padding:30px 22px}.student-login-brand img{width:88px;height:88px;margin-bottom:17px;border-radius:22px}.student-feature-list{display:none}.student-login-panel{padding:32px 22px 40px}
    .student-app-topbar-inner{padding:10px 14px}.student-app-brand span{display:none}.student-readonly-badge{display:none}.student-page{padding:16px 12px 38px}.student-hero{padding:18px}.student-profile{align-items:flex-start}.student-avatar,.student-avatar-placeholder{width:68px;height:68px}.student-filter-row{grid-template-columns:1fr 1fr}.student-filter-row button{grid-column:1/-1}.student-metrics{grid-template-columns:repeat(2,1fr);gap:10px}.student-metric{padding:14px}.student-metric-value{font-size:1.28rem}.student-section-head{padding:15px}.student-app-actions .student-network-status{display:none}.student-dtr-controls{grid-template-columns:1fr 1fr}.student-dtr-action{width:100%}
    .student-table-wrap{overflow:visible}.student-table{min-width:0;display:block}.student-table thead{display:none}.student-table tbody{display:grid;gap:11px;padding:12px;background:#f5f6fa}.student-table tr{display:block;background:#fff;border:1px solid var(--student-border);border-radius:13px;overflow:hidden;box-shadow:0 5px 16px rgba(34,15,58,.045)}.student-table td{display:grid;grid-template-columns:minmax(108px,36%) 1fr;gap:10px;align-items:start;padding:10px 12px;border-bottom:1px solid #edf0f4;text-align:right;overflow-wrap:anywhere}.student-table td::before{content:attr(data-label);text-align:left;color:var(--student-muted);font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;font-weight:850}.student-table td:last-child{border-bottom:0}.student-table td.student-empty{display:block;text-align:center}.student-table td.student-empty::before{display:none}.student-pagination{align-items:stretch;flex-direction:column}.student-pagination-links a,.student-pagination-links span{flex:1}.student-pagination-links{width:100%}
    .student-dtr-document{display:block;margin:14px auto}.student-dtr-copy{width:100%;min-height:auto;padding:15px 14px}.student-dtr-copy:nth-child(2){display:none}.student-dtr-toolbar-inner{display:grid;grid-template-columns:1fr 1fr}.student-dtr-toolbar .student-field{min-width:0}.student-toolbar-button{width:100%}.student-dtr-summary{text-align:left}
}
@media(max-width:520px){.student-app-brand strong{font-size:.9rem}.student-app-brand img{width:44px;height:44px}.student-app-actions{gap:6px}.student-app-actions a,.student-app-actions button{padding:8px 9px;font-size:.78rem}.student-app-actions .student-install-button{font-size:0;width:40px;padding:8px}.student-app-actions .student-install-button::after{content:"Install";font-size:.72rem}.student-filter-row{grid-template-columns:1fr}.student-filter-row button{grid-column:auto}.student-metrics{grid-template-columns:1fr 1fr}.student-dtr-controls{grid-template-columns:1fr}.student-dtr-panel{padding:17px}.student-section-head{align-items:flex-start;flex-direction:column}.student-table td{grid-template-columns:96px 1fr}.student-dtr-toolbar-inner{grid-template-columns:1fr}.student-dtr-toolbar{position:static}}
@media(display-mode:standalone){body.student-app{padding-top:0}.student-app-topbar{padding-top:env(safe-area-inset-top)}.student-login-panel{padding-bottom:max(40px,env(safe-area-inset-bottom))}}
@media print{
    body.student-dtr-page{background:#fff;padding:0;margin:0}.student-dtr-toolbar,.student-dtr-summary{display:none!important}.student-dtr-document{gap:10mm;width:100%;max-width:100%;height:277mm;margin:0;padding:0}.student-dtr-copy,.student-dtr-copy:nth-child(2){display:flex;box-shadow:none;margin:0;padding:0;width:48%;height:100%;min-height:100%}@page{size:A4 portrait;margin:10mm}
}
