/* ─── THEME MODE TOGGLE (Header) ──────────────────────────────── */
.theme-mode-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
}
.theme-mode-toggle:hover {
  background: var(--accent-lo);
  border-color: var(--accent);
  transform: scale(1.1);
}

/* ─── THEME EDITOR PANEL ──────────────────────────────────────── */
.te-section-label {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.te-vars {
  display: grid;
  gap: 6px;
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
  padding-right: 4px;
  margin-bottom: 14px;
}
.te-var-row {
  display: grid;
  grid-template-columns: 130px 36px 1fr 30px;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.te-var-label {
  font-size: 0.72rem;
  color: var(--text);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.te-color-input {
  width: 36px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  padding: 1px;
}
.te-color-input::-webkit-color-swatch-wrapper { padding: 2px; }
.te-color-input::-webkit-color-swatch { border-radius: 4px; border: none; }
.te-text-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 5px 8px;
  transition: border-color 0.2s;
}
.te-text-input:focus {
  outline: none;
  border-color: var(--accent);
}
.te-reset-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s;
  padding: 0;
}
.te-reset-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.te-save-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.te-save-row .snippet-search {
  flex: 1;
}
.te-theme-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 6px;
  transition: border-color 0.2s;
}
.te-theme-item:hover {
  border-color: var(--accent);
}
.te-theme-dots {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.te-theme-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--border-hi);
}
.te-theme-name {
  flex: 1;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.te-theme-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.te-action-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  cursor: pointer;
  transition: all 0.15s;
}
.te-action-btn.load:hover {
  background: var(--accent-lo);
  border-color: var(--accent);
  color: var(--accent);
}
.te-action-btn.delete {
  color: var(--red);
  padding: 4px 8px;
}
.te-action-btn.delete:hover {
  background: var(--red-lo);
  border-color: var(--red);
}
.te-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.te-mode-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}
.te-mode-btn:hover {
  background: var(--accent-lo);
  border-color: var(--accent);
}

/* ─── LIGHT MODE OVERRIDES ────────────────────────────────────── */
body.light-mode::before {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(212,160,56,0.08), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(167,139,250,0.05), transparent),
    radial-gradient(ellipse 50% 30% at 10% 80%, rgba(91,156,246,0.05), transparent);
}
body.light-mode::after {
  opacity: 0.02;
}
body.light-mode .sidebar {
  background: rgba(255,255,255,0.92);
  border-color: #d4d4d0;
}
body.light-mode .tab {
  color: #4a4a4a;
}
body.light-mode .tab.active {
  background: var(--accent-lo);
  color: var(--accent-dk);
}
body.light-mode .header {
  background: rgba(255,255,255,0.85);
  border-color: #d4d4d0;
}
body.light-mode .card,
body.light-mode .skill-card {
  background: #ffffff;
  border-color: #e0e0dc;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
body.light-mode .card:hover,
body.light-mode .skill-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
body.light-mode .hub-panel {
  background: #fafaf8;
}
body.light-mode .hub-panel-header {
  border-color: #e0e0dc;
}
body.light-mode .dash-stat {
  background: #ffffff;
  border-color: #e0e0dc;
}
body.light-mode .ki-panel {
  background: #ffffff;
  border-color: #e0e0dc;
}
body.light-mode .ki-input-row {
  background: #f5f5f0;
  border-color: #d4d4d0;
}
body.light-mode .editor-panel {
  background: #ffffff;
  border-color: #e0e0dc;
}
body.light-mode .spotlight-overlay .spotlight-input {
  background: #ffffff;
  color: #1a1a1a;
  border-color: #d4d4d0;
}
body.light-mode .ctx-menu {
  background: #ffffff;
  border-color: #d4d4d0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
body.light-mode .theme-mode-toggle {
  background: #ffffff;
  border-color: #d4d4d0;
}
body.light-mode .toast {
  background: #ffffff;
  color: #1a1a1a;
  border-color: #d4d4d0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
body.light-mode #particles-canvas,
body.light-mode #three-canvas {
  opacity: 0.15;
}
body.light-mode .light-orbs {
  opacity: 0.08;
}

