@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');
:root{--navy:#102b4b;--blue:#245a91;--orange:#ef9839;--bg:#f3f6fa;--surface:#fff;--ink:#172b44;--muted:#60718a;--line:#dce5ef;--green:#21876c;--shadow:0 12px 35px rgba(20,48,80,.07)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.6 Poppins,system-ui,sans-serif}body.dark{--bg:#101b2b;--surface:#192c42;--ink:#f2f6fb;--muted:#b5c4d5;--line:#38506b}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}.shell{min-height:100vh}.top{height:78px;background:var(--navy);color:white;display:flex;justify-content:space-between;align-items:center;padding:0 clamp(16px,4vw,50px)}.brand{display:flex;align-items:center;gap:13px;font-size:22px;font-weight:600;line-height:1.1}.brand b{color:#ffb35c}.brand small{display:block;font-size:10px;letter-spacing:.07em;color:#c9d9ed;margin-top:6px}.logo{display:grid;place-items:center;background:#28496b;border-radius:15px;width:48px;height:48px}.top-actions{display:flex;align-items:center;gap:10px}.chip{background:#294b6b;color:#fff;border-radius:30px;padding:6px 12px;font-size:11px}.icon-button{border:0;background:#294b6b;color:white;padding:8px 13px;border-radius:10px}.layout{max-width:1450px;margin:auto;display:grid;grid-template-columns:220px minmax(0,1fr);gap:28px;padding:28px}.sidebar{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:14px;align-self:start;position:sticky;top:20px;box-shadow:var(--shadow)}.sidebar a{display:block;padding:11px 14px;border-radius:11px;font-weight:500;margin:2px 0}.sidebar a:hover,.sidebar a.active{background:#e8f1fb;color:#174c80}.main{min-width:0}.heading{display:flex;justify-content:space-between;gap:15px;align-items:center;margin:0 0 20px}.heading h1{font-size:clamp(23px,3vw,32px);line-height:1.3;margin:2px 0 5px}.heading p{margin:0;color:var(--muted)}.eyebrow{font-size:10px!important;font-weight:700;letter-spacing:.15em;color:var(--orange)!important}.grid{display:grid;gap:16px}.two{grid-template-columns:repeat(2,minmax(0,1fr))}.three{grid-template-columns:repeat(3,minmax(0,1fr))}.four{grid-template-columns:repeat(4,minmax(0,1fr))}.panel{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:22px;box-shadow:var(--shadow);margin-bottom:16px}.panel h2{margin:0 0 13px;font-size:18px}.panel h3{margin:0 0 10px;font-size:15px}.muted,.hint{color:var(--muted)}.hint{font-size:12px}.stat{padding:20px;background:var(--surface);border:1px solid var(--line);border-radius:17px}.stat strong{font-size:29px;display:block;line-height:1.3}.stat span{color:var(--muted);font-size:12px}.hero{background:linear-gradient(115deg,#102b4b,#235785);border-radius:20px;color:#fff;padding:25px;display:flex;justify-content:space-between;gap:15px;align-items:center;margin-bottom:18px}.hero h2{font-size:25px;margin:3px 0}.hero p{margin:0;color:#d3e4f5}.btn{background:var(--orange);border:0;color:#1e2c3c;font-weight:700;padding:11px 17px;border-radius:11px;display:inline-flex;align-items:center;justify-content:center;gap:8px}.btn.secondary{background:#e9f0f7;color:#1c4a78}.btn.danger{background:#ffe3e1;color:#a72f29}.btn.small{padding:6px 11px;font-size:12px}.btn:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--orange);outline-offset:2px}.actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.list{list-style:none;margin:0;padding:0}.list li{padding:12px 0;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:10px}.list li:last-child{border-bottom:0}.tag{border-radius:8px;padding:4px 9px;background:#e8f0f8;color:#1d527c;font-size:11px;font-weight:600}.tag.warning{background:#fff0d7;color:#925900}.tag.ok{background:#dff5ea;color:#146d4c}label{display:block;font-weight:600;font-size:12px;margin:0 0 12px}input:not([type=checkbox]),select,textarea{width:100%;display:block;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:10px;padding:11px;margin-top:5px;min-height:42px}input[type=checkbox]{width:17px;height:17px;vertical-align:middle;accent-color:var(--green)}textarea{min-height:95px;resize:vertical}.table-wrap{overflow:auto}.schedule{border-collapse:separate;border-spacing:5px;width:100%;min-width:640px}.schedule th{font-size:12px;color:var(--muted);font-weight:600}.schedule td{min-width:86px}.schedule button{border:1px solid var(--line);background:var(--bg);color:var(--ink);border-radius:10px;width:100%;min-height:67px;padding:7px;font-size:12px;font-weight:600}.schedule button:hover{border-color:var(--orange)}.schedule .hour{font-size:12px;color:var(--muted);white-space:nowrap}.subject-pill{display:inline-block;padding:7px 10px;border-radius:9px;background:#e8eff8;color:#174c80;font-size:12px;margin:3px}.empty{padding:25px;text-align:center;color:var(--muted);background:var(--bg);border-radius:12px}.footer{text-align:center;color:var(--muted);font-size:11px;padding:20px}.bottom-nav{display:none}.notice{border-left:4px solid var(--orange);background:var(--surface);padding:12px 16px;border-radius:10px;margin:0 0 18px}.oktext{color:var(--green)}.error{color:#b64040}.flex-between{display:flex;justify-content:space-between;align-items:center;gap:10px}.progress{height:9px;background:var(--line);border-radius:20px;overflow:hidden}.progress span{display:block;height:100%;background:var(--green)}.color-dot{display:inline-block;width:11px;height:11px;border-radius:50%;margin-right:7px}.hide{display:none!important}@media(max-width:900px){.layout{grid-template-columns:1fr;padding:15px;gap:0}.sidebar{display:none}.bottom-nav{display:flex;position:fixed;bottom:0;left:0;right:0;background:var(--surface);border-top:1px solid var(--line);justify-content:space-around;z-index:5;padding:7px 4px max(8px,env(safe-area-inset-bottom))}.bottom-nav a{text-align:center;min-width:55px;font-size:23px;line-height:1.2}.bottom-nav small{display:block;font-size:10px}.main{padding-bottom:72px}.two,.three,.four{grid-template-columns:repeat(2,minmax(0,1fr))}.panel{padding:17px}.top{padding:0 15px;height:69px}.brand{font-size:18px}.chip{font-size:10px}.hero{padding:20px}}@media(max-width:530px){.two:not(.stats),.three{grid-template-columns:1fr}.hero h2{font-size:21px}.heading{align-items:flex-start}.stat strong{font-size:24px}}@media(prefers-reduced-motion:no-preference){.btn,.sidebar a{transition:transform .12s,background .15s}.btn:hover{transform:translateY(-1px)}}
/* FFY School Teen Edition */
:root{--navy:#0d1526;--blue:#168dff;--orange:#ffb443;--bg:#f4f7fd;--surface:#fff;--ink:#19243a;--muted:#6d7890;--line:#e5eaf3;--shadow:0 16px 40px rgba(13,29,56,.07)}
body{font-size:14px;letter-spacing:-.012em}body.dark{--bg:#080b13;--surface:#151923;--ink:#f7f8fc;--muted:#9aa5b7;--line:#2a3040;--shadow:0 15px 38px rgba(0,0,0,.2)}
.top{background:#101726}.brand{font-weight:800}.brand .logo{background:linear-gradient(140deg,#0da1ff,#13d9bc);border-radius:16px}.sidebar{background:var(--surface)}.sidebar a{border-radius:14px;font-weight:600}.sidebar a.active{background:rgba(0,145,255,.12);color:#078ce8}.panel,.stat{border-radius:23px;box-shadow:var(--shadow);border:1px solid var(--line)}.heading h1{font-weight:800;letter-spacing:-.05em}.eyebrow{color:#168dff;font-weight:800}.btn{border-radius:15px;font-weight:700}.btn:not(.secondary):not(.danger){background:#168dff;border-color:#168dff;color:white}.hero{border-radius:25px;background:linear-gradient(115deg,#096ed5,#11b5bf);position:relative;overflow:hidden}.teen-exit{display:inline-flex;align-items:center;padding:10px 14px;background:rgba(255,255,255,.2);border-radius:999px;color:white;font-weight:800}.teen-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px 0 12px}.teen-title h2{margin:0}.teen-title p{margin:4px 0}.teen-grade-hero{display:flex;justify-content:space-between;align-items:center;padding:24px;border-radius:25px;color:white;background:linear-gradient(115deg,#087ee8,#05b4b0);box-shadow:0 18px 35px rgba(0,128,219,.2)}.teen-grade-hero div{display:flex;flex-direction:column}.teen-grade-hero small{font-size:13px;font-weight:600}.teen-grade-hero strong{font-size:52px;line-height:1.25;letter-spacing:-.07em}.teen-grade-hero span{opacity:.9}.teen-grade-emoji{font-size:58px}.teen-subject-grid,.teen-teacher-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}.teen-subject-card{display:flex;align-items:center;gap:12px;border:2px solid var(--subject);border-radius:20px;background:var(--surface);padding:16px;min-width:0}.teen-dot{width:14px;height:14px;border-radius:50%;background:var(--subject);flex-shrink:0}.teen-subject-card div{display:flex;flex:1;flex-direction:column;min-width:0}.teen-subject-card strong{overflow-wrap:anywhere}.teen-subject-card small,.teen-grade-row small,.teen-teacher-card small{color:var(--muted)}.teen-subject-card b{font-size:24px;white-space:nowrap}.teen-grade-list{display:grid;gap:10px}.teen-grade-row{display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line);padding:10px 0}.teen-grade-row>div{display:flex;flex:1;flex-direction:column;min-width:0}.teen-grade-chip{border:2px solid var(--subject);color:var(--ink);font-size:20px;font-weight:800;min-width:58px;text-align:center;border-radius:14px;padding:8px}.teen-bell-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:10px}.teen-bell-item{border:1px solid var(--line);background:var(--bg);padding:13px;border-radius:16px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.teen-bell-item small{width:100%;color:var(--muted);padding-left:36px}.teen-num{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#22c76b;color:#051a0e;font-weight:800}.teen-bell-row{display:flex;gap:12px;align-items:end;padding:10px 0;border-bottom:1px solid var(--line)}.teen-bell-row label{flex:1}.teen-bell-row strong{min-width:55px;padding-bottom:10px}.teen-teacher-card{display:flex;gap:12px;align-items:start;flex-wrap:wrap;border:1px solid var(--line);border-radius:18px;padding:14px}.teen-teacher-card>div:nth-child(2){flex:1;min-width:130px}.teen-teacher-card strong,.teen-teacher-card small{display:block}.teen-teacher-card p{margin:4px 0;color:var(--muted);overflow-wrap:anywhere}.teen-avatar{font-size:27px}.bottom-nav{background:var(--surface);border:1px solid var(--line);border-radius:24px}.bottom-nav a{font-weight:700}.bottom-nav a.active{color:#168dff}.schedule td button{border-radius:12px}.schedule{border-collapse:separate;border-spacing:4px}.schedule th,.schedule td{min-width:85px}.subject-pill{border-radius:999px}
@media(max-width:760px){.main{padding:20px 14px 100px}.heading h1{font-size:27px}.panel{padding:17px}.teen-grade-hero{padding:18px}.teen-grade-hero strong{font-size:44px}.teen-subject-grid{grid-template-columns:1fr 1fr}.teen-subject-card{padding:12px;flex-wrap:wrap}.teen-subject-card b{font-size:22px}.teen-subject-card div{flex-basis:60%}.teen-bell-grid{grid-template-columns:1fr 1fr}.teen-bell-item{padding:10px}.teen-bell-item strong{font-size:12px}.teen-title{align-items:start}.teen-title .btn{white-space:normal}.teen-bell-row{flex-wrap:wrap}.bottom-nav{left:10px;right:10px;bottom:9px}.bottom-nav a{font-size:20px}.bottom-nav small{font-size:10px}}
@media(max-width:420px){.teen-subject-grid,.teen-bell-grid{grid-template-columns:1fr}.teen-subject-card{flex-wrap:nowrap}}

/* Altro: focused sections */
.ffy-section-panel[hidden],.ffy-settings-menu[hidden],.ffy-settings-back[hidden]{display:none!important}
.ffy-settings-menu{background:#fff;border:1px solid #e4e9f2;border-radius:22px;padding:24px;margin-bottom:16px}
.ffy-settings-menu h2{margin:0 0 6px}
.ffy-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}
.ffy-settings-tile{display:flex;align-items:center;gap:14px;text-align:left;border:1px solid #e5eaf3;border-radius:18px;background:#f8faff;padding:18px;cursor:pointer;color:#17253e;font:inherit;min-width:0}
.ffy-settings-tile:hover,.ffy-settings-tile:focus-visible{background:#eaf6ff;border-color:#1597ed}
.ffy-settings-tile strong,.ffy-settings-tile small{display:block}.ffy-settings-tile small{color:#69768a;font-size:12px;margin-top:4px}
.ffy-settings-icon{font-size:27px}.ffy-settings-arrow{margin-left:auto;font-size:24px;color:#1597ed}.ffy-settings-back{margin-bottom:16px}
@media(max-width:650px){.ffy-settings-grid{grid-template-columns:1fr}.ffy-settings-menu{padding:16px}.ffy-settings-tile{padding:15px}}

/* FFY School: Altro - dark mode contrast fix */
body.dark .ffy-settings-menu{background:var(--surface);border-color:var(--line);color:var(--ink);box-shadow:var(--shadow)}
body.dark .ffy-settings-menu h2,body.dark .ffy-settings-tile strong{color:var(--ink)}
body.dark .ffy-settings-menu p,body.dark .ffy-settings-tile small{color:var(--muted)}
body.dark .ffy-settings-tile{background:#1c2330;border-color:#333d50;color:var(--ink)}
body.dark .ffy-settings-tile:hover,body.dark .ffy-settings-tile:focus-visible{background:#20364c;border-color:#28a4ff;outline-offset:2px}
body.dark .ffy-settings-arrow{color:#39b8ff}


/* FFY School • vivid mobile redesign • 2026 */
:root{
 --navy:#080d19;--blue:#278eff;--orange:#ffb13d;
 --bg:#f0f4fb;--surface:#fff;--ink:#172239;--muted:#68768c;
 --line:#e1e8f2;--shadow:0 14px 35px rgba(20,40,80,.065);
 --glow:rgba(39,142,255,.18);
}
body.dark{
 --bg:#080a11;--surface:#171b24;--ink:#f5f7ff;
 --muted:#a2acbd;--line:#303747;--shadow:0 16px 40px rgba(0,0,0,.26);
 --glow:rgba(39,142,255,.23);
}
body{font-size:14px;line-height:1.55;letter-spacing:-.015em}
.top{background:#0c1220;border-bottom:1px solid rgba(255,255,255,.08);height:76px}
.brand{letter-spacing:-.04em}.brand b{color:#ffb454}
.logo{box-shadow:0 8px 24px rgba(0,185,210,.2)}
.layout{max-width:1480px;gap:25px}
.sidebar{border-radius:25px;padding:13px}
.sidebar a{padding:12px 15px;border-radius:14px}
.sidebar a:hover,.sidebar a.active{background:rgba(39,142,255,.15);color:#248ffb}
.heading{margin-bottom:23px}
.heading h1{font-size:clamp(27px,3vw,38px);letter-spacing:-.06em;line-height:1.18}
.heading .eyebrow{color:#278eff!important}
.panel,.stat{border-radius:23px;border:1px solid var(--line);background:var(--surface);box-shadow:var(--shadow)}
.panel{padding:23px}.panel h2{font-size:20px;letter-spacing:-.035em}
.stat{position:relative;overflow:hidden}.stat:before{content:"";position:absolute;left:0;top:0;right:0;height:3px;background:linear-gradient(90deg,#2a95ff,#00d5b7)}
.stat strong{font-size:33px}
.btn{border-radius:13px;min-height:40px}
.btn:not(.secondary):not(.danger){background:#258dff;border-color:#258dff}
input,select,textarea{background:var(--surface);color:var(--ink);border-color:var(--line)}
input:focus,select:focus,textarea:focus{outline:2px solid #278eff;outline-offset:1px}
.hero{background:linear-gradient(115deg,#1253bc,#168efb 58%,#06b9b0);border-radius:27px;box-shadow:0 18px 35px rgba(12,104,218,.17)}
.hero:after{content:"✦";font-size:115px;position:absolute;right:6%;top:-44px;color:rgba(255,255,255,.1);pointer-events:none}
.teen-grade-hero{background:linear-gradient(110deg,#1557cb,#208bff 70%,#00c6bb)}
.teen-subject-card{border:1px solid var(--line);border-left:5px solid var(--subject);border-radius:17px;background:var(--surface);transition:transform .15s,border-color .15s}
.teen-subject-card:hover{transform:translateY(-2px);border-color:var(--subject)}
.teen-grade-chip{background:color-mix(in srgb,var(--subject) 14%,var(--surface));border:1px solid var(--subject)}
.teen-teacher-card{background:var(--surface)}
.ffy-settings-menu{background:var(--surface);border-color:var(--line);color:var(--ink)}
.ffy-settings-menu h2{color:var(--ink)}
.ffy-settings-tile{background:var(--bg);border-color:var(--line);color:var(--ink)}
.ffy-settings-tile strong{color:var(--ink)}
.ffy-settings-tile small{color:var(--muted)}
.ffy-settings-tile:hover{background:var(--glow)}
body.dark .ffy-settings-tile{background:#202634;border-color:#353d50}
body.dark .ffy-settings-tile:hover{background:#263b55}
body.dark .panel,body.dark .stat{background:#171b24;color:#f5f7ff}
body.dark .sidebar{background:#151923}
body.dark .teen-bell-item{background:#202633}
body.dark .teen-teacher-card{background:#1b202b}
body.dark .schedule td,body.dark .schedule th{border-color:#343d50}
body.dark .schedule td button{color:var(--ink)}
/* Bright timetable cells, inspired by the user's colored school schedule */
.schedule td button{border:1px solid var(--line);border-left:4px solid #2c94ff;border-radius:13px;min-height:54px;transition:transform .15s}
.schedule td button:hover{transform:translateY(-2px)}
.schedule tbody tr:nth-child(7n+1) td button{border-left-color:#ff456a}
.schedule tbody tr:nth-child(7n+2) td button{border-left-color:#ff9635}
.schedule tbody tr:nth-child(7n+3) td button{border-left-color:#f0c83d}
.schedule tbody tr:nth-child(7n+4) td button{border-left-color:#24c88c}
.schedule tbody tr:nth-child(7n+5) td button{border-left-color:#35a5ee}
.schedule tbody tr:nth-child(7n+6) td button{border-left-color:#597ee8}
.schedule tbody tr:nth-child(7n+7) td button{border-left-color:#ba63d9}
.bottom-nav{background:#111a2a;color:#dce8ff;border:1px solid #34445b;box-shadow:0 8px 35px rgba(0,0,0,.22)}
.bottom-nav a{color:#b7c8e1}.bottom-nav a.active{color:#49a7ff;background:rgba(45,146,255,.14)}
@media(max-width:760px){
 .top{height:66px;padding:0 13px}.brand{font-size:19px}.brand small{font-size:9px}
 .logo{width:42px;height:42px;border-radius:13px}
 .chip{font-size:10px;padding:6px 9px}.top-actions{gap:6px}
 .icon-button{padding:7px 9px}
 .main{padding:19px 13px 108px}
 .heading{margin-bottom:16px}.heading h1{font-size:30px}
 .heading p{font-size:12px}
 .panel{padding:17px;border-radius:20px}
 .hero{padding:20px;border-radius:22px}
 .teen-subject-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .teen-subject-card{border-left-width:4px;gap:9px}
 .bottom-nav{bottom:8px;left:8px;right:8px;border-radius:23px;padding-bottom:env(safe-area-inset-bottom)}
 .bottom-nav a{min-width:0}
 .ffy-settings-menu{padding:16px;border-radius:20px}
 .ffy-settings-tile{border-radius:15px}
}
@media(max-width:390px){.teen-subject-grid{grid-template-columns:1fr}.brand small{display:none}}