/* ==========================================================================
   FamilyTecnoArt Scanner — design system
   Tema escuro (padrão) e claro. Tudo local: sem fontes ou scripts externos.
   ========================================================================== */
:root {
  --bg: #070b16;
  --bg-2: #0b1222;
  --surface: rgba(17, 25, 45, .72);
  --surface-solid: #111a2e;
  --surface-2: rgba(30, 41, 66, .65);
  --surface-3: #1a2540;
  --line: rgba(148, 163, 184, .14);
  --line-strong: rgba(148, 163, 184, .28);
  --text: #e6ebf5;
  --text-2: #b4bfd3;
  --muted: #7d8aa3;
  --brand: #38bdf8;
  --brand-2: #818cf8;
  --brand-3: #22d3ee;
  --brand-ink: #03131f;
  --glow: rgba(56, 189, 248, .35);
  --crit: #f43f5e; --high: #fb7a3c; --med: #f5b83d; --low: #e2d544; --info: #22b8d6;
  --ok: #34d399;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 40px -12px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .25);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .7);
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, "SF Mono", Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eef2f9;
  --bg-2: #e3e9f4;
  --surface: rgba(255, 255, 255, .78);
  --surface-solid: #ffffff;
  --surface-2: rgba(241, 245, 251, .9);
  --surface-3: #e8eef7;
  --line: rgba(15, 23, 42, .09);
  --line-strong: rgba(15, 23, 42, .18);
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --brand: #0284c7;
  --brand-2: #6366f1;
  --brand-3: #0891b2;
  --brand-ink: #ffffff;
  --glow: rgba(2, 132, 199, .25);
  --crit: #e11d48; --high: #ea580c; --med: #d97706; --low: #a16207; --info: #0e7490;
  --ok: #059669;
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .18), 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-lg: 0 30px 70px -24px rgba(15, 23, 42, .3);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 15px/1.6 var(--font); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--brand); color: var(--brand-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- fundo animado ---------- */
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-fx .grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  opacity: .55;
}
.bg-fx .blob {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45;
  animation: float 22s var(--ease) infinite alternate;
}
.bg-fx .b1 { width: 520px; height: 520px; background: var(--brand); top: -160px; left: -120px; }
.bg-fx .b2 { width: 460px; height: 460px; background: var(--brand-2); top: 10%; right: -160px; animation-delay: -7s; }
.bg-fx .b3 { width: 380px; height: 380px; background: var(--brand-3); bottom: -160px; left: 35%; animation-delay: -14s; opacity: .3; }
:root[data-theme="light"] .bg-fx .blob { opacity: .22; }
@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-40px, 80px) scale(.95); }
}
.spot {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 30%), var(--glow), transparent 45%);
  opacity: .35; transition: opacity .3s;
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px; padding: 12px 24px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; color: var(--text); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.logo {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; box-shadow: 0 6px 20px -6px var(--glow);
}
.logo svg { width: 20px; height: 20px; }
.tag {
  font-size: 11.5px; color: var(--muted); border: 1px solid var(--line);
  padding: 3px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px;
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.spacer { flex: 1; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; padding: 0;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line);
  cursor: pointer; transition: all .2s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); background: var(--surface-2); }
