/* ==========================================================================
   CREA HUB — Site oficial
   Linguagem editorial (DESIGN.md / GSAP) vestida com a identidade CREA HUB
   (refs 01 + shared/tokens.css). Canvas quase-preto roxo, tipografia gigante
   como heroína, pills fantasma com hairline, CTA com borda em gradiente,
   anotações { entre chaves }, hairlines de 1px, cor como taxonomia.
   Zero recursos externos — pilha de fontes de sistema.
   ========================================================================== */

:root {
  /* --- Superfícies (canvas único quase-preto ROXO) --- */
  --canvas:      #0f0c17;   /* ink-950 — palco único */
  --surface-1:   #151121;   /* ink-900 — footer / painel aninhado */
  --surface-2:   #1a1528;   /* ink-850 — cards */
  --surface-3:   #211b31;   /* ink-800 — elevado / pill ativa */
  --surface-4:   #2b2440;   /* ink-700 — hover / trilhos */

  /* --- Texto branco-lavanda (no lugar do cream) --- */
  --ink:         #f4f1fb;   /* principal */
  --ink-soft:    #cfc7e6;   /* secundário forte */
  --muted:       #a79fc4;   /* subheads, anotações, labels */
  --faint:       #6f6790;   /* meta, disabled, eixos */

  /* --- Hairlines / bordas --- */
  --line:        rgba(244, 241, 251, 0.10);
  --line-soft:   rgba(244, 241, 251, 0.06);
  --line-strong: rgba(244, 241, 251, 0.18);

  /* --- Acento roxo (âncora Creamidia #7c3aed) --- */
  --accent:      #7c3aed;
  --accent-2:    #9668f2;
  --accent-3:    #b294f7;
  --accent-soft: rgba(124, 58, 237, 0.16);
  --accent-glow: rgba(124, 58, 237, 0.40);
  --cta-gradient: linear-gradient(114deg, #7c3aed 12%, #9668f2 60%, #b294f7 100%);

  /* --- Taxonomia de cor dos 3 MODOS (como as disciplinas da GSAP) --- */
  --mode-review: #b294f7;   /* Revisão do cliente — lilás (a marca) */
  --mode-spell:  #f2a53c;   /* Ortografia — âmbar (atenção ao texto) */
  --mode-brief:  #6d8cf0;   /* Briefing — azul-violeta (o plano) */

  /* --- Motivo de correção (severidade, não categoria) --- */
  --err:  #e5484d;          /* erro / sublinhado ondulado */
  --ok:   #37ad78;          /* corrigido / conferido */
  --warn: #f2a53c;

  /* --- Escala tipográfica editorial (clamp: display escala com a viewport) */
  --display:     clamp(3.25rem, 8.5vw, 8rem);      /* herói (divide espaço c/ widget), lh ~0.9 */
  --display-sm:  clamp(2.75rem, 9vw, 8rem);        /* CTA final (largura cheia) */
  --h1:          clamp(2.5rem, 6vw, 4.5rem);
  --h2:          clamp(2rem, 4.4vw, 3.4rem);
  --h3:          clamp(1.4rem, 2.4vw, 2.1rem);
  --body-lg:     clamp(1.15rem, 1.6vw, 1.45rem);
  --body:        1.0625rem;   /* 17px */
  --small:       0.9375rem;   /* 15px */
  --caption:     0.8125rem;   /* 13px */

  /* --- Pesos (sistema: 300 / 600 / 800-900) --- */
  --w-light: 300;
  --w-reg:   400;
  --w-semi:  600;
  --w-black: 800;

  /* --- Ritmo --- */
  --maxw:       1200px;
  --maxw-text:  760px;
  --gutter:     clamp(20px, 5vw, 64px);
  --section:    clamp(72px, 12vh, 140px);

  --r-pill: 999px;
  --r-card: 16px;
  --r-lg:   22px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Segoe UI Variable", "Segoe UI", system-ui, Roboto, "Helvetica Neue",
          Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --t:    240ms var(--ease);
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--body);
  font-weight: var(--w-reg);
  line-height: 1.55;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* halo roxo sutil no topo do palco (profundidade só por gradiente) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(80% 55% at 78% -8%, rgba(124, 58, 237, 0.20) 0%, transparent 60%),
    radial-gradient(70% 50% at 8% 4%, rgba(150, 104, 242, 0.12) 0%, transparent 55%);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, button, textarea { font-family: inherit; font-size: inherit; color: inherit; }

::selection { background: rgba(124, 58, 237, 0.42); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent-3);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); position: relative; z-index: 1; }

