/* =============================================================================
   STYLES.CSS - Sistema de Diseño Premium para LG XBOOM RN9 SMPS Lab
   Dark Theme Profesional para Banco de Trabajo y Diagnóstico Electrónico
   ============================================================================= */

:root {
  --bg-main: #080c14;
  --bg-card: rgba(14, 21, 37, 0.75);
  --bg-card-hover: rgba(22, 33, 58, 0.9);
  --bg-surface: #0e1626;
  --bg-surface-elevated: #15223c;
  --bg-input: #0a0f1a;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(0, 242, 254, 0.4);
  --border-glow: rgba(0, 242, 254, 0.2);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Acentos de Taller y Electrónica */
  --neon-cyan: #00f2fe;
  --neon-cyan-dark: #0284c7;
  --neon-green: #10b981;
  --laser-amber: #f59e0b;
  --cyber-purple: #8b5cf6;
  --crimson-danger: #ef4444;
  --voltage-pink: #ec4899;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, Monaco, "Courier New", monospace;

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

  --shadow-glow-cyan: 0 0 20px rgba(0, 242, 254, 0.2);
  --shadow-glow-green: 0 0 20px rgba(16, 185, 129, 0.2);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset y base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(2, 132, 199, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.06) 0%, transparent 40%),
    linear-gradient(to bottom, rgba(8, 12, 20, 0.98), rgba(8, 12, 20, 1));
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* =============================================================================
   HEADER Y HUD SUPERIOR
   ============================================================================= */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(139, 92, 246, 0.25));
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-cyan);
  box-shadow: var(--shadow-glow-cyan);
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-badge {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: rgba(0, 242, 254, 0.1);
  color: var(--neon-cyan);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--neon-green);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--neon-green);
  animation: pulse-dot 2s infinite ease-in-out;
}

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

/* Multímetro Virtual HUD */
.header-hud {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.multimeter-box {
  background: #000;
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.85rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--font-mono);
  box-shadow: inset 0 0 10px rgba(0, 242, 254, 0.1);
  min-width: 170px;
}

.meter-probe-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.meter-screen-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.6);
  letter-spacing: 0.05em;
}

.meter-unit-label {
  font-size: 0.75rem;
  color: var(--laser-amber);
  font-weight: 600;
}

.quick-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.btn-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-pill.primary {
  background: linear-gradient(135deg, var(--neon-cyan-dark), #0369a1);
  border-color: var(--neon-cyan);
  color: #fff;
  box-shadow: var(--shadow-glow-cyan);
}

.btn-pill.primary:hover {
  background: linear-gradient(135deg, #0284c7, var(--neon-cyan-dark));
}

/* =============================================================================
   NAVEGACIÓN POR MÓDULOS / TABS
   ============================================================================= */
.nav-tabs-wrapper {
  background: rgba(14, 22, 38, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  white-space: nowrap;
  padding: 0.35rem 1.5rem;
  display: flex;
  gap: 0.4rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}

.nav-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.nav-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.nav-tab-btn.active {
  color: var(--neon-cyan);
  background: rgba(0, 242, 254, 0.08);
  border-color: rgba(0, 242, 254, 0.3);
  box-shadow: inset 0 0 12px rgba(0, 242, 254, 0.05);
}

.tab-badge {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.nav-tab-btn.active .tab-badge {
  background: var(--neon-cyan);
  color: #000;
  font-weight: 700;
}

/* =============================================================================
   CONTENEDOR PRINCIPAL Y SECCIONES
   ============================================================================= */
.main-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

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

.section-hero {
  margin-bottom: 2rem;
}

.section-hero h2 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-hero p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 900px;
}

/* =============================================================================
   TARJETAS Y CONTENEDORES GLASS
   ============================================================================= */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-title-group h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.tag-label {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
}

.tag-blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.tag-green { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.tag-amber { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.tag-purple { background: rgba(139, 92, 246, 0.2); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.4); }
.tag-pink { background: rgba(236, 72, 153, 0.2); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.4); }
.tag-red { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }

/* =============================================================================
   SIMULADOR INTERACTIVO DE ESQUEMA SMPS (CIRCUITO EN VIVO)
   ============================================================================= */
.circuit-simulator-box {
  background: #060a14;
  border: 1px solid var(--border-active);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(0, 242, 254, 0.05);
}

.sim-control-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.sim-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sim-group-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.sim-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.sim-toggle-btn.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--neon-green);
  color: var(--neon-green);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.sim-toggle-btn.off {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--crimson-danger);
  color: #fca5a5;
}

.toggle-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

.sim-btn-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.sim-btn-action:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.sim-btn-action.power-on {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(2, 132, 199, 0.4));
  border-color: var(--neon-cyan);
  color: #fff;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.power-icon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
}

