:root {
  --primary: #2563eb;
  --secondary: #3b82f6;
  --background: #ffffff;
  --surface: #ffffff;
  --error: #dc2626;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Estado de Pre-Aviso (Amarillo) */
.warning-state {
  background-color: var(--warning-bg) !important;
  border: 2px solid var(--warning) !important;
  animation: pulseWarning 2s infinite;
}

@keyframes pulseWarning {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 160, 0, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(255, 160, 0, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 160, 0, 0);
  }
}

/* Banner Sin Conexión */
#offline-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--error);
  color: white;
  text-align: center;
  padding: 5px;
  font-weight: bold;
  z-index: 9999;
  font-size: 0.9rem;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 5px;
  box-sizing: border-box;
}

/* Contenedor Compacto */
.container {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  padding: 12px;
  padding-bottom: 140px;
  /* Evitar que el FAB tape botones inferiores */
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  box-sizing: border-box;
  margin-bottom: 15px;
}

.config-header-framed {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.header-top-row {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.header-logo-main {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-title-group {
  flex: 1;
}

.header-title-group h1 {
  font-size: 1.1rem !important;
  margin: 0 !important;
  color: var(--text-main);
  font-weight: 800;
  text-align: left !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.last-sync-label-compact {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.btn-help-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: white;
  color: var(--text-muted);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-help-circle:active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.status-grid-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.status-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.58rem;
  color: #888;
}

.status-label-text {
  font-weight: 600;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5e1;
}

.status-dot.connected {
  background: #22c55e;
}

.btn-icon {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
}

/* Inputs Super Compactos */
/* Bloques de Contacto */
.contact-block {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.contact-block.contacto-oculto {
  display: none !important;
}

.contact-block label {
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contact-block label span.optional {
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.btn-add-contact {
  width: 100%;
  padding: 8px;
  background: none;
  border: 1px dashed var(--primary);
  color: var(--primary);
  font-size: 0.8rem;
  margin-bottom: 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-add-contact:hover {
  background: rgba(37, 99, 235, 0.05);
}

.btn-add-contact.contacto-oculto {
  display: none !important;
}

.last-sync-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 5px;
  margin-bottom: 5px;
}

.last-sync-label span {
  font-weight: 700;
  color: var(--primary);
}

label {
  display: block;
  margin-bottom: 2px;
  color: #2563eb;
  font-size: 0.8rem;
  font-weight: 500;
}

input,
select {
  width: 100%;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 0.9rem;
  box-sizing: border-box;
}

button {
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

.btn-save,
.btn-activar {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  font-size: 1rem;
  margin-top: 8px;
  text-transform: uppercase;
  border-radius: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-sos {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #ff4b4b, #b00020);
  color: white;
  border-radius: 10px;
  font-size: 1.1rem;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 15px rgba(176, 0, 32, 0.4);
}

.btn-sos small {
  font-size: 0.7rem;
  font-weight: normal;
  margin-top: 2px;
}

.btn-danger {
  padding: 12px;
  background: var(--error);
  color: white;
  font-size: 0.85rem;
}

.btn-secondary {
  width: 100%;
  padding: 10px;
  background: var(--border);
  color: var(--text-main);
  margin-top: 4px;
}

.btn-back-arrow {
  background: #e5e7eb;
  border: 1px solid #d1d5db;
  color: #374151;
  font-size: 0.85rem;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  margin-top: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

.btn-back-arrow:hover {
  background: #f8fafc;
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-back-arrow:active {
  background: var(--border);
  transform: scale(0.9);
}

/* Selector Tiempo - Cuadrícula 5 columnas */
.duration-selector {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.btn-duration {
  padding: 8px;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.btn-duration.active {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
}

/* Login */
.auth-box {
  width: 100%;
  max-width: 350px;
  background: var(--surface);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
}

.auth-logo {
  width: 54px;
  height: 54px;
  margin-bottom: 12px;
}

.auth-box h2 {
  font-size: 1.3rem;
  margin: 0 0 20px 0;
  color: var(--primary);
}

.btn-auth {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  font-size: 1rem;
  margin-top: 15px;
}

/* Panel Vigilancia */
#alarma-box {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--error);
  padding: 20px;
  border-radius: 15px;
  z-index: 2000;
  width: 85%;
  max-width: 300px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

#alarma-box h2,
#alarma-box p,
#alarma-box #timer {
  color: white;
}

.timer-box {
  background: var(--surface);
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  margin: 15px 0;
  border: 1px solid var(--border);
}

#timer {
  font-size: 2.2rem;
  font-family: 'Roboto Mono', monospace;
  font-weight: 700;
  margin: 5px 0;
}

.btn-main {
  width: 100%;
  padding: 11px;
  background: var(--secondary);
  color: white;
  border-radius: 30px;
  font-size: 1.1rem;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btn-main small {
  font-size: 0.75rem;
  opacity: 0.8;
}


/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 5000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: var(--surface);
  margin: 15px;
  padding: 20px;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 350px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  animation: slideIn 0.3s;
}

@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.help-section {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 15px;
}

.help-section:last-child {
  border-bottom: none;
}

.help-section h3 {
  color: var(--secondary);
  margin-top: 0;
  font-size: 1rem;
}

.help-section p {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text-main);
  margin: 5px 0;
}

/* Botón Ayuda en Cabecera */
.btn-help-header {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-help-header:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: scale(1.1);
}

/* Banner de Instalación PWA PROFESIONAL */
#install-banner {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  width: 90%;
  max-width: 400px;
  background: var(--surface);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#install-banner.show {
  display: flex !important;
  flex-direction: column;
  transform: translateX(-50%) translateY(0);
}

.install-content {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.install-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--background);
}

.install-text h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--primary);
}

.install-text p {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.install-actions {
  display: flex;
  gap: 8px;
}

.btn-install-confirm {
  flex: 2;
  background: var(--primary);
  color: white !important;
  padding: 10px;
  font-size: 0.9rem;
}

.btn-install-dismiss {
  flex: 1;
  background: var(--border);
  color: var(--text-main) !important;
  padding: 10px;
  font-size: 0.9rem;
}

/* ================================================
   ALARM CARDS — Sistema Activo
   ================================================ */
.alarm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 20px;
  margin: 8px 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Tarjeta temporizador */
.alarm-card--timer {
  text-align: center;
  border-left: 4px solid #22c55e;
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.alarm-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #16a34a;
  background: #dcfce7;
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 12px;
}

.alarm-timer-display {
  font-size: 3.4rem;
  font-weight: 800;
  font-family: 'Roboto Mono', monospace;
  color: #2563eb;
  line-height: 1;
  margin: 0;
}

.alarm-timer-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
}

/* Tarjeta progreso */
.alarm-card--progress {
  padding: 14px 18px;
}

.alarm-progress-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-bottom: 4px;
}

.alarm-progress-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
}

.alarm-progress-subtitle {
  font-size: 0.5rem;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
}

/* Linear Progress Style */
.linear-progress-stack {
  width: 100%;
  max-width: 320px;
  margin: 10px auto 30px;
  /* Reducido arriba, más espacio abajo */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.progress-bars-container {
  width: 90%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: relative;
  padding-top: 15px;
  /* Espacio para los labels arriba */
}

.progress-bar-wrapper {
  width: 100%;
  height: 14px;
  /* Única barra, más gruesa */
  background: #ccd3de;
  /* Gris track más visible */
  border-radius: 7px;
  overflow: visible;
  /* Permitir emoji visible fuera */
  border: 1px solid #99a;
  position: relative;
}

.progress-bar-track {
  position: relative;
  margin-top: 8px;
}

.bar-runner {
  position: absolute;
  top: -18px;
  left: 0%;
  /* Empieza en la izquierda (100%) y va hacia la derecha */
  transform: translateX(-50%) scaleX(-1);
  /* Espejo: corre hacia la derecha */
  font-size: 1.1rem;
  transition: left 1s linear;
  pointer-events: none;
  z-index: 10;
  line-height: 1;
}

.progress-markers {
  display: flex;
  justify-content: space-between;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.marker-label {
  font-size: 0.7rem;
  color: #888;
  /* Más oscuro para que se vea el texto */
  font-weight: 700;
  position: relative;
}

/* Centrar específicamente el 50% */
.marker-label:nth-child(2) {
  left: 2px;
}

.progress-bar-fill {
  position: absolute;
  right: 0;
  /* Anclado a la derecha — mengua por la izquierda */
  top: 0;
  height: 100%;
  width: 100%;
  background-color: #22c55e !important;
  border-radius: 5px;
  transition: width 1s linear;
  display: block;
}

.progress-bar-fill.warning {
  background-color: #ffa000 !important;
}

.progress-bar-fill.critical {
  background-color: #ef4444 !important;
  /* Rojo más brillante */
}

#timer-display-main {
  font-size: 3.2rem;
  font-weight: 800;
  font-family: 'Roboto Mono', monospace;
  color: #2563eb;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  line-height: 1;
}

.timer-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  z-index: 100;
  margin-bottom: 5px;
}

.timer-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  margin-top: 2px;
  letter-spacing: 1px;
}



.status-indicator {
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pulse {
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(76, 175, 80, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
  }
}

/* --- MODO COMPACTO (MÓVIL PEQUEÑO) --- */
@media (max-width: 400px) {
  body {
    padding: 2px;
  }

  .container {
    padding: 8px 10px;
    margin-bottom: 10px;
  }

  .header {
    margin-bottom: 5px;
    padding-bottom: 5px;
  }

  .header h1 {
    font-size: 0.95rem;
  }

  label {
    font-size: 0.72rem;
    margin-bottom: 1px;
  }

  input,
  select,
  textarea {
    padding: 6px;
    font-size: 0.8rem;
  }

  .form-group {
    margin-bottom: 6px;
  }

  .btn-activar,
  .btn-save,
  .btn-main,
  .btn-auth,
  .btn-secondary {
    padding: 8px 10px;
    font-size: 0.85rem;
    border-radius: 10px;
  }

  .btn-sos {
    padding: 6px;
    font-size: 0.95rem;
    margin: 4px 0;
  }

  .btn-sos small {
    font-size: 0.65rem;
  }

  .btn-duration {
    padding: 5px;
    font-size: 0.75rem;
  }

  .circular-progress-container {
    width: 190px;
    height: 190px;
    margin: 5px auto;
  }

  #timer-display-main {
    font-size: 2rem;
  }

  .timer-label {
    font-size: 0.65rem;
  }

  #panelVigilancia .status-indicator {
    font-size: 0.7rem;
  }

  #alarma-box {
    padding: 12px;
    width: 90%;
  }

  #alarma-box h2 {
    font-size: 1rem;
  }

  #alarma-box #timer {
    font-size: 1.8rem;
  }

  .auth-box {
    padding: 15px;
  }

  .auth-logo {
    width: 44px;
    height: 44px;
    margin-bottom: 8px;
  }

  .auth-box h2 {
    font-size: 1.1rem;
    margin-bottom: 15px;
  }
}

