/* Attendance Phase05-A — shared theme engine. Dark stays the default/current design. */
:root[data-theme="dark"]{color-scheme:dark;}
:root[data-theme="light"]{color-scheme:light;}
.theme-toggle{--theme-btn-bg:var(--identity-surface);--theme-btn-border:var(--identity-border);--theme-btn-fg:var(--identity-text);appearance:none;width:38px;height:38px;min-width:38px;padding:0;border:1px solid var(--theme-btn-border);border-radius:12px;background:var(--theme-btn-bg);color:var(--theme-btn-fg);display:inline-grid;place-items:center;cursor:pointer;transition:background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease;box-shadow:none;line-height:1;}
.theme-toggle:hover{transform:translateY(-1px);border-color:color-mix(in srgb, var(--identity-primary-text) 48.000%, transparent);color:var(--identity-primary-text);}.theme-toggle:active{transform:scale(.97);}.theme-toggle:focus-visible{outline:2px solid var(--identity-primary-text);outline-offset:2px;}.theme-toggle svg{width:18px;height:18px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}.theme-toggle__label{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;}.theme-toggle__moon{display:none;}.theme-toggle__sun{display:block;}:root[data-theme="light"] .theme-toggle__sun{display:none;}:root[data-theme="light"] .theme-toggle__moon{display:block;}:root[data-theme="light"] .theme-toggle{--theme-btn-bg:var(--identity-surface);--theme-btn-border:var(--identity-border);--theme-btn-fg:var(--identity-text);box-shadow:0 5px 18px color-mix(in srgb, var(--identity-shadow-color) 7.000%, transparent);}
.theme-toggle--floating{position:fixed;z-index:13000;top:max(14px,env(safe-area-inset-top));left:14px;}.install-nav-actions{display:flex;align-items:center;gap:9px;}

/* Professional dialogs/toasts follow the selected theme. */
:root[data-theme="light"] .ui-modal-backdrop{background:color-mix(in srgb, var(--identity-surface-soft) 34.000%, transparent);}
:root[data-theme="light"] .ui-modal{background:var(--identity-surface);color:var(--identity-text);border-color:var(--identity-border);box-shadow:0 28px 80px color-mix(in srgb, var(--identity-shadow-color) 18.000%, transparent);}
:root[data-theme="light"] .ui-modal-copy p{color:var(--identity-muted);}:root[data-theme="light"] .ui-btn-quiet{background:var(--identity-surface);color:var(--identity-muted);border-color:var(--identity-border);}:root[data-theme="light"] .ui-toast{background:var(--identity-surface);color:var(--identity-text);border-color:var(--identity-border);box-shadow:0 18px 45px color-mix(in srgb, var(--identity-shadow-color) 15.000%, transparent);}

/* Admin core light theme. Keep the existing dark rules untouched. */
:root[data-theme="light"]{--ink:var(--identity-text);--muted:var(--identity-muted);--muted-2:var(--identity-muted);--nav:var(--identity-surface);--nav-soft:var(--identity-surface-soft);--bg:var(--identity-background);--surface:var(--identity-surface);--surface-soft:var(--identity-surface-soft);--line:var(--identity-border);--line-strong:var(--identity-border-strong);--primary:var(--identity-primary);--primary-dark:var(--identity-primary-hover);--primary-soft:var(--identity-primary-soft);--success:var(--identity-success);--success-soft:var(--identity-success-soft);--warning:var(--identity-warning);--warning-soft:var(--identity-warning-soft);--danger:var(--identity-danger);--danger-soft:var(--identity-danger-soft);--info:var(--identity-info);--info-soft:var(--identity-info-soft);--shadow:0 18px 45px color-mix(in srgb, var(--identity-shadow-color) 8.000%, transparent);--shadow-soft:0 7px 22px color-mix(in srgb, var(--identity-shadow-color) 6.000%, transparent);}
:root[data-theme="light"] html,:root[data-theme="light"] body,:root[data-theme="light"] .admin-body{background:var(--identity-background);color:var(--ink);background-image:none;}
:root[data-theme="light"] .top{background:color-mix(in srgb, var(--identity-surface) 96.000%, transparent);border-color:var(--line);box-shadow:0 8px 24px color-mix(in srgb, var(--identity-shadow-color) 5.000%, transparent);}
:root[data-theme="light"] .top-date,:root[data-theme="light"] .logout-btn,:root[data-theme="light"] .nav-toggle{background:var(--identity-surface);border-color:var(--line);color:var(--identity-muted);}:root[data-theme="light"] .nav-toggle span{background:var(--identity-surface-soft);}:root[data-theme="light"] .userbox{border-color:var(--line);}
:root[data-theme="light"] .side{background:var(--identity-surface);color:var(--identity-text);border-inline-start:1px solid var(--line);box-shadow:-12px 0 30px color-mix(in srgb, var(--identity-shadow-color) 5.000%, transparent);}
:root[data-theme="light"] .side-brand{color:var(--identity-text);border-color:var(--line);}:root[data-theme="light"] .side-brand small{color:var(--identity-muted);}:root[data-theme="light"] .nav-section-label{color:var(--identity-muted);}:root[data-theme="light"] .nav-item{color:var(--identity-muted);}:root[data-theme="light"] .nav-item:hover{background:var(--identity-surface);color:var(--identity-text);}:root[data-theme="light"] .nav-item.active{background:linear-gradient(90deg,var(--identity-surface-soft),var(--identity-surface));color:var(--identity-primary-text);}:root[data-theme="light"] .nav-item.active:before{background:var(--identity-primary);box-shadow:none;}:root[data-theme="light"] .nav-icon{background:var(--identity-surface);color:var(--identity-muted);}:root[data-theme="light"] .nav-item.active .nav-icon,:root[data-theme="light"] .nav-item:hover .nav-icon{background:var(--identity-surface-soft);color:var(--identity-primary-text);}:root[data-theme="light"] .side-footer{background:var(--identity-surface);border-color:var(--line);}:root[data-theme="light"] .side-footer strong{color:var(--identity-text);}:root[data-theme="light"] .side-footer small{color:var(--identity-muted);}
:root[data-theme="light"] .main{background:transparent;}:root[data-theme="light"] .panel,:root[data-theme="light"] .card,:root[data-theme="light"] .metric-card,:root[data-theme="light"] .stat,:root[data-theme="light"] .metric,:root[data-theme="light"] .tablewrap,:root[data-theme="light"] .attendance-table-wrap,:root[data-theme="light"] .report-table-card,:root[data-theme="light"] .gated-surface{background:var(--identity-surface);color:var(--identity-text);border-color:var(--line);box-shadow:var(--shadow-soft);}
:root[data-theme="light"] .dashboard-hero,:root[data-theme="light"] .student-profile-hero,:root[data-theme="light"] .attendance-hero,:root[data-theme="light"] .ops-hero,:root[data-theme="light"] .identity-scan-console,:root[data-theme="light"] .report-hero-pro{background:linear-gradient(135deg,var(--identity-surface),var(--identity-surface));border-color:var(--identity-border);color:var(--identity-text);box-shadow:var(--shadow-soft);}
 :root[data-theme="light"] body.admin-body input,:root[data-theme="light"] body.admin-body select,:root[data-theme="light"] body.admin-body textarea,:root[data-theme="light"] body.admin-auth-page input,:root[data-theme="light"] body.admin-auth-page select,:root[data-theme="light"] body.admin-auth-page textarea{background:var(--a-surface,var(--identity-surface))!important;color:var(--a-text,var(--identity-text))!important;border-color:var(--a-border,var(--identity-border))!important;-webkit-text-fill-color:var(--a-text,var(--identity-surface-soft));}:root[data-theme="light"] body.admin-body input:focus,:root[data-theme="light"] body.admin-body select:focus,:root[data-theme="light"] body.admin-body textarea:focus,:root[data-theme="light"] body.admin-auth-page input:focus,:root[data-theme="light"] body.admin-auth-page select:focus,:root[data-theme="light"] body.admin-auth-page textarea:focus{background:var(--a-surface,var(--identity-surface))!important;border-color:var(--identity-primary-text)!important;box-shadow:0 0 0 3px color-mix(in srgb, var(--identity-shadow-color) 12.000%, transparent)!important;}:root[data-theme="light"] body.admin-body select option,:root[data-theme="light"] body.admin-body select optgroup,:root[data-theme="light"] body.admin-auth-page select option,:root[data-theme="light"] body.admin-auth-page select optgroup{background:var(--identity-surface);color:var(--identity-text);}:root[data-theme="light"] body.admin-body input[type="date"],:root[data-theme="light"] body.admin-body input[type="datetime-local"],:root[data-theme="light"] body.admin-body input[type="time"]{color-scheme:light!important;box-shadow:inset 0 0 0 1000px var(--a-surface,var(--identity-shadow-color))!important;}:root[data-theme="light"] body.admin-body input[type="date"]::-webkit-calendar-picker-indicator,:root[data-theme="light"] body.admin-body input[type="datetime-local"]::-webkit-calendar-picker-indicator,:root[data-theme="light"] body.admin-body input[type="time"]::-webkit-calendar-picker-indicator{filter:none;}