.sim-btn-action.power-on .power-icon-dot {
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
}

.sim-slider {
  width: 100%;
  accent-color: var(--neon-cyan);
  cursor: pointer;
}

.sim-select {
  background: #000;
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  outline: none;
}

.sim-select:focus {
  border-color: var(--neon-cyan);
}

/* Header superior con inyector de falla / diagnóstico */
.sim-top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.sim-header-fault-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.7);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.sim-group-label-compact {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.sim-select-header {
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
  background: #020617;
  border-color: rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
}

/* =============================================================================
   CONSOLA DE MANDOS INTEGRADA DENTRO DEL CUADRO DE SIMULACIÓN (COCKPIT)
   ============================================================================= */
.sim-cockpit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: linear-gradient(180deg, rgba(13, 21, 38, 0.96) 0%, rgba(4, 8, 16, 0.94) 100%);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
}

.sim-cockpit-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sim-cockpit-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sim-cockpit-volume {
  flex: 1 1 340px;
  min-width: 270px;
}

.volume-header-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
}

.volume-status-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.35);
  color: var(--neon-cyan);
  transition: all 0.25s ease;
}

.volume-status-badge.boost-active {
  background: rgba(236, 72, 153, 0.22);
  border-color: #ec4899;
  color: #f472b6;
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.5);
  animation: pulse-boost 1s infinite alternate;
}

@keyframes pulse-boost {
  0% { transform: scale(1); box-shadow: 0 0 8px rgba(236, 72, 153, 0.4); }
  100% { transform: scale(1.02); box-shadow: 0 0 18px rgba(236, 72, 153, 0.85); }
}

.volume-slider-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.volume-quick-tags {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.btn-vol-preset {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-mono);
}

.btn-vol-preset:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: var(--neon-cyan);
}

.btn-vol-preset.btn-vol-max {
  border-color: rgba(236, 72, 153, 0.45);
  color: #f472b6;
  background: rgba(236, 72, 153, 0.12);
}

