/* Login 2026-09-19 — glass azul inspirado na Home. */
:root {
  --login-blue: #3b9eff;
  --login-blue-strong: #176fd1;
  --login-cyan: #6dd8ff;
  --login-ink: #eef7ff;
  --login-muted: rgba(223, 238, 255, .68);
}

html,
body.login-body {
  min-height: 100%;
}

body.login-body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: grid !important;
  place-items: center !important;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(18px, 4vw, 42px);
  color: var(--login-ink) !important;
  background:
    radial-gradient(circle at 15% 12%, rgba(42, 121, 255, .30), transparent 34%),
    radial-gradient(circle at 84% 18%, rgba(43, 89, 210, .25), transparent 36%),
    radial-gradient(circle at 50% 110%, rgba(0, 153, 255, .17), transparent 42%),
    linear-gradient(145deg, #041124 0%, #071b36 42%, #0a2850 72%, #06172e 100%) !important;
}

body.login-body::before {
  content: "";
  position: fixed;
  width: min(72vw, 920px);
  aspect-ratio: 1;
  left: -24vw;
  top: -45vh;
  z-index: -4;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 142, 255, .26), rgba(37, 99, 235, .08) 42%, transparent 70%);
  filter: blur(18px);
  animation: loginAuroraA 16s ease-in-out infinite alternate;
}

body.login-body::after {
  content: "";
  position: fixed;
  width: min(68vw, 840px);
  aspect-ratio: 1;
  right: -20vw;
  bottom: -48vh;
  z-index: -4;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(64, 194, 255, .20), rgba(30, 105, 220, .07) 48%, transparent 72%);
  filter: blur(22px);
  animation: loginAuroraB 19s ease-in-out infinite alternate;
}

.login-fibers {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  overflow: hidden;
  opacity: .48;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.96), rgba(0,0,0,.72));
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.96), rgba(0,0,0,.72));
}

.login-fibers canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.login-backdrop-grain {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.016) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(circle at center, #000 0 34%, transparent 82%);
  mask-image: radial-gradient(circle at center, #000 0 34%, transparent 82%);
}

.login-card {
  width: min(100%, 470px) !important;
  max-width: 470px !important;
  margin: 0 !important;
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: clamp(26px, 4vw, 38px) !important;
  color: var(--login-ink) !important;
  background:
    linear-gradient(145deg, rgba(15, 47, 87, .54), rgba(6, 27, 56, .42)) !important;
  border: 1px solid rgba(178, 222, 255, .22) !important;
  border-radius: 28px !important;
  box-shadow:
    0 34px 90px rgba(0, 9, 28, .48),
    0 8px 34px rgba(17, 96, 210, .15),
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 0 0 1px rgba(255,255,255,.025) !important;
  -webkit-backdrop-filter: blur(28px) saturate(145%) !important;
  backdrop-filter: blur(28px) saturate(145%) !important;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  height: auto;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 0%, rgba(109,216,255,.22), transparent 31%),
    linear-gradient(115deg, rgba(255,255,255,.10), transparent 34%, transparent 68%, rgba(75,156,255,.08));
  opacity: .9;
}

.login-card::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: -1px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(178, 226, 255, .86), transparent);
  box-shadow: 0 0 24px rgba(78, 164, 255, .42);
}

.login-card > * {
  position: relative;
  z-index: 1;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 30px;
}

.login-brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 15px;
  color: #e9f7ff;
  background:
    linear-gradient(145deg, rgba(90, 179, 255, .28), rgba(49, 107, 224, .12));
  border: 1px solid rgba(192, 229, 255, .24);
  box-shadow:
    0 10px 30px rgba(0, 71, 178, .22),
    inset 0 1px 0 rgba(255,255,255,.18);
}

.login-brand-mark svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(109,216,255,.45));
}

.login-brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.login-brand-copy small {
  color: rgba(211, 232, 255, .58);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.login-brand-copy strong {
  color: #f5fbff;
  font-size: .98rem;
  font-weight: 760;
  letter-spacing: -.01em;
}

.login-heading {
  margin-bottom: 28px;
}

.login-status {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(144, 208, 255, .15);
  background: rgba(87, 159, 255, .08);
  color: rgba(213, 236, 255, .72);
  font-size: .68rem;
  font-weight: 760;
  letter-spacing: .04em;
}

.login-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6dd8ff;
  box-shadow: 0 0 0 4px rgba(109,216,255,.09), 0 0 14px rgba(109,216,255,.85);
}

