@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Raleway:wght@400;500;600;700;800;900&display=swap');

:root {
  --black: #030303;
  --gray-start: #161616;
  --gray-end: #2b2b2b;
  --white: #ffffff;
  --red: #e41517;
  --pink: #df7879;
  --header-h: clamp(72px, 9vw, 110px);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Raleway', 'Segoe UI', Arial, sans-serif;
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

button { font-family: inherit; cursor: pointer; }

/* ===================== HEADER ===================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 64px);
  z-index: 1000;
  background: transparent;
  pointer-events: none;
  transition: background 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              backdrop-filter 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              -webkit-backdrop-filter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-bottom: 1px solid transparent;
}
.site-header * { pointer-events: auto; }

/* Fondo oscuro elegante animado: SOLO aparece al hacer scroll hacia abajo */
.site-header.is-scrolled {
  background: linear-gradient(180deg, rgba(3, 3, 5, 0.96) 0%, rgba(10, 10, 14, 0.92) 100%) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.85), 0 1px 0 rgba(255, 255, 255, 0.04) inset !important;
  pointer-events: auto;
}

/* En la pantalla de INICIO (tanto en móvil como en PC), no mostrar la barra de sesión superior derecha */
body.on-inicio .user-session-bar {
  display: none !important;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 40px);
}

.nav-item {
  background: none;
  border: 4px solid transparent;
  color: var(--white);
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-weight: 700;
  font-size: clamp(11.5px, 0.95vw, 15px);
  letter-spacing: 0.06em;
  padding: 10px 20px;
  border-radius: 2px;
  transition: border-color .35s ease, background-color .35s ease, transform .2s ease;
  white-space: nowrap;
}
.nav-item:hover { transform: translateY(-1px); }
.nav-item.is-active {
  border-color: var(--white);
}

/* ===================== USER SESSION BAR (HEADER) ===================== */
.user-session-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-session-pill {
  display: none; /* Oculto por defecto para visitantes no autenticados */
  align-items: center;
  gap: 8px;
  background: rgba(18, 18, 24, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: all .25s ease;
}

.user-session-initials {
  display: inline-block !important;
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.05em;
}

.user-session-pill.is-logged-in {
  display: flex !important;
}

/* Ocultar botones de navegación SEGUIMIENTO y DASHBOARD si el usuario no ha iniciado sesión */
body:not(.is-user-authenticated) .nav-item[data-target="seguimiento"],
body:not(.is-user-authenticated) .nav-item[data-target="dashboard"] {
  display: none !important;
}

.user-session-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #71717a;
  box-shadow: none;
  transition: all .25s ease;
}

.user-session-pill.is-logged-in .user-session-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* En el header solo se muestran las iniciales para seguimiento y dashboard */
.user-session-name {
  display: none !important;
}

.user-session-badge {
  display: none !important;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 6px 12px;
  border-radius: 9999px;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all .2s ease;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1px);
}

.mobile-hero-brand {
  display: none;
}

.hero-brand {
  margin-bottom: clamp(16px, 2.4vh, 28px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}
.hero-brand .brand-logo {
  width: clamp(230px, 18.5vw, 340px);
  height: auto;
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.55));
}

/* ===================== MAIN / PAGES ===================== */
#main {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.page {
  position: absolute;
  inset: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(28px);
  transition: opacity .5s ease, transform .5s ease;
  background: var(--black);
  overflow: hidden;
}
.page::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  background: linear-gradient(to bottom, var(--gray-start), var(--gray-end));
}

#seguimiento {
  --split-x: 50%;
}
#seguimiento::before {
  left: var(--split-x, 50%);
  right: 0;
  width: auto;
}
.page.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.page.is-leaving {
  opacity: 0;
  transform: translateY(-28px);
}

.page-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.content-col {
  position: relative;
  width: 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: calc(var(--header-h) + 16px) clamp(24px, 4.5vw, 80px) 40px clamp(20px, 3vw, 48px);
  box-sizing: border-box;
}

/* ---------- decorative bits (grid + empty dots, sit in the black panel) ---------- */
.deco-grid {
  position: absolute;
  left: 0;
  top: 41.2%;
  width: clamp(130px, 9.35vw, 200px);
  z-index: 1;
  opacity: 0.95;
}
.deco-grid img { width: 100%; height: auto; display: block; }

.deco-dots--empty {
  position: absolute;
  z-index: 1;
  left: clamp(16px, 2vw, 36px);
  bottom: clamp(20px, 5vh, 56px);
  width: clamp(64px, 6vw, 100px);
}

.deco-dots--filled {
  width: clamp(70px, 6.2vw, 120px);
  flex-shrink: 0;
  margin-left: clamp(20px, 6.5vw, 120px);
  transform: translateY(12px);
}

/* ---------- visual column: spans the full black panel, full page height ---------- */
.visual-col {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  pointer-events: none;
}

.persona-img {
  position: absolute;
  z-index: 2;
  left: 37%;
  bottom: -1.5%;
  transform: translateX(-50%);
  height: 77%;
  width: auto;
  max-width: none;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,0.45));
}

.panel-icon {
  position: absolute;
  z-index: 2;
  left: 25%;
  bottom: 10%;
  transform: translateX(-50%);
  font-size: clamp(90px, 11vw, 160px);
  line-height: 1;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.5));
}

.hero-title {
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-weight: 800;
  font-size: clamp(34px, 4.4vw, 76px);
  line-height: 0.98;
  text-align: right;
  letter-spacing: 0.02em;
  width: 100%;
}

.hero-subtitle br.m-break { display: none; }

.hero-subtitle {
  margin-top: clamp(18px, 2.4vw, 30px);
  text-align: right;
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: clamp(12.5px, 0.95vw, 16px);
  color: #d8d8d8;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.03em;
  margin-left: auto;
  margin-right: 0;
  max-width: 540px;
  width: 100%;
}

.cta-row {
  margin-top: clamp(28px, 3.8vw, 54px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.btn-next {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  color: var(--black);
  border: none;
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-weight: 800;
  font-size: clamp(12px, 0.95vw, 15px);
  letter-spacing: 0.06em;
  padding: 16px 26px;
  border-radius: 2px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255,255,255,0.15);
}
.btn-next .arrow {
  font-size: 1.2em;
  transform: translateY(-1px);
}
.btn-next--static { align-self: flex-end; margin-top: 8px; }

/* ===================== SCROLLBAR HIDE HELPER ===================== */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* ===================== GLASS CALENDAR ===================== */
.calendar-col {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: auto;
  padding: calc(var(--header-h) + 16px) clamp(20px, 3.5vw, 60px) 30px;
  box-sizing: border-box;
}

.glass-calendar-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  border-radius: 28px;
  padding: 22px;
  background: rgba(16, 16, 20, 0.45);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  margin-top: clamp(-72px, -7.5vh, -48px);
  transition: transform .3s ease, box-shadow .3s ease;
}
.glass-calendar-card:hover {
  box-shadow: 0 30px 70px -12px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Puerto de salida del flujo de datos en el calendario */
.gc-data-port {
  position: absolute;
  right: -9px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 15;
}
.gc-data-port-ping {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  animation: pingWhite 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.gc-data-port-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 12px 2px #ffffff;
}

.gc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gc-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.gc-tab {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 7px;
  transition: all .2s ease;
  cursor: pointer;
}
.gc-tab.is-active {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.gc-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.03em;
}
.gc-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  transition: background .3s, box-shadow .3s;
}
.gc-status-pill.offline .gc-status-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.gc-month-row {
  margin: 18px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gc-month-title {
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: clamp(19px, 1.9vw, 26px);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: capitalize;
  user-select: none;
}
.gc-nav-btns {
  display: flex;
  gap: 6px;
}
.gc-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.gc-nav-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.gc-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin: 6px 0 10px;
  padding: 0 2px;
}
.gc-weekdays-row span {
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  user-select: none;
}

.gc-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px 4px;
  padding: 2px 2px 6px;
  justify-items: center;
  align-items: center;
}

