/* CRM Tranquilize Consórcios — identidade do site: Plus Jakarta Sans + Hind, azul #1E326B, turquesa #14B9C3 */
:root {
  --bg: #f3f6fb;
  --surface: #fff;
  --surface-2: #f7f9fd;
  --line: #e2e8f3;
  --line-2: #eef2f8;
  --text: #1f2a44;
  --text-2: #4a5470;
  --muted: #7d87a3;
  --brown: #1e326b;
  --brown-2: #2a4285;
  --gold: #14b9c3;
  --gold-ink: #0b7f87;
  --gold-soft: #e1f6f7;
  --beige: #dff3f5;
  --bar: #1e326b;
  --bar-soft: #dfe6f3;
  --wa: #1fae55;
  --wa-dark: #178a43;
  --danger: #c2413a;
  --danger-soft: #fdecea;
  --ok: #18825a;
  --ok-soft: #e4f4ec;
  --info-soft: #e8eefa;
  --fa: #18825a;
  --fb: #d39a1c;
  --fc: #3f6fd1;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(20, 30, 60, .05), 0 4px 16px rgba(20, 30, 60, .04);
  --shadow-lg: 0 12px 40px rgba(16, 26, 56, .18);
  --ff-head: "Plus Jakarta Sans", system-ui, sans-serif;
  --ff-body: "Hind", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--ff-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--ff-head); color: var(--brown); margin: 0; font-weight: 700; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Estrutura ---------- */
