/* ============================================================
   ATTENDANCE (teachers) — mobile first. Screens are drawn by attendance.js.
   ============================================================ */

/* Bottom bar: Attendance takes the place of English for teachers (hidden for everyone else) */
.bottom-nav-btn.bn-att{display:none !important}
html.is-teacher .bottom-nav-btn.bn-att{display:flex !important}
html.is-teacher .bottom-nav-btn[data-section="eng"]{display:none !important}

/* A teacher who is not a student: the staff profile (Email, Status, Full name), the annual calendar,
   and none of the student tools (Schedule Info, Books, Orientation, Mark) */
html.teacher-only #orientCard,html.teacher-only #markCard,
html.teacher-only #welcomeSub{display:none !important}
/* Teachers: the Books System is a button like Schedule Info, the whole width of the profile
   (the Books card itself stays hidden; the button opens it: English books and audio, every level) */
.teacher-books-btn{display:none !important}
/* only teachers of a subject the admin allowed (Attendance panel → Allowed books) */
html.teacher-only.teacher-books-ok .teacher-books-btn{display:inline-flex !important}
html.teacher-only #chooseScheduleBtn,html.teacher-only #flipActions{display:none !important}
html.teacher-only:not(.is-admin) #attPanelBtn{display:none !important}
html.teacher-only #booksCard{display:none !important}
/* Staff profile (admins and teachers): Full name on top, then Email | Status, then Role | Specialty */
.profile-grid .info-role,.profile-grid .info-title{display:none}
html.is-staff .profile-grid .info-id,html.is-staff .profile-grid .info-year,html.is-staff .profile-grid .info-sem,
html.is-staff .profile-grid .info-major,html.is-staff .profile-grid .info-last{display:none !important}
html.is-staff .profile-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
/* the full name is in the green badge at the top of the card, so it has no row of its own */
html.is-staff .profile-grid .info-first{display:none !important}
html.is-staff .profile-grid .info:has(#profileEmail){order:2 !important}
html.is-staff .profile-grid .info:has(.status-value){order:3 !important}
html.is-staff .profile-grid .info-role{display:block;order:4}
html.is-staff .profile-grid .info-title{display:block;order:5}
/* no personal schedule behind the card, so it does not turn over (the e-mail can still be revealed) */
html.teacher-only #profileFlipCard{pointer-events:none}
html.teacher-only #profileFlipCard .spoil-box{pointer-events:auto}
/* the students' "test mode" lock is not for teachers */
html.teacher-only.stu-lock #screen-main > :not(.demo-lock){pointer-events:auto !important;-webkit-user-select:auto;user-select:auto;filter:none !important;opacity:1 !important}
html.teacher-only.stu-lock #screen-main .demo-lock{display:none !important}

/* ---------- the section ---------- */
#section-att{min-height:100vh;background:#f5f7fc;color:#0d1b3e}
/* the page under the section has the same colour (no warm band at the bottom while scrolling) */
body[data-section="att"]{background:#f5f7fc}
.att-container{max-width:760px;margin:0 auto;padding:calc(env(safe-area-inset-top,0px) + 20px) 16px 150px}
.att-in{animation:attIn .32s cubic-bezier(.22,1,.36,1) both}
@keyframes attIn{from{opacity:0;transform:translate3d(0,10px,0)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.att-in{animation:none}}
.att-sub{margin:0 2px 16px;color:#7b89a8;font-size:13.5px;font-weight:600}
.att-msg{text-align:center;color:#7b89a8;font-weight:600;font-size:14px;padding:34px 16px}
.att-note{text-align:center;color:#1f9c72;font-weight:700;font-size:13.5px;margin:16px 0 0}
.att-go{color:#9aa6bd;font-size:22px;font-weight:700;flex:0 0 auto}

/* buttons shared by the screens */
.att-btn{border:0;border-radius:12px;padding:12px 20px;font:inherit;font-size:14.5px;font-weight:800;color:#fff;cursor:pointer;
  background:linear-gradient(145deg,#00D397,#009970);box-shadow:0 8px 18px rgba(0,180,130,.28);touch-action:manipulation;transition:transform .15s,opacity .2s}
.att-btn:active{transform:scale(.97)}
.att-btn:disabled{background:#dfe5ee;color:#8a96ab;box-shadow:none;cursor:default}
.att-chip{display:inline-block;flex:0 0 auto;border-radius:999px;padding:4px 10px;font-size:11.5px;font-weight:800;letter-spacing:.02em}
.att-chip.is-pub{background:#e6f8f1;color:#1f9c72}
.att-chip.is-draft{background:#fff3e2;color:#b3640a}

/* 1. my groups: one card per group (or groups taught together) — year, subject, name, students */
/* a teacher has 2 or 3 groups: one wide card each, the whole width of the page */
.att-classes{display:grid;grid-template-columns:1fr;gap:14px}
.att-class{display:grid;grid-template-columns:1fr auto;grid-template-areas:"top top" "name name" "foot foot";gap:12px;width:100%;
  padding:20px 20px 18px !important;text-align:left;font:inherit;cursor:pointer;color:#fff;border:0;border-radius:22px;padding:16px;
  background:linear-gradient(145deg,#05143F 0%,#0d2a72 100%);box-shadow:0 14px 30px rgba(5,20,63,.22);position:relative;overflow:hidden;
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:transform .18s ease,box-shadow .2s ease}
.att-class::before{content:"";position:absolute;right:-34px;top:-34px;width:120px;height:120px;border-radius:50%;background:radial-gradient(circle,rgba(52,204,153,.32),transparent 68%);pointer-events:none}
.att-class:active{transform:scale(.97)}
.att-class:hover{box-shadow:0 18px 36px rgba(5,20,63,.3)}
.att-class-top{display:flex;align-items:center;justify-content:space-between;gap:8px;position:relative}
.att-class-year{background:rgba(52,204,153,.16);border:1px solid rgba(52,204,153,.4);color:#5fe3bb;border-radius:999px;padding:4px 10px;font-size:11.5px;font-weight:800;white-space:nowrap}
.att-class-subject{color:#b9c6e4;font-size:11.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.att-class-top{grid-area:top}.att-class-foot{grid-area:foot}.att-class-name{grid-area:name}
.att-class::before{width:200px !important;height:200px !important;right:-60px !important;top:-70px !important}
.att-class-name{font:800 34px 'Plus Jakarta Sans',Inter,sans-serif;letter-spacing:-.02em;line-height:1.1;position:relative;word-break:break-word}
.att-class-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;position:relative}
.att-class-count{display:inline-flex;align-items:center;gap:7px;color:#dfe7f7;font-size:14px;font-weight:700}
.att-class-year{font-size:12.5px !important;padding:5px 12px !important}
.att-class-subject{font-size:13px !important}
.att-class .att-go{color:#5fe3bb}

.att-session{display:flex;align-items:center;gap:12px;width:100%;text-align:left;font:inherit;color:inherit;cursor:pointer;
  background:#fff;border:1.5px solid #e6ebf5;box-shadow:0 4px 14px rgba(5,20,63,.05);
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:border-color .2s,transform .15s}
.att-session:active{transform:scale(.985)}
.att-session:hover{border-color:#bfeedd}
.att-session-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.att-session-body small{color:#7b89a8;font-size:12.5px;font-weight:600}
.att-session-num{flex:0 0 40px;height:40px;border-radius:12px;background:linear-gradient(145deg,#05143F,#0d2a72);color:#fff;display:flex;align-items:center;justify-content:center;font:800 16px 'Plus Jakarta Sans',Inter,sans-serif}

/* 2. weeks */
.att-sem{margin:18px 2px 10px;font:800 15px 'Plus Jakarta Sans',Inter,sans-serif;color:#05143F}
.att-sem:first-child{margin-top:0}
.att-sem span{color:#9aa6bd;font-weight:700;font-size:12.5px;margin-left:6px}
.att-weeks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
@media (min-width:560px){.att-weeks{grid-template-columns:repeat(4,minmax(0,1fr))}}
.att-week{display:flex;flex-direction:column;align-items:center;gap:3px;padding:13px 6px 11px;border-radius:16px;border:1.5px solid;font:inherit;cursor:pointer;
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:transform .15s}
.att-week:active{transform:scale(.96)}
.att-week b{font:800 14.5px 'Plus Jakarta Sans',Inter,sans-serif}
.att-week small{font-size:11px;font-weight:600;opacity:.8}
.att-week-n{display:inline-flex;align-items:center;gap:4px;margin-top:3px;font-size:11.5px;font-weight:800}
.att-week.is-blue,.att-legend .is-blue{background:#e8f0ff;border-color:#b9cdfb;color:#1d4fd1}
.att-week.is-orange,.att-legend .is-orange{background:#fff3e2;border-color:#f5c98a;color:#b3640a}
.att-week.is-green,.att-legend .is-green{background:#e6f8f1;border-color:#bfeedd;color:#1f9c72}
.att-week.is-locked,.att-legend .is-locked{background:#eceff4;border-color:#d5dbe6;color:#5f6b82}
.att-week.is-future,.att-legend .is-future{background:#f3f5f9;border-color:#e6ebf5;color:#a3acba}
.att-week.is-future{cursor:default}
.att-week.is-now{box-shadow:0 0 0 3px rgba(0,211,151,.28)}
.att-legend{display:flex;flex-wrap:wrap;gap:6px;margin-top:18px}
.att-legend span{display:inline-flex;align-items:center;gap:4px;border:1px solid;border-radius:999px;padding:4px 10px;font-size:11px;font-weight:700}
.att-legend svg{width:12px;height:12px}

/* 3. a week */
.att-banner{display:flex;align-items:center;gap:8px;background:#eceff4;color:#5f6b82;border-radius:14px;padding:11px 14px;font-size:13px;font-weight:700;margin-bottom:14px}
.att-banner.is-open{background:#e6f8f1;color:#1f9c72}
/* A sheet the administration added in a teacher's place: always in red */
.att-banner.is-admin-added{background:#fdecec;color:#d12f2f;border:1.5px solid #f3c2c2}
.att-session-body small.att-by-admin{color:#d12f2f;font-weight:800}
/* Changed by the administration: its own colour (amber) with the exact date and time */
.att-session-body small.att-admin-edit{color:#b45309;font-weight:800}
.att-banner.is-admin-edit{background:#fff7e6;color:#b45309;border:1.5px solid #fcd9a6}
/* A sheet added or changed by the administration: a light red card */
.att-session.is-admin-touched{background:linear-gradient(135deg,#fff5f5 0%,#ffe4e6 100%);border-color:#fecdd3}
.att-session.is-admin-touched:hover{border-color:#fda4af}
/* Attendance weeks: Weekly / Daily buttons, and the daily list */
.aa-wv{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;margin:14px 0 10px}
.aa-wv-btn{display:grid;grid-template-columns:1fr auto;align-items:center;text-align:left;gap:2px 10px;padding:14px 16px;border-radius:16px;border:1.5px solid #c9d0dc;background:linear-gradient(135deg,#f4f7fc,#e6edf8);color:#05143F;font:inherit;cursor:pointer}
.aa-wv-btn b{font-size:15px}
.aa-wv-btn small{grid-column:1;color:#5f6b82;font-weight:600;font-size:12.5px}
.aa-wv-btn .att-go{grid-row:1 / span 2;grid-column:2}
.aa-wv-btn:hover{border-color:#05143F}
.aa-tfilter select,.aa-bar > select{min-height:36px;border-radius:10px;border:1.5px solid #c9d0dc;padding:0 10px;font:inherit;font-weight:600;max-width:100%;background:#fff}
.aa-tdel{color:#d12f2f;border-color:#f3c2c2}
.aa-daily{margin-top:6px}
.aa-daily .aa-bar{margin-bottom:8px}
.aa-daily select{min-height:36px;border-radius:10px;border:1.5px solid #c9d0dc;padding:0 10px;font:inherit;font-weight:600;max-width:100%}
.att-sessions{display:grid;gap:10px}
.att-session{padding:14px 16px;border-radius:16px}
.att-session-body b{font-weight:800;font-size:15px;color:#05143F}
.att-count{margin:0 2px 12px;color:#5f6b82;font-size:13.5px;font-weight:600}
.att-count b{color:#05143F;font-size:16px}
.att-new{display:block;width:100%;margin-top:16px;padding:15px 20px;font-size:15.5px;border-radius:16px}
.att-hint{text-align:center;color:#9aa6bd;font-size:12px;font-weight:600;margin:8px 0 0}

/* the sheet's own details: date, time, group, state */
.att-sheet-info{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;background:#fff;border:1.5px solid #e6ebf5;border-radius:16px;padding:12px 16px;margin-bottom:14px}
.att-sheet-info > span:not(.att-chip){display:flex;flex-direction:column;gap:1px}
.att-sheet-info small{color:#9aa6bd;font-size:10.5px;font-weight:800;letter-spacing:1px;text-transform:uppercase}
.att-sheet-info b{color:#05143F;font-size:14.5px;font-weight:800}
.att-sheet-info .att-chip{margin-left:auto}

/* 4. the sheet */
.att-sheet{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1.5px solid #e6ebf5;border-radius:18px;overflow:hidden;table-layout:fixed}
.att-sheet th{background:#0a1d54;color:#34CC99;font-size:11px;font-weight:800;letter-spacing:1px;text-transform:uppercase;padding:11px 8px;text-align:left}
.att-sheet th:first-child{width:76px;padding-left:14px}
.att-sheet th:last-child{width:112px;text-align:center}
.att-sheet td{padding:9px 8px;border-top:1px solid #eef1f7;vertical-align:middle}
.att-sheet tbody tr:first-child td{border-top:0}
.att-id{padding-left:14px !important;font:700 12.5px Consolas,'Courier New',monospace;color:#5f6b82;word-break:break-all}
.att-name{font-size:14px;font-weight:700;color:#05143F;line-height:1.3;word-break:break-word}
.att-cell{text-align:center}
.att-grp td{background:#f1f4fa;color:#05143F;font-size:12px;font-weight:800;letter-spacing:.5px;padding:7px 14px}
.att-mark{width:100%;max-width:98px;min-height:40px;border-radius:12px;border:1.5px solid;font:inherit;font-size:13px;font-weight:800;cursor:pointer;
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:background-color .15s,color .15s,transform .1s}
.att-mark:active{transform:scale(.95)}
.att-mark.is-present{background:#e6f8f1;border-color:#bfeedd;color:#1f9c72}
.att-mark.is-absent{background:#e5252a;border-color:#e5252a;color:#fff}
.att-mark.is-late{background:#fff3e2;border-color:#f5c98a;color:#b3640a}
.att-mark:disabled{cursor:default;opacity:.85}
.att-del{display:block;margin:16px auto 0;border:0;background:none;color:#c0392b;font:inherit;font-size:13px;font-weight:700;text-decoration:underline;cursor:pointer;padding:8px}
/* the count and the single Publish button stay in reach above the bottom bar */
.att-foot{position:sticky;bottom:calc(env(safe-area-inset-bottom,0px) + 92px);z-index:5;margin-top:16px;display:flex;align-items:center;justify-content:space-between;gap:12px;
  background:rgba(255,255,255,.94);border:1.5px solid #e6ebf5;border-radius:18px;padding:10px 10px 10px 16px;box-shadow:0 12px 30px rgba(5,20,63,.14)}
.att-foot:empty,.att-foot:has(#attSum:empty){display:none}
#attSum{font-size:13px;font-weight:600;color:#5f6b82;line-height:1.4}
#attSum b{color:#05143F}
#attSum .is-absent{color:#e5252a}
#attSum .is-late{color:#b3640a}

/* ---------- loading shapes (light green, moving shine) instead of "Loading…" ---------- */
.nbs-skel-wrap{display:grid;gap:10px;width:100%;padding:4px 0}
.nbs-skel{display:block;border-radius:14px;height:62px;background:linear-gradient(90deg,#e3f6ee 0%,#f3fbf7 50%,#e3f6ee 100%);background-size:200% 100%;animation:nbsSkel 1.1s linear infinite}
.nbs-skel-wrap.is-cards{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px;margin-bottom:14px}
.nbs-skel-wrap.is-cards .nbs-skel{height:150px;border-radius:22px}
.nbs-skel-wrap.is-tiles{grid-template-columns:repeat(auto-fill,minmax(110px,1fr))}
.nbs-skel-wrap.is-tiles .nbs-skel{height:84px;border-radius:16px}
.nbs-skel-wrap.is-table{gap:6px}
.nbs-skel-wrap.is-table .nbs-skel{height:40px;border-radius:10px}
.nbs-skel-wrap.is-table .nbs-skel:first-child{height:44px;background:linear-gradient(90deg,#cdeee0 0%,#e3f6ee 50%,#cdeee0 100%);background-size:200% 100%}
@keyframes nbsSkel{from{background-position:200% 0}to{background-position:-200% 0}}
@media (prefers-reduced-motion:reduce){.nbs-skel{animation:none}}

/* ---------- × (left: leave everything) and Back (right: one step back), everywhere ---------- */
.nbs-x{flex:0 0 auto;width:40px;height:40px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;padding:0;cursor:pointer;
  font:600 24px/1 Inter,system-ui,sans-serif;background:rgba(255,255,255,.1);border:1.5px solid rgba(255,255,255,.25);color:#fff;
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:background .2s,transform .12s}
.nbs-x:hover{background:rgba(255,255,255,.18)}
.nbs-x:active{transform:scale(.94)}
.nbs-x.on-light{background:#fff;color:#05143F;border-color:#d9e1ef;box-shadow:0 4px 12px rgba(5,20,63,.08)}
.nbs-x[hidden],#dvBack[hidden]{display:none !important}
.nbs-head .nbs-x + h3{margin-right:auto}
/* English games and flash cards: × | title | Back */
.eng-topbar:has(> [data-eng-close]){display:flex;align-items:center;justify-content:space-between;gap:10px}
.eng-topbar > [data-eng-close] + .eng-brand-title{flex:1;text-align:center;min-width:0}
.nbs-head > .nbs-back{margin-left:auto}
/* the Attendance panel page: Back in the header does the step back, so the in-page links are hidden */
#attPanelPage .aa-back{display:none !important}

/* English > Learning: the unit's words, filtered by their first letter */
.wl-letters{display:flex;flex-wrap:wrap;gap:5px;margin:4px 0 12px}
.wl-letter{min-width:32px;height:32px;padding:0 8px;border-radius:9px;border:1.5px solid #e1e7f2;background:#fff;color:#05143F;font:inherit;font-size:12.5px;font-weight:800;cursor:pointer;
  touch-action:manipulation;transition:background .15s,color .15s,border-color .15s}
.wl-letter:hover:not(:disabled){border-color:#9fe0c6}
.wl-letter.on{background:#05143F;border-color:#05143F;color:#fff}
.wl-letter:disabled{opacity:.3;cursor:default}

/* English Section: its name in a navy bar, centred (like the Course Resources header, no Back) */
.eng-topbar.eng-home-bar{display:flex;align-items:center;justify-content:center;min-height:72px;box-sizing:border-box;padding:14px 20px;margin-bottom:20px;
  border-radius:20px;background:linear-gradient(135deg,#05143F 0%,#0a1d54 100%);box-shadow:0 16px 40px rgba(5,20,63,.26)}
.eng-topbar.eng-home-bar > div:not(.eng-brand-title){display:none}
.eng-topbar.eng-home-bar .eng-brand-title{color:#fff;text-align:center;font:800 24px 'Plus Jakarta Sans',Inter,sans-serif;letter-spacing:-.01em;margin:0}
@media (max-width:600px){.eng-topbar.eng-home-bar{min-height:62px;border-radius:16px}.eng-topbar.eng-home-bar .eng-brand-title{font-size:20px}}

/* Guess the Word: level dots, the Sentence level, No Repetition */
.gs-lv{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:6px;vertical-align:1px}
.gs-lv.is-l1{background:#22c55e}.gs-lv.is-l2{background:#eab308}.gs-lv.is-l3{background:#3b82f6}.gs-lv.is-ls{background:#e5252a}
#screen-eng-guess .eng-diff-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
@media (max-width:420px){#screen-eng-guess .eng-diff-btn{font-size:12.5px;padding-left:4px;padding-right:4px}}
/* the sentence is ordinary text: it wraps on two lines or more, the blank sits inside it */
.eng-def-box.gs-sentence{display:block !important;text-align:center;font-size:19px;line-height:1.7;font-weight:600;white-space:normal}
.eng-def-box.gs-sentence > *{display:inline}
.eng-def-box.gs-sentence .gs-blank{display:inline-block;vertical-align:baseline}
.eng-hint-box{letter-spacing:.06em}
.gs-blank{display:inline-block;min-width:84px;border-bottom:3px solid #00b383;color:transparent;margin:0 3px;line-height:1}
.gs-hint-btn{border:1.5px dashed #9fe0c6;background:#f2fcf8;color:#1f9c72;border-radius:999px;padding:5px 14px;font:inherit;font-size:12.5px;font-weight:800;cursor:pointer}
.gs-done{font:800 24px 'Plus Jakarta Sans',Inter,sans-serif;color:#1f9c72}
.gs-norep{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;margin:10px 2px 12px;font-size:13.5px;font-weight:800;color:#05143F;cursor:pointer;user-select:none}
.gs-norep small{flex-basis:100%;margin-left:52px;font-size:11.5px;font-weight:600;color:#7b89a8}
.gs-norep input{position:absolute;opacity:0;pointer-events:none}
.gs-norep-sw{position:relative;width:42px;height:24px;border-radius:999px;background:#d6dde9;transition:background .2s;flex:0 0 auto}
.gs-norep-sw::after{content:"";position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.2);transition:transform .2s}
.gs-norep input:checked + .gs-norep-sw{background:#00b383}
.gs-norep input:checked + .gs-norep-sw::after{transform:translateX(18px)}
.gs-norep input:focus-visible + .gs-norep-sw{outline:2px solid #05143F;outline-offset:2px}

/* The Attendance bar keeps one height on every screen (with or without × and Back) */
.att-head{min-height:72px;box-sizing:border-box;padding-top:12px !important;padding-bottom:12px !important}
.att-head .nbs-x,.att-head .nbs-back{height:44px;box-sizing:border-box}
.att-head h3{line-height:1.2}

/* ---------- a group: summary + this week ---------- */
.att-top{display:grid;grid-template-columns:1fr;gap:12px;margin-bottom:20px}
.att-hero{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 20px;border-radius:22px;color:#fff;position:relative;overflow:hidden;
  background:linear-gradient(145deg,#05143F 0%,#0d2a72 100%);box-shadow:0 14px 30px rgba(5,20,63,.2)}
.att-hero::before{content:"";position:absolute;right:-60px;top:-70px;width:200px;height:200px;border-radius:50%;background:radial-gradient(circle,rgba(52,204,153,.3),transparent 68%);pointer-events:none}
.att-hero-main{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0;position:relative}
.att-hero-main b{font:800 30px 'Plus Jakarta Sans',Inter,sans-serif;letter-spacing:-.02em;line-height:1.05}
.att-hero-main small{color:#b9c6e4;font-size:13px;font-weight:700}
.att-hero-stats{display:flex;gap:8px;position:relative}
.att-hero-stats span{display:flex;flex-direction:column;align-items:center;min-width:72px;padding:10px 8px;border-radius:14px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14)}
.att-hero-stats b{font:800 22px 'Plus Jakarta Sans',Inter,sans-serif;color:#5fe3bb}
.att-hero-stats small{font-size:10.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#b9c6e4}
.att-nowcard{display:grid;grid-template-columns:1fr auto;grid-template-areas:"tag go" "title go" "sub go";align-items:center;gap:4px 12px;width:100%;text-align:left;font:inherit;
  padding:16px 18px;border-radius:20px;border:1.5px solid #e6ebf5;background:#fff;color:#05143F;cursor:pointer;box-shadow:0 6px 18px rgba(5,20,63,.06);
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:transform .15s,box-shadow .2s,border-color .2s}
.att-nowcard:active{transform:scale(.985)}
.att-nowcard:hover{border-color:#bfeedd;box-shadow:0 10px 24px rgba(5,20,63,.1)}
.att-nowcard.is-open{border-color:#9fe6cc;background:linear-gradient(145deg,#f2fcf8,#fff)}
.att-nowcard.is-none{cursor:default;grid-template-areas:"tag" "title" "sub";grid-template-columns:1fr;background:#f8f9fc}
.att-nowcard-tag{grid-area:tag;display:inline-flex;align-items:center;gap:8px;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#7b89a8}
.att-nowcard-tag .att-now-dot{position:static}
.att-nowcard > b{grid-area:title;font:800 20px 'Plus Jakarta Sans',Inter,sans-serif}
.att-nowcard > small{grid-area:sub;color:#7b89a8;font-size:12.5px;font-weight:600}
.att-nowcard-go{grid-area:go;display:inline-flex;align-items:center;gap:6px;padding:11px 16px;border-radius:14px;font-size:14px;font-weight:800;white-space:nowrap;
  color:#fff;background:linear-gradient(145deg,#00D397,#009970);box-shadow:0 8px 18px rgba(0,180,130,.26)}
.att-nowcard:not(.is-open) .att-nowcard-go{background:#eef1f7;color:#05143F;box-shadow:none}
.att-nowcard-go span{font-size:20px;line-height:1}
.att-all{margin:0;font:800 13px 'Plus Jakarta Sans',Inter,sans-serif;letter-spacing:.08em;text-transform:uppercase;color:#05143F}
/* all the weeks in one white card: title + colour key on one line, then each semester */
.att-weeks-card{background:#fff;border:1.5px solid #e6ebf5;border-radius:22px;padding:18px;box-shadow:0 6px 18px rgba(5,20,63,.05)}
.att-all-row{display:flex;align-items:center;justify-content:space-between;gap:10px 16px;flex-wrap:wrap;padding-bottom:14px;margin-bottom:14px;border-bottom:1px solid #eef1f7}
.att-weeks-card .att-legend{margin:0;gap:12px}
.att-weeks-card .att-legend span{border:0 !important;background:none !important;padding:0;font-size:11.5px;color:#5f6b82 !important}
.att-weeks-card .att-legend i{width:10px;height:10px;border-radius:4px;border:1.5px solid;display:inline-block}
.att-weeks-card .att-legend .is-blue i{background:#e8f0ff;border-color:#b9cdfb}
.att-weeks-card .att-legend .is-green i{background:#e6f8f1;border-color:#9fe0c6}
.att-weeks-card .att-legend .is-locked i{background:#eceff4;border-color:#c9d1de}
.att-weeks-card .att-legend .is-future i{background:#f8f9fb;border-color:#e6ebf5}
.att-weeks-card .att-sem{margin:4px 0 10px;font-size:13.5px;color:#5f6b82}
.att-weeks-card .att-weeks + .att-sem{margin-top:18px}
@media (max-width:520px){.att-weeks-card{padding:14px;border-radius:18px}}
@media (max-width:520px){
  .att-hero{flex-direction:column;align-items:stretch}
  .att-hero-stats span{flex:1}
  .att-nowcard{grid-template-columns:1fr;grid-template-areas:"tag" "title" "sub" "go"}
  .att-nowcard-go{justify-content:center;margin-top:8px}
}

/* ---------- computers: a page laid out for a wide screen, not a stretched phone ---------- */
@media (min-width:900px){
  .att-container{max-width:1120px;padding:32px 32px 150px}
  .att-head h3{font-size:24px}
  .att-classes{grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:18px}
  .att-top{grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);align-items:stretch;gap:18px;margin-bottom:28px}
  .att-weeks{grid-template-columns:repeat(6,minmax(0,1fr)) !important;gap:12px}
  .att-sessions{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .att-in > .att-banner,.att-in > .att-count{max-width:none}
  .att-sheet th:first-child{width:120px}
  .att-sheet th:last-child{width:160px}
  .att-mark{max-width:130px}
  .att-sheet td{padding:11px 12px}
  .att-foot{bottom:24px}
  /* Attendance panel (admin) */
  #screen-attpanel{padding-top:24px}
  #attPanelPage .aa-tlist{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
  #attPanelPage .aa-weeks{grid-template-columns:repeat(6,minmax(0,1fr))}
  #attPanelPage .aa-body{padding:8px 22px 26px}
  #attPanelPage .aa-tabs{margin:0 22px 16px}
  #attPanelPage .att-sessions{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:1300px){.att-weeks{grid-template-columns:repeat(7,minmax(0,1fr)) !important}}

/* the week we are in: a red dot (like the annual calendar's "now") */
.att-week{position:relative}
.att-now-dot{position:absolute;top:8px;right:8px;width:9px;height:9px;border-radius:50%;background:#e5252a;box-shadow:0 0 0 3px rgba(229,37,42,.18);animation:attDot 1.6s ease-in-out infinite}
@keyframes attDot{0%,100%{box-shadow:0 0 0 2px rgba(229,37,42,.25)}50%{box-shadow:0 0 0 6px rgba(229,37,42,.06)}}
@media (prefers-reduced-motion:reduce){.att-now-dot{animation:none}}

/* Teacher profile card: the navy-to-blue card with the light green name box (the former admin card) */
html.is-teacher:not(.is-admin) .flip-card:not(.announce) .flip-front{background:linear-gradient(135deg,#000C3B 0%,#0d2a72 50%,#1a4fb5 100%);box-shadow:0 26px 64px rgba(13,42,114,.35), inset 0 1px 0 rgba(255,255,255,.08)}
html.is-teacher:not(.is-admin) .flip-card:not(.announce) .flip-front::before{background:linear-gradient(135deg,rgba(255,255,255,.08) 0%,transparent 40%),radial-gradient(circle at 20% 0%,rgba(52,204,153,.22),transparent 60%)}
html.is-teacher:not(.is-admin) .avatar.avatar-name{background:linear-gradient(145deg,#d4f5e8 0%,#8fe3c3 100%)}
html.is-teacher:not(.is-admin) .avatar.avatar-name h2{color:#05143F}
html.is-teacher:not(.is-admin) .info{border-color:rgba(160,195,255,.22)}
html.is-teacher:not(.is-admin) .info .label{color:#9fe8cc}

/* Administration taking attendance for a teacher */
.att-banner.is-proxy{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#eef2f9;color:#05143F;border:1.5px solid #c9d0dc;border-radius:14px;padding:10px 14px;margin-bottom:12px;font-weight:700}
.att-proxy-end{border:0;background:#05143F;color:#fff;border-radius:10px;padding:7px 14px;font:inherit;font-weight:800;cursor:pointer}
.att-proxy-date{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:14px 0 10px;font-weight:700;color:#05143F}
.att-proxy-date input{border:1.5px solid #e6ebf5;border-radius:10px;padding:8px 10px;font:inherit}

/* English Section: Learning, Practice and Ranking use the same navy bar as the home, with Back inside */
.eng-topbar.eng-home-bar.eng-sub-bar{display:grid;grid-template-columns:minmax(84px,auto) 1fr minmax(84px,auto);align-items:center;column-gap:10px;padding:12px 14px}
.eng-topbar.eng-sub-bar > .eng-bar-gap,.eng-topbar.eng-sub-bar > div[style]{display:block !important;visibility:hidden}
.eng-topbar.eng-sub-bar .eng-back-btn{justify-self:start;background:rgba(255,255,255,.1) !important;color:#fff !important;border:1px solid rgba(255,255,255,.22) !important;box-shadow:none !important}
.eng-topbar.eng-sub-bar .eng-back-btn:hover{background:rgba(255,255,255,.18) !important}
/* Practice: score and rank under the title */
.eng-bar-stats{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
.eng-bar-score,.eng-bar-rank{display:flex;align-items:center;justify-content:space-between;gap:10px;border-radius:14px;padding:10px 14px;min-height:52px;box-sizing:border-box}
.eng-bar-score{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14)}
.eng-bar-score span,.eng-bar-rank span{font-size:11px;font-weight:800;letter-spacing:1.4px;text-transform:uppercase;color:#9fe8cc}
.eng-bar-score b{color:#fff;font:800 22px 'Plus Jakarta Sans',Inter,sans-serif}
.eng-bar-rank{font:inherit;cursor:pointer;border:0;background:linear-gradient(135deg,#34CC99 0%,#1f9c72 100%);box-shadow:0 8px 20px rgba(52,204,153,.28);transition:transform .2s ease,box-shadow .2s ease;touch-action:manipulation}
.eng-bar-rank span{color:rgba(5,20,63,.75)}
.eng-bar-rank b{color:#05143F;font:800 22px 'Plus Jakarta Sans',Inter,sans-serif;margin-left:auto}
.eng-bar-rank i{font-style:normal;color:#05143F;font-weight:800;font-size:20px;line-height:1}
.eng-bar-rank:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(52,204,153,.36)}
.eng-bar-rank:active{transform:scale(.98)}
@media (max-width:600px){.eng-topbar.eng-home-bar.eng-sub-bar{grid-template-columns:minmax(76px,auto) 1fr minmax(76px,auto);padding:10px 12px}.eng-bar-score b,.eng-bar-rank b{font-size:19px}}
@media (min-width:1100px){
  #screen-eng-practice.active > .eng-container > .eng-panel{grid-row:2 / span 5}
}
/* Light entrance of the bar's text each time a screen of the English Section opens (transform + opacity only) */
@keyframes engBarIn{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}
#section-eng .screen.active .eng-home-bar .eng-brand-title{animation:engBarIn .45s cubic-bezier(.22,1,.36,1) both}
#section-eng .screen.active .eng-sub-bar .eng-back-btn{animation:engBarIn .45s cubic-bezier(.22,1,.36,1) .05s both}
#section-eng .screen.active .eng-bar-stats{animation:engBarIn .5s cubic-bezier(.22,1,.36,1) .1s both}
@media (prefers-reduced-motion:reduce){#section-eng .screen.active .eng-home-bar *{animation:none !important}}

/* Menu cards (Course Resources, Mark, Orientation, Learning, Practice…): a light blue blend */
#screen-main .card,#section-eng .eng-menu-card:not(.eng-menu-tournament){background:linear-gradient(135deg,#ffffff 0%,#f5f8ff 55%,#e9f0fd 100%)}

/* Menu cards (Course Resources, Orientation, Mark, Learning, Practice): a soft modern blend —
   white melting into sky blue, a touch of mint light in the corner, a thin blue edge */
#screen-main .card,#section-eng .eng-menu-card:not(.eng-menu-tournament){
  background:radial-gradient(120% 140% at 100% 0%,rgba(52,204,153,.10) 0%,transparent 45%),
             linear-gradient(120deg,#ffffff 0%,#f4f8ff 40%,#e6effe 100%);
  border-color:#dde7f7}
#screen-main .card:hover,#section-eng .eng-menu-card:not(.eng-menu-tournament):hover{border-color:#b9cdf0;box-shadow:0 14px 34px rgba(26,79,181,.12)}
#screen-main .card .card-icon,#section-eng .eng-menu-card:not(.eng-menu-tournament) .eng-menu-icon{background:linear-gradient(145deg,#ffffff 0%,#eef4ff 100%)}

/* English games and flash cards: the same navy bar — × on the left, title, Back on the right */
.eng-topbar.eng-game-bar .eng-back-btn{justify-self:end}
.eng-topbar.eng-game-bar .nbs-x{justify-self:start}
.eng-topbar.eng-sub-bar .nbs-x.on-light{background:rgba(255,255,255,.1);color:#fff;border-color:rgba(255,255,255,.25);box-shadow:none}
.eng-topbar.eng-sub-bar .nbs-x.on-light:hover{background:rgba(255,255,255,.18)}
.eng-topbar.eng-game-bar{grid-template-columns:minmax(44px,84px) 1fr minmax(84px,auto)}
.eng-topbar.eng-game-bar .eng-brand-title{font-size:20px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:600px){.eng-topbar.eng-game-bar .eng-brand-title{font-size:17px}}

/* Rank chip in the games' score rows: opens the Ranking */
.eng-rank-chip{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:0;border-radius:12px;cursor:pointer;font:inherit;
  background:linear-gradient(135deg,#34CC99 0%,#1f9c72 100%);color:#05143F;box-shadow:0 6px 16px rgba(52,204,153,.28);transition:transform .2s ease;touch-action:manipulation;padding:6px}
.eng-rank-chip span{font-size:11px;font-weight:800;letter-spacing:1.4px;text-transform:uppercase;color:rgba(5,20,63,.72)}
.eng-rank-chip b{font:800 22px 'Plus Jakarta Sans',Inter,sans-serif;color:#05143F}
.eng-rank-chip:active{transform:scale(.97)}
#screen-eng-build .eng-stat-row{grid-template-columns:repeat(4,1fr)}
@media (max-width:600px){#screen-eng-build .eng-stat-row{grid-template-columns:1fr 1fr}}

/* The same light rise for the text of every page header (Course Resources, calendar, panels…) */
.nbs-title-in{animation:engBarIn .42s cubic-bezier(.22,1,.36,1) both}
.screen.active .nbs-head h3,.modal.open .nbs-head h3,.att-head h3{animation:engBarIn .45s cubic-bezier(.22,1,.36,1) both}
.screen.active .nbs-head .nbs-back,.modal.open .nbs-head .nbs-back,.screen.active .nbs-head .nbs-x,.modal.open .nbs-head .nbs-x,
#section-eng .screen.active .eng-sub-bar .nbs-x{animation:engBarIn .45s cubic-bezier(.22,1,.36,1) .05s both}
@media (prefers-reduced-motion:reduce){.nbs-title-in,.nbs-head *,.att-head *{animation:none !important}}

/* × drawn with two equal bars, exactly centred in its square, the same everywhere */
.nbs-x{position:relative;font-size:0 !important;line-height:0 !important;color:#fff}
.nbs-x::before,.nbs-x::after{content:"";position:absolute;left:50%;top:50%;width:16px;height:2.5px;border-radius:2px;background:currentColor;transform:translate(-50%,-50%) rotate(45deg)}
.nbs-x::after{transform:translate(-50%,-50%) rotate(-45deg)}
.nbs-x.on-light{color:#05143F}
.eng-topbar.eng-sub-bar .nbs-x.on-light{color:#fff}

/* One entrance for every header title: a light rise that clears from a soft blur (English Section,
   Course Resources, Annual Calendar, Mark Calculator, Orientation Average, panels) */
@keyframes engBarIn{from{opacity:0;transform:translateY(7px);filter:blur(5px)}60%{filter:blur(0)}to{opacity:1;transform:none;filter:none}}
#screen-books.active .books-header-info > *{animation:engBarIn .45s cubic-bezier(.22,1,.36,1) both}
#screen-books.active .books-header-info > :nth-child(2){animation-delay:.04s}
#screen-books.active .books-header-info > :nth-child(3){animation-delay:.08s}
#screen-books.active .books-header-bar .nbs-back{animation:engBarIn .45s cubic-bezier(.22,1,.36,1) .05s both}
#wrTableModal.open .nbs-head > *,#markModal.open .nbs-head > *,#orientModal.open .nbs-head > *,#driveModal.open .nbs-head > *{animation:engBarIn .45s cubic-bezier(.22,1,.36,1) both}
#wrTableModal.open .nbs-head > :not(h3),#markModal.open .nbs-head > :not(h3),#orientModal.open .nbs-head > :not(h3),#driveModal.open .nbs-head > :not(h3){animation-delay:.05s}
@media (prefers-reduced-motion:reduce){#screen-books .books-header-bar *,.modal .nbs-head *{animation:none !important}}

/* Entrance from the centre (a slight zoom out of a soft blur), not from below */
@keyframes engBarIn{from{opacity:0;transform:scale(.9);filter:blur(5px)}60%{filter:blur(0)}to{opacity:1;transform:none;filter:none}}
/* Replayed when a title's text changes (a folder opened or closed in the books…): its own name, so it
   restarts even where the window's opening animation is already set */
@keyframes engBarRe{from{opacity:0;transform:scale(.9);filter:blur(5px)}60%{filter:blur(0)}to{opacity:1;transform:none;filter:none}}
.nbs-title-in,#driveModal.open .nbs-head > h3.nbs-title-in,#section-eng .screen.active .eng-home-bar .eng-brand-title.nbs-title-in{animation:engBarRe .42s cubic-bezier(.22,1,.36,1) both !important}

/* Learning / Practice / Ranking: Back on the RIGHT (like everywhere), the title centred, the same
   space on both sides so the title sits exactly in the middle of the bar */
.eng-topbar.eng-sub-bar:not(.eng-game-bar){grid-template-columns:minmax(96px,1fr) auto minmax(96px,1fr)}
.eng-topbar.eng-sub-bar:not(.eng-game-bar) > .eng-back-btn{grid-column:3;grid-row:1;justify-self:end}
.eng-topbar.eng-sub-bar:not(.eng-game-bar) > .eng-brand-title{grid-column:2;grid-row:1}
.eng-topbar.eng-sub-bar:not(.eng-game-bar) > .eng-bar-gap,.eng-topbar.eng-sub-bar:not(.eng-game-bar) > div[style]{grid-column:1;grid-row:1}
.eng-topbar.eng-game-bar{grid-template-columns:minmax(96px,1fr) minmax(0,auto) minmax(96px,1fr)}
.eng-topbar.eng-game-bar > .nbs-x{grid-column:1;justify-self:start}
.eng-topbar.eng-game-bar > .eng-back-btn{grid-column:3;justify-self:end}
.eng-topbar.eng-sub-bar .eng-back-btn,.eng-topbar.eng-sub-bar .nbs-x{height:44px;box-sizing:border-box;margin:0}
.eng-topbar.eng-sub-bar .nbs-x{width:44px}
@media (max-width:600px){
  .eng-topbar.eng-sub-bar:not(.eng-game-bar),.eng-topbar.eng-game-bar{grid-template-columns:minmax(44px,1fr) minmax(0,auto) minmax(44px,1fr)}
  .eng-topbar.eng-sub-bar .eng-back-btn,.eng-topbar.eng-sub-bar .nbs-x{height:40px}
  .eng-topbar.eng-sub-bar .nbs-x{width:40px}
}
/* Titles appear softly: a slower, gentler fade from the centre with a light blur */
@keyframes engBarIn{0%{opacity:0;transform:scale(.95);filter:blur(4px)}55%{opacity:.85;filter:blur(.5px)}100%{opacity:1;transform:none;filter:none}}
@keyframes engBarRe{0%{opacity:0;transform:scale(.95);filter:blur(4px)}55%{opacity:.85;filter:blur(.5px)}100%{opacity:1;transform:none;filter:none}}
#section-eng .screen.active .eng-home-bar .eng-brand-title,.screen.active .nbs-head h3,.modal.open .nbs-head h3,
#wrTableModal.open .nbs-head > *,#markModal.open .nbs-head > *,#orientModal.open .nbs-head > *,#driveModal.open .nbs-head > *,
#screen-books.active .books-header-info > *{animation-duration:.7s !important;animation-timing-function:cubic-bezier(.25,.8,.35,1) !important}
.nbs-title-in,#driveModal.open .nbs-head > h3.nbs-title-in,#section-eng .screen.active .eng-home-bar .eng-brand-title.nbs-title-in{animation:engBarRe .7s cubic-bezier(.25,.8,.35,1) both !important}
/* Attendance header drawn again with the same title (content arrived): no second entrance */
.att-head.att-head-still,.att-head.att-head-still *{animation:none !important}
/* Teachers' Attendance header: the title exactly in the middle (× left, Back right when shown) */
.nbs-head.att-head{display:grid !important;grid-template-columns:minmax(44px,1fr) minmax(0,auto) minmax(44px,1fr);align-items:center;column-gap:10px}
.att-head > h3{grid-column:2;grid-row:1;text-align:center;margin:0 !important;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.att-head > .nbs-x{grid-column:1;grid-row:1;justify-self:start}
.att-head > .nbs-back{grid-column:3;grid-row:1;justify-self:end;margin:0}
