/* Al Qima portal palette: ivory, deep blue and warm bronze from the school crest. */
:root[data-theme="light"]{
  --g-bg:#f7f3eb;--g-surface:#fffdfa;--g-surface-2:#f9f4eb;
  --g-ink:#18233c;--g-muted:#58647a;--g-line:#ded2be;
  --g-brand:#142955;--g-brand-2:#24477a;--g-accent:#9a6324;
  --g-accent-soft:#f5e8d2;--g-shadow:0 14px 36px rgba(30,39,66,.08);
  --tp-bg:#f7f3eb;--tp-bg-2:#f9f4eb;--tp-surface:#fffdfa;
  --tp-surface-2:#f9f4eb;--tp-surface-3:#f3e9d9;
  --tp-line:#ded2be;--tp-text:#18233c;--tp-muted:#58647a;
  --tp-muted-2:#69758a;--tp-cyan:#9a6324;--tp-cyan-2:#84531f;
  --tp-blue:#24477a;--tp-shadow:0 14px 36px rgba(30,39,66,.08);
}
:root[data-theme="light"] body.g-app,
:root[data-theme="light"] .g-shell,
:root[data-theme="light"] body.tp-body,
:root[data-theme="light"] .tp-shell{background:#f7f3eb;color:#18233c}
:root[data-theme="light"] .g-header,
:root[data-theme="light"] .tp-topbar,
:root[data-theme="light"] .g-bottom-nav,
:root[data-theme="light"] .tp-mobile-nav{background:rgba(255,253,250,.97);border-color:#ded2be}
:root[data-theme="light"] .g-brand__text strong,
:root[data-theme="light"] .tp-brand-title{color:#142955}
:root[data-theme="light"] .g-brand__text small,
:root[data-theme="light"] .tp-brand-subtitle{color:#58647a}
:root[data-theme="light"] .g-welcome,
:root[data-theme="light"] .tp-hero,
:root[data-theme="light"] .tp-welcome{background:linear-gradient(125deg,#142955,#24477a);color:#fff;border-color:#24477a}
:root[data-theme="light"] .g-welcome h1,
:root[data-theme="light"] .tp-hero h1,
:root[data-theme="light"] .tp-welcome h1{color:#fff}
:root[data-theme="light"] .g-welcome p,
:root[data-theme="light"] .tp-hero p{color:#e7edf8}
:root[data-theme="light"] body.g-app .g-welcome{background:linear-gradient(125deg,#142955,#24477a);color:#fff;border-color:#24477a}
:root[data-theme="light"] body.g-app .g-welcome h1{color:#fff}
:root[data-theme="light"] body.g-app .g-welcome p{color:#e7edf8}
:root[data-theme="light"] body.g-app .g-welcome .g-eyebrow{color:#f3d69f}
:root[data-theme="light"] body.g-app .g-service-links--home a:first-child,
:root[data-theme="light"] body.g-app .g-service-links--home a:last-child{background:linear-gradient(145deg,#fffdfa,#f5e8d2);border-color:#ded2be;color:#18233c}
:root[data-theme="light"] body.g-app .g-child-card{background:linear-gradient(145deg,#fffdfa,#f9f4eb);border-color:#ded2be}
:root[data-theme="light"] body.g-auth .g-input-wrap,
:root[data-theme="light"] body.g-auth .g-input-wrap input{background:#fffdfa;color:#18233c;border-color:#c9b99f}
:root[data-theme="light"] body.g-auth .portal-mode-switch{background:#f3e9d9!important;border-color:#ded2be!important}
:root[data-theme="light"] body.g-auth .portal-mode-switch button.active{color:#142955!important}
:root[data-theme="light"] body.tp-body .tp-hero{background:linear-gradient(125deg,#142955,#24477a);border-color:#24477a;color:#fff}
:root[data-theme="light"] body.tp-body .tp-hero-name{color:#fff}
:root[data-theme="light"] body.tp-body .tp-hero-meta{color:#e7edf8}
:root[data-theme="light"] body.tp-body .tp-hero .tp-eyebrow{color:#f3d69f}
:root[data-theme="light"] body.tp-body .tp-hero::before{background:rgba(255,255,255,.09)}
:root[data-theme="light"] body.tp-body .tp-hero::after{background:rgba(227,185,113,.10)}
:root[data-theme="light"] body.tp-body .tp-hero .tp-stat-number{color:#142955}
:root[data-theme="light"] .g-card,
:root[data-theme="light"] .g-child-card,
:root[data-theme="light"] .g-detail-card,
:root[data-theme="light"] .g-alert-strip,
:root[data-theme="light"] .tp-card,
:root[data-theme="light"] .tp-card-soft{background:#fffdfa;color:#18233c;border-color:#ded2be;box-shadow:0 12px 30px rgba(30,39,66,.07)}
:root[data-theme="light"] .g-primary,
:root[data-theme="light"] .tp-btn-primary,
:root[data-theme="light"] .tp-mobile-nav a.is-active{background:#142955!important;color:#fff!important;border-color:#142955!important}
:root[data-theme="light"] .g-primary:hover,
:root[data-theme="light"] .tp-btn-primary:hover{background:#24477a!important;border-color:#24477a!important}
:root[data-theme="light"] .g-desktop-nav a.active,
:root[data-theme="light"] .g-bottom-nav a.active,
:root[data-theme="light"] .tp-nav-link.is-active{background:#f5e8d2;color:#724718;border-color:#e8cfaa}
:root[data-theme="light"] .g-eyebrow,
:root[data-theme="light"] .tp-eyebrow,
:root[data-theme="light"] .g-announcement-inline-image+a{color:#7a4b17}
:root[data-theme="light"] .g-icon-btn,
:root[data-theme="light"] .tp-input,
:root[data-theme="light"] .tp-select,
:root[data-theme="light"] .tp-textarea,
:root[data-theme="light"] .tp-upload,
:root[data-theme="light"] .g-app input,
:root[data-theme="light"] .g-app select,
:root[data-theme="light"] .g-app textarea{background:#fffdfa;color:#18233c;border-color:#c9b99f}
:root[data-theme="light"] .g-app input:focus,
:root[data-theme="light"] .g-app select:focus,
:root[data-theme="light"] .g-app textarea:focus,
:root[data-theme="light"] .tp-input:focus,
:root[data-theme="light"] .tp-select:focus,
:root[data-theme="light"] .tp-textarea:focus{border-color:#9a6324;outline:2px solid rgba(154,99,36,.24);outline-offset:1px}
:root[data-theme="light"] a:focus-visible,
:root[data-theme="light"] button:focus-visible{outline:3px solid #aa762f;outline-offset:2px}
:root[data-theme="light"] .g-detail-body,
:root[data-theme="light"] .g-section-heading h2,
:root[data-theme="light"] .tp-card h2{color:#18233c}
:root[data-theme="light"] .g-announcement-inline-image img{background:#fffdfa!important;border-color:#ded2be!important}
:root[data-theme="light"] body.g-auth,
:root[data-theme="light"] body.tp-login-body,
:root[data-theme="light"] body.install-body,
:root[data-theme="light"] body.teacher-install-body{background:#f7f3eb;color:#18233c}
@media (prefers-reduced-motion:reduce){:root[data-theme="light"] *, :root[data-theme="light"] *::before, :root[data-theme="light"] *::after{scroll-behavior:auto!important;animation-duration:.01ms!important}}

/* Warm walnut refinement. Scope these rules to the light portals only. */
:root[data-theme="light"]{
  --g-bg:#ece4d9;--g-surface:#fffaf3;--g-surface-2:#f5ede2;
  --g-ink:#302720;--g-muted:#66584c;--g-line:#d8c5b3;
  --g-brand:#674836;--g-brand-2:#805b45;--g-accent:#805132;
  --g-accent-soft:#efe0ce;--g-shadow:0 14px 34px rgba(73,47,31,.10);
  --tp-bg:#ece4d9;--tp-bg-2:#f5ede2;--tp-surface:#fffaf3;
  --tp-surface-2:#f5ede2;--tp-surface-3:#eadbc9;
  --tp-line:#d8c5b3;--tp-text:#302720;--tp-muted:#66584c;
  --tp-muted-2:#766554;--tp-cyan:#805132;--tp-cyan-2:#67412a;
  --tp-blue:#805b45;--tp-shadow:0 14px 34px rgba(73,47,31,.10);
}
:root[data-theme="light"] body.g-app,
:root[data-theme="light"] .g-shell,
:root[data-theme="light"] body.tp-body,
:root[data-theme="light"] .tp-shell,
:root[data-theme="light"] body.g-auth,
:root[data-theme="light"] body.tp-login-body{background:#ece4d9;color:#302720}
:root[data-theme="light"] body.g-auth .g-auth-shell{background:#ece4d9}
:root[data-theme="light"] body.g-auth .g-auth-brand{background:linear-gradient(145deg,#674836,#805b45);color:#fff8ef;border-color:#674836}
:root[data-theme="light"] body.g-auth .g-auth-brand h1,
:root[data-theme="light"] body.g-auth .g-auth-feature strong{color:#fffaf3}
:root[data-theme="light"] body.g-auth .g-auth-kicker{color:#f8ddb3}
:root[data-theme="light"] body.g-auth .g-auth-brand>p,
:root[data-theme="light"] body.g-auth .g-auth-feature small{color:#f2e0cf}
:root[data-theme="light"] body.g-auth .g-auth-feature>span{background:rgba(255,250,243,.17);color:#fffaf3}
:root[data-theme="light"] body.g-auth .g-auth-card{background:#fffaf3;color:#302720;border-color:#d8c5b3;box-shadow:0 24px 60px rgba(73,47,31,.15)}
:root[data-theme="light"] body.g-auth .g-auth-card__head h2,
:root[data-theme="light"] body.g-auth .g-field>span:first-child{color:#3c3027}
:root[data-theme="light"] body.g-auth .g-auth-card__head small,
:root[data-theme="light"] body.g-auth .g-auth-install-link{color:#70432a}
:root[data-theme="light"] body.g-auth .g-input-wrap svg{color:#705b4c}
:root[data-theme="light"] body.g-auth .portal-mode-switch{background:#efe3d4!important;border-color:#d8c5b3!important}
:root[data-theme="light"] body.g-auth .portal-mode-switch button{color:#624f41!important}
:root[data-theme="light"] body.g-auth .portal-mode-switch button.active{background:#fffaf3!important;color:#67412a!important;box-shadow:0 3px 12px rgba(73,47,31,.13)!important}
:root[data-theme="light"] body.g-auth .g-primary,
:root[data-theme="light"] body.g-app .g-primary,
:root[data-theme="light"] body.tp-body .tp-btn-primary{background:#67412e!important;color:#fffaf3!important;border-color:#67412e!important;box-shadow:0 8px 20px rgba(103,65,46,.20)}
:root[data-theme="light"] body.g-auth .g-primary:hover,
:root[data-theme="light"] body.g-app .g-primary:hover,
:root[data-theme="light"] body.tp-body .tp-btn-primary:hover{background:#835437!important;border-color:#835437!important}
:root[data-theme="light"] body.g-app .g-welcome{background:linear-gradient(125deg,#674836,#805b45);border-color:#805b45;color:#fffaf3}
:root[data-theme="light"] body.g-app .g-welcome h1{color:#fffaf3}
:root[data-theme="light"] body.g-app .g-welcome p{color:#f3e5d6}
:root[data-theme="light"] body.g-app .g-welcome .g-eyebrow{color:#f8ddb3}
:root[data-theme="light"] body.g-app .g-child-card,
:root[data-theme="light"] body.g-app .g-page-hero,
:root[data-theme="light"] body.g-app .g-form-card,
:root[data-theme="light"] body.g-app .g-detail-card{background:#fffaf3;color:#302720;border-color:#d8c5b3}
:root[data-theme="light"] body.g-app .g-service-links--home a,
:root[data-theme="light"] body.g-app .g-action-tile,
:root[data-theme="light"] body.g-app .g-today-times>div{background:#f7efe5;border:1px solid #dfcdb9;color:#302720}
:root[data-theme="light"] body.g-app .g-service-links--home a:hover,
:root[data-theme="light"] body.g-app .g-action-tile:hover{background:#f0dfcb;border-color:#a87855}
:root[data-theme="light"] body.g-app .g-action-tile>span,
:root[data-theme="light"] body.g-app .g-service-links--home a>span{background:#ead6be;color:#67412e}
:root[data-theme="light"] body.g-app .g-page-hero h1,
:root[data-theme="light"] body.g-app .g-section-heading h2,
:root[data-theme="light"] body.g-app .g-action-tile b{color:#302720}
:root[data-theme="light"] body.g-app .g-field>span:first-child,
:root[data-theme="light"] body.g-app .g-absence-justify summary{color:#67412e}
:root[data-theme="light"] body.g-app .g-justify-form textarea{background:#fffaf3;color:#302720;border-color:#c6aa91}
:root[data-theme="light"] body.g-app .g-absence-link{display:flex;align-items:center;justify-content:space-between;margin-top:12px;padding:10px 13px;border-radius:12px;background:#ead6be;color:#573b2a;font-weight:800;font-size:12px;text-decoration:none}
:root[data-theme="light"] body.g-app .g-absence-link:hover{background:#dfc3a3}
:root[data-theme="light"] body.g-app .g-absence-guide{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:17px;padding:17px 19px;background:#fff6eb;border:1px solid #d9bea4;border-radius:18px}
:root[data-theme="light"] body.g-app .g-absence-guide h2{margin:0;color:#493321;font-size:18px}
:root[data-theme="light"] body.g-app .g-absence-guide p{margin:5px 0 0;color:#66584c;font-size:12px;line-height:1.7}
:root[data-theme="light"] body.g-app .g-absence-guide__status{color:#684a36;font-size:12px;font-weight:700}
:root[data-theme="light"] body.g-app .g-attendance-day:target{outline:3px solid #a87855;outline-offset:2px}
@media(max-width:620px){:root[data-theme="light"] body.g-app .g-absence-guide{display:grid;padding:15px}}

/* Give the three school services their own quiet, readable colors. */
:root[data-theme="light"] body.g-app .g-action-tile--attendance{background:#edf5ef;border-color:#a8c9af}
:root[data-theme="light"] body.g-app .g-action-tile--attendance>span{background:#d3e8d9;color:#245c3a}
:root[data-theme="light"] body.g-app .g-action-tile--attendance:hover{background:#e0eee3;border-color:#6fa77b}
:root[data-theme="light"] body.g-app .g-action-tile--grades{background:#eef0f9;border-color:#b8bedc}
:root[data-theme="light"] body.g-app .g-action-tile--grades>span{background:#dfe3f4;color:#3d4d82}
:root[data-theme="light"] body.g-app .g-action-tile--grades:hover{background:#e1e5f4;border-color:#8994c5}
:root[data-theme="light"] body.g-app .g-action-tile--homework{background:#fff2e7;border-color:#ddb994}
:root[data-theme="light"] body.g-app .g-action-tile--homework>span{background:#f3dbc3;color:#774521}
:root[data-theme="light"] body.g-app .g-action-tile--homework:hover{background:#f9e8d8;border-color:#bb8557}
:root[data-theme="light"] body.g-app .g-action-tile--schedule{background:#f4efe8;border-color:#d4bd9f}
:root[data-theme="light"] body.g-app .g-action-tile--schedule>span{background:#e8d7c2;color:#67412e}

/* Attendance counters keep the same meaning in the light palette. */
:root[data-theme="light"] body.g-app .g-metric{color:#302720}
:root[data-theme="light"] body.g-app .g-metric span,
:root[data-theme="light"] body.g-app .g-metric small{color:#61564c}
:root[data-theme="light"] body.g-app .g-metric--school-days{background:#edf1fa;border-color:#b9c5df}
:root[data-theme="light"] body.g-app .g-metric--school-days strong{color:#35578c}
:root[data-theme="light"] body.g-app .g-metric--present{background:#eaf5ed;border-color:#9fcaab}
:root[data-theme="light"] body.g-app .g-metric--present strong{color:#236341}
:root[data-theme="light"] body.g-app .g-metric--late{background:#fff2df;border-color:#dfbd82}
:root[data-theme="light"] body.g-app .g-metric--late strong{color:#895417}
:root[data-theme="light"] body.g-app .g-metric--absent{background:#faeded;border-color:#dfaaaa}
:root[data-theme="light"] body.g-app .g-metric--absent strong{color:#9c353f}
:root[data-theme="light"] body.g-app .g-metric--excused{background:#eaf0fa;border-color:#abc0dd}
:root[data-theme="light"] body.g-app .g-metric--excused strong{color:#355f94}
:root[data-theme="light"] body.g-app .g-metric--early{background:#f4eef9;border-color:#c7b2da}
:root[data-theme="light"] body.g-app .g-metric--early strong{color:#6d4b88}

/* The dark portal's hover rules remain in app.css; replace them for light mode. */
:root[data-theme="light"] body.g-app .g-desktop-nav a,
:root[data-theme="light"] body.g-app .g-bottom-nav a{color:#624d3d}
:root[data-theme="light"] body.g-app .g-desktop-nav a:hover,
:root[data-theme="light"] body.g-app .g-desktop-nav a.active,
:root[data-theme="light"] body.g-app .g-bottom-nav a:hover,
:root[data-theme="light"] body.g-app .g-bottom-nav a.active{background:#ead8c3;color:#57351f;box-shadow:inset 0 0 0 1px #d7b594}
:root[data-theme="light"] body.g-app .g-icon-btn:hover,
:root[data-theme="light"] body.g-app .g-back:hover,
:root[data-theme="light"] body.g-app .g-secondary:hover{background:#ead8c3;color:#57351f;border-color:#d7b594}
:root[data-theme="light"] body.tp-body .tp-nav-link:hover,
:root[data-theme="light"] body.tp-body .tp-mobile-nav a:hover{background:#ead8c3;color:#57351f;border-color:#d7b594}

/* A slightly deeper walnut canvas, while keeping cards and field text legible. */
:root[data-theme="light"] body.g-app,
:root[data-theme="light"] body.g-app .g-shell{background:#e4d8ca;color:#302720}
:root[data-theme="light"] body.tp-body .tp-hero,
:root[data-theme="light"] body.tp-body .tp-welcome{background:linear-gradient(125deg,#573923,#79523a);border-color:#79523a;color:#fffaf3}
:root[data-theme="light"] body.tp-body .tp-hero h1,
:root[data-theme="light"] body.tp-body .tp-hero .tp-hero-name,
:root[data-theme="light"] body.tp-body .tp-hero .tp-eyebrow{color:#fffaf3}
:root[data-theme="light"] body.tp-body .tp-hero .tp-hero-meta,
:root[data-theme="light"] body.tp-body .tp-hero .tp-stat-label{color:#f0dfcb}
:root[data-theme="light"] body.tp-body .tp-hero .tp-stat-mini,
:root[data-theme="light"] body.tp-body .tp-hero .tp-avatar{background:rgba(255,247,237,.13);border-color:rgba(255,247,237,.27);color:#fffaf3}
:root[data-theme="light"] body.tp-body .tp-input,
:root[data-theme="light"] body.tp-body input,
:root[data-theme="light"] body.tp-body select,
:root[data-theme="light"] body.tp-body textarea{background:#fffaf3;color:#33261e;border-color:#c5a98f}
:root[data-theme="light"] body.tp-body .tp-input:focus,
:root[data-theme="light"] body.tp-body input:focus,
:root[data-theme="light"] body.tp-body select:focus,
:root[data-theme="light"] body.tp-body textarea:focus{border-color:#8e5c3b;outline-color:#8e5c3b}

/* Al Qima school brand: navy, orange, and a restrained warm background. */
:root[data-theme="light"]{--g-bg:#f2f0e9;--g-surface:#fffdf9;--g-surface-2:#f7f2e8;--g-ink:#142542;--g-muted:#536176;--g-line:#d9d4c9;--g-brand:#081d42;--g-brand-2:#173c73;--g-accent:#bf5900;--g-accent-soft:#fff0d8;--tp-bg:#f2f0e9;--tp-bg-2:#f7f2e8;--tp-surface:#fffdf9;--tp-surface-2:#f7f2e8;--tp-text:#142542;--tp-muted:#536176;--tp-cyan:#aa4f00;--tp-cyan-2:#874000;--tp-blue:#173c73}
:root[data-theme="light"] body.g-app,:root[data-theme="light"] .g-shell,:root[data-theme="light"] body.tp-body,:root[data-theme="light"] .tp-shell,:root[data-theme="light"] body.g-auth,:root[data-theme="light"] body.tp-login-body{background:#f2f0e9;color:#142542}
:root[data-theme="light"] .g-welcome,:root[data-theme="light"] body.g-app .g-welcome,:root[data-theme="light"] .tp-hero,:root[data-theme="light"] body.tp-body .tp-hero,:root[data-theme="light"] .tp-welcome{background:linear-gradient(125deg,#081d42,#173c73);border-color:#173c73;color:#fff}
:root[data-theme="light"] .g-primary,:root[data-theme="light"] .tp-btn-primary,:root[data-theme="light"] .tp-mobile-nav a.is-active{background:#081d42!important;border-color:#081d42!important;color:#fff!important}
:root[data-theme="light"] .g-primary:hover,:root[data-theme="light"] .tp-btn-primary:hover{background:#173c73!important;border-color:#173c73!important}
:root[data-theme="light"] .g-desktop-nav a.active,:root[data-theme="light"] .g-bottom-nav a.active,:root[data-theme="light"] .tp-nav-link.is-active{background:#fff0d8;color:#874000;border-color:#f0c99a}
:root[data-theme="light"] .g-brand__text strong,:root[data-theme="light"] .tp-brand-title{color:#081d42}
