/* ============================================================
   auth.css — visual compartilhado das telas de autenticação fora do login
   (esqueci-senha, redefinir-senha). Espelha a estética do login.html:
   split-screen com vitrine escura (QiLog) à esquerda + form à direita.
   Paleta zinc + accent sky (QiLog blue).
   ============================================================ */
:root {
  --paper-1: #fafafa; --paper-2: #ffffff; --paper-3: #f4f4f5;
  --ink-1: #18181b; --ink-2: #27272a; --ink-3: #3f3f46; --ink-4: #52525b;
  --ink-5: #71717a; --ink-6: #a1a1aa; --ink-9: #e4e4e7; --ink-10: #f1f1f3;
  --accent: #0ea5e9; --accent-hi: #38bdf8; --accent-soft: #e0f2fe; --accent-ring: rgb(14 165 233 / 0.18);
  --ok: #166534; --ok-soft: #dcfce7; --err: #be123c;
  --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace;
  --r-sm: 8px; --r-md: 12px; --r-pill: 9999px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1); --ease-spring: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100dvh; background: var(--paper-1);
  overflow-x: hidden; font-family: var(--font-display); color: var(--ink-1);
}
.auth-grid { min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 992px) { .auth-grid { grid-template-columns: 1.15fr 1fr; } }

/* ====== LEFT — vitrine QiLog ====== */
.stage {
  position: relative; background: #0a0d14; color: #fafafa;
  padding: 3rem 2.5rem; display: flex; flex-direction: column; overflow: hidden; isolation: isolate;
}
@media (min-width: 992px) { .stage { padding: 3.5rem 4rem; } }
.stage::before, .stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.stage::before {
  background:
    radial-gradient(800px 600px at 80% -10%, rgb(14 165 233 / 0.32), transparent 60%),
    radial-gradient(700px 500px at 10% 100%, rgb(56 189 248 / 0.16), transparent 65%);
  animation: drift 18s var(--ease-out) infinite alternate; z-index: -2;
}
.stage::after {
  background-image:
    linear-gradient(to right, rgb(255 255 255 / 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 255 255 / 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 80%); z-index: -1;
}
@keyframes drift { from { transform: translate3d(0,0,0); } to { transform: translate3d(-3%,2%,0); } }

.stage-brand { display: flex; align-items: center; gap: 0.8rem; margin-bottom: auto;
  opacity: 0; animation: fade-in 0.7s var(--ease-out) 0.1s forwards; }
.stage-mark { width: 38px; height: 38px; background: var(--accent); border-radius: 0.6rem;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.1rem;
  box-shadow: 0 8px 24px -8px rgb(14 165 233 / 0.6); }
.stage-brand .nm { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.018em; }
.stage-brand .sb { font-size: 0.68rem; color: #a1a1aa; text-transform: uppercase; letter-spacing: 0.08em; }

.stage-headline { max-width: 540px; margin: 4rem 0 2rem; }
.stage-eyebrow { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: rgb(255 255 255 / 0.55);
  margin-bottom: 1.25rem; display: inline-flex; align-items: center; gap: 0.5rem;
  opacity: 0; animation: fade-in 0.7s var(--ease-out) 0.25s forwards; }
.stage-eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--accent-hi); }
.stage-headline h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 700; letter-spacing: -0.045em;
  line-height: 1; margin: 0 0 1.5rem; opacity: 0; animation: rise-up 0.9s var(--ease-out) 0.35s forwards; }
.stage-headline h1 em { font-style: normal;
  background: linear-gradient(120deg, #93c5fd 0%, #60a5fa 50%, #fff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.stage-headline p { font-size: 1.02rem; line-height: 1.55; color: rgb(255 255 255 / 0.68);
  max-width: 460px; margin: 0; opacity: 0; animation: rise-up 0.9s var(--ease-out) 0.5s forwards; }

.stage-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 540px; margin-top: 2.5rem; }
.stat { padding: 1.15rem 1.1rem; border: 1px solid rgb(255 255 255 / 0.08); border-radius: 1rem;
  background: rgb(255 255 255 / 0.02); backdrop-filter: blur(6px); opacity: 0; animation: rise-up 0.9s var(--ease-out) forwards; }
