/* ==========================================================================
   MINEGUARD ARTP — SAAS DE PREVENCIÓN DE RIESGOS & PROTOCOLOS MINEROS AMSA
   DISEÑO ERGONÓMICO DE ALTA MONTAÑA (TOUCH-FRIENDLY PARA FAENA Y OPERACIÓN EN ALTURA)
   Fondo Blanco Limpio, Tipografía Gigante de Alto Contraste y Botones Táctiles para Guantes
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800;900&family=JetBrains+Mono:wght@500;700;800&display=swap');

:root {
  /* Fondo Limpio y Lindo */
  --bg-body: #ffffff;
  --bg-surface: #f8fafc;
  --bg-subtle: #f1f5f9;
  --bg-card: #ffffff;
  
  /* Textos de Alto Contraste (Lectura bajo luz solar intensa en cordillera) */
  --text-main: #090d16;
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #4b5563;
  --text-light: #6b7280;

  /* Bordes Refinados & Táctiles */
  --border-subtle: #e2e8f0;
  --border-strong: #94a3b8;
  --border-focus: #0284c7;

  /* Colores Corporativos de Seguridad Minera de Alta Visibilidad */
  --color-brand-blue: #0284c7;
  --color-brand-blue-hover: #0369a1;
  --color-navy: #0f2942;
  --color-safety-green: #059669;
  --color-safety-green-bg: #ecfdf5;
  --color-safety-green-border: #10b981;
  
  --color-safety-red: #dc2626;
  --color-safety-red-bg: #fef2f2;
  --color-safety-red-border: #ef4444;

  --color-safety-amber: #d97706;
  --color-safety-amber-bg: #fffbeb;

  /* Sombras y Elevaciones */
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.1);
  --shadow-touch: 0 4px 14px rgba(0, 0, 0, 0.12);

  /* Radios */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-pill: 9999px;

  /* Tipografías */
  --font-main: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: 90px; /* Espacio para barra flotante móvil */
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  letter-spacing: -0.02em;
  font-weight: 800;
}

p {
  color: var(--text-secondary);
}

a {
  color: var(--color-brand-blue);
  text-decoration: none;
  transition: all 0.2s ease;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   HEADER NAVEGACIÓN PROFESIONAL SSO (ALTURA AMPLIADA & SUBMENÚ OPERATIVO)
   ========================================================================== */
.saas-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 4px 20px -2px rgba(15, 41, 66, 0.05);
  transition: all 0.25s ease;
}

.saas-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  gap: 1.25rem;
}

/* --- BRAND / LOGO --- */
.saas-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.saas-brand:hover {
  transform: translateY(-1px);
}

.saas-brand-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #0284c7 0%, #0f2942 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.saas-brand:hover .saas-brand-icon {
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.38);
  transform: scale(1.02);
}

.saas-brand-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.saas-brand-name {
  font-family: var(--font-heading);
  font-size: 1.32rem;
  font-weight: 900;
  color: var(--color-navy);
  line-height: 1.15;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
}

.brand-sso-badge {
  background: rgba(2, 132, 199, 0.12);
  color: var(--color-brand-blue);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(2, 132, 199, 0.25);
  letter-spacing: 0.04em;
}

.saas-brand-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tag-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
  display: inline-block;
}

/* --- NAVEGACIÓN Y SUBMENÚ DESPLEGABLE --- */
.saas-nav {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
}

.saas-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 0.62rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}

.saas-nav-link .nav-icon {
  color: var(--color-brand-blue);
  transition: transform 0.2s ease;
}

.saas-nav-link:hover {
  color: var(--color-brand-blue);
  background: rgba(2, 132, 199, 0.06);
  border-color: rgba(2, 132, 199, 0.15);
}

.saas-nav-link:hover .nav-icon {
  transform: translateY(-1px);
}

.saas-nav-link.nav-link-artp {
  background: #f0f9ff;
  color: var(--color-brand-blue);
  border: 1px solid #bae6fd;
}

.saas-nav-link.nav-link-artp:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
}

/* Dropdown Container */
.saas-nav-dropdown {
  position: relative;
}

.saas-nav-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.62rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.saas-nav-dropdown-btn .nav-icon {
  color: #059669;
  transition: transform 0.2s ease;
}

.dropdown-chevron {
  color: var(--text-muted);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.saas-nav-dropdown-btn:hover,
.saas-nav-dropdown:hover .saas-nav-dropdown-btn,
.saas-nav-dropdown.active .saas-nav-dropdown-btn {
  color: var(--color-navy);
  background: #f8fafc;
  border-color: #e2e8f0;
}

.saas-nav-dropdown:hover .dropdown-chevron,
.saas-nav-dropdown.active .dropdown-chevron {
  transform: rotate(180deg);
  color: var(--color-brand-blue);
}

/* Submenú Desplegable (Glassmorphism Elevation) */
.saas-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 420px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 16px;
  box-shadow: 0 20px 45px -8px rgba(15, 41, 66, 0.18), 0 0 0 1px rgba(2, 132, 199, 0.08);
  padding: 0.85rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
  z-index: 1050;
}

/* Triángulo superior decorativo */
.saas-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-left: 1px solid rgba(226, 232, 240, 0.95);
  border-top: 1px solid rgba(226, 232, 240, 0.95);
}

/* Mostrar menú al hacer hover o cuando tiene clase active */
.saas-nav-dropdown:hover .saas-dropdown-menu,
.saas-nav-dropdown.active .saas-dropdown-menu,
.saas-nav-dropdown:focus-within .saas-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-header-accent {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.6rem 0.6rem;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 0.5rem;
}

.dropdown-header-title {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.dropdown-header-sub {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-brand-blue);
  background: #f0f9ff;
  padding: 2px 7px;
  border-radius: 4px;
}

.dropdown-grid {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.18s ease;
  border: 1px solid transparent;
}

.dropdown-item:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
  transform: translateX(3px);
}

.dropdown-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.dropdown-item:hover .dropdown-item-icon {
  transform: scale(1.08);
}

