

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

/* Fondo general */
.login-body-bg {
  font-family: 'Roboto', sans-serif;
  color: #111;
  background-image: url('../assets/imagenes/perritos-varios/fondo-web.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
}


/* Responsive */
@media (max-width: 768px) {
  .login-card {
    margin-top: 20px;
  }
}

@media (max-width: 480px) {
  .login-title {
    font-size: 22px;
  }

  .login-btn {
    font-size: 16px;
  }

  .login-img {
    max-width: 100%;
    border-radius: 12px;
  }
}

/* card */


:root {
  --main-color: #f4b400;
  --text-color: #333;
  --bg-body: #1e1e1e;
  --bg-card: #fff;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, sans-serif;
}

body {
  background-color: var(--bg-body);
  min-height: 100vh;
}


.tab {
  width: 100%;
  max-width: 1000px;
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  margin-bottom: 60px; /* Espacio entre la tarjeta y el footer */
}

/* Layout principal */
.tab-layout {
  display: grid;
  grid-template-columns: 1.3fr 1.7fr;
  width: 100%;
  min-height: 650px;
}

/* Imagen lateral */
.tab-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease;
}

/* Panel derecho */
.tab-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  height: 100%;
}

/* Encabezado de pestañas */
.tab-header {
  display: flex;
  justify-content: space-around;
  border-bottom: 2px solid #ddd;
  padding: 10px 0;
}

.tab-header li {
  list-style: none;
}

.tab-btn {
  border: none;
  background: none;
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-color);
  border-radius: 8px;
  transition: background 0.3s;
}

.tab-btn[data-active="true"] {
  background-color: var(--main-color);
  color: #fff;
}

/* Contenido de pestañas */
.tabs-content {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.tabs-content section {
  position: relative;   /* ← ESTE ES EL ARREGLO PRINCIPAL */
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.4s ease;
  padding: 40px;
  display: none;
}

.tabs-content section[data-active="true"] {
  opacity: 1;
  transform: translateX(0);
  display: block;
  z-index: 2;
}

/* Formulario */
.tab-form h2 {
  margin-bottom: 25px;
  color: var(--text-color);
}

.form-row {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

input {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
}

button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background-color: var(--main-color);
  color: white;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  opacity: 0.9;
}

.btn-next {
  align-self: flex-end;
  margin-top: 10px;
}

/* Pantalla de éxito */
.success-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 40px; /* 👈 Espacio entre el texto y la imagen */
  padding: 40px 20px;
}

/* Título */
.success-content h2 {
  color: var(--text-color);
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0;
}

/* Contenedor del ícono */
.success-icon {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Imagen de éxito */
.success-icon img {
  width: 750px; /* Ajusta el tamaño del icono */
  height: auto;
  filter: drop-shadow(0 0 8px rgba(131, 96, 21, 0.25));
  animation: zoomIn 0.6s ease-out;
}

/* Animación de entrada */
@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsivo */
@media (max-width: 900px) {
  .tab-layout {
    grid-template-columns: 1fr;
  }

  .tab-image {
    display: none;
  }

  .tab {
    max-width: 500px;
    height: auto;
  }
}

.link-registro {
  margin-top: 20px;
  text-align: center;
  color: var(--text-color);
  font-size: 0.95rem;
}

.link-registro a {
  color: var(--main-color);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}


/* para mostrar en rojo espacios sin llenar*/

.input-error {
  border: 2px solid red !important;
}


/* === Animación de campos de texto === */
.form-group {
  position: relative;
  flex: 1;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1.5px solid #ccc;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: transparent;
  outline: none;
}

/* Efecto de borde amarillo al pasar el mouse o enfocar */
.form-group input:hover,
.form-group input:focus {
  border-color: var(--main-color);
  box-shadow: 0 0 5px rgba(244, 180, 0, 0.5);
}

/* Label flotante */
.form-group label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  pointer-events: none;
  transition: all 0.3s ease;
  background-color: var(--bg-card);
  padding: 0 4px;
}

/* Cuando el campo está enfocado o tiene texto */
.form-group input:focus + label,
.form-group input:valid + label {
  top: -8px;
  left: 10px;
  font-size: 0.8rem;
  color: var(--main-color);
  font-weight: 600;
  transform: none;
}

/* Mejora en móviles */
@media (max-width: 600px) {
  .form-group label {
    font-size: 0.9rem;
  }
}

/* --- Ajustes pro, sin cambiar paleta --- */

/* separa la card del navbar */
.tab { margin-top: 40px; }

/* estado inválido consistente */
input.is-invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 .2rem rgba(220,53,69,.1);
}

/* mensajes de error + pista */
.error-text { display: none; color: #dc3545; font-size: .85rem; margin-top: 6px; }
.hint { display:block; color:#7a7a7a; font-size:.85rem; margin-top:6px; }

/* botón ojo dentro del input */
.form-group.with-toggle { position: relative; width: 100%; }
.form-group.with-toggle input { padding-right: 56px; }
.toggle-password{
  position: absolute;
  right: 10px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--main-color);
  font-weight: 700; cursor: pointer; padding: 4px 6px;
}
.toggle-password:hover { opacity:.8; }


/* Estados verde/rojo */
.password-requirements li.valid {
  color: green;
  font-weight: 600;
}

.password-requirements li.invalid {
  color: red;
  font-weight: 600;
}

/* --- Overrides locales para que el footer quede debajo del login --- */
body.login-body-bg { 
  /* Anula el body:flex del Navbar.css solo en esta página */
  display: block; 
}

.tab { 
  margin: 40px auto 80px; /* respiro abajo para el footer */
}

/* --- Forzar que el link de recuperación quede debajo del input --- */
.form-row .text-end{
  flex-basis: 100%;     /* ocupar ancho completo -> nueva línea */
  margin-top: 6px;      /* separarlo del input */
}

/* Respiro para la pista bajo el campo */
.hint{ margin-top: 6px; }

/* --- Alerta global arriba del formulario --- */
#login-global{ margin: 8px 0 12px; }

/* --- CORRECCIÓN DE ALINEACIÓN PARA CONTRASEÑA --- */
.form-row {
  display: flex;
  flex-direction: column; /* fuerza apilado vertical */
  align-items: flex-start; /* alinea al borde izquierdo */
}

.with-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  position: relative;
}

.hint {
  margin-top: 6px;
  font-size: 0.9rem;
  color: #777;
  display: block;
}

/* --- UNIFICAR ANCHO DE CAMPOS DE FORMULARIO --- */
.form-row {
  display: flex;
  flex-direction: column;
  align-items: stretch; /* fuerza que los elementos ocupen todo el ancho */
  width: 100%;
}

.form-group {
  width: 100%; /* asegura que el input use todo el espacio disponible */
  position: relative;
}

.form-group input {
  width: 100%; /* estira el input completamente */
  box-sizing: border-box; /* evita que el padding sume al ancho */
}
/* === Para permitir filas con 2 columnas === */
.form-row.row-2col {
  flex-direction: row !important;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
/* Lista con requisitos de contraseña */
.password-requirements {
  display: none;             /* Oculta inicialmente */
  font-size: 12px;           
  color: #777;              
  margin-top: 5px;
  margin-left: 4px;
  line-height: 1.3;
}

.password-requirements li {
  margin-bottom: 2px;
}

.d-none {
  display: none;
}
