/* =====================================================================
 * CIMA — base CSS
 * Imports design tokens del proyecto raíz; añade primitivos UI mínimos.
 * Profesional, sobrio, con toque "gaming" en estados activos (glow sutil).
 * ===================================================================== */

/* ===== TOKENS (subset de design/tokens.css incluido inline para no depender
 * de symlink al dir externo. Mantener sincronizado.) ===== */
:root {
  /* ---------- CIMA brand palette (canónico, ver public/brand/cima/README.md)
   * Tagline: "CAPITAL HUMANO DE MÁXIMO ALCANCE"
   *          "Gemelo digital de tus empleados"
   * ----------------------------------------------------------------- */
  --cima-ink:        #0E1F47;  /* navy oscuro — texto, navbar, símbolo izquierdo */
  --cima-ink-soft:   #1A2B5C;  /* cards en fondo oscuro, divisores */
  --cima-blue:       #2C8FE8;  /* acento — CTAs, links, "MÁXIMO ALCANCE" */
  --cima-blue-light: #5BA3F0;  /* gradiente derecho del símbolo, hover */
  --cima-blue-50:    #e9f3fc;  /* fondo blando para callouts */
  --cima-paper:      #ffffff;
  --cima-grey:       #5A6072;
  --cima-gradient-symbol: linear-gradient(90deg, var(--cima-ink) 0%, var(--cima-blue) 60%, var(--cima-blue-light) 100%);

  /* PAW palette (legacy / multi-producto). Mantenida para no romper vistas previas.
   * Las nuevas vistas DEBEN usar --cima-* tokens. */
  --paw-navy: #2e3b5e;
  --paw-navy-900: #1a2340;
  --paw-navy-800: #222c4b;
  --paw-navy-700: #2e3b5e;
  --paw-navy-500: #4f639b;
  --paw-navy-300: #91a3d1;
  --paw-navy-100: #dee4f1;
  --paw-navy-50:  #f0f3fa;

  --risk-0: #abb4b5;
  --risk-1: #43c9f3;
  --risk-2: #93c114;
  --risk-3: #fdcb00;
  --risk-4: #dd213d;
  --risk-trend: #dd0e5b;

  --gray-50:  #fafbfc;
  --gray-100: #f1f3f5;
  --gray-200: #e2e3e5;
  --gray-300: #c9ccd0;
  --gray-500: #7d858a;
  --gray-700: #3f4448;
  --gray-900: #131517;

  --bg-app:    var(--gray-50);
  --bg-surface:#ffffff;
  --bg-sunken: var(--gray-100);
  --fg-primary:var(--gray-900);
  --fg-secondary: var(--gray-700);
  --fg-muted:  var(--gray-500);

  --border-subtle: var(--gray-200);
  --border-default:var(--gray-300);

  --accent: var(--paw-navy);
  --accent-hover: #3d4f7d;
  --accent-active: var(--paw-navy-800);

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl:24px;

  --shadow-sm: 0 1px 3px rgba(26, 35, 64, 0.08), 0 1px 2px rgba(26, 35, 64, 0.04);
  --shadow-md: 0 4px 12px rgba(26, 35, 64, 0.08), 0 2px 4px rgba(26, 35, 64, 0.04);
  --shadow-lg: 0 10px 24px rgba(26, 35, 64, 0.10), 0 4px 8px rgba(26, 35, 64, 0.06);

  --glow-accent: 0 0 20px rgba(46, 59, 94, 0.35);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
}

/* ===== Icon system (Canon: visual-identity §Iconografía) ===== */
.cima-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  /* hereda color del texto padre via stroke="currentColor" */
}
button .cima-icon, a .cima-icon, .btn .cima-icon { vertical-align: -2px; }

/* ===== Reset mínimo ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg-app);
  color: var(--fg-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ===== Layout ===== */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* B5 PWA — header sticky + safe-area para iPhone notch / status bar.
   En PWA standalone (display-mode: standalone, set por manifest), el contenido
   se renderiza UNDER el status bar del iPhone (hora, señal, batería) por
   defecto. El env(safe-area-inset-top) reserva ese espacio para que el
   header NO se pise con el status bar del sistema. */
.app-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  /* padding-top base 10px + extra del safe-area en iPhones con notch */
  padding: calc(10px + env(safe-area-inset-top, 0px)) 24px 10px;
  display: flex;
  flex-direction: column;
  gap: 0;
  /* Sticky: queda arriba al hacer scroll. Incluye prefijo -webkit- para
     iOS Safari < 13 (compatibilidad legacy). El header completo (logo +
     email + tabs cuando aplica) sticky como una sola unidad. */
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  /* Sombra sutil cuando está pegado scrolleando — no se ve cuando está al tope */
  box-shadow: 0 2px 6px rgba(14, 31, 71, 0.04);
}
/* Misma técnica para el body cuando el dashboard arranca con un hero
   gigante: background paw-navy en el área del notch para que no se vea
   el blanco bajo el status bar (lookea más nativa la PWA). */
@supports (padding: env(safe-area-inset-top)) {
  .app-shell {
    /* paw-navy "behind" el status bar — el header lo cubre con bg-surface
       pero si el header es transparente o se quita, este es el fallback */
    background-color: var(--paw-navy, #0E1F47);
  }
}
.app-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}
.app-header-nav {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-shrink: 1;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

/* Switcher de empresa multi-tenant (header) */
.empresa-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.empresa-switcher-label {
  font-size: 12px;
  color: var(--cima-grey, #5A6072);
  white-space: nowrap;
}
.empresa-switcher select {
  padding: 6px 10px;
  border: 1px solid #d1d5e0;
  border-radius: 6px;
  font-size: 13px;
  background: #f4f6fb;
  color: var(--cima-blue, #0E1F47);
  cursor: pointer;
  max-width: 200px;
  text-overflow: ellipsis;
}
.app-header-email {
  font-size: 13px;
  color: var(--cima-grey);
}

/* ---- Tab nav (refactor "todos somos individuos primero" 2026-04-27) ---- */
.app-tabs-nav {
  display: flex;
  gap: 0;
  margin: 6px -24px -10px;     /* extiende borde inferior a todo el ancho */
  padding: 0 24px;
  border-top: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;       /* hide scrollbar Firefox */
}
.app-tabs-nav::-webkit-scrollbar { display: none; }   /* hide scrollbar webkit */

.app-tab {
  display: inline-flex;
  flex-direction: column;
  padding: 12px 18px;
  text-decoration: none;
  color: var(--cima-grey);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.2px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.app-tab:hover {
  color: var(--cima-blue);
  text-decoration: none;
  background: var(--cima-blue-50);
}
.app-tab.is-active {
  color: var(--cima-ink);
  border-bottom-color: var(--cima-blue);
  background: transparent;
  cursor: default;
}
.app-tab.is-active:hover { background: transparent; }
/* Tab bloqueada: onboarding personal pendiente */
.app-tab.is-locked {
  color: var(--cima-grey);
  opacity: 0.7;
  cursor: not-allowed;
}
.app-tab.is-locked:hover {
  color: var(--cima-ink);
  background: rgba(252, 211, 77, 0.12); /* hint amarillo suave */
}
.app-tab.is-locked .app-tab-sublabel { opacity: 0.7; }
.app-tab-label {
  font-weight: 700;
}
.app-tab-sublabel {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--cima-grey);
  margin-top: 2px;
  letter-spacing: 0.3px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-tab.is-active .app-tab-sublabel {
  color: var(--cima-blue);
}

@media (max-width: 640px) {
  .app-header { padding: 8px 12px; }
  .app-header-email { display: none; }
  .app-tabs-nav { margin: 6px -12px -8px; padding: 0 12px; }
  .app-tab { padding: 10px 12px; font-size: 13px; }
  .app-tab-sublabel { font-size: 10px; max-width: 140px; }
  /* En móvil: ocultar el label "Empresa:" y compactar el dropdown */
  .empresa-switcher-label { display: none; }
  .empresa-switcher select { max-width: 130px; font-size: 12px; padding: 5px 8px; }
}

/* ---- Banner imperativo "completa tu perfil" para staff sin onboarding ---- */
.personal-onboarding-banner {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  margin-bottom: 18px;
  background: var(--cima-blue-50);
  border: 1px solid rgba(44, 143, 232, 0.25);
  border-left: 3px solid var(--cima-blue);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--cima-ink);
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.personal-onboarding-banner:hover {
  background: rgba(44, 143, 232, 0.10);
  border-color: var(--cima-blue);
  text-decoration: none;
  color: var(--cima-ink);
}
/* Variante imperativa: tono ámbar para señalar que es bloqueante */
.personal-onboarding-banner.is-required {
  background: #fff8e8;
  border-color: rgba(252, 203, 0, 0.45);
  border-left-color: #c87b00;
}
.personal-onboarding-banner.is-required:hover {
  background: #fff1cf;
  border-color: #c87b00;
}
.personal-onboarding-banner.is-required .personal-onboarding-banner-icon {
  color: #c87b00;
}
.personal-onboarding-banner.is-required .personal-onboarding-banner-arrow {
  color: #c87b00;
}
.personal-onboarding-banner-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: var(--cima-blue);
  flex-shrink: 0;
}
.personal-onboarding-banner-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}
.personal-onboarding-banner-msg {
  font-size: 12px;
  color: var(--cima-ink-soft, var(--cima-ink));
  line-height: 1.4;
}
.personal-onboarding-banner-arrow {
  color: var(--cima-blue);
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .personal-onboarding-banner { grid-template-columns: 36px 1fr; padding: 12px 14px; gap: 10px; }
  .personal-onboarding-banner-icon { width: 36px; height: 36px; }
  .personal-onboarding-banner-arrow { display: none; }
}
.app-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--paw-navy);
  letter-spacing: 0.5px;
}
.app-header .brand .mark {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--paw-navy);
  display: inline-block;
}
.app-header nav { display: flex; gap: 16px; align-items: center; }
.app-header nav .muted { color: var(--fg-muted); font-size: 13px; }

.app-main { flex: 1; padding: 32px 24px; }
.app-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--fg-muted);
  text-align: center;
}

/* ===== Containers ===== */
.container { max-width: 1120px; margin: 0 auto; }
.container-sm { max-width: 480px; margin: 0 auto; }
.container-md { max-width: 720px; margin: 0 auto; }

/* ===== Hero (home pública) ===== */
.hero {
  text-align: center;
  padding: 64px 24px;
}
.hero h1 {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--paw-navy);
  margin: 0 0 16px 0;
}
.hero .lead {
  font-size: 18px;
  color: var(--fg-secondary);
  max-width: 600px;
  margin: 0 auto 32px auto;
  line-height: 1.6;
}

/* ===== Card ===== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.card-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--paw-navy);
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}
.card-subtitle {
  font-size: 14px;
  color: var(--fg-muted);
  margin: 0 0 24px 0;
}

/* ===== Form primitives ===== */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-secondary);
  margin-bottom: 6px;
}
.field input[type="email"],
.field input[type="text"],
.field input[type="tel"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-family: var(--font-sans);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--fg-primary);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46, 59, 94, 0.15);
}
.field .error {
  color: var(--risk-4);
  font-size: 13px;
  margin-top: 6px;
}
.field-help {
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 6px;
}

/* OTP code input — monospace, big, centered */
.otp-input {
  font-family: var(--font-mono);
  font-size: 28px !important;
  letter-spacing: 12px !important;
  text-align: center;
  font-weight: 700;
  color: var(--paw-navy);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-sans);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--dur-base) var(--ease-out);
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
  color: white;
  box-shadow: var(--glow-accent);
  transform: translateY(-1px);
}
.btn-primary:active {
  background: var(--accent-active);
  transform: translateY(0);
}
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--border-default);
}
.btn-ghost:hover {
  background: var(--paw-navy-50);
  text-decoration: none;
}
.btn-block { width: 100%; }

/* ===== Alerts ===== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-info {
  background: rgba(67, 201, 243, 0.10);
  border-left: 3px solid var(--risk-1);
  color: #0c5a7a;
}
.alert-success {
  background: rgba(147, 193, 20, 0.10);
  border-left: 3px solid var(--risk-2);
  color: #4a6300;
}
.alert-error {
  background: rgba(221, 33, 61, 0.08);
  border-left: 3px solid var(--risk-4);
  color: #8b1428;
}

/* ===== Level pills (paleta riesgo oficial) ===== */
.level-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.level-0 { background: rgba(171,180,181,0.18); color: #5a6166; }
.level-1 { background: rgba(67,201,243,0.18);  color: #0c5a7a; }
.level-2 { background: rgba(147,193,20,0.18);  color: #4a6300; }
.level-3 { background: rgba(253,203,0,0.22);   color: #6b5400; }
.level-4 { background: rgba(221,33,61,0.18);   color: #8b1428; }

/* ===== Dashboard ===== */
.dimensions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.dim-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.dim-card:hover {
  border-color: var(--paw-navy-300);
  transform: translateY(-2px);
}
.dim-card .name {
  font-size: 14px;
  font-weight: 600;
  color: var(--paw-navy);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.dim-card .placeholder {
  margin-top: 12px;
  font-size: 13px;
  color: var(--fg-muted);
}

/* ===== Utility ===== */
.text-center { text-align: center; }
.text-muted { color: var(--fg-muted); }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.gap-4 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ===== Onboarding progress (steps) ===== */
.onboarding-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.onboarding-progress .step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 9999px;
  background: var(--gray-100);
  color: var(--fg-muted);
  font-size: 13px;
  font-weight: 500;
}
.onboarding-progress .step .num {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--gray-300);
  color: white;
  font-size: 12px;
  font-weight: 700;
}
.onboarding-progress .step.active {
  background: var(--paw-navy);
  color: white;
}
.onboarding-progress .step.active .num { background: var(--risk-3); color: var(--paw-navy-900); }
.onboarding-progress .step.done {
  background: rgba(147,193,20,0.18);
  color: #4a6300;
}
.onboarding-progress .step.done .num { background: var(--risk-2); color: white; }

/* ===== Profile form grid ===== */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 540px) { .form-grid-2 { grid-template-columns: 1fr; } }

.field select {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-family: var(--font-sans);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--fg-primary);
  cursor: pointer;
}
.field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46,59,94,0.15); }

.field .req { color: var(--risk-4); font-weight: 700; }
.muted-label { color: var(--fg-muted); font-weight: 400; font-size: 12px; }

.optional-block {
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--bg-sunken);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}
.optional-block summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-secondary);
  padding: 4px 0;
}
.optional-block[open] summary { color: var(--paw-navy); margin-bottom: 8px; }

/* ===== Consent groups ===== */
.consent-group {
  border: none;
  border-top: 1px solid var(--border-subtle);
  padding: 20px 0 8px 0;
  margin: 0;
}
.consent-group:first-of-type { border-top: none; padding-top: 0; }

/* "Aprobar todos" atajo — destacado, navy gradient suave */
.consent-group-approve-all {
  background: linear-gradient(135deg, var(--cima-blue-50), #fff);
  border: 1.5px solid var(--cima-blue);
  border-radius: var(--radius-md);
  padding: 4px 12px;
  margin-bottom: 18px;
}
.consent-row-approve-all strong { color: var(--cima-ink); font-size: 15px; }
.consent-row-approve-all input[type="checkbox"] { transform: scale(1.15); }

/* Bloque legal Habeas Data — borde rojo sutil para indicar obligatorio + legalidad */
.consent-group-legal {
  background: #fff8f0;
  border: 1.5px solid #fcd34d;
  border-radius: var(--radius-md);
  padding: 4px 12px;
  margin-top: 14px;
}
.consent-group-legal .consent-row { padding: 12px 4px; }
.consent-group legend {
  font-size: 13px;
  font-weight: 700;
  color: var(--paw-navy);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0;
}
.consent-group-help {
  font-size: 13px;
  color: var(--fg-muted);
  margin: 8px 0 12px 0;
  line-height: 1.5;
}
.consent-essential legend { color: var(--risk-4); }

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-top: 8px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.consent-row:hover { border-color: var(--paw-navy-300); background: var(--paw-navy-50); }
.consent-row input[type="checkbox"] {
  width: 20px; height: 20px;
  margin-top: 2px;
  accent-color: var(--paw-navy);
  cursor: pointer;
  flex-shrink: 0;
}
.consent-row input[type="checkbox"]:disabled { cursor: not-allowed; opacity: 0.7; }
.consent-row.consent-locked {
  background: var(--paw-navy-50);
  border-color: var(--paw-navy-100);
  cursor: default;
}
.consent-text { flex: 1; }
.consent-text strong { display: block; font-size: 15px; color: var(--fg-primary); margin-bottom: 4px; }
.consent-text span { display: block; font-size: 13px; color: var(--fg-secondary); line-height: 1.5; }

/* Pills compactas en dashboard */
.consent-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.consent-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid;
}
.consent-pill.on  { background: rgba(147,193,20,0.10); border-color: rgba(147,193,20,0.4); color: #4a6300; }
.consent-pill.off { background: var(--gray-100); border-color: var(--border-subtle); color: var(--fg-muted); }

/* ===== Form 3-col + section title + dominance pills ===== */
.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
@media (max-width: 720px) { .form-grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .form-grid-3 { grid-template-columns: 1fr; } }

.form-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--paw-navy);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 24px 0 4px 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}
.form-section-help {
  font-size: 13px;
  color: var(--fg-muted);
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.bmi-display {
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1.5px dashed var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-sunken);
  color: var(--fg-muted);
  font-size: 15px;
}
.bmi-display.bmi-ok    { border-color: rgba(147,193,20,0.5);  background: rgba(147,193,20,0.08); color: #4a6300; border-style: solid; }
.bmi-display.bmi-warn  { border-color: rgba(253,203,0,0.55);  background: rgba(253,203,0,0.10); color: #6b5400; border-style: solid; }
.bmi-display.bmi-low   { border-color: rgba(67,201,243,0.45); background: rgba(67,201,243,0.10); color: #0c5a7a; border-style: solid; }
.bmi-display.bmi-high  { border-color: rgba(221,33,61,0.45);  background: rgba(221,33,61,0.08); color: #8b1428; border-style: solid; }

.dominance-group {
  border: none;
  margin: 0 0 20px 0;
  padding: 0;
}
.dominance-group legend {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-secondary);
  margin-bottom: 8px;
  padding: 0;
}
.dominance-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.dominance-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  font-size: 14px;
}
.dominance-pill:hover { border-color: var(--paw-navy-300); }
.dominance-pill input[type="radio"] { accent-color: var(--paw-navy); cursor: pointer; }
.dominance-pill:has(input[type="radio"]:checked) {
  border-color: var(--paw-navy);
  background: var(--paw-navy-50);
  font-weight: 600;
  color: var(--paw-navy);
}
.dom-icon { font-size: 20px; transition: transform var(--dur-fast) var(--ease-out); }

/* ===== Player header (gaming) ===== */
.player-header {
  background: linear-gradient(135deg, var(--paw-navy-50) 0%, #ffffff 100%);
  border: 1px solid var(--paw-navy-100);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.player-greeting {
  font-size: 22px;
  color: var(--paw-navy);
  letter-spacing: -0.01em;
}
.player-greeting strong { font-weight: 700; }
.player-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--fg-secondary);
  margin-top: 6px;
}
.player-stats span { display: inline-flex; align-items: center; gap: 6px; }
.player-stats strong { color: var(--paw-navy); font-weight: 700; }
.player-stats svg { flex-shrink: 0; }
.player-anthro { color: var(--fg-muted); font-size: 12px; }
/* Iconos del header (★ ⚡) ahora vienen como <x-icon> inline en HTML — Canon no-emojis */
.player-progress-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 14px;
}
.player-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--risk-2) 0%, var(--paw-navy) 100%);
  transition: width var(--dur-slow) var(--ease-out);
}

/* ===== Hero "tu próximo reto" ===== */
.quest-hero {
  position: relative;
  background: var(--paw-navy-900);
  background: radial-gradient(circle at 20% 0%, var(--paw-navy-800), var(--paw-navy-900) 70%);
  color: white;
  border-radius: var(--radius-2xl);
  padding: 36px 32px;
  margin-bottom: 8px;
  overflow: hidden;
  text-align: center;
}
.quest-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 30%, rgba(253,203,0,0.18) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(67,201,243,0.10) 0%, transparent 50%);
  pointer-events: none;
}
.quest-hero > * { position: relative; z-index: 1; }
.quest-hero-flag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--risk-3);
  background: rgba(253,203,0,0.12);
  padding: 4px 10px;
  border-radius: 9999px;
  margin-bottom: 16px;
}
.quest-hero-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 24px rgba(253,203,0,0.35));
}
.quest-hero-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px 0;
  color: white;
}
.quest-hero-desc {
  font-size: 15px;
  color: var(--paw-navy-200);
  max-width: 540px;
  margin: 0 auto 20px auto;
  line-height: 1.6;
}
.quest-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 4px;
}
.quest-meta-pill {
  background: rgba(255,255,255,0.10);
  color: white;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.15);
}
.quest-meta-pill.quest-reward {
  background: rgba(253,203,0,0.16);
  border-color: rgba(253,203,0,0.4);
  color: #ffe18b;
}
.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}
.quest-hero .btn-primary {
  background: var(--risk-3);
  color: var(--paw-navy-900);
  border-color: var(--risk-3);
}
.quest-hero .btn-primary:hover {
  background: #ffd62e;
  color: var(--paw-navy-900);
  box-shadow: 0 0 32px rgba(253,203,0,0.5);
}
.quest-hero-done .quest-hero-icon { filter: drop-shadow(0 0 24px rgba(147,193,20,0.45)); }

/* ===== Quest list (trayectoria) ===== */
.quest-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.quest-item {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border-subtle);
  align-items: flex-start;
}
.quest-item:first-child { border-top: none; padding-top: 4px; }
.quest-status-dot {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 16px;
  flex-shrink: 0;
  background: var(--gray-100);
  color: var(--fg-muted);
  border: 2px solid var(--border-subtle);
}
.quest-done .quest-status-dot {
  background: var(--risk-2);
  color: white;
  border-color: var(--risk-2);
}
.quest-active .quest-status-dot {
  background: var(--paw-navy);
  color: white;
  border-color: var(--risk-3);
  box-shadow: 0 0 0 4px rgba(253,203,0,0.18);
  animation: questPulse 2s ease-in-out infinite;
}
.quest-locked .quest-status-dot { opacity: 0.5; }
@keyframes questPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(253,203,0,0.18); }
  50%      { box-shadow: 0 0 0 8px rgba(253,203,0,0.08); }
}
.quest-body { flex: 1; min-width: 0; }
.quest-row-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-primary);
}
.quest-row-desc {
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 2px;
  line-height: 1.5;
}
.quest-row-cta {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--paw-navy);
}
.quest-row-cta:hover { text-decoration: underline; }
/* Variante "Repetir evaluación" para quests ya completados — color más
   tenue para no competir visualmente con el CTA del próximo quest activo,
   pero accesible para el modelo longitudinal. */