:root[data-theme="light"] body.admin-body th,:root[data-theme="light"] body.admin-body .attendance-table th,:root[data-theme="light"] body.admin-body .report-table-wrap th{background:var(--identity-surface);color:var(--identity-muted);border-color:var(--identity-border);}:root[data-theme="light"] body.admin-body td,:root[data-theme="light"] body.admin-body .attendance-table td{color:var(--identity-text);border-color:var(--identity-border);}:root[data-theme="light"] body.admin-body tbody tr:nth-child(even){background:var(--identity-surface);}:root[data-theme="light"] body.admin-body tbody tr:hover,:root[data-theme="light"] body.admin-body .attendance-table tr:hover td{background:var(--identity-surface);}
:root[data-theme="light"] .admin-auth-page,:root[data-theme="light"] .authpage{background:var(--identity-background);color:var(--identity-text);}:root[data-theme="light"] .admin-auth-shell,:root[data-theme="light"] .authcard,:root[data-theme="light"] .admin-auth-card{background:var(--identity-surface);border-color:var(--identity-border);box-shadow:0 30px 80px color-mix(in srgb, var(--identity-shadow-color) 13.000%, transparent);}:root[data-theme="light"] .admin-auth-brand{background:linear-gradient(125deg,var(--identity-hero-start),var(--identity-hero-end));color:var(--identity-on-hero);}:root[data-theme="light"] .auth-points span{background:color-mix(in srgb, var(--identity-primary) 7.000%, transparent);border-color:color-mix(in srgb, var(--identity-primary-text) 14.000%, transparent);}
@media(max-width:900px){:root[data-theme="light"] .side{box-shadow:-24px 0 55px color-mix(in srgb, var(--identity-shadow-color) 16.000%, transparent);}:root[data-theme="light"] .side-overlay{background:color-mix(in srgb, var(--identity-surface-soft) 34.000%, transparent);}}

/* Guardian / student core light theme. */
:root[data-theme="light"]{--g-bg:var(--identity-background);--g-surface:var(--identity-surface);--g-surface-2:var(--identity-surface-soft);--g-ink:var(--identity-text);--g-muted:var(--identity-muted);--g-line:var(--identity-border);--g-brand:var(--identity-primary);--g-brand-2:var(--identity-primary-hover);--g-accent:var(--identity-primary-text);--g-accent-soft:var(--identity-primary-soft);--g-green:var(--identity-success);--g-green-soft:var(--identity-success-soft);--g-amber:var(--identity-warning);--g-amber-soft:var(--identity-warning-soft);--g-red:var(--identity-danger);--g-red-soft:var(--identity-danger-soft);--g-blue:var(--identity-info);--g-blue-soft:var(--identity-info-soft);--g-violet:var(--identity-violet);--g-violet-soft:var(--identity-violet-soft);--g-shadow:0 10px 30px color-mix(in srgb, var(--identity-shadow-color) 7.000%, transparent);}
:root[data-theme="light"] body.g-app,:root[data-theme="light"] .g-shell{background:var(--identity-background);color:var(--identity-text);}:root[data-theme="light"] .g-header{background:color-mix(in srgb, var(--identity-surface) 94.000%, transparent);border-color:var(--identity-border);box-shadow:0 8px 24px color-mix(in srgb, var(--identity-shadow-color) 4.000%, transparent);}:root[data-theme="light"] .g-brand__text strong{color:var(--identity-text);}:root[data-theme="light"] .g-brand__text small{color:var(--identity-muted);}:root[data-theme="light"] .g-desktop-nav a{color:var(--identity-muted);}:root[data-theme="light"] .g-desktop-nav a:hover,:root[data-theme="light"] .g-desktop-nav a.active{background:var(--identity-surface-soft);color:var(--identity-text);}:root[data-theme="light"] .g-icon-btn{background:var(--identity-surface);color:var(--identity-muted);border-color:var(--identity-border);}:root[data-theme="light"] .g-bottom-nav{background:color-mix(in srgb, var(--identity-surface) 97.000%, transparent);border-color:var(--identity-border);box-shadow:0 14px 40px color-mix(in srgb, var(--identity-shadow-color) 14.000%, transparent);}:root[data-theme="light"] .g-bottom-nav a{color:var(--identity-muted);}:root[data-theme="light"] .g-bottom-nav a.active{background:var(--identity-surface-soft);color:var(--identity-text);}
:root[data-theme="light"] .g-child-card,:root[data-theme="light"] .g-page-hero,:root[data-theme="light"] .g-form-card,:root[data-theme="light"] .g-thread-card,:root[data-theme="light"] .g-notification-card,:root[data-theme="light"] .g-academic-card,:root[data-theme="light"] .g-subject-grade-card,:root[data-theme="light"] .g-academic-card-grid--polished .g-academic-card{background:var(--identity-surface);color:var(--identity-text);border-color:var(--identity-border);box-shadow:var(--g-shadow);}:root[data-theme="light"] .g-today-times>div,:root[data-theme="light"] .g-action-tile{background:var(--identity-surface);border-color:var(--identity-border);}:root[data-theme="light"] .g-subject-grade-card__body small,:root[data-theme="light"] .g-academic-card-grid--polished .g-academic-card__body small{color:var(--identity-muted);}
:root[data-theme="light"] .g-auth{background:var(--identity-background);color:var(--identity-text);}:root[data-theme="light"] .g-auth-shell{background:var(--identity-background);}:root[data-theme="light"] .g-auth-brand{background:linear-gradient(125deg,var(--identity-hero-start),var(--identity-hero-end));color:var(--identity-on-hero);border-color:var(--identity-hero-end);}:root[data-theme="light"] .g-auth-card{background:var(--identity-surface);color:var(--identity-text);border-color:var(--identity-border);box-shadow:0 25px 70px color-mix(in srgb, var(--identity-shadow-color) 12.000%, transparent);}:root[data-theme="light"] .g-auth-help,:root[data-theme="light"] .g-auth-footnote{color:var(--identity-muted);}:root[data-theme="light"] .g-input-wrap{background:var(--identity-surface);border-color:var(--identity-border);color:var(--identity-text);}:root[data-theme="light"] .portal-mode-switch{background:var(--identity-surface)!important;border-color:var(--identity-border)!important;}:root[data-theme="light"] .portal-mode-switch button{color:var(--identity-muted)!important;}:root[data-theme="light"] .portal-mode-switch button.active{background:var(--identity-surface)!important;color:var(--identity-primary-text)!important;box-shadow:0 4px 14px color-mix(in srgb, var(--identity-shadow-color) 9.000%, transparent)!important;}