/* ==========================================================================
   Anotações { entre chaves } — assinatura tipográfica
   ========================================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5ch;
  font-size: var(--small);
  font-weight: var(--w-reg);
  color: var(--muted);
  letter-spacing: 0.01em;
}
.eyebrow::before { content: "{"; color: var(--accent-3); font-weight: var(--w-semi); }
.eyebrow::after  { content: "}"; color: var(--accent-3); font-weight: var(--w-semi); }

/* ==========================================================================
   Botões — pills fantasma; CTA = borda em gradiente roxo
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6ch;
  padding: 14px 26px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-size: var(--body);
  font-weight: var(--w-semi);
  line-height: 1;
  letter-spacing: -0.01em;
  transition: border-color var(--t), color var(--t), background var(--t), transform var(--t);
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 10px 18px; font-size: var(--small); }
.btn--lg { padding: 18px 34px; font-size: var(--body-lg); }
.btn--muted { color: var(--muted); border-color: var(--line); }
.btn--muted:hover { color: var(--ink); border-color: var(--line-strong); }

/* CTA único cromático: borda em gradiente (a maior escalada permitida) */
.btn--cta {
  position: relative;
  border: none;
  color: var(--ink);
  background:
    linear-gradient(var(--canvas), var(--canvas)) padding-box,
    var(--cta-gradient) border-box;
  border: 1.6px solid transparent;
}
.btn--cta:hover {
  color: #fff;
  box-shadow: 0 0 0 1px var(--accent-glow), 0 10px 40px rgba(124, 58, 237, 0.30);
}
.btn--cta.on-surface {
  background:
    linear-gradient(var(--surface-1), var(--surface-1)) padding-box,
    var(--cta-gradient) border-box;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ==========================================================================
   Navegação
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(15, 12, 23, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), background var(--t);
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand__mark { width: 28px; height: 28px; }
.brand__word {
  font-size: 1.18rem;
  font-weight: var(--w-black);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand__word b { color: var(--accent-3); font-weight: var(--w-black); }
.brand__by {
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--faint);
  font-weight: var(--w-semi);
  text-transform: uppercase;
  margin-top: 2px;
}
.brand__stack { display: flex; flex-direction: column; line-height: 1; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.nav__cta { margin-left: 0; }

@media (max-width: 480px) {
  .nav__inner { gap: 12px; }
  .nav__links { gap: 8px; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  padding-top: clamp(48px, 9vh, 96px);
  padding-bottom: var(--section);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 56px);
}
.hero__eyebrow { margin-bottom: 26px; }

.hero__title {
  font-size: var(--display);
  font-weight: var(--w-black);
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--ink);
}
.hero__title .tint { color: var(--accent-3); }

.hero__sub {
  margin: 30px 0 0;
  max-width: 44ch;
  font-size: var(--body-lg);
  line-height: 1.4;
  color: var(--muted);
  font-weight: var(--w-light);
}
.hero__actions {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.hero__meta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: var(--small);
  color: var(--faint);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero__meta svg { width: 15px; height: 15px; color: var(--accent-3); }

/* --- widget de correção ao vivo (estética-assinatura) --- */
.corrector {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(33, 27, 49, 0.55) 0%, rgba(21, 17, 33, 0.35) 100%);
  padding: clamp(22px, 3vw, 34px);
  overflow: hidden;
}
.corrector::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 80% at 100% 0%, rgba(124, 58, 237, 0.14), transparent 60%);
}
.corrector__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}
.corrector__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-4); }
.corrector__dot:nth-child(1) { background: var(--err); opacity: 0.75; }
.corrector__dot:nth-child(2) { background: var(--warn); opacity: 0.75; }
.corrector__dot:nth-child(3) { background: var(--ok); opacity: 0.75; }
.corrector__label {
  margin-left: auto;
  font-size: var(--caption);
  font-family: var(--mono);
  color: var(--faint);
  letter-spacing: 0.02em;
  transition: color var(--t);
}
.corrector__stage {
  min-height: clamp(120px, 16vh, 168px);
  display: flex;
  align-items: center;
}
.corrector__line {
  font-size: clamp(1.15rem, 2.4vw, 1.95rem);
  font-weight: var(--w-semi);
  line-height: 1.28;
  letter-spacing: -0.015em;
  color: var(--ink);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}
