.header-controls,.admin-top-actions{display:flex;align-items:center;gap:20px}.header-controls{margin-left:24px}.site-header nav{margin-left:auto}.theme-toggle{flex-shrink:0;color:var(--navy)}.login-main{position:relative}.login-theme{position:absolute;right:30px;top:24px}.profile-link{display:flex;align-items:center;gap:10px;min-width:0!important;margin-left:0!important;flex:1}.profile-link>span:last-child{min-width:0}.profile-link strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:132px}.avatar{overflow:hidden;flex-shrink:0}.avatar img{width:100%;height:100%;object-fit:cover}.avatar-large{width:88px;height:88px;font-size:25px}.user-identity{display:flex;align-items:center;gap:14px}.user-identity .avatar{width:44px;height:44px}.user-identity strong{display:block;font-size:13px;font-weight:500;overflow-wrap:anywhere}.user-identity small{display:block;margin-top:5px;color:var(--muted);font-size:10px}.users-table td:first-child{min-width:230px;width:40%}.user-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:16px}.user-row-actions .btn{font-size:11px;white-space:nowrap}.user-row-actions .text-link{font-size:11px}.users-demo-note{font-size:11px;line-height:1.8;color:var(--muted);margin-top:20px}.profile-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:24px;max-width:1060px;align-items:start}.profile-card{padding:28px}.profile-card h2,.profile-appearance h2{font-size:17px}.profile-card label{font-size:12px}.profile-card input{font-size:13px}.profile-card>label:first-of-type{margin-top:0}.profile-card>p.small{margin:0 0 22px}.profile-photo-row{display:flex;align-items:center;gap:22px;padding-bottom:28px;border-bottom:1px solid var(--line);margin-bottom:25px}.profile-photo-row .photo-file-label{display:inline-flex;font-size:11px;margin:0;cursor:pointer}.photo-file-label{position:relative}.photo-file-label input{position:absolute;inset:0;opacity:0;cursor:pointer}.photo-file-label:focus-within{outline:3px solid #458bba;outline-offset:3px}.profile-photo-row .text-link{display:block;font-size:10px;margin-top:8px}.profile-photo-row p{font-size:10px;line-height:1.6;margin-top:8px}.profile-save-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:26px}.profile-save-row .btn{flex-shrink:0}.profile-card .form-error{margin-top:18px;font-size:12px}.profile-card #password-help{font-size:11px}.profile-card #password-form .btn{margin-top:20px}#password-form>.btn{margin-top:22px}.profile-appearance p{font-size:12px;line-height:1.8}.profile-appearance h2{margin-bottom:12px}[hidden]{display:none!important}
:root{--surface:#fff;--page:#fff;--admin-bg:#f6f8fa;--button-fg:#fff;color-scheme:light}
:root[data-theme=dark]{--surface:#1b2b36;--page:#14232d;--admin-bg:#101d26;--navy:#e1edf4;--green:#91cbb5;--light:#233743;--line:#3a4d59;--muted:#b1c1cc;--button-fg:#152e26;color:#e1eaf0;color-scheme:dark}
html,body{background:var(--page)}
:root[data-theme=dark] .admin-layout{background:var(--admin-bg)}
:root[data-theme=dark] :is(.admin-sidebar,.admin-top,.admin-table-panel,.search-box,.btn.secondary,.editor-main-panel,.settings-card,dialog,.login-form input,.site-header nav.open){background:var(--surface)}
:root[data-theme=dark] :is(select,input[type=date],.settings-card input:not([type=date]),dialog input){background-color:var(--surface)}
:root[data-theme=dark] :is(.editor-main-panel textarea,.title-input){background:var(--surface)}
:root[data-theme=dark] :is(input,textarea)::placeholder{color:#a1b2bf;opacity:1}
:root[data-theme=dark] .btn{background:var(--green);border-color:var(--green);color:var(--button-fg)}
:root[data-theme=dark] .btn:hover{background:#b0dec9;border-color:#b0dec9}
:root[data-theme=dark] .btn.secondary{color:var(--navy);border-color:var(--line);background:var(--surface)}
:root[data-theme=dark] .btn.secondary:hover{background:var(--light)}
:root[data-theme=dark] :is(.session-note,.editor-toolbar,th){background:#20333f;color:#c0d0db}
:root[data-theme=dark] :is(.admin-sidebar nav a.active,.avatar,.meta .category){background:#263e37;color:var(--green)}
:root[data-theme=dark] .admin-sidebar nav a span{background:var(--surface)}
:root[data-theme=dark] td{border-bottom-color:var(--line)}
:root[data-theme=dark] .category-tabs button{color:var(--muted)}
:root[data-theme=dark] :is(.category-tabs .active,.pagination .selected){background:var(--green);color:var(--button-fg)}
:root[data-theme=dark] :is(.card-category,.no-photo){background:#294039;color:#d0e6db}
:root[data-theme=dark] .status.published{background:#294435;color:#b5e1c3}
:root[data-theme=dark] .status.draft{background:#443b24;color:#edcf8b}
:root[data-theme=dark] :is(.missing-images){background:#363325;border-color:#655735;color:#e4d2a3}
:root[data-theme=dark] .cover-upload{background:#213a33;border-color:#7ba996}
:root[data-theme=dark] .editor-toolbar button:hover{background:#3a515e}
:root[data-theme=dark] :is(.danger,.delete-btn){color:#ffb4ad}
:root[data-theme=dark] .btn.danger-fill{background:#b73c3c;border-color:#b73c3c;color:white}
:root[data-theme=dark] .form-error{background:#45292c;color:#ffc1bb}
:root[data-theme=dark] :is(#toast,.preview-banner,.skip){background:#294353;color:#f1f5f8}
:root[data-theme=dark] dialog:has(.lightbox-image){background:var(--surface)}
:root[data-theme=dark] select,:root[data-theme=dark] .admin-filters select,:root[data-theme=dark] .settings-card select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23e1edf4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E")}
@media(max-width:1150px){.profile-grid{grid-template-columns:1fr}.profile-card{padding:24px}.profile-link strong{max-width:110px}.admin-sidebar nav a{font-size:11px}.admin-top-actions{gap:14px}}
@media(max-width:850px){.admin-sidebar .author-profile{display:flex;border:0;margin:0;padding:0}.admin-sidebar .author-profile>a[href='#/login']{display:none}.admin-sidebar .profile-link>span:last-child{display:none}.admin-sidebar{flex-wrap:wrap}.admin-sidebar nav{order:3;width:100%;justify-content:flex-start}.admin-sidebar .brand{margin:0}.profile-link .avatar{width:34px;height:34px}}
@media(max-width:600px){.header-controls{gap:4px;margin-left:8px}.site-header nav{margin-left:0}.admin-sidebar nav{flex-wrap:wrap;justify-content:space-between}.admin-sidebar nav a{font-size:10px;gap:5px;padding:8px}.admin-sidebar nav a svg{width:15px}.admin-top-actions{gap:8px}.admin-top-actions>.text-link{font-size:0;gap:0}.users-page .section-heading>.btn{margin-top:20px}.profile-card{padding:20px}.profile-photo-row{gap:16px}.avatar-large{width:72px;height:72px}.profile-save-row{align-items:stretch;flex-direction:column}.profile-card label{font-size:12px}.profile-grid{gap:0}.profile-page .section-heading{margin-bottom:24px}.login-theme{top:20px;right:20px}.user-row-actions{gap:12px}.users-table td:first-child{min-width:210px}}
@media(forced-colors:active){:root[data-theme=dark] select,:root[data-theme=dark] .admin-filters select,:root[data-theme=dark] .settings-card select{background-image:none}}
.admin-main,.admin-sidebar{min-width:0}
.table-scroll{position:relative}
.site-header-shell{position:sticky;top:0;z-index:40;background:var(--page)}
.site-header{position:relative;background:var(--page)}
.header-controls .nav-search{width:48px;padding:0 0 0 7px;border-left:1px solid var(--line)}
.header-search-panel{position:absolute;right:0;top:calc(100% - 1px);width:480px;max-width:100%;padding:22px;background:var(--surface);border:1px solid var(--line);border-radius:0 0 7px 7px;box-shadow:0 12px 28px #102b401a;z-index:45}
.header-search-panel label{display:block;font-size:12px;margin-bottom:12px;font-weight:500;color:var(--navy)}
.header-search-fields{display:flex;align-items:center;gap:8px}
.header-search-fields .search-box{flex:1}
.header-search-fields .btn{padding-inline:15px}
.header-search-fields .icon-btn{width:32px;flex-shrink:0}
.back-to-top{position:fixed;right:28px;bottom:28px;z-index:35;width:46px;height:46px;border:1px solid var(--line);background:var(--surface);color:var(--green);border-radius:50%;box-shadow:0 4px 18px #102b401a}
.back-to-top:hover{background:var(--light)}
.preview-banner{min-height:54px;z-index:50}
.preview-banner+.site-header-shell{top:54px}
html{scroll-padding-top:140px}
@media(max-width:600px){.header-controls{gap:1px}.header-controls .nav-search{border:0;width:34px;padding:0}.header-controls .theme-toggle,.header-controls .mobile-menu{width:34px}.header-search-panel{padding:16px}.header-search-fields{flex-wrap:wrap}.header-search-fields .search-box{min-width:150px}.header-search-fields .btn{padding-inline:12px}.back-to-top{right:18px;bottom:18px;width:44px;height:44px}html{scroll-padding-top:110px}}
.filter-bar .category-tabs{flex:1;min-width:0;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:var(--line) transparent;padding:4px 3px 9px;cursor:grab;overscroll-behavior-x:contain}
.category-tabs button{flex:0 0 auto;white-space:nowrap}
.category-tabs::-webkit-scrollbar{height:4px}
.category-tabs::-webkit-scrollbar-thumb{background:var(--line);border-radius:4px}
.category-tabs.dragging,.category-tabs.dragging button{cursor:grabbing;user-select:none}
.filter-bar>.search-box{flex-shrink:0}
@media(max-width:850px){.filter-bar .category-tabs{flex:auto;width:100%}}
#user-search{flex-wrap:nowrap;align-items:stretch}
#user-search .search-box{flex:1 1 0;min-width:0}
#user-search>.btn{flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0}