.gc-day-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: all .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gc-day-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}
.gc-day-btn.is-other-month {
  color: rgba(255, 255, 255, 0.22);
}
.gc-day-btn.is-empty {
  visibility: hidden;
  pointer-events: none;
}
.gc-day-btn.is-today::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f472b6;
}
.gc-day-btn.has-data::before {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px #34d399;
}
.gc-day-btn.is-selected {
  background: linear-gradient(135deg, #ec4899 0%, #f97316 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(236,72,153,0.45);
  font-weight: 800;
  transform: scale(1.05);
}

.gc-divider {
  margin-top: 14px;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.gc-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.gc-footer-link {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: color .2s;
}
.gc-footer-link:hover {
  color: #ffffff;
  text-decoration: underline;
}
.gc-today-btn {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 10px;
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.gc-today-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ===================== TERMINAL LOADER CONNECTOR (Línea Animada Blanca) ===================== */
.terminal-loader-connector {
  position: absolute;
  top: calc(50% + 28px);
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

/* Línea continua con flujo de energía animado permanente */
.tl-full-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), #ffffff 15%, #ffffff 85%, rgba(255, 255, 255, 0.2));
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.85);
  transform: translateY(-50%);
  z-index: 1;
  overflow: hidden;
}
.tl-full-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80px;
  width: 80px;
  height: 100%;
  background: linear-gradient(90deg, transparent, #ffffff 50%, transparent);
  box-shadow: 0 0 14px 4px #ffffff;
  animation: lineEnergyStream 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes lineEnergyStream {
  0% { left: -80px; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.tl-line {
  height: 2px;
  width: clamp(35px, 5.5vw, 90px);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), #ffffff);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.85);
  position: relative;
  flex-shrink: 0;
  z-index: 2;
}
.tl-line--right {
  background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.2));
}

/* El recuadro del Terminal Loader permanece invisible en reposo y se hace visible únicamente al guardar */
.tl-box {
  position: relative;
  background: rgba(12, 12, 16, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.9), 0 0 24px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: hidden;
  min-width: 170px;
  z-index: 5;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.92);
  transition: opacity .35s cubic-bezier(0.16, 1, 0.3, 1), transform .35s cubic-bezier(0.16, 1, 0.3, 1), visibility .35s cubic-bezier(0.16, 1, 0.3, 1);
}
.tl-box.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
}

.tl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 4px;
}

.tl-label {
  font-family: 'Courier New', Courier, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #ffffff;
  opacity: 0.85;
}

.tl-sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px #ffffff;
  animation: pulseDot 1.2s infinite alternate;
}

.tl-screen {
  position: relative;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  line-height: 1.1;
  letter-spacing: 0.22em;
  color: #ffffff;
  overflow: hidden;
  white-space: pre;
}

.tl-row {
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.7);
  user-select: none;
}

.tl-slider-block {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 16px;
  background: #ffffff;
  box-shadow: 0 0 14px 2px #ffffff;
  opacity: 0.4;
  pointer-events: none;
  transition: left 0.045s linear, opacity 0.3s ease;
}
.tl-slider-block.is-active {
  opacity: 0.9;
  box-shadow: 0 0 18px 4px #ffffff;
}

.tl-pulse-beam {
  position: absolute;
  top: 50%;
  left: -200px;
  width: 90px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ffffff, transparent);
  box-shadow: 0 0 18px 5px #ffffff;
  border-radius: 9999px;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
}
.tl-pulse-beam.is-firing {
  animation: pulseLaser .6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes pulseLaser {
  0% {
    left: 0%;
    opacity: 0;
    transform: translateY(-50%) scaleX(0.4);
  }
  20% {
    opacity: 1;
    transform: translateY(-50%) scaleX(1);
  }
  80% {
    opacity: 1;
    transform: translateY(-50%) scaleX(1);
  }
  100% {
    left: calc(100% - 90px);
    opacity: 0;
    transform: translateY(-50%) scaleX(0.4);
  }
}

/* ===================== CONTACT CARD FORM (shadcn/ui style) ===================== */
#seguimiento .content-col {
  width: 50%;
  max-width: none;
  padding-top: calc(var(--header-h) + 16px);
  padding-bottom: 30px;
  padding-left: clamp(24px, 3.5vw, 60px);
  padding-right: clamp(16px, 2.5vw, 40px);
  justify-content: center;
  align-items: flex-start; /* Se traslada a la izquierda para centrarlo más cerca del conector (Imagen 3) */
  box-sizing: border-box;
}

/* ===================== PERSONAS EN SEGUIMIENTO ===================== */
.seg-persona-center {
  position: absolute;
  bottom: 0;
  left: var(--split-x, 50%);
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  line-height: 0;
  margin: 0;
  padding: 0;
}
.persona-center-img {
  height: clamp(230px, 32vh, 360px);
  width: auto;
  display: block;
  vertical-align: bottom;
  margin-bottom: 0;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.55));
}

.seg-persona-right {
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  line-height: 0;
  margin: 0;
  padding: 0;
}
.persona-right-img {
  height: clamp(520px, 72vh, 820px);
  width: auto;
  display: block;
  vertical-align: bottom;
  margin: 0;
  filter: drop-shadow(-10px 18px 36px rgba(0, 0, 0, 0.5));
}

.seg-persona-mobile {
  display: none;
}

/* Puntos llenos decorativos en la parte superior central de Seguimiento */
.seg-deco-dots-top {
  position: absolute;
  top: clamp(88px, 11.2vh, 126px);
  left: var(--split-x, 50%);
  transform: translateX(-50%);
  z-index: 4;
  pointer-events: none;
  opacity: 0.95;
}
.seg-deco-dots-top img {
  width: clamp(90px, 8vw, 130px);
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.5));
}

.contact-card {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: rgba(16, 16, 22, 0.65);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: clamp(18px, 2.4vw, 28px);
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #ffffff;
  box-sizing: border-box;
  margin-left: 0; /* Sin margin-left auto para que no se pegue al canto derecho */
  margin-right: auto;
  margin-top: clamp(-72px, -7.5vh, -48px);
  transition: box-shadow .3s ease;
}
.contact-card:hover {
  box-shadow: 0 30px 70px -10px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

/* Iconos PlusIcon en las 4 esquinas de ContactCard */
.contact-plus {
  position: absolute;
  width: 22px;
  height: 22px;
  color: #ffffff;
  pointer-events: none;
  z-index: 12;
  opacity: 0.9;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6));
}
.contact-plus.top-left { top: -11px; left: -11px; }
.contact-plus.top-right { top: -11px; right: -11px; }
.contact-plus.bottom-left { bottom: -11px; left: -11px; }
.contact-plus.bottom-right { bottom: -11px; right: -11px; }

/* Puerto de entrada de la línea conectora */
.cc-data-port {
  position: absolute;
  left: -9px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 15;
}
.cc-data-port-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 12px 2px #ffffff;
}

.contact-card__header {
  margin-bottom: 14px;
}
.contact-card__header .hero-title {
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-weight: 800;
  font-size: clamp(17px, 1.85vw, 25px);
  white-space: nowrap;
  line-height: 1.15;
  text-align: right;
  letter-spacing: 0.02em;
}
.contact-card__header .hero-subtitle {
  margin-top: 8px;
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: clamp(10.5px, 0.72vw, 12px);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.02em;
  text-align: right;
  max-width: 100%;
  color: #d1d5db;
}

/* Chips estilo ContactInfo */
.contact-info-list {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: nowrap;
  margin-top: 12px;
  width: 100%;
  box-sizing: border-box;
}
.contact-info-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 10px;
  flex: 1 1 0;
  min-width: 0;
  transition: border-color .2s, background .2s;
  box-sizing: border-box;
}
.contact-info-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}
.cip-icon {
  display: flex;
  align-items: center;
  color: #ffffff;
  opacity: 0.85;
}
.cip-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.cip-label {
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 8px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.1;
}
.cip-val {
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

/* Formulario */
.contact-card__form-wrapper {
  margin-top: 10px;
}
.tracking-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  width: 100%;
}
.form-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: right;
  align-items: flex-end;
}
.form-row label {
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #9ca3af;
  text-transform: uppercase;
  text-align: right;
  width: 100%;
}
.form-row input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: var(--white);
  padding: 8px 12px;
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: right;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.form-row input:focus {
  outline: none;
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 1px #ffffff, 0 0 12px rgba(255, 255, 255, 0.2);
}
.form-row input::placeholder {
  color: #6b7280;
}

