:root {
  --tec-bg-dark: #0a0e27;
  --tec-bg-darker: #060815;
  --tec-bg-gradient: radial-gradient(circle at 30% 20%, #131a3a 0%, #0a0e27 45%, #060815 100%);
  --tec-primary: #2f6fed;
  --tec-primary-dark: #1e4fbf;
  --tec-accent: #4dd0e1;
  --tec-card-bg: #ffffff;
  --tec-text-light: #e8ecf7;
  --tec-text-muted: #8a92b2;

  /* Shell con menú lateral (_AppLayout) */
  --app-sidebar-w: 272px;
  --app-topbar-h: 68px;
  --app-tabbar-h: 64px;
  --app-surface: rgba(255, 255, 255, 0.035);
  --app-border: rgba(255, 255, 255, 0.08);
  --app-border-strong: rgba(255, 255, 255, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--tec-bg-gradient);
  color: var(--tec-text-light);
  min-height: 100vh;
}

/* ---------- LOGIN ---------- */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.login-wrapper {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.login-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(47, 111, 237, 0.45);
  overflow: hidden;
}

.login-logo img {
  width: 100%;
  height: 100%;
  display: block;
}

.login-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #fff;
}

.login-subtitle {
  color: var(--tec-text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.login-card .form-label {
  color: var(--tec-text-muted);
  font-size: 0.85rem;
  text-align: left;
  display: block;
}

.login-card .input-group-text {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--tec-text-muted);
}

.login-card .form-control {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.login-card .form-control:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--tec-primary);
  box-shadow: 0 0 0 0.2rem rgba(47, 111, 237, 0.25);
  color: #fff;
}

.login-card .form-control::placeholder {
  color: rgba(232, 236, 247, 0.35);
}

.validation-summary-valid {
  display: none;
}

.login-card .validation-summary-errors ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.login-btn {
  background: linear-gradient(135deg, var(--tec-primary), var(--tec-primary-dark));
  border: none;
  padding: 0.65rem;
  font-weight: 600;
  border-radius: 8px;
  margin-top: 0.5rem;
}

.login-btn:hover,
.login-btn:focus {
  background: linear-gradient(135deg, var(--tec-primary-dark), var(--tec-primary));
}

.login-footer {
  margin-top: 1.5rem;
  color: var(--tec-text-muted);
  font-size: 0.8rem;
}

/* ---------- LOGIN: layout institucional (ver [[site-brand]]) ---------- */
.login-card--institutional {
  padding: 2.25rem 1.75rem;
  text-align: left;
  /* El escudo se sale del padding a propósito (login-crest-wrap tiene margen
     negativo) para llegar de borde a borde arriba; esto recorta esa parte al
     radio de la card en vez de dejarla sobresalir en cuadrado. */
  overflow: hidden;
}

.login-crest-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Cancela el padding de la card para que el logo ocupe todo el ancho de
     arriba, tocando las esquinas redondeadas. */
  margin: -2.25rem -1.75rem 1.5rem;
  padding: 1.5rem 1.5rem 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent);
}

.login-crest-img {
  width: 100%;
  max-width: 190px;
  height: auto;
}

.login-crest-fallback {
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 190px;
  height: 95px;
  color: var(--tec-text-light);
  font-size: 2rem;
}

.login-eyebrow {
  margin: 0 0 0.5rem;
  color: var(--tec-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-headline {
  margin: 0 0 1rem;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
}

.login-headline-accent {
  color: var(--tec-primary);
}

.login-subtitle--institutional {
  margin-bottom: 1.75rem;
}

.login-btn--institutional {
  border-radius: 10px;
}

/* ---------- APP SHELL (Views/Shared/_AppLayout.cshtml) ----------
   Menú lateral fijo en escritorio (>= 992px). En celulares el mismo <aside> es un
   drawer (wwwroot/js/app-shell.js) y aparece además la barra inferior. */
body.app-body {
  padding: 0;
  background: var(--tec-bg-darker);
}

body.app-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 85% -10%, rgba(47, 111, 237, 0.18), transparent 60%),
    radial-gradient(700px 480px at 10% 110%, rgba(77, 208, 225, 0.1), transparent 60%),
    linear-gradient(180deg, var(--tec-bg-dark) 0%, var(--tec-bg-darker) 100%);
}

body.app-drawer-lock {
  overflow: hidden;
}

.app-shell {
  min-height: 100vh;
}

.app-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1045;
  width: var(--app-sidebar-w);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 1rem 1rem;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(17, 23, 56, 0.97) 0%, rgba(8, 11, 30, 0.98) 100%);
  border-right: 1px solid var(--app-border);
}

.app-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.35rem;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  text-decoration: none;
}

.app-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.2rem;
  color: #06122a;
  background: linear-gradient(135deg, var(--tec-accent), var(--tec-primary));
  box-shadow: 0 8px 20px -6px rgba(77, 208, 225, 0.55);
}

.app-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.app-brand-text strong {
  color: #fff;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.app-brand-text span {
  color: var(--tec-text-muted);
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-user {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem;
  border-radius: 14px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
}

.app-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3b4a8f, #6d5bd0);
}

.app-avatar-dot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2ecc71;
  border: 2px solid #111838;
}

.app-user-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.app-user-text strong,
.app-user-text span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-user-text strong {
  color: #fff;
  font-size: 0.88rem;
}

.app-user-text span {
  color: var(--tec-text-muted);
  font-size: 0.74rem;
}

.app-nav-caption {
  margin: 0.4rem 0.7rem -0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(138, 146, 178, 0.7);
}

.app-nav {
  gap: 0.25rem;
}

/* Links del menú lateral (también "Instalar app" y "Cerrar sesión"). */
.app-sidebar .nav-link {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--tec-text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.app-sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.app-sidebar .nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(77, 208, 225, 0.16), rgba(47, 111, 237, 0.06));
  border-color: rgba(77, 208, 225, 0.22);
}

/* Barrita de color al borde del menú en el link activo. */
.app-sidebar .nav-link.active::before {
  content: "";
  position: absolute;
  left: -1rem;
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--tec-accent);
  box-shadow: 0 0 12px rgba(77, 208, 225, 0.8);
}

.app-sidebar .nav-link > i {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.05rem;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease, color 0.15s ease;
}

.app-sidebar .nav-link.active > i {
  background: rgba(77, 208, 225, 0.18);
  color: var(--tec-accent);
}

.app-nav-badge {
  margin-left: auto;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
}

.app-nav-badge--warn {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.32);
  color: #fbbf24;
}

.app-nav-badge--ok {
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.3);
  color: #4ade80;
}

.app-sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--app-border);
}

.app-sidebar .app-nav-logout:hover {
  background: rgba(231, 76, 60, 0.1);
  color: #ff8a75;
}

.app-version {
  margin: 0.5rem 0.7rem 0;
  font-size: 0.7rem;
  color: rgba(138, 146, 178, 0.6);
}

.app-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--app-border);
  background: var(--app-surface);
  color: var(--tec-text-light);
  font-size: 1.2rem;
}

.app-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.app-sidebar-close {
  width: 36px;
  height: 36px;
  font-size: 0.95rem;
}

.app-main {
  min-height: 100vh;
  margin-left: var(--app-sidebar-w);
  display: flex;
  flex-direction: column;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: var(--app-topbar-h);
  padding: 0.75rem 1.5rem;
  background: rgba(8, 11, 30, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--app-border);
}

.app-topbar-title {
  flex: 1;
  min-width: 0;
}

.app-topbar-title h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-topbar-title p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--tec-text-muted);
}

.app-clock {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  color: var(--tec-text-light);
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.app-clock i {
  color: var(--tec-accent);
}

/* Las pantallas de una columna (credencial, registros, enrolamiento) traen su
   propio padding lateral; el shell solo las centra. */
.app-content {
  flex: 1;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 1.25rem 0 2.5rem;
}

.app-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  height: calc(var(--app-tabbar-h) + env(safe-area-inset-bottom));
  padding: 0.35rem 0.5rem env(safe-area-inset-bottom);
  background: rgba(10, 14, 38, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--app-border);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
}

