@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 {
  /* Tema claro (padrão): Icons 1.0. Creme como fundo, grafite como estrutura, dourado com moderação. */
  color-scheme: light;
  --bg: #F3EFE6; --surface: #FBF9F4; --surface-2: #F7F3EA; --line: #DDD6C6; --line-strong: #C9C0AC;
  --text: #0F1015; --muted: #5E5F66; --gold: #E9BC3F; --on-gold: #0F1015; --gold-text: #7A5A06;
  --quente: #C93B28; --morno: #A9500F; --mornofrio: #5F7F9F; --frio: #2F66D0;
  --ok: #1F7A4D; --danger: #C93B28;
  --placeholder: #73757C; --bubble-out: #EDE6D3; --gold-line: #E3D3A0; --gold-bg: #F6ECCB; --gold-bg-strong: #EFE0A8;
  --side-bg: #EAE4D6; --side-bg-mobile: rgba(243,239,230,.96); --card-top: #FFFFFF; --hover-bg: #FFFFFF; --track: #E4DDCC;
  --danger-line: #E7B9B2; --shadow: 0 10px 32px rgba(15,16,21,.18); --inset: rgba(255,255,255,.6);
  --radius: 14px; --radius-card: 14px; --radius-control: 12px; --radius-pill: 999px; --gutter: 16px;
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Archivo", "Space Grotesk", system-ui, sans-serif;
}
/* Tema escuro (opção): Ajustes > Aparência. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F1015; --surface: #16181F; --surface-2: #1C1F28; --line: #2A2D36; --line-strong: #3a3e4a;
  --text: #F5F2EA; --muted: #A3A6AE; --gold: #E9BC3F; --on-gold: #0F1015; --gold-text: #E9BC3F;
  --quente: #E5604D; --morno: #F08A3C; --mornofrio: #8FA9C7; --frio: #5B8DEF; --ok: #6FCF97; --danger: #E5604D;
  --placeholder: #6d7079; --bubble-out: #1d2230; --gold-line: #3a3520; --gold-bg: #262212; --gold-bg-strong: #2a2412;
  --side-bg: #0B0C10; --side-bg-mobile: rgba(11,12,16,.96); --card-top: #181b23; --hover-bg: #1a1c24; --track: #2a2d36;
  --danger-line: #4a2a27; --shadow: 0 16px 48px rgba(0,0,0,.6); --inset: rgba(255,255,255,.03);
}
* { 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, h2 { text-transform: none; letter-spacing: 0; }
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-text); font-weight: 800; }

/* estrutura */
.wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 var(--gutter); }
.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: var(--radius-control); font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:hover { border-color: var(--line-strong); }
.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: var(--radius-control); min-height: 48px; padding: 0 14px; width: 100%; }
input::placeholder { color: var(--placeholder); }
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: var(--radius-control); 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: var(--radius-pill); 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: var(--radius-pill); 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: var(--line-strong); }
.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: var(--radius-control); 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: var(--radius-card); 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: var(--bubble-out); }
.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: var(--radius-pill); 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-text); }
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: var(--radius-control); 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: var(--radius-control); padding: 12px 14px; }
.composer textarea::placeholder { color: var(--placeholder); }
.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: var(--gold-line); }
.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-text); 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: var(--radius-card); 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; } }

/* ---------- BIRA ---------- */
.bira { border-color: var(--gold-line); }
.bira .bubble.in { background: var(--surface-2); }
.bira .bubble.out { background: var(--gold-bg); border-color: var(--gold-line); }

/* ---------- agenda ---------- */
.dayrow { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line); }
.dayrow:first-child { border-top: 0; }
.winrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.winrow input[type="time"] { width: 120px; }
ul.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.blockrow { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--bg); }
@media (max-width: 520px) { .dayrow { grid-template-columns: 1fr; gap: 4px; } }
.winrow input[type="time"] { width: 150px; min-width: 0; }
.dayrow .stack > .link, .dayrow .winrow .link { justify-self: start; align-self: flex-start; text-align: left; width: auto; }
.dayrow input[type="time"] { width: 150px !important; padding-right: 8px; }
.dayrow button.link { display: inline-block; width: auto !important; margin: 0 !important; text-align: left !important; justify-self: start; }
@media (max-width: 520px) { .dayrow input[type="time"] { width: 104px !important; padding: 0 4px; font-size: 14px; } .dayrow input[type="time"]::-webkit-calendar-picker-indicator { display: none; } .winrow { flex-wrap: nowrap; gap: 6px; } }

