:root{font-family:Cairo,Tahoma,Arial,sans-serif;color:#172d38;background:#f2f5f7}body{margin:0}header{background:#123f46;color:white;padding:24px 6%}h1{margin:0;font-size:28px}main{max-width:1150px;margin:24px auto;padding:0 20px}section,.card{background:white;border:1px solid #dbe5e8;border-radius:14px;padding:22px;margin:15px 0}button{cursor:pointer;background:#116b69;color:white;border:0;border-radius:8px;padding:12px 18px;margin:5px;font:inherit}button.secondary{background:#e7eff0;color:#123f46}input,select,textarea{font:inherit;box-sizing:border-box;padding:10px;border:1px solid #bacbd0;border-radius:7px;width:100%;margin:7px 0 14px}label{display:block}textarea{min-height:160px}table{border-collapse:collapse;width:100%;background:white}td,th{border:1px solid #d4dfe2;padding:12px;text-align:right}th{background:#edf3f4}.days{border:2px solid #c62c37;border-radius:10px;padding:6px;display:flex;flex-wrap:wrap}.selected{background:#ba2530}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px}.muted{color:#60757d}#message{position:fixed;bottom:16px;right:16px;background:#243f47;color:white;padding:12px;border-radius:8px;display:none}.badge{background:#edf3f4;padding:6px;border-radius:5px}.auth{max-width:440px;margin:auto}small{display:block;color:#60757d}footer{text-align:center;margin:24px}.hideNames .teacher-name{visibility:hidden}.print-only{display:none}@media print{header,.no-print,#message{display:none!important}main{margin:0;padding:0;max-width:none}section{border:0;padding:0}.print-only{display:block}table{font-size:12px}tr{break-inside:avoid}footer{display:block}.card{border:0}body{background:white}}
.preferences{display:flex;gap:18px;flex-wrap:wrap;justify-content:space-between}.preferences label{min-width:180px;flex:1;max-width:360px}.table-wrap{overflow:auto;max-width:100%}.calendar-notice{color:#a42332}.holiday-row{background:#fff0df}.exam-row{background:#fbe6eb}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #ce9030;outline-offset:2px}main,section{min-width:0}#tracking{overflow:auto}.days button{flex:1;min-width:110px}td{overflow-wrap:anywhere}
.remember{display:flex;align-items:center;gap:8px;margin:16px 0}.remember input{width:auto;margin:0}.preferences>button{align-self:center}#feedback{padding:16px}
:root[data-theme=night]{color:#e8eff3;background:#101d25;color-scheme:dark}:root[data-theme=night] header{background:#142f37}:root[data-theme=night] section,:root[data-theme=night] .card,:root[data-theme=night] table{background:#1c2d36;border-color:#415560}:root[data-theme=night] th,:root[data-theme=night] .badge{background:#28404b}:root[data-theme=night] .muted,:root[data-theme=night] small{color:#b4c8d1}:root[data-theme=night] input,:root[data-theme=night] select,:root[data-theme=night] textarea{background:#14252d;color:#edf5f8;border-color:#526976}:root[data-theme=night] .holiday-row{background:#493829}:root[data-theme=night] .exam-row{background:#432b35}:root[data-theme=night] .calendar-notice{color:#ffadb4}
:root[data-theme=national]{color:#123b2b;background:#edf5ef}:root[data-theme=national] header{background:#006c35;border-bottom:5px solid #cda85d}:root[data-theme=national] button{background:#006c35}:root[data-theme=national] .selected{background:#ba2530}:root[data-theme=national] th{background:#dceee0}:root[data-theme=national] section{border-color:#bad9c1}
@media(max-width:760px){header{padding:20px}h1{font-size:25px}main{padding:0 12px;margin:16px auto}section,.card{padding:16px;border-radius:10px}.grid{grid-template-columns:1fr 1fr;gap:6px}button{padding:12px;min-height:44px}.preferences{gap:6px}.preferences label{min-width:140px}.days button{min-width:90px}td,th{padding:8px}.auth{max-width:100%}.table-wrap table,#tracking table{min-width:600px}}
@media(max-width:420px){.grid{grid-template-columns:1fr}header p{font-size:13px}.preferences label{max-width:none}.days button{min-width:80px;font-size:13px}}
@media print{:root[data-theme=night],:root[data-theme=national]{color:#000;background:#fff;color-scheme:light}:root[data-theme=night] section,:root[data-theme=night] table,:root[data-theme=night] th{background:#fff;color:#000}.preferences{display:none!important}.table-wrap,#tracking{overflow:visible}.table-wrap table,#tracking table{min-width:0}.holiday-row,.exam-row{color:#000}.days{display:none}}

.subject-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px}.subject-card{display:flex;flex-direction:column;align-items:flex-start;gap:7px;text-align:right;padding:20px;border:1px solid #247f78;border-radius:16px;box-shadow:0 4px 12px #123f4612;margin:0}.subject-card strong{font-size:21px}.subject-card small{color:#e6f5ee}.subject-symbol{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#ffffff24}.teacher-timetable{min-width:780px;table-layout:fixed}.teacher-timetable caption{padding:10px;color:#60757d;text-align:right}.teacher-timetable td{padding:4px;text-align:center;height:76px}.teacher-timetable button{width:100%;margin:0;padding:8px 4px;border-radius:7px;font-size:13px}.teacher-timetable button small{color:#e6f5ee}.teacher-timetable th{text-align:center;font-size:13px}.teacher-overview h3{margin-top:24px}.subject-card:hover,.teacher-timetable button:hover{filter:brightness(1.1)}

.holiday-lock{padding:18px;background:#fff0df;border:1px solid #b88c4b;border-radius:10px;color:#744c10;margin:14px 0;font-weight:bold}

/* Consistent material cards across screen sizes and themes. */
.subject-cards{grid-template-columns:repeat(auto-fill,minmax(min(100%,230px),1fr));gap:18px;align-items:stretch}
.subject-cards .subject-card{box-sizing:border-box;width:100%;height:218px;min-width:0;display:grid;grid-template-rows:34px 1fr auto auto;align-content:start;align-items:center;gap:9px;padding:20px;margin:0;text-align:right;border:2px solid #c9a650;border-radius:18px;background:linear-gradient(145deg,#0c6558,#073f43);color:#fffdf4;box-shadow:0 7px 18px #123f4625,inset 0 1px 0 #fff8da30;transition:transform .18s ease,box-shadow .18s ease}
.subject-cards .subject-card strong{font-size:19px;line-height:1.45;overflow-wrap:anywhere;font-weight:700}
.subject-cards .subject-card>span:not(.subject-symbol){font-size:15px;line-height:1.4;color:#fff2c9}
.subject-cards .subject-card small{font-size:12px;line-height:1.5;color:#d7e9e5;margin:0}
.subject-cards .subject-symbol{width:32px;height:32px;background:#f4d58e1f;border:1px solid #e8c877;color:#f4d58e}
.subject-cards .subject-card:not(:has(.subject-symbol)){grid-template-rows:1fr auto auto;padding-top:25px}
.subject-cards .subject-card:hover{filter:none;transform:translateY(-3px);box-shadow:0 11px 24px #123f4635,inset 0 1px 0 #fff8da30}
.subject-cards .subject-card:focus-visible{outline:3px solid #a52b38;outline-offset:4px}
:root[data-theme=night] .subject-cards .subject-card{background:linear-gradient(145deg,#143d40,#10282f);border-color:#dbb963;box-shadow:0 7px 20px #0005}
:root[data-theme=national] .subject-cards .subject-card{background:linear-gradient(145deg,#087747,#034b35);border-color:#d8b45c}
@media(max-width:560px){.subject-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.subject-cards .subject-card{height:218px;padding:14px}.subject-cards .subject-card strong{font-size:17px}.subject-cards .subject-card>span:not(.subject-symbol){font-size:14px}}
@media(max-width:340px){.subject-cards{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.subject-cards .subject-card{transition:none}.subject-cards .subject-card:hover{transform:none}}

.preparation-preview{border:2px solid #c9a650;border-radius:16px;box-shadow:0 6px 18px #123f4615}.preparation-actions{display:flex;flex-wrap:wrap;gap:6px}button:disabled{cursor:not-allowed;opacity:.55}.preparation-preview input,.preparation-preview select{min-height:44px}

.school-actions{display:flex;flex-wrap:wrap;gap:8px;min-width:260px}.school-actions .school-action{display:inline-flex;align-items:center;justify-content:center;gap:7px;box-sizing:border-box;min-width:94px;height:42px;margin:0;padding:8px 12px;border:1px solid #c9a650;border-radius:10px;background:#f7fbfc;color:#0c4352;text-decoration:none;font-size:13px;box-shadow:0 3px 8px #10355112}.school-action>span{font-size:20px;line-height:1}.school-actions .danger{background:#fff1ef;color:#ad3030;border-color:#e8b5ae}.school-actions .restore-school{background:#eaf7ef;color:#137444}.school-action:hover{box-shadow:0 5px 12px #10355125}.archive-label{padding:10px;color:#7a663a;background:#fff6dc;border-radius:10px}.school-editor{max-width:650px;margin:auto}

/* National interface palette: ivory surfaces, evergreen actions, gold accents. */
@media screen {
:root[data-theme=national]{color:#163e35;background:#eef5f1}
:root[data-theme=national] body{background:linear-gradient(135deg,#e5f1ec,#f6f7ee);color:#163e35}
:root[data-theme=national] button{background:#08634e;color:#fff;border:1px solid #08634e;box-shadow:0 3px 9px #123e3510}
:root[data-theme=national] button:hover{background:#074c3d;border-color:#b49245}
:root[data-theme=national] button:disabled{background:#e5ece8;color:#586c63;border-color:#c7d5cc;box-shadow:none;cursor:not-allowed}
:root[data-theme=national] .grid>button,:root[data-theme=national] .school-action,:root[data-theme=national] button.secondary{background:#fffdf7;color:#174f41;border:1px solid #bea15b;box-shadow:0 4px 12px #103e3510}
:root[data-theme=national] .grid>button:hover,:root[data-theme=national] .school-action:hover{background:#f3ecd9;color:#123e33}
:root[data-theme=national] .school-action.danger{background:#fff7f5;color:#9d3830;border-color:#d5a098}
:root[data-theme=national] button svg{color:inherit}
:root[data-theme=national] .teacher-hero,:root[data-theme=national] .leadership-header{background:linear-gradient(110deg,#064738,#0b6b53);color:#fff;border:1px solid #c3a359}
:root[data-theme=national] .teacher-steps b{color:#755c21}
:root[data-theme=national] .teacher-help,:root[data-theme=national] .muted{color:#536d62}
:root[data-theme=national] .reference-cards>button{background:linear-gradient(#fffefb,#f4f8f5)!important;color:#173f35;border-color:#c3a359}
:root[data-theme=national] .reference-cards>button>span{color:#536d62}
:root[data-theme=national] .reference-cards b{background:#075c48;color:#fff}
:root[data-theme=national] .reference-cards small{background:#edf1e7;color:#435c50}
:root[data-theme=national] .schedule-notice{color:#18523e;background:#edf6f0;border-color:#a7c8b4}
:root[data-theme=national] .admin-stats strong{color:#175342}
:root[data-theme=national] .selected{background:#785e23;color:white;border-color:#bd9b4d}
:root[data-theme=national] button:focus-visible{outline:3px solid #b58b2d;outline-offset:3px}
}