.login-card h1 {
  margin: 0 0 10px !important;
  color: #ffffff !important;
  font-size: clamp(2rem, 6vw, 2.7rem) !important;
  line-height: 1.02 !important;
  letter-spacing: -.055em !important;
  font-weight: 780 !important;
}

.login-card .login-subtitle {
  max-width: 38ch;
  margin: 0;
  color: var(--login-muted) !important;
  font-size: .94rem;
  line-height: 1.55;
}

.login-card .form-stack {
  display: grid;
  gap: 17px;
}

.login-field {
  display: grid;
  gap: 8px;
  color: rgba(230, 243, 255, .78) !important;
  font-size: .76rem;
  font-weight: 740;
  letter-spacing: .015em;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  z-index: 2;
  width: 18px;
  height: 18px;
  color: rgba(177, 215, 255, .56);
  pointer-events: none;
  transition: color .18s ease, filter .18s ease;
}

.login-input-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-card input {
  width: 100% !important;
  min-height: 50px !important;
  padding: 0 15px 0 44px !important;
  border: 1px solid rgba(174, 214, 255, .15) !important;
  border-radius: 14px !important;
  outline: none !important;
  color: #f4f9ff !important;
  caret-color: #8adfff;
  background: rgba(2, 17, 38, .30) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035),
    0 1px 0 rgba(255,255,255,.025) !important;
  font: inherit;
  font-size: .92rem !important;
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease,
    transform .18s ease !important;
}

.login-card input::placeholder {
  color: rgba(186, 211, 238, .38) !important;
}

.login-input-wrap:focus-within .login-input-icon {
  color: #85ddff;
  filter: drop-shadow(0 0 7px rgba(109,216,255,.42));
}

.login-card input:hover {
  border-color: rgba(165, 215, 255, .25) !important;
  background: rgba(4, 23, 51, .37) !important;
}

.login-card input:focus {
  border-color: rgba(109,216,255,.62) !important;
  background: rgba(5, 28, 61, .46) !important;
  box-shadow:
    0 0 0 4px rgba(60, 158, 255, .10),
    0 10px 28px rgba(0, 65, 154, .10),
    inset 0 1px 0 rgba(255,255,255,.05) !important;
}

.login-card .btn-primary {
  width: 100%;
  min-height: 51px;
  margin-top: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(189, 228, 255, .20) !important;
  border-radius: 14px !important;
  color: #ffffff !important;
  background:
    linear-gradient(135deg, #176fd1 0%, #258fe8 48%, #39b9ef 100%) !important;
  box-shadow:
    0 16px 32px rgba(0, 87, 196, .28),
    inset 0 1px 0 rgba(255,255,255,.22) !important;
  font-weight: 780 !important;
  letter-spacing: -.01em;
  cursor: pointer;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .2s ease, filter .2s ease !important;
}

.login-card .btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.16) 48%, transparent 72%);
  transform: translateX(-120%);
  transition: transform .55s cubic-bezier(.2,.75,.2,1);
}

.login-card .btn-primary:hover {
  transform: translateY(-2px) !important;
  filter: brightness(1.06);
  box-shadow:
    0 20px 38px rgba(0, 93, 205, .36),
    0 0 24px rgba(72, 184, 255, .12),
    inset 0 1px 0 rgba(255,255,255,.25) !important;
}

.login-card .btn-primary:hover::before {
  transform: translateX(120%);
}

.login-card .btn-primary:active {
  transform: translateY(0) scale(.99) !important;
}

.login-card .btn-primary:disabled {
  cursor: wait;
  opacity: .66;
  transform: none !important;
}