/* --- FLOATING ACTION BUTTONS (FAB) --- */
#fab-container {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 90%;
  max-width: 360px;
  z-index: 3000;
  pointer-events: none;
}

.fab {
  pointer-events: auto;
  width: 100%;
  padding: 15px;
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.fab:active {
  transform: scale(0.95);
}

.fab-sos {
  background: linear-gradient(135deg, #ff4b4b, #b00020);
  color: white;
  font-size: 1.2rem;
  min-height: 60px;
}

.fab-sos.pressing {
  animation: fabColorChange 2s linear forwards;
}

@keyframes fabColorChange {
  0% {
    background-color: #ff4b4b;
  }

  50% {
    background-color: #ffa000;
  }

  100% {
    background-color: #ffeb3b;
  }
}

.fab-sos-mini {
  background: linear-gradient(135deg, #ff4b4b, #b00020);
  color: white;
  font-size: 0.9rem;
  padding: 15px;
  /* Igual que .fab */
  flex: 0 0 calc(50% - 4px) !important;
  max-width: calc(50% - 4px);
}

.fab-sos-mini.pressing {
  animation: fabColorChange 2s linear forwards;
}

.fab-activar {
  background: var(--primary);
  color: white;
  font-size: 1rem;
  animation: fabPulse 1.2s ease-in-out infinite;
}

@keyframes superPulse {
  0% {
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    transform: scale(1);
  }

  25% {
    transform: scale(1.08) rotate(1deg);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.8);
  }

  50% {
    transform: scale(1.05) rotate(-1deg);
    box-shadow: 0 4px 40px rgba(37, 99, 235, 1);
  }

  75% {
    transform: scale(1.08) rotate(1deg);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.8);
  }

  100% {
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    transform: scale(1);
  }
}

.btn-activar-inline {
  width: 100%;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--primary), #1d4ed8);
  color: white;
  border-radius: 40px;
  font-size: 1.2rem;
  font-weight: 900;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.35);
  animation: superPulse 2s ease-in-out infinite;
  transition: transform 0.2s ease, filter 0.2s ease;
  display: block;
  margin: 15px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-activar-inline:active {
  transform: scale(0.92);
  animation: none;
  filter: brightness(0.9);
}