.quest-row-cta-repeat {
  color: var(--fg-muted, #6e7a9b);
  font-weight: 500;
}
.quest-row-cta-repeat:hover { color: var(--paw-navy); }
.quest-locked .quest-row-title,
.quest-locked .quest-row-desc { color: var(--gray-400); }
.quest-tag-active, .quest-tag-done {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 9999px;
  margin-left: 8px;
  vertical-align: middle;
}
.quest-tag-active { background: var(--risk-3); color: var(--paw-navy-900); }
.quest-tag-done   { background: var(--risk-2); color: white; }

/* ===== Exercises preview (dashboard) ===== */
.exercises-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.exercise-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  transition: border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.exercise-card:hover {
  border-color: var(--paw-navy-300);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.exercise-card img {
  width: 100%;
  max-width: 140px;
  height: auto;
  margin: 0 auto 12px auto;
  display: block;
}
.exercise-card .exercise-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--paw-navy);
  margin-bottom: 4px;
}
.exercise-card .exercise-sub {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.4;
}

/* ============================================================
 * CELEBRATION BANNER — post-assessment
 * ============================================================ */
.celebration-banner {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--paw-navy-50) 0%, rgba(147,193,20,0.10) 100%);
  border: 1.5px solid rgba(147,193,20,0.4);
  border-left-width: 4px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  animation: celebFadeIn 600ms var(--ease-out);
}
@keyframes celebFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.celebration-icon {
  width: 56px; height: 56px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--paw-navy);
  color: var(--risk-3);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--glow-warning);
}
.celebration-body { flex: 1; }
.celebration-title { font-size: 16px; font-weight: 700; color: var(--paw-navy-900); margin-bottom: 4px; }
.celebration-meta  { font-size: 13px; color: var(--fg-secondary); }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.result-level-pill-inline {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
}
.result-level-pill-inline.level-0 { background: rgba(171,180,181,0.25); color: #5a6166; }
.result-level-pill-inline.level-1 { background: rgba(67,201,243,0.25); color: #0c5a7a; }
.result-level-pill-inline.level-2 { background: rgba(147,193,20,0.25); color: #4a6300; }
.result-level-pill-inline.level-3 { background: rgba(253,203,0,0.32); color: #6b5400; }
.result-level-pill-inline.level-4 { background: rgba(221,33,61,0.22); color: #8b1428; }

/* ============================================================
 * TUS EVALUACIONES — sección dashboard
 * ============================================================ */
.assessments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.assessment-summary {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  background: var(--bg-surface);
  transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.assessment-summary.has-data:hover {
  border-color: var(--paw-navy-300);
  transform: translateY(-2px);
}
.assessment-summary-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--paw-navy);
  margin-bottom: 12px;
}
.assessment-summary-score {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--paw-navy);
  line-height: 1;
  margin-bottom: 6px;
}
.assessment-summary-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px;
  margin-bottom: 8px;
}
.assessment-summary-link {
  font-size: 13px; color: var(--accent);
  display: inline-flex; align-items: center; gap: 4px;
}
.assessment-summary.no-data {
  opacity: 0.55;
}
.assessment-summary-empty {
  font-size: 13px; color: var(--fg-muted); font-style: italic;
}

/* ============================================================
 * ASSESSMENT — pantallas de evaluación gamificadas (Bloque 6)
 * ============================================================ */
.dimension-badge {
  display: inline-flex; width: 64px; height: 64px;
  border-radius: 50%; background: var(--paw-navy-50); border: 2px solid var(--paw-navy);
  align-items: center; justify-content: center; color: var(--paw-navy);
}
.instrument-list { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.instrument-card {
  border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  padding: 16px 20px; background: var(--bg-surface);
  display: flex; justify-content: space-between; align-items: center;
}
.instrument-meta { display: flex; flex-direction: column; gap: 2px; }
.instrument-code {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px;
  color: var(--paw-navy-500); font-weight: 600;
}
.instrument-name { font-size: 15px; font-weight: 600; color: var(--fg-primary); }
.instrument-stats { font-size: 12px; color: var(--fg-muted); margin-top: 2px; }

.privacy-note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 16px; background: var(--paw-navy-50);
  border-left: 3px solid var(--paw-navy); border-radius: var(--radius-md);
  font-size: 13px; color: var(--fg-secondary); line-height: 1.5;
}
.privacy-note svg { flex-shrink: 0; color: var(--paw-navy); margin-top: 1px; }

.assessment-progress {
  height: 4px; background: var(--gray-200); border-radius: 9999px;
  overflow: hidden; margin-bottom: 8px;
}
.assessment-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--paw-navy) 0%, var(--paw-navy-500) 100%);
  transition: width var(--dur-base) var(--ease-out);
}
.assessment-progress-meta {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--fg-muted);
  font-family: var(--font-mono); letter-spacing: 0.5px; margin-bottom: 24px;
}
.assessment-progress-meta span { display: inline-flex; align-items: center; gap: 6px; }

.assessment-card { padding: 36px 32px; }
.instrument-instructions {
  font-size: 13px; color: var(--fg-muted); font-style: italic;
  text-align: center; margin: 0 0 16px 0;
}
.assessment-question {
  font-size: 22px; font-weight: 500; color: var(--paw-navy-900);
  text-align: center; margin: 16px 0 32px 0; line-height: 1.4; letter-spacing: -0.01em;
}

.answer-options { display: flex; flex-direction: column; gap: 10px; }
.answer-option {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border: 2px solid var(--border-default); border-radius: var(--radius-lg);
  background: var(--bg-surface); cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  font-size: 15px; font-weight: 500; color: var(--fg-primary);
}
.answer-option:hover {
  border-color: var(--paw-navy-300); background: var(--paw-navy-50);
  transform: translateX(2px);
}
.answer-option input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.answer-option .answer-check { display: none; color: var(--paw-navy); }
.answer-option.selected {
  border-color: var(--paw-navy); background: var(--paw-navy-50); box-shadow: var(--glow-accent);
}
.answer-option.selected .answer-check { display: inline-flex; }

.assessment-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 32px; padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}
.link-muted {
  background: none; border: none; cursor: pointer;
  color: var(--fg-muted); font-size: 13px; text-decoration: underline;
  font-family: var(--font-sans);
}
.link-muted:hover { color: var(--risk-4); }

/* ============================================================
 * FACIAL UPSELL (intro de evaluación, consent inline)
 * ============================================================ */
.facial-upsell {
  display: flex; gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--paw-navy-50) 0%, rgba(67,201,243,0.08) 100%);
  border: 1.5px solid var(--paw-navy-100);
  border-left: 4px solid var(--paw-navy);
  border-radius: var(--radius-lg);
}
.facial-upsell-icon {
  flex-shrink: 0; color: var(--paw-navy);
  width: 48px; height: 48px;
  background: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.facial-upsell-body { flex: 1; }
.facial-upsell-body strong { display: block; font-size: 15px; color: var(--paw-navy-900); margin-bottom: 6px; }
.facial-upsell-body p { margin: 0 0 12px 0; font-size: 13px; color: var(--fg-secondary); line-height: 1.5; }

/* 2026-04-29 fix bug 28-abr (E1): card-checkbox unificado para opt-in
   facial dentro del form de "Comenzar evaluación". Reemplaza el doble
   paso del flujo anterior. */
.facial-optin-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--paw-navy-50) 0%, rgba(67,201,243,0.08) 100%);
  border: 1.5px solid var(--paw-navy-100);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  text-align: left;
}
.facial-optin-card:hover { border-color: var(--paw-navy); }
.facial-optin-card input[type="checkbox"] {
  flex-shrink: 0;
  width: 22px; height: 22px;
  margin-top: 2px;
  accent-color: var(--paw-navy);
  cursor: pointer;
}
.facial-optin-card:has(input[type="checkbox"]:checked) {
  border-color: var(--paw-navy);
  background: linear-gradient(135deg, var(--paw-navy-50) 0%, rgba(67,201,243,0.16) 100%);
}
.facial-optin-icon {
  flex-shrink: 0; color: var(--paw-navy);
  width: 36px; height: 36px;
  background: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.facial-optin-body { flex: 1; }
.facial-optin-body strong { display: block; font-size: 14.5px; color: var(--paw-navy-900); }

.alert.alert-success-soft {
  background: rgba(147,193,20,0.10);
  border-left: 3px solid var(--risk-2);
  color: #4a6300;
  display: flex; align-items: center; gap: 8px;
}
.alert.alert-success-soft a { color: var(--paw-navy); }

/* ============================================================
 * FACIAL SCAN UI (Bloque 7)
 * ============================================================ */
.facial-scan-card { padding: 24px; }
.facial-stage {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 16px auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #000;
  aspect-ratio: 4 / 3;
}
.facial-stage video { width: 100%; height: 100%; object-fit: cover; }
.facial-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.facial-oval {
  width: 60%; aspect-ratio: 3 / 4;
  border: 3px dashed rgba(255,255,255,0.65);
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.35);
}
.facial-status {
  text-align: center; margin-top: 16px;
  padding: 10px 16px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 500;
}
.facial-status-info { background: var(--paw-navy-50); color: var(--paw-navy); border: 1px solid var(--paw-navy-100); }
.facial-status-recording { background: rgba(221,33,61,0.10); color: var(--risk-4); border: 1px solid rgba(221,33,61,0.4); animation: cima-pulse 1.5s infinite; }
.facial-status-done { background: rgba(147,193,20,0.12); color: #4a6300; border: 1px solid rgba(147,193,20,0.45); }
.facial-status-warn { background: rgba(253,203,0,0.12); color: #6b5400; border: 1px solid rgba(253,203,0,0.4); }
.facial-status-error { background: rgba(221,33,61,0.10); color: var(--risk-4); border: 1px solid rgba(221,33,61,0.4); }
@keyframes cima-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Special characteristics list en result */
.special-list {
  list-style: none; padding: 0; margin: 8px 0 0 0;
  display: flex; flex-direction: column; gap: 6px;
}
.special-list li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; line-height: 1.4; color: var(--fg-secondary);
}
.special-list svg { color: var(--risk-3); flex-shrink: 0; margin-top: 2px; }

/* MATRIX (PANAS — todos los items en una pantalla) */
.matrix-card { padding: 28px 24px; }
.matrix-instructions { text-align: left; font-style: normal; font-size: 14px; color: var(--fg-secondary); }
.scale-legend {
  font-size: 12px; color: var(--fg-muted);
  background: var(--bg-sunken); padding: 10px 14px; border-radius: var(--radius-md);
  margin: 0 0 16px 0; line-height: 1.6;
}
.scale-legend strong { color: var(--paw-navy); font-family: var(--font-mono); }

.matrix-section-title {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  margin: 24px 0 12px 0; padding-bottom: 4px;
  border-bottom: 2px solid currentColor;
}
.matrix-section-positive { color: var(--risk-2); }
.matrix-section-negative { color: var(--risk-4); }

.matrix-rows { display: flex; flex-direction: column; gap: 8px; }
.matrix-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px; align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border-subtle);
}
.matrix-row:last-child { border-bottom: none; }
.matrix-row-label { font-size: 15px; color: var(--fg-primary); font-weight: 500; }

.matrix-row-options { display: flex; gap: 6px; }
.matrix-radio { position: absolute; opacity: 0; pointer-events: none; }
.matrix-radio-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--fg-secondary);
  font-weight: 600; font-size: 14px;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  user-select: none;
}
.matrix-radio-button:hover {
  border-color: var(--paw-navy-300);
  background: var(--paw-navy-50);
}
.matrix-radio:checked + .matrix-radio-button {
  background: var(--paw-navy);
  border-color: var(--paw-navy);
  color: white;
  box-shadow: var(--glow-accent);
}
.matrix-radio:focus-visible + .matrix-radio-button {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.matrix-nav {
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

@media (max-width: 600px) {
  .matrix-row { grid-template-columns: 1fr; gap: 8px; align-items: stretch; }
  .matrix-row-options { justify-content: space-between; gap: 4px; }
  .matrix-radio-button { width: 100%; height: 44px; flex: 1; }
}

/* RESULT */
.safety-alert {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px 24px;
  background: rgba(221,33,61,0.06);
  border: 1.5px solid rgba(221,33,61,0.4); border-left-width: 4px;
  border-radius: var(--radius-lg); margin-bottom: 24px;
}
.safety-alert-icon { color: var(--risk-4); flex-shrink: 0; }
.safety-alert strong { display: block; color: var(--risk-4); margin-bottom: 6px; font-size: 15px; }
.safety-alert p { margin: 0; font-size: 13px; color: var(--fg-secondary); line-height: 1.55; }

.result-hero {
  text-align: center; padding: 40px 24px;
  background: linear-gradient(135deg, var(--paw-navy-50) 0%, var(--bg-surface) 100%);
  border-radius: var(--radius-2xl); border: 1px solid var(--paw-navy-100);
  box-shadow: var(--shadow-md);
}
.result-score-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 2px;
  color: var(--fg-muted); font-weight: 600;
}
.result-score-number {
  font-family: var(--font-mono); font-size: 84px; font-weight: 700; line-height: 1;
  margin: 8px 0 4px 0; color: var(--paw-navy); letter-spacing: -0.04em;
}
.result-score-max { font-size: 16px; color: var(--fg-muted); margin-bottom: 16px; }
.result-level-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 9999px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  margin-top: 8px;
}
.result-level-0 .result-level-pill { background: rgba(171,180,181,0.25); color: #5a6166; }
.result-level-1 .result-level-pill { background: rgba(67,201,243,0.25); color: #0c5a7a; }
.result-level-2 .result-level-pill { background: rgba(147,193,20,0.25); color: #4a6300; }
.result-level-3 .result-level-pill { background: rgba(253,203,0,0.32); color: #6b5400; }
.result-level-4 .result-level-pill { background: rgba(221,33,61,0.22); color: #8b1428; }
.result-exploratory {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; padding: 4px 12px;
  font-size: 12px; color: var(--fg-muted);
  background: var(--gray-100); border-radius: 9999px;
}

.subscores-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px;
}
.subscore {
  padding: 16px; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); background: var(--bg-surface);
}
.subscore-label { font-size: 12px; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.subscore-value { font-family: var(--font-mono); font-size: 32px; font-weight: 700; color: var(--paw-navy); line-height: 1.1; margin: 6px 0 4px 0; }
.subscore-meta { font-size: 12px; color: var(--fg-muted); }

.result-meta {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  font-size: 12px; color: var(--fg-muted);
}

.history-bars {
  display: flex; align-items: flex-end; gap: 12px;
  height: 180px; padding: 16px 0 4px;
  border-bottom: 1px solid var(--border-subtle);
}
.history-bar {
  flex: 1; display: flex; flex-direction: column-reverse; align-items: center;
  gap: 6px; height: 100%; position: relative;
}
.history-bar-fill {
  width: 100%;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  min-height: 4px;
  transition: height var(--dur-slow) var(--ease-out);
}
/* 2026-04-29 — paleta canon CIMA: 0_muy_bajo (rojo) → 4_muy_alto (cyan/verde).
   Antes risk-0 era "OK" y risk-4 era "alto riesgo" — labels usadas por
   AggregationService usan otra convención. Acá usamos colores semáforo
   intuitivos: rojo abajo, cyan arriba. */
.level-0-bg { background: #dd213d; }   /* rojo — estado bajo */
.level-1-bg { background: #c87b00; }   /* naranja — moderado */
.level-2-bg { background: #fdcb00; }   /* amarillo — promedio */
.level-3-bg { background: #2a8c4d; }   /* verde — bueno */
.level-4-bg { background: #1f8a8a; }   /* cyan — muy bueno */
.history-bar-date { font-size: 10px; color: var(--fg-muted); font-family: var(--font-mono); }
/* Score numérico arriba de cada barra para legibilidad inmediata */
.history-bar-score {
  position: absolute;
  top: -2px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--cima-ink, #2e3b5e);
  font-family: var(--font-mono);
}

/* Leyenda — explica qué significa cada color */
.history-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--fg-secondary, #4a5568);
}
.history-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.history-legend-dot {
  width: 12px; height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .history-legend { gap: 6px 10px; font-size: 10.5px; }
  .history-bar-score { font-size: 9.5px; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 28px; }
  .card { padding: 24px 20px; }
  .app-header { padding: 12px 16px; }
  .app-main { padding: 24px 16px; }
  .onboarding-progress .step { padding: 6px 10px; font-size: 12px; }
  .assessment-question { font-size: 18px; }
  .result-score-number { font-size: 64px; }
  .assessment-card { padding: 24px 20px; }
}

/* ====================================================================
 * RESULTADO EMOCIONAL — narrativa SG-SST safe (Bloque 7 — UX rediseño)
 * Pills cortitas + narrativas largas + observación facial sin número.
 * ==================================================================== */

/* Card "soft" — fondo más claro, marco sutil. Para confidencialidad y CTA. */
.card-soft {
  background: var(--paw-navy-50);
  border: 1px solid var(--paw-navy-100);
}

/* Subscore con narrativa — más espacio, pill arriba, texto abajo */
.subscore-narrative {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px;
}
.subscore-narrative .subscore-label {
  margin-bottom: 0;
}
.subscore-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 9999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.3px;
  background: var(--gray-100); color: var(--paw-navy);
  width: fit-content;
}
/* Variantes por severidad — colores semánticos del proyecto */
.subscore-pill-minimal    { background: #e8f7ec; color: #1f7a3a; }
.subscore-pill-mild       { background: #e6f4fb; color: #1d5a82; }
.subscore-pill-moderate   { background: #fff8e1; color: #8a6d00; }
.subscore-pill-mod_severe { background: #ffeede; color: #a14d00; }
.subscore-pill-severe     { background: #fde6e9; color: #9a1d2e; }
.subscore-pill-info       { background: var(--paw-navy-50); color: var(--paw-navy-700); }

.subscore-narrative-text {
  margin: 0; font-size: 14px; line-height: 1.55;
  color: var(--fg-secondary);
}

/* Observación facial — caja con borde a la izquierda, headline + texto + nota */
.facial-observation {
  border-left: 3px solid var(--paw-navy-500);
  background: var(--paw-navy-50);
  padding: 18px 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.facial-observation-headline {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; color: var(--paw-navy-900);
  margin-bottom: 8px; font-size: 15px;
}
.facial-observation-headline svg { color: var(--paw-navy-700); }
.facial-observation-text {
  margin: 0; font-size: 14px; line-height: 1.6;
  color: var(--paw-navy-800);
}
.facial-observation-note {
  margin: 14px 0 0 0; padding-top: 12px;
  border-top: 1px dashed var(--paw-navy-100);
  font-size: 13px; line-height: 1.5;
  color: var(--fg-secondary);
}

/* ====================================================================
 * RUNNER SPA-LITE — Phase B Bloque 7
 * Widget de cámara persistente (esquina) + transiciones de contenido.
 * ==================================================================== */

.cima-runner-shell {
  position: relative;
  min-height: 60vh;
}

/* Widget de cámara en esquina superior derecha — siempre visible mientras
   el usuario navega entre items. En mobile queda al pie.
   2026-04-29 fix bug 28-abr (EM-3): z-index subido a 9000 para asegurar
   visibilidad sobre cualquier card/modal posterior. */
.cima-camera-widget {
  position: fixed;
  top: 84px;            /* debajo del header */
  right: 20px;
  width: 180px;
  z-index: 9000;        /* por encima de cualquier card/sticky */
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(26,35,64,0.08);
  padding: 10px;
  transition: opacity 0.2s ease;
  /* Mejora iOS Safari — fuerza render layer para que el video no se
     "congele" cuando hay AJAX swap del contenido principal */
  will-change: transform;
  transform: translateZ(0);
}
.cima-camera-widget[data-state="paused"]  { opacity: 0.55; }
.cima-camera-widget[data-state="error"]   { border-color: var(--risk-4); }
.cima-camera-widget[data-state="loading"],
.cima-camera-widget[data-state="init"]    { opacity: 0.85; }

.cima-camera-widget-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--paw-navy-900);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.cima-camera-widget-frame video {
  width: 100%; height: 100%;
  object-fit: cover;
  /* Espejo (selfie cam): el usuario ve su propia imagen como en un espejo */
  transform: scaleX(-1);
}

.cima-camera-widget-status {
  position: absolute;
  bottom: 6px; left: 6px;
  display: flex; align-items: center; gap: 6px;
  padding: 3px 8px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border-radius: 9999px;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.3px;
}
.cima-camera-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--risk-4);
  animation: cima-dot-pulse 1.5s ease-in-out infinite;
}
@keyframes cima-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}
.cima-camera-widget[data-state="paused"] .cima-camera-dot,
.cima-camera-widget[data-state="loading"] .cima-camera-dot,
.cima-camera-widget[data-state="init"] .cima-camera-dot,
.cima-camera-widget[data-state="error"] .cima-camera-dot {
  animation: none;
  background: var(--fg-muted);
}

.cima-camera-toggle {
  position: absolute;
  top: 6px; right: 6px;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
}
.cima-camera-toggle:hover { background: rgba(0,0,0,0.75); }

.cima-camera-widget-note {
  margin: 8px 0 0 0;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--fg-muted);
  text-align: center;
}

/* Mobile — el widget pasa al pie en barra horizontal compacta */
@media (max-width: 720px) {
  .cima-camera-widget {
    top: auto;
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
  }
  .cima-camera-widget-frame {
    width: 80px; height: 60px;
    aspect-ratio: auto;
    flex-shrink: 0;
  }
  .cima-camera-widget-note {
    margin: 0;
    text-align: left;
    font-size: 11px;
  }
  .cima-camera-toggle {
    width: 32px; height: 32px;
    position: static;
    flex-shrink: 0;
  }
  .cima-camera-widget-status {
    bottom: 4px; left: 4px;
    padding: 2px 6px; font-size: 10px;
  }
}

/* Transiciones del contenido entre items (cima-runner.js swapContent) */
#cima-runner-content {
  transition: opacity 120ms ease, transform 120ms ease;
}
#cima-runner-content.cima-runner-leaving {
  opacity: 0;
  transform: translateY(-6px);
}
#cima-runner-content.cima-runner-entering {
  opacity: 0;
  transform: translateY(6px);
}

/* Inline error del runner (validación) */
.cima-runner-inline-error {
  margin-bottom: 14px;
}

/* ====================================================================
 * RUNNER INTRO OVERLAY — Phase B Bloque 7 (calibración pre-evaluación)
 * ==================================================================== */

.cima-runner-content-hidden {
  display: none;
}

.cima-runner-intro {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 32px 16px;
  transition: opacity 200ms ease, transform 200ms ease;
}
.cima-runner-intro.cima-runner-intro-leaving {
  opacity: 0;
  transform: translateY(-8px);
}

.cima-runner-intro-card {
  max-width: 540px;
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 36px 32px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(26,35,64,0.06);
}

.cima-runner-intro-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  background: var(--paw-navy-50);
  color: var(--paw-navy-700);
  border-radius: 50%;
  margin-bottom: 16px;
}

.cima-runner-intro-title {
  margin: 0 0 12px 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--paw-navy-900);
}

.cima-runner-intro-lead {
  margin: 0 0 20px 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--fg-secondary);
}

.cima-runner-intro-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cima-runner-intro-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--fg-secondary);
}
.cima-runner-intro-checklist li svg {
  color: #2a8c4d;
  flex-shrink: 0;
  margin-top: 3px;
}

.cima-runner-intro-privacy {
  margin: 0 0 20px 0;
  padding: 12px 14px;
  background: var(--paw-navy-50);
  border-left: 3px solid var(--paw-navy-500);
  border-radius: 4px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--paw-navy-800);
  text-align: left;
}

#cima-runner-intro-start:disabled {
  opacity: 0.6;
  cursor: progress;
}