/* palavra: estados errado → corrigindo → certo.
   pre-wrap preserva os espaços intencionais dos tokens mas permite
   quebra de linha natural — sem isso a frase vira um bloco indivisível
   e estoura a borda direita do cartão (overflow:hidden). */
.tok { position: relative; transition: color 200ms var(--ease); white-space: pre-wrap; }
.tok--bad {
  color: var(--err);
  text-decoration: underline wavy var(--err);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.tok--fixed {
  color: var(--ok);
  text-decoration: none;
}
.tok--flash { animation: tokFlash 700ms var(--ease); }
@keyframes tokFlash {
  0%   { background: rgba(55, 173, 120, 0.32); }
  100% { background: transparent; }
}
.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  vertical-align: text-bottom;
  background: var(--accent-3);
  margin-left: 1px;
  animation: caretBlink 1s steps(1) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }

.corrector__foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--small);
  color: var(--muted);
  min-height: 24px;
}
.corrector__check {
  width: 20px; height: 20px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ok);
  color: #06110b;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 220ms var(--ease), transform 220ms var(--ease);
}
.corrector__check svg { width: 12px; height: 12px; }
.corrector.is-done .corrector__check { opacity: 1; transform: scale(1); }
.corrector.is-done .corrector__label { color: var(--ok); }

@media (min-width: 980px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    align-items: center;
  }
}

/* ==========================================================================
   Hairline divisor de seção
   ========================================================================== */
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

.section { padding-block: var(--section); position: relative; }
.section__head { margin-bottom: clamp(40px, 6vw, 72px); }
.section__eyebrow { margin-bottom: 22px; }
.section__title {
  font-size: var(--h1);
  font-weight: var(--w-black);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0;
  max-width: 16ch;
}
.section__lead {
  margin: 26px 0 0;
  max-width: var(--maxw-text);
  font-size: var(--body-lg);
  line-height: 1.5;
  color: var(--muted);
  font-weight: var(--w-light);
}
.section__lead b { color: var(--ink); font-weight: var(--w-semi); }

/* frase que se corrige no corpo ao entrar na viewport (eco do app).
   Ghost invisível com o texto FINAL reserva a largura → a troca
   errado→certo não causa reflow do parágrafo. */
.fixword {
  display: inline-grid;
  vertical-align: baseline;
  padding: 0.04em 0.2em;
  margin: 0 -0.14em;
  border-radius: 6px;
  background: transparent;
  transition: background 420ms var(--ease);
}
.fixword__ghost,
.fixword__live {
  grid-area: 1 / 1;
  white-space: nowrap;
  line-height: 1.25;
}
.fixword__ghost { visibility: hidden; }
.fixword__live {
  color: var(--err);
  text-decoration: underline wavy var(--err);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color 240ms var(--ease), text-decoration-color 240ms var(--ease);
}
.fixword.is-fixed { background: rgba(55, 173, 120, 0.13); }
.fixword.is-fixed .fixword__live {
  color: var(--ok);
  text-decoration-color: transparent;
}

/* ==========================================================================
   Os 3 modos — Tool Feature Blocks
   ========================================================================== */
.mode {
  --c: var(--accent-3);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(44px, 6vw, 68px);
  align-items: center;
}
.mode + .mode { border-top: 1px solid var(--line); }

.mode__visual {
  position: relative;
  aspect-ratio: 16 / 11;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 20% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 62%),
    linear-gradient(160deg, var(--surface-2), var(--surface-1));
  display: grid;
  place-items: center;
}
.mode__glyph { width: 46%; color: var(--c); opacity: 0.92; }
.mode__glyph svg { width: 100%; height: auto; }
.mode__tagvec {
  position: absolute;
  inset: 0;
  opacity: 0.10;
  color: var(--c);
  pointer-events: none;
}

