/* login.css */

.auth-page {
  min-height: 100vh;
  margin: 0;
  background-color: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lato', sans-serif;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background-color: #fff;
  border: 2px solid #7a1f2b;
  border-radius: 14px;
  padding: 32px 32px 32px;
  box-sizing: border-box;
  position: relative;
  margin: 24px;
}

/* TITLE */

.auth-card h1 {
  text-align: center;
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: #7a1f2b;
  margin: 0 0 12px 0;
  letter-spacing: 0.02em;
}

/* LOGO */

.auth-card .brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.auth-card .brand-mark img {
  max-width: 220px;
  height: auto;
}

/* FIELDS */

.field {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.field label {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: #7a1f2b;
  flex: 0 0 150px;
  text-align: left;
}

.field-input {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.field-input input {
  width: 100%;
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  color: #333;
  padding: 8px 12px;
  border: 1.5px solid #7a1f2b;
  border-radius: 6px;
  box-sizing: border-box;
  outline: none;
}

.field-input input:focus {
  box-shadow: 0 0 0 2px rgba(122, 31, 43, 0.2);
}

/* SUBMIT BUTTON */

.auth-actions {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.auth-actions .btn {
  padding: 10px 32px;
}

/* FOOTER */

.auth-footer {
  text-align: center;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: #7a1f2b;
  margin: 20px 0 0 0;
}

.auth-footer a {
  color: #7a1f2b;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-left: 4px;
}

/* RESPONSIVE */

@media (max-width: 520px) {
  .field {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .field label {
    flex: none;
  }
}

.forgot-password-link {
  text-align: right;
  margin-top: -6px;
  margin-bottom: 12px;
}

.forgot-password-link a {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: #7a1f2b;
  text-decoration: underline;
}

/* INSTRUCTIONS */
.auth-instruction {
  text-align: center;
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 20px;
  line-height: 1.4;
}

.form-error {
  background-color: #fdf2f2;
  border: 1px solid #7a1f2b;
  color: #7a1f2b;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
}

/* Estilos para el campo contenedor */
.field-input {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.field-input input[type="password"],
.field-input input[type="text"] {
  width: 100%;
  padding-right: 45px !important; 
  box-sizing: border-box;
}

.toggle-password {
  position: absolute;
  right: 12px; 
  background: transparent !important; 
  border: none !important; 
  outline: none !important;
  box-shadow: none !important; 
  padding: 6px !important;
  margin: 0 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.1s ease;
  color: #7a1f2b !important; 
  opacity: 0.8;
  z-index: 5;
}

.toggle-password:hover {
  opacity: 1;
  transform: scale(1.1); 
}

.toggle-password:active {
  transform: scale(0.95);
}

.toggle-password svg {
  display: block;
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* RESPONSIVE LOGIN */
.auth-card {
  min-width: 0;
}

.auth-card h1,
.form-error {
  overflow-wrap: anywhere;
}

.brand-lockup,
.brand-mark {
  min-width: 0;
  max-width: 100%;
}

.auth-card .brand-mark img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
}

.field,
.field-input {
  min-width: 0;
}

.field-input input {
  max-width: 100%;
}

/* TABLET */
@media (max-width: 768px) {
  .auth-page {
    min-height: 100vh;
    padding: 1rem 0;
    box-sizing: border-box;
  }

  .auth-card {
    width: calc(100% - 2rem);
    max-width: 480px;
    margin: 1rem;
  }
}

/* MOBILE */
@media (max-width: 520px) {
  .auth-card {
    padding: 24px 22px 26px;
  }

  .auth-card h1 {
    font-size: 1.2rem;
    line-height: 1.35;
  }

  .auth-card .brand-mark img {
    max-width: min(220px, 100%);
  }

  .field {
    width: 100%;
  }

  .field label {
    flex: none;
  }

  .field-input {
    width: 100%;
  }

  .forgot-password-link {
    margin-top: 0;
  }

  .auth-actions .btn {
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* VERY NARROW SCREENS */
@media (max-width: 360px) {
  .auth-card {
    width: calc(100% - 1.25rem);
    margin: 0.625rem;
    padding: 20px 14px 22px;
  }

  .auth-card h1 {
    font-size: 1.1rem;
  }

  .field-label {
    font-size: 0.85rem;
  }

  .field-input input {
    font-size: 0.85rem;
  }

  .forgot-password-link a {
    font-size: 0.78rem;
  }

  .auth-actions .btn {
    width: 100%;
    padding: 10px 16px;
  }

  .auth-footer {
    line-height: 1.5;
  }
}