.btn-vol-preset.btn-vol-max:hover {
  background: rgba(236, 72, 153, 0.3);
  color: #fff;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

.sim-slider.slider-boost-active {
  accent-color: #ec4899;
}

/* Lienzo SVG y Wires */
.schematic-canvas-wrapper {
  background: #02050b;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem 1rem 1rem;
  overflow-x: auto;
  position: relative;
}

.schematic-svg {
  width: 100%;
  min-width: 850px;
  height: auto;
  display: block;
}

/* Cables / Conexiones con animación de flujo */
.wire {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.3s ease, opacity 0.3s ease;
}

.wire-ac { stroke: #3b82f6; stroke-dasharray: 6 4; animation: flowDash 1s linear infinite; }
.wire-bus { stroke: #8b5cf6; stroke-dasharray: 6 4; animation: flowDash 0.8s linear infinite; }
.wire-12v { stroke: #10b981; stroke-dasharray: 6 4; animation: flowDash 0.6s linear infinite; }
.wire-pvdd { stroke: #334155; }
.wire-pvdd.active-53v { stroke: #00f2fe; stroke-dasharray: 8 4; animation: flowDash 0.5s linear infinite; }
.wire-pvdd.active-58v { stroke: #ec4899; stroke-width: 4.5; stroke-dasharray: 8 4; animation: flowDash 0.3s linear infinite; }
.wire-vctrl { stroke: #334155; }
.wire-vctrl.active { stroke: #ec4899; stroke-dasharray: 5 3; animation: flowDash 0.4s linear infinite; }

.wire.dead {
  stroke: #334155 !important;
  animation: none !important;
  opacity: 0.4;
}

@keyframes flowDash {
  to {
    stroke-dashoffset: -20;
  }
}

/* Bloques esquemáticos */
.block-box {
  fill: #0c1527;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 1.5;
  transition: all 0.3s ease;
}

.block-box:hover {
  stroke: var(--neon-cyan);
  fill: #13223f;
}

.block-standby.active {
  stroke: var(--neon-green);
  fill: rgba(16, 185, 129, 0.08);
}

.block-power.active {
  stroke: var(--neon-cyan);
  fill: rgba(0, 242, 254, 0.08);
}

.block-power.boost {
  stroke: var(--voltage-pink);
  fill: rgba(236, 72, 153, 0.1);
}

.fuse-filament {
  stroke: var(--neon-cyan);
  stroke-width: 2.5;
}

.fuse-filament.blown {
  stroke: var(--crimson-danger);
  stroke-dasharray: 4 4;
}

.block-txt-title {
  fill: #fff;
  font-weight: 700;
  text-anchor: middle;
  font-family: var(--font-sans);
  pointer-events: none;
}

.block-txt-sub {
  fill: var(--text-muted);
  text-anchor: middle;
  font-family: var(--font-mono);
  pointer-events: none;
}

.conn-pin {
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1.5;
}

.pin-live-12v { fill: var(--neon-green); box-shadow: 0 0 10px var(--neon-green); }
.pin-gnd { fill: #475569; }

.conn-pin-txt {
  fill: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  alignment-baseline: middle;
}

/* Puntos de prueba Test Points */
.test-point-group {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.test-point-group:hover {
  transform: scale(1.2);
}

.tp-halo {
  fill: rgba(0, 242, 254, 0.15);
  stroke: var(--neon-cyan);
  stroke-width: 1.5;
  animation: pulse-halo 1.5s infinite ease-in-out;
}

@keyframes pulse-halo {
  0%, 100% { r: 9; opacity: 0.6; }
  50% { r: 12; opacity: 1; }
}

.tp-core {
  fill: #fff;
  stroke: #000;
  stroke-width: 1;
}

.tp-label {
  fill: var(--laser-amber);
  font-size: 8.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  text-anchor: middle;
  pointer-events: none;
  background: #000;
}

/* Banner de Estado del Simulador */
.sim-status-banner {
  margin-top: 0.85rem;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-main);
}


/* Grid de Bloques de la Fuente */
.stages-flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stage-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stage-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--stage-color, var(--neon-cyan));
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.stage-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--bg-surface-elevated);
}

.stage-card.selected {
  border-color: var(--stage-color, var(--neon-cyan));
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.15);
}

.stage-card.selected::before {
  opacity: 1;
}

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

.stage-num-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
}

.stage-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
}

.stage-card-summary {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.stage-voltage-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: #000;
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--neon-cyan);
}

/* Detalle de Etapa Expandida */
.stage-detail-container {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
}

.stage-detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
}

@media (max-width: 960px) {
  .stage-detail-grid {
    grid-template-columns: 1fr;
  }
}

.component-specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.component-specs-table th,
.component-specs-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.component-specs-table th {
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.component-specs-table td:first-child {
  font-weight: 600;
  color: #fff;
}

.measurements-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.measurement-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.meas-point {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.meas-cond {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.meas-val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--neon-green);
  background: #000;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  white-space: nowrap;
}

/* =============================================================================
   MÓDULO 2: EXPLORADOR DEL CONECTOR A MAIN BOARD (12 PINES)
   ============================================================================= */
.connector-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .connector-layout-grid {
    grid-template-columns: 1fr;
  }
}

.connector-pin-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pin-row-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.95rem;
  display: grid;
  grid-template-columns: 36px 90px 1fr 110px;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pin-row-item:hover {
  background: var(--bg-surface-elevated);
  border-color: rgba(255, 255, 255, 0.2);
}

.pin-row-item.active {
  border-color: var(--neon-cyan);
  background: rgba(0, 242, 254, 0.08);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.1);
}

.pin-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #000;
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
}

.pin-role-preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pin-volt-display {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: right;
  padding: 2px 6px;
  border-radius: 4px;
}

.pin-volt-display.volt-12v { color: var(--neon-green); background: rgba(16, 185, 129, 0.1); }
.pin-volt-display.volt-53v { color: var(--neon-cyan); background: rgba(0, 242, 254, 0.1); }
.pin-volt-display.volt-58v { color: var(--voltage-pink); background: rgba(236, 72, 153, 0.1); }
.pin-volt-display.volt-gnd { color: var(--text-dim); background: rgba(255, 255, 255, 0.05); }
.pin-volt-display.volt-sig { color: var(--laser-amber); background: rgba(245, 158, 11, 0.1); }

