:root {
  --brand: #6B2E5F;
  --brand-dark: #4A1F42;
  --brand-light: #F3E9EF;
  --ink: #24222A;
  --muted: #6B6774;
  --line: #E7E2E8;
  --bg: #FAF8FA;
  --card: #FFFFFF;
  --red: #C0392B; --red-bg: #FBEAE8;
  --yellow: #A9720C; --yellow-bg: #FBF1DE;
  --green: #1E7B4D; --green-bg: #E6F5EC;
  --blue: #2A5DB0; --blue-bg: #E9F0FC;
  --grey: #5C5866; --grey-bg: #EFEDF1;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); height: 100%; }
body { font-size: 14px; line-height: 1.45; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }

/* ---------- Login ---------- */
.login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--brand-dark), var(--brand) 55%, #8a4b75);
}
.login-card {
  background: #fff; width: 420px; max-width: 92vw; border-radius: 14px; padding: 36px 32px;
  box-shadow: 0 30px 60px rgba(0,0,0,.25);
}
.login-card h1 { font-size: 20px; margin: 4px 0 2px; color: var(--brand-dark); }
.login-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.login-user {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: 8px;
  text-align: left; transition: all .12s;
}
.login-user:hover { border-color: var(--brand); background: var(--brand-light); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 13px; flex: none;
}
.login-user .who { display: flex; flex-direction: column; }
.login-user .name { font-weight: 600; font-size: 13.5px; }
.login-user .role { color: var(--muted); font-size: 12px; }
.login-note { margin-top: 18px; font-size: 11.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 12px; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex: none; background: var(--brand-dark); color: #fff;
  display: flex; flex-direction: column; padding: 18px 12px;
}
.brand { font-weight: 700; font-size: 15px; letter-spacing: .04em; padding: 6px 10px 18px; color: #fff; }
.brand small { display: block; font-weight: 400; opacity: .65; font-size: 10.5px; letter-spacing: .06em; margin-top: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  color: #E9DCE4; font-size: 13.3px; margin-bottom: 2px; cursor: pointer; background: none; border: none; width: 100%; text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: #fff; color: var(--brand-dark); font-weight: 600; }
.nav-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .6; flex: none; }
.sidebar-foot { margin-top: auto; font-size: 10.5px; color: rgba(255,255,255,.55); padding: 10px; border-top: 1px solid rgba(255,255,255,.12); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px; flex: none; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 22px;
}
.topbar .crumbs { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34%; }
.topbar .user-box { display: flex; align-items: center; gap: 10px; }
.topbar .user-box .name { font-size: 13px; font-weight: 600; }
.topbar .user-box .role { font-size: 11.5px; color: var(--muted); }
.switch-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 10px; font-size: 12px; color: var(--muted);
}
.switch-btn:hover { border-color: var(--brand); color: var(--brand); }

.content { padding: 18px 22px 48px; overflow-y: auto; }
.page-title { font-size: 19px; font-weight: 700; color: var(--brand-dark); margin: 0 0 4px; }
.page-sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; max-width: 780px; }

