/* Farsino's existing warm paper, green ink and terracotta palette. */
.modern-dashboard{--dash-ink:#173333;--dash-muted:#667372;--dash-line:#ded6c8;--dash-paper:#f8f0e2;color:var(--dash-ink);margin:0;min-width:0}
.modern-dashboard *{box-sizing:border-box}.modern-dashboard [hidden]{display:none!important}
.dashboard-frame{display:grid;grid-template-columns:228px minmax(0,1fr);gap:28px;align-items:start}
.dashboard-sidebar{position:sticky;top:96px;display:grid;gap:20px;max-height:calc(100dvh - 116px);overflow:auto;padding:18px 12px;border:1px solid var(--dash-line);border-radius:18px;background:var(--dash-paper)}
.dashboard-sidebar-caption{font-size:.75rem;font-weight:700;margin:0 12px;color:var(--dash-muted)}
.modern-dashboard .dashboard-navigation{position:static;top:auto;display:grid;gap:5px;padding:0;margin:0;border:0;border-radius:0;box-shadow:none;background:none;backdrop-filter:none}
.dashboard-navigation .teacher-nav-tabs{display:grid;gap:5px;grid-template-columns:1fr}
.modern-dashboard .dashboard-navigation button{display:flex;align-items:center;justify-content:flex-start;gap:12px;width:100%;min-height:48px;padding:11px 13px;text-align:start;white-space:normal;border:0;border-radius:10px;background:transparent;color:var(--dash-muted);font-size:.88rem;font-weight:600;box-shadow:none;transform:none}
.modern-dashboard .dashboard-navigation button:hover{background:#e8f2ed;color:var(--dash-ink);transform:none;box-shadow:none}
.modern-dashboard .dashboard-navigation button[aria-pressed=true]{background:var(--dash-ink);color:#fff;box-shadow:none}
.dashboard-navigation svg{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.dashboard-identity{padding:16px 12px 0;border-top:1px solid var(--dash-line);font-size:.85rem}
.dashboard-content{display:grid;gap:22px;min-width:0;align-content:start}
.dashboard-content>.teaching-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:16px;row-gap:3px;margin:0;padding-block:4px 14px;border-bottom:1px solid var(--dash-line)}
.dashboard-context{grid-column:1/-1;color:var(--dash-muted);font-size:.8rem}
.modern-dashboard .teaching-heading h1{font-size:clamp(1.4rem,2.2vw,1.8rem);font-weight:800;line-height:1.6;margin:0}
.modern-dashboard .teaching-heading h2{font-size:1.15rem}.modern-dashboard h2{font-size:1.2rem;line-height:1.6}.modern-dashboard h3{font-size:1rem;line-height:1.7}.modern-dashboard p{line-height:1.8}
.modern-dashboard .account-status:empty{display:none}
.modern-dashboard .account-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:9px 15px;border:1px solid #b8cfc3;border-radius:9px;background:var(--dash-paper);color:var(--dash-ink);font-size:.87rem;font-weight:600;line-height:1.5;text-decoration:none;box-shadow:none;transition:background .15s,border-color .15s}
.modern-dashboard .account-button.primary,.modern-dashboard .account-button[aria-pressed=true]{background:var(--dash-ink);color:#fff;border-color:var(--dash-ink)}
.modern-dashboard .account-button:hover:not(:disabled){background:#e8f2ed;border-color:#667372;transform:none}.modern-dashboard .account-button.primary:hover:not(:disabled){background:var(--dash-ink);filter:brightness(.95)}
.modern-dashboard button:disabled{opacity:.55;cursor:wait}.modern-dashboard :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #b94f35;outline-offset:3px}
.modern-dashboard :is(input:not([type=checkbox]):not([type=radio]),select,textarea){width:100%;min-height:46px;padding:11px 13px;border:1px solid #b8cfc3;border-radius:9px;color:var(--dash-ink);background:#f8f0e2;font:inherit;font-size:.95rem;box-shadow:none}
.modern-dashboard textarea{min-height:130px;resize:vertical}.modern-dashboard :is(input[type=checkbox],input[type=radio]){width:20px;height:20px;accent-color:var(--dash-ink);flex:none}
.modern-dashboard .teaching-field{gap:7px;font-size:.84rem;font-weight:600}.modern-dashboard .teaching-form{gap:20px;max-width:780px}.modern-dashboard .teaching-editor{padding:22px;border:1px solid var(--dash-line);background:var(--dash-paper);border-radius:14px}.modern-dashboard fieldset{padding:16px;border:1px solid var(--dash-line);border-radius:10px;min-width:0}
.modern-dashboard .teacher-quick-select{padding:15px 18px;border:1px solid var(--dash-line);border-radius:12px;background:#f4efe5;margin:0;grid-template-columns:repeat(2,minmax(0,1fr))}
.modern-dashboard :is(.admin-card,.teacher-learner-card,.teaching-assignment,.teacher-activity-row,.profile-lesson-card){border:1px solid var(--dash-line);border-radius:13px;padding:18px;background:var(--dash-paper);box-shadow:none}
.modern-dashboard .teacher-activity{border:0;border-radius:0;padding:0;background:transparent;box-shadow:none}
.modern-dashboard .teacher-activity-list{display:grid;gap:12px}.modern-dashboard .teacher-activity>.account-note:last-child{font-size:.75rem}
.modern-dashboard .account-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0}
.modern-dashboard .admin-grid,.dashboard-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:14px;margin:0}
.dashboard-stat{padding:18px;border:1px solid var(--dash-line);border-radius:13px;background:var(--dash-paper)}.dashboard-stat strong{display:block;font-size:1.8rem;line-height:1.4}.dashboard-stat span{font-size:.82rem;color:var(--dash-muted)}
.dashboard-stat[data-overview-shortcut]{cursor:pointer;text-align:start;font:inherit;color:inherit;min-width:0}.dashboard-stat[data-overview-shortcut]:hover{border-color:currentColor}.dashboard-stat[data-overview-shortcut]:focus-visible{outline:2px solid currentColor;outline-offset:3px}
.dashboard-welcome,.dashboard-next,.dashboard-empty{padding:24px;border:1px solid var(--dash-line);border-radius:14px;background:var(--dash-paper)}.dashboard-welcome h2,.dashboard-next h2,.dashboard-empty h2{margin:0 0 8px}.dashboard-welcome p,.dashboard-next p,.dashboard-empty p{margin:5px 0 18px;max-width:60ch}
.dashboard-next{border-inline-start:4px solid #b94f35}.dashboard-empty{border-style:dashed}.dashboard-quick-actions{display:flex;gap:10px;flex-wrap:wrap}
.modern-dashboard .teacher-learners{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr))}.modern-dashboard .teacher-learners>h2{grid-column:1/-1}.modern-dashboard .teacher-learner-card{display:grid;gap:10px;align-content:start}.modern-dashboard .teacher-learner-card>p{margin:2px 0}.modern-dashboard .learner-progress-details{margin:5px 0;padding:12px;background:#f4efe5;border-radius:9px}.modern-dashboard summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:8px;line-height:1.6}
.modern-dashboard .profile-lesson-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.modern-dashboard .profile-lesson-card{display:grid;gap:10px}.modern-dashboard .profile-lesson-card p{margin:0}.modern-dashboard .profile-lesson-card .account-note{font-size:.83rem}.modern-dashboard .profile-lessons>.teaching-field{max-width:380px;margin-block:12px}.modern-dashboard .profile-lessons>h2{margin-bottom:10px}
.modern-dashboard .teaching-layout{gap:18px;grid-template-columns:minmax(190px,.65fr) minmax(0,2fr)}.modern-dashboard .teaching-class-list{padding:12px;border-radius:12px;background:var(--dash-paper);max-height:430px;overflow:auto}.modern-dashboard .teaching-tabs{gap:8px;display:flex;flex-wrap:wrap}.modern-dashboard .teaching-tabs button{margin:0}
.modern-dashboard .admin-card>strong:first-child{font-size:1.75rem}.modern-dashboard .admin-card .account-button{margin:0}.modern-dashboard .admin-card p{margin:8px 0}.modern-dashboard .admin-grid .admin-card{display:grid;gap:6px;align-content:start}.modern-dashboard .admin-grid .admin-card h3{margin:0}
.modern-dashboard .dashboard-subnavigation{position:static!important;top:auto;display:grid;gap:12px;padding:0;margin:0;border:0;box-shadow:none;background:none}.dashboard-subnavigation .teacher-nav-tabs{display:flex;flex-wrap:wrap;gap:7px}.dashboard-subnavigation .teacher-nav-tabs button{flex:1 1 120px}.dashboard-embedded .dashboard-content>.teaching-heading{padding-top:0}
.dashboard-mobilebar,.dashboard-backdrop{display:none}
.classroom-active .account-layout{grid-template-columns:minmax(0,1fr)!important}.classroom-active .account-card{padding:22px!important;background:transparent;border:0;box-shadow:none}.classroom-active .account-intro{display:none!important}.classroom-active .account-view{padding-block:24px!important}
body:has(#account.classroom-active.active) .pk-launcher{display:none}
/* Demo is a compact switcher around the same production panels. */
#demo-app{max-width:1400px;padding:18px 28px}.demo-top{min-height:56px;margin-bottom:12px}.demo-brand{min-height:44px;display:flex;align-items:center}.demo-banner{display:none}.demo-roles{display:flex;gap:6px;padding:5px;border:1px solid #ded6c8;border-radius:12px;background:#f8f0e2;max-width:650px;margin:0 0 16px}.demo-roles button{flex:1;display:flex;justify-content:center;padding:8px 14px;min-height:44px;border:0;border-radius:8px}.demo-roles small{display:none}.demo-panel-heading{display:none}.demo-guide{display:none}.demo-bottom{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:20px;padding:16px 0}.demo-bottom p{margin:0;font-size:.8rem;max-width:80ch}.demo-bottom button{flex:none}#demo-workspace{padding:0;border:0;background:none;box-shadow:none}.demo-top .account-actions{gap:5px}.demo-top .account-button{min-height:44px;border-radius:9px;padding:8px 12px;font-size:.82rem}
@media(max-width:900px){.dashboard-frame{grid-template-columns:205px minmax(0,1fr);gap:18px}.modern-dashboard .teaching-layout{grid-template-columns:1fr}.modern-dashboard .teaching-class-list{display:flex;gap:8px;flex-wrap:wrap;max-height:180px}.modern-dashboard .profile-lesson-grid{grid-template-columns:1fr}}
@media(max-width:700px){
 .dashboard-frame{display:block}.dashboard-content{gap:18px}.dashboard-sidebar{display:none;position:fixed;inset-block:12px;inset-inline-start:12px;width:min(290px,calc(100vw - 48px));z-index:102;max-height:calc(100dvh - 24px);overflow:auto;padding:22px 14px;background:#f8f0e2;box-shadow:0 20px 60px #17333333;border-radius:16px;align-content:start}.dashboard-menu-open .dashboard-sidebar{display:grid}.dashboard-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:101;border:0;border-radius:0;background:#17333366}.dashboard-mobilebar{position:sticky;top:8px;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:58px;margin-bottom:18px;padding:8px 10px;border:1px solid #ded6c8;border-radius:12px;background:#f8f0e2;box-shadow:0 5px 15px #17333312}.dashboard-mobilebar strong{font-size:.85rem}.dashboard-menu-button{min-height:44px;padding:8px 12px;border:1px solid #b8cfc3;border-radius:8px;background:#f8f0e2;color:#173333;font:inherit;font-size:.84rem;cursor:pointer}.dashboard-content>.teaching-heading{grid-template-columns:1fr;gap:9px}.modern-dashboard .teaching-heading h1{font-size:1.35rem}.modern-dashboard .teacher-quick-select{grid-template-columns:1fr;padding:14px}.dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-stat{padding:14px}.dashboard-stat strong{font-size:1.5rem}.modern-dashboard .account-actions{gap:7px}.modern-dashboard .teaching-heading .account-actions{justify-content:flex-start}.modern-dashboard .account-button{font-size:.82rem;padding:9px 12px}.modern-dashboard .teacher-nav-tabs{grid-template-columns:1fr}.dashboard-welcome,.dashboard-next,.dashboard-empty{padding:20px}.modern-dashboard .admin-grid{grid-template-columns:1fr}.modern-dashboard .teacher-learners{grid-template-columns:1fr}.modern-dashboard .teaching-form{max-width:100%}.modern-dashboard .teaching-editor{padding:16px}.classroom-active .account-card{padding:0!important}#demo-app{padding:12px 16px}.demo-top{gap:6px}.demo-top .account-actions{max-width:100%;flex-wrap:wrap}.demo-top .teacher-notification{display:none}.demo-roles{max-width:100%;gap:3px}.demo-roles button{min-width:0;padding:8px 7px;font-size:.78rem}.demo-bottom{display:grid;gap:10px}.demo-bottom button{justify-self:start}.modern-dashboard .dashboard-subnavigation .teacher-nav-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-embedded .dashboard-mobilebar{display:none}.dashboard-embedded .dashboard-content{gap:16px}
 body:has(#account.classroom-active.active) .topbar{position:relative;top:auto;z-index:20}
}
@media(prefers-reduced-motion:reduce){.modern-dashboard *{transition:none!important;scroll-behavior:auto!important}}

.dashboard-menu-close{display:none}
@media(max-width:700px){.dashboard-menu-close{display:block;justify-self:end;min-height:44px;padding:8px 14px;border:1px solid #ded6c8;border-radius:9px;background:#f4efe5;color:#173333;font:inherit}.modern-dashboard .dashboard-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.dashboard-stat{padding:12px 9px}.dashboard-stat strong{font-size:1.4rem}.dashboard-stat span{font-size:.72rem}.dashboard-welcome,.dashboard-next{padding:18px}}
/* Keep authentication controls consistent with the workspace. */
#account:not(.classroom-active) .account-card{border-radius:18px;box-shadow:0 8px 28px #17333308}
#account .account-field input,#account .account-field select,#account .account-field textarea{border-radius:9px;transition:border-color .15s,box-shadow .15s}
#account :is(input,select,textarea):focus-visible{outline:3px solid #b94f35;outline-offset:3px}
#account .account-field{gap:7px;font-size:.88rem}#account .account-button{border-radius:9px;min-height:44px}
@media(prefers-reduced-motion:reduce){#account :is(input,select,textarea){transition:none}}

.demo-brand{gap:12px;flex-wrap:wrap}.dashboard-demo-label{font-size:.7rem;font-weight:600;padding:4px 8px;border:1px solid #ded6c8;border-radius:6px;color:#667372;background:#f8f0e2}
.classroom-active .family-hub{padding:20px;border:1px solid #ded6c8;border-radius:14px;background:#f8f0e2;margin-bottom:20px}.classroom-active .family-child-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px}.classroom-active .family-child-card{border-radius:10px;min-height:72px;padding:16px}

.modern-dashboard .dashboard-section{display:grid;gap:18px;min-width:0}.dashboard-section[data-section=overview]>h2{display:none}.dashboard-welcome>.account-button{margin-inline-end:8px;margin-top:4px}
.dashboard-finance-summary .admin-card{grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;gap:12px}.dashboard-finance-summary h3{grid-column:1/-1}.dashboard-finance-summary .admin-card p{margin:0}
@media(max-width:700px){.dashboard-finance-summary .admin-card{grid-template-columns:1fr}}

.profile-lesson-letter{display:grid;place-items:center;min-width:42px;min-height:42px;border-radius:9px;background:#e8f2ed;color:#173333;font-size:1.4rem;font-weight:700}

/* The workspace has its own navigation; avoid a second mobile menu. */
body:has(#account.classroom-active.active) :is(.menu-toggle,.mobile-shortcuts,.sound-preference){display:none!important}
body:has(#account.classroom-active.active) .topbar{padding:12px 16px;gap:12px}
body:has(#account.classroom-active.active) .brand-copy small{display:none}
body:has(#account.classroom-active.active) .teacher-notification{border-radius:9px;font-size:.78rem;min-height:44px}
body:has(#account.classroom-active.active) .account-header-trigger{min-height:44px;max-width:220px;width:auto}
.classroom-active .teacher-connection-tools,.classroom-active .family-child-progress{margin-top:16px;padding:16px;border:1px solid #ded6c8;border-radius:12px;background:#f8f0e2}
.classroom-active .account-progress-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px;margin-top:12px}.classroom-active .account-progress-list p{margin:0;padding:8px;background:#f4efe5;border-radius:7px;font-size:.83rem}
@media(max-width:700px){body:has(#account.classroom-active.active) .topbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;margin-bottom:12px}body:has(#account.classroom-active.active) .header-tools{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;width:100%;margin:0}body:has(#account.classroom-active.active) .language-switcher{margin:0}body:has(#account.classroom-active.active) .account-header-menu{margin:0}body:has(#account.classroom-active.active) .account-view{padding-top:12px}body:has(#account.classroom-active.active) .teacher-notification{margin:0}}
body:has(#account.classroom-active.active) .account-header-panel :is(button,summary,input:not([type=checkbox]):not([type=radio]),select){min-height:44px}
body:has(#account.classroom-active.active) .account-header-panel :is(button,summary,input,select,textarea):focus-visible{outline:3px solid #b94f35;outline-offset:3px}


.modern-dashboard .teacher-learners>h2,.classroom-active .teacher-connection-tools>div>h3:first-child{display:none}

/* Authentication starts with the form, followed by supporting information. */
body:has(#account.active) :is(.menu-toggle,.mobile-shortcuts,.sound-preference,.pk-launcher){display:none!important}
body:has(#account.active) .language-switcher button{min-width:44px;min-height:44px}
body:has(#account.active) #account:not(.classroom-active) .account-layout{max-width:1040px;grid-template-columns:minmax(0,1fr) minmax(0,.7fr);gap:28px}
#account:not(.classroom-active) .account-intro{text-align:start;padding:12px 0}
#account:not(.classroom-active) .account-intro h1{font-size:1.3rem;line-height:1.7;margin:0 0 12px}
#account:not(.classroom-active) .account-intro p{font-size:.88rem;line-height:1.9;margin:8px 0}
#account:not(.classroom-active) .account-demo-access{padding:16px;border-radius:12px;margin-top:18px}
@media(max-width:700px){body:has(#account.active) #account:not(.classroom-active) .account-layout{grid-template-columns:minmax(0,1fr);gap:18px}body:has(#account.active) .topbar{padding:10px 14px}#account:not(.classroom-active) .account-card{padding:20px}#account:not(.classroom-active) .account-intro{padding:12px 6px}}

/* Daily teacher actions stay next to their class, including on narrow screens. */
.teacher-workbench{margin-block:20px}.teacher-workbench-actions,.teacher-class-actions{display:flex;flex-wrap:wrap;gap:10px}
.teacher-class-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:14px;margin-block:18px}
.teacher-class-card{background:var(--dash-paper,#f8f0e2);border:1px solid var(--dash-line,#ded6c8);border-radius:18px;padding:20px}
.teacher-class-card h3{margin:0 0 8px}.teacher-class-actions .account-button{flex:1;min-height:44px}
.teacher-chat-members{border:1px solid var(--dash-line,#ded6c8);border-radius:14px;padding:14px;margin-block:14px}
.teacher-chat-members>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:700}
@media(max-width:700px){.teacher-workbench-actions{display:grid;grid-template-columns:1fr 1fr}.teacher-workbench-actions>:first-child{grid-column:1/-1}.teacher-class-card{padding:16px}.teacher-class-actions{display:grid;grid-template-columns:1fr 1fr}.teacher-class-actions>:first-child{grid-column:1/-1}.modern-dashboard .teacher-quick-select{display:none}}

.dashboard-stat>svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;display:block;margin-block-end:8px}