/* Detalle del Pin Seleccionado */
.pin-inspector-card {
  position: sticky;
  top: 90px;
}

.pin-hud-screen {
  background: #000;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.pin-screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.pin-screen-digits {
  font-size: 2.2rem;
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--neon-cyan);
  text-shadow: 0 0 15px rgba(0, 242, 254, 0.5);
}

.pin-screen-sub {
  font-size: 0.85rem;
  color: var(--laser-amber);
  margin-top: 0.25rem;
}

/* =============================================================================
   MÓDULO 3: FICHAS TÉCNICAS E INTEGRADOS
   ============================================================================= */
.ic-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.ic-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
}

.ic-card:hover {
  border-color: rgba(0, 242, 254, 0.4);
  box-shadow: var(--shadow-glow-cyan);
}

.ic-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.ic-title h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.ic-cat {
  font-size: 0.8rem;
  color: var(--neon-cyan);
}

.ic-pkg-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
}

.ic-specs-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin: 1rem 0;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.ic-spec-item {
  font-size: 0.8rem;
}

.ic-spec-lbl {
  color: var(--text-dim);
  font-size: 0.7rem;
  display: block;
}

.ic-spec-val {
  font-family: var(--font-mono);
  color: #fff;
  font-weight: 600;
}

.ic-pinout-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin: 1rem 0;
}

.ic-pinout-table th,
.ic-pinout-table td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.ic-pinout-table th {
  color: var(--text-dim);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.ic-advice-box {
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid var(--laser-amber);
  padding: 0.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.8rem;
  color: #fef3c7;
  margin-top: 1rem;
}

/* =============================================================================
   MÓDULO 4: PROTOCOLO DE PRUEBA EN BANCO SIN MAIN BOARD
   ============================================================================= */
.bench-guide-card {
  background: linear-gradient(135deg, rgba(14, 21, 37, 0.9), rgba(20, 30, 55, 0.9));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.safety-alert-banner {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #fca5a5;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.bench-steps-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.bench-step-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 50px 1fr 280px;
  align-items: center;
  gap: 1.5rem;
  transition: all var(--transition-fast);
}

@media (max-width: 900px) {
  .bench-step-item {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.bench-step-item:hover {
  border-color: rgba(0, 242, 254, 0.3);
  background: var(--bg-surface-elevated);
}

.bench-step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-cyan-dark), var(--neon-cyan));
  color: #000;
  font-weight: 800;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.bench-step-content h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
}

.bench-step-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.bench-step-expected {
  background: #000;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  font-size: 0.85rem;
}

.bench-step-expected-lbl {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
  display: block;
}

.bench-step-expected-val {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--neon-green);
}

/* Diagrama de Puentes / Jumpers */
.jumper-visual-box {
  background: #000;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-top: 2rem;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.9);
}

.jumper-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}

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

.jumper-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.jumper-card h5 {
  color: var(--neon-cyan);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.jumper-wiring-scheme {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: #000;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: #fff;
  margin: 0.5rem 0;
}

/* =============================================================================
   MÓDULO 5: SIMULADOR DE DIAGNÓSTICO DE FALLAS
   ============================================================================= */
.diagnostics-flow-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .diagnostics-flow-grid {
    grid-template-columns: 1fr;
  }
}

.symptoms-menu-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.symptom-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: left;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.symptom-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: rgba(255, 255, 255, 0.2);
}

.symptom-btn.active {
  border-color: var(--crimson-danger);
  background: rgba(239, 68, 68, 0.08);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.15);
}

.symptom-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.symptom-diff-badge {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--laser-amber);
}

.diagnostic-resolution-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.diag-scenario-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.diag-step-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.diag-step-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--neon-cyan);
  margin-bottom: 0.5rem;
}

.diag-actions-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.diag-actions-bullets li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-main);
}

.diag-actions-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--neon-cyan);
}

