/* Directo Asistencia — Estilo Editorial y Minimalista para Porfolio Privado */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --da-brand: #0D7C9D;
  --da-brand-dark: #084c61;
  --da-brand-light: #2da4c7;
  --da-dark: #0f172a;
  --da-surface: #ffffff;
  --da-bg: #f8fafc;
  --da-border: #e2e8f0;
  --da-muted: #64748b;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--da-bg);
  color: #1e293b;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .font-display {
  font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.02em;
}

/* Remate de marca sobrio en cabecera */
.header-brand-line {
  border-top: 3px solid var(--da-brand);
}

/* =========================================================================
   PANTALLA DE ACCESO Y SEGURIDAD (100% OPACA, SIN VISTA PREVIA)
   ========================================================================= */
#authScreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background-color: #020617;
}

html.da-unauthenticated #appContent {
  display: none !important;
}

html.da-unauthenticated #authScreen {
  display: flex !important;
}

html.da-authenticated #authScreen {
  display: none !important;
}

html.da-authenticated #appContent {
  display: flex !important;
}

/* =========================================================================
   VISOR A: SLIDER DESLIZANTE DE CORTINA (MINIMALISTA)
   ========================================================================= */
.curtain-container {
  position: relative;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
  background-color: #0b0f19;
}

.curtain-layer-bottom {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.curtain-layer-bottom img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.curtain-layer-top {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  overflow: hidden;
  will-change: width;
  border-right: 1.5px solid rgba(255, 255, 255, 0.9);
}

.curtain-inner-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
}

.curtain-inner-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.curtain-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ffffff;
  cursor: ew-resize;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.5);
}

/* Área de toque expandida para pantallas táctiles (móviles) */
.curtain-handle::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -24px;
  right: -24px;
  cursor: ew-resize;
}

.curtain-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
  pointer-events: none;
}

.curtain-handle:hover .curtain-button {
  transform: scale(1.1);
}

/* =========================================================================
   VISOR B: TIMELINE SCRUBBER CONTINUO (CROSSFADE)
   ========================================================================= */
.crossfade-layer {
  position: absolute;
  inset: 0;
  transition: opacity 0.25s ease-out;
  will-change: opacity;
}

.crossfade-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-range-input {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: #e2e8f0;
  outline: none;
}

.timeline-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--da-brand);
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(13, 124, 157, 0.35);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.timeline-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* =========================================================================
   VISOR C: HOTSPOTS DE INSPECCIÓN TÉCNICA
   ========================================================================= */
.hotspot-pin {
  position: absolute;
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

/* Área táctil generosa de 48px para dedos */
.hotspot-pin::before {
  content: '';
  position: absolute;
  inset: -6px;
}

.hotspot-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(13, 124, 157, 0.4);
  animation: hotspot-pulse-ring 2.2s cubic-bezier(0.2, 0, 0.2, 1) infinite;
}

.hotspot-dot {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  color: #0f172a;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.hotspot-pin:hover .hotspot-dot,
.hotspot-pin.active .hotspot-dot {
  background: var(--da-brand);
  color: #ffffff;
  transform: scale(1.2);
}

@keyframes hotspot-pulse-ring {
  0% { transform: scale(0.7); opacity: 0.9; }
  80%, 100% { transform: scale(2.2); opacity: 0; }
}

/* =========================================================================
   VISOR D: MATRIZ CUÁDRUPLE Y LUPA SINCRONIZADA
   ========================================================================= */
.matrix-quadrant {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.sync-crosshair {
  position: absolute;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: rgba(13, 124, 157, 0.2);
  pointer-events: none;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 40;
  box-shadow: 0 0 12px rgba(13, 124, 157, 0.6);
}

.sync-crosshair::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -8px;
  right: -8px;
  height: 1px;
  background: rgba(255, 255, 255, 0.85);
}

.sync-crosshair::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -8px;
  bottom: -8px;
  width: 1px;
  background: rgba(255, 255, 255, 0.85);
}

/* Estilos de impresión */
@media print {
  .no-print {
    display: none !important;
  }
}
