/* ═══════════════════════════════════════════════════════════════════
   INSTITUT NOUN — school-clean.css
   Design system overrides for the "clean" theme (Bootstrap 4.1.3,
   Froala Design Blocks, FontAwesome, RemixIcon).
   Palette derived from the official Institut Noun logo, with AA-safe action colors so small
   white labels remain readable on every interactive surface.
   Conservative: only CSS, no markup/logic changes required.
   ═══════════════════════════════════════════════════════════════════ */

:root {
    /* Brand — Teal (from the official Institut Noun logo) */
    --n-brand: #0e7490;
    --n-brand-dark: #155e75;
    --n-brand-light: #67e8f9;
    --n-brand-pale: #ecfeff;
    --n-brand-glow: rgba(14, 116, 144, 0.14);

    /* Semantic */
    --n-success: #15803d;
    --n-success-pale: #dcfce7;
    --n-warning: #c2410c;
    --n-warning-pale: #fff7ed;
    --n-danger: #dc2626;
    --n-danger-pale: #fef2f2;
    --n-info: #0e7490;
    --n-info-pale: #ecfeff;

    /* Warm neutrals — cream undertone, not cold gray */
    --n-bg: #faf9f7;
    --n-surface: #ffffff;
    --n-border: #e8e5e0;
    --n-border-light: #f0eeea;
    --n-text: #1c1917;
    --n-text-secondary: #57534e;
    /* Stone 500 keeps secondary copy calm while meeting WCAG AA on white. */
    --n-text-muted: #78716c;
    --n-text-faint: #d6d3d1;

    /* Radii */
    --n-radius: 0.625rem;
    --n-radius-lg: 0.875rem;
    --n-radius-xl: 1.25rem;
    --n-radius-full: 9999px;

    /* Shadows */
    --n-shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.04);
    --n-shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.06), 0 1px 2px rgba(28, 25, 23, 0.04);
    --n-shadow-md: 0 4px 6px -1px rgba(28, 25, 23, 0.06), 0 2px 4px -2px rgba(28, 25, 23, 0.04);
    --n-shadow-lg: 0 10px 15px -3px rgba(28, 25, 23, 0.08), 0 4px 6px -4px rgba(28, 25, 23, 0.04);
    --n-shadow-brand: 0 4px 14px rgba(8, 145, 178, 0.2);

    /* Quran product accents — used as meaning, not decoration only. */
    --n-quran: #087f6b;
    --n-quran-dark: #075f56;
    --n-quran-pale: #ecfdf5;
    --n-quran-glow: rgba(8, 127, 107, .14);
    --n-gold: #b8872f;
    --n-gold-dark: #8a6421;
    --n-gold-pale: #fdf7e8;
}

/* ──────────────────────────────
   TYPOGRAPHY — keep Roboto (already loaded), safe system fallback
   ────────────────────────────── */
body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--n-text);
    background-color: var(--n-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}
/* Family workspace: consistent SaaS surface for every legacy family page. */
.family-surface { --family-width: 1180px; }
.family-surface main.family-page,
.family-surface .team-2 { min-height: calc(100vh - 150px); }
.family-surface .family-page > .container,
.family-surface .team-2 > .container,
.family-surface .team-2 > .container-fluid { max-width: var(--family-width); padding: 2.5rem 1.25rem 5rem; }
.family-surface .team-2 h2 { font-size: clamp(1.35rem, 2vw, 1.8rem); margin: 0 0 1.25rem; }
.family-surface .team-2 > .container > .row:first-child h2 { font-size:clamp(2rem,4vw,3rem); letter-spacing:-.045em; }
.family-student-tabs { margin:0 0 1.5rem; border:1px solid var(--n-border); border-radius:var(--n-radius-lg); background:var(--n-surface); box-shadow:var(--n-shadow-sm); overflow-x:auto; }
.family-student-tabs-wrap { display:flex; min-width:max-content; padding:.4rem; gap:.25rem; }
.family-student-tab { appearance:none; -webkit-appearance:none; border:0; border-radius:var(--n-radius); background:transparent; color:var(--n-text-secondary); padding:.7rem 1rem; font:inherit; font-weight:700; cursor:pointer; white-space:nowrap; }
.family-student-tab:hover { color:var(--n-brand-dark); background:var(--n-brand-pale); }
.family-student-tab.active { color:#fff; background:var(--n-brand); box-shadow:var(--n-shadow-brand); }
.family-student-page .family-student-panel-heading h3 { margin-bottom:1rem; }
.family-panel-status { display:flex; align-items:center; justify-content:center; gap:.65rem; min-height:12rem; padding:2rem; border:1px dashed var(--n-border); border-radius:var(--n-radius-lg); background:var(--n-surface); color:var(--n-text-muted); text-align:center; }
.family-panel-status-error { color:var(--n-danger, #b42318); }
.family-quran-done-control { display:inline-flex; align-items:center; justify-content:center; min-width:4.75rem; min-height:2.75rem; gap:.4rem; margin:0; border:1px solid var(--n-border); border-radius:999px; padding:.35rem .65rem; background:#fff; color:var(--n-danger,#b42318); cursor:pointer; font-size:.72rem; font-weight:750; }
.family-quran-done-control:focus-within { border-color:var(--n-brand); box-shadow:var(--n-focus); }
.family-quran-done-control input { width:1.1rem; height:1.1rem; margin:0; accent-color:var(--n-success,#16a34a); }
.family-quran-done-control input:disabled { cursor:progress; }
.family-quran-done-label::before { content:'Non fait'; }
.family-quran-done-control input:checked + .family-quran-done-label::before { content:'Fait'; }
.family-quran-done-control:has(input:checked) { border-color:rgba(22,163,74,.35); background:#f0fdf4; color:#166534; }
.family-quran-panel { width:100%; padding:0; }
.quran-reader { width:100%; min-width:0; overflow:hidden; border:1px solid var(--n-border); border-radius:var(--n-radius-xl); background:var(--n-surface); box-shadow:var(--n-shadow-md); }
.quran-reader, .quran-reader * { box-sizing:border-box; }
.quran-reader-accordion { position:relative !important; top:auto; width:100%; min-width:0; padding:0; }
.quran-reader-navigation-card { margin:0; border:0; border-bottom:1px solid var(--n-border); border-radius:0; }
.quran-reader-navigation-header { position:static; }
.quran-reader-navigation-header h3 { margin:0 !important; }
/* Deux colonnes : le titre et le chevron. Le numero de page a quitte ce bouton
   pour la barre elle-meme, ou il est encadre par les fleches. Le fond vient
   desormais de l'en-tete, pour que tous les controles partagent la meme surface. */
.quran-reader-navigation-toggle { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; width:100%; min-height:3.5rem; gap:.7rem; margin:0; border:0; border-radius:0; background:transparent; padding:.65rem .85rem; color:#fff; text-align:left; }
.quran-reader-navigation-toggle:hover, .quran-reader-navigation-toggle:focus { background:rgba(255,255,255,.12); color:#fff; }
.quran-reader-current-page { display:inline-flex; align-items:center; gap:.35rem; border:1px solid rgba(255,255,255,.22); border-radius:999px; padding:.3rem .55rem; font-size:.72rem; white-space:nowrap; }
.quran-reader-current-page strong { font-size:.8rem; }
.quran-reader-navigation-title { display:flex; align-items:center; justify-content:center; min-width:0; gap:.4rem; overflow:hidden; font-size:.78rem; font-weight:750; text-overflow:ellipsis; white-space:nowrap; }
.quran-reader-navigation-title i { font-size:1rem; }
.quran-reader-navigation-chevron { font-size:1.1rem; transition:transform .18s ease; }
.quran-reader-navigation-toggle[aria-expanded="true"] .quran-reader-navigation-chevron { transform:rotate(180deg); }
.quran-reader-navigation-body { width:100%; min-width:0; padding:0; }
.quran-reader-controls { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(24rem,.9fr); width:100%; min-width:0; }
.quran-reader-primary-navigation { display:grid; grid-template-columns:2.75rem minmax(7rem,.42fr) 2.75rem minmax(13rem,1fr); align-items:end; min-width:0; gap:.65rem; padding:.8rem; }
.quran-reader-page-button { display:grid; place-items:center; min-width:2.75rem; min-height:2.75rem; margin:0; border:1px solid rgba(8,127,107,.2); border-radius:.7rem; background:var(--n-quran-pale); padding:.55rem; color:var(--n-quran-dark); font-size:1.35rem; }
.quran-reader-page-button:hover, .quran-reader-page-button:focus { border-color:var(--n-quran); background:var(--n-quran); color:#fff; }
.quran-reader-control { display:grid; min-width:0; gap:.3rem; margin:0; color:var(--n-text-secondary); font-size:.7rem; font-weight:700; }
.quran-reader-control > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.quran-reader-control .form-control { width:100%; min-width:0; min-height:2.7rem; margin:0; border-radius:.65rem; }
.quran-reader-page-input { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; min-height:2.7rem; overflow:hidden; border:1px solid var(--n-border); border-radius:.65rem; background:#fff; }
.quran-reader-page-input:focus-within { border-color:var(--n-quran); box-shadow:var(--n-focus); }
.quran-reader-page-input .form-control { min-height:2.6rem; border:0; border-radius:0; box-shadow:none !important; padding-right:.25rem; font-weight:800; text-align:center; }
.quran-reader-page-input > span { padding:0 .65rem 0 .25rem; color:var(--n-text-muted); font-size:.68rem; font-weight:700; white-space:nowrap; }
.quran-reader-playback { display:grid; grid-template-columns:minmax(0,1fr); align-items:end; min-width:0; gap:.35rem; border-left:1px solid var(--n-border-light); background:#fbfaf7; padding:.8rem; }
.quran-reader-playback-heading { display:flex; align-items:center; align-self:center; gap:.35rem; color:var(--n-quran-dark); font-size:.72rem; font-weight:800; }
.quran-reader-playback-heading i { font-size:1rem; }
.quran-reader-choice-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); min-width:0; gap:.65rem; }
.quran-reader-workspace { width:100%; min-width:0; padding:.8rem; background:#fbfaf7; }
.quran-reader-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(20rem,34%); align-items:start; width:100%; min-width:0; gap:.8rem; }
.quran-reader-page-column, .quran-reader-translation { width:100% !important; min-width:0; }
.quran-reader-image-stage { position:relative; width:100%; min-width:0; margin:0 !important; overflow:hidden; border:1px solid var(--n-border-light); border-radius:var(--n-radius-lg); background:#f5f1e8; box-shadow:var(--n-shadow-sm); }
.quran-reader #image { display:block; width:100%; max-width:900px; height:auto; margin:0 auto; }
.quran-reader-translation { max-height:min(78vh,56rem); overflow:auto; border:1px solid var(--n-border-light); border-radius:var(--n-radius-lg); background:#fff; scrollbar-gutter:stable; scrollbar-color:rgba(7,95,86,.35) transparent; scrollbar-width:thin; }
.quran-reader-translation::-webkit-scrollbar { width:.45rem; }
.quran-reader-translation::-webkit-scrollbar-thumb { border-radius:999px; background:rgba(7,95,86,.3); }
.quran-reader-translation-header { position:sticky; z-index:2; top:0; display:grid; gap:.08rem; border-bottom:1px solid var(--n-border-light); background:rgba(255,255,255,.96); padding:.7rem .75rem; text-align:left; backdrop-filter:blur(8px); }
.quran-reader-translation-header span { display:flex; align-items:center; gap:.35rem; color:var(--n-quran-dark); font-size:.75rem; font-weight:800; }
.quran-reader-translation-header small { color:var(--n-text-muted); font-size:.62rem; }
.quran-reader #translate { min-width:0; text-align:left; }
.quran-reader #translate .list-group { display:block; min-width:0; border:0; padding:0; }
.quran-reader #translate .list-group-item { min-width:0; overflow:hidden; border:0; border-bottom:1px solid var(--n-border-light); border-radius:0; padding:.75rem; }
.quran-reader #translate .list-group-item:last-child { border-bottom:0; }
.quran-reader #translate .list-group-item:hover { background:#fbfaf7; }
.quran-reader-basmala { display:flex; justify-content:center; padding:.25rem 0 .65rem; }
.quran-reader-basmala img { width:min(9rem,52%); }
.quran-reader-verse-body { display:grid; min-width:0; gap:.45rem; }
.quran-reader-verse-content { display:grid; min-width:0; gap:.35rem; text-align:right; }
.quran-reader-verse-toolbar { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:2.6rem; gap:.35rem; }
.quran-reader-verse-reference h2 { margin:0; font-size:inherit; }
.quran-reader-verse-reference { display:flex; align-items:center; min-width:0; gap:.15rem; }
.quran-reader-verse-reference .badge { border:1px solid rgba(8,127,107,.16); background:var(--n-quran-pale); color:var(--n-quran-dark); }
.quran-reader-verse-reference .h4 { font-size:.75rem; font-weight:800; }
.quran-reader-verse-actions { display:flex; align-items:center; flex-direction:row-reverse; gap:.1rem; }
.quran-reader-verse-arabic { display:grid; min-height:4.2rem; place-items:center; margin:0 !important; border:0 !important; border-radius:.55rem; background:var(--n-gold-pale); padding:.65rem !important; box-shadow:none !important; container-type:inline-size; }
/* Une seule echelle pour tous les versets.
 *
 * Les images d'everyayah partagent un canevas de 700 px de large : leur largeur
 * NATURELLE suit la longueur du verset, pas la taille du texte. Etirees a
 * « width:100% », le meme mot s'ecrivait sept fois plus gros dans un verset court
 * que dans un long — mesure sur les deux extremes du Coran, dans un conteneur de
 * 1243 px : Ya-Sin 1 (99 px de source) etait agrandi 12,6 fois, donc illisible de
 * flou, tandis qu'Al-Baqara 282 tenait a 1,78.
 *
 * L'echelle se calcule SUR LA PAGE AFFICHEE, pas sur le canevas : `--verse-basis`
 * porte la largeur du verset le plus large de la page en cours, celui-ci remplit la
 * colonne et les autres suivent en proportion. Normaliser contre 700 px etait tout
 * aussi faux que ne pas normaliser : la colonne ne fait que 368 px sur un ecran de
 * bureau, si bien que TOUS les versets tombaient a 0,53 — 32 px de ligne, illisible.
 * Une page de Mushaf ne porte que des versets de longueurs voisines : sur la page
 * 568 ils vont de 169 a 298 px, le plus large tient donc dans la colonne.
 *
 * `--verse-width` est pose au chargement de l'image, qui seule connait sa largeur
 * naturelle ; sans elle la regle ne s'applique pas et l'image garde sa taille
 * naturelle bornee au conteneur — jamais le flou d'avant. */
.quran-reader-verse-arabic img { max-width:100%; height:auto; }
.quran-reader-verse-arabic img[style*="--verse-width"] {
    width: min(calc(var(--verse-width) * 1.25px), calc(var(--verse-width) * 100cqw / var(--verse-basis, 700)));
}
/* Sur un ecran a haute densite, agrandir ne coute AUCUNE nettete : a 1,6x sur un
 * ecran a deux pixels physiques par pixel CSS, on reste sous un pixel source par
 * pixel d'ecran. Les images d'everyayah plafonnent a ~60 px de hauteur de ligne ;
 * sans cette permission la liste ne peut jamais depasser cette taille, et le texte
 * reste petit meme quand la colonne a de la place. Le second terme est inchange :
 * le verset le plus large de la page remplit toujours exactement la colonne, donc
 * rien ne deborde et toutes les images gardent une seule et meme echelle.
 *
 * A densite simple le plafond reste a 1,25 : les signes de vocalisation sont fins,
 * et un agrandissement plus fort s'y verrait. */
@media (min-resolution: 2dppx) {
    .quran-reader-verse-arabic img[style*="--verse-width"] {
        width: min(calc(var(--verse-width) * 1.6px), calc(var(--verse-width) * 100cqw / var(--verse-basis, 700)));
    }
}
/* Au-dela de 1500 px, le lecteur cessait de profiter de la largeur : le conteneur
 * plafonnait a 1240 px et la colonne des versets a 35 %, soit 368 px, pendant que
 * 680 px restaient inutilises sur un ecran de 1920. Les DEUX colonnes y gagnent —
 * la page du Mushaf atteint enfin ses 900 px, et les versets passent de 64 a
 * 102 px de hauteur de ligne. */
/* Le lecteur est une surface de LECTURE : il gagne a occuper la largeur
 * disponible, la ou une page de formulaire gagne a rester etroite.
 *
 * On agit sur la VARIABLE que lit `.family-surface .family-page > .container`,
 * et non sur un selecteur plus specifique : la regle precedente plafonnait le
 * conteneur a 1560 px sans jamais l'emporter sur les 1180 px de l'espace
 * famille — 370 px etaient perdus de chaque cote d'un ecran de 1920, et la page
 * du Mushaf RETRECISSAIT de 719 a 650 px parce que les colonnes s'elargissaient
 * dans un conteneur qui, lui, ne bougeait pas.
 *
 * Le bas de page reprend aussi ses 80 px : sous une surface de lecture, cinq
 * centimetres de blanc ne separent rien. */
.family-surface .quran-reader-page > .container { padding-bottom: 1.75rem; }

/* Les deux colonnes du lecteur finissent ENSEMBLE.
 *
 * La liste des versets etait plafonnee a 78 vh et alignee en haut : elle
 * s'arretait bien avant le bas de la page du Mushaf, laissant une colonne a
 * moitie vide a cote d'une image de 1 300 px. Elle epouse desormais la hauteur
 * de la page et defile a l'interieur — ce que fait un lecteur papier quand on
 * suit la traduction verset par verset.
 *
 * Uniquement quand les deux colonnes existent : empilees, la liste reprend son
 * plafond, sinon il faudrait faire defiler toute la page pour revenir a l'image. */
@media (min-width: 992px) {
    .quran-reader-layout { align-items: stretch; }
    .quran-reader-layout > aside.quran-reader-translation {
        max-height: none;
        /* `min-height: 0` : sans lui, un element de grille etire refuse de
           retrecir sous la taille de son contenu, et c'est la PAGE qui defile
           au lieu de la liste. */
        min-height: 0;
    }
}
.family-surface main.quran-reader-page { padding-bottom: 1rem; }
@media (min-width: 1200px) {
    /* `max(1180px, …)` : on ELARGIT, on ne retrecit jamais. Sans cette borne, un
     * ecran de 1024 perdait 60 px par rapport a avant — corriger un gaspillage en
     * grand en creant un manque en petit n'est pas un progres. */
    .family-surface .quran-reader-page { --family-width: min(1560px, max(1180px, 94vw)); }
}

@media (min-width: 1500px) {
    .quran-reader-layout > aside.quran-reader-translation { width: auto; }
    .quran-reader-layout { grid-template-columns: minmax(0, 900px) minmax(26rem, 1fr); }
}
.quran-reader-verse-translation-text .lead { margin:0; color:var(--n-text-secondary); font-size:.75rem; line-height:1.6; text-align:left; }
.quran-reader #translate img { max-width:100%; height:auto; }
.quran-reader #translate .clickable { display:inline-grid; place-items:center; flex:0 0 auto; min-width:2.75rem; min-height:2.75rem; }
.quran-reader .bootstrap-select { width:100% !important; min-width:0; }
.quran-reader .bootstrap-select > .dropdown-toggle { border:1px solid var(--n-border); background:var(--n-surface); color:var(--n-text); }
.family-surface .team-2 .card, .family-surface .team-2 .list-group-item { border-color:var(--n-border); border-radius:var(--n-radius); background:var(--n-surface); }
.family-surface .team-2 .card-header { background:var(--n-brand-pale); border-color:var(--n-border-light); color:var(--n-text); }
.family-surface .team-2 .badge { border-radius:var(--n-radius-full); padding:.4rem .65rem; font-weight:700; }
.family-surface .team-2 > .container > hr,
.family-surface .team-2 > .container-fluid > hr { border: 0; border-top: 1px solid var(--n-border-light); margin: 2rem 0; }
.family-page-header { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; margin-bottom:2rem; }
.family-page-header h1 { margin:.25rem 0 .5rem; font-size:clamp(2rem,4vw,3rem); letter-spacing:-.045em; }
.family-page-header p { margin:0; color:var(--n-text-secondary); }
.family-count { background:var(--n-brand-pale); color:var(--n-brand-dark); border-radius:var(--n-radius-full); padding:.45rem .8rem; font-weight:700; white-space:nowrap; }
.family-video-list { display:grid; gap:1rem; }
.family-video-toolbar { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:.65rem; margin-bottom:1rem; }
.family-video-search { display:flex; align-items:center; gap:.5rem; min-height:2.8rem; margin:0; border:1px solid var(--n-border); border-radius:.85rem; background:#fff; padding:0 .75rem; color:var(--n-brand); box-shadow:var(--n-shadow-xs); }
.family-video-search:focus-within { border-color:var(--n-brand); box-shadow:0 0 0 3px var(--n-brand-glow); }
.family-video-search input { width:100%; min-width:0; border:0; outline:0; background:transparent; color:var(--n-text); font-size:.78rem; }
.family-video-results { color:var(--n-text-muted); font-size:.7rem; font-weight:700; white-space:nowrap; }
.family-video-toolbar .btn { min-height:2.8rem; margin:0; font-size:.7rem; }
.family-video-card { border:1px solid var(--n-border); border-radius:var(--n-radius-lg); background:var(--n-surface); box-shadow:var(--n-shadow-sm); overflow:hidden; }
.family-video-card[hidden],.family-video-no-results[hidden] { display:none !important; }
.family-video-card summary { display:flex; align-items:center; gap:.85rem; list-style:none; cursor:pointer; padding:1rem 1.25rem; }
.family-video-card summary::-webkit-details-marker { display:none; }
.family-video-card summary:hover { background:var(--n-brand-pale); }
.family-video-icon { width:2.25rem; height:2.25rem; display:grid; place-items:center; border-radius:50%; background:var(--n-brand-pale); color:var(--n-brand); font-size:1.35rem; }
.family-video-card summary strong { display:block; color:var(--n-text); }
.family-video-card summary small { display:block; color:var(--n-text-muted); margin-top:.15rem; }
.family-video-chevron { margin-left:auto; color:var(--n-text-muted); transition:transform .2s; }
.family-video-card[open] .family-video-chevron { transform:rotate(45deg); }
.family-video-parts { border-top:1px solid var(--n-border-light); padding:1.25rem; display:grid; gap:1.5rem; }
.family-video-part h3 { font-size:1rem; margin:0 0 .75rem; color:var(--n-text-secondary); }
.family-video-player, .family-video-frame { display:block; width:100%; max-height:560px; aspect-ratio:16/9; border:0; border-radius:var(--n-radius); background:#0f172a; box-shadow:var(--n-shadow-md); }
.family-video-fallback { margin:.65rem 0 0; text-align:right; }
.family-video-fallback a { display:inline-flex; align-items:center; gap:.35rem; color:var(--n-brand-dark); font-size:.75rem; font-weight:700; }
.family-video-frame iframe { width:100%; height:100%; border:0; border-radius:inherit; }
.family-video-card summary:focus-visible { outline:3px solid var(--n-brand-glow); outline-offset:-3px; }
.family-empty-state { text-align:center; background:var(--n-surface); border:1px dashed var(--n-border); border-radius:var(--n-radius-lg); padding:4rem 1.5rem; color:var(--n-text-secondary); }
.family-empty-state i { display:block; color:var(--n-brand); font-size:3rem; margin-bottom:.75rem; }
.family-surface .n-member-card { display:flex; flex-direction:column; align-items:center; gap:.5rem; height:100%; padding:1.5rem 1rem; border:1px solid var(--n-border); border-radius:var(--n-radius-lg); background:var(--n-surface); box-shadow:var(--n-shadow-sm); transition:transform .18s, box-shadow .18s, border-color .18s; }
.family-surface .n-member-card:hover { transform:translateY(-3px); border-color:var(--n-brand-light); box-shadow:var(--n-shadow-brand); text-decoration:none; }
.family-surface .n-member-card img { width:84px; height:84px; object-fit:cover; }
.family-surface .n-member-card h2 { font-size:1.05rem; margin:0; text-align:center; }
.family-native-feedback { position:sticky; top:5rem; z-index:1040; margin:0 0 1rem; border-radius:var(--n-radius); box-shadow:var(--n-shadow-md); }
.family-verses-dialog { box-sizing:border-box; width:min(44rem,calc(100vw - 2rem)); max-width:calc(100vw - 2rem); max-height:calc(100vh - 2rem); overflow:auto; border:0; border-radius:var(--n-radius-xl); padding:1.25rem; background:var(--n-surface); color:var(--n-text); box-shadow:0 24px 70px rgba(28,25,23,.28); }
.family-verses-dialog::backdrop { background:rgba(15,23,42,.62); backdrop-filter:blur(2px); }
.family-verses-dialog h2 { margin:0 0 1rem; font-size:1.35rem; }
.family-verses-dialog-content { display:grid; gap:.75rem; max-height:65vh; overflow:auto; margin-bottom:1rem; padding:.25rem; }
.family-verses-dialog-content img { display:block; width:100%; height:auto; border:1px solid var(--n-border); border-radius:var(--n-radius); }
.family-verses-dialog.is-dialog-fallback { position:fixed; inset:1rem; z-index:2000; margin:auto; }
.family-invitations-page { padding:0 0 2rem; }
.family-invitations-layout { display:grid; grid-template-columns:minmax(0,52rem); justify-content:center; }
.family-invitations-form { min-width:0; }
.family-settings-card { overflow:hidden; border:1px solid var(--n-border); border-radius:var(--n-radius-xl); background:var(--n-surface); box-shadow:var(--n-shadow-md); }
.family-settings-card-header { display:flex; align-items:center; gap:.85rem; padding:1.1rem 1.25rem; border-bottom:1px solid var(--n-border-light); background:linear-gradient(135deg,var(--n-brand-pale),#fff); }
.family-settings-card-header > i { display:grid; place-items:center; flex:0 0 2.6rem; width:2.6rem; height:2.6rem; border-radius:.75rem; background:var(--n-brand); color:#fff; font-size:1.3rem; }
.family-settings-card-header h2 { margin:0; font-size:1.05rem; }
.family-settings-card-header p { margin:.12rem 0 0; color:var(--n-text-secondary); font-size:.78rem; }
.family-invitation-row { display:grid; grid-template-columns:minmax(10rem,.65fr) minmax(0,1.35fr); align-items:center; gap:1rem; padding:1rem 1.25rem; border-bottom:1px solid var(--n-border-light); }
.family-invitation-row:last-child { border-bottom:0; }
.family-invitation-row label { display:grid; gap:.08rem; margin:0; color:var(--n-text-secondary); font-size:.75rem; font-weight:700; }
.family-invitation-label { color:var(--n-text-secondary); font-size:.75rem; font-weight:700; }
.family-invitation-row label span { color:var(--n-text-muted); font-size:.66rem; letter-spacing:.04em; text-transform:uppercase; }
.family-invitation-row label strong { color:var(--n-text); font-size:.86rem; }
.family-invitation-row .form-control { min-width:0; min-height:2.8rem; border-radius:.7rem; }
.family-linked-account { display:flex; align-items:center; min-width:0; gap:.75rem; padding:.72rem .85rem; border:1px solid rgba(22,163,74,.22); border-radius:.8rem; background:rgba(240,253,244,.78); color:var(--n-text); }
.family-linked-account-icon { display:grid; place-items:center; flex:0 0 2.15rem; width:2.15rem; height:2.15rem; border-radius:.65rem; background:#dcfce7; color:#15803d; font-size:1.15rem; }
.family-linked-account > span:nth-child(2) { display:grid; min-width:0; gap:.06rem; }
.family-linked-account strong { font-size:.82rem; }
.family-linked-account small { overflow:hidden; color:var(--n-text-secondary); font-size:.75rem; text-overflow:ellipsis; white-space:nowrap; }
.family-linked-account-status { margin-left:auto; padding:.24rem .5rem; border-radius:999px; background:#dcfce7; color:#166534; font-size:.65rem; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.family-field-help { grid-column:2; margin:-.45rem 0 0; color:var(--n-text-muted); font-size:.7rem; line-height:1.45; }
.family-form-actions { display:flex; justify-content:flex-end; gap:.65rem; margin-top:1rem; }
.family-form-actions .btn { display:inline-flex; align-items:center; justify-content:center; min-height:2.8rem; gap:.35rem; }
.family-preferences-page .container { max-width:58rem; }
.family-preferences-form { display:grid; min-width:0; gap:1rem; }
.family-preferences-form[aria-busy="true"] { cursor:wait; }
.family-preference-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); min-width:0; gap:1rem; padding:1.2rem 1.25rem 1.3rem; }
.family-preference-field { display:grid; min-width:0; align-content:start; gap:.35rem; }
.family-preference-field[hidden] { display:none !important; }
.family-preference-field-wide { grid-column:1 / -1; }
.family-preference-field label { margin:0; color:var(--n-text); font-size:.76rem; font-weight:750; }
.family-preference-field small { color:var(--n-text-muted); font-size:.66rem; line-height:1.45; }
.family-preference-field .form-control { width:100%; min-width:0; min-height:2.8rem; margin:0; border-color:var(--n-border); border-radius:.7rem; background:#fff; color:var(--n-text); font-size:.78rem; }
.family-preference-field .form-control:focus { border-color:var(--n-brand); box-shadow:0 0 0 3px var(--n-brand-glow); }
.family-preference-card-kicker { display:block; margin:0 0 .08rem; color:var(--n-brand-dark); font-size:.6rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.family-preferences-actions { align-items:center; position:sticky; z-index:20; bottom:.75rem; margin-top:.15rem; border:1px solid rgba(232,229,224,.86); border-radius:var(--n-radius-lg); background:rgba(255,255,255,.92); padding:.7rem; box-shadow:var(--n-shadow-lg); backdrop-filter:blur(10px); }
.family-preferences-actions .btn-primary { min-width:14rem; }
@media (max-width: 991.98px) {
    .quran-reader-controls { grid-template-columns:minmax(0,1fr); }
    .quran-reader-playback { border-top:1px solid var(--n-border-light); border-left:0; }
    .quran-reader-layout { grid-template-columns:minmax(0,1fr); }
    .quran-reader-translation { max-height:36rem; overflow:auto; }
}
@media (max-width: 767.98px) {
    /* The family/student bottom navigation occupies the viewport edge on
       phones. Keep preference actions in document flow so neither control
       can cover the other between Bootstrap's md breakpoint and 640px. */
    .family-preferences-actions { position:static; padding:.6rem; }
    .family-preferences-actions .btn-primary { min-width:0; }
}
@media (max-width: 640px) {
    .family-page-header { align-items:flex-start; flex-direction:column; }
    .family-surface .team-2 > .container, .family-surface .team-2 > .container-fluid { padding:1.5rem .75rem 5rem; }
    .student-surface .team-2 > .container, .student-surface .team-2 > .container-fluid { padding:1.5rem .75rem 5rem; }
    .family-video-parts { padding:.85rem; }
    .family-video-toolbar { grid-template-columns:minmax(0,1fr) auto; }
    .family-video-search { grid-column:1 / -1; }
    .family-video-toolbar .btn { padding:.5rem .65rem; }
    .quran-reader { border-radius:var(--n-radius-lg); }
    .quran-reader-navigation-toggle { grid-template-columns:minmax(0,1fr) auto; gap:.4rem; padding:.55rem .6rem; }
    .quran-reader-navigation-title { justify-content:flex-start; font-size:.7rem; }
    .quran-reader-navigation-title i { display:none; }
    .quran-reader-current-page { padding:.25rem .42rem; font-size:.64rem; }
    .quran-reader-primary-navigation { grid-template-columns:2.75rem minmax(0,1fr) 2.75rem; gap:.5rem; padding:.65rem; }
    .quran-reader-primary-navigation > .quran-reader-control:last-child { grid-column:1 / -1; }
    .quran-reader-playback { grid-template-columns:minmax(0,1fr); gap:.5rem; padding:.65rem; }
    .quran-reader-choice-grid { grid-template-columns:minmax(0,1fr); gap:.6rem; }
    .quran-reader-page-button { min-height:2.8rem; padding:.35rem; }
    .quran-reader-workspace { padding:.45rem; }
    .quran-reader-layout { gap:.55rem; }
    .quran-reader-translation { max-height:none; padding:0; }
    .quran-reader #translate .list-group-item { padding:.7rem .65rem; }
    .family-native-feedback { top:.75rem; }
    .family-invitation-row { grid-template-columns:minmax(0,1fr); gap:.45rem; padding:.9rem; }
    .family-field-help { grid-column:1; margin:0; }
    .family-settings-card-header { align-items:flex-start; padding:1rem .9rem; }
    .family-form-actions { display:grid; grid-template-columns:minmax(0,1fr); }
    .family-form-actions .btn { width:100%; }
    .family-preference-grid { grid-template-columns:minmax(0,1fr); gap:.85rem; padding:1rem .9rem; }
    .family-preference-field-wide { grid-column:auto; }
    .family-preferences-actions { position:static; padding:.6rem; }
    .family-preferences-actions .btn-primary { min-width:0; }
    .family-verses-dialog { width:calc(100vw - 1rem); max-width:calc(100vw - 1rem); max-height:calc(100vh - 1rem); padding:.9rem; }
}

/* The student routes reuse the family Twig components; mirror the same surface. */
.student-surface { --family-width: 1180px; }
.student-surface .family-page > .container,
.student-surface .team-2 > .container,
.student-surface .team-2 > .container-fluid { max-width:var(--family-width); padding:2.5rem 1.25rem 5rem; }
.student-surface .team-2 h2 { font-size:clamp(1.35rem,2vw,1.8rem); margin:0 0 1.25rem; }
.student-surface .team-2 > .container > .row:first-child h2 { font-size:clamp(2rem,4vw,3rem); letter-spacing:-.045em; }
.student-surface .team-2 .card, .student-surface .team-2 .list-group-item { border-color:var(--n-border); border-radius:var(--n-radius); background:var(--n-surface); }
.student-surface .team-2 .card-header { background:var(--n-brand-pale); border-color:var(--n-border-light); color:var(--n-text); }
.student-surface .family-student-tab.active { color:#fff; background:var(--n-brand); }

h1, h2, h3, h4, h5, h6 {
    color: var(--n-text);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.text-muted {
    color: var(--n-text-secondary) !important;
}

a {
    color: var(--n-brand);
}

a:hover {
    color: var(--n-brand-dark);
}


/* ──────────────────────────────
   NAVBAR (top)
   ────────────────────────────── */
body > header .navbar {
    background-color: var(--n-surface);
    border-bottom: 1px solid var(--n-border);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

body > header .navbar .navbar-brand img {
    border-radius: 0.375rem;
}

body > header .navbar .nav-link {
    color: var(--n-text-secondary);
    font-weight: 500;
}

body > header .navbar .nav-link:hover,
body > header .navbar .nav-item.active .nav-link {
    color: var(--n-brand-dark);
}

body > header .navbar .dropdown-toggle::after {
    color: var(--n-text-muted);
    vertical-align: middle;
}

body > header .navbar .dropdown-menu {
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius-lg);
    box-shadow: var(--n-shadow-lg);
    padding: 0.5rem;
    margin-top: 0.5rem;
}

body > header .navbar .dropdown-item {
    border-radius: var(--n-radius);
    padding: 0.5rem 0.75rem;
    color: var(--n-text-secondary);
    font-weight: 500;
}

body > header .navbar .dropdown-item:hover,
body > header .navbar .dropdown-item:focus {
    background-color: var(--n-brand-pale);
    color: var(--n-brand-dark);
}

body > header .navbar .dropdown-divider {
    border-color: var(--n-border-light);
}


/* ──────────────────────────────
   BUTTONS
   ────────────────────────────── */
.btn {
    font-weight: 600;
    border-radius: var(--n-radius);
    transition: all 0.15s ease;
}

.btn-primary,
.btn-info {
    background-color: var(--n-brand);
    border-color: var(--n-brand);
    box-shadow: var(--n-shadow-brand);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-info:hover,
.btn-info:focus {
    background-color: var(--n-brand-dark);
    border-color: var(--n-brand-dark);
    box-shadow: 0 6px 20px rgba(8, 145, 178, 0.3);
}

.btn-primary:not(:disabled):not(.disabled):active,
.btn-info:not(:disabled):not(.disabled):active {
    background-color: #164e63;
    border-color: #164e63;
}

.btn-outline-primary,
.btn-outline-info {
    color: var(--n-brand);
    border-color: var(--n-brand);
}

.btn-outline-primary:hover,
.btn-outline-info:hover {
    background-color: var(--n-brand);
    border-color: var(--n-brand);
    color: #fff;
}

.btn-success {
    background-color: var(--n-success);
    border-color: var(--n-success);
}

.btn-success:hover,
.btn-success:focus {
    background-color: #15803d;
    border-color: #15803d;
}

.btn-outline-success {
    color: var(--n-success);
    border-color: var(--n-success);
}

.btn-outline-success:hover {
    background-color: var(--n-success);
    border-color: var(--n-success);
}

.btn-danger {
    background-color: var(--n-danger);
    border-color: var(--n-danger);
}

.btn-warning {
    background-color: var(--n-warning);
    border-color: var(--n-warning);
    color: #fff;
}

.btn-warning:hover,
.btn-warning:focus {
    background-color: #c2410c;
    border-color: #c2410c;
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════
   PRODUCT UI LAYER — modern responsive V1 surface
   Kept framework-agnostic so legacy Twig pages inherit the same system.
   ═══════════════════════════════════════════════════════════════════ */
:root {
    --n-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --n-content: 1240px;
    --n-focus: 0 0 0 3px rgba(8, 145, 178, .22);
}

html { scroll-behavior: smooth; }
body {
    min-width: 320px;
    font-family: var(--n-font);
    background: radial-gradient(circle at 100% 0%, rgba(103,232,249,.12), transparent 34rem), var(--n-bg);
}

body > header,
body > main,
body > footer,
body > .container,
body > .container-fluid { width: 100%; }

body > header .container,
main > .container,
main > .container-fluid,
.container-xl { max-width: var(--n-content); }

body > header { position: sticky; top: 0; z-index: 1030; }
/* Semantic headers inside cards/sections are content, never navigation chrome.
   Keeping this explicit prevents legacy `header { position: sticky }` rules
   from leaving detached title fragments while the document scrolls. */
main header,
main section > header,
main article > header { position: static; top: auto; }
body > header .navbar {
    min-height: 68px;
    backdrop-filter: saturate(160%) blur(14px);
    background: rgba(255,255,255,.92);
    box-shadow: 0 1px 0 rgba(28,25,23,.06), 0 8px 24px rgba(28,25,23,.04);
}
body > header .navbar-brand { font-weight: 800; letter-spacing: -.03em; }
body > header .navbar-brand img { object-fit: contain; max-height: 52px; width: auto; }
body > header .navbar-nav .nav-link { padding: .6rem .8rem; border-radius: .6rem; transition: background .18s ease, color .18s ease; }
body > header .navbar-nav .nav-link:hover,
body > header .navbar-nav .nav-item.active .nav-link { background: var(--n-brand-pale); color: var(--n-brand-dark); }
body > header .navbar-toggler { border: 1px solid var(--n-border); border-radius: .65rem; padding: .5rem .65rem; }
body > header .navbar-toggler:focus { box-shadow: var(--n-focus); }

main { padding: clamp(1.25rem, 3vw, 2.75rem) 0 4rem; }
main > .container > h1:first-child,
main > .container-fluid > h1:first-child { margin-bottom: 1.5rem; font-size: clamp(1.55rem, 2.4vw, 2.25rem); }
h1, h2, h3 { line-height: 1.18; }

/* Local compatibility for the only Froala Design Blocks primitives retained
   by active Twig views. This deliberately replaces the former global CDN
   framework instead of importing hundreds of unrelated selectors. */
.fdb-block { position: relative; padding: clamp(1.5rem, 3vw, 3rem) 0; }
.fdb-icon { display: inline-block; width: 3rem; height: 3rem; object-fit: contain; }
.card, .box, .panel, .fdb-block { border: 1px solid var(--n-border); border-radius: var(--n-radius-lg); box-shadow: var(--n-shadow-sm); background: var(--n-surface); }
/* Never clip menus/selectors hosted by a generic Bootstrap card. Components
   that genuinely need clipping opt in through their own scoped selector. */
.card { overflow: visible; }
.card-header, .panel-heading { background: transparent; border-bottom: 1px solid var(--n-border-light); padding: 1rem 1.25rem; font-weight: 700; }
.card-body, .box, .panel-body { padding: clamp(1rem, 2vw, 1.5rem); }
.card-footer { background: #fcfbfa; border-top: 1px solid var(--n-border-light); }

.table-responsive { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; box-sizing: border-box; border: 1px solid var(--n-border); border-radius: var(--n-radius-lg); background: var(--n-surface); box-shadow: var(--n-shadow-xs); }
.dataTables_wrapper { width: 100%; max-width: 100%; min-width: 0; overflow: hidden; box-sizing: border-box; padding: .75rem 1rem 0; color: var(--n-text-secondary); font-size: .8rem; }
.n-dt-toolbar, .n-dt-footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .15rem 0 .75rem; }
.n-dt-toolbar > *, .n-dt-footer > * { min-width: 0; }
.n-dt-length { display: flex; align-items: center; flex: 0 0 auto; }
.n-dt-length label { display: flex; align-items: center; gap: .4rem; margin: 0; color: var(--n-text-muted); font-size: .72rem; font-weight: 650; white-space: nowrap; }
.n-dt-length select { width: auto; min-width: 4.5rem; min-height: 38px; height: 38px; margin: 0; border: 1px solid var(--n-border); border-radius: .55rem; background: #fff; padding: .25rem 1.75rem .25rem .55rem; color: var(--n-text-secondary); font-size: .75rem; }
.n-dt-search, .n-dt-search label { min-width: 0; max-width: 100%; }
.n-dt-search label { display: block; margin: 0; }
.n-dt-search input { max-width: 100%; min-width: 16rem; min-height: 38px; box-sizing: border-box; border: 1px solid var(--n-border) !important; border-radius: .6rem; padding: .45rem .7rem !important; background: #fff; }
.n-dt-search input:focus { border-color: var(--n-brand) !important; outline: 0; box-shadow: var(--n-focus); }
.n-dt-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.n-dt-actions .dt-button { min-height: 34px; border: 1px solid var(--n-border) !important; border-radius: .5rem !important; background: #fff !important; color: var(--n-text-secondary) !important; padding: .35rem .65rem !important; font-size: .75rem; font-weight: 700; }
.n-dt-actions .dt-button:hover { border-color: var(--n-brand) !important; color: var(--n-brand-dark) !important; }
.dataTables_wrapper table.dataTable { width: 100% !important; margin: 0 !important; border-collapse: collapse; }
.dataTables_wrapper table.dataTable tr.d-flex { display: table-row !important; }
.dataTables_wrapper table.dataTable tr.d-flex > th,
.dataTables_wrapper table.dataTable tr.d-flex > td { display: table-cell !important; float: none !important; }
.dataTables_wrapper table.dataTable thead th { border-bottom: 1px solid var(--n-border) !important; }
.dataTables_wrapper .dataTables_info { padding-top: .7rem; }
.n-dt-pages .dataTables_paginate { padding-top: .45rem; }
.n-dt-pages .paginate_button { border: 1px solid var(--n-border) !important; border-radius: .45rem !important; margin-left: .25rem !important; padding: .35rem .6rem !important; color: var(--n-text-secondary) !important; }
.n-dt-pages .paginate_button.current, .n-dt-pages .paginate_button:hover { border-color: var(--n-brand) !important; background: var(--n-brand) !important; color: #fff !important; }
.n-dt-pages .paginate_button.disabled { cursor:not-allowed; opacity:.45; pointer-events:none; }
.n-dt-fallback .table-responsive { margin:0; }
.n-dt-fallback thead th.sorting { cursor:pointer; user-select:none; }
.n-dt-fallback thead th.sorting:focus-visible { outline:3px solid var(--n-brand-glow); outline-offset:-3px; }
.n-dt-fallback thead th.sorting::after { content:'↕'; float:right; margin-left:.45rem; color:var(--n-text-muted); opacity:.55; }
.n-dt-fallback thead th.sorting_asc::after { content:'↑'; color:var(--n-brand-dark); opacity:1; }
.n-dt-fallback thead th.sorting_desc::after { content:'↓'; color:var(--n-brand-dark); opacity:1; }
.table { margin-bottom: 0; color: var(--n-text); }
.table thead th { background: #f7f6f3; color: var(--n-text-secondary); border-top: 0; border-bottom: 1px solid var(--n-border); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.table td, .table th { padding: .85rem 1rem; vertical-align: middle; border-color: var(--n-border-light); }
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: var(--n-brand-pale); }

.form-control, .custom-select, select, textarea, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"] {
    min-height: 44px; border: 1px solid #d8d4ce; border-radius: .65rem; color: var(--n-text); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .custom-select:focus, select:focus, textarea:focus, input:focus { border-color: var(--n-brand); box-shadow: var(--n-focus); outline: 0; }
label { color: var(--n-text-secondary); font-weight: 600; font-size: .86rem; }
.form-group { margin-bottom: 1.1rem; }
.btn { min-height: 44px; padding: .55rem 1rem; border-radius: .65rem; }
.btn:focus, .btn.focus { box-shadow: var(--n-focus); }
.btn-light, .btn-secondary { border-color: var(--n-border); background: #fff; color: var(--n-text-secondary); }
.btn-light:hover, .btn-secondary:hover { background: #f7f6f3; border-color: #d2cec7; color: var(--n-text); }

.alert { border: 1px solid transparent; border-radius: .75rem; box-shadow: var(--n-shadow-xs); padding: .9rem 1rem; }
.badge { border-radius: 999px; padding: .38em .7em; font-weight: 700; }
.pagination .page-link { border-color: var(--n-border); color: var(--n-brand-dark); padding: .55rem .8rem; }
.pagination .page-item:first-child .page-link { border-radius: .6rem 0 0 .6rem; }
.pagination .page-item:last-child .page-link { border-radius: 0 .6rem .6rem 0; }

.dropdown-menu { border-color: var(--n-border); border-radius: .75rem; box-shadow: var(--n-shadow-lg); }
.modal-content { border: 1px solid var(--n-border); border-radius: var(--n-radius-xl); box-shadow: 0 24px 70px rgba(28,25,23,.2); overflow: hidden; }
.modal-header { border-bottom-color: var(--n-border-light); }
.modal-footer { border-top-color: var(--n-border-light); }

/* Legacy grid pages become fluid instead of overflowing on tablets. */
[class*="col-"] { min-width: 0; }
img, video, iframe { max-width: 100%; }
.text-break { overflow-wrap: anywhere; }
td, th { overflow-wrap: normal; word-break: normal; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 2000; padding: .7rem 1rem; background: var(--n-text); color: #fff; border-radius: .5rem; }
.skip-link:focus { top: 1rem; }

@media (max-width: 991.98px) {
    body > header { position: relative; }
    body > header .navbar-collapse { padding: .75rem 0 0; }
    body > header .navbar-nav .nav-link { margin: .15rem 0; }
    main { padding-top: 1.5rem; }
    .table-responsive { border-radius: .7rem; }
}

@media (max-width: 575.98px) {
    body { font-size: .94rem; }
    main { padding-bottom: 5.5rem; }
    .container, .container-fluid { padding-left: 1rem; padding-right: 1rem; }
    .card-body, .box, .panel-body { padding: 1rem; }
    .btn-block { width: 100%; }
    .table td, .table th { padding: .7rem .65rem; }
    .table thead th { font-size: .65rem; }
    .dataTables_wrapper { padding: .65rem .65rem 0; }
    .n-dt-toolbar, .n-dt-footer { width: 100%; align-items: stretch; flex-direction: column; }
    .n-dt-toolbar > *, .n-dt-footer > * { width: 100%; }
    .n-dt-search input { min-width: 0; width: 100%; }
    .n-dt-actions { justify-content: flex-start; }
    .n-dt-actions .dt-button { flex: 1 1 7rem; margin: 0 !important; }
    .n-dt-pages .dataTables_paginate { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: .25rem; }
    .n-dt-pages .paginate_button { margin: 0 !important; }
    .modal-dialog { margin: .75rem; }
}

/* Shared account profile */
.n-account-page { min-height:calc(100vh - 8rem); padding:2.25rem 0 4rem; background:radial-gradient(circle at 92% 0,rgba(34,211,238,.09),transparent 25rem),linear-gradient(180deg,#f8fcfc,var(--n-bg)); }
.n-account-container { max-width:72rem; }
.n-digest-preferences { margin-top:1.5rem; }
.n-digest-settings-body { padding:1.5rem; max-width:75ch; overflow-wrap:anywhere; }
.n-digest-settings-body p { color:var(--n-text-secondary); }
.n-digest-check { display:flex; align-items:center; gap:.75rem; min-height:44px; font-weight:600; cursor:pointer; }
.n-digest-check input { width:1.25rem; height:1.25rem; flex-shrink:0; accent-color:var(--n-brand); }
.n-digest-help { font-size:.875rem; }
.n-digest-schedule { display:flex; flex-wrap:wrap; gap:1rem; margin:1.25rem 0; }
.n-digest-schedule > div { flex:1 1 10rem; }
.n-digest-schedule select { min-height:44px; }
.n-digest-actions { display:flex; flex-wrap:wrap; align-items:center; gap:1rem; }
.n-digest-actions a { display:inline-flex; align-items:center; min-height:44px; text-decoration:underline; text-underline-offset:.2em; }
.n-digest-settings-body :focus-visible { outline:3px solid var(--n-brand); outline-offset:3px; }
.n-digest-status { padding:1rem; background:var(--n-brand-pale); color:var(--n-brand-dark) !important; border-radius:var(--n-radius); }
.n-account-hero { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:1rem; margin-bottom:1.25rem; padding:1.25rem 1.35rem; border:1px solid var(--n-border); border-radius:var(--n-radius-xl); background:rgba(255,255,255,.88); box-shadow:var(--n-shadow-sm); }
.n-account-avatar { display:grid; place-items:center; overflow:hidden; width:4rem; height:4rem; border-radius:1.1rem; background:linear-gradient(145deg,var(--n-brand),var(--n-brand-dark)); color:#fff; font-size:1.15rem; font-weight:800; box-shadow:var(--n-shadow-brand); }
.n-account-avatar img { width:100%; height:100%; object-fit:cover; }
.n-account-hero h1 { margin:.15rem 0 .1rem; font-size:clamp(1.65rem,4vw,2.5rem); letter-spacing:-.04em; }
.n-account-hero p { margin:0; color:var(--n-text-muted); font-size:.78rem; }
.n-account-back { display:inline-flex; align-items:center; gap:.45rem; min-height:2.75rem; border:1px solid var(--n-border); border-radius:.8rem; background:#fff; color:var(--n-text-secondary); font-size:.76rem; font-weight:700; }
.n-account-back:hover { border-color:var(--n-brand); color:var(--n-brand-dark); }
.n-account-grid { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(18rem,.75fr); gap:1rem; align-items:start; }
.n-account-card,.n-account-security { border:1px solid var(--n-border); border-radius:var(--n-radius-xl); background:#fff; box-shadow:var(--n-shadow-sm); }
.n-account-card { overflow:hidden; }
.n-account-card-header { display:flex; align-items:center; gap:.8rem; padding:1rem 1.2rem; border-bottom:1px solid var(--n-border-light); background:linear-gradient(135deg,var(--n-brand-pale),#fff); }
.n-account-card-icon,.n-account-security-icon { display:grid; place-items:center; width:2.6rem; height:2.6rem; flex:0 0 2.6rem; border-radius:.8rem; background:var(--n-brand); color:#fff; font-size:1.25rem; }
.n-account-card-header h2 { margin:.1rem 0 0; font-size:1.05rem; }
.n-account-details { margin:0; }
.n-account-details > div { display:grid; grid-template-columns:minmax(8rem,.55fr) minmax(0,1.45fr); gap:1rem; padding:1rem 1.2rem; border-bottom:1px solid var(--n-border-light); }
.n-account-details dt { color:var(--n-text-muted); font-size:.7rem; letter-spacing:.04em; text-transform:uppercase; }
.n-account-details dd { min-width:0; margin:0; color:var(--n-text); font-size:.82rem; font-weight:650; overflow-wrap:anywhere; }
.n-account-details code { border-radius:.4rem; background:var(--n-bg); padding:.2rem .4rem; color:var(--n-brand-dark); }
.n-account-role { display:inline-flex; align-items:center; gap:.35rem; color:var(--n-brand-dark); }
.n-account-note { display:flex; gap:.45rem; margin:0; padding:.9rem 1.2rem; background:#f8fafc; color:var(--n-text-secondary); font-size:.72rem; line-height:1.5; }
.n-account-note i { flex:0 0 auto; color:var(--n-brand); font-size:1rem; }
.n-account-security { display:grid; gap:.7rem; padding:1.3rem; background:linear-gradient(155deg,#073642,#0e7490); color:#fff; }
.n-account-security .n-eyebrow { color:#a5f3fc; }
.n-account-security h2 { margin:0; color:#fff; font-size:1.25rem; }
.n-account-security p { margin:0 0 .35rem; color:rgba(255,255,255,.75); font-size:.78rem; line-height:1.55; }
.n-account-security-icon { background:rgba(255,255,255,.12); box-shadow:none; }
.n-account-security-action { display:flex; align-items:center; justify-content:center; gap:.45rem; min-height:2.9rem; border-radius:.8rem; background:#fff; color:#0e7490; font-size:.76rem; font-weight:800; }
.n-account-security-action:hover { background:#ecfeff; color:#155e75; }
.n-account-security small { display:flex; gap:.35rem; color:rgba(255,255,255,.7); font-size:.65rem; line-height:1.4; }
.n-account-security small i { color:#86efac; }

@media (max-width: 991.98px) {
    .n-account-grid { grid-template-columns:minmax(0,1fr); }
}

@media (max-width: 575.98px) {
    .n-account-page { padding:1rem 0 5.5rem; }
    .n-account-hero { grid-template-columns:auto minmax(0,1fr); padding:1rem; }
    .n-account-avatar { width:3.25rem; height:3.25rem; }
    .n-account-back { grid-column:1/-1; justify-content:center; width:100%; }
    .n-account-details > div { grid-template-columns:minmax(0,1fr); gap:.25rem; padding:.85rem 1rem; }
}

/* Family and student document library */
.n-documents-page { min-height:calc(100vh - 8rem); padding:2.25rem 0 4rem; background:radial-gradient(circle at 100% 0,rgba(34,211,238,.08),transparent 26rem),linear-gradient(180deg,#f8fcfc,var(--n-bg)); }
.n-documents-container { max-width:76rem; }
.n-documents-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; margin-bottom:1rem; padding:1.3rem 1.4rem; border:1px solid var(--n-border); border-radius:var(--n-radius-xl); background:rgba(255,255,255,.9); box-shadow:var(--n-shadow-sm); }
.n-documents-hero .n-eyebrow { display:inline-flex; align-items:center; gap:.35rem; }
.n-documents-hero h1 { margin:.2rem 0 .2rem; font-size:clamp(2rem,5vw,3rem); letter-spacing:-.045em; }
.n-documents-hero p { max-width:42rem; margin:0; color:var(--n-text-secondary); font-size:.84rem; }
.n-documents-count { display:grid; place-items:center; flex:0 0 auto; min-width:6.5rem; min-height:4rem; border-radius:1rem; background:var(--n-brand-pale); color:var(--n-brand-dark); font-size:.68rem; font-weight:700; text-align:center; }
.n-documents-count strong { display:block; font-size:1.3rem; line-height:1; }
.n-documents-periods { display:flex; gap:.45rem; overflow-x:auto; margin-bottom:1rem; padding:.3rem 0 .55rem; scrollbar-width:thin; }
.n-documents-periods a { flex:0 0 auto; min-height:2.55rem; display:inline-flex; align-items:center; border:1px solid var(--n-border); border-radius:999px; background:#fff; padding:.55rem .85rem; color:var(--n-text-secondary); font-size:.72rem; font-weight:700; white-space:nowrap; }
.n-documents-periods a:hover { border-color:var(--n-brand); color:var(--n-brand-dark); text-decoration:none; }
.n-documents-periods a.active { border-color:var(--n-brand); background:var(--n-brand); color:#fff; box-shadow:var(--n-shadow-brand); }
.n-documents-students { display:flex; gap:.55rem; overflow-x:auto; margin-bottom:.75rem; padding:.2rem 0 .4rem; }
.n-documents-student-tab { display:flex; align-items:center; flex:0 0 auto; gap:.55rem; min-height:2.9rem; border:1px solid var(--n-border); border-radius:.85rem; background:#fff; padding:.45rem .75rem; color:var(--n-text-secondary); cursor:pointer; }
.n-documents-student-tab .n-result-avatar { display: grid; place-items:center; width:2rem; height:2rem; border-radius: .65rem; background: var(--n-brand-pale); color: var(--n-brand-dark); font-size: .66rem; font-weight: 800; }
.n-documents-student-tab strong { font-size:.75rem; }
.n-documents-student-tab.active { border-color:var(--n-brand); background:#ecfeff; color:var(--n-brand-dark); box-shadow:0 0 0 3px var(--n-brand-glow); }
.n-documents-content { border:1px solid var(--n-border); border-radius:var(--n-radius-xl); background:rgba(255,255,255,.9); box-shadow:var(--n-shadow-md); }
.n-documents-panel { min-height:15rem; padding:1.2rem; }
.n-documents-panel-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:1rem; padding-bottom:.85rem; border-bottom:1px solid var(--n-border-light); }
.n-documents-panel-header h2 { margin:.1rem 0 0; font-size:1.1rem; }
.n-document-list { display:grid; gap:.8rem; }
.n-document-card { overflow:hidden; border:1px solid var(--n-border); border-radius:1rem; background:#fff; }
.n-document-card-main { display:flex; gap:.9rem; padding:1rem; }
.n-document-type-icon { display:grid; place-items:center; flex:0 0 2.8rem; width:2.8rem; height:2.8rem; border-radius:.8rem; background:var(--n-brand-pale); color:var(--n-brand); font-size:1.3rem; }
.n-document-copy { min-width:0; }
.n-document-meta { display:flex; flex-wrap:wrap; gap:.35rem .65rem; color:var(--n-text-muted); font-size:.65rem; font-weight:650; }
.n-document-meta span,.n-document-meta time { display:inline-flex; align-items:center; }
.n-document-meta span:not(:first-child)::before,.n-document-meta time::before { width:.2rem; height:.2rem; margin-right:.55rem; border-radius:50%; background:var(--n-border); content:''; }
.n-document-copy h3 { margin:.25rem 0 0; font-size:1rem; overflow-wrap:anywhere; }
.n-document-description { margin-top:.45rem; color:var(--n-text-secondary); font-size:.76rem; line-height:1.55; }
.n-document-description > *:last-child { margin-bottom:0; }
.n-document-files { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.55rem; margin:0; padding:.85rem 1rem 1rem; border-top:1px solid var(--n-border-light); background:#fafcfb; list-style:none; }
.n-document-files a { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:.6rem; min-width:0; min-height:3.25rem; border:1px solid var(--n-border); border-radius:.8rem; background:#fff; padding:.55rem .65rem; color:var(--n-text); }
.n-document-files a:hover { border-color:var(--n-brand); color:var(--n-brand-dark); text-decoration:none; box-shadow:var(--n-shadow-xs); }
.n-document-file-icon { display:grid; place-items:center; width:2.15rem; height:2.15rem; border-radius:.65rem; background:var(--n-brand-pale); color:var(--n-brand); font-size:1.1rem; }
.n-document-files a > span:nth-child(2) { display:grid; min-width:0; }
.n-document-files strong { overflow:hidden; font-size:.73rem; text-overflow:ellipsis; white-space:nowrap; }
.n-document-files small { color:var(--n-text-muted); font-size:.62rem; }
.n-document-files a > i { color:var(--n-text-muted); }
.n-document-no-file { display:flex; align-items:center; gap:.4rem; margin:0; padding:.8rem 1rem; border-top:1px solid var(--n-border-light); color:var(--n-text-muted); font-size:.7rem; }

/* Secure native document viewer */
.n-file-page { min-height:calc(100vh - 8rem); padding:2rem 0 4rem; background:radial-gradient(circle at 100% 0,rgba(34,211,238,.08),transparent 28rem),var(--n-bg); }
.n-file-container { max-width:72rem; }
.n-file-back { display:inline-flex; align-items:center; gap:.35rem; min-height:2.5rem; margin-bottom:.75rem; color:var(--n-brand-dark); font-size:.72rem; font-weight:750; }
.n-file-back:hover { color:var(--n-brand); text-decoration:none; }
.n-file-hero { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:1rem; border:1px solid var(--n-border); border-radius:var(--n-radius-xl); background:rgba(255,255,255,.94); padding:1.35rem; box-shadow:var(--n-shadow-md); }
.n-file-hero-icon { display:grid; place-items:center; width:3.5rem; height:3.5rem; border-radius:1rem; background:linear-gradient(135deg,var(--n-brand),var(--n-brand-dark)); color:#fff; font-size:1.55rem; box-shadow:var(--n-shadow-brand); }
.n-file-hero h1 { margin:.15rem 0 .35rem; font-size:clamp(1.65rem,4vw,2.7rem); letter-spacing:-.04em; overflow-wrap:anywhere; }
.n-file-meta { display:flex; flex-wrap:wrap; gap:.4rem .8rem; color:var(--n-text-muted); font-size:.68rem; font-weight:650; }
.n-file-meta span { display:inline-flex; align-items:center; gap:.25rem; }
.n-file-count { display:grid; place-items:center; min-width:5.5rem; min-height:3.7rem; border-radius:1rem; background:var(--n-brand-pale); color:var(--n-brand-dark); font-size:.65rem; font-weight:750; text-align:center; }
.n-file-count strong { display:block; font-size:1.25rem; line-height:1; }
.n-file-description,.n-file-library { margin-top:1rem; border:1px solid var(--n-border); border-radius:var(--n-radius-xl); background:#fff; padding:1.2rem; box-shadow:var(--n-shadow-sm); }
.n-file-description h2,.n-file-library h2 { margin:.15rem 0 .8rem; font-size:1.05rem; }
.n-file-description > div { color:var(--n-text-secondary); font-size:.8rem; line-height:1.65; overflow-wrap:anywhere; }
.n-file-description > div > :last-child { margin-bottom:0; }
.n-file-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.8rem; }
.n-file-item { display:grid; grid-template-columns:5.5rem minmax(0,1fr); gap:.8rem; overflow:hidden; border:1px solid var(--n-border-light); border-radius:1rem; background:#fff; padding:.75rem; }
.n-file-preview { grid-row:1 / 3; display:grid; place-items:center; min-height:5.5rem; overflow:hidden; border-radius:.75rem; background:#f1f5f9; color:var(--n-brand); font-size:2rem; }
.n-file-preview.is-image img { width:100%; height:100%; max-height:8rem; object-fit:cover; }
.n-file-preview.is-media { grid-template-columns:auto minmax(0,1fr); gap:.45rem; padding:.5rem; }
.n-file-preview.is-media audio { width:100%; min-width:0; height:2.8rem; }
.n-file-preview.is-video { grid-column:1 / -1; grid-row:auto; aspect-ratio:16/9; background:#0f172a; }
.n-file-preview.is-video video { width:100%; height:100%; object-fit:contain; }
.n-file-item-copy { min-width:0; align-self:end; }
.n-file-item-copy h3 { margin:0; color:var(--n-text); font-size:.8rem; overflow-wrap:anywhere; }
.n-file-item-copy p { margin:.2rem 0 0; color:var(--n-text-muted); font-size:.62rem; }
.n-file-actions { display:flex; align-items:center; gap:.4rem; align-self:start; }
.n-file-actions .btn { display:inline-flex; align-items:center; justify-content:center; gap:.25rem; min-height:2.35rem; margin:0; padding:.45rem .65rem; font-size:.66rem; }
.n-file-actions .btn-outline-secondary { width:2.35rem; padding:.45rem; }
.n-file-empty,.n-file-error { display:grid; place-items:center; text-align:center; }
.n-file-empty { min-height:13rem; color:var(--n-text-muted); }
.n-file-empty > i { font-size:2rem; color:var(--n-brand); }
.n-file-empty h3 { margin:.45rem 0 .15rem; color:var(--n-text); font-size:1rem; }
.n-file-empty p { margin:0; font-size:.72rem; }
.n-file-error { max-width:36rem; min-height:25rem; margin:2rem auto; border:1px solid var(--n-border); border-radius:var(--n-radius-xl); background:#fff; padding:2rem; box-shadow:var(--n-shadow-md); }
.n-file-error-icon { display:grid; place-items:center; width:4rem; height:4rem; margin-bottom:1rem; border-radius:1.25rem; background:#fff1f2; color:#e11d48; font-size:1.8rem; }
.n-file-error h1 { margin:.3rem 0; font-size:1.8rem; }
.n-file-error p { max-width:28rem; margin:0 0 1rem; color:var(--n-text-secondary); }

@media (max-width: 767.98px) {
    .n-documents-page { padding:1rem 0 5.5rem; }
    .n-file-page { padding:1rem 0 5.5rem; }
    .n-documents-hero { align-items:flex-start; padding:1rem; }
    .n-documents-count { min-width:4.8rem; min-height:3.5rem; }
    .n-document-files { grid-template-columns:minmax(0,1fr); }
    .n-file-grid { grid-template-columns:minmax(0,1fr); }
}

@media (max-width: 479.98px) {
    .n-documents-hero { display:grid; grid-template-columns:minmax(0,1fr); }
    .n-documents-count { display:flex; justify-content:center; gap:.3rem; min-height:2.7rem; }
    .n-documents-count strong { display:inline; font-size:1rem; }
    .n-documents-panel { padding:.75rem; }
    .n-document-card-main { padding:.85rem; }
    .n-document-type-icon { width:2.35rem; height:2.35rem; flex-basis:2.35rem; }
    .n-file-hero { grid-template-columns:auto minmax(0,1fr); align-items:start; padding:1rem; }
    .n-file-hero-icon { width:2.8rem; height:2.8rem; border-radius:.8rem; font-size:1.25rem; }
    .n-file-count { grid-column:1 / -1; display:flex; justify-content:center; gap:.25rem; min-height:2.6rem; }
    .n-file-count strong { display:inline; font-size:.9rem; }
    .n-file-description,.n-file-library { padding:.85rem; }
    .n-file-item { grid-template-columns:4.3rem minmax(0,1fr); padding:.6rem; }
    .n-file-preview { min-height:4.3rem; }
    .n-file-preview.is-media,.n-file-preview.is-video { grid-column:1 / -1; grid-row:auto; }
    .n-file-actions { grid-column:1 / -1; }
    .n-file-actions .btn-primary { flex:1; }
}

.n-search-page { padding: clamp(2rem, 5vw, 4.5rem) 1rem 5rem; min-height: calc(100vh - 150px); }
.n-search-wrap { max-width: 920px; margin: 0 auto; }
.n-search-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.75rem; }
.n-search-heading h1 { margin: .35rem 0 .5rem; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.045em; }
.n-search-heading p { margin: 0; color: var(--n-text-secondary); font-size: 1rem; }
.n-search-count { flex: 0 0 auto; padding: .45rem .75rem; border-radius: 999px; background: var(--n-brand-pale); color: var(--n-brand-dark); font-weight: 700; font-size: .8rem; }
.n-search-form { display: flex; gap: .75rem; margin-bottom: 1.5rem; padding: .65rem; border: 1px solid var(--n-border); border-radius: 1rem; background: rgba(255,255,255,.9); box-shadow: 0 8px 30px rgba(28,25,23,.07); }
.n-search-input { display: flex; align-items: center; gap: .65rem; flex: 1; padding: 0 .75rem; }
.n-search-input i { color: var(--n-brand); font-size: 1.25rem; }
.n-search-input input { min-height: 46px; width: 100%; border: 0; outline: 0; background: transparent; box-shadow: none !important; }
.n-search-form .btn { min-width: 132px; margin: 0; }
.n-results-card { overflow: hidden; border: 1px solid var(--n-border); border-radius: 1rem; background: var(--n-surface); box-shadow: var(--n-shadow-md); }
.n-results-head, .n-result-row { display: grid; grid-template-columns: 1fr 220px; align-items: center; gap: 1rem; }
.n-results-head { padding: .75rem 1.25rem; background: #f7f6f3; color: var(--n-text-muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.n-result-row { padding: .85rem 1.25rem; border-top: 1px solid var(--n-border-light); color: var(--n-text); text-decoration: none !important; transition: background .15s, transform .15s; }
.n-result-row:hover { background: var(--n-brand-pale); transform: translateX(2px); }
.n-result-person { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.n-result-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; background: linear-gradient(135deg, var(--n-brand), #155e75); color: #fff; font-size: .75rem; font-weight: 800; }
.n-result-avatar.has-photo { overflow: hidden; padding: 0; background: var(--n-surface-soft); }
.n-result-avatar.has-photo > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.n-result-person strong, .n-result-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-result-person strong { font-size: .95rem; }
.n-result-person small { margin-top: .15rem; color: var(--n-text-muted); font-size: .75rem; }
.n-result-group { display: flex; align-items: center; justify-content: space-between; gap: .5rem; color: var(--n-text-secondary); font-size: .82rem; }
.n-result-group > i { color: var(--n-brand); font-size: 1.15rem; }
.n-search-empty { padding: 4rem 1rem; text-align: center; border: 1px dashed var(--n-border); border-radius: 1rem; background: rgba(255,255,255,.6); }
.n-search-empty > i { color: var(--n-brand); font-size: 3rem; }
.n-search-empty h2 { margin: .75rem 0 .35rem; font-size: 1.25rem; }
.n-search-empty p { margin: 0; color: var(--n-text-secondary); }
@media (max-width: 575.98px) { .n-search-page { padding: 1.5rem .75rem 4rem; } .n-search-heading { display: block; } .n-search-count { display: inline-block; margin-top: 1rem; } .n-search-form { display: block; padding: .55rem; } .n-search-form .btn { width: 100%; } .n-results-head, .n-result-row { grid-template-columns: 1fr; gap: .35rem; } .n-results-head span:last-child { display: none; } .n-result-group { padding-left: 3.1rem; justify-content: flex-start; } .n-result-group > i { margin-left: auto; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Teacher session finishing layer (kept last to outrank legacy tab rules). */
.n-content-anchor { display: block; position: relative; top: -5rem; width: 1px; height: 1px; outline: 0; }
.teacher-session-roster-header > span:first-child strong,
.teacher-session-roster-header > span:first-child small { display: block; }
.teacher-session-roster-header > span:first-child small { margin-top: .15rem; color: var(--n-text-muted); font-size: .64rem; }
.teacher-session-roster-list .nav-link { position: relative; }
.n-roster-avatar {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    border-radius: .65rem;
    background: #f1f5f9;
    color: var(--n-text-secondary);
    font-size: .62rem;
    font-weight: 800;
}
.n-roster-avatar-group { background: var(--n-brand-pale); color: var(--n-brand-dark); font-size: 1rem; }
.n-roster-copy { min-width: 0; flex: 1; }
.n-roster-copy strong,
.n-roster-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-roster-copy strong { font-size: .75rem; }
.n-roster-copy small { margin-top: .12rem; color: var(--n-text-muted); font-size: .61rem; font-weight: 500; }
.teacher-session-roster-list .nav-link.active .n-roster-avatar { background: rgba(255,255,255,.16); color: #fff; }
.teacher-session-roster-list .nav-link.active .n-roster-copy small { color: rgba(255,255,255,.72); }
.n-roster-status { width: .5rem; height: .5rem; flex: 0 0 .5rem; border-radius: 50%; background: var(--n-warning); box-shadow: 0 0 0 3px rgba(234,88,12,.1); }
.n-roster-status.complete { background: var(--n-success); box-shadow: 0 0 0 3px rgba(22,163,74,.1); }
.n-session-loading,
.n-session-error { display: flex; align-items: center; justify-content: center; min-height: 25rem; flex-direction: column; gap: .75rem; color: var(--n-text-secondary); text-align: center; }
.n-session-loading { flex-direction: row; }
.n-session-error > i { color: var(--n-warning); font-size: 2.5rem; }
.n-session-error h2 { margin: 0; font-size: 1.2rem; }
.n-session-error p { margin: 0; color: var(--n-text-muted); }
.teacher-session-page .teacher-session-layout { display: grid; }
.teacher-session-page .teacher-session-roster { display: block !important; }

@media (max-width: 991.98px) {
    .teacher-session-page .teacher-session-layout { grid-template-columns: minmax(0, 1fr); }
    .teacher-session-page .teacher-session-roster { max-width: 100%; }
    .teacher-session-page .teacher-session-roster-list { display: block; max-width: 100%; overflow-x: auto; }
    .teacher-session-page .teacher-session-roster-list .nav { display: flex; min-width: max-content; }
    .teacher-session-page .teacher-session-roster-list .nav-link { width: 13.5rem; }
}

/* ═══════════════════════════════════════════════════════════════════
   TEACHER COCKPIT
   A scoped application shell for every /professeur route. Legacy
   templates can progressively adopt the semantic components below
   without leaking positional rules into family or student pages.
   ═══════════════════════════════════════════════════════════════════ */
.teacher-surface {
    --teacher-max: 1360px;
    min-width: 0;
    background:
        radial-gradient(circle at 94% 4rem, rgba(103, 232, 249, .12), transparent 27rem),
        linear-gradient(180deg, #f8fbfc 0, var(--n-bg) 28rem);
}

.admin-surface {
    --teacher-max: 1360px;
    min-width: 0;
    background: var(--n-bg);
}
.admin-surface .n-admin-header .n-admin-enrollment-link {
    margin-left: auto;
    background: #f0fdf4;
    color: #15803d;
}
.admin-surface .n-admin-header .n-admin-enrollment-link i { color: #16a34a; }
.admin-surface .n-admin-header .n-admin-enrollment-link:hover,
.admin-surface .n-admin-header .n-admin-enrollment-link:focus { background: #dcfce7; color: #166534; }

.n-skip-link {
    position: fixed;
    top: .5rem;
    left: .5rem;
    z-index: 1100;
    transform: translateY(-160%);
    border-radius: .6rem;
    background: var(--n-text);
    padding: .65rem .85rem;
    color: #fff;
    font-weight: 700;
}
.n-skip-link:focus { transform: none; color: #fff; }

.n-teacher-header {
    position: sticky;
    top: 0;
    z-index: 1040;
    border-bottom: 1px solid rgba(232, 229, 224, .92);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 1px 0 rgba(28, 25, 23, .02), 0 10px 30px rgba(28, 25, 23, .035);
    backdrop-filter: blur(18px);
}
.n-teacher-header-inner {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: var(--teacher-max);
    min-height: 4.7rem;
    gap: 1.15rem;
}
.n-teacher-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: .65rem;
    color: var(--n-text);
}
.n-teacher-brand:hover { color: var(--n-text); text-decoration: none; }
.n-teacher-brand img { width: 2.45rem; height: 2.75rem; object-fit: contain; }
.n-teacher-brand strong, .n-teacher-brand small { display: block; line-height: 1.15; }
.n-teacher-brand strong { font-size: .85rem; }
.n-teacher-brand small { margin-top: .15rem; color: var(--n-text-muted); font-size: .64rem; }

.n-teacher-primary-nav {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
    gap: .18rem;
}
/* Bootstrap's generic `.collapse:not(.show)` is more specific than a
   single component class. The application navigation is always expanded
   on desktop and only adopts collapse behaviour at the mobile breakpoint. */
.n-teacher-header .n-teacher-primary-nav.collapse { display: flex; }
.n-teacher-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 2.55rem;
    border: 0;
    border-radius: .72rem;
    background: transparent;
    padding: .58rem .68rem;
    color: var(--n-text-secondary);
    font: inherit;
    font-size: .77rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}
.n-teacher-nav-link i { color: var(--n-text-muted); font-size: 1.02rem; }
.n-teacher-nav-link:hover,
.n-teacher-nav-link:focus,
.n-teacher-nav-link.active {
    background: var(--n-brand-pale);
    color: var(--n-brand-dark);
    outline: 0;
    text-decoration: none;
}
.n-teacher-nav-link.active i { color: var(--n-brand); }
.n-teacher-supervision-link { color: #5b21b6; }
.n-teacher-supervision-link i { color: #7c3aed; }
.n-teacher-supervision-link:hover,
.n-teacher-supervision-link:focus,
.n-teacher-supervision-link.active { background: #f5f3ff; color: #5b21b6; }
.n-teacher-nav-dropdown .dropdown-toggle::after { margin-left: .1rem; }
.n-teacher-header .dropdown-menu {
    box-sizing: border-box;
    z-index: 1045;
    min-width: 15.5rem;
    max-height: min(75vh, 38rem);
    margin-top: .55rem;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius-lg);
    background: rgba(255,255,255,.98);
    padding: .45rem;
    box-shadow: var(--n-shadow-lg);
}
.n-teacher-header .n-supervision-menu {
    display: none;
    width: min(43rem, calc(100vw - 2rem));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .15rem;
}
.n-teacher-header .n-supervision-menu.show { display: grid; }
.n-teacher-header .n-supervision-menu .n-dropdown-label { grid-column: 1 / -1; }
.n-dropdown-label {
    display: block;
    padding: .45rem .65rem .35rem;
    color: var(--n-text-muted);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.n-teacher-header .dropdown-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 2.45rem;
    overflow: hidden;
    border-radius: .58rem;
    padding: .52rem .65rem;
    color: var(--n-text-secondary);
    font-size: .76rem;
    font-weight: 650;
    text-overflow: ellipsis;
}
.n-teacher-header .dropdown-item i { flex: 0 0 auto; color: var(--n-brand); font-size: 1rem; }
.n-teacher-header .dropdown-item:hover,
.n-teacher-header .dropdown-item:focus,
.n-teacher-header .dropdown-item.active { background: var(--n-brand-pale); color: var(--n-brand-dark); }

.n-teacher-account { flex: 0 0 auto; margin-left: auto; }
.n-teacher-account-trigger {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    border: 1px solid var(--n-border-light);
    border-radius: var(--n-radius-full);
    background: #fff;
    padding: .28rem .58rem .28rem .3rem;
    color: var(--n-text);
    font: inherit;
    cursor: pointer;
}
.n-teacher-account-trigger:hover { border-color: var(--n-brand-light); box-shadow: 0 0 0 3px var(--n-brand-glow); }
.n-teacher-avatar {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--n-brand-dark), var(--n-brand));
    color: #fff;
    font-size: .66rem;
    font-weight: 800;
}
.n-teacher-avatar img { width: 100%; height: 100%; object-fit: cover; }
.n-teacher-account-copy { max-width: 9rem; text-align: left; }
.n-teacher-account-copy strong, .n-teacher-account-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.2; }
.n-teacher-account-copy strong { font-size: .69rem; }
.n-teacher-account-copy small { margin-top: .12rem; color: var(--n-text-muted); font-size: .6rem; }
.n-teacher-nav-toggle {
    display: none;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    margin-left: auto;
    border: 1px solid var(--n-border);
    border-radius: .7rem;
    background: #fff;
    color: var(--n-text);
    font-size: 1.35rem;
}

.n-teacher-context-nav {
    border-bottom: 1px solid var(--n-border-light);
    background: rgba(255,255,255,.9);
}
.n-teacher-context-nav .container { display: flex; max-width: var(--teacher-max); gap: .25rem; overflow-x: auto; padding-block: .45rem; scrollbar-width: none; }
.n-teacher-context-nav .container::-webkit-scrollbar { display: none; }
.n-teacher-context-nav a { flex: 0 0 auto; border-radius: var(--n-radius-full); padding: .4rem .7rem; color: var(--n-text-secondary); font-size: .7rem; font-weight: 700; }
.n-teacher-context-nav a:hover { background: var(--n-brand-pale); color: var(--n-brand-dark); text-decoration: none; }
.n-dropdown-action-form,
.teacher-surface .n-inline-action-form { margin: 0; }
.n-dropdown-action-form .dropdown-item { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; }
.teacher-surface .n-inline-action-form .btn { margin: 0; }

/* Shared professor page primitives */
.n-teacher-page {
    min-height: calc(100vh - 4.7rem);
    padding: clamp(1.4rem, 3vw, 2.6rem) 0 5rem;
}
.n-teacher-page > .container,
.n-teacher-page > .container-fluid { max-width: var(--teacher-max); }
.n-teacher-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.45rem;
}
.n-teacher-page-header h1 { margin: .2rem 0 .35rem; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.045em; line-height: 1.05; }
.n-teacher-page-header p { max-width: 48rem; margin: 0; color: var(--n-text-secondary); }
.n-teacher-page-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
.n-teacher-page-actions .btn { margin: 0; }
.n-teacher-panel {
    overflow: hidden;
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius-xl);
    background: rgba(255,255,255,.94);
    box-shadow: var(--n-shadow-md);
}
.n-teacher-panel + .n-teacher-panel { margin-top: 1rem; }
.n-teacher-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--n-border-light); padding: 1rem 1.2rem; }
.n-teacher-panel-header h2, .n-teacher-panel-header h3 { margin: 0; font-size: 1rem; }
.n-teacher-panel-body { padding: 1.2rem; }
.n-teacher-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
.n-teacher-grid > .n-span-12 { grid-column: span 12; }
.n-teacher-grid > .n-span-8 { grid-column: span 8; }
.n-teacher-grid > .n-span-6 { grid-column: span 6; }
.n-teacher-grid > .n-span-4 { grid-column: span 4; }
.n-teacher-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.n-teacher-metric { display: flex; align-items: center; gap: .75rem; min-width: 0; border: 1px solid var(--n-border); border-radius: var(--n-radius-lg); background: rgba(255,255,255,.9); padding: .9rem 1rem; box-shadow: var(--n-shadow-sm); }
.n-teacher-metric > i { display: grid; place-items: center; width: 2.45rem; height: 2.45rem; flex: 0 0 auto; border-radius: .75rem; background: var(--n-brand-pale); color: var(--n-brand-dark); font-size: 1.18rem; }
.n-teacher-metric strong, .n-teacher-metric span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-teacher-metric strong { font-size: 1.15rem; line-height: 1.15; }
.n-teacher-metric span { margin-top: .12rem; color: var(--n-text-muted); font-size: .7rem; }

/* Dashboard, class cards and attendance */
.teacher-surface .n-teacher-dashboard-section { margin-top: 1.35rem; }
.teacher-surface .n-section-heading > a { display: inline-flex; align-items: center; gap: .35rem; color: var(--n-brand-dark); font-size: .75rem; font-weight: 750; }
.teacher-surface .n-section-heading > a:hover { color: var(--n-brand); text-decoration: none; }
.teacher-surface .n-teacher-metric.is-danger > i { background: #fff1f2; color: #be123c; }
.teacher-surface .n-teacher-metric.is-danger strong { color: #9f1239; }
.teacher-surface .n-teacher-metric.is-warning > i { background: #fff7ed; color: #c2410c; }
.teacher-surface .n-teacher-metric.is-warning strong { color: #9a3412; }
.teacher-surface .n-teacher-dashboard .n-teacher-page-header { align-items: center; margin-bottom: .85rem; }
.teacher-surface .n-teacher-dashboard .n-teacher-page-header h1 { font-size: clamp(2rem, 3.3vw, 2.65rem); }
.teacher-surface .n-teacher-dashboard .n-teacher-metrics { gap: .6rem; margin-bottom: .7rem; }
.teacher-surface .n-teacher-dashboard .n-teacher-metric { padding: .68rem .78rem; }
.teacher-surface .n-teacher-dashboard .n-teacher-metric > i { width: 2.1rem; height: 2.1rem; font-size: 1rem; }
.teacher-surface .n-teacher-dashboard .n-teacher-metric strong { font-size: 1rem; }
.teacher-surface .n-teacher-day-summary { display: flex; align-items: center; min-width: 0; gap: 1rem; border: 1px solid var(--n-border); border-radius: var(--n-radius-lg); background: rgba(255,255,255,.92); padding: .72rem .85rem; box-shadow: var(--n-shadow-sm); }
.teacher-surface .n-teacher-day-summary-heading { display: flex; align-items: center; flex: 0 0 auto; gap: .55rem; padding-right: 1rem; border-right: 1px solid var(--n-border-light); }
.teacher-surface .n-teacher-day-summary-heading > i { display: grid; place-items: center; width: 2.15rem; height: 2.15rem; border-radius: .65rem; background: var(--n-brand-pale); color: var(--n-brand-dark); font-size: 1rem; }
.teacher-surface .n-teacher-day-summary-heading h2 { margin: .05rem 0 0; font-size: .85rem; }
.teacher-surface .n-teacher-day-summary-heading .n-eyebrow { font-size: .56rem; }
.teacher-surface .n-teacher-day-summary .n-all-clear { display: flex; align-items: center; min-width: 0; gap: .5rem; padding: 0; }
.teacher-surface .n-teacher-day-summary .n-all-clear > i { color: #16a34a; font-size: 1.2rem; }
.teacher-surface .n-teacher-day-summary .n-all-clear strong,
.teacher-surface .n-teacher-day-summary .n-all-clear span { display: block; }
.teacher-surface .n-teacher-day-summary .n-all-clear strong { color: var(--n-text); font-size: .72rem; }
.teacher-surface .n-teacher-day-summary .n-all-clear span { color: var(--n-text-muted); font-size: .62rem; }
.teacher-surface .n-teacher-day-summary .n-attention-grid { flex: 1 1 auto; }
.teacher-surface .n-attention-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.teacher-surface .n-attention-grid > div { min-width: 0; padding: 1.1rem 1.2rem; }
.teacher-surface .n-attention-grid > div + div { border-left: 1px solid var(--n-border-light); }
.teacher-surface .n-attention-grid header { display: flex; align-items: center; gap: .65rem; margin-bottom: .8rem; }
.teacher-surface .n-attention-grid header strong,
.teacher-surface .n-attention-grid header small { display: block; }
.teacher-surface .n-attention-grid header strong { font-size: .83rem; }
.teacher-surface .n-attention-grid header small { margin-top: .08rem; color: var(--n-text-muted); font-size: .65rem; }
.teacher-surface .n-attention-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .62rem; }
.teacher-surface .n-attention-icon.danger { background: #fff1f2; color: #be123c; }
.teacher-surface .n-attention-icon.warning { background: #fff7ed; color: #c2410c; }
.teacher-surface .n-attention-grid ul { max-height: 11.5rem; overflow: auto; margin: 0; padding: 0; list-style: none; }
.teacher-surface .n-attention-grid li { display: flex; align-items: center; justify-content: space-between; gap: .65rem; border-top: 1px solid var(--n-border-light); padding: .58rem 0; font-size: .75rem; }
.teacher-surface .n-attention-grid li small { flex: 0 0 auto; border-radius: var(--n-radius-full); background: #f6f5f3; padding: .24rem .45rem; color: var(--n-text-muted); font-size: .6rem; font-weight: 700; }

.teacher-surface .n-teacher-class-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.teacher-surface .n-teacher-class-card { display: flex; min-width: 0; overflow: hidden; flex-direction: column; border: 1px solid var(--n-border); border-radius: var(--n-radius-xl); background: rgba(255,255,255,.96); box-shadow: var(--n-shadow-sm); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.teacher-surface .n-teacher-class-card:hover { transform: translateY(-2px); border-color: rgba(8,145,178,.28); box-shadow: var(--n-shadow-md); }
.teacher-surface .n-teacher-class-card-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .7rem; padding: .9rem .95rem .72rem; }
.teacher-surface .n-class-icon { display: grid; place-items: center; width: 2.55rem; height: 2.55rem; border-radius: .8rem; background: linear-gradient(145deg, var(--n-brand-dark), var(--n-brand)); color: #fff; font-size: 1.1rem; box-shadow: var(--n-shadow-brand); }
.teacher-surface .n-teacher-class-card-header h3 { overflow: hidden; margin: .1rem 0 .18rem; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-teacher-class-card-header p { margin: 0; color: var(--n-text-muted); font-size: .68rem; }
.teacher-surface .n-class-code { max-width: 8rem; overflow: hidden; border: 1px solid var(--n-border-light); border-radius: var(--n-radius-full); background: #fafaf9; padding: .3rem .5rem; color: var(--n-text-muted); font-size: .58rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-class-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-inline: .95rem; overflow: hidden; border: 1px solid var(--n-border-light); border-radius: .72rem; background: #fbfbfa; }
.teacher-surface .n-class-stats span { padding: .55rem .65rem; color: var(--n-text-muted); font-size: .62rem; text-align: center; }
.teacher-surface .n-class-stats span + span { border-left: 1px solid var(--n-border-light); }
.teacher-surface .n-class-stats strong { color: var(--n-text); font-size: .75rem; }
.teacher-surface .n-class-stats .is-alert strong { color: #be123c; }
.teacher-surface .n-class-stats .is-warning strong { color: #c2410c; }
.teacher-surface .n-teacher-class-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding: .72rem .95rem .9rem; }
.teacher-surface .n-teacher-class-card-actions .btn { min-height: 2.45rem; margin: 0; padding-inline: .7rem; font-size: .68rem; }
.teacher-surface .n-teacher-class-card-actions .btn:first-child { flex: 1 1 9rem; }

.teacher-surface .n-teacher-quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin-top: 1.35rem; }
.teacher-surface .n-teacher-quick-actions > a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; min-width: 0; gap: .65rem; border: 1px solid var(--n-border); border-radius: var(--n-radius-lg); background: rgba(255,255,255,.85); padding: .85rem; color: var(--n-text); box-shadow: var(--n-shadow-sm); }
.teacher-surface .n-teacher-quick-actions > a:hover { border-color: rgba(8,145,178,.3); background: #fff; color: var(--n-brand-dark); text-decoration: none; transform: translateY(-1px); }
.teacher-surface .n-teacher-quick-actions > a > i:first-child { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: .68rem; background: var(--n-brand-pale); color: var(--n-brand-dark); font-size: 1rem; }
.teacher-surface .n-teacher-quick-actions strong,
.teacher-surface .n-teacher-quick-actions small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-teacher-quick-actions strong { font-size: .72rem; }
.teacher-surface .n-teacher-quick-actions small { margin-top: .1rem; color: var(--n-text-muted); font-size: .6rem; }
.teacher-surface .n-teacher-quick-actions > a > i:last-child { color: var(--n-text-muted); }
.teacher-surface .n-teacher-empty { grid-column: 1 / -1; border: 1px dashed var(--n-border); border-radius: var(--n-radius-xl); background: rgba(255,255,255,.55); padding: 3rem 1rem; text-align: center; }
.teacher-surface .n-teacher-empty > i { color: var(--n-brand); font-size: 2rem; }
.teacher-surface .n-teacher-empty h3 { margin: .65rem 0 .25rem; font-size: 1rem; }
.teacher-surface .n-teacher-empty p { margin: 0; color: var(--n-text-muted); font-size: .73rem; }

.teacher-surface .n-attendance-modal .modal-header { align-items: flex-start; }
.teacher-surface .n-attendance-modal .modal-title { margin: .08rem 0 .15rem; font-size: 1.15rem; }
.teacher-surface .n-attendance-modal .modal-header p { margin: 0; color: var(--n-text-muted); font-size: .7rem; }
.teacher-surface .n-attendance-modal .modal-dialog,
.teacher-surface .n-attendance-modal .modal-content,
.teacher-surface .n-attendance-modal form { min-height: 0; max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); }
.teacher-surface .n-attendance-modal .modal-dialog { margin-top: 1rem; margin-bottom: 1rem; }
.teacher-surface .n-attendance-modal .modal-content,
.teacher-surface .n-attendance-modal form { display: flex; flex-direction: column; }
.teacher-surface .n-attendance-modal .modal-header,
.teacher-surface .n-attendance-modal .modal-footer { flex: 0 0 auto; }
.teacher-surface .n-attendance-modal .modal-body { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; overflow: hidden; }
.teacher-surface .n-attendance-scroll { min-height: 0; flex: 1 1 auto; max-height: calc(100vh - 13rem); max-height: calc(100dvh - 13rem); overflow: auto; scrollbar-gutter: stable; border: 1px solid var(--n-border-light); border-radius: .8rem; background: #fff; }
.teacher-surface .n-attendance-grid-header { position: sticky; top: 0; z-index: 1; display: grid; grid-template-columns: minmax(12rem, 1fr) repeat(3, 5.8rem); align-items: center; gap: 0; border-bottom: 1px solid var(--n-border-light); background: #fafaf9; color: var(--n-text-muted); font-size: .62rem; font-weight: 750; letter-spacing: .04em; text-align: center; text-transform: uppercase; }
.teacher-surface .n-attendance-grid-header span { min-width: 0; padding: .62rem .7rem; }
.teacher-surface .n-attendance-grid-header span:first-child { text-align: left; }
.teacher-surface .n-attendance-grid-header .present { color: #166534; }
.teacher-surface .n-attendance-grid-header .late { color: #9a3412; }
.teacher-surface .n-attendance-grid-header .absent { color: #9f1239; }
.teacher-surface .n-attendance-list { overflow: visible; }
.teacher-surface .n-attendance-row { display: grid; grid-template-columns: minmax(12rem, 1fr) auto; align-items: stretch; gap: 0; min-width: 0; margin: 0; border: 0; border-bottom: 1px solid var(--n-border-light); padding: 0; }
.teacher-surface .n-attendance-row:last-child { border-bottom: 0; }
.teacher-surface .n-attendance-student { display: flex; align-items: center; min-width: 0; gap: .6rem; margin: 0; padding: .62rem .7rem; color: var(--n-text); font-size: .73rem; font-weight: 700; }
.teacher-surface .n-attendance-choices { display: grid; grid-template-columns: repeat(3, 5.8rem); min-width: 0; }
.teacher-surface .n-attendance-choices label { display: grid; place-items: center; min-width: 0; margin: 0; border-left: 1px solid var(--n-border-light); cursor: pointer; }
.teacher-surface .n-attendance-choices input { position: absolute; opacity: 0; pointer-events: none; }
.teacher-surface .n-attendance-choices span { display: flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border: 1px solid var(--n-border); border-radius: 50%; background: #fff; color: var(--n-text-muted); font-size: .86rem; transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease; }
.teacher-surface .n-attendance-choices em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); font-style: normal; white-space: nowrap; }
.teacher-surface .n-attendance-choices input:focus-visible + span { outline: 3px solid var(--n-brand-glow); outline-offset: -3px; }
.teacher-surface .n-attendance-choices label:hover span { transform: translateY(-1px); }
.teacher-surface .n-attendance-choices .present input:checked + span { border-color: var(--n-success); background: var(--n-success); color: #fff; }
.teacher-surface .n-attendance-choices .late input:checked + span { border-color: var(--n-warning); background: var(--n-warning); color: #fff; }
.teacher-surface .n-attendance-choices .absent input:checked + span { border-color: #e11d48; background: #e11d48; color: #fff; }
.teacher-surface .n-confirm-date { display: flex; align-items: flex-start; gap: .55rem; margin: .85rem 0 0; border-radius: .7rem; background: #fff7ed; padding: .7rem; color: #9a3412; font-size: .68rem; }
.teacher-surface .n-confirm-date input { margin-top: .1rem; }

/* Help centre */
.teacher-surface .n-support-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(18rem, .85fr); align-items: start; gap: 1rem; }
.teacher-surface .n-support-video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.teacher-surface .n-support-video-card { overflow: hidden; border: 1px solid var(--n-border); border-radius: var(--n-radius-lg); background: #fff; box-shadow: var(--n-shadow-sm); }
.teacher-surface .n-support-video-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0f172a; }
.teacher-surface .n-support-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.teacher-surface .n-support-video-card > div:last-child { padding: .75rem .85rem; }
.teacher-surface .n-support-video-card > div:last-child span { color: var(--n-brand); font-size: .58rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.teacher-surface .n-support-video-card h3 { margin: .18rem 0 0; font-size: .8rem; }
.teacher-surface .n-support-contact { position: sticky; top: 5.7rem; }
.teacher-surface .n-support-contact .n-teacher-panel-header > i { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: .72rem; background: var(--n-brand-pale); color: var(--n-brand-dark); }
.teacher-surface .n-support-contact form > p { margin: 0 0 1rem; color: var(--n-text-secondary); font-size: .72rem; line-height: 1.55; }

/* Pedagogical forms */
.teacher-surface .n-teacher-form { display: grid; min-width: 0; gap: 1rem; }
.teacher-surface .n-teacher-form > *,
.teacher-surface .n-teacher-form .n-teacher-panel,
.teacher-surface .n-teacher-form .n-teacher-panel-body { min-width: 0; }
.teacher-surface .n-teacher-form-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(17rem, .65fr); align-items: start; gap: 1rem; }
.teacher-surface .n-form-side-panel { position: sticky; top: 5.7rem; }
.teacher-surface .n-teacher-panel-header > div { min-width: 0; }
.teacher-surface .n-step-heading { display: flex; align-items: center; gap: .55rem; }
.teacher-surface .n-form-step { display: grid; place-items: center; width: 1.65rem; height: 1.65rem; flex: 0 0 1.65rem; border-radius: .5rem; background: var(--n-brand-pale); color: var(--n-brand-dark); font-size: .68rem; font-weight: 800; }
.teacher-surface .n-form-hint { color: var(--n-text-muted); font-size: .65rem; }
.teacher-surface .n-form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .8rem; }
.teacher-surface .n-form-grid > .n-span-12 { grid-column: span 12; }
.teacher-surface .n-form-grid > .n-span-8 { grid-column: span 8; }
.teacher-surface .n-form-grid > .n-span-7 { grid-column: span 7; }
.teacher-surface .n-form-grid > .n-span-6 { grid-column: span 6; }
.teacher-surface .n-form-grid > .n-span-5 { grid-column: span 5; }
.teacher-surface .n-form-grid > .n-span-4 { grid-column: span 4; }
.teacher-surface .n-form-grid .form-group { margin-bottom: .25rem; }
.teacher-surface .n-readonly-field { align-self: end; min-height: 2.75rem; border: 1px solid var(--n-border-light); border-radius: .7rem; background: #fafaf9; padding: .48rem .75rem; }
.teacher-surface .n-readonly-field span,
.teacher-surface .n-readonly-field strong { display: block; }
.teacher-surface .n-readonly-field span { color: var(--n-text-muted); font-size: .58rem; font-weight: 700; text-transform: uppercase; }
.teacher-surface .n-readonly-field strong { margin-top: .08rem; font-size: .75rem; }
.teacher-surface .n-form-actions { position: sticky; bottom: .65rem; z-index: 10; display: flex; align-items: center; justify-content: flex-end; gap: .55rem; margin-top: .25rem; border: 1px solid rgba(232,229,224,.9); border-radius: var(--n-radius-lg); background: rgba(255,255,255,.94); padding: .65rem; box-shadow: 0 10px 35px rgba(28,25,23,.12); backdrop-filter: blur(14px); }
.teacher-surface .n-form-actions .btn { margin: 0; }
.teacher-surface .n-attendance-selection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.teacher-surface .n-selection-card { min-width: 0; border: 1px solid var(--n-border-light); border-radius: .8rem; background: #fbfbfa; padding: .8rem; }
.teacher-surface .n-selection-card > label { display: flex; align-items: center; gap: .55rem; margin-bottom: .65rem; }
.teacher-surface .n-selection-card > label > i { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .6rem; font-size: 1rem; }
.teacher-surface .n-selection-card > label strong,
.teacher-surface .n-selection-card > label small { display: block; }
.teacher-surface .n-selection-card > label strong { color: var(--n-text); font-size: .72rem; }
.teacher-surface .n-selection-card > label small { margin-top: .08rem; color: var(--n-text-muted); font-size: .6rem; font-weight: 500; }
.teacher-surface .n-selection-card.is-warning > label > i { background: #fff7ed; color: #c2410c; }
.teacher-surface .n-selection-card.is-danger > label > i { background: #fff1f2; color: #be123c; }
.teacher-surface .n-selection-card .bootstrap-select { width: 100% !important; }
.teacher-surface .n-arabic-helper { margin-top: .75rem; border: 1px solid var(--n-border-light); border-radius: .7rem; background: #fafaf9; }
.teacher-surface .n-arabic-helper summary { padding: .7rem .8rem; color: var(--n-text-secondary); font-size: .68rem; font-weight: 700; cursor: pointer; }
.teacher-surface .n-arabic-helper summary i { margin-right: .35rem; color: var(--n-brand); }
.teacher-surface .n-arabic-helper > div { border-top: 1px solid var(--n-border-light); padding: .75rem; }
.teacher-surface .n-homework-editor {
    min-height: 18rem;
    resize: vertical;
    font: 500 .9rem/1.65 var(--n-font);
    white-space: pre-wrap;
}
.teacher-surface .n-editor-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: .45rem;
    color: var(--n-text-muted);
    font-size: .72rem;
}
.teacher-surface .n-editor-meta span { font-variant-numeric: tabular-nums; }
.teacher-surface .n-user-tag-list { display: flex; flex-wrap: wrap; gap: .3rem; }
.teacher-surface .n-confirmation-targets { display: grid; gap: .45rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.teacher-surface .n-confirmation-targets li { display: flex; align-items: center; gap: .45rem; border: 1px solid var(--n-border-light); border-radius: .65rem; background: #fafaf9; padding: .55rem .7rem; color: var(--n-text-secondary); font-size: .78rem; font-weight: 650; }
.teacher-surface .n-confirmation-targets i { color: var(--n-brand); }
.teacher-surface .n-notify-choice { display: block; margin: 0; cursor: pointer; }
.teacher-surface .n-notify-choice > input { position: absolute; opacity: 0; }
.teacher-surface .n-notify-choice > span { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .15rem .55rem; border: 1px solid var(--n-border); border-radius: .72rem; padding: .75rem; transition: border-color .15s, background .15s; }
.teacher-surface .n-notify-choice > span > i { grid-row: 1 / 3; align-self: center; color: var(--n-text-muted); font-size: 1.2rem; }
.teacher-surface .n-notify-choice strong,
.teacher-surface .n-notify-choice small { display: block; }
.teacher-surface .n-notify-choice strong { color: var(--n-text); font-size: .7rem; }
.teacher-surface .n-notify-choice small { color: var(--n-text-muted); font-size: .58rem; font-weight: 500; }
.teacher-surface .n-notify-choice > input:checked + span { border-color: rgba(8,145,178,.35); background: var(--n-brand-pale); }
.teacher-surface .n-notify-choice > input:checked + span > i { color: var(--n-brand-dark); }
.teacher-surface .n-notify-choice > input:focus-visible + span { outline: 3px solid var(--n-brand-glow); }
.teacher-surface .n-form-recap { display: grid; grid-template-columns: 1fr auto; gap: .5rem; margin-top: .85rem; border-top: 1px solid var(--n-border-light); padding-top: .8rem; }
.teacher-surface .n-form-recap span { color: var(--n-text-muted); font-size: .62rem; }
.teacher-surface .n-form-recap strong { font-size: .65rem; text-align: right; }

/* Grade entry workspace */
.teacher-surface .n-grade-panel-header { align-items: center; }
.teacher-surface .n-grade-summary { display: grid; grid-template-columns: repeat(4, minmax(3.6rem, auto)); overflow: hidden; border: 1px solid var(--n-border-light); border-radius: .65rem; background: #fafaf9; }
.teacher-surface .n-grade-summary > span { padding: .38rem .62rem; text-align: center; }
.teacher-surface .n-grade-summary > span + span { border-left: 1px solid var(--n-border-light); }
.teacher-surface .n-grade-summary small,
.teacher-surface .n-grade-summary strong { display: block; }
.teacher-surface .n-grade-summary small { color: var(--n-text-muted); font-size: .52rem; font-weight: 750; text-transform: uppercase; }
.teacher-surface .n-grade-summary strong { margin-top: .06rem; color: var(--n-text); font-size: .72rem; }
.teacher-surface .n-grade-roster { overflow: hidden; }
.teacher-surface .n-grade-roster-head,
.teacher-surface .n-grade-row { display: grid; grid-template-columns: minmax(12rem, 1.1fr) minmax(8.5rem, .7fr) minmax(8rem, .55fr) minmax(12rem, 1.2fr); align-items: center; gap: .65rem; }
.teacher-surface .n-grade-roster-head { border-bottom: 1px solid var(--n-border); background: #f8f7f5; padding: .58rem .85rem; color: var(--n-text-muted); font-size: .56rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.teacher-surface .n-grade-row { position: relative; border-bottom: 1px solid var(--n-border-light); padding: .62rem .85rem; }
.teacher-surface .n-grade-row:last-child { border-bottom: 0; }
.teacher-surface .n-grade-row:focus-within { background: #fbfefe; }
.teacher-surface .n-grade-student { display: flex; align-items: center; min-width: 0; gap: .58rem; }
.teacher-surface .n-grade-student > span:last-child { min-width: 0; }
.teacher-surface .n-grade-student strong,
.teacher-surface .n-grade-student small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-grade-student strong { font-size: .7rem; }
.teacher-surface .n-grade-absence-note { margin-top: .08rem; color: #be123c; font-size: .56rem; }
.teacher-surface .n-grade-row .form-control { width: 100%; min-height: 2.35rem; height: 2.35rem; padding: .4rem .55rem; font-size: .68rem; }
.teacher-surface .n-grade-input-wrap { display: flex; align-items: center; overflow: hidden; border: 1px solid var(--n-border); border-radius: .7rem; background: #fff; }
.teacher-surface .n-grade-input-wrap:focus-within { border-color: var(--n-brand); box-shadow: 0 0 0 3px var(--n-brand-glow); }
.teacher-surface .n-grade-input-wrap input { border: 0; border-radius: 0; box-shadow: none !important; }
.teacher-surface .n-grade-input-wrap > span { flex: 0 0 auto; padding-right: .55rem; color: var(--n-text-muted); font-size: .6rem; white-space: nowrap; }
.teacher-surface .n-grade-input-wrap b { color: var(--n-text-secondary); }
.teacher-surface .n-grade-value[aria-invalid="true"] { background: #fff1f2; color: #9f1239; }
.teacher-surface .n-field-error { grid-column: 2 / -1; margin: -.25rem 0 .05rem; color: #be123c; font-size: .58rem; }
.teacher-surface .n-grade-publication .n-notify-choice { max-width: 26rem; }

/* Consistent treatment for the still-active legacy professor forms. */
.teacher-surface .team-2 {
    min-height: calc(100vh - 4.7rem);
    padding: clamp(1.4rem, 3vw, 2.6rem) 0 5rem !important;
    background: transparent;
}
.teacher-surface .team-2 > .container,
.teacher-surface .team-2 > .container-fluid { width: 100%; max-width: var(--teacher-max); padding-inline: 1rem; }
.teacher-surface .team-2 > .container > .row:first-child,
.teacher-surface .team-2 > .container-fluid > .row:first-child { margin-bottom: 1.25rem; }
.teacher-surface .team-2 h1,
.teacher-surface .team-2 > .container > .row:first-child h2 { margin: .2rem 0; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.045em; }
.teacher-surface .team-2 h2 { color: var(--n-text); font-size: 1.35rem; }
.teacher-surface .team-2 h3 { color: var(--n-text); font-size: 1rem; }
.teacher-surface .team-2 .card,
.teacher-surface .team-2 .fdb-box,
.teacher-surface .team-2 form > .form-row.border {
    border-color: var(--n-border) !important;
    border-radius: var(--n-radius-lg) !important;
    background: rgba(255,255,255,.94);
    box-shadow: var(--n-shadow-sm) !important;
}
.teacher-surface .team-2 .card-header,
.teacher-surface .team-2 .bg-info { border-radius: .7rem .7rem 0 0; background: var(--n-brand-pale) !important; color: var(--n-brand-dark) !important; }
.teacher-surface .team-2 .bg-info h3 { margin: 0; padding: .75rem; color: var(--n-brand-dark); }
.teacher-surface .form-control,
.teacher-surface .custom-select {
    min-height: 2.75rem;
    border: 1px solid var(--n-border);
    border-radius: .7rem;
    background-color: #fff;
    color: var(--n-text);
}
.teacher-surface textarea.form-control { min-height: 7rem; }
.teacher-surface .form-control:focus,
.teacher-surface .custom-select:focus { border-color: var(--n-brand); box-shadow: 0 0 0 3px var(--n-brand-glow); }
.teacher-surface label { color: var(--n-text-secondary); font-size: .76rem; font-weight: 700; }
.teacher-surface .table-responsive { border: 1px solid var(--n-border); border-radius: var(--n-radius-lg); background: #fff; }
.teacher-surface table.table { width: 100% !important; margin: 0 !important; color: var(--n-text-secondary); }
.teacher-surface table.table thead th { border-top: 0; border-bottom: 1px solid var(--n-border); background: #f8f7f5; color: var(--n-text-secondary); font-size: .66rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.teacher-surface table.table td { border-color: var(--n-border-light); vertical-align: middle; }
.teacher-surface table.table tbody tr:hover { background: #fbfefe; }
.teacher-surface .nav-pills,
.teacher-surface .nav-tabs { gap: .25rem; border: 1px solid var(--n-border); border-radius: var(--n-radius-lg); background: #fff; padding: .35rem; }
.teacher-surface .nav-tabs .nav-link,
.teacher-surface .nav-pills .nav-link { border: 0; border-radius: .62rem; color: var(--n-text-secondary); font-size: .76rem; font-weight: 700; }
.teacher-surface .nav-tabs .nav-link.active,
.teacher-surface .nav-pills .nav-link.active { background: var(--n-brand-dark); color: #fff; box-shadow: var(--n-shadow-brand); }
.teacher-surface .modal-content { overflow: hidden; border: 0; border-radius: var(--n-radius-xl); box-shadow: var(--n-shadow-lg); }
.teacher-surface .modal-header { border-color: var(--n-border-light); background: #fbfbfa; }
.teacher-surface .btn { border-radius: .68rem; font-weight: 700; }
.teacher-surface .btn-primary,
.teacher-surface .btn-info { border-color: var(--n-brand-dark); background: var(--n-brand-dark); color: #fff; }
.teacher-surface .btn-primary:hover,
.teacher-surface .btn-info:hover { border-color: #155e75; background: #155e75; }

/* Supervision CRUD: semantic, route-owned components only. */
.teacher-surface .n-supervision-back-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    gap: .35rem;
    margin: -.5rem 0 .35rem;
    color: var(--n-text-secondary);
    font-size: .68rem;
    font-weight: 750;
}
.teacher-surface .n-supervision-back-link:hover { color: var(--n-brand-dark); text-decoration: none; }
.teacher-surface .n-supervision-back-link:focus-visible { border-radius: .4rem; outline: 3px solid var(--n-brand-glow); outline-offset: 2px; }
.teacher-surface .n-supervision-crud-page .n-teacher-page-header { align-items: center; }
.teacher-surface .n-supervision-status {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: .4rem;
    border: 1px solid #bae6fd;
    border-radius: var(--n-radius-full);
    background: #f0f9ff;
    padding: .45rem .72rem;
    color: #075985;
    font-size: .68rem;
    font-weight: 800;
}
.teacher-surface .n-supervision-status.is-active { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.teacher-surface .n-supervision-status.is-inactive { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.teacher-surface .n-supervision-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin: -.35rem 0 1rem;
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius-lg);
    background: rgba(255, 255, 255, .9);
    padding: .65rem;
    box-shadow: var(--n-shadow-sm);
}
.teacher-surface .n-supervision-actions-context {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    min-height: 2.75rem;
    margin-right: auto;
    gap: .42rem;
    padding: 0 .3rem;
    color: var(--n-text-secondary);
    font-size: .65rem;
    font-weight: 800;
}
.teacher-surface .n-supervision-actions-context i { color: var(--n-brand); font-size: 1rem; }
.teacher-surface .n-supervision-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; margin: 0; gap: .32rem; padding: .58rem .78rem; font-size: .68rem; }
.teacher-surface .n-supervision-destructive-action { margin-left: .1rem !important; }
.teacher-surface .n-supervision-more-actions { position: relative; flex: 0 0 auto; }
.teacher-surface .n-supervision-more-actions > summary { list-style: none; cursor: pointer; }
.teacher-surface .n-supervision-more-actions > summary::-webkit-details-marker { display: none; }
.teacher-surface .n-supervision-more-actions[open] > summary { border-color: var(--n-brand); background: var(--n-brand-pale); color: var(--n-brand-dark); }
.teacher-surface .n-supervision-actions-menu {
    position: absolute;
    top: calc(100% + .5rem);
    right: 0;
    z-index: 1035;
    width: min(21rem, calc(100vw - 2rem));
    overflow: hidden;
    border: 1px solid var(--n-border);
    border-radius: .85rem;
    background: #fff;
    padding: .35rem;
    box-shadow: var(--n-shadow-lg);
}
.teacher-surface .n-supervision-actions-menu > a,
.teacher-surface .n-supervision-menu-form > button {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    align-items: center;
    width: 100%;
    min-height: 3.35rem;
    gap: .55rem;
    margin: 0;
    border: 0;
    border-radius: .62rem;
    background: transparent;
    padding: .5rem .6rem;
    color: var(--n-text-secondary);
    text-align: left;
    cursor: pointer;
}
.teacher-surface .n-supervision-actions-menu > a:hover,
.teacher-surface .n-supervision-menu-form > button:hover { background: var(--n-brand-pale); color: var(--n-brand-dark); text-decoration: none; }
.teacher-surface .n-supervision-actions-menu > a:focus-visible,
.teacher-surface .n-supervision-menu-form > button:focus-visible { outline: 3px solid var(--n-brand-glow); outline-offset: -2px; }
.teacher-surface .n-supervision-actions-menu > a > i,
.teacher-surface .n-supervision-menu-form > button > i { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .58rem; background: var(--n-brand-pale); color: var(--n-brand-dark); font-size: 1rem; }
.teacher-surface .n-supervision-actions-menu strong,
.teacher-surface .n-supervision-actions-menu small { display: block; }
.teacher-surface .n-supervision-actions-menu strong { font-size: .66rem; }
.teacher-surface .n-supervision-actions-menu small { margin-top: .08rem; color: var(--n-text-muted); font-size: .55rem; font-weight: 550; }
.teacher-surface .n-supervision-actions-menu .is-danger { margin-top: .2rem; border-top: 1px solid var(--n-border-light); border-radius: 0 0 .62rem .62rem; color: #be123c; }
.teacher-surface .n-supervision-actions-menu .is-danger > i { background: #fff1f2; color: #be123c; }
.teacher-surface .n-supervision-menu-form { margin: 0; }
.teacher-surface .n-supervision-form { display: grid; gap: 1rem; }
.teacher-surface .n-supervision-form > * { min-width: 0; }
.teacher-surface .n-supervision-form .n-form-actions { position: static; bottom: auto; z-index: auto; margin-top: 0; }
.teacher-surface .n-supervision-form .n-form-required-note { justify-self: end; margin: -.25rem .15rem -.55rem 0; color: var(--n-text-muted); font-size: .6rem; }
.teacher-surface .n-supervision-form .n-form-required-note span { color: #be123c; font-weight: 900; }
.teacher-surface .n-supervision-form .n-teacher-panel { margin: 0; }
.teacher-surface .n-supervision-form .n-teacher-panel-header > i,
.teacher-surface .n-supervision-detail-grid .n-teacher-panel-header > i {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 auto;
    border-radius: .7rem;
    background: var(--n-brand-pale);
    color: var(--n-brand-dark);
    font-size: 1rem;
}
.teacher-surface .n-supervision-association-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.teacher-surface .n-supervision-association-grid .form-group { min-width: 0; margin: 0; }
.teacher-surface .n-supervision-association-grid .n-association-wide { grid-column: 1 / -1; }
.teacher-surface .n-native-multi-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}
.teacher-surface select[data-multi-select]:not(.n-native-multi-select) { min-height: 11rem; }
.teacher-surface .n-multi-select { overflow: hidden; border: 1px solid var(--n-border); border-radius: .78rem; background: #fff; }
.teacher-surface .n-multi-select-chosen { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; border-bottom: 1px solid var(--n-border-light); background: var(--n-brand-pale); padding: .5rem .55rem; }
.teacher-surface .n-multi-select-chosen-label { margin-right: .15rem; color: var(--n-brand-dark); font-size: .52rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.teacher-surface .n-multi-select-chip { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; max-width: 100%; overflow-wrap: anywhere; gap: .3rem; border: 1px solid var(--n-brand); border-radius: 999px; background: #fff; padding: .2rem .3rem .2rem .55rem; color: var(--n-brand-dark); font: inherit; font-size: .6rem; font-weight: 700; line-height: 1.5; cursor: pointer; }
.teacher-surface .n-multi-select-chip:hover { border-color: var(--n-danger, #b3261e); color: var(--n-danger, #b3261e); }
.teacher-surface .n-multi-select-chip i { font-size: .68rem; opacity: .7; }
.teacher-surface .n-multi-select-chip:focus-visible { outline: 3px solid var(--n-brand-glow); outline-offset: 1px; }
.teacher-surface .n-multi-select-only[aria-pressed="true"] { background: var(--n-brand); color: #fff; }
.teacher-surface .n-multi-select-choice[data-selected="true"] strong { color: var(--n-brand-dark); font-weight: 800; }
.teacher-surface .n-multi-select-toolbar { display: flex; align-items: center; gap: .55rem; border-bottom: 1px solid var(--n-border-light); background: #fafaf9; padding: .55rem; }
.teacher-surface .n-multi-select-toolbar .form-control { min-width: 0; height: 2.75rem; margin: 0; border-radius: .58rem; font-size: .68rem; }
.teacher-surface .n-multi-select-count { flex: 0 0 auto; color: var(--n-text-muted); font-size: .57rem; font-weight: 750; white-space: nowrap; }
.teacher-surface .n-multi-select-actions { display: flex; gap: .35rem; border-bottom: 1px solid var(--n-border-light); padding: .42rem .55rem; }
.teacher-surface .n-multi-select-actions button { min-height: 2.5rem; margin: 0; border: 0; border-radius: .45rem; background: transparent; padding: .45rem .55rem; color: var(--n-brand-dark); font: inherit; font-size: .6rem; font-weight: 750; cursor: pointer; }
.teacher-surface .n-multi-select-actions button:disabled { color: var(--n-text-muted); cursor: not-allowed; opacity: .55; text-decoration: none; }
.teacher-surface .n-multi-select-actions button:hover { color: var(--n-brand); text-decoration: underline; }
.teacher-surface .n-multi-select-actions button:focus-visible { border-radius: .25rem; outline: 3px solid var(--n-brand-glow); }
.teacher-surface .n-multi-select-choices { max-height: 15rem; overflow-y: auto; padding: .35rem; }
.teacher-surface .n-multi-select-choice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; min-width: 0; min-height: 2.75rem; gap: .55rem; margin: 0; border-radius: .58rem; padding: .45rem .5rem; cursor: pointer; }
.teacher-surface .n-multi-select-choice:hover { background: #f8f7f5; }
.teacher-surface .n-multi-select-choice > input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--n-brand); }
.teacher-surface .n-multi-select-choice > span { min-width: 0; }
.teacher-surface .n-multi-select-choice strong,
.teacher-surface .n-multi-select-choice small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-multi-select-choice strong { color: var(--n-text); font-size: .64rem; }
.teacher-surface .n-multi-select-choice small { margin-top: .06rem; color: var(--n-text-muted); font-size: .52rem; font-weight: 500; }
.teacher-surface .n-multi-select-choice > i { display: grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: #f5f5f4; color: transparent; font-size: .72rem; }
.teacher-surface .n-multi-select-choice:has(input:checked) { background: var(--n-brand-pale); }
.teacher-surface .n-multi-select-choice input:checked ~ i { background: var(--n-brand); color: #fff; }
.teacher-surface .n-multi-select-choice:has(input:focus-visible) { outline: 3px solid var(--n-brand-glow); outline-offset: -2px; }
.teacher-surface .n-multi-select-empty { margin: 0; padding: 1rem; color: var(--n-text-muted); font-size: .63rem; text-align: center; }
.teacher-surface .n-supervision-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1rem; }
.teacher-surface .n-supervision-detail-grid .n-teacher-panel { margin: 0; }
.teacher-surface .n-supervision-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin: 0; }
.teacher-surface .n-supervision-details > div { min-width: 0; border-bottom: 1px solid var(--n-border-light); padding: 0 0 .65rem; }
.teacher-surface .n-supervision-details dt { color: var(--n-text-muted); font-size: .58rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.teacher-surface .n-supervision-details dd { margin: .2rem 0 0; overflow-wrap: anywhere; color: var(--n-text); font-size: .74rem; }
.teacher-surface .n-supervision-details code { color: var(--n-brand-dark); font-size: .7rem; }
.teacher-surface .n-supervision-subtitle { margin: 0 0 .55rem; color: var(--n-text-secondary); font-size: .68rem; text-transform: uppercase; }
.teacher-surface .n-supervision-subtitle:not(:first-child) { margin-top: 1rem; }
.teacher-surface .n-supervision-link-list { display: grid; gap: .4rem; }
.teacher-surface .n-supervision-link-list > a {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: .55rem;
    border: 1px solid var(--n-border-light);
    border-radius: .68rem;
    background: #fbfbfa;
    padding: .58rem .65rem;
    color: var(--n-text-secondary);
    font-size: .7rem;
    font-weight: 700;
}
.teacher-surface .n-supervision-link-list > a:hover { border-color: var(--n-brand-light); background: var(--n-brand-pale); color: var(--n-brand-dark); text-decoration: none; }
.teacher-surface .n-supervision-link-list > a i { flex: 0 0 auto; color: var(--n-brand); font-size: 1rem; }
.teacher-surface .n-supervision-link-list > a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-supervision-empty-copy { margin: 0; border: 1px dashed var(--n-border); border-radius: .68rem; padding: .8rem; color: var(--n-text-muted); font-size: .68rem; text-align: center; }
.teacher-surface .n-supervision-count { border-radius: var(--n-radius-full); background: var(--n-brand-pale); padding: .28rem .52rem; color: var(--n-brand-dark); font-size: .62rem; font-weight: 800; }
.teacher-surface .n-supervision-history { margin-top: 1rem; }
.teacher-surface .n-supervision-history .table-responsive { border: 0; border-radius: 0; }
.teacher-surface .n-supervision-history td { overflow-wrap: anywhere; font-size: .7rem; }
.teacher-surface .n-supervision-table-empty { padding: 2rem !important; color: var(--n-text-muted); text-align: center; }
.teacher-surface .n-supervision-person-card { display: flex; align-items: center; gap: .75rem; }
.teacher-surface .n-supervision-person-card > div { min-width: 0; }
.teacher-surface .n-supervision-avatar { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; flex: 0 0 auto; border-radius: 50%; background: linear-gradient(145deg, var(--n-brand-dark), var(--n-brand)); color: #fff; font-size: .72rem; font-weight: 800; }
.teacher-surface .n-supervision-person-card strong,
.teacher-surface .n-supervision-person-card a { display: block; }
.teacher-surface .n-supervision-person-card strong { font-size: .78rem; }
.teacher-surface .n-supervision-person-card a { margin-top: .12rem; font-size: .65rem; }
.teacher-surface .n-supervision-confirm-page > .container { max-width: 44rem; }
.teacher-surface .n-supervision-confirm-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    overflow: hidden;
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius-xl);
    background: #fff;
    padding: clamp(1.1rem, 3vw, 1.6rem);
    box-shadow: var(--n-shadow-lg);
}
.teacher-surface .n-supervision-confirm-icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: .85rem; background: var(--n-brand-pale); color: var(--n-brand-dark); font-size: 1.35rem; }
.teacher-surface .n-supervision-confirm-card.is-danger .n-supervision-confirm-icon { background: #fff1f2; color: #be123c; }
.teacher-surface .n-supervision-confirm-copy h1 { margin: .18rem 0 .45rem; font-size: clamp(1.4rem, 4vw, 2rem); }
.teacher-surface .n-supervision-confirm-copy > p { margin: 0; color: var(--n-text-secondary); }
.teacher-surface .n-supervision-confirm-notice { display: flex; align-items: flex-start; gap: .5rem; margin-top: .85rem !important; border: 1px solid #fecdd3; border-radius: .68rem; background: #fff1f2; padding: .65rem .7rem; color: #9f1239 !important; font-size: .65rem; line-height: 1.5; }
.teacher-surface .n-supervision-confirm-notice i { flex: 0 0 auto; margin-top: .08rem; font-size: .85rem; }
.teacher-surface .n-supervision-confirm-copy dl { display: grid; gap: .4rem; margin: 1rem 0 0; }
.teacher-surface .n-supervision-confirm-copy dl > div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: .6rem; border-top: 1px solid var(--n-border-light); padding-top: .45rem; }
.teacher-surface .n-supervision-confirm-copy dt { color: var(--n-text-muted); font-size: .62rem; }
.teacher-surface .n-supervision-confirm-copy dd { margin: 0; overflow-wrap: anywhere; font-size: .7rem; font-weight: 700; }
.teacher-surface .n-supervision-confirm-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: .55rem; border-top: 1px solid var(--n-border-light); padding-top: 1rem; }
.teacher-surface .n-supervision-confirm-actions .btn { min-height: 2.75rem; margin: 0; }

@media (max-width: 767.98px) {
    .teacher-surface .n-supervision-crud-page .n-teacher-page-header { align-items: flex-start; }
    .teacher-surface .n-supervision-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .teacher-surface .n-supervision-actions-context { grid-column: 1 / -1; width: 100%; margin: 0; border-bottom: 1px solid var(--n-border-light); }
    .teacher-surface .n-supervision-actions .btn { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; white-space: normal; }
    .teacher-surface .n-supervision-more-actions { min-width: 0; }
    .teacher-surface .n-supervision-actions-menu { position: static; width: 100%; margin-top: .45rem; box-shadow: none; }
    .teacher-surface .n-supervision-more-actions[open] { grid-column: 1 / -1; }
    .teacher-surface .n-supervision-more-actions[open] > summary { width: 100%; }
    .teacher-surface .n-supervision-detail-grid,
    .teacher-surface .n-supervision-association-grid { grid-template-columns: 1fr; }
    .teacher-surface .n-supervision-association-grid .n-association-wide { grid-column: auto; }
    .teacher-surface .n-supervision-details { grid-template-columns: 1fr; }
    .teacher-surface .n-supervision-history .table { min-width: 38rem; }
}

@media (max-width: 420px) {
    .teacher-surface .n-supervision-actions { grid-template-columns: 1fr; }
    .teacher-surface .n-supervision-confirm-card { grid-template-columns: 1fr; }
    .teacher-surface .n-supervision-confirm-actions { display: grid; grid-template-columns: 1fr; }
    .teacher-surface .n-supervision-confirm-actions .btn { width: 100%; }
    .teacher-surface .n-supervision-confirm-copy dl > div { grid-template-columns: 1fr; gap: .12rem; }
    .teacher-surface .n-supervision-form .n-form-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; flex-direction: initial; }
    .teacher-surface .n-supervision-form .n-form-actions .btn { width: 100%; min-height: 2.75rem; }
    .teacher-surface .n-multi-select-toolbar { align-items: stretch; flex-direction: column; }
    .teacher-surface .n-multi-select-count { padding-inline: .15rem; }
}

/* Family registration: one calm, trustworthy flow from review to confirmation. */
.n-registration-page {
    min-height: calc(100vh - 10rem);
    padding: 2rem 0 4rem;
}
.n-registration-container { max-width: 1080px; }
.n-registration-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(19rem,27rem);
    align-items: end;
    gap: 2rem;
    overflow: hidden;
    border: 1px solid rgba(8,95,86,.16);
    border-radius: var(--n-radius-xl);
    background:
        radial-gradient(circle at 92% -20%, rgba(248,232,181,.22), transparent 20rem),
        linear-gradient(125deg,#064e48 0%,var(--n-quran-dark) 60%,#0a7567 100%);
    padding: clamp(1.4rem,4vw,2.6rem);
    color: #fff;
    box-shadow: 0 22px 55px rgba(7,95,86,.16);
}
.n-registration-hero::after {
    position: absolute;
    right: -5rem;
    bottom: -9rem;
    width: 17rem;
    height: 17rem;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 3.5rem;
    content: "";
    pointer-events: none;
    transform: rotate(45deg);
}
.n-registration-hero > * { position: relative; z-index: 1; }
.n-registration-hero .n-eyebrow { color: #d1fae5; }
.n-registration-hero h1 { margin: .5rem 0 .65rem; color: #fff; font-size: clamp(2rem,5vw,3.5rem); letter-spacing: -.055em; line-height: 1.02; }
.n-registration-hero p { max-width: 43rem; margin: 0; color: rgba(255,255,255,.76); font-size: .82rem; line-height: 1.65; }
.n-registration-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .4rem; margin: 0; padding: 0; list-style: none; }
.n-registration-steps li { position: relative; display: grid; justify-items: center; gap: .38rem; color: rgba(255,255,255,.48); text-align: center; }
.n-registration-steps li:not(:last-child)::after { position: absolute; top: 1rem; right: calc(-50% + 1rem); left: calc(50% + 1rem); height: 1px; background: rgba(255,255,255,.17); content: ""; }
.n-registration-steps span { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; background: rgba(255,255,255,.08); font-size: .68rem; font-weight: 850; }
.n-registration-steps strong { font-size: .58rem; font-weight: 750; }
.n-registration-steps .active,
.n-registration-steps .complete { color: #fff; }
.n-registration-steps .active span { border-color: #fff; background: #fff; color: var(--n-quran-dark); box-shadow: 0 6px 18px rgba(0,0,0,.16); }
.n-registration-steps .complete span { border-color: rgba(209,250,229,.4); background: rgba(209,250,229,.16); color: #d1fae5; }
.n-registration-form { display: grid; gap: 1rem; margin-top: 1.15rem; }
.n-registration-card {
    overflow: hidden;
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius-xl);
    background: rgba(255,255,255,.98);
    box-shadow: var(--n-shadow-sm);
}
.n-registration-card-header { display: flex; align-items: center; gap: .85rem; border-bottom: 1px solid var(--n-border-light); padding: 1rem 1.15rem; }
.n-registration-card-header > div { min-width: 0; }
.n-registration-card-icon { display: grid; place-items: center; flex: 0 0 2.8rem; width: 2.8rem; height: 2.8rem; border-radius: .85rem; background: linear-gradient(145deg,var(--n-quran-pale),#fff); color: var(--n-quran-dark); font-size: 1.2rem; box-shadow: 0 0 0 1px rgba(8,127,107,.12); }
.n-registration-card h2,
.n-registration-card p { margin: 0; }
.n-registration-card h2 { margin-top: .1rem; font-size: 1rem; letter-spacing: -.025em; }
.n-registration-card-header p { margin-top: .17rem; color: var(--n-text-muted); font-size: .65rem; }
.n-registration-parent-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; padding: 1rem 1.15rem .75rem; }
.n-registration-subcard,
.n-registration-address,
.n-registration-student-card { min-width: 0; margin: 0; border: 1px solid var(--n-border-light); border-radius: 1rem; background: var(--n-surface-soft); padding: .9rem; }
.n-registration-subcard legend,
.n-registration-address legend,
.n-registration-student-card legend { width: auto; margin: 0 0 .65rem; padding: 0; color: var(--n-text); font-size: .72rem; font-weight: 850; }
.n-registration-subcard legend small { color: var(--n-text-muted); font-size: .55rem; font-weight: 650; }
.n-registration-field-grid,
.n-registration-address-grid,
.n-registration-student-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem; }
.n-registration-field { min-width: 0; }
.n-registration-field label { display: block; margin: 0 0 .3rem; color: var(--n-text-secondary); font-size: .61rem; font-weight: 800; }
.n-registration-field .form-control { width: 100%; min-height: 2.85rem; border-color: var(--n-border); border-radius: .72rem; background: #fff; color: var(--n-text); font-size: .72rem; box-shadow: none; }
.n-registration-field .form-control:focus { border-color: var(--n-quran); box-shadow: 0 0 0 3px var(--n-quran-glow); }
.n-registration-address { margin: 0 1.15rem 1.15rem; background: #fff; }
.n-registration-address-grid { grid-template-columns: 1.5fr .55fr 1fr .8fr; }
.n-registration-field-wide { min-width: 0; }
.n-registration-student-list { display: grid; gap: .75rem; padding: 1rem 1.15rem 1.15rem; }
.n-registration-student-card { background: linear-gradient(135deg,var(--n-quran-pale),#fff 45%); }
.n-registration-student-card legend { display: flex; align-items: center; gap: .55rem; }
.n-registration-student-card legend > span,
.n-registration-summary-avatar { display: grid; place-items: center; flex: 0 0 2rem; width: 2rem; height: 2rem; border-radius: .65rem; background: var(--n-quran-dark); color: #fff; font-size: .58rem; font-weight: 850; }
.n-registration-student-grid { grid-template-columns: .85fr .85fr .8fr 1.2fr; }
.n-registration-note { display: flex; align-items: flex-start; gap: .35rem; margin: .65rem 0 0 !important; color: var(--n-text-muted); font-size: .59rem; line-height: 1.5; }
.n-registration-note i { margin-top: .08rem; color: var(--n-quran); }
.n-registration-payment-field { max-width: 31rem; padding: 1rem 1.15rem; }
.n-registration-payment-note,
.n-registration-success,
.n-registration-payment-summary { display: flex; align-items: flex-start; gap: .75rem; border: 1px solid rgba(184,135,47,.2); border-radius: 1rem; background: linear-gradient(135deg,var(--n-gold-pale),#fff); padding: .85rem 1rem; }
.n-registration-payment-note { margin: 0 1.15rem 1.15rem; }
.n-registration-payment-note > i,
.n-registration-payment-summary > i { color: var(--n-gold-dark); font-size: 1.25rem; }
.n-registration-payment-note strong,
.n-registration-payment-note p,
.n-registration-payment-summary span,
.n-registration-payment-summary strong,
.n-registration-payment-summary p { display: block; margin: 0; }
.n-registration-payment-note strong,
.n-registration-payment-summary strong { font-size: .72rem; }
.n-registration-payment-note p,
.n-registration-payment-summary p { margin-top: .12rem; color: var(--n-text-secondary); font-size: .62rem; line-height: 1.5; }
.n-registration-consent { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 1rem; border: 1px solid rgba(8,127,107,.2); border-radius: var(--n-radius-xl); background: linear-gradient(135deg,var(--n-quran-pale),#fff); padding: 1rem 1.15rem; box-shadow: var(--n-shadow-sm); }
.n-registration-consent > label { display: flex; align-items: flex-start; gap: .7rem; margin: 0; cursor: pointer; }
.n-registration-consent input { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin-top: .12rem; accent-color: var(--n-quran); }
.n-registration-consent strong,
.n-registration-consent small { display: block; }
.n-registration-consent strong { color: var(--n-text); font-size: .7rem; }
.n-registration-consent small { margin-top: .17rem; color: var(--n-text-muted); font-size: .59rem; }
.n-registration-submit { display: inline-flex; align-items: center; justify-content: center; min-height: 2.85rem; gap: .35rem; border: 1px solid var(--n-quran) !important; border-radius: .75rem; background: linear-gradient(135deg,var(--n-quran),var(--n-quran-dark)) !important; padding: .65rem 1rem; color: #fff !important; font-size: .68rem; font-weight: 850; box-shadow: 0 8px 20px var(--n-quran-glow); }
.n-registration-submit:hover { transform: translateY(-1px); box-shadow: 0 11px 25px rgba(8,127,107,.2); }
.n-registration-submit:disabled { cursor: not-allowed; opacity: .46; transform: none; box-shadow: none; }
.n-registration-hero-confirm { margin-bottom: 1rem; }
.n-registration-success { border-color: rgba(22,163,74,.18); background: #f0fdf4; color: #166534; }
.n-registration-success > i { font-size: 1.35rem; }
.n-registration-success strong,
.n-registration-success p { display: block; margin: 0; }
.n-registration-success strong { font-size: .72rem; }
.n-registration-success p { margin-top: .12rem; color: #3f694b; font-size: .61rem; }
.n-registration-summary { margin-top: 0; }
.n-registration-summary-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; padding: 1rem 1.15rem 1.15rem; }
.n-registration-summary-grid article { display: grid; gap: .18rem; min-width: 0; border: 1px solid var(--n-border-light); border-radius: .85rem; background: var(--n-surface-soft); padding: .8rem; }
.n-registration-summary-grid article > span,
.n-registration-payment-summary span { color: var(--n-text-muted); font-size: .55rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.n-registration-summary-grid article > strong { overflow-wrap: anywhere; font-size: .72rem; }
.n-registration-summary-grid article > a,
.n-registration-summary-grid article > small { overflow-wrap: anywhere; color: var(--n-text-secondary); font-size: .62rem; }
.n-registration-summary-address { grid-column: 1 / -1; }
.n-registration-summary-students { display: grid; gap: .55rem; padding: 1rem 1.15rem 1.15rem; }
.n-registration-summary-students article { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .7rem; border: 1px solid var(--n-border-light); border-radius: .85rem; padding: .72rem .8rem; }
.n-registration-summary-students strong,
.n-registration-summary-students small { display: block; }
.n-registration-summary-students strong { font-size: .7rem; }
.n-registration-summary-students small { margin-top: .12rem; color: var(--n-text-muted); font-size: .58rem; }
.n-registration-choice-badge { display: inline-flex; align-items: center; gap: .25rem; min-height: 1.8rem; border-radius: var(--n-radius-full); padding: .3rem .55rem; font-size: .57rem; font-weight: 800; }
.n-registration-choice-badge.is-accepted { background: #dcfce7; color: #166534; }
.n-registration-choice-badge.is-stopped { background: #fee2e2; color: #991b1b; }
.n-registration-payment-summary { border-color: rgba(8,127,107,.17); background: linear-gradient(135deg,var(--n-quran-pale),#fff); }
.n-registration-payment-summary > i { color: var(--n-quran-dark); }
.n-registration-confirm-actions { display: flex; justify-content: flex-end; gap: .65rem; padding-top: .15rem; }
.n-registration-confirm-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.85rem; gap: .35rem; margin: 0; border-radius: .75rem; padding-inline: 1rem; font-size: .68rem; font-weight: 800; }
.n-registration-error-page { display: grid; align-items: center; }
.n-registration-error { max-width: 42rem; margin: 4vh auto; border: 1px solid var(--n-border); border-radius: var(--n-radius-xl); background: rgba(255,255,255,.98); padding: clamp(1.4rem,5vw,3rem); text-align: center; box-shadow: var(--n-shadow-lg); }
.n-registration-error-icon { display: grid; place-items: center; width: 4.25rem; height: 4.25rem; margin: 0 auto 1rem; border: 1px solid rgba(8,127,107,.16); border-radius: 1.25rem; background: linear-gradient(145deg,var(--n-quran-pale),#fff); color: var(--n-quran-dark); font-size: 1.8rem; box-shadow: var(--n-shadow-sm); }
.n-registration-error h1 { margin: .45rem 0 .7rem; font-size: clamp(1.65rem,5vw,2.45rem); letter-spacing: -.045em; }
.n-registration-error > p { max-width: 34rem; margin: 0 auto; color: var(--n-text-secondary); font-size: .75rem; line-height: 1.7; }
.n-registration-error-actions { display: flex; justify-content: center; gap: .6rem; margin-top: 1.35rem; }
.n-registration-error-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.85rem; gap: .35rem; margin: 0; border-radius: .75rem; padding-inline: 1rem; font-size: .68rem; font-weight: 800; }

@media (max-width: 991.98px) {
    .n-registration-hero { grid-template-columns: minmax(0,1fr); align-items: start; }
    .n-registration-steps { max-width: 30rem; }
    .n-registration-parent-grid { grid-template-columns: minmax(0,1fr); }
    .n-registration-address-grid,
    .n-registration-student-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 767.98px) {
    .n-registration-page { padding: .9rem 0 6rem; }
    .n-registration-container { padding-inline: .75rem; }
    .n-registration-hero { gap: 1.3rem; border-radius: 1.1rem; padding: 1.35rem; }
    .n-registration-parent-grid { grid-template-columns: minmax(0,1fr); }
    .n-registration-card { border-radius: 1rem; }
    .n-registration-consent { grid-template-columns: minmax(0,1fr); }
    .n-registration-submit { width: 100%; }
    .n-registration-summary-students article { grid-template-columns: auto minmax(0,1fr); }
    .n-registration-choice-badge { grid-column: 1 / -1; justify-self: start; }
    .n-registration-confirm-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .n-registration-confirm-actions .btn { width: 100%; }
}
@media (max-width: 575.98px) {
    .n-registration-steps strong { display: none; }
    .n-registration-steps li:not(:last-child)::after { right: calc(-50% + .8rem); left: calc(50% + .8rem); }
    .n-registration-card-header { align-items: flex-start; padding: .9rem; }
    .n-registration-card-header p { line-height: 1.5; }
    .n-registration-parent-grid,
    .n-registration-student-list,
    .n-registration-summary-grid,
    .n-registration-summary-students { padding: .8rem .9rem .9rem; }
    .n-registration-address { margin: 0 .9rem .9rem; }
    .n-registration-field-grid,
    .n-registration-address-grid,
    .n-registration-student-grid,
    .n-registration-summary-grid { grid-template-columns: minmax(0,1fr); }
    .n-registration-summary-address { grid-column: auto; }
    .n-registration-payment-field { padding: .9rem; }
    .n-registration-payment-note { margin: 0 .9rem .9rem; }
    .n-registration-consent { padding: .9rem; }
    .n-registration-confirm-actions { grid-template-columns: minmax(0,1fr); }
    .n-registration-error-actions { display: grid; grid-template-columns: minmax(0,1fr); }
    .n-registration-error-actions .btn { width: 100%; }
}

/* Public new-family registration: self-hosted, focused and accessible. */
.n-public-header { position: relative; z-index: 20; border-bottom: 1px solid var(--n-border-light); background: rgba(255,255,255,.96); box-shadow: 0 5px 24px rgba(15,23,42,.045); }
.n-public-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 5rem; gap: 1rem; }
.n-public-brand { display: inline-flex; align-items: center; min-width: 0; gap: .7rem; color: var(--n-text); text-decoration: none !important; }
.n-public-brand img { flex: 0 0 auto; width: 2.7rem; height: 3.4rem; object-fit: contain; }
.n-public-brand span,
.n-public-brand strong,
.n-public-brand small { display: block; min-width: 0; }
.n-public-brand strong { font-size: .83rem; letter-spacing: -.015em; }
.n-public-brand small { margin-top: .05rem; color: var(--n-text-muted); font-size: .57rem; }
.n-public-login { display: inline-flex; align-items: center; justify-content: center; min-height: 2.65rem; gap: .35rem; border: 1px solid var(--n-border); border-radius: var(--n-radius-full); background: #fff; padding: .55rem .85rem; color: var(--n-quran-dark); font-size: .65rem; font-weight: 800; text-decoration: none !important; transition: border-color .2s ease,box-shadow .2s ease,transform .2s ease; }
.n-public-login:hover,
.n-public-login:focus-visible { border-color: var(--n-quran); color: var(--n-quran-dark); box-shadow: 0 0 0 3px var(--n-quran-glow); transform: translateY(-1px); }
.n-public-footer { border-top: 1px solid var(--n-border-light); background: #fff; color: var(--n-text-muted); }
.n-public-footer .container { display: flex; align-items: center; justify-content: space-between; min-height: 5rem; gap: 1rem; font-size: .62rem; }
.n-public-footer a { color: var(--n-quran-dark); font-weight: 750; }
.n-new-registration-page { background: radial-gradient(circle at 100% 0,rgba(31,183,166,.07),transparent 28rem),var(--n-page); }
.n-new-registration-page .n-registration-container { max-width: 1160px; }
.n-new-registration-page .n-registration-field label { font-size: .67rem; }
.n-new-registration-page .n-registration-field .form-control { min-height: 2.9rem; font-size: .72rem; }
.n-new-registration-page .n-registration-consent > label { min-height: 2.5rem; }
.n-new-registration-state { max-width: 45rem; margin-block: 1.15rem 0; }
.n-new-registration-errors { display: flex; align-items: flex-start; gap: .75rem; margin-top: 1rem; border: 1px solid rgba(220,38,38,.22); border-radius: 1rem; background: #fff7f7; padding: .9rem 1rem; color: #991b1b; box-shadow: var(--n-shadow-sm); outline: none; }
.n-new-registration-errors > i { margin-top: .03rem; font-size: 1.25rem; }
.n-new-registration-errors strong { display: block; font-size: .72rem; }
.n-new-registration-errors ul { display: grid; gap: .18rem; margin: .35rem 0 0; padding-left: 1rem; font-size: .63rem; line-height: 1.45; }
.n-new-registration-card-heading { display: grid; grid-template-columns: auto minmax(0,1fr) minmax(8rem,10rem); }
.n-new-registration-count { justify-self: end; width: 100%; }
.n-new-registration-student-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .7rem; }
.n-new-registration-health { overflow: hidden; margin-top: .8rem; border: 1px solid rgba(8,127,107,.14); border-radius: .85rem; background: rgba(255,255,255,.82); }
.n-new-registration-health summary { display: flex; align-items: center; justify-content: space-between; min-height: 3rem; gap: .75rem; cursor: pointer; padding: .65rem .8rem; color: var(--n-quran-dark); font-size: .66rem; font-weight: 800; list-style: none; }
.n-new-registration-health summary::-webkit-details-marker { display: none; }
.n-new-registration-health summary::after { flex: 0 0 auto; font-family: remixicon; font-size: 1rem; content: "\ea4e"; transition: transform .2s ease; }
.n-new-registration-health[open] summary::after { transform: rotate(180deg); }
.n-new-registration-health summary span { display: inline-flex; align-items: center; gap: .35rem; }
.n-new-registration-health summary small { color: var(--n-text-muted); font-size: .56rem; font-weight: 650; }
.n-new-registration-health-body { display: grid; gap: .9rem; border-top: 1px solid var(--n-border-light); padding: .85rem; }
.n-new-registration-check-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .45rem; }
.n-new-registration-check { display: flex; align-items: center; min-width: 0; min-height: 2.6rem; gap: .5rem; margin: 0; border: 1px solid var(--n-border-light); border-radius: .7rem; background: var(--n-surface-soft); padding: .5rem .6rem; color: var(--n-text-secondary); font-size: .61rem; font-weight: 700; cursor: pointer; }
.n-new-registration-check input { flex: 0 0 auto; width: 1.05rem; height: 1.05rem; accent-color: var(--n-quran); }
.n-new-registration-health-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
.n-new-registration-final-grid { display: grid; grid-template-columns: minmax(14rem,.7fr) minmax(0,1.3fr); gap: .8rem; padding: 1rem 1.15rem 1.15rem; }
.n-new-registration-final-grid textarea.form-control { min-height: 6rem; resize: vertical; }
.n-new-registration-confirmation { display: grid; justify-items: center; max-width: 47rem; gap: .6rem; margin: 1.15rem auto 0; padding: clamp(1.5rem,5vw,3rem); text-align: center; }
.n-new-registration-confirmation h2 { font-size: clamp(1.5rem,4vw,2.35rem); }
.n-new-registration-confirmation > p { max-width: 37rem; color: var(--n-text-secondary); font-size: .76rem; line-height: 1.7; }
.n-new-registration-success-icon { display: grid; place-items: center; width: 4.4rem; height: 4.4rem; margin-bottom: .25rem; border-radius: 1.35rem; background: linear-gradient(145deg,#dcfce7,#f0fdf4); color: #15803d; font-size: 2rem; box-shadow: 0 0 0 1px rgba(21,128,61,.12),var(--n-shadow-sm); }
.n-new-registration-confirmation-note { display: flex; align-items: center; max-width: 35rem; gap: .6rem; margin: .35rem 0 .7rem; border: 1px solid rgba(8,127,107,.15); border-radius: .85rem; background: var(--n-quran-pale); padding: .75rem .9rem; text-align: left; }
.n-new-registration-confirmation-note > i { color: var(--n-quran-dark); font-size: 1.2rem; }
.n-new-registration-confirmation-note strong,
.n-new-registration-confirmation-note small { display: block; }
.n-new-registration-confirmation-note strong { font-size: .67rem; }
.n-new-registration-confirmation-note small { margin-top: .12rem; color: var(--n-text-muted); font-size: .58rem; }

@media (max-width: 991.98px) {
    .n-new-registration-check-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .n-new-registration-final-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 767.98px) {
    .n-new-registration-card-heading { grid-template-columns: auto minmax(0,1fr); }
    .n-new-registration-count { grid-column: 1 / -1; justify-self: stretch; max-width: none; }
    .n-new-registration-student-grid,
    .n-new-registration-health-fields { grid-template-columns: minmax(0,1fr); }
    .n-new-registration-health summary { align-items: flex-start; }
    .n-new-registration-final-grid { padding: .9rem; }
}
@media (max-width: 575.98px) {
    .n-public-header-inner { min-height: 4.25rem; padding-inline: .75rem; }
    .n-public-brand img { width: 2.2rem; height: 2.8rem; }
    .n-public-brand small { display: none; }
    .n-public-login { width: 2.65rem; padding: .5rem; }
    .n-public-login span { position: absolute; overflow: hidden; width: 1px; height: 1px; clip: rect(0 0 0 0); white-space: nowrap; }
    .n-public-footer .container { align-items: flex-start; flex-direction: column; justify-content: center; padding-inline: .9rem; }
    .n-new-registration-check-grid { grid-template-columns: minmax(0,1fr); }
    .n-new-registration-health summary small { display: none; }
    .n-new-registration-errors { padding: .8rem; }
}

/* Session cockpit */
.teacher-session-page { padding: 1rem 0 5rem; }
.teacher-session-page > .container-fluid { max-width: 1520px; padding-inline: 1rem; }
.teacher-session-hero { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .6rem 0 1rem; }
.teacher-session-hero h1 { margin: .15rem 0 0; font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -.035em; }
.teacher-session-layout { display: grid; grid-template-columns: minmax(15.5rem, 20rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
.teacher-session-roster { position: sticky; top: 5.7rem; max-height: calc(100vh - 7rem); overflow: hidden; border: 1px solid var(--n-border); border-radius: var(--n-radius-xl); background: #fff; box-shadow: var(--n-shadow-md); }
.teacher-session-roster-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; border-bottom: 1px solid var(--n-border-light); padding: .85rem 1rem; }
.teacher-session-roster-header strong { font-size: .82rem; }
.teacher-session-roster-list { max-height: calc(100vh - 11rem); overflow-y: auto; padding: .45rem; }
.teacher-session-roster-list .nav { display: block; border: 0; background: transparent; padding: 0; }
.teacher-session-roster-list .nav-item + .nav-item { margin-top: .18rem; }
.teacher-session-roster-list .nav-link { display: flex; align-items: center; gap: .65rem; min-height: 2.65rem; border: 0; border-radius: .68rem; padding: .55rem .7rem; color: var(--n-text-secondary); font-size: .76rem; font-weight: 650; }
.teacher-session-roster-list .nav-link:hover { background: var(--n-brand-pale); color: var(--n-brand-dark); }
.teacher-session-roster-list .nav-link.active { background: var(--n-brand-dark); color: #fff; box-shadow: var(--n-shadow-brand); }
.teacher-session-roster-list .nav-link.active i { color: #a5f3fc; }
.teacher-session-content { min-width: 0; border: 1px solid var(--n-border); border-radius: var(--n-radius-xl); background: rgba(255,255,255,.94); box-shadow: var(--n-shadow-md); }
.teacher-session-content > #ni-content { min-height: 28rem; padding: 1rem; }
.teacher-session-content .tab-pane > .row:first-child h3 { font-size: 1.35rem; }
.teacher-session-content .table-responsive { max-width: 100%; overflow-x: auto; }
.teacher-session-roster-header > span:first-child { display: grid; min-width: 0; }
.teacher-session-roster-header small { overflow: hidden; color: var(--n-text-muted); font-size: .64rem; text-overflow: ellipsis; white-space: nowrap; }
.n-roster-avatar { display: grid; place-items: center; flex: 0 0 2rem; width: 2rem; height: 2rem; border-radius: .62rem; background: var(--n-brand-pale); color: var(--n-brand-dark); font-size: .62rem; font-weight: 800; }
.n-roster-avatar-group { background: #f0fdf4; color: #15803d; font-size: .9rem; }
.n-roster-copy { display: grid; min-width: 0; flex: 1 1 auto; }
.n-roster-copy strong,
.n-roster-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-roster-copy small { color: inherit; font-size: .6rem; font-weight: 500; opacity: .72; }
.n-roster-status { flex: 0 0 .5rem; width: .5rem; height: .5rem; border-radius: 999px; background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.12); }
.n-roster-status.complete { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.13); }

.n-session-student-header,
.n-session-group-header { display: flex; align-items: center; gap: .85rem; border-bottom: 1px solid var(--n-border-light); padding: .25rem .25rem 1rem; }
.n-session-student-header h2,
.n-session-group-header h2 { margin: .08rem 0 .15rem; font-size: clamp(1.25rem, 3vw, 1.65rem); letter-spacing: -.025em; }
.n-session-student-header p,
.n-session-group-header p { margin: 0; color: var(--n-text-muted); font-size: .72rem; }
.n-session-student-avatar,
.n-session-group-icon { display: grid; place-items: center; flex: 0 0 3rem; width: 3rem; height: 3rem; border-radius: .9rem; background: linear-gradient(145deg, var(--n-brand-dark), var(--n-brand)); color: #fff; font-weight: 850; box-shadow: var(--n-shadow-brand); }
.n-session-group-icon { background: linear-gradient(145deg, #115e59, #0f766e); font-size: 1.25rem; }
.n-session-next-student { display: flex; align-items: center; gap: .5rem; margin-left: auto; text-align: left; }
.n-session-next-student span { display: grid; font-weight: 750; line-height: 1.15; }
.n-session-next-student small { font-size: .55rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }

.n-session-workspace-tabs { display: flex; flex-wrap: nowrap; gap: .35rem; overflow-x: auto; margin: .75rem 0 0; border: 0; padding: .28rem; background: #f7f8fa; scrollbar-width: thin; }
.n-session-workspace-tabs .nav-link { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 2.75rem; margin: 0; border: 1px solid transparent; border-radius: .62rem; padding: .5rem .7rem; color: var(--n-text-secondary); font-size: .7rem; font-weight: 750; white-space: nowrap; }
.n-session-workspace-tabs .nav-link:hover { border-color: var(--n-border); background: #fff; color: var(--n-brand-dark); }
.n-session-workspace-tabs .nav-link.active { border-color: var(--n-brand-dark); background: var(--n-brand-dark); color: #fff; box-shadow: 0 5px 14px rgba(7,89,108,.18); }
.n-session-workspace-tabs .n-tab-count { display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; border-radius: 999px; padding: 0 .25rem; background: rgba(255,255,255,.16); font-size: .55rem; }
.n-session-workspace { min-width: 0; border-top: 1px solid var(--n-border-light); padding-top: .85rem; }
.n-session-panel { overflow: visible; margin: 0 !important; border: 1px solid var(--n-border) !important; border-radius: .9rem !important; background: #fff; box-shadow: var(--n-shadow-sm) !important; }
.n-session-panel-body { max-width: 100%; overflow-x: auto; }
.n-session-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--n-border-light); padding: .8rem 1rem; }
.n-session-panel-header h3 { margin: 0; font-size: .92rem; }
.n-session-panel-header p { margin: .15rem 0 0; color: var(--n-text-muted); font-size: .66rem; }
.n-session-panel-header .btn { flex: 0 0 auto; margin: 0; }
.n-session-history-filters { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: .45rem; border-bottom: 1px solid var(--n-border-light); padding: .6rem .75rem; background: #fafaf9; }
.n-history-filter-title { display: inline-flex; align-items: center; gap: .3rem; margin-right: .1rem; color: var(--n-text-muted); font-size: .61rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.n-session-history-filters label { display: inline-flex; align-items: center; gap: .4rem; margin: 0; border: 1px solid var(--n-border); border-radius: 999px; padding: .32rem .58rem; background: #fff; color: var(--n-text-secondary); cursor: pointer; font-size: .64rem; font-weight: 700; }
.n-session-history-filters input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--n-brand); }
.n-quran-history-loader-slot { display: inline-flex; align-items: center; min-width: 0; gap: .45rem; margin-left: auto; }
.n-quran-history-more { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 2rem !important; margin: 0 !important; border-radius: var(--n-radius-full) !important; padding: .32rem .65rem !important; font-size: .62rem !important; font-weight: 750; white-space: nowrap; }
.n-quran-history-status { color: var(--n-text-muted); font-size: .57rem; white-space: nowrap; }
.n-quran-period-empty { display: flex; align-items: center; justify-content: center; gap: .8rem; min-height: 8rem; margin: .75rem; border: 1px dashed rgba(8,145,178,.3); border-radius: .8rem; background: linear-gradient(135deg, rgba(236,254,255,.78), rgba(255,255,255,.96)); padding: 1.2rem; color: var(--n-text-secondary); text-align: left; }
.n-quran-period-empty[hidden] { display: none !important; }
.n-quran-period-empty-icon { display: grid; place-items: center; flex: 0 0 2.8rem; width: 2.8rem; height: 2.8rem; border-radius: .8rem; background: var(--n-brand-dark); color: #fff; font-size: 1.25rem; box-shadow: var(--n-shadow-brand); }
.n-quran-period-empty strong,
.n-quran-period-empty span { display: block; }
.n-quran-period-empty strong { color: var(--n-text); font-size: .8rem; }
.n-quran-period-empty div > span { margin-top: .15rem; color: var(--n-text-muted); font-size: .66rem; }
.n-quran-entry-row.is-kv-deleting,
.n-quran-entry-detail.is-kv-deleting { cursor: wait; opacity: .55; pointer-events: none; }
.n-session-table-wrap { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.n-session-data-table { min-width: 52rem; margin: 0 !important; border: 0 !important; font-size: .7rem; }
.n-session-data-table thead th { border: 0 !important; border-bottom: 1px solid var(--n-border) !important; background: #f7f7f5 !important; color: var(--n-text-muted); font-size: .56rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.n-session-data-table td { border-color: var(--n-border-light) !important; vertical-align: middle; }
.n-session-data-table tbody > tr:not(.d-none):hover { background: #fbfefd; }
.n-session-data-table .form-control { min-height: 2.3rem; border-color: var(--n-border); border-radius: .55rem; background: #fff; font-size: .68rem; }
.n-session-data-table textarea.form-control { min-height: 4.5rem; resize: vertical; }
.n-session-data-table tfoot td { border: 0 !important; background: #fff; padding: .7rem !important; }
.n-session-data-table tfoot .btn { width: auto !important; max-width: none; min-height: 2.55rem; margin: .2rem !important; border-radius: .58rem; padding: .5rem .8rem; font-size: .68rem; }
.n-session-data-table tfoot .col-12.d-flex { flex-wrap: wrap; padding-left: .25rem !important; }
.n-collective-tools { display: grid; grid-template-columns: minmax(13rem, 1fr) repeat(2, minmax(8rem, .42fr)) auto; align-items: end; gap: .65rem; border-bottom: 1px solid var(--n-border-light); background: #fbfbfa; padding: .75rem 1rem; }
.n-collective-search { position: relative; min-width: 0; }
.n-collective-search > i { position: absolute; top: 50%; left: .72rem; z-index: 1; color: var(--n-text-muted); transform: translateY(-50%); }
.n-collective-search .form-control { padding-left: 2.15rem; }
.n-collective-select { display: grid; min-width: 0; gap: .18rem; margin: 0; }
.n-collective-select > span { color: var(--n-text-muted); font-size: .58rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.n-collective-tools .form-control { width: 100%; min-height: 2.45rem; margin: 0; border-color: var(--n-border); border-radius: .62rem; background: #fff; font-size: .68rem; }
.n-collective-result-count { align-self: center; min-width: 4.6rem; border-radius: var(--n-radius-full); background: var(--n-brand-pale); padding: .36rem .55rem; color: var(--n-brand-dark); font-size: .62rem; font-weight: 800; text-align: center; white-space: nowrap; }
.n-collective-footer { display: flex; justify-content: center; border-top: 1px solid var(--n-border-light); padding: .7rem 1rem; }
.n-collective-footer .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.45rem; gap: .35rem; margin: 0; }
.n-collective-filtered-out { display: none !important; }
.n-attendance-filtered-cell { align-items: center; flex-wrap: wrap; gap: .35rem; padding: .45rem .65rem !important; }
.n-attendance-filtered-cell:not(.d-none) { display: flex !important; }
.n-attendance-history-result { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .3rem; border: 1px solid var(--n-border-light); border-radius: var(--n-radius-full); background: #fff; padding: .28rem .5rem; color: var(--n-text-secondary); }
.n-attendance-history-result strong { border-radius: var(--n-radius-full); padding: .15rem .38rem; font-size: .58rem; }
.n-attendance-history-result .is-present { background: var(--n-success-pale); color: var(--n-success); }
.n-attendance-history-result .is-late { background: var(--n-warning-pale); color: var(--n-warning); }
.n-attendance-history-result .is-absent { background: var(--n-danger-pale); color: var(--n-danger); }
.n-attendance-history-result em { color: var(--n-text-muted); font-size: .58rem; font-style: normal; font-weight: 750; }
.n-attendance-editor { width: 100%; max-height: min(68vh, 46rem); overflow: auto; border-top: 1px solid var(--n-border-light); padding: 0 !important; scrollbar-gutter: stable; }
.n-attendance-editor .n-attendance-grid-header { grid-template-columns: minmax(12rem, 1fr) repeat(3, 5.8rem); }
.n-attendance-session-controls { display: grid; grid-template-columns: auto; min-width: 17.4rem; }
.n-attendance-editor .n-attendance-row { grid-template-columns: minmax(12rem, 1fr) 17.4rem; }
.n-attendance-justification { display: flex; justify-content: flex-end; padding: 0 .55rem .5rem; }
.n-attendance-justification label { display: inline-flex; align-items: center; gap: .35rem; margin: 0; border: 1px solid var(--n-border); border-radius: var(--n-radius-full); background: #fff; padding: .28rem .5rem; color: var(--n-text-secondary); font-size: .6rem; font-weight: 750; cursor: pointer; }
.n-attendance-justification input { width: .9rem; height: .9rem; margin: 0; accent-color: var(--n-brand-dark); }
.n-attendance-justification span { display: inline-flex; align-items: center; gap: .25rem; }
.n-quran-session-table { min-width: 0; table-layout: fixed; }
/* The notation preset dropdowns live inside the Quran table. Both wrappers
   must let them escape; overflow-x:auto implicitly computes overflow-y:auto
   and clipped the menu even though .n-quran-table-wrap said visible. */
.teacher-session-content .n-session-panel-body.n-quran-panel-body,
.teacher-session-content .n-quran-table-wrap { overflow: visible; }
.n-quran-session-table .n-quran-entry-row { width: 100%; }
.n-quran-session-table .n-quran-entry-date { flex: 0 0 9rem; max-width: 9rem; }
.n-quran-session-table .n-quran-entry-task { flex: 1 1 auto; max-width: none; min-width: 0; }
.n-quran-task-fields { align-items: center; gap: .35rem; min-width: 0; overflow: visible; }
.n-quran-task-fields > .form-control,
.n-quran-task-fields > .bootstrap-select { min-width: 5.25rem; margin: 0 !important; }
.n-quran-task-fields > .form-control:first-child,
.n-quran-task-fields > .bootstrap-select:first-child { min-width: 7.5rem; }
.n-quran-task-fields > .d-flex { flex: 0 0 auto; }
.n-quran-entry-detail { width: 100%; }
.n-quran-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; width: 100%; padding: .8rem; }
.n-quran-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.8rem; margin: 0 !important; border-radius: .7rem; font-size: .82rem; font-weight: 750; }
.n-quran-program-toggle { border: 1px solid var(--n-brand) !important; background: #fff !important; color: var(--n-brand-dark) !important; box-shadow: none !important; }
.n-quran-program-toggle:hover,
.n-quran-program-toggle:focus,
.n-quran-program-toggle[aria-expanded="true"] { border-color: var(--n-brand) !important; background: var(--n-brand-pale) !important; color: var(--n-brand-dark) !important; }
.n-quran-program { width: 100%; padding: 0 .8rem .9rem; }
.n-quran-program-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; width: 100%; }
.n-quran-program-card { min-width: 0; overflow: visible; border: 1px solid var(--n-border); border-radius: .85rem; background: #fff; box-shadow: 0 8px 24px rgba(15, 45, 55, .06); }
.n-quran-program-card:only-child { grid-column: 1 / -1; width: min(100%, 48rem); margin-inline: auto; }
.n-quran-program-card > .d-flex { display: block !important; width: 100%; }
.n-quran-program-fields { margin: 0; border: 0; border-radius: 0; }
.n-session-panel .collapse .n-quran-program-fields { overflow: visible !important; }
.n-quran-program-fields .list-group-item { display: grid !important; grid-template-columns: minmax(7rem, .7fr) minmax(0, 1.3fr); gap: .75rem; align-items: center; min-height: 3.5rem; padding: .65rem .85rem; border-width: 0 0 1px; color: var(--n-text); font-size: .78rem; }
.n-quran-program-fields .list-group-item > div:first-child { color: var(--n-text-muted); font-size: .7rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.n-quran-program-fields .list-group-item > div:not(:first-child),
.n-quran-program-fields .list-group-item > div:not(:first-child) > .d-flex { min-width: 0; width: 100%; }
.n-quran-program-fields .form-control,
.n-quran-program-fields .bootstrap-select { width: 100% !important; min-width: 0; margin: 0 !important; }
.n-quran-program-fields .n-quran-program-schedule { grid-template-columns: minmax(7rem, .7fr) minmax(12rem, 1.3fr) auto auto; }
.n-quran-program-fields .n-quran-program-schedule .n-quran-vacancy-label { color: var(--n-text-muted); font-size: .7rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.n-quran-program-fields .n-quran-program-schedule > div:last-child { display: flex; align-items: center; justify-content: center; width: auto; }
.n-quran-dayoff-grid { display: grid; grid-template-columns: repeat(7, minmax(2.2rem, 1fr)); gap: .3rem; }
.n-quran-dayoff-select,
.n-quran-dayoff-select[hidden] { display: none !important; }
.n-quran-dayoff-grid label { margin: 0; cursor: pointer; }
.n-quran-dayoff-grid input { position: absolute; opacity: 0; pointer-events: none; }
.n-quran-dayoff-grid span { display: grid; place-items: center; min-height: 2.25rem; border: 1px solid var(--n-border); border-radius: .55rem; background: #fff; color: var(--n-text-secondary); font-size: .65rem; font-weight: 750; }
.n-quran-dayoff-grid input:checked + span { border-color: var(--n-brand); background: var(--n-brand-pale); color: var(--n-brand-dark); box-shadow: inset 0 0 0 1px var(--n-brand); }
.n-quran-dayoff-grid input:focus-visible + span { outline: 3px solid var(--n-brand-glow); outline-offset: 2px; }
.n-quran-program-fields .n-quran-program-heading { display: flex !important; grid-template-columns: none; gap: .7rem; min-height: 4.5rem; background: linear-gradient(135deg, var(--n-brand-pale), #fff); }
.n-quran-program-heading strong,
.n-quran-program-heading small { display: block; }
.n-quran-program-heading strong { color: var(--n-brand-dark); font-size: .96rem; }
.n-quran-program-heading small { margin-top: .15rem; color: var(--n-text-muted); font-size: .69rem; font-weight: 500; }
.n-quran-program-icon { display: grid; flex: 0 0 2.3rem; width: 2.3rem; height: 2.3rem; place-items: center; border-radius: .65rem; background: var(--n-brand); color: #fff; font-size: 1.05rem; }
.n-quran-generate { display: flex; align-items: center; justify-content: center; gap: .45rem; width: calc(100% - 1.4rem); min-height: 2.7rem; margin: .7rem !important; border-radius: .65rem; font-size: .77rem; font-weight: 800; }
.n-quran-assessment { gap: .45rem; border-radius: .7rem; background: #fff; padding: .65rem !important; }
.n-session-panel .collapse > .d-flex.n-quran-assessment {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: none;
    gap: .35rem;
}
.n-quran-section-heading { display: flex !important; align-items: center; gap: .5rem; width: 100% !important; min-height: 2.55rem; margin: 0 !important; border: 0 !important; border-radius: .6rem !important; background: #f3f7f8 !important; padding: .55rem .75rem !important; color: var(--n-brand-dark) !important; font-size: .72rem; font-weight: 800; text-align: left; }
.n-quran-section-heading:hover { background: var(--n-brand-pale) !important; }
.n-quran-assessment > [id$="_note"] { width: 100%; padding: 0 !important; }
.n-quran-assessment > [id$="_note"] > .p-1 { padding: .2rem !important; }
.n-notation-row { display: grid !important; grid-template-columns: minmax(8.5rem, 10rem) minmax(0, 1fr); align-items: center; gap: .45rem; width: 100%; }
.n-notation-label,
.n-notation-inputs,
.n-notation-presets { float: none !important; width: auto; max-width: none; margin: 0 !important; padding: 0 !important; }
.n-notation-label { grid-column: 1; }
.n-notation-label > .d-flex { display: grid !important; grid-template-columns: minmax(0, 1fr) 2.55rem; gap: .35rem; width: 100%; padding: 0; }
.n-notation-label .badge-info { display: flex; align-items: center; justify-content: center; width: 100% !important; min-width: 0; max-width: none; border-radius: .55rem; padding: .55rem .65rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-notation-expand { display: grid !important; position: static !important; place-items: center; width: 2.55rem !important; min-width: 2.55rem !important; padding: 0 !important; border: 0; border-radius: .55rem !important; color: #fff !important; font-size: 1.25rem; font-weight: 850; line-height: 1; }
.n-notation-expand > span { display: block; transform: translateY(-.04em); }
.n-notation-inputs { grid-column: 2; display: grid !important; grid-template-columns: minmax(4.75rem, 7rem) minmax(8rem, 1fr) 2.6rem; gap: .4rem; position: static !important; }
.n-notation-inputs .form-control { width: 100% !important; max-width: none; margin: 0 !important; }
.n-notation-clear { display: grid; place-items: center; }
.n-notation-presets { position: relative; grid-column: 2; display: grid !important; grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: .35rem; padding-left: 0 !important; }
.n-notation-presets > .btn-group { position: static; display: flex; flex-wrap: wrap; width: 100%; min-width: 0; margin: .18rem 0 !important; }
.n-notation-level-toggle { display: flex; flex: 1 1 auto; align-items: center; justify-content: space-between; width: 100%; min-width: 0; text-align: left; }
.n-notation-presets .dropdown-menu {
    position: static !important;
    width: 100%;
    min-width: 0;
    max-width: none;
    max-height: min(50vh, 24rem);
    max-height: min(50dvh, 24rem);
    flex: 0 0 100%;
    margin: .35rem 0 0 !important;
    overflow-x: hidden;
    overflow-y: auto;
    transform: none !important;
}
.n-notation-presets .dropdown-item { width: 100%; overflow-wrap: anywhere; white-space: normal; line-height: 1.45; }
.n-session-panel .collapse > .d-flex.n-report-session-detail { display: flex !important; flex-direction: column !important; width: 100% !important; max-width: none; gap: .85rem; padding: .85rem !important; }
.n-report-session-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--n-border-light); border-radius: .72rem; }
.n-report-session-table { min-width: 44rem; margin: 0 !important; border: 0 !important; table-layout: auto; }
.n-report-session-table th,
.n-report-session-table td { width: auto !important; height: auto; padding: .55rem .65rem !important; border-color: var(--n-border-light) !important; vertical-align: middle; }
.n-report-session-table th[rowspan] { width: 8rem !important; background: var(--n-brand-pale); color: var(--n-brand-dark); text-align: left !important; }
.n-report-session-table th[rowspan] h4 { margin: 0; font-size: .72rem; font-weight: 850; }
.n-report-session-table th:not([rowspan]) { width: 9.5rem !important; background: #fafaf9; color: var(--n-text-secondary); font-size: .65rem; }
.n-report-session-table td { color: var(--n-text-secondary); font-size: .65rem; }
.n-report-session-table .badge { display: inline-flex; margin: .18rem !important; padding: .35rem .48rem !important; font-size: .55rem; }
.n-report-session-comment { width: 100%; border: 1px solid var(--n-border-light); border-radius: .72rem; background: #fafcfb; padding: .75rem; }
.n-report-session-comment label { display: flex; align-items: center; gap: .4rem; margin: 0 0 .45rem; color: var(--n-text); font-size: .7rem; font-weight: 800; }
.n-report-session-comment label i { color: var(--n-brand); font-size: .9rem; }
.n-report-session-comment textarea { width: 100%; min-height: 6rem !important; margin: 0 !important; resize: vertical; }
.n-session-panel .collapse > .d-flex.n-quran-comment-section,
.n-session-panel .collapse > .d-flex.n-quran-steps-section { display: flex !important; flex-direction: column !important; width: 100% !important; max-width: none; gap: .35rem; padding: .5rem !important; }
.n-quran-comment-section > .collapse { width: 100%; padding: 0 !important; }
.n-quran-comment-section textarea { min-height: 4.5rem !important; }
.n-session-save-state { display: flex; align-items: center; justify-content: flex-end; gap: .3rem; border-top: 1px solid var(--n-border-light); padding: .55rem .8rem; color: #15803d; font-size: .61rem; font-weight: 750; }
.n-session-tab-loading,
.n-session-loading,
.n-session-tab-error,
.n-session-error { display: grid; place-items: center; gap: .6rem; min-height: 16rem; padding: 2rem; color: var(--n-text-muted); text-align: center; }
.n-session-tab-error p,
.n-session-error p { margin: 0; }

.n-session-panel .collapse > .d-flex { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start !important; gap: .75rem; width: min(58rem, 100%); }
.n-session-panel .collapse > .d-flex > div { min-width: 0; margin: 0 !important; }
.n-session-panel .collapse .list-group { overflow: hidden; border: 1px solid var(--n-border); border-radius: .75rem; background: #fff; }
.n-session-panel .collapse .list-group-item { display: grid !important; grid-template-columns: minmax(6.5rem, .7fr) minmax(0, 1.3fr); gap: .55rem; border-color: var(--n-border-light); padding: .65rem .75rem; font-size: .67rem; }
.n-session-panel .collapse .list-group-item:first-of-type { display: block !important; background: #f7f7f5; }
.n-session-panel .collapse .list-group-item h2 { margin: 0; font-size: .85rem; }
.n-session-panel .collapse .form-control { width: 100%; min-width: 0; }
.n-program-detail-trigger { cursor: zoom-in; }
.n-program-detail-trigger:focus-visible { outline: 3px solid var(--n-brand-glow); outline-offset: 2px; }
.n-program-modal-dialog { width: min(90rem, calc(100vw - 2rem)); max-width: none; margin-inline: auto; }
.n-program-modal-content { gap: 1rem; }
.n-native-switch { accent-color: var(--n-brand); }
.n-native-editor { min-height: 5rem !important; resize: vertical; }

.n-mushaf-workspace { display: flex; flex-direction: column; gap: .65rem; align-items: stretch; }
.n-mushaf-help { display: flex; align-items: center; gap: .45rem; margin: 0 0 .55rem; border: 1px solid #bae6fd; border-radius: .7rem; background: #f0f9ff; padding: .55rem .7rem; color: #075985; font-size: .68rem; }
.n-mushaf-page { position: relative; overflow: visible; border: 1px solid var(--n-border); border-radius: .85rem; background: #f6f3eb; box-shadow: var(--n-shadow-md); }
.n-mushaf-page img { display: block; width: 100%; height: auto; border-radius: inherit; cursor: crosshair; user-select: none; }
.n-mushaf-controls { order: -1; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem; gap: .65rem; align-items: center; border: 1px solid var(--n-border); border-radius: .85rem; background: #fff; padding: .65rem .75rem; box-shadow: var(--n-shadow-sm); }
.n-mushaf-navigation { display: grid; grid-template-columns: auto minmax(10rem, 1fr) minmax(13rem, 18rem); gap: .75rem; align-items: center; min-width: 0; }
.n-mushaf-navigation label { margin: 0; color: var(--n-text-secondary); font-size: .68rem; font-weight: 750; text-align: left; white-space: nowrap; }
.n-mushaf-navigation input[type="range"] { width: 100%; accent-color: var(--n-brand); }
.n-mushaf-navigation select { min-width: 0; font-size: .64rem; }
.n-mushaf-step { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin: 0; padding: 0; }
.circle { position: absolute; z-index: 5; width: 50px; height: 50px; border: 2px solid rgba(185,28,28,.75); border-radius: 50%; background: rgba(239,68,68,.4); cursor: pointer; box-shadow: 0 0 0 3px rgba(255,255,255,.72); }
.circle.is-pending { opacity: .78; cursor: wait; }

#saveIndicator { display: none; position: fixed; right: 1rem; bottom: 1rem; z-index: 2000; border-radius: 999px; padding: .48rem .85rem; color: #fff; font-size: .67rem; font-weight: 750; box-shadow: var(--n-shadow-lg); }
#saveIndicator.save-indicator-saving { background: #64748b; }
#saveIndicator.save-indicator-success { background: #15803d; }
#saveIndicator.save-indicator-error { background: #b91c1c; }

@media (max-width: 1199.98px) {
    .n-teacher-header-inner { gap: .55rem; }
    .n-teacher-nav-link { padding-inline: .48rem; }
    .n-teacher-nav-link span { display: none; }
    .admin-surface .n-admin-header .n-teacher-nav-link span { display: inline; }
    .n-teacher-nav-link.dropdown-toggle::after { display: none; }
    .n-teacher-account-copy { display: none; }
    .teacher-session-page .teacher-session-layout { grid-template-columns: minmax(0, 1fr); }
    .teacher-session-page .teacher-session-roster { position: static; max-width: 100%; max-height: none; }
    .teacher-session-page .teacher-session-roster-list { display: block; max-width: 100%; max-height: none; overflow-x: auto; overflow-y: hidden; }
    .teacher-session-page .teacher-session-roster-list .nav { display: flex; min-width: max-content; gap: .25rem; }
    .teacher-session-page .teacher-session-roster-list .nav-item + .nav-item { margin-top: 0; }
    .teacher-session-page .teacher-session-roster-list .nav-link { width: 14rem; }
    .teacher-surface .n-teacher-class-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
    .n-teacher-header-inner { flex-wrap: wrap; min-height: 4.25rem; padding-block: .55rem; }
    .n-teacher-nav-toggle { display: grid; }
    .n-teacher-account { margin-left: 0; }
    .n-teacher-primary-nav {
        order: 4;
        width: 100%;
        flex-basis: 100%;
        align-items: stretch;
        padding: .45rem 0 .25rem;
    }
    .n-teacher-header .n-teacher-primary-nav.collapse:not(.show) { display: none; }
    .n-teacher-header .n-teacher-primary-nav.collapse.show { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-surface .n-admin-header .n-admin-enrollment-link { margin-left: 0; }
    .n-teacher-nav-link { justify-content: flex-start; }
    .n-teacher-nav-link span { display: inline; }
    .n-teacher-nav-link.dropdown-toggle::after { display: inline-block; margin-left: auto; }
    .n-teacher-nav-dropdown { min-width: 0; }
    .n-teacher-nav-dropdown .n-teacher-nav-link { width: 100%; }
    .n-teacher-header .n-teacher-primary-nav .dropdown-menu,
    .n-teacher-header .n-supervision-menu { position: static !important; width: 100%; min-width: 0; transform: none !important; box-shadow: none; }
    .n-teacher-header .n-supervision-menu.show { display: block; }
    .teacher-session-layout { grid-template-columns: 1fr; }
    .teacher-session-roster { position: static; max-height: none; }
    .teacher-session-roster-list { display: flex; max-height: none; overflow-x: auto; overflow-y: hidden; }
    .teacher-session-roster-list .nav { display: flex; min-width: max-content; gap: .25rem; }
    .teacher-session-roster-list .nav-item + .nav-item { margin-top: 0; }
    .teacher-session-roster-list .nav-link { width: 14rem; }
    .n-quran-program-grid { grid-template-columns: 1fr; }
    .n-mushaf-controls { grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem; }
    /* A 768px tablet has the stacked session shell but not enough horizontal
       room for the desktop Quran row (date + five fields + actions). Keep the
       compact card layout through the tablet breakpoint so row actions cannot
       create a document-level scrollbar. */
    .n-quran-session-table { min-width: 0; }
    .n-quran-session-table thead { display: none; }
    .n-quran-session-table .n-quran-entry-row.d-none,
    .n-quran-session-table .n-quran-entry-detail.d-none { display: none !important; }
    .n-quran-session-table .n-quran-entry-row:not(.d-none) { display: grid !important; grid-template-columns: 1fr; }
    .n-quran-session-table .n-quran-entry-date,
    .n-quran-session-table .n-quran-entry-task { width: 100%; max-width: none; padding: .55rem !important; }
    .n-quran-task-fields { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .n-quran-task-fields > .form-control,
    .n-quran-task-fields > .bootstrap-select,
    .n-quran-task-fields > .d-flex { width: 100% !important; min-width: 0 !important; max-width: none !important; }
    .n-quran-task-fields > .d-flex { grid-column: 1 / -1; justify-content: flex-end; }
    .teacher-surface .n-teacher-quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .teacher-surface .n-support-layout { grid-template-columns: 1fr; }
    .teacher-surface .n-support-contact { position: static; }
    .teacher-surface .n-teacher-form-layout { grid-template-columns: 1fr; }
    .teacher-surface .n-form-side-panel { position: static; }
    .teacher-surface .n-attendance-grid-header { display: none; }
    .teacher-surface .n-attendance-row { grid-template-columns: minmax(0, 1fr); padding: .65rem; }
    .teacher-surface .n-attendance-student { grid-column: 1 / -1; padding: 0 0 .55rem; }
    .teacher-surface .n-attendance-choices { grid-column: 1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .teacher-surface .n-attendance-choices label { border: 0; }
    .teacher-surface .n-attendance-choices span { width: calc(100% - .3rem); height: 2.4rem; gap: .3rem; border-radius: .58rem; }
    .teacher-surface .n-attendance-choices em { position: static; width: auto; height: auto; overflow: visible; clip: auto; font-size: .62rem; }
    .n-collective-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .n-collective-search { grid-column: 1 / -1; }
    .n-collective-result-count { justify-self: start; }
    .n-attendance-editor .n-attendance-row { grid-template-columns: minmax(0, 1fr); }
    .n-attendance-session-controls { min-width: 0; }
    .n-attendance-justification { justify-content: flex-start; padding: .45rem 0 0; }
}

@media (max-width: 767.98px) {
    .n-quran-actions { grid-template-columns: 1fr; padding: .65rem; }
    .n-quran-program { padding: 0 .65rem .75rem; }
    .n-quran-program-fields .list-group-item { grid-template-columns: 1fr; gap: .35rem; }
    .n-quran-program-fields .n-quran-program-schedule { grid-template-columns: minmax(0, 1fr) auto; }
    .n-quran-program-fields .n-quran-program-schedule > div:nth-child(1),
    .n-quran-program-fields .n-quran-program-schedule > div:nth-child(2) { grid-column: 1 / -1; }
    .n-quran-program-fields .n-quran-program-schedule .n-quran-vacancy-label { grid-column: 1; }
    .n-quran-program-fields .n-quran-program-schedule > div:last-child { grid-column: 2; }
    .n-program-modal-dialog { width: auto; margin: .75rem; }
    .n-program-modal-content { align-items: stretch !important; flex-direction: column; }
    .n-program-modal-content > .col-6 { width: 100%; max-width: none; flex: 0 0 auto; border-right: 0 !important; padding-inline: 0; }
    .n-quran-dayoff-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .teacher-surface { background: var(--n-bg); }
    .n-teacher-header { position: relative; }
    .n-teacher-brand strong { font-size: .78rem; }
    .n-teacher-brand small { display: none; }
    .n-teacher-account-trigger { padding-right: .3rem; }
    .n-teacher-page,
    .teacher-surface .team-2 { padding-top: 1.2rem !important; }
    .n-teacher-page-header { align-items: flex-start; flex-direction: column; }
    .n-teacher-page-actions { width: 100%; justify-content: stretch; }
    .n-teacher-page-actions > * { flex: 1 1 auto; }
    .n-teacher-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .n-teacher-grid > .n-span-8,
    .n-teacher-grid > .n-span-6,
    .n-teacher-grid > .n-span-4 { grid-column: span 12; }
    .teacher-session-page > .container-fluid { padding-inline: .65rem; }
    .teacher-session-hero { align-items: flex-start; flex-direction: column; }
    .teacher-session-content > #ni-content { padding: .65rem; }
    .n-session-student-header,
    .n-session-group-header { align-items: flex-start; flex-wrap: wrap; }
    .n-session-student-header > div,
    .n-session-group-header > div { min-width: 0; flex: 1 1 calc(100% - 4rem); }
    .n-session-next-student { width: 100%; margin-left: 0; }
    .n-session-workspace-tabs { margin-inline: -.65rem; border-radius: 0; padding-inline: .65rem; }
    .n-session-workspace-tabs .nav-link { min-height: 2.75rem; padding: .45rem .62rem; }
    .n-session-panel-header { align-items: flex-start; flex-direction: column; }
    .n-session-panel-header .btn { width: 100%; }
    .n-collective-tools { grid-template-columns: minmax(0, 1fr); padding: .65rem; }
    .n-collective-search { grid-column: 1; }
    .n-collective-footer .btn { width: 100%; }
    #all-absence .n-session-table-wrap { overflow: visible; }
    #all-absence .n-session-data-table { width: 100%; min-width: 0; }
    #all-absence .n-session-data-table > thead { display: none; }
    #all-absence .n-session-data-table tbody > tr[data-collective-entry]:not([data-collective-detail]):not(.d-none):not(.n-collective-filtered-out) { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
    #all-absence .n-session-data-table tbody > tr[data-collective-detail]:not(.d-none):not(.n-collective-filtered-out) { display: block !important; width: 100%; }
    #all-absence .n-session-data-table tbody > tr[data-collective-detail] > td { display: block !important; width: 100%; max-width: none; padding: 0 !important; }
    #all-absence .n-session-data-table tbody > tr:not([data-collective-detail]) > td { width: auto; max-width: none; padding: .55rem !important; }
    #all-absence .n-session-data-table tbody > tr:not([data-collective-detail]) > td:first-child { grid-column: 1; grid-row: 1; justify-content: flex-start !important; }
    #all-absence .n-session-data-table tbody > tr:not([data-collective-detail]) > td:last-child { grid-column: 2; grid-row: 1; }
    #all-absence .n-session-data-table .n-attendance-default-cell,
    #all-absence .n-session-data-table .n-attendance-filtered-cell { grid-column: 1 / -1; }
    #all-absence .n-session-data-table .n-attendance-default-cell:empty { display: none; }
    #all-absence .n-attendance-editor { max-height: none; overflow: visible; }
    #all-absence .n-attendance-session-controls { width: 100%; }
    .n-session-history-filters { align-items: stretch; justify-content: flex-start; }
    .n-history-filter-title { width: 100%; }
    .n-quran-history-loader-slot { width: 100%; margin-left: 0; }
    .n-quran-history-more { flex: 1 1 auto; white-space: normal; }
    .n-quran-history-status { flex: 0 0 auto; align-self: center; }
    .n-quran-period-empty { align-items: flex-start; justify-content: flex-start; min-height: 0; margin: .55rem; padding: .85rem; }
    .n-session-panel .collapse > .d-flex { grid-template-columns: 1fr; }
    .n-session-panel .collapse .list-group-item { grid-template-columns: 1fr; }
    .n-session-data-table { min-width: 45rem; }
    .n-quran-session-table { min-width: 0; }
    .n-quran-session-table thead { display: none; }
    /* Bootstrap's .d-none also uses !important. This later, more-specific
       mobile rule used to override it and reveal past/future/prototype rows.
       Restrict the grid layout to rows which are actually meant to be shown. */
    .n-quran-session-table .n-quran-entry-row.d-none,
    .n-quran-session-table .n-quran-entry-detail.d-none { display: none !important; }
    .n-quran-session-table .n-quran-entry-row:not(.d-none) { display: grid !important; grid-template-columns: 1fr; }
    .n-quran-session-table .n-quran-entry-date,
    .n-quran-session-table .n-quran-entry-task { width: 100%; max-width: none; padding: .55rem !important; }
    .n-quran-task-fields { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .n-quran-task-fields > .form-control,
    .n-quran-task-fields > .bootstrap-select,
    .n-quran-task-fields > .d-flex { width: 100% !important; min-width: 0 !important; max-width: none !important; }
    .n-quran-task-fields > .d-flex { grid-column: 1 / -1; justify-content: flex-end; }
    .n-notation-row { grid-template-columns: 1fr; }
    .n-notation-label,
    .n-notation-inputs { grid-column: 1; }
    .n-notation-presets { grid-column: 1; }
    .n-mushaf-navigation { grid-template-columns: 1fr; gap: .4rem; }
    .n-mushaf-navigation label { text-align: center; }
    #saveIndicator { right: .65rem; bottom: calc(4.8rem + env(safe-area-inset-bottom)); }
    .teacher-surface .table-responsive { border-radius: .75rem; }
    .teacher-surface .table { font-size: .75rem; }
    .teacher-surface footer.fdb-block { display: none; }
    .teacher-surface .n-attention-grid,
    .teacher-surface .n-teacher-class-grid { grid-template-columns: 1fr; }
    .teacher-surface .n-teacher-day-summary { align-items: stretch; flex-direction: column; }
    .teacher-surface .n-teacher-day-summary-heading { padding: 0 0 .65rem; border-right: 0; border-bottom: 1px solid var(--n-border-light); }
    .teacher-surface .n-attention-grid > div + div { border-top: 1px solid var(--n-border-light); border-left: 0; }
    .teacher-surface .n-support-video-grid { grid-template-columns: 1fr; }
    .teacher-surface .n-form-grid > .n-span-8,
    .teacher-surface .n-form-grid > .n-span-7,
    .teacher-surface .n-form-grid > .n-span-6,
    .teacher-surface .n-form-grid > .n-span-5,
    .teacher-surface .n-form-grid > .n-span-4 { grid-column: span 12; }
    .teacher-surface .n-attendance-selection-grid { grid-template-columns: 1fr; }
    .teacher-surface .n-form-actions { bottom: calc(4.6rem + env(safe-area-inset-bottom)); }
    .teacher-surface .n-form-actions .btn { width: auto; flex: 1 1 0; }
    .teacher-surface .n-grade-panel-header { align-items: flex-start; flex-direction: column; }
    .teacher-surface .n-grade-summary { width: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .teacher-surface .n-grade-roster-head { display: none; }
    .teacher-surface .n-grade-row { grid-template-columns: minmax(0, 1fr) minmax(7rem, .65fr); gap: .5rem; padding: .8rem; }
    .teacher-surface .n-grade-student { grid-column: 1 / -1; }
    .teacher-surface .n-grade-row > div:nth-of-type(4) { grid-column: 1 / -1; }
    .teacher-surface .n-field-error { grid-column: 1 / -1; margin-top: 0; }
}

@media (max-width: 420px) {
    .n-teacher-primary-nav.show { grid-template-columns: 1fr; }
    .n-teacher-metrics { grid-template-columns: 1fr; }
    .teacher-surface .n-teacher-quick-actions { grid-template-columns: 1fr; }
    .teacher-surface .n-teacher-class-card-header { grid-template-columns: auto minmax(0, 1fr); }
    .teacher-surface .n-class-code { display: none; }
    .teacher-surface .n-form-actions { align-items: stretch; flex-direction: column; }
    .teacher-surface .n-form-actions .btn { width: 100%; max-width: 100%; flex: 0 0 auto; white-space: normal; }
}

/* Legacy session tabs are still used by a few professor-only screens. Keep
   every compatibility rule inside the professor surface: family/student
   pages intentionally share some historic class names. */
.teacher-surface .tabs-section { color: var(--n-text) !important; background: transparent !important; }
.teacher-surface .tabs-section > .container-fluid > .row { align-items: flex-start; gap: 1.25rem; }
.teacher-surface .tabs-section > .container-fluid > .row > .col-lg-3 { flex: 0 0 250px; max-width: 250px; padding: 0; }
.teacher-surface .tabs-section > .container-fluid > .row > .col-lg-9 { flex: 1 1 0; max-width: none; padding: 0; min-width: 0; }
.teacher-surface .tabs-section .nav-tabs { position: sticky; top: 84px; display: block; margin: 0; padding: .6rem; border: 1px solid var(--n-border); border-radius: var(--n-radius-lg); background: rgba(255,255,255,.9); box-shadow: var(--n-shadow-sm); }
.teacher-surface .tabs-section .nav-tabs .nav-item { margin: 0; }
.teacher-surface .tabs-section .nav-tabs .nav-link { display: block; overflow: hidden; margin: .15rem 0; border: 0; border-radius: .55rem; padding: .7rem .8rem; color: var(--n-text-secondary); font-size: .88rem; font-weight: 600; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .tabs-section .nav-tabs .nav-link:hover { background: var(--n-brand-pale); color: var(--n-brand-dark); }
.teacher-surface .tabs-section .nav-tabs .nav-link.active { background: linear-gradient(135deg, var(--n-brand), var(--n-brand-dark)); color: #fff; box-shadow: var(--n-shadow-brand); }
.teacher-surface .tabs-section .tab-content { text-align: left; }
.teacher-surface .tabs-section .tab-pane > .row:first-child { margin: 0 !important; border: 1px solid var(--n-border); border-radius: var(--n-radius-lg) var(--n-radius-lg) 0 0; background: var(--n-surface); padding: 1.1rem 1.35rem !important; }
.teacher-surface .tabs-section .tab-pane > .row:first-child h3 { margin: 0; color: var(--n-text); font-size: clamp(1.2rem, 2vw, 1.55rem); }
.teacher-surface .tabs-section .tab-pane > hr { margin: 0 !important; border-color: var(--n-border-light); }
.teacher-surface .tabs-section .nav-pills { margin: 0 !important; border: 1px solid var(--n-border); border-top: 0; background: #fcfbfa; padding: .55rem; }
.teacher-surface .tabs-section .nav-pills .nav-link { border-radius: .5rem; padding: .6rem 1rem; color: var(--n-text-secondary); font-weight: 700; }
.teacher-surface .tabs-section .nav-pills .nav-link.active { background: var(--n-text); color: #fff; }
.teacher-surface .tabs-section .details { padding-left: 0 !important; }
.teacher-surface .tabs-section .details > .tab-content > .tab-pane > .card { margin-bottom: 0 !important; border: 1px solid var(--n-border); border-top: 0; border-radius: 0 0 var(--n-radius-lg) var(--n-radius-lg); box-shadow: var(--n-shadow-sm); }
.teacher-surface .tabs-section .table-responsive { border: 0; border-radius: 0; box-shadow: none; }
.teacher-surface [id$="_quran_content"] .table thead th,
.teacher-surface [id$="_content"] .table thead th { background: #f7f6f3; }
.teacher-surface [id$="_content"] tfoot .btn { min-height: 46px; border: 0; background: var(--n-brand); box-shadow: none; }
.teacher-surface [id$="_content"] tfoot .btn:hover { background: var(--n-brand-dark); transform: translateY(-1px); }
.teacher-surface .btn-ok { transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }

@media (max-width: 991.98px) {
    .teacher-surface .tabs-section > .container-fluid > .row { display: block; }
    .teacher-surface .tabs-section > .container-fluid > .row > .col-lg-3 { display: none !important; }
    .teacher-surface .tabs-section > .container-fluid > .row > .col-lg-9 { width: 100%; }
}

@media (max-width: 575.98px) {
    .teacher-surface .tabs-section .tab-pane > .row:first-child { padding: .9rem !important; }
    .teacher-surface .tabs-section .nav-pills { overflow-x: auto; justify-content: flex-start !important; flex-wrap: nowrap; }
    .teacher-surface .tabs-section .nav-pills .nav-link { flex: 0 0 auto; padding: .55rem .75rem; }
    .teacher-surface [id$="_content"] tfoot .btn { width: 100%; margin: .25rem 0 !important; }
}

.btn.focus,
.btn:focus {
    box-shadow: 0 0 0 3px var(--n-brand-glow);
}


/* ──────────────────────────────
   BADGES
   ────────────────────────────── */
.badge {
    font-weight: 600;
    border-radius: var(--n-radius);
    padding: 0.35em 0.65em;
}

.badge-primary,
.badge-info {
    background-color: var(--n-brand);
}

.badge-success {
    background-color: var(--n-success);
}

.badge-warning {
    background-color: var(--n-warning);
    color: #fff;
}

.badge-danger {
    background-color: var(--n-danger);
}

.badge-light {
    background-color: var(--n-border-light);
    color: var(--n-text-secondary);
}

.badge-pill {
    border-radius: var(--n-radius-full);
}


/* ──────────────────────────────
   CARDS / fdb-box — redensified
   ────────────────────────────── */
.card {
    background-color: var(--n-surface);
    border: 1px solid var(--n-border-light);
    border-radius: var(--n-radius-lg);
    box-shadow: var(--n-shadow-sm);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--n-border-light);
    font-weight: 600;
}

.fdb-box {
    background-color: var(--n-surface);
    border: 1px solid var(--n-border-light) !important;
    border-radius: var(--n-radius-lg) !important;
    box-shadow: var(--n-shadow-sm) !important;
    padding: 1.5rem !important;
}

/* Bootstrap 4 padding utilities used historically for fdb-box spacing
   (pb-5 pt-5 = 3rem top/bottom) are overridden site-wide to a saner
   density once combined with .fdb-box; see macro.twig for the class
   changes (p-3) applied on the components that used the old spacing. */


/* ──────────────────────────────
   NAV TABS / PILLS
   ────────────────────────────── */
.nav-tabs {
    border-bottom-color: var(--n-border);
}

.nav-tabs .nav-link {
    color: var(--n-text-secondary);
    font-weight: 500;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
}

.nav-tabs .nav-link:hover {
    color: var(--n-brand-dark);
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--n-brand-dark);
    background-color: transparent;
    border-color: transparent;
    border-bottom: 2px solid var(--n-brand);
    font-weight: 700;
}


/* ──────────────────────────────
   ALERTS
   ────────────────────────────── */
.alert {
    border: none;
    border-radius: var(--n-radius-lg);
}

.alert-primary,
.alert-info {
    background-color: var(--n-brand-pale);
    color: var(--n-brand-dark);
}

.alert-success {
    background-color: var(--n-success-pale);
    color: #15803d;
}

.alert-warning {
    background-color: var(--n-warning-pale);
    color: #9a3412;
}

.alert-danger {
    background-color: var(--n-danger-pale);
    color: #991b1b;
}


/* ──────────────────────────────
   FORM CONTROLS
   ────────────────────────────── */
.form-control {
    border: 1.5px solid var(--n-border);
    border-radius: var(--n-radius);
    color: var(--n-text);
    background-color: var(--n-surface);
}

.form-control:focus {
    border-color: var(--n-brand);
    box-shadow: 0 0 0 3px var(--n-brand-glow);
    color: var(--n-text);
    background-color: var(--n-surface);
}

.form-control::placeholder {
    color: var(--n-text-muted);
}

.custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--n-brand);
    border-color: var(--n-brand);
}


/* ──────────────────────────────
   MODALS
   ────────────────────────────── */
.modal-content {
    border: none;
    border-radius: var(--n-radius-lg);
    box-shadow: var(--n-shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--n-border-light);
}

.modal-footer {
    border-top: 1px solid var(--n-border-light);
}


/* ──────────────────────────────
   EMPTY STATES (macro emptyState())
   ────────────────────────────── */
.n-empty-state {
    text-align: center;
    padding: 2.5rem 1.25rem;
    color: var(--n-text-secondary);
}

.n-empty-state-icon {
    font-size: 2.75rem;
    color: var(--n-text-faint);
    margin-bottom: 0.75rem;
    display: block;
}

.n-empty-state-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--n-text);
    margin-bottom: 0.25rem;
}

.n-empty-state-message {
    font-size: 0.9375rem;
    color: var(--n-text-secondary);
    margin: 0;
}


/* ──────────────────────────────
   FAMILY MEMBER CARDS (member/list.twig)
   ────────────────────────────── */
.n-member-card {
    display: block;
    text-decoration: none;
    background-color: var(--n-surface);
    border: 1px solid var(--n-border-light);
    border-radius: var(--n-radius-lg);
    box-shadow: var(--n-shadow-sm);
    padding: 1.25rem 1rem;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    color: var(--n-text);
}

.n-member-card:hover,
.n-member-card:focus {
    box-shadow: var(--n-shadow-md);
    transform: translateY(-2px);
    color: var(--n-brand-dark);
    text-decoration: none;
}

.n-member-card img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    margin: 0 auto 0.75rem;
    display: block;
    border: 2px solid var(--n-brand-pale);
}

.n-member-card h2 {
    font-size: 1.0625rem;
    margin: 0;
}


/* ──────────────────────────────
   MOBILE BOTTOM NAV
   ────────────────────────────── */
.n-nav-bottom {
    background-color: rgba(250, 249, 247, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--n-border);
    box-shadow: 0 -4px 20px rgba(28, 25, 23, 0.06);
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 1030;
}

.n-nav-bottom .n-nav-bottom-link {
    color: var(--n-text-muted);
    text-decoration: none;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.375rem 0.25rem;
    min-width: 3.5rem;
}

.n-nav-bottom .n-nav-bottom-link i {
    font-size: 1.25rem;
    line-height: 1;
    display: block;
    margin-bottom: 0.125rem;
}

.n-nav-bottom .n-nav-bottom-link.active {
    color: var(--n-brand);
}

body.has-bottom-nav {
    padding-bottom: 4.25rem;
}

@media (min-width: 768px) {
    body.has-bottom-nav {
        padding-bottom: 0;
    }
}


/* ──────────────────────────────
   TOASTR (local vendor, loaded from /assets/vendor/libs/toastr/)
   ────────────────────────────── */
#toast-container > div {
    width: min(26rem, calc(100vw - 1.5rem));
    margin: 0 0 .65rem;
    border: 1px solid var(--n-border) !important;
    border-radius: var(--n-radius-lg) !important;
    background-color: var(--n-surface) !important;
    background-image: none !important;
    padding: .9rem 2.7rem .9rem 3rem;
    color: var(--n-text) !important;
    box-shadow: var(--n-shadow-lg) !important;
    opacity: 1 !important;
    cursor: default !important;
}
#toast-container > div::before {
    position: absolute;
    top: .9rem;
    left: .85rem;
    display: grid;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: var(--n-radius-full);
    font-size: .7rem;
    font-weight: 800;
    line-height: 1;
    content: 'i';
}
#toast-container > .toast-success::before { background: var(--n-success-pale); color: var(--n-success); content: '✓'; }
#toast-container > .toast-error::before { background: var(--n-danger-pale); color: var(--n-danger); content: '!'; }
#toast-container > .toast-warning::before { background: var(--n-warning-pale); color: var(--n-warning); content: '!'; }
#toast-container > .toast-info::before { background: var(--n-info-pale); color: var(--n-info); }

#toast-container.toast-top-right { top: 5.25rem; right: clamp(.75rem, 2vw, 1.5rem); }
#toast-container > div:hover { box-shadow: var(--n-shadow-lg) !important; opacity: 1 !important; }
#toast-container .toast-title { margin: 0 0 .12rem; color: var(--n-text); font-size: .75rem; line-height: 1.35; }
#toast-container .toast-message { color: var(--n-text-secondary); font-size: .68rem; line-height: 1.5; }
#toast-container .toast-message a { color: var(--n-brand-dark); text-decoration: underline; }
#toast-container .toast-close-button { position: absolute; top: .65rem; right: .75rem; color: var(--n-text-muted); text-shadow: none; opacity: 1; }
#toast-container .toast-close-button:hover,
#toast-container .toast-close-button:focus { color: var(--n-text); opacity: 1; }
#toast-container .toast-progress { height: .18rem; background: currentColor; opacity: .22; }
#toast-container > .toast-success { border-color: rgba(21, 128, 61, .28) !important; color: var(--n-success); }
#toast-container > .toast-error { border-color: rgba(220, 38, 38, .28) !important; color: var(--n-danger); }
#toast-container > .toast-warning { border-color: rgba(194, 65, 12, .28) !important; color: var(--n-warning); }
#toast-container > .toast-info { border-color: rgba(14, 116, 144, .28) !important; color: var(--n-info); }

.n-notification-fallback {
    position: fixed;
    z-index: 999999;
    top: 5.25rem;
    right: clamp(.75rem, 2vw, 1.5rem);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: min(26rem, calc(100vw - 1.5rem));
    gap: .75rem;
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius-lg);
    background: var(--n-surface);
    padding: .9rem;
    color: var(--n-text);
    box-shadow: var(--n-shadow-lg);
    transition: opacity .18s ease, transform .18s ease;
}
.n-notification-fallback.is-success { border-color: rgba(21, 128, 61, .28); }
.n-notification-fallback.is-error { border-color: rgba(220, 38, 38, .28); }
.n-notification-fallback.is-warning { border-color: rgba(194, 65, 12, .28); }
.n-notification-fallback.is-info { border-color: rgba(14, 116, 144, .28); }
.n-notification-fallback strong { display: block; margin-bottom: .12rem; font-size: .75rem; }
.n-notification-fallback p { margin: 0; color: var(--n-text-secondary); font-size: .68rem; line-height: 1.5; }
.n-notification-fallback.is-leaving { opacity: 0; transform: translateY(-.35rem); }
.n-notification-close { align-self: start; border: 0; background: transparent; padding: 0 .2rem; color: var(--n-text-muted); font-size: 1.25rem; line-height: 1; cursor: pointer; }
.n-notification-close:hover,
.n-notification-close:focus { color: var(--n-text); }

@media (max-width: 767.98px) {
    #toast-container.toast-top-right,
    .n-notification-fallback { position: fixed; top: .75rem; right: .75rem; left: .75rem; }
    #toast-container > div,
    .n-notification-fallback { width: auto; }
}

/* Sur grand ecran, le coin superieur droit est a des dizaines de centimetres du
   geste qui vient d'etre fait : la notification apparait et disparait hors du
   champ de vision. On l'ancre en bas, au centre de la colonne de lecture — la ou
   le regard revient apres une action, quelle que soit la largeur de l'ecran.
   Quelle que soit la position demandee par l'appelant : une page qui choisit
   « en haut a droite » ne doit pas rouvrir le probleme ailleurs. */
@media (min-width: 768px) {
    #toast-container.toast-top-right,
    #toast-container.toast-top-center,
    #toast-container.toast-top-left,
    #toast-container.toast-bottom-right,
    #toast-container.toast-bottom-left,
    #toast-container.toast-bottom-center,
    .n-notification-fallback {
        /* Pose explicitement : ne pas dependre de la feuille de toastr pour la
           seule propriete qui decide de l'ancrage. */
        position: fixed;
        top: auto;
        right: auto;
        bottom: clamp(1rem, 3vh, 2.25rem);
        left: 50%;
        transform: translateX(-50%);
        width: min(30rem, calc(100vw - 3rem));
    }
    #toast-container > div,
    .n-notification-fallback { width: 100%; }
    /* Au-dessus d'une barre de navigation basse, quand il y en a une. */
    body.has-bottom-nav #toast-container[class*="toast-"],
    body.has-bottom-nav .n-notification-fallback { bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px)); }
}


/* ──────────────────────────────
   FOOTER
   ────────────────────────────── */
footer.fdb-block {
    padding: 2rem 0;
    background-color: var(--n-surface);
    border-top: 1px solid var(--n-border-light);
    color: var(--n-text-muted);
    font-size: 0.875rem;
}


/* ──────────────────────────────
   LOGIN PAGE
   ────────────────────────────── */
.n-login-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-width: 100%;
    min-height: 100%;
    opacity: 0.35;
    z-index: -1;
    object-fit: cover;
}

.n-login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100vh;
}

.n-login-card {
    background: linear-gradient(160deg, var(--n-brand-dark), var(--n-brand));
    position: relative;
    z-index: 1;
    border: none !important;
    border-radius: var(--n-radius-xl);
    box-shadow: var(--n-shadow-lg);
}

.n-login-card .form-control {
    border: none;
    background-color: rgba(255, 255, 255, 0.94);
}

.n-login-card .form-control:focus {
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45);
}

.n-login-card p,
.n-login-card label {
    color: rgba(255, 255, 255, 0.92);
}

.n-auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(30rem, 0.92fr);
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0;
    background: var(--n-surface);
}

.n-auth-story {
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    padding: clamp(2.5rem, 6vw, 6rem);
    background:
        linear-gradient(90deg, rgba(5,42,60,.98) 0%, rgba(8,69,88,.94) 58%, rgba(14,116,144,.68) 100%),
        url('../imgs/noun-bg-2.jpeg') right center/cover;
    color: #fff;
}

.n-auth-story::before {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 38%, rgba(5,42,60,.26));
    content: '';
    pointer-events: none;
}

.n-auth-story-content { position: relative; z-index: 2; max-width: 42rem; }
.n-auth-mark {
    display: block;
    width: 4.6rem;
    height: 5.35rem;
    margin-bottom: 2.3rem;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 1rem;
    background: rgba(255,255,255,.95);
    padding: .45rem;
    box-shadow: 0 .75rem 2rem rgba(5,42,60,.2);
}
.n-auth-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.n-auth-kicker { display: block; margin-bottom: 0.7rem; color: #a5f3fc; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.n-auth-story h1 { max-width: 38rem; margin: 0; color: #fff; font-size: clamp(2.5rem, 5vw, 4.7rem); font-weight: 700; letter-spacing: -0.055em; line-height: 0.98; }
.n-auth-story p { max-width: 34rem; margin: 1.5rem 0 2rem; color: rgba(255,255,255,.78); font-size: 1.02rem; }
.n-auth-benefits { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.n-auth-benefits span { display: inline-flex; align-items: center; gap: 0.45rem; border: 1px solid rgba(255,255,255,.18); border-radius: var(--n-radius-full); background: rgba(255,255,255,.07); padding: 0.48rem 0.75rem; color: rgba(255,255,255,.88); font-size: 0.74rem; }
.n-auth-benefits i { color: #67e8f9; font-size: 1rem; }
.n-auth-orb { position: absolute; border-radius: 50%; filter: blur(2px); }
.n-auth-orb-one { top: -8rem; right: -7rem; width: 28rem; height: 28rem; background: rgba(103, 232, 249, .08); }
.n-auth-orb-two { top: 22%; left: -9rem; width: 20rem; height: 20rem; border: 1px solid rgba(255,255,255,.08); }

.n-auth-form-side { display: flex; align-items: center; justify-content: center; padding: 2.5rem; }
.n-auth-form-wrap { width: 100%; max-width: 27rem; }
.n-auth-brand { display: inline-flex; align-items: center; gap: 0.7rem; margin-bottom: clamp(3rem, 7vh, 5.5rem); color: var(--n-text); }
.n-auth-brand:hover { color: var(--n-text); text-decoration: none; }
.n-auth-brand img { width: 2.7rem; height: 2.7rem; object-fit: contain; }
.n-auth-brand strong, .n-auth-brand small { display: block; line-height: 1.2; }
.n-auth-brand strong { font-size: 0.9rem; }
.n-auth-brand small { color: var(--n-text-muted); font-size: 0.68rem; }
.n-auth-heading h2 { margin: 0.3rem 0 0.5rem; font-size: 2rem; letter-spacing: -0.04em; }
.n-auth-heading p { margin-bottom: 1.8rem; color: var(--n-text-secondary); font-size: 0.88rem; }
.n-auth-form { display: grid; gap: 1.15rem; }
.n-auth-field label { margin: 0 0 0.4rem; color: var(--n-text); font-size: 0.78rem; font-weight: 700; }
.n-auth-field .form-control { height: 3.15rem; border-color: var(--n-border); border-radius: 0.8rem; background: #fcfcfb; padding-inline: 0.95rem; }
.n-auth-field .form-control:focus { border-color: var(--n-brand); background: #fff; box-shadow: 0 0 0 4px var(--n-brand-glow); }
.n-auth-label-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.n-auth-label-row a { font-size: 0.72rem; font-weight: 600; }
.n-auth-submit { display: flex; align-items: center; justify-content: center; gap: 0.55rem; height: 3.15rem; border-radius: 0.8rem; background: #0e7490; color: #fff; font-weight: 700; box-shadow: var(--n-shadow-brand); }
.n-auth-submit:hover, .n-auth-submit:focus { background: #155e75; color: #fff; transform: translateY(-1px); }
.n-auth-divider { display: flex; align-items: center; gap: 0.8rem; margin: 1.4rem 0; color: var(--n-text-muted); font-size: 0.7rem; }
.n-auth-divider::before, .n-auth-divider::after { height: 1px; flex: 1; background: var(--n-border); content: ''; }
.n-auth-google { display: flex; align-items: center; justify-content: center; gap: 0.6rem; width: 100%; height: 3rem; border: 1px solid var(--n-border); border-radius: 0.8rem; background: #fff; color: var(--n-text); font-weight: 600; box-shadow: var(--n-shadow-xs); }
.n-auth-google:hover { border-color: #c9c5bf; background: #fafafa; color: var(--n-text); }
.n-auth-help { margin: 1.5rem 0 0; color: var(--n-text-muted); font-size: 0.72rem; text-align: center; }
.n-auth-help a { font-weight: 700; }
.n-auth-form-wrap > .alert { margin-bottom: 1.15rem; border-radius: .8rem; font-size: .78rem; }
.n-auth-support { margin-top: 1.15rem; border: 1px solid var(--n-border); border-radius: .85rem; background: #fff; }
.n-auth-support summary { display:flex; align-items:center; gap:.5rem; padding:.85rem 1rem; color:var(--n-text-secondary); cursor:pointer; font-size:.76rem; font-weight:700; list-style:none; }
.n-auth-support summary::-webkit-details-marker { display:none; }
.n-auth-support[open] summary { border-bottom:1px solid var(--n-border-light); color:var(--n-brand-dark); }
.n-auth-support .n-auth-form { padding:1rem; }
.n-auth-support textarea.form-control { min-height:7rem; height:auto; resize:vertical; }
.n-auth-secondary-action { display:flex; align-items:center; justify-content:center; gap:.45rem; min-height:2.8rem; border-radius:.75rem; font-weight:700; }
.n-password-control { position:relative; }
.n-password-control .form-control { padding-right:3rem; }
.n-password-toggle { position:absolute; top:50%; right:.35rem; display:grid; place-items:center; width:2.75rem; height:2.75rem; transform:translateY(-50%); border:0; border-radius:.65rem; background:transparent; color:var(--n-text-muted); cursor:pointer; }
.n-password-toggle:hover, .n-password-toggle:focus-visible { background:var(--n-brand-pale); color:var(--n-brand-dark); outline:0; }
.n-password-rules { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.42rem .75rem; margin:-.25rem 0 0; padding:0; list-style:none; }
.n-password-rules li { display:flex; align-items:center; gap:.35rem; color:var(--n-text-muted); font-size:.68rem; line-height:1.3; }
.n-password-rules li i { flex:0 0 auto; font-size:.9rem; }
.n-password-rules li.is-valid { color:#15803d; }
.n-password-match { display:block; min-height:1rem; margin-top:.35rem; color:var(--n-text-muted); font-size:.68rem; }
.n-password-match.is-valid { color:#15803d; }
.n-password-match.is-invalid { color:var(--n-danger); }

@media (max-width: 991.98px) {
    .n-auth-shell { grid-template-columns: minmax(0, 1fr); }
    .n-auth-story { display: none; }
    .n-auth-form-side {
        min-height: 100vh;
        padding: 1.5rem;
        background:
            linear-gradient(rgba(250,252,252,.94), rgba(248,250,250,.97)),
            url('../imgs/noun-bg-2.jpeg') center/cover;
    }
    .n-auth-brand { margin-bottom: 2.5rem; }
}

@media (max-width: 575.98px) {
    .n-auth-form-side { padding:1.1rem; }
    .n-auth-form-wrap { max-width:100%; }
    .n-auth-brand { margin-bottom:2rem; }
    .n-auth-heading h2 { font-size:1.75rem; }
    .n-password-rules { grid-template-columns:minmax(0,1fr); }
}

/* Administration cockpit */
.n-admin-shell {
    min-height: calc(100vh - 120px);
    padding: 2.25rem 0 4rem;
    background:
        radial-gradient(circle at 8% 0%, rgba(8, 145, 178, 0.10), transparent 28rem),
        linear-gradient(180deg, #f7fbfc 0, var(--n-bg) 28rem);
}

.n-admin-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.n-admin-hero h1 {
    margin: 0.15rem 0 0.25rem;
    font-size: clamp(2rem, 5vw, 3.3rem);
    letter-spacing: -0.045em;
}

.n-admin-hero p { margin: 0; color: var(--n-text-secondary); }

.n-eyebrow {
    color: var(--n-brand-dark);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.n-status-pill,
.n-phase-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius-full);
    background: rgba(255, 255, 255, 0.86);
    padding: 0.55rem 0.85rem;
    color: var(--n-text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: var(--n-shadow-xs);
}

.n-status-pill span { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--n-danger); }
.n-status-pill.is-ready span { background: var(--n-success); box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12); }

.n-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.n-metric-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    border: 1px solid rgba(232, 229, 224, 0.9);
    border-radius: var(--n-radius-lg);
    background: rgba(255, 255, 255, 0.88);
    padding: 1rem 1.1rem;
    box-shadow: var(--n-shadow-sm);
    backdrop-filter: blur(12px);
}

.n-metric-card > i {
    display: grid;
    place-items: center;
    width: 2.65rem;
    height: 2.65rem;
    flex: 0 0 2.65rem;
    border-radius: 0.8rem;
    background: var(--n-brand-pale);
    color: var(--n-brand-dark);
    font-size: 1.25rem;
}

.n-metric-card strong { display: block; font-size: 1.35rem; line-height: 1.1; }
.n-metric-card span { color: var(--n-text-muted); font-size: 0.78rem; }

.n-admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(17rem, 0.7fr);
    gap: 1rem;
    align-items: start;
}

/* --- Écran des réglages IA ------------------------------------------------
   Le formulaire occupe la pleine largeur : la grille « principal + latéral »
   jetait les onze fonctionnalités et l'unique bouton dans une gouttière de
   270 px. */
.n-admin-stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.n-ai-fields { display: grid; gap: 1rem; padding: 1.1rem 1.4rem 1.4rem; }
.n-ai-fields label { margin-bottom: .3rem; font-size: .8rem; font-weight: 600; }
.n-ai-fields .form-text { margin-top: .35rem; font-size: .72rem; }

/* Une case et son libellé sur la même ligne, cliquables ensemble. */
.n-ai-switch {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0;
    cursor: pointer;
    font-weight: 600;
}
.n-ai-switch input { width: 1rem; height: 1rem; margin: 0; flex: 0 0 auto; }
.n-ai-switch strong { font-size: .84rem; }

.n-ai-group {
    margin: 0;
    border-bottom: 1px solid var(--n-border-light);
    padding: .7rem 1.4rem;
    background: #fafaf9;
    color: var(--n-text-muted);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.n-ai-feature {
    border-bottom: 1px solid var(--n-border-light);
    border-left: 3px solid transparent;
    padding: .85rem 1.4rem;
}
/* L'état se VOIT : un liseré vert sur ce qui agit réellement. Une classe qui ne
   change aucun pixel ne dit rien à personne. */
.n-ai-feature.is-on { border-left-color: var(--n-success); background: rgba(22, 163, 74, .04); }
/* Allumé mais branché nulle part : l'interrupteur ne commande encore rien. */
.n-ai-feature.is-pending { border-left-color: var(--n-warning, #d97706); }
.n-ai-feature.is-pending .n-ai-meta { color: var(--n-warning, #d97706); }
.n-ai-feature .n-ai-help,
.n-ai-feature .n-ai-meta { margin: .3rem 0 0; color: var(--n-text-muted); font-size: .74rem; line-height: 1.4; }
.n-ai-feature .n-ai-meta { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; }

.n-ai-actions { padding: 1.1rem 1.4rem; }

.n-ai-key-state {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 0 0 .55rem;
    color: var(--n-success);
    font-size: .78rem;
    font-weight: 600;
}
.n-ai-key-state.is-missing { color: var(--n-danger); }

/* Un texte écrit par un modèle porte toujours sa provenance : d'où il sort, et sur
   quoi il ne porte pas. Sans cela il se lit comme un constat de l'établissement. */
/* --- Tendance et « ce qui marche » ---------------------------------------- */
/* Courbe dessinee par le serveur : aucune bibliotheque, aucun script, visible au
   premier octet. */
.n-insights-chart { margin: 0; padding: .5rem 1.25rem 1rem; }
.n-insights-chart svg { display: block; width: 100%; height: auto; }
.n-chart-axis { stroke: var(--n-border); stroke-width: 1; }
/* Une graduation discrete, sauf la ligne de zero qui est une reference et non un repere
   parmi d'autres. */
.n-chart-grid { stroke: var(--n-border-light); stroke-width: 1; stroke-dasharray: 3 4; }
.n-chart-grid.is-base { stroke: var(--n-border); stroke-dasharray: none; }
.n-chart-tick { fill: var(--n-text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.n-chart-caption { fill: var(--n-text-muted); font-size: 10px; font-style: italic; }
.n-chart-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.n-chart-line.is-sessions { stroke: #0e7490; }
.n-chart-line.is-students { stroke: #087f6b; stroke-dasharray: 5 4; }
.n-chart-dot { stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.n-chart-dot.is-sessions { fill: #0e7490; }
.n-chart-dot.is-students { fill: #087f6b; }
.n-insights-chart-legend { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: .6rem; color: var(--n-text-muted); font-size: .72rem; }
.n-insights-chart-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.n-chart-key { width: .85rem; height: 0; border-top: 2px solid #0e7490; }
.n-chart-key.is-students { border-top-style: dashed; border-top-color: #087f6b; }
.n-insights-chart-scale { margin-left: auto; font-style: italic; }
.n-insights-chart-figures { border-top: 1px solid var(--n-border-light); }
.n-insights-chart-figures > summary { cursor: pointer; padding: .6rem 1.25rem; color: var(--n-text-secondary); font-size: .74rem; font-weight: 650; }

.n-insights-working { margin: 0; border-top: 1px solid var(--n-border-light); padding: 0; list-style: none; }
.n-insights-working > li {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    border-bottom: 1px solid var(--n-border-light);
    padding: .8rem 1.25rem;
}
.n-insights-working > li:last-child { border-bottom: 0; }
.n-insights-working > li > i { margin-top: .1rem; color: var(--n-success); font-size: 1.05rem; }
.n-insights-working strong { display: block; font-size: .82rem; }
.n-insights-working span { display: block; color: var(--n-text-muted); font-size: .74rem; }

/* --- Tri et filtre des tableaux de pilotage ------------------------------- */
.n-insights-table-tools {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 0 1.25rem .75rem;
}
.n-insights-table-tools .n-insights-filter { max-width: 22rem; }
.n-insights-filter-count { color: var(--n-text-muted); font-size: .72rem; white-space: nowrap; }

/* L'en-tete cliquable est un vrai bouton : sinon le tri n'existe ni au clavier ni
   pour un lecteur d'ecran. */
.n-insights-sort {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    border: 0;
    padding: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.n-insights-sort:hover { text-decoration: underline; }
.n-insights-sortable th[aria-sort] .n-insights-sort::after { content: '\2195'; opacity: .35; }
.n-insights-sortable th[aria-sort="ascending"] .n-insights-sort::after { content: '\2191'; opacity: 1; }
.n-insights-sortable th[aria-sort="descending"] .n-insights-sort::after { content: '\2193'; opacity: 1; }

/* L'identifiant de classe, sans lequel trois « Mercredi Matin » sont indistinguables. */
.n-insights-table code {
    border-radius: .25rem;
    background: var(--n-border-light);
    padding: .05rem .3rem;
    color: var(--n-text-secondary);
    font-size: .68rem;
}

/* Traduction a la demande d'une consigne. La sortie s'affiche A COTE du texte
   d'origine, jamais a sa place : ecraser la saisie du professeur serait une perte de
   travail irreversible. */
.n-ai-translate { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .5rem; }
/* Éditeur de devoir (js/homework-editor.js) et contenu affiché (SafeTextMarkup::richDisplay).
   Actions ordinaires : le teal de la marque, pas le violet réservé aux gestes IA. */
.n-rich-editor { margin-top: .25rem; border: 1.5px solid var(--n-border); border-radius: var(--n-radius); background: var(--n-surface); }
.n-rich-editor:focus-within { border-color: var(--n-brand); box-shadow: 0 0 0 3px rgba(14, 116, 144, .12); }
.n-rich-editor[aria-busy="true"] .n-rich-toolbar { opacity: .6; pointer-events: none; }
.n-rich-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; padding: .35rem; border-bottom: 1px solid var(--n-border-light); background: var(--n-bg); border-radius: calc(var(--n-radius) - 1.5px) calc(var(--n-radius) - 1.5px) 0 0; }
.n-rich-group { display: flex; align-items: center; gap: .15rem; padding-right: .3rem; margin-right: .1rem; border-right: 1px solid var(--n-border); }
.n-rich-group:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.n-rich-tool { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; min-width: 2.5rem; min-height: 2.5rem; padding: 0 .55rem; border: 1px solid transparent; border-radius: .5rem; background: transparent; color: var(--n-text); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.n-rich-tool > i { font-size: 1.1rem; line-height: 1; }
.n-rich-tool.has-label { color: var(--n-brand-dark); }
.n-rich-tool:hover { background: var(--n-surface); border-color: var(--n-border); }
.n-rich-tool[aria-pressed="true"], .n-rich-tool[aria-expanded="true"] { background: var(--n-brand-pale); border-color: rgba(14, 116, 144, .35); color: var(--n-brand-dark); }
.n-rich-tool:focus-visible, .n-rich-insert:focus-visible, .n-rich-cancel:focus-visible { outline: 3px solid var(--n-brand); outline-offset: 1px; }
.n-rich-panel { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; padding: .75rem; border-bottom: 1px solid var(--n-border-light); background: var(--n-brand-pale); }
.n-rich-panel[hidden] { display: none; }
.n-rich-panel-field { display: flex; flex: 1 1 14rem; flex-direction: column; gap: .25rem; min-width: 0; }
.n-rich-panel-field[hidden] { display: none; }
.n-rich-panel-field label { margin: 0; color: var(--n-text); font-size: .8rem; font-weight: 600; }
.n-rich-optional { color: var(--n-text-muted); font-weight: 400; }
.n-rich-panel-actions { display: flex; gap: .4rem; }
.n-rich-insert, .n-rich-cancel { min-height: 2.75rem; padding: .45rem 1rem; border-radius: .65rem; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.n-rich-insert { border: 1px solid var(--n-brand); background: var(--n-brand); color: #fff; }
.n-rich-insert:hover { background: var(--n-brand-dark); border-color: var(--n-brand-dark); }
.n-rich-cancel { border: 1px solid var(--n-border); background: var(--n-surface); color: var(--n-text); }
.n-rich-panel-error { flex-basis: 100%; margin: 0; color: var(--n-danger); font-size: .8rem; font-weight: 600; }
.n-rich-area { min-height: 9rem; max-height: 28rem; overflow-y: auto; padding: .75rem .9rem; color: var(--n-text); line-height: 1.6; outline: none; overflow-wrap: anywhere; }
.n-rich-area:empty::before { content: attr(data-placeholder); color: var(--n-text-muted); pointer-events: none; }
.n-rich-area p, .n-rich-area div { margin: 0 0 .35rem; }
.n-rich-area ul, .n-rich-area ol { margin: .25rem 0 .5rem; padding-left: 1.4rem; }
.n-rich-area img { max-width: min(100%, 420px); height: auto; border-radius: .5rem; }
.n-rich-area .n-rich-video { max-width: 420px; }
@media (max-width: 575.98px) {
    /* Sur téléphone la barre passe sur deux lignes : sans séparateurs, aucun trait
       ne reste orphelin en bout de ligne. */
    .n-rich-toolbar { gap: .1rem; }
    .n-rich-group { border-right: 0; margin-right: 0; padding-right: 0; }
    .n-rich-panel-actions { width: 100%; }
    .n-rich-insert, .n-rich-cancel { flex: 1 1 0; }
}
.n-rich-status { margin: 0; padding: .4rem .9rem .6rem; color: var(--n-text-secondary); font-size: .8rem; }
.n-rich-status.is-error { color: var(--n-danger); font-weight: 600; }
.n-rich-link { overflow-wrap: anywhere; }
.n-rich-img { max-width: min(100%, 640px); height: auto; border-radius: .5rem; }
.n-rich-video { position: relative; width: 100%; max-width: 640px; aspect-ratio: 16 / 9; margin: .5rem 0; border-radius: .5rem; overflow: hidden; background: #000; }
.n-rich-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.n-rich-photo { display: block; margin: .5rem 0; }
.n-rich-photo img { display: block; max-width: min(100%, 640px); height: auto; border-radius: .5rem; border: 1px solid rgba(15, 23, 42, .1); }
.n-ai-translate-out {
    flex: 1 1 100%;
    margin: .3rem 0 0;
    border-left: 3px solid var(--n-brand, #0e7490);
    border-radius: .25rem;
    background: rgba(14, 116, 144, .05);
    padding: .5rem .7rem;
    font-size: .8rem;
    line-height: 1.5;
}
.n-ai-translate-out.is-error { border-left-color: var(--n-danger); background: rgba(220, 38, 38, .05); }
.n-ai-translate-out[dir="rtl"] { text-align: right; font-size: 1rem; }

.n-quran-plan-vigilance {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin: 0;
    border-bottom: 1px solid var(--n-border-light);
    padding: .7rem 1rem;
    background: rgba(14, 116, 144, .05);
    font-size: .8rem;
    line-height: 1.45;
}
.n-quran-plan-vigilance > i { margin-top: .1rem; color: var(--n-brand, #0e7490); }
.n-quran-plan-vigilance small { display: block; margin-top: .2rem; color: var(--n-text-muted); font-size: .68rem; font-style: italic; }

.n-insights-ai-source { display: block; margin-top: .4rem; font-size: .68rem; font-style: italic; opacity: .8; }

/*
 * L'encart d'un texte proposé par le service, partout où il apparaît hors du pilotage :
 * bulletin du professeur, tableau de bord, espace famille. Il se distingue du reste de
 * la page à vue d'œil — un texte rédigé ailleurs ne doit pas se lire comme un constat de
 * l'établissement.
 */
.n-ai-note {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin: 1rem 0;
    border: 1px solid #ddd6fe;
    border-radius: var(--n-radius-lg);
    background: #faf5ff;
    padding: .9rem 1rem;
    color: #5b21b6;
}
.n-ai-note > i { flex: 0 0 auto; padding-top: .1rem; font-size: 1.15rem; }
.n-ai-note > div { display: grid; gap: .35rem; }
.n-ai-note strong { font-size: .78rem; font-weight: 800; }
.n-ai-note p { margin: 0; color: var(--n-text); font-size: .82rem; line-height: 1.5; }
.n-ai-note .btn { justify-self: start; }
.n-ai-note-actions { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .1rem; }
.n-ai-note .n-insights-ai-source { margin-top: 0; color: #6b21a8; }

/* « Élèves à accompagner » sur l'accueil du professeur : une liste, pas un tableau — le
   rang compte autant que le nom, et il doit rester lisible sur un téléphone. */
.n-difficulty-list { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.n-difficulty-list > li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.4fr) auto;
    align-items: center;
    gap: .75rem;
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius-lg);
    background: var(--n-surface);
    padding: .6rem .8rem;
}
.n-difficulty-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--n-surface-alt, #f1f5f9);
    color: var(--n-text-secondary);
    font-size: .72rem;
    font-weight: 800;
}
.n-difficulty-identity { display: grid; gap: .1rem; min-width: 0; }
.n-difficulty-identity strong { font-size: .84rem; }
.n-difficulty-identity small { color: var(--n-text-muted); font-size: .68rem; }
.n-difficulty-reasons { display: flex; flex-wrap: wrap; gap: .3rem; }
@media (max-width: 767.98px) {
    .n-difficulty-list > li { grid-template-columns: auto minmax(0, 1fr) auto; }
    .n-difficulty-reasons { grid-column: 2 / -1; }
}

.n-panel {
    overflow: hidden;
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius-xl);
    background: var(--n-surface);
    box-shadow: var(--n-shadow-md);
}

.n-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.45rem;
    border-bottom: 1px solid var(--n-border-light);
}

.n-panel-header h2 { margin: 0.15rem 0 0; font-size: 1.18rem; }
.n-phase-badge { box-shadow: none; text-transform: capitalize; }

.n-year-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem;
    padding: 1rem;
    border-radius: var(--n-radius-lg);
    background: #f8fbfc;
}

.n-year-flow > i { color: var(--n-brand); font-size: 1.1rem; }
.n-year-flow span, .n-year-flow strong { display: block; }
.n-year-flow span { margin-bottom: 0.2rem; color: var(--n-text-muted); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; }
.n-year-flow strong { overflow: hidden; font-size: 0.8rem; text-overflow: ellipsis; white-space: nowrap; }

.n-check-list { border-top: 1px solid var(--n-border-light); }
.n-check-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    padding: 0.82rem 1.4rem;
    border-bottom: 1px solid var(--n-border-light);
}
.n-check-row > i { color: var(--n-danger); font-size: 1.08rem; }
.n-check-row.is-ok > i { color: var(--n-success); }
.n-check-row strong { display: block; font-size: 0.79rem; text-transform: capitalize; }
.n-check-row span { display: block; color: var(--n-text-muted); font-size: 0.72rem; line-height: 1.35; }
.n-check-row small { border-radius: var(--n-radius-full); background: var(--n-border-light); padding: 0.2rem 0.45rem; color: var(--n-text-muted); font-size: 0.62rem; font-weight: 700; text-transform: uppercase; }

.n-safety-note {
    display: flex;
    gap: 0.85rem;
    margin: 1.25rem;
    border: 1px solid #bae6fd;
    border-radius: var(--n-radius-lg);
    background: #f0f9ff;
    padding: 1rem;
}
.n-safety-note > i { color: var(--n-brand-dark); font-size: 1.4rem; }
.n-safety-note strong { font-size: 0.86rem; }
.n-safety-note p { margin: 0.25rem 0 0; color: var(--n-text-secondary); font-size: 0.75rem; line-height: 1.5; }

.n-rollover-authorization {
    margin: 1.25rem;
    overflow: hidden;
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius-lg);
    background: linear-gradient(145deg, #fff, #fbfdfd);
    box-shadow: var(--n-shadow-xs);
}
.n-rollover-authorization .n-safety-note { margin: 0; border: 0; border-bottom: 1px solid #bae6fd; border-radius: 0; }
.n-roster-readiness { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--n-border-light); }
.n-roster-readiness > div { padding: .85rem 1rem; border-right: 1px solid var(--n-border-light); }
.n-roster-readiness > div:last-child { border-right: 0; }
.n-roster-readiness span, .n-roster-readiness strong { display: block; }
.n-roster-readiness span { min-height: 2.1em; color: var(--n-text-muted); font-size: .67rem; line-height: 1.3; }
.n-roster-readiness strong { margin-top: .25rem; font-size: 1.15rem; }
.n-roster-readiness .is-ok strong { color: var(--n-success); }
.n-roster-readiness .is-ko strong { color: var(--n-danger); }
.n-authorization-seal { display: flex; align-items: center; gap: .75rem; padding: 1rem; }
.n-authorization-seal > i { font-size: 1.35rem; }
.n-authorization-seal strong, .n-authorization-seal span { display: block; }
.n-authorization-seal strong { font-size: .82rem; }
.n-authorization-seal span { color: var(--n-text-muted); font-size: .72rem; }
.n-authorization-seal.is-ready { background: #f0fdf4; color: #166534; }
.n-authorization-seal.is-blocked { background: #fff7ed; color: #9a3412; }
.n-authorization-form { padding: 1rem; }
.n-authorization-form label { display: block; margin-bottom: .55rem; color: var(--n-text-secondary); font-size: .73rem; }
.n-authorization-form code { color: var(--n-brand-dark); font-weight: 700; }
.n-authorization-form > div { display: flex; gap: .6rem; }
.n-authorization-form input { min-width: 0; flex: 1; border: 1px solid var(--n-border); border-radius: .65rem; padding: .65rem .8rem; }
.n-authorization-form input:focus { border-color: var(--n-brand); outline: 0; box-shadow: 0 0 0 3px var(--n-brand-glow); }
.n-authorization-form button { white-space: nowrap; }

.n-quick-panel { position: sticky; top: 1rem; }
.n-quick-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 1px solid var(--n-border-light);
    padding: 0.95rem 1.2rem;
    color: var(--n-text);
    transition: background 150ms ease, transform 150ms ease;
}
.n-quick-link:hover { background: var(--n-brand-pale); color: var(--n-brand-dark); text-decoration: none; }
.n-quick-link > i:first-child { color: var(--n-brand); font-size: 1.2rem; }
.n-quick-link strong, .n-quick-link small { display: block; }
.n-quick-link strong { font-size: 0.84rem; }
.n-quick-link small { color: var(--n-text-muted); font-size: 0.7rem; }
.n-target-state { margin: 1.2rem; border-radius: var(--n-radius-lg); background: #172a35; padding: 1rem; color: #fff; }
.n-target-state span, .n-target-state small, .n-target-state strong { display: block; }
.n-target-state span { color: #a5c4d1; font-size: 0.68rem; text-transform: uppercase; }
.n-target-state strong { margin: 0.15rem 0; font-size: 1.25rem; }
.n-target-state small { color: #d8e6ec; }

@media (max-width: 991.98px) {
    .n-admin-layout { grid-template-columns: 1fr; }
    .n-quick-panel { position: static; }
}

@media (max-width: 767.98px) {
    .n-admin-shell { padding-top: 1.25rem; }
    .n-admin-hero { align-items: flex-start; flex-direction: column; }
    .n-metric-grid { grid-template-columns: 1fr; }
    .n-year-flow { grid-template-columns: 1fr; }
    .n-year-flow > i { transform: rotate(90deg); }
    .n-check-row { align-items: start; padding-inline: 1rem; }
    .n-check-row small { display: none; }
    .n-panel-header { align-items: flex-start; flex-direction: column; }
    .n-roster-readiness { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .n-roster-readiness > div:nth-child(2) { border-right: 0; }
    .n-roster-readiness > div:nth-child(-n+2) { border-bottom: 1px solid var(--n-border-light); }
    .n-authorization-form > div { flex-direction: column; }
}

/* Family and teacher dashboards */
.n-dashboard-shell {
    min-height: calc(100vh - 120px);
    padding: 2rem 0 4rem;
    background: radial-gradient(circle at 85% -10rem, rgba(103, 232, 249, .14), transparent 28rem);
}
.n-dashboard-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.4rem; }
.n-dashboard-hero h1 { margin: .2rem 0 .35rem; font-size: clamp(2rem, 4.5vw, 3.1rem); letter-spacing: -.045em; }
.n-dashboard-hero p { margin: 0; color: var(--n-text-secondary); }
.n-dashboard-cta, .n-search-button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border-radius: .75rem; background: var(--n-brand-dark); color: #fff; font-weight: 700; }
.n-dashboard-cta { padding: .72rem 1rem; white-space: nowrap; }
.n-dashboard-cta:hover, .n-search-button:hover { background: #155e75; color: #fff; transform: translateY(-1px); }
.n-date-chip, .n-count-chip { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--n-border); border-radius: var(--n-radius-full); background: var(--n-surface); padding: .48rem .72rem; color: var(--n-text-secondary); font-size: .74rem; font-weight: 700; white-space: nowrap; }
.n-dashboard-section { margin-top: 1.2rem; border: 1px solid var(--n-border); border-radius: var(--n-radius-xl); background: rgba(255,255,255,.78); padding: 1.3rem; box-shadow: var(--n-shadow-sm); }
.n-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.n-section-heading h2 { margin: .12rem 0 0; font-size: 1.25rem; }
.n-dashboard-cards { margin-inline: -.45rem; }
.n-dashboard-cards > [class*="col-"] { padding-inline: .45rem; }
.n-search-panel { margin-bottom: 1rem; border: 1px solid var(--n-border); border-radius: var(--n-radius-lg); background: var(--n-surface); padding: .8rem; box-shadow: var(--n-shadow-sm); }
.n-search-panel .form-control { height: 2.8rem; border: 0; background: var(--n-bg); }
.n-search-panel .form-control:focus { background: #fff; box-shadow: 0 0 0 3px var(--n-brand-glow); }
.n-search-button { height: 2.8rem; border: 0; }
.n-today-panel { border: 1px solid var(--n-border); border-radius: var(--n-radius-lg); background: var(--n-surface); padding: 1.2rem; box-shadow: var(--n-shadow-sm); }
.n-today-panel h2 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .9rem; font-size: 1rem; }
.n-today-panel h2 i { color: var(--n-brand); }
.n-all-clear { display: flex; align-items: center; gap: .7rem; margin: 0; color: var(--n-text-secondary); font-size: .78rem; }
.n-all-clear > i { color: var(--n-success); font-size: 1.5rem; }
.n-all-clear span, .n-all-clear strong { display: block; }
.n-all-clear strong { color: var(--n-text); font-size: .85rem; }
.n-empty-state { padding: 3rem 1rem; color: var(--n-text-muted); }
.n-empty-state i { font-size: 2rem; }
.n-empty-state h3 { margin: .5rem 0 .25rem; font-size: 1rem; }
.n-empty-state p { margin: 0; font-size: .8rem; }

@media (max-width: 767.98px) {
    .n-dashboard-shell { padding-top: 1rem; }
    .n-dashboard-hero { align-items: flex-start; flex-direction: column; }
    .n-dashboard-cta { width: 100%; }
    .n-dashboard-section { padding: 1rem; }
}

/* Teacher preferences: scoped to the professor application surface. */
.teacher-surface .n-teacher-preferences .n-teacher-page-header { max-width: 54rem; }
.teacher-surface .n-preferences-form { display: grid; gap: 1.25rem; }
.teacher-surface .n-preference-heading { display: flex; align-items: center; min-width: 0; gap: .8rem; }
.teacher-surface .n-preference-heading h2,
.teacher-surface .n-preference-heading h3 { margin: .12rem 0 .16rem; }
.teacher-surface .n-preference-heading p { margin: 0; color: var(--n-text-muted); font-size: .7rem; }
.teacher-surface .n-preference-icon { display: grid; place-items: center; width: 2.65rem; height: 2.65rem; flex: 0 0 auto; border-radius: .82rem; background: var(--n-brand-pale); color: var(--n-brand-dark); font-size: 1.2rem; }
.teacher-surface .n-preference-icon.is-class { background: #f5f3ff; color: #6d28d9; }
.teacher-surface .n-preference-status,
.teacher-surface .n-preference-count { display: inline-flex; align-items: center; flex: 0 0 auto; gap: .35rem; border-radius: var(--n-radius-full); background: #f5f5f4; padding: .38rem .6rem; color: var(--n-text-muted); font-size: .65rem; font-weight: 800; }
.teacher-surface .n-preference-status.is-enabled { background: #ecfdf5; color: #047857; }
.teacher-surface .n-preference-enable-row { max-width: 31rem; }
.teacher-surface .n-preference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; border-top: 1px solid var(--n-border-light); padding-top: 1rem; }
.teacher-surface .n-preference-grid[hidden] { display: none !important; }
.teacher-surface .n-preference-field { min-width: 0; }
.teacher-surface .n-preference-field label { display: block; margin-bottom: .38rem; color: var(--n-text); }
.teacher-surface .n-preference-field .form-control { width: 100%; margin: 0; }
.teacher-surface .n-preference-field small { display: block; margin-top: .35rem; color: var(--n-text-muted); font-size: .64rem; line-height: 1.4; }
.teacher-surface .n-preference-classes { margin-top: .3rem; }
.teacher-surface .n-preference-classes .n-section-heading { align-items: center; }
.teacher-surface .n-preference-classes .n-section-heading p { margin: .25rem 0 0; color: var(--n-text-muted); font-size: .72rem; }
.teacher-surface .n-preference-class-list { display: grid; gap: .9rem; }
.teacher-surface .n-preference-class-card .n-teacher-panel-header code { max-width: 15rem; overflow: hidden; border: 1px solid var(--n-border-light); border-radius: var(--n-radius-full); background: #fafaf9; padding: .3rem .55rem; color: var(--n-text-muted); font-size: .6rem; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-preference-class-card .n-preference-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border: 0; padding-top: 1.2rem; }
.teacher-surface .n-preference-savebar { position: sticky; bottom: 1rem; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid rgba(8, 145, 178, .22); border-radius: var(--n-radius-lg); background: rgba(255,255,255,.96); padding: .75rem .8rem .75rem 1rem; box-shadow: var(--n-shadow-lg); backdrop-filter: blur(14px); }
.teacher-surface .n-preference-savebar p { display: flex; align-items: center; gap: .4rem; margin: 0; color: var(--n-text-muted); font-size: .68rem; }
.teacher-surface .n-preference-savebar p i { color: var(--n-brand); font-size: 1rem; }
.teacher-surface .n-preference-savebar .btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.75rem; margin: 0; padding-inline: 1rem; }
.teacher-surface .n-preference-savebar .btn[aria-busy="true"] { cursor: wait; opacity: .75; }

@media (max-width: 767.98px) {
    .teacher-surface .n-preference-account .n-teacher-panel-header,
    .teacher-surface .n-preference-classes .n-section-heading { align-items: flex-start; flex-direction: column; }
    .teacher-surface .n-preference-grid,
    .teacher-surface .n-preference-class-card .n-preference-grid { grid-template-columns: 1fr; }
    .teacher-surface .n-preference-class-card .n-teacher-panel-header { align-items: flex-start; flex-direction: column; }
    .teacher-surface .n-preference-savebar { bottom: 5.35rem; align-items: stretch; flex-direction: column; padding: .75rem; }
    .teacher-surface .n-preference-savebar .btn { width: 100%; }
}

/* Teacher document composer */
.teacher-surface .n-teacher-document-page .n-teacher-form-layout { grid-template-columns: minmax(0, 1.7fr) minmax(17rem, .62fr); }
.teacher-surface .n-document-description { min-height: 9rem; resize: vertical; line-height: 1.55; }
.teacher-surface .n-field-counter { margin-top: .35rem; color: var(--n-text-muted); font-size: .62rem; text-align: right; }
.teacher-surface .n-document-file-count { flex: 0 0 auto; border-radius: var(--n-radius-full); background: #f5f5f4; padding: .32rem .55rem; color: var(--n-text-muted); font-size: .62rem; font-weight: 750; }
.teacher-surface .n-document-existing-files { display: grid; gap: .5rem; margin: 0 0 .8rem; border: 0; padding: 0; }
.teacher-surface .n-document-existing-files legend { width: auto; margin: 0 0 .15rem; color: var(--n-text-muted); font-size: .62rem; font-weight: 750; text-transform: uppercase; }
.teacher-surface .n-document-existing-file { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: .65rem; margin: 0; border: 1px solid var(--n-border-light); border-radius: .72rem; background: #fbfbfa; padding: .62rem .7rem; cursor: pointer; }
.teacher-surface .n-document-existing-file > input { width: 1rem; height: 1rem; accent-color: var(--n-brand); }
.teacher-surface .n-document-existing-file:has(> input:not(:checked)) { border-style: dashed; opacity: .55; }
.teacher-surface .n-document-file-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .58rem; background: var(--n-brand-pale); color: var(--n-brand-dark); }
.teacher-surface .n-document-existing-file strong,
.teacher-surface .n-document-existing-file small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-document-existing-file strong { font-size: .7rem; }
.teacher-surface .n-document-existing-file small { margin-top: .08rem; color: var(--n-text-muted); font-size: .58rem; font-weight: 500; }
.teacher-surface .n-document-existing-file > a { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--n-border); border-radius: .55rem; background: #fff; color: var(--n-brand-dark); }
.teacher-surface .n-document-dropzone { display: grid; place-items: center; margin: 0; border: 1.5px dashed #c8d9df; border-radius: var(--n-radius-lg); background: linear-gradient(145deg, #fbfeff, #f7fbfc); padding: 1.5rem 1rem; text-align: center; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.teacher-surface .n-document-dropzone:hover,
.teacher-surface .n-document-dropzone.is-dragging { transform: translateY(-1px); border-color: var(--n-brand); background: var(--n-brand-pale); }
.teacher-surface .n-document-dropzone > i { margin-bottom: .35rem; color: var(--n-brand); font-size: 1.9rem; }
.teacher-surface .n-document-dropzone strong { color: var(--n-text); font-size: .75rem; }
.teacher-surface .n-document-dropzone span { margin-top: .12rem; color: var(--n-text-muted); font-size: .62rem; }
.teacher-surface .n-document-dropzone input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }
.teacher-surface .n-document-dropzone:focus-within { outline: 3px solid var(--n-brand-glow); outline-offset: 2px; }
.teacher-surface .n-document-selected-files { display: grid; gap: .35rem; margin: .65rem 0 0; padding: 0; list-style: none; }
.teacher-surface .n-document-selected-files li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .45rem; border-radius: .58rem; background: #f0fdf4; padding: .45rem .6rem; color: #166534; font-size: .65rem; }
.teacher-surface .n-document-selected-files li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-document-selected-files li small { color: #15803d; font-size: .56rem; }
.teacher-surface .n-document-recipient-actions { display: flex; gap: .35rem; }
.teacher-surface .n-document-recipient-actions .btn { margin: 0; }
.teacher-surface .n-document-recipient-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: 0; border: 0; padding: 0; }
.teacher-surface .n-document-recipient { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; min-width: 0; gap: .55rem; margin: 0; border: 1px solid var(--n-border-light); border-radius: .7rem; background: #fbfbfa; padding: .55rem .65rem; cursor: pointer; }
.teacher-surface .n-document-recipient > input { position: absolute; opacity: 0; }
.teacher-surface .n-document-recipient > span:nth-of-type(2) { min-width: 0; }
.teacher-surface .n-document-recipient strong,
.teacher-surface .n-document-recipient small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-document-recipient strong { font-size: .66rem; }
.teacher-surface .n-document-recipient small { margin-top: .08rem; color: var(--n-text-muted); font-size: .56rem; font-weight: 500; }
.teacher-surface .n-document-recipient > i { display: grid; place-items: center; width: 1.35rem; height: 1.35rem; border: 1px solid var(--n-border); border-radius: 50%; color: transparent; font-size: .75rem; }
.teacher-surface .n-document-recipient:has(input:checked) { border-color: rgba(8,145,178,.32); background: var(--n-brand-pale); }
.teacher-surface .n-document-recipient input:checked ~ i { border-color: var(--n-brand); background: var(--n-brand); color: #fff; }
.teacher-surface .n-document-recipient input:focus-visible ~ i { outline: 3px solid var(--n-brand-glow); outline-offset: 2px; }
.teacher-surface .n-document-recipient-status { margin: .65rem 0 0; color: var(--n-text-muted); font-size: .62rem; }
.teacher-surface .n-document-recipient-status.is-error { color: #be123c; font-weight: 700; }
.teacher-surface .n-document-publication .n-teacher-panel-header > i { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: .65rem; background: var(--n-brand-pale); color: var(--n-brand-dark); }
.teacher-surface .n-document-recap { display: grid; gap: .55rem; margin: 1rem 0 0; }
.teacher-surface .n-document-recap > div { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; border-bottom: 1px solid var(--n-border-light); padding-bottom: .5rem; }
.teacher-surface .n-document-recap dt { color: var(--n-text-muted); font-size: .61rem; font-weight: 600; }
.teacher-surface .n-document-recap dd { max-width: 11rem; margin: 0; overflow: hidden; color: var(--n-text); font-size: .64rem; font-weight: 750; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-document-share-link { display: grid; gap: .4rem; margin-top: 1rem; border-radius: .7rem; background: #fafaf9; padding: .7rem; }
.teacher-surface .n-document-share-link > span:first-child { color: var(--n-text-muted); font-size: .58rem; font-weight: 700; }
.teacher-surface .n-document-share-link .btn { width: 100%; margin: 0; }
.teacher-surface .n-inline-empty { grid-column: 1 / -1; margin: 0; color: var(--n-text-muted); font-size: .7rem; }

@media (max-width: 991.98px) {
    .teacher-surface .n-teacher-document-page .n-teacher-form-layout { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
    .teacher-surface .n-document-recipient-grid { grid-template-columns: 1fr; }
    .teacher-surface .n-teacher-document-page .n-teacher-panel-header { align-items: flex-start; flex-direction: column; }
    .teacher-surface .n-document-recipient-actions { width: 100%; }
    .teacher-surface .n-document-recipient-actions .btn { flex: 1; }
    .teacher-surface .n-document-existing-file { grid-template-columns: auto minmax(0, 1fr) auto; }
    .teacher-surface .n-document-existing-file > input { grid-row: 1; }
    .teacher-surface .n-document-file-icon { display: none; }
}

/* Teacher resource lists and shared action affordances */
.teacher-surface .n-period-tabs { display: flex; gap: .35rem; margin: 0 0 1rem; overflow-x: auto; padding: .25rem; scrollbar-width: none; }
.teacher-surface .n-period-tabs::-webkit-scrollbar { display: none; }
.teacher-surface .n-period-tabs a { flex: 0 0 auto; border: 1px solid var(--n-border); border-radius: var(--n-radius-full); background: rgba(255,255,255,.8); padding: .48rem .72rem; color: var(--n-text-secondary); font-size: .65rem; font-weight: 700; }
.teacher-surface .n-period-tabs a:hover { border-color: var(--n-brand-light); color: var(--n-brand-dark); text-decoration: none; }
.teacher-surface .n-period-tabs a.active { border-color: var(--n-brand); background: var(--n-brand); color: #fff; box-shadow: var(--n-shadow-brand); }
.teacher-surface .n-table-panel-body { width: 100%; max-width: 100%; overflow-x: auto; padding: .7rem; }
.teacher-surface .n-table-panel-body .dataTables_wrapper { margin: 0; }
.teacher-surface .n-table-panel-body table { margin-bottom: 0 !important; }
.teacher-surface .n-table-panel-body table > thead > tr > th { border-top: 0; background: #f8f7f5; color: var(--n-text-muted); font-size: .58rem; letter-spacing: .06em; text-transform: uppercase; }
.teacher-surface .n-table-panel-body table > tbody > tr > td { vertical-align: middle; color: var(--n-text-secondary); font-size: .68rem; }
.teacher-surface .n-table-primary,
.teacher-surface .n-table-secondary { display: block; }
.teacher-surface .n-table-primary { color: var(--n-text); font-size: .7rem; }
.teacher-surface .n-table-secondary { max-width: 28rem; overflow: hidden; margin-top: .12rem; color: var(--n-text-muted); font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-class-pill { display: inline-flex; max-width: 12rem; overflow: hidden; border: 1px solid rgba(8,145,178,.18); border-radius: var(--n-radius-full); background: var(--n-brand-pale); padding: .28rem .48rem; color: var(--n-brand-dark); font-size: .58rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-teachers-directory-table .n-supervision-person-card .n-table-primary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-table-actions { display: flex; align-items: center; justify-content: flex-end; gap: .28rem; }
.teacher-surface .n-icon-action { display: grid; place-items: center; width: 2.05rem; height: 2.05rem; margin: 0; border: 1px solid var(--n-border); border-radius: .58rem; background: #fff; padding: 0; color: var(--n-text-secondary); font: inherit; cursor: pointer; }
.teacher-surface .n-icon-action:hover,
.teacher-surface .n-icon-action:focus { border-color: var(--n-brand-light); background: var(--n-brand-pale); color: var(--n-brand-dark); outline: 0; text-decoration: none; }
.teacher-surface .n-icon-action:focus-visible { box-shadow: 0 0 0 3px var(--n-brand-glow); }
.teacher-surface .n-icon-action.is-success { color: #15803d; }
.teacher-surface .n-icon-action.is-danger { color: #be123c; }
.teacher-surface .n-icon-action.is-danger:hover { border-color: #fecdd3; background: #fff1f2; color: #9f1239; }
.teacher-surface .n-teacher-resource-list .dropdown-menu { max-height: min(70vh, 28rem); overflow-y: auto; }
.teacher-surface #document-action-form { margin: 0; }
.teacher-surface .n-document-empty-state { display: grid; justify-items: center; padding: clamp(2.3rem, 6vw, 4.2rem) 1rem; }
.teacher-surface .n-document-empty-state .n-empty-state-message { max-width: 42rem; }
.teacher-surface .n-document-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; margin-top: 1.25rem; }
.teacher-surface .n-document-empty-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; margin: 0; gap: .4rem; }

@media (max-width: 575.98px) {
    .teacher-surface .n-table-panel-body { padding: .35rem; }
    .teacher-surface .n-table-actions { justify-content: flex-start; }
    .teacher-surface .n-icon-action { width: 2.75rem; height: 2.75rem; }
    .teacher-surface .n-document-empty-actions { width: 100%; }
    .teacher-surface .n-document-empty-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Teacher supervision and enrollment workspaces */
.teacher-surface .n-registration-nav {
    display: flex;
    gap: .4rem;
    margin: 0 0 1rem;
    overflow-x: auto;
    padding: .2rem .1rem .45rem;
    scrollbar-width: thin;
}
.teacher-surface .n-registration-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    flex: 0 0 auto;
    gap: .38rem;
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius-full);
    background: rgba(255,255,255,.84);
    padding: .5rem .78rem;
    color: var(--n-text-secondary);
    font-size: .67rem;
    font-weight: 750;
}
.teacher-surface .n-registration-nav a:hover,
.teacher-surface .n-registration-nav a:focus-visible {
    border-color: var(--n-brand-light);
    background: var(--n-brand-pale);
    color: var(--n-brand-dark);
    text-decoration: none;
}
.teacher-surface .n-registration-nav a.active {
    border-color: var(--n-brand-dark);
    background: var(--n-brand-dark);
    color: #fff;
    box-shadow: var(--n-shadow-brand);
}
.teacher-surface .n-registration-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .7rem;
    margin: 0 0 1rem;
}
.teacher-surface .n-registration-stats > article {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: .7rem;
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius-lg);
    background: rgba(255,255,255,.92);
    padding: .82rem .9rem;
    box-shadow: var(--n-shadow-sm);
}
.teacher-surface .n-registration-stats > article > i {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 auto;
    border-radius: .68rem;
    background: var(--n-brand-pale);
    color: var(--n-brand-dark);
    font-size: 1rem;
}
.teacher-surface .n-registration-stats strong,
.teacher-surface .n-registration-stats small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.teacher-surface .n-registration-stats strong { color: var(--n-text); font-size: 1rem; line-height: 1.05; }
.teacher-surface .n-registration-stats small { margin-top: .12rem; color: var(--n-text-muted); font-size: .6rem; }
.teacher-surface .n-registration-panel-header { align-items: flex-start; }
.teacher-surface .n-registration-panel-header > div:first-child { min-width: 0; }
.teacher-surface .n-registration-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: .45rem;
    border-bottom: 1px solid var(--n-border-light);
    background: #fcfbfa;
    padding: .7rem 1rem;
}
.teacher-surface .n-registration-form.is-bulk-enhanced:not(.has-selection) .n-registration-actions { display: none; }
.teacher-surface .n-registration-form.has-selection .n-registration-actions { display: flex; }
.teacher-surface .n-registration-actions .btn { min-height: 2.35rem; margin: 0; }
.teacher-surface .n-registration-actions .btn:disabled { cursor: not-allowed; opacity: .48; }
.teacher-surface .n-selection-count {
    display: inline-flex;
    align-items: center;
    min-height: 2.2rem;
    border-radius: var(--n-radius-full);
    background: #f5f5f4;
    padding: .38rem .65rem;
    color: var(--n-text-muted);
    font-size: .62rem;
    font-weight: 750;
}
.teacher-surface .n-selection-count:not(:empty) { color: var(--n-brand-dark); }
.teacher-surface .n-enrollment-status {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    border: 1px solid var(--n-border-light);
    border-radius: var(--n-radius-full);
    background: #f5f5f4;
    padding: .28rem .48rem;
    color: var(--n-text-secondary);
    font-size: .56rem;
    font-weight: 750;
    white-space: nowrap;
}
.teacher-surface .n-enrollment-status.is-success { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.teacher-surface .n-enrollment-status.is-warning { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.teacher-surface .n-enrollment-status.is-danger { border-color: #fecdd3; background: #fff1f2; color: #9f1239; }
.teacher-surface .n-enrollment-status.is-info,
.teacher-surface .n-enrollment-status.is-next { border-color: #bae6fd; background: #f0f9ff; color: #075985; }
.teacher-surface .n-muted-value { color: var(--n-text-muted); font-style: italic; }
.teacher-surface .n-contact-line { display: flex; align-items: center; min-width: 0; gap: .28rem; margin: .12rem 0; color: var(--n-text-secondary); font-size: .61rem; }
.teacher-surface .n-contact-line i { flex: 0 0 auto; color: var(--n-text-muted); }
.teacher-surface .n-contact-line span,
.teacher-surface .n-contact-line a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-family-students,
.teacher-surface .n-student-chip-list { display: flex; flex-wrap: wrap; gap: .28rem; }
.teacher-surface .n-family-students > span,
.teacher-surface .n-student-chip-list > span {
    display: inline-flex;
    align-items: center;
    max-width: 14rem;
    overflow: hidden;
    gap: .24rem;
    border-radius: var(--n-radius-full);
    background: #f5f5f4;
    padding: .26rem .44rem;
    color: var(--n-text-secondary);
    font-size: .56rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.teacher-surface .n-family-students > span > strong,
.teacher-surface .n-family-students > span > small,
.teacher-surface .n-family-students > span > em { overflow: hidden; text-overflow: ellipsis; }
.teacher-surface .n-family-students > span > small { color: var(--n-text-muted); }
.teacher-surface .n-family-students > span > em { color: var(--n-text-secondary); font-size: .52rem; font-style: normal; }
.teacher-surface .n-copy-link {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    min-height: 2.5rem;
    margin-top: .32rem;
    border: 0;
    border-radius: .45rem;
    background: var(--n-brand-pale);
    padding: .34rem .5rem;
    color: var(--n-brand-dark);
    font: inherit;
    font-size: .58rem;
    font-weight: 750;
    line-height: 1.25;
    cursor: pointer;
}
.teacher-surface .n-copy-link:hover { background: #cffafe; }
.teacher-surface .n-copy-link:focus-visible { outline: 3px solid var(--n-brand-glow); outline-offset: 2px; }
.teacher-surface .n-registration-page table.dataTable th:nth-child(4),
.teacher-surface .n-registration-page table.dataTable td:nth-child(4) { min-width: 16rem; }
.teacher-surface .n-capacity-value { display: inline-flex; align-items: baseline; gap: .18rem; color: var(--n-text); font-weight: 800; }
.teacher-surface .n-capacity-value small { color: var(--n-text-muted); font-size: .56rem; font-weight: 600; }

/* Enrollment dossier editor */
.teacher-surface .n-registration-edit-form { display: grid; gap: 1rem; }
.teacher-surface .n-registration-edit-form .n-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.teacher-surface .n-registration-edit-form .n-form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.teacher-surface .n-registration-edit-form .n-form-field.is-wide { grid-column: 1 / -1; }
.teacher-surface .n-guardian-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.teacher-surface .n-form-section {
    min-width: 0;
    margin: 0;
    border: 1px solid var(--n-border-light);
    border-radius: var(--n-radius-lg);
    background: #fbfbfa;
    padding: .9rem;
}
.teacher-surface .n-form-section legend {
    display: flex;
    align-items: center;
    width: auto;
    gap: .4rem;
    margin: 0 0 .75rem;
    color: var(--n-text);
    font-size: .72rem;
    font-weight: 800;
}
.teacher-surface .n-form-section legend > span { display: grid; place-items: center; width: 1.55rem; height: 1.55rem; border-radius: .48rem; background: var(--n-brand-pale); color: var(--n-brand-dark); }
.teacher-surface .n-form-section legend small { color: var(--n-text-muted); font-size: .56rem; font-weight: 600; }
.teacher-surface .n-registration-edit .n-form-field label { display: block; margin: 0 0 .3rem; color: var(--n-text); font-size: .62rem; font-weight: 750; }
.teacher-surface .n-registration-edit .n-form-field .form-control { width: 100%; min-height: 2.6rem; margin: 0; border-radius: .65rem; font-size: .68rem; }
.teacher-surface .n-registration-edit textarea.form-control { min-height: 6rem; resize: vertical; }
.teacher-surface .n-address-grid { grid-template-columns: minmax(0, 2fr) minmax(7rem, .55fr) minmax(9rem, .8fr) minmax(9rem, .8fr) !important; }
.teacher-surface .n-address-grid .is-wide { grid-column: auto; }
.teacher-surface .n-administrative-grid { grid-template-columns: minmax(12rem, .55fr) minmax(0, 1.45fr) !important; }
.teacher-surface .n-registration-student-section { display: grid; gap: .75rem; }
.teacher-surface .n-registration-student-section > header { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; padding: .2rem .15rem 0; }
.teacher-surface .n-registration-student-section > header h2 { margin: .16rem 0 0; font-size: 1.15rem; }
.teacher-surface .n-registration-student-section > header > span { border-radius: var(--n-radius-full); background: #f5f5f4; padding: .32rem .55rem; color: var(--n-text-muted); font-size: .6rem; font-weight: 750; }
.teacher-surface .n-registration-student-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.teacher-surface .n-registration-student-card { min-width: 0; border: 1px solid var(--n-border); border-radius: var(--n-radius-xl); background: rgba(255,255,255,.94); padding: 1rem; box-shadow: var(--n-shadow-sm); }
.teacher-surface .n-registration-student-card > header { display: flex; align-items: center; min-width: 0; gap: .65rem; margin-bottom: .85rem; }
.teacher-surface .n-registration-student-card > header > div { min-width: 0; }
.teacher-surface .n-registration-student-card h3,
.teacher-surface .n-registration-student-card small { display: block; overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-registration-student-card h3 { font-size: .82rem; }
.teacher-surface .n-registration-student-card small { color: var(--n-text-muted); font-size: .57rem; }
.teacher-surface .n-student-decision { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin-top: .75rem; border-top: 1px solid var(--n-border-light); padding-top: .75rem; }
.teacher-surface .n-student-decision > div:not(.n-form-field) { border-radius: .65rem; background: #f8f7f5; padding: .58rem .65rem; }
.teacher-surface .n-student-decision > div span,
.teacher-surface .n-student-decision > div strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-student-decision > div span { color: var(--n-text-muted); font-size: .54rem; font-weight: 650; }
.teacher-surface .n-student-decision > div strong { margin-top: .1rem; color: var(--n-text); font-size: .65rem; }
.teacher-surface .n-student-decision > .n-form-field { grid-column: 1 / -1; }
.teacher-surface .n-sticky-form-actions {
    position: sticky;
    bottom: .7rem;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    border: 1px solid rgba(8,145,178,.2);
    border-radius: var(--n-radius-lg);
    background: rgba(255,255,255,.96);
    padding: .68rem .75rem .68rem .9rem;
    box-shadow: var(--n-shadow-lg);
    backdrop-filter: blur(14px);
}
.teacher-surface .n-sticky-form-actions > span { display: flex; align-items: center; gap: .35rem; color: var(--n-text-muted); font-size: .61rem; }
.teacher-surface .n-sticky-form-actions > span i { color: var(--n-brand); }
.teacher-surface .n-sticky-form-actions > div { display: flex; gap: .45rem; }
.teacher-surface .n-sticky-form-actions .btn { margin: 0; }

/* Confirmation workspace */
.teacher-surface .n-confirmation-container { max-width: 42rem; }
.teacher-surface .n-back-link { display: inline-flex; align-items: center; gap: .32rem; margin-bottom: .8rem; color: var(--n-text-secondary); font-size: .65rem; font-weight: 700; }
.teacher-surface .n-confirmation-card { position: relative; overflow: hidden; border: 1px solid var(--n-border); border-radius: 1.15rem; background: rgba(255,255,255,.96); padding: clamp(1.2rem, 4vw, 2rem); box-shadow: var(--n-shadow-lg); }
.teacher-surface .n-confirmation-card::before { position: absolute; inset: 0 0 auto; height: .22rem; background: linear-gradient(90deg, var(--n-brand-dark), var(--n-brand-light)); content: ''; }
.teacher-surface .n-confirmation-card.is-danger::before { background: linear-gradient(90deg, #9f1239, #fb7185); }
.teacher-surface .n-confirmation-icon { display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: .85rem; border-radius: .9rem; background: var(--n-brand-pale); color: var(--n-brand-dark); font-size: 1.35rem; }
.teacher-surface .n-confirmation-card.is-danger .n-confirmation-icon { background: #fff1f2; color: #be123c; }
.teacher-surface .n-confirmation-card h1 { margin: .18rem 0 .4rem; font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -.035em; }
.teacher-surface .n-confirmation-card > p { margin: 0; color: var(--n-text-secondary); line-height: 1.55; }
.teacher-surface .n-confirmation-summary { margin: 1rem 0; border: 1px solid var(--n-border-light); border-radius: var(--n-radius-lg); background: #fafaf9; padding: .8rem; }
.teacher-surface .n-confirmation-summary > strong { display: block; margin-bottom: .5rem; font-size: .72rem; }
.teacher-surface .n-confirmation-summary ul { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.teacher-surface .n-confirmation-summary li { display: inline-flex; align-items: center; gap: .25rem; border-radius: var(--n-radius-full); background: #fff; padding: .28rem .48rem; color: var(--n-text-secondary); font-size: .58rem; box-shadow: 0 0 0 1px var(--n-border-light); }
.teacher-surface .n-confirmation-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.teacher-surface .n-confirmation-fields label { display: block; margin-bottom: .3rem; color: var(--n-text); font-size: .62rem; font-weight: 750; }
.teacher-surface .n-confirmation-fields .form-control { margin: 0; border-radius: .65rem; }
.teacher-surface .n-confirmation-actions { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; border-top: 1px solid var(--n-border-light); padding-top: 1rem; }
.teacher-surface .n-confirmation-actions .btn { margin: 0; }

/* Establishment attendance filters */
.teacher-surface .n-filter-panel { margin-bottom: 1rem; }
.teacher-surface .n-attendance-filter-form { display: grid; grid-template-columns: minmax(11rem, .75fr) minmax(9rem, .6fr) minmax(15rem, 1.2fr) auto; align-items: end; gap: .7rem; }
.teacher-surface .n-attendance-filter-form .n-form-field label,
.teacher-surface .n-attendance-type-filter legend { display: block; width: auto; margin: 0 0 .3rem; color: var(--n-text); font-size: .61rem; font-weight: 750; }
.teacher-surface .n-attendance-filter-form .form-control { width: 100%; min-height: 2.55rem; margin: 0; border-radius: .65rem; font-size: .67rem; }
.teacher-surface .n-attendance-filter-form > .btn { min-height: 2.55rem; margin: 0; white-space: nowrap; }
.teacher-surface .n-attendance-type-filter { min-width: 0; margin: 0; border: 0; padding: 0; }
.teacher-surface .n-attendance-type-filter > label { display: inline-block; margin: 0 .3rem 0 0; cursor: pointer; }
.teacher-surface .n-attendance-type-filter input { position: absolute; opacity: 0; }
.teacher-surface .n-attendance-type-filter label > span { display: inline-flex; align-items: center; min-height: 2.55rem; gap: .3rem; border: 1px solid var(--n-border); border-radius: .65rem; background: #fff; padding: .45rem .65rem; color: var(--n-text-muted); font-size: .63rem; font-weight: 700; }
.teacher-surface .n-attendance-type-filter input:checked + span { border-color: rgba(8,145,178,.35); background: var(--n-brand-pale); color: var(--n-brand-dark); }
.teacher-surface .n-attendance-type-filter input:focus-visible + span { outline: 3px solid var(--n-brand-glow); outline-offset: 2px; }
.teacher-surface .n-attendance-count { color: var(--n-text); font-size: .84rem; }

/* Video library and editor */
.teacher-surface .n-video-editor-modal .modal-dialog { max-width: 52rem; }
.teacher-surface .n-video-editor-modal .modal-content { overflow: hidden; border: 0; border-radius: var(--n-radius-xl); box-shadow: var(--n-shadow-lg); }
.teacher-surface .n-video-editor-modal .modal-header { align-items: flex-start; gap: 1rem; padding: 1.15rem 1.25rem; }
.teacher-surface .n-video-editor-modal .modal-header .n-form-hint { display: block; margin: .25rem 0 0; }
.teacher-surface .n-video-editor-modal .modal-body { padding: 1.15rem 1.25rem; }
.teacher-surface .n-video-editor-modal .modal-footer { gap: .5rem; padding: .85rem 1.25rem 1.1rem; }
.teacher-surface .n-video-editor-modal .modal-footer .btn { min-height: 2.75rem; margin: 0; }
.teacher-surface .n-video-form-grid { grid-template-columns: minmax(11rem, 1fr) minmax(7rem, .5fr) minmax(11rem, .8fr); }
.teacher-surface .n-video-form-grid > .is-wide { grid-column: 1 / -1; }
.teacher-surface .n-video-form .n-form-field label { display: block; margin: 0 0 .3rem; color: var(--n-text); font-size: .62rem; font-weight: 750; }
.teacher-surface .n-video-form .form-control { width: 100%; min-height: 2.6rem; margin: 0; border-radius: .65rem; font-size: .68rem; }
.teacher-surface .n-video-form .n-form-field small { display: block; margin-top: .28rem; color: var(--n-text-muted); font-size: .55rem; }
.teacher-surface .n-video-form .n-file-control { height: auto; padding: .55rem; }
.teacher-surface .n-video-visibility { display: block; align-self: end; margin: 0; cursor: pointer; }
.teacher-surface .n-video-visibility > input { position: absolute; opacity: 0; }
.teacher-surface .n-video-visibility > span { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .05rem .5rem; min-height: 2.6rem; border: 1px solid var(--n-border); border-radius: .65rem; background: #fff; padding: .45rem .65rem; }
.teacher-surface .n-video-visibility i { grid-row: 1 / 3; color: var(--n-text-muted); font-size: 1.05rem; }
.teacher-surface .n-video-visibility strong,
.teacher-surface .n-video-visibility small { display: block; }
.teacher-surface .n-video-visibility strong { color: var(--n-text); font-size: .64rem; }
.teacher-surface .n-video-visibility small { color: var(--n-text-muted); font-size: .52rem; font-weight: 500; }
.teacher-surface .n-video-visibility input:checked + span { border-color: #86efac; background: #f0fdf4; }
.teacher-surface .n-video-visibility input:checked + span i { color: #15803d; }
.teacher-surface .n-video-visibility input:focus-visible + span { outline: 3px solid var(--n-brand-glow); outline-offset: 2px; }
.teacher-surface .n-video-part { display: inline-flex; border-radius: var(--n-radius-full); background: #f5f5f4; padding: .27rem .46rem; color: var(--n-text-secondary); font-size: .58rem; font-weight: 750; }
.teacher-surface .n-video-source { max-width: 11rem; }
.teacher-surface .n-video-preview { display: grid; place-items: center; min-height: 18rem; overflow: hidden; border-radius: .75rem; background: #0f172a; }
.teacher-surface .n-video-preview video,
.teacher-surface .n-video-preview iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
.teacher-surface .n-video-preview-modal .modal-content { overflow: hidden; border: 0; border-radius: var(--n-radius-xl); }

@media (max-width: 991.98px) {
    .teacher-surface .n-registration-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .teacher-surface .n-guardian-grid,
    .teacher-surface .n-registration-student-grid { grid-template-columns: minmax(0, 1fr); }
    .teacher-surface .n-address-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .teacher-surface .n-address-grid .is-wide { grid-column: 1 / -1; }
    .teacher-surface .n-attendance-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .teacher-surface .n-attendance-filter-form > .btn { justify-self: start; }
}

@media (max-width: 767.98px) {
    .teacher-surface .n-registration-panel-header { align-items: stretch; flex-direction: column; }
    .teacher-surface .n-registration-actions { justify-content: flex-start; }
    .teacher-surface .n-registration-edit-form .n-form-grid,
    .teacher-surface .n-registration-edit-form .n-form-grid-3,
    .teacher-surface .n-address-grid,
    .teacher-surface .n-administrative-grid,
    .teacher-surface .n-confirmation-fields,
    .teacher-surface .n-attendance-filter-form,
    .teacher-surface .n-video-form-grid { grid-template-columns: minmax(0, 1fr) !important; }
    .teacher-surface .n-sticky-form-actions { bottom: 5.2rem; align-items: stretch; flex-direction: column; }
    .teacher-surface .n-sticky-form-actions > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .teacher-surface .n-sticky-form-actions .btn { width: 100%; }
    .teacher-surface .n-attendance-filter-form > .btn { width: 100%; }
}

@media (max-width: 575.98px) {
    .teacher-surface .n-registration-stats { grid-template-columns: minmax(0, 1fr); }
    .teacher-surface .n-registration-actions { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
    .teacher-surface .n-registration-actions .btn,
    .teacher-surface .n-selection-count { width: 100%; justify-content: center; }
    .teacher-surface .n-registration-student-section > header { align-items: flex-start; flex-direction: column; }
    .teacher-surface .n-student-decision { grid-template-columns: minmax(0, 1fr); }
    .teacher-surface .n-student-decision > .n-form-field { grid-column: auto; }
    .teacher-surface .n-sticky-form-actions > div { grid-template-columns: minmax(0, 1fr); }
    .teacher-surface .n-confirmation-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
    .teacher-surface .n-confirmation-actions .btn { width: 100%; }
    .teacher-surface .n-attendance-type-filter > label { display: block; margin: 0 0 .35rem; }
    .teacher-surface .n-attendance-type-filter label > span { width: 100%; }
    .teacher-surface .n-video-editor-modal .modal-dialog { margin: .5rem; }
    .teacher-surface .n-video-editor-modal .modal-content { max-height: calc(100dvh - 1rem); }
    .teacher-surface .n-video-editor-modal .modal-body { overflow-y: auto; }
    .teacher-surface .n-video-editor-modal .modal-footer { display: grid; grid-template-columns: minmax(0, 1fr); }
    .teacher-surface .n-video-editor-modal .modal-footer .btn { width: 100%; }
    .teacher-surface .n-video-preview { min-height: 11rem; }
}

/* Teacher grade reports: isolated from the family/admin and generic table surfaces. */
@media (min-width: 992px) {
    .teacher-surface .n-teacher-primary-nav.collapse,
    .admin-surface .n-teacher-primary-nav.collapse { display: flex; }
}

.teacher-surface .n-report-page .n-teacher-page-header { align-items: flex-end; }
.teacher-surface .n-report-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.teacher-surface .n-report-overview .n-teacher-metric.is-success > i { background: #ecfdf5; color: #047857; }
.teacher-surface .n-report-periods { display: flex; gap: .45rem; margin-bottom: 1.15rem; overflow-x: auto; padding: .2rem .1rem .45rem; scrollbar-width: thin; }
.teacher-surface .n-report-periods > a { display: grid; min-width: 9.5rem; flex: 0 0 auto; gap: .08rem; border: 1px solid var(--n-border); border-radius: .75rem; background: rgba(255,255,255,.82); padding: .62rem .75rem; color: var(--n-text-secondary); box-shadow: var(--n-shadow-xs); }
.teacher-surface .n-report-periods > a:hover { border-color: rgba(8,145,178,.35); color: var(--n-brand-dark); text-decoration: none; }
.teacher-surface .n-report-periods > a.active { border-color: var(--n-brand); background: var(--n-brand-dark); color: #fff; box-shadow: var(--n-shadow-brand); }
.teacher-surface .n-report-periods span { font-size: .7rem; font-weight: 800; }
.teacher-surface .n-report-periods small { color: inherit; font-size: .56rem; opacity: .72; }
.teacher-surface .n-report-classes { display: flex; align-items: center; gap: .45rem; margin: -.25rem 0 1rem; overflow-x: auto; padding: .15rem .1rem .35rem; }
.teacher-surface .n-report-classes > span { display: inline-flex; align-items: center; flex: 0 0 auto; gap: .28rem; color: var(--n-text-muted); font-size: .58rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.teacher-surface .n-report-classes > a { display: grid; min-width: 8.5rem; flex: 0 0 auto; gap: .04rem; border: 1px solid var(--n-border); border-radius: var(--n-radius-full); background: #fff; padding: .4rem .65rem; color: var(--n-text-secondary); box-shadow: var(--n-shadow-xs); }
.teacher-surface .n-report-classes > a:hover,
.teacher-surface .n-report-classes > a:focus-visible { border-color: rgba(8,145,178,.35); color: var(--n-brand-dark); outline: 0; text-decoration: none; }
.teacher-surface .n-report-classes > a:focus-visible { box-shadow: 0 0 0 3px var(--n-brand-glow); }
.teacher-surface .n-report-classes strong,
.teacher-surface .n-report-classes small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-report-classes strong { font-size: .61rem; }
.teacher-surface .n-report-classes small { color: var(--n-text-muted); font-size: .49rem; }
.teacher-surface .n-report-empty { padding-block: 4rem; }
.teacher-surface .n-report-workspaces { display: grid; gap: 1rem; }
.teacher-surface .n-report-workspace { overflow: visible; margin: 0; scroll-margin-top: 5.8rem; }
.teacher-surface .n-report-workspace-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--n-border-light); padding: 1rem 1.15rem; }
.teacher-surface .n-report-workspace-header code { display: inline-block; max-width: 14rem; overflow: hidden; border-radius: var(--n-radius-full); background: #f5f5f4; padding: .2rem .45rem; color: var(--n-text-muted); font-size: .55rem; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-report-class-stats { display: grid; grid-template-columns: repeat(4, minmax(4.5rem, 1fr)); overflow: hidden; margin: 0; border: 1px solid var(--n-border-light); border-radius: .72rem; background: #fafaf9; }
.teacher-surface .n-report-class-stats > div { padding: .48rem .65rem; text-align: center; }
.teacher-surface .n-report-class-stats > div + div { border-left: 1px solid var(--n-border-light); }
.teacher-surface .n-report-class-stats dt { color: var(--n-text-muted); font-size: .52rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.teacher-surface .n-report-class-stats dd { margin: .08rem 0 0; color: var(--n-text); font-size: .72rem; font-weight: 800; }
.teacher-surface .n-report-layout { display: grid; grid-template-columns: minmax(12.5rem, 15.5rem) minmax(0, 1fr); align-items: start; gap: 1rem; padding: 1rem; }
.teacher-surface .n-report-student-nav { position: sticky; top: 5.5rem; display: grid; gap: .35rem; max-height: calc(100vh - 7rem); overflow-y: auto; padding-right: .25rem; }
.teacher-surface .n-report-student-nav > button { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; min-width: 0; gap: .55rem; width: 100%; border: 1px solid transparent; border-radius: .7rem; background: transparent; padding: .52rem .55rem; color: var(--n-text-secondary); text-align: left; cursor: pointer; }
.teacher-surface .n-report-student-nav > button:hover { border-color: var(--n-border); background: #fafaf9; color: var(--n-text); }
.teacher-surface .n-report-student-nav > button.active { border-color: rgba(8,145,178,.28); background: var(--n-brand-pale); color: var(--n-brand-dark); }
.teacher-surface .n-report-student-nav > button:focus-visible { outline: 3px solid var(--n-brand-glow); outline-offset: 1px; }
.teacher-surface .n-report-student-nav strong,
.teacher-surface .n-report-student-nav small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-report-student-nav strong { font-size: .65rem; }
.teacher-surface .n-report-student-nav small { margin-top: .08rem; color: var(--n-text-muted); font-size: .52rem; }
.teacher-surface .n-report-student-nav > button > i { color: var(--n-text-muted); }
.teacher-surface .n-report-student-nav > button > i.is-validated { color: #047857; }
.teacher-surface .n-report-student-list { display: grid; min-width: 0; gap: .7rem; }
.teacher-surface .n-report-student-card { overflow: clip; border: 1px solid var(--n-border); border-radius: .85rem; background: #fff; box-shadow: var(--n-shadow-xs); scroll-margin-top: 5.8rem; }
.teacher-surface .n-report-student-card[open] { border-color: rgba(8,145,178,.24); box-shadow: var(--n-shadow-md); }
.teacher-surface .n-report-student-card > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: .75rem; min-height: 4.15rem; padding: .65rem .8rem; cursor: pointer; list-style: none; }
.teacher-surface .n-report-student-card > summary::-webkit-details-marker { display: none; }
.teacher-surface .n-report-student-card > summary:focus-visible { outline: 3px solid var(--n-brand-glow); outline-offset: -3px; }
.teacher-surface .n-report-student-heading strong,
.teacher-surface .n-report-student-heading small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-report-student-heading strong { color: var(--n-text); font-size: .76rem; }
.teacher-surface .n-report-student-heading small { margin-top: .08rem; color: var(--n-text-muted); font-size: .55rem; }
.teacher-surface .n-report-summary-metrics { display: flex; gap: .35rem; }
.teacher-surface .n-report-summary-metrics > span { min-width: 4.4rem; border-radius: .58rem; background: #f7f7f6; padding: .35rem .5rem; text-align: center; }
.teacher-surface .n-report-summary-metrics small,
.teacher-surface .n-report-summary-metrics strong { display: block; }
.teacher-surface .n-report-summary-metrics small { color: var(--n-text-muted); font-size: .48rem; text-transform: uppercase; }
.teacher-surface .n-report-summary-metrics strong { margin-top: .05rem; color: var(--n-text); font-size: .65rem; }
.teacher-surface .n-report-state { display: inline-flex; align-items: center; gap: .25rem; border-radius: var(--n-radius-full); padding: .3rem .48rem; font-size: .55rem; font-weight: 800; }
.teacher-surface .n-report-state.is-draft { background: #fff7ed; color: #9a3412; }
.teacher-surface .n-report-state.is-validated { background: #ecfdf5; color: #047857; }
.teacher-surface .n-report-chevron { color: var(--n-text-muted); transition: transform .15s ease; }
.teacher-surface .n-report-student-card[open] > summary .n-report-chevron { transform: rotate(180deg); }
.teacher-surface .n-report-form { border-top: 1px solid var(--n-border-light); }
.teacher-surface .n-report-editable { min-width: 0; margin: 0; border: 0; padding: .9rem; }
.teacher-surface .n-report-editable[disabled] { background: #fafaf9; }
.teacher-surface .n-report-mode-selector { display: flex; gap: .35rem; margin: 0 0 .85rem; border: 0; padding: 0; }
.teacher-surface .n-report-mode-selector legend { width: 100%; margin: 0 0 .38rem; color: var(--n-text-muted); font-size: .57rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.teacher-surface .n-report-mode-selector label { flex: 0 1 auto; margin: 0; cursor: pointer; }
.teacher-surface .n-report-mode-selector input { position: absolute; opacity: 0; pointer-events: none; }
.teacher-surface .n-report-mode-selector span { display: inline-flex; align-items: center; gap: .32rem; min-height: 2.35rem; border: 1px solid var(--n-border); border-radius: .65rem; background: #fff; padding: .45rem .65rem; color: var(--n-text-secondary); font-size: .62rem; font-weight: 750; }
.teacher-surface .n-report-mode-selector input:checked + span { border-color: var(--n-brand); background: var(--n-brand-dark); color: #fff; box-shadow: var(--n-shadow-brand); }
.teacher-surface .n-report-mode-selector input:focus-visible + span { outline: 3px solid var(--n-brand-glow); outline-offset: 2px; }
.teacher-surface .n-report-noscript { margin: 0 0 .8rem; border-radius: .65rem; background: #fff7ed; padding: .65rem .75rem; color: #9a3412; font-size: .65rem; }
.teacher-surface .n-report-mode-panel { border: 1px solid var(--n-border-light); border-radius: .78rem; background: #fcfcfb; padding: .8rem; }
.teacher-surface .n-report-mode-panel[hidden] { display: none !important; }
.teacher-surface .n-report-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .7rem; }
.teacher-surface .n-report-panel-heading h3 { margin: 0; font-size: .78rem; }
.teacher-surface .n-report-panel-heading p { margin: .12rem 0 0; color: var(--n-text-muted); font-size: .58rem; }
.teacher-surface .n-report-subject-list { display: grid; gap: .65rem; }
.teacher-surface .n-report-subject { overflow: hidden; border: 1px solid var(--n-border-light); border-radius: .7rem; background: #fff; }
.teacher-surface .n-report-subject > header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem .75rem; }
.teacher-surface .n-report-subject > header h4 { margin: 0; font-size: .7rem; }
.teacher-surface .n-report-subject > header > div > span { color: var(--n-text-muted); font-size: .53rem; }
.teacher-surface .n-report-subject > header dl { display: grid; grid-template-columns: repeat(4, minmax(3.7rem, 1fr)); overflow: hidden; margin: 0; border: 1px solid var(--n-border-light); border-radius: .55rem; }
.teacher-surface .n-report-subject > header dl > div { padding: .3rem .45rem; text-align: center; }
.teacher-surface .n-report-subject > header dl > div + div { border-left: 1px solid var(--n-border-light); }
.teacher-surface .n-report-subject dt { color: var(--n-text-muted); font-size: .45rem; text-transform: uppercase; }
.teacher-surface .n-report-subject dd { margin: .04rem 0 0; color: var(--n-text); font-size: .58rem; font-weight: 800; }
.teacher-surface .n-report-grade-list { display: flex; flex-wrap: wrap; gap: .4rem; border-top: 1px solid var(--n-border-light); padding: .6rem .7rem; }
.teacher-surface .n-report-grade { position: relative; }
.teacher-surface .n-report-grade > summary { display: flex; align-items: center; gap: .35rem; border: 1px solid #bbf7d0; border-radius: .55rem; background: #f0fdf4; padding: .35rem .48rem; color: #166534; cursor: pointer; list-style: none; }
.teacher-surface .n-report-grade > summary::-webkit-details-marker { display: none; }
.teacher-surface .n-report-grade.is-medium > summary { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.teacher-surface .n-report-grade.is-low > summary { border-color: #fecdd3; background: #fff1f2; color: #9f1239; }
.teacher-surface .n-report-grade.is-neutral > summary { border-color: #d6d3d1; background: #f5f5f4; color: #57534e; }
.teacher-surface .n-report-grade > summary strong,
.teacher-surface .n-report-grade > summary small { display: block; }
.teacher-surface .n-report-grade > summary strong { font-size: .6rem; }
.teacher-surface .n-report-grade > summary small { font-size: .47rem; opacity: .76; }
.teacher-surface .n-report-grade[open] { width: 100%; }
.teacher-surface .n-report-grade[open] > summary { width: fit-content; }
.teacher-surface .n-report-grade > div { margin-top: .4rem; border: 1px solid var(--n-border-light); border-radius: .62rem; background: #fafaf9; padding: .65rem; color: var(--n-text-secondary); font-size: .62rem; }
.teacher-surface .n-report-grade > div h5 { margin: 0 0 .25rem; color: var(--n-text); font-size: .7rem; }
.teacher-surface .n-report-grade > div p { margin: .25rem 0; }
.teacher-surface .n-report-grade > div dl { display: flex; flex-wrap: wrap; gap: .7rem; margin: .35rem 0; }
.teacher-surface .n-report-grade > div dl div { display: flex; gap: .25rem; }
.teacher-surface .n-report-grade > div dd { margin: 0; font-weight: 750; }
.teacher-surface .n-report-grade > div .btn { margin: .35rem 0 0; }
.teacher-surface .n-report-inline-empty { display: flex; align-items: center; gap: .55rem; border: 1px dashed var(--n-border); border-radius: .68rem; padding: .75rem; color: var(--n-text-muted); }
.teacher-surface .n-report-inline-empty > i { color: var(--n-brand); font-size: 1.15rem; }
.teacher-surface .n-report-inline-empty strong,
.teacher-surface .n-report-inline-empty small { display: block; }
.teacher-surface .n-report-inline-empty strong { color: var(--n-text); font-size: .68rem; }
.teacher-surface .n-report-inline-empty small { margin-top: .1rem; font-size: .56rem; }
.teacher-surface .n-report-manual-grid { overflow: hidden; border: 1px solid var(--n-border-light); border-radius: .66rem; background: #fff; }
.teacher-surface .n-report-manual-head,
.teacher-surface .n-report-manual-row { display: grid; grid-template-columns: minmax(8rem, 1.35fr) minmax(6rem, .6fr) minmax(6rem, .6fr); align-items: center; gap: .55rem; padding: .5rem .65rem; }
.teacher-surface .n-report-manual-head { background: #f5f5f4; color: var(--n-text-muted); font-size: .5rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.teacher-surface .n-report-manual-row + .n-report-manual-row { border-top: 1px solid var(--n-border-light); }
.teacher-surface .n-report-manual-row > label:not(.sr-only) { margin: 0; color: var(--n-text); font-size: .64rem; font-weight: 700; }
.teacher-surface .n-report-manual-row .form-control { height: 2.25rem; margin: 0; border-radius: .55rem; font-size: .64rem; }
.teacher-surface .n-report-simple-list { display: grid; gap: .5rem; }
.teacher-surface .n-report-simple-row { display: grid; grid-template-columns: 1.5rem minmax(8rem, .65fr) minmax(12rem, 1.35fr); align-items: start; gap: .55rem; border: 1px solid var(--n-border-light); border-radius: .68rem; background: #fff; padding: .6rem; }
.teacher-surface .n-report-simple-row > span { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; margin-top: 1.15rem; border-radius: 50%; background: var(--n-brand-pale); color: var(--n-brand-dark); font-size: .56rem; font-weight: 800; }
.teacher-surface .n-report-simple-row label { display: block; margin: 0 0 .25rem; color: var(--n-text); font-size: .58rem; font-weight: 750; }
.teacher-surface .n-report-simple-row .form-control { margin: 0; border-radius: .55rem; font-size: .64rem; }
.teacher-surface .n-report-simple-row textarea { min-height: 3.5rem; resize: vertical; }
.teacher-surface .n-report-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; margin-top: .7rem; }
.teacher-surface .n-report-stats[hidden] { display: none !important; }
.teacher-surface .n-report-stats > div { display: flex; align-items: center; min-width: 0; gap: .45rem; border: 1px solid var(--n-border-light); border-radius: .65rem; background: #fafaf9; padding: .55rem; }
.teacher-surface .n-report-stats > div > i { color: var(--n-brand); font-size: .9rem; }
.teacher-surface .n-report-stats small,
.teacher-surface .n-report-stats strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-surface .n-report-stats small { color: var(--n-text-muted); font-size: .48rem; }
.teacher-surface .n-report-stats strong { margin-top: .04rem; color: var(--n-text); font-size: .6rem; }
.teacher-surface .n-report-final-fields { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(10rem, .4fr); align-items: start; gap: .7rem; margin-top: .7rem; }
.teacher-surface .n-report-final-fields > div { min-width: 0; }
.teacher-surface .n-report-final-fields > div[hidden] { display: none !important; }
.teacher-surface .n-report-final-fields label { display: block; margin-bottom: .3rem; color: var(--n-text); font-size: .62rem; font-weight: 750; }
.teacher-surface .n-report-final-fields textarea { min-height: 6.3rem; resize: vertical; }
.teacher-surface .n-report-final-fields .form-control { margin: 0; border-radius: .62rem; font-size: .66rem; }
.teacher-surface .n-report-final-fields > div > small { display: block; margin-top: .28rem; color: var(--n-text-muted); font-size: .53rem; }
.teacher-surface .n-input-with-suffix { display: flex; overflow: hidden; border: 1px solid var(--n-border); border-radius: .62rem; background: #f5f5f4; }
.teacher-surface .n-input-with-suffix .form-control { border: 0; border-radius: 0; box-shadow: none; }
.teacher-surface .n-input-with-suffix > span { display: flex; align-items: center; flex: 0 0 auto; padding: 0 .55rem; color: var(--n-text-muted); font-size: .54rem; }
.teacher-surface .n-report-form-actions { display: flex; align-items: center; justify-content: space-between; gap: .75rem; border-top: 1px solid var(--n-border-light); background: #fff; padding: .7rem .9rem; }
.teacher-surface .n-report-form-actions > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .45rem; }
.teacher-surface .n-report-form-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 2.35rem; margin: 0; font-size: .64rem; }
.teacher-surface .n-report-save-status { display: flex; align-items: center; gap: .3rem; color: var(--n-text-muted); font-size: .6rem; font-weight: 650; }
.teacher-surface .n-report-save-status.is-dirty { color: #9a3412; }
.teacher-surface .n-report-save-status.is-saving { color: var(--n-brand-dark); }
.teacher-surface .n-report-save-status.is-success { color: #047857; }
.teacher-surface .n-report-save-status.is-error { color: #be123c; }
.teacher-surface .n-report-form [aria-busy="true"] { cursor: wait; opacity: .72; }

@media (max-width: 991.98px) {
    .teacher-surface .n-report-layout { grid-template-columns: minmax(0, 1fr); }
    .teacher-surface .n-report-student-nav { position: static; display: flex; max-height: none; overflow-x: auto; padding: 0 0 .3rem; }
    .teacher-surface .n-report-student-nav > button { min-width: 12.5rem; flex: 0 0 auto; }
    .teacher-surface .n-report-student-card { scroll-margin-top: 5rem; }
}

@media (max-width: 767.98px) {
    .teacher-surface .n-report-page .n-teacher-page-header,
    .teacher-surface .n-report-workspace-header { align-items: stretch; flex-direction: column; }
    .teacher-surface .n-report-overview { grid-template-columns: minmax(0, 1fr); }
    .teacher-surface .n-report-class-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .teacher-surface .n-report-class-stats > div:nth-child(3) { border-left: 0; }
    .teacher-surface .n-report-class-stats > div:nth-child(n+3) { border-top: 1px solid var(--n-border-light); }
    .teacher-surface .n-report-student-card > summary { grid-template-columns: auto minmax(0, 1fr) auto; }
    .teacher-surface .n-report-summary-metrics { grid-column: 1 / -1; grid-row: 2; }
    .teacher-surface .n-report-state { grid-column: 3; grid-row: 1; }
    .teacher-surface .n-report-chevron { grid-column: 3; grid-row: 2; justify-self: end; }
    .teacher-surface .n-report-subject > header { align-items: stretch; flex-direction: column; }
    .teacher-surface .n-report-manual-head,
    .teacher-surface .n-report-manual-row { grid-template-columns: minmax(7rem, 1fr) minmax(4.8rem, .55fr) minmax(4.8rem, .55fr); }
    .teacher-surface .n-report-simple-row { grid-template-columns: 1.5rem minmax(0, 1fr); }
    .teacher-surface .n-report-simple-row > div:last-child { grid-column: 2; }
    .teacher-surface .n-report-simple-row > span { grid-row: 1 / 3; }
    .teacher-surface .n-report-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .teacher-surface .n-report-final-fields { grid-template-columns: minmax(0, 1fr); }
    .teacher-surface .n-report-form-actions { align-items: stretch; flex-direction: column; }
    .teacher-surface .n-report-form-actions > div:last-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .teacher-surface .n-report-layout { padding: .6rem; }
    .teacher-surface .n-report-workspace-header { padding: .8rem; }
    .teacher-surface .n-report-editable { padding: .65rem; }
    .teacher-surface .n-report-mode-selector { display: grid; grid-template-columns: minmax(0, 1fr); }
    .teacher-surface .n-report-mode-selector label,
    .teacher-surface .n-report-mode-selector span { width: 100%; }
    .teacher-surface .n-report-manual-head { display: none; }
    .teacher-surface .n-report-manual-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .teacher-surface .n-report-manual-row > label:not(.sr-only) { grid-column: 1 / -1; }
    .teacher-surface .n-report-form-actions > div:last-child { grid-template-columns: minmax(0, 1fr); }
    .teacher-surface .n-report-form-actions .btn { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════
   QURAN-FIRST PRODUCT LAYER — shared family / student experience
   ═══════════════════════════════════════════════════════════════════ */
.family-surface,
.student-surface {
    background:
        radial-gradient(circle at 100% 0, rgba(14,116,144,.075), transparent 27rem),
        linear-gradient(180deg, #fbfcfa 0, var(--n-bg) 34rem);
}

.n-member-header::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 8%, var(--n-brand) 42%, var(--n-gold) 58%, transparent 92%);
    content: "";
    opacity: .55;
    pointer-events: none;
}
.n-member-header .n-teacher-brand strong { color: var(--n-brand-dark); }
.n-member-header .n-teacher-avatar { background: linear-gradient(145deg, var(--n-brand-dark), var(--n-brand)); }
.n-member-header .n-teacher-nav-link:hover,
.n-member-header .n-teacher-nav-link:focus,
.n-member-header .n-teacher-nav-link.active { background: var(--n-brand-pale); color: var(--n-brand-dark); }
.n-member-header .n-teacher-nav-link.active i,
.n-member-header .dropdown-item i { color: var(--n-brand); }
.n-member-header .dropdown-item:hover,
.n-member-header .dropdown-item:focus,
.n-member-header .dropdown-item.active { background: var(--n-brand-pale); color: var(--n-brand-dark); }
.n-member-enrollment {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: .35rem;
    min-height: 2.45rem;
    border: 1px solid rgba(184,135,47,.24);
    border-radius: var(--n-radius-full);
    background: var(--n-gold-pale);
    padding: .45rem .72rem;
    color: var(--n-gold-dark);
    font-size: .67rem;
    font-weight: 800;
    white-space: nowrap;
}
.n-member-enrollment:hover,
.n-member-enrollment:focus { border-color: rgba(184,135,47,.5); color: var(--n-gold-dark); text-decoration: none; box-shadow: 0 0 0 3px rgba(184,135,47,.1); }
.n-member-enrollment i { font-size: .9rem; }

.n-family-dashboard,
.n-student-workspace { min-height: calc(100vh - 9rem); padding: 2.2rem 0 5rem; }
.n-family-dashboard > .container,
.n-student-workspace > .container { max-width: 1180px; }

.n-family-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    min-height: 0;
    gap: 2rem;
    overflow: hidden;
    border: 1px solid rgba(14,116,144,.18);
    border-radius: 1.5rem;
    background:
        radial-gradient(circle at 83% 24%, rgba(255,255,255,.14) 0 2px, transparent 3px),
        radial-gradient(circle at 87% 42%, rgba(255,255,255,.12) 0 2px, transparent 3px),
        linear-gradient(128deg, #083344 0%, var(--n-brand-dark) 48%, var(--n-brand) 100%);
    padding: clamp(1.4rem,3vw,2.3rem);
    color: #fff;
    box-shadow: 0 24px 60px rgba(8,51,68,.18);
}
.n-family-hero::before,
.n-student-hero::before {
    position: absolute;
    width: 18rem;
    height: 18rem;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 4rem;
    content: "";
    pointer-events: none;
    transform: rotate(45deg);
}
.n-family-hero::before { right: -6rem; bottom: -10rem; }
.n-family-hero-copy { position: relative; z-index: 1; max-width: 46rem; }
.n-family-hero .n-eyebrow,
.n-student-hero .n-eyebrow { color: #cffafe; }
.n-family-hero h1 {
    max-width: 34rem;
    margin: 0 0 .5rem;
    color: #fff;
    font-size: clamp(1.5rem,2.4vw,2.1rem);
    letter-spacing: -.03em;
    line-height: 1.12;
}
.n-family-hero-copy > p { max-width: 40rem; margin: 0; color: rgba(255,255,255,.78); font-size: clamp(.9rem,1.5vw,1.05rem); }
.n-family-hero-trust { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.35rem; }
.n-family-hero-trust > span { display: inline-flex; align-items: center; gap: .38rem; min-height: 2rem; border: 1px solid rgba(255,255,255,.14); border-radius: var(--n-radius-full); background: rgba(255,255,255,.08); padding: .35rem .62rem; color: rgba(255,255,255,.9); font-size: .64rem; font-weight: 700; backdrop-filter: blur(6px); }
.n-family-hero-trust i { color: #fde68a; }
.n-quran-signature { position: relative; z-index: 1; display: grid; justify-items: center; min-width: 12rem; }
.n-quran-signature > img { display: block; width: 6.5rem; height: 7.5rem; border: 1px solid rgba(255,255,255,.28); border-radius: 1rem; background: rgba(255,255,255,.95); padding: .6rem; object-fit: contain; box-shadow: 0 1rem 2.5rem rgba(0,0,0,.18); }
.n-quran-signature small { margin-top: .75rem; color: rgba(255,255,255,.72); font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.n-family-children { margin-top: 2.25rem; }
.n-family-children > .n-section-heading,
.n-family-resource-card { max-width: 100%; }
.n-family-child-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.n-family-child-card {
    display: grid;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius-xl);
    background: rgba(255,255,255,.96);
    box-shadow: var(--n-shadow-sm);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.n-family-child-card:hover { transform: translateY(-2px); border-color: rgba(14,116,144,.28); box-shadow: 0 16px 38px rgba(28,25,23,.09); }
.n-family-child-card > header { display: flex; align-items: center; min-width: 0; gap: .85rem; padding: 1.15rem 1.2rem; }
.n-family-child-card > header img { flex: 0 0 5.5rem; width: 5.5rem; height: 5.5rem; border: 3px solid #fff; border-radius: 1.25rem; object-fit: cover; box-shadow: 0 0 0 1px var(--n-border), var(--n-shadow-sm); }
.n-family-child-card > header > div { min-width: 0; }
/* La vignette sans photo : une invitation, pas une impasse. Le cadre pointille
   dit « il manque quelque chose » sans crier, et la pastille appareil photo dit
   quoi faire. Au survol, la vignette se teinte de la couleur de marque. */
.n-family-child-photo-add { position: relative; flex: 0 0 5.5rem; display: block; width: 5.5rem; height: 5.5rem; border-radius: 1.25rem; }
.n-family-child-photo-add img { width: 100%; height: 100%; border-style: dashed !important; border-color: rgba(14,116,144,.4) !important; opacity: .58; transition: opacity .18s ease, border-color .18s ease; }
.n-family-child-photo-add > span[aria-hidden] { position: absolute; right: -.3rem; bottom: -.3rem; display: grid; place-items: center; width: 1.85rem; height: 1.85rem; border: 2px solid #fff; border-radius: var(--n-radius-full); background: var(--n-brand); color: #fff; font-size: .9rem; box-shadow: var(--n-shadow-sm); }
.n-family-child-photo-add:hover img,
.n-family-child-photo-add:focus-visible img { opacity: 1; border-color: var(--n-brand) !important; }
.n-family-photo-nudge { display: flex; align-items: flex-start; gap: .7rem; margin: 0 0 1rem; border: 1px solid rgba(184,135,47,.28); border-radius: 1rem; background: rgba(184,135,47,.07); padding: .8rem .95rem; color: var(--n-text-muted); font-size: .82rem; line-height: 1.5; }
.n-family-photo-nudge > i { flex: 0 0 auto; margin-top: .05rem; color: var(--n-gold); font-size: 1.1rem; }
.n-family-photo-nudge strong { display: block; color: var(--n-text); font-size: .88rem; }
.n-family-child-card h3,
.n-family-child-card p { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.n-family-child-card h3 { margin-top: .18rem; font-size: 1.32rem; letter-spacing: -.015em; }
.n-family-child-card p { margin-top: .2rem; color: var(--n-text-muted); font-size: .82rem; font-weight: 600; }
.n-family-child-focus { display: flex; align-items: center; gap: .72rem; margin: 0 1.2rem; border: 1px solid rgba(8,127,107,.12); border-radius: .78rem; background: linear-gradient(135deg,var(--n-quran-pale),#fff); padding: .75rem .8rem; }
.n-family-child-focus > i { display: grid; place-items: center; flex: 0 0 2.35rem; width: 2.35rem; height: 2.35rem; border-radius: .7rem; background: var(--n-quran); color: #fff; font-size: 1.05rem; }
.n-family-child-focus strong,
.n-family-child-focus small { display: block; }
.n-family-child-focus strong { color: var(--n-quran-dark); font-size: .75rem; }
.n-family-child-focus small { margin-top: .1rem; color: var(--n-text-muted); font-size: .62rem; }
.n-family-child-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; padding: 1rem 1.2rem 1.2rem; }
.n-family-child-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; gap: .35rem; margin: 0; font-size: .68rem; font-weight: 800; }
.n-family-child-actions .btn-primary,
.n-quran-primary { border-color: var(--n-quran) !important; background: linear-gradient(135deg,var(--n-quran),var(--n-quran-dark)) !important; color: #fff !important; box-shadow: 0 8px 20px var(--n-quran-glow); }
.n-family-child-actions .btn-primary:hover,
.n-quran-primary:hover { border-color: var(--n-quran-dark) !important; color: #fff !important; transform: translateY(-1px); }
.n-family-resource-card { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 1rem; margin-top: 1.25rem; border: 1px solid rgba(184,135,47,.18); border-radius: var(--n-radius-xl); background: linear-gradient(120deg,#fff,var(--n-gold-pale)); padding: 1.15rem 1.25rem; box-shadow: var(--n-shadow-sm); }
.n-family-resource-icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: .85rem; background: #fff; color: var(--n-gold-dark); font-size: 1.3rem; box-shadow: 0 0 0 1px rgba(184,135,47,.16); }
.n-family-resource-card h2,
.n-family-resource-card p { margin: 0; }
.n-family-resource-card h2 { margin-top: .12rem; font-size: 1rem; }
.n-family-resource-card p { margin-top: .12rem; color: var(--n-text-secondary); font-size: .7rem; }
.n-family-resource-card .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.7rem; gap: .3rem; margin: 0; font-size: .68rem; font-weight: 800; }

.n-student-workspace { padding-top: 1.65rem; }
.n-student-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 1.25rem;
    overflow: hidden;
    border: 1px solid rgba(14,116,144,.18);
    border-radius: var(--n-radius-xl);
    background: linear-gradient(125deg,#083344 0%,var(--n-brand-dark) 52%,var(--n-brand) 100%);
    padding: 1.35rem 1.5rem 2.8rem;
    color: #fff;
    box-shadow: 0 15px 42px rgba(8,51,68,.15);
}
.n-student-hero::before { right: -10rem; bottom: -12rem; }
.n-student-identity { position: relative; z-index: 1; display: flex; align-items: center; min-width: 0; gap: .9rem; }
.n-student-identity > div { min-width: 0; }
.n-student-avatar { display: grid; place-items: center; flex: 0 0 3.6rem; width: 3.6rem; height: 3.6rem; border: 1px solid rgba(255,255,255,.2); border-radius: 1rem; background: rgba(255,255,255,.12); color: #fff; font-size: 1rem; font-weight: 850; box-shadow: inset 0 0 0 .35rem rgba(255,255,255,.035); }
.n-student-identity h1 { overflow: hidden; margin: .18rem 0 0; color: #fff; font-size: clamp(1.55rem,3.5vw,2.35rem); letter-spacing: -.04em; text-overflow: ellipsis; white-space: nowrap; }
.n-student-identity p { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin: .28rem 0 0; color: rgba(255,255,255,.72); font-size: .72rem; }
.n-student-class { display: inline-flex; align-items: center; gap: .25rem; border-radius: var(--n-radius-full); background: rgba(255,255,255,.1); padding: .25rem .45rem; color: #fff; font-size: .62rem; font-weight: 750; }
.n-student-hero-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
.n-student-hero-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; gap: .38rem; margin: 0; border-radius: .72rem; padding-inline: .85rem; font-size: .69rem; font-weight: 800; }
.n-student-hero-actions .n-quran-primary { border-color: rgba(255,255,255,.42) !important; background: #fff !important; color: var(--n-quran-dark) !important; box-shadow: 0 10px 24px rgba(0,0,0,.12); }
.n-student-hero-actions .btn-outline-secondary { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; }
.n-student-hero-actions .btn-outline-secondary:hover { border-color: rgba(255,255,255,.48); background: rgba(255,255,255,.15); color: #fff; }
.n-student-hero-verse {
    grid-column: 1 / -1;
    position: relative;
    z-index: 1;
    margin-top: .25rem;
}
.n-student-hero-verse .n-verse {
    margin-bottom: 0;
    border-top-color: rgba(255,255,255,.28);
    border-bottom-color: rgba(255,255,255,.14);
}
.n-student-hero-verse .n-verse-arabic { color: #ecfeff; }
.n-student-hero-verse .n-verse-french { color: #e5f7ff; }
.n-student-hero-verse .n-verse-source { color: rgba(255,255,255,.64); }
.n-student-hero-verse .n-verse-mark { color: var(--n-quran-pale); opacity: .12; }
.n-quran-continuity { position: absolute; right: 1.5rem; bottom: .65rem; left: 1.5rem; display: flex; align-items: center; justify-content: flex-end; gap: .45rem; color: rgba(255,255,255,.52); }
.n-quran-continuity > img { width: 1.7rem; height: 2rem; margin-right: auto; border-radius: .3rem; background: rgba(255,255,255,.94); padding: .15rem; object-fit: contain; }
.n-quran-continuity small { font-size: .55rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.n-quran-continuity i { width: 1.7rem; height: 1px; background: rgba(255,255,255,.18); }

.n-student-workspace .family-student-tabs { position: sticky; top: 5.4rem; z-index: 30; margin: .85rem 0; border-color: rgba(8,95,86,.12); border-radius: var(--n-radius-xl); background: rgba(255,255,255,.94); box-shadow: 0 10px 28px rgba(28,25,23,.07); backdrop-filter: blur(14px); scrollbar-width: thin; }
.n-student-workspace .family-student-tabs-wrap { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); min-width: 0; gap: .35rem; padding: .45rem; }
.n-student-workspace .family-student-tab { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; min-width: 0; min-height: 3.4rem; gap: .5rem; padding: .55rem .7rem; text-align: left; }
.n-student-workspace .family-student-tab > i { color: var(--n-text-muted); font-size: 1.08rem; }
.n-student-workspace .family-student-tab strong,
.n-student-workspace .family-student-tab small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-student-workspace .family-student-tab strong { color: inherit; font-size: .7rem; }
.n-student-workspace .family-student-tab small { margin-top: .08rem; color: var(--n-text-muted); font-size: .53rem; font-weight: 600; }
.n-student-workspace .family-student-tab.active { background: var(--n-brand-dark); color: #fff; box-shadow: var(--n-shadow-brand); }
.n-student-workspace .family-student-tab[data-family-tab="quran"].active { background: var(--n-quran-dark); box-shadow: 0 8px 18px var(--n-quran-glow); }
.n-student-workspace .family-student-tab.active > i,
.n-student-workspace .family-student-tab.active small { color: rgba(255,255,255,.72); }
.n-student-panel-stack { min-width: 0; border: 1px solid var(--n-border); border-radius: var(--n-radius-xl); background: rgba(255,255,255,.96); padding: clamp(.6rem,2vw,1rem); box-shadow: var(--n-shadow-md); }
.n-student-panel-stack > [hidden] { display: none !important; }
.n-student-panel-stack .family-student-panel { min-width: 0; }
.n-student-panel-stack .family-panel-status { min-height: 14rem; border-color: rgba(8,127,107,.22); background: linear-gradient(135deg,var(--n-quran-pale),#fff); }

/* Family learning panels: concise, readable and shared across every child tab. */
.family-pedagogy-panel { min-width: 0; }
.family-panel-overview {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: .4rem .45rem 1.1rem;
    border-bottom: 1px solid var(--n-border-light);
}
.family-panel-overview h2 { margin: 0; color: var(--n-text); font-size: 1.25rem; letter-spacing: -.025em; }
.family-panel-overview p { margin: .25rem 0 0; color: var(--n-text-muted); font-size: .75rem; }
.family-panel-date,
.family-attendance-summary span {
    display: inline-flex;
    align-items: center;
    min-height: 2.25rem;
    gap: .35rem;
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius-full);
    background: var(--n-surface-soft);
    padding: .4rem .72rem;
    color: var(--n-text-secondary);
    font-size: .68rem;
    font-weight: 750;
    white-space: nowrap;
}
.family-panel-date i { color: var(--n-brand); font-size: .9rem; }
.family-learning-sections,
.family-evaluation-list { display: grid; gap: .7rem; padding-top: .85rem; }
.family-learning-period,
.family-evaluation-card { overflow: hidden; border: 1px solid var(--n-border); border-radius: .9rem; background: #fff; }
.family-learning-period--current { border-color: rgba(14,116,144,.28); box-shadow: 0 0 0 3px rgba(14,116,144,.06); }
.family-learning-period > summary,
.family-evaluation-card > summary {
    display: grid;
    align-items: center;
    min-height: 4.3rem;
    cursor: pointer;
    list-style: none;
}
.family-learning-period > summary { grid-template-columns: auto minmax(0,1fr) auto; gap: .75rem; padding: .7rem .85rem; }
.family-learning-period > summary::-webkit-details-marker,
.family-evaluation-card > summary::-webkit-details-marker,
.family-learning-program > summary::-webkit-details-marker { display: none; }
.family-learning-period-icon,
.family-learning-task-icon,
.family-evaluation-icon,
.family-attendance-event-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.45rem;
    height: 2.45rem;
    border-radius: .72rem;
    background: var(--n-brand-pale);
    color: var(--n-brand-dark);
    font-size: 1.05rem;
}
.family-learning-period summary strong,
.family-learning-period summary small { display: block; }
.family-learning-period summary strong { color: var(--n-text); font-size: .8rem; }
.family-learning-period summary small { margin-top: .08rem; color: var(--n-text-muted); font-size: .65rem; }
.family-learning-chevron { color: var(--n-text-muted); transition: transform .18s ease; }
.family-learning-period[open] > summary .family-learning-chevron,
.family-learning-program[open] > summary .family-learning-chevron { transform: rotate(180deg); }
.family-learning-task-list { border-top: 1px solid var(--n-border-light); }
.family-learning-task { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .75rem; padding: .9rem; border-bottom: 1px solid var(--n-border-light); }
.family-learning-task:last-child { border-bottom: 0; }
.family-learning-task--quran .family-learning-task-icon { background: var(--n-quran-pale); color: var(--n-quran-dark); }
.family-learning-task-copy { min-width: 0; }
.family-learning-task-meta { display: flex; align-items: center; justify-content: space-between; gap: .75rem; color: var(--n-text-muted); font-size: .65rem; }
.family-learning-task-type { color: var(--n-brand-dark); font-weight: 800; }
.family-learning-task-title { margin-top: .3rem; color: var(--n-text); font-size: .82rem; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.family-learning-program { margin-top: .75rem; border: 1px solid rgba(8,127,107,.18); border-radius: .75rem; background: var(--n-quran-pale); }
.family-learning-program > summary { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; min-height: 2.75rem; gap: .6rem; padding: .5rem .7rem; color: var(--n-quran-dark); cursor: pointer; font-size: .7rem; font-weight: 750; list-style: none; }
.family-learning-program summary small { color: var(--n-text-muted); font-size: .62rem; }
.family-learning-program-list { margin: 0; padding: 0; list-style: none; }
.family-learning-program-list li { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .65rem; border-top: 1px solid rgba(8,127,107,.12); padding: .6rem .7rem; }
.family-learning-program-list time { color: var(--n-quran-dark); font-size: .65rem; font-weight: 800; }
.family-learning-step-copy { min-width: 0; color: var(--n-text-secondary); font-size: .7rem; }
.family-learning-step-copy .btn-link { height: auto; min-height: 0; margin: 0; padding: 0; color: inherit; font: inherit; text-align: left; white-space: normal; }
.family-quran-done-control { position: relative; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; margin: 0; cursor: pointer; }
.family-quran-done-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.family-quran-done-label { display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border: 1px solid rgba(8,95,86,.3); border-radius: 50%; background: #fff; }
.family-quran-done-control input:checked + .family-quran-done-label { border-color: var(--n-quran); background: var(--n-quran); }
.family-quran-done-control input:checked + .family-quran-done-label::after { color: #fff; content: "✓"; font-size: .72rem; font-weight: 900; }
.family-quran-done-control input:focus-visible + .family-quran-done-label { outline: 3px solid var(--n-brand-glow); outline-offset: 2px; }
.family-pedagogy-empty { display: flex; align-items: center; min-height: 6rem; gap: .75rem; padding: 1rem; color: var(--n-text-secondary); }
.family-pedagogy-empty > i { color: var(--n-brand); font-size: 1.45rem; }
.family-pedagogy-empty strong,
.family-pedagogy-empty span { display: block; }
.family-pedagogy-empty strong { color: var(--n-text); font-size: .82rem; }
.family-pedagogy-empty span { margin-top: .15rem; color: var(--n-text-muted); font-size: .7rem; }
.family-pedagogy-empty--success > i { color: var(--n-success); }
.family-pedagogy-empty--quiet { min-height: 4.8rem; }

.family-evaluation-card > summary { grid-template-columns: auto minmax(0,1fr) auto; gap: .8rem; padding: .75rem .85rem; }
.family-evaluation-heading { min-width: 0; }
.family-evaluation-heading > span { display: flex; align-items: center; gap: .45rem; color: var(--n-text-muted); font-size: .65rem; }
.family-evaluation-heading small { border-radius: var(--n-radius-full); background: var(--n-surface-soft); padding: .18rem .4rem; font-size: .62rem; font-weight: 750; }
.family-evaluation-heading > strong { display: block; overflow: hidden; margin-top: .22rem; color: var(--n-text); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.family-evaluation-action { display: inline-flex; align-items: center; gap: .25rem; color: var(--n-brand-dark); font-size: .65rem; font-weight: 750; white-space: nowrap; }
.family-evaluation-card[open] .family-evaluation-action i { transform: rotate(180deg); }
.family-evaluation-detail { overflow-x: auto; border-top: 1px solid var(--n-border-light); padding: .9rem; }
.family-evaluation-detail table { width: 100%; min-width: 34rem; margin: 0; }
.family-evaluation-detail td,
.family-evaluation-detail th { padding: .55rem; font-size: .68rem; overflow-wrap: anywhere; }
.family-term-reports { margin-top: 1rem; border: 1px solid rgba(184,135,47,.2); border-radius: .9rem; background: var(--n-gold-pale); padding: .9rem; }
.family-term-reports > header { display: flex; align-items: flex-start; gap: .65rem; }
.family-term-reports > header > i { color: var(--n-gold-dark); font-size: 1.2rem; }
.family-term-reports h3,
.family-term-reports p { margin: 0; }
.family-term-reports h3 { color: var(--n-text); font-size: .85rem; }
.family-term-reports header p { margin-top: .12rem; color: var(--n-text-muted); font-size: .65rem; }
.family-term-report-list { display: grid; gap: .55rem; margin-top: .8rem; }
.family-term-report-list article { display: grid; grid-template-columns: 7.5rem minmax(0,1fr); gap: .75rem; border-top: 1px solid rgba(184,135,47,.15); padding-top: .65rem; }
.family-term-report-list article > span { color: var(--n-gold-dark); font-size: .68rem; font-weight: 800; }
.family-term-report-list article > p { color: var(--n-text-secondary); font-size: .72rem; }

.family-attendance-summary { display: flex; flex-wrap: wrap; gap: .4rem; }
.family-attendance-summary strong { color: var(--n-text); font-size: .8rem; }
.family-attendance-timeline { display: grid; gap: .55rem; margin: .85rem 0 0; padding: 0; list-style: none; }
.family-attendance-event { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .75rem; border: 1px solid var(--n-border); border-radius: .85rem; padding: .72rem .8rem; }
.family-attendance-event > div time,
.family-attendance-event > div strong { display: block; }
.family-attendance-event > div time { color: var(--n-text-muted); font-size: .65rem; }
.family-attendance-event > div strong { margin-top: .08rem; color: var(--n-text); font-size: .78rem; }
.family-attendance-event--absent .family-attendance-event-icon { background: var(--n-danger-pale); color: var(--n-danger); }
.family-attendance-event--late .family-attendance-event-icon { background: var(--n-warning-pale); color: var(--n-warning); }
.family-attendance-justification { display: inline-flex; align-items: center; min-height: 2rem; gap: .3rem; border-radius: var(--n-radius-full); padding: .35rem .55rem; font-size: .65rem; font-weight: 750; }
.family-attendance-justification--pending { background: var(--n-warning-pale); color: var(--n-warning); }
.family-attendance-justification--confirmed { background: var(--n-success-pale); color: var(--n-success); }

@media (max-width: 767.98px) {
    .family-panel-overview { align-items: stretch; flex-direction: column; }
    /* Le sous-titre du panneau redit son titre : « Devoirs et preparation /
       Retrouvez le travail demande ». Sur telephone il coute une ligne de plus
       avant le contenu, et n'apprend rien. */
    .family-panel-overview > div > p { display: none; }

    /* La lecture de l'IA passe APRES l'information, sur telephone seulement.
       Mesure sur le panneau Devoirs avant ce changement : l'encart commencait a
       140px et le premier devoir a 714px — le parent devait franchir presque un
       ecran entier pour voir le travail demande. L'encart reste VISIBLE, il n'est
       plus premier : c'est une lecture, pas la reponse. */
    .family-pedagogy-panel,
    .n-student-panel-stack .family-quran-panel { display: flex; flex-direction: column; }
    .family-pedagogy-panel > .n-ai-note,
    .n-student-panel-stack .family-quran-panel > .n-ai-note { order: 99; margin-top: 1rem; }

    /* Les compteurs descendent en bas du panneau, sur telephone seulement.
     *
     * Ils occupaient 255px du premier ecran — quatre chiffres avant le Coran que
     * le parent vient lire, avant les notes qu'il vient consulter. Ce sont du
     * contexte, pas la reponse.
     *
     * Ils DESCENDENT au lieu de disparaitre : « 100 % de dette de revision » ou
     * « derniere seance il y a 140 jours » sont des signaux qu'un parent doit
     * pouvoir trouver. Un cran au-dessus de la lecture de l'IA, pour que l'ordre
     * en bas de panneau reste : contexte, puis detail, puis commentaire. */
    .family-pedagogy-panel > .n-insight-tiles,
    .n-student-panel-stack .family-quran-panel > .n-insight-tiles { order: 96; margin-top: 1rem; margin-bottom: 0; }
    .family-pedagogy-panel > details.n-insight-fold,
    .n-student-panel-stack .family-quran-panel > details.n-insight-fold { order: 97; margin-top: .5rem; }

    .family-panel-date { width: fit-content; }
    .family-evaluation-action span { display: none; }
    .family-evaluation-heading > strong { white-space: normal; }
    .family-term-report-list article { grid-template-columns: minmax(0,1fr); gap: .25rem; }
}
@media (max-width: 575.98px) {
    .family-learning-period > summary,
    .family-evaluation-card > summary { gap: .55rem; padding: .65rem; }
    .family-learning-task { gap: .55rem; padding: .75rem .65rem; }
    .family-learning-task-meta { align-items: flex-start; flex-direction: column; gap: .15rem; }
    .family-learning-program-list li { grid-template-columns: minmax(0,1fr) auto; }
    .family-learning-program-list time { grid-column: 1 / -1; }
    .family-attendance-event { grid-template-columns: auto minmax(0,1fr); }
    .family-attendance-justification { grid-column: 2; justify-self: start; }
    .family-evaluation-detail table,
    .family-evaluation-detail tbody { display: block; min-width: 0; }
    .family-evaluation-detail tr { display: grid; grid-template-columns: 7rem minmax(0,1fr); }
    .family-evaluation-detail td { display: block; width: auto; border-width: 0 0 1px !important; }
    .family-evaluation-detail td:nth-child(3) { grid-column: 1 / -1; color: var(--n-text-secondary); }
    .family-evaluation-detail tr:last-child td:last-child { border-bottom: 0 !important; }
}

.n-student-documents { min-width: 0; }
.n-student-documents-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: .35rem .35rem 1rem; border-bottom: 1px solid var(--n-border-light); }
.n-student-documents-header h2 { margin: 0; color: var(--n-text); font-size: 1.15rem; }
.n-student-documents-header p { margin: .25rem 0 0; color: var(--n-text-muted); font-size: .72rem; }
.n-student-document-count { display: inline-flex; align-items: center; justify-content: center; min-width: 2.15rem; min-height: 2.15rem; border-radius: var(--n-radius-full); background: var(--n-brand-pale); color: var(--n-brand-dark); font-weight: 800; }
.n-student-document-list { display: grid; }
.n-student-document-entry { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .8rem; padding: 1rem .35rem; border-bottom: 1px solid var(--n-border-light); }
.n-student-document-entry:last-child { border-bottom: 0; }
.n-student-document-icon { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: .75rem; background: var(--n-brand-pale); color: var(--n-brand); font-size: 1.2rem; }
.n-student-document-copy { min-width: 0; }
.n-student-document-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .65rem; color: var(--n-text-muted); font-size: .65rem; }
.n-student-document-copy h3 { margin: .25rem 0 0; color: var(--n-text); font-size: .9rem; }
.n-student-document-description { margin-top: .35rem; color: var(--n-text-muted); font-size: .72rem; }
.n-student-document-files { grid-column: 2; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; margin: .65rem 0 0; padding: 0; list-style: none; }
.n-student-document-files a { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; min-height: 3rem; gap: .55rem; border: 1px solid var(--n-border); border-radius: .7rem; padding: .55rem .7rem; background: #fff; color: var(--n-text); text-decoration: none; }
.n-student-document-files a:hover { border-color: var(--n-brand); background: var(--n-brand-pale); color: var(--n-brand-dark); }
.n-student-document-files strong,
.n-student-document-files small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-student-document-files strong { font-size: .72rem; }
.n-student-document-files small { margin-top: .08rem; color: var(--n-text-muted); font-size: .62rem; }
.n-student-document-empty-file { grid-column: 2; margin: .55rem 0 0; color: var(--n-text-muted); font-size: .72rem; }

@media (max-width: 1199.98px) {
    .n-member-enrollment span { display: none; }
    .n-member-enrollment { width: 2.45rem; justify-content: center; padding-inline: 0; }
}
@media (max-width: 991.98px) {
    .n-family-hero { grid-template-columns: minmax(0,1fr); min-height: 0; }
    .n-quran-signature { display: none; }
    .n-family-child-grid { grid-template-columns: minmax(0,1fr); }
    .n-student-hero { grid-template-columns: minmax(0,1fr); }
    .n-student-hero-actions { justify-content: flex-start; }
    .n-student-workspace .family-student-tabs { top: 5rem; }
}
@media (max-width: 767.98px) {
    .n-family-dashboard,
    .n-student-workspace { padding: .9rem 0 5.5rem; }
    .n-family-dashboard > .container,
    .n-student-workspace > .container { padding-inline: .75rem; }
    .n-family-hero { gap: 1rem; border-radius: 1.1rem; padding: 1.35rem; }
    .n-family-hero h1 { font-size: clamp(1.9rem,10vw,2.7rem); }
    .n-family-hero-trust { display: grid; grid-template-columns: minmax(0,1fr); }
    .n-family-hero-trust > span { width: fit-content; }
    .n-family-children { margin-top: 1.35rem; }
    .n-family-child-actions { grid-template-columns: minmax(0,1fr); }
    .n-family-resource-card { grid-template-columns: auto minmax(0,1fr); }
    .n-family-resource-card .btn { grid-column: 1 / -1; width: 100%; }
    /* Sur telephone, l'en-tete de la fiche mangeait le premier ecran entier.
       Trois elements partent, et aucun ne porte d'information :
         · la phrase d'accroche, qui est du decor ;
         · les deux gros boutons, qui appellent exactement `activate()` — donc la
           meme chose que les onglets situes juste en dessous ;
         · la frise « Lire · Memoriser · Reviser », deja marquee aria-hidden, et le
           rembourrage de 2,55rem qui lui etait reserve.
       Le parent voyait les devoirs de son enfant deux ecrans plus bas. */
    .n-student-hero { border-radius: 1.05rem; padding: 1rem; }
    .n-student-hero-tagline { display: none; }
    /* Un seul raccourci survit, et pour une raison verifiee : l'onglet « Mon
       Coran » est le DERNIER de la barre, donc hors ecran sans defilement
       horizontal, et la barre du bas mene aux recitations enregistrees, pas au
       suivi. « Voir les devoirs » part : son onglet est le premier, et il est
       actif par defaut. */
    .n-student-hero-actions { display: block; width: 100%; margin-top: .7rem; }
    .n-student-hero-actions .btn { width: 100%; min-height: 2.6rem; white-space: normal; }
    .n-student-hero-actions .btn-outline-secondary { display: none; }
    .n-quran-continuity { display: none; }
    .n-student-workspace .family-student-tabs { position: static; margin: .65rem 0; }
    .n-student-workspace .family-student-tabs-wrap { display: flex; min-width: max-content; }
    .n-student-workspace .family-student-tab { flex: 0 0 9.5rem; min-height: 3.35rem; }
    .n-student-panel-stack { border-radius: 1rem; padding: .5rem; }
    .n-student-document-files { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 575.98px) {
    .n-member-header .n-teacher-brand span { display: none; }
    .n-member-header .n-teacher-brand img { width: 2rem; height: 2.3rem; }
    .n-member-header .n-teacher-header-inner { gap: .4rem; }
    .n-member-enrollment { display: none; }
    .n-family-child-card > header { padding: .95rem; }
    .n-family-child-focus { margin-inline: .95rem; }
    .n-family-child-actions { padding: .85rem .95rem 1rem; }
    .n-family-resource-card { padding: 1rem; }
    .n-student-identity { align-items: flex-start; }
    .n-student-avatar { flex-basis: 3rem; width: 3rem; height: 3rem; border-radius: .8rem; }
    .n-student-identity h1 { font-size: 1.45rem; }
    .n-student-identity p { align-items: flex-start; flex-direction: column; gap: .3rem; }
    .n-student-hero-actions { grid-template-columns: minmax(0,1fr); }
    .n-quran-continuity small,
    .n-quran-continuity i { display: none; }
    .n-student-workspace .family-student-tab { flex-basis: 8.5rem; min-height: 3rem; padding: .48rem .55rem; }
    .n-student-workspace .family-student-tab small { display: none; }
}
@media (max-width: 359.98px) {
    .n-family-dashboard > .container,
    .n-student-workspace > .container { padding-inline: .5rem; }
    .n-family-hero { padding: 1.05rem; }
    .n-family-child-card > header { align-items: flex-start; }
    .n-family-child-card > header img { flex-basis: 4.4rem; width: 4.4rem; height: 4.4rem; }
    .n-student-workspace .family-student-tab { flex-basis: 7.6rem; }
}

/* Teacher dashboard: a legible Quran-centred operating flow. */
.teacher-surface .n-teacher-dashboard-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    overflow: hidden;
    border: 1px solid rgba(8,95,86,.13);
    border-radius: var(--n-radius-xl);
    background:
        radial-gradient(circle at 90% -25%, rgba(8,127,107,.13), transparent 22rem),
        linear-gradient(125deg,#fff 0%,#fbfdfc 68%,var(--n-quran-pale) 100%);
    padding: 1.35rem 1.45rem;
    box-shadow: var(--n-shadow-sm);
}
.teacher-surface .n-teacher-dashboard-hero::after {
    position: absolute;
    right: -3.2rem;
    bottom: -4.5rem;
    width: 10rem;
    height: 10rem;
    border: 1px solid rgba(8,127,107,.08);
    border-radius: 2.5rem;
    content: "";
    pointer-events: none;
    transform: rotate(45deg);
}
.teacher-surface .n-teacher-dashboard-intro { position: relative; z-index: 1; min-width: 0; }
.teacher-surface .n-teacher-dashboard-intro > p { max-width: 42rem; }
.teacher-surface .n-teacher-quran-flow { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin-top: .85rem; }
.teacher-surface .n-teacher-quran-flow > span { display: inline-flex; align-items: center; gap: .28rem; min-height: 2rem; border: 1px solid var(--n-border-light); border-radius: var(--n-radius-full); background: rgba(255,255,255,.86); padding: .32rem .58rem .32rem .32rem; color: var(--n-text-secondary); font-size: .6rem; font-weight: 750; box-shadow: var(--n-shadow-xs); }
.teacher-surface .n-teacher-quran-flow > span > b { display: grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--n-quran-pale); color: var(--n-quran-dark); font-size: .56rem; }
.teacher-surface .n-teacher-quran-flow > span > i { color: var(--n-quran); font-size: .78rem; }
.teacher-surface .n-teacher-quran-flow > i { color: var(--n-text-faint); font-size: .78rem; }
.teacher-surface .n-teacher-dashboard-hero .n-teacher-page-actions { position: relative; z-index: 1; max-width: 27rem; }
.teacher-surface .n-teacher-quran-mark { display: block; flex: 0 0 3.15rem; width: 3.15rem; height: 3.15rem; border: 1px solid var(--n-border-light); border-radius: .8rem; background: #fff; padding: .3rem; box-shadow: var(--n-shadow-sm); }
.teacher-surface .n-teacher-quran-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.teacher-surface .n-teacher-class-card.is-featured { border-color: rgba(8,127,107,.26); box-shadow: 0 13px 34px rgba(8,95,86,.1); }
.teacher-surface .n-teacher-class-card.is-featured::before { height: 3px; background: linear-gradient(90deg,var(--n-quran),var(--n-gold)); content: ""; }
.teacher-surface .n-teacher-class-card.is-featured .n-class-icon { background: linear-gradient(145deg,var(--n-quran-dark),var(--n-quran)); box-shadow: 0 6px 18px var(--n-quran-glow); }
.teacher-surface .n-teacher-class-card.is-featured .n-eyebrow { color: var(--n-quran-dark); }
.teacher-surface .n-teacher-class-card.is-featured .btn-primary { border-color: var(--n-quran); background: linear-gradient(135deg,var(--n-quran),var(--n-quran-dark)); box-shadow: 0 7px 18px var(--n-quran-glow); }

@media (max-width: 991.98px) {
    .teacher-surface .n-teacher-dashboard-hero { grid-template-columns: minmax(0,1fr); }
    .teacher-surface .n-teacher-dashboard-hero .n-teacher-page-actions { max-width: none; justify-content: flex-start; }
}
@media (max-width: 767.98px) {
    .teacher-surface .n-teacher-dashboard-hero { gap: .9rem; border-radius: 1rem; padding: 1rem; }
    .teacher-surface .n-teacher-quran-flow > i { display: none; }
    .teacher-surface .n-teacher-quran-flow > span { flex: 1 1 9rem; justify-content: flex-start; border-radius: .7rem; }
    .teacher-surface .n-teacher-quran-mark { display: none; }
    .teacher-surface .n-teacher-dashboard-hero .n-teacher-page-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; }
    .teacher-surface .n-teacher-dashboard-hero .n-date-chip { grid-column: 1 / -1; justify-content: center; }
    .teacher-surface .n-teacher-dashboard-hero .btn { width: 100%; white-space: normal; }
}
@media (max-width: 420px) {
    .teacher-surface .n-teacher-dashboard-hero .n-teacher-page-actions { grid-template-columns: minmax(0,1fr); }
    .teacher-surface .n-teacher-dashboard-hero .n-date-chip { grid-column: auto; }
}

/* Administration — accounts, confirmations and access audit. */
.n-admin-users-page,
.n-admin-audit-page { overflow-x: clip; }
.n-admin-result-pill,
.n-admin-selection-count,
.n-admin-data-warning {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 2.35rem;
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius-full);
    background: rgba(255,255,255,.9);
    padding: .45rem .75rem;
    color: var(--n-text-secondary);
    font-size: .7rem;
    font-weight: 750;
    white-space: nowrap;
    box-shadow: var(--n-shadow-xs);
}
.n-admin-result-pill i { color: var(--n-brand); font-size: 1rem; }
.n-admin-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .8rem; margin-bottom: 1rem; }
.n-admin-directory-panel,
.n-admin-audit-panel { margin-top: 0; }
.n-admin-directory-panel > .n-panel-header,
.n-admin-audit-panel > .n-panel-header { background: linear-gradient(135deg,rgba(236,254,255,.7),#fff 55%); }
.n-admin-selection-count { border-color: rgba(8,145,178,.2); background: var(--n-brand-pale); color: var(--n-brand-dark); box-shadow: none; }
.n-admin-selection-count:focus { outline: 3px solid var(--n-brand-glow); outline-offset: 2px; }
.n-admin-bulk-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--n-border-light); padding: .85rem 1.15rem; }
.n-admin-bulk-toolbar > div { display: flex; flex-wrap: wrap; gap: .5rem; }
.n-admin-bulk-toolbar .btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; margin: 0; }
.n-admin-bulk-toolbar .btn:disabled { cursor: not-allowed; opacity: .48; }
.n-admin-bulk-toolbar p { display: flex; align-items: flex-start; gap: .35rem; max-width: 25rem; margin: 0; color: var(--n-text-muted); font-size: .65rem; line-height: 1.4; }
.n-admin-bulk-toolbar p i { flex: 0 0 auto; color: var(--n-brand); font-size: .9rem; }
.n-admin-filter-panel { border-bottom: 1px solid var(--n-border-light); background: #fbfdfd; }
.n-admin-filter-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 3.5rem; padding: .75rem 1.15rem; color: var(--n-text-secondary); cursor: pointer; list-style: none; }
.n-admin-filter-panel > summary::-webkit-details-marker { display: none; }
.n-admin-filter-panel > summary:focus-visible { outline: 3px solid var(--n-brand-glow); outline-offset: -3px; }
.n-admin-filter-panel > summary > span { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 0 .55rem; }
.n-admin-filter-panel > summary > span > i { grid-row: 1/3; color: var(--n-brand); font-size: 1.1rem; }
.n-admin-filter-panel > summary strong { color: var(--n-text); font-size: .76rem; }
.n-admin-filter-panel > summary small { color: var(--n-text-muted); font-size: .6rem; }
.n-admin-filter-panel > summary > i { transition: transform .15s ease; }
.n-admin-filter-panel[open] > summary > i { transform: rotate(180deg); }
.n-admin-filter-body { display: grid; grid-template-columns: minmax(12rem,.5fr) minmax(0,1.5fr); gap: .8rem 1rem; border-top: 1px solid var(--n-border-light); padding: 1rem 1.15rem; }
.n-admin-filter-mode label,
.n-admin-active-filters > span,
.n-admin-filter-suggestions > span { display: block; margin-bottom: .35rem; color: var(--n-text-muted); font-size: .58rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.n-admin-filter-mode .form-control { height: 2.55rem; margin: 0; font-size: .7rem; }
.n-admin-active-filters { min-width: 0; }
.n-admin-active-filters #tagFilters,
.n-admin-filter-suggestions > div { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; min-height: 2.55rem; }
.n-admin-active-filters #tagFilters { border: 1px dashed var(--n-border); border-radius: .7rem; background: #fff; padding: .4rem .5rem; }
.n-admin-active-filters [data-filter-empty] { color: var(--n-text-muted); font-size: .65rem; }
.n-admin-clear-filters { margin-top: .35rem; border: 0; background: transparent; padding: 0; color: var(--n-brand-dark); font-size: .62rem; font-weight: 750; cursor: pointer; }
.n-admin-filter-suggestions { grid-column: 1/-1; }
.n-admin-filter-chip,
.n-admin-account-badge { display: inline-flex; align-items: center; justify-content: center; gap: .22rem; border: 1px solid var(--n-border); border-radius: var(--n-radius-full); background: #fff; color: var(--n-text-secondary); font-weight: 750; cursor: pointer; }
.n-admin-filter-chip { min-height: 2rem; padding: .3rem .55rem; font-size: .6rem; }
.n-admin-filter-chip:hover,
.n-admin-filter-chip:focus-visible,
.n-admin-account-badge:hover,
.n-admin-account-badge:focus-visible { border-color: var(--n-brand); color: var(--n-brand-dark); outline: 0; }
.n-admin-filter-chip:focus-visible,
.n-admin-account-badge:focus-visible { box-shadow: 0 0 0 3px var(--n-brand-glow); }
.n-admin-filter-chip[aria-pressed="true"],
.n-admin-filter-chip.is-selected { border-color: var(--n-brand); background: var(--n-brand-dark); color: #fff; }
.n-admin-filter-chip.is-success { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.n-admin-filter-chip.is-warning { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.n-admin-filter-chip.is-muted { background: #f5f5f4; color: #57534e; }
.n-admin-filter-chip.is-success[aria-pressed="true"],
.n-admin-filter-chip.is-warning[aria-pressed="true"],
.n-admin-filter-chip.is-muted[aria-pressed="true"] { border-color: var(--n-brand-dark); background: var(--n-brand-dark); color: #fff; }
.n-admin-table-body { min-width: 0; padding: .75rem; }
.n-admin-table-body .table-responsive { margin: 0; box-shadow: none; }
.n-admin-table-body .dataTables_wrapper { margin: 0; }
.n-admin-users-table td,
.n-admin-audit-table td { color: var(--n-text-secondary); font-size: .68rem; }
.n-admin-users-table input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--n-brand); }
.n-admin-user-cell { display: flex; align-items: center; min-width: 11rem; gap: .6rem; }
.n-admin-user-cell > div { min-width: 0; }
.n-admin-user-avatar { display: grid; place-items: center; flex: 0 0 2.15rem; width: 2.15rem; height: 2.15rem; border-radius: .65rem; background: linear-gradient(145deg,var(--n-brand-pale),#fff); color: var(--n-brand-dark); font-size: .58rem; font-weight: 850; box-shadow: inset 0 0 0 1px rgba(8,145,178,.12); }
.n-admin-user-cell strong,
.n-admin-user-cell code { display: block; overflow: hidden; max-width: 15rem; text-overflow: ellipsis; white-space: nowrap; }
.n-admin-user-cell strong { color: var(--n-text); font-size: .72rem; }
.n-admin-user-cell code { margin-top: .12rem; padding: 0; background: transparent; color: var(--n-text-muted); font-size: .57rem; }
.n-admin-email { display: block; max-width: 17rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-admin-empty-value { display: inline-flex; align-items: center; gap: .25rem; color: var(--n-text-muted); font-size: .6rem; font-style: italic; }
.n-admin-status-stack,
.n-admin-tag-list { display: flex; flex-wrap: wrap; gap: .28rem; }
.n-admin-account-badge { min-height: 1.7rem; padding: .2rem .45rem; font-size: .54rem; }
.n-admin-account-badge.is-profile { border-color: #bae6fd; background: #f0f9ff; color: #075985; }
.n-admin-account-badge.is-active { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.n-admin-account-badge.is-inactive { border-color: #e7e5e4; background: #f5f5f4; color: #57534e; }
.n-admin-account-badge.is-tag { background: #fafaf9; }
.n-admin-open-account { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border: 1px solid var(--n-border); border-radius: .65rem; background: #fff; color: var(--n-brand-dark); cursor: pointer; }
.n-admin-open-account:hover,
.n-admin-open-account:focus-visible { border-color: var(--n-brand); background: var(--n-brand-pale); outline: 0; }
.n-admin-open-account:focus-visible { box-shadow: 0 0 0 3px var(--n-brand-glow); }
.n-admin-users-table tr[data-admin-tag-hidden] { display: none !important; }

.n-admin-confirm-container { max-width: 47rem; }
.n-admin-confirm-card { position: relative; overflow: hidden; border: 1px solid var(--n-border); border-radius: var(--n-radius-xl); background: rgba(255,255,255,.97); padding: clamp(1.2rem,4vw,2rem); box-shadow: var(--n-shadow-lg); }
.n-admin-confirm-card::before { position: absolute; inset: 0 0 auto; height: .24rem; background: linear-gradient(90deg,var(--n-brand-dark),var(--n-brand-light)); content: ''; }
.n-admin-confirm-icon { display: grid; place-items: center; width: 3.1rem; height: 3.1rem; margin-bottom: .8rem; border-radius: .9rem; background: var(--n-brand-pale); color: var(--n-brand-dark); font-size: 1.35rem; }
.n-admin-confirm-card h1 { margin: .15rem 0 .35rem; font-size: clamp(1.65rem,4vw,2.3rem); letter-spacing: -.04em; }
.n-admin-confirm-card > p { margin: 0; color: var(--n-text-secondary); font-size: .8rem; line-height: 1.55; }
.n-admin-confirm-summary { margin: 1rem 0; overflow: hidden; border: 1px solid var(--n-border-light); border-radius: .85rem; background: #fafcfb; }
.n-admin-confirm-summary > div { display: flex; align-items: center; justify-content: space-between; gap: .8rem; border-bottom: 1px solid var(--n-border-light); padding: .7rem .8rem; }
.n-admin-confirm-summary strong { color: var(--n-text); font-size: .72rem; }
.n-admin-confirm-summary > div > span { color: var(--n-text-muted); font-size: .6rem; }
.n-admin-confirm-summary ul { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: .7rem .8rem; list-style: none; }
.n-admin-confirm-summary li { display: inline-flex; align-items: center; gap: .28rem; border: 1px solid var(--n-border-light); border-radius: var(--n-radius-full); background: #fff; padding: .3rem .5rem; color: var(--n-text-secondary); font-size: .6rem; }
.n-admin-confirm-summary li i { color: var(--n-brand); }
.n-admin-confirm-fields { display: grid; grid-template-columns: minmax(12rem,.55fr) minmax(0,1.45fr); gap: .75rem; margin-bottom: 1rem; }
.n-admin-confirm-field { min-width: 0; }
.n-admin-confirm-field.is-wide { grid-column: 1/-1; }
.n-admin-confirm-field label { display: block; margin-bottom: .3rem; color: var(--n-text); font-size: .64rem; }
.n-admin-confirm-field .form-control { margin: 0; font-size: .72rem; }
.n-admin-confirm-field textarea { min-height: 10rem; resize: vertical; }
.n-admin-confirm-notice { display: flex; align-items: flex-start; gap: .5rem; border: 1px solid #bae6fd; border-radius: .75rem; background: #f0f9ff; padding: .7rem .8rem; color: #075985; font-size: .65rem; line-height: 1.45; }
.n-admin-confirm-notice i { flex: 0 0 auto; font-size: .9rem; }
.n-admin-confirm-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; border-top: 1px solid var(--n-border-light); padding-top: 1rem; }
.n-admin-confirm-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; margin: 0; }

.n-admin-audit-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .8rem; margin-bottom: 1rem; }
.n-admin-data-warning { border-color: #fed7aa; background: #fff7ed; color: #9a3412; box-shadow: none; }
.n-admin-audit-help { display: flex; align-items: flex-start; gap: .35rem; margin: 0; border-bottom: 1px solid var(--n-border-light); padding: .7rem 1.15rem; color: var(--n-text-muted); font-size: .64rem; line-height: 1.45; }
.n-admin-audit-help i { flex: 0 0 auto; color: var(--n-brand); font-size: .9rem; }
.n-admin-audit-account { display: flex; align-items: center; min-width: 8rem; gap: .35rem; }
.n-admin-audit-account i { color: var(--n-brand); }
.n-admin-audit-account strong { color: var(--n-text); font-size: .68rem; }
.n-admin-audit-time { display: grid; min-width: 12rem; gap: .2rem; }
.n-admin-audit-time > span { display: flex; align-items: center; gap: .28rem; font-size: .6rem; white-space: nowrap; }
.n-admin-audit-time > span:first-child { color: var(--n-text); font-weight: 700; }
.n-admin-audit-time .is-ended { color: var(--n-text-muted); }
.n-admin-audit-time .is-open { color: #9a3412; font-weight: 700; }
.n-admin-audit-code { display: block; max-width: 15rem; overflow: hidden; border-radius: .35rem; background: #f5f5f4; padding: .22rem .35rem; color: #44403c; font-size: .56rem; text-overflow: ellipsis; white-space: nowrap; }
.n-admin-audit-long { display: -webkit-box; max-width: 19rem; overflow: hidden; color: var(--n-text-secondary); font-size: .58rem; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }

@media (max-width: 991.98px) {
    .n-admin-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .n-admin-filter-body { grid-template-columns: minmax(0,1fr); }
    .n-admin-filter-suggestions { grid-column: auto; }
}

@media (max-width: 767.98px) {
    .n-admin-bulk-toolbar { align-items: stretch; flex-direction: column; }
    .n-admin-bulk-toolbar p { max-width: none; }
    .n-admin-filter-body { padding: .85rem; }
    .n-admin-table-body { padding: .4rem; }
    .n-admin-audit-metrics { grid-template-columns: minmax(0,1fr); }
    .n-admin-confirm-fields { grid-template-columns: minmax(0,1fr); }
    .n-admin-confirm-field.is-wide { grid-column: auto; }
}

@media (max-width: 575.98px) {
    .n-admin-metrics { grid-template-columns: minmax(0,1fr); }
    .n-admin-bulk-toolbar > div { display: grid; grid-template-columns: minmax(0,1fr); }
    .n-admin-bulk-toolbar .btn { width: 100%; }
    .n-admin-filter-panel > summary { padding-inline: .85rem; }
    .n-admin-filter-panel > summary small { display: none; }
    .n-admin-confirm-page { padding-top: 1rem; }
    .n-admin-confirm-card { border-radius: 1rem; padding: 1rem; }
    .n-admin-confirm-summary > div { align-items: flex-start; flex-direction: column; gap: .2rem; }
    .n-admin-confirm-actions { display: grid; grid-template-columns: minmax(0,1fr); }
    .n-admin-confirm-actions .btn { width: 100%; }
    .n-admin-audit-help { padding-inline: .85rem; }
}

/* Honest, role-aware status and unavailable-feature surfaces. */
.n-status-header-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.55rem;
    gap: .35rem;
    margin: 0 0 0 auto;
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius-full);
    background: #fff;
    padding: .45rem .8rem;
    color: var(--n-brand-dark);
    font-size: .67rem;
    font-weight: 800;
    box-shadow: var(--n-shadow-xs);
}
.n-status-header-action:hover,
.n-status-header-action:focus-visible { border-color: var(--n-brand); background: var(--n-brand-pale); color: var(--n-brand-dark); text-decoration: none; }
.n-status-header-action:focus-visible { outline: 3px solid var(--n-brand-glow); outline-offset: 2px; }
.n-status-page {
    display: grid;
    min-height: calc(100vh - 12rem);
    place-items: center;
    background:
        radial-gradient(circle at 92% 4%,rgba(34,211,238,.11),transparent 24rem),
        radial-gradient(circle at 6% 92%,rgba(184,135,47,.08),transparent 20rem),
        var(--n-bg);
    padding: clamp(1.25rem,5vw,4rem) 0;
}
.n-status-container { width: 100%; max-width: 58rem; }
.n-status-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    overflow: hidden;
    gap: 1.15rem;
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius-xl);
    background: rgba(255,255,255,.97);
    padding: clamp(1.2rem,4vw,2.2rem);
    box-shadow: var(--n-shadow-lg);
}
.n-status-card::before { position: absolute; inset: 0 0 auto; height: .24rem; background: linear-gradient(90deg,var(--n-brand-dark),var(--n-brand-light)); content: ''; }
.n-status-card--warning::before { background: linear-gradient(90deg,#b45309,#f59e0b); }
.n-status-card--error::before { background: linear-gradient(90deg,#b91c1c,#f97316); }
.n-status-symbol {
    display: grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    border: 1px solid rgba(8,145,178,.16);
    border-radius: 1.15rem;
    background: linear-gradient(145deg,var(--n-brand-pale),#fff);
    color: var(--n-brand-dark);
    font-size: 1.75rem;
    box-shadow: var(--n-shadow-sm);
}
.n-status-symbol span { font-family: Georgia,"Times New Roman",serif; font-size: 2.2rem; line-height: 1; }
.n-status-card--warning .n-status-symbol { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.n-status-card--error .n-status-symbol { border-color: #fecaca; background: #fff1f2; color: #b91c1c; }
.n-status-copy { min-width: 0; }
.n-status-code { display: inline-flex; margin-bottom: .35rem; border-radius: var(--n-radius-full); background: #fff1f2; padding: .25rem .5rem; color: #b91c1c; font-size: .58rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.n-status-copy h1 { max-width: 38rem; margin: .22rem 0 .5rem; font-size: clamp(1.55rem,4vw,2.35rem); line-height: 1.08; letter-spacing: -.04em; }
.n-status-copy > p { max-width: 40rem; margin: 0; color: var(--n-text-secondary); font-size: .8rem; line-height: 1.65; }
.n-status-copy .n-status-note { display: flex; align-items: flex-start; gap: .42rem; margin-top: .85rem; border: 1px solid var(--n-border-light); border-radius: .75rem; background: #fafcfb; padding: .65rem .72rem; color: var(--n-text-muted); font-size: .66rem; line-height: 1.45; }
.n-status-note i { flex: 0 0 auto; color: var(--n-brand); font-size: .9rem; }
.n-status-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: .55rem; padding-top: .15rem; }
.n-status-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; gap: .38rem; margin: 0; padding-inline: .9rem; font-size: .68rem; font-weight: 800; }
.n-status-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; border-top: 1px solid var(--n-border-light); background: #fff; padding: 1rem max(1rem,calc((100% - 1140px)/2)); color: var(--n-text-muted); font-size: .62rem; }
.n-status-footer span:first-child { color: var(--n-text-secondary); font-weight: 800; }

@media (max-width: 575.98px) {
    .n-status-header .n-teacher-brand span { display: none; }
    .n-status-header-action { min-height: 2.35rem; padding-inline: .65rem; }
    .n-status-page { min-height: calc(100vh - 9rem); padding: 1rem 0 4.75rem; }
    .n-status-container { padding-inline: .65rem; }
    .n-status-card { grid-template-columns: minmax(0,1fr); gap: .8rem; border-radius: 1rem; padding: 1rem; }
    .n-status-symbol { width: 3.25rem; height: 3.25rem; border-radius: .9rem; font-size: 1.35rem; }
    .n-status-symbol span { font-size: 1.8rem; }
    .n-status-copy h1 { font-size: 1.55rem; }
    .n-status-actions { grid-column: 1; display: grid; grid-template-columns: minmax(0,1fr); }
    .n-status-actions .btn { width: 100%; white-space: normal; }
    .n-status-footer { align-items: flex-start; flex-direction: column; gap: .2rem; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Bloc « à réviser » de la fiche élève (read-model Coran).
   Faits datés, aucun jugement : les couleurs restent celles du thème et la
   seule teinte d'accent est l'or, réservée à l'ancienneté d'une page.
   ───────────────────────────────────────────────────────────────────────────── */
.n-quran-plan { margin-bottom: 1rem; }
.n-quran-plan-summary {
    list-style: none; cursor: pointer; display: flex; align-items: baseline;
    gap: .75rem; flex-wrap: wrap; padding: .85rem 1rem; font-weight: 600;
    color: var(--n-text);
}
.n-quran-plan-summary::-webkit-details-marker { display: none; }
.n-quran-plan-summary::before {
    content: "\ea6e"; font-family: remixicon; font-weight: 400; color: var(--n-text-muted);
    transition: transform .2s ease;
}
.n-quran-plan[open] .n-quran-plan-summary::before { transform: rotate(90deg); }
.n-quran-plan-title { display: inline-flex; align-items: center; gap: .4rem; }
.n-quran-plan-counts {
    margin-left: auto; font-weight: 500; font-size: .8125rem; color: var(--n-text-secondary);
    font-variant-numeric: tabular-nums;
}
.n-quran-plan[open] .n-quran-plan-summary { border-bottom: 1px solid var(--n-border-light); }
.n-quran-plan-body { display: grid; gap: .75rem; }
.n-quran-plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.n-quran-plan-item, .n-quran-plan-learn {
    display: flex; align-items: center; gap: .9rem; flex-wrap: wrap;
    border: 1px solid var(--n-border); border-radius: var(--n-radius); padding: .7rem .85rem;
    background: var(--n-surface);
}
.n-quran-plan-learn { background: var(--n-quran-pale); border-color: var(--n-quran); }
.n-quran-plan-surat {
    font-family: "Scheherazade New", Georgia, serif; font-size: 1.4rem; line-height: 1.1;
    color: var(--n-quran-dark); flex: 0 0 auto;
}
.n-quran-plan-ref { display: grid; gap: .1rem; min-width: 0; flex: 1 1 15rem; }
.n-quran-plan-verses, .n-quran-plan-since {
    font-size: .78125rem; color: var(--n-text-secondary); font-variant-numeric: tabular-nums;
}
.n-quran-plan-since { color: var(--n-gold-dark); }
.n-quran-plan-actions { display: flex; gap: .4rem; flex: 0 0 auto; flex-wrap: wrap; }
.n-quran-plan-empty, .n-quran-plan-fragments, .n-quran-plan-source {
    margin: 0; font-size: .78125rem; color: var(--n-text-muted);
}
.n-quran-plan-source { padding-top: .5rem; border-top: 1px solid var(--n-border-light); }
.n-quran-plan-touch[aria-pressed="true"] {
    background: var(--n-success-pale); border-color: var(--n-success); color: var(--n-success);
}
@media (max-width: 575.98px) {
    .n-quran-plan-counts { margin-left: 0; flex: 1 1 100%; }
    .n-quran-plan-actions { flex: 1 1 100%; }
    .n-quran-plan-actions .btn { flex: 1 1 auto; }
}

/* ───────────────────────────────────────────────────────────────────
   PILOTAGE — facts first, interpretation second
   ─────────────────────────────────────────────────────────────────── */
.n-insights-shell { min-height: calc(100vh - 8rem); padding: 2.5rem 0 5rem; }
.n-insights-header { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; margin-bottom:1.5rem; }
.n-insights-header h1 { margin:0 0 .35rem; font-size:2rem; letter-spacing:-.03em; }
.n-insights-header p { margin:0; color:var(--n-text-secondary); font-size:.82rem; }
.n-insights-tabs { display:flex; gap:.25rem; margin-bottom:1.25rem; border-bottom:1px solid var(--n-border); }
/* Les onglets sont des <button role="tab"> : un onglet doit s'atteindre au clavier et
   s'annoncer comme tel. Les selecteurs couvrent aussi les <a> restants ailleurs. */
.n-insights-tabs a, .n-insights-tabs button[role="tab"] { display:inline-flex; align-items:center; gap:.4rem; min-height:2.7rem; margin-bottom:-1px; border:0; border-bottom:2px solid transparent; padding:.55rem .8rem; background:none; color:var(--n-text-secondary); font-family:inherit; font-size:.78rem; font-weight:750; text-decoration:none; cursor:pointer; }
.n-insights-tabs a:hover, .n-insights-tabs a:focus-visible,
.n-insights-tabs button[role="tab"]:hover, .n-insights-tabs button[role="tab"]:focus-visible { color:var(--n-brand-dark); background:var(--n-brand-pale); }
.n-insights-tabs a.is-active, .n-insights-tabs button[role="tab"].is-active { border-bottom-color:var(--n-brand); color:var(--n-brand-dark); }
.n-insights-tab-count { border-radius:var(--n-radius-full); background:var(--n-border-light); padding:.05rem .4rem; font-size:.66rem; font-variant-numeric:tabular-nums; }
.n-insights-tabs button[role="tab"].is-active .n-insights-tab-count { background:var(--n-brand-pale); color:var(--n-brand-dark); }
@media (max-width: 40rem) {
    /* Trois onglets ne tiennent pas sur un telephone : ils defilent plutot que de se
       superposer ou de rogner leur libelle. */
    .n-insights-tabs { overflow-x:auto; flex-wrap:nowrap; }
    .n-insights-tabs a, .n-insights-tabs button[role="tab"] { white-space:nowrap; }
    .n-insights-table-tools { flex-wrap:wrap; }
}
.n-insights-notice, .n-insights-ai-note, .n-insights-empty { display:flex; align-items:flex-start; gap:.75rem; border:1px solid var(--n-border); border-radius:var(--n-radius-lg); background:var(--n-surface); padding:1rem 1.1rem; box-shadow:var(--n-shadow-xs); }
.n-insights-notice { border-color:#bae6fd; background:#f0f9ff; color:#164e63; }
.n-insights-notice i, .n-insights-ai-note i { flex:0 0 auto; padding-top:.1rem; font-size:1.2rem; }
.n-insights-notice p { margin:0; font-size:.76rem; line-height:1.55; }
.n-insights-notice p strong { font-weight:800; }
.n-insights-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.75rem; margin:1rem 0; }
.n-insights-metrics article { display:grid; gap:.2rem; min-height:7.5rem; border:1px solid var(--n-border); border-radius:var(--n-radius-lg); background:var(--n-surface); padding:1rem; box-shadow:var(--n-shadow-xs); }
.n-insights-metrics article.is-positive { border-color:#86efac; background:#f0fdf4; }
.n-insights-metrics article.is-warning { border-color:#fed7aa; background:#fff7ed; }
.n-insights-metric-label { color:var(--n-text-secondary); font-size:.72rem; font-weight:750; }
.n-insights-metrics strong { align-self:center; color:var(--n-text); font-size:1.8rem; line-height:1; font-variant-numeric:tabular-nums; }
.n-insights-metrics small { color:var(--n-text-muted); font-size:.68rem; }
.n-insights-panel { margin-top:1rem; overflow:hidden; border:1px solid var(--n-border); border-radius:var(--n-radius-lg); background:var(--n-surface); box-shadow:var(--n-shadow-sm); }
.n-insights-panel-header { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; padding:1.2rem 1.25rem 1rem; }
.n-insights-panel-header h2 { margin:0 0 .25rem; font-size:1.1rem; letter-spacing:-.015em; }
.n-insights-panel-header p { max-width:62ch; margin:0; color:var(--n-text-secondary); font-size:.74rem; }
.n-insights-count { color:var(--n-text-muted); font-size:.7rem; font-weight:750; white-space:nowrap; }
.n-insights-table-wrap { overflow-x:auto; }
.n-insights-table { width:100%; margin:0; border-collapse:collapse; font-size:.76rem; }
.n-insights-table th, .n-insights-table td { border-top:1px solid var(--n-border-light); padding:.8rem 1.25rem; text-align:left; vertical-align:middle; }
.n-insights-table thead th { background:#fbfaf7; color:var(--n-text-secondary); font-size:.67rem; font-weight:800; letter-spacing:.02em; white-space:nowrap; }
.n-insights-table tbody th { min-width:12rem; font-weight:750; }
.n-insights-table tbody th span, .n-insights-table tbody th small { display:block; }
.n-insights-table tbody th small { margin-top:.15rem; color:var(--n-text-muted); font-size:.67rem; font-weight:500; }
.n-insights-table td { color:var(--n-text-secondary); font-variant-numeric:tabular-nums; }
.n-insights-state { display:inline-flex; align-items:center; border-radius:999px; padding:.28rem .55rem; font-size:.68rem; font-weight:800; white-space:nowrap; }
.n-insights-state.tracked { background:var(--n-success-pale); color:#166534; }
.n-insights-state.partial { background:#fef3c7; color:#854d0e; }
.n-insights-state.without-follow-up { background:#fef2f2; color:#991b1b; }
.n-insights-state.is-empty { background:#f5f5f4; color:var(--n-text-muted); }
.n-insights-panel-empty { margin:0; border-top:1px solid var(--n-border-light); padding:1.2rem 1.25rem; color:var(--n-text-muted); font-size:.78rem; }
/* Le meme dessin que .n-ai-note, au pixel pres : deux composants pour le meme role
   finissent par ne plus se ressembler, et l'assistant cesse d'etre reconnaissable
   d'un ecran a l'autre. */
.n-insights-ai-note { display:flex; align-items:flex-start; gap:.75rem; margin:1rem 0 0; border:1px solid #ddd6fe; border-radius:var(--n-radius-lg); background:#faf5ff; padding:.9rem 1rem; color:#5b21b6; }
.n-insights-ai-note > i { flex:0 0 auto; padding-top:.1rem; font-size:1.15rem; }
.n-insights-ai-note div { display:grid; gap:.35rem; }
.n-insights-ai-note strong { font-size:.78rem; font-weight:800; }
.n-insights-ai-note p { margin:0; color:var(--n-text); font-size:.82rem; line-height:1.5; }
.n-insights-ai-note span { margin-top:0; color:#6b21a8; font-size:.68rem; }
.n-insights-empty { align-items:center; min-height:14rem; justify-content:center; text-align:left; }
.n-insights-empty > i { color:var(--n-brand); font-size:2rem; }
.n-insights-empty h2 { margin:0 0 .35rem; font-size:1.1rem; }
.n-insights-empty p { margin:0 0 1rem; color:var(--n-text-secondary); font-size:.78rem; }
@media (max-width: 767.98px) {
    .n-insights-shell { padding-top:1.4rem; }
    .n-insights-header { align-items:flex-start; flex-direction:column; }
    .n-insights-header .btn { align-self:stretch; }
    .n-insights-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .n-insights-panel-header { padding:.95rem; }
    .n-insights-table th, .n-insights-table td { padding:.7rem .75rem; }
    .n-insights-table thead { display:none; }
    .n-insights-table, .n-insights-table tbody, .n-insights-table tr, .n-insights-table th, .n-insights-table td { display:block; }
    .n-insights-table tr { border-top:1px solid var(--n-border-light); padding:.75rem; }
    .n-insights-table tbody tr:first-child { border-top:0; }
    .n-insights-table tbody th { min-width:0; padding:.15rem 0 .5rem; }
    .n-insights-table td { display:flex; justify-content:space-between; gap:1rem; border:0; padding:.22rem 0; }
    .n-insights-table td::before { color:var(--n-text-muted); content:attr(data-label); font-size:.68rem; }
    .n-insights-table td:nth-child(2)::before { content:'Couverture'; }
    .n-insights-table td:nth-child(3)::before { content:'Surface suivie'; }
    .n-insights-table td:nth-child(4)::before { content:'À relire'; }
    .n-insights-table td:nth-child(5)::before { content:'Dernière saisie'; }
    .n-insights-attendance-table td:nth-child(2)::before { content:'Absences'; }
    .n-insights-attendance-table td:nth-child(3)::before { content:'Retards'; }
    .n-insights-attendance-table td:nth-child(4)::before { content:'Dernier signal'; }
    .n-insights-attendance-table td:nth-child(5)::before { content:'Dernière séance'; }
    .n-insights-attendance-table td:nth-child(6)::before { content:''; }
}
@media (max-width: 420px) {
    .n-insights-metrics { grid-template-columns:1fr; }
}

/* États des deux gestes du bloc « à réviser » (voir js/quran-plan.js). */
.n-quran-plan-touch[aria-pressed="true"] {
    background: var(--n-success-pale); border-color: var(--n-success); color: var(--n-success);
}
.n-quran-plan-item-done { opacity: .55; }
.n-quran-plan-error {
    flex: 1 1 100%; font-size: .78125rem; color: var(--n-danger); margin-top: .35rem;
}

/* === Tableau de bord partagé ================================================
   Les briques de pages/clean/insights/_macros.twig. Un même indicateur se dessine
   ici une seule fois : deux dessins d'un même chiffre finissent par en donner deux
   lectures, et c'est toujours la plus flatteuse que l'on retient.

   La couleur d'état ne porte jamais l'information seule — chaque pastille est
   doublée d'un chiffre et d'une icône, lisibles en niveaux de gris comme en
   daltonisme. */

.n-insight-window { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0 0 1rem; }
.n-insight-window-label { display: inline-flex; align-items: center; gap: .3rem; color: var(--n-text-muted); font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.n-insight-window-choices { display: inline-flex; gap: .2rem; border: 1px solid var(--n-border); border-radius: .7rem; background: #fff; padding: .2rem; }
.n-insight-window-choice { border-radius: .5rem; padding: .32rem .8rem; color: var(--n-text-secondary); font-size: .8rem; font-weight: 650; text-decoration: none; }
.n-insight-window-choice:hover { background: var(--n-brand-pale); color: var(--n-brand-dark); text-decoration: none; }
.n-insight-window-choice.is-active { background: var(--n-brand); color: #fff; }
.n-insight-window-title { color: var(--n-text-secondary); font-size: .82rem; font-style: italic; }
.n-insight-scope-note { display: flex; align-items: center; gap: .4rem; margin: 0 0 1rem; border: 1px solid var(--n-border-light); border-radius: .7rem; background: #fff; padding: .55rem .8rem; color: var(--n-text-secondary); font-size: .8rem; }

.n-insight-board { margin: 0 0 1.5rem; }
.n-insight-board-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .85rem; }
.n-insight-board-header h2 { margin: .1rem 0 0; font-size: 1.15rem; }
.n-insight-board-count { color: var(--n-text-muted); font-size: .8rem; font-variant-numeric: tabular-nums; }

.n-insight-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .75rem; margin-bottom: .9rem; }
.n-insight-tile { display: flex; align-items: flex-start; gap: .65rem; border: 1px solid var(--n-border); border-left: 3px solid var(--n-border); border-radius: .8rem; background: #fff; padding: .8rem .9rem; }
.n-insight-tile > i { display: grid; place-items: center; width: 2rem; height: 2rem; flex: 0 0 auto; border-radius: .6rem; background: var(--n-surface-muted, #f6f5f3); color: var(--n-text-muted); font-size: 1rem; }
.n-insight-tile > div { display: flex; min-width: 0; flex-direction: column; }
.n-insight-tile strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; }
.n-insight-tile-label { color: var(--n-text-secondary); font-size: .78rem; font-weight: 650; }
.n-insight-tile-hint { color: var(--n-text-muted); font-size: .72rem; }
.n-insight-tile.is-good { border-left-color: var(--n-success); }
.n-insight-tile.is-good > i { background: var(--n-success-pale); color: var(--n-success); }
.n-insight-tile.is-watch { border-left-color: var(--n-warning); }
.n-insight-tile.is-watch > i { background: var(--n-warning-pale); color: var(--n-warning); }
.n-insight-tile.is-alert { border-left-color: var(--n-danger); }
.n-insight-tile.is-alert > i { background: var(--n-danger-pale); color: var(--n-danger); }
.n-insight-tile.is-neutral { border-left-color: var(--n-brand); }
.n-insight-tile.is-neutral > i { background: var(--n-brand-pale); color: var(--n-brand-dark); }

.n-insight-delta { display: inline-flex; align-items: baseline; gap: .25rem; margin-top: .2rem; font-size: .74rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.n-insight-delta small { color: var(--n-text-muted); font-weight: 500; }
.n-insight-delta.is-up { color: var(--n-danger); }
.n-insight-delta.is-down { color: var(--n-success); }
.n-insight-delta.is-flat { color: var(--n-text-muted); }

.n-insight-highlights { display: grid; gap: .4rem; margin: 0 0 .9rem; padding: 0; list-style: none; }
.n-insight-highlights li { display: flex; align-items: flex-start; gap: .5rem; border: 1px solid var(--n-border-light); border-radius: .7rem; background: #fff; padding: .55rem .75rem; font-size: .82rem; }
.n-insight-highlights li > i { flex: 0 0 auto; font-size: .95rem; }
.n-insight-highlights li.is-good { border-color: #bbf7d0; background: var(--n-success-pale); color: #14532d; }
.n-insight-highlights li.is-watch { border-color: #fed7aa; background: var(--n-warning-pale); color: #7c2d12; }
.n-insight-highlights li.is-alert { border-color: #fecaca; background: var(--n-danger-pale); color: #7f1d1d; }

.n-insight-panel { margin-bottom: .9rem; border: 1px solid var(--n-border); border-radius: .85rem; background: #fff; padding: .9rem 1rem 1rem; }
.n-insight-panel > h3 { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; margin: 0 0 .7rem; font-size: .92rem; font-weight: 700; }
.n-insight-panel > h3 small { color: var(--n-text-muted); font-size: .74rem; font-weight: 500; }

.n-insight-chart { margin: 0; }
.n-insight-chart svg { display: block; width: 100%; height: auto; }
.n-chart-bar { fill: var(--n-brand); }
.n-chart-key.is-bar { width: .7rem; height: .7rem; border: 0; border-radius: .15rem; background: var(--n-brand); }
.n-insight-chart-legend { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: .5rem; color: var(--n-text-muted); font-size: .74rem; }
.n-insight-chart-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.n-insight-chart-legend .n-insight-chart-scale { margin-left: auto; font-style: italic; }
.n-insight-figures { margin-top: .5rem; border-top: 1px solid var(--n-border-light); }
.n-insight-figures > summary { cursor: pointer; padding: .5rem 0 0; color: var(--n-text-secondary); font-size: .76rem; font-weight: 650; }

.n-insight-table-wrap { overflow-x: auto; }
.n-insight-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.n-insight-table th { border-bottom: 1px solid var(--n-border); padding: .45rem .6rem; color: var(--n-text-muted); font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.n-insight-table td { border-bottom: 1px solid var(--n-border-light); padding: .45rem .6rem; font-variant-numeric: tabular-nums; }
.n-insight-table tbody tr:last-child td { border-bottom: 0; }
.n-insight-table tr.is-alert td:first-child { box-shadow: inset 3px 0 0 var(--n-danger); }
.n-insight-table tr.is-watch td:first-child { box-shadow: inset 3px 0 0 var(--n-warning); }

.n-insight-breakdown { display: grid; gap: .45rem; }
.n-insight-breakdown-row { display: grid; grid-template-columns: minmax(6rem, 10rem) 1fr auto auto; align-items: center; gap: .6rem; }
.n-insight-breakdown-name { overflow: hidden; font-size: .8rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.n-insight-breakdown-bar { overflow: hidden; height: .6rem; border-radius: 999px; background: #f1efec; }
.n-insight-breakdown-bar > i { display: block; height: 100%; border-radius: 999px; background: var(--n-brand); }
.n-insight-breakdown-bar.is-good > i { background: var(--n-success); }
.n-insight-breakdown-bar.is-watch > i { background: var(--n-warning); }
.n-insight-breakdown-bar.is-alert > i { background: var(--n-danger); }
.n-insight-breakdown-value { font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.n-insight-breakdown-value small { color: var(--n-text-muted); font-weight: 500; }

@media (max-width: 640px) {
    .n-insight-breakdown-row { grid-template-columns: 1fr auto; }
    .n-insight-breakdown-bar { order: 9; grid-column: 1 / -1; }
    .n-insight-window { align-items: flex-start; flex-direction: column; }
    .n-insight-window-choices { width: 100%; }
    .n-insight-window-choice { flex: 1; text-align: center; }
}
.n-insight-duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: .9rem; }
.n-insight-duo .n-insight-panel { margin-bottom: 0; }
.n-insight-plan { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .9rem; }
.n-insight-plan ul { margin: .3rem 0 0; padding-left: 1.1rem; font-size: .82rem; }
.n-insight-plan li { margin-bottom: .2rem; }
.n-section-count { color: var(--n-text-muted); font-size: .78rem; font-variant-numeric: tabular-nums; }

/* --- Actions groupées ------------------------------------------------------
   La barre n'apparaît qu'une fois quelque chose de coché : en permanence, elle
   prendrait de la place sans rien apprendre. */
.n-bulk-form { margin: 0; }
.n-bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .6rem; border: 1px solid var(--n-brand); border-radius: .7rem; background: var(--n-brand-pale); padding: .55rem .75rem; }
.n-bulk-bar[hidden] { display: none; }
.n-bulk-count { margin-right: .3rem; color: var(--n-brand-dark); font-size: .78rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.n-bulk-bar .n-bulk-action { min-height: 2.25rem; border-radius: .5rem; background: #fff; padding: .3rem .75rem; font-size: .78rem; font-weight: 650; }
.n-bulk-cancel { margin-left: auto; border: 0; background: transparent; color: var(--n-text-secondary); font: inherit; font-size: .76rem; font-weight: 650; cursor: pointer; text-decoration: underline; }
.n-bulk-cell { width: 2.25rem; text-align: center; }
.n-bulk-cell input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--n-brand); }

/* --- Évaluations famille, en une ligne -------------------------------------
   Les notes sont sur la ligne, pas derrière un dépliant : une note qu'il faut
   déplier pour lire n'est pas consultable, et comparer deux séances demandait
   deux gestes. Seul le commentaire écrit — du texte long — reste replié. */
.family-evaluation-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .8rem; border: 1px solid var(--n-border); border-radius: .9rem; background: #fff; padding: .7rem .85rem; }
.family-evaluation-row .family-evaluation-comment { grid-column: 1 / -1; border-top: 1px solid var(--n-border-light); padding-top: .5rem; }
.family-evaluation-row .family-evaluation-comment > summary { cursor: pointer; color: var(--n-brand-dark); font-size: .68rem; font-weight: 750; list-style: none; }
.family-evaluation-row .family-evaluation-comment > summary::-webkit-details-marker { display: none; }
.family-note-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .3rem; }
.family-note-chip { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid var(--n-border-light); border-radius: var(--n-radius-full); background: var(--n-surface-soft); padding: .18rem .45rem .18rem .55rem; white-space: nowrap; }
.family-note-chip small { color: var(--n-text-muted); font-size: .6rem; font-weight: 700; }
@media (max-width: 720px) {
    .family-evaluation-row { grid-template-columns: auto minmax(0, 1fr); }
    .family-note-chips { grid-column: 1 / -1; justify-content: flex-start; }
}


/* --- L'en-tête élève, ramené à sa taille utile -----------------------------
   La bannière occupait un tiers d'un écran d'ordinateur et deux écrans de
   défilement sur téléphone AVANT la première ligne de contenu. Elle porte
   pourtant trois informations : qui, quelle classe, et deux raccourcis.

   Rien n'est supprimé — ni le nom, ni la classe, ni les boutons. C'est la
   place qui est rendue : moins de rembourrage, un titre à l'échelle du texte
   qui l'entoure, et la frise décorative retirée du flux là où l'écran est
   compté. Un décor qui coûte un écran de défilement n'est plus un décor. */
.n-student-hero { gap: .9rem; padding: .95rem 1.15rem; }
.n-student-hero::before { right: -12rem; bottom: -14rem; }
.n-student-identity { gap: .7rem; }
.n-student-identity h1 { margin: .1rem 0 0; font-size: clamp(1.15rem, 2.4vw, 1.6rem); }
.n-student-identity p { margin: .18rem 0 0; }
.n-quran-continuity { position: static; margin-top: .1rem; grid-column: 1 / -1; }
.n-quran-continuity > img { width: 1.4rem; height: 1.65rem; }

@media (max-width: 860px) {
    /* Sur un écran étroit, la frise « Lire · Mémoriser · Réviser » est du décor
       pur : elle pousse le contenu d'une hauteur d'écran pour ne rien dire. */
    .n-quran-continuity { display: none; }
    .n-student-hero { grid-template-columns: minmax(0, 1fr); padding: .8rem .9rem; }
    .n-student-hero-actions { justify-content: stretch; }
    .n-student-hero-actions .btn { flex: 1; }
    /* La phrase d'accroche ne s'adresse à personne qui soit déjà arrivé ici. */
    .n-student-identity p { font-size: .68rem; }
}

@media (max-width: 560px) {
    .n-student-identity .n-student-avatar { width: 3rem; height: 3rem; font-size: .8rem; }
    .n-student-identity h1 { font-size: 1.1rem; }
    /* Les sous-titres d'onglets doublent la hauteur de la barre pour répéter ce
       que le titre dit déjà. */
    .family-student-tab small { display: none; }
    .family-student-tabs-wrap { padding: .25rem; }
}
/* La liste de contrôle de la bascule est repliable : douze vérifications
   techniques utiles une semaine par an ne doivent pas occuper l'écran les onze
   autres mois — mais elles s'ouvrent d'elles-mêmes la semaine où elles servent. */
details.n-rollover-panel > summary { cursor: pointer; list-style: none; }
details.n-rollover-panel > summary::-webkit-details-marker { display: none; }
details.n-rollover-panel > summary::after { content: "▸"; margin-left: auto; color: var(--n-text-muted); transition: transform .15s; }
details.n-rollover-panel[open] > summary::after { transform: rotate(90deg); }

/* --- Photo d'élève ---------------------------------------------------------
   La photo remplit le même gabarit que les initiales : une vignette qui change
   de taille selon qu'un parent a déposé une image ou non ferait sauter la mise
   en page d'une liste de classe au fil du défilement. */
.n-student-avatar.has-photo,
.n-supervision-avatar.has-photo,
.n-roster-avatar.has-photo,
.n-session-student-avatar.has-photo { overflow: hidden; padding: 0; background: var(--n-surface-soft); }
.n-student-avatar.has-photo > img,
.n-supervision-avatar.has-photo > img,
.n-roster-avatar.has-photo > img,
.n-session-student-avatar.has-photo > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* L'avatar EST le bouton de dépôt.

   Le bloc séparé qui vivait dans l'en-tête ajoutait un troisième enfant à une
   grille à deux colonnes : le nom passait à la ligne, les deux boutons d'accès
   rapide s'empilaient, et son texte d'aide était gris foncé sur bleu foncé.
   L'endroit où la photo va s'afficher est l'endroit où l'on clique — ça ne coûte
   pas un pixel de plus. */
.n-student-photo-slot { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: .2rem; flex: 0 0 auto; }
.n-student-photo-trigger { position: relative; display: block; margin: 0; cursor: pointer; }
.n-student-photo-badge { position: absolute; right: -.15rem; bottom: -.15rem; display: grid; place-items: center; width: 1.35rem; height: 1.35rem; border: 2px solid var(--n-brand-dark); border-radius: 50%; background: #fff; color: var(--n-brand-dark); font-size: .68rem; transition: transform .14s ease; }
.n-student-photo-trigger:hover .n-student-photo-badge { transform: scale(1.12); }
.n-student-photo-trigger:focus-within .n-student-photo-badge,
.n-student-photo-slot input:focus-visible + .n-student-photo-badge { outline: 3px solid #fff; outline-offset: 1px; }
.n-student-photo-remove { border: 0; background: transparent; padding: 0; color: rgba(255,255,255,.72); font: inherit; font-size: .58rem; font-weight: 700; letter-spacing: .03em; text-decoration: underline; text-transform: uppercase; cursor: pointer; }
.n-student-photo-remove:hover { color: #fff; }
.n-student-photo-status:empty { display: none; }
.n-student-photo-status { max-width: 9rem; color: rgba(255,255,255,.82); font-size: .58rem; text-align: center; }
.n-student-photo-slot[aria-busy="true"] { opacity: .55; pointer-events: none; }

/* === Le texte du jour ========================================================
   Une respiration entre l'en-tête et le travail, pas un objet de plus.

   Ni fond plein, ni ombre, ni coin arrondi : deux filets suffisent à dire
   « autre registre », et une bande qui ressemblerait à une carte demanderait
   d'être lue comme une carte. Large et basse par construction — l'arabe et le
   français sont côte à côte tant que la largeur le permet — pour que les devoirs
   et les classes restent au-dessus de la ligne de flottaison. */

@font-face {
    font-family: "Amiri Quran";
    font-style: normal;
    font-weight: 400;
    /* `swap` : le texte français s'affiche immédiatement, l'arabe se compose dès
       que la fonte arrive. Bloquer le rendu pour 45 Ko d'ornement serait payer
       l'accueil au prix d'un bandeau. */
    font-display: swap;
    src: url("/assets/fonts/amiri/amiri-quran-arabic.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

.n-verse {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 1.1rem 2rem;
    margin: 0 0 1.25rem;
    border-top: 1px solid var(--n-quran);
    border-bottom: 1px solid var(--n-border-light);
    padding: .85rem 0 .9rem;
}
.n-verse-mark {
    /* Dans le blanc, jamais derrière le texte. Au centre il faisait un trou dans la
       mise en page ; à droite il passait derrière l'arabe et en brouillait les
       signes. À gauche, il y a de la marge aux deux tailles d'écran. */
    position: absolute;
    top: 50%;
    left: -1.6rem;
    width: 6.5rem;
    height: 6.5rem;
    color: var(--n-quran);
    opacity: .07;
    transform: translateY(-50%);
    pointer-events: none;
}
.n-verse-arabic {
    order: 2;
    margin: 0;
    color: var(--n-quran-dark);
    font-family: "Amiri Quran", "Scheherazade New", Georgia, serif;
    font-size: clamp(1.25rem, 2.6vw, 1.75rem);
    /* L'arabe vocalisé a besoin d'air sous la ligne : les signes descendent. */
    line-height: 2;
    text-align: right;
    /* Une ligne arabe longue doit céder plutôt que d'élargir la page : sans cela
       un téléphone se met à défiler latéralement sur toute la hauteur. */
    overflow-wrap: break-word;
}
.n-verse-latin { order: 1; min-width: 0; }
.n-verse-french {
    margin: 0;
    max-width: 62ch;
    color: var(--n-text);
    font-size: .9rem;
    font-style: italic;
    line-height: 1.55;
}
.n-verse-source {
    margin: .22rem 0 0;
    color: var(--n-text-muted);
    font-size: .68rem;
    font-style: normal;
    font-weight: 700;
    letter-spacing: .04em;
}
/* Une sélection dans la bande reste dans le registre de la bande : les surfaces
   qu'on ne dessine pas portent le design elles aussi. */
.n-verse ::selection { background: var(--n-quran-pale); color: var(--n-quran-dark); }

@media (max-width: 720px) {
    /* Empilé, l'arabe passe EN PREMIER : c'est le texte, le français en est la
       traduction. L'ordre visuel doit dire lequel des deux fait autorité. */
    .n-verse { grid-template-columns: minmax(0, 1fr); gap: .35rem; padding: .7rem 0 .75rem; }
    .n-verse-arabic { order: 1; line-height: 1.9; }
    .n-verse-latin { order: 2; }
    .n-verse-mark { top: auto; bottom: -.2rem; left: -1.1rem; width: 4.25rem; height: 4.25rem; opacity: .06; transform: none; }
}
/* « Ma révision du jour » : calculé la nuit, affiché sans texte généré. */
.n-quran-plan { margin: 0 0 1rem; border: 1px solid var(--n-quran); border-radius: .85rem; background: var(--n-quran-pale); padding: .85rem 1rem 1rem; }
.n-quran-plan > h3 { margin: 0 0 .6rem; color: var(--n-quran-dark); font-size: .95rem; font-weight: 800; }
.n-quran-plan-note { margin: .6rem 0 0; color: var(--n-text-muted); font-size: .72rem; font-style: italic; }
.n-plan-verses { color: var(--n-text-muted); font-size: .72rem; font-variant-numeric: tabular-nums; }
/* Le panneau de réglages du lecteur est replié au chargement : on règle le
   récitateur une fois, on lit la page tout le temps. « Régler » et le chevron
   disent qu'il y a quelque chose à ouvrir — un panneau replié sans affordance
   passe pour une barre morte. */
.quran-reader-navigation-hint { display: inline-flex; align-items: center; margin-left: .45rem; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: .05rem .45rem; font-size: .58rem; font-weight: 700; letter-spacing: .06em; opacity: .85; text-transform: uppercase; }
.quran-reader-navigation-toggle[aria-expanded="true"] .quran-reader-navigation-hint { opacity: .45; }
/* Un repli d'insights : le résumé chiffré reste dehors, le détail s'ouvre. */
.n-insight-fold { margin: 0 0 .9rem; }
.n-insight-fold > summary { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--n-border); border-radius: .7rem; background: #fff; padding: .45rem .8rem; color: var(--n-brand-dark); font-size: .78rem; font-weight: 700; cursor: pointer; list-style: none; }
.n-insight-fold > summary::-webkit-details-marker { display: none; }
.n-insight-fold > summary::after { content: "▸"; color: var(--n-text-muted); transition: transform .15s; }
.n-insight-fold[open] > summary { margin-bottom: .7rem; }
.n-insight-fold[open] > summary::after { transform: rotate(90deg); }
.n-insight-fold > summary:hover { border-color: var(--n-brand); }

/* --- Actions d'IA : une pastille, la même partout -----------------------------
   Un geste, un résultat. Le professeur clique, la traduction s'ajoute au texte,
   l'enregistrement automatique fait le reste et les familles la lisent. L'étincelle
   dit « c'est l'assistant » : la même partout, on la reconnaît après l'avoir vue
   une fois. */
.n-ai-chip { display: inline-flex; align-items: center; gap: .3rem; min-height: 1.9rem; border: 1px solid #c4b5fd; border-radius: 999px; background: #fff; padding: .2rem .7rem; color: #5b21b6; font: inherit; font-size: .72rem; font-weight: 700; line-height: 1.4; white-space: nowrap; cursor: pointer; }
.n-ai-chip:hover { border-color: #7c3aed; background: #faf5ff; }
.n-ai-chip.is-primary { border-color: #7c3aed; background: #7c3aed; color: #fff; }
.n-ai-chip.is-primary:hover { background: #6d28d9; }
.n-ai-chip:disabled { opacity: .6; cursor: progress; }
.n-ai-chip:focus-visible { outline: 3px solid #ddd6fe; outline-offset: 1px; }
.n-ai-chip > i { font-size: .82rem; }

.n-ai-translate { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .45rem; }
.n-ai-translate-out { flex: 1 1 100%; margin: .3rem 0 0; color: var(--n-text-secondary); font-size: .72rem; }
.n-ai-translate-out.is-error { color: var(--n-danger); font-weight: 650; }

/* Les compteurs passent a deux par ligne sur telephone.
 *
 * Le minmax(190px) de la grille ne laissait tenir qu'une seule colonne dans les
 * 340px utiles d'un telephone : deux chiffres occupaient 450px de hauteur.
 *
 * Ce bloc est en FIN DE FEUILLE a dessein. Place plus haut, il etait ecrase par
 * la declaration de base de .n-insight-tiles, qui vient plus loin dans le
 * fichier a specificite egale — la regle etait bien la, la capture montrait les
 * compteurs toujours empiles. Une media query ne l'emporte pas sur l'ordre.
 */
@media (max-width: 767.98px) {
    .n-insight-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
    .n-insight-tile { border-left-width: 3px; padding: .7rem .75rem; }
    .n-insight-tile strong { font-size: 1.3rem; }
    .n-insight-tile small { font-size: .62rem; }
}

/* La derniere lecon de l'annee ecoulee, en tete de l'onglet Coran.
 *
 * Discrete par construction : c'est un repere de rentree, pas une alerte. Le
 * liseree ambre la distingue du plan de revision qui la suit sans crier. */
.n-previous-year {
    display: flex; align-items: flex-start; gap: .6rem;
    margin: 0 0 .8rem; border: 1px solid var(--n-border-light);
    border-left: 3px solid var(--n-gold, #b8872f); border-radius: .55rem;
    background: var(--n-gold-pale, #faf3e4); padding: .7rem .85rem;
}
.n-previous-year > i { flex: 0 0 auto; color: var(--n-gold, #b8872f); font-size: 1.05rem; line-height: 1.4; }
.n-previous-year strong { display: block; color: var(--n-text); font-size: .74rem;
    font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.n-previous-year p { margin: .18rem 0 0; color: var(--n-text); font-size: .86rem; }
.n-previous-year p b { font-weight: 700; }
.n-previous-year-what { color: var(--n-text-muted); }
.n-previous-year-what::after { content: ' · '; color: var(--n-border); }
.n-previous-year-date { color: var(--n-text-muted); }
.n-previous-year-date::before { content: ' · '; color: var(--n-border); }
.n-previous-year small { display: block; margin-top: .28rem; color: var(--n-text-muted); font-size: .7rem; }
.n-previous-year small a { color: var(--n-quran-dark, #087f6b); text-decoration: underline; }
@media (max-width: 767.98px) {
    .n-previous-year { padding: .6rem .7rem; }
    .n-previous-year p { font-size: .82rem; }
}

/* Le bandeau d'archive, sur chaque page de l'annee ecoulee.
 *
 * Il occupe toute la largeur, en haut, avant la navigation : l'interface de
 * l'archive etait jusqu'ici identique a celle de la production, et un professeur
 * pouvait y saisir une seance en croyant travailler sur l'annee en cours. Le
 * ton ambre est celui qu'on emploie deja pour « ceci vient du passe » sur la
 * derniere lecon ; il previent sans dramatiser une consultation legitime. */
.n-archive-banner {
    display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .7rem;
    border-bottom: 1px solid var(--n-gold, #b8872f);
    background: var(--n-gold-pale, #faf3e4);
    padding: .5rem .9rem; color: var(--n-text); font-size: .82rem; line-height: 1.35;
}
.n-archive-banner > i { color: var(--n-gold, #b8872f); font-size: 1rem; }
.n-archive-banner strong { font-weight: 800; }
.n-archive-banner a {
    margin-left: auto; color: var(--n-brand-dark, #155e75);
    font-weight: 700; text-decoration: underline; white-space: nowrap;
}
/* Un controle neutralise doit se voir inerte, sinon on clique et rien n'arrive. */
.n-archive-disabled,
body[data-archive="1"] form[aria-disabled="true"] :disabled {
    opacity: .55; cursor: not-allowed;
}
@media (max-width: 767.98px) {
    .n-archive-banner { padding: .45rem .7rem; font-size: .76rem; }
    .n-archive-banner a { margin-left: 0; width: 100%; }
}
/* Le message de refus, quand toastr n'est pas charge (pages sans session). */
.n-archive-toast {
    position: fixed; left: 50%; bottom: 1.1rem; z-index: 2000;
    transform: translateX(-50%) translateY(.6rem);
    max-width: min(28rem, calc(100vw - 2rem));
    border: 1px solid var(--n-gold, #b8872f); border-radius: .55rem;
    background: #fff; padding: .6rem .9rem;
    box-shadow: 0 6px 20px rgba(31, 41, 51, .16);
    color: var(--n-text); font-size: .84rem;
    opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
}
.n-archive-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) { .n-archive-toast { transition: none; } }

/* La recherche globale de la supervision.
 *
 * Le bouton reste discret dans la barre : c'est un outil quotidien, pas une
 * annonce. La fenetre, elle, prend le centre de l'ecran et pose le champ tout en
 * haut — on tape avant de regarder. */
.n-global-search-trigger {
    display: inline-flex; align-items: center; gap: .4rem;
    border: 1px solid var(--n-border); border-radius: 2rem;
    background: #fff; padding: .3rem .75rem;
    color: var(--n-text-muted); font-size: .8rem; line-height: 1.2;
    cursor: pointer; transition: border-color .15s ease, color .15s ease;
}
.n-global-search-trigger:hover, .n-global-search-trigger:focus-visible {
    border-color: var(--n-brand); color: var(--n-brand-dark, #155e75);
}
.n-global-search-trigger kbd {
    border: 1px solid var(--n-border-light); border-radius: .25rem;
    background: var(--n-bg, #f6f7f7); padding: 0 .25rem;
    color: var(--n-text-muted); font-size: .66rem; font-family: inherit;
}
@media (max-width: 991.98px) { .n-global-search-trigger kbd { display: none; } }
@media (max-width: 575.98px) { .n-global-search-trigger span { display: none; } }

.n-global-search { position: fixed; inset: 0; z-index: 1080; }
.n-global-search-backdrop { position: absolute; inset: 0; background: rgba(15, 32, 39, .45); }
.n-global-search-panel {
    position: relative; margin: 4vh auto 0; width: min(40rem, calc(100vw - 1.5rem));
    max-height: 84vh; display: flex; flex-direction: column;
    border-radius: .8rem; background: #fff; overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 32, 39, .28);
}
.n-global-search-field {
    display: flex; align-items: center; gap: .5rem;
    border-bottom: 1px solid var(--n-border-light); padding: .7rem .9rem;
}
.n-global-search-field > i { color: var(--n-brand); font-size: 1.1rem; }
.n-global-search-field input {
    flex: 1 1 auto; border: 0; background: transparent;
    font-size: 1rem; color: var(--n-text);
}
.n-global-search-field input:focus { outline: none; }
.n-global-search-dismiss {
    border: 1px solid var(--n-border-light); border-radius: .3rem;
    background: var(--n-bg, #f6f7f7); padding: .1rem .4rem;
    color: var(--n-text-muted); font-size: .7rem; cursor: pointer;
}
.n-global-search-hint {
    margin: 0; border-bottom: 1px solid var(--n-border-light);
    background: var(--n-bg, #f6f7f7); padding: .35rem .9rem;
    color: var(--n-text-muted); font-size: .74rem;
}
.n-global-search-results { overflow-y: auto; padding: .25rem 0 .5rem; }
.n-global-search-groupe {
    display: flex; align-items: baseline; justify-content: space-between;
    padding: .55rem .9rem .2rem; color: var(--n-text-muted);
    font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.n-global-search-groupe small { font-weight: 600; letter-spacing: 0; text-transform: none; }
.n-global-search-ligne {
    display: flex; align-items: center; gap: .6rem;
    padding: .45rem .9rem; color: var(--n-text); text-decoration: none;
}
a.n-global-search-ligne:hover, .n-global-search-ligne.est-active {
    background: var(--n-brand-pale, #ecfeff); text-decoration: none;
}
.n-global-search-ligne.est-inerte { color: var(--n-text-muted); cursor: default; }
.n-global-search-corps { display: flex; flex-direction: column; min-width: 0; }
.n-global-search-corps strong { font-size: .9rem; font-weight: 700; }
.n-global-search-corps small {
    color: var(--n-text-muted); font-size: .74rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.n-global-search-badge {
    margin-left: auto; flex: 0 0 auto;
    border: 1px solid var(--n-gold, #b8872f); border-radius: 1rem;
    background: var(--n-gold-pale, #faf3e4); padding: 0 .45rem;
    color: #7a5a1d; font-size: .66rem; font-style: normal; font-weight: 700;
}
.n-global-search-vide { margin: 0; padding: 1rem .9rem; color: var(--n-text-muted); font-size: .85rem; }
body.n-global-search-ouverte { overflow: hidden; }

/* La bascule vers l'annee ecoulee, au bas du menu profil : discrete par
 * construction — la mention « lecture seule » evite de la confondre avec
 * l'annee en cours. */
.n-archive-switch { display: flex; align-items: center; gap: .4rem; }
.n-archive-switch > i { color: var(--n-gold, #b8872f); }
.n-archive-switch small { margin-left: auto; color: var(--n-text-muted); font-size: .68rem; }
@media (max-width: 767.98px) {
    .n-global-search-panel { margin-top: 2vh; max-height: 92vh; }
}

/* La barre d'onglets du suivi, sur telephone.
 *
 * Mesure : 717 px de contenu dans 364 px de large — deux onglets sur cinq
 * etaient hors de vue, et rien ne le signalait. Le defilement lateral d'une
 * barre d'onglets se decouvre par hasard ; on prefere tout montrer.
 *
 * Deux colonnes, et le cinquieme onglet prend la largeur : un element seul sur
 * sa ligne, a moitie de la largeur des autres, se lit comme une erreur de mise
 * en page. Tablette et bureau tiennent deja sur une ligne, on n'y touche pas. */
/* Les selecteurs portent `.n-student-workspace` : sa regle a deux classes bat
 * une regle a une seule, media query ou pas. Cibler `.family-student-tabs-wrap`
 * seul ne changeait rien — mesure faite, le defilement restait. */
@media (max-width: 575.98px) {
    .n-student-workspace .family-student-tabs,
    .family-student-tabs { overflow-x: visible; }
    .n-student-workspace .family-student-tabs-wrap,
    .family-student-tabs-wrap {
        display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
        min-width: 0; gap: .3rem;
    }
    .n-student-workspace .family-student-tab,
    .family-student-tab {
        display: grid; grid-template-columns: auto minmax(0, 1fr);
        align-items: center; gap: .4rem; min-width: 0; min-height: 0;
        padding: .5rem .55rem; text-align: left; white-space: normal;
    }
    .n-student-workspace .family-student-tab:last-child,
    .family-student-tab:last-child { grid-column: 1 / -1; }
    .n-student-workspace .family-student-tab strong,
    .family-student-tab strong { display: block; font-size: .8rem; line-height: 1.2; }
    .n-student-workspace .family-student-tab small,
    .family-student-tab small {
        display: block; font-size: .64rem; line-height: 1.2; opacity: .8;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
}
/* Un raccourci vers l'onglet deja ouvert ne rend pas service : il promet
 * d'ouvrir ce qui est ouvert. On le retire tant que son onglet est actif. */
[data-family-shortcut][hidden] { display: none !important; }

/* Séances d'une année scolaire close, affichées à la suite des séances vivantes.
   Le doré est déjà celui du bandeau « dernière leçon de N-1 » : même information,
   même couleur. La ligne se lit, ses champs sont inertes. */
.n-quran-session-table .n-quran-entry-row.n-quran-entry-archived,
.n-quran-session-table .n-quran-entry-detail.n-quran-entry-archived {
    background-color: var(--n-gold-pale) !important;
    box-shadow: inset 3px 0 0 var(--n-gold);
}
/* Les champs d'une séance close restent lisibles, mais se voient inertes. */
.n-quran-entry-archived .form-control:disabled,
.n-quran-entry-archived .btn:disabled {
    opacity: .75;
    cursor: not-allowed;
}
.n-quran-entry-archived .form-control,
.n-quran-entry-archived .bootstrap-select > .dropdown-toggle {
    border-color: transparent;
    background-color: transparent;
    color: var(--n-text, #1f2937);
    cursor: default;
    opacity: 1;
}
.n-quran-archived-badge {
    display: inline-block;
    margin-top: .3rem;
    border-radius: 999px;
    background: var(--n-gold);
    padding: .05rem .5rem;
    color: #fff;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .02em;
    white-space: nowrap;
}

/* Google Identity Services sur l'écran de connexion. Le bouton personnalisé
   (« Continuer en tant que … ») est rendu par Google dans .g_id_signin ; le lien
   qui suit reste la porte pour un autre compte. */
.n-auth-google-gsi { display: flex; justify-content: center; margin: 0 0 .65rem; min-height: 2.6rem; }
.n-auth-google-fallback { font-size: .92rem; }

/* ---------------------------------------------------------------------------
   Pied de page. L'ancien empilait un bouton dans une liste de navigation et une
   ligne de copyright dans une grille Bootstrap : sur grand écran il occupait
   toute la largeur pour trois mots, sur mobile il se cassait en deux lignes
   vides. Celui-ci tient sur une seule rangée tant qu'il y a la place.
--------------------------------------------------------------------------- */
.n-footer { margin-top: 3rem; border-top: 1px solid var(--n-border); background: var(--n-surface); }
.n-footer-inner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: .75rem 2rem; padding: 1.4rem 0; max-width: 78rem;
}
.n-footer-brand { display: flex; align-items: center; gap: .7rem; }
.n-footer-brand img { flex: 0 0 auto; width: auto; height: 1.9rem; border-radius: .35rem; }
.n-footer-brand strong { display: block; font-size: .95rem; }
.n-footer-brand small { display: block; color: var(--n-text-muted); font-size: .78rem; }
.n-footer-links { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; }
.n-footer-links a { color: var(--n-text-muted); font-size: .85rem; text-decoration: none; }
.n-footer-links a:hover, .n-footer-links a:focus-visible { color: var(--n-brand); text-decoration: underline; }
.n-footer-legal { margin: 0; color: var(--n-text-muted); font-size: .8rem; white-space: nowrap; }
.n-footer-debug { margin: 0; padding: 0 0 .8rem; color: var(--n-text-muted); font-size: .75rem; text-align: center; }
@media (max-width: 700px) {
    .n-footer-inner { justify-content: center; text-align: center; }
    .n-footer-brand { margin: 0; }
    .n-footer-links { justify-content: center; }
}

/* Bandeau de consentement : discret, en bas, jamais devant le contenu utile. */
.n-consent {
    position: fixed; right: 1rem; bottom: 1rem; left: 1rem; z-index: 1080;
    display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem;
    margin: 0 auto; border: 1px solid var(--n-border); border-radius: var(--n-radius-lg);
    background: var(--n-surface); box-shadow: var(--n-shadow-md);
    padding: .9rem 1.1rem; max-width: 46rem;
}
.n-consent p { margin: 0; flex: 1 1 20rem; color: var(--n-text); font-size: .88rem; }
.n-consent-actions { display: flex; gap: .5rem; margin-left: auto; }
.n-legal-consent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: .8rem; }
.n-legal-consent-state { color: var(--n-text-muted); font-size: .85rem; }

/* Page des mentions légales : une colonne de lecture, pas une pleine largeur. */
.n-legal-page { padding: 2rem 0 3rem; }
.n-legal-container { max-width: 52rem; }
.n-legal-hero h1 { margin: .35rem 0 .6rem; }
.n-legal-updated { color: var(--n-text-muted); font-size: .85rem; }
.n-legal-toc { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin: 1.4rem 0 2rem; padding: .85rem 1rem;
    border: 1px solid var(--n-border); border-radius: var(--n-radius-lg); background: var(--n-surface); }
.n-legal-toc a { color: var(--n-brand); font-size: .85rem; text-decoration: none; }
.n-legal-toc a:hover, .n-legal-toc a:focus-visible { text-decoration: underline; }
.n-legal-section { margin: 0 0 2.25rem; }
.n-legal-section h2 { margin: 0 0 .7rem; font-size: 1.22rem; }
.n-legal-section p, .n-legal-section li { line-height: 1.65; }
.n-legal-section ul { padding-left: 1.15rem; }
.n-legal-table-wrap { overflow-x: auto; margin: .8rem 0 1rem; }
.n-legal-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.n-legal-table th, .n-legal-table td { border-bottom: 1px solid var(--n-border); padding: .6rem .7rem; text-align: left; vertical-align: top; }
.n-legal-table th { color: var(--n-text-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }

/* ──────────────────────────────
   LECTURE SANS DISTRACTION
   La page du Coran occupe l'écran ; le reste du site s'efface. On y entre par le
   bouton de la barre, on en sort par ce même bouton ou par Échap.
   ────────────────────────────── */
.quran-reader-navigation-header {
    display: flex; align-items: stretch; min-width: 0;
    background: linear-gradient(120deg, var(--n-quran-dark), var(--n-quran));
}
.quran-reader-navigation-header > h3 { flex: 1 1 auto; min-width: 0; }

/* Tourner une page : le geste le plus fréquent, donc le plus accessible. */
.quran-reader-quick-nav {
    flex: 0 0 auto; display: flex; align-items: center; gap: .1rem;
    padding-left: .35rem; color: #fff;
}
.quran-reader-quick-button {
    display: grid; place-items: center; width: 2.75rem; min-height: 2.75rem;
    border: 0; border-radius: .55rem; background: transparent;
    color: #fff; font-size: 1.35rem; line-height: 1; cursor: pointer;
    transition: background-color .15s ease;
}
.quran-reader-quick-button:hover { background: rgba(255, 255, 255, .16); }
.quran-reader-quick-button:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.quran-reader-navigation-header .quran-reader-current-page {
    display: inline-flex; align-items: baseline; gap: .3rem;
    min-width: 4.1rem; justify-content: center;
    color: rgba(255, 255, 255, .85); font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em;
}
.quran-reader-navigation-header .quran-reader-current-page strong {
    color: #fff; font-size: 1rem; letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}
@media (max-width: 400px) {
    .quran-reader-navigation-header .quran-reader-current-page > span { display: none; }
    .quran-reader-navigation-header .quran-reader-current-page { min-width: 2.2rem; }
}
.quran-reader-focus-toggle {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; gap: .45rem;
    border: 0; border-left: 1px solid rgba(255, 255, 255, .22);
    background: transparent;
    padding: 0 1rem;
    color: #fff; font-size: .78rem; font-weight: 700; letter-spacing: .01em;
    white-space: nowrap; cursor: pointer;
    transition: background-color .18s ease;
}
.quran-reader-focus-toggle i { font-size: 1.05rem; }
.quran-reader-focus-toggle:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.quran-reader-focus-toggle:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
@media (max-width: 575.98px) {
    /* L'icône suffit quand la barre se resserre : le titre du lecteur prime. */
    .quran-reader-focus-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .quran-reader-focus-toggle { padding: 0 .85rem; }
}

body.n-quran-focus { overflow: hidden; }
/* Tout ce qui n'est pas sur le chemin du lecteur s'efface — sans quitter le DOM,
   pour que la sortie soit instantanée et sans rechargement. Le chemin est marqué
   au moment d'entrer : un élément fixe dont un ancêtre est masqué ne s'affiche
   pas, et la page devenait blanche dès qu'elle avait une autre structure. */
body.n-quran-focus > *:not([data-quran-focus-path]) { display: none !important; }
body.n-quran-focus [data-quran-focus-path] {
    display: block !important;
    margin: 0 !important; padding: 0 !important;
    max-width: none !important; min-height: 0 !important;
}
body.n-quran-focus .n-teacher-header,
body.n-quran-focus .n-public-header,
body.n-quran-focus .n-footer,
body.n-quran-focus .n-mobile-bar,
body.n-quran-focus .n-previous-year,
body.n-quran-focus .family-student-tabs,
body.n-quran-focus .family-page-header { display: none !important; }

body.n-quran-focus .quran-reader {
    position: fixed; inset: 0; z-index: 1090;
    display: flex; flex-direction: column;
    margin: 0; border: 0; border-radius: 0;
    background: var(--n-surface); box-shadow: none;
    overflow: hidden;
}
body.n-quran-focus .quran-reader-accordion { flex: 0 0 auto; }
body.n-quran-focus .quran-reader-workspace {
    flex: 1 1 auto; min-height: 0; overflow: hidden; padding: .55rem;
}
/* Chaque maillon doit porter la hauteur, sinon la page du Coran s'arrête au
   milieu de l'écran pendant que la colonne des versets déborde : c'est la
   COLONNE qui s'étirait, pas son contenu. */
/* `grid-template-rows: minmax(0, 1fr)` et non `height: 100%` seul : une rangee
   automatique se dimensionne sur son contenu le plus haut — la liste des versets
   faisait 1 195 px dans un espace de 1 071, la colonne debordait et la page du
   Coran restait a 715 px de haut. Bornee, la rangee vaut exactement la hauteur
   disponible, les deux colonnes s'y ajustent, et c'est la liste qui defile. */
body.n-quran-focus .quran-reader-layout {
    height: 100%; min-height: 0;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
}
body.n-quran-focus .quran-reader-page-column {
    display: flex; flex-direction: column; min-height: 0; height: 100%;
}
body.n-quran-focus .quran-reader-image-stage {
    flex: 1 1 auto; min-height: 0; height: 100%;
    display: grid; place-items: center; overflow: auto;
}
/* La source du Mushaf ne fait que 538x715 : sans consigne, l'image s'affiche a sa
   taille naturelle et occupe le tiers d'un ecran de 1 728. On la met a l'echelle
   de la hauteur disponible en conservant ses proportions — l'agrandissement est
   deja la norme hors plein ecran, ou elle est etiree a 898 px de large. */
body.n-quran-focus .quran-reader #image {
    width: auto; height: 100%;
    max-width: 100%; max-height: 100%;
    margin: 0; object-fit: contain;
}
/* Selecteur porte sur l'enfant DIRECT de la grille : la colonne des versets porte
   une classe utilitaire heritee (`desktop-h-100`) qui l'emportait, et la liste
   depassait sa zone de 140 px — coupee en bas, avec du blanc dessous. */
body.n-quran-focus .quran-reader-layout > aside.quran-reader-translation {
    height: 100%; max-height: 100%; min-height: 0;
}

@media (max-width: 991.98px) {
    /* Empilé, la page du Coran prime : la liste des versets reste accessible en
       défilant, sans manger l'écran d'entrée de jeu. */
    body.n-quran-focus .quran-reader-workspace { overflow: auto; }
    body.n-quran-focus .quran-reader-layout { height: auto; grid-template-rows: none; }
    body.n-quran-focus .quran-reader-page-column { height: auto; }
    body.n-quran-focus .quran-reader-image-stage { height: auto; min-height: 60vh; }
    body.n-quran-focus .quran-reader-layout > aside.quran-reader-translation { height: auto; max-height: 45vh; }
    body.n-quran-focus .quran-reader #image { height: auto; max-height: none; }
}

/* Le verset courant. Un raccourci qui agit sur un élément que rien ne désigne
   laisse l'utilisateur deviner ce qu'il vient de faire. */
.quran-reader #translate .list-group-item.is-quran-current {
    background: var(--n-quran-pale);
    outline: 2px solid var(--n-quran);
    outline-offset: -2px;
    scroll-margin-block: .75rem;
}

/* Légende des raccourcis, dans le panneau de réglages. */
.quran-reader-shortcuts {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: .3rem .9rem; margin: 0 0 1rem;
    border-bottom: 1px solid var(--n-border-light); padding-bottom: .85rem;
}
.quran-reader-shortcuts > div { display: flex; align-items: baseline; gap: .5rem; min-width: 0; }
.quran-reader-shortcuts dt { display: flex; gap: .2rem; flex: 0 0 auto; margin: 0; }
.quran-reader-shortcuts dd { margin: 0; color: var(--n-text-muted); font-size: .74rem; }
.quran-reader-shortcuts kbd {
    display: inline-grid; place-items: center; min-width: 1.6rem; min-height: 1.35rem;
    border: 1px solid var(--n-border); border-bottom-width: 2px; border-radius: .3rem;
    background: var(--n-surface); padding: 0 .3rem;
    color: var(--n-text); font-family: inherit; font-size: .68rem; font-weight: 700;
    box-shadow: none;
}
@media (max-width: 767.98px) {
    /* Sans clavier, la légende ne sert à rien : c'est le balayage qui tourne les
       pages. On la remplace par la seule phrase utile. */
    .quran-reader-shortcuts > div:not(:first-child) { display: none; }
    .quran-reader-shortcuts > div:first-child dt { display: none; }
    .quran-reader-shortcuts > div:first-child dd::before { content: 'Balayez la page vers la gauche ou la droite pour tourner. '; }
    .quran-reader-shortcuts > div:first-child dd { font-size: .74rem; }
}

/* Le texte du jour, en tête de l'espace famille.
   L'arabe porte la voix : il lui faut de l'interligne, sinon les signes
   diacritiques se touchent d'une ligne à l'autre. La traduction et la référence
   descendent d'un ton sans jamais passer sous le seuil de lisibilité. */
/* Le texte du jour, integre au bandeau — meme traitement que sur la fiche d'un
   enfant : deux filets, de l'air, l'arabe a droite et le francais a gauche. Il
   ne prend plus une bande a part sous la carte. */
.n-family-hero { grid-template-rows: auto auto; }
.n-family-hero-verse { grid-column: 1 / -1; position: relative; z-index: 1; margin-top: .35rem; }
.n-family-hero-verse .n-verse {
    margin-bottom: 0;
    border-top-color: rgba(255, 255, 255, .28);
    border-bottom-color: rgba(255, 255, 255, .14);
}
.n-family-hero-verse .n-verse-arabic { color: #ecfeff; }
.n-family-hero-verse .n-verse-french { color: #e5f7ff; }
.n-family-hero-verse .n-verse-source { color: rgba(255, 255, 255, .64); }
.n-family-hero-verse .n-verse-mark { color: var(--n-quran-pale); opacity: .12; }
}

/* Panneau de réglages du lecteur : une rangée, quatre champs de même hauteur,
   sans encadré intérieur — le bloc « Écoute » était une carte dans une carte. */
.quran-reader-navigation-body { padding: .95rem 1rem 1rem; }
.quran-reader-settings {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    align-items: end; gap: .75rem 1rem;
}
.quran-reader-field { display: grid; gap: .3rem; min-width: 0; margin: 0; }
.quran-reader-field > span {
    color: var(--n-text-muted); font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
}
.quran-reader-field .form-control,
.quran-reader-field .bootstrap-select > .dropdown-toggle { min-height: 2.7rem; }
/* Le champ de page s'entoure d'une bordure que les listes deroulantes portent
   a l'interieur : sans compensation il depassait ses voisins de 2 px, et quatre
   champs cotes a cote ne pardonnent pas 2 px. */
.quran-reader-settings .quran-reader-page-input { min-height: 2.7rem; height: 2.7rem; }
.quran-reader-settings .quran-reader-page-input .form-control { min-height: 0; height: 100%; }
.quran-reader-shortcuts {
    display: flex; flex-wrap: wrap; gap: .35rem 1.1rem;
    margin: 1rem 0 0; border-top: 1px solid var(--n-border-light);
    padding-top: .8rem; border-bottom: 0; padding-bottom: 0;
}

/* Sur mobile, le bandeau d'accueil coûtait un écran entier avant d'arriver aux
   enfants. Le titre, le sous-titre et les trois garanties disent ce que la
   barre de navigation dit déjà : on ne garde que le texte du jour. Le titre
   reste dans le document — il le NOMME — mais cesse d'occuper la vue. */
@media (max-width: 767.98px) {
    .n-family-hero-copy > h1,
    .n-family-hero-copy > p,
    .n-family-hero-trust {
        position: absolute; width: 1px; height: 1px;
        margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
    }
    .n-family-hero .n-quran-signature { display: none; }
    .n-family-hero { padding: 1rem 1.1rem; min-height: 0; }
    .n-family-hero-verse { margin-top: 0; }
    .n-family-hero-verse .n-verse { border-top: 0; padding-top: 0; }
}

/* ──────────────────────────────
   COMMANDES DU LECTEUR : liste avec recherche, et choix de page au curseur
   ────────────────────────────── */
.n-combo { position: relative; min-width: 0; }
.n-combo-native { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.n-combo-trigger {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    width: 100%; min-height: 2.7rem;
    border: 1px solid var(--n-border); border-radius: var(--n-radius);
    background: var(--n-surface); padding: .4rem .75rem;
    color: var(--n-text); font-size: .84rem; font-weight: 600; text-align: left;
    cursor: pointer;
}
.n-combo-trigger::after { content: ''; flex: 0 0 auto; width: .5rem; height: .5rem; border-right: 2px solid var(--n-text-muted); border-bottom: 2px solid var(--n-text-muted); transform: translateY(-2px) rotate(45deg); }
.n-combo-trigger.is-placeholder { color: var(--n-text-muted); font-weight: 500; }
.n-combo-trigger:hover { border-color: var(--n-quran); }
.n-combo-trigger:focus-visible { border-color: var(--n-quran); box-shadow: var(--n-focus); outline: none; }
.n-combo.is-open .n-combo-trigger { border-color: var(--n-quran); }

.n-combo-panel {
    position: absolute; z-index: 1150; top: calc(100% + .3rem); right: 0; left: 0;
    display: grid; gap: .4rem;
    border: 1px solid var(--n-border); border-radius: var(--n-radius-lg);
    background: var(--n-surface); box-shadow: var(--n-shadow-lg); padding: .5rem;
}
.n-combo-search {
    width: 100%; min-height: 2.3rem;
    border: 1px solid var(--n-border); border-radius: var(--n-radius);
    padding: .3rem .6rem; font-size: .82rem;
}
.n-combo-search:focus { border-color: var(--n-quran); box-shadow: var(--n-focus); outline: none; }
/* Une liste bornée : 114 sourates ne se déroulent pas sur un écran entier. */
.n-combo-list { max-height: 16rem; margin: 0; overflow-y: auto; padding: 0; list-style: none; scrollbar-width: thin; }
.n-combo-option { border-radius: .45rem; padding: .45rem .55rem; color: var(--n-text); font-size: .84rem; cursor: pointer; }
.n-combo-option:hover, .n-combo-option.is-active { background: var(--n-quran-pale); }
.n-combo-option.is-selected { color: var(--n-quran-dark); font-weight: 700; }
.n-combo-empty { margin: 0; padding: .5rem .55rem; color: var(--n-text-muted); font-size: .8rem; }

@media (max-width: 767.98px) {
    /* Au doigt, une liste ancrée sous un champ finit hors de l'écran : elle
       remonte du bas, où le pouce est déjà. */
    .n-combo-panel {
        position: fixed; top: auto; right: 0; bottom: 0; left: 0;
        border-radius: var(--n-radius-xl) var(--n-radius-xl) 0 0;
        padding: .75rem .75rem calc(.75rem + env(safe-area-inset-bottom, 0px));
    }
    .n-combo-list { max-height: 50vh; }
    .n-combo-option { padding: .7rem .6rem; }
}

.n-page-trigger {
    display: grid; gap: .05rem; width: 100%; min-height: 2.7rem;
    border: 1px solid var(--n-border); border-radius: var(--n-radius);
    background: var(--n-surface); padding: .35rem .75rem; text-align: left; cursor: pointer;
}
.n-page-trigger strong { color: var(--n-text); font-size: .9rem; font-variant-numeric: tabular-nums; }
.n-page-trigger span { color: var(--n-text-muted); font-size: .7rem; }
.n-page-trigger:hover { border-color: var(--n-quran); }
.n-page-trigger:focus-visible { border-color: var(--n-quran); box-shadow: var(--n-focus); outline: none; }
.n-page-native { display: none; }

.n-page-dialog {
    position: fixed; inset: 0; z-index: 1100;
    display: grid; place-items: center;
    background: rgba(15, 23, 42, .45); padding: 1rem;
}
.n-page-dialog-panel {
    width: min(26rem, 100%);
    border-radius: var(--n-radius-xl); background: var(--n-surface);
    box-shadow: var(--n-shadow-lg); padding: 1.35rem;
    text-align: center;
}
.n-page-dialog-page { margin: 0; color: var(--n-text); font-size: 2.4rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.n-page-dialog-page small { margin-left: .3rem; color: var(--n-text-muted); font-size: .9rem; font-weight: 600; }
.n-page-dialog-surat { margin: .35rem 0 1.1rem; min-height: 1.2rem; color: var(--n-quran-dark); font-size: .9rem; font-weight: 700; }
.n-page-dialog-slider { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .5rem; }
/* Le curseur suit le sens du LIVRE : vers la gauche on avance dans le Mushaf,
   donc la page 604 est a gauche et la page 1 a droite. */
.n-page-dialog-slider input[type=range] { width: 100%; accent-color: var(--n-quran); direction: rtl; }
.n-page-step {
    display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
    border: 1px solid var(--n-border); border-radius: .7rem;
    background: var(--n-surface); color: var(--n-quran-dark); font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.n-page-step:hover { border-color: var(--n-quran); background: var(--n-quran-pale); }
.n-page-dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.2rem; }
body.has-page-dialog { overflow: hidden; }
/* Le plein ecran masque tout ce qui n'est pas sur le chemin du lecteur. Le
   dialogue de page vit sur le <body> et n'en fait pas partie : il lui faut son
   exemption, plus specifique que la regle qui masque. */
body.n-quran-focus > .n-page-dialog:not([hidden]) { display: grid !important; }

/* Fiche d'un enfant : le nom porte le bandeau, et la photo gagne la place que
   le logo et le slogan occupaient. Un parent qui vient de cliquer sur le prénom
   de son enfant n'a besoin ni d'un rappel de l'année, ni d'une phrase
   d'accroche : il a besoin de reconnaître son enfant et son créneau. */
.n-student-hero .n-student-avatar,
.n-student-hero .n-student-photo {
    flex-basis: 5.5rem; width: 5.5rem; height: 5.5rem;
    border-radius: 1.25rem; font-size: 1.5rem;
}
.n-student-hero h1 { margin: 0 0 .35rem; font-size: clamp(1.6rem, 2.6vw, 2.35rem); letter-spacing: -.03em; }
.n-student-hero-meta { margin: 0; }
.n-student-hero .n-student-class {
    display: inline-flex; align-items: center; gap: .4rem;
    border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--n-radius-full);
    background: rgba(255, 255, 255, .1); padding: .3rem .7rem;
    color: rgba(255, 255, 255, .94); font-size: .78rem; font-weight: 700;
    text-transform: none; letter-spacing: 0;
}
@media (max-width: 767.98px) {
    .n-student-hero .n-student-avatar,
    .n-student-hero .n-student-photo { flex-basis: 4.25rem; width: 4.25rem; height: 4.25rem; border-radius: 1rem; }
    .n-student-hero h1 { font-size: clamp(1.35rem, 5.5vw, 1.7rem); }
}

/* Supervision · aperçu des factures « Paiement reçu » */
.teacher-surface .n-invoice-preview-container { max-width: 52rem; }
.teacher-surface .n-invoice-family { margin: 1rem 0 0; border: 1px solid var(--n-border-light); border-radius: var(--n-radius-lg); background: #fff; padding: .85rem; transition: opacity .15s ease; }
.teacher-surface .n-invoice-family.is-excluded { opacity: .6; }
.teacher-surface .n-invoice-family > header,
.teacher-surface .n-invoice-family > footer { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.teacher-surface .n-invoice-family > footer { align-items: center; margin-top: .6rem; }
.teacher-surface .n-invoice-family > footer .btn { margin: 0; }
.teacher-surface .n-invoice-family h2 { margin: 0 0 .15rem; font-size: .9rem; }
.teacher-surface .n-invoice-family .n-table-secondary { display: block; }
.teacher-surface .n-invoice-family-total { flex: none; color: var(--n-text); font-size: 1rem; white-space: nowrap; }
.teacher-surface .n-invoice-lines { display: grid; gap: .35rem; margin: .7rem 0 0; padding: 0; list-style: none; }
.teacher-surface .n-invoice-lines li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .6rem; border: 1px solid var(--n-border-light); border-radius: .65rem; background: #fafaf9; padding: .5rem .65rem; }
.teacher-surface .n-invoice-lines li.is-excluded label strong { text-decoration: line-through; color: var(--n-text-muted); }
.teacher-surface .n-invoice-lines li.is-disabled { opacity: .55; }
.teacher-surface .n-invoice-lines input { width: 1.05rem; height: 1.05rem; margin: 0; }
.teacher-surface .n-invoice-lines label { min-width: 0; margin: 0; cursor: pointer; }
.teacher-surface .n-invoice-lines label strong,
.teacher-surface .n-invoice-lines label small { display: block; overflow-wrap: anywhere; }
.teacher-surface .n-invoice-lines label small { color: var(--n-text-muted); font-size: .58rem; }
.teacher-surface .n-invoice-amount { color: var(--n-text); font-size: .7rem; font-weight: 750; white-space: nowrap; }
@media (max-width: 575.98px) {
    .teacher-surface .n-invoice-family > header,
    .teacher-surface .n-invoice-family > footer { flex-direction: column; }
}
.teacher-surface .n-invoice-attach { position: relative; margin-top: .7rem; }
.teacher-surface .n-invoice-attach > label { display: block; margin: 0 0 .25rem; color: var(--n-text); font-size: .62rem; font-weight: 750; }
.teacher-surface .n-invoice-attach .form-control { margin: 0; border-radius: .65rem; }
.teacher-surface .n-invoice-attach > small { display: block; margin-top: .25rem; color: var(--n-text-muted); font-size: .56rem; }
.teacher-surface .n-invoice-attach-results { position: absolute; z-index: 20; inset: auto 0 auto 0; max-height: 16rem; overflow-y: auto; margin: .2rem 0 0; border: 1px solid var(--n-border); border-radius: .65rem; background: #fff; padding: .25rem; list-style: none; box-shadow: var(--n-shadow-lg); }
.teacher-surface .n-invoice-attach-results li { border-radius: .5rem; padding: .45rem .55rem; cursor: pointer; }
.teacher-surface .n-invoice-attach-results li[aria-selected="true"],
.teacher-surface .n-invoice-attach-results li:hover { background: var(--n-brand-pale); }
.teacher-surface .n-invoice-attach-results li[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.teacher-surface .n-invoice-attach-results strong,
.teacher-surface .n-invoice-attach-results small { display: block; overflow-wrap: anywhere; }
.teacher-surface .n-invoice-attach-results small { color: var(--n-text-muted); font-size: .56rem; }
.teacher-surface .n-invoice-lines li.is-attached { border-style: dashed; border-color: var(--n-brand-light); background: var(--n-brand-pale); }
.teacher-surface .n-invoice-lines .n-invoice-move { grid-column: 2 / -1; display: flex; align-items: center; gap: .4rem; margin: 0; color: #b45309; font-size: .58rem; font-weight: 700; }
.teacher-surface .n-invoice-remove { border: 0; background: none; padding: .1rem .3rem; color: var(--n-text-muted); font-size: .9rem; line-height: 1; }
.teacher-surface .n-invoice-lines li.is-attached { grid-template-columns: auto minmax(0, 1fr) auto auto; }