/* Teacher core light theme. */
:root[data-theme="light"]{--tp-bg:var(--identity-background);--tp-bg-2:var(--identity-surface-soft);--tp-surface:var(--identity-surface);--tp-surface-2:var(--identity-surface-soft);--tp-surface-3:var(--identity-surface-tint);--tp-line:var(--identity-border);--tp-line-soft:var(--identity-border);--tp-text:var(--identity-text);--tp-muted:var(--identity-muted);--tp-muted-2:var(--identity-muted);--tp-cyan:var(--identity-primary-text);--tp-cyan-2:var(--identity-primary-hover);--tp-blue:var(--identity-info);--tp-purple:var(--identity-violet);--tp-green:var(--identity-success);--tp-amber:var(--identity-warning);--tp-red:var(--identity-danger);--tp-shadow:0 18px 45px color-mix(in srgb, var(--identity-shadow-color) 8.000%, transparent);}
:root[data-theme="light"] body.tp-body,:root[data-theme="light"] .tp-shell{background:var(--identity-background);color:var(--identity-text);background-image:none;}:root[data-theme="light"] .tp-topbar{background:color-mix(in srgb, var(--identity-surface) 94.000%, transparent);border-color:var(--identity-border);box-shadow:0 8px 24px color-mix(in srgb, var(--identity-shadow-color) 4.000%, transparent);}:root[data-theme="light"] .tp-brand-title{color:var(--identity-text);}:root[data-theme="light"] .tp-brand-subtitle{color:var(--identity-muted);}:root[data-theme="light"] .tp-nav-link{color:var(--identity-muted);}:root[data-theme="light"] .tp-nav-link:hover{background:var(--identity-surface);color:var(--identity-text);}:root[data-theme="light"] .tp-nav-link.is-active{background:var(--identity-surface-soft);color:var(--identity-primary-text);border-color:var(--identity-border);}:root[data-theme="light"] .tp-card,:root[data-theme="light"] .tp-card-soft{background:var(--identity-surface);color:var(--identity-text);border-color:var(--identity-border);box-shadow:var(--tp-shadow);}:root[data-theme="light"] .tp-stat-mini{background:var(--identity-surface);border-color:var(--identity-border);}:root[data-theme="light"] .tp-action-card:hover{border-color:var(--identity-border);}:root[data-theme="light"] .tp-input,:root[data-theme="light"] .tp-select,:root[data-theme="light"] .tp-textarea,:root[data-theme="light"] .tp-upload{background:var(--identity-surface);color:var(--identity-text);border-color:var(--identity-border);}:root[data-theme="light"] .tp-input:focus,:root[data-theme="light"] .tp-select:focus,:root[data-theme="light"] .tp-textarea:focus{border-color:var(--identity-primary-text);box-shadow:0 0 0 3px color-mix(in srgb, var(--identity-shadow-color) 11.000%, transparent);}:root[data-theme="light"] .tp-label{color:var(--identity-text);}:root[data-theme="light"] .tp-upload strong{color:var(--identity-text);}:root[data-theme="light"] .tp-mobile-nav{background:color-mix(in srgb, var(--identity-surface) 97.000%, transparent);border-color:var(--identity-border);box-shadow:0 16px 40px color-mix(in srgb, var(--identity-shadow-color) 14.000%, transparent);}:root[data-theme="light"] .tp-mobile-nav a{color:var(--identity-muted);}:root[data-theme="light"] .tp-mobile-nav a.is-active{color:var(--identity-text);background:linear-gradient(135deg,var(--identity-primary),var(--identity-primary));}:root[data-theme="light"] .tp-login-page{background:radial-gradient(circle at 50% 0,color-mix(in srgb, var(--identity-primary) 9.000%, transparent),transparent 30rem),var(--identity-surface);color:var(--identity-text);}:root[data-theme="light"] .tp-login-logo{background:linear-gradient(145deg,var(--identity-surface-soft),var(--identity-surface));border-color:var(--identity-border);color:var(--identity-primary-text);box-shadow:0 18px 45px color-mix(in srgb, var(--identity-shadow-color) 8.000%, transparent);}

/* Guardian install page light theme. */
:root[data-theme="light"] body.install-body{background:var(--identity-background);color:var(--identity-text);}:root[data-theme="light"] .install-page{background:var(--identity-background);}:root[data-theme="light"] .install-nav{border-color:var(--identity-border);}:root[data-theme="light"] .install-brand{color:var(--identity-text);}:root[data-theme="light"] .install-brand small,:root[data-theme="light"] .hero-copy>p,:root[data-theme="light"] .trust-row,:root[data-theme="light"] .section-head p,:root[data-theme="light"] .step-card p,:root[data-theme="light"] .ready-card p{color:var(--identity-muted);}:root[data-theme="light"] .login-link{background:var(--identity-surface);color:var(--identity-text);border-color:var(--identity-border);}:root[data-theme="light"] .install-secondary{background:var(--identity-surface);color:var(--identity-text);border-color:var(--identity-border);}:root[data-theme="light"] .install-status{background:var(--identity-surface);color:var(--identity-primary-text);border-color:var(--identity-border);}:root[data-theme="light"] .phone-card{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));border-color:var(--identity-border);box-shadow:0 35px 75px color-mix(in srgb, var(--identity-shadow-color) 16.000%, transparent);color:var(--identity-text);}:root[data-theme="light"] .float-chip{background:color-mix(in srgb, var(--identity-surface) 96.000%, transparent);border-color:var(--identity-border);box-shadow:0 15px 35px color-mix(in srgb, var(--identity-shadow-color) 13.000%, transparent);}:root[data-theme="light"] .ios-guide{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));border-color:var(--identity-border);color:var(--identity-text);}:root[data-theme="light"] .step-card{background:var(--identity-surface);border-color:var(--identity-border);}:root[data-theme="light"] .step-icon{background:var(--identity-surface);color:var(--identity-primary-text);}:root[data-theme="light"] .ready-card{background:linear-gradient(110deg,var(--identity-surface-soft),var(--identity-surface));border-color:var(--identity-border);color:var(--identity-text);}:root[data-theme="light"] footer{color:var(--identity-muted);}

/* Keep printed documents neutral; no theme toggle is injected into print views. */
@media print{.theme-toggle{display:none!important}}
@media(max-width:560px){.theme-toggle{width:36px;height:36px;min-width:36px;border-radius:11px;}.theme-toggle--floating{top:max(10px,env(safe-area-inset-top));left:10px;}.install-nav-actions{gap:6px;}}

/* Phase05-B - full-page visual closure. */
.sender-student-label{color:var(--identity-primary-text);}.staff-inline-warning{color:var(--identity-warning);}
:root[data-theme="light"] .sender-student-label{color:var(--identity-primary-text);}
:root[data-theme="light"] .staff-inline-warning{color:var(--identity-warning);}

/* Shared conflict prevention. */
:root[data-theme="light"] body{background-image:none;}
:root[data-theme="light"] *{scrollbar-color:var(--identity-border) var(--identity-border);}
:root[data-theme="light"] *::-webkit-scrollbar-track{background:var(--identity-surface);}
:root[data-theme="light"] *::-webkit-scrollbar-thumb{background:var(--identity-surface-soft);border-color:var(--identity-border);}
:root[data-theme="light"] *::-webkit-scrollbar-thumb:hover{background:var(--identity-surface-soft);}
:root[data-theme="light"] ::selection{background:color-mix(in srgb, var(--identity-primary) 18.000%, transparent);color:var(--identity-text);}
:root[data-theme="light"] :focus-visible{outline-color:var(--identity-primary-text);}

