/* ══════════════════════════════════════════════════════════
   AUTH SCREEN
══════════════════════════════════════════════════════════ */
#auth-screen {
  min-height: 100vh;
  display: flex;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 18% 18%, rgba(98, 126, 255, .22), transparent 34%),
    radial-gradient(circle at 72% 12%, rgba(34, 197, 94, .18), transparent 32%),
    radial-gradient(circle at 55% 82%, rgba(56, 189, 248, .12), transparent 34%),
    linear-gradient(135deg, #050713 0%, #0a1020 48%, #07140f 100%);
}

#auth-screen::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.9), rgba(0,0,0,.25) 58%, rgba(0,0,0,.08));
  mask-image: linear-gradient(90deg, rgba(0,0,0,.9), rgba(0,0,0,.25) 58%, rgba(0,0,0,.08));
  pointer-events: none;
}

#auth-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(120deg, rgba(255,255,255,.08), transparent 22%, transparent 72%, rgba(34,197,94,.08)),
    radial-gradient(circle at center, transparent 0%, rgba(0,0,0,.22) 72%);
  pointer-events: none;
}

.auth-left,
.auth-right,
.auth-divider,
.auth-theme-toggle {
  position: relative;
  z-index: 1;
}

/* Painel esquerdo — universo Orbia */
.auth-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 4vw, 56px);
}

.auth-orbit-scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(.2px);
}

.orb-primary {
  width: clamp(220px, 28vw, 420px);
  height: clamp(220px, 28vw, 420px);
  right: clamp(32px, 12vw, 190px);
  top: 50%;
  transform: translateY(-50%);
  background:
    radial-gradient(circle at 34% 30%, rgba(255,255,255,.98) 0 2%, rgba(210,255,232,.9) 6%, transparent 7%),
    radial-gradient(circle at 38% 34%, #93f9be 0%, #22c55e 28%, #0f6f4e 52%, #15265f 76%, #0b1024 100%);
  box-shadow:
    0 0 90px rgba(34,197,94,.34),
    inset -42px -46px 74px rgba(1,6,22,.64),
    inset 28px 26px 56px rgba(255,255,255,.18);
  opacity: .9;
}

.orb-secondary {
  width: 86px;
  height: 86px;
  right: clamp(20px, 10vw, 120px);
  top: 22%;
  background: radial-gradient(circle at 35% 30%, #fff, #8bd4ff 16%, #3b82f6 45%, #172554 100%);
  box-shadow: 0 0 42px rgba(59,130,246,.42), inset -16px -18px 28px rgba(0,0,0,.45);
  opacity: .85;
}

.orbit {
  position: absolute;
  right: clamp(-120px, 2vw, 52px);
  top: 50%;
  border: 1px solid rgba(226, 232, 240, .16);
  border-radius: 50%;
  transform: translateY(-50%) rotate(-18deg);
  box-shadow: 0 0 60px rgba(34,197,94,.08);
}

.orbit span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d9fff0;
  box-shadow: 0 0 18px rgba(34,197,94,.9);
}

.orbit-one {
  width: clamp(360px, 46vw, 720px);
  height: clamp(150px, 19vw, 290px);
}

.orbit-one span { left: 18%; top: 13%; }

.orbit-two {
  width: clamp(440px, 56vw, 860px);
  height: clamp(190px, 25vw, 370px);
  transform: translateY(-50%) rotate(19deg);
  border-color: rgba(56,189,248,.16);
}

.orbit-two span {
  right: 22%;
  bottom: 9%;
  background: #dff5ff;
  box-shadow: 0 0 18px rgba(56,189,248,.9);
}

.orbit-three {
  width: clamp(500px, 62vw, 980px);
  height: clamp(230px, 31vw, 460px);
  transform: translateY(-50%) rotate(-38deg);
  border-style: dashed;
  border-color: rgba(255,255,255,.11);
}

.orbit-three span {
  left: 50%;
  bottom: -4px;
  background: #fff2d7;
  box-shadow: 0 0 18px rgba(245,158,11,.85);
}

.orbit-pulse {
  position: absolute;
  width: 560px;
  height: 560px;
  right: 7vw;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,197,94,.16), transparent 62%);
  filter: blur(16px);
}