/* ---------- primeiros passos ---------- */
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.steps li > span:nth-child(2) { flex: 1 1 180px; }
.steps .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 14px; flex: none; }
.steps li.done .tick { background: var(--gold); border-color: var(--gold); color: var(--on-gold); font-weight: 700; }
.steps li.done > span:nth-child(2) { color: var(--mut); text-decoration: line-through; }

/* imóveis */
.props { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.prop { display: grid; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.prop:first-child { border-top: 0; padding-top: 0; }
.prop.off { opacity: .65; }
.pmain { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bf dd.warn { color: var(--danger); }
.calc { margin: 0; display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.calc > div { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.calc dt { color: var(--muted); } .calc dd { margin: 0; font-weight: 600; }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.notes li { display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
.notes li:first-child { border-top: 0; padding-top: 0; }
.notes small { color: var(--muted); }
.notes span { white-space: pre-wrap; overflow-wrap: anywhere; }
textarea { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-control); padding: 12px 14px; width: 100%; resize: vertical; min-height: 84px; }
textarea::placeholder { color: var(--placeholder); }
.notes .link { justify-self: start; min-height: 32px; padding: 4px 0; font-size: 14px; }
.asks{margin:.3rem 0 0;padding-left:1.1rem}.asks li{margin:.2rem 0}

/* ---------- v0.16: casca com menu lateral ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 26px; padding: 26px 16px 20px; background: var(--side-bg); border-right: 1px solid var(--line); }
.side .wordmark { padding: 0 10px; font-size: 24px; }
.side .nav { display: grid; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--muted); padding: 0 12px; border-radius: var(--radius-control); font-weight: 500; min-height: 46px; border: 1px solid transparent; }
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--gold-text); background: var(--gold-bg); border-color: var(--gold-line); font-weight: 700; }
.nav svg { flex: none; }
.who { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); }
.who b { display: block; font-size: 15px; }
.who .link { padding: 0; min-height: 24px; font-size: 13px; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-bg-strong); color: var(--gold-text); font-weight: 700; font-size: 14px; border: 1px solid var(--gold-line); }
.mtop { display: none; }
main.page { width: 100%; max-width: 1040px; margin: 0 auto; padding: 36px 32px 90px; display: grid; gap: 22px; align-content: start; }
.head h1 { letter-spacing: .01em; }
.head .sub { margin-top: 6px; }
.card { background: linear-gradient(180deg, var(--card-top), var(--surface)); box-shadow: 0 1px 0 var(--inset) inset; padding: 22px; }

/* cartões de números */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { background: linear-gradient(180deg, var(--card-top), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 6px; }
.kpi .kt { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px; }
.kpi b { font-family: var(--display); font-size: 38px; line-height: 1; }
.kpi.hot .kt svg { color: var(--quente); } .kpi.cold .kt svg { color: var(--frio); } .kpi.won .kt svg { color: var(--ok); } .kpi .kt svg { color: var(--gold-text); }

/* busca */
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 0 16px; font-weight: 400; }
.search:focus-within { border-color: var(--gold); }
.search input { border: 0; background: transparent; min-height: 50px; padding: 0; outline: none; }
.search svg { color: var(--muted); flex: none; }

/* lista de leads como tabela de cartões */
.lead { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 18px; }
.lead:hover { border-color: var(--gold-line); background: var(--hover-bg); }
.lmain { display: grid; gap: 6px; min-width: 0; }
.lring { display: grid; justify-items: center; gap: 2px; }
.lring small { font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.nores { padding: 18px; text-align: center; }

/* anel de completude */
.ring { --p: 0; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--gold) calc(var(--p) * 1%), var(--track) 0); position: relative; flex: none; }
.ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.ring b { position: relative; font-size: 12px; }
.ring.big { width: 72px; height: 72px; } .ring.big::before { inset: 7px; } .ring.big b { font-size: 16px; }
.row.nowrap { flex-wrap: nowrap; align-items: center; gap: 16px; }
.leadhead { align-items: center; }

/* BIRA flutuante */
.fabwrap { position: fixed; right: 22px; bottom: 22px; z-index: 20; display: grid; justify-items: end; gap: 12px; }
.fab { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: var(--radius-pill); border: 0; background: var(--gold); color: var(--on-gold); font-weight: 700; cursor: pointer; box-shadow: var(--shadow); }
.fab:hover { filter: brightness(1.06); }
.fabpanel { width: min(420px, calc(100vw - 32px)); max-height: min(640px, 76vh); overflow-y: auto; background: var(--bg); border: 1px solid #3a3520; border-radius: 18px; padding: 12px; box-shadow: var(--shadow); }
.fabx { justify-self: end; display: block; margin-left: auto; }

/* tela de entrada sem a casca */
main.auth { min-height: 100vh; }

/* celular: barra inferior no lugar do menu lateral */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 15; inset: auto 0 0 0; height: auto; flex-direction: row; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); gap: 0; border-right: 0; border-top: 1px solid var(--line); background: var(--side-bg-mobile); backdrop-filter: blur(8px); }
  .side .wordmark, .who { display: none; }
  .side .nav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; gap: 0; }
  .nav a.sec { display: none; }
  .nav a { flex-direction: column; justify-content: center; gap: 3px; padding: 6px 0; font-size: 10.5px; min-height: 52px; border-radius: 10px; }
  .mtop { display: flex; justify-content: space-between; align-items: center; padding: 12px var(--gutter) 0; }
  main.page { padding: 14px var(--gutter) 110px; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi b { font-size: 30px; }
  .fabwrap { right: 14px; bottom: 82px; }
  .fab span { display: none; } .fab { padding: 0; width: 52px; justify-content: center; }
  .lead { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .lead.visit { grid-template-columns: minmax(0, 1fr); }
  .lring small { display: none; } .ring { width: 40px; height: 40px; } .ring::before { inset: 4px; } .ring b { font-size: 11px; }
}
.chips.wrap .chip { flex: 0 1 auto; max-width: 100%; }
.fabpanel .card { border: 0; background: transparent; box-shadow: none; padding: 6px; }
@media (max-width: 860px) { .fabpanel { max-height: 62vh; } .fabwrap { left: 14px; justify-items: end; } .fabpanel { width: 100%; } }
tr.weak td { opacity: .55; }
.ratecell { min-width: 150px; } .ratecell .track { display: inline-block; width: 90px; vertical-align: middle; margin-right: 8px; }
select { appearance: auto; }

/* v0.18: foto do imóvel, excluir, agenda compacta */
.pthumb { width: 44px; height: 44px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); flex: none; }
.pthumb.big { width: 100%; max-width: 280px; height: auto; max-height: 180px; border-radius: var(--radius-control); }
.lbl { font-weight: 500; }
input[type="file"] { min-height: 0; padding: 10px; }
.btn.danger { color: var(--danger); border-color: var(--danger-line); }
.weekgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.daycol { display: grid; gap: 6px; align-content: start; padding: 10px 8px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-control); min-width: 0; }
.daycol > strong { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: var(--gold-text); text-align: center; }
.wincell { display: grid; gap: 4px; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.wincell input[type="time"] { min-height: 38px; padding: 0 6px; font-size: 14px; width: 100%; }
.wincell .link, .daycol .link { font-size: 12px; min-height: 28px; padding: 2px 0; justify-self: center; text-decoration: none; color: var(--muted); }
.daycol .note { font-size: 12px; text-align: center; }
.bf .pthumb.big { margin: 4px 0 6px; }
@media (max-width: 860px) { .weekgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wincell input[type="time"] { font-size: 15px; } }

/* ---- painel de análise ---- */
.controls label { display: grid; gap: 6px; color: var(--muted); font-size: 14px; min-width: 150px; }
.controls select, .controls input { min-height: 44px; }
.controls .row { align-items: end; }
.controls .vs { color: var(--muted); padding: 0 4px; align-self: center; }
.chart { width: 100%; height: auto; display: block; }
.chart .gl { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 12px; } .chart .ax.r { fill: var(--gold-text); }
.chart .lb { fill: var(--text); font-size: 13px; } .chart .lb.weak { fill: var(--muted); }
.chart .val { fill: var(--text); font-size: 13px; font-weight: 700; }
.chart .bar1 { fill: var(--mornofrio); opacity: .85; }
.chart .line1 { stroke: var(--gold); stroke-width: 3; stroke-linejoin: round; }
.chart .dot1 { fill: var(--gold); }
.chart .bar2 { fill: var(--gold); } .chart .bar2.weak { fill: var(--muted); opacity: .45; }
.chart .ci { stroke: var(--text); stroke-width: 1.5; opacity: .8; }
.chart .avg { stroke: var(--frio); stroke-width: 1.5; stroke-dasharray: 5 4; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.legend .sw { width: 14px; height: 10px; border-radius: 3px; display: inline-block; } .legend .sw.b { background: var(--mornofrio); } .legend .sw.l { background: var(--gold); margin-left: 10px; }
.delta { color: var(--muted); font-size: 13px; display: block; }
.tablewrap { overflow-x: auto; }
.cmp { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
table.heat th, table.heat td { white-space: nowrap; }
table.heat td small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
td.h0 { background: transparent; color: var(--muted); } td.h1 { background: rgba(231,187,73,.12); } td.h2 { background: rgba(231,187,73,.28); }
td.h3 { background: rgba(231,187,73,.45); } td.h4 { background: rgba(231,187,73,.65); color: var(--on-gold); } td.weak { opacity: .55; }
.chip.on { border-color: var(--gold); }
@media (max-width: 560px) { .cmp { grid-template-columns: 1fr; } .controls label { min-width: 120px; } }
.controls select, .controls input { max-width: 260px; }
.controls .row.wrap { gap: 12px 16px; }

progress { width: 100%; height: 10px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 6px; background: var(--line); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--line); border-radius: 6px; }
progress::-webkit-progress-value { background: var(--gold); border-radius: 6px; }
progress::-moz-progress-bar { background: var(--gold); border-radius: 6px; }

.nav a.morelink { display: none; }
@media (max-width: 860px) {
  .nav a.morelink { display: flex; }
  .kpis { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .kpi { padding: 8px 6px; gap: 2px; text-align: center; }
  .kpi .kt { justify-content: center; font-size: 11px; } .kpi .kt svg { display: none; }
  .kpi b { font-size: 22px; }
}

a.card { text-decoration: none; }
a.card.row { align-items: center; }

.nstep { margin-top: 4px; font-size: 13px; }

/* cartões em coluna não esticam as linhas internas */
.card.stack { align-content: start; }

/* origem do dado no dossiê: etiqueta visível */
.origin.o-lead, .origin.o-ia, .origin.o-corretor { display: inline-block; padding: 1px 9px; border-radius: var(--radius-pill); border: 1px solid var(--line); font-size: 12px; font-weight: 700; white-space: nowrap; }
.origin.o-lead { color: var(--ok); border-color: var(--ok); }
.origin.o-ia { color: var(--gold-text); border-color: var(--gold-text); }
.origin.o-corretor { color: var(--text); }
.pausebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 4px 0 4px; }

.dedit { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: 8px; }
.dedit input, .dedit select { min-height: 36px; width: auto; min-width: 160px; }
.kv dd .link { margin-left: 8px; font-size: 13px; }

/* Visitas na agenda: nome+horário à esquerda, etiqueta e botão à direita (sem coluna de avatar) */
.lead.visit { grid-template-columns: minmax(0, 1fr) auto; }
.lead.visit .l1 { flex-wrap: wrap; justify-content: flex-start; gap: 4px 14px; }
@media (max-width: 720px) { .lead.visit { grid-template-columns: minmax(0, 1fr); } }

/* Operação: cartões de números no topo */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* celular: seções dobráveis e botão da BIRA que sai da frente ao rolar */
.fold > h3 { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.fold > h3::after { content: "+"; font-size: 20px; color: var(--gold-text); }
.fold:not(.closed) > h3::after { content: "−"; }
.fold.closed > *:not(h3) { display: none; }
.fabwrap { transition: transform .2s ease; }
@media (max-width: 860px) { .fabwrap.fabhide { transform: translateY(140px); } }
.tip { border-color: var(--gold); }

/* Marcadores de origem (Icons 1.0, 2.8): legíveis sem cor, com forma própria para impressão e preto e branco. */
.origin.o-lead::before { content: "● "; }
.origin.o-ia::before { content: "◆ "; }
.origin.o-corretor::before { content: "▲ "; }

/* dossiê em seções */
.bsec { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.bsec:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.bsec-t { font-size: 15px; margin: 0 0 10px; }
.tip.div { border-left: 3px solid var(--gold); }
.tile.txt b { font-size: 13px; font-weight: 600; line-height: 1.25; }