.icon-btn svg.i { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
.user-menu { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #fff;
  font-weight: 700; font-size: 14px; text-transform: uppercase;
}
.user-name { font-size: 13.5px; color: var(--text-2); font-weight: 600; }
.logout-form { margin: 0; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: 1040px; margin: 0 auto; padding: 32px 20px 64px; flex: 1; }
.card {
  position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; margin-bottom: 22px; box-shadow: var(--shadow);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 22px 20px; border-top: 1px solid var(--line); }
.foot svg { vertical-align: -3px; width: 14px; height: 14px; }

/* animações de entrada */
.reveal { opacity: 0; transform: translateY(14px); animation: reveal .6s var(--ease) forwards; }
.reveal.d1 { animation-delay: .06s; } .reveal.d2 { animation-delay: .12s; } .reveal.d3 { animation-delay: .18s; } .reveal.d4 { animation-delay: .24s; }
@keyframes reveal { to { opacity: 1; transform: none; } }

/* ---------- formulários ---------- */
.field { display: block; margin: 18px 0; }
.field > .label, legend { display: block; font-weight: 600; font-size: 13.5px; color: var(--text-2); margin-bottom: 8px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg.i { position: absolute; left: 14px; color: var(--muted); pointer-events: none; transition: color .2s; }
.input-wrap:focus-within > svg.i { color: var(--brand); }
input[type=text], input[type=password], input[type=email], input[type=search] {
  width: 100%; padding: 13px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 15px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input-wrap > svg.i ~ input { padding-left: 44px; }
.input-wrap .trail { position: absolute; right: 6px; width: 36px; height: 36px; border: 0; background: transparent; box-shadow: none; color: var(--muted); }
.input-wrap .trail:hover { color: var(--brand); background: var(--surface-3); transform: none; }
.icon-btn { box-shadow: none; }
.icon-btn:hover { filter: none; box-shadow: none; }
.input-wrap .trail ~ input, .input-wrap input:has(~ .trail) { padding-right: 48px; }
input::placeholder { color: var(--muted); opacity: .8; }
input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); background: var(--surface-solid); }
input.valid { border-color: color-mix(in srgb, var(--ok) 70%, transparent); }
input.invalid { border-color: color-mix(in srgb, var(--crit) 70%, transparent); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; min-height: 1.2em; transition: color .2s; }
.hint.ok { color: var(--ok); } .hint.bad { color: var(--crit); }
.caps-warn { display: none; align-items: center; gap: 6px; font-size: 12.5px; color: var(--med); margin-top: 6px; }
.caps-warn.on { display: flex; }
.caps-warn svg { width: 14px; height: 14px; }
fieldset { border: 0; padding: 0; margin: 18px 0; }

/* cartões de categoria (checkbox) */
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.opt-card { position: relative; cursor: pointer; display: block; }
.opt-card input { position: absolute; opacity: 0; pointer-events: none; }
.opt-card .body {
  display: flex; gap: 12px; align-items: flex-start; height: 100%;
  padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface-2); transition: all .22s var(--ease);
}
.opt-card .ico {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: var(--surface-3); color: var(--muted); transition: all .22s var(--ease);
}
.opt-card strong { display: block; font-size: 14px; }
.opt-card small { display: block; color: var(--muted); font-size: 12px; line-height: 1.4; margin-top: 2px; }
.opt-card .tick {
  position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); display: grid; place-items: center; transition: all .22s var(--ease);
}
.opt-card .tick svg { width: 12px; height: 12px; stroke-width: 3; opacity: 0; transform: scale(.4); transition: all .22s var(--ease); }
.opt-card:hover .body { border-color: color-mix(in srgb, var(--brand) 50%, transparent); transform: translateY(-2px); }
.opt-card input:checked + .body {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 9%, var(--surface-2));
  box-shadow: 0 0 0 1px var(--brand) inset, 0 8px 24px -12px var(--glow);
}
.opt-card input:checked + .body .ico { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.opt-card input:checked + .body .tick { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.opt-card input:checked + .body .tick svg { opacity: 1; transform: none; }
.opt-card input:focus-visible + .body { outline: 2px solid var(--brand); outline-offset: 2px; }
.checks-tools { display: flex; gap: 6px; margin-left: auto; }

/* switch */
.switch-row {
  display: flex; align-items: flex-start; gap: 14px; cursor: pointer;
  padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface-2); margin: 12px 0; transition: border-color .2s, background .2s;
}
.switch-row:hover { border-color: var(--line-strong); }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch {
  position: relative; width: 42px; height: 24px; border-radius: 999px; flex: none; margin-top: 1px;
  background: var(--surface-3); border: 1px solid var(--line-strong); transition: background .25s var(--ease);
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: transform .25s var(--ease);
}
.switch-row input:checked + .switch { background: var(--brand); border-color: var(--brand); }
.switch-row input:checked + .switch::after { transform: translateX(18px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch-row .txt { font-size: 14px; color: var(--text-2); }
.switch-row .txt small { display: block; color: var(--muted); font-size: 12.5px; }
.switch-row.warn input:checked + .switch { background: var(--high); border-color: var(--high); }
.switch-row.warn:has(input:checked) { border-color: color-mix(in srgb, var(--high) 50%, transparent); background: color-mix(in srgb, var(--high) 7%, var(--surface-2)); }
.switch-row.authorize:has(input:checked) { border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: color-mix(in srgb, var(--ok) 7%, var(--surface-2)); }
.switch-row.authorize input:checked + .switch { background: var(--ok); border-color: var(--ok); }

/* ---------- botões ---------- */
button, .btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  border: 0; border-radius: var(--radius-sm); padding: 13px 22px;
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none;
  box-shadow: 0 10px 28px -12px var(--glow), inset 0 1px 0 rgba(255,255,255,.2);
  transition: transform .18s var(--ease), box-shadow .2s, filter .2s, opacity .2s;
}
button:hover, .btn:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 14px 34px -12px var(--glow), inset 0 1px 0 rgba(255,255,255,.2); text-decoration: none; }
button:active, .btn:active { transform: translateY(0) scale(.98); }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; filter: grayscale(.3); }
button:focus-visible, .btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn-sec {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); box-shadow: none;
}
.btn-sec:hover { background: var(--surface-3); box-shadow: none; filter: none; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.linklike {
  background: none; border: 0; color: var(--text-2); cursor: pointer; box-shadow: none;
  font-size: 13.5px; padding: 6px 8px; font-weight: 600;
}
.linklike:hover { color: var(--brand); background: none; box-shadow: none; filter: none; transform: none; }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,.45); animation: ripple .6s linear; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
button .spinner { display: none; }
button.loading .spinner { display: block; }
button.loading .btn-label, button.loading > svg.i { display: none; }

