:root{--ink:#11172a;--muted:#687087;--line:#e5e9f2;--paper:#f5f7fb;--card:#fff;--navy:#121a34;--blue:#4967ea;--blue-soft:#edf0ff;--red:#d94b57;--amber:#c88415;--shadow:0 18px 50px rgba(23,34,68,.08);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--paper);font-size:16px}*{box-sizing:border-box}body{margin:0;background:var(--paper);min-height:100vh}a{color:inherit;text-decoration:none}button,input{font:inherit}.app-shell{min-height:100vh}.topbar{height:72px;background:var(--navy);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 max(24px,calc((100vw - 1280px)/2));position:sticky;top:0;z-index:10}.brand{display:flex;align-items:center;gap:10px;font-weight:750;font-size:1.15rem}.brand-mark{width:48px;height:48px;border-radius:15px;background:linear-gradient(145deg,#7890ff,#4561dc);color:#fff;display:grid;place-items:center;font-family:Georgia,serif;font-size:1.75rem;box-shadow:0 12px 30px rgba(73,103,234,.3)}.brand-mark.small{width:34px;height:34px;border-radius:10px;font-size:1.2rem}.top-actions{display:flex;align-items:center;gap:12px}.icon-button{width:38px;height:38px;display:grid;place-items:center;background:#ffffff12;border:1px solid #ffffff18;border-radius:11px}.sync-state{font-size:.82rem;color:#ccd3e8;display:flex;align-items:center;gap:7px}.sync-state i{width:7px;height:7px;background:#67d49b;border-radius:50%}.sync-state.error i,.sync-state.blocked i{background:#ef7b85}.content{max-width:1280px;margin:0 auto;padding:36px 24px 64px}.child-tabs{display:flex;gap:8px;margin-bottom:32px;overflow:auto;padding-bottom:2px}.child-tab{display:flex;align-items:center;gap:9px;padding:8px 14px 8px 8px;border-radius:999px;color:var(--muted);font-weight:650;white-space:nowrap}.child-tab span{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#e6eaf4;color:#39415b}.child-tab.active{background:var(--navy);color:#fff}.child-tab.active span{background:#fff;color:var(--navy)}.welcome-row{display:flex;justify-content:space-between;align-items:end;margin-bottom:28px}.eyebrow{font-size:.72rem;letter-spacing:.15em;font-weight:800;color:#7b849c;margin:0 0 7px;text-transform:uppercase}.welcome-row h1,.settings h1{font-family:Georgia,"Times New Roman",serif;font-size:clamp(2.5rem,5vw,4.6rem);font-weight:500;letter-spacing:-.045em;margin:0;line-height:.95}.muted{color:var(--muted);line-height:1.55}.dashboard-grid{display:grid;grid-template-columns:1.08fr .92fr;gap:18px}.panel{background:var(--card);border:1px solid var(--line);border-radius:24px;padding:24px;box-shadow:var(--shadow)}.panel-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:20px}.panel h2{font-size:1.28rem;margin:0}.date-chip,.count{background:var(--blue-soft);color:var(--blue);border-radius:999px;padding:7px 11px;font-weight:750;font-size:.82rem}.timeline{display:grid;gap:2px}.lesson{display:grid;grid-template-columns:50px 10px 1fr;gap:13px;align-items:start;padding:11px 0}.lesson time{font-weight:750;font-size:.9rem}.lesson>i{width:4px;height:42px;border-radius:8px;background:var(--course);justify-self:center}.lesson strong{font-size:.96rem}.lesson p,.task p,.grade-list p,.update-list p{margin:4px 0 0;color:var(--muted);font-size:.82rem}.lesson.cancelled{opacity:.55}.lesson.cancelled strong{text-decoration:line-through}.badge{display:inline-flex;margin-top:6px;font-size:.7rem;font-weight:800;border-radius:999px;padding:4px 7px}.badge.red{color:#a82734;background:#ffe8ea}.badge.amber{color:#8a580d;background:#fff0d2;margin:0}.task-list{display:grid}.task{display:grid;grid-template-columns:42px 1fr;gap:14px;padding:14px 0;border-top:1px solid var(--line)}.task:first-child{border-top:0;padding-top:0}.task-date{border-radius:12px;background:#f1f3f8;min-height:44px;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1}.task-date strong{font-size:1rem}.task-date span{font-size:.65rem;color:var(--muted);margin-top:4px}.task-title{display:flex;gap:8px;align-items:center;justify-content:space-between}.homework-content{font-size:.84rem;color:var(--muted);line-height:1.4;margin-top:4px}.homework-content p{margin:0}.task.done{opacity:.48}.task.done .task-title strong{text-decoration:line-through}.grade-list,.update-list{display:grid}.grade-list article,.update-list article{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-top:1px solid var(--line)}.grade-list article:first-child,.update-list article:first-child{border-top:0}.grade{display:flex;align-items:baseline;color:var(--blue)}.grade strong{font-size:1.35rem}.grade span{font-size:.76rem}.average{text-align:right}.average strong{font-family:Georgia,serif;font-size:1.7rem;display:block}.average span{font-size:.68rem;color:var(--muted)}.update-list article{justify-content:flex-start;gap:12px}.update-icon{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;font-weight:850;font-size:.74rem;background:#eef1f8;color:#59627a}.update-icon.note{background:#e8f7ef;color:#258354}.update-icon.devoir{background:#fff2df;color:#9b620b}.mini-empty{color:var(--muted);padding:28px 0;text-align:center}.alert{border-radius:18px;padding:18px;margin-bottom:24px}.alert.danger{background:#fff0f1;color:#9f2b36}.qcm-card{background:#fff8e8;border:1px solid #f4dba4}.qcm-card p{margin:.3rem 0;color:#7c673d}.qcm-form{margin-top:18px}.qcm-form fieldset{border:0;padding:0;margin:0 0 14px}.qcm-form legend{font-weight:750;margin-bottom:10px}.answer{display:inline-flex;margin:0 8px 8px 0}.answer input{position:absolute;opacity:0}.answer span{display:block;padding:9px 12px;border-radius:10px;background:#fff;border:1px solid #e6d8bb}.answer input:checked+span{background:var(--navy);color:#fff;border-color:var(--navy)}.auth-shell{min-height:100vh;display:grid;place-items:center;padding:28px;background:radial-gradient(circle at 20% 10%,#26365f 0,transparent 32%),var(--navy)}.auth-card{width:min(440px,100%);background:#fff;padding:38px;border-radius:28px;box-shadow:0 30px 90px #0005}.auth-card.wide{width:min(540px,100%)}.auth-card h1{font-family:Georgia,serif;font-size:2.7rem;font-weight:500;letter-spacing:-.04em;margin:18px 0 4px}.form-stack{display:grid;gap:15px;margin-top:24px}.form-stack.narrow{max-width:520px}.form-stack label{display:grid;gap:7px;font-size:.84rem;font-weight:700;color:#40485e}.form-stack input{width:100%;border:1px solid #d9deea;border-radius:12px;padding:13px 14px;background:#fbfcfe;outline:none}.form-stack input:focus{border-color:var(--blue);box-shadow:0 0 0 3px #4967ea18}.primary,.secondary,.danger-button{border:0;border-radius:12px;padding:13px 17px;font-weight:750;cursor:pointer}.primary{background:var(--blue);color:#fff}.secondary{background:#fff;border:1px solid var(--line);color:var(--ink)}.compact{padding:9px 13px;font-size:.84rem}.danger-button{background:#fff0f1;color:#b0333f}.divider{height:1px;background:var(--line);position:relative;margin:12px 0}.divider span{position:absolute;left:12px;top:50%;transform:translateY(-50%);background:#fff;padding:0 8px;color:var(--muted);font-size:.74rem}.empty-state{text-align:center;padding:80px 24px}.empty-icon{width:64px;height:64px;border-radius:20px;background:var(--blue-soft);color:var(--blue);display:grid;place-items:center;margin:0 auto 18px;font-size:1.8rem}.settings{max-width:900px}.settings>h1{margin-bottom:32px}.settings .panel{margin-bottom:18px}.settings .panel p{line-height:1.6}.settings .panel h2{margin-bottom:8px}
@media(max-width:820px){.topbar{padding:0 16px}.sync-state{display:none}.content{padding:24px 14px 48px}.dashboard-grid{grid-template-columns:1fr}.welcome-row{align-items:center}.welcome-row h1{font-size:3rem}.panel{border-radius:20px;padding:19px}.schedule-panel{order:1}.homework-panel{order:2}.updates-panel{order:3}.grade-panel{order:4}.auth-card{padding:28px 22px}.child-tabs{margin-bottom:24px}}
@media(max-width:480px){.welcome-row .secondary{font-size:0;width:44px;height:44px;padding:0}.welcome-row .secondary:first-letter{font-size:1.2rem}.lesson{grid-template-columns:45px 8px 1fr}.panel h2{font-size:1.13rem}}
.sync-progress{display:flex;align-items:center;justify-content:center;gap:9px;margin-top:13px;color:var(--muted);font-size:.84rem;font-weight:650}.sync-progress[hidden]{display:none}.sync-progress.align-right{justify-content:flex-end}.sync-progress[data-state="success"]{color:#258354}.sync-progress[data-state="qcm"]{color:#9b620b}.sync-progress[data-state="error"]{color:#b0333f;max-width:460px}.sync-spinner{width:15px;height:15px;border:2px solid #cbd2e5;border-top-color:var(--blue);border-radius:50%;animation:sync-spin .7s linear infinite}button:disabled{cursor:wait;opacity:.68}@keyframes sync-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.sync-spinner{animation-duration:1.4s}}
.panel-note{margin:7px 0 0;color:var(--muted);font-size:.82rem}.carousel{outline:none}.carousel:focus-visible{border-radius:18px;box-shadow:0 0 0 3px #4967ea22}.carousel-controls{display:flex;align-items:center;justify-content:flex-end;gap:9px;margin:-3px 0 14px}.carousel-arrow{width:38px;height:38px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font-size:1.5rem;line-height:1;cursor:pointer}.carousel-arrow:hover:not(:disabled){border-color:#aeb9e9;background:var(--blue-soft)}.carousel-arrow:disabled{cursor:default;opacity:.35}.carousel-count{min-width:48px;text-align:center;color:var(--muted);font-size:.82rem;font-weight:750}.carousel-slide[hidden]{display:none}.day-heading{display:flex;justify-content:space-between;align-items:center;padding:2px 0 17px;border-bottom:1px solid var(--line)}.day-heading h3{font-family:Georgia,"Times New Roman",serif;font-size:1.65rem;font-weight:500;letter-spacing:-.025em;line-height:1.1;margin:0}.day-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:16px 0 10px}.day-summary div{background:#f4f6fb;border:1px solid #edf0f6;border-radius:14px;padding:11px 9px;text-align:center}.day-summary span{display:block;color:var(--muted);font-size:.72rem;line-height:1.2}.day-summary strong{display:block;margin-top:5px;font-size:1.12rem}.homework-day{margin-bottom:2px}.task.grouped{grid-template-columns:5px 1fr;gap:14px}.task-color{display:block;width:5px;min-height:44px;border-radius:999px;background:var(--course)}.homework-content{font-size:.9rem;line-height:1.55}.homework-content a{color:var(--blue);text-decoration:underline;text-underline-offset:2px}.homework-content ul,.homework-content ol{padding-left:20px}.homework-content li+li{margin-top:5px}
@media(max-width:560px){.day-summary{grid-template-columns:repeat(2,1fr)}.day-heading h3{font-size:1.4rem}.carousel-controls{justify-content:space-between}.task.grouped{gap:11px}.panel-note{font-size:.78rem}}