/* Admin - operations, structure, attendance, messaging, reports, identity and settings. */
:root[data-theme="light"] body.admin-body .filters,
:root[data-theme="light"] body.admin-body .attendance-filter-panel,
:root[data-theme="light"] body.admin-body .leave-filter-panel,
:root[data-theme="light"] body.admin-body .identity-filter-panel,
:root[data-theme="light"] body.admin-body .report-filter-pro,
:root[data-theme="light"] body.admin-body .editor-panel,
:root[data-theme="light"] body.admin-body .structure-actions-panel,
:root[data-theme="light"] body.admin-body .override-list-wrap,
:root[data-theme="light"] body.admin-body .assessment-body,
:root[data-theme="light"] body.admin-body .user-card-body,
:root[data-theme="light"] body.admin-body .admin-chat,
:root[data-theme="light"] body.admin-body .chat-composer,
:root[data-theme="light"] body.admin-body .bulk-toolbar,
:root[data-theme="light"] body.admin-body .editor-submitbar{background:var(--identity-surface-soft);color:var(--identity-text);border-color:var(--identity-primary);box-shadow:var(--shadow-soft);}
:root[data-theme="light"] body.admin-body .school-structure-head,
:root[data-theme="light"] body.admin-body .schedule-school-head,
:root[data-theme="light"] body.admin-body .ops-kpis>div,
:root[data-theme="light"] body.admin-body .metric-card{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));border-color:var(--identity-border);color:var(--identity-text);}
:root[data-theme="light"] body.admin-body .ops-kpis strong{color:var(--identity-text);}
:root[data-theme="light"] body.admin-body .grades-kpis>div:nth-child(1) strong{color:var(--identity-primary-text);}
:root[data-theme="light"] body.admin-body .grades-kpis>div:nth-child(2) strong{color:var(--identity-primary-text);}
:root[data-theme="light"] body.admin-body .grades-kpis>div:nth-child(3) strong{color:var(--identity-success);}
:root[data-theme="light"] body.admin-body .grades-kpis>div:nth-child(4) strong{color:var(--identity-primary-text);}
:root[data-theme="light"] body.admin-body .attendance-rate,
:root[data-theme="light"] body.admin-body .compact-stats>div,
:root[data-theme="light"] body.admin-body .current-enrollment-card>div,
:root[data-theme="light"] body.admin-body .readonly-school,
:root[data-theme="light"] body.admin-body .mini-create-form,
:root[data-theme="light"] body.admin-body .request-meta span,
:root[data-theme="light"] body.admin-body .access-columns>div,
:root[data-theme="light"] body.admin-body .appointment-meta>span,
:root[data-theme="light"] body.admin-body .identity-progress-strip>div{background:var(--identity-surface);border-color:var(--identity-border);color:var(--identity-text);}
:root[data-theme="light"] body.admin-body .rate-track,
:root[data-theme="light"] body.admin-body .report-bar-row>div{background:var(--identity-surface-soft);}
:root[data-theme="light"] body.admin-body .operation-item,
:root[data-theme="light"] body.admin-body .quick-actions>a,
:root[data-theme="light"] body.admin-body .school-row{background:var(--identity-surface);border-color:var(--identity-border);color:var(--identity-text);}
:root[data-theme="light"] body.admin-body .operation-item:hover,
:root[data-theme="light"] body.admin-body .quick-actions>a:hover{background:var(--identity-surface);border-color:var(--identity-border);}
:root[data-theme="light"] body.admin-body .operation-item.has-alert{background:var(--identity-surface);border-color:var(--identity-primary-text);}
:root[data-theme="light"] body.admin-body .school-avatar,
:root[data-theme="light"] body.admin-body .guardian-avatar,
:root[data-theme="light"] body.admin-body .identity-row-avatar,
:root[data-theme="light"] body.admin-body .identity-status-card>span,
:root[data-theme="light"] body.admin-body .event-sequence,
:root[data-theme="light"] body.admin-body .avatar-fallback{background:var(--identity-surface);color:var(--identity-primary-text);}
:root[data-theme="light"] body.admin-body .empty-state{background:var(--identity-surface);border-color:var(--identity-border);color:var(--identity-muted);}
:root[data-theme="light"] body.admin-body .bulk-toolbar button span,
:root[data-theme="light"] body.admin-body .chips span,
:root[data-theme="light"] body.admin-body .school-pill,
:root[data-theme="light"] body.admin-body .section-chips span,
:root[data-theme="light"] body.admin-body .inside-pill,
:root[data-theme="light"] body.admin-body .override-date,
:root[data-theme="light"] body.admin-body .announcement-read-stats span,
:root[data-theme="light"] body.admin-body .report-row-count,
:root[data-theme="light"] body.admin-body .structure-block-head>span,
:root[data-theme="light"] body.admin-body .school-structure-counts span{background:var(--identity-primary-soft);border-color:var(--identity-primary);color:var(--identity-primary-text);}
:root[data-theme="light"] body.admin-body .school-logo,
:root[data-theme="light"] body.admin-body .photo-preview{background:var(--identity-surface);border-color:var(--identity-border);color:var(--identity-primary-text);}
:root[data-theme="light"] body.admin-body .profile-avatar,
:root[data-theme="light"] body.admin-body .photo-preview{box-shadow:0 10px 24px color-mix(in srgb, var(--identity-shadow-color) 10.000%, transparent);}
:root[data-theme="light"] body.admin-body .structure-tabs{background:var(--identity-surface);border-color:var(--identity-border);}
:root[data-theme="light"] body.admin-body .structure-tabs button{background:transparent;color:var(--identity-muted);}
:root[data-theme="light"] body.admin-body .structure-tabs button.active{background:var(--identity-primary-soft);color:var(--identity-primary-text);box-shadow:0 4px 12px color-mix(in srgb, var(--identity-shadow-color) 7.000%, transparent);}
:root[data-theme="light"] body.admin-body .structure-item,
:root[data-theme="light"] body.admin-body .grade-tree-row,
:root[data-theme="light"] body.admin-body .shift-row{border-color:var(--identity-border);}
:root[data-theme="light"] body.admin-body label,
:root[data-theme="light"] body.admin-body .report-filter-grid-pro label,
:root[data-theme="light"] body.admin-auth-page label{color:var(--identity-muted);}
:root[data-theme="light"] body.admin-body input::placeholder,
:root[data-theme="light"] body.admin-body textarea::placeholder{color:var(--identity-muted);}
:root[data-theme="light"] body.admin-body input:hover,
:root[data-theme="light"] body.admin-body select:hover,
:root[data-theme="light"] body.admin-body textarea:hover{border-color:var(--identity-border);}
:root[data-theme="light"] body.admin-body input:disabled,
:root[data-theme="light"] body.admin-body select:disabled,
:root[data-theme="light"] body.admin-body textarea:disabled{background:var(--identity-surface)!important;color:var(--identity-muted)!important;-webkit-text-fill-color:var(--identity-surface-soft);}
:root[data-theme="light"] body.admin-body input:-webkit-autofill,
:root[data-theme="light"] body.admin-body input:-webkit-autofill:hover,
:root[data-theme="light"] body.admin-body input:-webkit-autofill:focus{-webkit-text-fill-color:var(--identity-surface-soft);box-shadow:0 0 0 1000px var(--identity-shadow-color) inset!important;}
:root[data-theme="light"] body.admin-body button,
:root[data-theme="light"] body.admin-body .btn,
:root[data-theme="light"] body.admin-body .button,
:root[data-theme="light"] body.admin-body .ghost-button,
:root[data-theme="light"] body.admin-body .report-presets button,
:root[data-theme="light"] body.admin-body .report-export,
:root[data-theme="light"] body.admin-body .report-inline-exports a,
:root[data-theme="light"] body.admin-body .identity-row-action,
:root[data-theme="light"] body.admin-body .gated-button{background:var(--identity-surface);color:var(--identity-muted);border-color:var(--identity-border);box-shadow:none;}
:root[data-theme="light"] body.admin-body button:hover,
:root[data-theme="light"] body.admin-body .btn:hover,
:root[data-theme="light"] body.admin-body .button:hover,
:root[data-theme="light"] body.admin-body .ghost-button:hover,
:root[data-theme="light"] body.admin-body .report-presets button:hover,
:root[data-theme="light"] body.admin-body .report-export:hover,
:root[data-theme="light"] body.admin-body .report-inline-exports a:hover{background:var(--identity-surface);border-color:var(--identity-border);}
:root[data-theme="light"] body.admin-body .primary,
:root[data-theme="light"] body.admin-body .report-export.primary{background:linear-gradient(135deg,var(--identity-primary),var(--identity-primary));border-color:var(--identity-primary);color:var(--identity-on-primary);}
:root[data-theme="light"] body.admin-body .danger{background:var(--identity-surface);border-color:var(--identity-danger);color:var(--identity-danger);}
:root[data-theme="light"] body.admin-body .soft-success,
:root[data-theme="light"] body.admin-body .quick-in{background:var(--identity-surface-soft)!important;color:var(--identity-success);border-color:var(--identity-success);}
:root[data-theme="light"] body.admin-body .soft-danger{background:var(--identity-surface);color:var(--identity-danger);border-color:var(--identity-danger);}
:root[data-theme="light"] body.admin-body .device-mode-switch{background:var(--identity-surface);border-color:var(--identity-border);}
:root[data-theme="light"] body.admin-body .device-mode-switch button{background:var(--identity-surface);color:var(--identity-muted);border-color:var(--identity-primary);}
:root[data-theme="light"] body.admin-body .device-mode-switch button:hover{background:var(--identity-surface);border-color:var(--identity-primary);}
:root[data-theme="light"] body.admin-body .device-mode-switch button.active.in{background:var(--identity-surface-soft);border-color:var(--identity-primary);color:var(--identity-success);}
:root[data-theme="light"] body.admin-body .device-mode-switch button.active.out{background:var(--identity-surface-soft);border-color:var(--identity-primary);color:var(--identity-primary-text);}
:root[data-theme="light"] body.admin-body .badge,
:root[data-theme="light"] body.admin-body .status-pill,
:root[data-theme="light"] body.admin-body .status-pending,
:root[data-theme="light"] body.admin-body .leave-pending{background:var(--identity-surface);color:var(--identity-muted);}
:root[data-theme="light"] body.admin-body .badge.present,
:root[data-theme="light"] body.admin-body .badge.active,
:root[data-theme="light"] body.admin-body .badge.approved,
:root[data-theme="light"] body.admin-body .badge.published,
:root[data-theme="light"] body.admin-body .status-pill.status-active,
:root[data-theme="light"] body.admin-body .status-pill.status-sent,
:root[data-theme="light"] body.admin-body .status-pill.status-success,
:root[data-theme="light"] body.admin-body .status-pill.status-completed,
:root[data-theme="light"] body.admin-body .status-pill.status-published,
:root[data-theme="light"] body.admin-body .status-present,
:root[data-theme="light"] body.admin-body .leave-approved{background:var(--identity-surface-soft);color:var(--identity-success);}
:root[data-theme="light"] body.admin-body .badge.late,
:root[data-theme="light"] body.admin-body .badge.pending,
:root[data-theme="light"] body.admin-body .badge.draft,
:root[data-theme="light"] body.admin-body .status-late,
:root[data-theme="light"] body.admin-body .leave-pending,
:root[data-theme="light"] body.admin-body .status-pill.status-draft,
:root[data-theme="light"] body.admin-body .status-pill.status-pending{background:var(--identity-surface-soft);color:var(--identity-warning);}
:root[data-theme="light"] body.admin-body .badge.absent,
:root[data-theme="light"] body.admin-body .badge.disabled,
:root[data-theme="light"] body.admin-body .badge.rejected,
:root[data-theme="light"] body.admin-body .badge.failed,
:root[data-theme="light"] body.admin-body .status-absent,
:root[data-theme="light"] body.admin-body .leave-rejected,
:root[data-theme="light"] body.admin-body .status-pill.status-disabled,
:root[data-theme="light"] body.admin-body .status-pill.status-failed,
:root[data-theme="light"] body.admin-body .status-pill.status-rejected{background:var(--identity-surface);color:var(--identity-danger);}
:root[data-theme="light"] body.admin-body .badge.excused,
:root[data-theme="light"] body.admin-body .badge.holiday,
:root[data-theme="light"] body.admin-body .status-excused,
:root[data-theme="light"] body.admin-body .status-holiday,
:root[data-theme="light"] body.admin-body .status-pill.status-reviewed{background:var(--identity-surface);color:var(--identity-primary-text);}
:root[data-theme="light"] body.admin-body .notice.ok,
:root[data-theme="light"] body.admin-body .guardian-access-notice{background:var(--identity-surface-soft);border-color:var(--identity-success);color:var(--identity-success);}
:root[data-theme="light"] body.admin-body .notice.warn{background:var(--identity-surface);border-color:var(--identity-warning);color:var(--identity-warning);}
:root[data-theme="light"] body.admin-body .notice.bad{background:var(--identity-surface);border-color:var(--identity-danger);color:var(--identity-danger);}
:root[data-theme="light"] body.admin-body .admin-bubble{background:var(--identity-surface);border-color:var(--identity-border);color:var(--identity-text);}
:root[data-theme="light"] body.admin-body .admin-bubble.from-admin{background:var(--identity-surface);border-color:var(--identity-border);}
:root[data-theme="light"] body.admin-body .admin-bubble p{color:var(--identity-text);}
:root[data-theme="light"] body.admin-body .bubble-author small,
:root[data-theme="light"] body.admin-body .thread-copy span,
:root[data-theme="light"] body.admin-body .thread-title-row small{color:var(--identity-muted);}
:root[data-theme="light"] body.admin-body .thread-card,
:root[data-theme="light"] body.admin-body .announcement-card,
:root[data-theme="light"] body.admin-body .lifecycle-card,
:root[data-theme="light"] body.admin-body .device-card-pro,
:root[data-theme="light"] body.admin-body .report-status-card,
:root[data-theme="light"] body.admin-body .report-metric,
:root[data-theme="light"] body.admin-body .report-type-chip,
:root[data-theme="light"] body.admin-body .export-card,
:root[data-theme="light"] body.admin-body .backup-action-card,
:root[data-theme="light"] body.admin-body .leave-card,
:root[data-theme="light"] body.admin-body .day-schedule-card,
:root[data-theme="light"] body.admin-body .event-row,
:root[data-theme="light"] body.admin-body .identity-status-card,
:root[data-theme="light"] body.admin-body .request-card,
:root[data-theme="light"] body.admin-body .user-card{background:var(--identity-surface);color:var(--identity-text);border-color:var(--identity-border);box-shadow:var(--shadow-soft);}
:root[data-theme="light"] body.admin-body .lifecycle-card-head>span,
:root[data-theme="light"] body.admin-body .report-type-chip,
:root[data-theme="light"] body.admin-body .report-status-card small{color:var(--identity-muted);}
:root[data-theme="light"] body.admin-body .pagination-bar a,
:root[data-theme="light"] body.admin-body .pagination-bar span{background:var(--identity-surface);color:var(--identity-muted);border-color:var(--identity-border);}