/* ---------- mensagens ---------- */
.error-msg {
  display: flex; gap: 10px; align-items: flex-start;
  color: color-mix(in srgb, var(--crit) 70%, var(--text)); background: color-mix(in srgb, var(--crit) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--crit) 40%, transparent);
  padding: 11px 14px; border-radius: var(--radius-sm); margin: 14px 0; font-size: 14px;
}
.error-msg svg { width: 18px; height: 18px; margin-top: 2px; }
.shake { animation: shake .45s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
code { font-family: var(--mono); background: var(--surface-3); padding: 2px 7px; border-radius: 6px; font-size: 12.5px; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: grid; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 360px;
  padding: 12px 16px; border-radius: 12px; background: var(--surface-solid); color: var(--text);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); font-size: 14px;
  animation: toastIn .35s var(--ease);
}
.toast.ok svg { color: var(--ok); } .toast.err svg { color: var(--crit); }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ==========================================================================
   Autenticação
   ========================================================================== */
body.auth .topbar { background: transparent; border-bottom-color: transparent; backdrop-filter: none; }
body.auth .container { max-width: 1100px; display: grid; place-items: center; padding-top: 16px; }
.auth-shell {
  width: 100%; display: grid; grid-template-columns: 1.05fr 1fr; gap: 0;
  border-radius: 26px; overflow: hidden; border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.auth-aside {
  position: relative; padding: 44px; overflow: hidden; color: #fff;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.18), transparent 40%),
    linear-gradient(145deg, #0c4a6e 0%, #1e3a8a 45%, #4c1d95 100%);
  display: flex; flex-direction: column; justify-content: space-between; min-height: 560px;
}
.auth-aside h2 { font-size: 30px; margin: 22px 0 10px; letter-spacing: -.03em; }
.auth-aside p { color: rgba(255,255,255,.78); margin: 0; max-width: 380px; }
.auth-aside .feat { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.auth-aside .feat li { display: flex; gap: 12px; align-items: center; font-size: 14px; color: rgba(255,255,255,.88); }
.auth-aside .feat .fi { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); }
.auth-aside .feat svg { width: 16px; height: 16px; }
.auth-aside .legal { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 28px; }

/* radar animado */
.radar { position: relative; width: 150px; height: 150px; }
.radar .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); }
.radar .ring.r2 { inset: 22px; } .radar .ring.r3 { inset: 44px; }
.radar .sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(56,189,248,.55), transparent 28%);
  animation: spin 3.2s linear infinite;
}
.radar .core { position: absolute; inset: 58px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.14); backdrop-filter: blur(4px); }
.radar .core svg { width: 22px; height: 22px; }
.radar .blip { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #7dd3fc; box-shadow: 0 0 12px #7dd3fc; animation: blip 3.2s infinite; }
.radar .blip.p1 { top: 30px; left: 96px; } .radar .blip.p2 { top: 100px; left: 30px; animation-delay: 1.4s; } .radar .blip.p3 { top: 112px; left: 110px; animation-delay: 2.2s; background: #fda4af; box-shadow: 0 0 12px #fda4af; }
@keyframes blip { 0%, 100% { opacity: 0; transform: scale(.5); } 15% { opacity: 1; transform: scale(1.2); } 50% { opacity: .2; } }

.auth-main { padding: 48px 46px; display: flex; flex-direction: column; justify-content: center; }
.auth-main h1 { font-size: 28px; margin: 0 0 6px; }
.auth-main .sub { color: var(--muted); margin: 0 0 8px; }
.steps { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; font-size: 12.5px; color: var(--muted); }
.steps .st { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.steps .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-strong); font-size: 12px; }
.steps .st.on { color: var(--text); }
.steps .st.on .n { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent); }
.steps .st.done .n { background: var(--ok); color: #fff; border-color: transparent; }
.steps .bar { flex: 1; max-width: 60px; height: 2px; background: var(--line-strong); border-radius: 2px; overflow: hidden; }
.steps .bar.fill::after { content: ""; display: block; height: 100%; background: var(--ok); animation: fillbar .6s var(--ease) forwards; transform-origin: left; }
@keyframes fillbar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.auth-hint { margin-top: 18px; text-align: center; font-size: 13px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
.auth-hint svg { width: 14px; height: 14px; }
.auth-back { margin-top: 14px; display: flex; justify-content: center; }

/* OTP */
.otp { display: flex; gap: 10px; justify-content: space-between; margin: 8px 0 6px; }
.otp input {
  width: 100%; max-width: 58px; aspect-ratio: 1 / 1.15; padding: 0; text-align: center;
  font: 700 24px var(--mono); border-radius: 14px; caret-color: var(--brand);
}
.otp input.filled { border-color: color-mix(in srgb, var(--brand) 60%, transparent); background: color-mix(in srgb, var(--brand) 7%, var(--surface-2)); animation: pop .2s var(--ease); }
.otp .sep { align-self: center; color: var(--muted); font-weight: 700; }
@keyframes pop { 50% { transform: scale(1.08); } }
.totp-timer { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin: 14px 0 20px; }
.totp-timer svg { width: 26px; height: 26px; transform: rotate(-90deg); }
.totp-timer .trk { stroke: var(--line-strong); }
.totp-timer .prg { stroke: var(--brand); transition: stroke-dashoffset 1s linear, stroke .3s; }
.totp-timer.low .prg { stroke: var(--med); }
.totp-timer b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Painel
   ========================================================================== */
.hero { padding: 34px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(500px 200px at 100% 0%, color-mix(in srgb, var(--brand-2) 18%, transparent), transparent);
}
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); margin-bottom: 10px; }
.hero h1 { margin: 0 0 10px; font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -.03em; }
.grad-text { background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3)); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% auto; animation: shine 6s linear infinite; }
@keyframes shine { to { background-position: 200% center; } }
.hero .lead { color: var(--text-2); max-width: 680px; margin: 0; }
.url-row { display: flex; gap: 10px; }
.url-row .input-wrap { flex: 1; }
.url-row input { font-size: 16px; padding-top: 15px; padding-bottom: 15px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); backdrop-filter: blur(14px); transition: transform .25s var(--ease), border-color .25s;
}
.stat:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.stat .k { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat .k svg { width: 16px; height: 16px; color: var(--brand); }
.stat .v { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin-top: 6px; font-variant-numeric: tabular-nums; }

/* histórico */
.history { display: grid; gap: 10px; }
.hist-search { max-width: 260px; margin-left: auto; }
.hist-search input { padding: 9px 12px 9px 38px !important; font-size: 13.5px; }
.hist-search svg.i { left: 12px !important; width: 16px; height: 16px; }
.hist-row {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px;
  color: var(--text); transition: all .22s var(--ease); animation: reveal .45s var(--ease) both;
}
.hist-row:hover { border-color: color-mix(in srgb, var(--brand) 50%, transparent); transform: translateX(4px); text-decoration: none; box-shadow: 0 8px 24px -14px var(--glow); }
.hist-row .fav { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex: none; }
.hist-row .info { flex: 1; min-width: 0; }
.hist-row .url { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14.5px; }
.hist-row .when { font-size: 12px; color: var(--muted); }
.hist-row .go { color: var(--muted); transition: transform .2s, color .2s; }
.hist-row:hover .go { color: var(--brand); transform: translateX(3px); }
.grade-chip { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: none; border: 1.5px solid currentColor; }
.mini-bar { width: 80px; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.mini-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .4s; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 10px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-running { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); }
.st-running::before { animation: pulse 1.4s infinite; box-shadow: 0 0 0 0 currentColor; }
.st-done { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.st-error { background: color-mix(in srgb, var(--crit) 14%, transparent); color: var(--crit); }
.st-queued { background: var(--surface-3); color: var(--muted); }
.empty-state { text-align: center; padding: 34px 10px; color: var(--muted); }
.empty-state .ico { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-3); color: var(--brand); }
.empty-state .ico svg { width: 26px; height: 26px; }
.skeleton { height: 62px; border-radius: 14px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- relatório: progresso ---------- */
.scan-live { display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center; }
.ring-progress { position: relative; width: 150px; height: 150px; }
.ring-progress svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-progress .trk { stroke: var(--surface-3); }
.ring-progress .prg { stroke: url(#g-brand); transition: stroke-dashoffset .6s var(--ease); }
.ring-progress .pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.ring-progress .orbit { position: absolute; inset: -6px; border-radius: 50%; border: 1px dashed var(--line-strong); animation: spin 18s linear infinite; }
.scan-live h1 { margin: 0 0 6px; font-size: 24px; }
.stage-line { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.progress { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin: 16px 0 6px; }
.progress-bar { position: relative; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: inherit; transition: width .5s var(--ease); overflow: hidden; }
.progress-bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent); animation: sheen 1.6s infinite; }
@keyframes sheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.terminal { margin-top: 22px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #050913; }
.terminal .bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #0b1222; border-bottom: 1px solid rgba(148,163,184,.12); font-size: 12px; color: #7d8aa3; }
.terminal .bar i { width: 11px; height: 11px; border-radius: 50%; background: #f43f5e; display: inline-block; }
.terminal .bar i:nth-child(2) { background: #f5b83d; } .terminal .bar i:nth-child(3) { background: #34d399; }
.terminal .bar span { margin-left: 8px; }
.log { max-height: 260px; overflow: auto; font-family: var(--mono); font-size: 12.5px; padding: 12px 16px; color: #c3cde0; }
.log div { white-space: pre-wrap; animation: logIn .3s var(--ease); padding: 1px 0; }
.log .t { color: #56627a; }
.log .warn { color: #fcd34d; } .log .error { color: #fda4af; }
.log .cursor { display: inline-block; width: 8px; height: 15px; background: #38bdf8; vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { to { opacity: 0; } }
@keyframes logIn { from { opacity: 0; transform: translateX(-6px); } }

/* ---------- relatório: resumo ---------- */
.scorecard { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.grade-ring { position: relative; width: 140px; height: 140px; flex: none; }
.grade-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.grade-ring .trk { stroke: var(--surface-3); }
.grade-ring .prg { transition: stroke-dashoffset 1.4s var(--ease); }
.grade-ring .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.grade-ring .g { font-size: 44px; font-weight: 850; line-height: 1; letter-spacing: -.04em; }
.grade-ring .s { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 4px; }
.grade-A, .grade-B { color: var(--ok); } .grade-C { color: var(--med); } .grade-D, .grade-F { color: var(--crit); }
.host-title { margin: 0 0 4px; font-size: 26px; word-break: break-all; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); margin: 8px 0 14px; }
.meta-row span { display: inline-flex; align-items: center; gap: 6px; }
.meta-row svg { width: 15px; height: 15px; }
.sev-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--surface-3); gap: 2px; }
.sev-bar span { height: 100%; width: 0; transition: width 1s var(--ease); }
.sev-counts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 650; cursor: pointer; border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--text-2); transition: all .2s var(--ease); box-shadow: none;
}
.pill:hover { transform: translateY(-1px); border-color: currentColor; filter: none; box-shadow: none; }
.pill .d { width: 8px; height: 8px; border-radius: 50%; }
.pill b { font-variant-numeric: tabular-nums; }
.pill.active { color: #fff; border-color: transparent; }
.pill.zero { opacity: .5; cursor: default; }
.pill.zero:hover { transform: none; }
.c-critical { --c: var(--crit); } .c-high { --c: var(--high); } .c-medium { --c: var(--med); } .c-low { --c: var(--low); } .c-info { --c: var(--info); }
.pill .d, .sev-bar span { background: var(--c); }
.pill.active { background: var(--c); }
.tech-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tech { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-size: 12.5px; font-family: var(--mono); }
.tech::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--brand); }
.section-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 22px 0 0; }
.actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

/* barra de filtros */
.toolbar { position: sticky; top: 63px; z-index: 10; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 14px; margin: 6px 0 18px; border-radius: 14px; background: color-mix(in srgb, var(--bg) 75%, transparent); border: 1px solid var(--line); backdrop-filter: blur(14px); }
.toolbar .input-wrap { flex: 1; min-width: 200px; }
.toolbar input { padding: 9px 12px 9px 38px !important; font-size: 13.5px; }
.toolbar .input-wrap svg.i { left: 12px; width: 16px; height: 16px; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; background: none; color: var(--muted); box-shadow: none; }
.seg button.on { background: var(--surface-solid); color: var(--text); box-shadow: 0 2px 8px -2px rgba(0,0,0,.25); }
.seg button:hover { filter: none; transform: none; color: var(--text); }

/* achados */
.cat-group { margin-top: 10px; }
.cat-group > h2 { display: flex; align-items: center; gap: 10px; font-size: 17px; margin: 26px 0 12px; }
.cat-group > h2 .cnt { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--surface-3); color: var(--muted); }
.cat-group > h2 .ci { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
.cat-group > h2 .ci svg { width: 16px; height: 16px; }
.finding {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  margin: 10px 0; overflow: hidden; transition: border-color .2s, box-shadow .2s, transform .2s;
  backdrop-filter: blur(12px); animation: reveal .45s var(--ease) both;
}
.finding::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.finding:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.finding > header {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 20px; cursor: pointer; user-select: none;
}
.finding h3 { margin: 0; font-size: 15px; flex: 1; letter-spacing: -.01em; }
.finding .chev { color: var(--muted); transition: transform .25s var(--ease); }
.finding.open .chev { transform: rotate(180deg); }
.finding .f-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); }
.finding.open .f-body { grid-template-rows: 1fr; }
.finding .f-inner { overflow: hidden; padding: 0 18px 0 20px; }
.finding.open .f-inner { padding-bottom: 16px; }
.finding.hide { display: none; }
.sev { font-size: 10.5px; font-weight: 800; text-transform: uppercase; padding: 3px 9px; border-radius: 7px; letter-spacing: .06em; flex: none; color: #fff; background: var(--c); }
.c-medium .sev, .c-low .sev { color: #1a1200; }
.f-desc { margin: 0 0 8px; color: var(--text-2); font-size: 14px; }
.f-url { display: flex; align-items: center; gap: 6px; font-size: 12.5px; word-break: break-all; margin: 4px 0 10px; font-family: var(--mono); color: var(--muted); }
.f-url svg { width: 14px; height: 14px; }
.f-ev { margin: 8px 0; }
.f-ev summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); }
.f-ev pre { white-space: pre-wrap; word-break: break-word; background: #050913; color: #c3cde0; padding: 12px; border-radius: 10px; font: 12px/1.5 var(--mono); overflow: auto; border: 1px solid var(--line); }
.f-rec { margin-top: 10px; font-size: 14px; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--ok) 8%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 22%, transparent); display: flex; gap: 10px; }
.f-rec svg { color: var(--ok); margin-top: 2px; }
.f-refs { margin-top: 10px; font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 8px; }
.f-refs a { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); }
.f-refs a:hover { border-color: var(--brand); text-decoration: none; }
.empty { text-align: center; color: var(--ok); padding: 26px; font-weight: 650; font-size: 16px; }
.empty svg { width: 42px; height: 42px; display: block; margin: 0 auto 10px; }
.no-match { text-align: center; color: var(--muted); padding: 24px; display: none; }