.proto-banner {
  background: #F7F4F8; border: 1px solid var(--line); border-left: 3px solid var(--brand);
  color: var(--muted); font-size: 12px; line-height: 1.5; padding: 8px 12px;
  border-radius: 8px; margin-bottom: 12px;
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 12px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px;
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .num { font-size: 24px; font-weight: 700; color: var(--brand-dark); }
.stat .label { font-size: 12px; color: var(--muted); }
.stat.vermelho .num { color: var(--red); }
.stat.amarelo .num { color: var(--yellow); }
.stat.verde .num { color: var(--green); }

.section-title { font-size: 14.5px; font-weight: 700; margin: 18px 0 8px; color: var(--ink); }
.section-title:first-child { margin-top: 0; }
.section-divider { border: none; border-top: 2px dashed var(--line); margin: 22px 0; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge.vermelho { background: var(--red-bg); color: var(--red); }
.badge.amarelo { background: var(--yellow-bg); color: var(--yellow); }
.badge.verde { background: var(--green-bg); color: var(--green); }
.badge.azul { background: var(--blue-bg); color: var(--blue); }
.badge.cinza { background: var(--grey-bg); color: var(--grey); }

/* ---------- Tables / lists ---------- */
.vlist { display: flex; flex-direction: column; gap: 6px; }
.vrow {
  display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; transition: border-color .12s, box-shadow .12s;
}
.vrow:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(107,46,95,.08); }
.vrow .vrow-click { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; cursor: pointer; }
.vrow .av { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-light); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.vrow .main-col { flex: 1; min-width: 0; }
.vrow .vname { font-weight: 600; font-size: 13.6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vrow .vmeta { font-size: 11.8px; color: var(--muted); margin-top: 1px; }
.vrow .side-col { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--muted); flex: none; }
.vrow .side-col .kv { text-align: right; }
.vrow .side-col .kv b { display: block; color: var(--ink); font-size: 12.6px; }
.empty { color: var(--muted); font-size: 13px; padding: 18px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; }

/* ---------- Persona (IA) na lista de Visionárias ---------- */
.vrow-wrap { display: flex; flex-direction: column; }
.vrow-wrap .vrow { margin-bottom: 0; }
.persona-toggle { display: flex; justify-content: flex-end; margin-top: 4px; }
.persona-box {
  margin-top: 4px; background: #F7F1FB; border: 1px solid #d8c6e8; border-radius: 10px;
  padding: 10px 14px; font-size: 12.6px; line-height: 1.55; color: var(--ink);
}

/* ---------- Nível de carreira / atalho WhatsApp ---------- */
.nivel-pill { font-size: 10.2px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.wa-btn {
  border: 1px solid #bfe3c4; background: #EAF9EC; color: #1E7B4D; border-radius: 8px; width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0;
}
.wa-btn:hover { background: #d9f2dc; }
.kname-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 3px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tab {
  padding: 9px 14px; font-size: 13px; color: var(--muted); border: none; background: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600;
}
.tab.active { color: var(--brand-dark); border-bottom-color: var(--brand); }
.tab .count { background: var(--grey-bg); border-radius: 999px; padding: 1px 7px; font-size: 11px; margin-left: 6px; }
.tab.active .count { background: var(--brand-light); color: var(--brand-dark); }

/* ---------- Kanban (Comercial de Entrada) ---------- */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.kanban-col { width: 248px; min-width: 248px; max-width: 248px; flex: none; background: #F3F1F4; border-radius: 12px; padding: 8px; align-self: flex-start; }
.kanban-col.col-min { width: 168px; min-width: 168px; max-width: 168px; }
.kanban-col h4 { font-size: 11.6px; margin: 3px 4px 9px; color: var(--brand-dark); display: flex; align-items: center; gap: 6px; }
.kanban-col h4 .col-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-nums { display: flex; align-items: center; gap: 4px; flex: none; }
.col-count { background: #fff; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 1px 7px; font-size: 10.6px; font-weight: 700; }
.col-soma { background: var(--brand-light); color: var(--brand-dark); border-radius: 999px; padding: 1px 7px; font-size: 10.4px; font-weight: 700; white-space: nowrap; }
.col-vazio { font-size: 11px; color: var(--muted); padding: 8px 2px; text-align: center; }
.kanban-card {
  background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; margin-bottom: 6px; cursor: pointer;
  font-size: 12.6px;
}
.kanban-card:hover { border-color: var(--brand); }
.kanban-card .kname { font-weight: 600; margin-bottom: 3px; }
.kanban-card .kmeta { color: var(--muted); font-size: 11.2px; line-height: 1.45; }
.kbadges { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 5px 0; }
.kalerta { font-size: 11px; font-weight: 700; color: var(--red); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.kalerta::before { content: "▲"; font-size: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; font-size: 12.8px;
  font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--ink);
  text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.danger { color: var(--red); border-color: #eecdc7; }
.btn.danger:hover { background: var(--red-bg); }
.btn.sm { padding: 5px 10px; font-size: 11.8px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Detail / drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(30,20,28,.42); display: flex; justify-content: flex-end; z-index: 40; }
.drawer { width: 460px; max-width: 92vw; background: #fff; height: 100%; overflow-y: auto; padding: 22px 24px 40px; box-shadow: -8px 0 30px rgba(0,0,0,.15); }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.drawer-head h2 { margin: 0; font-size: 17px; color: var(--brand-dark); }
.close-x { border: none; background: none; font-size: 18px; color: var(--muted); }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.field input, .field select, .field textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; font-family: inherit;
}
.field textarea { resize: vertical; min-height: 60px; }
.kvlist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.kvlist .kv-row { display: flex; justify-content: space-between; font-size: 12.8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.kvlist .kv-row span:first-child { color: var(--muted); }
.kvlist .kv-row span:last-child { font-weight: 600; text-align: right; }

/* ---------- Visão 360 ---------- */
.v360-head { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; border-radius: 14px; padding: 20px 24px; margin-bottom: 20px; }
.v360-head .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.v360-head h1 { margin: 0 0 2px; font-size: 21px; }
.v360-head .sub { opacity: .85; font-size: 12.8px; }
.v360-metrics { display: flex; gap: 26px; margin-top: 16px; flex-wrap: wrap; }
.v360-metrics .m { min-width: 100px; }
.v360-metrics .m .n { font-size: 17px; font-weight: 700; }
.v360-metrics .m .l { font-size: 10.8px; opacity: .8; text-transform: uppercase; letter-spacing: .04em; }
.v360-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
.timeline { display: flex; flex-direction: column; }
.tl-item { position: relative; padding: 0 0 18px 22px; border-left: 2px solid var(--line); }
.tl-item:last-child { border-color: transparent; padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -6px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.tl-item .tl-date { font-size: 11px; color: var(--muted); font-weight: 600; }
.tl-item .tl-text { font-size: 13px; margin-top: 2px; }

.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 12px; border: none; background: none; padding: 0; }
.back-link:hover { color: var(--brand-dark); }

.toast {
  position: fixed; bottom: 20px; right: 20px; background: var(--brand-dark); color: #fff; padding: 11px 18px;
  border-radius: 9px; font-size: 12.8px; box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 40; max-width: 320px;
  pointer-events: none; animation: toastIn .16s ease-out;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.pill-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pill { font-size: 11px; background: var(--grey-bg); color: var(--grey); padding: 3px 9px; border-radius: 999px; }

.alert-list { display: flex; flex-direction: column; gap: 6px; }
.alert-item { display: flex; align-items: center; gap: 8px; font-size: 12.6px; padding: 8px 10px; border-radius: 8px; background: var(--red-bg); color: var(--red); }
.alert-item.amarelo { background: var(--yellow-bg); color: var(--yellow); }

.mostruario-track { display: flex; align-items: center; gap: 6px; margin: 10px 0 4px; }
.mt-step { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.mt-step.done { background: var(--brand); }
.mt-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); }

.filter-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 12px; color: var(--muted); }
.chip.active { background: var(--brand-dark); color: #fff; border-color: var(--brand-dark); }
.filtro-input {
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; font-family: inherit;
  background: #fff; color: var(--ink); min-width: 150px;
}
.filtro-input:focus { outline: none; border-color: var(--brand); }
.filtro-data { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.filtro-data input.filtro-input { min-width: 140px; }

/* ---------- Mini-dashboard (tira de indicadores por aba) ---------- */
.mini-dash { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.mini-stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 13px; min-width: 132px; flex: 1 1 132px;
}
.mini-stat .n { font-size: 17px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; line-height: 1.15; }
.mini-stat .l { font-size: 10.6px; color: var(--muted); margin-top: 3px; line-height: 1.3; }
.mini-stat .s { font-size: 10.4px; color: var(--muted); margin-top: 3px; opacity: .85; }
/* Um único destaque por faixa — é o número que a tela existe para responder. */
.mini-stat.destaque { background: var(--brand-dark); border-color: var(--brand-dark); flex: 1 1 190px; }
.mini-stat.destaque .n { color: #fff; font-size: 23px; }
.mini-stat.destaque .l, .mini-stat.destaque .s { color: rgba(255,255,255,.72); }
.mini-stat.amarelo .n { color: var(--yellow); }
.mini-stat.vermelho .n { color: var(--red); }
.mini-stat.verde .n { color: var(--green); }
.mini-stat.amarelo { border-left: 3px solid var(--yellow); }
.mini-stat.vermelho { border-left: 3px solid var(--red); }
.mini-stat.verde { border-left: 3px solid var(--green); }

.fase-header {
  font-size: 12.5px; font-weight: 700; color: var(--brand-dark); text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.fase-header span { background: var(--brand-light); color: var(--brand-dark); border-radius: 999px; padding: 1px 8px; font-size: 11px; }
.fase-soma { background: var(--brand-dark) !important; color: #fff !important; font-weight: 700; text-transform: none; letter-spacing: 0; }

/* ---------- Funil / ranking (Painel) ---------- */
.funnel { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.funnel-row { display: grid; grid-template-columns: 170px 1fr 70px; align-items: center; gap: 10px; }
.funnel-label { font-size: 12px; color: var(--muted); }
.funnel-track { background: var(--grey-bg); border-radius: 6px; height: 10px; overflow: hidden; }
.funnel-fill { background: linear-gradient(90deg, var(--brand), var(--brand-dark)); height: 100%; border-radius: 6px; }
.funnel-n { font-size: 12.5px; font-weight: 700; text-align: right; color: var(--ink); }
.funnel-n span { font-weight: 400; color: var(--muted); }

.rankbar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.rankbar-row { display: grid; grid-template-columns: 170px 1fr 90px; align-items: center; gap: 10px; }
.rankbar-label { font-size: 12px; color: var(--muted); }
.rankbar-track { background: var(--grey-bg); border-radius: 6px; height: 10px; overflow: hidden; }
.rankbar-fill { background: linear-gradient(90deg, #2A5DB0, #6B2E5F); height: 100%; border-radius: 6px; }
.rankbar-v { font-size: 12.5px; font-weight: 700; text-align: right; }

/* ---------- WhatsApp mock (Visão 360) ---------- */
.whatsapp-card { background: #ECE5DD; }
.chat-window { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 10px 4px; }
.chat-bubble-row { display: flex; }
.chat-bubble-row.mine { justify-content: flex-end; }
.chat-bubble { max-width: 78%; background: #fff; border-radius: 10px; padding: 7px 10px; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.chat-bubble.mine { background: #DCF8C6; }
.chat-text { font-size: 12.8px; }
.chat-time { font-size: 9.8px; color: var(--muted); text-align: right; margin-top: 3px; }
.chat-input-row { display: flex; gap: 8px; margin-top: 8px; }
.chat-input-row input { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-family: inherit; }

/* ---------- Assistente de IA + PDI (Visão 360) ---------- */
.ia-card b { font-size: 13.5px; }
.ia-thread { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding: 8px 2px; border-top: 1px dashed #d8c6e8; }
.ia-msg { font-size: 12.8px; line-height: 1.4; padding: 7px 10px; border-radius: 8px; max-width: 92%; }
.ia-msg.usuario { background: #EADDF5; align-self: flex-end; }
.ia-msg.ia { background: #fff; align-self: flex-start; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.ia-msg b { font-size: 11px; color: var(--muted); display: block; margin-bottom: 2px; }

/* ---------- Fechamentos mensais (Financeiro e Vendas) ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.fechamentos-table { border-collapse: collapse; width: 100%; min-width: 900px; font-size: 12.5px; }
.fechamentos-table th, .fechamentos-table td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fechamentos-table th { background: var(--brand-light); color: var(--brand-dark); font-size: 11.5px; font-weight: 700; position: sticky; top: 0; }
.fechamentos-table .col-nome { text-align: left; position: sticky; left: 0; background: #fff; font-weight: 600; cursor: pointer; z-index: 1; }
.fechamentos-table th.col-nome { background: var(--brand-light); z-index: 2; }
.fechamentos-table .col-nome:hover { color: var(--brand); }
.fechamentos-table .col-total { background: var(--brand-light); font-weight: 700; }
.fechamentos-table td.col-total { background: #F7F1FB; }
/* Valor comum fica na cor normal do texto — o verde é reservado para a venda
   de primeiro mês, senão a tabela inteira fica verde e o destaque some
   (pedido explícito: "o correto é só os números do primeiro ciclo que deve
   ficar verde escuro e em negrito, os demais ficam na cor que estava antes"). */
.fechamentos-table td.com-valor { color: var(--ink); font-weight: 600; }
.fechamentos-table tbody tr:hover td:not(.col-total) { background: #FAF7FB; }
.fechamentos-table tfoot td { border-top: 2px solid var(--line); border-bottom: none; background: var(--grey-bg); font-weight: 700; }
.fechamentos-table tfoot .col-nome { background: var(--grey-bg); }

.pdi-section { margin: 14px 0; }
.pdi-section:first-of-type { margin-top: 10px; }
.pdi-section > b { font-size: 12.6px; color: #6b3f8f; display: block; margin-bottom: 4px; }
.pdi-section p { font-size: 12.8px; line-height: 1.5; margin: 3px 0; color: var(--ink); }

/* ---------- Minimizar/maximizar coluna de kanban ---------- */
.col-toggle {
  border: none; background: transparent; color: var(--muted); cursor: pointer; padding: 2px 4px;
  border-radius: 5px; display: inline-flex; align-items: center;
}
.col-toggle:hover { background: #ffffff90; color: var(--brand-dark); }
.kanban-col.col-min { min-width: 150px; }
.col-min-alerta { font-size: 11.5px; color: var(--red); background: var(--red-bg); border-radius: 7px; padding: 6px 8px; margin-top: 2px; font-weight: 600; }
.col-min-ok { font-size: 11.5px; color: var(--muted); padding: 6px 2px; }

/* ---------- Card em atenção (acerto vencendo/vencido) ---------- */
.kanban-card.card-atencao { border-color: var(--red); background: var(--red-bg); }

/* ---------- Tabela de permissões (Gestão e Configurações) ---------- */
.perm-table { border-collapse: collapse; width: 100%; font-size: 12px; }
.perm-table th, .perm-table td { padding: 7px 10px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.perm-table th:first-child, .perm-table td:first-child { text-align: left; position: sticky; left: 0; background: #fff; }
.perm-table th { background: var(--brand-light); color: var(--brand-dark); font-size: 11px; }
.perm-table th:first-child { background: var(--brand-light); }
.perm-table input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; }

/* ---------- Formulários em grade (cadastro manual, blogueiras, etc.) ---------- */
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 4px 14px; }
.field-grid .field { margin-bottom: 8px; }

/* ---------- Formação de Liderança ---------- */
.lider-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.lider-score { font-size: 20px; font-weight: 700; color: var(--brand-dark); }
.lider-tag { font-size: 10.5px; background: var(--brand-light); color: var(--brand-dark); border-radius: 999px; padding: 2px 8px; margin-right: 4px; display: inline-block; margin-top: 4px; }

/* ---------- Marketing / Blogueiras ---------- */
.blog-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.blog-stats { display: flex; gap: 14px; margin: 6px 0; flex-wrap: wrap; }
.blog-stats .bstat { font-size: 11.5px; color: var(--muted); }
.blog-stats .bstat b { color: var(--ink); font-size: 13px; display: block; }


/* ===========================================================================
   BUSCA GLOBAL — um campo no topo que acha qualquer pessoa em qualquer setor
   =========================================================================== */
.busca-global { position: relative; flex: 1 1 auto; max-width: 420px; margin: 0 18px; }
.busca-ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; pointer-events: none; }
.busca-input {
  width: 100%; height: 34px; padding: 0 30px 0 32px; font-size: 12.8px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--ink);
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.busca-input::placeholder { color: var(--muted); }
.busca-input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(107,46,95,.10); }
.busca-limpar {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: none; background: none; color: var(--muted); cursor: pointer; font-size: 13px; line-height: 1; padding: 4px;
}
.busca-limpar:hover { color: var(--ink); }
.busca-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  box-shadow: 0 14px 36px rgba(36,34,42,.16); overflow: hidden; max-height: 380px; overflow-y: auto;
}
.busca-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 12px; border: none; background: none; cursor: pointer; border-bottom: 1px solid var(--line);
  font-family: inherit;
}
.busca-item:last-child { border-bottom: none; }
.busca-item:hover { background: var(--brand-light); }
.bi-av {
  width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700;
}
.bi-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.bi-nome { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bi-meta { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bi-onde { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; font-size: 11px; color: var(--muted); }
.bi-alerta { font-size: 10.4px; font-weight: 700; color: var(--red); }
.busca-vazio { padding: 16px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* Barras: série única, uma cor só, sem gradiente (o comprimento já é o dado) */
.funnel-fill, .rankbar-fill { background: var(--brand) !important; border-radius: 0 4px 4px 0 !important; }
.funnel-track, .rankbar-track { background: #EFEDF1; }


/* Linhas da fila de ação — a gravidade fica na borda, não em fundo colorido
   (fundo saturado em bloco grande é ruído; a borda basta para escanear). */
.vrow.row-critico { border-left: 3px solid var(--red); }
.vrow.row-atencao { border-left: 3px solid var(--yellow); }
/* Contador ao lado do título de seção — o título soma o que tem embaixo dele */
.titulo-soma {
  background: var(--brand-light); color: var(--brand-dark); border-radius: 999px;
  padding: 1px 9px; font-size: 11.5px; font-weight: 700; margin-left: 6px; vertical-align: middle;
}

/* Cards do funil de entrada seguem a mesma disciplina de largura do kanban */
.kanban-col .lead-card, .kanban-col .kanban-card { max-width: 100%; overflow-wrap: anywhere; }

/* ===========================================================================
   GRÁFICOS — marcas finas, grade recessiva, rótulo seletivo
   =========================================================================== */
.grafico { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px 10px; }
.grafico-tit { font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.graficos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.graficos-grid.um { grid-template-columns: 1fr; }
@media (max-width: 1180px) { .graficos-grid { grid-template-columns: 1fr; } }

.legenda { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.leg-item { display: inline-flex; align-items: center; gap: 6px; font-size: 11.4px; color: var(--muted); }
.leg-item i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.leg-item b { color: var(--ink); }

.col-chart { position: relative; padding-left: 46px; }
.col-grade { position: absolute; inset: 0 0 20px 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.grade-linha { border-top: 1px solid var(--line); position: relative; }
.grade-linha span {
  position: absolute; left: 0; top: -7px; transform: translateX(-100%); padding-right: 7px;
  font-size: 10px; color: var(--muted); white-space: nowrap;
}
.col-barras { position: relative; height: 100%; display: flex; align-items: flex-end; gap: 2px; padding-bottom: 20px; }
.col-slot { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.col-slot:hover .col-barra { filter: brightness(1.12); }
.col-barra { width: 100%; max-width: 24px; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; transition: filter .12s; }
.col-barra.zero { height: 0; min-height: 0; }
.col-par { display: flex; gap: 2px; align-items: flex-end; width: 100%; height: 100%; justify-content: center; }
.col-par .col-barra { max-width: 11px; }
.col-valor { font-size: 10px; font-weight: 700; color: var(--ink); margin-bottom: 3px; white-space: nowrap; }
.col-rot { position: absolute; bottom: -18px; font-size: 10px; color: var(--muted); white-space: nowrap; }

.comp-barra { display: flex; gap: 2px; height: 26px; border-radius: 6px; overflow: hidden; margin-bottom: 10px; }
.comp-seg { height: 100%; transition: filter .12s; }
.comp-seg:hover { filter: brightness(1.12); }

/* ---------- Trava do CEO: confirmação + aviso ao setor ---------- */
.overlay.overlay-centro { justify-content: center; align-items: center; z-index: 60; }
.modal-ceo {
  width: 520px; max-width: 92vw; background: #fff; border-radius: 14px; padding: 22px 24px 20px;
  box-shadow: 0 18px 50px rgba(0,0,0,.28); animation: toastIn .16s ease-out;
}
.modal-ceo-topo h3 { margin: 8px 0 0; font-size: 17.5px; color: var(--brand-dark); }
.modal-ceo-tag {
  display: inline-block; font-size: 10.6px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  background: var(--yellow-bg); color: var(--yellow); padding: 4px 9px; border-radius: 999px;
}
.modal-ceo-texto { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 10px 0 14px; }
.modal-ceo-linhas { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.modal-ceo-linhas > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 13px; font-size: 12.8px; border-bottom: 1px solid var(--line); }
.modal-ceo-linhas > div:last-child { border-bottom: none; }
.modal-ceo-linhas span { color: var(--muted); white-space: nowrap; }
.modal-ceo-linhas b { text-align: right; }
.modal-ceo-botoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.avisos-ceo { border: 1px solid #e6cfa8; background: var(--yellow-bg); border-radius: 11px; padding: 11px 14px; margin-bottom: 14px; }
.avisos-ceo-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--yellow); }
.avisos-ceo-item {
  display: flex; align-items: baseline; gap: 10px; font-size: 12.4px; color: var(--ink);
  padding: 6px 0 0; border-top: 1px dashed #e6cfa8; margin-top: 7px;
}
.avisos-ceo-item .ac-quando { color: var(--muted); font-size: 11.4px; white-space: nowrap; }
.avisos-ceo-item .ac-oque { flex: 1; }
.avisos-ceo-item .ac-setor { color: var(--muted); font-size: 11.4px; white-space: nowrap; }
.avisos-ceo-mais { font-size: 11.6px; color: var(--muted); margin-top: 6px; }

.nav-badge {
  margin-left: auto; background: var(--red); color: #fff; font-size: 10.4px; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}

/* ---------- Cargos (10.1 Permissões) ---------- */
.cargos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 8px; }
.cargo-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; }
.cargo-card > b { font-size: 13.2px; color: var(--brand-dark); }
.cargo-setores { font-size: 11.8px; color: var(--ink); margin-top: 3px; font-weight: 600; }
.cargo-desc { font-size: 11.6px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.cargo-qtd { font-size: 10.8px; color: var(--muted); margin-top: 7px; opacity: .85; }

/* ---------- 8.5 Quartas de Atitude (consulta) ---------- */
.quarta-linha { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 12.6px; }
.quarta-linha:last-child { border-bottom: none; }
.quarta-linha .kmeta { color: var(--muted); font-size: 11.2px; margin-top: 2px; }

/* ---------- Painel lateral por setor ---------- */
.pl-setor {
  font-size: 11.8px; color: var(--brand-dark); background: var(--brand-light);
  border-radius: 8px; padding: 8px 11px; margin: 12px 0 4px; line-height: 1.45;
}
.pl-vazio { font-size: 12.4px; color: var(--muted); padding: 8px 0 2px; }
.pl-leitura {
  margin-top: 14px; font-size: 12.5px; line-height: 1.55; color: var(--ink);
  background: var(--bg); border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; padding: 9px 12px;
}
.pl-motivos p { margin: 0 0 5px; font-size: 12.4px; color: var(--muted); line-height: 1.45; }
.drawer .kvlist .kv-row span:last-child { max-width: 62%; }
.drawer .alert-list { margin-top: 4px; }
.drawer .timeline .tl-item { padding-bottom: 12px; }

/* ---------- Integração WhatsApp (setor 2) ---------- */
.wa-integracao {
  display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
  background: #F1FAF2; border: 1px solid #cfe9d4; border-radius: 11px; padding: 11px 14px; margin-bottom: 12px;
}
.wa-int-status { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; }
.wa-int-status .kmeta { color: var(--muted); font-size: 11.6px; margin-top: 2px; line-height: 1.45; max-width: 680px; }
.wa-dot { width: 9px; height: 9px; border-radius: 50%; background: #1E7B4D; margin-top: 5px; flex: none; box-shadow: 0 0 0 3px #1e7b4d22; }
.wa-int-nums { display: flex; align-items: center; gap: 18px; }
.wa-int-nums > div { text-align: center; }
.wa-int-nums b { display: block; font-size: 17px; line-height: 1.1; }
.wa-int-nums span { font-size: 10.8px; color: var(--muted); }
.wa-cabecalho {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; margin: 12px 0 6px; font-size: 13px;
}
.wa-cabecalho .kmeta { color: var(--muted); font-size: 11.4px; margin-top: 2px; }
.drawer .chat-window { max-height: 340px; background: #ECE5DD; border-radius: 10px; padding: 10px; }
.config-regras { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 9px; }
.config-regras p { margin: 0 0 4px; font-size: 11.9px; color: var(--muted); line-height: 1.45; }

/* ---------- Cards de lead (setor 2) ---------- */
.kanban-card { transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease; }
.kanban-card:hover { box-shadow: 0 6px 18px rgba(36,34,42,.10); transform: translateY(-1px); }
.lead-card { padding: 10px 11px; }
.lead-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.lead-quem { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.lead-nome-col { min-width: 0; }
.lead-card .kname { font-size: 13px; font-weight: 700; margin: 0; line-height: 1.25; }
.lead-card .kmeta { font-size: 11.2px; }
.lead-corpo { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.lead-tag {
  display: inline-block; background: var(--brand-light); color: var(--brand-dark);
  border-radius: 999px; padding: 2px 8px; font-size: 10.4px; font-weight: 700;
}
.lead-extra { display: block; margin-top: 3px; color: var(--muted); font-size: 10.9px; }
.lead-tempo { color: var(--muted); font-size: 11px; }
.lead-previa {
  margin-top: 5px; font-size: 11.4px; color: var(--muted); background: var(--bg);
  border-radius: 8px; padding: 6px 8px; line-height: 1.4; max-height: 38px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* botão de WhatsApp: verde, com pulso quando há mensagem sem resposta */
.wa-btn { position: relative; transition: transform .12s ease, background .12s ease; }
.wa-btn:hover { transform: scale(1.08); }
.wa-btn.pulsando { background: #1E7B4D; color: #fff; }
.wa-btn.pulsando svg { stroke: #fff; fill: none; }
.wa-ping {
  position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--red); border: 2px solid #fff; animation: waPing 1.6s ease-out infinite;
}
@keyframes waPing { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .65; } }

/* coluna do funil com a cor da etapa */
.etapa-col { position: relative; overflow: hidden; }
.etapa-barra { position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 3px 3px 0 0; }
.etapa-col h4 { margin-top: 5px; }
.col-soma.wa-pend { background: #E6F5EC; color: #1E7B4D; display: inline-flex; align-items: center; gap: 3px; }
.col-soma.wa-pend svg { width: 11px; height: 11px; }

/* a lateral entra deslizando, em vez de aparecer seca */
.drawer { animation: drawerIn .18s cubic-bezier(.22,.61,.36,1); }
@keyframes drawerIn { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.overlay { animation: fadeIn .16s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.chip, .btn, .nav-item { transition: background .12s ease, color .12s ease, border-color .12s ease; }

/* ---------- Conversa do WhatsApp na lateral ---------- */
.wa-quem { display: flex; align-items: center; gap: 10px; }
.wa-quem .avatar { width: 30px; height: 30px; font-size: 11.5px; }
.wa-dot-mini { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #1E7B4D; margin-right: 5px; vertical-align: middle; }
.chat-dia { text-align: center; margin: 8px 0 4px; }
.chat-dia span {
  background: #ffffffcc; color: var(--muted); font-size: 10.4px; font-weight: 600;
  border-radius: 999px; padding: 3px 10px; box-shadow: 0 1px 1px rgba(0,0,0,.06);
}
.drawer .chat-bubble { animation: bolha .16s ease-out; }
@keyframes bolha { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.wa-enviar { background: #1E7B4D; border-color: #1E7B4D; }
.wa-enviar:hover { background: #17603C; border-color: #17603C; color: #fff; }
.wa-enviar svg { stroke: #fff; }
.chat-input-row input:focus { outline: none; border-color: #1E7B4D; box-shadow: 0 0 0 3px #1e7b4d1a; }
.lead-acoes { display: flex; gap: 6px; margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); }
.lead-avancar { flex: 1; justify-content: center; font-size: 11.4px; padding: 6px 8px; }
.lead-reprovar { padding: 6px 9px; font-size: 11.2px; }
.agente-sugestao {
  font-size: 11.8px; color: var(--brand-dark); background: var(--brand-light);
  border-radius: 8px; padding: 7px 10px; line-height: 1.45;
}
.pessoa-card .lead-corpo { margin-top: 7px; }
.pessoa-card .kbadges { margin: 0 0 4px; }
.card-acoes { margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); }
.card-acoes .btn { width: 100%; justify-content: center; margin-bottom: 4px; }
.card-acoes .btn:last-child { margin-bottom: 0; }
.card-acoes select { width: 100%; margin-bottom: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; font-family: inherit; }
.card-acoes .kmeta { margin-bottom: 4px; }
.drawer .chat-bubble.mine, .drawer .chat-bubble-row.mine .chat-bubble { background: #DCF8C6; }

/* ---------- IA da conversa ---------- */
.ia-conversa { margin-top: 14px; border: 1px solid #d8c6e8; background: #F9F5FC; border-radius: 11px; padding: 11px 13px; }
.ia-conversa-cab { display: flex; flex-direction: column; gap: 2px; margin-bottom: 9px; }
.ia-conversa-cab b { font-size: 12.8px; color: var(--brand-dark); }
.ia-conversa-cab span { font-size: 11px; color: var(--muted); }
.ia-atalhos { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.ia-atalhos .chip { font-size: 11px; padding: 4px 9px; background: #fff; }
.ia-atalhos .chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.ia-resposta { margin-top: 10px; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.ia-resposta-tit { font-size: 12.4px; font-weight: 700; color: var(--brand-dark); margin-bottom: 6px; }
.ia-resposta p { margin: 0 0 6px; font-size: 12.4px; line-height: 1.5; }
.ia-resposta p:last-of-type { margin-bottom: 0; }
.ia-resposta-rodape { margin-top: 8px; padding-top: 7px; border-top: 1px dashed var(--line); font-size: 10.8px; color: var(--muted); }


/* ---------- Painel lateral: leitura confortável e destaque do setor ---------- */
.drawer { width: 520px; font-size: 14px; }
.drawer-head h2 { font-size: 20px; letter-spacing: -.01em; }
.drawer .section-title { font-size: 12.4px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 20px 0 8px; }
.drawer .kvlist .kv-row { font-size: 13.6px; padding: 9px 0; }
.drawer .kvlist .kv-row span:first-child { color: var(--muted); }
.drawer .kvlist .kv-row span:last-child { font-weight: 600; }
.drawer .pl-vazio { font-size: 13.2px; }
.drawer .pl-leitura { font-size: 13.4px; line-height: 1.6; }
.drawer .pl-motivos p { font-size: 13.2px; }
.drawer .tl-item .tl-text { font-size: 13.4px; }
.drawer .tl-item .tl-date { font-size: 11.8px; }
.drawer .alert-item { font-size: 13.2px; }
.drawer .pill { font-size: 11.6px; }

.pl-setor { font-size: 12.4px; }
.pl-destaque {
  border: 1px solid var(--line); border-left: 5px solid var(--brand); background: var(--card);
  border-radius: 12px; padding: 14px 16px; margin: 14px 0 4px; display: flex; flex-direction: column; gap: 2px;
}
.pl-destaque-rot { font-size: 11.4px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.pl-destaque-valor { font-size: 25px; line-height: 1.15; letter-spacing: -.02em; color: var(--brand-dark); }
.pl-destaque-sub { font-size: 13.2px; color: var(--ink); margin-top: 3px; }
.pl-destaque-acao { font-size: 12.4px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.pl-destaque.vermelho { border-left-color: var(--red); background: var(--red-bg); }
.pl-destaque.vermelho .pl-destaque-valor { color: var(--red); }
.pl-destaque.amarelo { border-left-color: var(--yellow); background: var(--yellow-bg); }
.pl-destaque.amarelo .pl-destaque-valor { color: var(--yellow); }
.pl-destaque.verde { border-left-color: var(--green); background: var(--green-bg); }
.pl-destaque.verde .pl-destaque-valor { color: var(--green); }

/* ---------- Ficha completa da Visionária ---------- */
.ficha-head {
  position: relative; background: linear-gradient(135deg, var(--brand-dark), var(--brand) 70%, #8a4b75);
  color: #fff; border-radius: 16px; padding: 22px 24px; margin-bottom: 4px;
}
.ficha-id { display: flex; align-items: flex-start; gap: 14px; }
.ficha-id .avatar { width: 46px; height: 46px; font-size: 16px; border: 1px solid #ffffff44; }
.ficha-head h1 { margin: 0; font-size: 25px; letter-spacing: -.02em; }
.ficha-sub { font-size: 13.2px; opacity: .88; margin-top: 4px; line-height: 1.5; max-width: 90%; }
.ficha-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ficha-pills .badge { border: 1px solid #ffffff55; }
.ficha-numeros { display: flex; gap: 30px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid #ffffff2e; }
.ficha-numeros > div b { display: block; font-size: 20px; letter-spacing: -.01em; }
.ficha-numeros > div span { font-size: 10.8px; text-transform: uppercase; letter-spacing: .05em; opacity: .8; }
.ficha-saida { position: absolute; top: 20px; right: 22px; background: transparent; border-color: #ffffff55; color: #fff; }
.ficha-saida:hover { background: #ffffff1f; border-color: #fff; color: #fff; }
.ficha-saida-form { margin-top: 14px; color: var(--ink); }
.ficha-abas { margin-top: 16px; }
.ficha-abas .chip { font-size: 12.8px; padding: 7px 14px; }
.ficha-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 1180px) { .ficha-grid { grid-template-columns: 1fr; } }
.ficha-grid .kvlist .kv-row { font-size: 13.4px; padding: 8px 0; }
.ficha-grid .section-title { font-size: 12.4px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.marcos .tl-item::before { background: var(--brand); }
.marcos .tl-item.marco-entrada::before { background: var(--blue); }
.marcos .tl-item.marco-primeira-venda::before,
.marcos .tl-item.marco-nivel::before,
.marcos .tl-item.marco-recorde::before { background: var(--green); }
.marcos .tl-item.marco-pendencia::before,
.marcos .tl-item.marco-juridico::before,
.marcos .tl-item.marco-saida::before { background: var(--red); }
.marcos .tl-item.marco-retorno::before { background: var(--yellow); }
.marco-detalhe { font-size: 12.4px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.ficha-conversa { max-width: 720px; }
.ficha-conversa .chat-window { max-height: 420px; background: #ECE5DD; border-radius: 10px; padding: 12px; }

/* =============================================================================
   ACABAMENTO GERAL — mesma régua de tipografia, espaço e profundidade em todas
   as telas. Nada muda de lugar: o que muda é o conforto de leitura.
   ============================================================================= */
body { font-size: 14.5px; -webkit-font-smoothing: antialiased; }

.content { padding: 24px 28px 60px; max-width: 1680px; }
.page-title { font-size: 23px; letter-spacing: -.02em; margin-bottom: 5px; }
.page-sub { font-size: 13.6px; line-height: 1.55; margin-bottom: 16px; max-width: 860px; }
.section-title { font-size: 12.6px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 9px; }
.section-title .titulo-soma { text-transform: none; letter-spacing: 0; }

/* Cartões com profundidade discreta e reação ao passar o mouse */
.card { border-radius: 14px; padding: 15px 17px; box-shadow: 0 1px 2px rgba(36,34,42,.04); }
.grid { gap: 14px; }
.empty { font-size: 13.4px; padding: 26px 18px; border-radius: 12px; background: #fff; }

/* Topo */
.topbar { padding: 12px 28px; }
.crumbs { font-size: 13px; }
.topbar .user-box .name { font-size: 13.4px; }

/* Menu lateral */
.sidebar { width: 244px; padding: 20px 13px; }
.brand { font-size: 15.5px; padding: 6px 10px 22px; }
.nav-item { font-size: 13.8px; padding: 10px 11px; border-radius: 9px; }
.nav-item.active { box-shadow: 0 4px 14px rgba(0,0,0,.18); }

/* Filtros, campos e chips com o mesmo acabamento */
.chip { padding: 7px 13px; font-size: 12.4px; border-radius: 999px; }
.chip.active { box-shadow: 0 2px 8px rgba(74,31,66,.22); }
.filtro-input, .field input, .field select, .field textarea, .chat-input-row input {
  border-radius: 9px; font-size: 13.4px;
}
.filtro-input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(107,46,95,.12);
}
.field label { font-size: 11.4px; letter-spacing: .05em; }

/* Botões */
.btn { border-radius: 9px; font-size: 13px; padding: 9px 15px; }
.btn.sm { padding: 6px 11px; font-size: 12.2px; }
.btn.primary { box-shadow: 0 2px 8px rgba(107,46,95,.22); }

/* Listas de pessoas */
.vrow { border-radius: 12px; padding: 11px 14px; }
.vrow .vname { font-size: 14.2px; }
.vrow .vmeta { font-size: 12.2px; }
.vrow .side-col .kv b { font-size: 13.2px; }

/* Pares rótulo/valor — o padrão de leitura do sistema inteiro */
.kvlist .kv-row { font-size: 13.4px; padding: 8px 0; }
.kvlist .kv-row span:first-child { color: var(--muted); }

/* Tabelas */
.perm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.perm-table th {
  text-align: center; font-size: 11.2px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); font-weight: 700; padding: 9px 8px; border-bottom: 1px solid var(--line); background: var(--brand-light);
}
.perm-table th:first-child { text-align: left; }
.perm-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); }
.perm-table tbody tr:last-child td { border-bottom: none; }
.perm-table tbody tr:hover { background: #FBF9FC; }

/* Indicadores do topo de cada aba */
.mini-dash { gap: 10px; margin-bottom: 16px; }
.mini-stat { border-radius: 12px; padding: 11px 15px; box-shadow: 0 1px 2px rgba(36,34,42,.04); }

/* Kanban */
.kanban { gap: 14px; padding-bottom: 14px; }
.kanban-col { border-radius: 13px; }
.kanban-col h4 { font-size: 12.4px; }
.kanban-card { border-radius: 11px; font-size: 13px; }
.kanban-card .kmeta { font-size: 11.6px; }

/* Linha do tempo */
.tl-item .tl-text { font-size: 13.6px; }
.tl-item .tl-date { font-size: 11.6px; }

/* Caixa de leitura automática */
.persona-box { border-radius: 12px; }
.persona-box p { font-size: 13.4px; line-height: 1.6; }
.agente-tag {
  display: inline-flex; align-items: center; gap: 4px; font-size: 10.6px; font-weight: 700;
  background: var(--brand-light); color: var(--brand-dark); border-radius: 999px; padding: 2px 8px;
}
.agente-tag svg { width: 10px; height: 10px; }
.resolver-inc { background: #FFFBF5; border-color: #e6cfa8; }
.resolver-inc-tit { font-size: 12.8px; font-weight: 700; color: var(--yellow); margin-bottom: 4px; }
.avisos-ceo.do-sistema { border-color: #cfe0f5; background: var(--blue-bg); }
.avisos-ceo.do-sistema .avisos-ceo-cab { color: var(--blue); }
.avisos-ceo.do-sistema .avisos-ceo-item { border-top-color: #cfe0f5; }
.ac-detalhe { font-size: 11.6px; color: var(--muted); margin-top: 2px; line-height: 1.4; }

/* ---------- Perfil que o sistema atualiza a cada ciclo fechado ---------- */
.perfil-ciclo { background: linear-gradient(140deg, #F7F1FB, #FFFFFF 70%); border: 1px solid #e2d3ec; border-radius: 14px; padding: 15px 17px; }
.perfil-ciclo-cab b { display: block; font-size: 13.4px; color: var(--brand-dark); }
.perfil-ciclo-cab span { font-size: 11.6px; color: var(--muted); }
.perfil-sinais { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.sinal { font-size: 11.4px; font-weight: 700; border-radius: 999px; padding: 4px 11px; background: var(--grey-bg); color: var(--grey); }
.sinal.verde { background: var(--green-bg); color: var(--green); }
.sinal.vermelho { background: var(--red-bg); color: var(--red); }
.perfil-numeros { display: flex; gap: 22px; flex-wrap: wrap; padding-top: 11px; border-top: 1px solid #e2d3ec; }
.perfil-numeros > div b { display: block; font-size: 17px; color: var(--brand-dark); letter-spacing: -.01em; }
.perfil-numeros > div span { font-size: 10.8px; color: var(--muted); }
.perfil-janela { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.janela-ciclo { font-size: 11.2px; font-weight: 600; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 3px 9px; color: var(--ink); }
.janela-ciclo.com-pendencia { border-color: #eecdc7; background: var(--red-bg); color: var(--red); }
.perfil-pecas { margin-top: 10px; font-size: 12.2px; color: var(--muted); }

/* ---------- Controle mês a mês ---------- */
.matriz-mensal { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.matriz-mensal th {
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700;
  padding: 10px 8px; text-align: center; background: var(--brand-light); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.matriz-mensal th.mm-mes-atual { background: var(--brand); color: #fff; }
.matriz-mensal th.mm-linha-tit { text-align: left; min-width: 210px; position: sticky; left: 0; z-index: 2; }
.matriz-mensal th.mm-total { background: #efe6ee; }
.matriz-mensal td { padding: 9px 8px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.matriz-mensal tbody tr:last-child td { border-bottom: none; }
.matriz-mensal td.mm-linha-tit { text-align: left; background: #fff; position: sticky; left: 0; z-index: 1; border-right: 1px solid var(--line); }
.matriz-mensal td.mm-linha-tit b { font-size: 13px; }
.mm-dica-linha { font-size: 10.8px; color: var(--muted); margin-top: 2px; font-weight: 400; line-height: 1.35; }
.mm-celula { font-weight: 600; position: relative; }
.mm-celula.tem { cursor: pointer; }
.mm-celula.tem:hover { background: var(--brand-light); }
.mm-celula.ativa { background: var(--brand); color: #fff; }
.mm-celula.ativa .mm-qtd { background: #ffffff33; color: #fff; }
.mm-celula.verde:not(.ativa) { color: var(--green); }
.mm-celula.vermelho:not(.ativa) { color: var(--red); }
.mm-zero { color: var(--line); font-weight: 400; }
.mm-qtd {
  display: inline-block; margin-left: 5px; background: var(--grey-bg); color: var(--grey);
  border-radius: 999px; padding: 0 5px; font-size: 9.6px; font-weight: 700; vertical-align: middle;
}
.matriz-mensal td.mm-total { font-weight: 700; background: #FBF9FC; }
.matriz-mensal td.mm-total.verde { color: var(--green); }
.matriz-mensal td.mm-total.vermelho { color: var(--red); }
.mm-dica { font-size: 11.6px; color: var(--muted); align-self: center; margin-left: 4px; }
.mm-vazio { font-size: 12px; color: var(--muted); margin-top: 10px; }
.mm-detalhe { margin-top: 14px; border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; background: var(--card); }
.mm-detalhe-cab { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 10px; }
.mm-detalhe-cab b { display: block; font-size: 14px; color: var(--brand-dark); }
.mm-detalhe-cab span { font-size: 12px; color: var(--muted); }
.par-edit { display: inline-flex; align-items: center; gap: 6px; }
.par-edit input { width: 90px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 12.6px; text-align: right; font-family: inherit; }
.row-inativo { opacity: .62; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }

/* ---------- 1.6 Expansão por região ---------- */
.exp-leituras { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
@media (max-width: 1180px) { .exp-leituras { grid-template-columns: 1fr; } }
.exp-regiao { border: 1px solid var(--line); border-radius: 13px; background: var(--card); margin-bottom: 12px; overflow: hidden; box-shadow: 0 1px 2px rgba(36,34,42,.04); }
.exp-regiao-cab {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: none;
  background: var(--brand-light); padding: 12px 16px; font-size: 14px; color: var(--brand-dark); font-weight: 700;
}
.exp-regiao-cab:hover { background: #EFE2EB; }
.exp-seta { font-size: 11px; opacity: .7; }
.exp-regiao-nome { flex: 1; min-width: 0; }
.exp-regiao-nums { display: flex; align-items: center; gap: 14px; font-size: 12.4px; font-weight: 600; color: var(--ink); flex-wrap: wrap; }
.exp-regiao-nums b { font-size: 15px; }
.exp-ocupacao { background: #fff; border-radius: 999px; padding: 2px 9px; font-size: 11.6px; }
.exp-mov { color: var(--muted); font-size: 11.8px; }
.exp-devido { background: var(--red-bg); color: var(--red); border-radius: 999px; padding: 2px 9px; font-size: 11.4px; }
.exp-tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.exp-tabela th {
  font-size: 10.8px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700;
  padding: 9px 10px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FBF9FC;
}
.exp-tabela th.exp-cidade { text-align: left; min-width: 190px; }
.exp-tabela td { padding: 9px 10px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.exp-tabela tbody tr:last-child td { border-bottom: none; }
.exp-tabela tbody tr:hover { background: #FBF9FC; }
.exp-tabela tr.exp-ativa { background: var(--brand-light); }
.exp-tabela td.exp-cidade { text-align: left; font-weight: 600; }
.exp-link { border: none; background: none; padding: 0; font: inherit; color: var(--brand-dark); text-align: left; }
.exp-link:hover { text-decoration: underline; }
.exp-tabela .verde { color: var(--green); }
.exp-tabela .vermelho { color: var(--red); }
.exp-regiao-nums .verde { color: var(--green); }
.exp-regiao-nums .vermelho { color: var(--red); }
.exp-ocupacao.verde { background: var(--green-bg); color: var(--green); }
.exp-ocupacao.vermelho { background: var(--red-bg); color: var(--red); }
.exp-inativas { display: block; font-size: 10.4px; color: var(--muted); font-weight: 400; }
/* Fase inteira recolhível no CRM */
.fase-header {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: none; background: none; padding: 0 0 8px; cursor: pointer;
}
.fase-header:hover { color: var(--brand); }
.fase-seta { font-size: 11px; opacity: .7; }
.fase-toggle { margin-left: auto; opacity: .5; display: inline-flex; }
.fase-header:hover .fase-toggle { opacity: 1; }
.fase-alerta { font-size: 11px; font-weight: 700; color: var(--red); background: var(--red-bg); border-radius: 999px; padding: 2px 9px; }
.fase-group.fase-min { border-bottom: 1px dashed var(--line); padding-bottom: 6px; margin-bottom: 12px; }
.lead-mover { display: flex; align-items: center; gap: 6px; margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); }
.lead-mover label { font-size: 10.4px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; white-space: nowrap; }
.lead-mover select { flex: 1; min-width: 0; padding: 5px 7px; border: 1px solid var(--line); border-radius: 7px; font-size: 11.6px; font-family: inherit; background: #fff; }
.lead-mover select:focus { outline: none; border-color: var(--brand); }
.lead-acoes { border-top: none; padding-top: 0; margin-top: 7px; }
.card-destaques { display: flex; gap: 14px; margin: 2px 0 6px; }
.card-destaques > div { flex: 1; min-width: 0; background: var(--bg); border-radius: 8px; padding: 6px 8px; }
.card-destaques b { display: block; font-size: 12.6px; color: var(--brand-dark); line-height: 1.2; }
.card-destaques span { font-size: 10.2px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pl-acoes { display: flex; flex-direction: column; gap: 7px; }
.pl-acoes .btn { justify-content: center; }
.pl-acoes-nota { font-size: 11.6px; color: var(--muted); margin-top: 8px; line-height: 1.45; }

/* ---------- Resumo antes de desativar ---------- */
.saida-resumo { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; margin-bottom: 12px; }
.saida-resumo-tit { font-size: 11.4px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: 9px; }
.saida-numeros { display: flex; flex-wrap: wrap; gap: 8px; }
.saida-numeros > div { flex: 1 1 108px; background: var(--bg); border-radius: 9px; padding: 8px 10px; }
.saida-numeros b { display: block; font-size: 14.5px; color: var(--brand-dark); line-height: 1.2; }
.saida-numeros b.vermelho { color: var(--red); }
.saida-numeros b.verde { color: var(--green); }
.saida-numeros span { font-size: 10.2px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.saida-marcos { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); }
.saida-marcos b { font-size: 11.4px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.saida-marcos > div { font-size: 12.4px; margin-top: 4px; line-height: 1.45; }
.saida-marcos > div span { color: var(--muted); font-size: 11.2px; margin-right: 5px; }
.saida-alertas { margin-top: 10px; background: var(--red-bg); border-radius: 9px; padding: 8px 11px; }
.saida-alertas > div { font-size: 12.4px; color: var(--red); line-height: 1.45; }
.cruzamentos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 18px; }

/* ---------- Ficha cadastral (dados / formulário-quiz / observações) ---------- */
.cadastral { margin-top: 4px; }
.cadastral-topo { background: linear-gradient(140deg, #F7F1FB, #FDFBFE); border: 1px solid #e6d8ef; border-radius: 12px; padding: 13px 16px; margin-bottom: 14px; }
.cadastral-topo b { font-size: 12.6px; color: var(--brand-dark); }
.cadastral-topo p { font-size: 13px; color: var(--muted); margin: 4px 0 0; line-height: 1.5; }
.cadastral-cab { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.cadastral-cab b { display: block; font-size: 14px; color: var(--brand-dark); }
.cadastral-cab span { font-size: 12.4px; color: var(--muted); }
.cadastral-completude { text-align: right; white-space: nowrap; }
.cadastral-completude b { display: block; font-size: 21px; line-height: 1.1; color: var(--brand-dark); }
.cadastral-completude.ok b { color: var(--green); }
.cadastral-completude.meio b { color: #B77A16; }
.cadastral-completude.baixo b { color: var(--red); }
.cadastral-completude span { font-size: 10.4px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cadastral-barra { height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; margin-bottom: 16px; }
.cadastral-barra i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-dark)); border-radius: 99px; }
.cadastral-parte { margin-bottom: 18px; }
.cadastral-parte-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.cadastral-parte-cab b { font-size: 14.2px; color: var(--brand-dark); }
.cadastral-parte-cab em { display: block; font-style: normal; font-size: 12.2px; color: var(--muted); margin-top: 2px; margin-left: 30px; line-height: 1.4; }
.cadastral-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-light); color: var(--brand-dark); font-size: 11.6px; font-weight: 700; margin-right: 8px; vertical-align: middle; }
.cadastral-grupo { margin-bottom: 12px; }
.cadastral-grupo:last-child { margin-bottom: 0; }
.cadastral-grupo-titulo { font-size: 10.6px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; margin: 12px 0 7px; }
.cadastral-form .cadastral-grupo-titulo:first-child { margin-top: 0; }
.cadastral-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.cadastral-campo { background: var(--bg); border-radius: 9px; padding: 8px 11px; }
.cadastral-campo span { display: block; font-size: 10.4px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 2px; }
.cadastral-campo b { font-size: 13.6px; color: var(--text); font-weight: 600; line-height: 1.35; }
.cadastral-nota { font-size: 11.6px; color: var(--muted); margin: 10px 0 0; line-height: 1.45; }
.cadastral-falta { font-size: 12.2px; color: var(--muted); margin: 10px 0 0; padding-top: 9px; border-top: 1px dashed var(--line); line-height: 1.5; }
.cadastral-falta.critico { color: var(--red); }
.cadastral-ok { font-size: 12.2px; color: var(--green); margin: 10px 0 0; padding-top: 9px; border-top: 1px dashed var(--line); font-weight: 600; }
.cadastral-form { border-color: #d8c6e8; background: #FBF8FD; }
.cadastral-manual { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }

/* Quiz — pergunta e resposta em blocos, para a fala dela ficar destacada */
.quiz-respostas { display: flex; flex-direction: column; gap: 9px; }
.quiz-item { border-left: 3px solid var(--brand-light); padding: 2px 0 2px 11px; }
.quiz-item.vazia { border-left-color: var(--line); opacity: .6; }
.quiz-pergunta { display: block; font-size: 11.6px; color: var(--muted); margin-bottom: 3px; }
.quiz-resposta { display: block; font-size: 14px; color: var(--text); line-height: 1.45; }
.quiz-item.vazia .quiz-resposta { font-size: 12.4px; color: var(--muted); font-style: italic; }

/* Observações da Captadora — leitura de quem conversou com ela */
.obs-captadora { display: flex; flex-direction: column; gap: 11px; }
.obs-item { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.obs-topo { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.obs-meta { font-size: 11.2px; color: var(--muted); margin-left: auto; }
.obs-tag { font-size: 10.4px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 99px; background: #EDEDED; color: #555; }
.obs-tag.roxo { background: var(--brand-light); color: var(--brand-dark); }
.obs-tag.verde { background: var(--green-bg); color: var(--green); }
.obs-tag.vermelho { background: var(--red-bg); color: var(--red); }
.obs-tag.azul { background: #E6EFF7; color: #1F5C8B; }
.obs-texto { font-size: 13.6px; line-height: 1.5; }

/* Resumo curto para o painel lateral */
.cadastral-resumo { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; margin-bottom: 14px; }
.cadastral-resumo-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.cadastral-resumo-cab b { font-size: 12.6px; color: var(--brand-dark); text-transform: uppercase; letter-spacing: .05em; }
.cadastral-resumo-cab span { font-size: 11.4px; color: var(--muted); }
.cadastral-resumo-obs { margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); }
.cadastral-resumo-obs > div { font-size: 12.6px; line-height: 1.5; margin-bottom: 4px; color: var(--text); }

/* ---------- Hierarquia de menu: SETOR › GRUPO › SUBGRUPO › tela ---------- */
.nav-arvore { margin: 3px 0 12px; padding: 4px 0 6px 10px; border-left: 1px solid rgba(255,255,255,.18); margin-left: 14px; }
.nav-grupo {
  font-size: 11.4px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700;
  color: rgba(255,255,255,.7); padding: 10px 8px 5px;
}
.nav-subgrupo { font-size: 13px; font-weight: 600; color: #fff; padding: 8px 8px 4px; }
.nav-telas { display: flex; flex-direction: column; gap: 1px; padding-left: 6px; }
.nav-telas.com-subgrupo { padding-left: 16px; }
.nav-sub {
  display: block; width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  color: rgba(233,220,228,.88); font-size: 13.4px; padding: 7px 10px; border-radius: 7px; line-height: 1.35;
  font-family: inherit;
}
.nav-sub:hover { background: rgba(255,255,255,.09); color: #fff; }
.nav-sub.active { background: rgba(255,255,255,.17); color: #fff; font-weight: 600; }

/* Cabeçalho da tela — título e subtítulo com destaque, sem a fileira de chips */
.setor-head { margin-bottom: 16px; }
.setor-pai { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.setor-head .page-title { font-size: 32px; letter-spacing: -.015em; line-height: 1.15; margin-bottom: 6px; }
.setor-head .page-sub { font-size: 14.4px; line-height: 1.55; max-width: 900px; }
.setor-tela { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.setor-tela-caminho {
  display: inline-flex; align-items: center; gap: 5px; background: none; border: none; padding: 0; cursor: pointer;
  font-family: inherit; font-size: 11.8px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700;
}
.setor-tela-caminho:hover { color: var(--brand-dark); }
.setor-irmas { margin-top: 10px; }
.setor-tela-nome { font-size: 20px; font-weight: 700; color: var(--brand-dark); margin: 3px 0 0; }

/* ---------- Pagamentos: parcelas, destino e observação ---------- */
.pg-linha { border-left: 3px solid var(--brand-light); padding-left: 10px; margin-bottom: 12px; }
.pg-linha:last-of-type { margin-bottom: 8px; }

.jur-pagamentos { margin-top: 12px; background: var(--bg); border-radius: 11px; padding: 12px 14px; }
.jur-barra { height: 7px; background: #E4E4E4; border-radius: 99px; overflow: hidden; margin-bottom: 10px; }
.jur-barra i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.jur-numeros { display: flex; gap: 10px; flex-wrap: wrap; }
.jur-numeros > div { flex: 1 1 120px; background: #fff; border-radius: 9px; padding: 8px 10px; }
.jur-numeros b { display: block; font-size: 15px; color: var(--brand-dark); line-height: 1.2; }
.jur-numeros b.verde { color: var(--green); }
.jur-numeros b.vermelho { color: var(--red); }
.jur-numeros span { font-size: 10.2px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.jur-lista { margin-top: 10px; display: flex; flex-direction: column; gap: 7px; }
.jur-pg { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; background: #fff; border-radius: 9px; padding: 8px 11px; }
.jur-pg b { font-size: 13.6px; color: var(--green); margin-right: 7px; }
.jur-pg span { font-size: 11.8px; color: var(--muted); }
.jur-obs { font-size: 12.4px; color: var(--text); margin-top: 3px; line-height: 1.45; }
.jur-baixa { margin-top: 10px; background: var(--red-bg); color: var(--red); border-radius: 9px; padding: 8px 11px; font-size: 12.4px; }
.jur-nota { font-size: 11.8px; color: var(--muted); margin: 10px 0 0; line-height: 1.45; }

/* Formulários de ação abertos na lateral */
.acao-sub { font-size: 13px; color: var(--muted); margin: 8px 0 12px; line-height: 1.5; }
.acao-corpo { margin-top: 12px; }
.acao-corpo > .card { margin-top: 0; }

/* ---------- Gestão de Liderança: redes e equipes ---------- */
.rede-lista { display: flex; flex-direction: column; gap: 12px; }
.rede-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.rede-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.rede-nome { font-size: 15.5px; font-weight: 700; color: var(--brand-dark); cursor: pointer; }
.rede-nome:hover { text-decoration: underline; }
.rede-alerta { margin-top: 6px; font-size: 12.2px; color: #B77A16; background: #FDF6E7; border-radius: 8px; padding: 6px 9px; display: inline-block; }
.rede-pagar { text-align: right; white-space: nowrap; }
.rede-pagar b { display: block; font-size: 22px; color: var(--brand-dark); line-height: 1.15; }
.rede-pagar span { font-size: 10.4px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rede-pagar em { display: block; font-style: normal; font-size: 11.6px; color: var(--green); margin-top: 3px; }
.rede-numeros { display: flex; gap: 9px; flex-wrap: wrap; margin: 12px 0 10px; }
.rede-numeros > div { flex: 1 1 120px; background: var(--bg); border-radius: 9px; padding: 8px 10px; }
.rede-numeros b { display: block; font-size: 14.5px; color: var(--brand-dark); line-height: 1.2; }
.rede-numeros b.verde { color: var(--green); }
.rede-numeros b.vermelho { color: var(--red); }
.rede-numeros span { font-size: 10.2px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rede-equipe { display: flex; flex-direction: column; gap: 8px; }
.rede-membro { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 9px; padding: 9px 11px; }
.rede-membro.sem-venda { background: #FBF3F2; }
.rede-membro > div:first-child { flex: 1; min-width: 0; }
.rede-membro b { font-size: 13.6px; }
.rede-membro span { display: block; font-size: 11.6px; color: var(--muted); margin-top: 2px; }
.rede-membro-valor { text-align: right; white-space: nowrap; }
.rede-membro-valor b { font-size: 14px; color: var(--brand-dark); }
.rede-membro-valor span { font-size: 10px; text-transform: uppercase; color: var(--muted); }
.rede-total { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.rede-total span { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rede-total b { font-size: 16px; color: var(--brand-dark); }
.rede-fora { display: flex; flex-direction: column; gap: 7px; }
.rede-fora-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.rede-fora-item:last-child { border-bottom: none; }
.rede-fora-item b { font-size: 13.4px; cursor: pointer; }
.rede-fora-item span { display: block; font-size: 11.6px; color: var(--muted); }
.rede-fora-item select { padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; font-family: inherit; background: #fff; }

/* ---------- Regras de campanha e presença na Quarta ---------- */
.campanha-regras { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.apuracao { display: flex; flex-direction: column; gap: 7px; }
.apuracao-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--bg); border-radius: 9px; padding: 8px 11px; }
.apuracao-item.bateu { background: var(--green-bg); }
.apuracao-item b { font-size: 13.4px; }
.apuracao-item span { display: block; font-size: 11.6px; color: var(--muted); margin-top: 2px; }
.apuracao-valor { text-align: right; white-space: nowrap; }
.apuracao-valor b { font-size: 14px; color: var(--brand-dark); }
.apuracao-item.bateu .apuracao-valor b { color: var(--green); }
.presenca-lista { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.presenca-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 9px; border-radius: 8px; }
.presenca-item.presente { background: var(--green-bg); }
.presenca-item b { font-size: 13.4px; }
.presenca-item span { display: block; font-size: 11.4px; color: var(--muted); }

/* Editor de configuração — leitura vira campo no clique */
.par-edit { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.par-edit.editando input, .par-edit.editando select, .par-edit.editando textarea {
  padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 13px; min-width: 190px; background: #fff;
}
.par-edit.editando textarea { min-width: 260px; }
.cfg-dica { font-style: normal; font-size: 11px; color: var(--muted); width: 100%; text-align: right; }


/* Menu lateral um pouco maior — pedido explícito de aumentar a fonte */
.nav-item { font-size: 14.6px; padding: 11px 11px; }
.nav-item span b { font-size: 12.6px; }

/* ---------- Filtro de período (mês, intervalo ou tudo) ---------- */
.filtro-periodo { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; margin: 12px 0; }
.filtro-periodo .fp-modos { display: flex; gap: 6px; }
.filtro-periodo .field { margin: 0; min-width: 130px; }
.filtro-periodo .field label { font-size: 10.6px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.filtro-periodo select, .filtro-periodo input {
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 13px; background: #fff;
}
.fp-resumo { margin-left: auto; font-size: 12.4px; color: var(--muted); text-align: right; }
.fp-resumo b { display: block; font-size: 13.6px; color: var(--brand-dark); }

/* ---------- 9.2.2 Contas e formas de pagamento ---------- */
.conta-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.conta-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; }
.conta-card.inativa { background: #FAFAFA; opacity: .78; }
.conta-topo { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.conta-nome { font-size: 14.6px; font-weight: 700; color: var(--brand-dark); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.conta-obs { font-size: 12.2px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.conta-usos { text-align: right; white-space: nowrap; }
.conta-usos b { display: block; font-size: 18px; color: var(--brand-dark); line-height: 1.1; }
.conta-usos span { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.forma-lista { display: flex; flex-direction: column; gap: 8px; }
.forma-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; background: var(--bg); border-radius: 9px; }
.forma-item.inativa { opacity: .65; }
.forma-item b { font-size: 13.6px; min-width: 170px; }
.forma-item .btn { margin-left: auto; }
.forma-item .btn + .btn { margin-left: 0; }


/* Grupos do menu que expandem e retraem */
.nav-grupo-btn {
  display: flex; align-items: center; gap: 6px; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer; font-family: inherit;
}
.nav-grupo-btn:hover { color: #fff; }
.nav-grupo-seta { font-size: 9.5px; opacity: .75; }
.nav-braco { margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.12); }
.nav-arvore-filho { margin: 0; padding: 0 0 0 6px; border-left: none; }
.nav-braco-tit { font-size: 11.4px; text-transform: uppercase; letter-spacing: .07em; color: rgba(255,255,255,.78); font-weight: 700; }
.nav-arvore-filho .nav-subgrupo { font-size: 12.2px; font-weight: 600; color: rgba(255,255,255,.88); text-transform: none; letter-spacing: 0; }

/* ---------- Universidade da Líder (CRM da trilha) ---------- */
.uni-progresso { height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; margin: 8px 0 5px; }
.uni-progresso i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-dark)); }
.uni-trilha { display: flex; flex-direction: column; gap: 10px; }
.uni-passo { display: flex; gap: 11px; align-items: flex-start; padding: 9px 11px; border-radius: 10px; background: var(--bg); }
.uni-passo.feito { background: var(--green-bg); }
.uni-passo.atual { background: var(--brand-light); box-shadow: inset 0 0 0 1px #d8c6e8; }
.uni-passo-num {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--brand-dark); font-weight: 700; font-size: 12.5px;
}
.uni-passo.feito .uni-passo-num { background: var(--green); color: #fff; }
.uni-passo b { font-size: 13.6px; display: block; }
.uni-passo span { font-size: 12.2px; color: var(--muted); line-height: 1.45; }
.uni-passo-data { font-size: 11.8px; color: var(--brand-dark); margin-top: 4px; font-weight: 600; }

/* Matriz Visionárias × meses */
.matriz-pessoas .mm-linha-tit { min-width: 210px; }
.matriz-pessoas td { text-align: center; }
.mm-cel { background: none; border: none; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--brand-dark); cursor: pointer; padding: 3px 6px; border-radius: 7px; }
.mm-cel:hover { background: var(--brand-light); }
.matriz-pessoas .mm-zero { color: var(--muted); }
.matriz-pessoas .mm-ruim .mm-cel { color: var(--red); }
.matriz-pessoas tfoot td { border-top: 2px solid var(--line); background: var(--bg); }
.canal-tag { font-size: 10.4px; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: #E6EFF7; color: #1F5C8B; }
.mm-sep { display: inline-block; width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.mm-sub { display: block; font-size: 9.6px; font-weight: 400; opacity: .7; text-transform: none; letter-spacing: 0; margin-top: 1px; }

/* Tags do lead no funil (QUIZ, UP-VENDAS, CONTRATO) */
.lead-tags { display: flex; gap: 5px; flex-wrap: wrap; margin: 6px 0 2px; }
.tag-lead { font-size: 9.6px; font-weight: 800; letter-spacing: .07em; padding: 2px 7px; border-radius: 5px; background: #EDEDED; color: #555; }
.tag-lead.roxo { background: var(--brand-light); color: var(--brand-dark); }
.tag-lead.verde { background: var(--green-bg); color: var(--green); }
.tag-lead.azul { background: #E6EFF7; color: #1F5C8B; }

/* Rolagem em todo o sistema: nada fica preso fora da tela */
.content { overflow-x: auto; }
.kanban { overflow-x: auto; overflow-y: visible; }
.table-scroll { overflow-x: auto; }
.drawer { overflow-y: auto; overflow-x: hidden; }
.kanban-fases { overflow-x: auto; }
table { max-width: 100%; }
* { scrollbar-width: thin; scrollbar-color: #c9b7c4 transparent; }
*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #d3c2ce; border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #b89ead; background-clip: content-box; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.28); background-clip: content-box; }
.sidebar { overflow-y: auto; }

/* Contrato anexado */
.contrato-anexo { display: flex; align-items: flex-start; gap: 12px; background: var(--green-bg); border-radius: 10px; padding: 11px 13px; }
.contrato-icone { font-size: 20px; }
.contrato-anexo b { font-size: 13.8px; display: block; }
.contrato-anexo span { font-size: 11.8px; color: var(--muted); }
.contrato-guardado { font-size: 12px; color: var(--green); margin-top: 4px; font-weight: 600; }
.contrato-anexo .btn { margin-left: auto; }

/* Botão global de voltar */
.btn-voltar {
  display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line);
  border-radius: 9px; padding: 7px 12px; font-family: inherit; font-size: 12.8px; font-weight: 600;
  color: var(--brand-dark); cursor: pointer; margin-right: 12px; white-space: nowrap;
}
.btn-voltar:hover:not(:disabled) { background: var(--brand-light); border-color: #d8c6e8; }
.btn-voltar:disabled { opacity: .4; cursor: default; }
.topbar { display: flex; align-items: center; gap: 12px; }

/* ---------- Calendário de onboarding ---------- */
.agenda-layout { display: grid; grid-template-columns: minmax(380px, 1fr) minmax(320px, 420px); gap: 18px; align-items: start; margin-top: 14px; }
.agenda-mes { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.agenda-mes-cab { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.agenda-mes-cab b { flex: 1; font-size: 15px; color: var(--brand-dark); text-transform: capitalize; }
.agenda-grade { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.agenda-dow { text-align: center; font-size: 10.4px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding-bottom: 4px; }
.agenda-cel { min-height: 62px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; padding: 5px 6px; text-align: left; font-family: inherit; display: flex; flex-direction: column; gap: 4px; }
.agenda-cel.vazia { border: none; background: none; cursor: default; }
.agenda-cel:hover:not(.vazia) { border-color: var(--brand); }
.agenda-cel.sel { background: var(--brand-light); border-color: var(--brand); }
.agenda-cel.hoje .agenda-num { background: var(--brand-dark); color: #fff; border-radius: 50%; width: 21px; height: 21px; display: inline-flex; align-items: center; justify-content: center; }
.agenda-num { font-size: 12.4px; font-weight: 600; color: var(--text); }
.agenda-pontos { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.agenda-pontos i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); display: block; }
.agenda-pontos i.feito { background: var(--green); }
.agenda-pontos em { font-style: normal; font-size: 9.6px; color: var(--muted); }
.agenda-dia { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.agenda-dia-cab { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.agenda-dia-cab b { font-size: 15px; color: var(--brand-dark); }
.agenda-dia-cab span { font-size: 12px; color: var(--muted); }
.agenda-lista { display: flex; flex-direction: column; gap: 9px; }
.agenda-item { display: flex; gap: 11px; align-items: flex-start; background: var(--bg); border-radius: 10px; padding: 10px 11px; border-left: 3px solid var(--brand); }
.agenda-item.feito { border-left-color: var(--green); }
.agenda-hora { font-size: 14px; font-weight: 700; color: var(--brand-dark); white-space: nowrap; }
.agenda-quem { flex: 1; min-width: 0; }
.agenda-quem b { font-size: 13.6px; cursor: pointer; display: block; }
.agenda-quem b:hover { text-decoration: underline; color: var(--brand-dark); }
.agenda-quem span { display: block; font-size: 11.6px; color: var(--muted); }
.agenda-noshow { color: #B77A16 !important; font-weight: 600; }
.agenda-res.aprovada { color: var(--green) !important; font-weight: 600; }
.agenda-res.reprovada { color: var(--red) !important; font-weight: 600; }
.agenda-acoes { display: flex; flex-direction: column; gap: 5px; }
.agenda-acoes .btn { text-decoration: none; text-align: center; }

/* ---------- Relatórios ---------- */
.rel-tipos { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 10px; margin: 14px 0; }
.rel-tipo { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; cursor: pointer; font-family: inherit; }
.rel-tipo:hover { border-color: var(--brand); }
.rel-tipo.ativo { border-color: var(--brand); background: var(--brand-light); box-shadow: inset 0 0 0 1px var(--brand); }
.rel-tipo b { display: block; font-size: 13.6px; color: var(--brand-dark); margin-bottom: 3px; }
.rel-tipo span { font-size: 11.8px; color: var(--muted); line-height: 1.45; }
.rel-barra { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.rel-atalhos { display: flex; gap: 6px; }
.rel-exportar { margin-left: auto; display: flex; gap: 8px; }
.rel-corpo { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 18px; align-items: start; }
.rel-legenda { font-size: 12px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }
.rel-tabela td, .rel-tabela th { white-space: nowrap; }
@media (max-width: 1200px) { .rel-corpo, .agenda-layout { grid-template-columns: 1fr; } }

/* Painel da API oficial + mensagens automáticas */
.wa-painel { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }
.wa-painel-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.wa-linhas { display: flex; flex-direction: column; gap: 8px; }
.wa-linha { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.wa-linha.off { background: #FAFAFA; }
.wa-linha b { font-size: 13.6px; display: flex; align-items: center; gap: 7px; }
.wa-linha span { font-size: 11.6px; color: var(--muted); }
.wa-linha-dir { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.wa-msgs { display: flex; flex-direction: column; gap: 8px; }
.wa-msg { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.wa-msg.on { border-left: 3px solid var(--green); }
.wa-msg-cab { display: flex; align-items: center; gap: 8px; }
.wa-msg-cab b { font-size: 13px; flex: 1; }
.wa-msg-texto { font-size: 12.4px; color: var(--text); margin-top: 5px; line-height: 1.5; }
@media (max-width: 1200px) { .wa-painel-cols { grid-template-columns: 1fr; } }

/* =============================================================================
   QUIZ EM CAMPO ÚNICO — um texto compilado, não 5 perguntas
   ========================================================================== */
.quiz-texto {
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.62;
  color: var(--text);
  background: #FBF8FC;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  padding: 11px 13px;
}
.quiz-area {
  width: 100%;
  font: inherit;
  font-size: 13px;
  line-height: 1.6;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
  background: #fff;
  color: var(--text);
}
.quiz-area:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(138, 75, 117, .12); }
.quiz-edit-acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }

/* =============================================================================
   CALENDÁRIO — integração enxuta, legenda e gráfico por dia da semana
   ========================================================================== */
.agenda-integra { margin-bottom: 10px; }
.agenda-integra-linha {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
}
.agenda-integra-status { font-size: 12.2px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.agenda-integra-status.on { color: var(--green); }
.agenda-integra-status.off { color: var(--red); }
.agenda-integra-linha .kmeta { flex: 1; min-width: 160px; }
.agenda-integra-regras {
  margin-top: 7px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 10px;
  background: #FBF8FC; font-size: 12.4px; line-height: 1.65; color: var(--muted);
}
.link-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 12.2px; color: var(--brand); text-decoration: underline;
}
.agenda-pontos i.faltou { background: var(--red); }
.agenda-legenda { display: flex; gap: 14px; padding: 9px 4px 2px; font-size: 11.6px; color: var(--muted); }
.agenda-legenda span { display: inline-flex; align-items: center; gap: 5px; }
.agenda-legenda i.pt { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); display: block; }
.agenda-legenda i.pt.feito { background: var(--green); }
.agenda-legenda i.pt.faltou { background: var(--red); }

.agenda-proximos { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.agenda-proximos-cab { font-size: 11.4px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.agenda-prox {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  background: none; border: none; border-bottom: 1px solid var(--line);
  padding: 7px 2px; cursor: pointer; text-align: left; font: inherit;
}
.agenda-prox:last-child { border-bottom: none; }
.agenda-prox:hover { background: #FBF8FC; }
.agenda-prox b { font-size: 12.8px; }
.agenda-prox span { font-size: 12px; color: var(--muted); white-space: nowrap; }

.dsem-card { margin-bottom: 12px; }
.dsem-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.dsem-cab b { font-size: 13.4px; display: block; }
.dsem-cab .kmeta { display: block; margin-top: 2px; }
.dsem-grade { display: grid; gap: 6px; }
.dsem-linha { display: grid; grid-template-columns: 34px 1fr 46px 42px; align-items: center; gap: 10px; }
.dsem-dia { font-size: 12px; color: var(--muted); font-weight: 600; }
.dsem-barras { background: var(--grey-bg); border-radius: 999px; height: 16px; overflow: hidden; }
.dsem-marcados { background: #E7D6EE; height: 100%; border-radius: 999px; min-width: 4px; }
.dsem-compareceu { background: var(--brand); height: 100%; border-radius: 999px; }
.dsem-n { font-size: 11.6px; color: var(--muted); text-align: right; }
.dsem-taxa { font-size: 12.2px; font-weight: 700; text-align: right; }
.dsem-taxa.boa { color: var(--green); }
.dsem-taxa.media { color: var(--yellow); }
.dsem-taxa.ruim { color: var(--red); }
.dsem-taxa.vazia { color: var(--muted); font-weight: 500; }
.dsem-leitura { font-size: 12.3px; color: var(--muted); margin: 10px 0 0; line-height: 1.55; }

/* Cabeçalho de tabela com a nota do recorte (hoje × período filtrado) */
.perm-table th .th-nota { display: block; font-style: normal; font-weight: 500; font-size: 10.6px; color: var(--muted); margin-top: 2px; text-transform: none; letter-spacing: 0; }
.perm-table tfoot td { border-top: 2px solid var(--line); font-size: 12.4px; padding-top: 8px; }

/* =============================================================================
   BARRAS HORIZONTAIS + NENHUM RÓTULO CORTADO
   -----------------------------------------------------------------------------
   Pedido explícito e repetido: "quero que você atente para os títulos de
   indicadores, você está cortando e não consigo entender o que é, então quero
   que esteja todos nítidos e sem sobrepor outro nome" / "nada de letras
   sobreporem as outras, tudo tem que respeitar o seu espaço."

   Reticências são corte. Onde o nome não cabe numa linha, ele quebra em duas —
   a linha cresce, o nome aparece inteiro, e ninguém encosta em ninguém.
   ========================================================================== */
.grafico-sub { font-size: 11.6px; color: var(--muted); line-height: 1.45; margin: -6px 0 10px; }
.bh-grade { display: grid; gap: 5px; }
.bh-linha { display: grid; grid-template-columns: minmax(72px, 34%) 1fr auto; align-items: center; gap: 9px; min-height: 22px; }
.bh-rot {
  font-size: 11.8px; color: var(--text); text-align: right; line-height: 1.25;
  white-space: normal; overflow: visible; text-overflow: clip;
  overflow-wrap: anywhere; hyphens: auto; padding: 3px 0;
}
.bh-trilho { background: var(--grey-bg); border-radius: 999px; height: 15px; overflow: hidden; }
.bh-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #9A5A83, var(--brand)); }
.bh-fill.alerta { background: linear-gradient(90deg, #D89A6A, var(--yellow)); }
.bh-val { font-size: 11.8px; font-weight: 700; color: var(--brand-dark); min-width: 30px; text-align: right; }
.bh-nota { grid-column: 2 / 4; font-size: 10.6px; color: var(--muted); margin-top: -3px; }

/* Colunas em pé só sobram para rótulo curto (mês, ciclo). Ainda assim o nome
   fica dentro da própria coluna e pode usar duas linhas. */
.col-rot {
  position: absolute; bottom: -26px; left: 0; right: 0; padding: 0 2px;
  white-space: normal; overflow: visible; text-overflow: clip;
  font-size: 10px; line-height: 1.15; text-align: center; color: var(--muted);
}
.col-barras { padding-bottom: 30px; gap: 4px; }
.bi-nome, .bi-meta { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.3; }
.kanban-col h4 .col-title { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; }

/* =============================================================================
   MATRIZ DE RECORTES — vários números por linha, sem virar sopa de barras
   ========================================================================== */
.mtx { display: grid; gap: 5px; }
.mtx-cab, .mtx-linha { display: grid; grid-template-columns: minmax(70px, 1fr) repeat(var(--mtx-cols, 5), 32px); align-items: center; gap: 7px; }
.mtx-cab span { font-size: 9.6px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); text-align: center; font-weight: 700; }
.mtx-rot {
  font-size: 11.8px; color: var(--text); line-height: 1.25; padding: 3px 0;
  white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere;
}
.mtx-n { font-size: 12px; text-align: center; color: var(--muted); }
.mtx-n.forte { font-weight: 700; color: var(--brand-dark); }
.mtx-n.verde { color: var(--green); font-weight: 600; }
.mtx-n.vermelho { color: var(--red); font-weight: 600; }
.mtx-n.amarelo { color: var(--yellow); font-weight: 600; }
.mtx-barra { grid-column: 1 / -1; display: flex; height: 7px; border-radius: 999px; overflow: hidden; background: var(--grey-bg); margin: 1px 0 4px; }
.mtx-barra i { display: block; height: 100%; }
.mtx-barra i.aprov { background: var(--green); }
.mtx-barra i.reprov { background: var(--red); }
.mtx-barra i.falta { background: var(--yellow); }
.mtx-barra i.pend { background: #CDBCD6; }
.mtx-legenda { display: flex; gap: 11px; flex-wrap: wrap; margin-top: 8px; font-size: 10.4px; color: var(--muted); }
.mtx-legenda span { display: inline-flex; align-items: center; gap: 4px; }
.mtx-legenda i { width: 8px; height: 8px; border-radius: 2px; display: block; }
.mtx-legenda i.aprov { background: var(--green); }
.mtx-legenda i.reprov { background: var(--red); }
.mtx-legenda i.falta { background: var(--yellow); }
.mtx-legenda i.pend { background: #CDBCD6; }

/* Relatórios: gráficos lado a lado e tabela ocupando a largura toda */
.rel-graficos { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin-bottom: 12px; }
.rel-grafico { min-width: 0; }
.rel-tabela th { white-space: nowrap; }
.rel-tabela td { white-space: normal; }
.rel-tabela td:first-child, .rel-tabela td:nth-child(2) { white-space: nowrap; }
.rel-grupo td { background: var(--brand-light); font-weight: 700; color: var(--brand-dark); text-align: left; font-size: 11.6px; text-transform: uppercase; letter-spacing: .05em; }

/* Número da tela no título — pedido explícito: "pode usar essa configuração de
   título do relatório para o resto do sistema, assim ficou melhor". Os números
   saíram do MENU (que ficou limpo) e vivem aqui, onde ajudam a localizar. */
.setor-tela-num { color: var(--brand); font-weight: 800; margin-right: 9px; }

/* =============================================================================
   PAINEL DO LEAD — resumo compacto, aprovação em passos e trilha
   -----------------------------------------------------------------------------
   Pedido explícito: "quero que seja mais simplificado a interface, mas sem
   perder a funcionalidade... bonito e sem poluição visual, sem informações
   desnecessárias para cada setor" e "se quiser explicar cada campo, não precisa
   ficar explícito: quando segurar o cursor em cima do título, aparece a
   explicação". Por isso as explicações viraram `title` (aparecem no hover) e o
   pontilhado embaixo do rótulo avisa que existe explicação ali.
   ========================================================================== */
.lead-resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 8px; margin: 4px 0 12px; }
.lead-resumo-item {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: help;
}
.lead-resumo-item.larga { grid-column: 1 / -1; }
.lead-resumo-item span {
  display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  font-weight: 700; border-bottom: 1px dotted var(--line); padding-bottom: 3px; margin-bottom: 4px;
}
.lead-resumo-item b { font-size: 13.4px; color: var(--ink); line-height: 1.25; }
.lead-resumo-item b.verde { color: var(--green); }
.lead-resumo-item b.amarelo { color: var(--yellow); }
.lead-resumo-item b.vermelho { color: var(--red); }

/* Títulos com explicação escondida: o pontilhado é a única pista visual. */
.section-title[title], .lead-resumo-item[title] b, .aprov-cab b[title] { cursor: help; }
.section-title[title] { border-bottom: 1px dotted transparent; }
.section-title[title]:hover { border-bottom-color: var(--line); }

.aprov-passo { border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; margin-bottom: 9px; background: #fff; }
.aprov-passo.ativo { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand-light); }
.aprov-passo.feito { border-color: #cfe6d8; background: #FBFDFC; }
.aprov-passo.travado { opacity: .62; background: var(--bg); }
.aprov-cab { display: flex; align-items: center; gap: 9px; }
.aprov-cab b { font-size: 13.4px; color: var(--ink); }
.aprov-num {
  width: 21px; height: 21px; border-radius: 50%; flex: none; display: inline-flex;
  align-items: center; justify-content: center; font-size: 11.5px; font-weight: 800;
  background: var(--brand); color: #fff;
}
.aprov-passo.feito .aprov-num { background: var(--green); }
.aprov-passo.travado .aprov-num { background: var(--grey); }
.aprov-travado { font-size: 12.2px; color: var(--muted); margin: 7px 0 0; }
.btn.bloco { width: 100%; justify-content: center; margin-top: 4px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.tl-item.manual .tl-text { border-left: 2px solid var(--brand-light); padding-left: 8px; }

/* Bloco dobrável — o que não é a ação principal da etapa fica guardado */
.bloco-dobra { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }
.bloco-dobra-cab {
  display: flex; align-items: center; gap: 7px; width: 100%; background: none; border: none; padding: 2px 0;
  cursor: pointer; font: inherit; font-size: 11.6px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted); text-align: left;
}
.bloco-dobra-cab:hover { color: var(--brand-dark); }
.bloco-dobra-seta { font-size: 10px; }
.bloco-dobra-corpo { margin-top: 8px; }
.onb-presenca { margin-top: 11px; background: #FBF8FC; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.onb-presenca.veio { background: var(--green-bg); border-color: #cfe6d8; }
.onb-presenca.faltou { background: var(--yellow-bg); border-color: #ecdcbc; }
.onb-presenca b { font-size: 12.6px; color: var(--ink); cursor: help; }
.onb-nota { display: block; font-size: 11.8px; color: var(--muted); margin-top: 7px; }
.onb-resultado { margin-top: 10px; }
.onb-resultado b { font-size: 12.6px; color: var(--ink); cursor: help; }
.onb-msg { border-left: 2px solid var(--brand-light); padding-left: 9px; margin-bottom: 8px; }
.onb-msg b { display: block; font-size: 11.2px; color: var(--muted); }
.onb-msg div { font-size: 12.8px; margin-top: 2px; }

/* Base de dados: CPF sob o nome e destaque de quem saiu devendo */
.base-cpf { font-size: 10.6px; color: var(--muted); margin-top: 2px; }
.pill.vermelho { background: var(--red-bg); color: var(--red); }

/* Linhas no tempo — entradas × saídas, mês a mês */
.lt-svg { width: 100%; display: block; margin-top: 4px; overflow: visible; }
.lt-grade { stroke: var(--line); stroke-width: .6; vector-effect: non-scaling-stroke; }
.lt-eixo, .lt-mes { font-size: 6px; fill: var(--muted); font-family: inherit; }
.lt-linha { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.lt-ponto { stroke: #fff; stroke-width: .8; vector-effect: non-scaling-stroke; }
.lt-legenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.4px; color: var(--muted); margin-bottom: 2px; }
.lt-legenda span { display: inline-flex; align-items: center; gap: 5px; }
.lt-legenda i { width: 14px; height: 3px; border-radius: 2px; display: block; }

/* =============================================================================
   ROLAGEM DE VERDADE — pedido explícito, e que tinha ficado pela metade:
   "barra de rolagem horizontal e vertical em todo o sistema, não só aqui".
   -----------------------------------------------------------------------------
   O que faltava: o `.shell` usava `min-height: 100vh`, então ele crescia junto
   com o conteúdo e quem rolava era a PÁGINA inteira. Com isso o `overflow` do
   `.content` nunca entrava em ação, a barra estilizada não aparecia, e a
   sidebar e o topo subiam junto com o conteúdo.
   Agora o shell tem a altura exata da tela: a sidebar rola sozinha, o topo
   fica parado e a área de conteúdo tem as suas duas barras, vertical e
   horizontal, aparecendo só quando fazem falta.
   ========================================================================== */
.shell { height: 100vh; min-height: 100vh; overflow: hidden; }
.main { min-height: 0; min-width: 0; }
.content { flex: 1; min-height: 0; overflow: auto; }
.sidebar { overflow-y: auto; overflow-x: hidden; }
.topbar { flex: none; }

/* Nada de conteúdo cortado sem saída: a coluna do kanban deixa o texto quebrar
   em vez de escondê-lo, e a prévia da conversa mostra o texto inteiro no hover. */
.etapa-col { overflow: visible; }
.kanban-col { min-width: 0; }
.kanban-col .lead-card, .kanban-col .kanban-card { overflow-wrap: anywhere; word-break: break-word; }
.lead-previa { cursor: help; }

/* =============================================================================
   PALETA DOS GRÁFICOS — validada, não escolhida no olho
   -----------------------------------------------------------------------------
   Rodei as cores no validador de paletas (mesma checagem que se usa para
   daltonismo) e a combinação antiga reprovava: o amarelo e o vermelho ficavam
   com separação 13,3 — abaixo do piso de 15, ou seja, difíceis de distinguir
   ATÉ com visão normal — e o lilás de "ainda vai acontecer" lia como cinza,
   com contraste 1,74 contra o fundo.
   Esta combinação passa em tudo: faixa de luminosidade, piso de croma,
   separação sob daltonismo e contraste.
   Verde × vermelho fica na faixa 6–8 sob deuteranopia, que só é aceitável com
   uma segunda pista além da cor — por isso as linhas do gráfico têm traço
   diferente e nome escrito na ponta, e a matriz traz o número ao lado de cada
   cor. Cor nunca é a única informação.
   ========================================================================== */
:root {
  --viz-verde: #1E7B4D;      /* entrou · aprovou */
  --viz-vermelho: #C0392B;   /* saiu · reprovou */
  --viz-ambar: #C98F06;      /* faltou */
  --viz-roxo: #6F52A3;       /* ainda vai acontecer */
}
.mtx-barra i.aprov { background: var(--viz-verde); }
.mtx-barra i.reprov { background: var(--viz-vermelho); }
.mtx-barra i.falta { background: var(--viz-ambar); }
.mtx-barra i.pend { background: var(--viz-roxo); }
.mtx-legenda i.aprov { background: var(--viz-verde); }
.mtx-legenda i.reprov { background: var(--viz-vermelho); }
.mtx-legenda i.falta { background: var(--viz-ambar); }
.mtx-legenda i.pend { background: var(--viz-roxo); }
/* Um respiro de 2px entre segmentos vizinhos: sem ele, duas faixas de cor
   parecida viram uma só mancha. */
.mtx-barra i + i { box-shadow: -2px 0 0 0 var(--card); }
.lt-rotulo { font-size: 10px; fill: var(--muted); font-family: inherit; font-weight: 700; }

/* =============================================================================
   4.2.1 FLUXO DE ENVIO — a tela dividida ao meio
   -----------------------------------------------------------------------------
   Pedido explícito, desenhado na tela: as duas filas (Aguardando envio e
   Mostruário a caminho) passam a conviver na mesma tela, cada uma com metade da
   largura, e os cards se organizam em grade DENTRO da metade — é assim que cabe
   mais gente sem barra de rolagem horizontal. Em tela estreita as metades
   empilham sozinhas, em vez de forçar rolagem lateral.
   ========================================================================== */
.kanban-metades {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 14px;
  margin-top: 12px;
  overflow-x: visible;
}
.kanban-metades .kanban-col,
.kanban-col.col-larga { width: auto; min-width: 0; max-width: none; padding: 10px; }
.kanban-metades .kanban-col.col-min { width: auto; min-width: 0; max-width: none; }
.col-cards { display: block; }
.col-larga .col-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 8px;
  align-items: start;
}
.col-larga .col-cards .col-vazio { grid-column: 1 / -1; }

/* Indicadores ACIMA do título da coluna — "os indicadores podem ficar acima de
   cada título para facilitar o entendimento". */
.col-indicadores { display: flex; gap: 6px; margin: 6px 2px 8px; flex-wrap: wrap; }
.col-ind {
  flex: 1 1 auto; min-width: 78px;
  background: var(--card); border: 1px solid var(--line); border-radius: 9px;
  padding: 6px 8px; line-height: 1.25;
}
.col-ind b { display: block; font-size: 15px; color: var(--brand-dark); }
.col-ind span { display: block; font-size: 10.4px; color: var(--muted); }
.col-ind.vermelho { border-color: var(--red); background: var(--red-bg); }
.col-ind.vermelho b { color: var(--red); }
.col-ind.verde { border-color: #BFE0CD; }
.col-ind.verde b { color: var(--green); }

/* O contador de dias no card: é ele que justifica a cor vermelha. */
.envio-contador {
  display: flex; align-items: baseline; gap: 6px;
  background: #F3F1F4; border-radius: 8px; padding: 5px 8px; margin-bottom: 5px;
}
.envio-contador b { font-size: 14px; color: var(--brand-dark); }
.envio-contador span { font-size: 10.6px; color: var(--muted); }
.envio-contador.estourou { background: var(--red-bg); }
.envio-contador.estourou b { color: var(--red); }
.envio-contador.estourou span { color: var(--red); }

/* Chamada de atenção do setor: só aparece com algo concreto para apontar. */
.insight-setor {
  border: 1px solid var(--line); border-left: 3px solid var(--brand);
  background: var(--card); border-radius: 10px;
  padding: 10px 13px; margin: 10px 0 12px; font-size: 12.8px;
}
.insight-setor.grave { border-left-color: var(--red); background: var(--red-bg); }
.insight-setor.ok { border-left-color: var(--green); font-size: 12.5px; color: var(--muted); }
.insight-setor.ok b { color: var(--text); }
.insight-tit { font-weight: 700; font-size: 11.6px; text-transform: uppercase; letter-spacing: .04em; color: var(--brand-dark); margin-bottom: 6px; }
.insight-setor.grave .insight-tit { color: var(--red); }
.insight-setor ul { margin: 0; padding-left: 17px; }
.insight-setor li { margin: 3px 0; line-height: 1.5; }

/* =============================================================================
   ROLAGEM — AUDITORIA GERAL DO SISTEMA
   -----------------------------------------------------------------------------
   Pedido explícito: "dê uma analisada geral no sistema e ajuste o scroll dele,
   quanto na vertical, quanto na horizontal, em todo lugar que for necessário".
   A causa raiz dos vazamentos era sempre a mesma: uma faixa de grade (ou um
   item de flex) não pode encolher abaixo do conteúdo dela por padrão, então uma
   tabela larga dentro de meia tela ESTICAVA a metade e empurrava a tela inteira
   para o lado. Liberando o encolhimento, o conteúdo largo volta a rolar dentro
   do próprio bloco — que é onde a barra deve estar.
   ========================================================================== */
.grid > *, .graficos-grid > *, .rel-graficos > *, .v360-grid > *, .ficha-grid > *,
.exp-leituras > *, .wa-painel-cols > *, .rel-corpo > *, .agenda-layout > *,
.cruzamentos > *, .rel-tipos > *, .cargos-grid > *, .conta-lista > *,
.lead-resumo > *, .field-grid > *, .cadastral-campos > *,
[style*="display:grid"] > *, [style*="display: grid"] > * { min-width: 0; }

.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.graficos-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.graficos-grid.um { grid-template-columns: minmax(0, 1fr); }
.exp-leituras, .wa-painel-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1180px) { .graficos-grid, .exp-leituras { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1200px) { .wa-painel-cols { grid-template-columns: minmax(0, 1fr); } }

/* A barra fica no bloco largo, nunca na tela: quem tem tabela ou kanban dentro
   rola sozinho e nunca passa da largura do pai. */
.table-scroll { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.card.table-scroll { max-width: 100%; }
.kanban, .kanban-fases { max-width: 100%; }

/* Vertical: a barra é uma só, a da área de conteúdo. Painel lateral e menu
   rolam por conta própria, sem criar uma segunda barra dentro deles. */
.drawer { display: flex; flex-direction: column; }
.drawer-corpo, .drawer-body { min-height: 0; }

/* =============================================================================
   PAPEL NA REDE — LÍDER E SUPERVISORA, E O CARD DE OURO
   -----------------------------------------------------------------------------
   Pedido explícito: "adicione no card da Visionária, se ela for Líder /
   Supervisora (...) a gente pode colocar a cor do card em uma cor diferente,
   às vezes um card na cor de ouro, algo que destaque ela das demais."
   O ouro fica na moldura e numa faixa no topo — e não no fundo inteiro, senão
   o texto perde contraste e a lista fica cansativa de ler.
   ========================================================================== */
.rede-pill {
  font-size: 10.2px; font-weight: 800; padding: 2px 8px; border-radius: 999px;
  white-space: nowrap; letter-spacing: .01em;
}
.rede-pill.lider { background: #FBF1D6; color: #7A5B0B; border: 1px solid #E3C765; }
.rede-pill.supervisora { background: #EFE7FA; color: #533C86; border: 1px solid #C4B0E4; }

.kanban-card.card-ouro,
.lead-card.card-ouro {
  border-color: #E3C765;
  box-shadow: 0 0 0 1px #F2E3B0 inset, 0 2px 10px rgba(180, 145, 40, .10);
  background: linear-gradient(180deg, #FFFBEF 0%, var(--card) 46%);
}
.kanban-card.card-ouro::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  border-radius: 11px 11px 0 0;
  background: linear-gradient(90deg, #C9A227, #EBD07A, #C9A227);
}
.kanban-card.card-ouro { position: relative; padding-top: 12px; }
/* Crítica E de ouro: a borda vermelha manda (é ela que pede ação), mas a faixa
   dourada continua no topo, então as duas leituras convivem. */
.kanban-card.card-ouro.card-atencao {
  border-color: var(--red);
  background: linear-gradient(180deg, #FFF7E6 0%, var(--red-bg) 46%);
}

/* Confirmação do nível de carreira na postagem da devolução. */
.nivel-escolha { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 7px; margin-top: 3px; }
.nivel-op {
  display: block; cursor: pointer; text-align: center;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px; background: var(--card);
}
.nivel-op input { display: block; margin: 0 auto 4px; accent-color: var(--nv, var(--brand)); }
.nivel-op-nome { display: block; font-size: 12.2px; font-weight: 700; color: var(--nv, var(--text)); }
.nivel-op-min { display: block; font-size: 10.2px; color: var(--muted); margin-top: 1px; }
.nivel-op:has(input:checked) { border-color: var(--nv, var(--brand)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--nv, #8A4B75) 18%, transparent) inset; }
.nivel-op.sugerido .nivel-op-min::after { content: " · sugerido"; }
.nivel-dica { font-size: 11.4px; color: var(--muted); margin: 7px 0 0; line-height: 1.5; }

/* Linha de marcação (checkbox + explicação ao lado) — usada no cadastro. */
.check-linha { display: flex; gap: 9px; align-items: flex-start; font-size: 12.4px; line-height: 1.5; cursor: pointer; }
.check-linha input { margin-top: 2px; flex: none; accent-color: var(--brand); }

/* =============================================================================
   AJUSTES DA TELA 5.2.2 (FECHAMENTOS MENSAIS)
   -----------------------------------------------------------------------------
   Três pedidos marcados na tela: o ano em forma de lista, o gráfico das vendas
   de primeiro ciclo por mês, e a venda de primeiro mês em verde escuro e
   negrito na grade.
   ========================================================================== */
/* Ano como lista dentro da fileira de filtros. */
.filter-row .field-inline { display: flex; align-items: center; gap: 7px; margin: 0; }
.filter-row .field-inline label {
  margin: 0; font-size: 10.6px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); white-space: nowrap;
}
.filter-row .field-inline select { min-width: 92px; }

/* A contagem embaixo de cada mês — é ela que substitui o segundo eixo.
   O rótulo do mês fica na primeira linha e a contagem na segunda, com folga
   entre as duas: encostar uma na outra é justamente o "embolado" que já foi
   cobrado antes. */
.col-mes .col-barras { padding-bottom: 46px; }
.col-mes .col-rot { bottom: -20px; }
.col-sub {
  position: absolute; bottom: -42px; font-size: 10.4px; font-weight: 700;
  color: var(--brand-dark); background: var(--brand-light);
  border-radius: 999px; padding: 1px 7px; min-width: 18px; text-align: center;
  line-height: 1.35;
}
.col-sub.vazio { color: var(--muted); background: transparent; font-weight: 400; }
.col-legenda-sub { font-size: 10.8px; color: var(--muted); margin-top: 4px; }

/* Venda de primeiro mês: verde escuro e negrito. */
.fechamentos-table td.com-valor.primeiro-mes { color: var(--viz-verde); font-weight: 800; }
.legenda-pm { color: var(--viz-verde); }

/* Atalhos de data na marcação do acerto. */
.acerto-atalhos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* =============================================================================
   MONTAGEM DO MOSTRUÁRIO — resumo no card e painel lateral
   -----------------------------------------------------------------------------
   Pedido explícito: o bloco "preferências, peças e conversa" saiu de dentro do
   card (onde três assuntos diferentes se empilhavam numa coluna de 240px, sem
   hierarquia) e virou uma lateral com quatro blocos numerados, na ordem em que
   quem monta precisa deles.
   ========================================================================== */
.mont-resumo { margin-top: 5px; border-top: 1px dashed var(--line); padding-top: 5px; }
.mont-linha { display: flex; justify-content: space-between; gap: 8px; font-size: 11.4px; line-height: 1.5; }
.mont-linha span { color: var(--muted); flex: none; }
.mont-linha b { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.mont-linha b.falta { color: var(--muted); font-weight: 500; font-style: italic; }

.mont-passo { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; background: var(--card); }
.mont-passo-cab { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.mont-passo-cab b { font-size: 13.5px; }
.mont-num {
  flex: none; width: 21px; height: 21px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.mont-tag {
  margin-left: auto; font-size: 10.4px; font-weight: 700; color: var(--brand-dark);
  background: var(--brand-light); border-radius: 999px; padding: 2px 8px;
}

/* O pedido dela, em bloco de citação: é a frase que manda na montagem. */
.mont-pedido {
  margin: 0; padding: 9px 12px; border-left: 3px solid var(--brand);
  background: var(--brand-light); border-radius: 0 8px 8px 0;
  font-size: 13.5px; line-height: 1.55; white-space: pre-wrap;
}
.mont-fonte { font-size: 11.2px; color: var(--muted); margin-top: 6px; }
.mont-dica { font-size: 11.6px; color: var(--muted); margin: 0 0 8px; line-height: 1.5; }
.mont-vazio { font-size: 12.6px; color: var(--muted); line-height: 1.55; }

.mont-anterior { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 9px; }
.mont-anterior-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mont-anterior-cab span { font-size: 11.4px; font-weight: 700; color: var(--muted); }
.mont-anterior ul, .mont-jaseparado ul { margin: 6px 0 0; padding-left: 18px; }
.mont-anterior li, .mont-jaseparado li { font-size: 12.6px; line-height: 1.6; }
.mont-jaseparado {
  background: var(--green-bg); border-radius: 9px; padding: 9px 12px; margin-bottom: 10px;
}
.mont-jaseparado > b { font-size: 11.6px; color: var(--green); }

/* Tempo de casa em frente ao nome, no cadastro (pedido explícito: "no cadastro,
   quero que apareça em frente ao nome da visionária, quanto tempo de empresa
   ela tem"). Fica em pílula neutra para não competir com o nível de carreira. */
.tempo-casa {
  font-size: 10.2px; font-weight: 700; white-space: nowrap;
  color: var(--muted); background: var(--grey-bg);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px;
}

/* Tag de remarcação do acerto: quantas vezes e por quê, direto no card. */
.tag-remarcado {
  display: block; margin: 4px 0 2px; padding: 4px 8px;
  background: var(--yellow-bg, #FDF3E0); border-radius: 7px;
  border-left: 3px solid var(--yellow, #C98F06);
}
.tag-remarcado b { display: block; font-size: 10.8px; color: #8A6205; }
.tag-remarcado span { display: block; font-size: 11px; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.tag-remarcado.grave { background: var(--red-bg); border-left-color: var(--red); }
.tag-remarcado.grave b { color: var(--red); }

/* =============================================================================
   COMO FOI PAGO — linha simples, detalhe sob demanda
   -----------------------------------------------------------------------------
   Pedido explícito: depois de inserir, o pagamento aparece como "valor pago /
   modo de pagamento"; clicar abre o detalhe; editar reabre o formulário. Antes
   ficavam quatro campos abertos POR FORMA, e três formas viravam quinze campos
   na tela ao mesmo tempo.
   ========================================================================== */
.pg-bloco { margin-bottom: 10px; }
.pg-cab {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  margin-bottom: 7px;
}
.pg-cab span {
  font-size: 10.6px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted);
}
.pg-cab b { font-size: 12.6px; color: var(--brand-dark); }
.pg-cab b.vazio { color: var(--muted); font-weight: 500; font-style: italic; }

.pg-lista { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.pg-item { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--card); }
.pg-item.aberta { border-color: var(--brand); }
.pg-item-topo {
  width: 100%; display: flex; align-items: baseline; gap: 10px;
  background: none; border: 0; cursor: pointer; text-align: left;
  padding: 9px 12px; font: inherit;
}
.pg-item-topo:hover { background: var(--brand-light); }
.pg-item-valor { font-size: 14px; font-weight: 700; color: var(--ink); flex: none; }
.pg-item-modo { font-size: 12.4px; color: var(--muted); flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pg-item-seta { color: var(--muted); font-size: 11px; flex: none; }
.pg-item-detalhe { padding: 2px 12px 10px; border-top: 1px dashed var(--line); }
.pg-item-detalhe .kv-row { padding: 5px 0; font-size: 12.4px; }
.pg-item-acoes { display: flex; gap: 6px; margin-top: 8px; }

.pg-form { border: 1px solid var(--brand); border-radius: 10px; padding: 11px 12px; background: #FBF8FD; }
.pg-form-tit {
  font-size: 10.6px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--brand-dark); margin-bottom: 8px;
}
.pg-form-acoes { display: flex; gap: 7px; margin-top: 4px; }

/* O saldo do acerto: é o número que decide se dá para confirmar. */
.af-saldo {
  font-size: 13px; font-weight: 700; padding: 8px 12px; border-radius: 9px;
}
.af-saldo.falta { color: var(--red); background: var(--red-bg); }
.af-saldo.ok { color: var(--green); background: var(--green-bg); }

/* =============================================================================
   CONFIRMAÇÃO DO CANAL — o último passo do acerto
   -----------------------------------------------------------------------------
   Correção dela: escolher o canal no select não basta; depois de "Confirmar
   acerto" é preciso confirmar EM QUE CANAL ela entra, porque é isso que manda o
   próximo mostruário para uma fila ou outra da Montagem.
   ========================================================================== */
.confirma-canal { border-color: var(--brand); }
.confirma-tit { font-size: 15px; font-weight: 700; color: var(--brand-dark); }
.confirma-sub { font-size: 12.6px; color: var(--muted); margin: 5px 0 12px; line-height: 1.55; }
.confirma-canal-box {
  border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: 10px; padding: 11px 13px; background: var(--brand-light);
}
.confirma-canal-box.mudou { border-left-color: var(--yellow); background: var(--yellow-bg); }
.confirma-rot {
  display: block; font-size: 10.4px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted);
}
.confirma-valor { display: block; font-size: 19px; color: var(--brand-dark); margin: 2px 0 3px; }
.confirma-desc { display: block; font-size: 12.4px; color: var(--muted); line-height: 1.5; }
.confirma-fila { display: block; font-size: 12.4px; margin-top: 7px; }
.confirma-mudou { display: block; font-size: 12.4px; margin-top: 7px; color: #8A6205; }
.confirma-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* =============================================================================
   COLUNA MINIMIZADA — cabeçalho empilhado, nada por cima de nada
   -----------------------------------------------------------------------------
   Correção dela: "quando minimiza os kanbans, está acontecendo de imagem
   sobrepor a outra."
   A causa: o cabeçalho é uma linha flex (título | números | botão). Numa coluna
   de 168px o título quebra em duas ou três linhas, cresce para os lados e passa
   POR BAIXO das pílulas de contagem e valor — que continuam ancoradas à
   direita. Minimizada, a coluna tem largura demais de menos para essa disputa.
   A saída é não disputar: o título ganha a primeira linha inteira e os números
   descem para a linha de baixo, com o botão fixo no canto.
   ========================================================================== */
.kanban-col.col-min { width: 186px; min-width: 186px; max-width: 186px; }
.kanban-col.col-min h4 {
  display: block; position: relative;
  padding-right: 22px; margin-bottom: 8px;
}
.kanban-col.col-min h4 .col-title {
  display: block; white-space: normal; overflow: visible; text-overflow: clip;
  overflow-wrap: anywhere; line-height: 1.3; margin-bottom: 5px;
}
.kanban-col.col-min .col-nums {
  display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-start;
}
.kanban-col.col-min .col-toggle { position: absolute; top: -1px; right: -2px; }
/* Nas metades (Fluxo de envio) a coluna minimizada acompanha a metade. */
.kanban-metades .kanban-col.col-min { width: auto; min-width: 0; max-width: none; }

/* =============================================================================
   FORMULÁRIO DE PAGAMENTO — os mesmos campos, compactos, em todo o sistema
   -----------------------------------------------------------------------------
   Correção dela: "o modo de pagamento já substitui o para onde foi, por isso
   ele foi cortado" — e, junto, "sempre tem espaços sobrando sem necessidade".
   Com dois campos a menos, os três que restam cabem numa linha só em tela
   larga, e a observação ocupa a linha de baixo inteira.
   ========================================================================== */
.pg-campos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 12px;
  margin-bottom: 8px;
}
.pg-campos > * { min-width: 0; }
.pg-campos .field, .form-pagamento .field { margin-bottom: 0; }
.form-pagamento .btn-row { margin-top: 12px; }
.form-pagamento .jur-nota { margin-top: 8px; }

/* Lista de pagamentos já feitos dentro de um bloco .pg-bloco: sem o card
   extra em volta e sem o respiro duplo — "sempre tem espaços sobrando sem
   necessidade alguma". */
.jur-lista.compacta { margin-top: 7px; gap: 5px; }
.jur-lista.compacta .jur-pg { padding: 6px 10px; }
/* .pg-bloco que não vive dentro de um card precisa do respiro que o card daria. */
.pg-bloco.solto { margin-top: 12px; }

/* =============================================================================
   LINHA DO TEMPO DOS CICLOS — horizontal, com scroll
   -----------------------------------------------------------------------------
   Pedido dela, riscando o gráfico de barras: "substitui isso (...) coloca igual
   essa linha do tempo, e coloque o scroll pois agora tem poucas vendas, mas no
   futuro terá um histórico enorme."
   Um eixo só (o valor). A marca é fina, ancorada na linha; o valor fica em cima
   e o ciclo/data embaixo. O scroll é da faixa, nunca da página.
   ========================================================================== */
.ldt-scroll { overflow-x: auto; overflow-y: hidden; padding-bottom: 4px; }
.ldt-trilho {
  position: relative; display: flex; align-items: flex-end; gap: 0;
  padding: 10px 34px 4px 4px;
  min-width: min(100%, calc(var(--ldt-n) * 104px));
}
/* O eixo é o traço de baixo de cada marca-área: assim ele fica sempre colado na
   base das marcas, sem depender de eu acertar um "bottom" à mão. */
.ldt-eixo { display: none; }
.ldt-marca-area { border-bottom: 1px solid var(--line); width: 100%; justify-content: center; }
.ldt-ponto {
  position: relative; z-index: 1; flex: 1 0 104px; min-width: 104px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.ldt-valor {
  font-size: 12.4px; font-weight: 700; color: var(--brand-dark);
  white-space: nowrap; margin-bottom: 5px;
}
.ldt-ponto.zero .ldt-valor { color: var(--muted); font-weight: 600; }
.ldt-marca-area { display: flex; align-items: flex-end; height: 74px; }
.ldt-marca {
  display: block; width: 8px; border-radius: 4px 4px 0 0;
  background: var(--brand); box-shadow: 0 0 0 2px var(--card);
}
.ldt-ponto.zero .ldt-marca { background: #CFCBD6; }
.ldt-ponto.aberto .ldt-marca {
  background: var(--viz-roxo);
  /* Ciclo aberto ainda não fechou: a marca vazada diz "provisório". */
  background-image: linear-gradient(135deg, #ffffff55 25%, transparent 25%, transparent 50%, #ffffff55 50%, #ffffff55 75%, transparent 75%);
  background-size: 6px 6px;
}
.ldt-ciclo {
  font-size: 11.6px; font-weight: 700; color: var(--ink);
  margin-top: 7px; white-space: nowrap;
}
.ldt-data { font-size: 10.8px; color: var(--muted); white-space: nowrap; }
.ldt-ponto.aberto .ldt-data { color: var(--viz-roxo); font-weight: 600; }
.ldt-seta {
  position: absolute; right: 6px; bottom: 33px;
  font-size: 12px; color: var(--line); line-height: 1;
}
.grafico-nota {
  margin: 9px 0 0; font-size: 11.4px; color: var(--muted); line-height: 1.5;
}

/* =============================================================================
   CICLO ABERTO DENTRO DO HISTÓRICO — bloco recolhível
   Pedido dela: "o ciclo atual pode ficar dentro do histórico, e organizar
   melhor esse layout."
   ========================================================================== */
.ciclo-aberto {
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); margin: 14px 0 4px; overflow: hidden;
}
.ciclo-aberto-cab {
  width: 100%; display: flex; align-items: baseline; gap: 12px;
  padding: 11px 14px; background: none; border: 0; cursor: pointer; text-align: left;
}
.ciclo-aberto-cab:hover { background: var(--hover); }
.ca-tit { font-size: 13.4px; font-weight: 700; color: var(--brand-dark); white-space: nowrap; }
.ca-resumo { flex: 1; min-width: 0; font-size: 12.2px; color: var(--muted); }
.ca-atraso { color: var(--red); }
.ca-seta { color: var(--muted); font-size: 11px; }
.ciclo-aberto-corpo { padding: 0 14px 14px; }

/* =============================================================================
   DETALHE DO MÊS NA LATERAL — a explicação da venda e a porta do pagamento
   -----------------------------------------------------------------------------
   Pedido dela: "quando clicar em cima do valor de venda, quero que você abra uma
   aba lateral com os dados sobre aquela venda" e "campo para levar para
   pagamento se você quiser, porque às vezes ela vai pagar, você identifica fácil
   e paga fácil também".
   ========================================================================== */
.dm-lista { display: flex; flex-direction: column; gap: 8px; }
.dm-item {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 11px; background: var(--card);
}
.dm-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dm-nome {
  background: none; border: 0; padding: 0; cursor: pointer; text-align: left;
  font-size: 13.6px; font-weight: 700; color: var(--brand-dark);
}
.dm-nome:hover { text-decoration: underline; }
.dm-valor { font-size: 13.6px; color: var(--ink); white-space: nowrap; }
.dm-valor.zero { color: var(--muted); font-weight: 600; }
.dm-texto { font-size: 12.4px; color: var(--ink); margin-top: 3px; line-height: 1.45; }
.dm-contexto { font-size: 11.4px; color: var(--muted); margin-top: 2px; }
.dm-cobranca {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line);
  font-size: 12.2px; color: var(--red);
}
.dm-quitado { font-size: 11.6px; color: var(--green); margin-top: 6px; }

/* Mês que ainda não chegou: a coluna existe (Jan–Dez sempre), mas fica apagada. */
.mm-th-futuro { color: #B9B4C2 !important; }
.mm-celula.mm-futuro { background: #FBFAFC; }

/* Aproveitar melhor o espaço da grade — pedido dela, riscando a faixa vazia
   entre os títulos e a primeira coluna de mês: "já deixa os meses de Jan a Dez
   e aproveita melhor os espaços."
   A coluna de indicador comia um terço da tabela para escrever uma dica de duas
   linhas; agora ela tem largura de conteúdo e os doze meses dividem o resto por
   igual. As linhas também ficaram mais baixas: são doze colunas de número, não
   precisam de 9px de respiro em cima e embaixo de cada uma. */
.matriz-mensal { table-layout: fixed; }
.matriz-mensal th.mm-linha-tit,
.matriz-mensal td.mm-linha-tit { min-width: 0; width: 22%; max-width: 260px; white-space: normal; }
.matriz-mensal th.mm-total, .matriz-mensal td.mm-total { width: 68px; }
.matriz-mensal td { padding: 7px 6px; }
.matriz-mensal th { padding: 7px 6px; }
.mm-dica-linha { margin-top: 1px; }

/* =============================================================================
   MARCADORES NA CÉLULA DA GRADE — Quarta de Atitude e campanha ganha
   -----------------------------------------------------------------------------
   Regra dela: "*Q. Atit. → irá aparecer se a Visionária tiver participado da
   Quarta de atitude daquele mês, senão tiver participado ficará em branco.
   *Camp. → se a Visionária tiver ganhado a campanha de vendas daquele mês,
   senão tiver ganhado ficará em branco." E, junto: "poderá melhorar a interface
   dessa mudança, de modo que fique mais bonito e moderno."
   Escrever "*Q. Atit." e "*Camp." embaixo de cada valor engordava a célula em
   três linhas de texto. Duas marcas pequenas dizem a mesma coisa em uma linha,
   e a legenda logo acima da tabela ensina a ler.
   ========================================================================== */
.mm-cel { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.mm-cel-valor { line-height: 1.2; }
.mm-marcas { display: flex; gap: 3px; }
.mm-marca {
  font-style: normal; font-size: 9.4px; font-weight: 800; line-height: 1;
  padding: 2px 4px; border-radius: 4px; letter-spacing: .02em;
}
.mm-marca.quarta { background: #EDE7F6; color: var(--viz-roxo); }
.mm-marca.camp { background: #FDF3D6; color: var(--viz-ambar); }
.mm-legenda-marcas {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 2px 0 8px; font-size: 11.4px; color: var(--muted);
}
.mm-legenda-marcas > span { display: flex; align-items: center; gap: 5px; }
.mm-legenda-nota { color: #9A94A5; }

/* Quarta e campanha do mês, dentro da lateral da célula — ver e corrigir. */
.qc-lista { display: flex; flex-direction: column; gap: 6px; }
.qc-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px;
}
.qc-item.sim { border-color: #CBBEE4; background: #FAF8FD; }
.qc-txt { min-width: 0; }
.qc-txt b { display: block; font-size: 12.8px; }
.qc-txt span { font-size: 11.2px; color: var(--muted); }
.qc-estado { font-size: 11.6px; color: var(--muted); white-space: nowrap; }
.qc-nota { margin: 9px 0 0; font-size: 11.2px; color: var(--muted); line-height: 1.5; }

/* Encaminhamento ao escritório de advogados, na lateral. */
.adv-mensagem {
  margin: 0; font-size: 12.2px; line-height: 1.55; white-space: pre-wrap;
  font-family: inherit; color: var(--ink);
}
.adv-contrato {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap;
}
.adv-contrato b { display: block; font-size: 13px; }
.adv-contrato span { font-size: 11.4px; color: var(--muted); }

/* Chip de filtro com contagem — e desligado quando não há o que filtrar.
   Correção dela: "tem opções nesse sistema que não tem como nem clicar e
   filtrar." Um filtro vazio agora diz que está vazio, em vez de aceitar o
   clique e não fazer nada. */
.chip-qtd {
  display: inline-block; margin-left: 6px; padding: 1px 5px;
  border-radius: 99px; background: #00000010; font-size: 10.4px; font-weight: 700;
}
.chip.active .chip-qtd { background: #ffffff2e; }
.chip-vazio {
  opacity: .42; cursor: not-allowed; border-style: dashed;
}
.chip-vazio:hover { background: transparent; }

/* Select de filtro que não tem o que separar: aparece, explica e não engana.
   Correção dela: "tem opções nesse sistema que não tem como nem clicar e
   filtrar." */
.filtro-inutil {
  opacity: .5; cursor: not-allowed; border-style: dashed; color: var(--muted);
}

/* =============================================================================
   CASO DO JURÍDICO — linha fina, com o resto sob um clique
   -----------------------------------------------------------------------------
   Correção dela, no 6.3.1: "o ideal é que a linha fique mais fina para caber
   mais casos sem precisar rolar o scroll, mas tem que preservar as informações
   importantes na tela principal" e "essas informações devem aparecer só quando
   a gente clicar para expandir, não tem necessidade de ficar visível estático."
   ========================================================================== */
.jur-linha {
  border: 1px solid var(--line); border-radius: 11px; background: var(--card);
  margin-bottom: 7px; overflow: hidden;
}
.jur-linha.quitada { border-color: #C6E2D2; }
.jur-linha-topo {
  display: grid; align-items: center; gap: 12px;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.3fr) minmax(0, 1fr) auto;
  padding: 9px 12px;
}
.jur-linha-quem { min-width: 0; }
.jur-linha-quem .kname {
  font-size: 13.8px; font-weight: 700; cursor: pointer; line-height: 1.25;
}
.jur-linha-quem .kname:hover { text-decoration: underline; }
.jur-linha-quem .kmeta { font-size: 11.4px; margin-top: 1px; }
.jur-linha-tags { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.jur-linha-tags .lider-tag { margin: 0; font-size: 10.4px; padding: 2px 7px; }
.jur-linha-tags .lider-tag.vermelho { background: var(--red-bg); color: var(--red); }
.jur-linha-tags .lider-tag.verde { background: var(--green-bg); color: var(--green); }
.jur-linha-tags .lider-tag.roxo { background: var(--brand-light); color: var(--brand-dark); }
.jur-linha-valor { text-align: right; min-width: 0; }
.jur-linha-valor b { display: block; font-size: 16px; line-height: 1.15; }
.jur-linha-valor b.verde { color: var(--green); }
.jur-linha-valor b.vermelho { color: var(--red); }
.jur-linha-valor span { font-size: 10.8px; color: var(--muted); }
.jur-linha-barra {
  height: 3px; border-radius: 99px; background: #E9E7EC; margin-top: 5px; overflow: hidden;
}
.jur-linha-barra i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.jur-linha-acoes { display: flex; gap: 6px; white-space: nowrap; }
.jur-linha-corpo {
  padding: 0 12px 12px; border-top: 1px solid var(--line); margin-top: 2px; padding-top: 10px;
}
.jur-linha-corpo .kmeta.verde { color: var(--green); }

@media (max-width: 1100px) {
  .jur-linha-topo { grid-template-columns: minmax(0, 1fr) auto; }
  .jur-linha-tags { grid-column: 1 / -1; }
  .jur-linha-valor { grid-column: 1 / -1; text-align: left; }
}

/* Fila de decisão do painel do CEO — gravidade na borda esquerda, não em fundo
   colorido: a linha continua legível e a urgência se lê de relance. */
.fila-ceo td { vertical-align: top; }
.fila-ceo tr.grav-3 td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.fila-ceo tr.grav-2 td:first-child { box-shadow: inset 3px 0 0 var(--viz-ambar); }
.fila-ceo tr.grav-1 td:first-child { box-shadow: inset 3px 0 0 #C9C4D2; }
.fila-fazer { color: var(--muted); font-size: 12.2px; line-height: 1.45; max-width: 320px; }
.titulo-soma { color: var(--muted); font-weight: 600; font-size: 12px; margin-left: 6px; }