.cima-runner-intro-skip {
  margin: 14px 0 0 0;
  font-size: 12.5px;
}
.cima-runner-intro-skip a {
  color: var(--fg-muted);
  text-decoration: underline;
}

/* ====================================================================
 * PER-ITEM FINDINGS — Phase B Bloque 7 (narrativa por pregunta)
 * Aparece solo si la captura continua detectó señal en items específicos.
 * Tono SG-SST safe (canon PAW-WB §6).
 * ==================================================================== */

.per-item-findings {
  border-top: 1px dashed var(--paw-navy-100);
  padding-top: 20px;
}

.per-item-findings-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--paw-navy-900);
}
.per-item-findings-title svg { color: var(--paw-navy-700); }

.per-item-findings-lead {
  margin: 0 0 16px 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--fg-secondary);
}

.per-item-findings-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.per-item-finding {
  background: var(--bg-surface);
  border: 1px solid var(--paw-navy-100);
  border-left: 3px solid var(--paw-navy-500);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 18px;
}
.per-item-finding-discrepancy { border-left-color: #c87b00; } /* discrepancia: ámbar suave */
.per-item-finding-tension     { border-left-color: var(--paw-navy-500); } /* tensión: navy */

.per-item-finding-meta {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fg-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.per-item-finding-question {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--paw-navy-900);
}
.per-item-finding-question-prefix {
  display: block;
  font-size: 12.5px;
  color: var(--fg-muted);
  margin-bottom: 2px;
  font-weight: 500;
}
.per-item-finding-question em {
  font-style: italic;
  color: var(--paw-navy-800);
}

.per-item-finding-narrative {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--fg-secondary);
}

/* ====================================================================
 * VOZ — captura bounded ~20s (Bloque 7 voz emocional)
 * ==================================================================== */

#cima-voice-app { padding: 8px 0; }

.voice-reading {
  background: var(--paw-navy-50);
  border-left: 3px solid var(--paw-navy-500);
  padding: 18px 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 20px 0;
}
.voice-reading-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--paw-navy-900);
  font-style: italic;
}

.voice-meter {
  width: 100%;
  height: 8px;
  background: var(--gray-100);
  border-radius: 9999px;
  overflow: hidden;
  margin: 16px 0 10px 0;
}
.voice-meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2a8c4d 0%, #93c114 50%, #fdcb00 80%, #dd213d 100%);
  transition: width 60ms linear;
}

.voice-progress {
  width: 100%;
  height: 4px;
  background: var(--gray-100);
  border-radius: 9999px;
  overflow: hidden;
  margin: 0 0 8px 0;
}
.voice-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--paw-navy);
  transition: width 100ms linear;
}

.voice-timer {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--paw-navy);
  letter-spacing: 1px;
  margin: 6px 0 12px 0;
}

.voice-status {
  text-align: center;
  font-size: 14px;
  margin: 12px 0 18px 0;
  padding: 10px 14px;
  border-radius: var(--radius-md);
}
.voice-status-info { background: var(--paw-navy-50); color: var(--paw-navy-800); }
.voice-status-recording { background: rgba(221, 33, 61, 0.08); color: #9a1d2e; font-weight: 500; }
.voice-status-done { background: rgba(147, 193, 20, 0.10); color: #4a6300; }
.voice-status-warn { background: rgba(253, 203, 0, 0.15); color: #8a6d00; }
.voice-status-error { background: rgba(221, 33, 61, 0.10); color: #9a1d2e; }

.voice-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: 8px 0;
}

.voice-skip {
  text-align: center;
  margin: 16px 0 0 0;
  font-size: 13px;
}
.voice-skip a {
  color: var(--fg-muted);
  text-decoration: underline;
}

#voice-card.voice-card-done { opacity: 0.85; }

/* ====================================================================
 * COGNITIVO — Bloque 8 Entregable 1 (RT + CPT)
 * ==================================================================== */

/* Intro — lista de tests */
.cog-tests-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cog-test-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.cog-test-num {
  width: 32px; height: 32px;
  background: var(--paw-navy);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.cog-test-body { flex: 1; }
.cog-test-title { font-weight: 600; color: var(--paw-navy-900); font-size: 15px; }
.cog-test-meta { font-size: 12.5px; color: var(--fg-muted); margin-top: 2px; }

/* Run shell */
.cog-runner-shell {
  position: relative;
  min-height: 70vh;
}
.cog-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--fg-muted);
}
.cog-loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--paw-navy-100);
  border-top-color: var(--paw-navy);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: cog-spin 0.8s linear infinite;
}
@keyframes cog-spin { to { transform: rotate(360deg); } }

/* Instrucciones de test */
.cog-instructions-card { padding: 32px 28px; }
.cog-instructions-meta {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--fg-muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.cog-instructions-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--paw-navy-900);
  margin: 0 0 16px 0;
}
.cog-instructions-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-secondary);
  margin: 0 0 20px 0;
}
.cog-instructions-meta-row {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--fg-secondary);
  padding: 12px 14px;
  background: var(--bg-sunken);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}
.cog-instructions-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  background: var(--paw-navy-50);
  border-left: 3px solid var(--paw-navy-500);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--paw-navy-800);
  margin-bottom: 8px;
}

/* Test stage genérico */
.cog-test-stage {
  max-width: 720px;
  margin: 0 auto;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* RT simple */
.cog-rt-stage {
  width: 100%;
  text-align: center;
}
.cog-rt-progress {
  font-family: var(--font-mono);
  color: var(--fg-muted);
  font-size: 13px;
  margin-bottom: 16px;
}
.cog-rt-arena {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
}
.cog-rt-circle {
  width: 220px; height: 220px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  transition: background 150ms ease, box-shadow 150ms ease, transform 100ms;
  padding: 20px;
}
.cog-rt-circle:active { transform: scale(0.95); }
.cog-rt-circle-wait {
  background: #9ca3af;
  box-shadow: 0 0 16px rgba(0,0,0,0.08);
}
.cog-rt-circle-go {
  background: #22c55e;
  box-shadow: 0 0 60px rgba(34, 197, 94, 0.55);
  animation: cog-rt-pulse 0.3s ease;
}
.cog-rt-circle-hit {
  background: #3b82f6;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
}
.cog-rt-circle-early {
  background: #ef4444;
  animation: cog-rt-shake 0.4s ease;
}
.cog-rt-circle-miss {
  background: #ef4444;
  opacity: 0.72;
}
@keyframes cog-rt-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
@keyframes cog-rt-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}
.cog-rt-feedback {
  font-size: 14px;
  color: var(--fg-muted);
  min-height: 20px;
  text-align: center;
  margin-top: 8px;
}
.cog-rt-hint {
  font-size: 16px;
  color: var(--fg-muted);
  margin: 0;
  padding: 0 32px;
  text-align: center;
  line-height: 1.55;
  font-weight: 500;
  min-height: 50px;
  transition: color 80ms ease;
}
.cog-rt-rt-flash {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  color: var(--paw-navy);
}
.cog-cpt-letter-nogo { color: #c87b00; }

/* CPT */
.cog-cpt-stage {
  width: 100%;
  text-align: center;
}
.cog-cpt-progress {
  font-family: var(--font-mono);
  color: var(--fg-muted);
  font-size: 13px;
  margin-bottom: 16px;
}
.cog-cpt-arena {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  position: relative;
}
.cog-cpt-letter {
  font-family: var(--font-mono);
  font-size: 140px;
  font-weight: 700;
  color: var(--paw-navy);
  letter-spacing: 0;
}
.cog-cpt-blank {
  width: 12px; height: 12px;
  background: var(--gray-300);
  border-radius: 50%;
}
.cog-cpt-hint { padding: 0 32px; }

/* Transición entre tests */
.cog-transition {
  padding: 40px 28px;
}
.cog-transition-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  background: rgba(147, 193, 20, 0.15);
  color: #4a6300;
  border-radius: 50%;
  margin-bottom: 12px;
}

/* Mobile */
@media (max-width: 720px) {
  .cog-rt-arena, .cog-cpt-arena { height: 300px; }
  .cog-rt-circle { width: 100px; height: 100px; }
  .cog-cpt-letter { font-size: 100px; }
  .cog-rt-rt { font-size: 48px; }
}

/* kbd inline */
kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--bg-sunken);
  border: 1px solid var(--border-default);
  border-radius: 4px;
  color: var(--fg-secondary);
}

/* ====================================================================
 * N-BACK — Memoria de trabajo (Bloque 8 E2)
 * ==================================================================== */
.cog-nback-stage { width: 100%; text-align: center; position: relative; }
.cog-nback-progress {
  font-family: var(--font-mono);
  color: var(--fg-muted);
  font-size: 13px;
  margin-bottom: 16px;
}
.cog-nback-arena {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  position: relative;
}
.cog-nback-letter {
  font-family: var(--font-mono);
  font-size: 160px;
  font-weight: 700;
  color: var(--paw-navy);
  letter-spacing: 0;
  line-height: 1;
}
.cog-nback-blank {
  width: 12px; height: 12px;
  background: var(--gray-300);
  border-radius: 50%;
}
.cog-nback-hint { padding: 0 32px; font-size: 15px; color: var(--fg-muted); }

.cog-nback-prev {
  position: absolute;
  bottom: -40px;
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.cog-nback-prev-label {
  font-size: 10px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cog-nback-prev-letter {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  color: var(--paw-navy-500);
  opacity: 0.65;
}

/* ====================================================================
 * STROOP — Control de atención (Bloque 8 E2)
 * ==================================================================== */
.cog-stroop-stage { width: 100%; text-align: center; }
.cog-stroop-progress {
  font-family: var(--font-mono);
  color: var(--fg-muted);
  font-size: 13px;
  margin-bottom: 16px;
}
.cog-stroop-arena {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  padding: 20px;
  margin-bottom: 16px;
}
.cog-stroop-word {
  font-family: var(--font-sans);
  font-size: 72px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  /* color se aplica inline — es EL ESTÍMULO */
}
.cog-stroop-hint { font-size: 14px; color: var(--fg-muted); }
.cog-stroop-miss { color: var(--risk-4); font-weight: 600; }

.cog-stroop-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.cog-stroop-btn {
  padding: 18px 12px;
  border: 2px solid rgba(0,0,0,0.15);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 80ms ease, border-color 80ms;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.cog-stroop-btn:hover   { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.18); }
.cog-stroop-btn:active  { transform: translateY(0); }
.cog-stroop-btn-correct { border-color: #2a8c4d; box-shadow: 0 0 0 3px rgba(42,140,77,0.5); }
.cog-stroop-btn-wrong   { border-color: #dd213d; box-shadow: 0 0 0 3px rgba(221,33,61,0.5); }

/* Mobile */
@media (max-width: 560px) {
  .cog-stroop-buttons { grid-template-columns: repeat(2, 1fr); }
  .cog-stroop-word { font-size: 52px; }
  .cog-nback-letter { font-size: 110px; }
}

/* ====================================================================
 * TMT-B — Trail Making Test B (Bloque 8 E3)
 * Flexibilidad cognitiva — conectar 1→A→2→B... en grid
 * ==================================================================== */
.cog-tmt-stage { width: 100%; max-width: 540px; margin: 0 auto; }
.cog-tmt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.cog-tmt-timer {
  font-size: 26px;
  font-weight: 900;
  font-family: var(--font-mono);
  color: var(--paw-navy);
}
.cog-tmt-next {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-secondary);
  background: var(--bg-sunken);
  padding: 6px 14px;
  border-radius: 9999px;
}
.cog-tmt-next strong { font-family: var(--font-mono); color: var(--paw-navy); }
.cog-tmt-phase {
  font-size: 13px;
  color: var(--fg-muted);
  text-align: center;
  margin: 0 0 12px 0;
}
.cog-tmt-grid {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f8fafc;
  border-radius: 16px;
  border: 2px solid var(--border-subtle);
  margin: 0 auto 12px auto;
  max-width: 500px;
}
.cog-tmt-node {
  position: absolute;
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms, border-color 150ms, color 150ms;
  border: 3px solid;
  user-select: none;
  -webkit-user-select: none;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.cog-tmt-node.num {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1d4ed8;
}
.cog-tmt-node.let {
  background: #fce7f3;
  border-color: #ec4899;
  color: #be185d;
}
.cog-tmt-node.hit {
  background: #bbf7d0 !important;
  border-color: #22c55e !important;
  color: #166534 !important;
  transform: translate(-50%,-50%) scale(0.88);
}
.cog-tmt-node.err {
  animation: cog-rt-shake 0.3s;
  border-color: #ef4444 !important;
}
.cog-tmt-path {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}
.cog-tmt-hint {
  font-size: 13px;
  color: var(--fg-muted);
  text-align: center;
  margin: 0;
}

/* ====================================================================
 * DUAL TASK — Atención dividida (Bloque 8 E3)
 * ==================================================================== */
.cog-dual-stage { width: 100%; text-align: center; }
.cog-dual-progress { font-family: var(--font-mono); color: var(--fg-muted); font-size: 13px; margin-bottom: 16px; }
.cog-dual-arena {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}
.cog-dual-pair {
  display: flex;
  align-items: center;
  gap: 48px;
}
.cog-dual-letter {
  font-family: var(--font-mono);
  font-size: 120px;
  font-weight: 700;
  color: #2a73c8;           /* Azul — tarea "vocal" */
  line-height: 1;
}
.cog-dual-number {
  font-family: var(--font-mono);
  font-size: 120px;
  font-weight: 700;
  color: #2a8c4d;           /* Verde — tarea "impar" */
  line-height: 1;
}
.cog-dual-hint { font-size: 14px; color: var(--fg-muted); padding: 0 16px; }

.cog-dual-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.cog-dual-btn {
  padding: 18px 10px;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  cursor: pointer;
  transition: all 80ms ease;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.cog-dual-btn-vowel { background: #2a73c8; }
.cog-dual-btn-odd   { background: #2a8c4d; }
.cog-dual-btn-none  { background: var(--gray-500); }
.cog-dual-btn:hover { transform: translateY(-2px); }
.cog-dual-btn-active { border-color: #fff; box-shadow: 0 0 0 3px rgba(46,59,94,0.5); }
.cog-dual-btn-correct { border-color: #2a8c4d; box-shadow: 0 0 0 3px rgba(42,140,77,0.6); }
.cog-dual-btn-wrong   { border-color: #dd213d; box-shadow: 0 0 0 3px rgba(221,33,61,0.6); }

@media (max-width: 560px) {
  .cog-switch-frame { width: 140px; height: 140px; }
  .cog-switch-number { font-size: 72px; }
  .cog-dual-letter, .cog-dual-number { font-size: 80px; }
  .cog-dual-pair { gap: 24px; }
  .cog-dual-btn { font-size: 12px; padding: 14px 6px; }
}

/* ====================================================================
 * DUAL-TASK NUEVO — tracking + oddball (Bloque 8 E3 — legacy port)
 * ==================================================================== */
.cog-dualnew-stage { width: 100%; max-width: 720px; margin: 0 auto; }
.cog-dualnew-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-family: var(--font-mono);
}
.cog-dualnew-timer {
  font-size: 24px;
  font-weight: 900;
  color: var(--paw-navy);
}
.cog-dualnew-scores {
  display: flex;
  gap: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-secondary);
}
.cog-dualnew-canvas-wrap {
  background: #f1f5f9;
  border: 2px solid var(--border-subtle);
  border-radius: 16px;
  padding: 8px;
  margin-bottom: 12px;
  touch-action: none;
}
.cog-dualnew-canvas {
  width: 100%;
  height: auto;
  display: block;
  cursor: none;
  touch-action: none;
  background: #fafbfc;
  border-radius: 10px;
}
.cog-dualnew-hint {
  font-size: 13px;
  color: var(--fg-muted);
  text-align: center;
  margin: 0;
  line-height: 1.6;
}

/* ====================================================================
 * PRE-TEST CONTEXT (sleep + shift) — Bloque 8 E4
 * ==================================================================== */
.pretest-sleep-slider {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}
.pretest-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: var(--gray-200);
  border-radius: 9999px;
  outline: none;
}
.pretest-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px; height: 28px;
  background: var(--paw-navy);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(46,59,94,0.3);
}
.pretest-slider::-moz-range-thumb {
  width: 28px; height: 28px;
  background: var(--paw-navy);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}
.pretest-slider-display {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--paw-navy);
  min-width: 70px;
  text-align: right;
}
.pretest-slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--fg-muted);
  /* 2026-04-29 fix bug 28-abr (C1): el thumb del slider tiene 28px de ancho
     y su centro va de 14px (val=0) a width-14px (val=max). Las marcas
     deben alinearse al CENTRO del thumb, no al borde del track. Padding
     14px = mitad del ancho del thumb. */
  padding: 0 14px;
  font-family: var(--font-mono);
  margin-top: 6px;
  /* Cada tick es columna de igual peso para que 0/3/6/9/12 caigan en
     posiciones proporcionales (0%, 25%, 50%, 75%, 100% del rango efectivo). */
}
.pretest-slider-ticks span {
  flex: 1;
  text-align: center;
}
.pretest-slider-ticks span:first-child { text-align: left; }
.pretest-slider-ticks span:last-child  { text-align: right; }
.pretest-shift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.pretest-shift-option {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 100ms ease;
  position: relative;
}
.pretest-shift-option:hover { border-color: var(--paw-navy-300); }
.pretest-shift-option.selected {
  border-color: var(--paw-navy);
  background: var(--paw-navy-50);
  box-shadow: 0 0 0 3px rgba(46,59,94,0.08);
}
.pretest-shift-option input[type="radio"] {
  /* Oculto visualmente pero ACCESIBLE a clicks del label wrapper.
     NO usar pointer-events: none — rompe label→radio en algunos browsers. */
  position: absolute; opacity: 0; width: 1px; height: 1px;
}
.pretest-shift-label {
  font-weight: 600;
  color: var(--paw-navy-900);
  font-size: 14px;
}
.pretest-shift-desc {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.4;
}

/* ====================================================================
 * NASA-TLX — carga mental post-test (Bloque 8 E4)
 * ==================================================================== */
.tlx-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paw-navy-50);
  color: var(--paw-navy-700);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}
.tlx-item {
  padding: 18px 0;
  border-bottom: 1px dashed var(--paw-navy-100);
}
.tlx-item:last-of-type { border-bottom: none; }
.tlx-item-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--paw-navy-900);
  margin: 0 0 4px 0;
}
.tlx-item-desc {
  font-size: 13px;
  color: var(--fg-muted);
  margin: 0 0 14px 0;
  line-height: 1.5;
}
.tlx-item-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tlx-item-anchor-low, .tlx-item-anchor-high {
  font-size: 12px;
  color: var(--fg-muted);
  flex-shrink: 0;
  min-width: 80px;
}
.tlx-item-anchor-high { text-align: right; }
.tlx-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: linear-gradient(to right, #dbeafe 0%, #3b82f6 50%, #1e40af 100%);
  border-radius: 9999px;
  outline: none;
}
.tlx-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  background: var(--paw-navy);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(46,59,94,0.3);
  border: 3px solid #fff;
}
.tlx-slider::-moz-range-thumb {
  width: 22px; height: 22px;
  background: var(--paw-navy);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid #fff;
}
.tlx-item-value {
  text-align: center;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--paw-navy);
}

/* Botón flotante "Salir sin guardar" en el runner cognitivo */
.cog-abandon-form {
  position: fixed;
  top: 80px;
  left: 16px;
  margin: 0;
  z-index: 40;
}
.cog-abandon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  font-size: 12px;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 120ms;
  backdrop-filter: blur(4px);
}
.cog-abandon-btn:hover {
  background: var(--bg-surface);
  color: var(--risk-4);
  border-color: var(--risk-4);
}
@media (max-width: 560px) {
  .cog-abandon-form { top: 70px; left: 10px; }
  .cog-abandon-btn { font-size: 11px; padding: 5px 10px; }
}

/* Voice raw metrics — transparencia de features (bug 2 fix) */
.voice-raw-metrics {
  background: var(--bg-sunken);
  border-radius: var(--radius-md);
  padding: 16px;
}
.voice-raw-metrics > summary {
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--paw-navy);
  user-select: none;
}
.voice-raw-metrics[open] > summary { margin-bottom: 14px; }
.voice-raw-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.voice-raw-metric {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.voice-raw-metric-label {
  font-size: 11px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.voice-raw-metric-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--paw-navy);
}
.voice-raw-metric-unit { font-size: 12px; color: var(--fg-muted); font-weight: 500; }
.voice-raw-metric-note { font-size: 11px; color: var(--fg-muted); margin-top: 4px; line-height: 1.4; }

/* ====================================================================
 * BLOQUE 9 — Dashboard longitudinal individual
 * ==================================================================== */

/* Sparklines + trend arrows en assessment cards */
.assessment-summary-sparkline {
  margin: 10px 0 6px 0;
}
.cima-sparkline, .cima-history-sub, .cima-timeline-chart {
  display: block;
  max-width: 100%;
}
.assessment-summary-trend {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
  font-weight: 500;
}
.assessment-summary-trend.trend-up   { color: #2a8c4d; }
.assessment-summary-trend.trend-down { color: #dd213d; }
.assessment-summary-trend.trend-flat { color: var(--fg-muted); }

.assessment-summary-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
.assessment-summary-link-strong {
  font-weight: 600;
  color: var(--paw-navy) !important;
}

/* Longitudinal combined timeline card */
.longitudinal-card {
  position: relative;
}
.longitudinal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.longitudinal-footnote {
  font-size: 12px;
  color: var(--fg-muted);
  margin: 12px 0 0 0;
  text-align: center;
  line-height: 1.55;
}

/* Insights card */
.insights-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.insight {
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--paw-navy-500);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.insight-strength-strong { border-left-color: #3b82f6; background: #eff6ff; }
.insight-strength-moderate { border-left-color: var(--paw-navy-500); }
.insight-strength-weak     { border-left-color: var(--gray-300); }
.insight-type-safety_persistent { border-left-color: var(--risk-4); background: rgba(221,33,61,0.05); }

.insight-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--fg-muted);
  margin-bottom: 6px;
}
.insight-narrative {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--paw-navy-900);
}

/* History page */
.history-header {
  margin-bottom: 8px;
}
.history-back {
  font-size: 13px;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}
.history-back:hover { color: var(--paw-navy); }
.history-header-main {
  display: flex;
  align-items: center;
  gap: 14px;
}
.history-header-icon {
  width: 56px; height: 56px;
  background: var(--paw-navy-50);
  color: var(--paw-navy-700);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.history-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--paw-navy-900);
  margin: 0;
  letter-spacing: -0.01em;
}
.history-subtitle {
  font-size: 14px;
  color: var(--fg-muted);
  margin: 4px 0 0 0;
}

.history-main-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--paw-navy-100);
}
.history-stat {
  text-align: center;
}
.history-stat-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--paw-navy);
  line-height: 1.1;
}
.history-stat-label {
  font-size: 11px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.history-sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.history-sub-card {
  padding: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.history-sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.history-sub-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.history-sub-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.history-sub-latest {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--paw-navy);
}
.history-sub-note {
  font-size: 12px;
  color: var(--fg-muted);
  padding: 12px 0;
  text-align: center;
  font-style: italic;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 13.5px;
}
.history-table th, .history-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-subtle);
}
.history-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.history-table .ta-right { text-align: right; }
.history-table .text-muted { color: var(--fg-muted); }