.mode__num {
  font-size: var(--caption);
  font-family: var(--mono);
  color: var(--faint);
  letter-spacing: 0.06em;
}
.mode__cat {
  display: block;
  margin: 14px 0 12px;
  font-size: var(--h3);
  font-weight: var(--w-semi);
  letter-spacing: -0.02em;
  color: var(--c);
}
.mode__title {
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  font-weight: var(--w-black);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--ink);
}
.mode__body {
  font-size: var(--body-lg);
  line-height: 1.5;
  color: var(--muted);
  font-weight: var(--w-light);
  margin: 0 0 22px;
  max-width: 42ch;
}
.mode__body b { color: var(--ink-soft); font-weight: var(--w-semi); }
.mode__list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
.mode__list li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: var(--small); color: var(--ink-soft);
}
.mode__list svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--c); }

@media (min-width: 900px) {
  .mode { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
  .mode--flip .mode__visual { order: 2; }
}

/* ==========================================================================
   Por que — bullets rápidos
   ========================================================================== */
.why__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
}
.why__item {
  background: var(--canvas);
  padding: clamp(26px, 3vw, 38px);
}
.why__k {
  font-family: var(--mono);
  font-size: var(--caption);
  color: var(--accent-3);
  letter-spacing: 0.04em;
}
.why__t {
  margin: 16px 0 8px;
  font-size: var(--h3);
  font-weight: var(--w-semi);
  letter-spacing: -0.02em;
}
.why__d { margin: 0; color: var(--muted); font-size: var(--small); line-height: 1.5; font-weight: var(--w-light); }
@media (min-width: 720px)  { .why__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .why__grid { grid-template-columns: repeat(4, 1fr); } }

/* ==========================================================================
   CTA final
   ========================================================================== */
.finale { text-align: center; padding-block: clamp(96px, 16vh, 180px); }
.finale__eyebrow { margin-bottom: 26px; }
.finale__title {
  font-size: var(--display-sm);
  font-weight: var(--w-black);
  line-height: 0.94;
  letter-spacing: -0.03em;
  margin: 0 auto 40px;
  max-width: 14ch;
}
.finale__title .tint { color: var(--accent-3); }
.finale__actions { display: inline-flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ==========================================================================
   Footer
   ========================================================================== */
.foot {
  background: var(--surface-1);
  border-top: 1px solid var(--line);
  padding-block: clamp(48px, 7vw, 76px);
}
.foot__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
}
.foot__tag { margin: 18px 0 0; color: var(--muted); font-size: var(--small); max-width: 34ch; font-weight: var(--w-light); }
.foot__cols { display: flex; flex-wrap: wrap; gap: 48px; }
.foot__col h4 {
  margin: 0 0 14px;
  font-size: var(--caption);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--faint);
  font-weight: var(--w-semi);
}
.foot__col a, .foot__col p { display: block; margin: 0 0 9px; color: var(--muted); font-size: var(--small); }
.foot__col a:hover { color: var(--ink); }
.foot__legal {
  max-width: var(--maxw);
  margin: 40px auto 0;
  padding: 24px var(--gutter) 0;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: var(--caption);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ==========================================================================
   AUTENTICAÇÃO — split (login) e telas de app (downloads/admin)
   ========================================================================== */
.app-topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.app-topbar .brand { margin-right: auto; }
.app-topbar__user { display: flex; align-items: center; gap: 12px; font-size: var(--small); color: var(--muted); }
.app-topbar__name { color: var(--ink); font-weight: var(--w-semi); }
.app-topbar__role {
  font-size: var(--caption);
  color: var(--faint);
  display: block;
  letter-spacing: 0.02em;
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--accent-3);
  font-weight: var(--w-semi);
  font-size: var(--small);
}

