﻿/* SchoolLAI V165. Scope: existing manager/student UI. No financial data, no forms deleted. */
:root {
 --sk165-primary:#3156d9;--sk165-secondary:#0ea5a8;--sk165-accent:#f59e0b;
 --sk165-background:#f5f7fb;--sk165-surface:#fff;--sk165-text:#172033;--sk165-muted:#64748b;--sk165-radius:18px;
}
/* Last-loaded appearance bridge: server resolved tokens override legacy hardcoded color rules. */
html:not([data-theme="dark"]) body.skyglass-v158[data-sk165-theme="1"],
html:not([data-theme="dark"]) body.skyglass-v158-login[data-sk165-theme="1"] {
 background:linear-gradient(145deg,color-mix(in srgb,var(--sk165-background) 93%,white),var(--sk165-background))!important;
 color:var(--sk165-text)!important;
}
html:not([data-theme="dark"]) body.skyglass-v158[data-sk165-theme="1"] aside.nd-sidebar-layout {
 background:linear-gradient(156deg,var(--sk165-surface),color-mix(in srgb,var(--sk165-background) 64%,white))!important;
 border-color:color-mix(in srgb,var(--sk165-primary) 20%,white)!important;
}
html:not([data-theme="dark"]) body.skyglass-v158[data-sk165-theme="1"] aside.nd-sidebar-layout :is(.nd-group-title,.nd-school-name) {
 color:var(--sk165-text)!important;
}
html:not([data-theme="dark"]) body.skyglass-v158[data-sk165-theme="1"] aside.nd-sidebar-layout .nd-menu-group>.nd-group-title {
 background:linear-gradient(100deg,color-mix(in srgb,var(--sk165-primary) 13%,white),var(--sk165-surface))!important;
 border-right-color:var(--sk165-primary)!important;
}
html:not([data-theme="dark"]) body.skyglass-v158[data-sk165-theme="1"] :is(.nd-admin-dashboard,.nd-panel-shell) :is(h1,h2,h3),
html:not([data-theme="dark"]) body.skyglass-v158[data-sk165-theme="1"] [class*="school-module__"][class$="__hero"] h1 {
 color:var(--sk165-text)!important;
}
html:not([data-theme="dark"]) body.skyglass-v158[data-sk165-theme="1"] [class*="school-module__"][class$="__page"]{
 --school-blue:var(--sk165-primary)!important;--school-text:var(--sk165-text)!important;
 --school-muted:var(--sk165-muted)!important;--school-paper:var(--sk165-surface)!important;
}
html:not([data-theme="dark"]) body.skyglass-v158[data-sk165-theme="1"] [class*="school-module__"][class$="__hero"] {
 background:linear-gradient(116deg,color-mix(in srgb,var(--sk165-secondary) 13%,white),
 color-mix(in srgb,var(--sk165-primary) 16%,white),var(--sk165-surface))!important;
 border-color:color-mix(in srgb,var(--sk165-primary) 20%,white)!important;
}
html:not([data-theme="dark"]) body.skyglass-v158[data-sk165-theme="1"] [class*="school-module__"][class$="__tabActive"]{
 background:color-mix(in srgb,var(--sk165-primary) 16%,white)!important;color:var(--sk165-primary)!important;
}
html:not([data-theme="dark"]) body.skyglass-v158[data-sk165-theme="1"] :is([class*="school-module__"][class$="__panel"],
[class*="school-module__"][class$="__heroLink"],.nd-panel-shell,.sf150){
 border-color:color-mix(in srgb,var(--sk165-primary) 17%,white)!important;
 border-radius:var(--sk165-radius)!important;
}
html:not([data-theme="dark"]) body.skyglass-v158[data-sk165-theme="1"] :is(.sf150-head h2,.nd-group-title) {
 color:var(--sk165-text)!important;
}
html:not([data-theme="dark"]) body.skyglass-v158[data-sk165-theme="1"] :is(.sk165-save,[class*="school-module__"][class$="__primary"]){
 background:var(--sk165-primary)!important;color:#fff!important;
}
html:not([data-theme="dark"]) body[data-sk165-theme="1"] [class*="student-v62-module__"][class$="__root"]{
 --ink:var(--sk165-text);--muted:var(--sk165-muted);--green:var(--sk165-secondary);
 --paper:var(--sk165-surface);
 background:var(--sk165-background)!important;
}
html:not([data-theme="dark"]) body[data-sk165-theme="1"] [class*="student-v62-module__"][class$="__hero"]{
 background:linear-gradient(120deg,color-mix(in srgb,var(--sk165-secondary) 14%,white),
 color-mix(in srgb,var(--sk165-primary) 12%,white))!important;
}
html:not([data-theme="dark"]) body[data-sk165-theme="1"] [class*="student-experience-v43-module__"][class$="__hero"]{
 background:linear-gradient(115deg,color-mix(in srgb,var(--sk165-primary) 16%,white),
 color-mix(in srgb,var(--sk165-secondary) 12%,white))!important;color:var(--sk165-text)!important;
}
/* Use the actual header, not the separate "School Today" action card. */
[class*="school-module__"][class*="__headerV64"].sk165-header{
 --sk165-image:url("https://schoollai.ir/downloads/school-skyglass-illustration-v158.svg");
 --sk165-opacity:.16;--sk165-blur:0px;--sk165-position:center;--sk165-fit:cover;
 position:relative!important;isolation:isolate;overflow:hidden!important;box-sizing:border-box;
 display:grid!important;direction:rtl;grid-template-columns:minmax(0,1fr) auto!important;
 grid-auto-rows:auto!important;gap:13px 16px!important;padding:22px!important;
 min-height:158px!important;align-items:center!important;
 background:linear-gradient(110deg,#eaf8ff,#eff5ff 50%,#f6f1ff)!important;
 border:1px solid #c7def4!important;border-radius:23px!important;
 box-shadow:0 12px 38px #2a51901a!important;
}
[class*="school-module__"][class*="__headerV64"].sk165-header::before{
 content:"";position:absolute;inset:-3px;z-index:0;pointer-events:none;
 background-image:var(--sk165-image);background-size:var(--sk165-fit);
 background-position:var(--sk165-position);background-repeat:no-repeat;
 opacity:var(--sk165-opacity);filter:blur(var(--sk165-blur));transform:translateZ(0);
}
[class*="school-module__"][class*="__headerV64"].sk165-header::after{
 content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
 background:linear-gradient(90deg,#f5faffc5,#eff7ff72 58%,#f8fcffe0);
}
[class*="school-module__"][class*="__headerV64"].sk165-header[data-sk165-custom="0"]::before {
 background-size:contain;background-position:center;opacity:.36;
}
[class*="school-module__"][class*="__headerV64"].sk165-header>*{position:relative;z-index:2;min-width:0}
[class*="school-module__"][class*="__headerV64"].sk165-header>div:first-child{
 grid-row:1;grid-column:1;text-align:right;justify-self:start;
}
[class*="school-module__"][class*="__headerV64"].sk165-header>div:nth-child(2){
 grid-row:1;grid-column:2;justify-self:end;display:flex;gap:9px;flex-wrap:wrap;
}
[class*="school-module__"][class*="__headerV64"].sk165-header h1{
 font-size:clamp(20px,2vw,29px)!important;font-weight:850!important;
 line-height:1.65!important;color:var(--sk165-text,#16345b)!important;text-shadow:0 1px #fff9;
}
[class*="school-module__"][class*="__headerV64"].sk165-header .sk165-tools{
 grid-column:1;grid-row:2;display:flex;align-items:stretch;flex-wrap:wrap;
 direction:rtl;gap:9px;justify-self:start;max-width:100%;
}
[class*="school-module__"][class*="__headerV64"].sk165-header .sk165-chip {
 display:inline-flex;align-items:center;gap:9px;max-width:min(420px,100%);
 min-height:40px;box-sizing:border-box;
 border:1px solid #cfe0f4!important;border-radius:14px!important;
 background:#ffffffdb!important;color:#204c7b!important;font:inherit;
 font-size:12px!important;font-weight:700!important;line-height:1.65!important;
 padding:8px 12px!important;text-align:right;cursor:pointer;
}
[class*="school-module__"][class*="__headerV64"].sk165-header .sk165-date {
 background:#edfbf5e9!important;color:#116f62!important;
}
[class*="school-module__"][class*="__headerV64"].sk165-header .sk165-notice {
 background:#eff3ffed!important;color:#24599d!important;
}
.sk165-chip .sk165-icon{font-size:19px;line-height:1;flex-shrink:0}
.sk165-chip .sk165-label{min-width:0;overflow-wrap:anywhere}
[class*="school-module__"][class*="__headerV64"].sk165-header .sk165-edit{
 grid-column:2;grid-row:2;justify-self:end;align-self:center;
 font:inherit;font-weight:750;font-size:12px;color:var(--sk165-primary,#3156d9);
 min-height:38px;padding:8px 12px;border-radius:12px;
 border:1px solid #c3d9f6;background:#ffffffdf;cursor:pointer;
}
.sk165-edit[hidden],.sk165-hidden-original{display:none!important}
.sk165-photo-panel,.sk165-dialog,.sk165-calendar-modal {color:#1b3c60;font-family:inherit}
.sk165-photo-panel{background:#fff;border:1px solid #d6e4f5;border-radius:18px;padding:19px;box-shadow:0 8px 24px #2e5c8b16}
.sk165-photo-panel h2{font-size:19px;margin:0;color:#174476}
.sk165-photo-panel p{line-height:1.9;color:#58748c;font-size:12px}
.sk165-photo-preview{height:145px;background-color:#f0f7ff;background-position:center;background-repeat:no-repeat;
 border:1px solid #d7e4f4;border-radius:16px;margin:12px 0}
.sk165-photo-panel .sk165-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin:16px 0}
.sk165-photo-panel label{font-weight:700;font-size:12px;display:grid;gap:7px;color:#264f77}
.sk165-photo-panel input[type=file],.sk165-photo-panel select{padding:9px;border:1px solid #d4e4f2;
 border-radius:10px;color:#244e71;background:#fff;max-width:100%;min-width:0}
.sk165-photo-panel input[type=range]{accent-color:#397de1;max-width:100%}
.sk165-photo-panel output{font-size:11px}
.sk165-actions{display:flex;gap:10px;flex-wrap:wrap}
.sk165-actions button,.sk165-dialog-close,.sk165-calendar-modal button{
 font:inherit;font-size:12px;border-radius:11px;padding:10px 14px;cursor:pointer;
 border:1px solid #c7dff2;background:#f5f9ff;color:#214b7a;font-weight:750}
.sk165-actions .sk165-save{background:#316fd8;color:white;border-color:#316fd8}
.sk165-actions button:disabled{opacity:.5}
.sk165-status[data-ok="1"]{color:#087e68!important}
.sk165-status[data-ok="0"]{color:#ae5427!important}
.sk165-dialog,.sk165-calendar-modal{
 width:min(630px,calc(100vw - 26px));max-height:90vh;overflow:auto;
 padding:16px;border:1px solid #cfe0f3;border-radius:19px;
 background:#f5faff;box-shadow:0 25px 80px #102d5055
}
.sk165-dialog::backdrop,.sk165-calendar-modal::backdrop{background:#122f4e72;backdrop-filter:blur(2px)}
.sk165-dialog-close{margin-bottom:10px}
.sk165-calendar-modal{text-align:center;direction:rtl;max-width:370px}
.sk165-calendar-modal strong{font-size:18px}
.sk165-calendar-modal p{font-size:15px;margin:16px 0}
@media(max-width:920px){
 [class*="school-module__"][class*="__headerV64"].sk165-header{
  grid-template-columns:minmax(0,1fr)!important;padding:17px!important;gap:12px!important;
 }
 [class*="school-module__"][class*="__headerV64"].sk165-header>div:first-child{
  grid-column:1;grid-row:1}
 [class*="school-module__"][class*="__headerV64"].sk165-header>div:nth-child(2){
  grid-column:1;grid-row:2;justify-self:start
 }
 [class*="school-module__"][class*="__headerV64"].sk165-header .sk165-tools{
  grid-column:1;grid-row:3;justify-self:start
 }
 [class*="school-module__"][class*="__headerV64"].sk165-header .sk165-edit{
  grid-column:1;grid-row:4;justify-self:start
 }
}
@media(max-width:590px){
 [class*="school-module__"][class*="__headerV64"].sk165-header{
  min-height:170px!important;border-radius:17px!important;padding:14px!important}
 [class*="school-module__"][class*="__headerV64"].sk165-header .sk165-tools{width:100%;flex-wrap:nowrap;gap:7px}
 [class*="school-module__"][class*="__headerV64"].sk165-header .sk165-chip{
  flex:1 1 50%;min-width:0;max-width:58%;padding:8px!important;font-size:11px!important
 }
 .sk165-photo-panel{padding:13px}
 .sk165-photo-panel .sk165-fields{grid-template-columns:1fr}
}

/* V167 - restore the actual previous calendar widget instead of simplified date chip */
[class*="school-module__"][class*="__headerV64"].sk165-header .sk167-original-calendar{
 display:flex;align-items:center;justify-content:flex-start;flex:0 1 auto;
 max-width:100%;min-width:0;width:auto;cursor:pointer;box-sizing:border-box;
 background:transparent!important;border:0!important;box-shadow:none!important;
 padding:0!important;margin:0!important;overflow:visible!important;
}
[class*="school-module__"][class*="__headerV64"].sk165-header .sk167-original-calendar>.sk167-calendar-surface{
 max-width:100%;min-width:0;box-sizing:border-box;overflow-wrap:anywhere;
}
[class*="school-module__"][class*="__headerV64"].sk165-header .sk167-original-calendar :is(button,a){
 cursor:pointer;max-width:100%;box-sizing:border-box;
}
@media(max-width:590px){
 [class*="school-module__"][class*="__headerV64"].sk165-header .sk165-tools{
   flex-wrap:wrap!important;align-items:center;justify-content:flex-start;
 }
 [class*="school-module__"][class*="__headerV64"].sk165-header .sk167-original-calendar{
   flex:0 1 auto;max-width:100%;
 }
 [class*="school-module__"][class*="__headerV64"].sk165-header .sk165-notice{
   flex:0 1 auto;max-width:100%;min-width:95px;
 }
}

/* V168: true built-in Iran calendar from all 8 active school builds.
   Do not replace original calendar SVG, two-line occasion, font, gradient, or handler. */
[class*="school-module__"][class*="__headerV64"].sk165-header .sk167-original-calendar .sk167-calendar-surface[class*="__calendarButton"]{
 display:flex!important;flex-direction:row!important;max-width:100%;min-width:0;
 box-sizing:border-box;white-space:normal;overflow:visible;
}
[class*="school-module__"][class*="__headerV64"].sk165-header .sk167-original-calendar .sk167-calendar-surface[class*="__calendarButton"] > span:nth-child(2){
 min-width:0;max-width:100%;
}
[class*="school-module__"][class*="__headerV64"].sk165-header .sk167-original-calendar .sk167-calendar-surface[class*="__calendarButton"] small{
 display:block;line-height:1.55;white-space:normal;overflow-wrap:anywhere;
}
@media(max-width:590px){
 [class*="school-module__"][class*="__headerV64"].sk165-header .sk167-original-calendar{
  min-width:0;flex:1 1 auto;
 }
 [class*="school-module__"][class*="__headerV64"].sk165-header .sk167-original-calendar .sk167-calendar-surface[class*="__calendarButton"]{
  padding:9px 10px;gap:8px;
 }
}
