/* ═══════════════════════════════════════════════════════════════
   PROXY CHEATS — Auth / Login
   Continuação visual da Landing (tokens.css)
   ═══════════════════════════════════════════════════════════════ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  min-height: 100svh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

svg[hidden],
[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 999;
  width: auto;
  height: auto;
  padding: 0.55rem 0.9rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

/* ── Shell ──────────────────────────────────────────────────── */

.auth {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg);
}

@media (min-width: 960px) {
  .auth {
    grid-template-columns: minmax(0, 1.12fr) minmax(380px, 0.88fr);
  }
}

/* ── Showcase (left) ────────────────────────────────────────── */

.auth-showcase {
  display: none;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--border);
  color: var(--text);
}

@media (min-width: 960px) {
  .auth-showcase {
    display: block;
  }
}

.auth-showcase__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 55% at 18% 22%, rgba(0, 128, 255, 0.09) 0%, transparent 62%),
    radial-gradient(ellipse 45% 40% at 88% 78%, rgba(46, 91, 255, 0.05) 0%, transparent 58%),
    var(--bg);
  pointer-events: none;
}

.auth-showcase__grid {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 70% at 40% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 40% 45%, #000 20%, transparent 75%);
  pointer-events: none;
}

.auth-showcase__glow {
  position: absolute;
  width: 420px;
  height: 420px;
  left: 55%;
  top: 42%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0, 128, 255, 0.12) 0%, transparent 68%);
  pointer-events: none;
  filter: blur(2px);
}

.auth-showcase__inner {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 2.35rem 3rem 2rem;
  gap: 1.35rem;
}

.auth-showcase__logo {
  display: inline-flex;
  width: fit-content;
  text-decoration: none;
  opacity: 0.96;
  transition: opacity 0.2s var(--ease);
  margin-bottom: 0.25rem;
}

.auth-showcase__logo:hover {
  opacity: 1;
}

.auth-showcase__logo img {
  height: 40px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.auth-showcase__copy {
  max-width: 34rem;
  animation: auth-rise 0.7s var(--ease-out) both;
}

.auth-showcase__title {
  font-family: var(--font);
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 0.75rem;
}

.auth-showcase__sub {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-2);
  max-width: 38ch;
}

/* Mock stage */

.auth-mock-stage {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
  min-height: 0;
  padding: 0.75rem 0;
  animation: auth-rise 0.85s var(--ease-out) 0.08s both;
}

.auth-mock-frame {
  width: min(100%, 560px);
  perspective: 1400px;
}

.auth-mock {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(0, 128, 255, 0.22);
  background: var(--panel);
  overflow: hidden;
  transform: rotateY(-7deg) rotateX(4deg) translateZ(0);
  box-shadow:
    0 32px 70px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  transition: transform 0.5s var(--ease-out);
}

.auth-mock-frame:hover .auth-mock {
  transform: rotateY(-4deg) rotateX(2deg) translateZ(0);
}

.auth-mock::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 128, 255, 0.45), transparent);
  pointer-events: none;
}

