/* =========================================================
   ESTILOS DE LOGIN
   ========================================================= */

#middle {
  background-color: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 40px 20px;
}

#loginCard {
  background: var(--phi-card, rgba(9, 24, 54, 0.92));
  box-shadow: 0px 12px 34px var(--phi-shadow, rgba(0, 0, 0, 0.28));
  border: 1px solid var(--phi-border, rgba(255, 255, 255, 0.14));
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  padding: 45px 35px;
  margin: 0 auto;
}

#loginCard .title {
  font-family: var(--phi-font);
  font-weight: 700;
  font-size: 24px;
  color: var(--phi-text, #EAF1FF);
  text-align: center;
  margin-bottom: 5px;
}

#loginCard .description {
  font-family: var(--phi-font);
  text-align: center;
  font-size: 15px;
  color: var(--phi-text-muted, #B8C7E6);
  margin-bottom: 30px;
}

#loginCard input[type="text"],
#loginCard input[type="password"] {
  font-family: var(--phi-font);
  padding: 14px 20px;
  border-radius: 8px;
  border: 1px solid var(--phi-border, rgba(255, 255, 255, 0.14));
  background-color: var(--phi-input-bg, rgba(234, 241, 255, 0.08));
  color: var(--phi-text, #EAF1FF);
  caret-color: var(--phi-accent, #8FB7FF);
  display: block;
  margin: 15px 0;
  width: 100%;
  font-size: 15px;
  transition: all 0.2s ease;
}

#loginCard input::placeholder {
  color: var(--phi-text-muted, #B8C7E6);
  opacity: 0.95;
}

#loginCard input:focus {
  outline: none;
  border-color: var(--phi-accent, #8FB7FF);
  background-color: var(--phi-input-bg-focus, rgba(234, 241, 255, 0.13));
  box-shadow: 0 0 0 3px rgba(143, 183, 255, 0.22);
}

#loginCard input:-webkit-autofill,
#loginCard input:-webkit-autofill:hover,
#loginCard input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--phi-text, #EAF1FF);
  box-shadow: 0 0 0 1000px #0B1F49 inset;
  border-color: var(--phi-border-strong, rgba(143, 183, 255, 0.38));
}

#btnSignin {
  font-family: var(--phi-font);
  background-color: var(--phi-accent, #8FB7FF);
  padding: 15px 30px;
  font-weight: 600;
  font-size: 16px;
  color: var(--phi-bg, #030B1D);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
  width: 100%;
  transition: background-color 0.2s, transform 0.1s;
}

#btnSignin:hover {
  background-color: var(--phi-primary-2);
  color: var(--phi-text, #EAF1FF);
}

#btnSignin:active {
  transform: translateY(1px);
}

#formSignin {
  text-align: center;
}

.link {
  font-family: var(--phi-font);
  font-size: 13px;
  color: var(--phi-accent, #8FB7FF);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}

.link:hover {
  text-decoration: underline;
}

.noUnderline {
  text-decoration: none !important;
}

.font-14 {
  font-size: 14px !important;
}

#forgotPasswordContainer {
  text-align: right;
  margin-bottom: 25px;
  margin-top: 5px;
}

#registerContainer {
  font-family: var(--phi-font);
  font-size: 14px;
  color: var(--phi-text-muted, #B8C7E6);
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid var(--phi-border, rgba(255, 255, 255, 0.14));
}

.error-message {
  color: var(--phi-danger, #FF8A8A);
  margin-bottom: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
}

.success-message {
  color: var(--phi-success, #76D99A);
  margin-bottom: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
}

@media (max-width: 768px) {
  #middle {
    min-height: auto;
    padding: 24px 16px 96px;
    align-items: flex-start;
  }

  #loginCard {
    max-width: 100%;
    padding: 32px 20px;
    border-radius: 14px;
  }

  #forgotPasswordContainer {
    text-align: center;
  }

  #registerContainer {
    margin-top: 24px;
    padding-top: 20px;
  }

  .grecaptcha-badge {
    transform: scale(0.9);
    transform-origin: right bottom;
    bottom: 12px !important;
    right: 12px !important;
  }
}

@media (max-width: 480px) {
  #middle {
    padding-bottom: 110px;
  }

  #loginCard .title {
    font-size: 22px;
  }

  #loginCard .description {
    font-size: 14px;
    margin-bottom: 24px;
  }

  #loginCard input[type="text"],
  #loginCard input[type="password"] {
    padding: 13px 16px;
  }

  .grecaptcha-badge {
    transform: scale(0.82);
  }
}
