/*
 * Nizam 2026 — "Studio" art direction.
 *
 * Layer 2 of 2: interactive components, data surfaces, auth, and responsive
 * refinements. Loads after app.css and theme.css.
 */

/* ---------------------------------------------------------------- buttons */
.btn { --bs-btn-border-radius: 10px; font-weight: 600; letter-spacing: .004em; }
.btn-primary {
  --bs-btn-bg: #0d5c4a;
  --bs-btn-border-color: #0d5c4a;
  --bs-btn-hover-bg: #0a493b;
  --bs-btn-hover-border-color: #0a493b;
  --bs-btn-active-bg: #073a2f;
  --bs-btn-active-border-color: #073a2f;
  background-image: linear-gradient(135deg, #116b56 0%, #0d5c4a 55%, #0a493b 100%);
  box-shadow: 0 10px 20px -14px rgba(13, 92, 74, 1);
  transition: transform .16s var(--n-ease), box-shadow .16s var(--n-ease), background-image .16s var(--n-ease);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background-image: linear-gradient(135deg, #0d5c4a 0%, #0a493b 100%);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -16px rgba(13, 92, 74, 1);
}
.btn-primary:active { transform: translateY(0); }
.btn-outline-primary {
  --bs-btn-color: #0a493b;
  --bs-btn-border-color: rgba(13, 92, 74, .35);
  --bs-btn-hover-bg: #e2f0ea;
  --bs-btn-hover-color: #073a2f;
  --bs-btn-hover-border-color: rgba(13, 92, 74, .45);
}
.btn-outline-secondary {
  --bs-btn-border-color: var(--n-border-strong);
  --bs-btn-color: var(--n-ink-soft);
  --bs-btn-hover-bg: #f2f6f2;
  --bs-btn-hover-color: var(--n-ink);
  --bs-btn-hover-border-color: #c9c2b0;
}
.btn-ghost, .btn-icon { border-radius: 10px; }

/* ------------------------------------------------------------------ forms */
.form-control, .form-select {
  border-radius: 11px;
  border-color: var(--n-border-strong);
  background-color: #fff;
  transition: border-color .16s var(--n-ease), box-shadow .16s var(--n-ease);
}
.form-control::placeholder { color: var(--n-faint); }
.form-control:focus, .form-select:focus {
  border-color: var(--n-primary);
  box-shadow: 0 0 0 4px rgba(13, 92, 74, .13);
}
.form-label, .n-form-label { font-weight: 600; color: var(--n-ink-soft); font-size: .82rem; }
.form-text { color: var(--n-muted); }
input[type="file"].form-control { padding-block: .35rem; }
input[type="file"].form-control::file-selector-button {
  border: 0;
  border-radius: 8px;
  margin-inline-end: .75rem;
  padding: .42rem .9rem;
  background: linear-gradient(135deg, #e2f0ea, #d5e9e0);
  color: #073a2f;
  font-weight: 650;
  cursor: pointer;
}
input[type="file"].form-control::file-selector-button:hover { background: #cbe2d8; }
.form-check-input:checked { background-color: var(--n-primary); border-color: var(--n-primary); }
.n-filter-panel {
  background: rgba(255, 255, 255, .86);
  border: 1px solid var(--n-border);
  border-radius: var(--n-radius-lg);
  box-shadow: var(--n-shadow-xs);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* ----------------------------------------------------------------- tables */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > :not(caption) > * > * { border-bottom-color: #efece2; }
.table > thead th {
  background: #fbf9f3;
  color: var(--n-muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 12px 16px;
  border-bottom: 1px solid var(--n-border);
  white-space: nowrap;
}
.table > tbody > tr > td { padding: 13px 16px; color: var(--n-ink-soft); vertical-align: middle; }
.table-hover > tbody > tr:hover > * { background: #f6f9f6; }
.n-data-panel {
  border: 1px solid var(--n-border);
  border-radius: var(--n-radius-lg);
  background: #fff;
  box-shadow: var(--n-shadow-xs);
  overflow: hidden;
}
.n-person-avatar {
  border-radius: 12px;
  background: linear-gradient(145deg, #e2f0ea, #cbe2d8);
  color: #073a2f;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(13, 92, 74, .14);
}
.pagination { --bs-pagination-border-radius: 10px; gap: 4px; }
.page-link { border-radius: 10px !important; border-color: transparent; color: var(--n-ink-soft); font-weight: 600; }
.page-link:hover { background: #eef3ee; color: var(--n-primary-strong); }
.page-item.active .page-link {
  background: linear-gradient(135deg, #116b56, #0a493b);
  border-color: transparent;
  box-shadow: 0 8px 16px -12px rgba(13, 92, 74, 1);
}

/* ----------------------------------------------------------------- badges */
.badge { font-weight: 600; letter-spacing: .005em; border-radius: 999px; padding: .38em .72em; }
.text-bg-light { background: #f4f6fc !important; color: var(--n-ink-soft) !important; }

/* ----------------------------------------------------------------- alerts */
.alert { border-radius: 14px; border-width: 1px; box-shadow: var(--n-shadow-xs); }
.alert-success { border-inline-start: 3px solid #14804a; }
.alert-danger { border-inline-start: 3px solid #d92d4b; }
.alert-warning { border-inline-start: 3px solid #b45309; }
.alert-info { border-inline-start: 3px solid #1570a6; }

/* --------------------------------------------------------- menus & modals */
.dropdown-menu { border-radius: 14px; border-color: var(--n-border); box-shadow: var(--n-shadow); padding: 6px; }
.dropdown-item { border-radius: 9px; padding: 8px 10px; font-weight: 500; }
.dropdown-item:hover, .dropdown-item:focus { background: #f2f6f2; color: var(--n-primary-strong); }
.dropdown-header { font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; color: var(--n-faint); font-weight: 700; }
.modal-content { border-radius: 20px; border-color: var(--n-border); box-shadow: var(--n-shadow-lg); }
.modal-header, .modal-footer { border-color: var(--n-border); padding: 16px 20px; }
.modal-body { padding: 20px; }
.offcanvas { border-radius: 0 20px 20px 0; }
[dir="rtl"] .offcanvas { border-radius: 20px 0 0 20px; }
.list-group-item { border-color: var(--n-border); }

/* ------------------------------------------------------------ empty state */
.n-empty-state, .n-empty { border-radius: var(--n-radius-lg); background: linear-gradient(180deg, #ffffff, #fffdf9); }
.n-empty-state { border: 1px dashed var(--n-border-strong); padding: 44px 24px; }
.n-empty-icon {
  background: linear-gradient(145deg, #e2f0ea, #e2e8ff);
  color: var(--n-primary);
  box-shadow: inset 0 0 0 1px rgba(13, 92, 74, .12), 0 14px 28px -20px rgba(13, 92, 74, .9);
}

/* --------------------------------------------------------------- settings */
.n-settings-nav .nav-link { border-radius: 11px; font-weight: 550; }
.n-settings-nav .nav-link.active {
  background: linear-gradient(135deg, #e2f0ea, #d5e9e0);
  color: var(--n-primary-strong);
  box-shadow: inset 0 0 0 1px rgba(13, 92, 74, .16);
}
.n-settings-card { border-radius: var(--n-radius-lg); }

/* -------------------------------------------------------------- auth page */
.n-auth-body {
  background-color: #f4f6fc;
  background-image:
    radial-gradient(900px 520px at 12% 0%, rgba(13, 92, 74, .14), transparent 60%),
    radial-gradient(700px 460px at 100% 100%, rgba(13, 148, 136, .10), transparent 60%);
}
.n-auth-side {
  background:
    radial-gradient(620px 420px at 100% 0%, rgba(200, 160, 74, .45), transparent 60%),
    radial-gradient(520px 420px at 0% 100%, rgba(13, 148, 136, .32), transparent 62%),
    linear-gradient(155deg, #073a2f 0%, #0a493b 52%, #0d5c4a 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .08);
}
/* The panel is dark now, so every piece of copy on it needs light ink. The
   base rules above were written for a pale blue panel and painted near-black
   text on the emerald background. */
.n-auth-side { color: rgba(255, 255, 255, .82); }
.n-auth-side .n-auth-app-name-lg { color: #fff; }
.n-auth-side .n-auth-app-subtitle { color: rgba(255, 255, 255, .68); }
.n-auth-side .n-auth-tagline { color: #fff; }
.n-auth-side .n-auth-tagline-sub { color: rgba(255, 255, 255, .72); }
.n-auth-side .n-auth-features li {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .14);
}
.n-auth-side .n-auth-feature-icon {
  color: #f0d9a4;
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .18);
}
.n-auth-side .n-auth-feature-text strong { color: #fff; }
.n-auth-side .n-auth-feature-text span { color: rgba(255, 255, 255, .68); }
.n-auth-side .n-auth-side-foot { border-top-color: rgba(255, 255, 255, .16); }
.n-auth-side .n-auth-stat-item,
.n-auth-side .n-auth-stat-icon { color: rgba(255, 255, 255, .72); }
.n-auth-side::after { border-color: rgba(200, 160, 74, .10); }
.n-auth-form-wrap {
  border-radius: 24px;
  border: 1px solid rgba(16, 24, 40, .06);
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--n-shadow-lg);
}
.n-input-premium { border-radius: 12px; }
.n-auth-feature-icon {
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
.n-btn-animated { border-radius: 12px; min-height: 48px; font-weight: 650; letter-spacing: .01em; }

/* Brand mark: logos are usually square badges with their own padding, so
   cropping to a circle cut the artwork. Contain keeps the whole logo visible
   on every surface (sidebar, auth, setup). */
.school-brand-mark img { object-fit: contain; padding: 3px; }
.n-auth-side .school-brand-mark {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .65);
}
.n-auth-side .school-brand-mark img { padding: 5px; }
.n-auth-side-top { flex-wrap: wrap; row-gap: 10px; }
.n-auth-app-name-lg,
.n-auth-app-subtitle { overflow-wrap: anywhere; }

/* Grid children default to min-width:auto, which lets a wide table or a long
   unbroken string push the whole page sideways. These are the containers that
   sit directly in the app grid. */
.nizam-content { min-width: 0; }
.nizam-content > *,
.card-body,
.n-report-card { min-width: 0; }
.table-responsive { max-width: 100%; }

/* Hero safety net: long school names, long Arabic labels and hero buttons all
   wrap instead of pushing the page wider than the viewport. */
.n-hero-title,
.n-hero-sub,
.n-hero-eyebrow { overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
  .n-hero,
  .n-hero-compact { padding: 16px; border-radius: 16px; }
  .n-hero-body { gap: 14px; align-items: flex-start; }
  .n-hero-actions { width: 100%; gap: 8px; }
  .n-hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .n-hero-stat { flex: 1 1 auto; }
  .n-hero-compact .n-page-head-icon { margin-inline-end: 0; }
}

/* ------------------------------------------------------ recovery experience */
/* The recovery route is intentionally its own complete workflow rather than a
   warning banner bolted onto sign-in. It remains visually related to auth while
   giving status, account discovery, code entry, and password quality distinct
   hierarchy. */
.n-recovery-body { background-color: #f5f3ed; }
.n-recovery-shell { grid-template-columns: minmax(350px, 40%) minmax(0, 1fr); }
.n-recovery-aside { min-height: 100vh; padding: clamp(30px, 4.2vw, 58px); gap: 28px; }
.n-recovery-main {
  min-width: 0;
  padding: 70px clamp(22px, 5vw, 72px) 44px;
  align-items: flex-start;
  overflow-y: auto;
  background:
    radial-gradient(520px 320px at 100% 0%, rgba(189, 139, 50, .09), transparent 67%),
    linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(248, 245, 238, .88));
}
.n-recovery-panel {
  max-width: 570px;
  padding: clamp(22px, 3.2vw, 34px);
  border-color: rgba(16, 36, 29, .09);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 34px 80px -42px rgba(16, 36, 29, .52);
}
.n-recovery-guide .n-auth-tagline { max-width: 15ch; margin-block-end: 10px; }
.n-recovery-guide .n-auth-tagline-sub { margin-block-end: 22px; }
.n-recovery-kicker {
  width: fit-content;
  margin-block-end: 13px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  color: #f0d9a4;
  background: rgba(255, 255, 255, .08);
  font-size: .68rem;
  font-weight: 650;
  letter-spacing: .02em;
}
.n-recover-steps {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  list-style: none;
}
.n-recover-steps li {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 14px;
  background: rgba(255, 255, 255, .065);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.n-recover-steps li > div { min-width: 0; }
.n-recover-step-num {
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, .13);
  font-size: .74rem;
  font-weight: 750;
}
.n-recover-step-title { margin-block-end: 3px; color: #fff; font-size: .78rem; font-weight: 680; }
.n-recover-step-text { color: rgba(255, 255, 255, .7); font-size: .7rem; line-height: 1.55; }
.n-recover-code {
  max-width: 100%;
  margin-block-start: 7px;
  padding: 5px 8px;
  display: inline-block;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 8px;
  color: #f3e6c8;
  background: rgba(0, 0, 0, .26);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: .68rem;
  white-space: nowrap;
}
.n-recovery-heading { display: flex; align-items: flex-start; gap: 13px; margin-block-end: 18px; }
.n-recovery-heading .n-auth-welcome-icon { flex: 0 0 44px; margin: 0; }
.n-recovery-heading h1 { font-size: clamp(1.35rem, 2.8vw, 1.7rem); }
.n-recovery-eyebrow {
  margin-block-end: 3px;
  color: var(--n-accent-strong);
  font-size: .64rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
[dir="rtl"] .n-recovery-eyebrow { letter-spacing: 0; }
.n-recovery-alert { margin-block-end: 12px; padding: 11px 12px; border-radius: 12px; font-size: .78rem; line-height: 1.55; }
.n-recovery-status {
  margin-block-end: 12px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--n-border);
  border-radius: 13px;
  background: var(--n-surface-subtle);
}
.n-recovery-status-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--n-muted);
  background: rgba(255, 255, 255, .76);
}
.n-recovery-status-copy { min-width: 0; display: grid; gap: 1px; }
.n-recovery-status-copy strong { color: var(--n-ink-soft); font-size: .76rem; }
.n-recovery-status-copy > span { color: var(--n-muted); font-size: .67rem; line-height: 1.45; }
.n-recovery-status.is-active { border-color: #b9dfcb; background: var(--n-success-soft); }
.n-recovery-status.is-active .n-recovery-status-icon { color: var(--n-success); background: #fff; }
.n-recovery-status.is-expired { border-color: #eed2a9; background: var(--n-warning-soft); }
.n-recovery-status.is-expired .n-recovery-status-icon { color: var(--n-warning); }
.n-recovery-status.is-unavailable { border-color: #efbec5; background: var(--n-danger-soft); }
.n-recovery-status.is-unavailable .n-recovery-status-icon { color: var(--n-danger); }
.n-recovery-countdown {
  min-width: 55px;
  padding: 5px 8px;
  border: 1px solid rgba(20, 122, 82, .2);
  border-radius: 999px;
  color: var(--n-success);
  background: rgba(255, 255, 255, .76);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: .7rem;
  font-weight: 750;
  text-align: center;
}
.n-recovery-help {
  margin-block-end: 12px;
  overflow: clip;
  border: 1px solid var(--n-border);
  border-radius: 13px;
  background: #fff;
}
.n-recovery-help summary {
  min-height: 48px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--n-ink-soft);
  cursor: pointer;
  list-style: none;
}
.n-recovery-help summary::-webkit-details-marker { display: none; }
.n-recovery-help summary > span:nth-child(2) { display: grid; gap: 1px; }
.n-recovery-help summary strong { font-size: .75rem; }
.n-recovery-help summary small { color: var(--n-muted); font-size: .64rem; }
.n-recovery-help-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--n-primary);
  background: var(--n-primary-soft);
}
.n-recovery-help-chevron { color: var(--n-faint); transition: transform .2s var(--n-ease); }
.n-recovery-help[open] .n-recovery-help-chevron { transform: rotate(180deg); }
.n-recovery-help-body { padding: 0 12px 12px; border-block-start: 1px solid var(--n-border); }
.n-recovery-help-body > p { margin: 10px 0 8px; color: var(--n-muted); font-size: .7rem; line-height: 1.55; }
.n-recovery-command {
  min-width: 0;
  padding: 7px 8px 7px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #dce6e1;
  border-radius: 10px;
  color: #dceddf;
  background: #102f27;
}
.n-recovery-command code { min-width: 0; overflow-x: auto; color: inherit; font-size: .7rem; white-space: nowrap; }
.n-recovery-copy {
  flex: 0 0 auto;
  padding: 4px 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, .15);
  color: #fff;
  background: rgba(255, 255, 255, .1);
  font-size: .62rem;
}
.n-recovery-copy:hover { color: #fff; background: rgba(255, 255, 255, .18); }
.n-recovery-help-body .n-recovery-help-note { margin-block-end: 0; color: var(--n-accent-strong); }
.n-recovery-form { padding: 18px; box-shadow: none; }
.n-auth-form .n-form-label { margin-block-end: 6px; color: var(--n-ink-soft); font-weight: 650; font-size: .76rem; }
.n-auth-form .n-form-group { margin-block-end: 14px; }
.n-recovery-form .n-form-group + .n-form-group { margin-block-start: 0; }
.n-recovery-form .n-input-premium { height: 46px; padding-inline-end: 42px; border-color: var(--n-border-strong); }
.n-recover-token-input {
  padding-inline-end: 12px !important;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: .82rem;
  font-weight: 650;
  letter-spacing: .13em;
  text-align: center;
  text-transform: uppercase;
}
.n-recover-token-input::placeholder { color: #9aa8a0; font-size: .73rem; letter-spacing: .1em; }
.n-field-help { margin-block-start: 5px; color: var(--n-muted); font-size: .63rem; line-height: 1.45; }
.n-field-help.is-valid { color: var(--n-success); }
.n-field-help.is-invalid { color: var(--n-danger); }
.n-password-input .n-input-premium { padding-inline-end: 45px !important; }
.n-password-toggle {
  position: absolute;
  z-index: 2;
  inset-inline-end: 8px;
  inset-block-start: 50%;
  width: 32px;
  height: 32px;
  padding: 0;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--n-muted);
  background: transparent;
}
.n-password-toggle:hover { color: var(--n-primary); background: var(--n-primary-soft); }
.n-password-guidance { margin-block-start: 7px; }
.n-password-meter { height: 4px; overflow: hidden; border-radius: 999px; background: var(--n-surface-muted); }
.n-password-meter span { width: 0; height: 100%; display: block; border-radius: inherit; background: var(--n-danger); transition: width .2s var(--n-ease), background .2s var(--n-ease); }
.n-password-meter span.is-weak { width: 25%; background: var(--n-danger); }
.n-password-meter span.is-fair { width: 50%; background: var(--n-warning); }
.n-password-meter span.is-good { width: 75%; background: var(--n-accent); }
.n-password-meter span.is-strong { width: 100%; background: var(--n-success); }
.n-password-guidance-row { margin-block-start: 5px; display: flex; justify-content: space-between; gap: 10px; color: var(--n-muted); font-size: .61rem; }
.n-password-guidance-row [data-password-strength] { font-weight: 650; }
.n-password-guidance-row .is-weak { color: var(--n-danger); }
.n-password-guidance-row .is-fair { color: var(--n-warning); }
.n-password-guidance-row .is-good { color: var(--n-accent-strong); }
.n-password-guidance-row .is-strong,
.n-password-guidance-row .is-valid { color: var(--n-success); }
.n-recovery-form .n-btn-animated { min-height: 48px; margin-block-start: 3px; }
.n-recovery-assurance {
  margin-block-start: 11px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  color: var(--n-muted);
  font-size: .61rem;
  line-height: 1.45;
  text-align: center;
}
.n-recovery-assurance .n-icon { margin-block-start: 1px; color: var(--n-success); }
.n-auth-sub { margin: 5px 0 0; color: var(--n-muted); font-size: .8rem; line-height: 1.6; }
.n-recover-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--n-muted);
  font-size: .76rem;
  font-weight: 600;
  text-decoration: none;
}
.n-recover-back:hover { color: var(--n-primary); }
.n-auth-footer { margin-block-start: 16px; text-align: center; }
.n-copy-inline { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; }

@media (max-width: 991.98px) {
  .n-recovery-shell { grid-template-columns: 1fr; }
  .n-recovery-aside { min-height: auto; }
  .n-recovery-guide { max-width: none; }
  .n-recovery-guide .n-auth-tagline { max-width: none; font-size: 1.45rem; }
  .n-recovery-guide .n-auth-tagline-sub { display: block; margin-block-end: 15px; }
  .n-recover-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .n-recover-steps li { padding: 10px; }
  .n-recovery-main { padding-block-start: 70px; }
}
@media (max-width: 767.98px) {
  .n-recovery-aside { padding: 22px; }
  .n-recovery-guide { display: none; }
  .n-recovery-main { min-height: calc(100vh - 113px); padding: 68px 14px 28px; }
  .n-recovery-panel { padding: 20px; border-radius: 19px; }
}
@media (max-width: 480px) {
  .n-recovery-panel { padding: 17px 14px; }
  .n-recovery-heading { gap: 10px; }
  .n-recovery-heading .n-auth-welcome-icon { width: 39px; height: 39px; flex-basis: 39px; }
  .n-recovery-status { grid-template-columns: auto minmax(0, 1fr); }
  .n-recovery-countdown { grid-column: 2; width: fit-content; }
  .n-recovery-form { padding: 15px 12px; }
  .n-recover-token-input { font-size: .7rem; letter-spacing: .08em; }
  .n-password-guidance-row { align-items: flex-start; flex-direction: column; gap: 2px; }
  .n-copy-inline span { display: none; }
}

/* -------------------------------------------------------------- timetable */
/* Keep the period column readable while the day grid scrolls on phones. */
@media (max-width: 991.98px) {
  .n-timetable-scroll table th:first-child,
  .n-timetable-scroll table td:first-child {
    position: sticky;
    inset-inline-start: 0;
    z-index: 2;
    background: #fff;
    box-shadow: 1px 0 0 var(--n-border);
  }
  [dir="rtl"] .n-timetable-scroll table th:first-child,
  [dir="rtl"] .n-timetable-scroll table td:first-child { box-shadow: -1px 0 0 var(--n-border); }
}

/* ---------------------------------------------------------------- density */
body.n-density-compact .card-header { padding: 10px 14px; }
body.n-density-compact .table > tbody > tr > td { padding: 9px 12px; }
body.n-density-compact .table > thead th { padding: 9px 12px; }

/* -------------------------------------------------------- motion & print */
@media (prefers-reduced-motion: reduce) {
  .card, .btn-primary, .form-control, .form-select { transition: none !important; }
  .btn-primary:hover { transform: none; }
}
@media print {
  body { background: #fff !important; }
  .nizam-topbar, .nizam-sidebar, .n-settings-nav { display: none !important; }
  .card { box-shadow: none; border-color: #d9dde8; }
}

/* --------------------------------------------------------- module polish */
/* Bootstrap utility panels inside cards (finance totals, info blocks) were
   the last surfaces still reading as default Bootstrap. */
.card .bg-light {
  background: #f7f8fd !important;
  border-color: var(--n-border) !important;
  border-radius: 14px;
}
.list-group-flush > .list-group-item { background: transparent; }
.timetable-grid td, .timetable-grid th { border-color: #eef1f8; }
.timetable-grid tbody tr:hover > * { background: #f8f9ff; }
.n-timetable-period-head { background: #f7f8fd; }

/* ------------------------------------------------------------ error pages */
.n-error-page {
  background-color: var(--n-canvas);
  background-image:
    radial-gradient(900px 520px at 100% 0%, rgba(13, 92, 74, .10), transparent 60%),
    radial-gradient(700px 460px at 0% 100%, rgba(13, 148, 136, .08), transparent 60%);
}
.n-error-shell { width: 100%; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.n-error-card {
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  padding: 40px 30px 34px;
  text-align: center;
  border-radius: 26px;
  border: 1px solid var(--n-border);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--n-shadow-lg);
}
.n-error-code {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  font-size: clamp(3.4rem, 9vw, 4.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.06em;
  background: linear-gradient(135deg, #0d5c4a, #0d9488);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.n-error-icon {
  width: 68px;
  height: 68px;
  margin: 16px auto 14px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--n-primary-soft);
  color: var(--n-primary);
  box-shadow: inset 0 0 0 1px rgba(13, 92, 74, .14);
}
.n-error-icon-danger { background: var(--n-danger-soft); color: var(--n-danger); box-shadow: inset 0 0 0 1px rgba(217, 45, 75, .16); }
.n-error-icon-warning { background: var(--n-warning-soft); color: var(--n-warning); box-shadow: inset 0 0 0 1px rgba(180, 83, 9, .16); }
.n-error-title { font-size: 1.32rem; margin: 0 0 8px; }
.n-error-text { color: var(--n-muted); margin: 0 auto 22px; max-width: 44ch; line-height: 1.65; }
.n-error-action { min-height: 44px; padding-inline: 22px; display: inline-flex; align-items: center; gap: 8px; }

/* --------------------------------------------------------- setup wizard */
.n-setup-body {
  background-image:
    radial-gradient(760px 480px at 50% -10%, rgba(13, 92, 74, .12), transparent 62%),
    radial-gradient(600px 400px at 100% 100%, rgba(13, 148, 136, .08), transparent 62%);
}
.n-setup-card {
  border-radius: 24px;
  border: 1px solid var(--n-border);
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--n-shadow-lg);
}
.n-setup-card h1 { letter-spacing: -.02em; }
.n-setup-step-circle { border-radius: 11px; }
.n-setup-step.active .n-setup-step-circle { box-shadow: 0 0 0 4px var(--n-primary-soft), 0 8px 18px -12px rgba(13, 92, 74, 1); }

/* -------------------------------------------------------- dashboard tune */
.n-attention-list li { flex-wrap: wrap; row-gap: 6px; }
.n-attention-list li > strong { flex: 1 1 200px; min-width: 0; }
.n-attention-list li > a { flex: 0 0 auto; }
.stat-label { font-size: .68rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--n-muted); }
[lang="ar"] .stat-label { font-size: .8rem; letter-spacing: 0; text-transform: none; }
.n-report-card { transition: transform .18s var(--n-ease), box-shadow .18s var(--n-ease), border-color .18s var(--n-ease); }
.n-report-card:hover { transform: translateY(-2px); box-shadow: var(--n-shadow); border-color: rgba(13, 92, 74, .25); }

/* ------------------------------------------------------ offline queue UI */
.n-queue-banner {
  position: fixed;
  inset-block-end: 18px;
  inset-inline-end: 18px;
  z-index: 1080;
  max-width: min(420px, calc(100vw - 36px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(180, 83, 9, .28);
  background: #fffaeb;
  color: #7c2d12;
  box-shadow: var(--n-shadow-lg);
  font-size: .82rem;
  line-height: 1.45;
}
.n-queue-banner[data-state="auth"] { border-color: rgba(217, 45, 75, .3); background: #fff1f3; color: #7a1425; }
.n-queue-banner-icon { flex: 0 0 auto; display: inline-flex; color: #b45309; }
.n-queue-banner[data-state="auth"] .n-queue-banner-icon { color: #d92d4b; }
.n-queue-banner-icon svg { width: 20px; height: 20px; }
.n-queue-banner-text { flex: 1 1 auto; min-width: 0; }
.n-queue-banner-btn {
  flex: 0 0 auto;
  border: 1px solid rgba(120, 53, 15, .25);
  background: #fff;
  color: inherit;
  border-radius: 10px;
  padding: 6px 12px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.n-queue-banner-btn:hover { background: #fff7e6; }
.n-queue-banner-btn:focus-visible { outline: 3px solid rgba(13, 92, 74, .3); outline-offset: 2px; }
.n-queue-toast { position: static; margin: 0; }
@media (max-width: 575.98px) {
  .n-queue-banner { inset-inline: 12px; inset-block-end: 12px; max-width: none; }
}

/* ------------------------------------------------- pending sends screen */
.n-queue-help { font-size: .84rem; color: var(--n-muted); max-width: 70ch; margin-bottom: 16px; }
.n-queue-panel-actions { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.n-queue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.n-queue-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid var(--n-border);
  border-radius: var(--n-radius);
  background: var(--n-surface-muted);
}
.n-queue-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.n-queue-row-title { font-weight: 650; font-size: .86rem; color: var(--n-ink); direction: ltr; text-align: start; overflow-wrap: anywhere; }
.n-queue-row-meta { font-size: .76rem; color: var(--n-muted); }
.n-queue-row-actions { display: flex; gap: 8px; flex-shrink: 0; }
.n-queue-empty {
  margin: 0;
  padding: 22px 16px;
  text-align: center;
  font-size: .84rem;
  color: var(--n-muted);
  border: 1px dashed var(--n-border-strong);
  border-radius: var(--n-radius);
  background: var(--n-surface-subtle);
}

/* ------------------------------------------------- official pathway badge */
/* Exact Arabic pathway label from the roster headings. Wraps rather than
   truncates: "مسار الآداب والفنون" is meaningful text, not a code. */
.n-pathway-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(13, 92, 74, .18);
  background: var(--n-primary-soft);
  color: var(--n-primary-strong);
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: normal;
  text-align: start;
}

/* ------------------------------------------------------ weekly assessments */
.n-assessment-card .card-header { background: #fbfcfb; border-bottom: 1px solid var(--n-border); }
.n-assessment-table th {
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--n-muted);
}
[lang="ar"] .n-assessment-table th { font-size: .78rem; letter-spacing: 0; text-transform: none; }
.n-assessment-table td { font-size: .86rem; }
.n-assessment-table tbody tr.n-assessment-none td { background: #f6f7f6; }

/* ------------------------------------------------------ roster CSV import */
.n-roster-upload .n-import-steps { margin-block: 16px; }
.n-roster-columns { margin: 0; padding-inline-start: 18px; font-size: .82rem; line-height: 1.9; }
.n-roster-columns code { font-size: .78rem; }
.n-roster-count { border: 1px solid var(--n-border); }
.n-roster-count .card-body { padding: 16px 18px; }
.n-roster-count-value { font-size: 1.9rem; font-weight: 750; line-height: 1; letter-spacing: -.03em; }
.n-roster-count-label { margin-block-start: 6px; font-size: .78rem; color: var(--n-muted); }
.n-roster-count-ok { border-inline-start: 3px solid var(--n-success); }
.n-roster-count-ok .n-roster-count-value { color: var(--n-success); }
.n-roster-count-duplicate { border-inline-start: 3px solid var(--n-warning); }
.n-roster-count-duplicate .n-roster-count-value { color: var(--n-warning); }
.n-roster-count-error { border-inline-start: 3px solid var(--n-danger); }
.n-roster-count-error .n-roster-count-value { color: var(--n-danger); }

.n-slot-note { display: block; margin-block-start: 2px; font-size: .62rem; color: var(--n-muted); }

/* ------------------------------------------------- mobile data surfaces */
/* A table wider than a phone must scroll inside its own panel, never widen
   the page: on RTL that pushed the whole document wider than the viewport and
   left a blank strip beside the content. Panels and cards also need min-width
   zero so a grid/flex child can shrink below its content width. */
.n-data-panel, .card, .row > [class*="col-"] { min-width: 0; }
.table-responsive { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 575.98px) {
  .table-responsive > .table { min-width: 620px; }
  /* A table that opted into the stacked card layout (app.css .n-table-stack)
     is not a scrolling table. Keeping the 620px floor here made each card
     620px wide inside a 360px screen, so the values sat off the left edge and
     only the field labels were visible. */
  .table-responsive > .n-table-stack { min-width: 0; }
  .n-data-panel .table > thead th,
  .n-data-panel .table > tbody > tr > td { padding-inline: 12px; }
}

/* ------------------------------------------------------- mobile family portal
 * A dedicated phone-first surface, not a compressed admin table. The reading
 * order is: which child -> how are they doing -> what is new -> details.
 * Everything is scoped under .n-family so no administration screen inherits it.
 */
.n-family {
  --nf-radius: 18px;
  --nf-shadow: 0 18px 40px -32px rgba(11, 40, 33, .55);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 5.75rem;
}
.nf-child-strip {
  display: flex;
  gap: .6rem;
  overflow-x: auto;
  padding: .15rem .15rem .5rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.nf-child-strip::-webkit-scrollbar { display: none; }
.nf-child-chip {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 13.5rem;
  padding: .6rem .8rem;
  border: 1px solid var(--n-border);
  border-radius: 14px;
  background: #fff;
  color: var(--n-ink);
  text-decoration: none;
  scroll-snap-align: start;
  transition: border-color .16s var(--n-ease), box-shadow .16s var(--n-ease);
}
.nf-child-chip:hover, .nf-child-chip:focus-visible { border-color: rgba(13, 92, 74, .45); color: var(--n-ink); }
.nf-child-chip.is-active { border-color: #0d5c4a; box-shadow: 0 0 0 3px rgba(13, 92, 74, .12); }
.nf-child-avatar {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #e6f2ec;
  color: #0a493b;
  font-weight: 700;
  flex: 0 0 auto;
}
.nf-child-copy { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.nf-child-copy strong { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nf-child-copy small { color: var(--n-muted); font-size: .75rem; }
.nf-child-rate { margin-inline-start: auto; font-size: .72rem; font-weight: 700; color: #0a493b; }

.nf-hero {
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(201, 226, 213, .55) 0%, rgba(255, 255, 255, 0) 55%),
    #fff;
  border: 1px solid var(--n-border);
  border-radius: var(--nf-radius);
  box-shadow: var(--nf-shadow);
  padding: 1.1rem;
}
.nf-hero-main { display: flex; align-items: center; gap: .85rem; }
.nf-avatar {
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #116b56, #0a493b);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  flex: 0 0 auto;
}
.nf-hero-copy { min-width: 0; flex: 1 1 auto; }
.nf-child-name { font-size: 1.12rem; font-weight: 700; margin: 0 0 .3rem; }
.nf-child-meta { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.nf-pill {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .14rem .5rem;
  border-radius: 999px;
  background: #f2f6f2;
  border: 1px solid var(--n-border);
  color: var(--n-ink-soft);
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}
.nf-pill-present { background: #e7f5ec; border-color: #b9e2c8; color: #14653c; }
.nf-pill-late { background: #fff6e2; border-color: #f0d69a; color: #7a5600; }
.nf-pill-absent, .nf-pill-missing { background: #fdeaea; border-color: #f2c2c2; color: #8d1c1c; }
.nf-pill-excused, .nf-pill-submitted, .nf-pill-reviewed { background: #eaf0fb; border-color: #c4d3ef; color: #244a86; }
.nf-pill-urgent { background: #fdeaea; border-color: #f2c2c2; color: #8d1c1c; }
.nf-pill-important { background: #fff6e2; border-color: #f0d69a; color: #7a5600; }

.nf-ring { position: relative; width: 4rem; height: 4rem; flex: 0 0 auto; }
.nf-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.nf-ring circle { fill: none; stroke-width: 6; }
.nf-ring-track { stroke: #e8eee8; }
.nf-ring-value { stroke: #0d5c4a; stroke-linecap: round; transition: stroke-dashoffset .5s var(--n-ease); }
.nf-ring-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: .72rem;
  font-weight: 700;
  color: #0a493b;
}
.nf-ring-caption { margin: .45rem 0 0; font-size: .68rem; color: var(--n-muted); text-align: end; }

.nf-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
  margin-top: 1rem;
}
.nf-metric {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: .55rem .5rem;
  border-radius: 12px;
  background: #f7faf7;
  border: 1px solid var(--n-border);
  color: var(--n-ink);
  text-decoration: none;
  min-width: 0;
}
.nf-metric:hover, .nf-metric:focus-visible { border-color: rgba(13, 92, 74, .4); color: var(--n-ink); }
.nf-metric-label { font-size: .62rem; line-height: 1.2; color: var(--n-muted); min-height: 1.5em; }
.nf-metric strong { font-size: .95rem; line-height: 1.25; }
.nf-metric small { font-size: .6rem; color: var(--n-faint); line-height: 1.2; }

.nf-quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
  margin-top: .9rem;
  padding-top: .9rem;
  border-top: 1px solid var(--n-border);
}
.nf-quick a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  padding: .55rem .25rem;
  border-radius: 12px;
  color: var(--n-ink-soft);
  font-size: .7rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}
.nf-quick a:hover, .nf-quick a:focus-visible { background: #eef5f0; color: #0a493b; }
.nf-quick .n-icon { width: 1.15rem; height: 1.15rem; }

.nf-section { display: flex; flex-direction: column; gap: .55rem; scroll-margin-top: 4.5rem; }
.nf-section-head { display: flex; align-items: center; gap: .45rem; padding-inline: .15rem; }
.nf-section-head .n-icon { color: #0d5c4a; width: 1.05rem; height: 1.05rem; }
.nf-section-head h3 { font-size: .92rem; font-weight: 700; margin: 0; }
.nf-count {
  margin-inline-start: auto;
  font-size: .72rem;
  color: var(--n-muted);
  background: #f2f6f2;
  border-radius: 999px;
  padding: .1rem .55rem;
}

.nf-announcements { display: flex; flex-direction: column; gap: .55rem; }
.nf-announcement {
  padding: .8rem .9rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--n-border);
  border-inline-start: 3px solid #cbd8cf;
}
.nf-announcement.nf-priority-important { border-inline-start-color: #e0a800; }
.nf-announcement.nf-priority-urgent { border-inline-start-color: #c0392b; }
.nf-announcement-top { display: flex; align-items: flex-start; gap: .5rem; justify-content: space-between; }
.nf-announcement-top strong { font-size: .86rem; line-height: 1.35; }
.nf-announcement p { margin: .35rem 0 0; font-size: .8rem; color: var(--n-ink-soft); line-height: 1.55; }
.nf-announcement time { display: block; margin-top: .35rem; font-size: .68rem; color: var(--n-faint); }

.nf-subjects { display: grid; gap: .55rem; }
.nf-subject { padding: .75rem .9rem; background: #fff; border: 1px solid var(--n-border); border-radius: 14px; }
.nf-subject-top { display: flex; justify-content: space-between; gap: .5rem; font-size: .82rem; font-weight: 600; }
.nf-bar { height: 7px; border-radius: 999px; background: #edf1ed; margin: .45rem 0 .35rem; overflow: hidden; }
.nf-bar-fill { display: block; height: 100%; border-radius: inherit; }
.nf-subject-meta { display: flex; justify-content: space-between; gap: .5rem; font-size: .68rem; color: var(--n-muted); }

.nf-att-summary { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .75rem; color: var(--n-muted); margin-bottom: .7rem; }
.nf-att-summary b { font-size: .95rem; }
.nf-days {
  display: flex;
  gap: .3rem;
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nf-days::-webkit-scrollbar { display: none; }
.nf-day { display: flex; flex-direction: column; align-items: center; gap: .2rem; min-width: 2.1rem; }
.nf-day time { font-size: .58rem; color: var(--n-faint); }
.nf-day-dot { display: block; width: 1.55rem; height: 1.55rem; border-radius: 9px; background: #edf1ed; }
.nf-day-present .nf-day-dot { background: #cfe9d8; }
.nf-day-late .nf-day-dot { background: #f7e2ae; }
.nf-day-absent .nf-day-dot { background: #f4c7c7; }
.nf-day-excused .nf-day-dot { background: #cddbf3; }
.nf-legend { margin: .6rem 0 0; font-size: .67rem; color: var(--n-muted); }
.nf-events { list-style: none; margin: .7rem 0 0; padding: .7rem 0 0; border-top: 1px dashed var(--n-border); display: flex; flex-direction: column; gap: .35rem; }
.nf-events li { display: flex; align-items: center; gap: .5rem; font-size: .72rem; color: var(--n-muted); }

.nf-homework, .nf-results, .nf-invoices, .nf-messages { display: flex; flex-direction: column; gap: .55rem; }
.nf-hw, .nf-result, .nf-invoice, .nf-message {
  background: #fff;
  border: 1px solid var(--n-border);
  border-radius: 14px;
  padding: .75rem .9rem;
}
.nf-hw-top { display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; }
.nf-hw-top strong { font-size: .84rem; line-height: 1.35; }
.nf-hw-meta { margin: .3rem 0 0; font-size: .7rem; color: var(--n-muted); }
.nf-hw-feedback { margin: .45rem 0 0; font-size: .72rem; color: var(--n-ink-soft); display: flex; gap: .3rem; align-items: flex-start; }

.nf-result { display: flex; justify-content: space-between; gap: .6rem; align-items: center; }
.nf-result-main { display: flex; flex-direction: column; min-width: 0; }
.nf-result-main strong { font-size: .82rem; }
.nf-result-main small { font-size: .7rem; color: var(--n-muted); }
.nf-result-score { text-align: end; display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; }
.nf-result-score b { font-size: .82rem; }
.nf-result-score small { font-size: .68rem; color: var(--n-muted); }

.nf-invoice { display: flex; justify-content: space-between; gap: .6rem; }
.nf-invoice strong { display: block; font-size: .82rem; }
.nf-invoice small { display: block; font-size: .68rem; color: var(--n-muted); }

.nf-message strong { font-size: .82rem; }
.nf-message p { margin: .25rem 0; font-size: .75rem; color: var(--n-ink-soft); }
.nf-message time { font-size: .66rem; color: var(--n-faint); }

.nf-bottom-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 1030;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .15rem;
  padding: .4rem .5rem calc(.4rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--n-border);
  backdrop-filter: blur(12px);
  box-shadow: 0 -12px 30px -24px rgba(11, 40, 33, .6);
}
.nf-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  padding: .35rem .2rem;
  border-radius: 10px;
  color: var(--n-muted);
  font-size: .64rem;
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
  justify-content: center;
}
.nf-bottom-nav a:hover, .nf-bottom-nav a:focus-visible { color: #0a493b; background: #eef5f0; }
.nf-bottom-nav .n-icon { width: 1.2rem; height: 1.2rem; }

@media (min-width: 768px) {
  .n-family { padding-bottom: 0; }
  .nf-metrics { gap: .75rem; }
  .nf-metric { padding: .75rem .7rem; }
  .nf-metric strong { font-size: 1.15rem; }
  .nf-metric-label, .nf-metric small { font-size: .7rem; }
  .nf-quick a { font-size: .78rem; }
}
@media (min-width: 992px) {
  .n-family { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1.1rem; align-items: start; }
  .nf-child-strip { grid-column: 1 / -1; }
  .nf-hero { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 1.5rem; align-items: center; }
  .nf-hero-main { grid-column: 1; }
  .nf-ring-caption { display: none; }
  .nf-metrics { grid-column: 2; grid-row: 1; margin-top: 0; }
  .nf-quick { grid-column: 1 / -1; }
  .nf-bottom-nav { display: none; }
  #fees, #homework { grid-column: 1; }
  #results, #attendance { grid-column: 2; }
}
@media (max-width: 420px) {
  .nf-hero { padding: .9rem; }
  .nf-child-name { font-size: 1rem; }
  .nf-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nf-metric-label { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .nf-ring-value, .nf-child-chip { transition: none; }
}
