/* Login com fotografia arquitetural original e luz champagne controlada. */
.login-visual {
  background-image:
    linear-gradient(90deg, rgba(4, 4, 5, 0.06), rgba(4, 4, 5, 0.26)),
    linear-gradient(0deg, rgba(4, 4, 5, 0.34), transparent 44%),
    url('../../assets/login-architecture-premium.webp');
  background-size: cover;
  background-position: 54% center;
}

.login-visual:before {
  background: linear-gradient(115deg, rgba(0, 0, 0, 0.08), transparent 50%, rgba(0, 0, 0, 0.24));
  mask-image: none;
}

.login-visual:after,
.login-light {
  display: none;
}

.login-visual > .login-message {
  padding: 22px 26px 23px;
  border-left: 2px solid rgba(216, 171, 76, 0.72);
  background: linear-gradient(90deg, rgba(5, 5, 6, 0.74), rgba(5, 5, 6, 0.06));
  backdrop-filter: blur(2px);
}

.login-visual .login-message h2 {
  text-shadow: 0 3px 28px rgba(0, 0, 0, 0.48);
}

.login-card {
  scrollbar-color: #4a463d transparent;
}

.login-card:has(#mfaLoginPanel:not(.hidden)),
.login-card:has(#activationPanel:not(.hidden)) {
  justify-content: flex-start;
  padding-top: clamp(28px, 4vh, 52px);
  padding-bottom: 32px;
}

.login-card:has(#mfaLoginPanel:not(.hidden)) .login-card-brand,
.login-card:has(#activationPanel:not(.hidden)) .login-card-brand {
  margin-bottom: 24px;
}

.login-card:has(#mfaLoginPanel:not(.hidden)) > p:not(.eyebrow),
.login-card:has(#activationPanel:not(.hidden)) > p:not(.eyebrow) {
  margin-bottom: 18px;
}

.activation-panel {
  width: 100%;
  flex: 0 0 auto;
  padding: 16px;
}

.activation-panel label {
  margin: 13px 0 10px;
}

.activation-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  align-items: stretch;
}

.activation-actions .button {
  width: 100%;
  min-width: 0;
}

.forgot-link {
  flex: 0 0 auto;
}

/* Login imersivo */
.login-screen {
  grid-template-columns: minmax(460px, 1.35fr) minmax(400px, 0.65fr);
  background: #09090a;
}

.login-visual {
  background:
    linear-gradient(115deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.52)),
    radial-gradient(ellipse at 46% 40%, #323026 0, #151515 43%, #080809 100%);
}

.login-visual:before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(255, 255, 255, 0.035) 50%, transparent 50.1%),
    linear-gradient(0deg, transparent 49.9%, rgba(255, 255, 255, 0.025) 50%, transparent 50.1%);
  background-size: 110px 110px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.38), transparent 82%);
}

.login-visual:after {
  width: 580px;
  height: 580px;
  left: 17%;
  top: 8%;
  border: 1px solid rgba(243, 189, 25, 0.08);
  box-shadow:
    0 0 160px rgba(243, 189, 25, 0.05),
    inset 0 0 150px rgba(243, 189, 25, 0.025);
}

.login-light {
  position: absolute !important;
  z-index: 1;
  pointer-events: none;
  transform-origin: top;
}

.login-light-one {
  width: 115px;
  height: 74vh;
  top: -5%;
  left: 49%;
  transform: rotate(24deg);
  background: linear-gradient(90deg, transparent, rgba(255, 222, 118, 0.2), transparent);
  filter: blur(9px);
}

.login-light-two {
  width: 3px;
  height: 55vh;
  top: 0;
  left: 25%;
  transform: rotate(-25deg);
  background: rgba(255, 219, 94, 0.56);
  box-shadow: 0 0 30px 7px rgba(255, 210, 64, 0.18);
}

.login-visual > img {
  z-index: 3;
  width: 230px;
  left: 6.5%;
  top: 7%;
  opacity: 0.96;
}

.login-visual > .login-message {
  left: 7%;
  bottom: 13%;
  max-width: 580px;
}

.login-visual .login-message span {
  color: var(--gold);
  letter-spacing: 0.27em;
}

.login-visual .login-message h2 {
  max-width: 600px;
  font-size: clamp(40px, 4.4vw, 66px);
  letter-spacing: -0.048em;
  line-height: 1.02;
  font-weight: 540;
  margin: 20px 0;
}

.login-visual .login-message p {
  max-width: 460px;
  color: #9e9d97;
  font-size: 13px;
  line-height: 1.65;
}

