/* Unified theme switch - animated toggle for all pages */
.theme-switch {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 9999;
  padding: 4px;
}
.theme-switch-track {
  display: flex;
  width: 52px;
  height: 28px;
  background: rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  align-items: center;
  padding: 3px;
  transition: background 0.35s ease, box-shadow 0.35s ease;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
[data-theme="light"] .theme-switch-track {
  background: rgba(99, 102, 241, 0.25);
}
.theme-switch-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
}
[data-theme="dark"] .theme-switch-thumb {
  transform: translateX(24px);
  background: linear-gradient(135deg, #334155, #1e293b);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.theme-switch:hover .theme-switch-track {
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.15), 0 0 0 2px rgba(99, 102, 241, 0.2);
}
.theme-switch:focus-visible {
  outline: 2px solid var(--accent-primary, #6366f1);
  outline-offset: 2px;
  border-radius: 18px;
}
/* Inline variant for sidebar (no fixed position) */
.theme-switch-inline { position: relative; top: auto; right: auto; display: flex; align-items: center; }
