.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:44px;padding:8px 12px;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:12px;font-weight:600;letter-spacing:0;cursor:pointer}
.theme-toggle:hover{background:var(--surface-2)}
.theme-toggle-track{width:38px;height:22px;padding:3px;border-radius:20px;background:var(--surface-2);border:1px solid var(--border);display:block}
.theme-toggle-track>span{display:block;width:14px;height:14px;border-radius:50%;background:var(--text);transform:translateX(0)}
[data-bs-theme=dark] .theme-toggle-track>span{transform:translateX(16px)}
[data-bs-theme=dark] .theme-dark-label,[data-bs-theme=light] .theme-light-label{color:var(--text);font-weight:700}
.sidebar-bottom .theme-toggle{width:100%;justify-content:space-between;margin-bottom:14px}
.mobile-preferences{display:none}.profile-preferences{display:flex;justify-content:center;padding:0 20px 28px}.login-preferences{display:flex;justify-content:center;padding:0 20px 15px}
.advanced-panel{max-width:760px}.global-badge-preview{height:240px;max-width:280px;margin:0 auto 24px}.global-badge-preview img{max-height:220px;padding:22px}
.sidebar{overflow-y:auto}
@media(min-width:768px){
  .sidebar{--sidebar-gutter:24px;border-right:0;box-shadow:inset -1px 0 var(--border);scrollbar-width:none}
  .sidebar::-webkit-scrollbar{display:none}
  .sidebar nav a.selected{position:relative;margin-right:calc(-1 * var(--sidebar-gutter));padding:7px calc(14px + var(--sidebar-gutter)) 7px 13px;border:1px solid var(--border);border-right:0;border-radius:12px 0 0 12px;background:var(--page);color:var(--text);font-weight:700}
  .sidebar nav a.selected::before,.sidebar nav a.selected::after{content:"";position:absolute;right:0;width:16px;height:16px;pointer-events:none}
  .sidebar nav a.selected::before{top:-16px;background:radial-gradient(circle at top left,transparent 14.5px,var(--border) 15px,var(--border) 15.75px,var(--page) 16px)}
  .sidebar nav a.selected::after{bottom:-16px;background:radial-gradient(circle at bottom left,transparent 14.5px,var(--border) 15px,var(--border) 15.75px,var(--page) 16px)}
}
@media(min-width:768px) and (max-width:1100px){.sidebar{--sidebar-gutter:18px}}
.profile-nav-collapse{display:grid;grid-template-rows:1fr}
.profile-nav-clip{min-height:0;overflow:hidden}
.profile-nav-actions{display:flex;align-items:center;gap:12px}
.profile-nav-toggle{display:inline-flex;align-items:center;justify-content:center;width:30px;min-width:30px;height:30px;padding:6px;background:transparent;border:1px solid var(--border);border-radius:6px;color:var(--muted);cursor:pointer}
.profile-nav-toggle svg{width:16px;height:16px;flex-shrink:0}
.profile-nav-toggle:hover{color:var(--text);background:var(--surface-2)}
.profile-nav-restore{display:none;position:fixed;top:12px;right:18px;z-index:20;background:var(--surface);box-shadow:0 4px 18px #0002}
[data-profile-nav-hidden=true] .profile-nav-collapse{grid-template-rows:0fr}
[data-profile-nav-hidden=true] .profile-nav-collapse .public-header{opacity:0;transform:translateY(-14px);pointer-events:none}
[data-profile-nav-hidden=true] .profile-nav-restore{display:inline-flex}
@media(prefers-reduced-motion:no-preference){.profile-nav-ready .profile-nav-collapse{transition:grid-template-rows .42s cubic-bezier(.22,1,.36,1)}.profile-nav-ready .profile-nav-collapse .public-header{transition:opacity .26s ease,transform .42s cubic-bezier(.22,1,.36,1)}}
@media(max-width:540px){.profile-nav-actions{gap:10px}.profile-nav-restore{right:12px}.profile-nav-collapse .public-header{gap:12px}}
@media(max-width:767px){.sidebar-bottom .theme-toggle{display:none}.mobile-preferences{display:flex;justify-content:center}.admin-footer{align-items:center;flex-wrap:wrap;gap:12px}.admin-footer .mobile-preferences{flex-basis:100%;order:3}}
@media(prefers-reduced-motion:no-preference){.theme-toggle-track>span{transition:transform .18s ease}}
