
:root {
  --login-primary: #0d2b70;
  --login-primary-strong: #081f52;
  --login-accent: #d43d45;
  --login-text: #17335f;
  --login-muted: #677792;
  --login-border: rgba(13, 43, 112, 0.14);
  --login-surface: rgba(255, 255, 255, 0.94);
  --login-shadow: 0 28px 60px rgba(15, 37, 84, 0.18);
}

body.login-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Trebuchet MS", "Gill Sans", "Segoe UI", sans-serif;
  color: var(--login-text);
  background:
    radial-gradient(circle at top left, rgba(212, 61, 69, 0.18), transparent 30%),
    radial-gradient(circle at 86% 15%, rgba(13, 43, 112, 0.16), transparent 24%),
    linear-gradient(180deg, #edf3fb 0%, #f7f9fc 52%, #eef3f8 100%);
}

body.login-page::before,
body.login-page::after {
  content: "";
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0.55;
}

body.login-page::before {
  width: 320px;
  height: 320px;
  top: -110px;
  right: -110px;
  background: linear-gradient(135deg, rgba(13, 43, 112, 0.18), rgba(13, 43, 112, 0));
}

body.login-page::after {
  width: 260px;
  height: 260px;
  left: -90px;
  bottom: -90px;
  background: linear-gradient(135deg, rgba(212, 61, 69, 0.18), rgba(212, 61, 69, 0));
}

#login {
  position: relative;
  z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 40px);
    box-sizing: border-box;
}

.login-layout {
  width: min(100%, 1080px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 4vw, 42px);
  align-items: center;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  animation: login-fade-up 0.7s ease-out both;
}

#cabecera {
  width: 100%;
  display: flex;
  justify-content: center;
}

.login-logo {
  width: min(100%, 340px);
  max-height: 220px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(13, 43, 112, 0.16));
}

.login-copy {
  max-width: 34rem;
}

.login-kicker {
  margin: 0 0 10px;
  color: var(--login-primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-copy h1 {
  margin: 0;
  color: var(--login-primary-strong);
  font-size: clamp(1.9rem, 5vw, 3.3rem);
  line-height: 1.04;
}

.login-copy p {
  margin: 14px 0 0;
  color: var(--login-muted);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  line-height: 1.6;
}

#logincuadro {
  width: 100%;
  margin: 0;
  background: var(--login-surface);
  border: 1px solid var(--login-border);
  border-radius: 28px;
  box-shadow: var(--login-shadow);
  overflow: hidden;
  animation: login-card-in 0.7s ease-out both;
}

.login-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px 22px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--login-primary) 0%, #1d489d 58%, var(--login-primary-strong) 100%);
}

.login-header-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.login-header-icon img {
  width: 24px;
  height: 24px;
  display: block;
}

.login-header h2 {
  margin: 0;
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  line-height: 1.1;
}

.login-header p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
}

.form-fields {
  display: grid;
  gap: 16px;
  padding: clamp(20px, 5vw, 34px);
}

.login-field {
  display: grid;
  gap: 8px;
  text-align: left;
}

.login-field span {
  color: #23406f;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.input-wrap {
  position: relative;
}

.input-wrap::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 16px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--login-primary), var(--login-accent));
  opacity: 0.7;
}

#logincuadro input[type="text"],
#logincuadro input[type="password"] {
  width: 100%;
  height: 58px;
  padding: 0 18px 0 30px;
  box-sizing: border-box;
  border: 1px solid #d8e1ee;
  border-radius: 18px;
  background: #f6f9fd;
  color: var(--login-text);
  font-family: inherit;
  font-size: clamp(1rem, 2.8vw, 1.1rem);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

#logincuadro input[type="text"]::placeholder,
#logincuadro input[type="password"]::placeholder {
  color: #7b8aa4;
}

#logincuadro input[type="text"]:focus,
#logincuadro input[type="password"]:focus {
  background: #ffffff;
  border-color: rgba(13, 43, 112, 0.42);
  box-shadow: 0 0 0 4px rgba(29, 72, 157, 0.12), 0 14px 26px rgba(15, 37, 84, 0.08);
  transform: translateY(-1px);
}

#logincuadro .boton {
  width: 100%;
    min-height: 56px;
    margin: 8px 0 0;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--login-accent) 0%, #be2635 100%);
    box-shadow: 0 16px 26px rgba(212, 61, 69, 0.24);
    color: #ffffff;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
    text-shadow: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

#logincuadro .boton:hover {
  filter: brightness(1.04);
    box-shadow: 0 18px 30px rgba(212, 61, 69, 0.28);
}

#logincuadro .boton:active {
  transform: translateY(1px);
    box-shadow: 0 10px 18px rgba(212, 61, 69, 0.2);
  }
  
  #mensajelogin {
    min-height: 22px;
    display: block;
    color: #c12a3c;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
  }
  
  #mensajelogin input[type="hidden"] {
    display: none;
  }
  
  @media (min-width: 900px) {
    .login-layout {
      grid-template-columns: minmax(280px, 0.92fr) minmax(360px, 470px);
    }
  
    .login-brand {
      align-items: flex-start;
      text-align: left;
    }
  
    #cabecera {
      justify-content: flex-start;
    }
  }
  
  @media (min-width: 700px) and (max-width: 899px) {
    #logincuadro {
      max-width: 560px;
      margin: 0 auto;
    }
  }
  
  @media (max-width: 560px) {
    #login {
      padding: 14px;
    }
  
    .login-logo {
      width: min(100%, 260px);
      max-height: 170px;
    }
  
    #logincuadro {
      border-radius: 24px;
    }
  
    .login-header {
      padding: 16px 18px 18px;
    }
  
    .form-fields {
      padding: 18px;
      gap: 14px;
    }
  
    #logincuadro .boton {
      min-height: 54px;
    }
  }
  
  @keyframes login-fade-up {
    from {
      opacity: 0;
      transform: translateY(22px);
    }
  
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes login-card-in {
    from {
      opacity: 0;
      transform: translateY(26px) scale(0.98);
    }
  
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
}