/* --- Login split --- */
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}
.login__brand {
  position: relative;
  display: none;
  overflow: hidden;
  background: linear-gradient(160deg, #a99cf6 0%, #8f7cf0 45%, #7a63ea 100%);
  padding: 48px;
  color: #fff;
}
.login__brand::before {
  content: "";
  position: absolute; inset: 0;
  opacity: 0.16;
  background-image:
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.9) 0 2px, transparent 2px 22px);
  mask-image: repeating-linear-gradient(-45deg, #000 0 12px, transparent 12px 24px);
}
.login__brand-top { position: relative; display: flex; align-items: center; gap: 11px; text-decoration: none; }
.login__brand-top .brand__word { color: #fff; }
.login__brand-top .brand__word b { color: #fff; }
.login__brand-top:hover .brand__word { opacity: 0.85; }

/* logo pequena acima do formulário — volta à home; some quando o painel
   de marca (que já tem a logo clicável) está visível */
.login__mark-home { display: inline-flex; margin-bottom: 14px; }
.login__mark-home svg { width: 34px; height: 34px; }
.login__mark-home:hover { opacity: 0.85; }
@media (min-width: 900px) { .login__mark-home { display: none; } }
.login__brand-center {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
}
.login__brand-mark { width: clamp(120px, 22vw, 200px); height: auto; }
.login__brand-foot { position: relative; font-size: var(--small); opacity: 0.85; }
.login__brand-quote {
  position: relative;
  font-size: var(--h3);
  font-weight: var(--w-semi);
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 18ch;
}

.login__form-wrap {
  display: grid;
  place-items: center;
  padding: 48px var(--gutter);
  min-height: 100vh;
}
.login__form { width: 100%; max-width: 380px; }
.login__eyebrow { margin-bottom: 18px; }
.login__title {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: var(--w-black);
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0 0 12px;
}
.login__title b { color: var(--accent-3); }
.login__sub { margin: 0 0 34px; color: var(--muted); font-size: var(--body); font-weight: var(--w-light); }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  margin-bottom: 8px;
  font-size: var(--caption);
  color: var(--muted);
  letter-spacing: 0.02em;
}
.input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  color: var(--ink);
  transition: border-color var(--t), box-shadow var(--t);
}
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-soft); }
.input--pw-wrap { position: relative; }
.input--pw-wrap .input { padding-right: 58px; }
.pw-toggle {
  position: absolute; right: 6px; top: 6px; bottom: 6px;
  width: 44px;
  border: none; background: transparent; color: var(--muted);
  border-radius: var(--r-pill);
  display: grid; place-items: center;
}
.pw-toggle:hover { color: var(--ink); }
.pw-toggle svg { width: 20px; height: 20px; }

.btn-block { width: 100%; }
.form-note {
  margin: 22px 0 0;
  font-size: var(--caption);
  color: var(--faint);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.5;
}
.form-note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--accent-3); }

.alert {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: var(--r-card);
  font-size: var(--small);
  display: none;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid;
}
.alert.is-shown { display: flex; }
.alert svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.alert--err { background: var(--err-soft, rgba(229,72,77,0.12)); border-color: rgba(229,72,77,0.35); color: #f2909a; }
.alert--warn { background: rgba(242,165,60,0.12); border-color: rgba(242,165,60,0.35); color: #f6c37f; }
.alert--ok { background: rgba(55,173,120,0.12); border-color: rgba(55,173,120,0.35); color: #7fd0ab; }

@media (min-width: 900px) {
  .login { grid-template-columns: 1fr 1fr; }
  .login__brand { display: flex; flex-direction: column; gap: 40px; }
}

/* ==========================================================================
   Downloads
   ========================================================================== */
.page { max-width: var(--maxw); margin: 0 auto; padding: clamp(48px, 8vh, 90px) var(--gutter) 120px; }
.page__eyebrow { margin-bottom: 20px; }
.page__title {
  font-size: var(--h1);
  font-weight: var(--w-black);
  letter-spacing: -0.03em;
  line-height: 0.98;
  margin: 0 0 18px;
}
.page__lead { margin: 0 0 clamp(40px, 6vw, 64px); color: var(--muted); font-size: var(--body-lg); max-width: 52ch; font-weight: var(--w-light); }

.dl-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 760px) { .dl-grid { grid-template-columns: 1fr 1fr; } }

.dl-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(26px, 3vw, 38px);
  background: linear-gradient(170deg, var(--surface-2), var(--surface-1));
  display: flex;
  flex-direction: column;
}
.dl-card__os {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
}
.dl-card__osicon {
  width: 52px; height: 52px; flex: none;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-3);
  display: grid; place-items: center;
  color: var(--accent-3);
}
.dl-card__osicon svg { width: 26px; height: 26px; }
.dl-card__name { font-size: var(--h3); font-weight: var(--w-black); letter-spacing: -0.02em; }
.dl-card__req { font-size: var(--caption); color: var(--faint); margin-top: 3px; }