.diag-golden-rule {
  background: rgba(239, 68, 68, 0.12);
  border-left: 4px solid var(--crimson-danger);
  padding: 1rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: #fecaca;
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* =============================================================================
   MÓDULO 6: GALERÍA FOTOGRÁFICA Y DESPIECE VISUAL
   ============================================================================= */
.gallery-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.gallery-filter-btn {
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.gallery-filter-btn:hover {
  border-color: var(--neon-cyan);
  color: #fff;
  transform: translateY(-1px);
}

.gallery-filter-btn.active {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
  gap: 2rem;
}

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

.gallery-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.gallery-card:hover {
  border-color: var(--neon-cyan);
  box-shadow: var(--shadow-glow-cyan);
}

.gallery-img-box {
  position: relative;
  height: 260px;
  background: #000;
  overflow: hidden;
  cursor: pointer;
}

.gallery-img-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #060c18;
  transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-img-box img {
  transform: scale(1.03);
}

.gallery-img-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.6rem 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), transparent);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--neon-cyan);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gallery-info-box {
  padding: 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.gallery-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(0, 242, 254, 0.12);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 242, 254, 0.3);
  letter-spacing: 0.5px;
}

.gallery-info-box h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.gallery-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.gallery-section-block {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.gallery-section-block h5 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.gallery-comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.gallery-comp-table th,
.gallery-comp-table td {
  padding: 0.4rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.gallery-comp-table th {
  color: var(--neon-cyan);
  font-weight: 600;
  font-size: 0.75rem;
}

.gallery-comp-ref {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--voltage-pink);
  white-space: nowrap;
}

.gallery-meas-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.35rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
}

.gallery-meas-pt {
  font-weight: 600;
  color: #cbd5e1;
}

.gallery-meas-exp {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--neon-green);
  text-align: right;
  white-space: nowrap;
}

.gallery-repair-tip {
  border-left: 3px solid var(--laser-amber);
  background: rgba(245, 158, 11, 0.08);
  padding: 0.65rem 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.82rem;
  color: #fef3c7;
  line-height: 1.45;
}

/* =============================================================================
   MODAL / LIGHTBOX DE IMÁGENES
   ============================================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.open {
  display: flex;
}

.modal-content-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-xl);
  max-width: 1100px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
}

.modal-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title h3 {
  font-size: 1.15rem;
  color: #fff;
  font-weight: 700;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background var(--transition-fast);
}

.btn-close-modal:hover {
  background: var(--crimson-danger);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-img-wrapper {
  max-width: 100%;
  max-height: 60vh;
  display: flex;
  justify-content: center;
  background: #000;
  border-radius: var(--radius-md);
  padding: 0.5rem;
  border: 1px solid var(--border-subtle);
}

.modal-img-wrapper img {
  max-width: 100%;
  max-height: 58vh;
  object-fit: contain;
}

.modal-caption-text {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 800px;
}

/* =============================================================================
   FOOTER
   ============================================================================= */
.app-footer {
  border-top: 1px solid var(--border-subtle);
  background: #06090f;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.app-footer a {
  color: var(--neon-cyan);
  text-decoration: none;
}

.app-footer a:hover {
  text-decoration: underline;
}

/* =============================================================================
   RESPONSIVIDAD
   ============================================================================= */
@media (max-width: 640px) {
  .app-header {
    padding: 0.75rem 1rem;
  }
  .header-hud {
    width: 100%;
    justify-content: space-between;
  }
  .multimeter-box {
    flex-grow: 1;
  }
  .main-wrapper {
    padding: 1.25rem 1rem 3rem;
  }
}

/* =============================================================================
   ESTILOS DE IMPRESIÓN / EXPORTACIÓN A PDF (FICHA TÉCNICA DE BANCO)
   ============================================================================= */