/* Ocultar botones nativos horribles del navegador (Imagen 3) */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Stepper personalizado enterprise con triángulos finos */
.input-stepper-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}
.input-stepper-wrap input {
  padding-right: 28px;
}
.stepper-controls {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 3;
}
.stepper-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 2px 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 2px;
  transition: color .15s ease, background .15s ease, transform .1s ease;
}
.stepper-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}
.stepper-btn:active {
  transform: scale(0.9);
}
.stepper-btn svg {
  display: block;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-top: 4px;
}
.form-feedback {
  width: 100%;
  text-align: right;
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  min-height: 20px;
  transition: opacity .3s;
}
.form-feedback.success { color: #34d399; }
.form-feedback.error { color: #f87171; }
.form-feedback.info { color: #60a5fa; }

/* Animaciones */
@keyframes pingWhite {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}
@keyframes pulseDot {
  0% { opacity: 0.35; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.2); }
}

/* ===================== GLASS MODAL / HISTORIAL ===================== */
.glass-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease, visibility .3s ease;
}
.glass-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.glass-modal-card {
  background: rgba(18, 18, 22, 0.92);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  width: 100%;
  max-width: 840px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
  color: #ffffff;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-title-group h3 {
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.modal-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 10px;
  border-radius: 999px;
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #d1d5db;
}
.modal-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all .2s;
}
.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.modal-table-container {
  overflow-y: auto;
  padding: 12px 24px 24px;
}
.glass-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.glass-table th {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  color: #9ca3af;
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.glass-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #e5e5e5;
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 11px;
  font-weight: 500;
}
.glass-table tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}
.tbl-actions {
  display: flex;
  gap: 6px;
}
.tbl-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all .2s;
}
.tbl-btn:hover {
  background: #ffffff;
  color: #000000;
}
.tbl-btn--del {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
}
.tbl-btn--del:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}
.tbl-empty {
  text-align: center;
  padding: 36px 12px;
  color: #9ca3af;
  font-size: 13px;
}

/* ===================== DASHBOARD Power BI & Stat Cards ===================== */
.dashboard-visual-col {
  z-index: 20;
  pointer-events: none;
}

.powerbi-wrapper {
  position: absolute;
  top: calc(var(--header-h) + clamp(16px, 2.5vh, 32px));
  bottom: clamp(36px, 5vh, 64px);
  left: clamp(24px, 3.5vw, 60px);
  right: clamp(560px, 43vw, 780px);
  background: rgba(14, 14, 18, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  overflow: hidden;
  z-index: 25;
  pointer-events: auto;
  display: flex;
  transition: box-shadow .3s ease;
}
.powerbi-wrapper:hover {
  box-shadow: 0 30px 70px -10px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.powerbi-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  pointer-events: auto;
}

#dashboard .page-inner {
  pointer-events: none;
}
#dashboard .content-col {
  pointer-events: auto;
}

@media (min-width: 901px) {
  #dashboard .page-inner {
    justify-content: flex-end;
    pointer-events: none;
  }
  #dashboard .content-col {
    pointer-events: auto;
    width: clamp(480px, 40vw, 680px);
    align-items: center;
    text-align: center;
    padding-left: clamp(16px, 2vw, 32px);
    padding-right: clamp(24px, 4vw, 70px);
  }
  #dashboard .hero-title {
    text-align: center;
  }
  #dashboard .hero-subtitle {
    text-align: center;
  }
  #dashboard .stat-cards {
    justify-content: center;
  }
}

.stat-cards {
  margin-top: clamp(26px, 3.5vw, 40px);
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  flex-wrap: wrap;
  width: 100%;
}
.stat-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  padding: 20px 26px;
  min-width: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.stat-value {
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--white);
}
.stat-label {
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #b8b8b8;
  text-align: center;
}

/* ===================== 3D SIGN IN CARD (SIGN-IN-CARD-2) ===================== */
#inicio .page-inner {
  align-items: center;
  justify-content: flex-end;
  padding: 0;
  min-height: 100vh;
}

.content-col--inicio {
  align-items: center;
  justify-content: center;
  padding: 0 clamp(20px, 3.5vw, 60px);
  margin: 0;
}

#inicio .hero-brand {
  margin: 0 0 clamp(38px, 4.5vh, 48px) 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

#inicio .hero-brand .brand-logo {
  width: clamp(240px, 16vw, 300px);
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.6));
}

.signin-card-container {
  perspective: 1500px;
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 10;
  margin: 0 auto;
}

