:root {
  /* InstruVerse Design System Tokens */
  --bg-primary: #0a0d14;
  --bg-surface: #111622;
  --bg-surface-elevated: #182030;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-glass: rgba(15, 23, 42, 0.65);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(56, 189, 248, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-cyan: #38bdf8;
  --accent-cyan-glow: rgba(56, 189, 248, 0.25);
  --accent-blue: #2563eb;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;

  /* Resistor Band Colors Accurate Spectrum */
  --band-black: #050505;
  --band-brown: #78350f;
  --band-red: #dc2626;
  --band-orange: #ea580c;
  --band-yellow: #eab308;
  --band-green: #16a34a;
  --band-blue: #2563eb;
  --band-violet: #9333ea;
  --band-grey: #6b7280;
  --band-white: #f8fafc;
  --band-gold: #d97706;
  --band-silver: #94a3b8;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.15);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 85% 80%, rgba(37, 99, 235, 0.05) 0%, transparent 40%),
    linear-gradient(to bottom, #090d16 0%, #06080e 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding: 2.5rem 1.25rem;
}

.app-container {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.tag-text {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
}

.main-title {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 600px;
}

/* ============================================================
   MODE SWITCHER
   ============================================================ */
.mode-switch-wrapper {
  display: flex;
  justify-content: center;
}

.mode-switch-container {
  display: inline-flex;
  background: var(--bg-surface);
  padding: 0.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  gap: 0.35rem;
}

.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-icon {
  width: 16px;
  height: 16px;
}

.mode-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.mode-btn.active {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: var(--accent-cyan);
  border: 1px solid var(--border-accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 16px rgba(56, 189, 248, 0.15);
}

/* ============================================================
   RESISTOR VISUALIZATION STAGE
   ============================================================ */
.resistor-visual-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.resistor-visual-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
}

.card-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.indicator-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
}

.card-caption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.quick-specs {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.resistor-stage {
  width: 100%;
  padding: 1rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.resistor-svg {
  width: 100%;
  max-width: 660px;
  height: auto;
  filter: drop-shadow(0 12px 20px rgba(0,0,0,0.5));
}

.resistor-text-label {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Band Badges Preview */
.bands-badge-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-subtle);
}

.band-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-primary);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.band-badge:hover {
  border-color: var(--border-accent);
  transform: translateY(-1px);
}

.badge-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.badge-label {
  color: var(--text-secondary);
}

.badge-name {
  font-weight: 700;
}

/* ============================================================
   RESULTS DASHBOARD
   ============================================================ */
.results-dashboard {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .results-dashboard {
    grid-template-columns: 1fr;
  }
}

.result-tile {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.result-tile:hover {
  border-color: var(--border-strong);
}

.primary-result {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95));
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.tile-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.result-value-display {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.value-number {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 3.2vw, 2.3rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.value-unit {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.value-tolerance {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-amber);
  margin-left: 0.2rem;
}

.raw-value-sub {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.4rem;
}

.minmax-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.range-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ============================================================
   WORKBENCH CARD & INTERACTION PANELS
   ============================================================ */
.workbench-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.6rem 1.75rem;
  box-shadow: var(--shadow-md);
}

.workbench-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.band-config-selector {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.config-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.config-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.config-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.config-btn.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: #fda4af;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reset:hover {
  background: rgba(244, 63, 94, 0.18);
  border-color: var(--accent-rose);
  color: #ffffff;
}

.mode-panel {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.mode-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-intro {
  margin-bottom: 1.35rem;
}

.panel-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.panel-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* ============================================================
   MODE 1: BAND SELECTORS GRID
   ============================================================ */
.band-selectors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.selector-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.selector-card:hover {
  border-color: var(--border-strong);
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.band-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
}

.band-role {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.custom-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.color-sample {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
  z-index: 2;
}

.band-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: #0b0f19;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.6rem 2rem 0.6rem 2.1rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.band-select:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px var(--accent-cyan-glow);
}

.band-select option {
  background: #111622;
  color: #f8fafc;
  padding: 8px;
}

.select-arrow {
  position: absolute;
  right: 10px;
  font-size: 0.7rem;
  color: var(--text-muted);
  pointer-events: none;
}

/* ============================================================
   MODE 2: REVERSE CALCULATOR GRID
   ============================================================ */
.reverse-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .reverse-calc-grid {
    grid-template-columns: 1fr;
  }
}

.reverse-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.input-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.input-with-unit {
  display: flex;
  gap: 0.5rem;
}

.tech-input {
  flex: 1;
  background: #0b0f19;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.7rem 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tech-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px var(--accent-cyan-glow);
}

.unit-select, .tech-select {
  background: #0b0f19;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.unit-select:focus, .tech-select:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.input-helper {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.validation-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  color: #fda4af;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.validation-box.hidden {
  display: none;
}

.reverse-sequence-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.seq-heading {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.seq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.seq-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0b0f19;
  border: 1px solid var(--border-subtle);
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
}

.seq-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.seq-color-chip {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.25);
}

.seq-band-name {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.seq-color-name {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
}

.seq-val-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-cyan);
}