.auth-wordmark {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
  background: linear-gradient(135deg, rgba(255,255,255,.2), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 22px 60px rgba(0,0,0,.32), 0 0 44px rgba(34,197,94,.2);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.auth-mark-core {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eafff4, #22c55e 58%, #2563eb);
  box-shadow: 0 0 24px rgba(34,197,94,.85);
}

.auth-mark-ring {
  position: absolute;
  width: 36px;
  height: 18px;
  border: 1.5px solid rgba(226, 232, 240, .78);
  border-radius: 50%;
  transform: rotate(-24deg);
}

.auth-brand-name {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -.05em;
}

.auth-brand-sub {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(226,232,240,.58);
  margin-top: 2px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.auth-hero {
  width: min(620px, 100%);
  padding: 52px 0;
}

.auth-hero-label {
  width: fit-content;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: #bbf7d0;
  text-transform: uppercase;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(187,247,208,.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, .48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.auth-hero-label::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(34,197,94,.92);
}

.auth-hero h1 {
  max-width: 720px;
  font-family: var(--sans);
  font-size: clamp(42px, 6.4vw, 86px);
  font-weight: 600;
  line-height: .96;
  letter-spacing: -.075em;
  color: #f8fafc;
  margin-bottom: 24px;
  text-wrap: balance;
}

.auth-hero h1 span,
.auth-hero h1 strong {
  color: #86efac;
}

.auth-hero p {
  font-size: clamp(15px, 1.4vw, 18px);
  color: rgba(226,232,240,.72);
  line-height: 1.75;
  max-width: 560px;
}

.auth-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 560px;
  margin-top: 34px;
}

.auth-stat {
  padding: 16px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.045));
  box-shadow: 0 20px 60px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.11);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.auth-stat strong {
  display: block;
  font-family: var(--mono);
  font-size: 24px;
  line-height: 1;
  color: #f8fafc;
  letter-spacing: -.08em;
}

.auth-stat span {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: rgba(226,232,240,.62);
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 30px;
}

.auth-feat {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  background: rgba(2, 6, 23, .3);
  color: rgba(226,232,240,.78);
  font-size: 13px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.auth-feat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #86efac;
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(34,197,94,.92);
}

.auth-footer-text {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(226,232,240,.42);
}

/* Divisor vertical */
.auth-divider {
  width: 1px;
  flex-shrink: 0;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.16) 20%, rgba(134,239,172,.26) 50%, rgba(255,255,255,.16) 80%, transparent);
}

/* Painel direito — form */
.auth-right {
  width: min(480px, 38vw);
  min-width: 420px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 4vw, 56px);
  background: linear-gradient(180deg, rgba(15,23,42,.78), rgba(2,6,23,.68));
  border-left: 1px solid rgba(255,255,255,.08);
  box-shadow: -34px 0 120px rgba(0,0,0,.28);
  -webkit-backdrop-filter: blur(26px);
  backdrop-filter: blur(26px);
}

.auth-form-wrap {
  width: 100%;
  padding: 26px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.055)),
    rgba(2,6,23,.42);
  box-shadow: 0 28px 90px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.12);
}

.auth-tabs {
  display: flex;
  gap: 6px;
  background: rgba(2,6,23,.54);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 5px;
  margin-bottom: 28px;
}

.auth-tab {
  flex: 1;
  padding: 10px 12px;
  text-align: center;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: rgba(226,232,240,.52);
  transition: transform .18s ease, color .18s ease, background .18s ease, box-shadow .18s ease;
  border: none;
  background: transparent;
  font-family: var(--mono);
  letter-spacing: .02em;
}

.auth-tab:hover {
  color: rgba(248,250,252,.86);
}

.auth-tab.active {
  background: linear-gradient(135deg, rgba(34,197,94,.95), rgba(56,189,248,.88));
  color: #03110b;
  box-shadow: 0 12px 32px rgba(34,197,94,.22);
}

.auth-form-title {
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 650;
  color: #f8fafc;
  margin-bottom: 8px;
  letter-spacing: -.045em;
}

.auth-form-sub {
  font-size: 13px;
  color: rgba(226,232,240,.58);
  margin-bottom: 24px;
  line-height: 1.6;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: rgba(226,232,240,.58);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  background: rgba(2,6,23,.58);
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 16px;
  padding: 13px 15px;
  color: #f8fafc;
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
}