.cta-row--inicio {
  margin-top: clamp(38px, 4.5vh, 48px);
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.cta-row--inicio .deco-dots--filled {
  margin: 0 auto;
  transform: none;
  width: clamp(120px, 8.5vw, 155px);
}

.mobile-persona-bottom {
  display: none;
}

.signin-card-3d {
  position: relative;
  width: 100%;
  background: rgba(13, 13, 18, 0.65);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  overflow: hidden;
  isolation: isolate;
  will-change: transform;
}

/* =========================================================================
   CONTROL DE LUCES Y MOVIMIENTO SEGÚN ESTADO DE AUTENTICACIÓN:
   - NO logueado: tarjeta estática, luces perimetrales y resplandores APAGADOS
   - Logueado (.is-logged-in): luces encendidas y efecto 3D reactivo habilitado
   ========================================================================= */
.signin-card-3d:not(.is-logged-in) {
  transform: none !important;
  transition: box-shadow 0.3s ease !important;
}

.signin-card-3d:not(.is-logged-in) .card-beam,
.signin-card-3d:not(.is-logged-in) .card-corner-glow {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  animation: none !important;
}

.signin-card-3d:not(.is-logged-in):hover {
  transform: none !important;
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.signin-card-3d.is-logged-in .card-beam,
.signin-card-3d.is-logged-in .card-corner-glow {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.signin-card-3d.is-logged-in:hover {
  box-shadow: 0 35px 80px -10px rgba(0, 0, 0, 0.92), 0 0 30px rgba(96, 165, 250, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Traveling border light beams */
@keyframes beamTop {
  0% { left: -50%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

@keyframes beamRight {
  0% { top: -50%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

@keyframes beamBottom {
  0% { right: -50%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { right: 100%; opacity: 0; }
}

@keyframes beamLeft {
  0% { bottom: -50%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { bottom: 100%; opacity: 0; }
}

.card-beam {
  position: absolute;
  pointer-events: none;
  z-index: 5;
}

.card-beam--top {
  top: 0;
  left: -50%;
  width: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffffff, #60a5fa, transparent);
  box-shadow: 0 0 12px 2px rgba(96, 165, 250, 0.8);
  animation: beamTop 3.6s linear infinite;
}

.card-beam--right {
  right: 0;
  top: -50%;
  width: 2px;
  height: 50%;
  background: linear-gradient(180deg, transparent, #ffffff, #a855f7, transparent);
  box-shadow: 0 0 12px 2px rgba(168, 85, 247, 0.8);
  animation: beamRight 3.6s linear infinite 0.9s;
}

.card-beam--bottom {
  bottom: 0;
  right: -50%;
  width: 50%;
  height: 2px;
  background: linear-gradient(270deg, transparent, #ffffff, #60a5fa, transparent);
  box-shadow: 0 0 12px 2px rgba(96, 165, 250, 0.8);
  animation: beamBottom 3.6s linear infinite 1.8s;
}

.card-beam--left {
  left: 0;
  bottom: -50%;
  width: 2px;
  height: 50%;
  background: linear-gradient(0deg, transparent, #ffffff, #a855f7, transparent);
  box-shadow: 0 0 12px 2px rgba(168, 85, 247, 0.8);
  animation: beamLeft 3.6s linear infinite 2.7s;
}

/* Corner Glows */
.card-corner-glow {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(20px);
  z-index: 1;
}

.card-corner-glow.top-left {
  top: -20px;
  left: -20px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.28) 0%, transparent 70%);
}

.card-corner-glow.bottom-right {
  bottom: -20px;
  right: -20px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.25) 0%, transparent 70%);
}

/* Card Content */
.signin-card-content {
  position: relative;
  z-index: 6;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}

.signin-card-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.signin-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.signin-tag {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 2px 7px;
  border-radius: 4px;
}

.signin-auth-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #a1a1aa;
}

.signin-auth-status .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.signin-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: #ffffff;
  margin: 0;
  line-height: 1.15;
}

.signin-desc {
  font-size: 12px;
  color: #a1a1aa;
  line-height: 1.45;
  margin: 0;
}

/* Tabs */
.signin-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.signin-tab {
  padding: 8px 12px;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #9ca3af;
  background: transparent;
  border: none;
  border-radius: 8px;
  transition: all .25s ease;
  cursor: pointer;
}

.signin-tab:hover {
  color: #ffffff;
}

.signin-tab.is-active {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Forms */
.signin-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
  width: 100%;
}

.signin-input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
}

.signin-input-group label {
  font-family: 'Orbitron', sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #d4d4d8;
  text-transform: uppercase;
}

.signin-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.signin-input-wrap input {
  width: 100%;
  padding: 11px 40px 11px 36px;
  background: rgba(18, 18, 24, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
  box-sizing: border-box;
}

.signin-input-wrap input:focus {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(25, 25, 32, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08), 0 0 16px rgba(96, 165, 250, 0.2);
}

.signin-icon {
  position: absolute;
  left: 11px;
  display: flex;
  align-items: center;
  color: #71717a;
  pointer-events: none;
  transition: color .2s ease;
}

.signin-input-wrap input:focus ~ .signin-icon,
.signin-input-wrap:focus-within .signin-icon {
  color: #ffffff;
}

.btn-toggle-pwd {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: #71717a;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color .2s ease;
  cursor: pointer;
}

.btn-toggle-pwd:hover {
  color: #ffffff;
}

.input-hint {
  font-size: 10.5px;
  color: #71717a;
  margin-top: 1px;
}

/* Custom Checkbox & Meta */
.signin-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1px;
}

.custom-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 11.5px;
  color: #d4d4d8;
}

.custom-checkbox input {
  display: none;
}

.checkbox-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
  box-sizing: border-box;
}

.custom-checkbox input:checked + .checkbox-box {
  background: #ffffff;
  border-color: #ffffff;
}

.custom-checkbox input:checked + .checkbox-box::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid #000000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-0.5px, -0.5px);
  display: block;
}

.link-btn {
  background: none;
  border: none;
  font-size: 11px;
  color: #9ca3af;
  transition: color .2s ease;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-btn:hover {
  color: #ffffff;
}

/* Submit & Action Buttons */
.signin-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  background: #ffffff;
  color: #000000;
  border: none;
  border-radius: 10px;
  font-family: 'Orbitron', sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .25s ease, background-color .2s ease;
  position: relative;
  margin-top: 4px;
}

.signin-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.25);
  background: #f4f4f5;
}

.signin-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.signin-secondary-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #d4d4d8;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all .2s ease;
  margin-top: 4px;
}

.signin-secondary-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.signup-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Spinner */
.btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: #000000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.is-loading .btn-spinner {
  display: inline-block;
}

.is-loading .btn-arrow {
  display: none;
}

/* Feedback Messages */
.signin-msg {
  font-size: 11.5px;
  line-height: 1.45;
  padding: 8px 12px;
  border-radius: 8px;
  display: none;
  text-align: left;
  margin-top: 2px;
}

.signin-msg.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.signin-msg.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.signin-msg.info {
  display: block;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

/* Active Session Panel */
.signin-active-session {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 10px 0 6px;
}

.active-session-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.12);
}

.active-session-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.active-greeting {
  font-size: 11px;
  color: #9ca3af;
}

.active-name {
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.active-role-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  margin-top: 2px;
}

.active-role-badge.is-admin {
  background: rgba(234, 179, 8, 0.2);
  border-color: rgba(234, 179, 8, 0.4);
  color: #fde047;
}

.active-email {
  font-size: 11px;
  color: #71717a;
  margin-top: 1px;
}

.active-session-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
}

.cta-row--inicio {
  margin-top: 18px;
  justify-content: flex-end;
}

/* ===================== ADMIN FILTER BAR (HISTORIAL & SEGUIMIENTO) ===================== */
.admin-history-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  margin: 0 20px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-size: 12px;
  color: #d4d4d8;
  box-sizing: border-box;
}

.admin-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #fde047;
  white-space: nowrap;
}

.admin-advisor-select {
  background: rgba(16, 16, 22, 0.9);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 12px;
  outline: none;
  flex: 1;
  cursor: pointer;
  transition: border-color .2s ease;
}

.admin-advisor-select:focus {
  border-color: #60a5fa;
}

.admin-switch-asesor {
  background: rgba(16, 16, 22, 0.92);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-family: inherit;
  outline: none;
  margin-top: 3px;
  cursor: pointer;
}

/* ===================== DASHBOARD CRM ANALYTICS ===================== */
#dashboard.dashboard-page,
#dashboard.dashboard-page.is-active {
  position: absolute;
  inset: 0;
  min-height: 100vh;
  height: 100vh;
  overflow-y: auto !important;
  overflow-x: hidden;
  background: var(--black);
  padding: calc(var(--header-h) + 20px) clamp(16px, 4vw, 56px) 60px;
  box-sizing: border-box;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  transform: none !important;
}
#dashboard.dashboard-page::before {
  display: none !important;
}
#dashboard.dashboard-page .page-inner,
#dashboard.dashboard-page .visual-col,
#dashboard.dashboard-page .deco-grid,
#dashboard.dashboard-page .deco-dots {
  display: none !important;
}

.dash-container {
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

/* 1. Top CRM Header */
.dash-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 24px;
  background: rgba(18, 18, 24, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.dash-title-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dash-title-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-theme-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.theme-toggle-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  color: #71717a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: all .2s ease;
}

.theme-toggle-btn:hover {
  color: #ffffff;
}

.theme-toggle-btn.is-active {
  background: rgba(223, 120, 121, 0.25);
  border-color: #DF7879;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(223, 120, 121, 0.5);
}

.theme-toggle-btn svg {
  pointer-events: none;
}

.dash-star-icon {
  font-size: 20px;
  color: #DF7879;
  filter: drop-shadow(0 0 8px rgba(223, 120, 121, 0.6));
}

.dash-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-main-title {
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-weight: 800;
  font-size: clamp(16px, 1.6vw, 22px);
  color: #ffffff;
  letter-spacing: 0.02em;
  margin: 0;
  line-height: 1.2;
}

.dash-subtitle-badge {
  font-size: 11px;
  font-weight: 600;
  color: #a1a1aa;
  letter-spacing: 0.04em;
}

/* 2. Top Filter Controls */
.dash-filters-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.dash-filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-period-selector {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}

.dash-period-btn {
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 4px 12px;
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  color: #a1a1aa;
  cursor: pointer;
  transition: all .2s ease;
}

.dash-period-btn:hover {
  color: #ffffff;
}

.dash-period-btn.is-active {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.dash-advisor-select {
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  padding: 3px 6px;
}
.dash-advisor-select option {
  background: #18181f;
  color: #ffffff;
}

.dash-actions-group {
  display: flex;
  align-items: center;
}

.btn-dash-sync {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(223, 120, 121, 0.15);
  border: 1px solid rgba(223, 120, 121, 0.4);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all .2s ease;
}

.btn-dash-sync:hover {
  background: rgba(223, 120, 121, 0.3);
  border-color: #DF7879;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(223, 120, 121, 0.3);
}

.sync-icon {
  transition: transform .2s ease;
}

.is-syncing .sync-icon {
  animation: spinDashSync 0.75s linear infinite !important;
}

@keyframes spinDashSync {
  100% { transform: rotate(360deg); }
}

/* 3. Layout Principal del Dashboard (PC: Gráficos a la izquierda en 2x2, KPIs a la derecha en 1 columna) */
.dash-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(250px, 20vw, 290px);
  gap: 20px;
  align-items: stretch;
  width: 100%;
}

.dash-kpi-sidebar {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.dash-kpi-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  width: 100%;
}

.dash-kpi-card {
  flex: 1;
  background: rgba(18, 18, 24, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
}

.dash-kpi-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #DF7879, transparent);
  opacity: 0.85;
}

.dash-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(223, 120, 121, 0.4);
}