.login-signature {
  position: absolute;
  right: 3.5%;
  bottom: 3.5%;
  z-index: 3;
  color: #65645f;
  letter-spacing: 0.2em;
  font-size: 7px;
}

.login-card {
  position: relative;
  z-index: 3;
  padding: 7vh clamp(42px, 5.5vw, 92px);
  background: radial-gradient(circle at 100% 0, rgba(243, 189, 25, 0.045), transparent 28%), #111112;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.login-card:before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 1px;
  background: linear-gradient(transparent, rgba(243, 189, 25, 0.38), transparent);
}

.login-card-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(35px, 8vh, 82px);
}

.login-card-brand img {
  width: 145px;
  filter: invert(1);
}

.login-card-brand span {
  color: #7d7c77;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  padding: 7px 10px;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.login-card h1 {
  color: #f5f4ef;
  font-size: clamp(29px, 3vw, 40px);
  letter-spacing: -0.045em;
  font-weight: 590;
}

.login-card > p:not(.eyebrow) {
  max-width: 390px;
  color: #8f8e89;
  font-size: 12px;
  line-height: 1.55;
  margin-bottom: 30px;
}

.login-card label {
  color: #bcbab4;
  letter-spacing: 0.045em;
}

.login-card input {
  height: 49px;
  color: #eee;
  background: #171718;
  border-color: rgba(255, 255, 255, 0.1);
}

.login-card input:focus {
  outline: 0;
  border-color: rgba(243, 189, 25, 0.68);
  box-shadow: 0 0 0 3px rgba(243, 189, 25, 0.09);
}

.password-field button {
  top: 10px;
  color: #aaa8a2;
  background: #232325;
}

.login-card > .button {
  height: 49px;
  margin-top: 10px;
}

.forgot-link {
  color: #cda82f;
}

.login-card > small {
  color: #65645f;
}

.activation-panel {
  color: #dddcd7;
  background: #19191a;
  border-color: rgba(243, 189, 25, 0.18);
}

.mobile-bottom-nav {
  background: rgba(13, 13, 14, 0.96) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(16px);
}

.mobile-bottom-nav button {
  background: transparent !important;
  color: #878783 !important;
}

.mobile-bottom-nav button.active {
  color: var(--gold) !important;
}

@media (max-width: 1100px) {
  .login-screen {
    grid-template-columns: 1fr 440px;
  }

  .login-visual .login-message h2 {
    font-size: 43px;
  }
}

@media (max-width: 720px) {
  .sidebar {
    width: min(286px, 86vw);
    box-shadow: 24px 0 70px rgba(0, 0, 0, 0.55);
  }

  .main {
    margin-left: 0;
  }

  .topbar {
    min-height: 72px;
    background: rgba(13, 13, 14, 0.96);
  }

  .content {
    padding: 20px 14px 88px;
  }

  .metric {
    min-height: 118px;
  }

  .login-screen {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .login-visual {
    display: block;
    min-height: 230px;
  }

  .login-visual > img {
    width: 155px;
    left: 25px;
    top: 27px;
  }

  .login-visual > .login-message {
    left: 25px;
    right: 25px;
    bottom: 25px;
  }

  .login-visual .login-message h2 {
    font-size: 28px;
    margin: 9px 0 0;
  }

  .login-visual .login-message p,
  .login-signature,
  .login-card-brand img {
    display: none;
  }

  .login-card {
    padding: 34px 25px 42px;
    justify-content: flex-start;
    overflow: visible;
  }

  .login-card-brand {
    justify-content: flex-end;
    margin-bottom: 18px;
  }

  .login-card h1 {
    font-size: 29px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* A fotografia precisa permanecer por último para não ser substituída pelo fallback do tema. */
.login-visual {
  background-image:
    linear-gradient(90deg, rgba(4, 4, 5, 0.02), rgba(4, 4, 5, 0.12)),
    linear-gradient(0deg, rgba(4, 4, 5, 0.18), transparent 48%),
    url('../../assets/login-architecture-premium.webp');
  background-size: cover;
  background-position: 54% center;
}

.login-visual:before {
  background: linear-gradient(115deg, rgba(0, 0, 0, 0.04), transparent 58%, rgba(0, 0, 0, 0.14));
  mask-image: none;
}

.login-visual:after,
.login-light {
  display: none;
}

@media print {
  html {
    color-scheme: light;
    background: #fff;
  }

  body {
    background: #fff;
    color: #171717;
  }
}
