/* Schools · Modern 2026 shared interface. Tenant theme variables remain authoritative. */
:root{--ui-sidebar-width:264px;--ui-line:#e5ebf4;--ui-ink:#203551;--ui-muted:#6d7f96;--ui-shadow:0 5px 20px rgba(26,47,82,.052);--ui-focus:color-mix(in srgb,var(--brand) 19%,transparent)}
body{font-size:14px;color:var(--ui-ink);background:#f6f8fc}
.app-shell{min-height:100vh;background:radial-gradient(ellipse at 88% 0%,color-mix(in srgb,var(--brand) 5%,#f7f9fc),#f7f9fc 48%,#f8f9fc)}
.main{margin-left:var(--ui-sidebar-width);min-width:0}
.sidebar{width:var(--ui-sidebar-width);padding:21px 13px 16px;background:linear-gradient(160deg,var(--sidebar-color),color-mix(in srgb,var(--sidebar-color) 73%,#121936))!important;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.26) transparent}
.brand-wrap{padding:3px 12px 18px}.brand-mark{width:43px;height:43px;flex:none;box-shadow:none}.brand{font-size:19px;letter-spacing:-.04em}
.tenant-card{margin:0 4px 15px;padding:13px 14px;border-radius:13px!important;background:rgba(255,255,255,.075);box-shadow:none}
.tenant-name{font-size:13.5px;line-height:1.4}
.sidebar .nav-title{display:flex;align-items:center;justify-content:space-between;color:rgba(230,238,255,.67)!important;font-size:10px;letter-spacing:.09em;padding:17px 12px 7px;font-weight:800}
.sidebar .nav-title[data-collapse-ready]{cursor:pointer;border-radius:8px;user-select:none}
.sidebar .nav-title[data-collapse-ready]:hover{background:rgba(255,255,255,.06);color:#fff!important}
.sidebar .nav-title[data-collapse-ready]::after{content:"";width:6px;height:6px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);transition:transform .16s;margin-right:4px}
.sidebar .nav-title[data-collapsed="true"]::after{transform:rotate(-45deg)}
.sidebar .nav-item{font-size:13px;min-height:41px;border-radius:10px;padding:10px 12px;gap:11px;font-weight:500}
.sidebar .nav-item:hover{background:rgba(255,255,255,.10)}
.sidebar .nav-item.is-active{background:rgba(255,255,255,.16);color:#fff;font-weight:750;box-shadow:inset 3px 0 var(--accent)!important}
.nav-glyph .school-icon{stroke-width:1.75}
.logout-wrap{padding:18px 5px 0}.logout-btn{font-weight:650}
.sidebar-search{padding:0 5px 8px;position:relative}
.sidebar-search svg{position:absolute;top:11px;left:17px;width:16px;height:16px;pointer-events:none;color:rgba(237,243,255,.7)}
.sidebar-search input{width:100%;height:39px;padding:0 12px 0 37px;color:#fff;font:inherit;font-size:12px;border-radius:10px;border:1px solid rgba(255,255,255,.16);outline:0;background:rgba(255,255,255,.075)}
.sidebar-search input::placeholder{color:rgba(239,245,255,.7)}
.sidebar-search input:focus{border-color:rgba(255,255,255,.48);box-shadow:0 0 0 3px rgba(255,255,255,.08)}
.sidebar-search-empty{display:none;color:#dce7f9;padding:11px;font-size:12px}
html[data-sidebar-style="light"] .sidebar{background:#fff!important;box-shadow:4px 0 18px rgba(32,50,81,.04)}
html[data-sidebar-style="light"] .sidebar .nav-title{color:#71839e!important}
html[data-sidebar-style="light"] .sidebar .nav-title:hover{color:var(--brand)!important;background:#f4f6fc}
html[data-sidebar-style="light"] .sidebar .nav-item.is-active{background:color-mix(in srgb,var(--brand) 11%,white);color:var(--brand);box-shadow:inset 3px 0 var(--brand)!important}
html[data-sidebar-style="light"] .sidebar-search input{color:#263d57;background:#f7f9fd;border-color:#e2e8f1}
html[data-sidebar-style="light"] .sidebar-search input::placeholder{color:#71849b}
html[data-sidebar-style="light"] .sidebar-search svg,html[data-sidebar-style="light"] .sidebar-search-empty{color:#8091a5}
.topbar{height:74px;padding:0 clamp(20px,2.3vw,38px);gap:14px;background:rgba(255,255,255,.95);border-bottom:1px solid #e9edf5;box-shadow:none;backdrop-filter:blur(14px)}
.topbar>div:first-child{min-width:0}
.top-title{font-size:18px;line-height:1.25;letter-spacing:-.025em;color:#1c2e48}
.top-subtitle{font-size:11.5px;color:#7a8ba3}
.topbar-actions{gap:5px}
.lang-btn{height:29px;padding:0 10px;border-radius:9px;border:1px solid #e5eaf2;color:#536781;background:#fff;font-weight:750}
.top-user-link{padding:5px 8px;border:1px solid transparent}.top-user-link:hover{background:#f5f7fc;border-color:#e9edf6}
.top-user .avatar{width:38px;height:38px;font-size:13px}
.top-user strong{font-size:12px;max-width:195px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.top-user small{font-size:10px}
.mobile-nav-toggle{display:none;width:39px;height:39px;place-items:center;flex:none;background:#f5f7fc;color:var(--brand);border:1px solid #e1e7f1;border-radius:11px;font-size:21px;cursor:pointer}
.mobile-nav-scrim{display:none}
.page-content{max-width:1800px;margin:0 auto;padding:26px clamp(20px,2.3vw,38px) 48px}
.messages{padding-left:clamp(20px,2.3vw,38px);padding-right:clamp(20px,2.3vw,38px)}
.panel,.stat-card,.quick-card,.class-card,.school-header{border-color:var(--ui-line);border-radius:var(--school-card-radius);box-shadow:var(--ui-shadow)}
.panel{background:white}.panel-head{padding:20px 22px!important;background:#fff!important}
.page-content[data-school-module] .panel-head::before{display:none}
.panel-head h2{font-size:16px;letter-spacing:-.02em;color:#203653}.panel-head p{font-size:12px;color:#718298}
.btn{min-height:40px;font-size:12.5px;font-weight:750;border-radius:10px;transition:transform .16s,box-shadow .16s,background .16s}
.btn:focus-visible,.nav-item:focus-visible,.sidebar .nav-title:focus-visible,a:focus-visible,button:focus-visible{outline:3px solid var(--ui-focus);outline-offset:2px}
.btn-primary{box-shadow:0 4px 11px var(--ui-focus)}.btn-primary:hover{transform:translateY(-1px);box-shadow:0 6px 16px var(--ui-focus)}
.btn-ghost,.btn-secondary{border-color:#e2e8f1}.btn-secondary{background:#f1f5fc}
.form-control,.search-input,.login-card input{font-size:13.5px;border-color:#dde5ef;border-radius:10px;min-height:43px}
.form-control:focus,.search-input:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--ui-focus)}
/* Compact module identity, no billboard-size duplicate title. */
.school-module-hero,.school-module-compact{min-height:106px;margin:0 0 18px;padding:22px 26px;border-radius:var(--school-card-radius);background:linear-gradient(109deg,#fff 7%,color-mix(in srgb,var(--module-accent,var(--brand)) 6%,white));border:1px solid var(--ui-line);box-shadow:var(--ui-shadow);color:var(--ui-ink);gap:24px}
.school-module-hero::before{width:174px;height:174px;right:17px;top:-83px;border:28px solid color-mix(in srgb,var(--module-accent,var(--brand)) 8%,transparent)}
.school-module-hero::after{width:50px;height:50px;right:130px;bottom:-22px;opacity:.12;background:var(--module-accent,var(--brand))}
.school-module-eyebrow{font-size:10px;letter-spacing:.11em;margin-bottom:6px;color:var(--module-accent,var(--brand));font-weight:850}
.school-module-eyebrow span{color:var(--accent)}
.school-module-hero h2{font-size:clamp(23px,2.1vw,29px);color:#1f314d;margin:0 0 4px;line-height:1.24;letter-spacing:-.035em}
.school-module-hero p{color:#687c96;font-size:12.5px;line-height:1.5}
.school-module-hero-art,.school-module-compact .school-module-hero-art{width:122px;max-width:19%;height:95px;align-self:center;opacity:.86}
.school-module-hero-art img,.school-module-compact .school-module-hero-art img{max-height:96px;filter:none}
.school-module-count{color:var(--module-accent,var(--brand));background:#fff;border:1px solid color-mix(in srgb,var(--module-accent,var(--brand)) 18%,#e7edf6);font-size:11px;padding:5px 10px;margin-top:9px}
.school-module-count .count-dot{display:none}.school-module-form{max-width:1100px}
.record-toolbar{padding:17px 18px;border-bottom:1px solid #e9edf3;background:#fff;gap:14px}
.record-search-wrap{border:1px solid #dfe6f0;background:#f9fbff;border-radius:11px;max-width:435px}
.record-search-wrap .search-input{height:42px}.record-search-wrap svg{color:#7186a0}
.table-wrap{overflow:auto;scrollbar-color:#cbd5e4 #f9fbff;scrollbar-width:thin}
.school-modern-table thead th{position:sticky;top:0;z-index:1;background:#f8fafd;color:#708199;padding:14px 18px;font-size:10px;letter-spacing:.08em;font-weight:800}
.school-modern-table td{padding:13px 18px;color:#30415a;font-size:12.5px;line-height:1.55;border-bottom:1px solid #edf1f6}
.school-modern-table tbody tr:nth-child(even){background:#fff}
.school-modern-table tbody tr:hover{background:color-mix(in srgb,var(--module-accent,var(--brand)) 5%,white)}
.school-modern-table .record-first-cell{font-size:13px;font-weight:750;color:#213756}
.record-row-icon{height:32px;width:32px;border-radius:10px;margin-right:11px}
.record-person-initials{font-size:11px;font-weight:850;text-transform:uppercase}
.school-modern-table .table-link{border-radius:8px;padding:6px 9px;gap:5px}.school-modern-table .table-link:hover{background:color-mix(in srgb,var(--brand) 9%,white);text-decoration:none}
.school-modern-table .actions-col{min-width:105px}.record-panel .pagination{background:#fff;border-top:1px solid #edf0f6;padding:16px 20px}
.school-record-form{max-width:1100px}
.school-form-heading{padding:21px 25px;background:#fff;border-bottom:1px solid #eaf0f5}
.school-form-heading-icon{border-radius:12px;background:color-mix(in srgb,var(--brand) 10%,white);color:var(--brand)}
.school-record-form form{padding:25px}.school-record-form .form-grid{gap:21px 22px}
.school-record-form .field label{font-size:12.5px;color:#354d68}
.school-record-form .form-control{background:#fcfdff;border-radius:10px}.school-record-form .help{font-size:11px}
.school-record-form .form-actions{background:#fafcff}
.stat-grid{gap:17px}.stat-card{padding:21px;transition:box-shadow .18s,transform .18s}
.stat-card::before{width:0}.stat-card::after{width:85px;height:85px;top:-29px;right:-24px;opacity:.055}
.stat-value{font-size:30px;letter-spacing:-.045em;color:#213551}
.stat-label{font-size:12px;font-weight:750;color:#687c95}.stat-note{font-size:11.5px}
.stat-icon{width:43px;height:43px;border-radius:13px}
.quick-grid{gap:12px}.quick-card{background:#fff!important;padding:18px!important;border-radius:14px;transition:border .15s,transform .15s,box-shadow .15s}
.quick-card:hover{box-shadow:0 9px 22px rgba(25,47,93,.07);transform:translateY(-2px)}
.quick-card strong{font-size:13px;color:#243b5c}.quick-card span{font-size:11.5px;line-height:1.55}
.quick-icon{width:39px;height:39px;border-radius:12px}.activity-row{padding:16px 21px}
.class-card:hover{transform:translateY(-2px);box-shadow:0 9px 24px rgba(25,47,93,.09)}
.school-welcome{border-radius:var(--school-card-radius);min-height:180px;padding:23px 27px;background:linear-gradient(110deg,var(--brand),color-mix(in srgb,var(--brand-2) 70%,var(--brand)));box-shadow:0 10px 24px var(--ui-focus)}
.school-welcome::before{opacity:.45}.school-welcome h2{font-size:clamp(22px,2vw,29px)}.school-welcome-image{max-height:158px}
.theme-intro{border-radius:var(--school-card-radius);padding:25px;background:linear-gradient(110deg,#fff,color-mix(in srgb,var(--brand) 6%,white))}
.theme-intro h2{font-size:25px;color:#223855}.theme-section{padding:25px}
.theme-preset{border-radius:13px;padding:12px}.theme-preset:has(input:checked){box-shadow:0 0 0 2px var(--ui-focus)}
.theme-preview-panel{border-radius:var(--school-card-radius)}
html[dir="rtl"] .main{margin-left:0;margin-right:var(--ui-sidebar-width)}
html[dir="rtl"] .sidebar{left:auto;right:0}
html[dir="rtl"] .sidebar-search svg{left:auto;right:17px}
html[dir="rtl"] .sidebar-search input{padding-left:12px;padding-right:37px}
html[dir="rtl"] .record-row-icon{margin-left:11px;margin-right:0}
html[dir="rtl"] .sidebar .nav-item.is-active{box-shadow:inset -3px 0 var(--accent)!important}
@media(max-width:820px){
 .main,html[dir="rtl"] .main{margin:0}
 .sidebar,html[dir="rtl"] .sidebar{position:fixed;top:0;bottom:0;left:0;right:auto;width:min(300px,84vw);z-index:41;transform:translateX(-104%);visibility:hidden;transition:transform .22s ease,visibility .22s}
 html[dir="rtl"] .sidebar{left:auto;right:0;transform:translateX(104%)}
 body.schools-nav-open .sidebar,html[dir="rtl"] body.schools-nav-open .sidebar{transform:translateX(0);visibility:visible}
 body.schools-nav-open{overflow:hidden}
 .mobile-nav-toggle{display:grid}
 .mobile-nav-scrim{position:fixed;inset:0;z-index:40;background:rgba(18,29,49,.53);backdrop-filter:blur(3px)}
 body.schools-nav-open .mobile-nav-scrim{display:block}
 .topbar{height:65px;position:sticky;padding:0 16px}.top-title{font-size:16px}.top-subtitle{display:none}
 .page-content{padding:17px 16px 35px}.messages{padding:12px 16px 0}
 .school-module-hero{min-height:102px;padding:19px 22px}
 .school-module-hero-art{width:88px;height:78px;max-width:21%}.school-module-hero-art img{max-height:80px}
 .record-toolbar{flex-wrap:wrap}.record-create-actions{justify-content:flex-start}
}
@media(max-width:560px){
 .top-user{display:none}.topbar-actions{margin-left:auto}
 .school-module-hero{padding:17px 18px;border-radius:14px;margin-bottom:14px}.school-module-hero h2{font-size:21px}.school-module-hero-art{display:none}
 .school-module-eyebrow{font-size:9px}.school-module-hero p{font-size:11.5px}
 .record-toolbar{padding:12px}.record-search-wrap{min-width:100%;max-width:none}
 .record-search-form>.btn{flex:1}.record-create-actions{width:100%}.record-create-actions .btn{flex:1}
 .school-modern-table td{padding:11px 13px}
 .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .stat-card{padding:14px}.stat-value{font-size:25px}.stat-icon{position:static;margin-bottom:8px}
 .school-record-form form{padding:16px}.school-record-form .form-actions{margin:18px -16px -16px;padding:15px}
 .school-welcome{padding:20px}
}
@media(prefers-reduced-motion:reduce){.sidebar,.nav-item,.btn,.quick-card,.stat-card{transition:none!important}}

/* Author display rules must not override navigation search/collapse hiding. */
.sidebar .nav-item[hidden],.sidebar .nav-title[hidden]{display:none!important}

/* Unified single-page banner: use the Year Rollover gradient for shared module headers. */
.page-content .school-module-hero,.page-content .school-module-compact{
 background:linear-gradient(115deg,#312e81,#4338ca 60%,#0891b2);
 border-color:transparent;color:#fff;
}
.page-content .school-module-hero h1,.page-content .school-module-hero h2,
.page-content .school-module-compact h1,.page-content .school-module-compact h2{color:#fff}
.page-content .school-module-hero p,.page-content .school-module-compact p,
.page-content .school-module-eyebrow{color:#e0e7ff}
.page-content .school-module-hero::before{border-color:rgba(255,255,255,.09)}
.page-content .school-module-hero::after{background:rgba(255,255,255,.45)}
.page-content .school-module-count{color:#fff;border-color:rgba(255,255,255,.45);background:rgba(255,255,255,.13)}
.page-content .school-module-count svg{color:#fff}

/* Unified academic-year navigation: same buttons on list, rollover and activation. */
.academic-year-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:9px;margin:0 0 16px}
.record-create-actions .academic-year-actions{margin:0;gap:8px}
.academic-year-actions .btn{white-space:nowrap;min-height:38px;display:inline-flex;align-items:center;justify-content:center}

/* List counts are outside the unified-height heading banner. */
.school-list-count-row{display:flex;justify-content:flex-end;align-items:center;margin:-5px 1px 13px;min-height:30px}
.school-list-count-row .school-module-count{display:inline-flex;align-items:center;gap:6px;background:#eef2ff;border:1px solid #dbe3fb;color:#3d54a7;border-radius:999px;padding:5px 11px;font-size:11px;font-weight:700}

/* Record count sits beside the search control, never in a separate banner row. */
.record-search-form .toolbar-record-count{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border:1px solid #dbe3fb;border-radius:999px;background:#eef2ff;color:#3d54a7;white-space:nowrap;font-size:11px;font-weight:700;line-height:1.4;flex-shrink:0}

/* Academic navigation identical beneath every page hero. */
.page-content>.academic-year-actions{min-height:42px;display:flex;justify-content:flex-end;align-items:center;gap:9px;margin:0 0 16px;flex-wrap:wrap}
html[dir="rtl"] .page-content>.academic-year-actions{justify-content:flex-start}

/* Shared grouped-navigation palette. All inactive tabs match; current page is distinct. */
.page-content .academic-year-actions a.btn{background:#eef2ff!important;border:1px solid #c7d2fe!important;color:#3730a3!important;box-shadow:none!important;text-decoration:none;font-weight:750;transition:background .15s ease,border-color .15s ease,box-shadow .15s ease}
.page-content .academic-year-actions a.btn:hover{background:#e0e7ff!important;border-color:#818cf8!important;color:#312e81!important}
.page-content .academic-year-actions a.btn[aria-current="page"]{background:#4338ca!important;border-color:#3730a3!important;color:#fff!important;box-shadow:0 3px 9px rgba(67,56,202,.2)!important}
.page-content .academic-year-actions a.btn[aria-current="page"]:hover{background:#3730a3!important;color:#fff!important}


/* Urdu shared list toolbars: keep the English visual geometry.
   Search cluster belongs left, create actions right, irrespective of RTL text. */
html[dir="rtl"] .record-panel .record-toolbar{direction:ltr}
html[dir="rtl"] .record-panel .record-search-form{direction:rtl}
html[dir="rtl"] .record-panel .record-create-actions{direction:rtl;justify-content:flex-start}
@media(max-width:1160px){
 html[dir="rtl"] .record-panel .record-create-actions{direction:ltr;justify-content:flex-end}
 html[dir="rtl"] .record-panel .record-create-actions .btn{direction:rtl}
}

/* Consistent library and transport lists, matching shared student list toolbars. */
.school-local-panel{overflow:hidden;border-radius:16px}
.school-local-toolbar{display:flex;direction:ltr;align-items:center;justify-content:space-between;gap:14px;padding:17px 18px;border-bottom:1px solid #e9edf3;background:#fff}
.school-local-search{display:flex;align-items:center;gap:9px;flex:1;min-width:0;flex-wrap:wrap}
.school-local-search .form-control{flex:1 1 230px;max-width:440px;min-width:140px;min-height:42px;border-radius:10px;background:#f9fbff;border:1px solid #dfe6f0}
.school-local-search>.btn{min-height:41px}
.school-local-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;flex-shrink:0}
.school-local-actions .btn{min-height:41px;border-radius:10px}
html[dir="rtl"] .school-local-search{direction:rtl;justify-content:flex-end}
html[dir="rtl"] .school-local-search .form-control{direction:rtl;text-align:right}
html[dir="rtl"] .school-local-actions{direction:rtl}
.school-local-body{padding:17px 18px 10px}
.school-local-note{margin:0 0 12px;color:#64748b;font-size:12px;line-height:1.7}
.school-local-pagination{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin:16px 0 3px}
@media(max-width:770px){.school-local-toolbar{flex-wrap:wrap}.school-local-search{flex:1 1 100%;order:2}.school-local-actions{flex:1 1 100%;order:1;justify-content:flex-end}.school-local-search .form-control{max-width:none}}