/* ---------- responsivo ---------- */
@media (max-width: 860px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); }
  body.auth .container { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { min-height: 0; padding: 30px; }
  .auth-aside .feat, .auth-aside .legal { display: none; }
  .auth-aside .radar { width: 90px; height: 90px; }
  .auth-aside .radar .ring.r2 { inset: 14px; } .auth-aside .radar .ring.r3 { inset: 28px; } .auth-aside .radar .core { inset: 32px; }
  .auth-aside h2 { font-size: 22px; margin-top: 14px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .topbar { padding: 10px 16px; gap: 10px; }
  .tag, .user-name { display: none; }
  .container { padding: 20px 16px 48px; }
  .card, .hero { padding: 20px; }
  .auth-main { padding: 30px 22px; }
  .url-row { flex-direction: column; }
  .scan-live, .scorecard { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .meta-row, .sev-counts { justify-content: center; }
  .hist-row .mini-bar { display: none; }
  .otp { gap: 6px; }
  .otp input { font-size: 20px; border-radius: 11px; }
  .toolbar { top: 59px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* marca */
.brand-text { white-space: nowrap; }
.brand-product { font-weight: 600; background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.foot-brand { display: block; margin-top: 4px; font-weight: 600; color: var(--text-2); }
@media (max-width: 420px) { .brand-product { display: none; } }

/* ---------- navegação ---------- */
.topnav { display: flex; gap: 4px; margin-left: 6px; }
.topnav a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 10px; color: var(--text-2); font-size: 14px; font-weight: 600; }
.topnav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.topnav a[aria-current="page"] { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
.topnav svg.i { width: 16px; height: 16px; }
@media (max-width: 860px) { .topbar .tag { display: none; } }
@media (max-width: 620px) { .topnav span { display: none; } .topnav a { padding: 8px; } }

/* ---------- status extra ---------- */
.st-cancelled { background: var(--surface-3); color: var(--muted); }
.btn-danger { background: color-mix(in srgb, var(--crit) 14%, transparent); color: var(--crit); border: 1px solid color-mix(in srgb, var(--crit) 40%, transparent); box-shadow: none; }
.btn-danger:hover { background: color-mix(in srgb, var(--crit) 22%, transparent); filter: none; box-shadow: none; }
.progress-actions { display: flex; justify-content: flex-end; margin-top: 14px; }

/* ---------- comparação com a varredura anterior ---------- */
.compare-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.compare-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; min-width: 0; }
.compare-box h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; gap: 8px; }
.compare-box h3 b { font-size: 18px; letter-spacing: 0; }
.compare-box.new h3 { color: var(--crit); }
.compare-box.fixed h3 { color: var(--ok); }
.compare-box.same h3 { color: var(--muted); }
.compare-box ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; }
.compare-box li { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.compare-box li span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sev-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--c, var(--muted)); }
.delta.up { color: var(--ok); } .delta.down { color: var(--crit); }
@media (max-width: 620px) { .compare-grid { grid-template-columns: 1fr; } }
.new-tag { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--crit) 16%, transparent); color: var(--crit); flex: none; }

/* ---------- domínios ---------- */
.domain-row { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--surface-2); display: grid; gap: 10px; }
.domain-row + .domain-row { margin-top: 10px; }
.domain-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.domain-head strong { font-size: 15.5px; overflow-wrap: anywhere; }
.domain-head .spacer { flex: 1; }
.verify-steps { display: grid; gap: 10px; font-size: 13.5px; }
.verify-steps .kv { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.verify-steps .kv code { overflow-wrap: anywhere; display: block; }
@media (max-width: 620px) { .verify-steps .kv { grid-template-columns: 1fr auto; } .verify-steps .kv > span:first-child { grid-column: 1 / -1; } }
.info-msg { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius-sm); font-size: 14px; background: color-mix(in srgb, var(--brand) 10%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.info-msg svg { width: 18px; height: 18px; margin-top: 2px; flex: none; color: var(--brand); }