.dropdown-item-icon.bg-blue {
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.dropdown-item-icon.bg-emerald {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.dropdown-item-icon.bg-amber {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.dropdown-item-icon.bg-rose {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.dropdown-item-content {
  display: flex;
  flex-direction: column;
}

.dropdown-item-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--color-navy);
  line-height: 1.25;
}

.dropdown-item-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.dropdown-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.6rem 0.2rem;
  border-top: 1px solid #f1f5f9;
  margin-top: 0.5rem;
}

.dropdown-footer-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.dropdown-footer-badge {
  font-size: 0.68rem;
  font-weight: 800;
  color: #059669;
  background: #ecfdf5;
  padding: 2px 7px;
  border-radius: 9999px;
  border: 1px solid #a7f3d0;
}

/* --- ACCIONES DERECHA --- */
.saas-header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.btn-header-cta {
  background: var(--color-navy);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 12px rgba(15, 41, 66, 0.22);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-header-cta:hover {
  background: #1e3a8a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 41, 66, 0.32);
}

/* Botón Hamburguesa Móvil */
.saas-mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: #f8fafc;
  border: 1.5px solid var(--border-subtle);
  border-radius: 10px;
  cursor: pointer;
  padding: 9px;
  transition: all 0.2s ease;
}

.saas-mobile-toggle:hover {
  background: #f1f5f9;
  border-color: var(--border-strong);
}

.mobile-toggle-bar {
  width: 100%;
  height: 2.2px;
  background: var(--color-navy);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.saas-mobile-toggle.active .mobile-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.saas-mobile-toggle.active .mobile-toggle-bar:nth-child(2) {
  opacity: 0;
}

.saas-mobile-toggle.active .mobile-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer Overlay */
.saas-mobile-drawer {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 2px solid var(--border-subtle);
  box-shadow: 0 16px 32px rgba(15, 41, 66, 0.15);
  padding: 1.25rem 1.5rem;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.25s ease;
  pointer-events: none;
  z-index: 999;
}

.saas-mobile-drawer.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0.75rem;
}

.mobile-drawer-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.mobile-drawer-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  transition: all 0.15s ease;
}

.mobile-link:hover {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.mobile-link-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.mobile-link-text {
  display: flex;
  flex-direction: column;
}

.mobile-link-text strong {
  font-size: 0.9rem;
  color: var(--color-navy);
}

.mobile-link-text small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.mobile-drawer-actions {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

.btn-mobile-chat {
  width: 100%;
  background: var(--color-navy);
  color: #ffffff;
  padding: 0.75rem;
  border-radius: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-size: 0.92rem;
}

/* ==========================================================================
   HERO ERGONÓMICO
   ========================================================================== */
.saas-hero {
  padding: 2.5rem 0 2rem;
  background: #ffffff;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #14532d;
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.hero-pill-dot {
  width: 10px;
  height: 10px;
  background-color: var(--color-safety-green);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.25);
}

.hero-main-title {
  font-size: clamp(2.1rem, 3.8vw, 3.1rem);
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--color-navy);
}

.hero-main-title span.highlight-blue {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.12rem;
  color: var(--text-secondary);
  max-width: 900px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Barra de Chips AMSA */
.amsa-partners-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.25rem;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.amsa-partners-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
}

.amsa-chips {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.amsa-chip {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   ESTRUCTURA PRINCIPAL DEL FORMULARIO ARTP TOUCH-FIRST (ALTA MONTAÑA)
   ========================================================================== */
.artp-sheet-wrapper {
  background: #ffffff;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 3.5rem;
}

.artp-sheet-topbar {
  background: #0f2942;
  color: #ffffff;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.artp-sheet-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.artp-doc-badge {
  background: #ffffff;
  color: #0f2942;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.4rem;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-md);
  letter-spacing: 0.04em;
}

.artp-doc-title-text h2 {
  font-size: 1.25rem;
  color: #ffffff;
  margin-bottom: 2px;
}

.artp-doc-title-text p {
  font-size: 0.82rem;
  color: #cbd5e1;
}

.artp-meta-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.artp-meta-tag {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
}

/* Parámetros Operacionales */
.artp-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 1.25rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-subtle);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.config-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0; /* Evita desborde horizontal en CSS Grid */
  max-width: 100%;
  box-sizing: border-box;
}

.config-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  word-break: break-word;
}

.config-input, .config-select {
  padding: 0.8rem 1rem;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  background: #ffffff;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.config-input:focus, .config-select:focus {
  outline: none;
  border-color: var(--color-brand-blue);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.2);
}

/* BARRA DE PROGRESO Y ATAJOS TÁCTILES */
.artp-quick-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #ffffff;
  border-bottom: 2px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 1rem;
}

.progress-counter-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-navy);
}

.quick-btn {
  background: #ffffff;
  border: 2px solid var(--border-strong);
  color: var(--color-navy);
  font-weight: 800;
  font-size: 0.88rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.quick-btn:hover {
  background: #eff6ff;
  border-color: var(--color-brand-blue);
  color: var(--color-brand-blue);
}

/* PESTAÑAS DE NAVEGACIÓN EN ALTURA */
.mining-tabs-container {
  display: flex;
  background: #f1f5f9;
  border-bottom: 2px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
}

.mining-tabs-container::-webkit-scrollbar {
  display: none;
}

.mining-tab-btn {
  flex: 1;
  min-width: 220px;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 4px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.mining-tab-btn.active {
  background: #ffffff;
  color: var(--color-navy);
  border-bottom-color: var(--color-brand-blue);
}

.tab-badge-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--border-strong);
  color: #ffffff;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mining-tab-btn.active .tab-badge-num {
  background: var(--color-brand-blue);
}

/* ==========================================================================
   CARDS DE PREGUNTAS TÁCTILES ERGONÓMICAS (TOUCH-FIRST UI)
   ========================================================================== */
.questions-section-wrapper {
  padding: 2rem;
  background: #ffffff;
}

.section-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title-bar h3 {
  font-size: 1.25rem;
  color: var(--color-navy);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-subtitle-badge {
  font-size: 0.82rem;
  font-weight: 800;
  background: #e0f2fe;
  color: #0369a1;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
}

.mining-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Tarjeta individual de pregunta de seguridad */
.mining-check-card {
  background: #ffffff;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
}

.mining-check-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.mining-check-card.is-ok {
  border-color: #86efac;
  background: #fbfdfc;
}

.mining-check-card.is-danger {
  border-color: #fca5a5;
  background: #fefcfc;
}

.card-meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.tag-step-badge {
  background: #0f2942;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.tag-hazard-badge {
  background: #fef2f2;
  color: #991b1b;
  border: 1.5px solid #fecaca;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}

.card-question-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: #090d16;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.card-control-explanation {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.5;
}

.card-control-explanation strong {
  color: #1e293b;
}

/* BOTONES TÁCTILES GIGANTES SÍ / NO PARA ALTA MONTAÑA (TOUCH-FRIENDLY) */
.touch-choice-group {
  display: flex;
  gap: 12px;
  min-width: 220px;
}

.btn-touch-action {
  flex: 1;
  min-height: 58px;
  min-width: 100px;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 900;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-strong);
  background: #ffffff;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-touch-action:active {
  transform: scale(0.97);
}

