/* in cloud SALES — painel administrativo */
:root {
  --navy-900: #040b33;
  --navy-800: #06104a;
  --navy-700: #0b1a6b;
  --navy-600: #13278f;
  --cyan: #0bb3d1;
  --cyan-l: #1fd6f2;
  --gold: #e0a800;
  --bg: #f3f5fb;
  --surface: #ffffff;
  --text: #1b2350;
  --muted: #6b7499;
  --line: #e3e7f3;
  --danger: #e04462;
  --ok: #17a673;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(16, 28, 90, .07);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); font-size: 14px; line-height: 1.5; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
a { color: var(--cyan); }
button, input, select, textarea { font: inherit; color: inherit; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
  font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; white-space: nowrap; text-decoration: none; color: var(--text);
}
.btn:hover { border-color: var(--cyan); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.btn--primary { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.btn--primary:hover { background: var(--navy-600); }
.btn--danger { color: var(--danger); }
.btn--danger:hover { border-color: var(--danger); background: #fff3f5; }
.btn--sm { padding: 5px 10px; font-size: 12.5px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* Login */
.login { min-height: 100%; display: grid; place-items: center; padding: 20px;
  background: linear-gradient(135deg, rgba(4,11,51,.9), rgba(11,26,107,.85)), url("../assets/img/bg-dark.jpg") center/cover; }
.login__card { width: 100%; max-width: 380px; background: var(--surface); border-radius: 16px; padding: 34px; box-shadow: 0 30px 60px rgba(0,0,0,.35); }
.login__brand { display: flex; align-items: center; gap: 10px; background: var(--navy-800); color: #fff; padding: 12px 16px; border-radius: 10px; margin-bottom: 22px; }
.login h1 { font-size: 20px; margin-bottom: 18px; }
.login label { display: block; font-weight: 600; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.login input { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; }
.login__error { color: var(--danger); min-height: 1.4em; margin: 12px 0 4px; font-weight: 600; }
.login__back { font-size: 13px; color: var(--muted); }

/* Layout */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy-800); color: #c9d2f5; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar__brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px; color: #fff; font-size: 14px; line-height: 1.1; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar__nav { padding: 10px 12px; flex: 1; }
.sidebar__group { text-transform: uppercase; letter-spacing: .12em; font-size: 10.5px; color: #7d89c2; margin: 18px 10px 6px; font-weight: 700; }
.sidebar__nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: #c9d2f5; text-decoration: none; font-weight: 500; margin-bottom: 2px; }
.sidebar__nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar__nav a.is-active { background: rgba(31,214,242,.14); color: var(--cyan-l); font-weight: 700; }
.sidebar__site { margin: 12px; padding: 10px; text-align: center; border: 1px solid rgba(255,255,255,.15); border-radius: 8px; color: #fff; text-decoration: none; font-weight: 600; }
.badge { margin-left: auto; background: var(--cyan-l); color: var(--navy-900); font-size: 11px; font-weight: 800; border-radius: 999px; padding: 1px 8px; }

/* Ícones simples em CSS */
.ico { width: 16px; height: 16px; display: inline-block; flex: none; background: currentColor; opacity: .85;
  -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; }
.ico--dash  { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h8v10H3zM13 3h8v6h-8zM13 11h8v10h-8zM3 15h8v6H3z'/%3E%3C/svg%3E"); }
.ico--pipe  { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 4h20l-8 9v7l-4-2v-5z'/%3E%3C/svg%3E"); }
.ico--money { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 6h20v12H2zm10 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z'/%3E%3C/svg%3E"); }
.ico--client{ --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 21V7l9-4 9 4v14h-6v-6H9v6z'/%3E%3C/svg%3E"); }
.ico--user  { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4.5'/%3E%3Cpath d='M3 21c1-5 5-7 9-7s8 2 9 7z'/%3E%3C/svg%3E"); }
.ico--cal   { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18v16H3zM7 2h2v4H7zm8 0h2v4h-2zM5 10v9h14v-9z'/%3E%3C/svg%3E"); }
.ico--mail  { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 5h20v14H2zm2 2v1l8 5 8-5V7l-8 5z'/%3E%3C/svg%3E"); }
.ico--text  { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16v3h-6.5v13h-3V7H4z'/%3E%3C/svg%3E"); }
.ico--team  { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8' cy='8' r='3.5'/%3E%3Ccircle cx='17' cy='9' r='3'/%3E%3Cpath d='M1 20c.7-4 3.5-6 7-6s6.3 2 7 6zm15 0c-.3-2-1-3.6-2.2-4.8 3.4-.8 7.2.6 8.2 4.8z'/%3E%3C/svg%3E"); }
.ico--steps { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='4' cy='12' r='3'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Ccircle cx='20' cy='12' r='3'/%3E%3C/svg%3E"); }
.ico--lock  { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 10h14v11H5zm3 0V7a4 4 0 0 1 8 0v3h-2V7a2 2 0 0 0-4 0v3z'/%3E%3C/svg%3E"); }

.main { min-width: 0; display: flex; flex-direction: column; }
.header { display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header__title { font-size: 19px; font-weight: 700; flex: 1; }
.header__menu { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }
.header__menu span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; }
.header__user { position: relative; }
.userbtn { display: flex; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; font-weight: 600; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--navy-700); color: #fff; display: grid; place-items: center; font-weight: 700; }
.dropdown { position: absolute; right: 0; top: 42px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); min-width: 170px; padding: 6px; z-index: 20; }
.dropdown button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 6px; cursor: pointer; }
.dropdown button:hover { background: var(--bg); }
.content { padding: 26px 28px 60px; outline: none; }

/* Blocos */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card__title { font-size: 15px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.toolbar .spacer { flex: 1; }
.input, .select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-width: 0; }
.input--search { width: 260px; max-width: 100%; }
.grid { display: grid; gap: 18px; }
.grid--kpi { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: 1.6fr 1fr; }
.muted { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }

/* Abas de período */
.tabs { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 7px 14px; border-radius: 7px; cursor: pointer; font-weight: 600; color: var(--muted); }
.tabs button.is-active { background: var(--navy-700); color: #fff; }

/* KPI */
.kpi { position: relative; overflow: hidden; }
.kpi__label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.kpi__value { font-size: 26px; font-weight: 800; margin-top: 6px; color: var(--navy-700); }
.kpi--accent { background: linear-gradient(135deg, var(--navy-700), var(--navy-600)); border: 0; }
.kpi--accent .kpi__label { color: #a9b5e0; }
.kpi--accent .kpi__value { color: #fff; }

/* Gráfico */
.chart { width: 100%; height: auto; display: block; }
.chart text { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.chart .bar { fill: var(--cyan); transition: opacity .15s; }
.chart .bar:hover { opacity: .75; }
.chart .grid-line { stroke: var(--line); }

/* Ranking / funil */
.rank { list-style: none; padding: 0; margin: 0; }
.rank li { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rank li:last-child { border-bottom: 0; }
.rank__pos { width: 28px; height: 28px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.rank li:first-child .rank__pos { background: var(--gold); color: #fff; }
.rank b { color: var(--navy-700); }
.funnel { display: flex; flex-direction: column; gap: 7px; }
.funnel__row { display: grid; grid-template-columns: 160px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; }
.funnel__track { height: 10px; border-radius: 6px; background: var(--bg); overflow: hidden; }
.funnel__fill { height: 100%; border-radius: 6px; background: var(--cyan); }
.funnel__row.closer .funnel__fill { background: var(--gold); }

/* Tabela */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #fafbfe; white-space: nowrap; }
tbody tr:hover { background: #f8faff; }
tbody tr:last-child td { border-bottom: 0; }
td.actions { white-space: nowrap; text-align: right; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.is-unread td { font-weight: 700; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--bg); color: var(--muted); text-transform: capitalize; }
.pill--ativo, .pill--concluido, .pill--sim { background: #e3f7ef; color: var(--ok); }
.pill--prospect, .pill--andamento, .pill--SDR { background: #e1f6fb; color: #0789a1; }
.pill--Closer, .pill--planejado { background: #fff5d9; color: #a07800; }
.pill--inativo, .pill--não { background: #fdecef; color: var(--danger); }
.thumb { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--bg); }

/* Kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: #e9edf8; border-radius: var(--radius); padding: 10px; min-height: 200px; display: flex; flex-direction: column; border-top: 3px solid var(--cyan); }
.col--closer { border-top-color: var(--gold); }
.col.is-over { background: #dce6fb; outline: 2px dashed var(--cyan); }
.col__head { padding: 4px 6px 10px; }
.col__title { font-weight: 700; font-size: 13.5px; display: flex; justify-content: space-between; gap: 6px; }
.col__meta { font-size: 11.5px; color: var(--muted); }
.col__list { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 40px; }
.lead { background: var(--surface); border-radius: 9px; padding: 11px 12px; box-shadow: 0 1px 3px rgba(16,28,90,.1); cursor: grab; border: 1px solid transparent; }
.lead:hover { border-color: var(--cyan); }
.lead.is-dragging { opacity: .5; }
.lead__company { font-weight: 700; }
.lead__row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.lead__value { color: var(--navy-700); font-weight: 700; }
.lead__move { margin-top: 8px; width: 100%; font-size: 12px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }

/* Gantt (admin) */
.gantt { overflow-x: auto; }
.gantt__grid { min-width: 700px; }
.gantt__months { display: grid; grid-template-columns: repeat(var(--cols), 1fr); border-bottom: 2px solid var(--line); margin-bottom: 10px; }
.gantt__months span { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; padding-bottom: 6px; }
.gantt__row { position: relative; height: 36px; }
.gantt__bar { position: absolute; top: 4px; height: 28px; display: flex; align-items: center; padding: 0 10px; border-radius: 6px; font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--navy-600); }
.gantt__bar.is-concluido { background: var(--ok); }
.gantt__bar.is-andamento { background: var(--cyan); }
.gantt__milestone { position: absolute; top: 6px; font-size: 12px; font-weight: 700; color: var(--navy-700); padding-left: 18px; white-space: nowrap; }
.gantt__milestone::before { content: ""; position: absolute; left: 0; top: 3px; width: 12px; height: 12px; background: var(--gold); transform: rotate(45deg); }

/* Formulários */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field--full { grid-column: 1 / -1; }
.field input, .field select, .field textarea { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font-weight: 500; font-size: 14px; }
.field textarea { resize: vertical; min-height: 90px; }
.field .is-invalid { border-color: var(--danger); }
.field__photo { display: flex; align-items: center; gap: 12px; }
.field__photo img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--bg); }
.check { flex-direction: row; align-items: center; gap: 8px; }
.content-form .card { margin-bottom: 16px; }

/* Modal */
.modal { border: 0; padding: 0; border-radius: 16px; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 30px 70px rgba(0,0,0,.3); }
.modal::backdrop { background: rgba(4,11,51,.55); }
.modal__box { display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.modal__head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal__head h2 { font-size: 17px; }
.modal__x { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal__body { padding: 20px 22px; overflow-y: auto; }
.modal__foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); background: #fafbfe; }
.modal__foot .left { margin-right: auto; }
.message-view { white-space: pre-wrap; background: var(--bg); padding: 14px; border-radius: 8px; }
.dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin-bottom: 16px; }
.dl dt { color: var(--muted); font-weight: 600; }
.dl dd { margin: 0; overflow-wrap: anywhere; }

/* Toast */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--navy-800); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 600; animation: toastIn .25s ease; max-width: 340px; }
.toast--err { background: var(--danger); }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }

/* Responsivo */
@media (max-width: 1100px) {
  .grid--kpi { grid-template-columns: repeat(2, 1fr); }
  .grid--2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 250px; z-index: 40; transform: translateX(-100%); transition: transform .25s; }
  .sidebar.is-open { transform: none; box-shadow: 20px 0 50px rgba(0,0,0,.3); }
  .header { padding: 12px 16px; }
  .header__menu { display: block; }
  #userName { display: none; }
  .content { padding: 18px 16px 50px; }
  .form-grid { grid-template-columns: 1fr; }
  .funnel__row { grid-template-columns: 110px 1fr 30px; }
  .input--search { width: 100%; }
}
@media (max-width: 480px) {
  .grid--kpi { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi__value { font-size: 19px; }
  .card { padding: 14px; }
}

/* =========================================================
   Módulos comerciais (ICS)
   ========================================================= */
:root {
  --st-prospect: #8a93b8; --st-lead: #0bb3d1; --st-quente: #f08c00; --st-reuniao: #7048e8;
  --st-proposta: #e0a800; --st-venda: #17a673; --st-perdido: #e04462;
}
.ico--box { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 3 6.5v11L12 22l9-4.5v-11zm0 2.2 6.3 3.1L12 10.5 5.7 7.3zM5 9l6 3v7.5l-6-3zm8 10.5V12l6-3v7.5z'/%3E%3C/svg%3E"); }

/* Seletor de marca no topo */
.brandsel { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.brandsel select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text); }
.brandsel.is-off { opacity: .4; }

.is-click { cursor: pointer; }
.wrap { white-space: normal; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 380px; font-size: 12.5px; color: var(--muted); }
.hint { margin: 0 0 14px; }
.subhead { font-size: 14px; margin: 20px 0 10px; }
.toolbar--end { margin: 18px 0 0; }
.empty--sm { padding: 14px 6px; }

/* Etapas do funil */
.st { color: #fff; }
.st--prospect { background: var(--st-prospect); }
.st--lead { background: var(--st-lead); }
.st--lead_quente { background: var(--st-quente); }
.st--reuniao { background: var(--st-reuniao); }
.st--proposta { background: var(--st-proposta); }
.st--venda { background: var(--st-venda); }
.st--perdido { background: var(--st-perdido); }
.st-row--prospect .funnel__fill { background: var(--st-prospect); }
.st-row--lead .funnel__fill { background: var(--st-lead); }
.st-row--lead_quente .funnel__fill { background: var(--st-quente); }
.st-row--reuniao .funnel__fill { background: var(--st-reuniao); }
.st-row--proposta .funnel__fill { background: var(--st-proposta); }
.st-row--venda .funnel__fill { background: var(--st-venda); }
.st-row--perdido .funnel__fill { background: var(--st-perdido); }
.funnel__row { grid-template-columns: 140px 1fr 56px; }
.funnel__row strong { text-align: right; }

/* Dashboard */
.grid--kpi6 { grid-template-columns: repeat(6, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid + .grid, .grid + .card, .card + .card { margin-top: 18px; }
.kpi__value { font-size: 22px; }
.kpi__sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.kpi--accent .kpi__sub { color: #a9b5e0; }
.card__title small { font-weight: 500; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bars__row { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.bars__row--compact { grid-template-columns: 40px 1fr auto; }
.bars__label { display: flex; flex-direction: column; min-width: 0; }
.bars__label strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars__track { height: 10px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.bars__fill { height: 100%; background: var(--cyan); border-radius: 6px; }
.bars__fill--alt { background: var(--navy-600); }
.bars__val { font-weight: 700; color: var(--navy-700); white-space: nowrap; }
.table-wrap--flat { box-shadow: none; border-radius: 8px; }
.table--compact th, .table--compact td { padding: 8px 10px; font-size: 13px; }
tfoot th { background: #fafbfe; color: var(--text); font-size: 12.5px; text-transform: none; letter-spacing: 0; border-top: 2px solid var(--line); }

/* Prospecção */
.dots { display: inline-flex; align-items: center; gap: 3px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--cyan); }
.dots__rep { color: var(--ok); font-size: 12px; margin-left: 4px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }

/* Pipeline por etapa */
.col--prospect { border-top-color: var(--st-prospect); }
.col--lead { border-top-color: var(--st-lead); }
.col--lead_quente { border-top-color: var(--st-quente); }
.col--reuniao { border-top-color: var(--st-reuniao); }
.col--proposta { border-top-color: var(--st-proposta); }
.col--venda { border-top-color: var(--st-venda); }
.col--perdido { border-top-color: var(--st-perdido); opacity: .85; }
.col .btn--block { margin-top: 8px; }
.kanban { grid-auto-columns: minmax(230px, 1fr); }

/* Modal largo + ficha do PDV */
.modal--wide { width: min(1080px, calc(100vw - 24px)); }
.modal__titlewrap { display: flex; flex-direction: column; gap: 2px; }
.modal__sub { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.lead-top { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.select--status { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-weight: 600; }
.tabs--modal { margin-bottom: 16px; }
.contactline { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 14px; background: var(--bg); border-radius: 10px; margin-bottom: 14px; font-size: 13px; }
.contactline a { text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.cadence-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.cadence td { vertical-align: middle; }
.cadence tr.is-done td { color: var(--muted); }
.cadence tr.is-late td { background: #fff8f0; }
.late { color: var(--danger); font-weight: 700; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; }
.daybadge { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 8px; color: #fff; font-weight: 800; font-size: 12px; background: var(--navy-600); }
.ch--email { background: var(--navy-600); }
.ch--whatsapp { background: #25a35a; }
.ch--linkedin { background: #0a66c2; }
.ch--telefone { background: var(--gold); }
.callout { padding: 14px 16px; border-radius: 10px; background: #eef6ff; border: 1px solid #d6e7fb; margin: 12px 0; }
.callout p { margin: 0 0 10px; }
.callout--ok { background: #e3f7ef; border-color: #c4ecda; }
.msg { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfe; display: flex; flex-direction: column; gap: 12px; }
.msg__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.msg__head .select { max-width: 100%; }
.msg textarea, .msg input { width: 100%; font-family: inherit; font-size: 14px; line-height: 1.5; }
.msg__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.msg__actions .spacer { flex: 1; }
.notes { margin-top: 14px; }
.notes summary { cursor: pointer; font-weight: 700; }
.notes pre { white-space: pre-wrap; font-family: inherit; font-size: 13px; background: var(--bg); padding: 12px; border-radius: 8px; margin: 8px 0 0; }
.form-grid--3 { grid-template-columns: repeat(3, 1fr); }
.items .input { width: 100%; padding: 7px 8px; min-width: 70px; }
.items td:first-child .input { min-width: 220px; }

/* Agenda */
.agenda { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.agenda > div > .card + .card { margin-top: 18px; }
.agenda-side { display: flex; flex-direction: column; gap: 18px; }
.agenda-side .card + .card { margin-top: 0; }
.agenda-group--late { border-left: 4px solid var(--danger); }
.agenda-group--today { border-left: 4px solid var(--cyan); }
.agenda-group--next { border-left: 4px solid var(--line); }
.agenda-list { list-style: none; margin: 0; padding: 0; }
.agenda-list li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.agenda-list li:last-child { border-bottom: 0; }
.agenda-list li:has(> .agenda-list__main.is-click) { grid-template-columns: 1fr auto; }
.agenda-list__main, .agenda-list__what { display: flex; flex-direction: column; min-width: 0; }
.agenda-list__main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-list__what { font-size: 13px; font-weight: 600; text-align: right; }
.routine { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.routine li { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.routine li:last-child { border-bottom: 0; }
.routine b { color: var(--navy-700); min-width: 44px; }
.routine--plain li::before { content: "•"; color: var(--cyan); font-weight: 800; }

@media (max-width: 1280px) {
  .grid--kpi6 { grid-template-columns: repeat(3, 1fr); }
  .grid--3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) {
  .agenda { grid-template-columns: 1fr; }
  .form-grid--3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .brandsel span { display: none; }
  .header__title { font-size: 16px; }
  .grid--3 { grid-template-columns: 1fr; }
  .form-grid--3 { grid-template-columns: 1fr; }
  .agenda-list li { grid-template-columns: auto 1fr; }
  .agenda-list__what { grid-column: 2; text-align: left; }
  .agenda-list li .btn { grid-column: 2; justify-self: start; }
  .modal--wide { width: calc(100vw - 12px); }
  .funnel__row { grid-template-columns: 110px 1fr 44px; }
}
@media (max-width: 480px) {
  .grid--kpi6 { grid-template-columns: 1fr 1fr; }
}