@media print {
  @page {
    size: letter portrait;
    margin: 1.2cm 1cm;
  }

  *, *::before, *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    backdrop-filter: none !important;
    filter: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html, body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 10pt !important;
    line-height: 1.4 !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* Ocultar elementos de navegación e interactividad de pantalla */
  .app-header,
  .nav-tabs-wrapper,
  .quick-actions,
  .sim-control-panel,
  .sim-status-banner,
  .state-selector-bar,
  .app-footer,
  .btn-pill,
  .modal-overlay,
  .gallery-img-overlay,
  .tag-label {
    display: none !important;
  }

  .main-wrapper {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* Mostrar todas las pestañas de forma corrida y fluida sin páginas en blanco */
  .tab-pane {
    display: block !important;
    opacity: 1 !important;
    animation: none !important;
    margin-bottom: 2rem !important;
    page-break-after: auto !important;
  }

  /* Eliminar posición sticky y overflows que causan páginas vacías */
  .pin-inspector-card,
  .schematic-canvas-wrapper,
  .glass-card,
  .stage-card,
  .ic-card,
  .bench-step-item,
  .diagnostic-resolution-card {
    position: static !important;
    overflow: visible !important;
    max-height: none !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  /* Tarjetas y Contenedores */
  .glass-card,
  .stage-card,
  .ic-card,
  .bench-step-item,
  .diagnostic-resolution-card,
  .diag-step-box,
  .jumper-card {
    background: #fff !important;
    border: 1px solid #94a3b8 !important;
    border-radius: 4px !important;
    margin-bottom: 1rem !important;
    padding: 1rem !important;
  }

  /* Títulos y Encabezados */
  h1, h2, h3, h4, h5, h6 {
    color: #0f172a !important;
    font-weight: 700 !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  h2 {
    font-size: 15pt !important;
    border-bottom: 2px solid #0f172a !important;
    padding-bottom: 4px !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.75rem !important;
  }

  h3 { font-size: 13pt !important; }
  h4 { font-size: 11pt !important; }
  p, li, td, th {
    color: #1e293b !important;
    font-size: 10pt !important;
  }

  /* Grids adaptados para papel */
  .stages-flow-grid,
  .connector-layout-grid,
  .stage-detail-grid,
  .ic-grid-container,
  .diagnostics-flow-grid,
  .jumper-cards-grid {
    display: block !important;
  }

  .stage-card {
    margin-bottom: 0.75rem !important;
  }

  /* Tablas con bordes limpios */
  table, .component-specs-table, .ic-pinout-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 0.5rem 0 !important;
  }

  th, td {
    border: 1px solid #cbd5e1 !important;
    padding: 5px 8px !important;
    color: #000 !important;
  }

  th {
    background: #f1f5f9 !important;
    font-weight: 700 !important;
  }

  /* Esquema SVG adaptado para impresión en blanco y negro / color limpio */
  .schematic-canvas-wrapper {
    border: 1px solid #cbd5e1 !important;
    background: #fff !important;
    padding: 0.5rem !important;
  }

  .schematic-svg {
    min-width: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .block-box {
    fill: #f8fafc !important;
    stroke: #334155 !important;
    stroke-width: 1.5 !important;
  }

  .block-txt-title {
    fill: #0f172a !important;
    font-weight: 700 !important;
  }

  .block-txt-sub {
    fill: #475569 !important;
    font-weight: 600 !important;
  }

  .wire {
    stroke: #0284c7 !important;
    stroke-width: 2 !important;
    animation: none !important;
    stroke-dasharray: none !important;
    opacity: 1 !important;
  }

  .fuse-filament {
    stroke: #0f172a !important;
    stroke-width: 2 !important;
  }

  .conn-pin-txt,
  .tp-label {
    fill: #0f172a !important;
    font-weight: 700 !important;
  }

  .tp-halo {
    display: none !important;
  }

  .tp-core {
    fill: #0284c7 !important;
    stroke: #000 !important;
  }

  /* Galería e Imágenes Reales para impresión */
  .gallery-filter-bar {
    display: none !important;
  }

  .gallery-grid {
    display: block !important;
  }

  .gallery-card {
    background: #fff !important;
    border: 1px solid #94a3b8 !important;
    border-radius: 4px !important;
    margin-bottom: 1.5rem !important;
    padding: 0.75rem !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .gallery-img-box {
    height: 220px !important;
    background: #fff !important;
  }

  .gallery-img-box img {
    object-fit: contain !important;
    background: #fff !important;
  }

  .gallery-section-block {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    margin-top: 0.5rem !important;
    padding: 0.5rem !important;
  }

  .gallery-comp-table th, .gallery-comp-table td {
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
  }

  /* Pasos de Banco y Diagnósticos */
  .bench-step-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 1rem !important;
  }

  .bench-step-number {
    background: #0f172a !important;
    color: #fff !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 10pt !important;
    flex-shrink: 0 !important;
  }

  .bench-step-expected-val,
  .meas-val {
    font-family: var(--font-mono) !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    border: 1px solid #94a3b8 !important;
    padding: 2px 6px !important;
  }

  .diag-golden-rule,
  .safety-alert-banner,
  .ic-advice-box {
    border: 1px solid #0f172a !important;
    border-left: 4px solid #0f172a !important;
    background: #f8fafc !important;
    color: #000 !important;
    margin-top: 0.5rem !important;
  }
}

