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

html,
body {
  min-height: 100%;
  font-family: "Segoe UI", sans-serif;
}

body {
  color: #133328;
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.background {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.32), transparent 34%),
    radial-gradient(circle at 88% 85%, rgba(198, 245, 30, 0.16), transparent 38%),
    linear-gradient(rgba(6, 35, 29, 0.38), rgba(6, 35, 29, 0.38)),
    url("../img/background_login_env.jpg") no-repeat center center;
  background-size: cover;
  z-index: -2;
}

.background::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(7, 102, 83, 0.12), transparent 30%),
    radial-gradient(circle at 15% 78%, rgba(12, 52, 44, 0.13), transparent 34%);
  z-index: -1;
}

.header {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1rem 0.5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.46rem 0.92rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0c342c;
  border: 1px solid rgba(12, 52, 44, 0.22);
  background: rgba(255, 255, 255, 0.7);
}

.app-name {
  color: #1d4638;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-container {
  width: min(560px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 620px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.58rem;
  position: relative;
  align-self: center;
  justify-self: center;
  transform: translateY(-18px);
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 32px 62px rgba(12, 52, 44, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.login-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 13%, rgba(227, 239, 38, 0.24), transparent 34%),
    radial-gradient(circle at 12% 85%, rgba(7, 102, 83, 0.26), transparent 36%),
    linear-gradient(130deg, rgba(6, 35, 29, 0.9), rgba(12, 52, 44, 0.85) 52%, rgba(7, 102, 83, 0.79));
  z-index: 0;
}

.login-container > * {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 410px;
}

.logo-container {
  display: none;
}

.logo-nodo {
  width: 180px;
  display: block;
}

.login-title {
  margin-bottom: 0.18rem;
  color: #f6fffb;
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  line-height: 1.05;
  text-align: center;
  text-shadow: 0 10px 18px rgba(4, 36, 26, 0.26);
}

.login-title::before {
  content: "Acceso seguro";
  display: flex;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.45rem;
  border-radius: 999px;
  padding: 0.26rem 0.62rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #ecffcb;
  background: rgba(6, 65, 49, 0.48);
  border: 1px solid rgba(227, 239, 38, 0.25);
}

.alert-error {
  padding: 0.62rem 0.8rem;
  border-radius: 12px;
  background: rgba(253, 236, 235, 0.93);
  color: #b42318;
  border: 1px solid #f7c9c6;
  font-size: 0.86rem;
}

.login-form {
  border-radius: 20px;
  padding: 1.05rem;
  background: rgba(6, 33, 29, 0.33);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 22px 34px rgba(4, 32, 24, 0.22);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.login-form input[type="email"],
.login-form input[type="password"] {
  width: 100%;
  padding: 0.72rem 0.84rem;
  margin-bottom: 0.52rem;
  border: 1.4px solid rgba(255, 255, 255, 0.45);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.18);
  color: #f6fff9;
  font-size: 0.92rem;
}

.login-form input::placeholder {
  color: rgba(236, 247, 240, 0.75);
}

.login-form input:focus {
  outline: none;
  border-color: rgba(227, 239, 38, 0.72);
  box-shadow: 0 0 0 3px rgba(198, 245, 30, 0.24);
}

.options {
  margin: 0.05rem 0 0.55rem;
  color: #e4f5eb;
  font-size: 0.82rem;
  font-weight: 600;
}

.btn-login {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: linear-gradient(95deg, #d8ff3e, #24b35d);
  color: #083125;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(5, 47, 34, 0.24);
}

.btn-login:hover {
  transform: translateY(-1px);
}

.links {
  margin-top: 0.62rem;
  font-size: 0.79rem;
  color: #dcefe5;
  line-height: 1.5;
  text-align: center;
}

.links a {
  color: #e3ef26;
  text-decoration: underline;
  font-weight: 700;
}

footer {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0.8rem 1rem 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: #264a3d;
}

footer a {
  color: #076653;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 980px) {
  .login-container {
    width: min(560px, calc(100% - 1rem));
    margin: 0 auto;
    min-height: 560px;
    border-radius: 32px;
    transform: translateY(-10px);
  }
}

@media (max-width: 560px) {
  .header {
    padding: 0.82rem 0.72rem 0.45rem;
  }

  .app-name {
    display: none;
  }

  .login-container {
    width: calc(100% - 0.6rem);
    margin: 0 auto;
    padding: 0.85rem;
    border-radius: 24px;
    min-height: 520px;
    transform: translateY(-6px);
  }

  .login-container::before {
    border-radius: 24px;
  }

  .logo-nodo {
    width: 148px;
  }

  .login-title {
    font-size: 1.55rem;
    margin-bottom: 0.1rem;
  }

  .login-form {
    padding: 0.84rem;
  }
}