/* ============================================================
   EDUCATIONAL INFORMATION & PALETTE GUIDE
   ============================================================ */
.edu-section {
  margin-top: 0.5rem;
}

.edu-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
}

.edu-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--accent-cyan);
  margin-bottom: 1.25rem;
}

.edu-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .edu-grid {
    grid-template-columns: 1fr;
  }
}

.edu-col {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.edu-sub {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
}

.formula-badge {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: var(--accent-cyan);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
}

.edu-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.edu-desc code {
  font-family: var(--font-mono);
  color: #ffffff;
  background: rgba(0,0,0,0.3);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
}

.palette-table-wrapper {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
}

.palette-chip {
  background: var(--c);
  color: var(--tc);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.palette-chip .c-name {
  font-size: 0.78rem;
  font-weight: 800;
}

.palette-chip .c-val {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  opacity: 0.9;
}

/* ============================================================
   LIGHT THEME OVERRIDES (PrayogSetu Global Theme Compatibility)
   ============================================================ */
:root[data-theme="light"],
html[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f8fafc;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-accent: rgba(2, 132, 199, 0.35);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --accent-cyan: #0284c7;
  --accent-cyan-glow: rgba(2, 132, 199, 0.15);
  --accent-blue: #2563eb;
  --accent-amber: #d97706;
  --accent-emerald: #16a34a;
  --accent-rose: #e11d48;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 0 25px rgba(2, 132, 199, 0.08);
}

html[data-theme="light"] body {
  background-color: #f8fafc !important;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.06) 0%, transparent 60%),
    radial-gradient(circle at 85% 80%, rgba(37, 99, 235, 0.04) 0%, transparent 40%),
    linear-gradient(to bottom, #f8fafc 0%, #f1f5f9 100%) !important;
  color: #0f172a !important;
}

/* Header & Title in Light Theme */
html[data-theme="light"] .header,
html[data-theme="light"] header.header {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

html[data-theme="light"] .main-title {
  background: linear-gradient(135deg, #0f172a 30%, #334155 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: #0f172a !important;
}

html[data-theme="light"] .subtitle {
  color: #64748b !important;
}

html[data-theme="light"] .brand-tag {
  background: rgba(2, 132, 199, 0.08) !important;
  border-color: rgba(2, 132, 199, 0.25) !important;
}

html[data-theme="light"] .tag-text {
  color: #0284c7 !important;
}

/* Mode Switcher Tabs */
html[data-theme="light"] .mode-switch-container {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="light"] .mode-btn {
  color: #64748b !important;
}

html[data-theme="light"] .mode-btn:hover {
  color: #0f172a !important;
  background: #f1f5f9 !important;
}

html[data-theme="light"] .mode-btn.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28) !important;
}

/* Resistor Visual Card */
html[data-theme="light"] .resistor-visual-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="light"] .resistor-visual-card::before {
  background: linear-gradient(90deg, transparent, rgba(2, 132, 199, 0.35), transparent) !important;
}

html[data-theme="light"] .card-caption {
  color: #64748b !important;
}

html[data-theme="light"] .quick-specs {
  background: rgba(2, 132, 199, 0.08) !important;
  border: 1px solid rgba(2, 132, 199, 0.25) !important;
  color: #0284c7 !important;
}

html[data-theme="light"] .resistor-text-label {
  fill: #64748b !important;
}

html[data-theme="light"] .bands-badge-row {
  border-top: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .band-badge {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

html[data-theme="light"] .band-badge:hover {
  border-color: #0284c7 !important;
  background: #f1f5f9 !important;
}

html[data-theme="light"] .badge-label {
  color: #64748b !important;
}

html[data-theme="light"] .badge-name {
  color: #0f172a !important;
}

/* Results Dashboard */
html[data-theme="light"] .result-tile {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05) !important;
}

html[data-theme="light"] .result-tile:hover {
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] .primary-result {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
  border: 1px solid rgba(2, 132, 199, 0.35) !important;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.1) !important;
}

html[data-theme="light"] .primary-result .value-number {
  color: #0f172a !important;
}

html[data-theme="light"] .primary-result .value-unit {
  color: #0284c7 !important;
}

html[data-theme="light"] .primary-result .value-tolerance {
  color: #d97706 !important;
}

html[data-theme="light"] .primary-result .raw-value-sub {
  color: #475569 !important;
}

html[data-theme="light"] .secondary-result .minmax-val {
  color: #0f172a !important;
}

html[data-theme="light"] .tile-tag,
html[data-theme="light"] .range-hint {
  color: #64748b !important;
}

/* Main Workbench Card & Topbar */
html[data-theme="light"] .workbench-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05) !important;
}

