:root[data-theme=light]{--theme-popover:#fff;--theme-muted:#65758b}
:root[data-workspace-surface=ui][data-theme=light],:root[data-workspace-surface=ui][data-theme=light] body{background:#f4f7fb;color:#253449}
:root[data-workspace-surface=ui][data-theme=light] :is(.pane-bar,.pane iframe,.pane-loading,.auth-window){background:#fff;color:#26354b;border-color:#dce3ec}
:root[data-theme=light] :is(#rail,#dock-handle,#split-chooser,.app-menu,#account-dialog){background:#fffffff5;color:#31425a;border-color:#cbd6e3;box-shadow:0 8px 28px #263c5724}
:root[data-theme=light] #rail button{color:#52647c}:root[data-theme=light] #rail button[aria-pressed=true]{background:#dceaff;color:#164f8e}:root[data-theme=light] #rail button:hover{background:#eaf1fb;color:#205f9f}
:root[data-theme=light] #theme-orb{background:#fff;color:#31425a;border-color:#cbd6e3;box-shadow:0 5px 22px #263c5724}
:root[data-workspace-surface=ui][data-theme=light] :is(button,input,select,dialog){color:#2b3d54;border-color:#c8d4e2;background:#fff}
:root[data-workspace-surface=ui][data-theme=light] .primary{background:#2565a7;color:#fff;border-color:#2565a7}
:root[data-workspace-surface=ui][data-theme=light] :is(p,footer,.eyebrow,.intro,.remember,.field-help){color:#62738a}
:root[data-workspace-surface=ui][data-theme=light] :is(h1,h2,.file-name,.name button,#breadcrumbs button:last-child){color:#21354f}
:root[data-workspace-surface=ui][data-theme=light] #drop-zone{background:linear-gradient(120deg,#eaf3ff,#f9fcff);border-color:#9db6d3}
:root[data-workspace-surface=ui][data-theme=light] :is(.table-wrap,.results,#transfers){background:#fff;border-color:#d3dfec}
:root[data-workspace-surface=ui][data-theme=light] th{background:#eaf0f8;color:#5a6e87}
:root[data-workspace-surface=ui][data-theme=light] td{border-color:#e0e7f0;color:#60728a}
:root[data-workspace-surface=ui][data-theme=light] tbody tr:hover{background:#eff5fd}
:root[data-workspace-surface=ui][data-theme=light] :is(td a,.folder-icon,.upload-symbol,.result-item span,#open-path){color:#295c92}
:root[data-workspace-surface=ui][data-theme=light] :is(#status,.message.success){color:#28714b}
:root[data-workspace-surface=ui][data-theme=light] :is(#status.error,#open-error,#archive-error,#folder-error){color:#aa3c36}
:root[data-theme=light] :is(.account-content p,.account-content label,.account-content .account-footer,.account-header){color:#596b82;border-color:#d7e0eb}
:root[data-theme=light] .account-content input:not([type=checkbox]){background:#fff;color:#253449;border-color:#bdcadb}
:root[data-theme=light] .account-content .secondary{background:#e1e9f3!important;color:#273c55}
:root[data-theme=light] .blog-management-links a{background:#eef4fb;color:#2b527d;border-color:#cbd9e9}
:root[data-workspace-surface=notes][data-theme=light]{--bg:#fff;--panel:#f3f6fb;--surface:#eaf0f8;--border:#d8e1ed;--text:#283a50;--muted:#677b93;--accent:#2566a9;--hover:#2c6bb010;--selection:#d8e9fc}
:root[data-workspace-surface=notes][data-theme=light] :is(.command-bar,.command-menu,.quick-search,.sidebar-search input,.view-switch,.toast,.app-dialog){background:#f5f8fc;color:#30465f;border-color:#cbd8e8}
:root[data-workspace-surface=notes][data-theme=light] :is(.command-menus summary,.quick-search,.tab,.breadcrumb,.icon-button,.status-bar,.vault-footer,.window-label){color:#5c7089}
:root[data-workspace-surface=notes][data-theme=light] :is(.tab.active,.tree-note.selected,.ribbon .icon-button.active){color:#1f548b;background:#dceafa}
:root[data-workspace-surface=notes][data-theme=light] :is(.markdown-body h1,.markdown-body h2,.markdown-body h3,.empty-state h1,.settings-row h3,.section-toolbar h1){color:#273e58}
:root[data-workspace-surface=notes][data-theme=light] .markdown-body a{color:#2365a5}
:root[data-workspace-surface=notes][data-theme=light] .markdown-body pre{background:#f0f4f9}
:root[data-workspace-surface=notes][data-theme=light] .markdown-body code{color:#975125;background:#edf2f8}
:root[data-workspace-surface=notes][data-theme=light] :is(.markdown-body blockquote,.settings-row p,.panel-description){color:#61758e}
:root[data-workspace-surface=notes][data-theme=light] .notice{background:#fff1cb;color:#685123}
:root[data-workspace-surface=notes][data-theme=light] .view-switch button.active{background:#d4e6fc;color:#20588f}
:root[data-workspace-surface=admin][data-theme=dark] body{background:#181e27;color:#dce4ef}
:root[data-workspace-surface=admin][data-theme=dark] :is(.el-header,.el-main,.el-aside,.sidebar,.header,.navbar,.layout,.main-container,.app-main){background:#1c2430;color:#dce4ef;border-color:#354153}
:root[data-workspace-surface=admin][data-theme=dark] .el-table{--el-table-header-background-color:#263143;--el-table-border-color:#364153}
:root[data-workspace-surface=blog] .theme-toggle{display:none!important}
:root[data-workspace-surface=blog] .workspace-theme{display:none!important}@media(max-width:640px){:root[data-workspace-surface=blog] .workspace-links{width:100%}}

:root[data-theme=light] #theme-orb:hover{background:#eaf1fb;color:#205f9f}
/* Admin: restrained neutral surfaces and readable dashboard metrics. */
:root[data-workspace-surface=admin][data-theme=dark]{--el-bg-color:#20252c;--el-bg-color-page:#191d23;--el-bg-color-overlay:#262c34;--el-fill-color-blank:#20252c;--el-fill-color-light:#292f38;--el-fill-color:#303743;--el-border-color:#3a424e;--el-border-color-light:#343c47;--el-border-color-lighter:#303843;--el-text-color-primary:#e0e5ec;--el-text-color-regular:#bcc5d1;--el-text-color-secondary:#929faf;--el-color-primary:#8cb8e7}
:root[data-workspace-surface=admin][data-theme=dark] :is(.layout-sidebar,.sidebar,.el-header,.header){background:#1c2128;border-color:#343c47}
:root[data-workspace-surface=admin][data-theme=dark] .el-main{background:#191d23}
:root[data-workspace-surface=admin][data-theme=dark] .el-menu{--el-menu-bg-color:#1c2128!important;--el-menu-text-color:#acb8c8!important;--el-menu-active-color:#b5d5f5!important;--el-menu-hover-bg-color:#293340!important;border-color:#343c47}
:root[data-workspace-surface=admin][data-theme=dark] .el-menu-item.is-active{background:#293340}
:root[data-workspace-surface=admin][data-theme=dark] .dashboard .card-icon{background:#303947!important;color:#b5c9e2!important}
:root[data-workspace-surface=admin] .el-card{border-radius:12px;box-shadow:none}
:root[data-workspace-surface=admin] .el-avatar{background:#f1f3f5;border:1px solid #c9d0d8}
:root[data-workspace-surface=admin][data-theme=dark] .el-avatar{border-color:#515c6b}
:root[data-workspace-surface=admin][data-theme=dark] ::-webkit-scrollbar-track{background:#20252c}
:root[data-workspace-surface=admin][data-theme=dark] ::-webkit-scrollbar-thumb{background:#4c5767}

/* Animate only paint properties; keep layout and drag geometry stable. */
@media(prefers-reduced-motion:no-preference){
  html.workspace-theme-changing,html.workspace-theme-changing body,html.workspace-theme-changing body *{
    transition:background-color .28s ease,color .28s ease,border-color .28s ease,box-shadow .28s ease !important;
  }
  .workspace-theme-changing #theme-orb svg{animation:theme-icon-turn .28s ease both}
}
@keyframes theme-icon-turn{from{opacity:.25;transform:rotate(-35deg) scale(.75)}to{opacity:1;transform:rotate(0) scale(1)}}
