:root{font-family:Arial,Helvetica,sans-serif;color:#172b26;background:#f5f6f3;font-synthesis:none;text-rendering:optimizeLegibility;--green:#173d35;--line:#dce6e0;--muted:#718078;--soft:#e8f0eb}
*{box-sizing:border-box}
body{margin:0;min-width:320px}
button,input,select{font:inherit}
button,select{cursor:pointer}
.app-shell{width:min(100%,1600px);margin:0 auto;padding:0 28px 35px}
.topbar{height:70px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:12px;color:#102b25;text-decoration:none;font-size:16px;font-weight:700}
.brand img{width:42px;height:42px;object-fit:contain}
.userbox{display:flex;align-items:center;gap:22px;color:#31594a;font-size:14px}
.logout{display:flex;align-items:center;gap:7px;padding:8px 0;background:transparent;border:0;color:#31594a}
.logout span{font-size:19px}
.page-heading{padding:23px 0 17px}
h1{margin:0;color:#102c25;font-size:30px;line-height:1.2;letter-spacing:-1.2px}
.toolbar{display:flex;align-items:flex-end;gap:12px;padding:15px 16px;background:#fff;border:1px solid var(--line);border-radius:15px}
.search{height:44px;display:flex;align-items:center;gap:9px;flex:1 1 400px;min-width:220px;padding:0 12px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#718078}
.search-icon{font-size:22px;line-height:1;transform:rotate(-20deg)}
.search input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:#172b26;font-size:14px;cursor:text}
.search:focus-within,.control select:focus-visible,.detail-dialog input:focus-visible,.detail-dialog select:focus-visible{outline:2px solid #528b75;outline-offset:2px}
.control{display:grid;gap:5px;flex:0 0 190px;color:#527061;font-size:13px;font-weight:600}
.filter-dropdown{position:relative;min-width:0}
.filter-trigger{width:100%;height:44px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 12px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#17332b;text-align:left;font-size:14px;font-weight:500;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}
.filter-trigger:hover{border-color:#a8beb2;background:#fbfdfb}
.filter-trigger:focus-visible{outline:2px solid #528b75;outline-offset:2px}
.filter-trigger>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.filter-trigger svg{flex:0 0 16px;width:16px;height:16px;fill:none;stroke:#35594b;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .18s ease}
.filter-dropdown.is-open .filter-trigger{border-color:#8eac9c;box-shadow:0 0 0 2px #528b7520}
.filter-dropdown.is-open .filter-trigger svg{transform:rotate(180deg)}
.filter-options{position:absolute;top:calc(100% + 6px);left:0;z-index:30;width:100%;max-height:min(280px,45vh);overflow-y:auto;padding:5px;border:1px solid #dce6e0;border-radius:10px;background:#fff;box-shadow:0 12px 28px #173d3518}
.filter-dropdown.opens-up .filter-options{top:auto;bottom:calc(100% + 6px)}
.filter-options button{width:100%;min-height:38px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;border:0;border-radius:7px;background:transparent;color:#28463a;text-align:left;font-size:13px;cursor:pointer;transition:background-color .12s ease,color .12s ease}
.filter-options button:hover{background:#f0f5f2}
.filter-options button[aria-selected="true"]{background:#eaf2ed;color:#173d35;font-weight:700}
.filter-options button[aria-selected="true"]::after{content:"✓";color:#2f6a4c;font-weight:700}
.filter-options button:focus-visible{outline:2px solid #528b75;outline-offset:-2px;background:#f0f5f2}
.semester{flex-basis:160px}
.table-card{margin-top:16px;overflow:hidden;background:#fff;border:1px solid #cbd9d1;border-radius:14px}
.table-scroll{max-width:100%;overflow:auto;overscroll-behavior-inline:contain}
.table-scroll:focus-visible{outline:2px solid #528b75;outline-offset:-2px}
table{width:100%;min-width:1280px;border-collapse:separate;border-spacing:0;text-align:center;font-size:13px}
th,td{padding:11px 12px;border-right:1px solid #e2e9e4;border-bottom:1px solid #dce5df;vertical-align:middle;text-align:center}
thead th{height:42px;background:var(--soft);color:#415f51;font-size:12px;font-weight:700;white-space:nowrap}
thead .month-head{text-align:center;border-left:1px solid #d2ded7}
thead .subhead th{height:40px;background:var(--soft);color:#5e7669;font-size:12px;font-weight:600;border-bottom-color:#d2ded7}
thead .subhead th:nth-child(even){border-right-color:#cbd9d1}
tbody td{height:56px;color:#172b26;text-align:center}
tbody td:nth-child(5),tbody td:nth-child(7),tbody td:nth-child(9),tbody td:nth-child(11),tbody td:nth-child(13){border-right-color:#cbd9d1}
thead th:last-child,tbody td:last-child{border-right:0}
tbody tr:nth-child(even) td{background:#fafbf9}
.student-head{width:210px;min-width:210px;text-align:center}
.class-head{min-width:115px}.level-head{min-width:118px}
thead th:first-child,tbody td:first-child{position:sticky;left:0;z-index:2;background:#fff}
thead th:first-child{z-index:4;background:var(--soft)}
tbody tr:hover td{background:#fafcfb}
tbody tr.selected td{background:#edf5f0}
tbody tr.selected td:first-child{background:#edf5f0}
tbody tr.selected:hover td{background:#e7f1eb}
.student strong{display:block;color:#18342c;font-size:13px}
.student{text-align:left}
.student small{display:block;margin-top:3px;color:#7d8c84;font-size:12px}
.cell-open{width:100%;min-height:36px;padding:5px 7px;border:0;border-radius:7px;background:transparent;color:#254b3b;font-size:13px;text-align:center;overflow-wrap:anywhere}
.cell-open:hover{background:#e9f2ec}
.cell-open:focus-visible{outline:2px solid #528b75;outline-offset:1px}
.cell-open.deposit{max-width:190px;font-size:12px;line-height:1.35}
.level{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap}
.level-a{color:#695600;background:#fff1bd}.level-i{color:#8b4212;background:#ffead8}.level-t{color:#454f67;background:#e8edf8}.level-b{color:#5b4771;background:#f0eafa}.level-c{color:#385c67;background:#e4f1f3}.level-d{color:#66533e;background:#f2ebe1}.level-idadiyah{color:#515b4a;background:#ecefe5}
.table-footer{display:flex;justify-content:space-between;gap:12px;padding:10px 13px;border-top:1px solid #dce5df;color:#718078;font-size:12px}
.table-pagination{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.table-pagination label{white-space:nowrap}.table-pagination select{height:34px;padding:0 28px 0 9px;border:1px solid var(--line);border-radius:8px;background:#fff;color:#31594a;font-size:12px}.table-pagination nav{display:flex;align-items:center;gap:4px}.table-pagination .page-number,.table-pagination .page-arrow{min-width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;padding:0 8px;border:1px solid #dce6e0;border-radius:9px;background:#fff;color:#315d50;font:inherit;font-weight:700;cursor:pointer}.table-pagination .page-number.is-active{border-color:#173d35;background:#173d35;color:#fff}.table-pagination button:disabled{opacity:.45;cursor:not-allowed}.table-pagination button:focus-visible,.table-pagination select:focus-visible{outline:2px solid #528b75;outline-offset:2px}
.empty-results{padding:24px;text-align:center;color:#718078;font-size:13px}
.mobile-student-cards{display:none}
.mobile-empty-results{margin:0;padding:18px 12px;color:#718078;text-align:center;font-size:13px}
.detail-dialog{position:fixed;inset:0 24px 0 auto;margin:auto 0 auto auto;width:min(560px,calc(100vw - 48px));height:min(92dvh,920px);max-height:calc(100dvh - 32px);padding:0;overflow:auto;border:1px solid var(--line);border-radius:16px;background:#fff;color:#172b26;box-shadow:0 18px 55px #10251f2a}
.detail-dialog::backdrop{background:#10251f80}
.detail-header{position:sticky;top:0;z-index:2;display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:19px 21px 14px;background:#fff;border-bottom:1px solid #edf1ee}
.detail-header h2{margin:0;color:#173d35;font-size:19px;letter-spacing:-.4px}
.detail-header p{margin:5px 0 0;color:#718078;font-size:13px;line-height:1.4}
.close-button{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border:0;border-radius:9px;background:#edf3ef;color:#355b49;font-size:24px;line-height:1}
.close-button:focus-visible,.button:focus-visible{outline:2px solid #528b75;outline-offset:2px}
.detail-dialog:focus{outline:none}
.detail-section{padding:15px 21px;border-bottom:1px solid #edf1ee}
.detail-section:last-child{border-bottom:0}
.detail-actions{display:flex;justify-content:flex-end;gap:8px;padding:12px 21px 16px}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.section-heading h3{margin:0;color:#25463a;font-size:15px}
.section-heading p{margin:4px 0 0;color:#718078;font-size:12px;line-height:1.4}
.average{display:grid;justify-items:center;gap:2px;min-width:80px;padding:6px 9px;border-radius:9px;background:#edf5ef;color:#315e43}
.average strong{font-size:19px}.average small{font-size:12px}
.compact-form{display:grid;gap:10px;margin-top:12px}
.field{display:grid;gap:5px;min-width:0;color:#526e61;font-size:12px;font-weight:600}
.field input,.field select{width:100%;height:40px;min-width:0;padding:0 11px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#18342c;font-size:13px}
.field em{color:#87958d;font-style:normal;font-weight:400}
.form-actions{display:flex;justify-content:flex-end;gap:8px}
.button{height:38px;display:inline-flex;align-items:center;justify-content:center;padding:0 14px;border:0;border-radius:9px;font-size:13px;font-weight:700}
.secondary{background:#edf3ef;color:#355b49}.primary{background:var(--green);color:#fff}
.current-deposit{margin:0 0 12px;padding:10px;border-radius:10px;background:#f3f7f4;color:#31594a;font-size:13px;line-height:1.45}
.criteria-empty{margin:0;padding:10px;border:1px solid #e8ece4;border-radius:9px;background:#f7f8f4;color:#5d6656;font-size:12px;line-height:1.5}
.input-mode{display:flex;flex-wrap:wrap;gap:9px;margin:0;padding:0;border:0}
.input-mode legend{width:100%;margin-bottom:2px;color:#526e61;font-size:12px;font-weight:600}
.input-mode label{display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:6px 10px;border:1px solid var(--line);border-radius:8px;color:#526e61;font-size:12px;cursor:pointer}
.input-mode input{accent-color:#245b47}
[hidden]{display:none!important}
button:disabled{cursor:not-allowed;opacity:.6}
@media(min-width:1280px){.table-scroll{overflow-x:hidden}table{width:100%;min-width:0;table-layout:fixed}.student-head{width:165px;min-width:165px}.class-head{width:100px;min-width:100px}.level-head{width:108px;min-width:108px}thead .subhead th{padding-inline:6px;white-space:normal;line-height:1.25}tbody td{padding-inline:6px}.cell-open.deposit{max-width:none;padding-inline:3px;overflow-wrap:anywhere;font-size:12px}}
@media(max-width:900px){.app-shell{padding-inline:18px}.toolbar{flex-wrap:wrap}.search{flex:1 1 100%}.control{flex:1 1 160px}.table-footer{align-items:flex-start;flex-direction:column;gap:4px}}
@media(max-width:600px){.app-shell{padding:0 12px 24px}.topbar{height:60px;gap:8px}.brand{flex:1;min-width:0;gap:8px;font-size:12px}.brand img{width:34px;height:34px}.brand span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.userbox{flex:0 0 auto;gap:8px;font-size:11px}.logout{gap:4px;font-size:11px}.page-heading{padding:18px 0 13px}h1{max-width:330px;font-size:23px}.toolbar{align-items:stretch;flex-wrap:wrap;gap:8px;padding:11px}.search{flex:1 1 100%;min-width:0;height:42px}.control{flex:1 1 calc(50% - 4px);min-width:0;font-size:12px}.filter-trigger{height:42px;padding-inline:10px;font-size:13px}.table-card{margin-top:12px;border-radius:12px}.table-scroll{display:none}.mobile-student-cards{display:grid;gap:10px;padding:10px;background:#f5f6f3}.student-card{overflow:hidden;border:1px solid #dce5df;border-radius:11px;background:#fff}.student-card.selected{border-color:#9bb9a8;box-shadow:0 0 0 2px #528b751c}.student-card-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 12px;background:#fff;border-bottom:1px solid #e2e9e4}.student-card-header strong{display:block;color:#18342c;font-size:14px}.student-card-header small{display:block;margin-top:3px;color:#718078;font-size:12px}.student-card-header .level{font-size:11px;padding:5px 8px}.student-card-class{display:flex;align-items:center;gap:7px;padding:8px 12px;border-bottom:1px solid #e8eee9;color:#718078;font-size:12px}.student-card-class strong{color:#314d41;font-size:12px}.student-month-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:9px}.student-month-card{min-width:0;overflow:hidden;border:1px solid #e1e8e3;border-radius:9px;background:#fff}.student-month-card h3{margin:0;padding:7px 8px;background:#e8f0eb;color:#415f51;font-size:12px;text-align:center}.student-month-fields{display:grid;grid-template-columns:.8fr 1.2fr;gap:4px;padding:7px 5px}.student-month-field{min-width:0;text-align:center}.student-month-field>span{display:block;min-height:28px;color:#718078;font-size:11px;line-height:1.25}.student-month-field .cell-open{min-height:34px;padding:4px 3px;font-size:13px}.student-month-field .cell-open.deposit{max-width:none;font-size:11px;line-height:1.3}.mobile-empty-results{background:#fff;font-size:12px}.table-footer{align-items:flex-start;flex-direction:column;padding:9px 11px;font-size:11px}.table-pagination{width:100%;justify-content:space-between;gap:6px}.table-pagination nav{gap:3px}.table-pagination .page-number,.table-pagination .page-arrow{min-width:32px;height:32px;padding:0 7px}.detail-dialog{inset:auto 0 0;margin:0;width:100%;height:min(92dvh,860px);max-height:92dvh;padding:0;border:0;border-radius:16px 16px 0 0}.detail-header{padding:16px}.detail-header h2{font-size:17px}.detail-section{padding:14px 16px}.section-heading h3{font-size:14px}.attempt-row{font-size:12px}}
@media(max-width:390px){.userbox>span{display:none}.logout{font-size:0}.logout span{font-size:18px}.student-month-grid{grid-template-columns:1fr}.student-month-fields{grid-template-columns:.8fr 1.2fr}.student-card-header .level{font-size:10px}}
@media(max-width:600px){.student-month-details{border-top:1px solid #e8eee9}.student-month-details>summary{min-height:40px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 12px;color:#31594a;font-size:12px;font-weight:700;cursor:pointer;list-style:none}.student-month-details>summary::-webkit-details-marker{display:none}.student-month-details>summary::after{content:"";width:8px;height:8px;flex:0 0 8px;border-right:1.5px solid #527061;border-bottom:1.5px solid #527061;transform:rotate(45deg) translateY(-2px);transition:transform .16s ease}.student-month-details[open]>summary::after{transform:rotate(225deg) translate(-1px,-1px)}.student-month-details>summary:focus-visible{outline:2px solid #528b75;outline-offset:-2px;border-radius:6px}.student-month-count{margin-left:auto;color:#718078;font-size:11px;font-weight:500}.student-month-details .student-month-grid{padding-top:8px}}
@media(max-width:600px){.detail-dialog{left:50%;right:auto;bottom:0;inset:auto auto 0 50%;width:calc(100% - 24px);max-width:560px;margin:0;transform:translateX(-50%);border-radius:16px 16px 0 0}}
.form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
@media(max-width:600px){.detail-dialog{height:auto;max-height:90dvh;overflow-y:auto}.detail-header{padding:13px 15px 11px}.detail-section{padding:11px 14px}.section-heading{margin-bottom:7px}.compact-form{gap:8px;margin-top:8px}.field{gap:4px}.field input,.field select{height:38px}.input-mode{gap:6px}.input-mode label{min-height:32px;padding:5px 8px}.form-row{gap:7px}.detail-actions{padding:10px 14px 14px}}
@media(max-width:600px){.detail-dialog{top:50%;right:auto;bottom:auto;left:50%;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:calc(100% - 24px);height:auto;max-height:90dvh;margin:0;overflow-y:auto;border-radius:16px}}
.auth-screen .app-shell{width:100%;max-width:none;min-height:100dvh;padding:0}.auth-screen .topbar{display:none}.login-gate{min-height:100dvh;display:grid;place-items:center;padding:24px 16px;background:radial-gradient(circle at top,#e2eee8,#f5f7f5 55%)}.login-card{width:min(100%,430px);display:grid;gap:14px;padding:34px;border:1px solid #e2eae5;border-radius:24px;background:#fff;box-shadow:0 18px 60px #173d3512}.login-logo{width:42px;height:42px;object-fit:contain;margin-bottom:1px}.login-card .eyebrow{margin:0;color:#668276;font-size:10px;font-weight:800;letter-spacing:1.6px}.login-card h1{margin:0;font-size:30px;line-height:1.25;letter-spacing:-1.1px}.login-description{margin:-4px 0 0;color:var(--muted);font-size:14px;line-height:1.5}.login-card .field{gap:7px;color:#172b26;font-size:13px;font-weight:700}.login-card .field input{height:44px;padding:0 12px;border:1px solid var(--line);border-radius:11px;background:#fff;color:#172b26;font-size:13px}.login-card .field input:focus{border-color:#528b75;outline:0;box-shadow:0 0 0 3px #528b7518}.login-card .login-submit{width:100%;height:46px;margin:2px 0 0;border-radius:11px;font-size:14px}.login-footnote{color:var(--muted);font-size:12px}
@media(max-width:600px){.login-gate{min-height:100dvh;padding:20px 16px}.login-card{width:min(100%,360px);gap:13px;padding:30px 28px;border-radius:24px}.login-logo{width:40px;height:40px}.login-card h1{font-size:28px;line-height:1.3;letter-spacing:-1px}.login-description{font-size:14px}.login-card .field input{height:44px}.login-card .login-submit{height:46px}}
.auth-pending .app-shell{width:100%;max-width:none;min-height:100dvh;padding:0}.auth-pending .topbar{display:none}.auth-pending .auth-loading{min-height:100dvh;display:grid;place-items:center;padding:24px 16px;background:radial-gradient(circle at top,#e2eee8,#f5f7f5 55%)}.auth-loading-card{justify-items:start}.loading-spinner{width:24px;height:24px;border:3px solid #dce8e1;border-top-color:#315f4b;border-radius:50%;animation:loading-spin .8s linear infinite}@keyframes loading-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.loading-spinner{animation-duration:2s}}
.login-card .install-app-button{width:100%;height:42px;border:1px solid var(--line);cursor:pointer}.login-card .install-help{color:var(--muted);font-size:11px;line-height:1.45}
.login-gate{min-height:calc(100dvh - 70px);display:grid;place-items:center;padding:28px 16px}.login-card{width:min(100%,420px);display:grid;gap:14px;padding:26px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:0 16px 42px #173d3514}.login-card h1{font-size:26px}.eyebrow{margin:0 0 6px;color:#70877b;font-size:11px;font-weight:700;letter-spacing:1.7px}.login-description{margin:-7px 0 4px;color:var(--muted);font-size:14px}.login-message,.app-status{margin:0;padding:10px 12px;border:1px solid #d8e5dd;border-radius:9px;background:#edf5f0;color:#31594a;font-size:13px;line-height:1.45}.login-message:not([hidden]),.app-status:not([hidden]){display:block}.login-message.is-error,.app-status.is-error{border-color:#f1d2cc;background:#fff1ee;color:#9c3f32}.login-submit{width:100%;height:42px}.year-select-row{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:6px}.add-period-button{width:44px;height:44px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--green);font-size:22px;cursor:pointer}.add-period-button:hover,.sync-roster-button:hover{border-color:#a8beb2;background:#f5f8f6}.sync-roster-button{height:44px;align-self:end;padding:0 13px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#31594a;font-size:13px;font-weight:600;white-space:nowrap;cursor:pointer}.sync-roster-button:disabled{cursor:not-allowed;opacity:.65}.period-dialog{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(440px,calc(100vw - 32px));max-height:90dvh;margin:0;padding:0;overflow:auto;border:1px solid var(--line);border-radius:16px;background:#fff;color:#172b26;box-shadow:0 18px 55px #10251f2a}.period-dialog::backdrop{background:#10251f80}.period-form{display:grid;gap:12px;padding:20px}.period-dialog-header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:2px}.period-dialog-header h2{margin:0;color:#173d35;font-size:20px}.period-month-names{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.period-month-names:empty{display:none}.period-dialog .detail-actions{padding:4px 0 0}.toolbar-admin-actions{display:flex;gap:8px;align-items:flex-end}
@media(max-width:600px){.login-gate{min-height:calc(100dvh - 60px);padding:18px 6px}.login-card{padding:20px 17px}.login-card h1{font-size:23px}.year-select-row{grid-template-columns:minmax(0,1fr) 42px}.add-period-button{width:42px;height:42px}.sync-roster-button{flex:1 1 100%;height:42px}.period-dialog{width:calc(100vw - 24px);max-height:90dvh}.period-form{gap:10px;padding:16px}.period-dialog-header h2{font-size:18px}.period-month-names{grid-template-columns:1fr 1fr}}
