/* Scoped to the login so other account screens keep their own appearance. */
.login-page {
  --login-blue: #438eff;
  --login-muted: #96a8be;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  padding: 40px 20px;
  background: #060d18;
  color: #edf3fc;
  isolation: isolate;
}

.login-scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%, #13243b 0%, #091321 48%, #050b14 100%);
}

.login-scene::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/fondo.png') center / 960px auto;
  opacity: .08;
}

/* Blue and green reflections alternate gently for Policía and Guardia Civil. */
.login-scene__light {
  --light-color: 24, 99, 255;
  position: absolute;
  width: min(1000px, 110vw);
  height: 110%;
  background: radial-gradient(ellipse, rgba(var(--light-color), .52), rgba(var(--light-color), .14) 42%, transparent 68%);
  opacity: .14;
  animation: login-patrol-pulse 4.8s ease-in-out infinite;
}

.login-scene__light--left {
  --light-drift: 18%;
  top: -30%;
  left: -36%;
}

.login-scene__light--right {
  --light-color: 31, 155, 82;
  --light-drift: -18%;
  right: -36%;
  bottom: -30%;
  animation-delay: -2.4s;
}

.login-shell {
  width: 432px;
  max-width: 100%;
  margin: auto;
}

.login-page .login-container {
  position: relative;
  inset: auto;
  left: auto !important;
  width: 100%;
  margin: 0;
  padding: 40px 36px 24px;
  overflow: hidden;
  transform: none;
  border: 1px solid rgba(143, 177, 225, .18);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(19, 33, 52, .98), rgba(10, 20, 34, .98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .035);
}

.login-lightbar {
  position: absolute;
  top: 0;
  right: 24px;
  left: 24px;
  height: 1px;
  overflow: hidden;
  background: rgba(67, 142, 255, .12);
}

.login-lightbar::after {
  content: '';
  position: absolute;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #4593ff, #a6caff, #83d7a4, #279b52, transparent);
  animation: login-patrol-sweep 2.4s ease-in-out infinite alternate;
}

.login-page .login-container .panel-heading {
  padding: 0 0 28px;
  text-align: center;
}

.login-brand {
  display: inline-block;
  border-radius: 6px;
}

.login-brand img {
  display: block;
  width: 192px;
  max-width: 100%;
  height: auto;
}

.login-page .login-container h1 {
  margin: 24px 0 0;
  color: #f2f6ff;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.5;
}

.login-intro {
  margin: 10px 0 0;
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.6;
}

.login-page .login-container .panel-body {
  padding: 0;
}

.login-container .login-field {
  margin-bottom: 20px;
}

.login-page .login-field > label,
.login-page .modal-body label {
  margin-bottom: 9px;
  color: #c7d4e5;
  font-size: 13px;
  font-weight: 600;
}

.login-container .input-group {
  overflow: hidden;
  border: 1px solid #2b3c53;
  border-radius: 9px;
  background: #0a1524;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.login-container .input-group:focus-within {
  border-color: var(--login-blue);
  box-shadow: 0 0 0 3px rgba(67, 142, 255, .14);
}

