body:has(.login-page) {
  background: #0d4f8c;
}

.login-page {
  --primary: #1383df;
  --primary-dark: #0f6bb8;
  --ink: #0e1a24;
  --ink-soft: #526070;
  --line: #d6e3ee;
  --surface: #ffffff;
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 2rem;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(102, 183, 233, 0.35), transparent 60%),
    radial-gradient(700px 380px at 0% 110%, rgba(15, 107, 184, 0.45), transparent 55%),
    linear-gradient(165deg, #0b3f73 0%, #1383df 48%, #0a4e8a 100%);
}

.login-page__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
  pointer-events: none;
}

.login-page__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
  animation: login-float 8s ease-in-out infinite;
}

.login-page__orb--1 {
  width: 180px;
  height: 180px;
  inset-inline-start: -40px;
  top: 12%;
  background: rgba(255, 255, 255, 0.1);
}

.login-page__orb--2 {
  width: 120px;
  height: 120px;
  inset-inline-end: 6%;
  bottom: 10%;
  background: rgba(102, 183, 233, 0.28);
  animation-delay: -3s;
}

.login-page__wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
}

.login-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 1.35rem;
  box-shadow:
    0 24px 60px -28px rgba(8, 32, 64, 0.55),
    0 0 0 1px rgba(19, 131, 223, 0.08);
  overflow: hidden;
}

.login-card .modal-body {
  position: relative;
  padding: 1.15rem 1.35rem 1.45rem;
}

.login-card .modal-body.loading .precustom-loader {
  background: rgba(245, 248, 252, 0.78);
  border-radius: 0;
}

.login-card .custom-loader,
.login-card .custom-loader:before,
.login-card .custom-loader:after {
  border-top-color: var(--primary);
}

.login-card .custom-loader:before {
  border-top-color: #66b7e9;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0.15rem 0 0.85rem;
}

.login-brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #66b7e9, #1383df 55%, #0f6bb8);
  box-shadow: 0 8px 16px -10px rgba(19, 131, 223, 0.9);
  font-size: 1.25rem;
}

.login-brand h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
}

.login-brand p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.login-tabs {
  display: flex;
  gap: 0.55rem;
}

.login-tabs .btn {
  flex: 1;
  border-radius: 0.8rem;
  font-weight: 700;
}

.login-card .form-group {
  margin-bottom: 0.85rem;
}

.login-card .col-form-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding-bottom: 0.25rem;
}

.login-card .form-control {
  border: 1px solid var(--line);
  background: #f5f9fd;
  border-radius: 0.8rem;
  box-shadow: none;
}

.login-card .form-control:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(19, 131, 223, 0.15);
}

.login-card .btn-lg {
  border-radius: 0.8rem;
  font-weight: 700;
}

.login-card .logged-in {
  text-align: center;
  padding: 0.5rem 0 0.25rem;
}

.login-card .logged-in p {
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.tax-scene {
  position: relative;
  height: 118px;
  margin: 0 auto 0.35rem;
  max-width: 360px;
}

.tax-scene__doc,
.tax-scene__calc,
.tax-scene__chart,
.tax-scene__stamp,
.tax-scene__chip {
  position: absolute;
}

.tax-scene__doc {
  inset-inline-start: 8px;
  top: 10px;
  width: 148px;
  height: 96px;
  background: #fff;
  border: 1px solid #d6e3ee;
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: 0 10px 22px -16px rgba(14, 26, 36, 0.45);
  overflow: hidden;
}

.tax-scene__doc::before {
  content: "";
  position: absolute;
  inset-inline-end: 0;
  top: 0;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, transparent 50%, #eaf3fa 50%);
}

.tax-scene__doc-title {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.tax-scene__line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
}

.tax-scene__line i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c5ddf3;
  flex-shrink: 0;
}

.tax-scene__line b {
  display: block;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, #d6eaf8, #9fc8e0);
  transform-origin: right center;
  animation: tax-line 2.8s ease-in-out infinite;
}

.tax-scene__line:nth-child(2) b {
  width: 88%;
}
.tax-scene__line:nth-child(3) b {
  width: 64%;
  animation-delay: 0.25s;
}
.tax-scene__line:nth-child(4) b {
  width: 76%;
  animation-delay: 0.5s;
}

