/* Entrada do MarketMetrics. Inter auto-hospedada: o login é público, então a
   fonte vem de /public (a CSP não aceita CDN). */
@font-face {
  font-family: "Inter";
  src: url("/public/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0f172a;
  --muted: #5b6475;
  --line: #e2e6ee;
  --danger: #b42318;
  --success: #067647;
  /* Identidade MarketMetrics: índigo elétrico, ciano de dados, fundo meia-noite. */
  --brand: #6d5dfc;
  --brand-dark: #4f3fd8;
  --cyan: #22d3ee;
  --midnight: #0b1220;
  --glow: rgba(109, 93, 252, .28);
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); background: #f4f6fb;
  font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
button, input { font: inherit; }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-brand {
  padding: clamp(40px, 7vw, 100px); background: var(--midnight); color: #fff;
  display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; isolation: isolate;
}
/* Malha técnica e brilho ficam no fundo: a identidade "de dados" nunca compete com o texto. */
.auth-brand::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 75% 30%, #000 25%, transparent 72%);
  mask-image: radial-gradient(ellipse at 75% 30%, #000 25%, transparent 72%);
}
.auth-brand::after {
  content: ""; position: absolute; z-index: -1; width: 560px; height: 560px; border-radius: 50%;
  right: -240px; top: -220px; opacity: .6; filter: blur(12px);
  background: radial-gradient(circle at 38% 38%, var(--cyan), var(--brand) 52%, transparent 71%);
}
.logo-lockup { display: flex; align-items: center; gap: 14px; margin-bottom: 40px; text-decoration: none; color: inherit; }
.logo-lockup img { width: 56px; height: 56px; display: block; }
.wordmark { font-size: 22px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.wordmark em {
  font-style: normal; background: linear-gradient(90deg, #8b7dff, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow { color: #a5b4fc; text-transform: uppercase; letter-spacing: .15em; font-size: 10px; font-weight: 850; }
.auth-brand h1 { font-size: clamp(48px, 6vw, 84px); line-height: .92; letter-spacing: -.06em; margin: 15px 0 24px; }
.auth-brand p { color: #b7c0d6; font-size: 17px; max-width: 520px; }
.security-note { margin-top: 38px; padding-left: 14px; border-left: 3px solid var(--cyan); color: #d3dae8; font-size: 12px; }
.auth-card {
  width: min(470px, calc(100% - 40px)); margin: auto; padding: 42px;
  background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 80px rgba(15, 23, 42, .12);
}
.auth-card .eyebrow { color: var(--brand-dark); }
.auth-card h2 { font-size: 30px; letter-spacing: -.04em; margin: 7px 0 5px; }
.auth-card > div > p { color: var(--muted); margin: 0 0 25px; }
form { display: grid; gap: 15px; }
label { color: var(--muted); font-size: 11px; font-weight: 750; }
input {
  display: block; width: 100%; height: 46px; margin-top: 6px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; outline: 0; color: var(--ink); background: #fff;
}
input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--glow); }
label small { display: block; margin-top: 5px; font-weight: 500; }
.primary {
  height: 48px; border: 0; border-radius: 10px; color: #fff; font-weight: 800; cursor: pointer; margin-top: 3px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark)); box-shadow: 0 10px 24px var(--glow);
  transition: filter .15s ease, transform .15s ease;
}
.primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.primary:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.primary:disabled { opacity: .6; cursor: wait; box-shadow: none; transform: none; }
.remember-device { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.remember-device input {
  width: 16px; height: 16px; margin-top: 1px; flex: none; accent-color: var(--brand); cursor: pointer;
}
.remember-device span { font-weight: 600; color: var(--ink); font-size: 12px; }
.remember-device small { display: block; margin-top: 3px; font-weight: 500; color: var(--muted); }
.message { padding: 10px 12px; border-radius: 8px; background: #fde8e6; color: var(--danger); font-size: 12px; }
.message.success { background: #e3f5ec; color: var(--success); }
/* Senha: contagem até o mínimo e botão de mostrar (public/senha.js). */
.senha-apoio { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 20px; margin-top: 6px; }
.senha-medidor { flex: none; width: 96px; height: 6px; accent-color: var(--brand); }
.senha-contagem { margin-right: auto; font-weight: 600; }
.senha-contagem.ok { color: var(--success); }
.senha-mostrar { padding: 0; border: 0; background: none; color: var(--brand-dark); font-weight: 700; font-size: 11px; text-decoration: underline; cursor: pointer; }
.senha-mostrar:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.hidden { display: none !important; }
.footnote { display: block; color: var(--muted); text-align: center; margin-top: 20px; }
.back-link { display: inline-block; margin-top: 20px; color: #4b5565; font-size: 12px; }
.back-link:focus-visible, input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 800px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand { min-height: 320px; padding: 40px 25px; }
  .auth-brand h1 { font-size: 52px; }
  .logo-lockup { margin-bottom: 28px; }
  .security-note { margin-top: 15px; }
  .auth-card { margin: 24px auto; padding: 28px 22px; }
  .senha-mostrar { min-height: 44px; padding: 0 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .primary { transition: none; }
  .primary:hover { transform: none; }
}