/* Guardian + student - polished page families. */
:root[data-theme="light"] body.g-app .g-welcome{background:linear-gradient(125deg,var(--identity-hero-start),var(--identity-hero-end));border-color:var(--identity-hero-end);color:var(--identity-on-hero);}
:root[data-theme="light"] body.g-app .g-alert-strip{background:var(--identity-surface);border-color:var(--identity-primary-text);color:var(--identity-primary-text);}
:root[data-theme="light"] body.g-app .g-service-links a,
:root[data-theme="light"] body.g-app .g-grade-summary>div,
:root[data-theme="light"] body.g-app .g-grade-card,
:root[data-theme="light"] body.g-app .g-rate-grid>div,
:root[data-theme="light"] body.g-app .g-month-days article,
:root[data-theme="light"] body.g-app .g-announcement-card,
:root[data-theme="light"] body.g-app .g-appointment-card,
:root[data-theme="light"] body.g-app .g-detail-card,
:root[data-theme="light"] body.g-app .g-compose-card,
:root[data-theme="light"] body.g-app .g-notification-card,
:root[data-theme="light"] body.g-app .g-empty-state,
:root[data-theme="light"] body.g-app .g-grade-summary-card,
:root[data-theme="light"] body.g-app .g-result-card,
:root[data-theme="light"] body.g-app .g-grade-grid--polished .g-grade-card,
:root[data-theme="light"] body.g-app .g-schedule-week--polished .g-schedule-day,
:root[data-theme="light"] body.g-app .g-schedule-image-card--polished{background:var(--identity-surface);color:var(--identity-text);border-color:var(--identity-border);box-shadow:var(--g-shadow);}
:root[data-theme="light"] body.g-app .g-service-links--home a:first-child{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));border-color:var(--identity-info);}
:root[data-theme="light"] body.g-app .g-service-links--home a:last-child{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));border-color:var(--identity-border);}
:root[data-theme="light"] body.g-app .g-child-card{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));}
:root[data-theme="light"] body.g-app .g-today-times>div:first-child{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));border-color:var(--identity-border);}
:root[data-theme="light"] body.g-app .g-today-times>div:last-child{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));border-color:var(--identity-danger);}
:root[data-theme="light"] body.g-app .g-action-tile--attendance{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));border-color:var(--identity-border);}
:root[data-theme="light"] body.g-app .g-action-tile--grades{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));border-color:var(--identity-border);}
:root[data-theme="light"] body.g-app .g-action-tile--homework{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));border-color:var(--identity-primary-text);}
:root[data-theme="light"] body.g-app .g-action-tile--schedule{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));border-color:var(--identity-border);}
:root[data-theme="light"] body.g-app .g-field>span:first-child{color:var(--identity-muted);}
:root[data-theme="light"] body.g-app .g-field input,
:root[data-theme="light"] body.g-app .g-field select,
:root[data-theme="light"] body.g-app .g-field textarea,
:root[data-theme="light"] body.g-app .g-date-wrap,
:root[data-theme="light"] body.g-app .g-justify-form textarea,
:root[data-theme="light"] body.g-app .g-month-switcher input{background:var(--identity-surface)!important;color:var(--identity-text)!important;border-color:var(--identity-border)!important;-webkit-text-fill-color:var(--identity-surface-soft);}
:root[data-theme="light"] body.g-app .g-field input::placeholder,
:root[data-theme="light"] body.g-app .g-field textarea::placeholder,
:root[data-theme="light"] body.g-app .g-justify-form textarea::placeholder{color:var(--identity-muted);}
:root[data-theme="light"] body.g-app .g-field input:focus,
:root[data-theme="light"] body.g-app .g-field select:focus,
:root[data-theme="light"] body.g-app .g-field textarea:focus,
:root[data-theme="light"] body.g-app .g-justify-form textarea:focus,
:root[data-theme="light"] body.g-app .g-month-switcher input:focus{background:var(--identity-surface)!important;border-color:var(--identity-primary-text);box-shadow:0 0 0 3px color-mix(in srgb, var(--identity-shadow-color) 11.000%, transparent);}
:root[data-theme="light"] body.g-app .g-field select option{background:var(--identity-surface);color:var(--identity-text);}
:root[data-theme="light"] body.g-app input[type="date"]::-webkit-calendar-picker-indicator,
:root[data-theme="light"] body.g-app input[type="month"]::-webkit-calendar-picker-indicator{filter:none;}
:root[data-theme="light"] body.g-app input:-webkit-autofill,
:root[data-theme="light"] body.g-app input:-webkit-autofill:hover,
:root[data-theme="light"] body.g-app input:-webkit-autofill:focus{-webkit-text-fill-color:var(--identity-surface-soft);box-shadow:0 0 0 1000px var(--identity-shadow-color) inset!important;}
:root[data-theme="light"] body.g-app .g-primary,
:root[data-theme="light"] body.g-app .g-send-button{background:linear-gradient(135deg,var(--identity-primary),var(--identity-primary));color:var(--identity-on-primary);}
:root[data-theme="light"] body.g-app .g-secondary{background:var(--identity-surface);color:var(--identity-text);border-color:var(--identity-border);}
:root[data-theme="light"] body.g-app .g-upload{background:var(--identity-surface);border-color:var(--identity-border);color:var(--identity-muted);}
:root[data-theme="light"] body.g-app .g-attachment{background:var(--identity-surface);border-color:var(--identity-border);color:var(--identity-text);}
:root[data-theme="light"] body.g-app .g-bubble--mine{background:var(--identity-surface-soft);border-color:var(--identity-border);color:var(--identity-text);}
:root[data-theme="light"] body.g-app .g-bubble--admin{background:var(--identity-surface);border-color:var(--identity-border);color:var(--identity-text);}
:root[data-theme="light"] body.g-app .g-bubble p{color:var(--identity-text);}
:root[data-theme="light"] body.g-app .g-info-strip{background:var(--identity-surface-soft);color:var(--identity-primary-text);}
:root[data-theme="light"] body.g-app .g-info-strip strong{background:var(--identity-surface);}
:root[data-theme="light"] body.g-app .g-notification-card--unread,
:root[data-theme="light"] body.g-app .g-announcement-card.is-unread{background:var(--identity-surface);border-color:var(--identity-border);}
:root[data-theme="light"] body.g-app .g-notification-content p,
:root[data-theme="light"] body.g-app .g-announcement-card p{color:var(--identity-muted);}
:root[data-theme="light"] body.g-app .g-pager a,
:root[data-theme="light"] body.g-app .g-pager>span{background:var(--identity-surface);color:var(--identity-muted);border-color:var(--identity-border);}
:root[data-theme="light"] body.g-app .g-status-pill--present,
:root[data-theme="light"] body.g-app .g-status-pill--approved{background:var(--identity-surface-soft);color:var(--identity-success);}
:root[data-theme="light"] body.g-app .g-status-pill--late,
:root[data-theme="light"] body.g-app .g-status-pill--pending,
:root[data-theme="light"] body.g-app .g-priority--important{background:var(--identity-surface-soft);color:var(--identity-primary-text);}
:root[data-theme="light"] body.g-app .g-status-pill--absent,
:root[data-theme="light"] body.g-app .g-status-pill--rejected,
:root[data-theme="light"] body.g-app .g-priority--urgent{background:var(--identity-surface);color:var(--identity-danger);}
:root[data-theme="light"] body.g-app .g-status-pill--excused{background:var(--identity-surface);color:var(--identity-text);}
:root[data-theme="light"] body.g-app .g-status-pill--holiday,
:root[data-theme="light"] body.g-app .g-status-pill--cancelled{background:var(--identity-surface);color:var(--identity-muted);}
:root[data-theme="light"] body.g-app .g-progress,
:root[data-theme="light"] body.g-app .g-result-progress{background:var(--identity-surface-soft);}
:root[data-theme="light"] body.g-app .g-rate-grid i{background:linear-gradient(to left,var(--g-accent) var(--rate),var(--identity-surface-soft) var(--rate));}
:root[data-theme="light"] body.g-app .g-month-switcher--polished{background:var(--identity-surface);border-color:var(--identity-border);}
:root[data-theme="light"] body.g-app .g-rate-card--attendance{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));border-color:var(--identity-border)!important;}
:root[data-theme="light"] body.g-app .g-rate-card--punctuality{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));border-color:var(--identity-border)!important;}
:root[data-theme="light"] body.g-app .g-rate-card--attendance strong{color:var(--identity-success);}
:root[data-theme="light"] body.g-app .g-rate-card--punctuality strong{color:var(--identity-violet);}
:root[data-theme="light"] body.g-app .g-rate-card--attendance i{background:linear-gradient(to left,var(--identity-success-soft) var(--rate),var(--identity-surface-soft) var(--rate));}
:root[data-theme="light"] body.g-app .g-rate-card--punctuality i{background:linear-gradient(to left,var(--identity-violet-soft) var(--rate),var(--identity-surface-soft) var(--rate));}
:root[data-theme="light"] body.g-app .g-month-days--polished .g-month-day{background:var(--identity-surface);border-color:var(--identity-border);}
:root[data-theme="light"] body.g-app .g-academic-tone--cyan{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface))!important;}
:root[data-theme="light"] body.g-app .g-academic-tone--violet{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface))!important;}
:root[data-theme="light"] body.g-app .g-academic-tone--amber{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface))!important;}
:root[data-theme="light"] body.g-app .g-academic-tone--green{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface))!important;}
:root[data-theme="light"] body.g-app .g-grade-summary-card span,
:root[data-theme="light"] body.g-app .g-grade-summary-card small,
:root[data-theme="light"] body.g-app .g-result-card__meta span,
:root[data-theme="light"] body.g-app .g-result-score span,
:root[data-theme="light"] body.g-app .g-result-note{color:var(--identity-muted);}
:root[data-theme="light"] body.g-app .g-result-card__meta span,
:root[data-theme="light"] body.g-app .g-result-state{background:var(--identity-surface);}
:root[data-theme="light"] body.g-app .g-grade-summary-card--average strong,
:root[data-theme="light"] body.g-app .g-result-card--good .g-result-state,
:root[data-theme="light"] body.g-app .g-result-card--good .g-result-score strong{color:var(--identity-success);}
:root[data-theme="light"] body.g-app .g-grade-summary-card--count strong{color:var(--identity-primary-text);}
:root[data-theme="light"] body.g-app .g-result-card--warning .g-result-state,
:root[data-theme="light"] body.g-app .g-result-card--warning .g-result-score strong{color:var(--identity-warning);}
:root[data-theme="light"] body.g-app .g-result-card--low .g-result-state,
:root[data-theme="light"] body.g-app .g-result-card--low .g-result-score strong,
:root[data-theme="light"] body.g-app .g-result-card--absent .g-result-state,
:root[data-theme="light"] body.g-app .g-result-card--absent .g-result-score strong{color:var(--identity-danger);}
:root[data-theme="light"] body.g-app .g-result-card--excused .g-result-state,
:root[data-theme="light"] body.g-app .g-result-card--excused .g-result-score strong{color:var(--identity-text);}
:root[data-theme="light"] body.g-app .g-schedule-image-card--polished img{background:var(--identity-surface);}
:root[data-theme="light"] body.g-app .g-week-strip--polished{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));border-color:var(--identity-border);color:var(--identity-muted);}
:root[data-theme="light"] body.g-app .g-week-strip--polished strong{color:var(--identity-primary-text);}
:root[data-theme="light"] body.g-app .g-schedule-week--polished .g-schedule-day__head{background:var(--identity-surface);border-color:var(--identity-border);}
:root[data-theme="light"] body.g-app .g-schedule-week--polished .g-schedule-day__head span,
:root[data-theme="light"] body.g-app .g-schedule-subject small,
:root[data-theme="light"] body.g-app .g-schedule-time,
:root[data-theme="light"] body.g-app .g-schedule-empty-day{color:var(--identity-muted);}
:root[data-theme="light"] body.g-app .g-schedule-lesson{border-color:var(--identity-border);}
:root[data-theme="light"] body.g-app .g-schedule-period{background:var(--identity-surface-soft);color:var(--identity-primary-text);}