/* ====================================================================
 * BLOQUE 10 — Tests físicos (V1 self-report)
 * ==================================================================== */
.phys-runner-shell {
  position: relative;
  min-height: 70vh;
}
.phys-test-stage {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
  padding: 24px 16px;
}
.phys-timer {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--paw-navy);
  line-height: 1;
}
.phys-timer-big { font-size: 96px; }
/* Prep countdown (STS-30 bug 8b fix) — número grande con animación de pulso
   por cada segundo de countdown. Mismo tamaño que el timer principal para
   consistencia visual. */
.phys-test-stage-prep { text-align: center; }
.phys-prep-countdown {
  font-size: 120px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--paw-navy);
  line-height: 1;
  margin: 24px 0 16px;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 380px) {
  .phys-prep-countdown { font-size: 96px; margin: 16px 0 12px; }
}
.phys-counter {
  font-family: var(--font-mono);
  font-size: 110px;
  font-weight: 800;
  color: var(--paw-navy);
  line-height: 1;
  margin: 16px 0 4px 0;
  transition: transform 200ms;
}
.phys-counter-pulse { transform: scale(1.18); color: #22c55e; }
.phys-counter-label {
  font-size: 13px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 28px;
}
.phys-tap-btn {
  display: block !important;
  width: 100%;
  padding: 22px 16px !important;
  font-size: 18px !important;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}
.phys-tap-btn-active {
  background: #22c55e !important;
  font-size: 22px !important;
  padding: 28px 16px !important;
}
.phys-tap-btn-active:hover { background: #16a34a !important; }

.phys-instruction-line {
  font-size: 13.5px;
  color: var(--fg-muted);
  line-height: 1.55;
  text-align: center;
  margin: 0;
}

/* Input stages (TF, LF, anthro) */
.phys-input-stage { text-align: left; }
.phys-visual-guide {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--paw-navy-50);
  border-left: 3px solid var(--paw-navy-500);
  padding: 16px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 20px;
}
.phys-guide-icon {
  font-size: 40px;
  line-height: 1;
  flex-shrink: 0;
}

/* Ilustración SVG en la pantalla de instrucciones de cada test físico.
   Canon mobile-first: ocupa ancho disponible pero con max-height para no
   empujar el botón de start fuera del viewport del iPhone. */
.phys-instructions-illus {
  margin: 16px auto;
  display: flex;
  justify-content: center;
  background: var(--paw-navy-50, #f3f5fb);
  border-radius: var(--radius-md, 12px);
  padding: 14px;
}
.phys-instructions-illus img {
  width: 100%;
  max-width: 280px;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  display: block;
}

/* Ilustración en las pantallas intermedias del test (calibración / iniciar). */
.phys-step-illus {
  display: flex;
  justify-content: center;
  margin: 12px auto 16px;
}
.phys-step-illus img, .phys-step-illus svg {
  width: 100%;
  max-width: 180px;
  height: auto;
  max-height: 160px;
  object-fit: contain;
}

/* Pantalla intermedia: card con explicación de la fase (calibrar / prueba). */
.phys-step-card {
  text-align: center;
  padding: 8px 4px;
}
.phys-step-card h3 {
  font-size: 20px;
  margin: 4px 0 8px;
  color: var(--paw-navy-900, #1a2040);
}
.phys-step-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--paw-navy-800, #2e3b5e);
  margin: 0 0 8px;
}
.phys-step-meta {
  font-size: 12.5px;
  color: var(--fg-muted, #6e7a9b);
  margin-top: 4px;
}

/* Aviso de "sube el volumen" — destacado para que el user lo lea antes de iniciar */
.phys-sound-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px auto 4px;
  padding: 12px 14px;
  background: rgba(253, 203, 0, 0.13);   /* amarillo PAW soft */
  border-left: 3px solid #fdcb00;
  border-radius: 0 var(--radius-md, 12px) var(--radius-md, 12px) 0;
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
  color: var(--paw-navy-900, #1a2040);
}
.phys-sound-notice svg {
  flex-shrink: 0;
  color: #b58a00;
  margin-top: 1px;
}

/* Aviso de seguridad — rojo PAW para tests con riesgo físico (balance, etc) */
.phys-safety-notice {
  margin: 12px auto 4px;
  padding: 10px 14px;
  background: rgba(221, 33, 61, 0.08);
  border-left: 3px solid #dd213d;
  border-radius: 0 var(--radius-md, 12px) var(--radius-md, 12px) 0;
  text-align: left;
  font-size: 12.5px;
  line-height: 1.5;
  color: #9a1d2e;
}

/* Botón danger — usado en balance "perdí el equilibrio" para que sea
   distinguible del botón primario de iniciar/calibrar */
.btn-danger {
  background: #dd213d;
  color: #fff;
  border: none;
  padding: 14px 18px;
  border-radius: var(--radius-md, 12px);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  margin-top: 12px;
}
.btn-danger:hover { background: #c01a32; }
.btn-danger:disabled { background: #aaa; cursor: not-allowed; }

/* ====== Pantalla de resultados intermedia (entre tests físicos) ======
   User ve qué obtuvo en la prueba que acaba de hacer ANTES de pasar a la
   siguiente. Canon UX: feedback inmediato + control sobre el ritmo. */
.phys-result-summary {
  text-align: center;
  padding: 8px 4px;
}
.phys-result-check {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}
.phys-result-title {
  font-size: 18px;
  margin: 4px 0 2px;
  color: var(--paw-navy-900, #1a2040);
}
.phys-result-test {
  font-size: 13px;
  color: var(--fg-muted, #6e7a9b);
  margin-bottom: 14px;
}
.phys-result-headline {
  font-size: 42px;
  font-weight: 700;
  color: var(--paw-navy-900, #1a2040);
  line-height: 1.05;
  margin: 12px 0 4px;
}
.phys-result-headline small {
  font-size: 16px;
  font-weight: 500;
  color: var(--fg-muted, #6e7a9b);
}
.phys-result-narrative {
  font-size: 14px;
  color: var(--paw-navy-800, #2e3b5e);
  margin: 4px 16px 16px;
  line-height: 1.5;
}
.phys-result-skipped {
  color: var(--fg-muted, #6e7a9b);
  font-size: 14px;
  font-style: italic;
}
.phys-result-grid {
  background: var(--paw-navy-50, #f3f5fb);
  border-radius: var(--radius-md, 12px);
  padding: 8px 12px;
  margin: 12px auto;
  max-width: 420px;
  text-align: left;
}
.phys-result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid rgba(46, 59, 94, 0.08);
  font-size: 13px;
}
.phys-result-row:last-child { border-bottom: none; }
.phys-result-row-label {
  color: var(--paw-navy-800, #2e3b5e);
  flex: 1;
}
.phys-result-row-value {
  font-weight: 600;
  color: var(--paw-navy-900, #1a2040);
  font-variant-numeric: tabular-nums;
}
.phys-result-row-value small {
  font-weight: 400;
  color: var(--fg-muted, #6e7a9b);
  font-size: 11.5px;
}

/* ======= Discomfort report (autorreporte de incomodidad, Nordic 16 segs) =======
   Patrón mobile-first: lista vertical de 16 segmentos, cada uno con 5 botones
   de severidad (sin slider — más estable en touch). Botones con color
   anatómico-funcional (verde sano → rojo crítico). */
.phys-discomfort-stage {
  padding: 0 4px;
}
.phys-discomfort-intro {
  background: var(--paw-navy-50, #f3f5fb);
  border-left: 3px solid var(--paw-navy-500, #3b4d8f);
  padding: 12px 14px;
  border-radius: 0 var(--radius-md, 12px) var(--radius-md, 12px) 0;
  margin-bottom: 12px;
  font-size: 13.5px;
  line-height: 1.5;
}
.phys-discomfort-intro p { margin: 0 0 4px; }
.phys-discomfort-intro p:last-child { margin: 4px 0 0; }
.phys-discomfort-progress {
  text-align: center;
  font-size: 12.5px;
  color: var(--fg-muted, #6e7a9b);
  margin: 8px 0 14px;
  padding: 6px;
  background: rgba(46, 59, 94, 0.05);
  border-radius: 6px;
}
.phys-discomfort-progress span {
  font-weight: 700;
  color: var(--paw-navy-900, #1a2040);
}
.phys-discomfort-group {
  margin-bottom: 18px;
}
.phys-discomfort-group-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 600;
  color: var(--fg-muted, #6e7a9b);
  margin-bottom: 6px;
  padding-left: 4px;
}
.phys-discomfort-row {
  background: #fff;
  border: 1px solid rgba(46, 59, 94, 0.10);
  border-radius: var(--radius-md, 12px);
  padding: 10px 10px 8px;
  margin-bottom: 6px;
}
.phys-discomfort-row-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--paw-navy-900, #1a2040);
  margin-bottom: 6px;
}
.phys-discomfort-row-buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.phys-disc-lvl-btn {
  background: #fff;
  border: 1.5px solid rgba(46, 59, 94, 0.18);
  border-radius: 8px;
  padding: 8px 2px 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--fg-muted, #6e7a9b);
  cursor: pointer;
  transition: all 100ms ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 56px;
}
.phys-disc-lvl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--lvl-color, #e6e9f0);
  border: 1px solid rgba(46, 59, 94, 0.20);
  display: block;
  transition: all 100ms ease;
}
.phys-disc-lvl-text {
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  display: block;
}
.phys-disc-lvl-btn:active {
  transform: scale(0.96);
}
.phys-disc-lvl-btn-active {
  background: var(--lvl-color, #e6e9f0);
  border-color: var(--lvl-text-color, #2e3b5e);
  color: var(--lvl-text-color, #2e3b5e);
}
.phys-disc-lvl-btn-active .phys-disc-lvl-dot {
  background: var(--lvl-text-color, #2e3b5e);
  border-color: var(--lvl-text-color, #2e3b5e);
  width: 16px;
  height: 16px;
}

/* ======= Discomfort report — pantalla de resultado ======= */
.phys-disc-result-bands {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 12px auto 16px;
  max-width: 420px;
}
.phys-disc-result-band {
  text-align: center;
  padding: 8px 4px;
  border-radius: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  background: rgba(46, 59, 94, 0.06);
  color: var(--fg-muted, #6e7a9b);
  opacity: 0.5;
}
.phys-disc-result-band-active {
  opacity: 1;
  font-size: 12px;
}
.phys-disc-top-segments {
  margin: 12px auto;
  max-width: 420px;
  text-align: left;
}
.phys-disc-top-seg {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 4px;
  border-radius: 8px;
  font-size: 13.5px;
  background: var(--paw-navy-50, #f3f5fb);
}
.phys-disc-top-seg-bar {
  width: 80px;
  height: 6px;
  background: rgba(46, 59, 94, 0.10);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 8px;
  flex: 1;
  max-width: 120px;
}
.phys-disc-top-seg-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 200ms ease;
}

/* ====== Card "Lo que cambió desde tu última evaluación" (deltas) ======
   Mobile-first: lista vertical con flecha + label + valor antes→ahora.
   Color: verde mejoró · naranja estable · rojo empeoró. */
.deltas-card { padding-bottom: 14px; }
.deltas-dim {
  border-top: 1px solid rgba(46, 59, 94, 0.08);
  padding: 14px 0 6px;
}
.deltas-dim:first-of-type { border-top: none; padding-top: 8px; }
.deltas-dim-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.deltas-dim-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--paw-navy-900, #1a2040);
}
.deltas-dim-meta {
  font-size: 11.5px;
  color: var(--fg-muted, #6e7a9b);
}
.deltas-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.delta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 4px;
  border-radius: 8px;
  font-size: 13px;
  background: rgba(46, 59, 94, 0.04);
  border-left: 3px solid transparent;
}
.delta-arrow {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
}
.delta-label {
  flex: 1;
  color: var(--paw-navy-800, #2e3b5e);
  min-width: 0;
}
.delta-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--paw-navy-900, #1a2040);
  white-space: nowrap;
}
/* Direcciones (color por mejora/empeoramiento) */
.delta-up_good, .delta-down_good {
  background: rgba(42, 140, 77, 0.08);
  border-left-color: #2a8c4d;
}
.delta-up_good .delta-arrow,
.delta-down_good .delta-arrow { color: #2a8c4d; }

.delta-up_bad, .delta-down_bad {
  background: rgba(221, 33, 61, 0.06);
  border-left-color: #dd213d;
}
.delta-up_bad .delta-arrow,
.delta-down_bad .delta-arrow { color: #dd213d; }

.delta-stable {
  border-left-color: #94a3b8;
}
.delta-stable .delta-arrow { color: #94a3b8; }

/* Magnitudes — los significativos resaltados, los sutiles atenuados */
.delta-mag-significant {
  font-weight: 600;
}
.delta-mag-subtle {
  opacity: 0.72;
}
.deltas-dim-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--paw-navy);
  text-decoration: none;
}
.deltas-dim-link:hover { text-decoration: underline; }
.deltas-footnote {
  margin: 14px 0 0;
  font-size: 11.5px;
  color: var(--fg-muted, #6e7a9b);
  font-style: italic;
  padding: 8px 12px;
  background: rgba(46, 59, 94, 0.03);
  border-radius: 6px;
}

/* ====== Pantalla intro por instrumento emocional (PHQ-9/GAD-7/PANAS) ======
   Mismo patrón canónico que cognitivo y físico: title + ilustración SVG +
   descripción humana + meta + botón [Comenzar este módulo]. */
.instrument-intro-stage {
  padding-top: 8px;
}
.instrument-intro-card {
  text-align: center;
  padding: 22px 20px;
}
.instrument-intro-title {
  font-size: 22px;
  margin: 0 0 14px;
  color: var(--paw-navy-900, #1a2040);
  text-align: center;
}
.instrument-intro-illus {
  margin: 0 auto 16px;
  max-width: 320px;
  background: var(--paw-navy-50, #f3f5fb);
  border-radius: var(--radius-md, 12px);
  padding: 14px 10px;
}
.instrument-intro-illus svg {
  width: 100%;
  height: auto;
  max-height: 160px;
  display: block;
}
.instrument-intro-text {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--paw-navy-800, #2e3b5e);
  margin: 0 0 18px;
  text-align: left;
  padding: 0 6px;
}
.instrument-intro-meta {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 0 0 16px;
  flex-wrap: wrap;
}
.instrument-intro-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--fg-muted, #6e7a9b);
  font-weight: 500;
  background: rgba(46, 59, 94, 0.05);
  padding: 5px 12px;
  border-radius: 999px;
}

/* ====== Pantalla intermedia entre instrumentos emocionales ======
   Mismo patrón canónico físico/cognitivo: check verde + título +
   resumen breve + preview del siguiente + botón [Continuar]. */
.instrument-transition-stage {
  padding-top: 8px;
}
.instrument-transition-card {
  text-align: center;
  padding: 22px 20px;
}
.instrument-transition-check {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}
.instrument-transition-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--fg-muted, #6e7a9b);
  font-weight: 600;
  margin-bottom: 4px;
}
.instrument-transition-title {
  font-size: 20px;
  margin: 0 0 12px;
  color: var(--paw-navy-900, #1a2040);
}
.instrument-transition-headline {
  font-size: 42px;
  font-weight: 700;
  color: var(--paw-navy-900, #1a2040);
  line-height: 1.05;
  margin: 8px 0 4px;
}
.instrument-transition-headline small {
  font-size: 16px;
  font-weight: 500;
  color: var(--fg-muted, #6e7a9b);
}
.instrument-transition-narrative {
  font-size: 14px;
  line-height: 1.55;
  margin: 6px 14px;
  color: var(--paw-navy-800, #2e3b5e);
}
.instrument-transition-note {
  font-size: 12.5px;
  color: var(--fg-muted, #6e7a9b);
  font-style: italic;
  margin: 14px auto 16px;
  max-width: 380px;
}
.instrument-transition-next {
  background: var(--paw-navy-50, #f3f5fb);
  border-radius: var(--radius-md, 12px);
  padding: 12px 16px;
  margin: 16px 0 0;
  text-align: left;
  border-left: 3px solid var(--paw-navy-500, #3b4d8f);
}
.instrument-transition-next-eyebrow {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fg-muted, #6e7a9b);
  font-weight: 600;
  margin-bottom: 4px;
}
.instrument-transition-next-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--paw-navy-900, #1a2040);
}
.instrument-transition-next-meta {
  font-size: 12.5px;
  color: var(--fg-muted, #6e7a9b);
  margin-top: 4px;
}

/* Ilustraciones SVG en pantallas de instrucción de tests cognitivos.
   Mismo patrón canónico mobile-first que dimensión física. */
.cog-instructions-illus {
  margin: 14px auto;
  display: flex;
  justify-content: center;
  background: var(--paw-navy-50, #f3f5fb);
  border-radius: var(--radius-md, 12px);
  padding: 14px 10px;
}
.cog-instructions-illus svg {
  width: 100%;
  max-width: 320px;
  height: auto;
  max-height: 180px;
  object-fit: contain;
  display: block;
}

/* Sub-titles dentro de la pantalla de resultados (hand_anthro tiene
   3 secciones: medidas / herramientas-EPP / puesto de trabajo) */
.phys-result-section-title {
  text-align: left;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
  color: var(--paw-navy-700, #2e3b5e);
  margin: 18px auto 4px;
  max-width: 420px;
  padding-left: 4px;
}
.phys-guide-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--paw-navy-800);
}
.phys-hint-positive { color: #2a8c4d; font-weight: 600; }
.phys-hint-negative { color: #c87b00; font-weight: 600; }

.phys-number-input {
  margin-bottom: 14px;
}
.phys-number-input label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--paw-navy-900);
  margin-bottom: 6px;
}
.phys-number-input input[type="number"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 18px;
  font-family: var(--font-mono);
  font-weight: 700;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--paw-navy);
  text-align: center;
  transition: border-color 120ms;
}
.phys-number-input input[type="number"]:focus {
  outline: none;
  border-color: var(--paw-navy);
  box-shadow: 0 0 0 3px rgba(46,59,94,0.15);
}
.phys-input-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) {
  .phys-input-pair { grid-template-columns: 1fr; }
  .phys-counter { font-size: 80px; }
  .phys-timer-big { font-size: 64px; }
}

/* ====================================================================
 * BLOQUE 10 V2 — Tests físicos sensor-driven
 * ==================================================================== */
.phys-perm-screen {
  text-align: center;
  padding: 32px 20px;
  max-width: 460px;
  margin: 0 auto;
}
.phys-perm-icon {
  font-size: 56px;
  margin-bottom: 12px;
}
.phys-perm-screen h3 {
  font-size: 20px;
  color: var(--paw-navy-900);
  margin: 0 0 12px 0;
}
.phys-perm-screen p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--fg-secondary);
  margin: 0 0 20px 0;
}

.phys-fallback-banner {
  background: var(--paw-navy-50);
  border-left: 3px solid var(--paw-navy-500);
  padding: 12px 14px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 13px;
  margin-bottom: 16px;
  color: var(--paw-navy-800);
  line-height: 1.5;
}

.phys-status {
  font-size: 14px;
  font-weight: 600;
  color: var(--paw-navy-700);
  background: var(--paw-navy-50);
  padding: 8px 14px;
  border-radius: 9999px;
  margin-bottom: 14px;
  display: inline-block;
}

/* Balance arena — punto que se mueve con el sway */
.phys-bal-arena {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 16px auto 20px;
  background: var(--bg-sunken);
  border: 2px solid var(--border-subtle);
  border-radius: 50%;
}
.phys-bal-target {
  position: absolute;
  top: 50%; left: 50%;
  width: 80px; height: 80px;
  border: 2px dashed var(--paw-navy-300);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.phys-bal-dot {
  position: absolute;
  top: 50%; left: 50%;
  width: 18px; height: 18px;
  background: var(--paw-navy);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 16px rgba(46,59,94,0.4);
  /* linear corto: interpola entre samples (~16-20ms a 50Hz) sin sentirse
     pegajoso. ease se sentía lento en los extremos. */
  transition: top 60ms linear, left 60ms linear;
  will-change: top, left;
}

/* Lateral flex pair */
.phys-lf-pair {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 18px 0;
  text-align: center;
}
.phys-lf-side-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fg-muted);
  margin-bottom: 4px;
}
.phys-lf-count {
  font-family: var(--font-mono);
  font-size: 56px;
  font-weight: 700;
  color: var(--paw-navy);
  line-height: 1;
}

/* Hand anthro — camera + canvas overlay */
.phys-anthro-stage { text-align: center; padding: 16px; }
.phys-anthro-status {
  font-size: 14px;
  font-weight: 600;
  color: var(--paw-navy-700);
  background: var(--paw-navy-50);
  padding: 10px 16px;
  border-radius: 9999px;
  margin-bottom: 14px;
  display: inline-block;
}
.phys-anthro-camera-frame {
  position: relative;
  max-width: 480px;
  margin: 0 auto 16px;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.phys-anthro-camera-frame video,
.phys-anthro-camera-frame canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* mirror, mejor UX para selfie cam */
}

/* =====================================================================
 * LANDING PAGE (home.blade.php)
 * Inspirada en patworkgroup.com/hph. Logo CIMA grande en hero.
 * ===================================================================== */
.cima-landing {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Hero ---- */
.landing-hero {
  background: linear-gradient(135deg, var(--cima-ink) 0%, var(--cima-ink-soft) 60%, #2a4a8a 140%);
  color: #fff;
  border-radius: var(--radius-2xl);
  padding: 56px 48px;
  margin: 32px 0;
  position: relative;
  overflow: hidden;
}
.landing-hero::before {
  content: "";
  position: absolute;
  top: -50%; right: -30%;
  width: 80%; height: 200%;
  background: radial-gradient(circle, rgba(91,163,240,0.15) 0%, transparent 70%);
  pointer-events: none;
}
/* Layout 1 columna centrada — todo el contenido del hero respira en un
   solo eje vertical. El logo es protagonista absoluto, el resto fluye
   debajo. Decisión post-feedback usuario 2026-04-27. */
.landing-hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}
/* Logo dark protagonista — sobre fondo navy, sin wrapper.
   Dimensiones AUTO + max-height/max-width preservan SIEMPRE el aspect
   ratio del PNG (sin distorsión vertical aún en containers angostos).
   Tamaño objetivo: hasta 280px de alto desktop, 220px mobile. */
.landing-hero-logo {
  height: auto;
  width: auto;
  max-height: 280px;
  max-width: 100%;
  display: block;
  margin: 0 auto 32px;
}
.landing-h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.6px;
  margin: 0 0 20px;
  color: #fff;
  max-width: 760px;
}
.landing-h1 .accent {
  color: var(--cima-blue-light);
}
.landing-lead {
  font-size: 17px;
  line-height: 1.55;
  color: rgba(255,255,255,0.88);
  margin: 0 0 28px;
  max-width: 580px;
}
.landing-lead strong { color: #fff; font-weight: 700; }
.landing-ctas {
  display: flex;
  gap: 12px;
  margin-bottom: 48px;
  flex-wrap: wrap;
  justify-content: center;
}
.landing-btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  letter-spacing: 0.2px;
  transition: all var(--dur-fast) var(--ease-out);
}
.landing-btn-primary {
  background: var(--cima-blue);
  color: #fff;
  box-shadow: 0 4px 16px rgba(44,143,232,0.35);
}
.landing-btn-primary:hover {
  background: var(--cima-blue-light);
  text-decoration: none;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(44,143,232,0.45);
}
.landing-btn-ghost {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}
.landing-btn-ghost:hover {
  background: rgba(255,255,255,0.16);
  text-decoration: none;
  color: #fff;
}
.landing-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 24px;
}
.landing-stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--cima-blue-light);
  line-height: 1;
  letter-spacing: -0.5px;
}
.landing-stat-lbl {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-top: 6px;
  line-height: 1.35;
}

/* =====================================================================
 * HUMAN FACTORS INDEX gauge (speedometer)
 * Reutilizable: variant 'dark' (landing/hero navy) | 'light' (dashboard).
 * Premium, sobrio, tipografía protagonista.
 * ===================================================================== */
.hfi-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 24px 24px;
}
.hfi-variant-dark {
  margin: 0 auto 48px;
  padding: 36px 24px 32px;
  border-top: 1px solid rgba(255,255,255,0.10);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  max-width: 560px;
}
.hfi-variant-light {
  background: #fff;
}

.hfi-gauge-svg-wrap {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}
.hfi-gauge-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Label "HUMAN FACTORS INDEX®" debajo del gauge */
.hfi-gauge-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  margin-top: 6px;
}
.hfi-gauge-label sup {
  font-size: 9px;
  vertical-align: super;
  margin-left: 1px;
  opacity: 0.7;
}
.hfi-gauge-state {
  font-size: 14px;
  margin-top: 8px;
  line-height: 1.45;
  max-width: 420px;
}
.hfi-gauge-state strong {
  font-weight: 700;
}
.hfi-gauge-example {
  display: inline-block;
  margin-top: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  font-style: italic;
}

/* Sub-componentes (3 mini-bars) */
.hfi-gauge-components {
  margin-top: 22px;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hfi-component-row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  font-size: 13px;
}
.hfi-component-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.hfi-component-lbl {
  text-align: left;
  font-weight: 600;
}
.hfi-component-val {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
}
.hfi-component-bar {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.hfi-component-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s var(--ease-out);
}

/* Dashboard hero card wrapper */
.hfi-hero {
  padding: 0;
  overflow: hidden;
}

@media (max-width: 900px) {
  .hfi-variant-dark {
    margin: 0 auto 32px;
    padding: 24px 16px 22px;
  }
  .hfi-gauge {
    padding: 20px 16px 18px;
  }
  .hfi-gauge-svg-wrap {
    max-width: 300px;
  }
  .hfi-gauge-label { letter-spacing: 1.8px; }
}

/* ---- Sections ---- */
.landing-section {
  padding: 60px 0;
}
.landing-section-alt {
  background: var(--cima-blue-50);
  margin-left: -24px;
  margin-right: -24px;
  padding-left: 24px;
  padding-right: 24px;
  border-radius: var(--radius-xl);
}
.landing-section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}
.landing-section-head h2 {
  font-size: 30px;
  font-weight: 800;
  color: var(--cima-ink);
  letter-spacing: -0.4px;
  margin: 0 0 10px;
  line-height: 1.2;
}
.landing-section-head p {
  font-size: 16px;
  color: var(--cima-grey);
  margin: 0;
  line-height: 1.5;
}

/* ---- 7 Dimensions grid ---- */
.landing-dim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.landing-dim-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  border-top: 4px solid var(--accent, var(--cima-blue));
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.landing-dim-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(14,31,71,0.10);
}
.landing-dim-bullet {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent, var(--cima-blue));
  margin-bottom: 10px;
  box-shadow: 0 0 0 4px rgba(0,0,0,0.04);
}
.landing-dim-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--cima-ink);
  margin-bottom: 6px;
}
.landing-dim-desc {
  font-size: 13px;
  color: var(--cima-grey);
  line-height: 1.5;
  margin: 0;
}

/* ---- Features grid ---- */
.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.landing-feature {
  text-align: center;
  padding: 16px;
}
.landing-feature-icon {
  display: inline-flex;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #fff;
  color: var(--cima-blue);
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(14,31,71,0.08);
}
.landing-feature h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--cima-ink);
  margin: 0 0 8px;
  line-height: 1.3;
}
.landing-feature p {
  font-size: 13px;
  color: var(--cima-grey);
  line-height: 1.55;
  margin: 0;
}

/* ---- Final CTA ---- */
.landing-final-cta {
  text-align: center;
  padding: 60px 24px;
  background: linear-gradient(135deg, var(--cima-ink) 0%, #1d3068 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  margin: 40px 0;
}
.landing-final-cta h2 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.3px;
}
.landing-final-cta p {
  font-size: 15px;
  opacity: 0.85;
  margin: 0 0 28px;
  line-height: 1.5;
}

/* ---- Mobile responsive ---- */
@media (max-width: 900px) {
  .landing-hero {
    padding: 36px 20px;
  }
  .landing-hero-logo {
    max-height: 220px;
    margin: 0 auto 26px;
  }
  .landing-h1 {
    font-size: 28px;
  }
  .landing-stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .landing-lead { margin-left: auto; margin-right: auto; }
  .landing-section-head h2 { font-size: 24px; }

}

/* =====================================================================
 * EMPRESA DASHBOARD (Capa 3) — Centro de control B2B.
 * Usa paleta CIMA canónica (--cima-*) definida arriba.
 * ===================================================================== */
.empresa-dashboard {
  padding: 24px 0 60px;
  max-width: 1100px;
  margin: 0 auto;
}

/* ---- Hero ---- */
.emp-hero {
  background: linear-gradient(135deg, var(--cima-ink) 0%, var(--cima-ink-soft) 60%, var(--cima-blue) 140%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  box-shadow: var(--shadow-md);
}
.emp-hero-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cima-blue-light);
  margin-bottom: 8px;
}
.emp-hero-title {
  font-size: 26px; font-weight: 700; margin: 0 0 6px;
  letter-spacing: -0.3px;
}
.emp-hero-tagline {
  font-size: 13px; opacity: 0.85; margin: 0;
  font-style: italic;
}
.emp-hero-stats {
  display: flex; gap: 24px;
}
.emp-stat {
  text-align: right;
  min-width: 96px;
}
.emp-stat-value {
  font-size: 32px; font-weight: 700; line-height: 1;
  color: #fff;
}
.emp-stat-value small {
  font-size: 16px; font-weight: 500; opacity: 0.7;
  margin-left: 1px;
}
.emp-stat-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-top: 4px;
  color: var(--cima-blue-light);
}
.emp-stat-sub {
  font-size: 11px; opacity: 0.7; margin-top: 2px;
}
/* Delta vs periodo anterior (P0c auditoría 2026-04-27) */
.emp-stat-delta {
  font-size: 11px;
  font-weight: 700;
  margin-top: 6px;
  letter-spacing: 0.3px;
  font-variant-numeric: tabular-nums;
}
.emp-dim-delta {
  font-size: 12px;
  font-weight: 700;
  margin: -2px 0 6px;
  letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.emp-dim-delta-n {
  font-size: 10px;
  font-weight: 500;
  color: var(--cima-grey);
  opacity: 0.85;
  letter-spacing: 0;
}

/* ---- Sección genérica ---- */
.emp-section {
  margin-bottom: 32px;
}
.emp-section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.emp-section-title {
  font-size: 18px; font-weight: 700; margin: 0;
  color: var(--cima-ink);
}
.emp-section-sub {
  font-size: 13px; color: var(--cima-grey); margin: 4px 0 0;
}

/* ---- 3 cards de dimensión ---- */
.emp-dim-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.emp-dim-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  border-top: 3px solid var(--accent, var(--cima-blue));
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.emp-dim-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.emp-dim-icon { display: inline-flex; }
.emp-dim-title {
  font-size: 13px; font-weight: 700; color: var(--cima-ink);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.emp-dim-score {
  font-size: 44px; font-weight: 700; line-height: 1;
  margin: 8px 0 4px;
  letter-spacing: -1px;
}
.emp-dim-score small { font-size: 16px; font-weight: 500; opacity: 0.55; margin-left: 2px; }
.emp-dim-meta {
  font-size: 11px; color: var(--cima-grey); margin-bottom: 12px;
}
.emp-dim-distribution {
  display: flex; flex-direction: column; gap: 4px;
  margin: 8px 0 12px;
}
.emp-dist-row {
  display: grid;
  grid-template-columns: 80px 1fr 24px;
  gap: 6px;
  align-items: center;
  font-size: 11px;
}
.emp-dist-label { font-weight: 600; }
.emp-dist-bar {
  background: #f1f3f5;
  height: 8px; border-radius: 4px;
  overflow: hidden; position: relative;
}
.emp-dist-fill {
  display: block; height: 100%;
  border-radius: 4px;
  transition: width 0.3s var(--ease-out);
}
.emp-dist-count {
  text-align: right; font-weight: 600; color: var(--cima-grey);
}
.emp-dim-spark {
  margin-top: auto; padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
}
.emp-dim-spark canvas {
  width: 100%; height: 48px;
}
.emp-dim-spark.muted {
  font-size: 11px; color: var(--cima-grey); font-style: italic;
}
.emp-spark-meta {
  font-size: 10px; color: var(--cima-grey);
  text-align: right; margin-top: 2px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.emp-dim-empty {
  text-align: center; padding: 18px 8px;
}
.emp-dim-empty-icon { display: block; margin: 0 auto 8px; }
.emp-dim-empty-title {
  font-weight: 700; color: var(--cima-ink); margin-bottom: 4px;
}
.emp-dim-empty-sub {
  font-size: 12px; color: var(--cima-grey); line-height: 1.4;
}

/* ---- Cohort filter pills ---- */
.emp-cohort-filter {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.emp-cohort-pill {
  padding: 6px 12px;
  font-size: 12px; font-weight: 600;
  background: #fff;
  border: 1px solid var(--border-subtle);
  color: var(--cima-grey);
  border-radius: 999px;
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
}
.emp-cohort-pill:hover {
  border-color: var(--cima-blue);
  color: var(--cima-blue);
  text-decoration: none;
}
.emp-cohort-pill.is-active {
  background: var(--cima-ink);
  border-color: var(--cima-ink);
  color: #fff;
}

/* ---- Heatmap ---- */
.emp-heatmap-wrap {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.emp-heatmap {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.emp-heatmap thead th {
  background: var(--cima-ink);
  color: #fff;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 10px 14px;
  text-align: left;
}
.emp-heatmap thead th:not(:first-child):not(:nth-child(2)) {
  text-align: center;
}
.emp-heatmap tbody tr {
  border-bottom: 1px solid var(--border-subtle);
}
.emp-heatmap tbody tr:last-child { border-bottom: 0; }
.emp-heatmap tbody td {
  padding: 12px 14px;
}
.emp-heatmap-cohort { font-weight: 600; color: var(--cima-ink); }
.emp-heatmap-n {
  font-size: 11px; color: var(--cima-grey);
  font-variant-numeric: tabular-nums;
}
.emp-heatmap-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.emp-heatmap-val {
  font-weight: 700; font-size: 16px;
}

/* ---- Empty / good states ---- */
.emp-empty-card {
  background: #fff;
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: var(--cima-grey);
  text-align: center;
}
.emp-empty-card strong { color: var(--cima-ink); display: block; margin-bottom: 4px; }
.emp-empty-card p { margin: 0; font-size: 13px; }
.emp-empty-card--good {
  display: flex; align-items: center; gap: 16px;
  text-align: left;
  border-style: solid;
  border-color: #1f8a8a44;
  background: #e8f3ec;
}
.emp-empty-card--good strong { color: #1f8a8a; }
.emp-empty-card--good p { color: var(--cima-grey); }

/* ---- Warnings ---- */
.emp-warnings {
  display: flex; flex-direction: column; gap: 12px;
}
.emp-warn-card {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid #c87b00;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.emp-warn-bullet {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #c87b00;
  color: #fff;
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.emp-warn-title {
  font-weight: 600; font-size: 14px; color: var(--cima-ink);
  margin-bottom: 2px;
}
.emp-warn-stats {
  font-size: 12px; color: var(--cima-grey);
  margin-bottom: 4px;
}
.emp-warn-delta { font-weight: 700; color: #dd213d; }
.emp-warn-hint {
  font-size: 12px; color: var(--cima-ink-soft);
  font-style: italic;
}

/* ---- Privacy footer note ---- */
.emp-privacy-note {
  margin-top: 28px;
  padding: 14px 18px;
  background: var(--cima-blue-50);
  border-left: 3px solid var(--cima-blue);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--cima-ink-soft);
}
.emp-privacy-note strong { color: var(--cima-ink); }

/* ---- Responsive (mobile) ---- */
@media (max-width: 720px) {
  .emp-hero {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .emp-hero-stats {
    justify-content: space-between;
  }
  .emp-stat { text-align: left; }
  .emp-dim-grid {
    grid-template-columns: 1fr;
  }
  .emp-section-head { flex-direction: column; align-items: flex-start; }
  .emp-heatmap-wrap { overflow-x: auto; }
  .emp-heatmap { min-width: 520px; }
}

/* =====================================================================
 * CHECK-IN TILE — tarjeta CTA en dashboard individuo (Sprint 2 / B7)
 * ===================================================================== */
.checkin-tile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  background: linear-gradient(135deg, var(--cima-ink) 0%, var(--cima-ink-soft) 60%, #2a4a8a 140%);
  color: #fff;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  margin-bottom: 22px;
  box-shadow: var(--shadow-md);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.checkin-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(14,31,71,0.18);
  text-decoration: none;
  color: #fff;
}
.checkin-tile.is-escalation {
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
}
.checkin-tile--done {
  background: #fff;
  color: var(--cima-ink);
  border: 1px solid var(--border-subtle);
}
.checkin-tile-icon {
  width: 56px; height: 56px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.checkin-tile--done .checkin-tile-icon { background: rgba(42,140,77,0.08); }
.checkin-tile-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  opacity: 0.85;
  margin-bottom: 4px;
}
.checkin-tile--done .checkin-tile-eyebrow { color: var(--cima-grey); opacity: 1; }
.checkin-tile-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 3px;
  letter-spacing: -0.2px;
}
.checkin-tile-msg {
  font-size: 13px;
  opacity: 0.92;
  line-height: 1.4;
}
.checkin-tile--done .checkin-tile-msg { color: var(--cima-grey); }
.checkin-tile-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.95;
}
@media (max-width: 600px) {
  .checkin-tile { grid-template-columns: auto 1fr; padding: 14px 16px; gap: 12px; }
  .checkin-tile-cta { display: none; }
  .checkin-tile-title { font-size: 16px; }
}

/* =====================================================================
 * B13 personal — "Tus últimos 30 días" en dashboard individuo
 * ===================================================================== */
.daily-trends-card { padding: 18px 20px; }
.daily-trends-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px; flex-wrap: wrap; gap: 6px;
}
.daily-trends-meta {
  font-size: 11px; color: var(--cima-grey); font-weight: 600;
  letter-spacing: 0.3px;
}
.daily-trends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.daily-trend-tile {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  border-top: 3px solid var(--accent, var(--cima-blue));
  display: flex; flex-direction: column; gap: 4px;
}
.daily-trend-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  color: var(--cima-grey); letter-spacing: 0.5px;
}
.daily-trend-stat {
  font-size: 22px; font-weight: 800; color: var(--cima-ink);
  line-height: 1; letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
}
.daily-trend-stat small { font-size: 11px; opacity: 0.5; font-weight: 500; margin-left: 2px; }
.daily-trend-stat-small {
  font-size: 14px; font-weight: 700; color: var(--cima-ink);
  font-variant-numeric: tabular-nums;
}
.daily-trend-sub {
  font-size: 10px; color: var(--cima-grey); letter-spacing: 0.2px;
}
.daily-trend-spark {
  width: 100% !important;
  height: 40px !important;
  margin-top: 4px;
}

/* Insights detectados (patrones automáticos) */
.daily-insights-list {
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 14px; border-top: 1px dashed var(--border-subtle);
}
.daily-insight {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-radius: var(--radius-md);
  background: var(--gray-50); border-left: 3px solid var(--cima-grey);
}
.daily-insight--positive  { border-left-color: var(--risk-2); background: rgba(147,193,20,0.06); }
.daily-insight--attention { border-left-color: var(--risk-3); background: rgba(253,203,0,0.06); }
.daily-insight--info      { border-left-color: var(--cima-blue); background: var(--cima-blue-50); }
.daily-insight svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--cima-grey);
}
.daily-insight--positive svg { color: var(--risk-2); }
.daily-insight--attention svg { color: var(--risk-3); }
.daily-insight--info svg { color: var(--cima-blue); }
.daily-insight-body { flex: 1; }
.daily-insight-title { font-size: 13px; font-weight: 700; color: var(--cima-ink); margin-bottom: 2px; }
.daily-insight-msg { font-size: 12px; color: var(--cima-grey); line-height: 1.4; }

@media (max-width: 480px) {
  .daily-trends-grid { grid-template-columns: 1fr 1fr; }
}

/* Status pill de notificaciones — mini, discreto, arriba de la tile de check-in */
.notif-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin-bottom: 8px;
  background: var(--cima-blue-50);
  color: var(--cima-ink-soft);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.notif-status-pill svg { color: var(--cima-blue); }

/* Notif sutil de dimensiones faltantes — debajo del checkin-tile baseline */
.missing-dims-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: -14px 0 22px;   /* pegado a la tile de arriba */
  padding: 10px 14px;
  background: #fff8f0;
  border: 1px solid #fcd34d;
  border-top: 0;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: 13px;
  color: var(--cima-ink-soft);
  line-height: 1.45;
}
.missing-dims-banner svg { color: #c87b00; flex-shrink: 0; margin-top: 2px; }
.missing-dims-banner strong { color: var(--cima-ink); }

/* ----- CTA secundaria (P0b auditoría 2026-04-27) -----
 * Aparece debajo del checkin-tile primary cuando hay baseline pendiente
 * pero el daily ya está disponible. Jerarquía visual menor: borde fino,
 * fondo blanco, sin acento de color sólido. Sin shadow. */
.checkin-tile-secondary {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px;
  align-items: center;
  margin: -10px 0 22px;       /* pegado al primary tile de arriba */
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-top: 0;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  text-decoration: none;
  color: var(--cima-ink);
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.checkin-tile-secondary:hover {
  background: var(--cima-blue-50);
  border-color: var(--cima-blue);
  text-decoration: none;
}
.checkin-tile-secondary-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--cima-blue-50);
  color: var(--cima-blue);
  flex-shrink: 0;
}
.checkin-tile-secondary-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--cima-grey);
  margin-bottom: 2px;
}
.checkin-tile-secondary-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--cima-ink);
  margin-bottom: 2px;
}
.checkin-tile-secondary-msg {
  font-size: 12px;
  color: var(--cima-grey);
  line-height: 1.4;
}
.checkin-tile-secondary-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cima-grey);
  white-space: nowrap;
}
@media (max-width: 480px) {
  .checkin-tile-secondary { grid-template-columns: 32px 1fr; padding: 10px 12px; gap: 10px; }
  .checkin-tile-secondary-meta { display: none; }
  .checkin-tile-secondary-icon { width: 32px; height: 32px; }
}

/* =====================================================================
 * DAILY CHECK-IN (Sprint 2 / Bloque B) — pulso 60-90 seg
 * Mobile-first: optimizado para iPhone Safari + Android Chrome
 * ===================================================================== */
.daily-checkin {
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 16px 60px;
  position: relative;
}

/* ---- Header con streak + skip ---- */
.dchk-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.dchk-streak {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--cima-blue-50);
  color: var(--cima-ink);
  border: 1px solid var(--cima-blue);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.dchk-streak-num {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: var(--cima-blue);
}
.dchk-streak-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--cima-grey);
  letter-spacing: 0.3px;
}
.dchk-skip-link {
  background: transparent;
  border: 0;
  color: var(--cima-grey);
  font-size: 13px;
  cursor: pointer;
  padding: 6px 8px;
  text-decoration: underline;
}
.dchk-skip-link:hover { color: var(--cima-ink); }

/* ---- Progress bar ---- */
.dchk-progress {
  width: 100%;
  height: 5px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 18px;
}
.dchk-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cima-blue), var(--cima-blue-light));
  transition: width 0.3s var(--ease-out);
  border-radius: 3px;
}

/* ---- Banner info ---- */
.dchk-banner-info {
  background: var(--cima-blue-50);
  color: var(--cima-ink-soft);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  border-left: 3px solid var(--cima-blue);
  margin-bottom: 14px;
}

/* ---- Step container ---- */
.dchk-steps { position: relative; }
.dchk-step {
  display: none;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  animation: dchk-fade-in 0.25s var(--ease-out);
}
.dchk-step.active { display: block; }
@keyframes dchk-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dchk-question {
  font-size: 22px;
  font-weight: 700;
  color: var(--cima-ink);
  margin: 0 0 6px;
  letter-spacing: -0.3px;
  line-height: 1.25;
}
.dchk-hint {
  font-size: 13px;
  color: var(--cima-grey);
  margin: 0 0 22px;
  line-height: 1.45;
}

/* ---- VAS sliders ---- */
.dchk-vas { margin-bottom: 24px; }
.dchk-vas-icons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  user-select: none;
  padding: 0 4px;
}
.dchk-vas-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dchk-slider {
  width: 100%;
  height: 6px;
  appearance: none;
  -webkit-appearance: none;
  /* Paleta canon de riesgo: rojo (4) → amarillo (3) → verde (2) */
  background: linear-gradient(90deg, var(--risk-4) 0%, var(--risk-3) 50%, var(--risk-2) 100%);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.dchk-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px; height: 28px;
  background: #fff;
  border: 3px solid var(--cima-ink);
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(14,31,71,0.25);
}
.dchk-slider::-moz-range-thumb {
  width: 28px; height: 28px;
  background: #fff;
  border: 3px solid var(--cima-ink);
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(14,31,71,0.25);
}
.dchk-vas-scale {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 12px;
  color: var(--cima-grey);
}
.dchk-vas-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--cima-ink);
  min-width: 40px;
  text-align: center;
}

