:root{--school-navy:#1A365D;--school-gold:#D97706;--school-cream:#FDFBF7}
*{box-sizing:border-box}body{margin:0}main{min-width:0}
:focus-visible{outline:3px solid #1A365D;outline-offset:3px}
.tbq-admin-sidebar{width:256px;flex:0 0 256px;height:100dvh;position:sticky;top:0;display:flex;flex-direction:column;background:var(--school-navy);color:#fff;font-family:Cairo,sans-serif;z-index:80}
.tbq-admin-brand{display:flex;align-items:center;gap:10px;padding:18px 14px;border-bottom:1px solid #ffffff30;color:#fff;text-decoration:none;font-size:14px;line-height:1.8}
.tbq-admin-brand img{background:#fff;border-radius:8px;object-fit:contain;padding:3px;flex-shrink:0}
.tbq-admin-sidebar nav{flex:1;min-height:0;overflow-y:auto;padding:8px 12px;overscroll-behavior:contain}
.tbq-admin-group{margin-bottom:10px}.tbq-admin-group h2{font:700 12px/1.8 Cairo,sans-serif;color:#fcd89d;padding:6px 12px;margin:0}
.tbq-admin-sidebar nav a,.tbq-admin-logout{display:block;padding:10px 12px;color:#fff;border-radius:8px;font-size:13px;line-height:1.8;text-decoration:none;white-space:normal}
.tbq-admin-sidebar a:hover,.tbq-admin-sidebar a[aria-current="page"]{background:#ffffff22}
.tbq-admin-sidebar a[aria-current="page"]{box-shadow:inset -4px 0 var(--school-gold);font-weight:800}
.tbq-admin-logout{margin:8px 12px;border:1px solid #ffffff30;color:#fecaca}
.tbq-admin-toolbar,.tbq-admin-overlay{display:none}
body:has(.tbq-admin-sidebar)>main{flex:1;min-width:0;margin:0 auto}
body:has(.tbq-admin-sidebar) main>header{height:auto!important;min-height:80px;flex-shrink:0;flex-wrap:wrap;gap:12px;padding-top:16px;padding-bottom:16px}
body:has(.tbq-admin-sidebar) main>header>div{min-width:0}
body:has(.tbq-admin-sidebar) main>header h1{overflow-wrap:anywhere}
.tbq-table-hint{font:600 12px/1.7 Cairo,sans-serif;color:#475569;margin:6px 0}
[role="dialog"]>div{max-height:calc(100dvh - 32px);overflow-y:auto}
form[data-unsaved-warning] .tbq-save-bar{position:sticky;bottom:0;background:#fff;padding:12px;border-top:1px solid #ddd;z-index:2}
@media(max-width:1023px){
 .tbq-admin-toolbar{position:fixed;display:flex;align-items:center;top:0;inset-inline:0;height:56px;background:var(--school-navy);color:white;z-index:70;padding:6px 14px}
 .tbq-admin-toolbar button{font:700 14px/1.8 Cairo,sans-serif;background:transparent;border:1px solid #ffffff66;border-radius:8px;color:#fff;padding:7px 14px;min-height:40px}
 .tbq-admin-sidebar{position:fixed;inset-block:0;right:0;width:min(288px,calc(100vw - 48px));visibility:hidden;transform:translateX(110%);transition:transform .18s;flex-basis:auto}
 .tbq-admin-sidebar.is-open{visibility:visible;transform:none}
 .tbq-admin-overlay:not([hidden]){display:block;position:fixed;inset:0;background:#0008;z-index:75;border:0}
 body:has(.tbq-admin-sidebar)>main{margin-top:56px!important;height:calc(100dvh - 56px)!important;width:100%;min-height:0}
 body:has(.tbq-admin-sidebar) main>header{padding-inline:16px;align-items:flex-start!important}
 body:has(.tbq-admin-sidebar) main>header h1{font-size:20px!important;line-height:1.6}
}
@media(max-width:480px){button,a[role="button"]{overflow-wrap:break-word}input,select,textarea{max-width:100%}}
@media print{.tbq-admin-sidebar,.tbq-admin-toolbar,.tbq-admin-overlay,.tbq-table-hint{display:none!important}body:has(.tbq-admin-sidebar)>main{height:auto!important;margin:0!important}}

@media(max-width:1023px){#teacherMobileMenu nav{max-height:65dvh;overflow:auto}body:has(#tbqAdminSidebar)>main{overflow-y:auto}}
#tbqAdminSidebar :focus-visible{outline-color:#fcd89d}

body:has(#tbqAdminSidebar)>div.flex-1{min-width:0}
body:has(#tbqAdminSidebar)>div.flex-1>header{height:auto!important;min-height:80px;flex-shrink:0;flex-wrap:wrap;gap:12px}
@media(max-width:1023px){
 body:has(#tbqAdminSidebar)>div.flex-1{margin-top:56px;height:calc(100dvh - 56px)!important;min-height:0}
 body:has(#tbqAdminSidebar)>div.flex-1>header{align-items:flex-start;padding:16px}
 body:has(#tbqAdminSidebar)>div.flex-1>header h1{font-size:20px;line-height:1.6;overflow-wrap:anywhere}
}
/* WCAG AA: brand gold (#D97706) is ~3.2:1 on white; use the darker amber of the same hue on light surfaces and behind white text. Gold on navy is unchanged. */
:where(.bg-white,.bg-gray-50,.bg-gray-100,.bg-cream,.bg-amber-50,.bg-yellow-50,.bg-orange-50,body) .text-gold:not(:where([class*="bg-navy"] *,[class*="bg-navy"],[class*="from-navy"] *,.bg-gray-900 *,.bg-black *)){color:#B45309!important}
.bg-gold.text-white,.bg-gold .text-white,.bg-gold:has(> .text-white){background-color:#B45309!important}
.hover\:bg-gold:hover.text-white,.hover\:bg-gold.hover\:text-white:hover{background-color:#B45309!important}
/* Gold on navy is 3.8:1; the lighter amber of the same hue reaches 5.6:1. */
[class*="bg-navy"].text-gold,[class*="bg-navy"] .text-gold,[class*="from-navy"] .text-gold,.bg-\[\#1A365D\] .text-gold{color:#F59E0B!important}

/* ==========================================================================
   GLOBAL NUMERALS ENFORCEMENT (WESTERN NUMERALS 0-9)
   ========================================================================== */
@font-face {
    font-family: 'WesternNumerals';
    src: local('Arial'), local('system-ui'), local('sans-serif');
    unicode-range: U+0030-0039;
}

input, textarea, select, body {
    font-variant-numeric: tabular-nums lining-nums !important;
}

body, input, textarea, select, table, button {
    font-variant-numeric: tabular-nums lining-nums !important;
    font-feature-settings: "lnum" 1, "tnum" 1, "locl" 0 !important;
}

/* Force standard font only for numeric inputs & elements if primary font still overrides them */
input[type="number"],
input[type="tel"],
input[inputmode="numeric"],
input[inputmode="decimal"],
[data-numeric],
[data-number],
[data-type="number"],
[data-format="number"] {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    font-variant-numeric: tabular-nums lining-nums !important;
    font-feature-settings: "lnum" 1, "tnum" 1, "locl" 0 !important;
}