html[data-theme="light"] .workbench-topbar {
  border-bottom: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .config-label {
  color: #64748b !important;
}

html[data-theme="light"] .config-btn {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}

html[data-theme="light"] .config-btn:hover {
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html[data-theme="light"] .config-btn.active {
  background: rgba(2, 132, 199, 0.08) !important;
  border-color: #0284c7 !important;
  color: #0284c7 !important;
}

html[data-theme="light"] .btn-reset {
  background: rgba(244, 63, 94, 0.08) !important;
  border-color: rgba(244, 63, 94, 0.28) !important;
  color: #e11d48 !important;
}

html[data-theme="light"] .btn-reset:hover {
  background: #e11d48 !important;
  border-color: #e11d48 !important;
  color: #ffffff !important;
}

html[data-theme="light"] .panel-heading {
  color: #0f172a !important;
}

html[data-theme="light"] .panel-sub {
  color: #64748b !important;
}

/* Mode 1 Band Selectors */
html[data-theme="light"] .selector-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .selector-card:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05) !important;
}

html[data-theme="light"] .band-number {
  color: #0284c7 !important;
}

html[data-theme="light"] .band-role {
  color: #64748b !important;
}

html[data-theme="light"] .band-select {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

html[data-theme="light"] .band-select:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15) !important;
}

html[data-theme="light"] .band-select option {
  background: #ffffff !important;
  color: #0f172a !important;
}

html[data-theme="light"] .select-arrow {
  color: #64748b !important;
}

/* Mode 2 Form & Breakdown */
html[data-theme="light"] .input-label {
  color: #475569 !important;
}

html[data-theme="light"] .tech-input,
html[data-theme="light"] .unit-select,
html[data-theme="light"] .tech-select {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

html[data-theme="light"] .unit-select option,
html[data-theme="light"] .tech-select option {
  background: #ffffff !important;
  color: #0f172a !important;
}

html[data-theme="light"] .tech-input:focus,
html[data-theme="light"] .unit-select:focus,
html[data-theme="light"] .tech-select:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15) !important;
}

html[data-theme="light"] .input-helper {
  color: #64748b !important;
}

html[data-theme="light"] .validation-box {
  background: rgba(244, 63, 94, 0.08) !important;
  border-color: rgba(244, 63, 94, 0.3) !important;
  color: #e11d48 !important;
}

html[data-theme="light"] .color-sample {
  border: 1px solid rgba(0, 0, 0, 0.2) !important;
}

html[data-theme="light"] .reverse-sequence-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .seq-heading {
  color: #64748b !important;
}

html[data-theme="light"] .seq-item {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .seq-band-name {
  color: #64748b !important;
}

html[data-theme="light"] .seq-color-name {
  color: #0f172a !important;
}

html[data-theme="light"] .seq-val-note {
  color: #0284c7 !important;
}

/* Educational Reference Section */
html[data-theme="light"] .edu-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05) !important;
}

html[data-theme="light"] .edu-header {
  color: #0284c7 !important;
}

html[data-theme="light"] .edu-title {
  color: #0f172a !important;
}

html[data-theme="light"] .edu-col {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .edu-sub {
  color: #0f172a !important;
}

html[data-theme="light"] .formula-badge {
  background: rgba(2, 132, 199, 0.08) !important;
  border: 1px solid rgba(2, 132, 199, 0.2) !important;
  color: #0284c7 !important;
}

html[data-theme="light"] .edu-desc {
  color: #475569 !important;
}

html[data-theme="light"] .edu-desc code {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

html[data-theme="light"] .palette-table-wrapper {
  border-top: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .palette-chip {
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