/* ---- Sleep input ---- */
.dchk-sleep-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--cima-ink);
  margin-bottom: 6px;
}
.dchk-input-num {
  width: 100%;
  padding: 12px 14px;
  font-size: 18px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  color: var(--cima-ink);
}
.dchk-input-num:focus {
  border-color: var(--cima-blue);
  outline: 2px solid var(--cima-blue-50);
}

/* ---- Body map ---- */
.dchk-bodymap-wrap {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 20px;
}
.dchk-bodymap {
  width: 100%;
  height: auto;
  max-height: 460px;
  display: block;
  margin: 0 auto;
}
.dchk-zone {
  cursor: pointer;
  transition: fill 0.18s var(--ease-out), stroke 0.18s var(--ease-out);
}
/* Body map zonas — paleta canon de riesgo (--risk-0..4) */
.dchk-zone.pain-lvl-0 { fill: rgba(171, 180, 181, 0.18); stroke: var(--risk-0); stroke-width: 1; }
.dchk-zone.pain-lvl-1 { fill: rgba(253, 203, 0, 0.45);   stroke: var(--risk-3); stroke-width: 2; }
.dchk-zone.pain-lvl-2 { fill: rgba(221, 14, 91, 0.55);   stroke: var(--risk-trend); stroke-width: 2.4; }
.dchk-zone.pain-lvl-3 { fill: rgba(221, 33, 61, 0.78);   stroke: var(--risk-4); stroke-width: 2.8; }
.dchk-zone:hover { opacity: 0.9; }
.dchk-bodymap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.dchk-bodymap-legend .lvl {
  padding: 4px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border-subtle);
}
.dchk-bodymap-legend .lvl-0 { color: var(--cima-grey); }
.dchk-bodymap-legend .lvl-1 { color: var(--risk-3); border-color: var(--risk-3); }
.dchk-bodymap-legend .lvl-2 { color: var(--risk-trend); border-color: var(--risk-trend); }
.dchk-bodymap-legend .lvl-3 { color: var(--risk-4); border-color: var(--risk-4); }

