:root {
  --base: #0061a6;
  --base-2: #0b4f86;
  --title: #0b3b5c;
  --muted: #5f6c80;
  --card-bg: rgba(255, 255, 255, 0.96);
  --card-border: rgba(15, 23, 42, 0.1);
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
}

body.page-login {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  overflow: hidden;
  position: relative;
  min-height: 100vh;
  height: 100vh;
  background: transparent;
}

body.page-login::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(1100px 600px at 20% 20%, rgba(255, 255, 255, 0.18), transparent 65%),
              radial-gradient(900px 500px at 80% 30%, rgba(255, 255, 255, 0.12), transparent 70%),
              linear-gradient(140deg, var(--base), #0b5b9f 45%, var(--base-2));
}

#particles-js {
  position: fixed;
  inset: 0;
  z-index: -1;
}

.auth-wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 44px 20px 22px;
}

.auth-card {
  width: min(520px, 94vw);
}

.glass-card {
  border-radius: 18px;
  padding: 32px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.brand-logo-clean {
  width: auto;
  max-width: 100%;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.18));
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--base), #003f6f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-divider {
  width: 60px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--base), rgba(0, 97, 166, 0.2));
}

.auth-subtitle {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 500;
}

.auth-hint {
  font-size: 0.86rem;
  color: var(--muted);
}

.input-glass {
  position: relative;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-glass:focus-within {
  border-color: rgba(0, 97, 166, 0.45);
  box-shadow: 0 0 0 0.25rem rgba(0, 97, 166, 0.12);
}

.input-glass .form-control {
  border: 0;
  background: transparent;
  padding-left: 46px;
  height: 48px;
  font-size: 0.98rem;
  color: var(--title);
  box-shadow: none !important;
}

.input-glass .form-control:valid,
.input-glass .form-control:invalid,
.form-control:valid,
.form-control:invalid {
  background-image: none !important;
  padding-right: 0.75rem !important;
}

.input-glass .form-control::placeholder {
  color: rgba(31, 42, 55, 0.45);
}

.ig-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--base);
  font-size: 1rem;
}

.ig-action {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--base);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  transition: background 0.15s ease;
}

.ig-action:hover {
  background: rgba(0, 97, 166, 0.08);
}

.auth-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--base) !important;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
  color: var(--base-2) !important;
}

.custom-checkbox-wrapper {
  display: flex;
  align-items: center;
}

.custom-checkbox-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox-label .check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2em;
  height: 1.2em;
  border: 2px solid var(--base);
  border-radius: 4px;
  background: #fff;
  color: transparent;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}

input[type="checkbox"]#remember-me:checked + .custom-checkbox-label .check-icon {
  background-color: var(--base);
  color: #fff;
}

.btn-modern {
  background: linear-gradient(135deg, var(--base), var(--base-2));
  border: none;
  color: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 26px rgba(0, 97, 166, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-modern:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 35px rgba(0, 97, 166, 0.45), 0 0 0 3px rgba(255, 255, 255, 0.1);
  filter: brightness(1.08);
  color: #fff;
}

.btn-modern:active {
  transform: scale(0.98);
  box-shadow: 0 8px 16px rgba(0, 97, 166, 0.4);
}

.btn-outline-secondary {
  border: 1px solid rgba(0, 97, 166, 0.3);
  background: transparent;
  color: var(--base);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 600;
}

.btn-outline-secondary:hover {
  background: rgba(0, 97, 166, 0.08);
  border-color: var(--base);
  color: var(--base-2);
}

.auth-footer {
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  font-size: 0.82rem;
}

body.page-login,
body.page-login.modal-open {
  overflow: hidden !important;
  padding-right: 0 !important;
}

#modalRecuperar .modal-dialog {
  width: min(500px, 95%);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.modal-recovery {
  background: var(--card-bg) !important;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  color: var(--title);
}

.modal-recovery .modal-title {
  color: var(--title);
  font-weight: 700;
  font-size: 1.25rem;
}

.modal-recovery .modal-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
}

.modal-recovery .modal-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(0, 97, 166, 0.1);
  color: var(--base);
  font-size: 1.25rem;
  border: 1px solid rgba(0, 97, 166, 0.2);
}

.modal-recovery .form-control {
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #fff;
  color: var(--title);
  font-size: 1rem;
  padding: 0.75rem 1rem;
}

.modal-recovery .form-control:focus {
  border-color: var(--base);
  box-shadow: 0 0 0 0.25rem rgba(0, 97, 166, 0.15);
}

.modal-recovery .form-floating > label {
  color: var(--muted);
  padding-left: 1rem;
}

.modal-footnote {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-up {
  animation: slideUp 0.6s ease-out forwards;
}

@media (max-width: 575px) {
  .glass-card {
    padding: 22px 16px;
  }

  .auth-title {
    font-size: 1.5rem;
  }

  .auth-footer {
    font-size: 0.75rem;
  }
}