.dl-steps { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 12px; }
.dl-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: var(--small); color: var(--ink-soft); }
.dl-steps .n {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  font-size: var(--caption); font-family: var(--mono); color: var(--accent-3);
}
.dl-card .btn { margin-top: auto; }
.dl-note {
  margin-top: 14px;
  font-size: var(--caption);
  color: var(--warn);
  display: none;
  gap: 8px;
  align-items: center;
}
.dl-note.is-shown { display: flex; }
.dl-note svg { width: 15px; height: 15px; flex: none; }

/* ==========================================================================
   Admin
   ========================================================================== */
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 1000px) { .admin-grid { grid-template-columns: 340px 1fr; } }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(170deg, var(--surface-2), var(--surface-1));
  padding: clamp(22px, 2.4vw, 30px);
}
.panel__title { font-size: var(--h3); font-weight: var(--w-black); letter-spacing: -0.02em; margin: 0 0 6px; }
.panel__sub { margin: 0 0 24px; font-size: var(--small); color: var(--muted); font-weight: var(--w-light); }

.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--small); }
.tbl th {
  text-align: left;
  padding: 0 14px 14px;
  font-size: var(--caption);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  font-weight: var(--w-semi);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td { padding: 16px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:hover td { background: rgba(124, 58, 237, 0.05); }
.tbl__name { color: var(--ink); font-weight: var(--w-semi); }
.tbl__email { color: var(--muted); font-size: var(--caption); }
.tbl__meta { color: var(--faint); font-size: var(--caption); white-space: nowrap; }
.tbl__actions { display: flex; gap: 8px; justify-content: flex-end; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  font-size: var(--caption);
  font-weight: var(--w-semi);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok { color: #7fd0ab; background: rgba(55,173,120,0.13); border-color: rgba(55,173,120,0.30); }
.badge--idle { color: #f6c37f; background: rgba(242,165,60,0.12); border-color: rgba(242,165,60,0.28); }
.badge--never { color: var(--faint); background: rgba(244,241,251,0.05); border-color: var(--line); }

/* toggle ativo/inativo (assinatura das refs) */
.toggle {
  position: relative;
  width: 44px; height: 26px; flex: none;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface-4);
  transition: background var(--t), border-color var(--t);
}
.toggle::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink-soft);
  transition: transform var(--t), background var(--t);
}
.toggle[aria-pressed="true"] { background: var(--accent); border-color: transparent; }
.toggle[aria-pressed="true"]::after { transform: translateX(18px); background: var(--thumb, #f4f1fb); }

.icon-btn {
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  display: grid; place-items: center;
  transition: color var(--t), border-color var(--t);
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.icon-btn svg { width: 17px; height: 17px; }

.form-row { display: grid; gap: 16px; }
.form-actions { margin-top: 8px; }
.empty {
  padding: 40px 16px; text-align: center; color: var(--faint); font-size: var(--small);
}
.spinner-row { padding: 32px; text-align: center; color: var(--muted); font-size: var(--small); }

/* modal simples (redefinir senha) */
.modal-back {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(8, 5, 18, 0.6);
  backdrop-filter: blur(6px);
  display: none;
  place-items: center;
  padding: 24px;
}
.modal-back.is-open { display: grid; }
.modal {
  width: 100%; max-width: 400px;
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: 0 32px 80px rgba(8, 4, 24, 0.6);
}
.modal__title { font-size: var(--h3); font-weight: var(--w-black); letter-spacing: -0.02em; margin: 0 0 8px; }
.modal__sub { margin: 0 0 22px; color: var(--muted); font-size: var(--small); }
.modal__actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 22px; }

.toast {
  position: fixed;
  right: 24px; bottom: 24px; z-index: 80;
  max-width: 340px;
  padding: 14px 18px;
  border-radius: var(--r-card);
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: var(--small);
  box-shadow: 0 16px 48px rgba(8, 4, 24, 0.5);
  display: flex; gap: 10px; align-items: flex-start;
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--t), opacity var(--t);
}
.toast.is-shown { transform: translateY(0); opacity: 1; }
.toast svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.toast--ok svg { color: var(--ok); }
.toast--err svg { color: var(--err); }

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .caret { display: none; }
}