/* =====================================================================
 * Physical assessment — Discomfort body map (V2 — canon check-in)
 *
 * Reemplaza la lista de filas de botones (V1) por una silueta tappable
 * con cycle 0→2→4→7→10. Mismo patrón que checkin daily body-map pero
 * con 5 niveles (V1 incluía 'Insoportable').
 * ===================================================================== */
.phys-discomfort-bodymap-stage {
  padding: 14px 4px 4px;
}
.phys-discomfort-bodymap-wrap {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 10px 6px;
  margin: 14px 0 10px;
}
.phys-disc-bodymap {
  width: 100%;
  height: auto;
  max-width: 360px;
  max-height: 540px;
  display: block;
  margin: 0 auto;
}
.phys-disc-zone {
  cursor: pointer;
  transition: fill 0.18s ease, stroke 0.18s ease, stroke-width 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.phys-disc-zone:hover { opacity: 0.92; }
.phys-disc-zone:active { transform: scale(0.96); transform-origin: center; }

/* Niveles 0-4 (cycle por tap) — paleta canon de riesgo */
.phys-disc-zone.phys-disc-lvl-0 { fill: rgba(171, 180, 181, 0.18); stroke: var(--risk-0, #abb4b5); stroke-width: 1; }
.phys-disc-zone.phys-disc-lvl-1 { fill: rgba(253, 203, 0, 0.45);   stroke: var(--risk-3, #fdcb00); stroke-width: 2; }
.phys-disc-zone.phys-disc-lvl-2 { fill: rgba(253, 130, 0, 0.55);   stroke: #fd8200;                stroke-width: 2.4; }
.phys-disc-zone.phys-disc-lvl-3 { fill: rgba(221, 14, 91, 0.65);   stroke: var(--risk-trend, #dd0e5b); stroke-width: 2.6; }
.phys-disc-zone.phys-disc-lvl-4 { fill: rgba(165, 0, 30, 0.85);    stroke: var(--risk-4, #a5001e);  stroke-width: 3; }

/* Leyenda 5 niveles */
.phys-discomfort-bodymap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 12px;
}
.phys-disc-lvl-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1.5px solid transparent;
  background: #fff;
}
.phys-disc-lvl-pill-0 { color: var(--cima-grey, #6e7a9b); border-color: rgba(171, 180, 181, 0.4); }
.phys-disc-lvl-pill-1 { color: #7a5800;         border-color: var(--risk-3, #fdcb00); }
.phys-disc-lvl-pill-2 { color: #8c3f00;         border-color: #fd8200; }
.phys-disc-lvl-pill-3 { color: #7a1f1f;         border-color: var(--risk-trend, #dd0e5b); }
.phys-disc-lvl-pill-4 { color: #ffffff;         background: var(--risk-4, #a5001e); border-color: var(--risk-4, #a5001e); }

/* Counter de zonas con molestia */
.phys-discomfort-counter {
  text-align: center;
  font-size: 13px;
  color: var(--cima-grey, #6e7a9b);
  margin: 8px 0 0;
}
.phys-discomfort-counter #phys-disc-counter-num {
  font-weight: 700;
  font-size: 16px;
  color: var(--cima-ink, #2e3b5e);
}

/* Mobile — silueta más compacta para iPhone SE 320px */
@media (max-width: 380px) {
  .phys-disc-bodymap { max-height: 460px; }
  .phys-discomfort-bodymap-legend .phys-disc-lvl-pill { font-size: 10.5px; padding: 3px 8px; }
}

/* ---- Voice ---- */
.dchk-voice-card {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  margin-bottom: 18px;
}
.dchk-voice-status {
  font-size: 13px;
  color: var(--cima-grey);
  line-height: 1.45;
  margin-bottom: 14px;
}
.dchk-voice-status strong { color: var(--cima-ink); }
.dchk-voice-status em { color: var(--cima-blue); font-style: normal; font-weight: 600; }
.dchk-voice-meter {
  width: 100%;
  height: 14px;
  background: #fff;
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--border-subtle);
}
.dchk-voice-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cima-blue), var(--cima-blue-light));
  transition: width 0.08s linear;
}
.dchk-voice-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.dchk-voice-controls .btn { width: 100%; max-width: 280px; }
/* Estado "grabando" — pulso visual + color risk-4 */
.dchk-voice-controls #voice-record-btn.is-recording {
  background: var(--risk-4);
  border-color: var(--risk-4);
  animation: dchk-rec-pulse 1s ease-in-out infinite;
}
@keyframes dchk-rec-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(221,33,61,0.4); }
  50%      { box-shadow: 0 0 0 10px rgba(221,33,61,0); }
}
.dchk-voice-result {
  margin-top: 12px;
  font-size: 12px;
  color: var(--cima-green, #2a8c4d);
  font-weight: 600;
}

/* ---- Context chips ---- */
.dchk-context-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.dchk-context-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #fff;
  border: 1.5px solid var(--border-subtle);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cima-ink);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s var(--ease-out);
}
.dchk-context-pill:hover { border-color: var(--cima-blue); }
.dchk-context-pill.active {
  background: var(--cima-blue-50);
  border-color: var(--cima-blue);
  color: var(--cima-ink);
}
.dchk-context-emoji {
  font-size: 18px;
  line-height: 1;
}
.dchk-context-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cima-grey);
  flex-shrink: 0;
}
.dchk-context-pill.active .dchk-context-icon { color: var(--cima-blue); }
.dchk-context-pill:hover .dchk-context-icon { color: var(--cima-blue); }
.ichk-multi-chip.active .dchk-context-icon { color: #fff; }
.dchk-textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  font-family: var(--font-sans);
  resize: vertical;
  min-height: 70px;
  margin-bottom: 12px;
}
.dchk-textarea:focus { border-color: var(--cima-blue); outline: 2px solid var(--cima-blue-50); }

/* ---- Step nav (back + next) ---- */
.dchk-step-nav {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.dchk-step-nav .btn { flex: 1; }
.dchk-step-nav .dchk-back { flex: 0 0 auto; min-width: 80px; }

/* ---- Loading overlay ---- */
.dchk-loading {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.dchk-loading.hidden { display: none; }
.dchk-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--cima-blue-50);
  border-top-color: var(--cima-blue);
  border-radius: 50%;
  animation: dchk-spin 0.7s linear infinite;
}
@keyframes dchk-spin { to { transform: rotate(360deg); } }

/* Utility */
.daily-checkin .hidden { display: none !important; }

/* ---- Mobile portrait optimizations ---- */
@media (max-width: 480px) {
  .daily-checkin { padding: 12px 12px 80px; }
  .dchk-question { font-size: 19px; }
  .dchk-step { padding: 18px 16px; }
  .dchk-bodymap { max-height: 380px; }
  .dchk-context-options { grid-template-columns: repeat(2, 1fr); }
}

/* =====================================================================
 * INTERMEDIATE CHECK-IN (Sprint 2 / Fase 2) — 5-7 min
 * Reusa estructura visual del daily, agrega Likert buttons + dim rotada
 * ===================================================================== */
.intermediate-checkin .dchk-step { padding-bottom: 20px; }

/* Header pill (dimensión rotada hoy) */
.ichk-header-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}
.ichk-header-pill strong { font-weight: 800; }

/* Step eyebrow (categoría del paso) */
.ichk-step-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--cima-blue);
  margin-bottom: 8px;
}

/* Lista de pasos en el intro */
.ichk-intro-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ichk-intro-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--cima-ink);
}
.ichk-intro-num {
  display: inline-flex;
  width: 26px; height: 26px;
  background: var(--cima-blue);
  color: #fff;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Question block */
.ichk-question-block {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--border-subtle);
}
.ichk-question-block:last-child {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}
.ichk-q-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--cima-ink);
  margin-bottom: 12px;
  line-height: 1.4;
}
.ichk-q-label-mini {
  font-size: 13px;
  font-weight: 600;
  color: var(--cima-ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Likert button scales */
.ichk-scale {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ichk-scale-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border: 1.5px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.12s var(--ease-out);
  color: var(--cima-ink);
}
.ichk-scale-btn:hover {
  border-color: var(--cima-blue);
  background: var(--cima-blue-50);
}
.ichk-scale-btn.active {
  background: var(--cima-blue);
  border-color: var(--cima-blue);
  color: #fff;
}
.ichk-scale-num {
  display: inline-flex;
  width: 28px; height: 28px;
  background: var(--gray-100);
  color: var(--cima-grey);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.ichk-scale-btn.active .ichk-scale-num {
  background: rgba(255,255,255,0.25);
  color: #fff;
}
.ichk-scale-label { font-weight: 500; }

/* Compact (WHO-5: muchos botones por bloque) */
.ichk-scale-btn-compact {
  padding: 8px 12px;
  font-size: 12px;
}
.ichk-scale-btn-compact .ichk-scale-num {
  width: 24px; height: 24px; font-size: 11px;
}

/* PANAS-10 style: rows compactas con botones tiny */
.ichk-rotated-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}
.ichk-rotated-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  margin: 0;
}
.ichk-scale-mini {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.ichk-scale-btn-tiny {
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ichk-pole-tag {
  display: inline-flex;
  width: 20px; height: 20px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
.ichk-pole-pos { background: rgba(34,197,94,0.15); color: #16a34a; }
.ichk-pole-neg { background: rgba(239,68,68,0.15); color: #dc2626; }

/* Select dropdown styling */
.ichk-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%235A6072' d='M6 8L0 0h12L6 8z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  text-align: left;
  font-size: 14px;
}

/* Multi-chips (events_recent) — toggle múltiple */
.ichk-multi-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 6px;
}
.ichk-multi-chip {
  font-size: 12px;
  padding: 10px 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.ichk-multi-chip.active {
  background: var(--cima-blue);
  border-color: var(--cima-blue);
  color: #fff;
}

@media (max-width: 480px) {
  .ichk-scale-btn { font-size: 12px; padding: 9px 12px; }
  .ichk-scale-btn-compact { font-size: 11px; padding: 7px 10px; }
  .ichk-scale-btn-tiny { min-height: 34px; font-size: 12px; padding: 6px 2px; }
  .ichk-multi-chips { grid-template-columns: 1fr 1fr; }
}

/* =====================================================================
 * ADMIN MODULE (Sprint C-1) — Cockpit interno PAW.
 * Para: /admin/* (módulo administración del staff PAW).
 * Usa paleta CIMA canónica (--cima-*).
 * ===================================================================== */
.admin-container {
  padding: 20px 0 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.admin-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--cima-blue);
  margin-bottom: 4px;
}
.admin-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--cima-ink);
  letter-spacing: -0.3px;
}
.admin-subtitle {
  font-size: 13px;
  color: var(--cima-grey);
  margin: 0;
}

/* ---- Nav admin (sidebar horizontal) ---- */
.admin-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
  padding-bottom: 0;
}
.admin-nav-link {
  display: inline-block;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cima-grey);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.admin-nav-link:hover {
  color: var(--cima-ink);
  text-decoration: none;
}
.admin-nav-link.is-active {
  color: var(--cima-ink);
  border-bottom-color: var(--cima-blue);
}

/* ---- Sección genérica ---- */
.admin-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--cima-ink);
  margin: 24px 0 12px;
  letter-spacing: -0.2px;
}

/* ---- Stats grid (dashboard) ---- */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.admin-stat {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--cima-blue);
}
.admin-stat-num {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: var(--cima-ink);
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.admin-stat-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--cima-ink-soft, var(--cima-ink));
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.admin-stat-sub {
  font-size: 11px;
  color: var(--cima-grey);
  margin-top: 4px;
}

/* ---- Quick actions tiles ---- */
.admin-quick-actions {
  margin-top: 8px;
}
.admin-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.admin-action-tile {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--cima-ink);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  box-shadow: var(--shadow-sm);
  display: block;
}
.admin-action-tile:hover {
  border-color: var(--cima-blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  text-decoration: none;
}
.admin-action-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--cima-ink);
  margin-bottom: 4px;
}
.admin-action-sub {
  font-size: 12px;
  color: var(--cima-grey);
  line-height: 1.35;
}

/* ---- Tabla admin ---- */
.admin-table-wrap {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: auto;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 600px;
}
.admin-table thead th {
  background: var(--cima-ink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}
.admin-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
}
.admin-table tbody tr:last-child { border-bottom: 0; }
.admin-table tbody tr:hover { background: var(--cima-blue-50); }
.admin-table tbody td {
  padding: 10px 12px;
  vertical-align: middle;
  color: var(--cima-ink);
}
.admin-table tbody td code {
  background: #f1f3f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--cima-ink-soft, var(--cima-ink));
  font-family: ui-monospace, SFMono-Regular, monospace;
}
.admin-table tbody td small {
  color: var(--cima-grey);
  font-size: 11px;
}
/* Columnas numéricas (admin individuos: conteos de evaluaciones/check-ins) */
.admin-table th.num,
.admin-table td.num {
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.admin-table--individuos td.num strong { font-weight: 700; }
.admin-table tbody tr.is-inactive {
  opacity: 0.55;
  background: #fafafa;
}
.admin-table tbody tr.is-inactive td { color: var(--cima-grey); }
.admin-table-footnote {
  margin-top: 10px;
  font-size: 11px;
  color: var(--cima-grey);
  font-style: italic;
}

/* ---- Señales diarias empresa (B12+B13) ---- */
.emp-daily-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.emp-daily-tile {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  border-top: 3px solid var(--accent, var(--cima-blue));
  box-shadow: var(--shadow-sm);
}
.emp-daily-tile-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--cima-grey);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.emp-daily-tile-val {
  font-size: 32px;
  font-weight: 800;
  color: var(--cima-ink);
  line-height: 1;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.emp-daily-tile-val small {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.55;
  margin-left: 2px;
}
.emp-daily-tile-sub {
  font-size: 11px;
  color: var(--cima-grey);
  margin-top: 4px;
  margin-bottom: 10px;
}
.emp-daily-spark {
  width: 100%;
  height: 44px;
  margin-top: 6px;
}
.emp-daily-cohort-table-wrap {
  margin-top: 18px;
}
.emp-daily-cohort-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--cima-ink);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 0 0 10px;
}
.emp-daily-cohort-table { border-radius: var(--radius-md); }

@media (max-width: 720px) {
  .emp-daily-grid { grid-template-columns: 1fr; }
}

/* ---- Alertas individuales del cockpit asesor (B6) ---- */
.asesor-individual-alerts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.asesor-individual-alert {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid #c87b00;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.asesor-individual-alert--high      { border-left-color: #dd213d; }
.asesor-individual-alert--attention { border-left-color: #c87b00; }
.asesor-individual-alert--info      { border-left-color: var(--cima-blue); }

.asesor-individual-alert-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(200, 123, 0, 0.12);
  color: #c87b00;
}
.asesor-individual-alert--high .asesor-individual-alert-icon { background: rgba(221, 33, 61, 0.12); color: #dd213d; }
.asesor-individual-alert--info .asesor-individual-alert-icon { background: var(--cima-blue-50); color: var(--cima-blue); }

.asesor-individual-alert-type {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--cima-ink);
  margin-bottom: 4px;
}
.asesor-individual-alert-sev {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 999px;
}
.asesor-individual-alert-sev.sev-high      { background: rgba(221,33,61,0.14);  color: #dd213d; }
.asesor-individual-alert-sev.sev-attention { background: rgba(200,123,0,0.16);  color: #c87b00; }
.asesor-individual-alert-sev.sev-info      { background: var(--cima-blue-50);   color: var(--cima-blue); }

.asesor-individual-alert-desc {
  font-size: 13px;
  color: var(--cima-ink-soft, var(--cima-ink));
  line-height: 1.5;
  margin-bottom: 4px;
}
.asesor-individual-alert-meta {
  font-size: 11px;
  color: var(--cima-grey);
  font-style: italic;
}

/* ---- Admin: replace contact form (P3 reemplazo HR) ---- */
.admin-replace-outgoing {
  background: #faf7f1;
  border-left: 3px solid #c87b00;
}
.admin-replace-outgoing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.admin-replace-outgoing-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--cima-grey);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 3px;
}
.admin-replace-outgoing-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--cima-ink);
}
.admin-replace-warning {
  background: var(--cima-blue-50);
  border-left: 3px solid var(--cima-blue);
  padding: 12px 16px;
  margin: 18px 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 13px;
  color: var(--cima-ink);
}

/* ---- Next-step card (acción pendiente prominente) ----
   Aparece solo cuando hay un siguiente paso accionable que el usuario aún
   no completó. Una vez completado, desaparece. NO es una notificación
   permanente — es un onboarding suave. */
.next-step-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  margin: 0 0 18px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--cima-blue);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--cima-ink);
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}

/* =====================================================================
 * B5 — Push notifications opt-in card (bottom of dashboard).
 * Pregunta tipo Sí/No con dos botones, persistente al final del panel
 * para que el usuario pueda cambiar su decisión en cualquier momento.
 * ===================================================================== */
.cima-push-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 20px;
  border-left: 3px solid var(--cima-blue, #2C8FE8);
  position: relative;
}
.cima-push-card-icon {
  flex-shrink: 0;
  color: var(--cima-blue, #2C8FE8);
  width: 48px;
  height: 48px;
  background: var(--paw-navy-50, rgba(44,143,232,0.08));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cima-push-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--cima-ink, #2e3b5e);
  margin: 0 0 6px;
  line-height: 1.35;
}
.cima-push-card-msg {
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-secondary, #4a5568);
  margin: 0 0 12px;
}
.cima-push-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cima-push-card-actions .btn {
  flex: 0 0 auto;
}
.cima-push-status {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--gray-50, #f5f7fa);
  color: var(--fg-secondary, #4a5568);
  border-left: 3px solid var(--cima-blue, #2C8FE8);
}
.cima-push-status-ok {
  background: rgba(42,140,77,0.10);
  color: #1f5b32;
  border-left-color: #2a8c4d;
}
.cima-push-ios-steps {
  margin: 8px 0 0;
  padding-left: 22px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--fg-secondary, #4a5568);
}
.cima-push-ios-steps li {
  margin-bottom: 6px;
}
@media (max-width: 480px) {
  .cima-push-card { padding: 18px 16px; }
  .cima-push-card-actions .btn { flex: 1 1 100%; }
}

/* Highlight pulsante para primera visita (3 pulsos suaves, ~2.4s total) */
.cima-push-card-highlight {
  animation: cima-push-pulse 0.8s ease-out 3;
}
@keyframes cima-push-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(44, 143, 232, 0.45); }
  100% { box-shadow: 0 0 0 12px rgba(44, 143, 232, 0);  }
}
.next-step-card:hover {
  background: var(--cima-blue-50);
  border-color: var(--cima-blue);
  text-decoration: none;
  color: var(--cima-ink);
}
.next-step-card-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--cima-blue-50);
  color: var(--cima-blue);
  flex-shrink: 0;
}
.next-step-card-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--cima-blue);
  margin-bottom: 3px;
}
.next-step-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--cima-ink);
  margin-bottom: 3px;
}
.next-step-card-msg {
  font-size: 13px;
  color: var(--cima-grey);
  line-height: 1.4;
}
.next-step-card-cta {
  color: var(--cima-blue);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .next-step-card { grid-template-columns: 40px 1fr; padding: 14px 16px; }
  .next-step-card-icon { width: 40px; height: 40px; }
  .next-step-card-cta { display: none; }
}

/* ---- Profile security questions ---- */
.profile-security-card { padding: 32px; max-width: 640px; margin: 24px auto; }
.profile-security-head { margin-bottom: 24px; }
.profile-security-title {
  font-size: 24px; font-weight: 700; color: var(--cima-ink);
  margin: 0 0 10px; letter-spacing: -0.4px;
}
.profile-security-lead {
  font-size: 14px; color: var(--cima-grey); line-height: 1.5; margin: 0;
}
.profile-security-status {
  display: flex; align-items: center; gap: 10px;
  background: rgba(42,140,77,0.10); color: #2a8c4d;
  border-radius: var(--radius-md); padding: 10px 14px;
  font-size: 13px; font-weight: 600;
  margin-bottom: 18px;
}
.profile-security-form .field { margin-bottom: 14px; }
.profile-security-fieldset {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 0 0 18px;
}
.profile-security-fieldset legend {
  font-size: 12px; font-weight: 700;
  color: var(--cima-blue);
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 0 8px;
}
.profile-security-actions {
  display: flex; gap: 10px; margin-top: 18px;
}
.profile-security-note {
  margin-top: 24px;
  padding: 14px 18px;
  background: var(--cima-blue-50);
  border-left: 3px solid var(--cima-blue);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 12px; line-height: 1.5;
  color: var(--cima-ink-soft, var(--cima-ink));
}
.profile-security-note strong { color: var(--cima-ink); }
.profile-security-note--warn {
  background: #fff8f0;
  border-left-color: #c87b00;
}

/* Estado bloqueado (ya configurado) */
.profile-security-locked-info {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  background: rgba(42, 140, 77, 0.08);
  border: 1px solid rgba(42, 140, 77, 0.20);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 22px;
}
.profile-security-locked-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(42, 140, 77, 0.15);
  color: #2a8c4d;
}
.profile-security-locked-info strong {
  display: block;
  color: var(--cima-ink);
  font-size: 14px;
  margin-bottom: 4px;
}
.profile-security-locked-info p {
  font-size: 13px; color: var(--cima-grey);
  line-height: 1.5; margin: 0;
}

.profile-security-readonly {
  display: flex; flex-direction: column; gap: 14px;
  margin-bottom: 22px;
}
.profile-security-readonly-item {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}
.profile-security-readonly-item:last-child { border-bottom: 0; }
.profile-security-readonly-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--cima-grey);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.profile-security-readonly-val {
  font-size: 15px;
  color: var(--cima-ink);
  font-weight: 500;
}
.profile-security-readonly-muted {
  color: var(--cima-grey);
  font-style: italic;
  font-family: monospace;
  font-size: 13px;
}

/* Warning banner del modo creación */
.profile-security-warning-banner {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  background: #fff8f0;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 22px;
}
.profile-security-warning-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(200, 123, 0, 0.15);
  color: #c87b00;
}
.profile-security-warning-banner strong {
  display: block;
  color: var(--cima-ink);
  font-size: 14px;
  margin-bottom: 3px;
}
.profile-security-warning-banner div:last-child {
  font-size: 13px;
  color: var(--cima-ink-soft, var(--cima-ink));
  line-height: 1.5;
}

/* Confirmación obligatoria (checkbox final) */
.profile-security-confirm {
  background: #f0f3fa;
  border: 2px dashed var(--cima-blue);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 18px 0;
}
.profile-security-confirm-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-weight: normal;
  font-size: 14px;
  color: var(--cima-ink);
  line-height: 1.45;
}
.profile-security-confirm-label input[type="checkbox"] {
  margin-top: 3px;
  width: 18px; height: 18px;
  flex-shrink: 0;
}