.auth-mock__chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.auth-mock__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.auth-mock__dot--r { background: #ff5f57; }
.auth-mock__dot--y { background: #febc2e; }
.auth-mock__dot--g { background: #28c840; }

.auth-mock__url {
  margin-left: 0.45rem;
  flex: 1;
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.28rem 0.55rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-mock__body {
  display: grid;
  grid-template-columns: 78px 1fr;
  min-height: 300px;
}

.auth-mock__side {
  padding: 0.85rem 0.55rem;
  border-right: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
}

.auth-mock__brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  margin: 0 auto 0.85rem;
  background:
    linear-gradient(135deg, transparent 44%, #fff 44%, #fff 56%, transparent 56%),
    linear-gradient(225deg, transparent 44%, #2E5BFF 44%, #2E5BFF 56%, transparent 56%);
  background-color: #0a0a10;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-mock__nav-item {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 0.5rem;
}

.auth-mock__nav-item--on {
  background: rgba(0, 128, 255, 0.38);
  width: 72%;
}

.auth-mock__main {
  padding: 0.95rem;
}

.auth-mock__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.auth-mock__heading {
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}

.auth-mock__pill {
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  color: var(--ok-text);
  background: var(--ok-soft);
  border: 1px solid rgba(0, 230, 118, 0.18);
  border-radius: 999px;
  padding: 0.2rem 0.45rem;
}

.auth-mock__kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.auth-mock__kpi {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.45rem;
}

.auth-mock__kpi b {
  display: block;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}

.auth-mock__kpi span {
  display: block;
  margin-top: 0.28rem;
  font-family: var(--mono);
  font-size: 0.48rem;
  letter-spacing: 0.08em;
  color: var(--sub);
  text-transform: uppercase;
}

.auth-mock__chart {
  height: 78px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 128, 255, 0.035);
  display: flex;
  align-items: flex-end;
  gap: 5px;
  padding: 0.5rem 0.55rem;
  margin-bottom: 0.55rem;
}

.auth-mock__bar {
  flex: 1;
  height: var(--h, 50%);
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, var(--blue-b), rgba(0, 80, 180, 0.45));
  opacity: 0.85;
  transform-origin: bottom;
  animation: auth-bar 0.9s var(--ease-out) both;
}

.auth-mock__bar:nth-child(1) { animation-delay: 0.15s; }
.auth-mock__bar:nth-child(2) { animation-delay: 0.2s; }
.auth-mock__bar:nth-child(3) { animation-delay: 0.25s; }
.auth-mock__bar:nth-child(4) { animation-delay: 0.3s; }
.auth-mock__bar:nth-child(5) { animation-delay: 0.35s; }
.auth-mock__bar:nth-child(6) { animation-delay: 0.4s; }
.auth-mock__bar:nth-child(7) { animation-delay: 0.45s; }
.auth-mock__bar:nth-child(8) { animation-delay: 0.5s; }

.auth-mock__rows {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-mock__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.5rem;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-mock__row span {
  font-size: 0.65rem;
  color: var(--sub);
}

.auth-mock__row strong {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--blue-b);
}

/* Highlights */

.auth-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.25rem;
  list-style: none;
  margin-top: auto;
  padding-top: 0.35rem;
  animation: auth-rise 0.9s var(--ease-out) 0.14s both;
}

.auth-highlights li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 450;
  color: rgba(122, 139, 160, 0.92);
  letter-spacing: 0.01em;
}

.auth-highlights__check {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 128, 255, 0.35);
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 170, 255, 0.35) 0 35%, transparent 36%),
    rgba(0, 128, 255, 0.08);
  position: relative;
  flex-shrink: 0;
}

.auth-highlights__check::after {
  content: '';
  position: absolute;
  left: 3.5px;
  top: 2px;
  width: 3.5px;
  height: 5.5px;
  border: solid rgba(160, 196, 255, 0.85);
  border-width: 0 1.2px 1.2px 0;
  transform: rotate(45deg);
}

/* ── Form panel (right) ─────────────────────────────────────── */

.auth-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    calc(1.5rem + env(safe-area-inset-top, 0px))
    calc(1.5rem + env(safe-area-inset-right, 0px))
    calc(1.5rem + env(safe-area-inset-bottom, 0px))
    calc(1.5rem + env(safe-area-inset-left, 0px));
  min-height: 100svh;
  background: var(--bg);
}

.auth-panel__ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 50% -8%, rgba(0, 128, 255, 0.07), transparent 55%);
}

.auth-form-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  animation: auth-rise 0.55s var(--ease-out) both;
}

.auth-form-head {
  margin-bottom: 1.75rem;
}

.auth-form-logo {
  display: inline-flex;
  margin-bottom: 1.6rem;
  text-decoration: none;
  transition: opacity 0.2s var(--ease);
}

.auth-form-logo:hover {
  opacity: 0.88;
}

.auth-form-logo img {
  height: 42px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.auth-form-title {
  font-family: var(--font);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.4rem;
}

.auth-form-sub {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.5;
}

/* Alert */

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  margin-bottom: 1.25rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 82, 82, 0.22);
  background: rgba(255, 82, 82, 0.08);
  color: var(--danger-text);
  font-size: 0.84rem;
  line-height: 1.45;
  animation: auth-shake 0.35s var(--ease-out);
}

.auth-alert svg {
  flex-shrink: 0;
  margin-top: 0.1rem;
  opacity: 0.9;
}

/* Form */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-label {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.78);
  letter-spacing: -0.01em;
}

