.desktop-update-settings{margin-top:20px}.desktop-update-settings .toolbar{gap:12px;flex-wrap:wrap}.desktop-update-settings [data-desktop-update-summary]{line-height:1.7}@media(max-width:560px){.desktop-update-settings .toolbar{align-items:stretch}.desktop-update-settings .btn{width:100%}}
/* The controls participate in the header row; no reserved blank strip is needed. */
.desktop-shell .topbar{-webkit-app-region:drag;padding-inline:16px;gap:8px}
.desktop-shell .topbar a,.desktop-shell .topbar button,.desktop-shell .topbar input,.desktop-shell .topbar select,.desktop-shell .topbar textarea,.desktop-shell .topbar label,.desktop-shell .topbar [role=button],.desktop-shell .topbar .notification-panel,.desktop-shell .topbar .account-dropdown,.desktop-shell .topbar [role=listbox]{-webkit-app-region:no-drag}
.desktop-shell #session-nav{min-width:0;width:auto;flex:1;gap:12px}
.desktop-shell:is(.student-panel,.teacher-panel,.coach-panel) #session-nav{grid-template-columns:minmax(0,1fr) auto auto}
.desktop-shell.admin-panel #session-nav{grid-template-columns:auto minmax(0,1fr) auto}
.desktop-shell .topbar .toolbar-actions{gap:6px;flex-shrink:0;margin-left:auto;align-items:center}
.desktop-shell .topbar .toolbar-actions .icon-button{width:40px;height:40px;min-height:40px;display:inline-flex;border-radius:10px}
.desktop-shell .topbar .toolbar-actions [data-profile]{min-height:40px;max-width:166px;display:flex;align-items:center;gap:7px;border-radius:10px}
.desktop-shell .topbar [data-profile] span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.desktop-shell .topbar .user-chip img{width:32px;height:32px;flex-shrink:0}
.desktop-window-controls{position:static;display:flex;flex-shrink:0;gap:2px;align-items:center;margin-inline-start:auto;padding-left:2px;-webkit-app-region:no-drag}
.desktop-window-controls button{border:0;border-radius:10px;width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;padding:0;font:inherit;line-height:1;background:transparent;color:var(--text);transition:background 140ms ease,color 140ms ease,transform 100ms ease;-webkit-app-region:no-drag}
.desktop-window-controls svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;pointer-events:none}
.desktop-window-controls [data-desktop-home]{width:40px;min-width:40px;padding:0}
.desktop-window-controls button:hover{background:var(--brand-soft)}
.desktop-window-controls button:active:not(:disabled){transform:scale(.95)}
.desktop-window-controls button:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.desktop-window-controls button[data-desktop-window=close]:hover{background:#cf3150;color:#fff}
.desktop-window-controls button:disabled{opacity:.55;cursor:wait}
.desktop-shell.app-booting>.topbar{visibility:visible}.desktop-shell.student-onboarding>.topbar{display:flex!important}
@media(max-width:1400px){.desktop-shell .topbar .toolbar-status{display:none}.desktop-shell:is(.student-panel,.teacher-panel,.coach-panel,.admin-panel) #session-nav{grid-template-columns:minmax(0,1fr) auto}.desktop-shell .topbar .student-topbar-start,.desktop-shell .topbar .admin-global-search{grid-column:1;min-width:0}.desktop-shell .topbar .toolbar-actions{grid-column:2}.desktop-shell .topbar .student-global-search{max-width:320px;min-width:0}}
@media(max-width:1100px){.desktop-shell .topbar{padding-inline:10px}.desktop-shell .topbar .user-chip span{display:none}}
@media(max-width:720px){.desktop-shell .topbar .student-global-search,.desktop-shell .topbar .admin-global-search{display:none}.desktop-shell .topbar .toolbar-actions{gap:3px}.desktop-shell .topbar .notification-wrap{display:block}.desktop-shell .topbar .toolbar-actions [data-messages],.desktop-shell .topbar .toolbar-actions [data-theme]{display:inline-flex}.desktop-shell .topbar>.brand{display:none}.desktop-shell .topbar .toolbar-actions .icon-button{width:34px}.desktop-window-controls button{width:34px}.desktop-window-controls [data-desktop-home]{width:34px;min-width:34px}}
@media(prefers-reduced-motion:reduce){.desktop-window-controls button{transition:none}.desktop-window-controls button:active:not(:disabled){transform:none}}
/* Browser admin headers share the compact layout even without an Electron bridge. */
@media(max-width:1100px){
 .admin-panel:not(.desktop-shell) .topbar #session-nav{width:auto;min-width:0;grid-template-columns:minmax(0,1fr) auto;gap:10px}
 .admin-panel:not(.desktop-shell) .topbar .toolbar-status{display:none}
 .admin-panel:not(.desktop-shell) .topbar .admin-global-search{grid-column:1;min-width:0;width:100%;max-width:none}
 .admin-panel:not(.desktop-shell) .topbar .admin-global-search label,.admin-panel:not(.desktop-shell) .topbar .admin-global-search input{min-width:0;width:100%}
 .admin-panel:not(.desktop-shell) .topbar .toolbar-actions{grid-column:2;justify-self:end;min-width:0;margin-left:0;gap:6px}
 .admin-panel:not(.desktop-shell) .topbar .user-menu-wrap{min-width:0;max-width:180px}
 .admin-panel:not(.desktop-shell) .topbar .user-chip{max-width:180px}
 .admin-panel:not(.desktop-shell) .topbar .user-chip span{min-width:0;max-width:130px;overflow:hidden;text-overflow:ellipsis}
 .admin-panel:not(.desktop-shell) .topbar .notification-wrap{display:block}
 .admin-panel:not(.desktop-shell) .topbar .toolbar-actions [data-theme]{display:inline-flex}
}