.field input:hover {
  border-color: rgba(148,163,184,.34);
  background: rgba(2,6,23,.72);
}

.field input:focus {
  border-color: rgba(134,239,172,.9);
  box-shadow: 0 0 0 4px rgba(34,197,94,.12), 0 0 34px rgba(34,197,94,.12);
  background: rgba(2,6,23,.84);
}

.field input::placeholder {
  color: rgba(148,163,184,.5);
}

.auth-error {
  padding: 11px 13px;
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(248,113,113,.28);
  border-radius: 16px;
  font-size: 12px;
  color: #fca5a5;
  display: none;
  font-family: var(--mono);
}

.auth-error.show { display: block; }

.btn-auth {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #86efac 0%, #22c55e 42%, #38bdf8 100%);
  color: #03110b;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, opacity .18s ease;
  letter-spacing: .02em;
  margin-top: 6px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(34,197,94,.25);
}

.btn-auth::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.32) 45%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .55s ease;
}

.btn-auth:hover {
  transform: translateY(-1px);
  filter: saturate(1.12) brightness(1.05);
  box-shadow: 0 24px 60px rgba(34,197,94,.32), 0 0 40px rgba(56,189,248,.16);
}

.btn-auth:hover::before {
  transform: translateX(120%);
}

.btn-auth:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

.auth-switch-text {
  text-align: center;
  font-size: 12px;
  color: rgba(226,232,240,.5);
  margin-top: 18px;
}

.auth-switch-link {
  color: #86efac;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
}

.auth-switch-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Auth screen entry animations ─────────────────────── */
.auth-left { animation: slideRight .55s ease both; }
.auth-right { animation: slideLeft .55s ease both; }
.orb-primary { animation: floatOrb 8s ease-in-out infinite; }
.orb-secondary { animation: floatMoon 7s ease-in-out infinite; }
.orbit-one { animation: breatheOrbit 9s ease-in-out infinite; }
.orbit-two { animation: breatheOrbit 11s ease-in-out infinite reverse; }
.orbit-three { animation: breatheOrbit 13s ease-in-out infinite; }

@keyframes slideRight {
  from { opacity: 0; transform: translateX(-18px); }
  to { opacity: 1; transform: none; }
}

@keyframes slideLeft {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes floatOrb {
  0%, 100% { transform: translateY(-50%) translateX(0) scale(1); }
  50% { transform: translateY(calc(-50% - 12px)) translateX(-8px) scale(1.015); }
}

@keyframes floatMoon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@keyframes breatheOrbit {
  0%, 100% { opacity: .72; }
  50% { opacity: .38; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-left,
  .auth-right,
  .orb-primary,
  .orb-secondary,
  .orbit-one,
  .orbit-two,
  .orbit-three {
    animation: none;
  }

  .btn-auth,
  .btn-auth::before,
  .auth-tab,
  .field input {
    transition: none;
  }
}

@media (max-width: 1080px) {
  #auth-screen {
    flex-direction: column;
    min-height: 100dvh;
  }

  .auth-left {
    min-height: 580px;
    padding-bottom: 24px;
  }

  .auth-right {
    width: 100%;
    min-width: 0;
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,.1);
  }

  .auth-divider {
    display: none;
  }

  .auth-form-wrap {
    max-width: 520px;
  }
}

@media (max-width: 720px) {
  .auth-left {
    min-height: auto;
    gap: 42px;
    padding: 24px 18px 30px;
  }

  .auth-wordmark {
    padding-right: 92px;
  }

  .auth-hero {
    padding: 24px 0 10px;
  }

  .auth-hero h1 {
    font-size: clamp(38px, 14vw, 58px);
  }

  .auth-hero-label {
    font-size: 9px;
    letter-spacing: .12em;
  }

  .auth-stats {
    grid-template-columns: 1fr;
  }

  .auth-feat {
    width: 100%;
    align-items: flex-start;
    border-radius: 18px;
  }

  .auth-right {
    padding: 18px;
  }

  .auth-form-wrap {
    padding: 18px;
    border-radius: 24px;
  }

  .orb-primary {
    right: -90px;
    top: 38%;
    opacity: .42;
  }

  .orb-secondary,
  .orbit,
  .orbit-pulse {
    opacity: .35;
  }
}
