.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; flex: none; }
.header-actions #panel { margin-left: 0; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 11px; border: 1px solid #30405a; border-radius: 8px; background: #162237; color: #becfe5; cursor: pointer; font: 500 12px/1.5 'Segoe UI', system-ui, sans-serif; white-space: nowrap; }
.theme-toggle:hover { background: #1d2c43; border-color: #50637e; color: #e7edf7; }
.theme-toggle:focus-visible { outline: 2px solid #5cdbc1; outline-offset: 4px; }
.theme-toggle svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .theme-sun { color: #8196b1; }
.theme-toggle .theme-moon { color: #7de4cb; }
.theme-track { display: inline-block; position: relative; width: 30px; height: 18px; flex: none; border: 1px solid #3c7b6d; border-radius: 12px; background: #18423a; }
.theme-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 10px; height: 10px; background: #8be8d2; border-radius: 50%; transform: translateX(12px); transition: transform .15s; }
.theme-label { margin-left: 3px; min-width: 58px; text-align: left; }
[data-theme="light"] .theme-toggle { border-color: #cbd6e3; background: #fff; color: #425b73; }
[data-theme="light"] .theme-toggle:hover { border-color: #94acbf; background: #f0f5f9; color: #172b42; }
[data-theme="light"] .theme-toggle:focus-visible { outline-color: #0f7665; }
[data-theme="light"] .theme-toggle .theme-sun { color: #a76815; }
[data-theme="light"] .theme-toggle .theme-moon { color: #7b8da2; }
[data-theme="light"] .theme-track { background: #e6edf4; border-color: #bdcad9; }
[data-theme="light"] .theme-track::after { transform: translateX(0); background: #60798f; }
@media (max-width: 600px) {
  header { flex-wrap: wrap; }
  .header-actions { flex-basis: 100%; justify-content: space-between; margin-top: 2px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .theme-track::after { transition: none; } }