.kpi-tag-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.kpi-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 10px;
  font-weight: 600;
  color: #a1a1aa;
}

.kpi-label {
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  color: #71717a;
  letter-spacing: 0.06em;
  text-align: center;
  width: 100%;
}

.kpi-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  text-align: center;
  width: 100%;
}

/* 4. Reports Grid (2x2 a la izquierda en PC) */
.dash-reports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  width: 100%;
}

.dash-report-card {
  background: rgba(18, 18, 24, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  position: relative;
}

.dash-report-card:hover {
  border-color: rgba(223, 120, 121, 0.4);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 20;
}

.report-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.report-title {
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
  margin: 0;
}

.report-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 600;
  color: #d4d4d8;
  width: fit-content;
}

.report-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 6px #DF7879;
}

.report-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 25;
}

.btn-report-sync,
.btn-report-expand {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #d4d4d8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: all .2s ease;
  position: relative;
  z-index: 30;
}

.btn-report-sync svg,
.btn-report-expand svg {
  pointer-events: none;
}

.btn-report-sync:hover,
.btn-report-expand:hover {
  background: rgba(223, 120, 121, 0.25);
  border-color: #DF7879;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Card Fullscreen Mode ("superponer ese grafico en toda la pantalla de frente y que no se mueva hasta que retraiga con el mismo boton") */
body.dash-card-locked {
  overflow: hidden !important;
  touch-action: none !important;
  overscroll-behavior: none !important;
}

body.dash-card-locked .top-bar {
  display: none !important;
}

body.dash-card-locked #dashboard.dashboard-page {
  overflow: hidden !important;
  touch-action: none !important;
}