.login-page .login-container .input-group-addon {
  padding: 0 0 0 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.login-page .login-container .input-group-addon > i {
  color: #7b97ba;
  font-size: 14px;
}

.login-page .login-container .form-control,
.login-page .modal-body .form-control {
  height: 50px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: #edf3fc;
  box-shadow: none;
}

.login-page .form-control::placeholder {
  color: #8092ab;
  opacity: 1;
}

.login-page .form-control:-webkit-autofill {
  -webkit-text-fill-color: #edf3fc;
  box-shadow: inset 0 0 0 1000px #0a1524;
  caret-color: #edf3fc;
}

.login-container .login-remember {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  margin: -2px 0 18px;
  color: #b3c3d7;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}

.login-container .login-remember input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.login-container .login-remember__switch {
  position: relative;
  flex: 0 0 34px;
  width: 34px;
  height: 20px;
  border: 1px solid #4b607c;
  border-radius: 999px;
  background: #25354b;
  transition: background-color .2s ease, border-color .2s ease;
}

.login-container .login-remember__switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d8e4f4;
  transition: transform .2s ease;
}

.login-container .login-remember input:checked + .login-remember__switch {
  border-color: #438eff;
  background: #2866c8;
}

.login-container .login-remember input:checked + .login-remember__switch::after {
  transform: translateX(14px);
}

.login-page .login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 50px;
  border: 1px solid #4388eb;
  border-radius: 9px !important;
  background: linear-gradient(110deg, #235fca, #347be3);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(19, 76, 177, .2);
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.login-submit > i {
  font-size: 12px;
}

.login-page .login-submit:hover,
.login-page .login-submit:focus {
  border-color: #80b1ff;
  background: linear-gradient(110deg, #2b6bdc, #4089f2);
  color: #fff;
  box-shadow: 0 4px 24px rgba(32, 100, 215, .3);
}

.login-page .login-container .forgot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 13px 0 0;
  color: #a0b3cc;
  font-size: 12px;
}

.login-page .login-container .forgot:hover {
  color: #d5e5ff;
}

.login-page a:focus-visible,
.login-page button:focus-visible,
.login-remember input:focus-visible + .login-remember__switch {
  outline: 2px solid #9ac1ff;
  outline-offset: 4px;
}

.login-signature {
  margin: 24px 0 0;
  color: #8c9eb6;
  font-size: 11px;
  line-height: 1.8;
  text-align: center;
}

.login-signature > span {
  margin: 0 8px;
  color: #438eff;
}

.login-page .alert {
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.6;
}

.login-page .modal-dialog-recover {
  position: relative;
  top: auto;
  left: auto;
  width: calc(100% - 32px);
  margin: 10vh auto 24px;
  padding: 0;
  transform: none !important;
}

.login-page .modal-content {
  border: 1px solid #30435f;
  border-radius: 16px;
  background: #101d2e;
  color: #c7d4e5;
}

.login-page .modal-header,
.login-page .modal-footer {
  padding: 20px 24px;
  border-color: #293a51;
}

.login-page .modal-title {
  color: #edf3fc;
  font-size: 16px;
  line-height: 1.6;
}

.login-page .modal-header .close {
  margin-left: 12px;
  color: #c7d4e5;
  text-shadow: none;
  opacity: 1;
}

.login-page .modal-body {
  padding: 24px;
  line-height: 1.7;
}

.login-page .modal-body .form-control {
  border: 1px solid #3a5070;
  border-radius: 9px;
  background: #0a1524;
}

.login-page .modal-body .form-control:focus {
  border-color: var(--login-blue);
  box-shadow: 0 0 0 3px rgba(67, 142, 255, .14);
}

.login-page .modal-footer .btn {
  min-height: 44px;
  border-radius: 8px !important;
  font-size: 13px;
}

.login-page .modal-footer .btn-default {
  border-color: #4b607c;
  background: #1b2c42;
  color: #edf3fc;
}

.login-page .modal-footer .btn-primary {
  border-color: #4388eb;
  background: #2866c8;
  color: #fff;
}

@keyframes login-patrol-pulse {
  0%, 64%, 100% {
    opacity: .14;
    transform: translate3d(0, 0, 0) scale(.96);
  }
  16% {
    opacity: .8;
    transform: translate3d(var(--light-drift), -3%, 0) scale(1.12);
  }
  28% {
    opacity: .28;
    transform: translate3d(var(--light-drift), 1%, 0) scale(1.04);
  }
  40% {
    opacity: .66;
    transform: translate3d(var(--light-drift), 4%, 0) scale(1.1);
  }
}

@keyframes login-patrol-sweep {
  from { transform: translateX(-35%); opacity: .4; }
  to { transform: translateX(115%); opacity: .9; }
}

@media (max-width: 480px) {
  .login-page {
    padding: 28px 18px;
  }

  .login-page .login-container {
    padding: 32px 24px 20px;
    border-radius: 16px;
  }

  .login-page .login-container h1 {
    font-size: 18px;
  }

  .login-brand img {
    width: 174px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .login-scene__light,
  .login-lightbar::after {
    animation: none;
    opacity: .3;
  }

  .login-page *,
  .login-page *::after {
    transition: none !important;
  }
}