/* Teacher - complete light coverage, including messaging and grade entry. */
:root[data-theme="light"] body.tp-body,
:root[data-theme="light"] body.tp-login-body{background:var(--identity-background);color:var(--identity-text);background-image:none;}
:root[data-theme="light"] body.tp-body .tp-eyebrow{color:var(--identity-primary-text);}
:root[data-theme="light"] body.tp-body .tp-page-subtitle,
:root[data-theme="light"] body.tp-body .tp-hero-meta,
:root[data-theme="light"] body.tp-body .tp-stat-label,
:root[data-theme="light"] body.tp-body .tp-section-hint,
:root[data-theme="light"] body.tp-body .tp-action-text,
:root[data-theme="light"] body.tp-body .tp-scope-sub,
:root[data-theme="light"] body.tp-body .tp-subject-meta,
:root[data-theme="light"] body.tp-body .tp-item-meta,
:root[data-theme="light"] body.tp-body .tp-message-time,
:root[data-theme="light"] body.tp-body .tp-login-subtitle,
:root[data-theme="light"] body.tp-login-body .tp-login-subtitle,
:root[data-theme="light"] body.tp-login-body .tp-login-foot{color:var(--identity-muted);}
:root[data-theme="light"] body.tp-body .tp-card,
:root[data-theme="light"] body.tp-body .tp-card-soft,
:root[data-theme="light"] body.tp-body .tp-panel,
:root[data-theme="light"] body.tp-login-body .tp-login-card{background:var(--identity-surface);color:var(--identity-text);border-color:var(--identity-border);box-shadow:var(--tp-shadow);}
:root[data-theme="light"] body.tp-body .tp-hero{background:linear-gradient(125deg,var(--identity-hero-start),var(--identity-hero-end));border-color:var(--identity-hero-end);}
:root[data-theme="light"] body.tp-body .tp-hero::before{background:color-mix(in srgb, var(--identity-hero-end) 8.000%, transparent);}
:root[data-theme="light"] body.tp-body .tp-hero::after{background:color-mix(in srgb, var(--identity-hero-end) 6.000%, transparent);}
:root[data-theme="light"] body.tp-body .tp-avatar{background:linear-gradient(145deg,var(--identity-surface-soft),var(--identity-surface));border-color:var(--identity-border);color:var(--identity-primary-text);}
:root[data-theme="light"] body.tp-body .tp-stat-mini{background:var(--identity-surface);border-color:var(--identity-border);}
:root[data-theme="light"] body.tp-body .tp-action-icon,
:root[data-theme="light"] body.tp-body .tp-scope-dot,
:root[data-theme="light"] body.tp-body .tp-empty-icon,
:root[data-theme="light"] body.tp-body .tp-subject-icon,
:root[data-theme="light"] body.tp-body .tp-message-avatar{background:var(--identity-surface);color:var(--identity-primary-text);}
:root[data-theme="light"] body.tp-body .tp-action-card.purple .tp-action-icon,
:root[data-theme="light"] body.tp-body .tp-subject-card:nth-child(4n/**/+2) .tp-subject-icon{background:var(--identity-surface);color:var(--identity-violet);}
:root[data-theme="light"] body.tp-body .tp-action-card.blue .tp-action-icon{background:var(--identity-surface);color:var(--identity-primary-text);}
:root[data-theme="light"] body.tp-body .tp-subject-card:nth-child(4n/**/+3) .tp-subject-icon{background:var(--identity-surface-soft);color:var(--identity-success);}
:root[data-theme="light"] body.tp-body .tp-subject-card:nth-child(4n/**/+4) .tp-subject-icon{background:var(--identity-surface-soft);color:var(--identity-primary-text);}
:root[data-theme="light"] body.tp-body .tp-empty{background:var(--identity-surface);border-color:var(--identity-border);color:var(--identity-muted);}
:root[data-theme="light"] body.tp-body .tp-btn-secondary{background:var(--identity-surface);color:var(--identity-muted);border-color:var(--identity-border);}
:root[data-theme="light"] body.tp-body .tp-btn-danger{background:var(--identity-surface);color:var(--identity-danger);border-color:var(--identity-danger);}
:root[data-theme="light"] body.tp-body .tp-btn-purple{background:var(--identity-surface);color:var(--identity-violet);border-color:var(--identity-primary);}
:root[data-theme="light"] body.tp-body .tp-btn-primary{color:var(--identity-on-primary);}
:root[data-theme="light"] body.tp-body .tp-subject-chevron{color:var(--identity-muted);}
:root[data-theme="light"] body.tp-body .tp-badge-cyan{background:var(--identity-surface-soft);color:var(--identity-primary-text);border-color:var(--identity-border);}
:root[data-theme="light"] body.tp-body .tp-badge-green{background:var(--identity-surface-soft);color:var(--identity-success);border-color:var(--identity-border);}
:root[data-theme="light"] body.tp-body .tp-badge-amber{background:var(--identity-surface-soft);color:var(--identity-primary-text);border-color:var(--identity-primary-text);}
:root[data-theme="light"] body.tp-body .tp-badge-purple{background:var(--identity-surface);color:var(--identity-violet);border-color:var(--identity-border);}
:root[data-theme="light"] body.tp-body .tp-badge-red{background:var(--identity-surface);color:var(--identity-danger);border-color:var(--identity-danger);}
:root[data-theme="light"] body.tp-body .tp-item-body{color:var(--identity-muted);}
:root[data-theme="light"] body.tp-body .tp-assessment-card{border-color:var(--identity-border);border-inline-end-color:var(--identity-violet);}
:root[data-theme="light"] body.tp-body .tp-score-row{background:var(--identity-surface);border-color:var(--identity-border);}
:root[data-theme="light"] body.tp-body .tp-student-name{color:var(--identity-text);}
:root[data-theme="light"] body.tp-body .tp-alert-success{background:var(--identity-surface-soft);border-color:var(--identity-success);color:var(--identity-success);}
:root[data-theme="light"] body.tp-body .tp-alert-error{background:var(--identity-surface);border-color:var(--identity-danger);color:var(--identity-danger);}
:root[data-theme="light"] body.tp-login-body .tp-login-logo{background:linear-gradient(145deg,var(--identity-surface-soft),var(--identity-surface));border-color:var(--identity-border);color:var(--identity-primary-text);box-shadow:0 18px 45px color-mix(in srgb, var(--identity-shadow-color) 8.000%, transparent);}