.stat:nth-child(1) { animation-delay: 0.65s; } .stat:nth-child(2) { animation-delay: 0.75s; } .stat:nth-child(3) { animation-delay: 0.85s; }
.stat .v { font-family: var(--font-mono); font-size: 1.4rem; font-weight: 700; letter-spacing: -0.025em; color: #fff; line-height: 1; }
.stat .l { font-size: 0.7rem; color: rgb(255 255 255 / 0.55); margin-top: 0.45rem; letter-spacing: 0.02em; }

.stage-foot { margin-top: auto; padding-top: 3rem; display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.78rem; color: rgb(255 255 255 / 0.45); }
.pulse-dot { width: 8px; height: 8px; background: #22c55e; border-radius: 50%;
  box-shadow: 0 0 0 4px rgb(34 197 94 / 0.18); animation: pulse 2s var(--ease-out) infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px rgb(34 197 94 / 0.18); } 50% { box-shadow: 0 0 0 8px rgb(34 197 94 / 0.05); } }

/* ====== RIGHT — form ====== */
.form-stage { display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; background: var(--paper-2); }
@media (min-width: 992px) { .form-stage { padding: 4rem 4rem; } }
.form-card { width: 100%; max-width: 380px; animation: pane-in 0.5s var(--ease-out) backwards; }
.form-card .greet-eye { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.85rem; }
.form-card h2 { font-size: 2rem; font-weight: 700; letter-spacing: -0.035em; color: var(--ink-1); line-height: 1.05; margin: 0 0 0.6rem; }
.form-card .lead { font-size: 0.92rem; color: var(--ink-5); margin: 0 0 2rem; line-height: 1.5; }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--ink-3); letter-spacing: -0.005em; margin-bottom: 0.5rem; }
.input-wrap { position: relative; display: flex; align-items: center; background: var(--paper-2);
  border: 1px solid var(--ink-9); border-radius: var(--r-sm); padding: 0 0.85rem;
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out); }
.input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.input-wrap.invalid { border-color: var(--err); box-shadow: 0 0 0 3px rgb(190 18 60 / 0.12); }
.input-wrap > i { color: var(--ink-5); font-size: 0.95rem; flex-shrink: 0; }
.input-wrap input { flex: 1; border: none; outline: none; background: transparent; padding: 0.75rem 0.7rem;
  font-family: var(--font-display); font-size: 0.92rem; color: var(--ink-1); letter-spacing: -0.005em; }
.input-wrap input::placeholder { color: var(--ink-6); }
.input-wrap button.toggle { background: transparent; border: none; color: var(--ink-5); padding: 0.4rem; cursor: pointer; transition: color 0.2s var(--ease-out); }
.input-wrap button.toggle:hover { color: var(--ink-2); }

.submit { width: 100%; padding: 0.85rem 1rem; background: var(--ink-1); color: #fff; border: none;
  border-radius: var(--r-sm); font-family: var(--font-display); font-weight: 600; font-size: 0.92rem;
  letter-spacing: -0.005em; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  box-shadow: 0 8px 24px -10px rgb(10 10 10 / 0.5); transition: transform 0.2s var(--ease-spring), box-shadow 0.25s var(--ease-out); margin-top: 0.4rem; }
.submit:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -10px rgb(10 10 10 / 0.6); }
.submit:active { transform: translateY(1px); }
.submit:disabled { opacity: 0.65; cursor: wait; }

.note { display: none; margin-bottom: 1rem; padding: 0.75rem 0.9rem; border-radius: var(--r-sm);
  font-size: 0.84rem; gap: 0.5rem; align-items: flex-start; line-height: 1.4; }
.note.show { display: flex; }
.note.err { background: rgb(190 18 60 / 0.07); border: 1px solid rgb(190 18 60 / 0.18); color: var(--err); }
.note.ok { background: var(--ok-soft); border: 1px solid rgb(22 101 52 / 0.2); color: var(--ok); }

.back-link { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1.75rem;
  color: var(--accent); text-decoration: none; font-weight: 500; font-size: 0.85rem; transition: gap 0.2s var(--ease-out); }
.back-link:hover { gap: 0.6rem; color: var(--accent-hi); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pane-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }

@media (max-width: 991.98px) {
  .stage { min-height: auto; padding: 2.25rem 1.5rem 2rem; }
  .stage-headline { margin: 1.5rem 0 1rem; }
  .stage-stats, .stage-foot { display: none; }
}