.app-tab {
  position: relative;
  flex: 1;
  padding: 0;
  border: 0;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 0;
  color: var(--tec-text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  text-decoration: none;
}

/* El ícono va dentro de una "píldora" que se pinta en la pestaña activa. */
.app-tab > i {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  transition: background 0.15s ease;
}

.app-tab.active {
  color: #fff;
}

.app-tab.active > i {
  background: rgba(77, 208, 225, 0.16);
  color: var(--tec-accent);
}

/* Punto amarillo arriba a la derecha del ícono (consentimiento facial pendiente). */
.app-tab-dot {
  position: absolute;
  top: calc(50% - 21px);
  left: calc(50% + 6px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 0 2px #0a0e26;
}

/* Aviso flotante de app-shell.js (accesos con data-proximamente). */
.app-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 1060;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: calc(100% - 2rem);
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: #121a3f;
  border: 1px solid rgba(77, 208, 225, 0.3);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  color: var(--tec-text-light);
  font-size: 0.86rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-toast i {
  color: var(--tec-accent);
}

.app-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 992px) {
  .app-menu-btn,
  .app-sidebar-close,
  .app-backdrop {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .app-sidebar {
    width: min(84vw, 300px);
    transform: translateX(-105%);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.5);
  }

  .app-shell.is-drawer-open .app-sidebar {
    transform: none;
  }

  .app-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(3, 5, 16, 0.6);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .app-shell.is-drawer-open .app-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .app-main {
    margin-left: 0;
  }

  .app-topbar {
    gap: 0.7rem;
    padding: 0.6rem 1rem;
  }

  .app-topbar-title h1 {
    font-size: 1.05rem;
  }

  .app-clock {
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
  }

  .app-content {
    padding-top: 0.5rem;
  }

  body.app-body {
    padding-bottom: calc(var(--app-tabbar-h) + env(safe-area-inset-bottom));
  }

  .app-tabbar {
    display: flex;
  }

  .app-toast {
    bottom: calc(var(--app-tabbar-h) + 1rem + env(safe-area-inset-bottom));
  }

  /* El banner "instala la app" tiene que quedar arriba de la barra inferior. */
  .app-body .pwa-install-banner {
    bottom: calc(var(--app-tabbar-h) + 1rem + env(safe-area-inset-bottom));
  }
}

/* ---------- DASHBOARD (mapa + marcaje) ---------- */
.app-content--dash {
  max-width: none;
  padding: 1.5rem;
}

.dash {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 1.5rem;
  align-items: start;
}

.dash-map {
  position: sticky;
  top: calc(var(--app-topbar-h) + 1.5rem);
  height: calc(100vh - var(--app-topbar-h) - 3rem);
  min-height: 460px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--app-border-strong);
  background: linear-gradient(160deg, #10182e 0%, #0c1224 100%);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}

#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

.map-placeholder {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 40px),
    linear-gradient(160deg, #10182e 0%, #0c1224 100%);
}

.map-placeholder-text {
  color: var(--tec-text-muted);
  font-size: 0.9rem;
  margin: 0;
  max-width: 320px;
}

.map-pin {
  font-size: 2.5rem;
  color: #e74c3c;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.5));
  animation: bounce 2.2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.map-retry-btn {
  margin-top: 0.25rem;
}

/* En error de ubicación: se detiene el rebote y el pin se atenúa. */
.map-placeholder-error .map-pin {
  animation: none;
  color: var(--tec-text-muted);
}

/* Chip de estado del GPS y botón flotante, sobre el mapa. */
.geo-chip {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: calc(100% - 90px);
  padding: 0.45rem 0.85rem 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(8, 11, 30, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--app-border-strong);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}

.geo-chip-dot {
  --chip-rgb: 138, 146, 178;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgb(var(--chip-rgb));
  box-shadow: 0 0 0 4px rgba(var(--chip-rgb), 0.22);
}

.geo-chip[data-state="ok"] .geo-chip-dot { --chip-rgb: 46, 204, 113; }
.geo-chip[data-state="warn"] .geo-chip-dot { --chip-rgb: 251, 191, 36; }
.geo-chip[data-state="error"] .geo-chip-dot { --chip-rgb: 239, 68, 68; }
.geo-chip[data-state="loading"] .geo-chip-dot { animation: geo-blink 1s ease-in-out infinite; }

@keyframes geo-blink {
  50% { opacity: 0.3; }
}

.map-fab {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--app-border-strong);
  background: rgba(8, 11, 30, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 1.1rem;
}

.map-fab:hover {
  color: var(--tec-accent);
}

.geo-chip[hidden],
.map-fab[hidden] {
  display: none;
}

/* Controles de Leaflet en versión oscura. */
.dash-map .leaflet-bar {
  border: 1px solid var(--app-border-strong);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.dash-map .leaflet-bar a {
  width: 36px;
  height: 36px;
  line-height: 36px;
  background: rgba(8, 11, 30, 0.88);
  border-bottom-color: var(--app-border);
  color: #fff;
}

.dash-map .leaflet-bar a:hover {
  background: #151d44;
  color: var(--tec-accent);
}

.dash-map .leaflet-control-attribution {
  background: rgba(8, 11, 30, 0.6);
  color: rgba(255, 255, 255, 0.55);
}

.dash-map .leaflet-control-attribution a {
  color: rgba(255, 255, 255, 0.75);
}

/* Marcador "estás aquí": punto con pulso (L.divIcon en dashboard.js). */
.me-marker-dot,
.me-marker-pulse {
  position: absolute;
  border-radius: 50%;
}

.me-marker-dot {
  inset: 2px;
  background: var(--tec-accent);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.me-marker-pulse {
  inset: 0;
  background: rgba(77, 208, 225, 0.55);
  animation: me-pulse 2s ease-out infinite;
}

@keyframes me-pulse {
  from { transform: scale(1); opacity: 0.85; }
  to { transform: scale(3.4); opacity: 0; }
}

/* Columna derecha: saludo, botones de marca y jornada de hoy. */
.dash-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.dash-card {
  padding: 1.15rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--app-border);
  box-shadow: 0 20px 40px -28px rgba(0, 0, 0, 0.9);
}

.dash-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(77, 208, 225, 0.2), transparent 55%),
    linear-gradient(135deg, #17214f 0%, #0f1636 100%);
  border-color: rgba(77, 208, 225, 0.2);
}

.dash-hello {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.dash-hero-date {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--tec-text-muted);
}

.dash-time {
  margin: 0;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.dash-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.dash-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tec-accent);
  text-decoration: none;
}

.dash-card-link:hover {
  color: #7fe3ef;
}

.dash-card-clock {
  display: none;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(77, 208, 225, 0.12);
  color: var(--tec-accent);
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dash-card-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0 0 0.9rem;
  font-size: 0.8rem;
  color: var(--tec-text-muted);
}

.dash-card-hint i { margin-top: 0.05rem; }
.dash-card-hint[data-state="loading"] i { color: #fbbf24; }
.dash-card-hint[data-state="ok"] i { color: #2ecc71; }
.dash-card-hint[data-state="error"] { color: #fca5a5; }
.dash-card-hint[data-state="error"] i { color: #ef4444; }

.mark-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.mark-btn {
  --tone-rgb: 138, 146, 178;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  min-height: 118px;
  padding: 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(var(--tone-rgb), 0.32);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(var(--tone-rgb), 0.2), transparent 60%),
    rgba(255, 255, 255, 0.025);
  color: #fff;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.mark-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(var(--tone-rgb), 0.6);
  box-shadow: 0 14px 30px -14px rgba(var(--tone-rgb), 0.75);
}

.mark-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.mark-btn:focus-visible {
  outline: 2px solid rgb(var(--tone-rgb));
  outline-offset: 2px;
}

.mark-btn:disabled {
  opacity: 0.42;
  filter: grayscale(0.5);
  cursor: not-allowed;
}

.mark-btn-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 0.55rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  color: rgb(var(--tone-rgb));
  background: rgba(var(--tone-rgb), 0.16);
  box-shadow: inset 0 0 0 1px rgba(var(--tone-rgb), 0.25);
}

.mark-btn-label {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

.mark-btn-desc {
  font-size: 0.74rem;
  color: var(--tec-text-muted);
}

.day-timeline {
  position: relative;
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.day-timeline::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
}

.day-item {
  --tone-rgb: 138, 146, 178;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.45rem 0;
}

.day-item-icon {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: rgb(var(--tone-rgb));
  background: #121a3f;
  border: 1px solid rgba(var(--tone-rgb), 0.45);
  box-shadow: 0 0 0 4px rgba(var(--tone-rgb), 0.08);
}

.day-item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.day-item-text strong {
  color: #fff;
  font-size: 0.9rem;
}

.day-item-text span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.74rem;
}

.day-item-text .day-item-meta {
  flex-wrap: wrap;
  gap: 0.1rem 0.6rem;
}

.day-item-text .is-ok { color: #4ade80; }
.day-item-text .is-pending { color: #fbbf24; }
.day-item-text .is-late { color: #f87171; }

.day-item-time {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.day-empty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 0;
  padding: 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--app-border-strong);
  color: var(--tec-text-muted);
  font-size: 0.85rem;
}

/* ---------- SALUDO DE CUMPLEAÑOS (Views/Dashboard, lo muestra dashboard.js) ---------- */
.cumple {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  padding: 1.4rem 1.5rem;
  border-radius: 22px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(251, 191, 36, 0.28), transparent 55%),
    radial-gradient(90% 120% at 0% 100%, rgba(244, 114, 182, 0.3), transparent 60%),
    linear-gradient(135deg, #3b1d5e 0%, #24164a 55%, #151238 100%);
  box-shadow: 0 24px 48px -28px rgba(244, 114, 182, 0.7);
  animation: cumple-entra 0.6s ease-out both;
}

.cumple[hidden] {
  display: none;
}

.cumple-icono {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 1.9rem;
  color: #3b1d5e;
  background: linear-gradient(135deg, #fde68a, #fbbf24 55%, #f472b6);
  box-shadow: 0 0 0 5px rgba(251, 191, 36, 0.15), 0 12px 28px -10px rgba(251, 191, 36, 0.8);
  animation: cumple-latido 2.4s ease-in-out infinite;
}

.cumple-texto {
  min-width: 0;
  padding-right: 1.5rem;
}

.cumple-eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fcd34d;
}

.cumple-titulo {
  margin: 0.2rem 0 0.5rem;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(90deg, #ffffff, #fde68a 60%, #f9a8d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cumple-mensaje {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}

.cumple-firma {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  font-style: italic;
  color: #f9a8d4;
}

.cumple-firma i {
  margin-right: 0.3rem;
}

.cumple-cerrar {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.cumple-cerrar:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* Confeti: diez papelitos que caen despacio por detrás del texto. */
.cumple-confeti {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.cumple-confeti i {
  position: absolute;
  top: -12px;
  width: 7px;
  height: 12px;
  border-radius: 2px;
  opacity: 0.75;
  animation: cumple-cae 6s linear infinite;
}

.cumple-confeti i:nth-child(1)  { left: 6%;  background: #fbbf24; animation-delay: 0s; }
.cumple-confeti i:nth-child(2)  { left: 16%; background: #f472b6; animation-delay: 1.8s; animation-duration: 7s; }
.cumple-confeti i:nth-child(3)  { left: 27%; background: #4dd0e1; animation-delay: 3.2s; }
.cumple-confeti i:nth-child(4)  { left: 38%; background: #a78bfa; animation-delay: 0.9s; animation-duration: 8s; }
.cumple-confeti i:nth-child(5)  { left: 49%; background: #fde68a; animation-delay: 4.1s; }
.cumple-confeti i:nth-child(6)  { left: 60%; background: #f472b6; animation-delay: 2.5s; animation-duration: 6.5s; }
.cumple-confeti i:nth-child(7)  { left: 70%; background: #34d399; animation-delay: 0.4s; }
.cumple-confeti i:nth-child(8)  { left: 80%; background: #fbbf24; animation-delay: 3.7s; animation-duration: 7.5s; }
.cumple-confeti i:nth-child(9)  { left: 89%; background: #4dd0e1; animation-delay: 1.3s; }
.cumple-confeti i:nth-child(10) { left: 95%; background: #a78bfa; animation-delay: 5s; animation-duration: 8.5s; }

@keyframes cumple-cae {
  0%   { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(340px) rotate(540deg); }
}

@keyframes cumple-latido {
  0%, 100% { transform: scale(1) rotate(-4deg); }
  50%      { transform: scale(1.06) rotate(4deg); }
}

@keyframes cumple-entra {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cumple,
  .cumple-icono,
  .cumple-confeti i {
    animation: none;
  }

  .cumple-confeti {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .cumple {
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.15rem;
  }

  .cumple-icono {
    width: 52px;
    height: 52px;
    font-size: 1.5rem;
    border-radius: 16px;
  }

  .cumple-titulo {
    font-size: 1.2rem;
  }

  .cumple-texto {
    padding-right: 0;
  }
}

/* ---------- MI PORTAL (resumen del mes, Views/MiPortal) ---------- */
.app-content--wide {
  max-width: 1240px;
  padding: 1.5rem;
}

.portal-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 1.35rem 1.5rem;
  border-radius: 22px;
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(77, 208, 225, 0.22), transparent 55%),
    linear-gradient(135deg, #17214f 0%, #0f1636 100%);
  border: 1px solid rgba(77, 208, 225, 0.2);
  box-shadow: 0 20px 40px -28px rgba(0, 0, 0, 0.9);
}

.portal-hero-avatar {
  width: 64px;
  height: 64px;
  font-size: 1.3rem;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
}

.portal-hero-text {
  flex: 1;
  min-width: 200px;
}

.portal-hero-eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tec-accent);
}

.portal-hero-name {
  margin: 0.15rem 0 0.3rem;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
}

.portal-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  margin: 0;
  font-size: 0.82rem;
  color: var(--tec-text-muted);
}

.portal-hero-meta i {
  margin-right: 0.25rem;
  color: var(--tec-text-light);
}

.portal-hero-period {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--app-border-strong);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.portal-hero-period i {
  color: var(--tec-accent);
}

/* Secciones plegables (<details>): no necesitan JS. */
.portal-section {
  --tone-rgb: 138, 146, 178;
  margin-top: 1.75rem;
}

.portal-section > summary {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.4rem;
  margin: 0 -0.4rem;
  border-radius: 14px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.portal-section > summary::-webkit-details-marker {
  display: none;
}

.portal-section > summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.portal-section > summary:focus-visible {
  outline: 2px solid var(--tec-accent);
  outline-offset: 2px;
}

.portal-section-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.15rem;
  color: rgb(var(--tone-rgb));
  background: rgba(var(--tone-rgb), 0.14);
}

.portal-section-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.portal-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.portal-section-desc {
  font-size: 0.8rem;
  color: var(--tec-text-muted);
}

.portal-section-count {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--app-border);
  color: var(--tec-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.portal-section-chevron {
  color: var(--tec-text-muted);
  transition: transform 0.2s ease;
}

.portal-section[open] .portal-section-chevron {
  transform: rotate(180deg);
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.portal-tile {
  --tone-rgb: 138, 146, 178;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 170px;
  padding: 1.15rem;
  border-radius: 20px;
  border: 1px solid rgba(var(--tone-rgb), 0.3);
  background:
    radial-gradient(140% 100% at 0% 0%, rgba(var(--tone-rgb), 0.24), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  box-shadow: 0 20px 40px -30px rgba(0, 0, 0, 0.9);
  color: #fff;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.portal-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--tone-rgb), 0.6);
  box-shadow: 0 18px 36px -16px rgba(var(--tone-rgb), 0.6);
}

.portal-tile:active {
  transform: scale(0.98);
}

.portal-tile:focus-visible {
  outline: 2px solid rgb(var(--tone-rgb));
  outline-offset: 3px;
}

.portal-tile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.portal-tile-icon {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  color: rgb(var(--tone-rgb));
  background: rgba(var(--tone-rgb), 0.18);
  box-shadow: inset 0 0 0 1px rgba(var(--tone-rgb), 0.3);
}

.portal-tile-go {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--tec-text-muted);
  font-size: 0.85rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.portal-tile:hover .portal-tile-go {
  background: rgba(var(--tone-rgb), 0.35);
  color: #fff;
}

.portal-tile-label {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
}

.portal-tile-desc {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--tec-text-muted);
}

/* Ícono grande de fondo, como ilustración de la tarjeta. */
.portal-tile-art {
  position: absolute;
  right: -14px;
  bottom: -26px;
  z-index: -1;
  font-size: 7rem;
  line-height: 1;
  color: rgba(var(--tone-rgb), 0.1);
  transform: rotate(-12deg);
  pointer-events: none;
  transition: transform 0.3s ease, color 0.3s ease;
}

.portal-tile:hover .portal-tile-art {
  transform: rotate(-4deg) scale(1.06);
  color: rgba(var(--tone-rgb), 0.16);
}

@media (max-width: 991.98px) {
  .app-content--wide {
    padding: 1rem;
  }

  .portal-hero {
    padding: 1.1rem;
  }

  .portal-hero-avatar {
    width: 52px;
    height: 52px;
    font-size: 1.1rem;
  }

  .portal-hero-name {
    font-size: 1.2rem;
  }

  .portal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .portal-tile {
    min-height: 146px;
    gap: 1rem;
    padding: 0.95rem;
  }

  .portal-tile-icon {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  .portal-tile-label {
    font-size: 0.95rem;
  }

  .portal-tile-desc {
    font-size: 0.72rem;
  }
}

/* Datos del colaborador y cambio de contraseña (Views/MiPortal) */
.portal-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  font-size: 0.93rem;
  border: 1px solid transparent;
}

.portal-alert--ok {
  border-color: rgba(46, 204, 113, 0.4);
  background: rgba(46, 204, 113, 0.1);
  color: #7ee2a8;
}

.portal-alert--error {
  border-color: rgba(231, 76, 60, 0.45);
  background: rgba(231, 76, 60, 0.1);
  color: #ff9d90;
}

.portal-datos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.portal-dato {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  padding: 1rem 1.15rem;
  border-radius: 18px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
}

.portal-dato-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--tec-text-muted);
}

.portal-dato-label i {
  margin-right: 0.3rem;
  color: rgb(var(--tone-rgb));
}

.portal-dato-valor {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  overflow-wrap: anywhere;
}

.portal-editar > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(var(--tone-rgb), 0.15);
  color: rgb(var(--tone-rgb));
  font-size: 0.78rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.portal-editar > summary::-webkit-details-marker {
  display: none;
}

.portal-editar[open] > summary {
  margin-bottom: 0.6rem;
}

.portal-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.portal-form-label {
  font-size: 0.78rem;
  color: var(--tec-text-muted);
}

.portal-input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--app-border-strong);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 0.95rem;
}

.portal-input:focus {
  outline: none;
  border-color: var(--tec-accent);
  box-shadow: 0 0 0 3px rgba(77, 208, 225, 0.2);
}

.portal-btn {
  align-self: flex-start;
  padding: 0.55rem 1.2rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--tec-primary), var(--tec-primary-dark));
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

.portal-btn:hover {
  filter: brightness(1.1);
}

.portal-datos--uno {
  grid-template-columns: minmax(0, 460px);
}

.portal-form-clave .portal-form-label:not(:first-of-type) {
  margin-top: 0.35rem;
}

.portal-form-ayuda {
  font-size: 0.8rem;
  color: var(--tec-text-muted);
}

@media (max-width: 991.98px) {
  .portal-datos {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* Mes del resumen en la cabecera: flechas para cambiar de mes. */
.portal-hero-mes {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.portal-hero-mes .portal-hero-period {
  padding: 0.3rem;
  gap: 0.35rem;
}

.portal-hero-nav {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--tec-text-light);
  text-decoration: none;
  transition: background 0.2s ease;
}

.portal-hero-nav:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Valor del mes en cada tarjeta (cantidad u horas). */
.portal-tile-valor {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

/* Detalle que abre cada tarjeta (modal de Bootstrap). */
.portal-modal {
  --tone-rgb: 138, 146, 178;
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(var(--tone-rgb), 0.16), transparent 60%),
    linear-gradient(180deg, #121a3d 0%, #0c122c 100%);
  color: var(--tec-text-light);
  border: 1px solid rgba(var(--tone-rgb), 0.3);
  border-radius: 20px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}

.portal-modal .modal-header {
  gap: 0.85rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--app-border);
}

.portal-modal-head {
  flex: 1;
  min-width: 0;
}

.portal-modal .modal-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.portal-modal-sub {
  margin: 0.1rem 0 0;
  font-size: 0.8rem;
  color: var(--tec-text-muted);
}

.portal-modal .modal-body {
  padding: 1.15rem 1.25rem 1.35rem;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.portal-modal-nota {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--tec-text-muted);
}

.portal-resumen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.portal-resumen-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(var(--tone-rgb), 0.08);
  border: 1px solid rgba(var(--tone-rgb), 0.2);
}

.portal-resumen-item strong {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.portal-resumen-item span {
  font-size: 0.75rem;
  color: var(--tec-text-muted);
}

.portal-resumen--destacado .portal-resumen-item {
  background: rgba(var(--tone-rgb), 0.16);
  border-color: rgba(var(--tone-rgb), 0.4);
}

.portal-resumen--destacado .portal-resumen-item strong {
  font-size: 1.85rem;
}

.portal-lista {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
}

.portal-item-fecha {
  flex-shrink: 0;
  min-width: 5.2rem;
  padding-top: 0.05rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgb(var(--tone-rgb));
  font-variant-numeric: tabular-nums;
}

.portal-item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.portal-item-main strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.portal-item-main span {
  font-size: 0.8rem;
  color: var(--tec-text-muted);
}

.portal-item-main span i {
  margin-right: 0.2rem;
}

.portal-item-detalle {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--tec-text-muted);
  overflow-wrap: anywhere;
}

.portal-item-valor {
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 800;
  color: rgb(var(--tone-rgb));
  font-variant-numeric: tabular-nums;
}

.portal-estado {
  flex-shrink: 0;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.portal-estado--aprobado {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
}

.portal-estado--pendiente {
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
}

.portal-estado--rechazado {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
}

.portal-vacio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 1.75rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--tec-text-muted);
}

.portal-vacio i {
  font-size: 1.9rem;
  color: rgba(var(--tone-rgb), 0.75);
}

@media (max-width: 991.98px) {
  .portal-tile-valor {
    font-size: 1.4rem;
  }

  .portal-hero-mes {
    width: 100%;
  }

  .portal-resumen {
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  }

  .portal-resumen-item {
    padding: 0.65rem 0.75rem;
  }

  .portal-item {
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
  }

  .portal-item-fecha {
    min-width: 0;
    width: 100%;
  }
}

/* ---------- SOLICITUDES DE PERMISO (Views/Solicitudes) ---------- */
.portal-btn i {
  margin-right: 0.4rem;
}

.portal-btn--peligro {
  background: linear-gradient(135deg, #e5484d, #b42318);
}

.portal-modal-accion {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1rem;
  color: #fff;
  text-decoration: none;
}

.portal-modal-accion:hover {
  color: #fff;
}

.solicitud-volver {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  color: var(--tec-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.solicitud-volver:hover {
  color: #fff;
}

.solicitud-card {
  --tone-rgb: 138, 146, 178;
  max-width: 680px;
  padding: 1.5rem;
  border-radius: 22px;
  border: 1px solid rgba(var(--tone-rgb), 0.3);
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(var(--tone-rgb), 0.14), transparent 60%),
    linear-gradient(180deg, #121a3d 0%, #0c122c 100%);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}

.solicitud-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.revisar-titulo {
  flex: 1;
  min-width: 0;
}

.solicitud-titulo {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.solicitud-sub {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: var(--tec-text-muted);
}

.solicitud-alerta {
  margin: 0 0 1rem;
}

.solicitud-form {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.solicitud-fila {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.solicitud-fila > div {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.solicitud-bloque {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.5rem 0 0;
  padding: 0;
  border: 0;
}

.solicitud-opciones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.solicitud-opciones label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--app-border-strong);
  background: rgba(0, 0, 0, 0.2);
  color: var(--tec-text-light);
  font-size: 0.85rem;
  cursor: pointer;
}

.solicitud-opciones label:has(input:checked) {
  border-color: rgb(var(--tone-rgb));
  background: rgba(var(--tone-rgb), 0.15);
  color: #fff;
}

.solicitud-opciones input {
  accent-color: rgb(var(--tone-rgb));
}

.solicitud-textarea {
  min-height: 110px;
  resize: vertical;
}

.solicitud-adjunto-label {
  margin-top: 0.6rem;
}

.solicitud-adjunto {
  padding: 0.45rem;
  font-size: 0.85rem;
}

.solicitud-adjunto::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.4rem 0.85rem;
  border: none;
  border-radius: 8px;
  background: rgba(var(--tone-rgb), 0.2);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* Calendario, reloj y lista del select con los colores oscuros de la app. */
.solicitud-form input[type="date"],
.solicitud-form input[type="time"] {
  color-scheme: dark;
}

.solicitud-form select option {
  background: #0c122c;
  color: #fff;
}

.solicitud-acciones {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.solicitud-cancelar {
  color: var(--tec-text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.solicitud-cancelar:hover {
  color: #fff;
}

/* Página que abre la jefatura desde el correo (sin menú ni sesión). */
.revisar-body {
  min-height: 100vh;
}

.revisar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 2.5rem 16px;
}

.revisar .solicitud-card {
  width: 100%;
}

.revisar-marca {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-size: 1.1rem;
}

.revisar-datos {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.55rem 1.25rem;
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
}

.revisar-datos dt {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tec-text-muted);
}

.revisar-datos dd {
  margin: 0;
  font-weight: 700;
  color: #fff;
  overflow-wrap: anywhere;
}

.revisar-acciones {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.revisar-rechazo {
  padding-top: 1.25rem;
  border-top: 1px solid var(--app-border);
}

@media (max-width: 575.98px) {
  .solicitud-card {
    padding: 1.15rem;
  }

  .solicitud-fila {
    grid-template-columns: 1fr;
  }

  .solicitud-head {
    flex-wrap: wrap;
  }

  .revisar-datos {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .revisar-datos dd {
    margin-bottom: 0.55rem;
  }
}

/* "Tu semana": llegada promedio por día (Views/MapaCalor) */
.semana {
  margin-top: 1.25rem;
}

.semana .dash-card-head {
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.semana .dash-card-title {
  white-space: nowrap;
}

.semana .dash-card-title i {
  margin-right: 0.35rem;
  color: var(--tec-accent);
}

.semana-periodo {
  font-size: 0.75rem;
  color: var(--tec-text-muted);
}

.semana-frases {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.semana-frase {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0;
  padding: 0.75rem 0.95rem;
  border-radius: 14px;
  background: rgba(77, 208, 225, 0.08);
  border: 1px solid rgba(77, 208, 225, 0.18);
  color: var(--tec-text-light);
  font-size: 0.95rem;
  line-height: 1.45;
}

.semana-frase i {
  color: #fcd34d;
  margin-top: 0.1rem;
}

.semana-grafico {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.semana-fila {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 170px;
  align-items: center;
  gap: 0.9rem;
  min-height: 32px;
}

.semana-dia {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--tec-text-muted);
}

/* Riel recesivo con líneas de borde en los extremos del eje. */
.semana-riel {
  position: relative;
  height: 32px;
  border-left: 1px solid var(--app-border);
  border-right: 1px solid var(--app-border);
}

.semana-riel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.07);
}

.semana-punto {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--tec-accent);
  box-shadow: 0 0 0 2px #0f1636;
  cursor: default;
}

/* Área de hover más grande que el punto. */
.semana-punto::before {
  content: "";
  position: absolute;
  inset: -10px;
}

.semana-punto.is-temprano,
.semana-punto.is-tarde {
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  box-shadow: 0 0 0 2px #0f1636, 0 0 0 5px rgba(77, 208, 225, 0.3);
}

.semana-valor {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #fff;
}

.semana-tag {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--app-border-strong);
  color: var(--tec-text-muted);
  font-size: 0.7rem;
  white-space: nowrap;
}

.semana-sin {
  font-size: 0.78rem;
  color: var(--tec-text-muted);
}

.semana-eje {
  min-height: 0;
}

.semana-eje-marcas {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--tec-text-muted);
}

.semana-nota {
  margin: 0.9rem 0 0;
  font-size: 0.75rem;
  color: var(--tec-text-muted);
}

@media (max-width: 991.98px) {
  .semana-fila {
    grid-template-columns: 34px minmax(0, 1fr) 118px;
    gap: 0.6rem;
  }

  .semana-valor {
    flex-wrap: wrap;
    gap: 0.15rem 0.4rem;
  }
}

/* ---------- MIS TURNOS (calendario, Views/Turnos) ---------- */
.turnos-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.turnos-next {
  --tone-rgb: 77, 208, 225;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.3rem;
  border-radius: 20px;
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(var(--tone-rgb), 0.22), transparent 55%),
    linear-gradient(135deg, #17214f 0%, #0f1636 100%);
  border: 1px solid rgba(var(--tone-rgb), 0.3);
  box-shadow: 0 20px 40px -28px rgba(0, 0, 0, 0.9);
}

.turnos-next--empty {
  --tone-rgb: 138, 146, 178;
}

.turnos-next-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.5rem;
  color: rgb(var(--tone-rgb));
  background: rgba(var(--tone-rgb), 0.18);
  box-shadow: inset 0 0 0 1px rgba(var(--tone-rgb), 0.3);
}

.turnos-next-text {
  min-width: 0;
}

.turnos-next-eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(var(--tone-rgb));
}

.turnos-next-when {
  margin: 0.15rem 0 0.2rem;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.turnos-next-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  margin: 0;
  font-size: 0.82rem;
  color: var(--tec-text-muted);
}

.turnos-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.turnos-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  padding: 1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--app-border);
}

.turnos-stat strong {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.turnos-stat span {
  font-size: 0.76rem;
  color: var(--tec-text-muted);
}

.turnos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.25rem;
  align-items: start;
}

.cal-card {
  padding: 1.1rem;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--app-border);
  box-shadow: 0 20px 40px -28px rgba(0, 0, 0, 0.9);
}

.cal-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.cal-title {
  flex: 1;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.cal-head .app-icon-btn {
  text-decoration: none;
}

.cal-today {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(77, 208, 225, 0.35);
  color: var(--tec-accent);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.cal-today:hover {
  background: rgba(77, 208, 225, 0.1);
  color: #7fe3ef;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
}

.cal-weekday {
  padding-bottom: 0.25rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tec-text-muted);
}

.cal-day {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
  min-width: 0;
  min-height: 92px;
  padding: 0.45rem;
  border-radius: 14px;
  border: 1px solid var(--app-border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--tec-text-light);
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.cal-day:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.cal-day:focus-visible {
  outline: 2px solid var(--tec-accent);
  outline-offset: 2px;
}

.cal-day[aria-pressed="true"] {
  border-color: var(--tec-accent);
  background: rgba(77, 208, 225, 0.07);
  box-shadow: 0 0 0 1px var(--tec-accent), 0 10px 24px -12px rgba(77, 208, 225, 0.6);
}

.cal-day.is-out {
  opacity: 0.35;
}

.cal-day.is-past .cal-shift {
  opacity: 0.6;
}

.cal-day-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.cal-day.is-today .cal-day-num {
  background: var(--tec-accent);
  color: #06122a;
}

/* Inicio arriba y término abajo: "09:30 – 18:30" en una línea no cabe en la celda. */
.cal-shift {
  --tone-rgb: 138, 146, 178;
  display: flex;
  flex-direction: column;
  padding: 0.2rem 0.45rem;
  border-radius: 8px;
  border-left: 3px solid rgb(var(--tone-rgb));
  background: rgba(var(--tone-rgb), 0.16);
  color: rgb(var(--tone-rgb));
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.cal-shift-end {
  font-weight: 600;
  opacity: 0.75;
}

.cal-free {
  padding: 0.2rem 0.4rem;
  border-radius: 8px;
  border: 1px dashed var(--app-border-strong);
  color: var(--tec-text-muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.cal-feriado {
  border-style: solid;
  border-color: rgba(196, 181, 253, 0.45);
  color: #c4b5fd;
}

.turno-feriado i {
  color: #c4b5fd;
}

.turnos-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.turno-detalle-fecha {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.turno-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
  font-size: 0.7rem;
  font-weight: 700;
}

.turno-tag--hoy {
  background: rgba(77, 208, 225, 0.16);
  color: var(--tec-accent);
}

.turno-info {
  --tone-rgb: 138, 146, 178;
  padding: 0.9rem;
  border-radius: 16px;
  background: radial-gradient(140% 100% at 0% 0%, rgba(var(--tone-rgb), 0.16), transparent 60%), rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(var(--tone-rgb), 0.3);
}

.turno-info + .turno-info {
  margin-top: 0.75rem;
}

.turno-info-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.turno-info-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.2rem;
  color: rgb(var(--tone-rgb));
  background: rgba(var(--tone-rgb), 0.18);
}

.turno-info-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.turno-info-title strong {
  color: #fff;
  font-size: 0.95rem;
}

.turno-info-title span {
  color: rgb(var(--tone-rgb));
  font-size: 1.1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.turno-info-datos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0.85rem 0 0;
}

.turno-info-datos > div {
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.turno-info-datos dt {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--tec-text-muted);
}

.turno-info-datos dd {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.turno-vacio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 1rem;
  border-radius: 14px;
  border: 1px dashed var(--app-border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--tec-text-muted);
  font-size: 0.88rem;
}

.turnos-leyenda {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.turnos-leyenda li {
  --tone-rgb: 138, 146, 178;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.turnos-leyenda-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  flex-shrink: 0;
  background: rgb(var(--tone-rgb));
  box-shadow: 0 0 0 3px rgba(var(--tone-rgb), 0.2);
}

.turnos-leyenda-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.turnos-leyenda-text strong {
  color: #fff;
  font-size: 0.88rem;
}

.turnos-leyenda-text span {
  color: var(--tec-text-muted);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}

.turnos-leyenda-dias {
  color: var(--tec-text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Sin espacio para la columna lateral: el detalle y la leyenda bajan bajo el calendario. */
@media (max-width: 1279.98px) {
  .turnos-layout {
    grid-template-columns: 1fr;
  }

  .turnos-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 991.98px) {
  .turnos-top {
    grid-template-columns: 1fr;
  }

  .turnos-side {
    grid-template-columns: 1fr;
  }
}

/* Celular: la celda muestra solo el número y la hora de inicio (el resto, en el detalle). */
@media (max-width: 575.98px) {
  .turnos-next {
    padding: 1rem;
  }

  .turnos-next-when {
    font-size: 1.1rem;
  }

  .turnos-stats {
    gap: 0.5rem;
  }

  .turnos-stat {
    padding: 0.75rem;
  }

  .turnos-stat strong {
    font-size: 1.15rem;
  }

  .turnos-stat span {
    font-size: 0.7rem;
  }

  .cal-card {
    padding: 0.8rem 0.6rem;
    border-radius: 18px;
  }

  .cal-head {
    padding: 0 0.2rem;
  }

  .cal-grid {
    gap: 0.25rem;
  }

  .cal-weekday {
    font-size: 0.64rem;
    letter-spacing: 0;
  }

  .cal-day {
    align-items: center;
    gap: 0.2rem;
    min-height: 58px;
    padding: 0.3rem 0.15rem;
    border-radius: 10px;
  }

  .cal-day-num {
    width: 22px;
    height: 22px;
    font-size: 0.78rem;
  }

  .cal-shift {
    width: 100%;
    padding: 0.1rem 0;
    border-left: 0;
    border-radius: 6px;
    align-items: center;
    font-size: 0.6rem;
  }

  .cal-shift-end {
    display: none;
  }

  .cal-free {
    width: 100%;
    padding: 0.1rem 0;
    font-size: 0.58rem;
    text-align: center;
  }

  .turno-info-datos {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- MAPA DE CALOR (Views/MapaCalor) ----------
   Grilla día × hora con rampa secuencial de un solo tono (cian de la marca), validada
   con la skill de dataviz: monótona, pasos visibles, el nivel 1 a 2.13:1 del fondo. */
.hm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.hm-mes {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hm-mes .app-icon-btn {
  text-decoration: none;
}

.hm-mes-titulo {
  min-width: 10ch;
  margin: 0;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}

.hm-filtros {
  display: flex;
  gap: 0.4rem;
  width: min(100%, 360px);
}

.hm-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stat-tile {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--app-border);
}

.stat-tile strong {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.stat-tile span {
  font-size: 0.76rem;
  color: var(--tec-text-muted);
}

.hm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.hm-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.hm-card {
  position: relative;
}

.hm-scroll {
  overflow-x: auto;
  margin: 0.75rem -0.25rem 0;
  padding: 0 0.25rem 0.25rem;
}

.hm-grid {
  display: grid;
  grid-template-columns: 3.1rem repeat(var(--hm-cols), minmax(14px, 1fr));
  gap: 2px;
  min-width: calc(3.1rem + var(--hm-cols) * 16px);
}

.hm-hour {
  padding-bottom: 0.2rem;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--tec-text-muted);
  font-variant-numeric: tabular-nums;
}

.hm-day {
  align-self: center;
  padding-right: 0.35rem;
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--tec-text-light);
  font-variant-numeric: tabular-nums;
}

.hm-day.is-weekend,
.hm-day.is-future {
  color: var(--tec-text-muted);
}

.hm-day.is-today {
  color: var(--tec-accent);
  font-weight: 800;
}

.hm-cell {
  display: block;
  height: 18px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.045);
}

.hm-lvl-1 { background: #005860; }
.hm-lvl-2 { background: #008590; }
.hm-lvl-3 { background: #1db2c0; }
.hm-lvl-4 { background: #65dfed; }

.hm-cell.is-future {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.hm-grid .hm-cell[tabindex]:hover,
.hm-grid .hm-cell:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid #fff;
  outline-offset: 1px;
}

.hm-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  margin-top: 0.9rem;
  font-size: 0.72rem;
  color: var(--tec-text-muted);
}

.hm-legend-steps {
  display: inline-flex;
  gap: 2px;
}

.hm-legend-steps .hm-cell {
  width: 18px;
  height: 12px;
}

.hm-legend-note {
  margin-left: auto;
}

.hm-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 180px;
  max-width: 260px;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  background: #0b1030;
  border: 1px solid var(--app-border-strong);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
  color: var(--tec-text-muted);
  font-size: 0.78rem;
  pointer-events: none;
}

.hm-tooltip strong {
  display: block;
  font-size: 0.95rem;
  color: #fff;
}

.hm-tooltip-when {
  display: block;
  margin-bottom: 0.35rem;
}

.hm-tooltip ul {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hm-tooltip li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--tec-text-light);
  font-variant-numeric: tabular-nums;
}

/* Clave de línea (no caja) en el tooltip. */
.hm-key {
  width: 12px;
  height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}

.hm-map-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--tec-text-muted);
}

.hm-map {
  position: relative;
  z-index: 1;
  height: 320px;
  margin-top: 0.75rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--app-border-strong);
  background: #10182e;
}

.hm-map .leaflet-bar {
  border: 1px solid var(--app-border-strong);
  border-radius: 10px;
  overflow: hidden;
}

.hm-map .leaflet-bar a {
  background: rgba(8, 11, 30, 0.88);
  border-bottom-color: var(--app-border);
  color: #fff;
}

.hm-map .leaflet-control-attribution {
  background: rgba(8, 11, 30, 0.6);
  color: rgba(255, 255, 255, 0.55);
}

.hm-map .leaflet-control-attribution a {
  color: rgba(255, 255, 255, 0.75);
}

.hm-point-tip {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.hm-point-tip strong {
  font-size: 0.85rem;
}

.hm-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.76rem;
  color: var(--tec-text-light);
}

.hm-map-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

/* Igual que el punto del mapa: círculo con anillo blanco. */
.hm-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff;
}

.hm-dot--entrada { background: #8862e5; }
.hm-dot--salida { background: #e16c10; }
.hm-dot--descanso { background: #00a38f; }

/* Igual que el círculo de zona permitida del mapa (azul, como en el GeoPoint). */
.hm-dot--zona {
  background: rgba(47, 111, 237, 0.3);
  box-shadow: 0 0 0 2px #2f6fed;
}

/* Marcador de estado con geocerca: verde ✓ dentro / rojo ✕ fuera, con anillo blanco
   para separarse del satélite. El ícono va siempre: el color solo no basta (daltonismo). */
.geo-pin-wrap {
  display: grid;
  place-items: center;
}

.geo-pin {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.72rem;
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0, 0, 0, 0.5);
}

.geo-pin i {
  line-height: 1;
  -webkit-text-stroke: 0.6px #fff;
}

.geo-pin.is-ok { background: #16a34a; }
.geo-pin.is-out { background: #dc2626; }

.hm-map-vistas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.hm-map-vistas[hidden] {
  display: none;
}

.hm-vista {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--app-border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--tec-text-light);
  font-size: 0.76rem;
  font-weight: 600;
}

.hm-vista:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hm-vista.is-active {
  border-color: #2f6fed;
  background: rgba(47, 111, 237, 0.2);
  color: #fff;
}

.geo-pin--legend {
  display: inline-grid;
  width: 16px;
  height: 16px;
  font-size: 0.58rem;
}

/* Estado de geocerca: color de estado reservado, siempre con ícono + texto. */
.hm-geo-status {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  line-height: 1.4;
}

.hm-geo-status.is-ok {
  background: rgba(46, 204, 113, 0.1);
  color: #4ade80;
}

.hm-geo-status.is-warn {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
}

.hm-geo-status span {
  color: var(--tec-text-light);
}

.hm-point-geo {
  margin-top: 0.2rem;
  font-weight: 600;
}

.hm-point-geo.is-ok { color: #15803d; }
.hm-point-geo.is-warn { color: #b45309; }

.hm-map-note {
  display: flex;
  gap: 0.45rem;
  margin: 0.75rem 0 0;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--tec-text-muted);
}

.hm-lugares {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.hm-lugares li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "nombre n"
    "barra barra";
  align-items: center;
  gap: 0.3rem 0.75rem;
}

.hm-lugares li.is-cero {
  opacity: 0.5;
}

.hm-lugar-nombre {
  grid-area: nombre;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  font-size: 0.84rem;
  color: var(--tec-text-light);
}

.hm-lugar-nombre i {
  color: var(--tec-text-muted);
}

.hm-lugar-nombre span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hm-lugar-n {
  grid-area: n;
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.hm-lugar-barra {
  grid-area: barra;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.hm-lugar-barra > span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: #1db2c0;
  transition: width 0.25s ease;
}

@media (max-width: 1199.98px) {
  .hm-layout {
    grid-template-columns: 1fr;
  }

  .hm-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 991.98px) {
  .hm-side {
    grid-template-columns: 1fr;
  }

  .hm-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
}

@media (max-width: 575.98px) {
  .hm-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .hm-mes {
    justify-content: space-between;
  }

  .hm-filtros {
    width: 100%;
  }

  .stat-tile {
    padding: 0.75rem;
  }

  .stat-tile strong {
    font-size: 1.15rem;
  }

  .hm-cell {
    height: 16px;
  }

  .hm-legend-note {
    width: 100%;
    margin-left: 0;
  }

  .hm-map {
    height: 240px;
  }
}

/* ---------- REPORTES (Views/Reportes) ----------
   Tono formal: misma estructura que el PDF (ReportePdf), sin adornos. */
.rp-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.rp-tipo {
  display: inline-flex;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--app-border);
}

.rp-tipo-btn {
  padding: 0.45rem 1.1rem;
  border-radius: 9px;
  color: var(--tec-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.rp-tipo-btn:hover {
  color: #fff;
}

.rp-tipo-btn.is-active {
  background: var(--tec-primary);
  color: #fff;
}

.rp-periodo {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rp-periodo .app-icon-btn {
  text-decoration: none;
}

.rp-periodo-label {
  min-width: 12ch;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.rp-pdf {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 24px -14px rgba(255, 255, 255, 0.5);
}

.rp-pdf:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.rp-doc {
  padding: 1.5rem;
  border-radius: 18px;
  background: #0f1533;
  border: 1px solid var(--app-border);
}

.rp-doc-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--tec-primary);
}

.rp-empresa,
.rp-subtitulo {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7aa2ff;
}

.rp-empresa {
  margin: 0;
}

.rp-titulo {
  margin: 0.2rem 0 0.1rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.rp-periodo-sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--tec-text-muted);
}

.rp-datos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  gap: 0.45rem 1.75rem;
  margin: 0;
}

.rp-datos dt {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--tec-text-muted);
}

.rp-datos dd {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.rp-subtitulo {
  margin: 0 0 0.6rem;
}

/* Grilla con líneas de 1px (gap sobre fondo de borde): sirve con 3 o 2 columnas. */
.rp-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--app-border-strong);
  border-radius: 12px;
  overflow: hidden;
  background: var(--app-border-strong);
}

.rp-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  background: #0f1533;
}

.rp-kpi strong {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.rp-kpi small {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--tec-text-muted);
}

.rp-kpi span {
  font-size: 0.74rem;
  color: var(--tec-text-muted);
}

.rp-kpi.is-bad strong { color: #f87171; }
.rp-kpi.is-warn strong { color: #fbbf24; }
.rp-pos { color: #4ade80; }
.rp-neg { color: #f87171; }

.rp-detalle-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin-bottom: 0.6rem;
}

.rp-detalle-head .rp-subtitulo {
  margin: 0;
}

.rp-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.rp-filtros .filter-tab {
  flex: 0 0 auto;
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
}

.rp-tabla-wrap {
  border: 1px solid var(--app-border-strong);
  border-radius: 12px;
  overflow: hidden;
}

.rp-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.rp-tabla th {
  padding: 0.6rem 0.75rem;
  background: rgba(47, 111, 237, 0.18);
  color: #dbe4ff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

.rp-tabla td {
  padding: 0.55rem 0.75rem;
  border-top: 1px solid var(--app-border);
  color: var(--tec-text-light);
  white-space: nowrap;
  vertical-align: middle;
}

.rp-tabla td:last-child {
  white-space: normal;
}

.rp-tabla tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.rp-tabla tr[hidden] {
  display: none;
}

.rp-fecha {
  font-weight: 600;
  color: #fff !important;
}

.rp-fila.is-sin-turno td,
.rp-fila.is-libre td,
.rp-fila.is-programado td {
  color: var(--tec-text-muted);
}

.rp-tabla td.rp-atraso {
  color: #f87171;
  font-weight: 700;
}

.rp-estado {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

.rp-estado--cumplido { color: #4ade80; }
.rp-estado--atraso,
.rp-estado--sin-registro { color: #f87171; }
.rp-estado--incompleto { color: #fbbf24; }
.rp-estado--en-curso { color: var(--tec-accent); }
.rp-estado--fuera-de-turno { color: #93c5fd; }
.rp-estado--feriado { color: #c4b5fd; }
.rp-estado--justificado { color: #5eead4; }

.rp-vacio {
  margin: 0;
  padding: 1rem;
  text-align: center;
  color: var(--tec-text-muted);
}

.rp-criterios {
  margin: 1.25rem 0 0;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--tec-text-muted);
}

.rp-criterios strong {
  color: var(--tec-text-light);
}

@media (max-width: 991.98px) {
  .rp-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Celular: cada día es una tarjeta con etiqueta: valor (sin scroll horizontal). */
@media (max-width: 767.98px) {
  .rp-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .rp-tipo-btn {
    flex: 1;
  }

  .rp-periodo {
    justify-content: space-between;
  }

  .rp-pdf {
    justify-content: center;
  }

  .rp-doc {
    padding: 1rem;
  }

  .rp-datos {
    grid-template-columns: 1fr 1fr;
  }

  .rp-tabla-wrap {
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .rp-tabla,
  .rp-tabla tbody {
    display: block;
  }

  .rp-tabla thead {
    display: none;
  }

  .rp-tabla tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem 0.9rem;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
  }

  .rp-tabla td {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0;
    border: 0;
    white-space: normal;
  }

  .rp-tabla td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    color: var(--tec-text-muted);
  }

  .rp-tabla td.rp-fecha,
  .rp-tabla td:last-child {
    grid-column: 1 / -1;
  }

  .rp-tabla td.rp-fecha::before {
    content: none;
  }
}

/* Tonos sobre fondo oscuro (dashboard, Mi portal y Mis turnos). Los de marca son los mismos
   colores que las clases icon-* de Mis marcas (Entrada morado, Salida naranjo...).
   Van después de .mark-btn / .portal-tile para pisar su --tone-rgb por defecto. */
.tone-purple { --tone-rgb: 167, 139, 250; }
.tone-orange { --tone-rgb: 251, 146, 60; }
.tone-teal   { --tone-rgb: 45, 212, 191; }
.tone-olive  { --tone-rgb: 163, 230, 53; }
.tone-blue   { --tone-rgb: 96, 165, 250; }
.tone-green  { --tone-rgb: 52, 211, 153; }
.tone-red    { --tone-rgb: 248, 113, 113; }
.tone-amber  { --tone-rgb: 251, 191, 36; }
.tone-sky    { --tone-rgb: 56, 189, 248; }
.tone-pink   { --tone-rgb: 244, 114, 182; }

@media (max-width: 1199.98px) {
  .dash {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}

/* Celular / tablet: mapa arriba a todo el ancho y el panel encima, tipo hoja. */
@media (max-width: 991.98px) {
  .app-content--dash {
    padding: 0 0 1.5rem;
  }

  .dash {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .dash-map {
    position: relative;
    top: auto;
    height: 40vh;
    min-height: 260px;
    border: 0;
    border-bottom: 1px solid var(--app-border);
    border-radius: 0;
    box-shadow: none;
  }

  /* El panel se monta 1.75rem sobre el mapa: los controles de abajo suben igual. */
  .dash-map .leaflet-bottom {
    bottom: 1.75rem;
  }

  .dash-panel {
    position: relative;
    z-index: 2;
    margin-top: -1.75rem;
    padding: 0 1rem;
  }

  /* Lo primero sobre el mapa tiene que ser "Registrar marca": el saludo y el
     reloj grande ya están en el topbar y en la cabecera de la tarjeta. */
  .dash-hero {
    display: none;
  }

  .dash-card-clock {
    display: inline-block;
  }

  .dashboard-body .app-clock {
    display: none;
  }

  .dash-card--mark {
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.45);
    background: linear-gradient(180deg, #141b40 0%, #0f1533 100%);
  }

  .mark-btn {
    min-height: 104px;
  }
}

/* Íconos de tipo de marca sobre fondo claro (historial de Mis marcas). */
.icon-purple  { background: #efe6fb; color: #8e44ad; }
.icon-orange  { background: #fdecd8; color: #e67e22; }
.icon-teal    { background: #dcf3ef; color: #16a085; }
.icon-olive   { background: #eef1d6; color: #8e9c1f; }
.icon-blue    { background: #dbe9fb; color: #2f6fed; }

/* ---------- MODALES DE MARCA ---------- */
.marca-modal {
  background: #101733;
  color: var(--tec-text-light);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}

.marca-modal .modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.marca-modal-subtitle {
  color: var(--tec-text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.resultado-icono {
  font-size: 3.25rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.resultado-icono.resultado-ok {
  color: #2ecc71;
}

.resultado-icono.resultado-error {
  color: #e74c3c;
}

.resultado-mensaje {
  color: var(--tec-text-light);
  font-size: 1rem;
  margin: 0;
}

.rostro-modal .modal-body {
  text-align: center;
}

#video-container {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto 1rem;
  overflow: hidden;
  border-radius: 20px;
  border: 6px solid #1e8e5a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

#video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.rostro-hora {
  font-size: 2.4rem;
  font-weight: 700;
  color: #4dd0e1;
  margin: 0;
}

.rostro-fecha {
  color: var(--tec-text-muted);
  font-size: 0.85rem;
  text-transform: capitalize;
  margin-bottom: 0.75rem;
}

.rostro-user {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 0.6rem;
}

.rostro-nombre {
  font-weight: 700;
  margin: 0;
}

.rostro-rut {
  color: var(--tec-text-muted);
  margin: 0;
  font-size: 0.9rem;
}

/* ---------- PRELOADER ---------- */
.preloader-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
}

.preloader-spinner {
  width: 60px;
  height: 60px;
  border: 6px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--tec-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- MIS MARCAS ---------- */
.marcas-body {
  min-height: 100vh;
}

.marcas-profile {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1.1rem 1.1rem;
}

.marcas-profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--tec-text-light);
  flex-shrink: 0;
}

.marcas-profile-name {
  margin: 0;
  font-weight: 700;
  font-size: 1.1rem;
}

.marcas-profile-period {
  margin: 0;
  color: var(--tec-text-muted);
  font-size: 0.85rem;
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0 1.1rem 1rem;
}

.filter-tab {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--tec-text-muted);
  border-radius: 999px;
  padding: 0.5rem 0.35rem;
  white-space: nowrap;
  font-size: 0.85rem;
  font-weight: 600;
}

.filter-tab.active {
  background: linear-gradient(135deg, var(--tec-primary), var(--tec-primary-dark));
  border-color: transparent;
  color: #fff;
}

.marcas-section-title {
  padding: 0 1.1rem;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.marcas-empty {
  margin: 0 1.1rem;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--tec-text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 14px;
}

.marcas-empty i {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 0.5rem;
}

.timeline {
  position: relative;
  padding: 0 1.1rem;
  margin-bottom: 1.25rem;
}

.timeline-item {
  position: relative;
  padding-left: 1.4rem;
  padding-bottom: 1rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 22px;
  bottom: -4px;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--tec-accent);
  box-shadow: 0 0 0 4px rgba(77, 208, 225, 0.18);
}

.timeline-item[data-tipo="O"] .timeline-dot { background: #e67e22; box-shadow: 0 0 0 4px rgba(230, 126, 34, 0.18); }
.timeline-item[data-tipo="2"] .timeline-dot { background: #16a085; box-shadow: 0 0 0 4px rgba(22, 160, 133, 0.18); }
.timeline-item[data-tipo="3"] .timeline-dot { background: #8e9c1f; box-shadow: 0 0 0 4px rgba(142, 156, 31, 0.18); }

.timeline-item.is-hidden {
  display: none;
}

.marca-card {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.85rem;
}

.marca-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.marca-card-body {
  flex: 1;
  min-width: 0;
}

.marca-card-fecha {
  margin: 0 0 0.15rem;
  font-size: 0.8rem;
  color: var(--tec-text-muted);
}

.marca-card-tipo {
  margin: 0 0 0.15rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--tec-text-light);
}

.marca-card-tipo .tipo-I { color: #b98aec; }
.marca-card-tipo .tipo-O { color: #e67e22; }
.marca-card-tipo .tipo-2 { color: #45c4ae; }
.marca-card-tipo .tipo-3 { color: #c3d34a; }

.marca-card-ubicacion {
  margin: 0;
  font-size: 0.78rem;
  color: var(--tec-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marca-card-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-ok {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
}

.badge-pendiente {
  background: rgba(241, 196, 15, 0.15);
  color: #f1c40f;
}

/* Atrasos: la primera entrada de cada turno se compara con USER_TEMP_SCH
   (ver MisMarcasService). */
.marcas-atrasos {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0 1.1rem 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(46, 204, 113, 0.08);
  border: 1px solid rgba(46, 204, 113, 0.25);
}

.marcas-atrasos.has-atrasos {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.28);
}

.marcas-atrasos-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.15rem;
  background: rgba(46, 204, 113, 0.15);
  color: #4ade80;
}

.marcas-atrasos.has-atrasos .marcas-atrasos-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.marcas-atrasos-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.marcas-atrasos-text strong {
  color: #fff;
  font-size: 0.95rem;
}

.marcas-atrasos-text span {
  color: var(--tec-text-muted);
  font-size: 0.78rem;
}

.marca-card-turno {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.55rem;
  margin: 0.2rem 0 0.3rem;
}

.turno-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.turno-chip--atraso {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.turno-chip--ok {
  background: rgba(46, 204, 113, 0.12);
  color: #4ade80;
}

.turno-horario {
  font-size: 0.74rem;
  color: var(--tec-text-muted);
  white-space: nowrap;
}

.timeline-item[data-atraso="1"] .timeline-dot {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

.eticket-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: calc(100% - 2.2rem);
  margin: 0 1.1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  color: var(--tec-text-light);
  font-weight: 600;
}

.eticket-btn:active {
  transform: scale(0.98);
}

.eticket-btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(47, 111, 237, 0.18);
  color: #6fa0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.eticket-btn-text {
  flex: 1;
  text-align: left;
}

.eticket-hint {
  margin: 0.5rem 1.1rem 0;
  font-size: 0.75rem;
  color: var(--tec-text-muted);
}

.eticket-hint strong {
  color: var(--tec-text-light);
  font-weight: 600;
}

/* ---------- CREDENCIAL QR (uso real — ver [[qr-credencial]]) ---------- */
.qrv-body {
  min-height: 100vh;
  padding: 0 0 2.5rem;
}

.qrv-greeting {
  text-align: center;
  padding: 1.5rem 1.5rem 0;
}

.qrv-title {
  margin: 0 0 0.35rem;
  font-size: 1.55rem;
  font-weight: 800;
  color: #fff;
}

.qrv-name {
  color: var(--tec-accent);
}

.qrv-hint {
  margin: 0;
  color: var(--tec-text-muted);
  font-size: 0.88rem;
}

.qrv-card-wrap {
  position: relative;
  width: min(260px, 66vw);
  aspect-ratio: 1 / 1;
  margin: 2.5rem auto 0;
}

.qrv-ghost {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  border: 1px solid rgba(77, 208, 225, 0.14);
  pointer-events: none;
}

.qrv-ghost-1 { transform: scale(1.08) rotate(0deg); opacity: 0.5; }
.qrv-ghost-2 { transform: scale(1.16) rotate(0deg); opacity: 0.25; }

.qrv-frame {
  position: relative;
  width: 100%;
  height: 100%;
}

.qrv-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 3px solid var(--tec-accent);
  filter: drop-shadow(0 0 6px rgba(77, 208, 225, 0.65));
}

.qrv-corner-tl { top: -10px; left: -10px; border-right: none; border-bottom: none; border-radius: 10px 0 0 0; }
.qrv-corner-tr { top: -10px; right: -10px; border-left: none; border-bottom: none; border-radius: 0 10px 0 0; }
.qrv-corner-bl { bottom: -10px; left: -10px; border-right: none; border-top: none; border-radius: 0 0 0 10px; }
.qrv-corner-br { bottom: -10px; right: -10px; border-left: none; border-top: none; border-radius: 0 0 10px 0; }

.qrv-card {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 20px;
  padding: 1.1rem;
  box-shadow: 0 0 0 1px rgba(77, 208, 225, 0.25), 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 30px -6px rgba(77, 208, 225, 0.5);
}

.qrv-sin-credencial {
  text-align: center;
  color: #6b7280;
  padding: 16px;
}

.qrv-sin-credencial i {
  font-size: 1.5rem;
}

.qrv-sin-credencial p {
  margin-top: 8px;
  font-size: 0.9rem;
}

.qrv-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: fit-content;
  margin: 1.5rem auto 0;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.35);
  color: #2ecc71;
  font-size: 0.78rem;
  font-weight: 700;
}

/* ---------- Secuencia anti-captura de la credencial (wwwroot/js/qr-shield.js) ----------
   El QR real, el señuelo y la tapa ocupan la misma caja, así el cambio entre uno y
   otro no mueve nada en pantalla. Sin JS, o en escritorio, .qrs--protegido no se
   aplica y solo se ve el QR real: la vista sigue funcionando como antes. */
.qrs {
  position: relative;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

/* El alto/ancho van explícitos y no por "inset": <img> y <canvas> son elementos
   reemplazados, así que con width:auto se quedan en su tamaño intrínseco (660 px la
   PNG del QR) y se desbordan de la tarjeta. */
.qrs-real,
.qrs-decoy,
.qrs-cover {
  position: absolute;
  top: 1.1rem;
  left: 1.1rem;
  width: calc(100% - 2.2rem);
  height: calc(100% - 2.2rem);
  object-fit: contain;
}

.qrs-decoy,
.qrs-cover {
  display: none;
}

.qrs-decoy {
  /* Escalado sin interpolar: los módulos del señuelo quedan tan duros como los
     de la PNG real, que es lo que hace que no se distinga a simple vista. */
  image-rendering: pixelated;
}

/* Modo protegido (solo celulares): por defecto no se muestra nada. */
.qrs--protegido .qrs-real { visibility: hidden; }
.qrs--protegido .qrs-cover { display: flex; }

/* Pulsación en curso: alterna señuelo / QR real. */
.qrs--protegido.qrs--activo .qrs-cover { display: none; }
.qrs--protegido.qrs--activo .qrs-decoy { display: block; }
.qrs--protegido.qrs--activo.qrs--real .qrs-decoy { display: none; }
.qrs--protegido.qrs--activo.qrs--real .qrs-real { visibility: visible; }

.qrs-cover {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #9aa3b2;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}

.qrs-cover i {
  font-size: 2rem;
  color: rgba(77, 208, 225, 0.55);
}

.qrv-hold-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: min(320px, 82vw);
  margin: 1.5rem auto 0;
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(77, 208, 225, 0.45);
  background: rgba(77, 208, 225, 0.12);
  color: var(--tec-accent);
  font-size: 0.92rem;
  font-weight: 700;
  /* Evita que el gesto de mantener presionado lo capture el scroll. */
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.qrv-hold-btn--activo {
  background: rgba(77, 208, 225, 0.28);
  box-shadow: 0 0 22px -4px rgba(77, 208, 225, 0.7);
  transform: scale(0.98);
}

.qrv-lector-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  max-width: 360px;
  margin: 1.5rem auto 0;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--tec-text-light);
  font-weight: 600;
  font-size: 0.92rem;
}

.qrv-lector-icon {
  color: var(--tec-accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.qrv-session-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 1rem auto 0;
  max-width: 360px;
  padding: 0 1.5rem;
  color: var(--tec-text-muted);
  font-size: 0.78rem;
  text-align: center;
}

/* ---------- PWA INSTALL BANNER ---------- */
.pwa-install-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1899;
  background: rgba(2, 4, 15, 0.72);
  backdrop-filter: blur(3px);
  animation: pwa-fade-in 0.2s ease-out;
}

@keyframes pwa-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pwa-install-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1.5rem;
  z-index: 1900;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: 2rem 1.75rem 1.75rem;
  background: linear-gradient(160deg, #1a2350 0%, #0e1433 100%);
  border: 2px solid var(--tec-accent);
  border-radius: 24px;
  box-shadow: 0 0 0 6px rgba(77, 208, 225, 0.12), 0 25px 60px rgba(0, 0, 0, 0.65);
  max-width: 440px;
  margin: 0 auto;
  animation: pwa-banner-in 0.3s ease-out, pwa-banner-glow 2.2s ease-in-out infinite;
}

@keyframes pwa-banner-in {
  from { transform: translateY(40px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes pwa-banner-glow {
  0%, 100% { box-shadow: 0 0 0 6px rgba(77, 208, 225, 0.12), 0 25px 60px rgba(0, 0, 0, 0.65); }
  50% { box-shadow: 0 0 0 12px rgba(77, 208, 225, 0.22), 0 25px 70px rgba(0, 0, 0, 0.7); }
}

.pwa-install-banner__icon img {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.pwa-install-banner__text {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pwa-install-banner__text strong {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.pwa-install-banner__text span {
  font-size: 1rem;
  color: var(--tec-text-light);
  line-height: 1.4;
  opacity: 0.9;
}

.pwa-install-banner__actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}

.pwa-install-banner__btn {
  border: none;
  border-radius: 12px;
  padding: 0.9rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  width: 100%;
}

.pwa-install-banner__btn--primary {
  background: linear-gradient(135deg, var(--tec-accent) 0%, var(--tec-primary) 100%);
  color: #06122a;
  box-shadow: 0 10px 25px rgba(45, 156, 219, 0.45);
}

.pwa-install-banner__btn--primary:hover {
  filter: brightness(1.08);
}

.pwa-install-banner__btn--ghost {
  background: transparent;
  color: var(--tec-text-muted);
  padding: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.pwa-install-banner__btn--ghost:hover {
  color: var(--tec-text-light);
}

/* ---------- ENROLAMIENTO FACIAL (consentimiento) ---------- */
.enrol-body {
  min-height: 100vh;
  padding-bottom: 2rem;
}

.enrol-hero {
  padding: 0.5rem 1.25rem 1.5rem;
}

.enrol-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.enrol-subtitle {
  margin: 0.35rem 0 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #a78bfa;
}

.enrol-lead {
  margin: 0.75rem 0 0;
  color: var(--tec-text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.enrol-card {
  margin: 0 1.25rem 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.enrol-card--consent {
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.06);
}

.enrol-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.enrol-info-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(77, 208, 225, 0.45);
  color: var(--tec-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.enrol-list {
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1;
}

.enrol-list li {
  padding: 0.55rem 0;
  font-size: 0.95rem;
  color: var(--tec-text-light);
}

.enrol-list li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.enrol-list li::before {
  content: "•";
  color: var(--tec-accent);
  margin-right: 0.6rem;
}

.enrol-card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.enrol-card-title i {
  color: #a78bfa;
  font-size: 1.5rem;
}

.enrol-check {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0;
  cursor: pointer;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.enrol-check input {
  appearance: none;
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  margin: 0;
  border-radius: 7px;
  border: 2px solid #a78bfa;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.enrol-check input:checked {
  background: #a78bfa;
}

.enrol-check input:checked::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: 6px;
  height: 12px;
  border: solid #14162a;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.enrol-check span {
  font-size: 0.95rem;
  color: var(--tec-text-light);
  line-height: 1.35;
}

.enrol-policy {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 1.25rem 1rem;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  border: 1px solid rgba(46, 204, 113, 0.35);
  background: rgba(46, 204, 113, 0.05);
  color: var(--tec-text-light);
  text-decoration: none;
}

.enrol-policy i:first-child {
  color: #2ecc71;
  font-size: 1.4rem;
}

.enrol-policy span {
  flex: 1;
  font-size: 0.98rem;
}

.enrol-policy i:last-child {
  color: var(--tec-text-muted);
}

.enrol-actions {
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.enrol-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 56px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.enrol-btn--primary {
  background: linear-gradient(135deg, var(--tec-primary), var(--tec-primary-dark));
  border-color: rgba(77, 208, 225, 0.5);
  color: #fff;
  box-shadow: 0 0 18px rgba(47, 111, 237, 0.35);
}

.enrol-btn--primary:disabled {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--tec-text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

.enrol-btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--tec-primary);
}

.enrol-btn--danger {
  background: transparent;
  border-color: rgba(231, 76, 60, 0.5);
  color: #ff8a7a;
}

.enrol-btn--danger:hover {
  background: rgba(231, 76, 60, 0.12);
}

.enrol-foot {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--tec-text-muted);
}

/* Aviso de resultado (aceptó / anuló / faltan casillas) */
.enrol-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0 1.25rem 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  font-size: 0.93rem;
  line-height: 1.4;
  border: 1px solid transparent;
}

.enrol-alert i {
  font-size: 1.15rem;
  line-height: 1.3;
}

.enrol-alert--ok {
  border-color: rgba(46, 204, 113, 0.4);
  background: rgba(46, 204, 113, 0.1);
  color: #7ee2a8;
}

.enrol-alert--error {
  border-color: rgba(231, 76, 60, 0.45);
  background: rgba(231, 76, 60, 0.1);
  color: #ff9d90;
}

/* Estado "tu consentimiento está aceptado" */
.enrol-status {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 1.25rem 1rem;
  padding: 1.15rem 1.25rem;
  border-radius: 18px;
  border: 1px solid rgba(46, 204, 113, 0.45);
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.14), rgba(46, 204, 113, 0.04));
}

.enrol-status-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  color: #2ecc71;
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.35);
}

.enrol-status-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.enrol-status-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.enrol-status-meta {
  font-size: 0.85rem;
  color: var(--tec-text-muted);
}

.enrol-nota {
  margin: 0 1.25rem 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--tec-text-muted);
}

.enrol-nota i {
  color: var(--tec-accent);
  margin-right: 0.35rem;
}

/* Aviso dentro del modal "Método de marca" cuando falta el consentimiento */
.marca-consent-aviso {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 193, 7, 0.4);
  background: rgba(255, 193, 7, 0.08);
  color: var(--tec-text-light);
  font-size: 0.85rem;
  line-height: 1.35;
  text-decoration: none;
}

.marca-consent-aviso i:first-child {
  color: #ffc107;
  font-size: 1.15rem;
}

.marca-consent-aviso span {
  flex: 1;
}

.marca-consent-aviso i:last-child {
  color: var(--tec-text-muted);
}