.dash-report-card.is-fullscreen-card {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100dvh !important;
  z-index: 999999 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  padding: 24px 20px 32px 20px !important;
  background: #0a0b10 !important;
  border: none !important;
  box-shadow: 0 0 100px rgba(0, 0, 0, 0.95) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  touch-action: none !important;
  overscroll-behavior: none !important;
  animation: cardSuperimposeIn .22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardSuperimposeIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.dash-report-card.is-fullscreen-card .report-header {
  flex-shrink: 0;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dash-report-card.is-fullscreen-card .report-title {
  font-size: clamp(17px, 3.8vw, 22px) !important;
}

.dash-report-card.is-fullscreen-card .btn-report-expand {
  background: rgba(223, 120, 121, 0.28) !important;
  border-color: #DF7879 !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(223, 120, 121, 0.45) !important;
  width: 36px;
  height: 36px;
}

.dash-report-card.is-fullscreen-card .btn-report-expand .expand-icon-out {
  display: none !important;
}

.dash-report-card.is-fullscreen-card .btn-report-expand .expand-icon-in {
  display: block !important;
}

.dash-report-card.is-fullscreen-card .report-chart-container {
  flex: 1;
  height: calc(100vh - 140px) !important;
  height: calc(100dvh - 140px) !important;
  max-height: calc(100dvh - 140px) !important;
  padding-bottom: 42px;
  padding-left: 36px;
  padding-right: 16px;
  box-sizing: border-box;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

.dash-report-card.is-fullscreen-card .report-chart-container::-webkit-scrollbar {
  height: 6px;
}

.dash-report-card.is-fullscreen-card .report-chart-container::-webkit-scrollbar-thumb {
  background: rgba(223, 120, 121, 0.45);
  border-radius: 4px;
}

.dash-report-card.is-fullscreen-card .report-chart-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.dash-report-card.is-fullscreen-card .chart-bars-wrap {
  height: calc(100% - 14px);
  gap: clamp(4px, 1.2vw, 14px);
  min-width: 100%;
  width: 100%;
  justify-content: space-between;
}

.dash-report-card.is-fullscreen-card .chart-bar-col {
  flex: 1 1 0px;
  min-width: 28px;
  max-width: 52px;
}

.dash-report-card.is-fullscreen-card .chart-bar-pill {
  width: 100%;
  max-width: 36px;
}

.dash-report-card.is-fullscreen-card .chart-bar-val {
  font-size: clamp(9px, 1.1vw, 13px);
  top: -22px;
}

.dash-report-card.is-fullscreen-card .chart-bar-label {
  bottom: -32px;
  width: 100%;
}

.dash-report-card.is-fullscreen-card .chart-bar-label.chart-bar-label--stacked {
  bottom: -38px !important;
}

.dash-report-card.is-fullscreen-card .chart-bar-label .bar-date-day {
  font-size: clamp(9px, 1.1vw, 12px);
  font-weight: 700;
}

.dash-report-card.is-fullscreen-card .chart-bar-label .bar-date-line {
  width: clamp(10px, 1.2vw, 15px);
  height: 1.5px;
  margin: 2px auto;
}

.dash-report-card.is-fullscreen-card .chart-bar-label .bar-date-month {
  font-size: clamp(8px, 0.95vw, 10.5px);
  font-weight: 600;
}

.dash-report-card.is-fullscreen-card .chart-grid-label {
  font-size: clamp(10px, 1.5vw, 13px);
  left: -32px;
}

/* 5. Bar Chart Styling (Color #DF7879, Dashed lines, Values on top) */
.report-chart-container {
  position: relative;
  height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 38px;
  padding-left: 32px;
  box-sizing: border-box;
}

.chart-y-axis-title {
  display: none !important;
}

.chart-grid-lines {
  position: absolute;
  inset: 10px 0 38px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.chart-grid-row {
  width: 100%;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  position: relative;
}

.chart-grid-label {
  position: absolute;
  left: -26px;
  top: -7px;
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  color: #71717a;
}

.chart-bars-wrap {
  position: relative;
  z-index: 2;
  height: calc(100% - 10px);
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  width: 100%;
  gap: 8px;
}

.chart-bar-col {
  flex: 1;
  max-width: 60px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  cursor: pointer;
}

.chart-bar-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 5px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  transition: transform .2s ease;
}

.chart-bar-pill {
  width: 100%;
  background: #DF7879;
  border-radius: 6px 6px 2px 2px;
  box-shadow: 0 4px 14px rgba(223, 120, 121, 0.35);
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s, transform 0.2s;
  min-height: 4px;
}

.chart-bar-col:hover .chart-bar-pill {
  filter: brightness(1.25) saturate(110%);
  box-shadow: 0 6px 20px rgba(223, 120, 121, 0.6);
  transform: scaleY(1.02);
}

.chart-bar-col:hover .chart-bar-val {
  transform: translateY(-2px);
  color: #DF7879;
}

.chart-bar-label {
  position: absolute;
  bottom: -24px;
  font-family: 'Orbitron', 'Raleway', sans-serif;
  font-size: 9.5px;
  font-weight: 600;
  color: #a1a1aa;
  text-align: center;
  width: 100%;
  pointer-events: none;
}

.chart-bar-label.chart-bar-label--stacked {
  bottom: -34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.chart-bar-label .bar-date-day {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1;
  letter-spacing: -0.2px;
}

.chart-bar-label .bar-date-line {
  display: block;
  width: 11px;
  height: 1px;
  background: rgba(223, 120, 121, 0.7);
  margin: 2px auto;
  border-radius: 1px;
}

.chart-bar-label .bar-date-month {
  font-family: 'Orbitron', monospace;
  font-size: 8px;
  font-weight: 700;
  color: #94a3b8;
  line-height: 1;
  letter-spacing: -0.2px;
}

.chart-empty-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #71717a;
  font-size: 12px;
  font-style: italic;
}

/* ===================== DASHBOARD LIGHT THEME ===================== */
/* El fondo del dashboard y la página DEBEN seguir siendo el color DARK original */
#dashboard.dashboard-page.theme-light {
  background: var(--black) !important;
  color: #ffffff !important;
}

/* La barra superior de controles se mantiene con su diseño dark estilizado */
.theme-light .dash-top-bar {
  background: rgba(18, 18, 24, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

.theme-light .dash-main-title {
  color: #ffffff !important;
}

.theme-light .dash-theme-switch {
  background: rgba(0, 0, 0, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
}

.theme-light .theme-toggle-btn {
  color: #71717a !important;
}

.theme-light .theme-toggle-btn:hover {
  color: #ffffff !important;
}

.theme-light .theme-toggle-btn.is-active {
  background: rgba(223, 120, 121, 0.28) !important;
  border-color: #DF7879 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(223, 120, 121, 0.5) !important;
}

.theme-light .dash-filter-item {
  background: rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.theme-light .dash-filter-label {
  color: #9ca3af !important;
}

.theme-light .dash-period-selector {
  background: rgba(255, 255, 255, 0.06) !important;
  border: none !important;
}

.theme-light .dash-period-btn {
  color: #a1a1aa !important;
}

.theme-light .dash-period-btn:hover {
  color: #ffffff !important;
}

.theme-light .dash-period-btn.is-active {
  background: #ffffff !important;
  color: #000000 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

.theme-light .dash-advisor-select {
  background: transparent !important;
  border: none !important;
  color: #ffffff !important;
}

.theme-light .dash-sync-all-btn {
  background: rgba(223, 120, 121, 0.15) !important;
  border: 1px solid rgba(223, 120, 121, 0.4) !important;
  color: #ffffff !important;
}

.theme-light .dash-sync-all-btn:hover {
  background: rgba(223, 120, 121, 0.3) !important;
  border-color: #DF7879 !important;
  color: #ffffff !important;
}

/* KPI Cards en Light Theme: fondo blanco, números negros limpios SIN SOMBRA */
.theme-light .dash-kpi-card {
  background: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35) !important;
}

.theme-light .dash-kpi-card:hover {
  border-color: rgba(223, 120, 121, 0.5) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45) !important;
}

.theme-light .kpi-label {
  color: #18181b !important;
  font-weight: 700 !important;
  text-shadow: none !important;
}

.theme-light .kpi-value {
  color: #000000 !important;
  font-weight: 900 !important;
  text-shadow: none !important;
  filter: none !important;
}

.theme-light .kpi-tag {
  background: #f1f5f9 !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: #334155 !important;
}

/* Report Cards (Gráficos) en Light Theme: fondo blanco, textos y números negros SIN SOMBRA */
.theme-light .dash-report-card {
  background: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4) !important;
}

.theme-light .dash-report-card:hover {
  border-color: rgba(223, 120, 121, 0.5) !important;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5) !important;
}

.theme-light .report-title {
  color: #000000 !important;
  font-weight: 800 !important;
  text-shadow: none !important;
}

.theme-light .report-pill-badge {
  background: #f1f5f9 !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.theme-light .report-badge-text {
  color: #334155 !important;
}

.theme-light .btn-report-sync,
.theme-light .btn-report-expand {
  background: #f1f5f9 !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  color: #334155 !important;
}

.theme-light .btn-report-sync:hover,
.theme-light .btn-report-expand:hover {
  background: rgba(223, 120, 121, 0.2) !important;
  border-color: #DF7879 !important;
  color: #000000 !important;
}

/* Líneas guía de fondo y etiquetas de eje */
.theme-light .chart-grid-row {
  border-top: 1px dashed rgba(0, 0, 0, 0.12) !important;
}

.theme-light .chart-grid-label {
  color: #475569 !important;
  font-weight: 700 !important;
  text-shadow: none !important;
}

/* NÚMEROS EN LAS BARRAS Y TARJETAS: COLOR NEGRO SÓLIDO Y SIN NINGUNA SOMBRA */
.theme-light .chart-bar-val,
.theme-light .dash-report-card .chart-bar-val,
.theme-light .dash-report-card.is-fullscreen-card .chart-bar-val {
  color: #000000 !important;
  font-weight: 800 !important;
  text-shadow: none !important;
  filter: none !important;
}

/* Etiquetas debajo de las barras */
.theme-light .chart-bar-label {
  color: #1e293b !important;
  font-weight: 700 !important;
  text-shadow: none !important;
}

.theme-light .chart-bar-sublabel {
  color: #64748b !important;
  text-shadow: none !important;
}

/* BARRAS: CONSERVAN COLOR #DF7879 Y SE LES QUITA TODA SOMBRA */
.theme-light .chart-bar-pill,
.theme-light .dash-report-card .chart-bar-pill,
.theme-light .dash-report-card.is-fullscreen-card .chart-bar-pill {
  background: #DF7879 !important;
  box-shadow: none !important;
  filter: none !important;
}

.theme-light .chart-bar-col:hover .chart-bar-pill {
  filter: brightness(1.08) !important;
  box-shadow: none !important;
}

.theme-light .chart-bar-col:hover .chart-bar-val {
  color: #DF7879 !important;
  text-shadow: none !important;
}

/* Gráfico superpuesto a pantalla completa en Light Theme */
.theme-light .dash-report-card.is-fullscreen-card {
  background: #ffffff !important;
  color: #000000 !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65) !important;
}

.theme-light .dash-report-card.is-fullscreen-card .report-header {
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

.theme-light .dash-report-card.is-fullscreen-card .report-title {
  color: #000000 !important;
  text-shadow: none !important;
}

.theme-light .dash-report-card.is-fullscreen-card .chart-grid-row {
  border-top: 1px dashed rgba(0, 0, 0, 0.12) !important;
}

.theme-light .dash-report-card.is-fullscreen-card .chart-grid-label {
  color: #475569 !important;
  text-shadow: none !important;
}

.theme-light .dash-report-card.is-fullscreen-card .chart-bar-label {
  color: #1e293b !important;
  text-shadow: none !important;
}

.theme-light .chart-bar-label .bar-date-day {
  color: #0f172a !important;
}

.theme-light .chart-bar-label .bar-date-line {
  background: #DF7879 !important;
}

.theme-light .chart-bar-label .bar-date-month {
  color: #475569 !important;
}

.theme-light .dash-report-card.is-fullscreen-card .btn-report-expand {
  background: rgba(223, 120, 121, 0.18) !important;
  border-color: #DF7879 !important;
  color: #000000 !important;
  box-shadow: none !important;
}

/* Smooth theme transitions */
#dashboard.dashboard-page,
.dash-top-bar,
.dash-kpi-card,
.dash-report-card,
.dash-filter-item,
.dash-period-selector,
.dash-theme-switch {
  transition: background-color .28s ease, border-color .28s ease, box-shadow .28s ease, color .28s ease;
}

/* 6. Modal de Reporte Ampliado (Fullscreen / Zoom) */
.dash-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.dash-modal-overlay.is-visible {
  display: flex;
  animation: fadeInModal .25s ease-out;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dash-modal-card {
  background: rgba(18, 18, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 28px;
  box-sizing: border-box;
}

.dash-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 16px;
}

.dash-modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-modal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 10px #DF7879;
}

.dash-modal-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.dash-modal-subtitle {
  font-size: 11px;
  color: #a1a1aa;
}

.dash-modal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-modal-sync {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(223, 120, 121, 0.15);
  border: 1px solid rgba(223, 120, 121, 0.4);
  color: #DF7879;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
}
.btn-modal-sync:hover {
  background: rgba(223, 120, 121, 0.3);
  color: #ffffff;
}

.dash-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
}
.dash-modal-close:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
}

.dash-modal-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.dash-modal-chart-area {
  height: 240px;
  min-height: 240px;
  position: relative;
  box-sizing: border-box;
}

.dash-modal-breakdown {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
}

.modal-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.modal-breakdown-table th {
  text-align: left;
  padding: 8px 12px;
  color: #71717a;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.modal-breakdown-table td {
  padding: 10px 12px;
  color: #d4d4d8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.modal-breakdown-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  :root {
    --header-h: 64px;
  }

  .site-header {
    padding: 0 16px;
    height: var(--header-h);
  }
  .main-nav {
    gap: 6px;
  }
  .nav-item {
    padding: 6px 10px;
    font-size: 11px;
    border-width: 2px;
  }
  .user-session-bar {
    gap: 6px;
    flex-shrink: 0;
  }
  .user-session-pill:not(.is-logged-in) {
    display: none;
  }
  .user-session-pill.is-logged-in {
    padding: 4px 8px;
    font-size: 10px;
    gap: 5px;
  }
  .user-session-name {
    display: none !important;
  }
  .user-session-initials {
    display: inline-block !important;
    font-family: 'Orbitron', 'Raleway', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.05em;
  }
  .user-session-badge {
    display: none !important;
  }
  .btn-logout {
    padding: 5px 8px;
    font-size: 8.5px;
    flex-shrink: 0;
    margin-right: 0;
  }
  .btn-logout span {
    display: none !important;
  }
  .brand {
    position: static;
    flex-shrink: 0;
  }
  .brand-logo {
    width: 68px;
    height: auto;
  }

  .page {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden !important;
    background: var(--black);
  }
  .page::before {
    display: none;
  }
  .visual-col {
    position: relative;
    left: auto; top: auto; bottom: auto;
    width: 100%;
    height: clamp(280px, 44vh, 390px);
    min-height: 260px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
  }
  .persona-img {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    height: 86%;
    width: auto;
    max-width: 88%;
    filter: none;
  }
  .panel-icon {
    position: absolute;
    left: 50%;
    top: 55%;
    bottom: auto;
    transform: translate(-50%, -50%);
    font-size: clamp(60px, 14vw, 100px);
  }
  .deco-grid, .deco-dots--empty { display: none; }
  .page-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    flex: 1;
    background: linear-gradient(to bottom, var(--gray-start), var(--gray-end));
    padding: 24px 16px 40px;
    min-height: auto;
    justify-content: flex-start;
    align-items: center;
    box-sizing: border-box;
  }
  .content-col {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }
  .hero-title, .hero-subtitle {
    text-align: center;
    overflow-wrap: anywhere;
    width: 100%;
  }
  .hero-subtitle { margin-left: auto; margin-right: auto; max-width: 100%; }
  .hero-subtitle br.m-break { display: block; }
  .cta-row { justify-content: center; flex-direction: column-reverse; gap: 20px; width: 100%; }
  .deco-dots--filled { margin: 0 auto; transform: none; }
  .btn-next--static { align-self: center; }
  .tracking-form { align-items: center; width: 100%; }
  .stat-cards { justify-content: center; width: 100%; }

  /* ===================== INICIO EN MÓVIL (Bajar imagen, zona negra y contenido) ===================== */
  html.on-inicio,
  body.on-inicio {
    overflow: hidden !important;
    height: 100% !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
  }
  html.on-inicio::-webkit-scrollbar,
  body.on-inicio::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
  }

  #inicio {
    padding-bottom: 0;
    overflow: hidden !important;
    overflow-y: hidden !important;
    max-height: 100vh;
    max-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  #inicio::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
  #inicio .visual-col {
    height: clamp(260px, 34.5vh, 305px);
    min-height: 250px;
    background: var(--black);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex-shrink: 0;
    pointer-events: auto;
  }
  #inicio .persona-img {
    height: clamp(210px, 28vh, 255px);
    max-height: calc(100% - var(--header-h) + 12px);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 90%;
  }
  #inicio .mobile-hero-brand {
    display: block;
    position: absolute;
    top: clamp(44px, 5.5vh, 56px);
    right: 14px;
    left: auto;
    width: clamp(68px, 17vw, 80px);
    z-index: 20;
    pointer-events: auto;
  }
  #inicio .mobile-hero-brand .brand-logo {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.7));
  }
  #inicio .deco-grid {
    display: block;
    position: absolute;
    left: 0;
    top: clamp(80px, 10.5vh, 100px);
    width: clamp(32px, 8.5vw, 40px);
    z-index: 10;
    opacity: 0.9;
    pointer-events: none;
  }
  #inicio .deco-dots--empty {
    display: block;
    position: absolute;
    left: 12px;
    top: clamp(140px, 18vh, 168px);
    bottom: auto;
    width: clamp(26px, 7vw, 34px);
    z-index: 10;
    opacity: 0.85;
    pointer-events: none;
  }
  #inicio .page-inner {
    padding: 6px 12px 0;
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, var(--gray-start), var(--gray-end));
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
  }
  #inicio .content-col--inicio {
    width: 100%;
    max-width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    margin: 0;
    min-height: 0;
  }
  #inicio .hero-brand {
    display: none;
  }
  #inicio .signin-card-container {
    max-width: 320px;
    width: 100%;
    margin: clamp(14px, 2vh, 22px) auto 4px auto;
  }
  #inicio .signin-card-content {
    padding: 10px 12px;
    gap: 7px;
  }
  #inicio .signin-title {
    font-size: 15px;
  }
  #inicio .signin-desc {
    font-size: 10px;
  }
  #inicio .signin-tabs {
    margin-bottom: 2px;
  }
  #inicio .signin-tab {
    padding: 6px 10px;
    font-size: 10.5px;
  }
  #inicio .signin-input-group label {
    font-size: 9px;
    margin-bottom: 2px;
  }
  #inicio .signin-input-wrap input {
    padding: 8px 10px 8px 34px;
    font-size: 12px;
  }
  #inicio .signin-meta-row {
    flex-wrap: wrap;
    gap: 5px;
    margin: 1px 0;
  }
  #inicio .signin-meta-row .custom-checkbox,
  #inicio .signin-meta-row .link-btn {
    font-size: 10px;
  }
  #inicio .signin-submit-btn {
    padding: 10px 14px;
    font-size: 11px;
    margin-top: 2px;
  }
  #inicio .cta-row--inicio {
    display: none !important;
  }
  #inicio .deco-dots--filled {
    display: none !important;
  }
  #inicio .mobile-persona-bottom {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
    margin-top: auto;
    margin-bottom: 0;
    padding: 0;
    line-height: 0;
    pointer-events: none;
    flex-shrink: 0;
  }
  #inicio .mobile-persona-bottom .mobile-persona-img {
    width: clamp(230px, 60vw, 305px);
    max-width: 85%;
    max-height: clamp(140px, 21.5vh, 190px);
    height: auto;
    display: block;
    margin: 0 auto;
    vertical-align: bottom;
    filter: drop-shadow(0 -4px 14px rgba(0, 0, 0, 0.45));
  }

  /* ===================== SEGUIMIENTO EN MÓVIL (Espacio Mínimo y Simetría) ===================== */
  .seg-persona-center,
  .seg-persona-right,
  .seg-deco-dots-top {
    display: none;
  }

  #seguimiento {
    padding-bottom: 40px;
  }
  #seguimiento .calendar-col {
    position: relative;
    left: auto; top: auto; bottom: auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: auto;
    padding: calc(var(--header-h) + 14px) 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: visible;
  }
  #seguimiento .seg-persona-mobile {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
    max-width: 380px;
    margin-bottom: 0;
    position: relative;
    z-index: 4;
    pointer-events: none;
    line-height: 0;
  }
  #seguimiento .persona-mobile-img {
    width: clamp(96px, 26vw, 130px);
    height: auto;
    display: block;
    vertical-align: bottom;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.65));
  }
  #seguimiento .glass-calendar-card {
    width: 100%;
    max-width: 356px;
    padding: 16px 12px;
    margin: 0 auto;
    box-sizing: border-box;
  }
  #seguimiento .gc-day-btn {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }
  #seguimiento .gc-status-pill {
    padding: 4px 8px;
    font-size: 8.5px;
    gap: 4px;
  }
  #seguimiento .gc-tab {
    padding: 5px 10px;
    font-size: 9px;
  }

  /* Conector estilizado en móvil: puente de datos centrado, limpio y reactivo */
  #seguimiento .terminal-loader-connector {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 8px auto;
    width: 100%;
    max-width: 350px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }
  #seguimiento .terminal-loader-connector::before,
  #seguimiento .terminal-loader-connector::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 10px 2px #ffffff;
    z-index: 3;
  }
  #seguimiento .terminal-loader-connector::before { left: 4px; }
  #seguimiento .terminal-loader-connector::after { right: 4px; }

  #seguimiento .tl-full-line {
    position: absolute;
    top: 50%;
    left: 4px;
    right: 4px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.25), #ffffff 20%, #ffffff 80%, rgba(255, 255, 255, 0.25));
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.85);
    transform: translateY(-50%);
    z-index: 1;
    overflow: hidden;
  }
  #seguimiento .tl-full-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50px;
    width: 50px;
    height: 100%;
    background: linear-gradient(90deg, transparent, #ffffff 50%, transparent);
    box-shadow: 0 0 14px 3px #ffffff;
    animation: lineEnergyStreamMobile 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  }

  @keyframes lineEnergyStreamMobile {
    0% { left: -50px; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
  }
  #seguimiento .tl-line { display: none; }
  #seguimiento .gc-data-port, #seguimiento .cc-data-port { display: none; }

  #seguimiento .tl-pulse-beam {
    position: absolute;
    top: 50%;
    left: 6px;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
    box-shadow: 0 0 14px 4px #ffffff;
    border-radius: 9999px;
    opacity: 0;
    pointer-events: none;
    z-index: 20;
    transform: translateY(-50%);
  }
  #seguimiento .tl-pulse-beam.is-firing {
    animation: pulseLaserMobile .6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  }

  /* Recuadro de carga centrado sobre la línea en móvil al guardar */
  #seguimiento .tl-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    z-index: 30;
    min-width: 170px;
    max-width: 260px;
  }
  #seguimiento .tl-box.is-visible {
    transform: translate(-50%, -50%) scale(1);
  }

  /* Formulario amplio con el mismo ancho que el calendario (380px) */
  #seguimiento .page-inner {
    background: transparent;
    padding: 0 16px;
    min-height: auto;
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
  }
  #seguimiento .content-col {
    width: 100%;
    max-width: 100%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }
  #seguimiento .contact-card {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    padding: 22px 18px;
    border-radius: 28px;
    box-sizing: border-box;
  }
  #seguimiento .contact-card__header {
    text-align: center;
    width: 100%;
    margin-bottom: 12px;
  }
  #seguimiento .contact-card__header .hero-title {
    font-size: clamp(16px, 4.8vw, 22px);
    white-space: nowrap;
    line-height: 1.2;
    text-align: center;
    width: 100%;
    letter-spacing: 0.02em;
  }
  #seguimiento .contact-card__header .hero-subtitle {
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
    width: 100%;
    margin-top: 6px;
    color: #9ca3af;
  }
  #seguimiento .contact-info-list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap !important;
    justify-content: center;
    align-items: stretch;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
  }
  #seguimiento .contact-info-pill {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 8px;
    gap: 6px;
    box-sizing: border-box;
  }
  #seguimiento .cip-label {
    font-size: 7.5px;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #seguimiento .cip-val {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #seguimiento .admin-switch-asesor {
    font-size: 9.5px;
    padding: 2px 4px;
    margin-top: 1px;
    max-width: 100%;
  }
  #seguimiento .tracking-form {
    width: 100%;
    align-items: stretch;
  }
  #seguimiento .form-row {
    width: 100%;
    align-items: stretch;
  }
  #seguimiento .form-row label {
    text-align: left;
    font-size: 10px;
  }
  #seguimiento .form-row input {
    text-align: left;
    padding-left: 12px;
    font-size: 13px;
  }
  #seguimiento .form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  #seguimiento .form-actions {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
  }
  #seguimiento .btn-next {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
  }
  #seguimiento .form-feedback {
    text-align: center;
  }

  /* ===================== DASHBOARD EN MÓVIL ===================== */
  #dashboard {
    padding-bottom: 40px;
  }
  #dashboard .dashboard-visual-col {
    position: relative;
    left: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    min-height: auto;
    padding: calc(var(--header-h) + 14px) 16px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-sizing: border-box;
    pointer-events: auto;
  }
  #dashboard .powerbi-wrapper {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    aspect-ratio: 16 / 10;
    height: auto;
    min-height: 220px;
    margin: 0 auto;
    border-radius: 16px;
    pointer-events: auto;
    overflow: hidden;
    box-sizing: border-box;
  }
  #dashboard .powerbi-wrapper iframe {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 100%;
    border: none;
    display: block;
  }
  #dashboard .page-inner {
    padding: 20px 16px 36px;
    min-height: auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  #dashboard .content-col {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
  }
  #dashboard .stat-cards {
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: nowrap;
  }  /* Dashboard CRM Responsive Rules (max-width: 900px) */
  #dashboard.dashboard-page {
    padding: calc(var(--header-h) + 12px) 14px 40px !important;
    height: auto !important;
    min-height: 100vh !important;
    overflow-y: auto !important;
  }
  .dash-top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
  }
  .dash-filters-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
  }
  .dash-main-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }
  .dash-kpi-sidebar {
    order: 1;
    width: 100%;
  }
  .dash-reports-grid {
    order: 2;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
  }
  .dash-kpi-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    height: auto;
  }
  .dash-kpi-card {
    padding: 12px 14px;
    border-radius: 14px;
    align-items: flex-start;
    text-align: left;
    height: auto;
  }
  .dash-kpi-card .kpi-tag-row {
    justify-content: space-between;
  }
  .dash-kpi-card .kpi-label {
    text-align: left;
    font-size: 10px;
  }
  .dash-kpi-card .kpi-value {
    text-align: left;
    font-size: 22px;
  }
  .dash-report-card {
    padding: 16px 16px 18px;
    border-radius: 18px;
    cursor: pointer;
  }
  .report-chart-container {
    height: 190px;
    padding-left: 26px;
  }
  .dash-modal-card {
    padding: 18px 16px;
    border-radius: 20px;
    max-height: 94vh;
  }
}

