body.login-bg {
  min-height: 100vh;
  background: #0a2d64 url("assets/images/fondo1.png") no-repeat center center fixed;
  background-size: cover;
}

@media (max-width: 780px) {
  body.login-bg {
    background: #0a2d64 url("img/fondo2.png") no-repeat center center;
    background-size: cover;
  }

  .auth-wrapper {
    justify-content: center !important;
    align-items: flex-end !important;
    min-height: 100vh;
    padding: 0 1rem 0;
  }

  .auth-box {
    background: transparent !important;
    border: none !important;
    box-shadow: 0 12px 26px rgba(6, 24, 53, 0.16);
    backdrop-filter: none;
    color: #0b2d5a;
    transform: translateY(22px);
  }

  .auth-box .form-label,
  .auth-box .text-muted,
  .auth-box .small,
  .auth-box a {
    color: #123a72 !important;
  }

  .auth-box .input-group-text {
    background: rgba(255, 255, 255, 0.86);
    border-color: rgba(12, 46, 88, 0.22);
    color: #123a72;
  }

  .auth-box .form-control {
    background: rgba(255, 255, 255, 0.86);
    border-color: rgba(12, 46, 88, 0.22);
    color: #0b2d5a;
  }

  .auth-box .form-control::placeholder {
    color: rgba(11, 45, 90, 0.72);
  }

  .auth-box .btn-outline-light {
    color: #123a72;
    border-color: rgba(12, 46, 88, 0.24);
    background: rgba(255, 255, 255, 0.86);
  }

  .auth-box h4 {
    display: none !important;
  }

  .auth-box > p.text-muted.mb-4,
  label[for="usuario"],
  label[for="password"],
  #rolePreview {
    display: none !important;
  }
}

/* Tema dorado Ebenezer: solo colores, sin mover la estructura */
body.login-bg {
  background:
    linear-gradient(90deg, rgba(3, 10, 24, 0.1), rgba(3, 10, 24, 0.18)),
    url("assets/images/fondo1.png") center center / cover no-repeat fixed,
    #0a2d64 !important;
  color: #fff7e8 !important;
}

body.login-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 205, 74, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 205, 74, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.24;
}

.auth-wrapper {
  position: relative;
  z-index: 1;
}

.auth-box {
  background: rgba(18, 16, 10, 0.9) !important;
  border: 1px solid rgba(246, 196, 77, 0.28) !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.52) !important;
  color: #fff7e8 !important;
}

.auth-box h4 {
  color: #ffffff !important;
}

.auth-box .form-label,
.auth-box .text-muted,
.auth-box .small,
.auth-box a {
  color: rgba(255, 247, 232, 0.82) !important;
}

.auth-box a:hover {
  color: #f6c44d !important;
}

.auth-box .input-group-text,
.auth-box .form-control,
.auth-box .btn-outline-light {
  background: rgba(18, 16, 10, 0.96) !important;
  border-color: rgba(246, 196, 77, 0.26) !important;
  color: #fff7e8 !important;
}

.auth-box .input-group-text,
.auth-box .btn-outline-light {
  color: #f6c44d !important;
}

.auth-box .form-control::placeholder {
  color: rgba(255, 247, 232, 0.58) !important;
}

.auth-box .form-control:focus {
  border-color: rgba(255, 217, 120, 0.95) !important;
  box-shadow: 0 0 0 0.18rem rgba(246, 196, 77, 0.18) !important;
}

.auth-box #btnLogin,
.auth-box .btn-primary {
  background: linear-gradient(180deg, #ffe08a 0%, #f6c44d 50%, #9a6a16 100%) !important;
  border-color: rgba(255, 217, 120, 0.85) !important;
  color: #151006 !important;
  font-weight: 700;
}

.auth-box #btnLogin:hover,
.auth-box .btn-outline-light:hover {
  box-shadow: 0 10px 24px rgba(246, 196, 77, 0.22) !important;
}

#loginMessage {
  background: rgba(255, 82, 82, 0.14) !important;
  border-color: rgba(255, 82, 82, 0.32) !important;
  color: #ffd1d1 !important;
}

@media (max-width: 780px) {
  body.login-bg {
    background:
      url("img/fondo2.png") center center / cover no-repeat,
      #0a2d64 !important;
  }

  .auth-box {
    background: rgba(18, 16, 10, 0.88) !important;
    border: 1px solid rgba(246, 196, 77, 0.28) !important;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.52) !important;
    color: #fff7e8 !important;
  }
}

.container {
  max-width: 100%;
}

.auth-wrapper {
  justify-content: flex-end !important;
  align-items: flex-end !important;
  min-height: 100vh;
  padding: 0 0.8rem 1.2rem 0;
}

.auth-box {
  max-width: 420px;
  min-width: 340px;
  background: rgba(7, 13, 28, 0.9) !important;
  border: 1px solid rgba(90, 150, 255, 0.35) !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  color: #ffffff;
  transform: translateY(0);
}

.auth-box h4 {
  text-align: center;
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.auth-box .form-label,
.auth-box .text-muted,
.auth-box .small,
.auth-box a {
  color: rgba(255, 255, 255, 0.82) !important;
}

.auth-box .input-group-text {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #a9ddff;
}

.auth-box .form-control {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.auth-box .form-control::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.auth-box .btn-outline-light {
  color: #a9ddff;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

label[for="usuario"],
label[for="password"] {
  display: none !important;
}

.auth-box #loginForm .mb-3,
.auth-box #loginForm .mb-2 {
  position: relative;
  top: 8px;
}

.auth-box #btnLogin {
  position: relative;
  top: -8px;
}

.spin {
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Mobile override (keep transparent layout) */
@media (max-width: 780px) {
  body.login-bg {
    background: #0a2d64 url("img/fondo2.png") no-repeat center center;
    background-size: cover;
  }

  .auth-wrapper {
    justify-content: center !important;
    align-items: flex-end !important;
    padding: 0 1rem 0 !important;
  }

  .auth-box {
    background: transparent !important;
    border: none !important;
    box-shadow: 0 12px 26px rgba(6, 24, 53, 0.16) !important;
    backdrop-filter: none !important;
    color: #0b2d5a !important;
    transform: translateY(22px) !important;
  }

  .auth-box .form-label,
  .auth-box .text-muted,
  .auth-box .small,
  .auth-box a {
    color: #123a72 !important;
  }

  .auth-box .input-group-text {
    background: rgba(255, 255, 255, 0.86) !important;
    border-color: rgba(12, 46, 88, 0.22) !important;
    color: #123a72 !important;
  }

  .auth-box .form-control {
    background: rgba(255, 255, 255, 0.86) !important;
    border-color: rgba(12, 46, 88, 0.22) !important;
    color: #0b2d5a !important;
  }

  .auth-box .form-control::placeholder {
    color: rgba(11, 45, 90, 0.72) !important;
  }

  .auth-box .btn-outline-light {
    color: #123a72 !important;
    border-color: rgba(12, 46, 88, 0.24) !important;
    background: rgba(255, 255, 255, 0.86) !important;
  }

  .auth-box h4,
  .auth-box > p.text-muted.mb-4,
  label[for="usuario"],
  label[for="password"],
  #rolePreview {
    display: none !important;
  }
}