/* Estado SÍ (CONFORME) */
.btn-touch-action.selected-yes {
  background-color: var(--color-safety-green);
  border-color: var(--color-safety-green);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4);
}

/* Estado NO (FALLA CRÍTICA) */
.btn-touch-action.selected-no {
  background-color: var(--color-safety-red);
  border-color: var(--color-safety-red);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
}

/* ==========================================================================
   ALERTA DE REGLA DE PARADA OBLIGATORIA
   ========================================================================== */
.stop-work-banner {
  display: none;
  background: #fef2f2;
  border: 2.5px solid var(--color-safety-red);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin: 1.5rem 2rem;
  align-items: flex-start;
  gap: 1.25rem;
  animation: fadeInDown 0.3s ease;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.15);
}

.stop-work-banner.active {
  display: flex;
}

.stop-work-icon {
  font-size: 2.8rem;
  line-height: 1;
}

.stop-work-content h3 {
  color: var(--color-safety-red);
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.stop-work-content p {
  color: #7f1d1d;
  font-size: 0.98rem;
  line-height: 1.5;
}

/* ==========================================================================
   PANEL DE FIRMA DIGITAL CON CANVAS TÁCTIL
   ========================================================================== */
.artp-authorization-panel {
  padding: 2rem;
  background: #f8fafc;
  border-top: 2px solid var(--border-subtle);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.signature-box-card {
  background: #ffffff;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.signature-box-card h4 {
  font-size: 1.05rem;
  color: var(--color-navy);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.signature-canvas {
  width: 100%;
  height: 130px;
  background: #ffffff;
  border: 2px dashed #94a3b8;
  border-radius: var(--radius-md);
  cursor: crosshair;
  touch-action: none;
  display: block;
}

.signature-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.signature-clear-btn {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.action-trigger-area {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.status-summary-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1rem;
}

.status-summary-pill.ok {
  background: #ecfdf5;
  border: 2px solid #86efac;
  color: #065f46;
}

.status-summary-pill.danger {
  background: #fef2f2;
  border: 2px solid #fca5a5;
  color: #991b1b;
}

.btn-authorize-large {
  min-height: 64px;
  font-size: 1.18rem;
  font-weight: 900;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-heading);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn-authorize-large.enabled {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

.btn-authorize-large.enabled:hover {
  background: #047857;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(5, 150, 105, 0.5);
}

.btn-authorize-large.disabled {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
  box-shadow: none;
}

/* BARRA FLOTANTE FIJA PARA CELULARES Y TABLETS EN MINA */
.sticky-mobile-status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  border-top: 2px solid var(--border-subtle);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 99;
}

.sticky-status-info {
  display: flex;
  flex-direction: column;
}

.sticky-status-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.sticky-status-val {
  font-size: 1rem;
  font-weight: 900;
  color: var(--color-navy);
}

.btn-sticky-jump {
  background: #0284c7;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   CERTIFICADO OFICIAL EMITIDO (ARTP DIGITAL)
   ========================================================================== */
.certificate-output-modal {
  display: none;
  background: #ffffff;
  border: 3px solid var(--color-safety-green);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 1.5rem 1.5rem 2rem;
  box-shadow: 0 10px 35px rgba(5, 150, 105, 0.2);
  animation: fadeIn 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
}

.certificate-output-modal.active {
  display: block;
}

.cert-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
}

.cert-check-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ecfdf5;
  border: 2.5px solid #10b981;
  color: #059669;
  font-weight: 900;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.cert-info {
  min-width: 0;
}

.cert-info h3 {
  font-size: 1.25rem;
  color: var(--color-navy);
  font-weight: 900;
  margin-bottom: 4px;
  line-height: 1.3;
}

.cert-code, #cert-id-code {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: #0284c7;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.cert-details-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 0.85rem 0 1.25rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-primary);
  word-break: break-word;
}

.cert-action-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn-print-artp {
  background: var(--color-safety-green);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.4rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-print-artp:hover {
  background: #047857;
  transform: translateY(-1px);
}

.cert-qr-box {
  width: 120px;
  background: #ffffff;
  border: 2px solid #0f2942;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.qr-box-real {
  width: 105px;
  height: 105px;
  background: #ffffff;
  border: 2px solid #0f2942;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-shadow: var(--shadow-sm);
}

.qr-box-real svg, .cert-qr-box svg {
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   CONSOLA DE AUDITORÍA
   ========================================================================== */
.audit-console-section {
  padding: 3.5rem 0;
  background: var(--bg-surface);
  border-top: 2px solid var(--border-subtle);
  border-bottom: 2px solid var(--border-subtle);
}

.data-table-clean {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
}

.data-table-clean th {
  background: #0f2942;
  color: #ffffff;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
  padding: 1rem 1.25rem;
  text-align: left;
}

.data-table-clean td {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-weight: 600;
}

.badge-status-clean {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 800;
}

.badge-status-clean.approved {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #86efac;
}

.badge-status-clean.stopped {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* ==========================================================================
   FOOTER SAAS LIMPIO
   ========================================================================== */
.saas-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3.5rem 0 2rem;
}

.saas-footer a {
  color: #cbd5e1;
}

.footer-columns {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  margin-top: 1rem;
}

.footer-nav-col h4 {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-nav-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.9rem;
}

/* ==========================================================================
   MEDIA PRINT
   ========================================================================== */
@media print {
  header.saas-header,
  .hero-pill-badge,
  .hero-main-title,
  .hero-description,
  .amsa-partners-bar,
  .audit-console-section,
  #caracteristicas,
  #planes,
  #contacto,
  footer.saas-footer,
  .touch-choice-group,
  .btn-header-cta,
  .btn-authorize-large,
  .signature-clear-btn,
  .quick-btn,
  .artp-quick-toolbar,
  .mining-tabs-container,
  .sticky-mobile-status-bar {
    display: none !important;
  }
  
  body, main, .saas-hero {
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .artp-sheet-wrapper {
    box-shadow: none !important;
    border: 1px solid #000000 !important;
    page-break-inside: avoid;
  }
}

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1140px) {
  .saas-brand-tag {
    display: none;
  }
  .saas-header-inner {
    gap: 1rem;
    padding: 0 1rem;
  }
}

@media (max-width: 960px) {
  .saas-nav {
    display: none;
  }
  .saas-mobile-toggle {
    display: flex;
  }
  .saas-header-inner {
    height: 74px;
    padding: 0 1rem;
  }
  .saas-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }
  .btn-header-cta {
    display: none;
  }
}

@media (max-width: 600px) {
  #sync-status-text {
    display: none;
  }
  .sync-status-indicator {
    padding: 4px 6px;
  }
  .btn-header-login {
    padding: 0.45rem 0.8rem;
    font-size: 0.8rem;
  }
  .btn-header-register {
    padding: 0.45rem 0.8rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 900px) {
  .mining-check-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .touch-choice-group {
    width: 100%;
  }
  .btn-touch-action {
    width: 50%;
  }
  .artp-authorization-panel {
    grid-template-columns: 1fr;
  }
  .footer-columns {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ==========================================================================
   PESTAÑAS DE MODO (FORMULARIO OFICIAL vs ASISTENTE CHAT CELULAR)
   ========================================================================== */
.view-tabs-bar {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.view-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.view-tab-btn:hover {
  border-color: var(--color-brand-blue);
  color: var(--color-brand-blue);
  transform: translateY(-1px);
}

.view-tab-btn.active {
  background: var(--color-brand-blue);
  color: #ffffff;
  border-color: var(--color-brand-blue);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

/* ==========================================================================
   BLOQUE B: GESTIÓN DEL CAMBIO & REGLA YO DIGO NO
   ========================================================================== */
.bloque-section-card {
  background: #ffffff;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.25rem 1.25rem 2rem;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
  max-width: calc(100% - 2.5rem);
  overflow-x: hidden;
}

.bloque-header-collapsible {
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
  border-radius: var(--radius-sm);
}

.bloque-header-collapsible:hover {
  background: #f8fafc;
}

.bloque-collapsible-content {
  transition: all 0.3s ease;
}

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

.bloque-title {
  font-size: 1.25rem;
  color: var(--color-navy);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.bloque-tag {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

.sub-bloque-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-navy);
  margin: 1.25rem 0 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Tabla de Gestión de Cambios (Cuando hay un NO en B1, B2, B3) */
.cambios-table-container {
  margin-top: 1.5rem;
  background: #fffbeb;
  border: 2px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: none;
  animation: fadeIn 0.3s ease;
}

.cambios-table-container.active {
  display: block;
}

.cambios-table-title {
  color: #92400e;
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cambios-row-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 0.85rem;
  align-items: end;
  background: #ffffff;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid #fde68a;
  margin-bottom: 0.75rem;
}

/* Banner "YO DIGO NO" */
.banner-yo-digo-no {
  background: #fef2f2;
  border: 2px solid #ef4444;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  display: none;
  animation: fadeInDown 0.3s ease;
}

.banner-yo-digo-no.active {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.yo-digo-no-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.yo-digo-no-content h4 {
  color: #991b1b;
  font-size: 1.15rem;
  font-weight: 900;
  margin-bottom: 0.35rem;
}

.yo-digo-no-content p {
  color: #7f1d1d;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ==========================================================================
   BLOQUE D: PERSONAL PARTICIPANTE DE LA TAREA
   ========================================================================== */
.participantes-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.participantes-table th {
  text-align: left;
  padding: 0.85rem;
  background: var(--bg-surface);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  border-bottom: 2px solid var(--border-subtle);
}

.participantes-table td {
  padding: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.btn-add-participante {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  background: #ffffff;
  border: 2px dashed var(--color-brand-blue);
  color: var(--color-brand-blue);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-top: 1rem;
  transition: all 0.2s ease;
}

.btn-add-participante:hover {
  background: #f0f9ff;
  border-style: solid;
}

/* ==========================================================================
   MODO ASISTENTE CONVERSACIONAL ("ARTP Asistente" MÓVIL EN CHILE)
   ========================================================================== */
.asistente-chat-wrapper {
  max-width: 680px;
  margin: 0 auto 3rem;
  background: #ffffff;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: none;
}

.asistente-chat-wrapper.active {
  display: block;
}

.asistente-topbar {
  background: var(--color-navy);
  color: #ffffff;
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.asistente-user-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.asistente-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border: 2px solid #ffffff;
}

.asistente-names h3 {
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.asistente-names p {
  color: #94a3b8;
  font-size: 0.8rem;
}

.asistente-chat-body {
  padding: 1.5rem;
  min-height: 420px;
  max-height: 540px;
  overflow-y: auto;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-bubble {
  max-width: 85%;
  padding: 1rem 1.2rem;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
  animation: fadeIn 0.25s ease;
}

.chat-bubble.assistant {
  background: #ffffff;
  color: var(--text-primary);
  border: 1.5px solid var(--border-subtle);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.chat-bubble.assistant strong {
  color: var(--color-navy);
}

.chat-bubble.user {
  background: var(--color-brand-blue);
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  font-weight: 600;
}

.chat-bubble.alert-danger {
  background: #fef2f2;
  color: #991b1b;
  border: 2px solid #ef4444;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.asistente-chat-controls {
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  border-top: 2px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.chat-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.btn-chat-choice {
  height: 56px;
  font-size: 1.15rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-strong);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-chat-choice.yes {
  background: #ecfdf5;
  color: #065f46;
  border-color: #10b981;
}

.btn-chat-choice.yes:hover {
  background: #10b981;
  color: #ffffff;
}

.btn-chat-choice.no {
  background: #fef2f2;
  color: #991b1b;
  border-color: #ef4444;
}

.btn-chat-choice.no:hover {
  background: #ef4444;
  color: #ffffff;
}

.chat-input-row {
  display: flex;
  gap: 0.75rem;
}

.chat-text-input {
  flex: 1;
  padding: 0.85rem 1rem;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
}

.btn-chat-send {
  padding: 0.85rem 1.5rem;
  background: var(--color-brand-blue);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
}



@media (max-width: 900px) {
  .cambios-row-form {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   OPTIMIZACIONES MÓVILES AVANZADAS (CELULAR EN ALTA MONTAÑA)
   ========================================================================== */
.mobile-view-selector-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f1f5f9;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
  border: 1.5px solid var(--border-subtle);
}

.mobile-filter-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-pill-btn {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-pill-btn.active {
  background: var(--color-brand-blue);
  color: #ffffff;
  border-color: var(--color-brand-blue);
}

.btn-toggle-focus-mode {
  background: #ffffff;
  border: 2px solid var(--color-navy);
  color: var(--color-navy);
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.btn-toggle-focus-mode.active {
  background: var(--color-navy);
  color: #ffffff;
}

/* Barra de Progreso Global Móvil */
.mobile-global-progress-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.mobile-global-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #0284c7);
  width: 100%;
  transition: width 0.3s ease;
}

/* Card enfocada en Celular */
.mining-check-card.focus-active {
  border-color: var(--color-brand-blue) !important;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.18) !important;
  transform: scale(1.01);
}

/* Mejoras para Pantallas Móviles Pequeñas y Medianas */
@media (max-width: 768px) {
  .saas-hero {
    padding: 2rem 0;
  }

  .hero-main-title {
    font-size: 1.85rem !important;
    line-height: 1.2 !important;
  }

  .hero-description {
    display: none !important;
  }

  .artp-sheet-topbar {
    padding: 1.25rem 1rem !important;
  }

  .artp-doc-title-text h2 {
    font-size: 1.25rem !important;
  }

  .artp-config-grid {
    padding: 1rem !important;
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .bloque-section-card {
    padding: 1rem !important;
    margin: 1rem 0.5rem !important;
    max-width: calc(100% - 1rem) !important;
  }

  .artp-quick-toolbar {
    padding: 1rem !important;
    flex-direction: column;
    align-items: stretch;
  }

  .questions-section-wrapper {
    padding: 1rem !important;
  }

  .mining-check-card {
    padding: 1.25rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1.15rem !important;
    border-width: 2.5px !important;
  }

  .card-question-text {
    font-size: 1.18rem !important;
    line-height: 1.4 !important;
  }

  .card-control-explanation {
    font-size: 0.88rem !important;
    background: #f8fafc;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
  }

  .touch-choice-group {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .btn-touch-action {
    min-height: 64px !important;
    font-size: 1.25rem !important;
    border-radius: 12px !important;
    border-width: 2.5px !important;
  }

  .sticky-mobile-status-bar {
    padding: 0.75rem 1rem !important;
  }

  .sticky-status-val {
    font-size: 1rem !important;
  }

  .btn-sticky-jump {
    padding: 0.75rem 1.2rem !important;
    font-size: 0.92rem !important;
  }
}

/* ==========================================================================
   SISTEMA DE AUTENTICACIÓN, REGISTRO & SESIÓN DE PERSONAL
   ========================================================================== */
.header-auth-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-header-login {
  background: #ffffff;
  color: var(--color-navy);
  border: 2px solid var(--border-subtle);
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-header-login:hover {
  border-color: var(--color-brand-blue);
  color: var(--color-brand-blue);
  background: #f0f9ff;
}

.btn-header-register {
  background: var(--color-brand-blue);
  color: #ffffff;
  border: 2px solid var(--color-brand-blue);
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.btn-header-register:hover {
  background: var(--color-brand-blue-hover);
  border-color: var(--color-brand-blue-hover);
  transform: translateY(-1px);
}

.btn-header-register-alt {
  background: #ecfdf5;
  color: #065f46;
  border: 1.5px solid #a7f3d0;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-header-register-alt:hover {
  background: #d1fae5;
  border-color: #059669;
}

/* Panel Destacado de Autenticación en Hero (Terreno / Altura) */
.hero-auth-panel {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #e2e8f0;
  border-left: 6px solid var(--color-brand-blue);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.6rem;
  margin: 1.5rem 0 2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.hero-auth-panel-left {
  flex: 1;
}

.hero-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-brand-blue);
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.5rem;
}

.hero-auth-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-navy);
  margin-bottom: 0.25rem;
}

.hero-auth-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.hero-auth-panel-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.btn-hero-auth-login,
.btn-hero-auth-register {
  min-height: 54px;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.btn-hero-auth-login {
  background: #ffffff;
  color: var(--color-navy);
  border: 2.5px solid var(--color-navy);
}

.btn-hero-auth-login:hover {
  background: #0f172a;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.2);
}

.btn-hero-auth-register {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: 2.5px solid #0284c7;
}

.btn-hero-auth-register:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  border-color: #0369a1;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

.hero-user-connected-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #ecfdf5;
  border: 2px solid #a7f3d0;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
}

.hero-user-connected-info {
  display: flex;
  flex-direction: column;
}

.hero-user-name {
  font-weight: 800;
  color: #065f46;
  font-size: 0.95rem;
}

.hero-user-sub {
  font-size: 0.8rem;
  color: #047857;
}

.btn-hero-switch {
  background: #ffffff;
  border: 1.5px solid #059669;
  color: #065f46;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-hero-switch:hover {
  background: #059669;
  color: #ffffff;
}

@media (max-width: 768px) {
  .hero-auth-panel {
    flex-direction: column;
    align-items: stretch;
    padding: 1.15rem;
    gap: 1.15rem;
  }
  .hero-auth-panel-actions {
    flex-direction: column;
    width: 100%;
  }
  .btn-hero-auth-login,
  .btn-hero-auth-register {
    width: 100%;
    min-height: 56px;
    font-size: 1.05rem;
  }
  .hero-user-connected-box {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}

.user-logged-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: #f8fafc;
  border: 1.5px solid var(--border-subtle);
  padding: 0.35rem 0.85rem 0.35rem 0.45rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}

.user-avatar-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-brand-blue);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-info-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-name-title {
  font-weight: 800;
  font-size: 0.84rem;
  color: var(--color-navy);
}

.user-role-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.btn-logout-small {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s;
  margin-left: 4px;
}

.btn-logout-small:hover {
  color: #dc2626;
  background: #fee2e2;
}

/* Modal de Autenticación & Registro */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-modal-overlay.active {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.auth-modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border: 2px solid var(--border-subtle);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.auth-modal-header {
  background: var(--color-navy);
  color: #ffffff;
  padding: 1.4rem 1.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-modal-header h3 {
  color: #ffffff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.auth-modal-close:hover {
  background: #dc2626;
}

.auth-tabs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f5f9;
  border-bottom: 2px solid var(--border-subtle);
}

.auth-tab-btn {
  padding: 0.95rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab-btn.active {
  background: #ffffff;
  color: var(--color-brand-blue);
  border-bottom: 3px solid var(--color-brand-blue);
}

.auth-modal-body {
  padding: 1.6rem;
  overflow-y: auto;
}

.auth-form-group {
  margin-bottom: 1.15rem;
}

.auth-form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

.auth-form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.auth-form-input:focus {
  outline: none;
  border-color: var(--color-brand-blue);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.btn-auth-submit {
  width: 100%;
  padding: 0.95rem;
  background: var(--color-brand-blue);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
  transition: all 0.2s;
  margin-top: 0.5rem;
}

.btn-auth-submit:hover {
  background: var(--color-brand-blue-hover);
  transform: translateY(-1px);
}

/* Botones de Demo Rápida */
.auth-demo-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1.5px dashed var(--border-subtle);
}

.auth-demo-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.auth-demo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.btn-demo-quick {
  background: #f8fafc;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.btn-demo-quick:hover {
  background: #e0f2fe;
  border-color: var(--color-brand-blue);
  color: var(--color-brand-blue);
}

.auth-status-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: none;
}

.auth-status-alert.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1.5px solid #ef4444;
  display: block;
}

.auth-status-alert.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1.5px solid #10b981;
  display: block;
}

/* ==========================================================================
   MÓDULOS SSO RA CONSTRUCCIONES & MINERA LOS PELAMBRES (AMSA)
   PROCEDIMIENTOS DE TRABAJO SEGURO (PTS), MATRICES DE RIESGOS (IPER) & EDRF
   ========================================================================== */

/* Secciones Generales SSO */
.sso-section {
  padding: 3.5rem 0;
  border-bottom: 2px solid var(--border-subtle);
  background: #ffffff;
}

.sso-section.surface-alt {
  background: #f8fafc;
}

.sso-header-block {
  margin-bottom: 2.25rem;
}

.sso-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e0f2fe;
  color: #0369a1;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid #bae6fd;
  margin-bottom: 0.75rem;
}

.sso-section-title {
  font-size: 2.15rem;
  color: var(--color-navy);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.sso-section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 860px;
  line-height: 1.6;
}

/* Barra de Filtros y Búsqueda */
.sso-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
  background: #ffffff;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.sso-search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.sso-search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.6rem;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.92rem;
  transition: all 0.2s;
  background: #f8fafc;
}

.sso-search-input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--color-brand-blue);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.sso-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

.sso-filter-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sso-filter-btn {
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.sso-filter-btn:hover {
  border-color: var(--color-brand-blue);
  color: var(--color-brand-blue);
}

.sso-filter-btn.active {
  background: var(--color-navy);
  border-color: var(--color-navy);
  color: #ffffff;
}

/* ==========================================================================
   TARJETAS DE PROCEDIMIENTOS (PTS)
   ========================================================================== */
.pts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
}

.pts-card {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.pts-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0284c7, #0f2942);
}

.pts-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-brand-blue);
}

.pts-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.pts-code-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  background: #0f2942;
  color: #ffffff;
  border-radius: var(--radius-sm);
}

.pts-version-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
}

.pts-card-title {
  font-size: 1.15rem;
  color: var(--color-navy);
  line-height: 1.35;
  margin-bottom: 0.65rem;
}

.pts-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.1rem;
}

.pts-meta-details {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 0.82rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pts-meta-row {
  display: flex;
  justify-content: space-between;
}

.pts-meta-label {
  color: var(--text-muted);
  font-weight: 600;
}

.pts-meta-val {
  color: var(--text-primary);
  font-weight: 700;
}

.pts-card-actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.btn-pts-primary {
  flex: 1;
  background: var(--color-brand-blue);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-pts-primary:hover {
  background: var(--color-brand-blue-hover);
}

.btn-pts-secondary {
  background: #ffffff;
  color: var(--color-navy);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s;
}

.btn-pts-secondary:hover {
  border-color: var(--color-brand-blue);
  color: var(--color-brand-blue);
  background: #f0f9ff;
}

/* ==========================================================================
   MATRICES DE RIESGOS (IPER / WRAC)
   ========================================================================== */
.iper-wrapper {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.iper-top-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-bottom: 1.5px solid var(--border-subtle);
}

.iper-stat-box {
  background: #ffffff;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.iper-stat-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.iper-stat-num {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--color-navy);
}

.iper-table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.iper-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  text-align: left;
}

.iper-table th {
  background: #0f2942;
  color: #ffffff;
  padding: 0.95rem 1rem;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.iper-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  vertical-align: top;
  line-height: 1.5;
}

.iper-table tr:hover td {
  background: #f8fafc;
}

/* Badges de Riesgo IPER */
.risk-badge {
  display: inline-block;
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.risk-badge.critico {
  background: #fef2f2;
  color: #b91c1c;
  border: 1.5px solid #ef4444;
}

.risk-badge.alto {
  background: #fff7ed;
  color: #c2410c;
  border: 1.5px solid #f97316;
}

.risk-badge.medio {
  background: #fffbeb;
  color: #b45309;
  border: 1.5px solid #f59e0b;
}

.risk-badge.bajo {
  background: #ecfdf5;
  color: #047857;
  border: 1.5px solid #10b981;
}

/* Calculadora Interactiva de Riesgos */
.iper-calculator-panel {
  background: #ffffff;
  border: 2px solid #bae6fd;
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2.5rem;
  box-shadow: 0 4px 20px rgba(2, 132, 199, 0.08);
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.calc-box {
  background: #f8fafc;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.calc-box-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-navy);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-result-card {
  background: #0f2942;
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calc-score-display {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0.85rem 0;
}

.calc-score-big {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  color: #38bdf8;
}

.calc-score-label {
  font-size: 1.1rem;
  font-weight: 800;
}

/* ==========================================================================
   ESTÁNDARES DE DESEMPEÑO DE RIESGOS DE FATALIDAD (EDRF AMSA)
   ========================================================================== */
.edrf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.edrf-card {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}

.edrf-card:hover {
  border-color: #0284c7;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.edrf-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.edrf-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: #e0f2fe;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
}

.edrf-title {
  font-size: 1.1rem;
  color: var(--color-navy);
  line-height: 1.3;
}

.edrf-controls-list {
  list-style: none;
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.edrf-controls-list li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.edrf-controls-list li::before {
  content: '—';
  color: var(--color-brand-blue);
  font-weight: 800;
  font-size: 0.95rem;
}

/* ==========================================================================
   MODAL DE DOCUMENTO PTS OFICIAL MINERA LOS PELAMBRES (AMSA)
   ========================================================================== */
.modal-pts-doc {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-pts-doc.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-pts-sheet {
  background: #ffffff;
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--border-subtle);
}

.modal-pts-topbar {
  padding: 1.25rem 1.75rem;
  background: #0f2942;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #0284c7;
}

.modal-pts-brand-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-pts-close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: background 0.2s;
}

.modal-pts-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-pts-content {
  padding: 2rem;
  overflow-y: auto;
  font-family: var(--font-main);
  color: var(--text-primary);
  line-height: 1.65;
}

.pts-official-doc-header {
  border: 2px solid #0f2942;
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 2rem;
}

.pts-official-doc-header td {
  border: 1px solid #0f2942;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
}

.pts-doc-h2 {
  font-size: 1.35rem;
  color: var(--color-navy);
  margin: 1.75rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid #e2e8f0;
}

.pts-doc-p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.pts-steps-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.88rem;
}

.pts-steps-table th {
  background: #f1f5f9;
  color: var(--color-navy);
  padding: 0.75rem;
  border: 1px solid #cbd5e1;
  text-align: left;
}

.pts-steps-table td {
  padding: 0.75rem;
  border: 1px solid #cbd5e1;
  vertical-align: top;
}

.modal-pts-footer {
  padding: 1rem 1.75rem;
  background: #f8fafc;
  border-top: 1.5px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .pts-grid {
    grid-template-columns: 1fr;
  }
  .sso-section-title {
    font-size: 1.75rem;
  }
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   MÓDULO CHECK LIST — LISTAS DE CHEQUEO DE TERRENO SSO 2026
   ========================================================================== */
.checklist-nav-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 1.5rem;
  scrollbar-width: thin;
}

.checklist-tab-btn {
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.checklist-tab-btn:hover {
  border-color: var(--color-brand-blue);
  color: var(--color-brand-blue);
}

.checklist-tab-btn.active {
  background: var(--color-navy);
  color: #ffffff;
  border-color: var(--color-navy);
  box-shadow: var(--shadow-sm);
}

.checklist-box {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.checklist-status-banner {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-weight: 700;
  font-size: 0.95rem;
}

.checklist-status-banner.aprobado {
  background: #ecfdf5;
  border: 1.5px solid #10b981;
  color: #065f46;
}

.checklist-status-banner.detenido {
  background: #fef2f2;
  border: 1.5px solid #ef4444;
  color: #991b1b;
}

.checklist-status-banner.pendiente {
  background: #f8fafc;
  border: 1.5px solid var(--border-subtle);
  color: var(--text-secondary);
}

.checklist-items-table {
  width: 100%;
  border-collapse: collapse;
}

.checklist-items-table th {
  padding: 10px 14px;
  background: #f1f5f9;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 800;
  border-bottom: 2px solid var(--border-subtle);
}

.checklist-items-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.92rem;
  vertical-align: middle;
}

.chk-critico-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  background: #fee2e2;
  color: #991b1b;
  margin-right: 8px;
}

.chk-action-group {
  display: inline-flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: var(--radius-sm);
}

.btn-chk-opt {
  padding: 6px 14px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.btn-chk-opt.c.selected {
  background: #10b981;
  color: #ffffff;
}

.btn-chk-opt.nc.selected {
  background: #ef4444;
  color: #ffffff;
}

.btn-chk-opt.na.selected {
  background: #64748b;
  color: #ffffff;
}

.checklist-meta-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   MATRIZ DE RIESGOS 5X5 INTERACTIVA (AMSA / LOS PELAMBRES 2026)
   ========================================================================== */
.matrix-5x5-box {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-top: 2rem;
  box-shadow: var(--shadow-sm);
}

.matrix-5x5-header {
  margin-bottom: 1.25rem;
}

.matrix-5x5-grid {
  display: grid;
  grid-template-columns: 140px repeat(5, 1fr);
  gap: 6px;
  font-size: 0.82rem;
}

.matrix-header-cell {
  background: #f1f5f9;
  padding: 8px 6px;
  text-align: center;
  font-weight: 800;
  color: var(--text-secondary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
}

.matrix-row-label {
  background: #f8fafc;
  padding: 10px;
  font-weight: 800;
  color: var(--text-main);
  border-radius: 6px;
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  border: 1px solid var(--border-subtle);
}

.matrix-cell {
  padding: 12px 6px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 54px;
}

.matrix-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.matrix-cell.critico {
  background: #fee2e2;
  color: #991b1b;
  border: 1.5px solid #f87171;
}

.matrix-cell.alto {
  background: #ffedd5;
  color: #9a3412;
  border: 1.5px solid #fb923c;
}

.matrix-cell.medio {
  background: #fef9c3;
  color: #854d0e;
  border: 1.5px solid #facc15;
}

.matrix-cell.bajo {
  background: #dcfce7;
  color: #166534;
  border: 1.5px solid #4ade80;
}

.matrix-cell-score {
  font-size: 1.05rem;
  font-family: var(--font-heading);
}

.matrix-cell-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.matrix-legend-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.matrix-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
}

.matrix-legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

/* ==========================================================================
   OPTIMIZACIÓN MÓVIL: CERTIFICADO OFICIAL ARTP & CHECK LIST CERTIFICADO
   ========================================================================== */
@media (max-width: 768px) {
  /* Certificado Oficial ARTP emitido ("Manos a la Obra") */
  .certificate-output-modal {
    margin: 1rem 0.5rem 1.5rem !important;
    padding: 1.25rem 1rem !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border-width: 2px !important;
  }

  .cert-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 1rem !important;
    width: 100% !important;
  }

  .cert-check-circle {
    margin: 0 auto !important;
    width: 48px !important;
    height: 48px !important;
    font-size: 1rem !important;
  }

  .cert-info {
    width: 100% !important;
    text-align: center !important;
  }

  .cert-info h3 {
    font-size: 1.15rem !important;
    line-height: 1.35 !important;
  }

  #cert-id-code {
    font-size: 0.85rem !important;
    word-break: break-all !important;
  }

  .cert-details-box {
    text-align: left !important;
    padding: 0.85rem 1rem !important;
    font-size: 0.82rem !important;
    line-height: 1.55 !important;
    margin: 0.75rem 0 1rem !important;
  }

  .cert-action-row {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.65rem !important;
  }

  .cert-action-row .btn-print-artp,
  .cert-action-row .quick-btn {
    width: 100% !important;
    min-height: 48px !important;
    justify-content: center !important;
    font-size: 0.92rem !important;
    box-sizing: border-box !important;
  }

  .cert-qr-box {
    margin: 0.5rem auto 0 !important;
    width: 110px !important;
  }

  /* Modal Certificado de Inspección Check List Terreno */
  .modal-pts-doc {
    padding: 0.5rem !important;
  }

  .modal-pts-sheet {
    max-height: 94vh !important;
    width: 100% !important;
    border-radius: var(--radius-md) !important;
  }

  .modal-pts-topbar {
    padding: 0.85rem 1rem !important;
  }

  .modal-pts-brand-title {
    font-size: 0.95rem !important;
  }

  .modal-pts-content {
    padding: 1rem !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .modal-pts-footer {
    padding: 0.85rem 1rem !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    text-align: center !important;
  }

  .modal-pts-footer button,
  .modal-pts-footer .btn-pts-primary,
  .modal-pts-footer .btn-pts-secondary {
    width: 100% !important;
    min-height: 46px !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .modal-pts-footer > div:last-child {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.5rem !important;
  }

  .matrix-5x5-grid {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    min-width: 540px;
  }
}

/* ==========================================================================
   ESTILOS GENERALES PARA PÁGINAS LEGALES & POLÍTICAS SSO 2026
   ========================================================================== */
.legal-page-header {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 3.5rem 0 2.5rem;
  border-bottom: 3px solid #0284c7;
}

.legal-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #94a3b8;
  margin-bottom: 1rem;
}

.legal-breadcrumbs a {
  color: #38bdf8;
  text-decoration: none;
}

.legal-breadcrumbs a:hover {
  text-decoration: underline;
}

.legal-title {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 0.85rem;
}

.legal-subtitle {
  font-size: 1.05rem;
  color: #cbd5e1;
  max-width: 820px;
  line-height: 1.6;
}

.legal-content-section {
  padding: 3rem 0;
  background: #f8fafc;
}

.legal-card {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.legal-card h2 {
  font-size: 1.45rem;
  color: var(--color-navy);
  margin: 1.75rem 0 0.85rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid #e2e8f0;
}

.legal-card h2:first-of-type {
  margin-top: 0;
}

.legal-card h3 {
  font-size: 1.15rem;
  color: var(--color-navy);
  margin: 1.25rem 0 0.5rem;
}

.legal-card p {
  margin-bottom: 1rem;
  color: #334155;
}

.legal-card ul, .legal-card ol {
  margin: 0 0 1.25rem 1.5rem;
  color: #334155;
}

.legal-card li {
  margin-bottom: 0.5rem;
}

.legal-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.3rem 0.85rem;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
  .legal-card {
    padding: 1.5rem 1.15rem;
  }
  .legal-page-header {
    padding: 2.5rem 0 1.75rem;
  }
}

/* ==========================================================================
   SSO AUDITORÍA & ERGONOMÍA MINERA (DS 132 & LEY 21.719)
   ========================================================================== */

/* 1. Banner Superior Legal y Operacional */
.legal-sso-disclaimer {
  background: #f8fafc;
  border-bottom: 2px solid #cbd5e1;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  color: #1e293b;
  position: relative;
  z-index: 99;
}
.legal-sso-disclaimer-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.disclaimer-badge {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 3px 8px;
  font-weight: 800;
  font-size: 0.72rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.legal-sso-disclaimer p {
  margin: 0;
  color: #334155;
  line-height: 1.4;
  font-size: 0.8rem;
  flex: 1;
}

/* 2. Indicador de Conexión en Faena / Estado Offline */
.sync-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.sync-status-indicator.offline {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}
.sync-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}
.sync-status-indicator.offline .sync-status-dot {
  background: #ef4444;
  animation: pulse 1.5s infinite;
}

/* 3. Estados Neutros de Controles (Sin Responder) */
.mining-check-card.is-unanswered {
  border-left: 6px solid #cbd5e1;
  background: #ffffff;
}
.mining-check-card.is-unanswered .tag-step-badge {
  background: #f1f5f9;
  color: #475569;
}

/* 4. Ergonomía para Guantes Mineros */
.btn-touch-action {
  min-height: 52px;
  min-width: 82px;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}
.touch-choice-group {
  display: flex;
  gap: 10px;
}

/* 5. Marca de Agua y Entorno Demo */
.demo-environment-watermark {
  background: repeating-linear-gradient(
    45deg,
    #fffbeb,
    #fffbeb 20px,
    #fef3c7 20px,
    #fef3c7 40px
  );
  border-bottom: 2px dashed #f59e0b;
  padding: 0.75rem 1rem;
  text-align: center;
  font-weight: 800;
  color: #92400e;
  font-size: 0.86rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* 6. Validador RUT en Línea */
.rut-feedback {
  font-size: 0.76rem;
  margin-top: 4px;
  font-weight: 700;
}
.rut-feedback.valid {
  color: #059669;
}
.rut-feedback.invalid {
  color: #dc2626;
}
.auth-form-input.is-invalid, .config-input.is-invalid {
  border-color: #dc2626 !important;
  background-color: #fef2f2 !important;
}

/* 7. Metadatos de Validación Técnica PTS / EDRF */
.doc-validation-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}
.doc-validation-badge.validated {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #86efac;
}
.doc-validation-badge.pending {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

/* 8. Panel de Firma Digital del Trabajador en Check List (DS 132) */
.checklist-signature-panel {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.checklist-signature-panel:hover {
  border-color: #94a3b8;
}

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

.chk-signature-canvas {
  width: 100%;
  height: 150px;
  background: #ffffff;
  border: 2px dashed #94a3b8;
  border-radius: var(--radius-md);
  cursor: crosshair;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  display: block;
}

.chk-signature-canvas.has-signature {
  border-color: #059669;
  border-style: solid;
  background: #fbfdfc;
}

.checklist-signature-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 6px;
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  transition: all 0.2s ease;
}

.checklist-signature-badge.signed {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

@media (max-width: 768px) {
  .checklist-signature-panel {
    padding: 1rem;
    margin-top: 1rem;
  }
  .chk-signature-canvas {
    height: 125px;
  }
}



