/* Tajawal is bundled locally under SIL OFL; subsets cover Arabic UI text and Latin identifiers. */
@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/tajawal-arabic-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EEFF;
}
@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/tajawal-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/tajawal-arabic-500.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EEFF;
}
@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/tajawal-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/tajawal-arabic-700.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EEFF;
}
@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/tajawal-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #1d2733;
  --ink-soft: #4b5865;
  --muted: #71808d;
  --line: rgba(40, 63, 82, .14);
  --paper: #eff4f8;
  --card: rgba(255, 255, 255, .82);
  --teal: #1767b1;
  --teal-dark: #0f548f;
  --teal-pale: #e3f1fb;
  --coral: #6657bd;
  --coral-pale: #ece9fb;
  --gold: #8a5d00;
  --gold-pale: #fff2cf;
  --red: #a93630;
  --red-pale: #fdebe9;
  --green: #177a57;
  --green-pale: #e4f4ed;
  --shadow: 0 4px 14px rgba(28, 48, 69, .08), 0 1px 2px rgba(28, 48, 69, .05);
  font-family: "Tajawal", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.graphic-icon { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; color: var(--ink); font-family: inherit; background: var(--paper); line-height: 1.65; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

.topbar {
  min-height: 78px; padding: 12px max(28px, calc((100vw - 1460px) / 2)); background: rgba(255,255,255,.96);
  display: flex; align-items: center; gap: 20px; border-bottom: 1px solid #e8eeeb; position: sticky; top: 0; z-index: 10;
}
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px 14px 14px 4px; background: var(--ink); color: white; display: grid; place-items: center; font-size: 23px; font-weight: 700; }
.brand-copy { display: grid; line-height: 1.35; }
.brand-copy strong { font-size: 14px; letter-spacing: -.02em; }
.brand-copy small { font-size: 10px; color: var(--muted); margin-top: 4px; }
.main-nav { display: flex; gap: 2px; align-items: center; flex: 1; min-width: 0; }
.main-nav a { font-size: 11px; color: #66797a; padding: 9px 8px; border-radius: 9px; white-space: nowrap; transition: .18s ease; }
.main-nav a:hover, .main-nav a.is-active { color: var(--teal-dark); background: var(--teal-pale); }
.account-menu { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; flex-shrink: 0; }
.logout-form { margin: 0; flex-shrink: 0; }
.logout-button { min-height: 38px; padding-inline: 12px; color: var(--red); border-color: #f0d8d3; }
.logout-button:hover { color: #963d39; background: var(--red-pale); }
.user-chip { display: flex; align-items: center; gap: 9px; min-width: 0; }
.user-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fce7df; color: #a8533e; font-weight: 700; }
.user-chip strong, .user-chip small { display: block; white-space: nowrap; }
.user-chip strong { font-size: 11px; }
.user-chip small { color: var(--muted); font-size: 9px; }
.page-shell { width: min(1280px, calc(100% - 48px)); margin: 32px auto 72px; min-height: calc(100vh - 190px); }

h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(27px, 3vw, 38px); line-height: 1.3; letter-spacing: -.035em; margin-bottom: 8px; }
h2 { font-size: 22px; line-height: 1.35; letter-spacing: -.025em; margin-bottom: 9px; }
h3 { font-size: 15px; line-height: 1.45; margin-bottom: 5px; }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 11px; }
.eyebrow, .section-kicker { color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: .02em; margin-bottom: 9px; }
.eyebrow { display: flex; align-items: center; gap: 8px; }
.dot { display: inline-block; width: 7px; height: 7px; background: var(--coral); border-radius: 50%; }
.page-heading { margin-bottom: 23px; }
.page-heading p { margin-bottom: 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 30px 0 14px; }
.section-heading h2 { margin: 0; font-size: 18px; }
.section-heading p { margin: 3px 0 0; font-size: 11px; color: var(--muted); }
.heading-actions { display: flex; gap: 8px; align-items: center; }

.card { background: var(--card); border: 1px solid #e5ece8; border-radius: 17px; box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.button { cursor: pointer; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 15px; border-radius: 10px; font-weight: 600; font-size: 12px; transition: .18s ease; white-space: nowrap; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: var(--teal); box-shadow: 0 5px 14px rgba(20,123,112,.17); }
.button-primary:hover { background: var(--teal-dark); }
.button-secondary { background: #eff6f3; color: var(--teal-dark); border-color: #d9ebe5; }
.button-secondary:hover { background: #e3f1ec; }
.button-quiet { color: #597073; background: transparent; border-color: #e0e9e5; }
.button-quiet:hover { color: var(--ink); background: #f6faf8; }
.button-danger { color: var(--red); background: var(--red-pale); border-color: #f7d8d1; }
.button-small { min-height: 32px; padding: 5px 10px; font-size: 10px; }
.button-wide { width: 100%; min-height: 47px; }
.teachers-add-button { font-size: 16px; }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.link-button { display: inline-flex; align-items: center; gap: 7px; color: var(--teal); font-size: 11px; font-weight: 700; }
.link-button:hover { color: var(--teal-dark); }

.auth-layout { min-height: 610px; display: grid; grid-template-columns: 1.12fr .88fr; align-items: center; gap: 60px; max-width: 1050px; margin: 32px auto; }
.login-page { display: flow-root; }
.login-page .topbar { display: none; }
.login-page .page-shell { margin-bottom: 0; }
.login-page .auth-layout { margin-bottom: 0; }
@media (min-width: 761px) {
  .login-page .auth-layout { min-height: min(610px, calc(100vh - 64px)); }
}
@media (min-width: 1120px) {
  .login-page .auth-card,
  .login-page .auth-story-logo,
  .login-page .auth-story-title { transform: translateX(66px); }
}
.auth-story { min-width: 0; min-height: 430px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; padding: 16px; transform: translateY(-10px); }
.auth-story-logo { display: block; width: min(100%, 440px); height: auto; }
.auth-story-title { margin: 0; color: var(--ink); font-size: 22px; font-weight: 700; line-height: 1.4; text-align: center; }
.auth-card { max-width: 420px; width: 100%; padding: 34px; justify-self: end; }
.auth-card h2 { font-size: 25px; }
.auth-card .button-wide { font-size: 15px; }
.form-stack { display: grid; gap: 17px; }
label { display: grid; gap: 7px; color: #405d60; font-size: 11px; font-weight: 600; }
input, select, textarea { min-width: 0; width: 100%; border: 1px solid #dce7e3; color: var(--ink); background: #fff; border-radius: 9px; padding: 10px 12px; outline: none; transition: border .15s, box-shadow .15s; font-size: 12px; }
input, select { min-height: 42px; }
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { border-color: #72b6aa; box-shadow: 0 0 0 3px rgba(20,123,112,.1); }
input::placeholder { color: #a7b2b2; font-weight: 400; }
.floating-field { display: block; position: relative; min-width: 0; color: #405d60; font-size: 13px; font-weight: 500; }
.floating-field > input { min-height: 50px; padding: 19px 12px 7px; }
.floating-label { position: absolute; inset-inline-start: 12px; top: 50%; max-width: calc(100% - 24px); color: #687987; font-size: 13px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform: translateY(-50%); transition: top .16s ease, color .16s ease, font-size .16s ease; pointer-events: none; }
.floating-field > input::placeholder { color: transparent; font-weight: 400; transition: color .16s ease; }
.floating-field > input:focus::placeholder { color: #8998a3; }
.floating-field:focus-within .floating-label,
.floating-field > input:not(:placeholder-shown) ~ .floating-label { top: 7px; color: var(--teal-dark); font-size: 12px; transform: none; }
.floating-field.is-invalid > input,
.floating-field.is-invalid > input:focus { border-color: var(--red); background: #fff9f8; box-shadow: 0 0 0 3px rgba(169, 54, 48, .14); }
@media (prefers-reduced-motion: reduce) {
  .floating-label, .floating-field > input::placeholder { transition: none; }
}
.icon-circle { display: grid; place-items: center; flex: 0 0 32px; height: 32px; width: 32px; border-radius: 50%; background: var(--teal-pale); color: var(--teal); font-weight: 700; }
.icon-circle .graphic-icon { width: 18px; height: 18px; }
.narrow-page { max-width: 700px; margin: 45px auto 70px; }
.form-card { padding: 25px; }
.invite-summary { display: flex; gap: 12px; align-items: center; padding-bottom: 19px; margin-bottom: 19px; border-bottom: 1px solid #edf1ef; }
.invite-summary strong, .invite-summary small { display: block; }
.invite-summary strong { font-size: 13px; }
.invite-summary small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.form-hint { margin: 18px 0 0; color: #869494; font-size: 10px; }
.copy-field { margin: 0 0 16px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { direction: ltr; text-align: left; font-family: ui-monospace, monospace; font-size: 10px; background: #f7faf8; }
.code-details { margin: 0 0 17px; color: var(--teal); font-size: 11px; cursor: pointer; }
.code-details code { display: block; margin-top: 8px; direction: ltr; text-align: left; border: 1px dashed #c8ddd6; border-radius: 8px; padding: 11px; background: #f6faf8; overflow-wrap: anywhere; }
.notice { padding: 12px 14px; border-radius: 10px; font-size: 11px; margin: 18px 0; }
.notice-warm { color: #815e25; background: var(--gold-pale); border: 1px solid #f2e6bc; }
.live-update-status { margin: 0 0 16px; }
.live-update-status[hidden] { display: none !important; }
.policy-feedback { margin: -8px 0 0; color: var(--muted); font-size: 12px; }
.policy-feedback.is-valid { color: #126447; }
.policy-feedback.is-invalid { color: #a13d3a; }

.hero-panel { padding: 28px 32px; display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: white; position: relative; overflow: hidden; }
.hero-panel::after { content: ""; width: 260px; height: 260px; border-radius: 44% 56% 42% 58%; border: 1px solid rgba(255,255,255,.14); position: absolute; inset-inline-start: -75px; top: -135px; transform: rotate(24deg); }
.hero-panel h1 { font-size: 25px; margin: 0 0 5px; }
.hero-panel p { color: #b9cfcd; margin: 0; font-size: 12px; }
.hero-panel .button { position: relative; z-index: 1; color: var(--ink); background: #f5d2bf; }
.hero-meta { position: relative; z-index: 1; text-align: left; font-size: 10px; color: #bdd1ce; }
.hero-meta strong { display: block; font-size: 13px; color: white; }
.eyebrow-light { color: #90d0c2; font-size: 10px; margin-bottom: 7px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin: 18px 0 25px; }
.stat-card { padding: 17px 18px; min-height: 104px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: #799091; font-size: 10px; }
.stat-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 9px; color: var(--teal); background: var(--teal-pale); font-size: 12px; }
.stat-icon .graphic-icon { width: 17px; height: 17px; }
.stat-number { display: block; font-size: 24px; font-weight: 700; line-height: 1.2; margin-top: 10px; }
.stat-caption { display: block; color: #8a9999; font-size: 9px; margin-top: 3px; }
.dashboard-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 16px; }
.content-card { padding: 21px; }
.content-card h2 { font-size: 16px; }
.empty-state { text-align: center; padding: 34px 18px; color: var(--muted); }
.empty-icon { width: 46px; height: 46px; margin: 0 auto 11px; border-radius: 15px; background: #eef5f1; color: var(--teal); display: grid; place-items: center; font-size: 19px; }
.empty-icon .graphic-icon { width: 24px; height: 24px; }
.empty-state strong { color: var(--ink); display: block; font-size: 12px; }
.empty-state p { font-size: 10px; margin: 5px 0 0; }
.shortcut-grid { display: grid; gap: 9px; }
.shortcut { display: flex; align-items: center; gap: 11px; padding: 11px; border: 1px solid #e8efec; border-radius: 11px; transition: .15s; }
.shortcut:hover { background: #f9fcfa; border-color: #cde3db; transform: translateX(-2px); }
.shortcut .icon-circle { width: 34px; height: 34px; flex-basis: 34px; }
.shortcut strong, .shortcut small { display: block; }
.shortcut strong { font-size: 11px; }
.shortcut small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.shortcut-arrow { margin-inline-start: auto; color: #9aabaa; }
.reminder-list { display: grid; gap: 9px; }
.reminder-card { display: flex; gap: 12px; padding: 13px; border-radius: 12px; background: var(--gold-pale); border: 1px solid #f2e6bc; }
.reminder-card.is-overdue { background: var(--red-pale); border-color: #f2d7d1; }
.reminder-symbol { flex: 0 0 31px; height: 31px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.7); color: var(--gold); font-weight: 700; }
.is-overdue .reminder-symbol { color: var(--red); }
.reminder-body { min-width: 0; flex: 1; }
.reminder-body strong { font-size: 11px; display: block; }
.reminder-body p { color: #6d7370; font-size: 10px; margin: 3px 0; }
.reminder-body small { color: #8b8063; font-size: 9px; }
.filter-bar { display: flex; align-items: end; gap: 9px; padding: 14px; margin: 18px 0; }
.filter-bar label { min-width: 150px; flex: 1; }
.filter-bar .search-field { flex: 2; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.item-card { padding: 17px; display: flex; flex-direction: column; min-height: 202px; }
.item-card-top { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.item-subject { color: var(--teal); font-size: 9px; font-weight: 700; }
.item-card h3 { font-size: 13px; margin: 6px 0; }
.item-grade { color: #859495; font-size: 10px; }
.item-notes { color: #748586; font-size: 10px; margin: 8px 0; }
.item-card-footer { display: grid; align-items: end; gap: 12px; margin-top: auto; padding-top: 13px; }
.item-stock-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 7px; }
.item-stock-grid > div { min-width: 0; }
.stock-label { display: block; color: #829191; font-size: 9px; white-space: nowrap; }
.stock-value { display: block; font-size: 13px; font-weight: 700; color: var(--ink); }
.stock-value.is-unknown { color: #927949; font-size: 10px; }
.item-card-footer > .mini-actions { justify-self: start; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; padding: 4px 8px; font-size: 9px; font-weight: 600; white-space: nowrap; }
.badge-teal { background: var(--teal-pale); color: var(--teal-dark); }
.badge-gold { background: var(--gold-pale); color: #866322; }
.badge-red { background: var(--red-pale); color: var(--red); }
.badge-gray { background: #eef2f0; color: #6f7d7d; }
.badge-green { background: var(--green-pale); color: var(--green); }
.unknown-stock { color: #866322; background: #fff9e7; border-radius: 8px; padding: 7px 8px; font-size: 9px; }
.mini-actions { display: flex; align-items: center; gap: 6px; }
.mini-actions form { display: inline; }
.mini-actions .button { min-height: 31px; }

.table-wrap { overflow-x: auto; border: 1px solid #e8efec; border-radius: 12px; background: white; }
table { width: 100%; border-collapse: collapse; font-size: 10px; text-align: right; }
th { padding: 11px 13px; color: #788a8b; font-size: 9px; font-weight: 600; background: #f8faf9; border-bottom: 1px solid #e8efec; white-space: nowrap; }
td { padding: 12px 13px; border-bottom: 1px solid #edf1ef; color: #385558; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdfc; }
.table-primary { font-weight: 700; color: var(--ink); }
.table-secondary { display: block; color: #879595; font-size: 9px; margin-top: 2px; }
.table-actions { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.table-empty { text-align: center; color: var(--muted); padding: 30px; }
.table-section { margin-top: 17px; }
.pagination { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; color: var(--muted); font-size: 12px; }
.pagination-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.pagination-controls a, .pagination-current { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.72); color: var(--ink-soft); }
.pagination-controls a:hover { color: var(--teal-dark); background: var(--teal-pale); }
.pagination-current { border-color: transparent; background: var(--teal-pale); color: var(--teal-dark); font-weight: 700; }
.subject-pill { color: var(--teal); background: #edf7f3; padding: 3px 8px; border-radius: 99px; font-size: 9px; white-space: nowrap; }
.school-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.school-card { padding: 18px; }
.school-card-head { display: flex; gap: 11px; align-items: center; }
.school-emblem { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; color: var(--teal); background: var(--teal-pale); font-size: 15px; }
.school-emblem .graphic-icon { width: 21px; height: 21px; }
.school-card-head h3 { margin: 0; }
.school-card-head small { display: block; color: var(--muted); font-size: 9px; margin-top: 2px; }
.school-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 17px 0; }
.school-stats div { background: #f7faf8; border-radius: 9px; padding: 9px 7px; }
.school-stats strong { display: block; font-size: 15px; }
.school-stats span { display: block; font-size: 8px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.form-grid .span-all { grid-column: 1/-1; }
.form-actions { display: flex; justify-content: flex-start; gap: 9px; margin-top: 20px; }
.form-card .form-stack { gap: 14px; }
.form-section-title { font-size: 13px; margin: 0 0 15px; }
.qty-hint { font-size: 9px; color: #899697; font-weight: 400; }
.input-help { font-size: 9px; color: #879494; margin-top: -2px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: 16px; min-height: 16px; }

.request-detail-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 15px; }
.detail-card { padding: 21px; }
.request-review-card { display: flex; flex-direction: column; }
.request-rejection-form { flex: 1; display: flex; flex-direction: column; }
.request-rejection-form > label { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.request-rejection-form textarea { flex: 1; min-height: 90px; }
.scheduled-cancel-form { flex: 1; display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.scheduled-cancel-form > label { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.scheduled-cancel-form textarea { flex: 1; min-height: 90px; }
.request-decision-button { font-size: 14px; }
.detail-title { display: flex; justify-content: space-between; align-items: start; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid #edf1ef; }
.detail-title h2 { margin: 4px 0; }
.detail-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 19px 0; }
.fact { background: #f7faf8; border-radius: 10px; padding: 11px; }
.fact span { color: #849393; display: block; font-size: 9px; }
.fact strong { color: var(--ink); display: block; font-size: 12px; margin-top: 3px; }
.approval-box { margin-top: 17px; padding: 16px; background: #f5faf7; border: 1px solid #dcece4; border-radius: 12px; }
.approval-box h3 { margin-bottom: 12px; }
.approval-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.approval-grid .full { grid-column: 1/-1; }
.action-stack { display: grid; gap: 10px; }
.action-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.action-row form { display: contents; }
.danger-zone { padding: 14px; border-radius: 11px; background: #fff8f6; border: 1px solid #f6e1db; }
.danger-zone p { color: #a65b4d; font-size: 10px; margin: 0 0 10px; }
.status-line { display: flex; align-items: center; gap: 7px; font-size: 10px; color: #718586; margin-top: 8px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-pending { color: #aa7d24; }
.status-approved { color: var(--teal); }
.status-checked_out { color: #bc6550; }
.status-returned { color: var(--green); }
.status-declined, .status-cancelled { color: #899494; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 13px; }
.filter-chip { padding: 6px 10px; border-radius: 20px; border: 1px solid #e3ebe7; color: #708182; font-size: 9px; }
.filter-chip.active { background: var(--teal-pale); color: var(--teal-dark); border-color: #d3e9e2; }

.flash-stack { display: grid; gap: 8px; margin-bottom: 18px; }
.flash { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 10px; font-size: 11px; }
.flash-success { color: #236847; background: var(--green-pale); border: 1px solid #d5eade; }
.flash-error { color: #a13d3a; background: var(--red-pale); border: 1px solid #f1d8d3; }
.flash-close { background: transparent; border: 0; color: inherit; cursor: pointer; font-size: 18px; line-height: 1; }
.inline-form { display: flex; gap: 8px; align-items: end; }
.inline-form label { flex: 1; }
.inline-form input { min-width: 110px; }
.divider { height: 1px; background: #edf1ef; margin: 20px 0; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.toolbar h2 { margin: 0; font-size: 17px; }
.split-layout { display: grid; grid-template-columns: 1fr 340px; align-items: start; gap: 16px; }
.sticky-card { position: sticky; top: 95px; }
.school-banner { padding: 18px 21px; display: flex; justify-content: space-between; align-items: center; }
.school-banner h1 { font-size: 22px; margin: 0; }
.school-banner p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.summary-list { display: grid; gap: 9px; }
.summary-line { display: flex; justify-content: space-between; gap: 10px; color: #617779; font-size: 10px; padding: 8px 0; border-bottom: 1px solid #edf1ef; }
.summary-line:last-child { border: 0; }
.audit-list { display: grid; gap: 9px; }
.audit-row { display: flex; gap: 10px; align-items: start; color: #536e70; font-size: 10px; }
.audit-row small { display: block; color: #8b9999; font-size: 8px; }
.audit-icon { width: 25px; height: 25px; border-radius: 8px; background: #f2f6f3; color: var(--teal); display: grid; place-items: center; flex-shrink: 0; }
.audit-icon .graphic-icon { width: 15px; height: 15px; }
.audit-history-list { gap: 0; }
.audit-history-row { padding: 12px 0; border-bottom: 1px solid #edf1ef; }
.audit-history-row:last-child { border-bottom: 0; }
.audit-history-body { min-width: 0; flex: 1; }
.audit-history-body > div { font-size: 11px; }
.audit-history-body > small { display: block; color: #879595; font-size: 9px; margin-top: 4px; overflow-wrap: anywhere; }
.audit-history-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.audit-history-head strong { font-size: 11px; }
.audit-history-head .table-secondary { margin-inline-start: auto; }
.inline-select { min-width: 155px; }
.pill-count { background: #d96f57; color: #fff; border-radius: 99px; padding: 1px 6px; font-size: 8px; }

@media (max-width: 1100px) {
  .topbar { gap: 15px; padding-inline: 20px; flex-wrap: wrap; }
  .main-nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .main-nav a { padding-inline: 10px; }
  .account-menu { margin-inline-start: auto; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .school-card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .topbar { position: static; padding: 12px 16px; }
  .brand-copy strong { font-size: 12px; }
  .user-chip small { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
  .main-nav { gap: 3px; margin-inline: -5px; }
  .main-nav a { font-size: 10px; padding: 8px 9px; }
  .page-shell { width: min(100% - 28px, 620px); margin-top: 19px; }
  .auth-layout { display: block; min-height: unset; margin: 18px auto 40px; }
  .auth-story { min-height: 0; padding: 8px 0 20px; }
  .auth-story-logo { width: min(100%, 280px); }
  .auth-story-title { font-size: 18px; }
  .auth-card { justify-self: auto; max-width: none; padding: 24px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .stat-card { min-height: 91px; padding: 13px; }
  .dashboard-grid, .request-detail-grid, .split-layout { grid-template-columns: 1fr; }
  .sticky-card { position: static; }
  .catalog-grid { grid-template-columns: 1fr; }
  .school-card-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-wrap: wrap; }
  .filter-bar label, .filter-bar .search-field { min-width: calc(50% - 5px); flex: 1 1 45%; }
  .filter-bar .search-field { flex-basis: 100%; }
  .hero-panel { padding: 22px; display: block; }
  .hero-panel .button { margin-top: 18px; }
  .hero-meta { text-align: right; margin-top: 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-all { grid-column: auto; }
  .section-heading { align-items: start; flex-direction: column; }
  .heading-actions { width: 100%; }
  .pagination { align-items: flex-start; }
  .pagination-controls { width: 100%; }
  .toolbar { align-items: start; flex-direction: column; }
  .copy-row { align-items: stretch; }
  .copy-row .button { min-width: 64px; }
  .detail-facts { grid-template-columns: 1fr 1fr; }
}

/* Edures visual direction: Fluent Design with Tajawal. */
:focus-visible { outline: 3px solid rgba(23, 103, 177, .42); outline-offset: 2px; }
html { min-height: 100%; background: var(--paper); scroll-behavior: smooth; }
body {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 12% 8%, rgba(184, 217, 242, .34), transparent 37%),
    radial-gradient(ellipse at 92% 16%, rgba(207, 202, 242, .24), transparent 31%),
    linear-gradient(135deg, #eff4f8, #f5f5fa 58%, #edf5f4);
  background-attachment: fixed;
  font-family: "Tajawal", Tahoma, Arial, sans-serif;
}

.topbar {
  background: rgba(250, 251, 255, .84);
  border-bottom: 1px solid rgba(255, 255, 255, .92);
  box-shadow: 0 2px 10px rgba(31, 55, 76, .07);
  backdrop-filter: blur(22px) saturate(165%);
}
.brand-mark {
  width: 72px;
  height: 54px;
  flex: 0 0 72px;
  display: block;
  object-fit: contain;
  padding: 0;
  color: transparent;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  mix-blend-mode: multiply;
}
.brand-copy strong, h1, h2 { letter-spacing: 0; }
.main-nav a { color: var(--ink-soft); border-radius: 6px; }
.main-nav a:hover, .main-nav a.is-active { color: var(--teal-dark); background: rgba(227, 241, 251, .92); }
.user-avatar {
  color: #075d58;
  background: var(--teal-pale);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 1px 4px rgba(30, 80, 78, .11);
}
.logout-button { border-color: rgba(169, 54, 48, .18); }
.logout-button:hover { color: #8d2e29; background: var(--red-pale); }
.page-shell { min-height: calc(100vh - 190px); }

h1, h2, h3 { color: var(--ink); }
h1 { line-height: 1.3; }
.eyebrow, .section-kicker, .item-subject { color: var(--teal); }
.dot { background: var(--teal); }
.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .96);
  border-radius: 13px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(135%);
}
.button {
  border-radius: 6px;
  font-weight: 700;
  transition: color .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.button-primary {
  color: #fff;
  background: var(--teal);
  box-shadow: 0 3px 9px rgba(23, 103, 177, .22);
}
.button-primary:hover { color: #fff; background: var(--teal-dark); box-shadow: 0 5px 13px rgba(23, 103, 177, .26); }
.button-secondary {
  color: var(--teal-dark);
  background: var(--teal-pale);
  border-color: rgba(23, 103, 177, .1);
}
.button-secondary:hover { color: var(--teal-dark); background: #d2e8f8; }
.button-quiet { color: var(--ink-soft); background: rgba(255, 255, 255, .58); border-color: var(--line); }
.button-quiet:hover { color: var(--ink); background: rgba(255, 255, 255, .9); }
.button-danger { color: var(--red); background: var(--red-pale); border-color: rgba(169, 54, 48, .16); }
.button-danger:hover { color: #8d2e29; background: #f9dfdc; }
.link-button { color: var(--teal); }
.link-button:hover { color: var(--teal-dark); }

.auth-card { border-radius: 13px; }
.icon-circle { color: var(--teal); background: var(--teal-pale); }

input, select, textarea {
  color: var(--ink);
  background: rgba(255, 255, 255, .92);
  border-color: rgba(40, 63, 82, .16);
  border-radius: 7px;
}
input:focus, select:focus, textarea:focus {
  border-color: #5b9bd5;
  box-shadow: 0 0 0 3px rgba(23, 103, 177, .12);
}
input::placeholder { color: #98a5b2; }
label { color: var(--ink-soft); font-size: 12px; }
.copy-row input, .code-details code { background: #f3f6fa; }
.code-details { color: var(--teal); }
.code-details code { border-color: #d6e2ec; }
.form-hint, .qty-hint, .input-help { color: var(--muted); }
.notice-warm { color: #765100; background: var(--gold-pale); border-color: rgba(138, 93, 0, .18); }

.hero-panel {
  color: var(--ink);
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(255, 255, 255, .96);
  border-radius: 13px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(145%);
}
.hero-panel::after { border-color: rgba(23, 103, 177, .12); border-radius: 50%; }
.hero-panel h1 { color: var(--ink); }
.hero-panel p { color: var(--ink-soft); }
.hero-panel .button { color: #fff; background: var(--teal); border-color: transparent; }
.hero-panel .button:hover { color: #fff; background: var(--teal-dark); }
.hero-meta { color: var(--muted); }
.hero-meta strong { color: var(--ink); }
.eyebrow-light { color: var(--teal); }
.stat-grid { gap: 12px; }
.stat-card { background: var(--card); border-color: rgba(255, 255, 255, .96); border-radius: 12px; }
.stat-top { color: var(--ink-soft); }
.stat-icon { color: var(--teal-dark); background: var(--teal-pale); border-radius: 6px; }
.stat-card:nth-child(2) .stat-icon { color: #075d58; background: #dff3ef; }
.stat-card:nth-child(3) .stat-icon { color: #765100; background: var(--gold-pale); }
.stat-card:nth-child(4) .stat-icon { color: #50409e; background: var(--coral-pale); }
.stat-caption { color: var(--muted); }
.dashboard-grid { gap: 14px; }
.content-card { background: var(--card); }
.empty-state { color: var(--muted); }
.empty-state strong { color: var(--ink); }
.empty-icon { color: var(--teal); background: var(--teal-pale); border-radius: 9px; }
.shortcut { border-color: var(--line); border-radius: 8px; }
.shortcut:hover { background: rgba(243, 248, 252, .9); border-color: rgba(23, 103, 177, .2); }
.shortcut-arrow { color: #738497; }
.reminder-card { background: rgba(255, 244, 212, .9); border-color: rgba(225, 188, 93, .45); border-radius: 12px; }
.reminder-card.is-overdue { background: rgba(253, 235, 233, .94); border-color: rgba(169, 54, 48, .2); }
.filter-bar { background: rgba(255, 255, 255, .78); }
.catalog-grid { gap: 12px; }
.item-card { background: var(--card); border-radius: 12px; }
.item-card h3 { color: var(--ink); }
.item-grade, .item-notes, .stock-label { color: var(--muted); }
.stock-value { color: var(--ink); }
.unknown-stock { color: #765100; background: var(--gold-pale); }
.badge { border-radius: 5px; font-weight: 700; }
.badge-teal { color: var(--teal-dark); background: var(--teal-pale); }
.badge-gold { color: #765100; background: var(--gold-pale); }
.badge-red { color: var(--red); background: var(--red-pale); }
.badge-gray { color: #5d6b79; background: #edf1f5; }
.badge-green { color: #126447; background: var(--green-pale); }

.table-wrap { border-color: var(--line); border-radius: 9px; background: rgba(255, 255, 255, .92); }
table { color: var(--ink-soft); }
th { color: var(--muted); background: rgba(239, 244, 249, .94); border-color: var(--line); }
td { color: var(--ink-soft); border-color: rgba(40, 63, 82, .09); }
tbody tr:hover { background: rgba(243, 248, 252, .82); }
.table-primary { color: var(--ink); }
.table-secondary { color: var(--muted); }
.subject-pill { color: var(--teal-dark); background: var(--teal-pale); }
.table-empty { color: var(--muted); }
.school-card { background: var(--card); border-radius: 12px; }
.school-emblem { color: var(--teal); background: var(--teal-pale); border-radius: 7px; }
.school-stats div { background: rgba(239, 244, 249, .8); border-radius: 7px; }
.school-stats span { color: var(--muted); }
.school-banner { border-radius: 13px; }
.school-banner p, .summary-line, .audit-row { color: var(--ink-soft); }
.summary-line, .audit-history-row { border-color: rgba(40, 63, 82, .1); }
.fact { background: rgba(239, 244, 249, .82); border-radius: 7px; }
.fact span { color: var(--muted); }
.approval-box { background: rgba(227, 241, 251, .55); border-color: rgba(23, 103, 177, .14); border-radius: 9px; }
.danger-zone { background: rgba(253, 235, 233, .7); border-color: rgba(169, 54, 48, .17); border-radius: 8px; }
.danger-zone p { color: #8d3934; }
.audit-icon { color: var(--teal); background: var(--teal-pale); border-radius: 6px; }
.filter-chip { color: var(--ink-soft); border-color: var(--line); border-radius: 6px; }
.filter-chip.active { color: var(--teal-dark); background: var(--teal-pale); border-color: rgba(23, 103, 177, .18); }
.flash { border-radius: 8px; }
.flash-success { color: #126447; background: var(--green-pale); border-color: rgba(23, 122, 87, .16); }
.flash-error { color: #8d2e29; background: var(--red-pale); border-color: rgba(169, 54, 48, .18); }
.divider { background: var(--line); }
.pill-count { background: var(--teal); }

@media (max-width: 760px) {
  .topbar { background: rgba(250, 251, 255, .94); }
  .auth-card { background: rgba(255, 255, 255, .88); }
  .section-heading { gap: 10px; }
  .hero-panel { background: rgba(255, 255, 255, .82); }
}



/* Readability pass: lift small text while preserving the existing layout. */
.brand-copy strong { font-size: 15px; }
.brand-copy small { font-size: 12px; }
.main-nav a { font-size: 13px; }
.user-chip strong { font-size: 13px; }
.user-chip small { font-size: 12px; }
.muted { font-size: 14px; }
.small { font-size: 13px; }
.eyebrow, .section-kicker { font-size: 13px; }
.section-heading p { font-size: 13px; }
.button-small { font-size: 12px; }
.link-button { font-size: 13px; }
label { font-size: 14px; }
input, select, textarea { font-size: 14px; }
.invite-summary strong { font-size: 14px; }
.invite-summary small, .form-hint { font-size: 12px; }
.copy-row input { font-size: 12px; }
.code-details { font-size: 12px; }
.code-details code { font-size: 12px; }
.notice { font-size: 13px; }
.hero-panel p { font-size: 14px; }
.hero-meta { font-size: 12px; }
.eyebrow-light { font-size: 12px; }
.stat-top { font-size: 12px; }
.stat-caption { font-size: 11px; }
.empty-state strong { font-size: 13px; }
.empty-state p { font-size: 12px; }
.shortcut strong { font-size: 13px; }
.shortcut small { font-size: 11px; }
.reminder-body strong { font-size: 13px; }
.reminder-body p { font-size: 12px; }
.reminder-body small { font-size: 11px; }
.item-subject { font-size: 11px; }
.item-card h3 { font-size: 14px; }
.item-grade, .item-notes { font-size: 12px; }
.stock-label { font-size: 11px; }
.stock-value.is-unknown, .unknown-stock { font-size: 12px; }
.badge { font-size: 11px; }
table { font-size: 12px; }
th { font-size: 11px; }
.table-secondary { font-size: 11px; }
.subject-pill { font-size: 11px; }
.school-card-head small { font-size: 11px; }
.school-stats span { font-size: 11px; }
.qty-hint, .input-help { font-size: 11px; }
.fact span { font-size: 11px; }
.fact strong { font-size: 13px; }
.danger-zone p { font-size: 12px; }
.status-line { font-size: 12px; }
.filter-chip { font-size: 11px; }
.flash { font-size: 13px; }
.school-banner p { font-size: 12px; }
.summary-line, .audit-row { font-size: 12px; }
.audit-row small { font-size: 11px; }
.audit-history-body > div { font-size: 12px; }
.audit-history-body > small { font-size: 11px; }
.audit-history-head strong { font-size: 12px; }
.pill-count { font-size: 10px; }

@media (max-width: 760px) {
  .brand-copy strong { font-size: 13px; }
  .main-nav a { font-size: 12px; }
}

.taxonomy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.taxonomy-card { min-width: 0; }
.taxonomy-add-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: end; margin-bottom: 16px; }
.taxonomy-add-form .button { min-height: 42px; }
.taxonomy-list { display: grid; gap: 7px; }
.taxonomy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 9px 11px; background: rgba(239, 244, 249, .78); border: 1px solid rgba(40, 63, 82, .08); border-radius: 7px; }
.taxonomy-row > div { min-width: 0; }
.taxonomy-row strong, .taxonomy-row small { display: block; }
.taxonomy-row strong { color: var(--ink); font-size: 14px; }
.taxonomy-row small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.taxonomy-row form { flex: 0 0 auto; }
.taxonomy-actions { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 6px; flex: 0 0 auto; }
.taxonomy-actions form { margin: 0; }
.empty-inline { margin: 0; padding: 12px; color: var(--muted); font-size: 13px; }
.grade-field { min-width: 0; }
.grade-field-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; color: var(--ink-soft); }
.grade-field-heading strong { font-size: 14px; }
.grade-field-heading small { color: var(--muted); font-size: 12px; }
.grade-option-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 7px; padding: 10px; background: rgba(239, 244, 249, .65); border: 1px solid var(--line); border-radius: 8px; }
.grade-option { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 9px; background: rgba(255, 255, 255, .9); border: 1px solid rgba(40, 63, 82, .1); border-radius: 6px; color: var(--ink-soft); cursor: pointer; }
.grade-option input { width: 17px; min-width: 17px; height: 17px; min-height: 17px; margin: 0; accent-color: var(--teal); }
.grade-option span { font-size: 13px; }

@media (max-width: 760px) {
  .taxonomy-grid { grid-template-columns: 1fr; }
  .taxonomy-add-form { grid-template-columns: 1fr; }
  .taxonomy-add-form .button { width: 100%; }
  .grade-option-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Authenticated app navigation: a right-side rail on desktop, a right drawer on phones. */
.has-sidebar { --sidebar-width: 200px; }
.has-sidebar .topbar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 30;
  width: max-content;
  max-width: min(280px, calc(100vw - 24px));
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: 22px 15px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-wrap: nowrap;
  gap: 24px;
  overflow-x: hidden;
  overflow-y: auto;
  border-bottom: 0;
  border-inline-end: 1px solid rgba(40, 63, 82, .12);
  box-shadow: 0 8px 26px rgba(31, 55, 76, .08);
  transition: transform .22s ease;
}
.has-sidebar .brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: auto;
  min-width: 0;
  text-align: center;
}
.has-sidebar .brand-mark { width: 96px; height: 72px; flex: 0 0 72px; }
.has-sidebar .brand-copy { min-width: 0; justify-items: center; text-align: center; }
.has-sidebar .brand-copy strong { font-size: 14px; line-height: 1.5; }
.has-sidebar .brand-copy small { font-size: 12px; }
.has-sidebar .main-nav {
  display: grid;
  align-content: start;
  align-items: stretch;
  align-self: stretch;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  gap: 5px;
  overflow: visible;
}
.has-sidebar .main-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 43px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  text-align: center;
  white-space: normal;
}
.has-sidebar .account-menu {
  display: grid;
  align-self: stretch;
  justify-items: center;
  align-items: center;
  gap: 12px;
  width: auto;
  margin-inline-start: 0;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(40, 63, 82, .12);
}
.has-sidebar .nav-role { color: var(--muted); font-size: 12px; }
.has-sidebar .user-chip { align-items: center; min-width: 0; }
.has-sidebar .user-chip > span:last-child { min-width: 0; }
.has-sidebar .user-chip strong, .has-sidebar .user-chip small {
  white-space: normal;
  overflow-wrap: anywhere;
}
.has-sidebar .user-chip strong { font-size: 14px; }
.has-sidebar .user-chip small { font-size: 12px; }
.has-sidebar .logout-form { width: max-content; justify-self: center; }
.has-sidebar .logout-button { width: auto; min-height: 34px; padding-inline: 10px; }
.has-sidebar .page-shell {
  width: min(1280px, calc(100% - var(--sidebar-width) - 56px));
  margin-block: 32px 72px;
  margin-inline-start: calc(var(--sidebar-width) + 8px);
  margin-inline-end: auto;
}
.sidebar-toggle, .sidebar-close, .sidebar-backdrop { display: none; }
.sidebar-backdrop[hidden] { display: none !important; }

@media (max-width: 960px) {
  .has-sidebar.sidebar-enhanced .topbar { transform: translateX(105%); }
  .has-sidebar.sidebar-enhanced.sidebar-open .topbar { transform: translateX(0); }
  .has-sidebar .topbar { width: min(300px, 86vw); max-width: min(300px, 86vw); }
  .has-sidebar .page-shell {
    width: min(calc(100% - 28px), 760px);
    margin: 72px auto 48px;
  }
  .sidebar-toggle {
    position: fixed;
    inset-block-start: 12px;
    inset-inline-start: 12px;
    z-index: 42;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(40, 63, 82, .13);
    border-radius: 11px;
    color: var(--teal-dark);
    background: rgba(255, 255, 255, .95);
    box-shadow: var(--shadow);
    font-size: 20px;
    cursor: pointer;
  }
  .sidebar-close {
    display: grid;
    place-items: center;
    position: absolute;
    inset-block-start: 13px;
    inset-inline-end: 12px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--ink-soft);
    background: rgba(255, 255, 255, .6);
    font-size: 23px;
    cursor: pointer;
  }
  .sidebar-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 29;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(21, 35, 49, .34);
    backdrop-filter: blur(2px);
  }
  .has-sidebar.sidebar-open { overflow: hidden; }
}