/* Neutral print closure. */
@media print{:root[data-theme="light"] body{background:#fff!important;color:#000!important}.theme-toggle,.ui-modal-backdrop,.ui-toast-stack{display:none!important}}

/* Phase05-B residual component closure from full class audit. */
:root[data-theme="light"] body.admin-body .attendance-kpi,
:root[data-theme="light"] body.admin-body .leave-kpi,
:root[data-theme="light"] body.admin-body .student-summary-strip>div,
:root[data-theme="light"] body.admin-body .structure-summary>div,
:root[data-theme="light"] body.admin-body .profile-stat-grid>div,
:root[data-theme="light"] body.admin-body .school-structure-card,
:root[data-theme="light"] body.admin-body .day-summary-grid>div,
:root[data-theme="light"] body.admin-body .schedule-school-card,
:root[data-theme="light"] body.admin-body .assessment-card,
:root[data-theme="light"] body.admin-body .archive-panel,
:root[data-theme="light"] body.admin-body .identity-student-row,
:root[data-theme="light"] body.admin-body .guardian-selected-card,
:root[data-theme="light"] body.admin-body .request-reason,
:root[data-theme="light"] body.admin-body .auto-pin-note,
:root[data-theme="light"] body.admin-body .selection-note{background:var(--identity-surface);color:var(--identity-text);border-color:var(--identity-border);box-shadow:var(--shadow-soft);}
:root[data-theme="light"] body.admin-body .check-grid .check,
:root[data-theme="light"] body.admin-body .override-item,
:root[data-theme="light"] body.admin-body .date-shell{background:var(--identity-surface);color:var(--identity-muted);border-color:var(--identity-border);}
:root[data-theme="light"] body.admin-body .attendance-live-bar{background:var(--identity-surface);border-color:var(--identity-border);color:var(--identity-success);}
:root[data-theme="light"] body.admin-body .identity-tip{background:var(--identity-surface);color:var(--identity-muted);border-color:var(--identity-border);}
:root[data-theme="light"] body.admin-body .identity-tech-details code{background:var(--identity-surface);color:var(--identity-text);border-color:var(--identity-border);}
:root[data-theme="light"] body.admin-body .approve-btn{background:var(--identity-surface-soft)!important;color:var(--identity-success)!important;border-color:var(--identity-primary)!important;}
:root[data-theme="light"] body.admin-body .capture-stop{background:var(--identity-surface)!important;color:var(--identity-danger)!important;border-color:var(--identity-danger)!important;}
:root[data-theme="light"] body.admin-body .metric-icon{color:var(--identity-primary-text);}
:root[data-theme="light"] body.admin-body .auth-mark{background:linear-gradient(145deg,var(--identity-surface-soft),var(--identity-surface));border-color:var(--identity-border);color:var(--identity-primary-text);}
:root[data-theme="light"] body.admin-body .qr,
:root[data-theme="light"] body.admin-body .barcode,
:root[data-theme="light"] body.admin-body .qr-code,
:root[data-theme="light"] body.admin-body .barcode-code{background:var(--identity-surface)!important;color:var(--identity-text)!important;border-color:var(--identity-border)!important;}

:root[data-theme="light"] body.g-app .g-soft-action,
:root[data-theme="light"] body.g-app .g-back,
:root[data-theme="light"] body.g-app .g-count-chip,
:root[data-theme="light"] body.g-app .g-grade-pct,
:root[data-theme="light"] body.g-app .g-notification-icon,
:root[data-theme="light"] body.g-app .g-attach-button{background:var(--identity-surface);color:var(--identity-muted);border-color:var(--identity-border);}
:root[data-theme="light"] body.g-app .g-push-enable{background:var(--identity-surface-soft);color:var(--identity-primary-text);border-color:var(--identity-border);}
:root[data-theme="light"] body.g-app .g-push-enable:disabled{background:var(--identity-surface-soft);color:var(--identity-success);border-color:var(--identity-border);}
:root[data-theme="light"] body.g-app .g-attendance-day,
:root[data-theme="light"] body.g-app .g-leave-card,
:root[data-theme="light"] body.g-app .g-chat-head,
:root[data-theme="light"] body.g-app .g-reply-box,
:root[data-theme="light"] body.g-app .g-homework-summary--polished,
:root[data-theme="light"] body.g-app .g-homework-card--polished{background:var(--identity-surface);color:var(--identity-text);border-color:var(--identity-border);box-shadow:var(--g-shadow);}
:root[data-theme="light"] body.g-app .g-student-meta,
:root[data-theme="light"] body.g-app .g-appointment-meta>span{border-color:var(--identity-border);}
:root[data-theme="light"] body.g-app .g-student-avatar,
:root[data-theme="light"] body.g-app .g-mini-avatar,
:root[data-theme="light"] body.g-app .g-thread-avatar{background:var(--identity-surface);color:var(--identity-primary-text);border-color:var(--identity-border);}
:root[data-theme="light"] body.g-app .g-status-dot{border-color:var(--identity-border);}
:root[data-theme="light"] body.g-app .g-metric{background:var(--identity-surface);border-color:var(--identity-border);color:var(--identity-text);}
:root[data-theme="light"] body.g-app .g-metric--school-days{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));}
:root[data-theme="light"] body.g-app .g-metric--present{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));}
:root[data-theme="light"] body.g-app .g-metric--late{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));}
:root[data-theme="light"] body.g-app .g-metric--absent{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));}
:root[data-theme="light"] body.g-app .g-metric--excused{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));}
:root[data-theme="light"] body.g-app .g-metric--early{background:linear-gradient(145deg,var(--identity-surface),var(--identity-surface));}
:root[data-theme="light"] body.g-app .g-toast--danger,
:root[data-theme="light"] body.g-app .g-auth-error{background:var(--identity-surface);color:var(--identity-danger);border-color:var(--identity-danger);}
:root[data-theme="light"] body.g-app .g-auth-mobile-logo,
:root[data-theme="light"] body.g-app .g-auth-logo{background:linear-gradient(145deg,var(--identity-surface-soft),var(--identity-surface));color:var(--identity-primary-text);border-color:var(--identity-border);}
:root[data-theme="light"] body.g-app .g-auth-feature>span{background:var(--identity-surface-soft);color:var(--identity-primary-text);}
:root[data-theme="light"] body.g-app .g-subject-grade-card__icon,
:root[data-theme="light"] body.g-app .g-academic-card__icon{box-shadow:none;}
:root[data-theme="light"] body.g-app .g-subject-grade-card__count{background:var(--identity-surface);color:var(--identity-muted);}
:root[data-theme="light"] body.g-app .g-homework-due{background:var(--identity-surface-soft);color:var(--identity-primary-text);}
:root[data-theme="light"] body.g-app .g-homework-body{color:var(--identity-muted);}
:root[data-theme="light"] body.g-app .g-homework-image img{background:var(--identity-surface);border-color:var(--identity-border);}