/* ---- Empresa Compliance hub (D2 — pack SG-SST exportable) ---- */
.empresa-compliance { padding: 24px 0 60px; }
.empresa-compliance-head { margin-bottom: 24px; }
.empresa-compliance-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--cima-blue); margin-bottom: 6px;
}
.empresa-compliance-title {
  font-size: 28px; font-weight: 800; color: var(--cima-ink);
  margin: 0 0 8px; letter-spacing: -0.5px;
}
.empresa-compliance-lead {
  font-size: 14px; color: var(--cima-grey); line-height: 1.55; margin: 0;
}

.empresa-compliance-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.empresa-compliance-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  border-left: 3px solid var(--cima-blue);
  box-shadow: var(--shadow-sm);
}
.empresa-compliance-card-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--cima-blue-50);
  color: var(--cima-blue);
}
.empresa-compliance-card-body { grid-column: 2; }
.empresa-compliance-card-body h3 {
  font-size: 15px; font-weight: 700; color: var(--cima-ink); margin: 0 0 6px;
}
.empresa-compliance-card-body p {
  font-size: 13px; color: var(--cima-grey); line-height: 1.5; margin: 0 0 8px;
}
.empresa-compliance-card-body small {
  font-size: 11px; color: var(--cima-grey); font-style: italic;
}
.empresa-compliance-card-action {
  grid-column: 2; margin-top: 8px;
}

/* ---- Auth: recuperación de correo + landing OTP narrow ---- */
.auth-narrow {
  max-width: 480px;
  margin: 32px auto;
  padding: 0 16px;
}
.auth-card {
  padding: 32px 32px;
}
.auth-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--cima-blue);
}
.auth-h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--cima-ink);
  margin: 0 0 12px;
  text-align: center;
  letter-spacing: -0.4px;
}
.auth-lead {
  font-size: 14px;
  color: var(--cima-grey);
  line-height: 1.5;
  margin: 0 0 24px;
  text-align: center;
}
.auth-form .field { margin-bottom: 18px; }
.auth-form .field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--cima-ink);
  margin-bottom: 6px;
}
.auth-form .field small {
  display: block;
  font-size: 11px;
  color: var(--cima-grey);
  margin-top: 4px;
  font-style: italic;
}
.auth-recovery-hint {
  background: var(--cima-blue-50);
  border: 1px solid #cce0f4;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin: 18px 0 24px;
  text-align: center;
}
.auth-recovery-hint-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--cima-grey);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.auth-recovery-hint-val {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--cima-ink);
  letter-spacing: 0.3px;
}
.auth-secondary-link {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
}
.auth-secondary-link a {
  color: var(--cima-grey);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.auth-secondary-link a:hover { color: var(--cima-blue); text-decoration: none; }

/* ---- Welcome-back card (D5: post streak roto, compasivo) ---- */
.welcome-back-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  margin-bottom: 18px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--cima-blue-light);
  border-radius: var(--radius-md);
}
.welcome-back-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--cima-blue-50);
  color: var(--cima-blue);
}
.welcome-back-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--cima-ink);
  margin-bottom: 2px;
}
.welcome-back-msg {
  font-size: 13px;
  color: var(--cima-ink-soft, var(--cima-ink));
  line-height: 1.45;
}

/* Badges de onboarding stage */
.admin-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.admin-badge--good    { background: rgba(42, 140, 77, 0.14);  color: #2a8c4d; }
.admin-badge--neutral { background: rgba(67, 201, 243, 0.18); color: #1a6b8a; }
.admin-badge--warn    { background: rgba(252, 203, 0, 0.20);  color: #c87b00; }

/* ---- Form admin ---- */
.admin-form-card {
  margin-bottom: 24px;
  padding: 20px 22px;
}
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px 18px;
  margin-bottom: 18px;
}
.admin-form-row {
  display: flex;
  flex-direction: column;
}
.admin-form-row label {
  font-size: 12px;
  font-weight: 600;
  color: var(--cima-ink);
  margin-bottom: 4px;
  letter-spacing: 0.2px;
}
.admin-form-row input[type="text"],
.admin-form-row input[type="email"],
.admin-form-row select {
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--cima-ink);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.admin-form-row input:focus,
.admin-form-row select:focus {
  outline: none;
  border-color: var(--cima-blue);
  box-shadow: 0 0 0 3px rgba(44, 143, 232, 0.15);
}
.admin-form-row small {
  font-size: 11px;
  color: var(--cima-grey);
  margin-top: 4px;
  font-style: italic;
}
.admin-form-row input[type="checkbox"] {
  margin-right: 6px;
  vertical-align: middle;
}
.admin-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 14px;
}

/* ---- Empty + flash ---- */
.admin-empty {
  background: #fff;
  border: 1px dashed var(--border-default, var(--border-subtle));
  border-radius: var(--radius-lg);
  padding: 24px;
  color: var(--cima-grey);
  font-size: 14px;
  text-align: center;
}
.admin-empty a { color: var(--cima-blue); font-weight: 600; }
.admin-flash {
  background: var(--cima-blue-50);
  border-left: 3px solid var(--cima-blue);
  color: var(--cima-ink);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  font-size: 13px;
  line-height: 1.4;
}
.admin-flash--error {
  background: #fdeaec;
  border-left-color: #dd213d;
  color: #7a0e1e;
}

/* =====================================================================
 * ASESOR MODULE (Sprint C-1) — Cockpit del asesor SST.
 * ===================================================================== */
.asesor-container {
  padding: 20px 0 60px;
  max-width: 1100px;
  margin: 0 auto;
}
.asesor-header {
  margin-bottom: 24px;
}
.asesor-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--cima-blue);
  margin-bottom: 4px;
}
.asesor-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--cima-ink);
  letter-spacing: -0.3px;
}
.asesor-subtitle {
  font-size: 13px;
  color: var(--cima-grey);
  margin: 0;
}
.asesor-section {
  margin-bottom: 32px;
}
.asesor-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--cima-ink);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.asesor-section-title-sm {
  font-size: 14px;
  font-weight: 700;
  color: var(--cima-ink);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.asesor-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  background: var(--cima-blue);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

/* ---- Tenants grid ---- */
.asesor-tenants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.asesor-tenant-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--cima-blue);
  display: flex;
  flex-direction: column;
}
.asesor-tenant-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--cima-ink);
  margin-bottom: 6px;
}
.asesor-tenant-meta {
  font-size: 12px;
  color: var(--cima-ink-soft, var(--cima-ink));
  margin-bottom: 4px;
}
.asesor-tenant-meta-sm {
  font-size: 11px;
  color: var(--cima-grey);
  margin-bottom: 10px;
}
.asesor-tenant-actions {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
}
.asesor-tenant-coming-soon {
  font-size: 11px;
  color: var(--cima-grey);
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ---- Empty asesor ---- */
.asesor-empty {
  background: #fff;
  border: 1px dashed var(--border-default, var(--border-subtle));
  border-radius: var(--radius-lg);
  padding: 22px;
  color: var(--cima-grey);
  font-size: 14px;
  line-height: 1.5;
}

/* ---- Roadmap ---- */
.asesor-roadmap {
  background: var(--cima-blue-50);
  border-left: 3px solid var(--cima-blue);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-top: 24px;
}
.asesor-roadmap-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: var(--cima-ink);
  line-height: 1.6;
}
.asesor-roadmap-list li { margin-bottom: 4px; }

/* =====================================================================
 * COCKPIT ASESOR V2 (Sprint C-2 Fase A · 2026-04-27)
 * Enriquece las cards de tenant con KPIs reales + warnings + drill-down.
 * Reusa convenciones de empresa-dashboard (--cima-*, sin emojis).
 * ===================================================================== */

/* Header con totales globales del asesor */
.asesor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.asesor-totals {
  display: flex;
  gap: 16px;
}
.asesor-total-stat {
  text-align: center;
  min-width: 80px;
}
.asesor-total-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--cima-ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}
.asesor-total-stat.is-alert .asesor-total-num { color: #dd213d; }
.asesor-total-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--cima-grey);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.asesor-section-hint {
  font-size: 11px;
  font-weight: 500;
  color: var(--cima-grey);
  margin-left: 8px;
  text-transform: none;
  letter-spacing: 0.2px;
  font-style: italic;
}

/* Tenant card enriquecido (V2) */
.asesor-tenant-card.is-urgent {
  border-top-color: #dd213d;
}
.asesor-tenant-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.asesor-urgent-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(221, 33, 61, 0.10);
  color: #dd213d;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}
.asesor-urgent-badge--lg {
  padding: 6px 12px;
  font-size: 13px;
}

/* KPI grid dentro de cada tenant card */
.asesor-tenant-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--cima-blue-50);
  border-radius: var(--radius-md);
}
.asesor-kpi {
  text-align: center;
  min-width: 0;
}
.asesor-kpi-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--cima-ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}
.asesor-kpi-num small { font-size: 11px; opacity: 0.55; margin-left: 1px; }
.asesor-kpi-num.is-muted { color: var(--cima-grey); }
.asesor-kpi-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--cima-grey);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 4px;
  line-height: 1.2;
}
.asesor-kpi-delta {
  font-size: 10px;
  font-weight: 700;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

/* Mini-pills de las 3 dimensiones (vista lista) */
.asesor-dim-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.asesor-dim-pill {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 6px;
  text-align: center;
}
.asesor-dim-pill-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--cima-grey);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.asesor-dim-pill-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--cima-ink);
  line-height: 1.1;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.asesor-dim-pill-val.is-muted { color: var(--cima-grey); }
.asesor-dim-pill-delta {
  font-size: 10px;
  font-weight: 600;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* Warnings inline en tenant card */
.asesor-tenant-warnings {
  background: #fff8f0;
  border-left: 3px solid #c87b00;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.asesor-tenant-warnings-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #c87b00;
  margin-bottom: 6px;
}
.asesor-warnings-list {
  margin: 0; padding-left: 16px;
  font-size: 12px;
  color: var(--cima-ink);
  line-height: 1.5;
}
.asesor-warning-delta {
  display: block;
  font-size: 11px;
  color: var(--cima-grey);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

/* =====================================================================
 * DRILL-DOWN COCKPIT POR TENANT (asesor.tenant.cockpit)
 * ===================================================================== */
.asesor-breadcrumb {
  margin-bottom: 14px;
}
.asesor-breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cima-grey);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.asesor-breadcrumb-link:hover { color: var(--cima-blue); text-decoration: none; }

.asesor-cockpit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.asesor-cockpit-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.asesor-kpi-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--cima-blue);
}
.asesor-kpi-card-num {
  font-size: 30px;
  font-weight: 700;
  color: var(--cima-ink);
  line-height: 1;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.asesor-kpi-card-num small { font-size: 13px; opacity: 0.55; margin-left: 2px; }
.asesor-kpi-card-num.is-muted { color: var(--cima-grey); }
.asesor-kpi-card-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--cima-ink);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 6px;
}
.asesor-kpi-card-sub {
  font-size: 11px;
  color: var(--cima-grey);
  margin-top: 3px;
}
.asesor-kpi-card-delta {
  font-size: 12px;
  font-weight: 700;
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
}

.asesor-dim-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.asesor-dim-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.asesor-dim-card-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.asesor-dim-card-title {
  font-size: 13px; font-weight: 700;
  color: var(--cima-ink);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.asesor-dim-card-n {
  font-size: 11px; color: var(--cima-grey);
  font-variant-numeric: tabular-nums;
}
.asesor-dim-card-score {
  font-size: 36px; font-weight: 700;
  line-height: 1; letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.asesor-dim-card-score small { font-size: 14px; opacity: 0.55; margin-left: 2px; }
.asesor-dim-card-delta {
  font-size: 12px; font-weight: 700;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.asesor-dim-card-spark { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border-subtle); }
.asesor-dim-card-spark canvas { width: 100%; height: 40px; }
.asesor-dim-card-spark-meta {
  font-size: 10px; color: var(--cima-grey);
  text-align: right; margin-top: 2px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.asesor-dim-card-empty {
  font-size: 12px; color: var(--cima-grey);
  font-style: italic;
  padding: 16px 0;
}

/* Cohort filter pills (asesor) */
.asesor-section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; margin-bottom: 14px; flex-wrap: wrap;
}
.asesor-section-sub {
  font-size: 12px; color: var(--cima-grey);
  margin: 4px 0 0;
}

/* =====================================================================
 * B6 — Asesor alerts (señales individuales por inactividad/dolor/etc.)
 * ===================================================================== */
.asesor-alerts-section {
  margin-bottom: 24px;
}
.asesor-alerts-list {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 12px;
}
.asesor-alert {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--cima-blue);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.asesor-alert-header {
  display: flex; align-items: center; gap: 10px;
  font-size: 11.5px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.asesor-alert-sev {
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.asesor-alert-tenant {
  font-weight: 600;
  color: var(--cima-ink, #2e3b5e);
}
.asesor-alert-date {
  margin-left: auto;
  color: var(--fg-muted);
}
.asesor-alert-title {
  font-size: 15px; font-weight: 700;
  color: var(--cima-ink, #2e3b5e);
  margin: 0 0 4px;
}
.asesor-alert-cohort {
  font-size: 12.5px;
  color: var(--fg-secondary, #4a5568);
  margin: 0 0 4px;
}
.asesor-alert-desc {
  font-size: 13px;
  color: var(--fg-secondary, #4a5568);
  margin: 0 0 8px;
  line-height: 1.5;
}
.asesor-alert-ctx {
  font-size: 12.5px;
  background: var(--gray-50, #f5f7fa);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin: 0 0 12px;
  color: var(--cima-ink);
}
.asesor-alert-actions {
  display: flex; flex-direction: column; gap: 8px;
}
.asesor-alert-note {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
}
.asesor-alert-buttons {
  display: flex; gap: 8px; flex-wrap: wrap;
}
@media (max-width: 480px) {
  .asesor-alert-buttons .btn { flex: 1 1 auto; }
}
.asesor-cohort-filter {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.asesor-cohort-pill {
  padding: 6px 12px;
  font-size: 12px; font-weight: 600;
  background: #fff;
  border: 1px solid var(--border-subtle);
  color: var(--cima-grey);
  border-radius: 999px;
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
}
.asesor-cohort-pill:hover {
  border-color: var(--cima-blue);
  color: var(--cima-blue);
  text-decoration: none;
}
.asesor-cohort-pill.is-active {
  background: var(--cima-ink);
  border-color: var(--cima-ink);
  color: #fff;
}

/* Heatmap asesor (mismo patrón que empresa) */
.asesor-heatmap-wrap {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: auto;
  box-shadow: var(--shadow-sm);
}
.asesor-heatmap {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 480px;
}
.asesor-heatmap thead th {
  background: var(--cima-ink);
  color: #fff;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 10px 14px;
  text-align: left;
}
.asesor-heatmap thead th:not(:first-child):not(:nth-child(2)) { text-align: center; }
.asesor-heatmap tbody tr { border-bottom: 1px solid var(--border-subtle); }
.asesor-heatmap tbody tr:last-child { border-bottom: 0; }
.asesor-heatmap tbody td { padding: 10px 14px; }
.asesor-heatmap-cohort { font-weight: 600; color: var(--cima-ink); }
.asesor-heatmap-n { font-size: 11px; color: var(--cima-grey); font-variant-numeric: tabular-nums; }
.asesor-heatmap-cell { text-align: center; font-variant-numeric: tabular-nums; }
.asesor-heatmap-val { font-weight: 700; font-size: 16px; }
.asesor-heatmap-val.is-muted { color: var(--cima-grey); font-weight: 500; }

/* Warnings detalladas (drill-down) */
.asesor-warnings-detailed {
  display: flex; flex-direction: column; gap: 10px;
}
.asesor-warning-card {
  display: grid; grid-template-columns: 36px 1fr;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid #c87b00;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.asesor-warning-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(200, 123, 0, 0.12);
  color: #c87b00;
}
.asesor-warning-title {
  font-size: 14px; font-weight: 600; color: var(--cima-ink);
  margin-bottom: 2px;
}
.asesor-warning-meta {
  font-size: 12px; color: var(--cima-grey);
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}
.asesor-warning-hint {
  font-size: 12px;
  color: var(--cima-ink-soft, var(--cima-ink));
  line-height: 1.4;
}
.asesor-warning-hint em { color: var(--cima-grey); }

.asesor-privacy-note {
  margin-top: 28px;
  padding: 12px 16px;
  background: var(--cima-blue-50);
  border-left: 3px solid var(--cima-blue);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 12px;
  color: var(--cima-ink-soft, var(--cima-ink));
  line-height: 1.5;
}
.asesor-privacy-note code {
  background: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  color: var(--cima-ink);
}

@media (max-width: 640px) {
  .admin-title, .asesor-title { font-size: 22px; }
  .admin-stat-num { font-size: 24px; }
  .admin-nav { gap: 0; }
  .admin-nav-link { padding: 8px 10px; font-size: 12px; }
  .admin-form-grid { grid-template-columns: 1fr; }
  .asesor-totals { gap: 10px; }
  .asesor-total-num { font-size: 22px; }
  .asesor-tenant-kpis { grid-template-columns: 1fr 1fr; }
  .asesor-tenant-kpis .asesor-kpi:nth-child(3) { grid-column: 1 / -1; }
  .asesor-dim-grid { grid-template-columns: 1fr; }
  .asesor-cockpit-head { flex-direction: column; }
}

/* =====================================================================
 * P2.1 (auditoría 2026-04-27) — Heatmap clickeable + n/celda + drill cohorte
 * ===================================================================== */

/* n/celda dentro del heatmap (empresa + asesor) */
.emp-heatmap-celln,
.asesor-heatmap-celln {
  display: block;
  font-size: 9px;
  font-weight: 500;
  color: var(--cima-grey);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
}

/* Filas clickeables del heatmap */
.emp-heatmap-row.is-clickable,
.asesor-heatmap-row.is-clickable {
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.emp-heatmap-row.is-clickable:hover,
.asesor-heatmap-row.is-clickable:hover {
  background: var(--cima-blue-50);
}
.emp-heatmap-row.is-clickable:focus-visible,
.asesor-heatmap-row.is-clickable:focus-visible {
  outline: 2px solid var(--cima-blue);
  outline-offset: -2px;
}
.emp-heatmap-cohort-link,
.asesor-heatmap-cohort-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.emp-heatmap-row.is-clickable:hover .emp-heatmap-cohort-link,
.asesor-heatmap-row.is-clickable:hover .asesor-heatmap-cohort-link {
  color: var(--cima-blue);
  border-bottom-color: var(--cima-blue);
  text-decoration: none;
}

/* =====================================================================
 * COHORT DETAIL PAGE (partial _cohort_detail.blade.php)
 * Compartido entre empresa/cohort-detail y asesor/cohort-detail
 * ===================================================================== */
.cohort-detail-page {
  padding: 20px 0 60px;
}

.cohort-detail-breadcrumb { margin-bottom: 14px; }
.cohort-detail-breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cima-grey);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.cohort-detail-breadcrumb-link:hover { color: var(--cima-blue); text-decoration: none; }

.cohort-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.cohort-detail-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--cima-blue);
  margin-bottom: 4px;
}
.cohort-detail-name {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--cima-ink);
  letter-spacing: -0.4px;
}
.cohort-detail-meta {
  font-size: 13px;
  color: var(--cima-grey);
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.cohort-detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(221, 33, 61, 0.10);
  color: #dd213d;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.cohort-detail-section { margin-bottom: 28px; }
.cohort-detail-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--cima-ink);
  margin: 0 0 14px;
  letter-spacing: -0.2px;
}

/* Grid de 3 dimensiones */
.cohort-detail-dim-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.cohort-detail-dim-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.cohort-detail-dim-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
}
.cohort-detail-dim-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--cima-ink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cohort-detail-dim-n {
  font-size: 11px;
  color: var(--cima-grey);
  font-variant-numeric: tabular-nums;
}
.cohort-detail-dim-score {
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.cohort-detail-dim-score small { font-size: 14px; opacity: 0.55; margin-left: 2px; }
.cohort-detail-dim-meta {
  font-size: 12px;
  color: var(--cima-grey);
  margin: 6px 0 12px;
  font-variant-numeric: tabular-nums;
}
.cohort-detail-dim-empty {
  font-size: 12px;
  color: var(--cima-grey);
  font-style: italic;
  padding: 18px 0;
}

/* Distribución barras horizontales */
.cohort-detail-dist {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.cohort-detail-dist-row {
  display: grid;
  grid-template-columns: 80px 1fr 24px;
  gap: 6px;
  align-items: center;
  font-size: 11px;
}
.cohort-detail-dist-label { font-weight: 600; }
.cohort-detail-dist-bar {
  background: #f1f3f5;
  height: 8px; border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.cohort-detail-dist-fill {
  display: block; height: 100%;
  border-radius: 4px;
  transition: width 0.3s var(--ease-out);
}
.cohort-detail-dist-count {
  text-align: right;
  font-weight: 600;
  color: var(--cima-grey);
  font-variant-numeric: tabular-nums;
}

/* Sparkline de la dimensión */
.cohort-detail-spark {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
}
.cohort-detail-spark canvas { width: 100%; height: 44px; }
.cohort-detail-spark-meta {
  font-size: 10px;
  color: var(--cima-grey);
  text-align: right;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Warnings de la cohorte */
.cohort-detail-warnings {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cohort-detail-warning {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid #c87b00;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.cohort-detail-warning-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(200, 123, 0, 0.12);
  color: #c87b00;
}
.cohort-detail-warning-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--cima-ink);
  margin-bottom: 2px;
}
.cohort-detail-warning-meta {
  font-size: 12px;
  color: var(--cima-grey);
  font-variant-numeric: tabular-nums;
}

/* Empty state cohorte privacy-protected */
.cohort-detail-empty {
  background: #fff;
  border: 1px dashed var(--border-default, var(--border-subtle));
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  color: var(--cima-grey);
}
.cohort-detail-empty strong {
  display: block;
  color: var(--cima-ink);
  margin-bottom: 6px;
  font-size: 16px;
}
.cohort-detail-empty p { margin: 0; font-size: 13px; line-height: 1.5; }

.cohort-detail-privacy {
  margin-top: 28px;
  padding: 12px 16px;
  background: var(--cima-blue-50);
  border-left: 3px solid var(--cima-blue);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 12px;
  color: var(--cima-ink-soft, var(--cima-ink));
  line-height: 1.5;
}

@media (max-width: 720px) {
  .cohort-detail-dim-grid { grid-template-columns: 1fr; }
  .cohort-detail-name { font-size: 24px; }
  .cohort-detail-dim-score { font-size: 32px; }
  .emp-heatmap-celln, .asesor-heatmap-celln { font-size: 8px; }
}

/* =====================================================================
 * MEMORIA MENSUAL CIMA (P2.2 — auditoría 2026-04-27)
 *
 * Estilo: "Spotify Wrapped sobrio".
 * Cards apiladas verticalmente, tipografía protagonista (60-80px),
 * paleta CIMA navy/blue/grey + 1 acento mauve para tono "compassion".
 * Sin emojis, sin confeti, sin animaciones excesivas. Mobile-first.
 *
 * Tonos:
 *   celebrate  → navy fuerte (--cima-ink), valor blanco
 *   observe    → blanco con borde navy
 *   compassion → mauve sobrio (#5b4675), valor blanco
 *   neutral    → fondo cream/cream-grey
 * ===================================================================== */

.memoria-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 80px;
  min-height: 100vh;
}

/* ---- Marca CIMA en cabecera ---- */
.memoria-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.memoria-brand-logo {
  height: 42px;
  width: auto;
  max-width: 220px;
  display: block;
}

/* ---- Nav superior ---- */
.memoria-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.memoria-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cima-grey);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.memoria-back:hover { color: var(--cima-blue); text-decoration: none; }

.memoria-nav-pager {
  display: flex;
  gap: 8px;
}
.memoria-pager-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  background: #fff;
  color: var(--cima-ink);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
}
.memoria-pager-btn:hover {
  border-color: var(--cima-blue);
  color: var(--cima-blue);
  text-decoration: none;
}

/* ---- Stack de cards ---- */
.memoria-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---- Card base ---- */
.memoria-card {
  position: relative;
  border-radius: 18px;
  padding: 36px 28px 32px;
  text-align: center;
  box-shadow: var(--shadow-md);
  /* Animación de entrada sutil — fade-in escalonado */
  opacity: 0;
  transform: translateY(8px);
  animation: memoriaFadeIn 0.55s var(--ease-out) forwards;
  animation-delay: calc(var(--card-index, 0) * 80ms);
}
@keyframes memoriaFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

.memoria-card-icon {
  display: inline-flex;
  width: 56px; height: 56px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 18px;
}

.memoria-card-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin-bottom: 14px;
  opacity: 0.85;
}

.memoria-card-title {
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 8px;
  opacity: 0.92;
}

/* Valor protagonista — el corazón visual de cada card */
.memoria-card-value {
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2.5px;
  margin: 6px 0 8px;
  font-variant-numeric: tabular-nums;
  /* fitting para textos largos como "13–19 marzo" */
  word-break: break-word;
}

.memoria-card-sub {
  font-size: 15px;
  font-weight: 500;
  margin-top: 4px;
  margin-bottom: 18px;
  opacity: 0.88;
  line-height: 1.4;
}

.memoria-card-context {
  font-size: 14px;
  line-height: 1.55;
  margin: 0 auto;
  max-width: 480px;
  opacity: 0.78;
  font-style: italic;
}

/* ---- TONO: celebrate (navy fuerte) ---- */
.memoria-tone-celebrate {
  background: linear-gradient(160deg, var(--cima-ink) 0%, var(--cima-ink-soft, #1a2340) 100%);
  color: #fff;
}
.memoria-tone-celebrate .memoria-card-icon {
  background: rgba(91, 163, 240, 0.18);
  color: var(--cima-blue-light);
}
.memoria-tone-celebrate .memoria-card-eyebrow { color: var(--cima-blue-light); }
.memoria-tone-celebrate .memoria-card-value   { color: #fff; }

/* ---- TONO: observe (blanco con borde navy) ---- */
.memoria-tone-observe {
  background: #fff;
  border: 1px solid var(--border-subtle);
  color: var(--cima-ink);
}
.memoria-tone-observe .memoria-card-icon {
  background: var(--cima-blue-50);
  color: var(--cima-blue);
}
.memoria-tone-observe .memoria-card-eyebrow { color: var(--cima-blue); }
.memoria-tone-observe .memoria-card-value   { color: var(--cima-ink); }

/* ---- TONO: compassion (mauve sobrio — distinto a navy pero no rojo) ---- */
.memoria-tone-compassion {
  background: linear-gradient(160deg, #4a3a64 0%, #5b4675 100%);
  color: #fff;
}
.memoria-tone-compassion .memoria-card-icon {
  background: rgba(255, 255, 255, 0.14);
  color: #d8c8e8;
}
.memoria-tone-compassion .memoria-card-eyebrow { color: #d8c8e8; }
.memoria-tone-compassion .memoria-card-value   { color: #fff; }

/* ---- TONO: neutral (cream para portada/cierre) ---- */
.memoria-tone-neutral {
  background: #faf7f1;
  border: 1px solid #ece6d8;
  color: var(--cima-ink);
}
.memoria-tone-neutral .memoria-card-icon {
  background: #fff;
  color: var(--cima-ink);
  border: 1px solid #ece6d8;
}
.memoria-tone-neutral .memoria-card-eyebrow { color: var(--cima-grey); }
.memoria-tone-neutral .memoria-card-value   { color: var(--cima-ink); }

/* ---- Variantes específicas por kind ---- */

/* Intro: el "value_main" es el nombre del usuario, no necesita ser tan grande */
.memoria-kind-intro .memoria-card-value {
  font-size: 38px;
  letter-spacing: -1px;
  margin-top: 12px;
}
.memoria-kind-intro .memoria-card-sub {
  font-size: 16px;
  opacity: 0.92;
  margin-top: 8px;
}

/* Best/gentle week: el rango "13–19 marzo" no necesita 72px */
.memoria-kind-best_week .memoria-card-value,
.memoria-kind-gentle_week .memoria-card-value {
  font-size: 44px;
  letter-spacing: -1px;
}

/* Top zone: la zona corporal en español tampoco */
.memoria-kind-top_zone .memoria-card-value {
  font-size: 36px;
  letter-spacing: -0.5px;
}

/* Outro: el mes siguiente, mediano */
.memoria-kind-outro .memoria-card-value {
  font-size: 36px;
  letter-spacing: -0.5px;
}

/* Adherencia: el % en grande pero las unidades no */
.memoria-kind-adherence .memoria-card-value { font-size: 84px; }

/* Mood vs prev: el "+0.8" en grande */
.memoria-kind-mood_vs_prev .memoria-card-value { font-size: 64px; }

/* ---- Empty state ---- */
.memoria-empty {
  text-align: center;
  padding: 40px 20px;
  background: #fff;
  border: 1px dashed var(--border-default, var(--border-subtle));
  border-radius: 18px;
  max-width: 520px;
  margin: 40px auto;
}
.memoria-empty-icon {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--cima-grey);
}
.memoria-empty-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--cima-blue);
  margin-bottom: 6px;
}
.memoria-empty-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--cima-ink);
  margin: 0 0 18px;
}
.memoria-empty-msg {
  font-size: 14px;
  line-height: 1.55;
  color: var(--cima-grey);
  margin: 0 0 24px;
}
.memoria-empty-cta {
  display: inline-block;
  padding: 10px 22px;
  background: var(--cima-ink);
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out);
}
.memoria-empty-cta:hover { background: var(--cima-blue); color: #fff; text-decoration: none; }

/* ---- Footer ---- */
.memoria-footer {
  margin-top: 32px;
  padding: 18px 14px;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}
.memoria-footer-mark {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--cima-grey);
  margin-bottom: 8px;
}
.memoria-footer-meta {
  font-size: 12px;
  color: var(--cima-grey);
  line-height: 1.5;
  max-width: 480px;
  margin: 0 auto;
  font-style: italic;
}

/* ---- Mobile ---- */
@media (max-width: 480px) {
  .memoria-page { padding: 12px 12px 60px; }
  .memoria-card { padding: 28px 20px 26px; border-radius: 14px; }
  .memoria-card-value { font-size: 56px; letter-spacing: -2px; }
  .memoria-kind-adherence .memoria-card-value { font-size: 64px; }
  .memoria-kind-mood_vs_prev .memoria-card-value { font-size: 52px; }
  .memoria-kind-best_week .memoria-card-value,
  .memoria-kind-gentle_week .memoria-card-value,
  .memoria-kind-top_zone .memoria-card-value,
  .memoria-kind-outro .memoria-card-value { font-size: 32px; }
  .memoria-kind-intro .memoria-card-value { font-size: 30px; }
  .memoria-card-icon { width: 48px; height: 48px; margin-bottom: 14px; }
  .memoria-card-eyebrow { font-size: 11px; }
  .memoria-empty-title { font-size: 26px; }
  .memoria-nav { margin-bottom: 24px; }
  .memoria-pager-btn { padding: 6px 12px; font-size: 12px; }
}

/* Respetar reduced-motion: desactiva la animación de entrada */
@media (prefers-reduced-motion: reduce) {
  .memoria-card {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ---- Banner en el dashboard (link a la memoria mensual) ---- */
.memoria-banner {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, var(--cima-ink) 0%, var(--cima-ink-soft, #1a2340) 60%, var(--cima-blue) 200%);
  color: #fff;
  border-radius: var(--radius-lg);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.memoria-banner:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(26, 35, 64, 0.18), 0 4px 8px rgba(26, 35, 64, 0.10);
  text-decoration: none;
  color: #fff;
}
.memoria-banner-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(91, 163, 240, 0.18);
  color: var(--cima-blue-light);
  flex-shrink: 0;
}
.memoria-banner-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--cima-blue-light);
  margin-bottom: 3px;
}
.memoria-banner-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}
.memoria-banner-sub {
  font-size: 13px;
  opacity: 0.82;
  line-height: 1.35;
}
.memoria-banner-arrow {
  display: flex;
  align-items: center;
  color: var(--cima-blue-light);
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .memoria-banner { grid-template-columns: 44px 1fr; padding: 14px 16px; gap: 12px; }
  .memoria-banner-icon { width: 44px; height: 44px; }
  .memoria-banner-arrow { display: none; }
  .memoria-banner-title { font-size: 16px; }
}

/* =====================================================================
 * LANDING — secciones nuevas: Mati, Steps, Tiers (pricing sutil)
 * Añadido 2026-05-04 · sin tocar bloques existentes
 * ===================================================================== */

/* ---- Eyebrow (etiqueta sobre títulos) ---- */
.landing-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--cima-blue-light);
  margin-bottom: 14px;
}

/* ---- Sección Mati ---- */
.landing-mati {
  position: relative;
  background: linear-gradient(135deg, #0a0e26 0%, var(--cima-ink) 55%, #1c2d5e 130%);
  border-radius: var(--radius-2xl);
  padding: 64px 56px;
  margin: 32px 0;
  overflow: hidden;
}
.landing-mati::before {
  content: "";
  position: absolute;
  top: -20%; right: -10%;
  width: 60%; height: 140%;
  background: radial-gradient(circle, rgba(91,163,240,0.18) 0%, transparent 65%);
  pointer-events: none;
}
.landing-mati::after {
  content: "";
  position: absolute;
  bottom: -30%; left: -15%;
  width: 55%; height: 120%;
  background: radial-gradient(circle, rgba(168,85,247,0.12) 0%, transparent 65%);
  pointer-events: none;
}
.landing-mati-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}
.landing-mati-text {
  color: #fff;
}
.landing-mati-h2 {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1px;
  margin: 0 0 12px;
  color: #fff;
}
.landing-mati-h2 .accent {
  color: var(--cima-blue-light);
}
.landing-mati-tag {
  font-size: 18px;
  font-weight: 500;
  color: rgba(255,255,255,0.78);
  font-style: italic;
  margin: 0 0 22px;
}
.landing-mati-body {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255,255,255,0.88);
  margin: 0 0 22px;
  max-width: 520px;
}
.landing-mati-body strong {
  color: #fff;
  font-weight: 700;
}
.landing-mati-points {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}
.landing-mati-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255,255,255,0.85);
  margin-bottom: 10px;
}
.landing-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cima-blue);
  position: relative;
  margin-top: 2px;
}
.landing-check::after {
  content: "";
  position: absolute;
  left: 5px; top: 7px;
  width: 4px; height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.landing-mati-image {
  display: flex;
  justify-content: center;
  align-items: center;
}
.landing-mati-image img {
  max-width: 100%;
  height: auto;
  max-height: 480px;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4));
}
@media (max-width: 920px) {
  .landing-mati { padding: 44px 28px; }
  .landing-mati-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .landing-mati-text { order: 2; }
  .landing-mati-image { order: 1; }
  .landing-mati-image img { max-height: 320px; }
  .landing-mati-h2 { font-size: 38px; }
  .landing-mati-points li { text-align: left; }
  .landing-mati-body { margin-left: auto; margin-right: auto; }
}