.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; background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px; z-index: 30; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; padding: 4px 8px 22px; }
.brand__mark { width: 38px; height: 38px; border-radius: 10px; background: var(--brown); color: var(--beige); display: grid; place-items: center; font: 700 14px/1 var(--ff-head); letter-spacing: .04em; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__text strong { font: 700 16px/1.2 var(--ff-head); color: var(--brown); }
.brand__text small { color: var(--muted); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__group { margin: 14px 10px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; text-decoration: none; color: var(--text-2); font-weight: 700; font-size: 13.5px; position: relative; transition: background .15s, color .15s; }
.nav a:hover { background: var(--surface-2); color: var(--brown); }
.nav a.is-active { background: var(--gold-soft); color: var(--brown); }
.nav a.is-active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.nav a svg { color: var(--muted); }
.nav a.is-active svg { color: var(--gold-ink); }
.nav .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brown); color: #fff; font-size: 11px; display: grid; place-items: center; }
.nav .count--alert { background: var(--danger); }
.side__foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line-2); }
.side__credit { margin: 12px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.side__credit strong { display: block; color: var(--text-2); font-size: 12px; }
.side__link { color: var(--muted); font-size: 12.5px; text-decoration: none; }
.side__link:hover { color: var(--brown); }
.side-backdrop { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: rgba(243, 246, 251, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .top__menu { display: none; }
.top__title { min-width: 0; flex: 1; }
.top__title h1 { font-size: 21px; line-height: 1.2; }
.top__title p { margin: 1px 0 0; color: var(--muted); font-size: 12.5px; }
.top__search { display: flex; align-items: center; gap: 8px; height: 38px; width: min(300px, 28vw); padding: 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.top__search input { border: 0; outline: 0; background: none; width: 100%; color: var(--text); }
.top__user { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.top__user select { border: 0; background: none; outline: 0; font-weight: 700; color: var(--text-2); max-width: 170px; cursor: pointer; }
.view { padding: 24px 28px 64px; min-width: 0; }
.loading { padding: 60px; text-align: center; color: var(--muted); }

/* ---------- Componentes ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn:hover { border-color: #dcd1c4; color: var(--brown); background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: default; }
.btn--primary { background: var(--brown); border-color: var(--brown); color: #fff; }
.btn--primary:hover { background: var(--brown-2); border-color: var(--brown-2); color: #fff; }
.btn--gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn--gold:hover { background: var(--gold-ink); border-color: var(--gold-ink); color: #fff; }
.btn--wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-dark); border-color: var(--wa-dark); color: #fff; }
.btn--ghost { background: none; border-color: transparent; }
.btn--danger { color: var(--danger); }
.btn--danger:hover { background: var(--danger-soft); border-color: #f0cfc6; color: var(--danger); }
.btn--sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn--xs { height: 27px; padding: 0 9px; font-size: 12px; border-radius: 7px; gap: 5px; }
.btn--xs svg { width: 15px; height: 15px; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; }
.icon-btn:hover { color: var(--brown); background: var(--surface-2); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card__head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.card__head h3 { font-size: 15px; }
.card__head p { margin: 0; color: var(--muted); font-size: 12px; }
.card__head .spacer { flex: 1; }
.card__body { padding: 14px 18px 18px; }
.card__body--flush { padding: 8px 0 6px; }
.card__link { color: var(--gold-ink); font-weight: 700; font-size: 12.5px; text-decoration: none; white-space: nowrap; cursor: pointer; background: none; border: 0; padding: 0; }
.card__link:hover { text-decoration: underline; }

.grid { display: grid; gap: 18px; }
.grid + .grid { margin-top: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-kpi { grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.toolbar .spacer { flex: 1; }
.seg { display: inline-flex; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--muted); font-weight: 700; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--brown); }
.seg button.is-on { background: var(--brown); color: #fff; }
.select, .input, .textarea { height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); outline: 0; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.select { padding-right: 28px; appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a7d71' stroke-width='2'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 8px center / 16px; cursor: pointer; }
.textarea { width: 100%; height: auto; padding: 10px 11px; resize: vertical; min-height: 84px; line-height: 1.5; }
.select:focus, .input:focus, .textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(20, 185, 195, .18); }
.select--sm { height: 32px; font-size: 12.5px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--line-2); color: var(--text-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.faixa { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 4px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--text); background: var(--line-2); white-space: nowrap; }
.faixa b { width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 10.5px; }
.faixa--A { background: #e3f2e8; } .faixa--A b { background: var(--fa); }
.faixa--B { background: #f7eedb; } .faixa--B b { background: var(--fb); color: #3d2f12; }
.faixa--C { background: #e4eef6; } .faixa--C b { background: var(--fc); }
.faixa small { font-weight: 400; color: var(--muted); }
.stage { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--gold-soft); color: var(--gold-ink); white-space: nowrap; }
.stage--ganho, .stage--realizado, .stage--fidelizado { background: var(--ok-soft); color: var(--ok); }
.stage--perdido { background: var(--danger-soft); color: var(--danger); }
.stage--novo { background: var(--brown); color: #fff; }
.stage--nutricao, .stage--reativacao { background: var(--info-soft); color: #2f6a90; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status--confirmado::before { background: var(--gold); }
.status--compareceu::before { background: var(--ok); }
.status--faltou::before, .status--cancelado::before { background: var(--danger); }
.status--remarcado::before { background: var(--fc); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--beige); color: var(--brown); font: 700 11px/1 var(--ff-head); flex: none; }
.avatar--site { background: var(--brown); color: var(--beige); }
.empty { padding: 26px 18px; text-align: center; color: var(--muted); font-size: 13px; }
.empty strong { display: block; color: var(--text-2); font-size: 14px; margin-bottom: 2px; }
.overdue { color: var(--danger); font-weight: 700; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--gold-soft); color: var(--text-2); font-size: 13px; }
.alert svg { color: var(--gold-ink); margin-top: 1px; }

/* ---------- KPIs ---------- */
.kpi { padding: 16px 18px; }
.kpi__label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi__value { font: 700 28px/1.15 var(--ff-head); color: var(--brown); margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi__value small { font-size: 15px; color: var(--muted); font-weight: 600; }
.kpi__sub { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.delta { font-weight: 700; }
.delta--up { color: var(--ok); }
.delta--down { color: var(--danger); }

/* ---------- Gráficos ---------- */
.bars { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; cursor: default; }
.bar-row__label { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row__value { font-size: 12.5px; color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.bar-row__value small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.bar-row__track { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.bar-row__fill { height: 100%; border-radius: 0 4px 4px 0; background: var(--bar); min-width: 2px; }
.bar-row:hover .bar-row__fill { background: var(--brown); }

.cols { position: relative; height: 200px; padding-left: 30px; }
.cols svg { display: block; width: 100%; height: 100%; stroke: none; overflow: visible; }
.cols .grid-line { stroke: var(--line-2); stroke-width: 1; }
.cols .axis-label { fill: var(--muted); font-size: 11px; font-family: var(--ff-body); }
.cols .col { fill: var(--bar); }
.cols .col-hit { fill: transparent; cursor: default; }
.cols .col-hit:hover + .col, .cols g:hover .col { fill: var(--brown); }

.stack { display: flex; gap: 2px; height: 14px; border-radius: 5px; overflow: hidden; margin: 6px 0 16px; background: var(--line-2); }
.stack span { height: 100%; }
.stack span:first-child { border-radius: 4px 0 0 4px; }
.stack span:last-child { border-radius: 0 4px 4px 0; }
.legend { display: flex; flex-direction: column; gap: 10px; }
.legend__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.legend__sw { width: 10px; height: 10px; border-radius: 3px; }
.legend__row small { color: var(--muted); }

.funnel { display: flex; flex-direction: column; gap: 9px; }
.funnel__row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 92px; gap: 12px; align-items: center; font-size: 13px; }
.funnel__bar { height: 26px; border-radius: 0 6px 6px 0; background: var(--bar); min-width: 3px; display: flex; align-items: center; }
.funnel__val { text-align: right; font-variant-numeric: tabular-nums; }
.funnel__val b { color: var(--brown); }
.funnel__val small { display: block; color: var(--muted); font-size: 11.5px; }

.tip { position: fixed; z-index: 100; pointer-events: none; background: var(--brown); color: #fff; padding: 7px 10px; border-radius: 8px; font-size: 12px; line-height: 1.35; box-shadow: var(--shadow-lg); max-width: 240px; }
.tip b { color: var(--beige); }

/* ---------- Listas ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--line-2); min-width: 0; }
.list li:first-child { border-top: 0; }
.list li.is-click { cursor: pointer; transition: background .12s; }
.list li.is-click:hover { background: var(--surface-2); }
.list__main { flex: 1; min-width: 0; }
.list__title { font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list__meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list__time { font: 700 14px/1 var(--ff-head); color: var(--brown); width: 46px; flex: none; font-variant-numeric: tabular-nums; }
.check { width: 22px; height: 22px; border-radius: 50%; border: 1.6px solid #cfc3b5; background: var(--surface); display: grid; place-items: center; cursor: pointer; flex: none; color: transparent; padding: 0; }
.check svg { width: 13px; height: 13px; stroke-width: 2.4; }
.check:hover { border-color: var(--ok); color: var(--ok); }
.check.is-done { background: var(--ok); border-color: var(--ok); color: #fff; }

/* ---------- Tabela ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr.is-click { cursor: pointer; }
.table tbody tr.is-click:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .lead-cell strong { display: block; color: var(--text); }
.table .lead-cell span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.table td.r, .table th.r { text-align: right; }
.more { display: flex; justify-content: center; padding: 14px; }

/* ---------- Pipeline ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(225px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 10px; align-items: start; min-height: 60vh; }
.col-k { background: #e9eef7; border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 210px); min-width: 0; }
.col-k__head { padding: 12px 14px 10px; }
.col-k__head h3 { font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.col-k__head h3 .n { margin-left: auto; font-family: var(--ff-body); font-size: 12px; color: var(--muted); background: var(--surface); border-radius: 10px; padding: 1px 8px; }
.col-k__head p { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); }
.col-k__body { padding: 2px 10px 12px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 80px; flex: 1; border-radius: 0 0 var(--radius) var(--radius); transition: background .15s; }
.col-k__body.is-over { background: #dbe3f1; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; cursor: grab; box-shadow: 0 1px 2px rgba(20, 30, 60, .05); transition: box-shadow .15s, transform .15s; }
.kcard:hover { box-shadow: var(--shadow); border-color: #dfd4c7; }
.kcard.is-dragging { opacity: .5; }
.kcard { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.kcard--ghost { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; margin: 0; box-shadow: 0 14px 30px rgba(20, 30, 60, .22); opacity: .96; transition: none !important; will-change: transform; }
.kcard__top { display: flex; align-items: center; gap: 8px; }
.kcard__name { font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kcard__phone { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 4px; }
.kcard__proc { margin-top: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.kcard__unit { font-size: 12px; color: var(--muted); }
/* Cores por área: Rinomodelação, Odontologia e Harmonização Facial (demais procedimentos) */
.proc { display: inline-block; max-width: 100%; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.proc--imovel { background: #e1f6f7; color: #0b6d74; }
.proc--auto { background: #e8eefa; color: #2c4f9e; }
.proc--invest { background: #f6ecd6; color: #86602a; }
.proc--outro { background: #eef0f5; color: #4a5470; }
.kcard--imovel { border-left: 4px solid #8fdde2; }
.kcard--auto { border-left: 4px solid #a9bde8; }
.kcard--invest { border-left: 4px solid #e8cfa4; }
.kcard--outro { border-left: 4px solid #d4d9e4; }
.kcard__foot { display: flex; align-items: center; gap: 8px; margin-top: 9px; font-size: 11.5px; color: var(--muted); }
.kcard__owner { display: flex; align-items: center; gap: 7px; margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--text-2); }
.kcard__owner .avatar { width: 22px; height: 22px; font-size: 9.5px; }
.kcard__owner.is-none { color: #b5532f; }
.kcard__owner.is-none .avatar { background: #fbe3d6; color: #b5532f; }
.kcard__val { font-weight: 700; color: var(--text-2); }

/* ---------- Agenda ---------- */
.agenda-day { display: flex; flex-direction: column; }
.slot { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line-2); }
.slot:first-child { border-top: 0; }
.slot__time { font: 700 15px/1.2 var(--ff-head); color: var(--brown); font-variant-numeric: tabular-nums; }
.slot__time small { display: block; font: 400 11.5px/1.4 var(--ff-body); color: var(--muted); }
.appt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; background: var(--surface); }
.appt + .appt { margin-top: 8px; }
.appt--procedimento { border-left-color: var(--brown); }
.appt--revisao, .appt--retorno { border-left-color: var(--ok); }
.appt--followup, .appt--outro { border-left-color: var(--fc); }
.appt--cancelado, .appt--remarcado { opacity: .55; }
.appt__main { flex: 1; min-width: 200px; cursor: pointer; }
.appt__title { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.appt__meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.appt__remind { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--gold-soft); color: var(--gold-ink); }
.appt__remind svg { width: 13px; height: 13px; }
.appt__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.week { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 10px; overflow-x: auto; }
.week__day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-height: 220px; display: flex; flex-direction: column; }
.week__day.is-today { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.week__head { padding: 10px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.week__head strong { display: block; font: 700 18px/1.1 var(--ff-head); color: var(--brown); }
.week__head span { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.week__body { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.week__item { font-size: 12px; padding: 6px 8px; border-radius: 7px; background: var(--gold-soft); border-left: 3px solid var(--gold); cursor: pointer; line-height: 1.35; }
.week__item b { display: block; }
.week__item--procedimento { background: #e9eef7; border-left-color: var(--brown); }
.week__item--revisao, .week__item--retorno { background: var(--ok-soft); border-left-color: var(--ok); }
.week__item--followup, .week__item--outro { background: var(--info-soft); border-left-color: var(--fc); }
.month { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.month__head, .month__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month__head span { padding: 10px 12px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.month__day { min-height: 112px; padding: 6px 7px 8px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 4px; cursor: pointer; min-width: 0; transition: background .12s; }
.month__day:nth-child(7n) { border-right: 0; }
.month__day:hover { background: var(--surface-2); }
.month__day.is-out { background: #f7f9fc; }
.month__day.is-out .month__num { color: #c3b8ac; }
.month__num { font: 700 13px/1 var(--ff-head); color: var(--brown); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.month__day.is-today .month__num { background: var(--gold); color: #fff; }
.month__item { font-size: 11.5px; line-height: 1.3; padding: 3px 6px; border-radius: 5px; background: var(--gold-soft); border-left: 3px solid var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.month__more { font-size: 11.5px; font-weight: 700; color: var(--gold-ink); padding-left: 4px; }
.month__item.week__item--procedimento { background: #e9eef7; border-left-color: var(--brown); }
.month__item.week__item--revisao, .month__item.week__item--retorno { background: var(--ok-soft); border-left-color: var(--ok); }
.month__item.week__item--followup, .month__item.week__item--outro { background: var(--info-soft); border-left-color: var(--fc); }
@media (max-width: 700px) {
  .month__day { min-height: 64px; padding: 4px; }
  .month__item { font-size: 0; padding: 0; height: 6px; border-left-width: 0; border-radius: 3px; background: var(--gold) !important; opacity: .75; }
  .month__item.week__item--procedimento { background: var(--brown) !important; }
  .month__item.week__item--revisao, .month__item.week__item--retorno { background: var(--ok) !important; }
  .month__item.week__item--followup, .month__item.week__item--outro { background: var(--fc) !important; }
  .month__more { font-size: 10.5px; padding-left: 0; }
  .hide-mob { display: none; }
  .month__item b { display: none; }
  .month__head span { padding: 8px 4px; text-align: center; }
}
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.date-nav { display: inline-flex; align-items: center; gap: 6px; }
.date-nav strong { font: 700 16px/1.2 var(--ff-head); color: var(--brown); min-width: 210px; text-align: center; }

/* ---------- Mensagens ---------- */
.inbox { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); min-height: 520px; overflow: hidden; }
.inbox__list { border-right: 1px solid var(--line); overflow-y: auto; max-height: calc(100vh - 220px); }
.inbox__item { display: block; width: 100%; text-align: left; padding: 13px 16px; border: 0; border-bottom: 1px solid var(--line-2); background: none; cursor: pointer; }
.inbox__item:hover { background: var(--surface-2); }
.inbox__item.is-on { background: var(--gold-soft); }
.inbox__item.is-new .inbox__name::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-right: 7px; vertical-align: 1px; }
.inbox__row { display: flex; gap: 8px; align-items: baseline; }
.inbox__name { font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox__date { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.inbox__text { font-size: 12.5px; color: var(--muted); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.inbox__detail { padding: 22px 26px; min-width: 0; }
.msg-body { margin: 18px 0; padding: 18px 20px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; white-space: pre-wrap; line-height: 1.65; font-size: 14.5px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 18px; }
.kv div span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kv div strong { font-weight: 700; color: var(--text); word-break: break-word; }

/* ---------- Atividades / timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 10px 0; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 13.5px; top: 40px; bottom: -8px; width: 1px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline__text { font-size: 13.5px; color: var(--text); word-break: break-word; }
.timeline__text a, .link { color: var(--gold-ink); font-weight: 700; text-decoration: none; cursor: pointer; }
.timeline__text a:hover, .link:hover { text-decoration: underline; }
.timeline__meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.timeline__note { margin-top: 6px; padding: 10px 12px; background: var(--surface-2); border-radius: 9px; border: 1px solid var(--line-2); white-space: pre-wrap; font-size: 13px; }
.act-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); color: var(--text-2); }
.act-icon svg { width: 15px; height: 15px; }
.act-icon--whatsapp { background: #e3f4e9; color: var(--wa-dark); }
.act-icon--etapa { background: var(--gold-soft); color: var(--gold-ink); }
.act-icon--lead_criado, .act-icon--lead_repetido { background: var(--brown); color: var(--beige); }
.act-icon--tarefa_concluida { background: var(--ok-soft); color: var(--ok); }

/* ---------- Drawer do lead ---------- */
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(12, 20, 45, .35); animation: fade .2s ease; }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(760px, 100%); background: var(--bg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .25s cubic-bezier(.2, .8, .2, 1); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.dh { background: var(--surface); border-bottom: 1px solid var(--line); padding: 20px 24px 0; }
.dh__top { display: flex; align-items: flex-start; gap: 14px; }
.dh__name { font-size: 22px; line-height: 1.2; }
.dh__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.dh__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dh__close { margin-left: auto; }
.tabs { display: flex; gap: 4px; margin-top: 16px; overflow-x: auto; }
.tabs button { height: 40px; padding: 0 12px; border: 0; background: none; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--brown); }
.tabs button.is-on { color: var(--brown); border-bottom-color: var(--gold); }
.tabs .n { font-size: 11px; color: var(--muted); margin-left: 4px; }
.db { padding: 20px 24px 40px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.section-title { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.score { display: flex; flex-direction: column; gap: 8px; }
.score__row { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; font-size: 13px; align-items: baseline; }
.score__row b { font-family: var(--ff-head); color: var(--gold-ink); text-align: right; }
.score__row span small { display: block; color: var(--muted); font-size: 11.5px; }
.score__total { display: flex; align-items: center; gap: 10px; padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--line-2); font-size: 13px; }
.dropdown { position: relative; }
.dropdown__menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 5; min-width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; }
.dropdown__menu button { display: block; width: 100%; text-align: left; padding: 9px 11px; border: 0; background: none; border-radius: 7px; cursor: pointer; font-size: 13px; }
.dropdown__menu button:hover { background: var(--surface-2); }
.dropdown__menu button small { display: block; color: var(--muted); font-size: 11.5px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(12, 20, 45, .4); animation: fade .2s ease; }
.modal__panel { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 22px 24px; animation: pop .2s ease; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.modal__head h2 { font-size: 18px; flex: 1; }
.suggest { position: relative; }
.suggest__list { position: absolute; z-index: 3; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); max-height: 220px; overflow-y: auto; }
.suggest__list button { display: flex; width: 100%; gap: 8px; align-items: center; text-align: left; padding: 9px 12px; border: 0; background: none; cursor: pointer; }
.suggest__list button:hover { background: var(--surface-2); }

.toasts { position: fixed; z-index: 120; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--brown); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13px; animation: pop .2s ease; max-width: 360px; }
.toast--error { background: var(--danger); }

.rules { display: flex; flex-direction: column; gap: 12px; }
.rule { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.rule p { margin: 6px 0 0; color: var(--text-2); font-size: 13px; }
.criteria { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.criteria li { margin: 4px 0; }

/* ---------- Responsivo ---------- */
@media (max-width: 1180px) {
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top__search { display: none; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  .app.side-open .side { transform: none; }
  .app.side-open .side-backdrop { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(12, 20, 45, .35); }
  .top { padding: 12px 16px; gap: 10px; }
  .top .top__menu { display: inline-grid; }
  .g-kpi > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .top__title h1 { font-size: 18px; }
  .top__title p { display: none; }
  .top__new span { display: none; }
  .top__new { width: 38px; padding: 0; }
  .top__user select { max-width: 110px; }
  .view { padding: 18px 16px 48px; }
  .g-2, .g-3, .g-2-1 { grid-template-columns: minmax(0, 1fr); }
  .g-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inbox { grid-template-columns: 1fr; }
  .inbox__list { max-height: 300px; border-right: 0; border-bottom: 1px solid var(--line); }
  .funnel__row { grid-template-columns: 110px minmax(0, 1fr) 70px; }
  .form-grid { grid-template-columns: 1fr; }
  .dh, .db { padding-left: 16px; padding-right: 16px; }
  .date-nav strong { min-width: 0; }
}
@media (max-width: 480px) {
  .top__user .avatar { display: none; }
  .top__user select { max-width: 92px; }
  .top__title h1 { font-size: 16px; }
  .kpi__value { font-size: 23px; }
}
.fdot { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 700; margin-right: 2px; vertical-align: 0; }
.fdot--A { background: var(--fa); } .fdot--B { background: var(--fb); color: #3d2f12; } .fdot--C { background: var(--fc); }
.date-range { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.date-range .input { height: 34px; }
.day-hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.day-hello h2 { font-size: 22px; }
.day-hello p { margin: 2px 0 0; }
.kcard__foot { flex-wrap: wrap; row-gap: 4px; }
.kcard__foot > span { white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.pill--new { background: #fdeee0; color: #a3541b; height: 21px; font-size: 11.5px; padding: 0 8px; vertical-align: 1px; }
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.top__user { cursor: pointer; }
button.top__user { font-weight: 700; color: var(--text-2); }
.top__user-name { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown__menu--right { left: auto; right: 0; }
.auth { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: var(--bg); overflow-y: auto; }
.auth__card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 32px 30px 28px; }
.auth__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth__card h1 { font-size: 22px; margin-bottom: 4px; }
.auth__card form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.auth__card .btn { height: 44px; }
.auth__err { color: var(--danger); font-size: 13px; min-height: 18px; margin: -4px 0 0; }
.auth__foot { margin-top: 18px; font-size: 11.5px; color: var(--muted); text-align: center; }
@media (max-width: 900px) { .top__user-name { display: none; } }
.due { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; background: var(--line-2); color: var(--text-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.due--today { background: var(--gold-soft); color: var(--gold-ink); }
.due--late { background: var(--danger-soft); color: var(--danger); }
.pill--late { background: var(--danger-soft); color: var(--danger); }
.fu-table td { padding-top: 10px; padding-bottom: 10px; }
.fu-what { font-weight: 700; color: var(--text); }
.fu-more { font-size: 12px; border: 0; background: none; padding: 0; margin-top: 2px; }
.fu-sub td { background: var(--surface-2); border-bottom-color: var(--line-2); }
.fu-sub .fu-what { font-weight: 400; color: var(--text-2); padding-left: 12px; border-left: 2px solid var(--line); }
.popmenu { position: fixed; z-index: 150; top: 0; left: 0; min-width: 210px; }
.side__logout { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px; margin: 0 0 10px -10px; border: 0; border-radius: 9px; background: none; color: var(--text-2); font-weight: 700; font-size: 13.5px; cursor: pointer; }
.side__logout svg { color: var(--muted); }
.side__logout:hover { background: var(--danger-soft); color: var(--danger); }
.side__logout:hover svg { color: var(--danger); }
.pw { position: relative; display: block; }
.pw .input { width: 100%; padding-right: 42px; }
.pw__eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; }
.pw__eye:hover { color: var(--brown); background: var(--surface-2); }

/* Visão Geral: lista de leads sem pré-orçamento com rolagem própria */
.nopre { max-height: 380px; overflow-y: auto; }
.nopre thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }

/* Novas solicitações (lead que pediu de novo pelo site e ainda não foi respondido) */
.newreq { background: #fff6e6; border: 1px solid #f0d9a8; border-left: 4px solid var(--gold, #c4983a); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; }
.newreq__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.newreq__head .muted { font-size: 12.5px; }
.newreq__icon { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #c4983a; color: #fff; font-weight: 700; font-size: 13px; }
.newreq__list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.newreq__list li { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 10px; padding: 8px 10px; }
.newreq__main { flex: 1; min-width: 0; }
.newreq__name { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: #e2c98f; text-underline-offset: 3px; }
.newreq__meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.newreq__antes { color: var(--muted); }
.newreq__actions { display: flex; gap: 6px; flex: none; }
@media (max-width: 640px) { .newreq__list li { flex-direction: column; align-items: flex-start; } }
.kcard--new { border-color: #c4983a; box-shadow: 0 0 0 2px rgba(196, 152, 58, .25); }

/* Meu dia: seção de orçamentos com período próprio */
.day-orc { margin: 18px 0; }

/* Visão Geral · Equipe */
.team-best .kpi__value { font-size: 22px; }
.team-filter { margin-top: 4px; }
.team-filter .muted { font-size: 12px; }
.sla { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
.sla-row { display: grid; grid-template-columns: 150px 1fr 48px 130px; align-items: center; gap: 10px; font-size: 13px; }
.sla-row > span { display: flex; align-items: center; gap: 6px; }
.sla-row small { color: var(--muted); font-size: 11.5px; }
.sla-bar { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; }
.sla-bar i { display: block; height: 100%; background: var(--ok, #2f8a57); border-radius: 6px; }
.sla-note { margin: 14px 0 0; font-size: 12.5px; }
.team-table th.is-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.team-table th.is-on { color: var(--text); }
.team-table tr.is-sel td { background: #e9f7f8; }
.team-table td { white-space: nowrap; }
.team-table td small { font-size: 11px; }
@media (max-width: 700px) { .sla-row { grid-template-columns: 110px 1fr 40px; } .sla-row > small { display: none; } }

/* ---------- Celular e tablet ---------- */
.kcard__move { display: none; margin-left: auto; align-items: center; gap: 3px; height: 26px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2, #faf7f3); color: var(--text-2); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
@media (max-width: 900px), (hover: none) {
  .kcard__move { display: inline-flex; }
}
@media (max-width: 900px) {
  /* iPhone dá zoom em campos com letra menor que 16px e a tela fica cortada */
  .select, .input, .textarea, .select--sm { font-size: 16px; }
  /* Pipeline: uma coluna por tela, encaixando ao rolar para o lado */
  .board { grid-auto-columns: 82vw; scroll-snap-type: x mandatory; scroll-padding-left: 2px; min-height: 0; }
  .board.is-dragging { scroll-snap-type: none; }
  .col-k { scroll-snap-align: start; max-height: calc(100vh - 230px); }
  .toolbar { flex-wrap: wrap; }
  .toolbar .spacer { display: none; }
  .date-range { width: 100%; }
  .date-range .input { flex: 1 1 120px; }
}
@media (max-width: 700px) {
  /* Filtros em duas colunas; busca na linha inteira */
  .toolbar > .select, .toolbar > .input { flex: 1 1 calc(50% - 10px); width: auto !important; }
  .toolbar > .input[type="search"] { flex-basis: 100%; }
  .toolbar > .btn { flex: 0 0 auto; }
  /* Lista de leads em cartões, sem rolar para o lado */
  .table--cards thead { display: none; }
  .table--cards, .table--cards tbody { display: block; }
  .table--cards tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table--cards td { display: block; padding: 0; border: 0; white-space: normal !important; }
  .table--cards td:nth-child(1) { grid-column: 1; }
  .table--cards td:nth-child(2) { grid-column: 2; grid-row: 1; justify-self: end; }
  /* Linha 1: lead e faixa · linha 2: procedimento e etapa · linha 3: próxima ação e entrada (unidade e responsável ficam na ficha) */
  .table--cards td:nth-child(3), .table--cards td:nth-child(7) { grid-column: 1; }
  .table--cards td:nth-child(5), .table--cards td:nth-child(8) { grid-column: 2; justify-self: end; text-align: right; }
  .table--cards td:nth-child(4), .table--cards td:nth-child(6) { display: none; }
}
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  /* Leads sem pré-orçamento (celular e tablet): cartões que só rolam para baixo junto com a página */
  .nopre { max-height: none; overflow: visible; }
  .table--mini thead { display: none; }
  .table--mini, .table--mini tbody { display: block; }
  .table--mini tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table--mini td { display: block; padding: 0; border: 0; white-space: normal !important; }
  .table--mini td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .table--mini td:nth-child(6) { grid-column: 2; grid-row: 1; justify-self: end; }
  .table--mini td:nth-child(2) { grid-column: 1; }
  .table--mini td:nth-child(3) { grid-column: 2; justify-self: end; }
  .table--mini td:nth-child(4), .table--mini td:nth-child(5) { font-size: 12.5px; color: var(--muted); }
  .table--mini td:nth-child(5) { grid-column: 2; justify-self: end; text-align: right; }
}
.pages { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.pages::-webkit-scrollbar { display: none; }
.pages__page { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 12px 0 16px; }
.pager button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.pager button.is-on { background: var(--brown); border-color: var(--brown); color: #fff; }
.pages .table { table-layout: fixed; width: 100%; }
.pages .table th:nth-child(1) { width: 30%; } .pages .table th:nth-child(2) { width: 24%; } .pages .table th:nth-child(3) { width: 17%; }
.pages .table th:nth-child(4) { width: 11%; } .pages .table th:nth-child(5) { width: 12%; } .pages .table th:nth-child(6) { width: 6%; }
.pages .table td { overflow: hidden; text-overflow: ellipsis; }
.pager__step { font-size: 18px !important; line-height: 1; }
.pager__step:disabled { opacity: .35; cursor: default; }
/* Clínica (Odontologia) */
.pill--clinica { background: #dff1ec; color: #2f6f62; height: 22px; font-size: 11.5px; padding: 0 9px; }
.stage--paciente_novo { background: #2f6f62; color: #fff; }
.stage--paciente_agendado, .stage--paciente_tratamento, .stage--paciente_retorno { background: #dff1ec; color: #2f6f62; }
.stage--paciente_inativo { background: #eef0f5; color: var(--muted); }
/* Menu de mensagens do WhatsApp na ficha: rola por dentro e, no celular, abre como painel na parte de baixo da tela */
.dropdown__menu[data-wa-list] { max-height: min(70vh, 540px); overflow-y: auto; overscroll-behavior: contain; width: min(360px, calc(100vw - 32px)); -webkit-overflow-scrolling: touch; }
@media (max-width: 700px) {
  .dropdown__menu[data-wa-list] { position: fixed; top: auto; left: 10px; right: 10px; bottom: 10px; width: auto; max-height: 72vh; z-index: 120; padding: 8px; box-shadow: 0 -8px 40px rgba(12, 20, 45, .28); }
  .dropdown__menu[data-wa-list] button { padding: 11px 12px; }
}


/* ---------- Tranquilize: consórcio ---------- */
.brand__logo { height: 30px; width: auto; display: block; }
.brand__text--crm { font-size: 11.5px; color: var(--muted); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-top: 6px; }
.auth__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.auth__logo { height: 32px; width: auto; }
.auth__brand small { color: var(--muted); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 11px; }
.appt--reuniao { border-left-color: var(--gold); }
.appt--assinatura { border-left-color: var(--brown); }
.appt--assembleia { border-left-color: var(--fb); background: #fdf7ea; }
.week__item--reuniao, .month__item.week__item--reuniao { background: var(--gold-soft); border-left-color: var(--gold); }
.week__item--assinatura, .month__item.week__item--assinatura { background: #e6ebf6; border-left-color: var(--brown); }
.week__item--assembleia, .month__item.week__item--assembleia { background: #fdf3dc; border-left-color: var(--fb); }
@media (max-width: 700px) {
  .month__item.week__item--reuniao { background: var(--gold) !important; }
  .month__item.week__item--assinatura { background: var(--brown) !important; }
  .month__item.week__item--assembleia { background: var(--fb) !important; }
}
.status--cota-ativa::before { background: var(--gold); }
.status--cota-contemplada::before, .status--cota-credito_utilizado::before { background: var(--ok); }
.status--cota-cancelada::before { background: var(--danger); }
.cota-card .card__body { padding: 16px 18px; }
.cota-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cota-card__head strong { font-family: var(--ff-head); color: var(--brown); }
.lance-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .lance-form { grid-template-columns: minmax(0, 1fr); } }
.steps { margin: 0 0 12px; padding-left: 20px; color: var(--text-2); font-size: 13.5px; }
.steps li { margin: 4px 0; }
code.copy { display: block; padding: 9px 11px; border-radius: 8px; background: var(--surface-2); border: 1px dashed var(--line); font-size: 12.5px; word-break: break-all; cursor: copy; margin: 6px 0 10px; color: var(--brown); }
code.copy:hover { border-color: var(--gold); }