.tax-scene__line--ok i {
  background: var(--primary);
  animation: tax-check 2.8s ease-in-out infinite;
}

.tax-scene__calc {
  inset-inline-start: 168px;
  top: 18px;
  width: 78px;
  height: 82px;
  background: #0e1a24;
  border-radius: 10px;
  padding: 7px;
  box-shadow: 0 12px 20px -14px rgba(14, 26, 36, 0.7);
}

.tax-scene__screen {
  height: 18px;
  border-radius: 4px;
  background: #14324a;
  color: #9fd4ff;
  font-size: 0.58rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 6px;
  margin-bottom: 6px;
  overflow: hidden;
}

.tax-scene__screen span {
  animation: tax-screen 3.2s ease-in-out infinite;
}

.tax-scene__keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.tax-scene__keys span {
  height: 12px;
  border-radius: 3px;
  background: #2a3d4d;
}

.tax-scene__keys span:nth-child(3),
.tax-scene__keys span:nth-child(6) {
  background: var(--primary);
  animation: tax-key 1.6s ease-in-out infinite;
}

.tax-scene__keys span:nth-child(6) {
  animation-delay: 0.4s;
}

.tax-scene__chart {
  inset-inline-end: 18px;
  top: 28px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 62px;
}

.tax-scene__chart span {
  width: 10px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #66b7e9, #1383df);
  transform-origin: bottom;
  animation: tax-bar 2.4s ease-in-out infinite;
}

.tax-scene__chart span:nth-child(1) {
  height: 28px;
}
.tax-scene__chart span:nth-child(2) {
  height: 46px;
  animation-delay: 0.2s;
}
.tax-scene__chart span:nth-child(3) {
  height: 36px;
  animation-delay: 0.4s;
}

.tax-scene__stamp {
  inset-inline-start: 96px;
  top: 42px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid rgba(19, 131, 223, 0.85);
  color: var(--primary);
  font-size: 0.52rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.82);
  transform: rotate(-18deg);
  animation: tax-stamp 3.4s ease-in-out infinite;
  z-index: 2;
}

.tax-scene__chip {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 99px;
  background: #eaf3fa;
  color: var(--primary);
  border: 1px solid #c5ddf3;
  animation: login-float 4.5s ease-in-out infinite;
}

.tax-scene__chip--year {
  inset-inline-end: 8px;
  top: 6px;
}

.tax-scene__chip--pct {
  inset-inline-start: 150px;
  bottom: 2px;
  animation-delay: -1.4s;
}

@keyframes login-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes tax-line {
  0%,
  100% {
    transform: scaleX(0.55);
    opacity: 0.7;
  }
  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes tax-check {
  0%,
  40% {
    transform: scale(0.7);
    background: #c5ddf3;
  }
  55%,
  85% {
    transform: scale(1);
    background: #1383df;
  }
  100% {
    transform: scale(0.7);
    background: #c5ddf3;
  }
}

@keyframes tax-bar {
  0%,
  100% {
    transform: scaleY(0.55);
  }
  50% {
    transform: scaleY(1);
  }
}

@keyframes tax-stamp {
  0%,
  55% {
    opacity: 0;
    transform: rotate(-18deg) scale(1.35);
  }
  68% {
    opacity: 1;
    transform: rotate(-18deg) scale(0.92);
  }
  78%,
  92% {
    opacity: 1;
    transform: rotate(-18deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: rotate(-18deg) scale(1);
  }
}

@keyframes tax-key {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.55);
  }
}

@keyframes tax-screen {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 420px) {
  .tax-scene {
    height: 108px;
    transform: scale(0.92);
    transform-origin: top center;
  }

  .login-card .modal-body {
    padding: 0.9rem 1rem 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tax-scene__line b,
  .tax-scene__line--ok i,
  .tax-scene__chart span,
  .tax-scene__stamp,
  .tax-scene__chip,
  .tax-scene__keys span,
  .login-page__orb {
    animation: none;
  }

  .tax-scene__stamp {
    opacity: 1;
    transform: rotate(-18deg) scale(1);
  }
}