.auth-input {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 450;
  letter-spacing: -0.01em;
  outline: none;
  transition:
    border-color 0.18s var(--ease),
    background 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.auth-input::placeholder {
  color: rgba(61, 74, 92, 0.95);
}

.auth-input:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.auth-input:focus {
  border-color: rgba(0, 128, 255, 0.55);
  background: rgba(0, 128, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(0, 128, 255, 0.12);
}

.auth-input--error {
  border-color: rgba(255, 82, 82, 0.45);
}

.auth-input--error:focus {
  border-color: rgba(255, 82, 82, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 82, 82, 0.12);
}

.auth-password {
  position: relative;
}

.auth-password .auth-input {
  padding-right: 2.85rem;
}

.auth-password-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: var(--text-3);
  cursor: pointer;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}

.auth-password-toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.auth-password-toggle:focus-visible {
  outline: 2px solid rgba(0, 128, 255, 0.55);
  outline-offset: 1px;
}

.auth-password-toggle svg {
  width: 16px;
  height: 16px;
}

.auth-password-toggle svg.is-hidden {
  display: none !important;
}

/* Checkbox */

.auth-check {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
  min-height: 28px;
  margin-top: -0.15rem;
}

.auth-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.auth-check__box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition:
    border-color 0.18s var(--ease),
    background 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.auth-check__box svg {
  width: 10px;
  height: 10px;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
  color: #fff;
}

.auth-check:hover .auth-check__box {
  border-color: rgba(255, 255, 255, 0.28);
}

.auth-check input:checked + .auth-check__box {
  background: var(--accent);
  border-color: var(--accent);
}

.auth-check input:checked + .auth-check__box svg {
  opacity: 1;
  transform: scale(1);
}

.auth-check input:focus-visible + .auth-check__box {
  box-shadow: 0 0 0 3px rgba(0, 128, 255, 0.16);
  border-color: rgba(0, 128, 255, 0.55);
}

.auth-check__label {
  font-size: 0.84rem;
  color: var(--text-2);
  letter-spacing: -0.01em;
}

/* Submit */

.auth-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin-top: 0.25rem;
  padding: 0.75rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #0080ff;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    background 0.18s var(--ease),
    transform 0.18s var(--ease),
    opacity 0.18s var(--ease);
}

.auth-submit:hover:not(:disabled) {
  background: #0090ff;
}

.auth-submit:active:not(:disabled) {
  transform: scale(0.985);
  background: #0070e0;
}

.auth-submit:focus-visible {
  outline: 2px solid rgba(0, 170, 255, 0.65);
  outline-offset: 2px;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.85;
}

.auth-submit__spinner {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.15s var(--ease);
}

.auth-submit.is-loading .auth-submit__label {
  opacity: 0;
}

.auth-submit.is-loading .auth-submit__spinner {
  opacity: 1;
  animation: auth-spin 0.7s linear infinite;
}

/* Footer links */

.auth-form-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin-top: 1.75rem;
  font-size: 0.8rem;
  color: var(--text-3);
}

.auth-form-foot a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.auth-form-foot a:hover {
  color: #fff;
}

.auth-form-foot a:focus-visible {
  outline: 2px solid rgba(0, 128, 255, 0.5);
  outline-offset: 3px;
  border-radius: 4px;
}

.auth-form-foot__sep {
  opacity: 0.45;
}

/* ── Motion ─────────────────────────────────────────────────── */

@keyframes auth-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes auth-bar {
  from {
    transform: scaleY(0.15);
    opacity: 0.35;
  }
  to {
    transform: scaleY(1);
    opacity: 0.85;
  }
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

@keyframes auth-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .auth-mock {
    transform: none;
  }

  .auth-mock-frame:hover .auth-mock {
    transform: none;
  }
}

/* ── Mobile ─────────────────────────────────────────────────── */

@media (max-width: 959px) {
  .auth-panel {
    align-items: stretch;
  }

  .auth-form-wrap {
    max-width: 420px;
    margin: auto;
    width: 100%;
  }

  .auth-form-logo {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .auth-form-head {
    text-align: center;
  }

  .auth-form-title {
    font-size: 1.45rem;
  }
}

@media (max-width: 420px) {
  .auth-panel {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }

  .auth-form-logo img {
    height: 32px;
  }
}