.fab-desactivar {
  background: white;
  color: var(--error);
  border: 1px solid var(--error);
  font-size: 0.9rem;
  padding: 15px;
  flex: 0 0 calc(50% - 4px) !important;
  max-width: calc(50% - 4px);
}

.fab-secondary-group {
  display: flex;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.btn-sos-narrow {
  width: 140px;
  height: 48px;
  border-radius: 24px;
  background: linear-gradient(90deg, #ff4b4b, #d32f2f);
  color: white;
  border: 1px solid #ff4b4b;
  /* Consistencia */
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.sos-label {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 1px;
  z-index: 2;
  pointer-events: none;
}

.btn-sos-narrow:active {
  transform: scale(0.96);
}

.sos-progress-narrow {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.3);
  transition: width 0.1s linear;
}

.footer-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 30px 0 10px;
  padding: 0;
}

.footer-actions.framed {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 25px;
  margin-top: 25px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 15px;
}

.action-item-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.action-hint-footer {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-align: center;
}

.sos-container-footer {
  text-align: center;
}

.sos-footer-hint {
  display: block;
  color: var(--text-muted);
  font-size: 0.65rem;
  margin-top: 5px;
}

.btn-footer {
  height: 52px !important;
  width: 140px !important;
  border-radius: 26px !important;
  border: 1px solid #d1d5db;
  cursor: pointer;
  font-weight: 800;
  transition: all 0.2s ease;
  padding: 0 !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.btn-desactivar-footer {
  width: 140px;
  background: #e5e7eb !important;
  /* Gris más oscuro para que se vea */
  color: #374151;
  border: 1px solid #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-desactivar-footer:active {
  transform: scale(0.96);
}

.sos-progress-fab {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.5);
  width: 0%;
}

#fab-container.hidden {
  display: none;
}