@font-face { font-family: "Archivo"; font-weight: 800; font-style: normal; font-display: swap; src: url("/portal/assets/fonts/archivo-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 400; font-style: normal; font-display: swap; src: url("/portal/assets/fonts/space-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-style: normal; font-display: swap; src: url("/portal/assets/fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("/portal/assets/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #0F1015; --surface: #16181F; --surface-2: #1C1F28; --line: #2A2D36;
  --text: #F5F2EA; --muted: #A3A6AE; --gold: #E7BB49; --on-gold: #0F1015;
  --quente: #E5604D; --morno: #F08A3C; --mornofrio: #8FA9C7; --frio: #5B8DEF;
  --ok: #6FCF97; --danger: #E5604D;
  --radius: 14px; --gutter: 16px;
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Archivo", "Space Grotesk", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.5; min-height: 100vh; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; line-height: 1.1; }
h1 { font-size: clamp(26px, 6vw, 34px); } h2 { font-size: 20px; } h3 { font-size: 14px; letter-spacing: .08em; color: var(--muted); }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.noscript { padding: var(--gutter); }

/* marca */
.wordmark { font-family: var(--display); font-weight: 800; letter-spacing: .06em; font-size: 22px; text-transform: uppercase; text-decoration: none; }
.wordmark b { color: var(--gold); font-weight: 800; }

/* estrutura */
.wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 var(--gutter); }
.top { position: sticky; top: 0; z-index: 5; background: rgba(15,16,21,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; min-height: 56px; }
.top .nav { order: 3; width: 100%; margin: 0 -8px; padding-bottom: 6px; }
@media (min-width: 640px) { .top .nav { order: 1; width: auto; margin: 0; padding: 0; } .top .link { order: 2; } .top .wrap { flex-wrap: nowrap; height: 60px; } }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--muted); padding: 10px 12px; border-radius: 10px; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface); }
.nav a:hover { color: var(--text); }
main.wrap { padding-top: 28px; padding-bottom: 80px; display: grid; gap: 20px; }
.head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sub { color: var(--muted); }
[hidden] { display: none !important; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stack { display: grid; gap: 12px; }
.card.stack > h3:not(:first-child) { margin-top: 10px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* botões */
.btn { appearance: none; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); padding: 0 18px; min-height: 46px; border-radius: 12px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:hover { border-color: #3a3e4a; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.gold { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.btn.gold:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn[aria-pressed="true"] { border-color: var(--text); background: var(--surface); }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 10px 4px; min-height: 44px; text-decoration: underline; }

/* formulários */
label { display: grid; gap: 6px; font-weight: 500; }
label .hint { color: var(--muted); font-weight: 400; font-size: 14px; }
input, select { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; min-height: 48px; padding: 0 14px; width: 100%; }
input::placeholder { color: #6d7079; }
input[type="checkbox"] { width: 22px; min-height: 22px; height: 22px; accent-color: var(--gold); padding: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; color: var(--muted); }
.grid2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.msg { min-height: 22px; font-size: 14px; color: var(--muted); }
.msg.err { color: var(--danger); } .msg.ok { color: var(--ok); }

/* autenticação */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px var(--gutter); }
.auth .box { width: 100%; max-width: 420px; display: grid; gap: 22px; }
.auth .tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.auth .tabs button { min-height: 44px; border: 0; background: transparent; border-radius: 9px; cursor: pointer; font-weight: 700; color: var(--muted); }
.auth .tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--text); }
.tagline { color: var(--muted); }

/* temperatura: sempre cor + texto */
.tag { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.tag::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.t-quente::before { background: var(--quente); } .t-morno::before { background: var(--morno); }
.t-mornofrio::before { background: var(--mornofrio); } .t-frio::before { background: var(--frio); }
.tag.plain::before { display: none; } .tag.plain { padding: 3px 10px; font-weight: 500; color: var(--muted); }

/* lista de leads */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chip { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 500; }
.chip[aria-pressed="true"] { border-color: var(--text); background: var(--surface-2); font-weight: 700; }
.chip small { color: var(--muted); margin-left: 6px; }
.leads { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.lead { display: grid; gap: 8px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.lead:hover { border-color: #3a3e4a; }
.lead .l1 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.lead .name { font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.lead .when { color: var(--muted); font-size: 13px; white-space: nowrap; }
.lead .l2 { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 14px; }
.empty { text-align: center; padding: 36px 18px; display: grid; gap: 10px; justify-items: center; color: var(--muted); }
.empty h2 { color: var(--text); }

/* detalhe */
.back { text-decoration: none; color: var(--muted); display: inline-flex; min-height: 44px; align-items: center; }
.kv { display: grid; gap: 0; margin: 0; }
.kv > div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.kv > div:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 560px) { .kv > div { grid-template-columns: 200px 1fr; gap: 16px; } }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.origin { color: var(--muted); font-size: 13px; margin-left: 8px; }
.briefing { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 16px; font-size: 15px; overflow-wrap: anywhere; }
.chat { display: grid; gap: 8px; max-height: 480px; overflow-y: auto; padding: 4px 2px; }
.bubble { max-width: 86%; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble.out { justify-self: end; border-bottom-right-radius: 4px; background: #1d2230; }
.bubble.in { justify-self: start; border-bottom-left-radius: 4px; }
.bubble small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.actions { display: grid; gap: 10px; }
.reasons { display: flex; flex-wrap: wrap; gap: 8px; }

/* resultados */
.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 130px 1fr 40px; gap: 10px; align-items: center; font-size: 15px; }
.bar .track { height: 10px; background: var(--bg); border-radius: 999px; border: 1px solid var(--line); overflow: hidden; }
.bar .fill { height: 100%; background: var(--mornofrio); width: var(--w, 0); }
.bar.win .fill { background: var(--gold); }
.bar .n { text-align: right; font-weight: 700; }
.keyfig { font-family: var(--display); font-weight: 800; font-size: 56px; line-height: 1; color: var(--gold); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 13px; border-top: 0; }
td.num, th.num { text-align: right; }
.note { color: var(--muted); font-size: 14px; }
.preview { background: var(--bg); border: 1px dashed var(--line); border-radius: 12px; padding: 14px; }
.preview strong { color: var(--text); }
.skeleton { height: 76px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface)); background-size: 200% 100%; animation: sh 1.4s infinite; }
@keyframes sh { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* simulador */
.composer { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.composer textarea { resize: vertical; min-height: 48px; max-height: 160px; width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.composer textarea::placeholder { color: #6d7079; }
.bubble.typing { opacity: .7; font-style: italic; }
@media (max-width: 520px) { .composer { grid-template-columns: 1fr; } }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chips.wrap .chip { white-space: normal; text-align: left; }
.chips.wrap .chip { min-height: 0; padding: 9px 14px; border-radius: 16px; }

/* ---------- cartão do briefing ---------- */
.bcard { display: grid; gap: 18px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border-color: #3a3520; }
.bhead { display: flex; flex-wrap: wrap; gap: 12px 20px; justify-content: space-between; align-items: flex-start; }
.eyebrow { margin: 0 0 4px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.when-big { margin: 0; font-size: clamp(22px, 5vw, 30px); line-height: 1.15; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; }
.tile b { font-size: clamp(18px, 4.5vw, 24px); line-height: 1.2; overflow-wrap: anywhere; }
.tile span { font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.bgrid { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; }
.bf { display: grid; gap: 2px; min-width: 0; }
.bf.wide { grid-column: 1 / -1; }
.bf dt { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bf dd { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.bf dd.none { color: var(--muted); font-style: italic; }
.tip { border-left: 3px solid var(--gold); padding: 4px 0 4px 14px; }
.tip p:last-child { margin: 0; font-size: 17px; }
@media (max-width: 560px) { .bgrid { grid-template-columns: 1fr; } .tiles { gap: 8px; } .tile { padding: 10px; } }