.login-button-arrow {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-card .feedback {
  min-height: 18px;
  margin: -4px 0 0;
  color: #ffb8bd !important;
  font-size: .76rem;
  line-height: 1.35;
}

.login-card .feedback:empty {
  min-height: 0;
}

.login-security {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin: 22px 0 0;
  color: rgba(196, 220, 245, .42);
  font-size: .68rem;
  font-weight: 650;
}

.login-security svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

@keyframes loginAuroraA {
  from { transform: translate3d(-2%, -2%, 0) scale(.94); opacity: .78; }
  to { transform: translate3d(13%, 8%, 0) scale(1.08); opacity: 1; }
}

@keyframes loginAuroraB {
  from { transform: translate3d(4%, 2%, 0) scale(.96); opacity: .72; }
  to { transform: translate3d(-12%, -8%, 0) scale(1.1); opacity: .95; }
}

/* O tema global usa seletores mais especificos com !important.
   Estas regras pertencem ao login e precisam vencer a cascata do tema. */
html[data-site-theme] body.login-body {
  color-scheme: dark;
  color: var(--login-ink) !important;
  background:
    radial-gradient(circle at 15% 12%, rgba(42, 121, 255, .22), transparent 34%),
    radial-gradient(circle at 84% 18%, rgba(43, 89, 210, .18), transparent 36%),
    radial-gradient(circle at 50% 110%, rgba(0, 153, 255, .12), transparent 42%),
    linear-gradient(145deg, #031022 0%, #06182f 42%, #082444 72%, #05152a 100%) !important;
}

html[data-site-theme] body.login-body .login-card {
  color: #f4f9ff !important;
  background:
    linear-gradient(145deg, rgba(7, 28, 58, .91), rgba(4, 18, 39, .88)) !important;
  border-color: rgba(158, 210, 255, .25) !important;
  border-radius: 28px !important;
  box-shadow:
    0 34px 90px rgba(0, 7, 22, .58),
    0 8px 34px rgba(17, 96, 210, .14),
    inset 0 1px 0 rgba(255,255,255,.14),
    inset 0 0 0 1px rgba(255,255,255,.025) !important;
}

html[data-site-theme] body.login-body .login-card h1,
html[data-site-theme] body.login-body .login-brand-copy strong {
  color: #ffffff !important;
}

html[data-site-theme] body.login-body .login-brand-copy small {
  color: rgba(213, 235, 255, .74) !important;
}

html[data-site-theme] body.login-body .login-status {
  color: rgba(226, 241, 255, .88) !important;
  background: rgba(72, 151, 255, .13) !important;
  border-color: rgba(152, 211, 255, .20) !important;
}

html[data-site-theme] body.login-body .login-subtitle {
  color: rgba(222, 237, 253, .78) !important;
}

html[data-site-theme] body.login-body .login-field {
  color: rgba(237, 247, 255, .90) !important;
}

html[data-site-theme] body.login-body .login-input-icon {
  color: rgba(174, 218, 255, .70) !important;
}

html[data-site-theme] body.login-body .login-card input {
  color: #f7fbff !important;
  -webkit-text-fill-color: #f7fbff !important;
  background: rgba(1, 13, 30, .58) !important;
  border-color: rgba(169, 216, 255, .22) !important;
  border-radius: 14px !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035),
    0 1px 0 rgba(255,255,255,.02) !important;
}

html[data-site-theme] body.login-body .login-card input::placeholder {
  color: rgba(196, 220, 244, .53) !important;
  -webkit-text-fill-color: rgba(196, 220, 244, .53) !important;
  opacity: 1;
}

html[data-site-theme] body.login-body .login-card input:focus {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: rgba(3, 25, 55, .76) !important;
  border-color: rgba(109, 216, 255, .66) !important;
  box-shadow:
    0 0 0 4px rgba(60, 158, 255, .12),
    0 12px 30px rgba(0, 51, 128, .12),
    inset 0 1px 0 rgba(255,255,255,.05) !important;
}

html[data-site-theme] body.login-body .login-card input:-webkit-autofill,
html[data-site-theme] body.login-body .login-card input:-webkit-autofill:hover,
html[data-site-theme] body.login-body .login-card input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f7fbff !important;
  caret-color: #ffffff;
  -webkit-box-shadow: 0 0 0 1000px #071d3a inset !important;
  box-shadow: 0 0 0 1000px #071d3a inset !important;
  border-color: rgba(109, 216, 255, .44) !important;
}

html[data-site-theme] body.login-body .login-card .btn-primary {
  color: #ffffff !important;
  background: linear-gradient(135deg, #176fd1 0%, #258fe8 48%, #39b9ef 100%) !important;
  border-color: rgba(189, 228, 255, .24) !important;
  border-radius: 14px !important;
}

html[data-site-theme] body.login-body .login-security {
  color: rgba(211, 231, 250, .62) !important;
}

@media (max-width: 560px) {
  body.login-body {
    padding: 16px !important;
  }

  .login-fibers {
    opacity: .34;
  }

  .login-card,
  html[data-site-theme] body.login-body .login-card {
    width: 100% !important;
    max-width: 430px !important;
    padding: 27px 22px !important;
    border-radius: 23px !important;
    background:
      linear-gradient(145deg, rgba(6, 25, 53, .94), rgba(3, 16, 35, .92)) !important;
  }

  .login-brand {
    margin-bottom: 25px;
  }

  .login-card h1 {
    font-size: clamp(1.9rem, 10vw, 2.35rem) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.login-body::before,
  body.login-body::after {
    animation: none !important;
  }

  .login-card .btn-primary,
  .login-card input {
    transition-duration: 1ms !important;
  }
}
