/* ═══════════════════════════════════════════════════════════════════════════
   wopapp — Estilos comunes de auth (login, setup, reset, recuperar)
   Mobile-first · Modo oscuro · Colores institucionales WOPE
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --wope-naranja: #F0A418;
  --wope-purpura: #4607C7;
  --wope-negro: #242424;
  --wope-gris: #C4C4C4;
  --wope-hueso: #EFEFEF;

  --bg: #1a1a1a;
  --bg-elevado: #2a2a2a;
  --bg-input: #333;
  --texto: var(--wope-hueso);
  --texto-suave: #999;
  --texto-tenue: #666;
  --borde: #3a3a3a;
  --borde-foco: var(--wope-naranja);
  --error: #FF6B6B;
  --exito: #5DCAA5;

  --radio: 12px;
  --radio-sm: 8px;
}

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

html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--texto);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  -webkit-font-smoothing: antialiased;
}

.tarjeta {
  width: 100%;
  max-width: 420px;
  background: var(--bg-elevado);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 32px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.logo {
  text-align: center;
  margin-bottom: 24px;
}
.logo__nombre {
  font-size: 28px;
  font-weight: 700;
  color: var(--wope-naranja);
  letter-spacing: -0.02em;
}
.logo__sub {
  font-size: 12px;
  color: var(--texto-suave);
  margin-top: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.titulo {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}
.subtitulo {
  font-size: 14px;
  color: var(--texto-suave);
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.5;
}

.campo {
  margin-bottom: 16px;
}
.campo__label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--texto-suave);
}
.campo__input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--borde);
  border-radius: var(--radio-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 16px; /* 16px para evitar zoom en iOS */
  color: var(--texto);
  transition: border-color 0.15s, background 0.15s;
}
.campo__input:focus {
  outline: none;
  border-color: var(--borde-foco);
  background: #3a3a3a;
}
.campo__input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.campo__error {
  font-size: 12px;
  color: var(--error);
  margin-top: 4px;
  min-height: 16px;
}
.campo__pista {
  font-size: 12px;
  color: var(--texto-tenue);
  margin-top: 4px;
}

.password-wrapper {
  position: relative;
}
.password-wrapper__toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--texto-suave);
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
}

.boton {
  width: 100%;
  background: var(--wope-naranja);
  color: var(--wope-negro);
  border: none;
  border-radius: var(--radio-sm);
  padding: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  margin-top: 8px;
}
.boton:hover { opacity: 0.92; }
.boton:active { transform: scale(0.98); }
.boton:disabled { opacity: 0.4; cursor: not-allowed; }

.boton--secundario {
  background: transparent;
  color: var(--texto-suave);
  border: 1px solid var(--borde);
}
.boton--secundario:hover {
  border-color: var(--texto-suave);
  color: var(--texto);
}

.enlaces {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  font-size: 13px;
}
.enlaces a {
  color: var(--wope-naranja);
  text-decoration: none;
  font-weight: 500;
}
.enlaces a:hover { text-decoration: underline; }

.alerta {
  border-radius: var(--radio-sm);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.alerta--error {
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: var(--error);
}
.alerta--exito {
  background: rgba(93, 202, 165, 0.12);
  border: 1px solid rgba(93, 202, 165, 0.3);
  color: var(--exito);
}
.alerta--info {
  background: rgba(70, 7, 199, 0.15);
  border: 1px solid rgba(70, 7, 199, 0.3);
  color: #b19fe8;
}

.oculto { display: none !important; }

.loader-inline {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(36, 36, 36, 0.3);
  border-top-color: var(--wope-negro);
  border-radius: 50%;
  animation: girar 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes girar { to { transform: rotate(360deg); } }

.pie {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--texto-tenue);
}
.pie a {
  color: var(--texto-tenue);
  text-decoration: none;
}

.password-fuerza {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}
.password-fuerza__barra {
  flex: 1;
  height: 3px;
  background: var(--borde);
  border-radius: 2px;
  transition: background 0.2s;
}
.password-fuerza__barra.activa-debil { background: var(--error); }
.password-fuerza__barra.activa-media { background: var(--wope-naranja); }
.password-fuerza__barra.activa-fuerte { background: var(--exito); }
