/* ESTILOS DE LA APP CIUDADANO (MÓVIL) */
:root {
  --primary-red: #d32f2f;
  --dark-red: #b71c1c;
  --bg-dark: #121212;
  --card-bg: #1e1e1e;
  --text-main: #f5f5f5;
  --text-muted: #a0a0a0;
  --green: #2e7d32;
  --yellow: #f57f17;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body.mobile-body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
}

.app-container {
  width: 100%;
  max-width: 420px;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.app-header {
  text-align: center;
  padding: 16px 0 10px;
}

.header-badge {
  display: inline-block;
  background: rgba(211, 47, 47, 0.2);
  color: #ff5252;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}

.header-title {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  margin-top: 4px;
}

.header-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 24px 20px;
  border: 1px solid #2a2a2a;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.card-title {
  font-size: 20px;
  margin-bottom: 8px;
  color: #fff;
}

.card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 20px;
}

.input-group {
  margin-bottom: 14px;
  text-align: left;
}

.input-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #ccc;
  margin-bottom: 6px;
}

.input-group input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #3a3a3a;
  background: #141414;
  color: #fff;
  font-size: 15px;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary-red);
}

.btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--primary-red);
  color: #fff;
}

.btn-primary:active {
  background: var(--dark-red);
  transform: scale(0.98);
}

.btn-secondary {
  background: #2a2a2a;
  color: #fff;
  margin-top: 10px;
}

.btn-text {
  background: transparent;
  color: var(--text-muted);
  margin-top: 12px;
}

.login-toggle {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.login-toggle a {
  color: #ff5252;
  text-decoration: none;
  font-weight: 600;
}

/* BOTÓN SOS */
.sos-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.sos-instructions {
  text-align: center;
  margin-bottom: 24px;
}

.inst-highlight {
  font-size: 16px;
  font-weight: 800;
  color: #ff5252;
  letter-spacing: 0.5px;
}

.inst-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.sos-button-container {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg);
}

.progress-ring-bar {
  stroke-dasharray: 691.15;
  stroke-dashoffset: 691.15;
  transition: stroke-dashoffset 0.05s linear;
}

.sos-main-button {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ef5350, #b71c1c);
  border: 4px solid #ff867c;
  color: #fff;
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(183, 28, 28, 0.6);
  user-select: none;
  outline: none;
  z-index: 10;
}

.sos-countdown {
  margin-top: 24px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.user-badge {
  margin-top: 30px;
  background: rgba(255,255,255,0.05);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.link-btn {
  background: none;
  border: none;
  color: #ff5252;
  font-size: 12px;
  cursor: pointer;
}

/* ALERTA ACTIVA */
.alert-card-active {
  border: 2px solid var(--primary-red);
  background: #1c1414;
}

.pulse-indicator {
  color: #ff5252;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 1px;
  margin-bottom: 12px;
  animation: parpadeo 1.2s infinite;
}

@keyframes parpadeo {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.info-box {
  background: #242424;
  padding: 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
  margin: 16px 0;
  text-align: left;
}

.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-content {
  background: #222;
  padding: 24px;
  border-radius: 16px;
  max-width: 320px;
  width: 90%;
  text-align: center;
}

.modal-content input {
  width: 100%;
  padding: 12px;
  margin: 16px 0;
  border-radius: 8px;
  border: 1px solid #444;
  background: #111;
  color: #fff;
  font-size: 20px;
  text-align: center;
  letter-spacing: 6px;
}

.modal-actions {
  display: flex;
  gap: 10px;
}
