/* Role apps (principal, teacher, student, parent): shared depth design and native-style motion.
   Each app takes its colours from body[data-role]; principal-app.css adds the principal home.
   Screen transitions are started by EduSuite.appTransition (js/app-shell.js). */
body[data-role]{--app-from:#4338ca;--app-to:#7c3aed;--app-accent:#4338ca;--app-soft:#eef0ff;--app-glow:rgba(79,70,229,.32);--app-glow-a:rgba(56,189,248,.5);--app-glow-b:rgba(244,114,182,.34);--app-ink:#1b1f3b;--app-muted:#5f6484;--app-bg:#f1f3fb;--app-ease:cubic-bezier(.2,.8,.2,1);--app-shadow:0 12px 24px rgba(27,31,59,.06),0 1px 2px rgba(27,31,59,.05);--app-lift:0 14px 28px color-mix(in srgb,var(--app-accent) 12%,transparent),0 1px 3px rgba(27,31,59,.05)}
body[data-role=teacher]{--app-from:#1b2f5e;--app-to:#3157a5;--app-accent:#2b4f96;--app-soft:#e8eefb;--app-glow:rgba(49,87,165,.32);--app-glow-a:rgba(56,189,248,.45);--app-glow-b:rgba(165,180,252,.32)}
body[data-role=student]{--app-from:#0a5a4a;--app-to:#12806c;--app-accent:#0f7462;--app-soft:#e2f5ef;--app-glow:rgba(18,128,108,.3);--app-glow-a:rgba(190,242,100,.38);--app-glow-b:rgba(34,211,238,.3)}
body[data-role=guardian]{--app-from:#8a1647;--app-to:#c2366f;--app-accent:#a3205a;--app-soft:#fce8f1;--app-glow:rgba(194,54,111,.3);--app-glow-a:rgba(251,191,36,.4);--app-glow-b:rgba(192,132,252,.32)}
body[data-role=driver]{--app-from:#9a3a08;--app-to:#c24e10;--app-accent:#b2470e;--app-soft:#ffedd5;--app-glow:rgba(194,78,16,.3);--app-glow-a:rgba(251,191,36,.45);--app-glow-b:rgba(244,114,182,.3)}
body[data-role]{--simple-hero:var(--app-from);--simple-dark:var(--app-accent);--simple-accent:var(--app-accent);--simple-soft:var(--app-soft);background:var(--app-bg);color:var(--app-ink);font-family:Poppins,"Segoe UI",system-ui,sans-serif;-webkit-tap-highlight-color:transparent}
body[data-role] .app-launch{background:linear-gradient(150deg,var(--app-from),var(--app-to));font-family:inherit}
body[data-role] .phone{display:flex;flex-direction:column;background:var(--app-bg);font-family:inherit;color:var(--app-ink)}
body[data-role] .screen{flex:1 0 auto;box-sizing:border-box;padding:0 0 calc(100px + env(safe-area-inset-bottom));background:var(--app-bg)}
body[data-role] button{font-family:inherit;touch-action:manipulation}
body[data-role] :focus-visible{outline:3px solid color-mix(in srgb,var(--app-to) 45%,white);outline-offset:2px}

/* Headers: gradient with soft glows, a dot texture and (large header) a wave edge. */
body[data-role] .simple-hero,body[data-role] .app-bar{position:relative;overflow:hidden;isolation:isolate;background:linear-gradient(140deg,var(--app-from),var(--app-to));color:#fff}
body[data-role] .simple-hero{margin:0;padding:max(18px,env(safe-area-inset-top)) 20px 60px;border-radius:0;box-shadow:none}
/* Faint school doodles (book, pencil, cap, globe, ruler, bell, ABC, 123…) behind headers, summary cards and the ID card. */
body[data-role]{--app-doodles:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='white' stroke-opacity='.2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(12 12) rotate(-12 12 12)'%3E%3Cpath d='M2 6c3-1.5 6.5-1.5 10 .5 3.5-2 7-2 10-.5v12.5c-3-1.5-6.5-1.5-10 .5-3.5-2-7-2-10-.5zM12 6.5V19'/%3E%3C/g%3E%3Cg transform='translate(76 18) rotate(18 12 12)'%3E%3Cpath d='M5 19l1-4.5L16.5 4l3.5 3.5L9.5 18zM14.5 6l3.5 3.5M6 14.5l3.5 3.5'/%3E%3C/g%3E%3Cg transform='translate(140 8) rotate(-8 12 12)'%3E%3Cpath d='M2 9.5L12 5l10 4.5-10 4.5zM6.5 11.5v4.5c3 2.2 8 2.2 11 0v-4.5M21 10v5'/%3E%3C/g%3E%3Cg transform='translate(36 74)'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M3.5 12h17M12 3.5c3 2.5 3 14.5 0 17M12 3.5c-3 2.5-3 14.5 0 17'/%3E%3C/g%3E%3Cg transform='translate(100 80) rotate(-12 12 12)'%3E%3Cpath d='M3 15.5L15.5 3 21 8.5 8.5 21zM7 11.5l2.5 2.5M10 8.5l1.5 1.5M12.5 6l2.5 2.5'/%3E%3C/g%3E%3Cg transform='translate(170 74) rotate(15 12 12) scale(.8)'%3E%3Cpath d='M12 3.5l2.6 5.3 5.8.8-4.2 4.1 1 5.8-5.2-2.7-5.2 2.7 1-5.8L3.6 9.6l5.8-.8z'/%3E%3C/g%3E%3Cg transform='translate(206 100) rotate(12 12 12)'%3E%3Cpath d='M9 17.5h6M10 20.5h4M12 3.5a5.5 5.5 0 0 0-3.4 9.8c.9.8 1.4 1.8 1.4 3h4c0-1.2.5-2.2 1.4-3A5.5 5.5 0 0 0 12 3.5z'/%3E%3C/g%3E%3Cg transform='translate(10 138) rotate(-10 12 12)'%3E%3Cpath d='M12 8c-1.8-1.6-6-1.2-6 3.8 0 4 2.8 8.4 6 7.4 3.2 1 6-3.4 6-7.4 0-5-4.2-5.4-6-3.8zM12 8c0-2 1-3.4 3-4.2'/%3E%3C/g%3E%3Cg transform='translate(120 136) rotate(14 12 12)'%3E%3Cpath d='M6.5 16h11l-1.5-2.4V10.5a4 4 0 0 0-8 0v3.1zM10.5 18.5a1.5 1.5 0 0 0 3 0M12 5V3.5'/%3E%3C/g%3E%3Cg transform='translate(174 146)'%3E%3Cellipse cx='12' cy='12' rx='9' ry='3.5'/%3E%3Cellipse cx='12' cy='12' rx='9' ry='3.5' transform='rotate(60 12 12)'/%3E%3Cellipse cx='12' cy='12' rx='9' ry='3.5' transform='rotate(-60 12 12)'/%3E%3C/g%3E%3Cg transform='translate(28 196)'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/g%3E%3Cg transform='translate(92 198) rotate(-6 12 12)'%3E%3Cpath d='M6.5 9.5a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2V20h-11zM9.5 7.5V6a2.5 2.5 0 0 1 5 0v1.5M6.5 13.5h11M10.5 13.5v2h3v-2'/%3E%3C/g%3E%3Cg transform='translate(152 202) rotate(8 12 12)'%3E%3Cpath d='M4 7h6M7 4v6M14 7h6M5 15l4 4M9 15l-4 4M14 17h6'/%3E%3C/g%3E%3Cg transform='translate(206 190) rotate(-10 12 12)'%3E%3Cpath d='M21 4L3 11l6.5 2.5L12 20l3-5.5zM9.5 13.5L21 4'/%3E%3C/g%3E%3C/g%3E%3Cg fill='white' fill-opacity='.2' font-family='Arial,Helvetica,sans-serif' font-weight='700'%3E%3Ctext x='192' y='42' font-size='12' transform='rotate(10 204 38)'%3EABC%3C/text%3E%3Ctext x='58' y='160' font-size='12' transform='rotate(-8 70 156)'%3E123%3C/text%3E%3C/g%3E%3C/svg%3E");--app-doodles-soft:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='white' stroke-opacity='.12' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(12 12) rotate(-12 12 12)'%3E%3Cpath d='M2 6c3-1.5 6.5-1.5 10 .5 3.5-2 7-2 10-.5v12.5c-3-1.5-6.5-1.5-10 .5-3.5-2-7-2-10-.5zM12 6.5V19'/%3E%3C/g%3E%3Cg transform='translate(76 18) rotate(18 12 12)'%3E%3Cpath d='M5 19l1-4.5L16.5 4l3.5 3.5L9.5 18zM14.5 6l3.5 3.5M6 14.5l3.5 3.5'/%3E%3C/g%3E%3Cg transform='translate(140 8) rotate(-8 12 12)'%3E%3Cpath d='M2 9.5L12 5l10 4.5-10 4.5zM6.5 11.5v4.5c3 2.2 8 2.2 11 0v-4.5M21 10v5'/%3E%3C/g%3E%3Cg transform='translate(36 74)'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M3.5 12h17M12 3.5c3 2.5 3 14.5 0 17M12 3.5c-3 2.5-3 14.5 0 17'/%3E%3C/g%3E%3Cg transform='translate(100 80) rotate(-12 12 12)'%3E%3Cpath d='M3 15.5L15.5 3 21 8.5 8.5 21zM7 11.5l2.5 2.5M10 8.5l1.5 1.5M12.5 6l2.5 2.5'/%3E%3C/g%3E%3Cg transform='translate(170 74) rotate(15 12 12) scale(.8)'%3E%3Cpath d='M12 3.5l2.6 5.3 5.8.8-4.2 4.1 1 5.8-5.2-2.7-5.2 2.7 1-5.8L3.6 9.6l5.8-.8z'/%3E%3C/g%3E%3Cg transform='translate(206 100) rotate(12 12 12)'%3E%3Cpath d='M9 17.5h6M10 20.5h4M12 3.5a5.5 5.5 0 0 0-3.4 9.8c.9.8 1.4 1.8 1.4 3h4c0-1.2.5-2.2 1.4-3A5.5 5.5 0 0 0 12 3.5z'/%3E%3C/g%3E%3Cg transform='translate(10 138) rotate(-10 12 12)'%3E%3Cpath d='M12 8c-1.8-1.6-6-1.2-6 3.8 0 4 2.8 8.4 6 7.4 3.2 1 6-3.4 6-7.4 0-5-4.2-5.4-6-3.8zM12 8c0-2 1-3.4 3-4.2'/%3E%3C/g%3E%3Cg transform='translate(120 136) rotate(14 12 12)'%3E%3Cpath d='M6.5 16h11l-1.5-2.4V10.5a4 4 0 0 0-8 0v3.1zM10.5 18.5a1.5 1.5 0 0 0 3 0M12 5V3.5'/%3E%3C/g%3E%3Cg transform='translate(174 146)'%3E%3Cellipse cx='12' cy='12' rx='9' ry='3.5'/%3E%3Cellipse cx='12' cy='12' rx='9' ry='3.5' transform='rotate(60 12 12)'/%3E%3Cellipse cx='12' cy='12' rx='9' ry='3.5' transform='rotate(-60 12 12)'/%3E%3C/g%3E%3Cg transform='translate(28 196)'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/g%3E%3Cg transform='translate(92 198) rotate(-6 12 12)'%3E%3Cpath d='M6.5 9.5a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2V20h-11zM9.5 7.5V6a2.5 2.5 0 0 1 5 0v1.5M6.5 13.5h11M10.5 13.5v2h3v-2'/%3E%3C/g%3E%3Cg transform='translate(152 202) rotate(8 12 12)'%3E%3Cpath d='M4 7h6M7 4v6M14 7h6M5 15l4 4M9 15l-4 4M14 17h6'/%3E%3C/g%3E%3Cg transform='translate(206 190) rotate(-10 12 12)'%3E%3Cpath d='M21 4L3 11l6.5 2.5L12 20l3-5.5zM9.5 13.5L21 4'/%3E%3C/g%3E%3C/g%3E%3Cg fill='white' fill-opacity='.12' font-family='Arial,Helvetica,sans-serif' font-weight='700'%3E%3Ctext x='192' y='42' font-size='12' transform='rotate(10 204 38)'%3EABC%3C/text%3E%3Ctext x='58' y='160' font-size='12' transform='rotate(-8 70 156)'%3E123%3C/text%3E%3C/g%3E%3C/svg%3E")}
body[data-role] .simple-hero::before,body[data-role] .app-art{content:"";display:block;position:absolute;inset:0;width:auto;height:auto;z-index:-1;pointer-events:none;border:0;border-radius:0;background:radial-gradient(circle at 96% 0,var(--app-glow-a),transparent 44%),radial-gradient(circle at 0 82%,var(--app-glow-b),transparent 42%),var(--app-doodles) 0 0/240px 240px}
/* Compact bars and cards: the same doodles, fainter, so titles over them stay clear. */
body[data-role] .app-art{background:radial-gradient(circle at 96% 0,var(--app-glow-a),transparent 44%),radial-gradient(circle at 0 82%,var(--app-glow-b),transparent 42%),var(--app-doodles-soft) 0 0/240px 240px}
body[data-role] .simple-hero::after{content:"";display:block;position:absolute;inset:auto 0 -1px 0;width:auto;height:34px;z-index:-1;border:0;border-radius:0;background:var(--app-bg);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 390 36' preserveAspectRatio='none'%3E%3Cpath d='M0 20C70 3 140 3 200 16S320 33 390 12V36H0Z'/%3E%3C/svg%3E") 0 0/100% 100% no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 390 36' preserveAspectRatio='none'%3E%3Cpath d='M0 20C70 3 140 3 200 16S320 33 390 12V36H0Z'/%3E%3C/svg%3E") 0 0/100% 100% no-repeat}
body[data-role] .simple-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 22px}
body[data-role] .simple-brand{display:flex;align-items:center;gap:10px;font-size:17px;font-weight:600;letter-spacing:0}
body[data-role] .simple-brand>span{display:grid;place-items:center;width:44px;height:44px;border-radius:15px;background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.26);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
body[data-role] .simple-brand>span svg{width:24px;height:24px}
body[data-role] .simple-brand>.brand-mark{display:block;width:46px;height:46px;flex:0 0 46px;filter:drop-shadow(0 6px 12px rgba(0,0,0,.22))}
body[data-role] .simple-brand small{display:block;margin-top:2px;font-size:10px;font-weight:600;letter-spacing:.16em;color:rgba(255,255,255,.8)}
body[data-role] .portal-header-actions{display:flex;gap:10px}
body[data-role] .simple-notification,body[data-role] .app-glass{position:relative;width:44px;height:44px;flex:0 0 44px;border-radius:15px;display:grid;place-items:center;padding:0;border:1px solid rgba(255,255,255,.26);background:rgba(255,255,255,.15);color:#fff;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);cursor:pointer}
body[data-role] .simple-notification svg,body[data-role] .app-glass svg{width:21px;height:21px;stroke-width:1.9}
body[data-role] .simple-notification::after{display:none}
body[data-role] .simple-person{display:flex;align-items:center;gap:14px}
body[data-role] .app-face{width:60px;height:60px;flex:0 0 60px;box-sizing:border-box;padding:3px;border-radius:21px;background:linear-gradient(135deg,#fbbf24,#f472b6);box-shadow:0 8px 18px rgba(0,0,0,.18)}
body[data-role] .app-face :is(svg,img){display:block;width:100%!important;height:100%!important;border-radius:18px!important;object-fit:cover}
body[data-role] .simple-person h1{margin:0;font-size:25px;font-weight:600;line-height:1.2;letter-spacing:-.4px}
body[data-role] .simple-person .identity{display:inline-flex;align-items:center;margin:10px 0 0;padding:6px 12px;border-radius:999px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.24);color:#fff;font-size:12px;font-weight:500}
body[data-role] .school-line{display:flex;align-items:center;gap:8px;margin-top:18px;padding-top:14px;border-top:1px solid rgba(255,255,255,.2);font-size:12px;color:rgba(255,255,255,.9)}
body[data-role] .school-line svg{width:16px;height:16px}
body[data-role] .school-line span:last-child{margin-left:auto;font-size:11px;color:rgba(255,255,255,.82)}
body[data-role] .simple-hero .app-install{margin-bottom:16px}
/* Inner screens: compact app bar that stays on top while the page scrolls. */
body[data-role] .app-bar{position:sticky;top:0;z-index:6;display:flex;align-items:center;gap:12px;padding:max(14px,env(safe-area-inset-top)) 16px 16px;border-radius:0 0 26px 26px;box-shadow:0 10px 24px var(--app-glow)}
body[data-role] .app-bar h2{flex:1;min-width:0;margin:0;text-align:center;font-size:18px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-role] .app-bar-title{flex:1;min-width:0;text-align:center}
body[data-role] .app-bar-title h2{line-height:1.25}
body[data-role] .app-bar-title small{display:block;margin-top:1px;font-size:11.5px;color:rgba(255,255,255,.84);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Home content and feature tiles with clay icons. */
body[data-role] .simple-content,body[data-role] .portal-view{padding:20px 18px 0}
body[data-role] .simple-heading{display:flex;align-items:center;justify-content:space-between;margin:2px 0 16px}
body[data-role] .simple-heading h2{margin:0;font-size:17px;font-weight:600;letter-spacing:-.2px;color:var(--app-ink)}
body[data-role] .simple-heading h2::before{display:none}
body[data-role] .simple-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px 8px}
body[data-role] .simple-card{min-width:0;min-height:0;padding:4px 0;border:0;border-radius:0;background:none;box-shadow:none;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;text-align:center;cursor:pointer}
body[data-role] .simple-card:hover,body[data-role] .simple-card:active{transform:none;box-shadow:none;border-color:transparent}
body[data-role] .simple-card b{font-size:12px;font-weight:500;line-height:1.3;letter-spacing:0;color:#33385a;overflow-wrap:anywhere}
body[data-role] .simple-card .tile-icon{width:58px;height:58px;margin:0;border-radius:19px;display:grid;place-items:center;color:#fff;background:linear-gradient(150deg,var(--a,#cbd5e1),var(--b,#64748b));box-shadow:0 10px 18px var(--g,rgba(71,85,105,.28)),inset 0 2px 0 rgba(255,255,255,.45),inset 0 -3px 0 rgba(0,0,0,.12)}
body[data-role] .simple-card .tile-icon svg{width:26px;height:26px;stroke-width:2;filter:drop-shadow(0 1px 1px rgba(0,0,0,.22))}
/* Feature colours: a feature keeps one colour in every app (principal tiles use data-tone). */
body[data-role] :is([data-tone=indigo],.simple-card:is([data-page=classes],[data-page=idcard])){--a:#a5b4fc;--b:#4f46e5;--g:rgba(79,70,229,.32)}
body[data-role] :is([data-tone=teal],.simple-card:is([data-page=my-attendance],[data-page=hostel])){--a:#5eead4;--b:#0d9488;--g:rgba(13,148,136,.3)}
body[data-role] :is([data-tone=amber],.simple-card:is([data-page=attendance],[data-page=certificates])){--a:#fcd34d;--b:#f59e0b;--g:rgba(245,158,11,.32)}
body[data-role] :is([data-tone=green],.simple-card:is([data-page=fees],[data-page=salary])){--a:#86efac;--b:#16a34a;--g:rgba(22,163,74,.3)}
body[data-role] :is([data-tone=violet],.simple-card:is([data-page=results],[data-page=marks],[data-page=library])){--a:#c4b5fd;--b:#7c3aed;--g:rgba(124,58,237,.3)}
body[data-role] :is([data-tone=pink],.simple-card:is([data-page=homework],[data-page=quiz])){--a:#f9a8d4;--b:#db2777;--g:rgba(219,39,119,.3)}
body[data-role] :is([data-tone=sky],.simple-card:is([data-page=timetable],[data-page=admit])){--a:#7dd3fc;--b:#0284c7;--g:rgba(2,132,199,.3)}
body[data-role] :is([data-tone=rose],.simple-card[data-page=notices]){--a:#fda4af;--b:#e11d48;--g:rgba(225,29,72,.3)}
body[data-role] :is([data-tone=orange],.simple-card:is([data-page=transport],[data-page=leave])){--a:#fdba74;--b:#ea580c;--g:rgba(234,88,12,.3)}
body[data-role] [data-tone=blue]{--a:#93c5fd;--b:#2563eb;--g:rgba(37,99,235,.3)}
body[data-role] :is([data-tone=slate],.simple-card[data-page=profile]){--a:#cbd5e1;--b:#64748b;--g:rgba(71,85,105,.28)}

/* Cards, rows, fields and buttons. */
body[data-role] .portal-card,body[data-role] .pa-card,body[data-role] .portal-empty{background:#fff;border:0;border-radius:22px;padding:16px;margin-bottom:14px;box-shadow:var(--app-shadow)}
body[data-role] .portal-empty{color:var(--app-muted);text-align:center}
/* Empty states: a soft icon in the app colour above the message. */
body[data-role] .portal-empty:not(.principal-loading):not(.pa-loading){display:flex;flex-direction:column;align-items:center;gap:12px;padding:26px 20px;font-size:13.5px;line-height:1.6}
body[data-role] .portal-empty:not(.principal-loading):not(.pa-loading)::before{content:"";width:56px;height:56px;flex:0 0 56px;border-radius:19px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") center/26px no-repeat,linear-gradient(150deg,color-mix(in srgb,var(--app-to) 50%,white),var(--app-to));box-shadow:0 10px 20px var(--app-glow),inset 0 2px 0 rgba(255,255,255,.4)}
body[data-role] .portal-card h3,body[data-role] .pa-card h3{margin:0 0 6px;font-size:15px;font-weight:600}
body[data-role] .portal-row{border-bottom-color:#eef0f7}
body[data-role] .portal-row>span:first-child{color:var(--app-muted)}
body[data-role] :is(.portal-primary,.portal-secondary){display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;text-decoration:none;cursor:pointer}
body[data-role] .portal-field{display:block}
body[data-role] .portal-field :is(input,select,textarea){display:block;width:100%}
body[data-role] .portal-primary{min-height:50px;padding:0 20px;border-radius:16px;background:linear-gradient(135deg,var(--app-from),var(--app-to));color:#fff;font:600 14px Poppins,"Segoe UI",sans-serif;box-shadow:0 10px 20px var(--app-glow),inset 0 1px 0 rgba(255,255,255,.22)}
body[data-role] .portal-secondary{min-height:44px;padding:0 16px;border-radius:14px;background:var(--app-soft);color:var(--app-accent);font:600 13px Poppins,"Segoe UI",sans-serif}
body[data-role] .portal-actions{gap:10px}
body[data-role] .portal-field{margin:0 0 14px;font-size:12.5px;font-weight:600;color:#4a4f6e}
body[data-role] .portal-field :is(input,select,textarea){box-sizing:border-box;min-height:50px;margin-top:7px;padding:12px 14px;border:1.5px solid #e3e6f2;border-radius:15px;background:#fff;color:var(--app-ink);font:400 14.5px Poppins,"Segoe UI",sans-serif;box-shadow:0 1px 2px rgba(27,31,59,.04);transition:border-color .2s,box-shadow .2s}
body[data-role] .portal-field select{-webkit-appearance:none;appearance:none;padding-right:40px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa0bd' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center/18px no-repeat}
body[data-role] .portal-field textarea{min-height:110px;line-height:1.55;resize:vertical}
body[data-role] .portal-field input[type=file]{padding:9px;border-style:dashed;background:var(--app-soft);font-size:12.5px;color:var(--app-muted)}
body[data-role] .portal-field input[type=file]::file-selector-button{margin-right:10px;padding:8px 14px;border:0;border-radius:11px;background:linear-gradient(135deg,var(--app-from),var(--app-to));color:#fff;font:600 12px Poppins,"Segoe UI",sans-serif;cursor:pointer}
body[data-role] .portal-field :is(input,select,textarea):focus{border-color:var(--app-accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--app-accent) 14%,transparent);outline:none}
body[data-role] .portal-field :is(input,textarea)::placeholder{color:#a3a7c0}
body[data-role] .portal-message{display:flex;align-items:flex-start;gap:10px;margin:0 0 14px;padding:12px 14px;border-radius:16px;background:#dcfce7;color:#14532d;font-size:13px;line-height:1.5}
body[data-role] .portal-message::before{content:"";width:18px;height:18px;flex:0 0 18px;margin-top:1px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E") center/contain no-repeat}
body[data-role] .portal-message.error{background:#ffe4e6;color:#9f1239}
body[data-role] .portal-message.error::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v6m0 4h.01'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v6m0 4h.01'/%3E%3C/svg%3E")}
body[data-role] :is(#portalMessage,#teacherMessage,#principalMessage):empty{display:none}
body[data-role] .portal-note{margin:12px 4px 0;font-size:11.5px;line-height:1.6;color:var(--app-muted)}
body[data-role] .portal-caption{padding:20px 20px 0;font-size:10.5px;color:#9aa0bd}
body[data-role] .portal-top h2,body[data-role] .portal-top h3{font-weight:600}
body[data-role] .back-button{border-radius:14px;border-color:#e3e6f2;color:var(--app-accent)}

/* Native screens in every app: sections, chips, week strip, lists, summaries, calendars,
   timelines, forms and sheets. Tones come from data-tone (feature colours above). */
body[data-role] .ns-sec{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:24px 2px 10px}
body[data-role] .ns-sec.first{margin-top:2px}
body[data-role] .ns-sec h2{margin:0;font-size:16px;font-weight:600;letter-spacing:-.2px;color:var(--app-ink)}
body[data-role] .ns-sec>span{font-size:12px;font-weight:500;color:var(--app-muted)}
body[data-role] .ns-link{display:inline-flex;align-items:center;gap:4px;min-height:40px;padding:0 2px;border:0;background:none;color:var(--app-accent);font-size:13px;font-weight:600;text-decoration:none;cursor:pointer}
body[data-role] .ns-stack{display:flex;flex-direction:column;gap:12px;margin:0 0 14px;padding:0;list-style:none}

/* Search and filter chips. */
body[data-role] .ns-tools{display:flex;gap:10px;margin-bottom:12px}
body[data-role] .ns-search{flex:1;min-width:0;height:52px;display:flex;align-items:center;gap:10px;padding:0 16px;border-radius:18px;background:#fff;color:#8a8fac;box-shadow:var(--app-lift)}
body[data-role] .ns-search svg{width:18px;height:18px;flex:0 0 18px}
body[data-role] .ns-search input{flex:1;min-width:0;border:0;background:transparent;font:400 14px Poppins,"Segoe UI",sans-serif;color:var(--app-ink);outline:none}
body[data-role] .ns-square{width:52px;height:52px;flex:0 0 52px;border:0;border-radius:18px;display:grid;place-items:center;background:#fff;color:var(--app-accent);box-shadow:var(--app-lift);cursor:pointer}
body[data-role] .ns-square svg{width:20px;height:20px}
body[data-role] .ns-chips{display:flex;gap:8px;overflow-x:auto;margin:0 -18px 14px;padding:2px 18px 8px;scrollbar-width:none}
body[data-role] .ns-chips::-webkit-scrollbar{display:none}
body[data-role] .ns-chip{flex:0 0 auto;display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:0 16px;border:0;border-radius:999px;background:#fff;color:#4a4f6e;font-size:12.5px;font-weight:500;white-space:nowrap;box-shadow:0 4px 10px rgba(27,31,59,.06);cursor:pointer}
body[data-role] .ns-chip.on{background:linear-gradient(135deg,var(--app-from),var(--app-to));color:#fff;font-weight:600;box-shadow:0 8px 16px var(--app-glow)}
body[data-role] .ns-chip.kid{min-height:44px;padding:0 16px 0 6px}
body[data-role] .ns-chip.kid :is(svg,img){width:32px!important;height:32px!important;flex:0 0 32px!important;border-radius:50%!important;object-fit:cover}

/* People and record lists. */
body[data-role] :is(.ns-list,.na-list){list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}
body[data-role] .ns-card{display:flex;align-items:center;gap:10px;padding:12px;border-radius:22px;background:#fff;box-shadow:var(--app-shadow)}
body[data-role] .ns-main{flex:1;min-width:0;display:flex;align-items:center;gap:12px;padding:0;border:0;background:none;color:inherit;text-align:left;cursor:pointer}
body[data-role] .ns-avatar{width:52px;height:52px;flex:0 0 52px;box-sizing:border-box;border:2px solid transparent;border-radius:17px;display:grid;place-items:center;overflow:hidden;font-size:16px;font-weight:700;color:var(--b);background:linear-gradient(color-mix(in srgb,var(--a) 26%,white),color-mix(in srgb,var(--a) 26%,white)) padding-box,linear-gradient(135deg,var(--a),var(--b)) border-box}
body[data-role] .ns-avatar :is(img,svg){width:100%;height:100%;object-fit:cover;border-radius:inherit}
body[data-role] .ns-info{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:3px}
body[data-role] .ns-info b{max-width:100%;font-size:15px;font-weight:600;color:var(--app-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-role] .ns-info small{font-size:12px;color:var(--app-muted)}
body[data-role] .ns-badge{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:999px;font-size:11px;font-weight:600;white-space:nowrap}
body[data-role] .ns-badge::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
body[data-role] .ns-badge:is(.due,.warn){background:#fff4e0;color:#b45309}
body[data-role] .ns-badge:is(.paid,.ok){background:#dcfce7;color:#15803d}
body[data-role] .ns-badge.bad{background:#ffe4e6;color:#be123c}
body[data-role] .ns-badge.info{background:#e0f2fe;color:#0369a1}
body[data-role] .ns-badge.mute{background:#eef0f7;color:#5f6484}
body[data-role] .ns-badge.glass{background:rgba(255,255,255,.2);color:#fff}
body[data-role] .ns-call{width:46px;height:46px;flex:0 0 46px;border-radius:15px;display:grid;place-items:center;color:#fff;background:linear-gradient(150deg,#4ade80,#16a34a);box-shadow:0 8px 16px rgba(22,163,74,.3),inset 0 1px 0 rgba(255,255,255,.4)}
body[data-role] .ns-call svg{width:19px;height:19px}
body[data-role] .ns-profile{display:flex;align-items:center;gap:14px}
body[data-role] .ns-avatar-lg{width:68px;height:68px;flex-basis:68px;border-width:3px;border-radius:22px;font-size:22px}
body[data-role] .ns-profile>div{min-width:0}
body[data-role] .ns-profile>div>b{display:block;font-size:18px;font-weight:600}
body[data-role] .ns-profile>div>span{display:block;font-size:13px;color:var(--app-muted)}
body[data-role] .ns-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0 0 14px}
body[data-role] .ns-action{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 4px;border:0;border-radius:18px;background:#fff;color:#33385a;font-size:12px;font-weight:500;text-decoration:none;box-shadow:var(--app-shadow);cursor:pointer}
body[data-role] .ns-action-icon{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;color:#fff;background:linear-gradient(150deg,var(--a),var(--b));box-shadow:0 8px 14px var(--g),inset 0 2px 0 rgba(255,255,255,.4)}
body[data-role] .ns-action-icon svg{width:20px;height:20px}
body[data-role] .ns-card-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:10px}
body[data-role] .ns-card-head h3{margin:0}
body[data-role] .ns-card-head span{font-size:12px;color:var(--app-muted)}
body[data-role] .ns-progress{height:8px;margin:0 0 6px;border-radius:999px;background:#eef0f7;overflow:hidden}
body[data-role] .ns-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--pa,#4ade80),var(--pb,#16a34a))}

/* Record rows: clay icon, title and details, value or badge at the end. */
body[data-role] .ns-item{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:20px;background:#fff;box-shadow:var(--app-shadow);color:var(--app-ink);text-decoration:none}
body[data-role] button.ns-item{width:100%;border:0;font:inherit;text-align:left;cursor:pointer}
body[data-role] .ns-ic{width:46px;height:46px;flex:0 0 46px;border-radius:15px;display:grid;place-items:center;color:#fff;background:linear-gradient(150deg,var(--a,color-mix(in srgb,var(--app-to) 50%,white)),var(--b,var(--app-to)));box-shadow:0 8px 14px var(--g,var(--app-glow)),inset 0 2px 0 rgba(255,255,255,.4),inset 0 -2px 0 rgba(0,0,0,.08)}
body[data-role] .ns-ic svg{width:21px;height:21px;stroke-width:2;filter:drop-shadow(0 1px 1px rgba(0,0,0,.18))}
body[data-role] .ns-ic.sm{width:38px;height:38px;flex-basis:38px;border-radius:12px;box-shadow:0 6px 12px var(--g,var(--app-glow)),inset 0 1px 0 rgba(255,255,255,.4)}
body[data-role] .ns-ic.sm svg{width:18px;height:18px}
body[data-role] .ns-ic.date{flex-direction:column;gap:0;line-height:1.05}
body[data-role] .ns-ic.date b{font-size:17px;font-weight:700}
body[data-role] .ns-ic.date small{font-size:9.5px;font-weight:600;text-transform:uppercase;letter-spacing:.06em}
body[data-role] .ns-item-main{flex:1;min-width:0}
body[data-role] .ns-item-main>b{display:block;font-size:14.5px;font-weight:600;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-role] .ns-item-main>small{display:block;margin-top:2px;font-size:12px;line-height:1.45;color:var(--app-muted)}
body[data-role] .ns-item-end{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-end;gap:5px;text-align:right}
body[data-role] .ns-item-end>b{font-size:14.5px;font-weight:700;color:var(--app-ink);white-space:nowrap}
body[data-role] .ns-item-end>small{font-size:11px;color:var(--app-muted)}
body[data-role] .ns-chev{width:18px;height:18px;flex:0 0 18px;color:#b3b7cc}
/* Expandable record: the summary row opens to the details. */
body[data-role] .ns-x{border-radius:20px;background:#fff;box-shadow:var(--app-shadow);overflow:hidden}
body[data-role] .ns-x>summary{display:flex;align-items:center;gap:12px;padding:12px 14px;list-style:none;cursor:pointer}
body[data-role] .ns-x>summary::-webkit-details-marker{display:none}
body[data-role] .ns-x>summary::after{content:"";width:8px;height:8px;flex:0 0 8px;margin:0 6px 4px 2px;border:solid #a3a7c0;border-width:0 2px 2px 0;transform:rotate(45deg);transition:transform .3s var(--app-ease),margin .3s}
body[data-role] .ns-x[open]>summary::after{margin:4px 6px 0 2px;transform:rotate(-135deg)}
body[data-role] .ns-x-body{padding:4px 14px 14px;border-top:1px solid #f0f1f7}
body[data-role] .ns-x-body .portal-row{padding:9px 0}
/* Posts: homework and other written work. */
body[data-role] .ns-post{padding:14px 16px 16px;border-radius:22px;background:#fff;box-shadow:var(--app-shadow)}
body[data-role] .ns-post-head{display:flex;align-items:center;gap:12px;margin-bottom:10px}
body[data-role] .ns-post-text{margin:0;font-size:13.5px;line-height:1.6;color:#3d4263;white-space:pre-wrap;overflow-wrap:anywhere}
body[data-role] .ns-post .portal-muted{margin:10px 0 0}
body[data-role] .ns-post form{margin-top:14px}
body[data-role] .ns-files{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
body[data-role] .ns-file{display:inline-flex;align-items:center;gap:7px;max-width:100%;min-height:38px;padding:0 12px;border:1px solid #e3e6f2;border-radius:12px;background:#f7f8fc;color:var(--app-accent);font:500 12.5px Poppins,"Segoe UI",sans-serif;text-decoration:none;cursor:pointer}
body[data-role] .ns-file svg{width:16px;height:16px;flex:0 0 16px}
body[data-role] .ns-file span{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
body[data-role] .ns-file.x{color:#be123c}
body[data-role] .ns-quote{margin:12px 0 0;padding:10px 12px;border-radius:14px;background:var(--app-soft);font-size:13px;line-height:1.55;color:#33385a;white-space:pre-wrap;overflow-wrap:anywhere}
body[data-role] .ns-quote b{display:block;margin-bottom:2px;font-size:11.5px;color:var(--app-accent)}

/* Notices. */
body[data-role] .nn-card{position:relative;overflow:hidden;padding:14px 16px 10px 20px;border-radius:22px;background:#fff;box-shadow:var(--app-shadow)}
body[data-role] .nn-card::before{content:"";position:absolute;left:0;top:14px;bottom:14px;width:5px;border-radius:0 6px 6px 0;background:linear-gradient(180deg,var(--a),var(--b))}
body[data-role] .nn-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
body[data-role] .nn-pri{padding:3px 10px;border-radius:999px;font-size:11px;font-weight:600;text-transform:capitalize;color:color-mix(in srgb,var(--b) 72%,black);background:color-mix(in srgb,var(--a) 30%,white)}
body[data-role] .nn-top time{font-size:12px;color:var(--app-muted)}
body[data-role] .nn-card>b{display:block;font-size:15px;font-weight:600;color:var(--app-ink)}
body[data-role] .nn-card>p{margin:4px 0 10px;font-size:13px;line-height:1.55;color:#4a4f6e;white-space:pre-wrap;overflow-wrap:anywhere}
body[data-role] .nn-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:6px;border-top:1px solid #eef0f7}
body[data-role] .nn-foot>span{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--app-muted)}
body[data-role] .nn-foot svg{width:15px;height:15px}

/* Summary card: gradient with a ring or a progress bar (role colours, or data-tone). */
body[data-role] .ns-sum{position:relative;overflow:hidden;isolation:isolate;margin:0 0 14px;padding:18px;border-radius:24px;color:#fff;background:linear-gradient(150deg,var(--app-to),var(--app-from));box-shadow:0 14px 26px var(--app-glow),inset 0 1px 0 rgba(255,255,255,.28)}
body[data-role] .ns-sum[data-tone]{background:linear-gradient(150deg,var(--b),color-mix(in srgb,var(--b) 56%,#0b1020));box-shadow:0 14px 26px var(--g),inset 0 1px 0 rgba(255,255,255,.28)}
body[data-role] .ns-sum::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(circle at 100% 0,rgba(255,255,255,.26),transparent 46%),var(--app-doodles-soft) 0 0/240px 240px}
body[data-role] .ns-sum-row{display:flex;align-items:center;gap:16px}
body[data-role] .ns-sum-row>div{flex:1;min-width:0}
body[data-role] .ns-sum small{display:block;font-size:12px;font-weight:500;opacity:.9}
body[data-role] .ns-sum .big{display:block;font-size:28px;font-weight:700;letter-spacing:-.5px;line-height:1.25}
body[data-role] .ns-sum p{margin:3px 0 0;font-size:12.5px;line-height:1.5;color:#fff;opacity:.92}
body[data-role] .ns-sum .ns-badge{margin-top:8px}
body[data-role] .ns-bar{height:8px;margin:14px 0 8px;border-radius:999px;background:rgba(255,255,255,.25);overflow:hidden}
body[data-role] .ns-bar i{display:block;height:100%;border-radius:inherit;background:#fff;animation:nsGrow .9s .1s var(--app-ease) both}
body[data-role] .ns-split{display:flex;justify-content:space-between;gap:10px;font-size:12px;font-weight:500}
body[data-role] .ns-ring{position:relative;width:88px;height:88px;flex:0 0 88px}
body[data-role] .ns-ring svg{display:block;width:100%;height:100%;transform:rotate(-90deg)}
body[data-role] .ns-ring circle{fill:none;stroke-width:9}
body[data-role] .ns-ring .tr{stroke:rgba(255,255,255,.24)}
body[data-role] .ns-ring .val{stroke:#fff;stroke-linecap:round;animation:nsRing 1s .1s var(--app-ease) both}
body[data-role] .ns-ring>span{position:absolute;inset:0;display:grid;place-content:center;text-align:center}
body[data-role] .ns-ring>span b{font-size:20px;font-weight:700;line-height:1.1}
body[data-role] .ns-ring>span small{font-size:10px}
@keyframes nsRing{from{stroke-dashoffset:var(--c)}}
@keyframes nsGrow{from{width:0}}

/* Stat tiles: present, absent, leave and totals. */
body[data-role] .na-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:14px}
body[data-role] .na-summary-3{grid-template-columns:repeat(3,minmax(0,1fr));margin:0}
body[data-role] .na-summary>div{display:flex;flex-direction:column;padding:9px 10px;border-radius:16px}
body[data-role] .na-summary b{font-size:19px;font-weight:700;line-height:1.2}
body[data-role] .na-summary span{font-size:11px;font-weight:600}
body[data-role] .na-p{background:linear-gradient(150deg,#dcfce7,#bbf7d0);color:#166534}
body[data-role] .na-a{background:linear-gradient(150deg,#ffe4e6,#fecdd3);color:#9f1239}
body[data-role] .na-l{background:linear-gradient(150deg,#fef3c7,#fde68a);color:#92400e}
body[data-role] .na-t{background:#fff;color:#33385a;box-shadow:0 4px 10px rgba(27,31,59,.05)}

/* Week strip with a calendar button, and a month switcher. */
body[data-role] .na-week{display:flex;gap:8px;margin-bottom:12px}
body[data-role] .na-days{flex:1;min-width:0;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;padding:8px;border-radius:22px;background:#fff;box-shadow:var(--app-lift)}
body[data-role] .na-day{position:relative;min-height:58px;padding:0;border:0;border-radius:16px;background:none;color:#33385a;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer}
body[data-role] .na-day small{font-size:10px;font-weight:500;opacity:.85}
body[data-role] .na-day b{font-size:16px;font-weight:600}
body[data-role] .na-day.on{background:linear-gradient(150deg,var(--app-from),var(--app-to));color:#fff;box-shadow:0 8px 16px var(--app-glow)}
body[data-role] .na-day:disabled{color:#b6b9cc;cursor:not-allowed}
body[data-role] .na-day.dot::after{content:"";position:absolute;bottom:6px;width:5px;height:5px;border-radius:50%;background:var(--app-accent)}
body[data-role] .na-day.dot.on::after{background:#fff}
body[data-role] .na-cal{position:relative;width:52px;flex:0 0 52px;border-radius:18px;display:grid;place-items:center;background:#fff;color:var(--app-accent);box-shadow:var(--app-lift);cursor:pointer}
body[data-role] .na-cal svg{width:20px;height:20px}
body[data-role] .na-cal input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
body[data-role] .na-holiday{margin:0 0 12px;padding:10px 14px;border-radius:14px;background:#fff7e6;color:#92400e;font-size:12.5px}
body[data-role] .ns-month{display:flex;align-items:center;gap:8px;margin:0 0 14px}
body[data-role] .ns-step{width:48px;height:48px;flex:0 0 48px;padding:0;border:0;border-radius:16px;display:grid;place-items:center;background:#fff;color:var(--app-accent);box-shadow:var(--app-lift);cursor:pointer}
body[data-role] .ns-step svg{width:20px;height:20px;stroke-width:2.2}
body[data-role] .ns-step:disabled{color:#c3c6d6;cursor:not-allowed}
body[data-role] .ns-month-label{position:relative;flex:1;min-width:0;height:48px;border-radius:16px;display:flex;align-items:center;justify-content:center;gap:8px;background:#fff;color:var(--app-ink);font-size:14.5px;font-weight:600;box-shadow:var(--app-lift)}
body[data-role] .ns-month-label svg{width:18px;height:18px;color:var(--app-accent)}
body[data-role] .ns-month-label input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}

/* Month calendar: one cell per day, coloured by the day's status. */
body[data-role] .ns-cal{margin:0 0 14px;padding:14px 12px 12px;border-radius:22px;background:#fff;box-shadow:var(--app-shadow)}
body[data-role] .ns-cal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px 4px;text-align:center}
body[data-role] .ns-cal-grid>b{padding-bottom:2px;font-size:10.5px;font-weight:600;color:#9aa0bd}
body[data-role] .ns-cal-grid>i{width:100%;max-width:40px;aspect-ratio:1;margin:0 auto;border-radius:12px;display:grid;place-items:center;font-size:12.5px;font-style:normal;font-weight:500;color:#33385a}
body[data-role] .ns-cal-grid>i.o{visibility:hidden}
body[data-role] .ns-cal-grid>i.f{color:#c3c6d6}
body[data-role] .ns-cal-grid>i.h{background:#f1f2f8;color:#a3a7c0}
body[data-role] .ns-cal-grid>i.p{background:linear-gradient(150deg,#4ade80,#16a34a);color:#fff;font-weight:600;box-shadow:0 4px 8px rgba(22,163,74,.24)}
body[data-role] .ns-cal-grid>i.a{background:linear-gradient(150deg,#fb7185,#e11d48);color:#fff;font-weight:600;box-shadow:0 4px 8px rgba(225,29,72,.22)}
body[data-role] .ns-cal-grid>i.l{background:linear-gradient(150deg,#fcd34d,#d97706);color:#fff;font-weight:600;box-shadow:0 4px 8px rgba(217,119,6,.22)}
body[data-role] .ns-cal-grid>i.t{box-shadow:inset 0 0 0 2px var(--app-accent);color:var(--app-accent);font-weight:700}
body[data-role] .ns-cal-grid>i.t:is(.p,.a,.l){box-shadow:0 0 0 2px #fff,0 0 0 4px var(--app-accent)}
body[data-role] .ns-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 14px;margin-top:12px;padding-top:10px;border-top:1px solid #f0f1f7;font-size:11.5px;color:var(--app-muted)}
body[data-role] .ns-legend span{display:inline-flex;align-items:center;gap:6px}
body[data-role] .ns-legend span::before{content:"";width:10px;height:10px;border-radius:4px;background:var(--c)}

/* Day timeline: periods with times, the current lesson highlighted. */
body[data-role] .ns-tl{display:flex;flex-direction:column;gap:10px;margin:0 0 14px;padding:0;list-style:none}
body[data-role] .ns-tl li{display:grid;grid-template-columns:50px minmax(0,1fr);gap:10px;align-items:stretch}
body[data-role] .ns-tl-time{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;font-size:12.5px;font-weight:600;line-height:1.3;color:var(--app-ink);font-variant-numeric:tabular-nums}
body[data-role] .ns-tl-time small{font-size:10.5px;font-weight:500;color:var(--app-muted)}
body[data-role] .ns-tl-card{position:relative;min-width:0;display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:20px;background:#fff;box-shadow:var(--app-shadow)}
body[data-role] .ns-tl-card>div{flex:1;min-width:0}
body[data-role] .ns-tl-card b{display:block;font-size:14.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-role] .ns-tl-card small{display:block;margin-top:1px;font-size:12px;color:var(--app-muted)}
body[data-role] .ns-tl li.free .ns-tl-card{background:none;box-shadow:none;border:1.5px dashed #dcdfeb;color:var(--app-muted)}
body[data-role] .ns-tl li.free .ns-tl-card b{font-weight:500;color:var(--app-muted)}
body[data-role] .ns-tl li.now .ns-tl-card{background:linear-gradient(150deg,var(--app-to),var(--app-from));color:#fff;box-shadow:0 12px 22px var(--app-glow)}
body[data-role] .ns-tl li.now .ns-tl-card small{color:rgba(255,255,255,.85)}
body[data-role] .ns-tl li.now .ns-ic{background:rgba(255,255,255,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.3)}

/* Details list (icon, label, value) and menus. */
body[data-role] .ns-dl{margin:0 0 14px;padding:4px 16px;border-radius:22px;background:#fff;box-shadow:var(--app-shadow)}
body[data-role] .ns-dl-row{display:flex;align-items:center;gap:12px;padding:11px 0}
body[data-role] .ns-dl-row+.ns-dl-row{border-top:1px solid #f0f1f7}
body[data-role] .ns-dl-ic{width:38px;height:38px;flex:0 0 38px;border-radius:12px;display:grid;place-items:center;background:var(--app-soft);color:var(--app-accent)}
body[data-role] .ns-dl-ic svg{width:19px;height:19px}
body[data-role] .ns-dl-row>span:last-child{flex:1;min-width:0}
body[data-role] .ns-dl-row small{display:block;font-size:11.5px;color:var(--app-muted)}
body[data-role] .ns-dl-row b{display:block;font-size:14px;font-weight:500;color:var(--app-ink);overflow-wrap:anywhere}
body[data-role] .ns-dl.plain .ns-dl-row{justify-content:space-between}
body[data-role] .ns-dl.plain .ns-dl-row>span:first-child{font-size:13px;color:var(--app-muted)}
body[data-role] .ns-dl.plain .ns-dl-row>span:last-child{flex:0 1 auto;text-align:right;font-size:13.5px;font-weight:500;color:var(--app-ink)}
body[data-role] .ns-dl.plain .ns-dl-row.total>span{font-weight:700;color:var(--app-ink)}
body[data-role] .ns-menu{margin:0 0 14px;padding:6px;border-radius:22px;background:#fff;box-shadow:var(--app-shadow)}
body[data-role] .ns-menu-item{width:100%;min-height:56px;display:flex;align-items:center;gap:12px;padding:6px 10px;border:0;border-radius:16px;background:none;color:var(--app-ink);font:inherit;text-align:left;text-decoration:none;cursor:pointer}
body[data-role] .ns-menu-item+.ns-menu-item{border-top:1px solid #f0f1f7}
body[data-role] .ns-menu-item b{flex:1;min-width:0;font-size:14px;font-weight:500}
body[data-role] .ns-menu-item>svg{width:18px;height:18px;flex:0 0 18px;color:#a3a7c0}
body[data-role] .ns-menu-item .ns-ic{width:38px;height:38px;flex-basis:38px;border-radius:12px;box-shadow:0 6px 12px var(--g,var(--app-glow)),inset 0 1px 0 rgba(255,255,255,.4)}
body[data-role] .ns-menu-item .ns-ic svg{width:18px;height:18px}
body[data-role] .ns-menu-item.danger{color:#be123c}
body[data-role] .ns-menu-item.danger .ns-ic{background:#ffe4e6;color:#be123c;box-shadow:none}
body[data-role] .ns-menu-item.danger .ns-ic svg{filter:none}
/* Profile header and the identity card. */
body[data-role] .ns-me{position:relative;overflow:hidden;isolation:isolate;display:flex;align-items:center;gap:14px;margin:0 0 14px;padding:18px 16px 16px;border-radius:24px;background:#fff;box-shadow:var(--app-shadow)}
body[data-role] .ns-me::before{content:"";position:absolute;inset:0;z-index:-1;background:radial-gradient(circle at 100% 0,color-mix(in srgb,var(--app-to) 16%,transparent),transparent 55%),linear-gradient(135deg,color-mix(in srgb,var(--app-to) 7%,white),#fff 70%)}
body[data-role] .ns-me .app-face{width:70px;height:70px;flex-basis:70px;border-radius:24px}
body[data-role] .ns-me .app-face :is(svg,img){border-radius:21px!important}
body[data-role] .ns-me>div{min-width:0}
body[data-role] .ns-me>div>b{display:block;font-size:18px;font-weight:600;line-height:1.3}
body[data-role] .ns-me>div>span{display:block;margin-top:2px;font-size:12.5px;color:var(--app-muted);overflow-wrap:anywhere}
body[data-role] .ns-me .ns-badge{display:inline-flex;margin-top:8px}
body[data-role] .ns-item-main>b.wrap{display:-webkit-box;white-space:normal;-webkit-line-clamp:2;-webkit-box-orient:vertical}
body[data-role] .ns-id{position:relative;overflow:hidden;isolation:isolate;margin:0 0 16px;padding:18px;border-radius:26px;color:#fff;background:linear-gradient(150deg,var(--app-to),var(--app-from));box-shadow:0 18px 34px var(--app-glow);-webkit-print-color-adjust:exact;print-color-adjust:exact}
body[data-role] .ns-id::before{content:"";position:absolute;inset:0;z-index:-1;background:radial-gradient(circle at 100% 0,var(--app-glow-a),transparent 46%),radial-gradient(circle at 0 100%,var(--app-glow-b),transparent 44%),var(--app-doodles-soft) 0 0/240px 240px}
body[data-role] .ns-id-top{display:flex;align-items:center;gap:10px;font-size:13.5px;font-weight:600;line-height:1.3}
body[data-role] .ns-id-top>span{width:38px;height:38px;flex:0 0 38px;border-radius:12px;display:grid;place-items:center;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.26)}
body[data-role] .ns-id-top>span svg{width:21px;height:21px}
body[data-role] .ns-id-top small{display:block;font-size:9.5px;font-weight:600;letter-spacing:.16em;opacity:.8}
body[data-role] .ns-id-who{display:flex;align-items:center;gap:14px;margin:18px 0 16px}
body[data-role] .ns-id-who .app-face{width:76px;height:76px;flex-basis:76px;border-radius:24px}
body[data-role] .ns-id-who .app-face :is(svg,img){border-radius:21px!important}
body[data-role] .ns-id-who>div{min-width:0}
body[data-role] .ns-id-who b{display:block;font-size:20px;font-weight:600;line-height:1.25}
body[data-role] .ns-id-who span{display:block;margin-top:3px;font-size:12.5px;opacity:.9}
body[data-role] .ns-id-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px;padding:14px;border-radius:18px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.2)}
body[data-role] .ns-id-grid small{display:block;font-size:10.5px;opacity:.78}
body[data-role] .ns-id-grid b{display:block;font-size:13.5px;font-weight:600;overflow-wrap:anywhere}
body[data-role] .ns-id-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;font-size:11px;font-weight:500;opacity:.92}
body[data-role] .ns-id-bars{width:116px;height:26px;border-radius:3px;background:repeating-linear-gradient(90deg,#fff 0 2px,transparent 2px 4px,#fff 4px 5px,transparent 5px 8px,#fff 8px 11px,transparent 11px 13px);opacity:.85}

/* Forms in a card, two fields side by side, and full-width actions. */
body[data-role] .ns-form{margin:0 0 14px;padding:16px 16px 4px;border-radius:22px;background:#fff;box-shadow:var(--app-shadow)}
body[data-role] .ns-form>h3{margin:0 0 14px;font-size:15px;font-weight:600}
body[data-role] .ns-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body[data-role] .ns-form .portal-primary,body[data-role] .ns-wide{width:100%;margin-bottom:12px}
body[data-role] .ns-form .portal-note{margin:-4px 2px 14px}

/* Marking attendance: rows with P / A / L, a sticky save button. */
body[data-role] .na-head{display:flex;align-items:center;justify-content:space-between;margin:2px 0 10px}
body[data-role] .na-head h2{margin:0;font-size:16px;font-weight:600}
body[data-role] .na-all{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 4px;border:0;background:none;color:#15803d;font-size:13px;font-weight:600;cursor:pointer}
body[data-role] .na-all svg{width:17px;height:17px;stroke-width:2.4}
body[data-role] .na-row{display:flex;align-items:center;gap:10px;padding:10px 10px 10px 12px;border-radius:20px;background:#fff;box-shadow:var(--app-shadow)}
body[data-role] .na-row .ns-avatar{width:44px;height:44px;flex-basis:44px;border-radius:15px;font-size:14px}
body[data-role] .na-seg{display:flex;gap:6px}
body[data-role] .na-mark{width:40px;height:40px;padding:0;border:1px solid #e3e6f2;border-radius:13px;background:#f6f7fb;color:#6b7090;font-size:13px;font-weight:700;cursor:pointer;transition:transform .3s var(--app-ease),background .2s,box-shadow .2s}
body[data-role] .na-mark.on{border-color:transparent;color:#fff}
body[data-role] .na-mark.mk-p.on{background:linear-gradient(150deg,#4ade80,#16a34a);box-shadow:0 6px 12px rgba(22,163,74,.32)}
body[data-role] .na-mark.mk-a.on{background:linear-gradient(150deg,#fb7185,#e11d48);box-shadow:0 6px 12px rgba(225,29,72,.3)}
body[data-role] .na-mark.mk-l.on{background:linear-gradient(150deg,#fcd34d,#d97706);box-shadow:0 6px 12px rgba(217,119,6,.3)}
/* The same control as radio buttons inside a form. */
body[data-role] label.na-mark{position:relative;display:block;width:auto;height:auto;border:0;background:none}
body[data-role] label.na-mark input{position:absolute;opacity:0;pointer-events:none}
body[data-role] label.na-mark span{width:40px;height:40px;box-sizing:border-box;display:grid;place-items:center;border:1px solid #e3e6f2;border-radius:13px;background:#f6f7fb;color:#6b7090;transition:background .2s,box-shadow .2s,color .2s}
body[data-role] label.na-mark input:checked+span{border-color:transparent;color:#fff}
body[data-role] label.mk-p input:checked+span{background:linear-gradient(150deg,#4ade80,#16a34a);box-shadow:0 6px 12px rgba(22,163,74,.32)}
body[data-role] label.mk-a input:checked+span{background:linear-gradient(150deg,#fb7185,#e11d48);box-shadow:0 6px 12px rgba(225,29,72,.3)}
body[data-role] label.mk-l input:checked+span{background:linear-gradient(150deg,#fcd34d,#d97706);box-shadow:0 6px 12px rgba(217,119,6,.3)}
body[data-role] label.na-mark input:focus-visible+span{outline:3px solid color-mix(in srgb,var(--app-to) 45%,white);outline-offset:2px}
body[data-role] .na-savebar{position:sticky;bottom:calc(74px + env(safe-area-inset-bottom));z-index:3;margin:14px -18px 0;padding:14px 18px 8px;background:linear-gradient(180deg,color-mix(in srgb,var(--app-bg) 0%,transparent),var(--app-bg) 35%)}
body[data-role] .na-save{width:100%;min-height:56px;border:0;border-radius:18px;display:flex;align-items:center;justify-content:center;gap:10px;background:linear-gradient(135deg,var(--app-from),var(--app-to));color:#fff;font-size:15px;font-weight:600;box-shadow:0 14px 28px var(--app-glow),inset 0 1px 0 rgba(255,255,255,.3);cursor:pointer;transition:transform .35s var(--app-ease),box-shadow .3s}
body[data-role] .na-save span{padding:3px 10px;border-radius:999px;background:rgba(255,255,255,.22);font-size:12px;font-weight:600}
body[data-role] .na-save.saved{background:linear-gradient(135deg,#22c55e,#15803d);box-shadow:0 14px 28px rgba(21,128,61,.38)}
body[data-role] .na-save:disabled{opacity:.5;cursor:not-allowed}
body[data-role] .na-more{display:block;margin:6px auto 0}
/* Entering marks: one card per student with a box per component. */
body[data-role] .nm-row{padding:12px;border-radius:20px;background:#fff;box-shadow:var(--app-shadow)}
body[data-role] .nm-who{display:flex;align-items:center;gap:10px;min-width:0}
body[data-role] .nm-who .ns-avatar{width:42px;height:42px;flex-basis:42px;border-radius:14px}
body[data-role] .nm-fields{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
body[data-role] .nm-field{flex:1 1 84px;display:flex;flex-direction:column;gap:4px;font-size:11px;font-weight:600;color:var(--app-muted)}
body[data-role] .nm-field input{box-sizing:border-box;width:100%;min-height:46px;padding:8px 10px;border:1.5px solid #e3e6f2;border-radius:14px;background:#f8f9fc;color:var(--app-ink);font:600 15px Poppins,"Segoe UI",sans-serif;text-align:center;font-variant-numeric:tabular-nums}
body[data-role] .nm-field input::placeholder{color:#b3b7cc;font-size:13px;font-weight:500}
body[data-role] .nm-field input:focus{border-color:var(--app-accent);background:#fff;box-shadow:0 0 0 4px color-mix(in srgb,var(--app-accent) 14%,transparent);outline:none}
body[data-role] .nm-row.one{display:flex;align-items:center;gap:10px}
body[data-role] .nm-row.one .nm-who{flex:1}
body[data-role] .nm-row.one .nm-fields{flex:0 0 92px;margin:0}

/* Quiz questions: options are large tappable cards. */
body[data-role] .nq-q{margin:0 0 12px;padding:16px;border-radius:22px;background:#fff;box-shadow:var(--app-shadow)}
body[data-role] .nq-q>small{display:block;margin-bottom:4px;font-size:11.5px;font-weight:600;color:var(--app-accent)}
body[data-role] .nq-q>b{display:block;margin-bottom:6px;font-size:14.5px;font-weight:600;line-height:1.5;overflow-wrap:anywhere}
body[data-role] .nq-opt{position:relative;display:flex;align-items:center;gap:12px;min-height:52px;margin-top:8px;padding:8px 12px;border:1.5px solid #e6e8f2;border-radius:16px;font-size:13.5px;line-height:1.4;cursor:pointer;transition:border-color .2s,background .2s}
body[data-role] .nq-opt input{position:absolute;opacity:0;pointer-events:none}
body[data-role] .nq-opt i{width:30px;height:30px;flex:0 0 30px;border-radius:10px;display:grid;place-items:center;background:#f1f3fb;color:var(--app-muted);font-size:12.5px;font-style:normal;font-weight:700;transition:background .2s,color .2s}
body[data-role] .nq-opt input:checked+i{background:linear-gradient(150deg,var(--app-to),var(--app-from));color:#fff}
body[data-role] .nq-opt:has(input:checked){border-color:var(--app-accent);background:var(--app-soft)}
body[data-role] .nq-opt input:focus-visible+i{outline:3px solid color-mix(in srgb,var(--app-to) 45%,white);outline-offset:2px}
body[data-role] .nq-timer{position:sticky;top:calc(84px + env(safe-area-inset-top));z-index:4;display:flex;align-items:center;justify-content:center;gap:8px;margin:0 0 12px;padding:10px 14px;border-radius:16px;background:#1b1f3b;color:#fff;font-size:13px;font-weight:600;box-shadow:0 10px 20px rgba(27,31,59,.2)}
body[data-role] .nq-timer:empty{display:none}

/* Sign-in: a welcome card with icons in the fields. */
body[data-role] .ns-auth{margin:0 0 14px;padding:22px 18px 8px;border-radius:26px;background:#fff;box-shadow:var(--app-shadow)}
body[data-role] .ns-auth>.ns-ic{width:58px;height:58px;flex-basis:58px;margin:0 0 14px;border-radius:19px}
body[data-role] .ns-auth>.ns-ic svg{width:27px;height:27px}
body[data-role] .ns-auth>h3{margin:0;font-size:19px;font-weight:600;letter-spacing:-.3px}
body[data-role] .ns-auth>p{margin:6px 0 18px;font-size:13px;line-height:1.6;color:var(--app-muted)}
body[data-role] .ns-auth .portal-message{margin:-6px 0 16px}
body[data-role] .ns-auth .portal-field input{padding-left:44px;background:#fff no-repeat 14px center/18px}
body[data-role] .ns-auth .portal-field input:is([name=school],[name=schoolCode]){background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa0bd' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 9 9-6 9 6v12H3Zm6 12v-7h6v7'/%3E%3C/svg%3E")}
body[data-role] .ns-auth .portal-field input[name=username]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa0bd' stroke-width='1.9' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21v-2a8 8 0 0 1 16 0v2'/%3E%3C/svg%3E")}
body[data-role] .ns-auth .portal-field input[name=password]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa0bd' stroke-width='1.9' stroke-linecap='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='3'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E")}
body[data-role] .ns-auth .portal-primary{width:100%;margin:6px 0 14px}

/* Smaller pieces: page-wide buttons, glass icons, stops, loading, homework submit drawer. */
body[data-role] .portal-view>:is(.portal-primary,.portal-secondary){width:100%;margin:4px 0 12px}
body[data-role] .ns-wide{width:100%}
body[data-role] .ns-ic.glass{background:rgba(255,255,255,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.3)}
body[data-role] .ns-sum .big.sm{font-size:21px;line-height:1.3;letter-spacing:-.3px}
body[data-role] .ns-item-main>small.clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body[data-role] .app-face>b{display:grid;place-items:center;width:100%;height:100%;border-radius:18px;background:#fff;color:var(--app-accent);font-size:22px;font-weight:700}
body[data-role] .ns-x-body .ns-dl{margin:6px 0 10px;padding:0;background:none;box-shadow:none}
body[data-role] .ns-x-body>.portal-secondary{width:100%}
body[data-role] .ns-form .ns-files{margin:-2px 0 14px}
body[data-role] .ns-stops{margin:0 0 14px;padding:8px 16px;border-radius:22px;background:#fff;box-shadow:var(--app-shadow);list-style:none}
body[data-role] .ns-stops li{position:relative;display:flex;align-items:center;gap:12px;min-height:46px;font-size:13.5px;color:#4a4f6e}
body[data-role] .ns-stops li::before{content:"";position:relative;z-index:1;width:10px;height:10px;flex:0 0 10px;border-radius:50%;border:3px solid color-mix(in srgb,var(--app-accent) 32%,white);background:#fff}
body[data-role] .ns-stops li:not(:last-child)::after{content:"";position:absolute;left:7px;top:31px;height:30px;width:2px;background:#e3e6f2}
body[data-role] .ns-stops li.me{font-weight:600;color:var(--app-ink)}
body[data-role] .ns-stops li.me::before{border-color:var(--app-accent);background:var(--app-accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--app-accent) 16%,transparent)}
body[data-role] .ns-stops li .ns-badge{margin-left:auto}
/* Loading skeletons (EduSuite.skeleton, app-shell.js): grey shapes where the content will appear, in
   place of "Loading…" text (kept for screen readers in .sk-label). The light sweep moves with
   transform only, so the phone's compositor runs it. .sk-glass is the version for the header. */
body[data-role] .sk{position:relative;display:block;overflow:hidden;border-radius:10px;background:#e8eaf2}
body[data-role] .sk::after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent 20%,rgba(255,255,255,.75) 50%,transparent 80%);transform:translateX(-100%);animation:skSweep 1.5s ease-in-out infinite}
body[data-role] .sk.sk-glass{background:rgba(255,255,255,.2)}
body[data-role] .sk.sk-glass::after{background:linear-gradient(100deg,transparent 20%,rgba(255,255,255,.32) 50%,transparent 80%)}
body[data-role] .sk-label{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
body[data-role] .sk-list{display:flex;flex-direction:column;gap:10px}
body[data-role] .sk-row{display:flex;align-items:center;gap:12px;padding:14px;border-radius:22px;background:#fff;box-shadow:var(--app-shadow)}
body[data-role] .sk-ic{width:44px;height:44px;flex:0 0 44px;border-radius:15px}
body[data-role] .sk-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:9px}
body[data-role] .sk-line{width:72%;height:12px;border-radius:6px}
body[data-role] .sk-line.sk-short{width:44%;height:10px}
body[data-role] .sk-row:nth-of-type(2n) .sk-line:not(.sk-short){width:58%}
body[data-role] .sk-row:nth-of-type(3n) .sk-short{width:32%}
body[data-role] .sk-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px 8px}
body[data-role] .sk-tile{display:flex;flex-direction:column;align-items:center;gap:8px;padding:4px 0}
body[data-role] .sk-tile-icon{width:58px;height:58px;border-radius:19px}
body[data-role] .sk-tile .sk-line{width:64%;height:10px;margin:3px 0}
body[data-role] .sk-heading{width:150px;height:16px;margin:4px 0 5px;border-radius:8px}
body[data-role] .ns-dl>.sk-list{padding:12px 0}
@keyframes skSweep{to{transform:translateX(100%)}}
@media (prefers-reduced-motion:reduce){body[data-role] .sk::after{animation:none;opacity:0}}
@media (max-width:360px){body[data-role] .sk-grid{gap:14px 4px}body[data-role] .sk-tile-icon{width:52px;height:52px;border-radius:17px}}
body[data-role] .ns-submit{margin-top:12px}
body[data-role] .ns-submit>summary{display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px;border-radius:14px;background:var(--app-soft);color:var(--app-accent);font-size:13.5px;font-weight:600;list-style:none;cursor:pointer;transition:transform .35s var(--app-ease)}
body[data-role] .ns-submit>summary::-webkit-details-marker{display:none}
body[data-role] .ns-submit>summary:active{transform:scale(.97);transition-duration:.1s}
body[data-role] .ns-submit[open]>summary{margin-bottom:14px;background:#f1f2f8;color:var(--app-muted)}
body[data-role] .ns-post .ns-submit form{margin:0}
body[data-role] .ns-submit .portal-primary{width:100%;margin-bottom:4px}
/* Cards added by personal-extensions.js (notifications, online fees, bus location). */
body[data-role] .ns-ext-head{display:flex;align-items:center;gap:12px;margin-bottom:12px}
body[data-role] .ns-ext-head b{display:block;font-size:14.5px;font-weight:600}
body[data-role] .ns-ext-head small{display:block;margin-top:2px;font-size:12px;line-height:1.45;color:var(--app-muted)}
body[data-role] .ns-ext iframe{display:block;border-radius:16px!important}
body[data-role] .ns-ext [data-extension-status]:empty{display:none}
/* Salary slips and the printable staff ID. */
body[data-role] .ns-slip-head{display:flex;align-items:center;gap:12px;margin-bottom:12px}
body[data-role] .ns-slip-head>div{flex:1;min-width:0}
body[data-role] .ns-slip-head b{display:block;font-size:15px;font-weight:600}
body[data-role] .ns-slip-head small{display:block;font-size:12px;color:var(--app-muted)}
body[data-role] .ns-slip-net{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:0 0 6px;padding:12px 14px;border-radius:16px;background:linear-gradient(150deg,#dcfce7,#bbf7d0);color:#14532d}
body[data-role] .ns-slip-net span{font-size:12.5px;font-weight:600}
body[data-role] .ns-slip-net b{font-size:20px;font-weight:700}
body[data-role] .ns-slip .portal-secondary{width:100%;margin-top:10px}
body[data-role] :is(.ns-form,.ns-slip) .ns-dl{margin:0 0 6px;padding:0;background:none;box-shadow:none}
body[data-role] .portal-card.ns-id-wrap{padding:0;background:none;box-shadow:none}
body[data-role] .ns-id-wrap>.portal-primary{width:100%}

/* Document viewer (receipts, ID card, admit card) as a bottom sheet. */
body[data-role] .portal-sheet.sheet-backdrop{z-index:50;background:rgba(15,18,40,.45);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
body[data-role] .portal-sheet .sheet{padding:10px 18px calc(18px + env(safe-area-inset-bottom));background:#fff;border-radius:28px 28px 0 0;box-shadow:0 -12px 40px rgba(15,18,40,.22);animation:appSheetUp .42s cubic-bezier(.2,.9,.24,1.04) both}
body[data-role] .portal-sheet .handle{width:42px;height:5px;margin:4px auto 14px;border-radius:3px;background:#d5d8e6}
body[data-role] .portal-sheet h2{margin:0 0 12px;font-size:17px;font-weight:600;letter-spacing:-.2px}
body[data-role] .portal-sheet .portal-document iframe{height:60dvh;border:0;border-radius:18px;background:#f6f7fb}
body[data-role] .portal-sheet .portal-actions{display:grid;grid-template-columns:1fr 1fr}
@keyframes appSheetUp{from{transform:translateY(100%)}}

/* Toasts (EduSuite.toast) float above the bottom bar. */
body[data-role] .toast-wrap{position:fixed;left:16px;right:16px;bottom:calc(88px + env(safe-area-inset-bottom));z-index:60;display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none}
body[data-role]:has(.na-savebar) .toast-wrap{bottom:calc(160px + env(safe-area-inset-bottom))}
body[data-role] .toast{display:flex;align-items:center;gap:10px;max-width:400px;padding:12px 16px;border-radius:16px;background:#1b1f3b;color:#fff;font:500 13.5px Poppins,"Segoe UI",sans-serif;box-shadow:0 14px 30px rgba(15,18,40,.28);animation:appToastIn .35s var(--app-ease) both}
body[data-role] .toast svg{width:20px;height:20px;flex:0 0 20px;color:#4ade80}
body[data-role] .toast.err svg{color:#fb7185}
@keyframes appToastIn{from{opacity:0;transform:translateY(12px) scale(.96)}}

/* Bottom navigation, docked to the bottom edge so nothing scrolls below it. */
body[data-role] .bottom-nav{left:0;right:0;bottom:0;width:100%;max-width:440px;margin:0 auto;min-height:66px;padding:4px 6px env(safe-area-inset-bottom);box-sizing:border-box;align-items:center;border:0;border-top:1px solid #e7e9f3;border-radius:24px 24px 0 0;background:rgba(255,255,255,.96);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);box-shadow:0 -10px 28px rgba(27,31,59,.08)}
body[data-role] .bottom-nav .nav-item{min-height:56px;gap:3px;font-size:10.5px;font-weight:500;color:#6b7090}
body[data-role] .bottom-nav .nav-item .nav-icon{width:46px;height:28px;border-radius:12px;transition:background .25s,transform .3s var(--app-ease)}
body[data-role] .bottom-nav .nav-item svg{width:21px;height:21px}
body[data-role] .bottom-nav .nav-item.active{color:var(--app-accent);font-weight:600}
body[data-role] .bottom-nav .nav-item.active .nav-icon{background:var(--app-soft)}

/* Touch feedback: controls press in and spring back. */
body[data-role] :is(.simple-card .tile-icon,.app-glass,.simple-notification,.portal-primary,.portal-secondary,.back-button){transition:transform .35s var(--app-ease),background-color .2s}
body[data-role] .simple-card:active .tile-icon{transform:scale(.88);transition-duration:.1s}
body[data-role] :is(.app-glass,.simple-notification,.portal-primary,.portal-secondary,.back-button):active{transform:scale(.95);transition-duration:.1s}
body[data-role] .bottom-nav .nav-item:active .nav-icon{transform:scale(.86)}
body[data-role] :is(.ns-card,.ns-call,.ns-action,.ns-chip,.ns-square,.na-day,.na-cal,.ns-step,button.ns-item,a.ns-item,.ns-menu-item,.ns-file,.nq-opt,.ns-link){transition:transform .35s var(--app-ease),background-color .2s,border-color .2s}
body[data-role] .ns-card:has(.ns-main:active){transform:scale(.98);transition-duration:.1s}
body[data-role] :is(.ns-call,.ns-action,.ns-chip,.ns-square,.na-day,.na-cal,.ns-step,.ns-file,.ns-link):active{transform:scale(.93);transition-duration:.1s}
body[data-role] :is(button.ns-item,a.ns-item,.nq-opt):active{transform:scale(.98);transition-duration:.1s}
body[data-role] .ns-menu-item:active{background:#f4f5fb;transform:scale(.98);transition-duration:.1s}
body[data-role] :is(.na-mark,.na-save):active,body[data-role] label.na-mark:active span{transform:scale(.92);transition-duration:.1s}
/* First home screen after the app opens (html.app-intro, set by app-shell.js): tiles rise in turn. */
html.app-intro body[data-role] .simple-grid .simple-card{animation:appRise .55s var(--app-ease) both}
html.app-intro body[data-role] .simple-grid .simple-card:nth-child(2){animation-delay:30ms}html.app-intro body[data-role] .simple-grid .simple-card:nth-child(3){animation-delay:60ms}html.app-intro body[data-role] .simple-grid .simple-card:nth-child(4){animation-delay:90ms}html.app-intro body[data-role] .simple-grid .simple-card:nth-child(5){animation-delay:120ms}html.app-intro body[data-role] .simple-grid .simple-card:nth-child(6){animation-delay:150ms}html.app-intro body[data-role] .simple-grid .simple-card:nth-child(7){animation-delay:180ms}html.app-intro body[data-role] .simple-grid .simple-card:nth-child(n+8){animation-delay:210ms}
@keyframes appRise{from{opacity:0;transform:translateY(14px)}}

/* Attendance summaries: the ring keeps its own width; the text column beside it takes the rest. */
body[data-role] .ns-sum-row>.ns-ring{flex:0 0 88px}
body[data-role] .ns-link svg{width:16px;height:16px;flex:0 0 16px}

/* Screen transitions are animated by EduSuite.appTransition (js/app-shell.js). */

@media (max-width:360px){body[data-role] .simple-grid{gap:14px 4px}body[data-role] .simple-card .tile-icon{width:52px;height:52px;border-radius:17px}}
@media (min-width:600px){body[data-role] .phone{max-width:440px;min-height:100dvh;margin:0 auto;border:0;border-radius:0}}
@media (prefers-reduced-motion:reduce){
  body[data-role] *,body[data-role] *::before,body[data-role] *::after{animation:none!important;transition:none!important}
}