/* ---- Pasos (4 pasos metodológicos) ---- */
.landing-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.landing-steps li {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 26px 24px;
  border: 1px solid rgba(14,31,71,0.06);
  position: relative;
}
.landing-step-num {
  font-size: 38px;
  font-weight: 800;
  color: var(--cima-blue-light);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 14px;
  opacity: 0.85;
}
.landing-steps h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--cima-ink);
  letter-spacing: -0.2px;
  margin: 0 0 8px;
  line-height: 1.3;
}
.landing-steps p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--cima-text-soft, #5A6072);
  margin: 0;
}
@media (max-width: 920px) {
  .landing-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .landing-steps { grid-template-columns: 1fr; }
}

/* ---- Tiers (pricing elegante) ---- */
.landing-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 28px;
}
.landing-tier {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  border: 1px solid rgba(14,31,71,0.08);
  display: flex;
  flex-direction: column;
}
.landing-tier-feat {
  background: linear-gradient(160deg, #fff 0%, #f5f9ff 100%);
  border-color: var(--cima-blue);
  box-shadow: 0 12px 32px rgba(44,143,232,0.12);
  transform: translateY(-6px);
  position: relative;
}
.landing-tier-feat::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--cima-blue) 0%, var(--cima-blue-light) 100%);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.landing-tier-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--cima-text-soft, #5A6072);
  margin-bottom: 10px;
}
.landing-tier h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--cima-ink);
  letter-spacing: -0.4px;
  margin: 0 0 14px;
}
.landing-tier-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--cima-ink);
  letter-spacing: -0.5px;
  margin: 0 0 14px;
  line-height: 1.2;
}
.landing-tier-amount {
  display: block;
  font-size: 26px;
}
.landing-tier-amount-sub {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--cima-text-soft, #5A6072);
  letter-spacing: 0;
  margin-top: 2px;
}
.landing-tier-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--cima-text-soft, #5A6072);
  margin: 0;
}
.landing-tiers-note {
  font-size: 13px;
  color: var(--cima-text-soft, #5A6072);
  text-align: center;
  font-style: italic;
  max-width: 640px;
  margin: 8px auto 0;
  line-height: 1.55;
}
@media (max-width: 920px) {
  .landing-tiers { grid-template-columns: 1fr; }
  .landing-tier-feat { transform: none; }
}

/* ---- CTA final extendido ---- */
.landing-final-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.landing-btn-ghost-dark {
  background: rgba(14,31,71,0.06);
  color: var(--cima-ink);
  border: 1px solid rgba(14,31,71,0.18);
  display: inline-block;
  padding: 14px 26px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  letter-spacing: 0.2px;
  transition: all var(--dur-fast) var(--ease-out);
}
.landing-btn-ghost-dark:hover {
  background: rgba(14,31,71,0.12);
  text-decoration: none;
  color: var(--cima-ink);
}
.landing-final-foot {
  font-size: 13px;
  color: var(--cima-text-soft, #5A6072);
  text-align: center;
  margin: 0;
}
.landing-final-foot a {
  color: var(--cima-blue);
  text-decoration: none;
  font-weight: 600;
}
.landing-final-foot a:hover { text-decoration: underline; }


/* =====================================================================
 * Dashboard empresa V3 — refactor UX/UI 2026-05-05
 * Tokens unificados: radius 12/4, sombra de dos capas, escala 8 (8/16/24/32/48)
 * Reemplaza bloques previos de .empresa-dashboard, .next-step, etc.
 * ===================================================================== */

/* Container principal — sustituye conflicto container-md */
.empresa-dashboard {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 24px 48px;
}
@media (max-width: 720px) {
  .empresa-dashboard { padding: 16px 16px 32px; }
}

/* ── Sombras canónicas — dos capas para "premium feel" ───────────────── */
:root {
  --shadow-card:    0 1px 0 rgba(14,31,71,0.04), 0 8px 24px -12px rgba(14,31,71,0.12);
  --shadow-card-hi: 0 1px 0 rgba(14,31,71,0.06), 0 16px 40px -16px rgba(14,31,71,0.20);
  --radius-card:    12px;
  --radius-pill:    4px;
}

/* ── Ribbon "Siguiente paso" (40px alto) ─────────────────────────────── */
.next-step-ribbon {
  background: var(--accent, #FFA000);
  margin: 0 -24px 24px;
  padding: 0 24px;
}
.next-step-ribbon-inner {
  max-width: 1192px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 48px;
  color: #fff;
}
.next-step-ribbon-text {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.next-step-ribbon-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  opacity: 0.78;
}
.next-step-ribbon-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.next-step-ribbon-cta {
  background: rgba(255,255,255,0.18);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease;
}
.next-step-ribbon-cta:hover {
  background: rgba(255,255,255,0.28);
  color: #fff;
  text-decoration: none;
}
@media (max-width: 720px) {
  .next-step-ribbon { margin: 0 -16px 16px; padding: 0 16px; }
  .next-step-ribbon-inner { padding: 12px 0; }
  .next-step-ribbon-cta { font-size: 12px; padding: 6px 12px; }
}

/* ── Toasts efímeros (top-right) ─────────────────────────────────────── */
.toast-stack {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
  pointer-events: none;
}
.toast-stack > * { pointer-events: auto; }
.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card-hi);
  font-size: 13px;
  line-height: 1.4;
  background: #fff;
  border-left: 3px solid var(--cima-blue, #2C8FE8);
  animation: toast-in .28s cubic-bezier(.4,0,.2,1);
  transition: opacity .28s ease, transform .28s ease;
}
.toast-leaving { opacity: 0; transform: translateX(20px); }
.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cima-blue, #2C8FE8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toast-icon-mati {
  background: linear-gradient(135deg, #2C8FE8, #1FB8E0);
  font-weight: 800;
  font-size: 13px;
}
.toast-success { border-left-color: #2e7d32; }
.toast-success .toast-icon { background: #2e7d32; }
.toast-error { border-left-color: #c62828; }
.toast-error .toast-icon { background: #c62828; }
.toast-msg { flex: 1; color: #0E1F47; }
.toast-close {
  flex-shrink: 0;
  background: none;
  border: 0;
  color: #5A6072;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.6;
}
.toast-close:hover { opacity: 1; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (max-width: 720px) {
  .toast-stack { top: 72px; right: 16px; left: 16px; max-width: none; }
}

/* ── Hero — refinamientos tagline ────────────────────────────────────── */
.emp-hero-tagline--refined {
  font-style: normal !important;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--cima-grey, #5A6072);
}
.emp-hero-logo {
  height: auto;
  width: auto;
  max-height: 64px;
  max-width: 100%;
  display: block;
  margin: 0 0 24px;
}
.emp-hero-logo--tenant {
  background: #fff;
  padding: 8px;
  border-radius: var(--radius-card);
}

/* ── Acciones (bloque colapsable) ────────────────────────────────────── */
.actions-block {
  margin: 24px 0 32px;
  background: transparent;
}
.actions-block[open] .actions-block-caret { transform: rotate(180deg); }
.actions-block-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  cursor: pointer;
  padding: 8px 0 16px;
  list-style: none;
  user-select: none;
}
.actions-block-head::-webkit-details-marker { display: none; }
.actions-block-title {
  font-size: 16px;
  font-weight: 700;
  color: #0E1F47;
  letter-spacing: -0.2px;
}
.actions-block-hint {
  font-size: 13px;
  color: #5A6072;
  flex: 1;
}
.actions-block-caret {
  color: #5A6072;
  transition: transform .2s ease;
}
.actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 920px) {
  .actions-grid { grid-template-columns: 1fr; }
}

/* ── Action card (3 tipos: invitar / mati / pago) ────────────────────── */
.action-card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 0;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow .2s ease, transform .2s ease;
  border-top: 3px solid transparent;
}
.action-card:hover { box-shadow: var(--shadow-card-hi); transform: translateY(-2px); text-decoration: none; color: inherit; }
.action-card[open] { box-shadow: var(--shadow-card-hi); }
.action-card--invitar { border-top-color: #2C8FE8; }
.action-card--mati    { border-top-color: #1FB8E0; }
.action-card--paid    { border-top-color: #FFA000; }
.action-card--portal  { border-top-color: #2e7d32; }

.action-card-head {
  padding: 16px;
  list-style: none;
  cursor: pointer;
  display: block;
  position: relative;
}
.action-card-head::-webkit-details-marker { display: none; }
.action-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e8f0fc;
  color: #2C8FE8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.action-card--mati .action-card-icon { background: #e0f7ed; color: #1FB8E0; }
.action-card-icon--mati { font-weight: 800; font-size: 16px; background: #e0f7ed !important; color: #1FB8E0 !important; }
.action-card-icon--orange { background: #fff3e0; color: #FFA000; }
.action-card-icon--green  { background: #e8f5e9; color: #2e7d32; }

.action-card-pill {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.action-card-pill--free   { background: #e8f5e9; color: #2e7d32; }
.action-card-pill--paid   { background: #fff3e0; color: #e65100; }
.action-card-pill--active { background: #e8f5e9; color: #2e7d32; }

.action-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #0E1F47;
  margin: 0 0 8px;
  line-height: 1.3;
}
.action-card-desc {
  font-size: 13px;
  color: #5A6072;
  line-height: 1.5;
  margin: 0 0 16px;
}
.action-card-cta {
  font-size: 12px;
  font-weight: 700;
  color: #2C8FE8;
  display: inline-block;
}
.action-card--mati .action-card-cta   { color: #1FB8E0; }
.action-card-cta--orange { color: #e65100; }
.action-card-cta--green  { color: #2e7d32; }

.action-card-form {
  padding: 0 16px 16px;
  border-top: 1px solid #eef0f5;
  margin-top: 8px;
  padding-top: 16px;
}
.action-card-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #5A6072;
  margin-bottom: 8px;
}
.action-card-file {
  width: 100%;
  font-size: 12px;
  margin-bottom: 8px;
}
.action-card-link {
  display: block;
  font-size: 11px;
  color: #2C8FE8;
  margin-bottom: 16px;
  text-decoration: none;
}
.action-card-link:hover { text-decoration: underline; }
.action-card-hint {
  font-size: 11px;
  color: #888;
  margin: 0 0 16px;
  line-height: 1.45;
}
.action-card-submit {
  width: 100%;
  background: #2C8FE8;
  color: #fff;
  padding: 10px 16px;
  border: 0;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease;
}
.action-card-submit:hover { background: #1880d8; }
.action-card-submit--mati { background: #1FB8E0; }
.action-card-submit--mati:hover { background: #16a3c8; }
.action-card-submit--invitar { background: #2C8FE8; }
.action-card-alt {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 11px;
  color: #5A6072;
  text-decoration: none;
}
.action-card-alt:hover { color: #2C8FE8; text-decoration: underline; }

/* ── Heatmap leyenda ─────────────────────────────────────────────────── */
.emp-heatmap-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: 11px;
}
.emp-heatmap-legend-label {
  color: #5A6072;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 4px;
}
.emp-heatmap-legend-chip {
  color: #fff;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

/* ── Heatmap cell con tinte más visible (saturación bumpeada) ───────── */
.emp-heatmap-cell {
  background: color-mix(in srgb, var(--cell-color, transparent) 20%, transparent);
  text-align: center;
  font-weight: 600;
}
.emp-heatmap-cell .emp-heatmap-val { color: var(--cell-color, #0E1F47); font-weight: 700; }

/* ── Print de safety: clases viejas inline overrides ────────────────── */
.empresa-dashboard table[style*="border-spacing"] { border-spacing: 0 !important; }