@keyframes pulseLaserMobile {
  0% {
    left: 6px;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    left: calc(100% - 66px);
    opacity: 0;
  }
}

@media (max-width: 560px) {
  .site-header { padding: 0 12px; box-sizing: border-box; }
  .main-nav { gap: 3px; }
  .nav-item { padding: 5px 6px; font-size: 9px; border-width: 2px; }
  .user-session-bar { gap: 4px; flex-shrink: 0; }
  .user-session-badge { display: none !important; }
  .user-session-name { display: none !important; }
  .user-session-initials { display: inline-block !important; font-size: 10px; }
  .user-session-pill { padding: 3px 6px; gap: 4px; }
  .btn-logout { padding: 4px 6px; flex-shrink: 0; }
  .btn-logout span { display: none !important; }
  .hero-title { font-size: 32px; }
  #inicio .form-grid-2 {
    grid-template-columns: 1fr;
  }
  .dash-kpi-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .kpi-value {
    font-size: 19px;
  }
  .dash-period-btn {
    padding: 4px 8px;
    font-size: 9.5px;
  }
  .btn-dash-sync {
    padding: 5px 10px;
    font-size: 10px;
  }
  .report-title {
    font-size: 13px;
  }
  .chart-bar-val {
    font-size: 9.5px;
  }
  .chart-bar-label {
    font-size: 8.5px;
  }
}
