/* ARQUIVO GERADO — não editar aqui. Fonte: docs/design/implementacao/tema-sistema.src.css (node gerar-tema.js). */
/* Tema "sistema" do Madre CRM — fase 1: SOMENTE CSS (nenhuma mudança em app.js).
   Fonte desta folha; o arquivo servido é gerado por gerar-tema.js (.workspace:not(:has(.wx-app)) vira o escopo que exclui a Central WhatsApp).
   Regras de segurança:
   - só vale em telas >= 1101px (celular e tablet seguem exatamente como estão);
   - a Central WhatsApp (.wx-app) fica de fora: nada de .workspace:not(:has(.wx-app)) alcança dentro dela;
   - nenhuma regra desliga elemento, evento ou arrastar (sem display:none em botões/campos, sem pointer-events). */
@media (min-width: 1101px) {

/* ===== tokens (só dentro do app; a Central WhatsApp recupera os valores antigos) ===== */
.app-shell {
  --bg: #f3f4f6; --surface: #ffffff; --surface-2: #f8f9fa; --line: #e2e4e9; --line-2: #cfd3da;
  --muted: #5b6270; --ink: #1c1f26; --brown: #1c1f26; --gold: #98681f; --acc-weak: #f7f0e3; --acc-ink: #6f4a10;
  --danger: #b42318; --success: #1b7448; --shadow: 0 1px 2px rgba(20, 22, 28, .06);
  --shadow-2: 0 4px 12px rgba(20, 22, 28, .10), 0 1px 2px rgba(20, 22, 28, .06);
  color: #1c1f26;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.app-shell .wx-app {
  --bg: #faf6ef; --surface: #fffdf9; --surface-2: #f3ebe3; --line: #e7d9ca; --muted: #746b64; --gold: #b98748;
  --brown: #2b211c; --ink: #15120f; --danger: #9b3f38; --success: #4f7a5b; --shadow: 0 18px 45px rgba(55, 39, 28, .10);
  color: #2b211c; font-size: 16px; font-variant-numeric: normal;
}
body:has(.app-shell) { background: #f3f4f6; }

/* ===== menu lateral escuro ===== */
.app-shell { grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { background: #1d1a18; border-right: 0; backdrop-filter: none; padding: 12px 8px 16px; color: #d4cec8; scrollbar-color: #4a423c transparent; }
.sidebar-brand { padding: 6px 8px 14px; border-bottom: 1px solid #332e2a; margin-bottom: 4px; }
.sidebar-brand strong { color: #fff; font-size: 14px; font-weight: 600; }
.sidebar-brand span { color: #9c948c; font-size: 12px; }
.sidebar nav { gap: 0; }
.nav-group { gap: 2px; padding: 10px 0 4px; border-bottom: 0; }
.nav-group > small { color: #9c948c; font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; padding: 0 8px 2px; }
.sidebar nav button { height: 32px; padding: 0 8px; border: 0; border-radius: 4px; color: #d4cec8; font-size: 13px; font-weight: 400; gap: 10px; box-shadow: none; }
.sidebar nav button:hover { background: #2a2522; color: #fff; transform: none; box-shadow: none; }
.sidebar nav button.active { background: #342d28; color: #fff; font-weight: 500; border: 0; box-shadow: none; }
.sidebar nav button span { width: 20px; height: 20px; border-radius: 0; background: none; color: #9c948c; font-size: 14px; }
.sidebar nav button.active span { color: #e0b269; }
.sidebar nav button.danger { color: #ff9d90; font-weight: 500; }
.sidebar nav button.danger span { color: #ff9d90; background: none; }

/* ===== barra superior e área de trabalho ===== */
.workspace:not(:has(.wx-app)) { padding: 0 0 48px; }
/* barra superior: igual em TODAS as telas internas, inclusive a Central WhatsApp (só a moldura; o interior da Central não é tocado) */
.workspace .topbar { height: 52px; padding: 0 24px; gap: 12px; margin: 0; background: #fff; border-bottom: 1px solid #e2e4e9; justify-content: flex-start; align-items: center; }

.workspace .topbar .search { flex: 0 1 380px; max-width: 380px; }
.workspace .topbar .search span { left: 10px; top: 4px; font-size: 18px; color: #5b6270; }
.workspace .topbar .search input { height: 32px; padding: 0 10px 0 34px; background: #f3f4f6; border-color: transparent; box-shadow: none; }
.workspace .topbar .search input:focus { background: #fff; border-color: #98681f; }
.workspace .topbar #btnAtualizar { margin-left: auto; }
.app-shell .workspace .topbar button { height: 32px; padding: 0 12px; }
.workspace .topbar .notif-bell > button { width: 32px; padding: 0; display: grid; place-items: center; }
.workspace .topbar .user-pill { background: transparent; border: 0; border-left: 1px solid #e2e4e9; border-radius: 0; box-shadow: none; padding: 0 0 0 12px; gap: 8px; }
.workspace .topbar .user-pill span { color: #5b6270; font-weight: 500; font-size: 12px; }
.workspace .topbar .user-pill button { padding: 0 10px; height: 28px; }
.workspace:not(:has(.wx-app)) > :not(.topbar) { margin-left: 24px; margin-right: 24px; }
.workspace:not(:has(.wx-app)) .page-title { margin: 20px 24px 14px; align-items: flex-end; }
.workspace:not(:has(.wx-app)) .page-title p { display: none; }
.workspace:not(:has(.wx-app)) .page-title h1 { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -.005em; }
.workspace:not(:has(.wx-app)) .page-title span { color: #5b6270; font-size: 13px; margin-top: 2px; }

/* ===== botões, campos ===== */
.workspace:not(:has(.wx-app)) button { transition: background-color .12s ease, border-color .12s ease; }
.workspace:not(:has(.wx-app)) button:hover { transform: none; box-shadow: none; }
.workspace:not(:has(.wx-app)) button:not([class]) { background: #98681f; color: #fff; border: 1px solid #98681f; border-radius: 6px; padding: 0 12px; height: 32px; font-weight: 500; box-shadow: none; }
.workspace:not(:has(.wx-app)) button:not([class]):hover { background: #835718; border-color: #835718; }
.workspace:not(:has(.wx-app)) button.secondary, .workspace:not(:has(.wx-app)) .filters button, .workspace:not(:has(.wx-app)) .quick-actions button, .workspace:not(:has(.wx-app)) .action-list button, .app-shell .workspace .topbar button, .workspace:not(:has(.wx-app)) .row-actions button {
  background: #fff; color: #1c1f26; border: 1px solid #cfd3da; border-radius: 6px; box-shadow: none; font-weight: 500;
}
.workspace:not(:has(.wx-app)) button.secondary:hover, .workspace:not(:has(.wx-app)) .filters button:hover, .workspace:not(:has(.wx-app)) .quick-actions button:hover, .workspace:not(:has(.wx-app)) .action-list button:hover, .app-shell .workspace .topbar button:hover, .workspace:not(:has(.wx-app)) .row-actions button:hover { background: #f8f9fa; border-color: #b9bec8; }
.workspace:not(:has(.wx-app)) button.secondary, .workspace:not(:has(.wx-app)) .quick-actions button, .workspace:not(:has(.wx-app)) .action-list button { height: 32px; padding: 0 12px; }
.workspace:not(:has(.wx-app)) .filters button { height: 28px; padding: 0 12px; border-radius: 14px; }
.workspace:not(:has(.wx-app)) .row-actions button { height: 28px; padding: 0 10px; }
.workspace:not(:has(.wx-app)) button.danger { background: #fff; color: #b42318; border: 1px solid #e7b5af; border-radius: 6px; height: 32px; padding: 0 12px; font-weight: 500; }
.workspace:not(:has(.wx-app)) button.danger:hover { background: #fdecea; }
.workspace:not(:has(.wx-app)) .filters button.active, .workspace:not(:has(.wx-app)) .catalog-toolbar button.active { background: #f7f0e3; color: #6f4a10; border-color: #dcc79b; font-weight: 600; }
.workspace:not(:has(.wx-app)) input:where(:not([type="checkbox"], [type="radio"], [type="file"], [type="range"])), .workspace:not(:has(.wx-app)) select { height: 32px; padding: 0 10px; border: 1px solid #cfd3da; border-radius: 6px; background: #fff; }
.workspace:not(:has(.wx-app)) textarea { padding: 8px 10px; border: 1px solid #cfd3da; border-radius: 6px; background: #fff; }
.workspace:not(:has(.wx-app)) input:focus, .workspace:not(:has(.wx-app)) select:focus, .workspace:not(:has(.wx-app)) textarea:focus { border-color: #98681f; box-shadow: 0 0 0 3px rgba(152, 104, 31, .15); }
.workspace:not(:has(.wx-app)) input[type="checkbox"], .workspace:not(:has(.wx-app)) input[type="radio"] { accent-color: #98681f; }
.workspace:not(:has(.wx-app)) .filtro-etapa { height: 32px; font-size: 13px; }

/* ===== cartões e painéis ===== */
.workspace:not(:has(.wx-app)) .metric-card, .workspace:not(:has(.wx-app)) .panel, .workspace:not(:has(.wx-app)) .customer-card, .workspace:not(:has(.wx-app)) .automation-card { background: #fff; border: 1px solid #e2e4e9; border-radius: 6px; box-shadow: var(--shadow); }
.workspace:not(:has(.wx-app)) .metric-card:after, .workspace:not(:has(.wx-app)) .panel:after, .workspace:not(:has(.wx-app)) .customer-card:after, .workspace:not(:has(.wx-app)) .automation-card:after { display: none; }
.workspace:not(:has(.wx-app)) .metrics-grid { gap: 12px; margin-bottom: 16px; }
.workspace:not(:has(.wx-app)) .metric-card { padding: 12px 14px; min-height: 0; gap: 2px; justify-content: flex-start; }
.workspace:not(:has(.wx-app)) .metric-card span { font-size: 12px; font-weight: 500; color: #5b6270; }
.workspace:not(:has(.wx-app)) .metric-card strong { font-size: 20px; font-weight: 600; margin-top: 2px; letter-spacing: -.005em; }
.workspace:not(:has(.wx-app)) .metric-card small { color: #5b6270; font-weight: 400; font-size: 12px; }
.workspace:not(:has(.wx-app)) .metric-card.atrasado { border: 1px solid #e7b5af; }
.workspace:not(:has(.wx-app)) .metric-card.clickable:hover { transform: none; box-shadow: var(--shadow); border-color: #b9bec8; }
.workspace:not(:has(.wx-app)) .dashboard-client-grid .metric-card { background: #fff; }
.workspace:not(:has(.wx-app)) .dashboard-section-label { color: #5b6270; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; margin: 18px 0 8px; }
.workspace:not(:has(.wx-app)) .dashboard-grid, .workspace:not(:has(.wx-app)) .detail-grid { gap: 16px; }
.workspace:not(:has(.wx-app)) .panel { padding: 14px; }
.workspace:not(:has(.wx-app)) .panel h2 { font-size: 14px; font-weight: 600; margin: 0 0 12px; }
.workspace:not(:has(.wx-app)) .customer-card { padding: 12px 14px; }
.workspace:not(:has(.wx-app)) .score { border-radius: 11px; padding: 2px 8px; font-size: 12px; font-weight: 600; background: #f1f2f4; color: #454b57; }
.workspace:not(:has(.wx-app)) .score.hot { background: #fff3d6; color: #8f5500; }
.workspace:not(:has(.wx-app)) .score.max { background: #e3f3ea; color: #1b7448; }
.workspace:not(:has(.wx-app)) .score.warm { background: #e6f0fb; color: #1d5fa8; }
.workspace:not(:has(.wx-app)) .score.cold { background: #eef0f3; color: #5b6270; }
.workspace:not(:has(.wx-app)) .funnel-row div { background: #b9a07a; color: #1c1f26; border-radius: 3px; padding: 6px 10px; font-size: 12px; }
.workspace:not(:has(.wx-app)) .funnel-row span { font-size: 13px; }
.workspace:not(:has(.wx-app)) .bar-row div { height: 8px; background: #eceef2; border-radius: 4px; }
.workspace:not(:has(.wx-app)) .bar-row i { background: #8fa0b8; }
.workspace:not(:has(.wx-app)) .avatar { background: #f7f0e3; color: #6f4a10; }
.workspace:not(:has(.wx-app)) .tags span, .workspace:not(:has(.wx-app)) .suggestions span { border-radius: 12px; padding: 4px 10px; }
.workspace:not(:has(.wx-app)) .checks label { border-radius: 14px; padding: 5px 12px; }
.workspace:not(:has(.wx-app)) .empty { border-radius: 6px; }

.workspace:not(:has(.wx-app)) button.kebab, .workspace:not(:has(.wx-app)) button.icon-btn { width: 28px; height: 28px; padding: 0; background: transparent; border: 1px solid transparent; border-radius: 6px; color: #454b57; display: inline-grid; place-items: center; box-shadow: none; }
.workspace:not(:has(.wx-app)) button.kebab:hover, .workspace:not(:has(.wx-app)) button.icon-btn:hover { background: #eef0f3; border-color: #e2e4e9; }
.workspace:not(:has(.wx-app)) .line-chart { background: #f8f9fa; border-radius: 6px; }

/* ===== tabelas densas ===== */
.workspace:not(:has(.wx-app)) table { font-size: 13px; }
.workspace:not(:has(.wx-app)) th { font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; color: #454b57; background: #f8f9fa; padding: 0 12px; height: 34px; white-space: nowrap; }
.workspace:not(:has(.wx-app)) td { padding: 8px 12px; }
.workspace:not(:has(.wx-app)) td small { font-size: 12px; margin-top: 0; }
.workspace:not(:has(.wx-app)) tbody tr:hover td { background: #f7f8fa; }
.workspace:not(:has(.wx-app)) .table-wrap { background: #fff; border: 1px solid #e2e4e9; border-radius: 6px; }
.workspace:not(:has(.wx-app)) .panel table th:first-child, .workspace:not(:has(.wx-app)) .panel table td:first-child { padding-left: 0; }
.workspace:not(:has(.wx-app)) .panel table th:last-child, .workspace:not(:has(.wx-app)) .panel table td:last-child { padding-right: 0; }

/* ===== pipeline ===== */
.workspace:not(:has(.wx-app)) .kanban { grid-auto-columns: minmax(168px, 1fr); gap: 8px; }
.workspace:not(:has(.wx-app)) .kanban-col { background: #e9ebef; border: 0; border-radius: 6px; padding: 8px; }
.workspace:not(:has(.wx-app)) .kanban-col h3 { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.workspace:not(:has(.wx-app)) .kanban-col h3 span { background: transparent; border: 0; padding: 0; color: #5b6270; font-weight: 500; font-size: 12px; }
.workspace:not(:has(.wx-app)) .kanban-card { background: #fff; border: 1px solid #e2e4e9; border-radius: 6px; padding: 8px 10px; margin-bottom: 6px; box-shadow: var(--shadow); gap: 4px; }
.workspace:not(:has(.wx-app)) .kanban-card:hover { box-shadow: var(--shadow-2); border-color: #cfd3da; }
.workspace:not(:has(.wx-app)) .kanban-card.atrasado { border: 1px solid #d9857c; box-shadow: inset 0 0 0 1px rgba(180, 35, 24, .10); }

/* ===== detalhe e formulários ===== */
.workspace:not(:has(.wx-app)) .kv { gap: 0; }
.workspace:not(:has(.wx-app)) .kv div { grid-template-columns: minmax(150px, .6fr) 1fr; padding: 8px 0; gap: 12px; }
.workspace:not(:has(.wx-app)) .kv div:last-child { border-bottom: 0; }
.workspace:not(:has(.wx-app)) .kv dt { font-weight: 500; }
.workspace:not(:has(.wx-app)) .modal-card { border-radius: 8px; padding: 20px; }
.workspace:not(:has(.wx-app)) .modal-card label { font-weight: 500; }

/* ===== Central WhatsApp: só a moldura (cabeçalho padrão + margens iguais às outras telas). Fora da tela cheia. ===== */
body:not(.wx-cheia) .workspace:has(.wx-app) { padding: 0 0 16px; }
body:not(.wx-cheia) .workspace:has(.wx-app) > .wx-app { margin: 16px 24px 0; height: calc(100dvh - 84px); }

/* ===== Central WhatsApp: proporção da coluna de conversas (como o WhatsApp Web: nunca passa de um teto, mesmo em monitor largo) ===== */
.app-shell .wx-app:not(.painel) { grid-template-columns: clamp(320px, 28%, 440px) minmax(0, 1fr); }
.app-shell .wx-app.painel { grid-template-columns: clamp(250px, 22%, 380px) minmax(0, 1fr) 340px; }

/* ===== Pipeline: período dos convertidos no cabeçalho da tela ===== */
.workspace:not(:has(.wx-app)) .title-actions .pipeline-period { display: flex; align-items: center; gap: 8px; margin: 0; }
.workspace:not(:has(.wx-app)) .title-actions .pipeline-period span { color: #5b6270; font-size: 13px; white-space: nowrap; }
.workspace:not(:has(.wx-app)) .title-actions .pipeline-period select, .workspace:not(:has(.wx-app)) .title-actions .pipeline-period input { width: auto; min-width: 150px; }

}

/* celular e tablet: o novo seletor do cabeçalho do Pipeline só precisa caber (o resto continua como estava) */
@media (max-width: 1100px) {
  .title-actions .pipeline-period { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; grid-column: 1 / -1; }
  .title-actions .pipeline-period span { color: #746b64; font-size: 13px; white-space: nowrap; }
  .title-actions .pipeline-period select, .title-actions .pipeline-period input { width: auto; flex: 1 1 140px; min-width: 0; }
}

/* ===== Dashboard (Fase 2): resumo em tabelas no lugar da grade de cartões. Classes novas: valem em qualquer largura, sem afetar outras telas ===== */
.resumo-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 16px; }
.resumo-col { display: grid; gap: 14px; align-content: start; min-width: 0; }
.panel h2 small { font-size: 12px; font-weight: 400; color: #5b6270; margin-left: 8px; }
table.resumo { width: 100%; }
table.resumo td { border-bottom: 1px solid #e2e4e9; }
table.resumo tr:last-child td { border-bottom: 0; }
table.resumo td.num { text-align: right; white-space: nowrap; }
table.resumo tr.clickable { cursor: pointer; }
table.resumo tr.clickable:hover td { background: #f7f8fa; }
table.resumo tr.atrasado td strong { color: #b42318; }
@media (min-width: 1101px) {
  .workspace:not(:has(.wx-app)) .resumo-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
  .workspace:not(:has(.wx-app)) .resumo-col { gap: 16px; grid-template-rows: auto 1fr; }
  .workspace:not(:has(.wx-app)) .resumo-grid .panel { padding: 0; }
  .workspace:not(:has(.wx-app)) .resumo-grid .panel h2 { padding: 12px 14px; margin: 0; border-bottom: 1px solid #e2e4e9; }
  .workspace:not(:has(.wx-app)) .resumo-grid .panel table.resumo td { height: 38px; padding: 0 14px; }
  .workspace:not(:has(.wx-app)) .resumo-grid .panel table.resumo td.num { width: 120px; }
  .workspace:not(:has(.wx-app)) .resumo-grid .panel table.resumo td.num strong { font-size: 14px; font-weight: 600; }
}

/* ===== Leads (Fase 3): selo de etapa e barra da lista unida à tabela ===== */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 11px; background: #eef0f3; color: #454b57; font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill .d { width: 7px; height: 7px; border-radius: 50%; background: #5b6270; flex: none; }
.pill.s-novo .d { background: #2b6cb0; }
.pill.s-cat .d { background: #0f766e; }
.pill.s-orc .d { background: #c27a00; }
.pill.s-conv .d { background: #1b7448; }
.pill.s-pos .d { background: #475569; }
.pill.s-perd .d { background: #b42318; }
@media (min-width: 1101px) {
  .workspace:not(:has(.wx-app)) .list-toolbar { background: #fff; border: 1px solid #e2e4e9; border-bottom: 0; border-radius: 6px 6px 0 0; padding: 8px 12px; margin-bottom: 0; }
  .workspace:not(:has(.wx-app)) .list-toolbar .sel-todos { display: inline-flex; align-items: center; gap: 8px; color: #454b57; }
  .workspace:not(:has(.wx-app)) .bulk-bar { background: #f7f0e3; border: 1px solid #dcc79b; border-bottom: 0; border-radius: 0; padding: 8px 12px; margin: 0; font-size: 13px; }
  .workspace:not(:has(.wx-app)) .list-toolbar + .table-wrap, .workspace:not(:has(.wx-app)) .bulk-bar + .table-wrap, .workspace:not(:has(.wx-app)) .list-toolbar ~ .table-wrap { border-radius: 0 0 6px 6px; }
  .workspace:not(:has(.wx-app)) .table-wrap td { padding-top: 6px; padding-bottom: 6px; }
  .workspace:not(:has(.wx-app)) .table-wrap td .link strong { font-weight: 500; color: #1c1f26; }
  .workspace:not(:has(.wx-app)) .table-wrap td .link small { margin-top: 1px; color: #5b6270; }
  .workspace:not(:has(.wx-app)) .table-wrap td.row-actions { padding-right: 8px; }
  .workspace:not(:has(.wx-app)) .table-wrap td.row-actions .kebab { margin-left: auto; }
}

/* ===== Pipeline (Fase 4): cartão compacto. SÓ aparência: a marcação, draggable, ondragstart/ondrop e o menu ⋮ não são tocados ===== */
@media (min-width: 1101px) {
  .workspace:not(:has(.wx-app)) .kanban-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 6px; row-gap: 2px; align-items: center; padding: 8px 10px; }
  .workspace:not(:has(.wx-app)) .kanban-card > strong { grid-column: 1 / -1; grid-row: 1; padding-right: 22px; font-size: 13px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
  .workspace:not(:has(.wx-app)) .kanban-card > small { grid-column: 1 / -1; grid-row: 2; font-size: 12px; }
  .workspace:not(:has(.wx-app)) .kanban-card > span:not(.score) { grid-column: 1 / -1; grid-row: 3; font-size: 12px; }
  .workspace:not(:has(.wx-app)) .kanban-card > p { grid-column: 1; grid-row: 4; font-size: 12px; font-weight: 600; color: #1c1f26; margin-top: 2px; }
  .workspace:not(:has(.wx-app)) .kanban-card > .score { grid-column: 2; grid-row: 4; justify-self: end; margin-top: 2px; }
  .workspace:not(:has(.wx-app)) .kanban-card > div { grid-column: 1 / -1; margin-top: 4px; padding-top: 6px; border-top: 1px solid #e2e4e9; font-size: 12px; }
  .workspace:not(:has(.wx-app)) .kanban-card > div b { font-weight: 500; color: #454b57; }
  .workspace:not(:has(.wx-app)) .kanban-card.atrasado > div em { color: #b42318; font-weight: 500; }
}

/* ===== Pipeline: coluna "Perdido" recolhível (botão de preferência de tela; a coluna recolhida continua aceitando cartões soltos) ===== */
.col-toggle { display: none; }
@media (min-width: 1101px) {
  .workspace:not(:has(.wx-app)) .kanban-col { position: relative; }
  .workspace:not(:has(.wx-app)) .kanban-col > .col-toggle { display: inline-grid; place-items: center; position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; padding: 0; z-index: 2; }
  .workspace:not(:has(.wx-app)) .kanban-col > .col-toggle svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .workspace:not(:has(.wx-app)) .kanban-col:has(> .col-toggle) > h3 { padding-right: 30px; }
  .workspace:not(:has(.wx-app)) .kanban:has(> .kanban-col.recolhida:last-child) { grid-template-columns: repeat(5, minmax(168px, 1fr)) 48px; }
  .workspace:not(:has(.wx-app)) .kanban-col.recolhida { padding: 8px 4px; align-items: center; }
  .workspace:not(:has(.wx-app)) .kanban-col.recolhida > .kanban-cards, .workspace:not(:has(.wx-app)) .kanban-col.recolhida > .pipeline-period { display: none; }
  .workspace:not(:has(.wx-app)) .kanban-col.recolhida > .col-toggle { right: 12px; }
  .workspace:not(:has(.wx-app)) .kanban-col.recolhida > h3 { writing-mode: vertical-rl; justify-content: flex-start; align-items: center; gap: 8px; margin: 34px 0 0; padding-right: 0; white-space: nowrap; }
}

/* ===== Fase 5: ícones do menu (SVG) e etapa do funil no detalhe do lead ===== */
.ico-menu { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.inicio-item-icone .ico-menu { width: 20px; height: 20px; }
.etapas-lead { display: flex; list-style: none; margin: 0 0 16px; padding: 0; background: #fff; border: 1px solid #e2e4e9; border-radius: 6px; overflow: hidden; }
.etapas-lead li { flex: 1; display: flex; align-items: center; gap: 8px; padding: 9px 12px; color: #5b6270; border-right: 1px solid #e2e4e9; white-space: nowrap; min-width: 0; }
.etapas-lead li:last-child { border-right: 0; }
.etapas-lead li b { font-weight: 500; color: #5b6270; }
.etapas-lead li svg { width: 14px; height: 14px; flex: none; fill: none; stroke: #1b7448; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.etapas-lead li.done { color: #454b57; }
.etapas-lead li.cur { background: #f7f0e3; color: #6f4a10; font-weight: 600; }
.etapas-lead li.cur b { color: #6f4a10; }
.etapas-lead li.cur.perdido { background: #fdecea; color: #b42318; }
.etapas-lead li.cur.perdido b { color: #b42318; }
@media (max-width: 760px) { .etapas-lead { display: none; } }
@media (min-width: 1101px) {
  .workspace:not(:has(.wx-app)) .sidebar nav button span .ico-menu, .sidebar nav button span .ico-menu { width: 16px; height: 16px; }
}

/* ===== Fase 6: sino alinhado, tabela de Clientes e paginação das listas ===== */
@media (min-width: 1101px) {
  .app-shell .workspace .topbar .notif-bell > button { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; }
  .app-shell .workspace .topbar .notif-bell .notif-badge { top: -6px; right: -6px; }
  .workspace:not(:has(.wx-app)) .table-wrap td > strong { display: block; font-weight: 500; color: #1c1f26; line-height: 1.3; }
  .workspace:not(:has(.wx-app)) .table-wrap td > small { margin-top: 1px; }
  .workspace:not(:has(.wx-app)) .table-wrap tr.clickable { cursor: pointer; }
  .workspace:not(:has(.wx-app)) .list-toolbar ~ .table-wrap:has(+ .paginacao) { border-radius: 0; }
}
.paginacao { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 14px; background: #fff; border: 1px solid #e2e4e9; border-top: 0; border-radius: 0 0 6px 6px; color: #5b6270; font-size: 12px; margin-bottom: 16px; }
.paginacao .pag-tamanho { display: inline-flex; align-items: center; gap: 6px; }
.paginacao select { width: auto; min-width: 64px; height: 28px; padding: 0 8px; }
.paginacao .pag-botoes { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.paginacao .pag-botoes button { min-width: 28px; height: 28px; padding: 0 8px; }
.paginacao .pag-botoes button.ativa { background: #f7f0e3; border-color: #dcc79b; color: #6f4a10; font-weight: 600; }
.paginacao .pag-botoes button[disabled] { opacity: .45; cursor: default; }
.paginacao .pag-reticencias { padding: 0 4px; }

/* o paginador é só do computador/tablet; no celular a lista segue inteira, como antes */
@media (max-width: 760px) { .paginacao { display: none; } }

/* O catálogo usa a mesma tabela paginada também no celular. */
@media (max-width: 760px) {
  .paginacao.paginacao-catalogo { display: flex; }
  .paginacao-catalogo .pag-botoes { width: 100%; margin-left: 0; flex-wrap: wrap; }
}

/* colunas menos importantes saem das tabelas também no tablet (a lista continua legível sem rolar para o lado) */
@media (max-width: 1400px) { .hide-md { display: none; } }

/* ===== Pipeline e Recompra: as colunas ocupam a altura da tela (sem faixa vazia embaixo) =====
   Antes: altura fixa de 72% da janela + 18px do quadro + 48px da área = espaço em branco sob as colunas. */
@media (min-width: 1101px) {
  .workspace:not(:has(.wx-app)):has(> .kanban) { padding-bottom: 0; }
  .workspace:not(:has(.wx-app)) .kanban { padding-bottom: 0; margin-bottom: 0; }
  .workspace:not(:has(.wx-app)) .kanban-col { height: calc(100dvh - 133px); min-height: 460px; }
}


/* Detalhe do cliente (Fase 5): tags e histórico de pedidos clicável */
.workspace:not(:has(.wx-app)) .tags-cliente { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 4px 0 8px; }
.workspace:not(:has(.wx-app)) .detail-col .task.clickable { cursor: pointer; }
.workspace:not(:has(.wx-app)) .detail-col .task.clickable:hover { background: #f7f0e3; }
