/* =========================================================
   FTP v2 · Complementos do sistema
   Carregado DEPOIS do ftp-v2.css. O ftp-v2.css é a referência visual e não deve
   ser editado; aqui ficam só peças que o sistema usa e a referência não define.
   Cor continua restrita aos indicadores (--ok, --warn, --bad).
   ========================================================= */

/* 3ª mancha do fundo (presente no protótipo) */
body::before { content: ""; position: fixed; width: 560px; height: 560px; left: 8%; bottom: -200px;
  border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(0,0,0,.14), rgba(0,0,0,0) 70%); }

/* ---------- Sidebar ---------- */
.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.nav-sep { height: 1px; background: rgba(255,255,255,.1); margin: 10px 0; }
.sidebar form { margin: 0; }
.client-switch { display: flex; flex-direction: column; gap: 6px; }
.sidebar.atendimento .brand img { width: 96px; }
.brand .client { font-size: 15px; font-weight: 600; color: #fff; margin-top: 8px; }
.sidebar .user .name { font-size: 15px; }
.sidebar .user .role { color: rgba(255,255,255,.6); font-size: 13px; }
.logout { margin-top: 10px; padding: 6px 0; background: none; border: 0; color: rgba(255,255,255,.74);
  font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.logout:hover { color: #fff; }

/* ---------- Cabeçalho das páginas ---------- */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions .input { width: auto; min-height: 40px; padding: 6px 12px; border-radius: 999px; }

/* ---------- Links com cara de botão ---------- */
a.btn, a.btn-2, a.pill { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
a.btn:hover, a.pill.active:hover { color: #fff; }
a.btn-2:hover, a.pill:hover { color: var(--ink); }
.btn-2.sm { min-height: 38px; padding: 0 16px; font-size: 14px; }

/* ---------- Cartões e formulários ---------- */
.card h2 { margin-bottom: 16px; }
.narrow { width: 100%; max-width: 780px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.field-note { font-size: 13px; color: var(--muted); margin: 14px 0 0; }
.dark .num { color: #fff; }
fieldset.group { border: 1px dashed rgba(0,0,0,.15); border-radius: var(--r-md); padding: 12px 16px 16px; margin: 0; }
fieldset.group legend { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 6px; }
.field select:disabled { opacity: .6; }

/* Alertas: base para .alert-ok / .alert-bad do ftp-v2.css */
.alert { margin: 0; padding: 12px 16px; border-radius: var(--r-sm); border: 1px solid; font-size: 14px; font-weight: 600; }
.alert-ok { color: var(--ok); } .alert-warn { color: var(--warn); } .alert-bad { color: var(--bad); }

/* ---------- Tabelas ---------- */
td a { font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
.inline-form { display: flex; gap: 6px; align-items: center; }
td .input { width: auto; padding: 8px 10px; }

/* ---------- Login ---------- */
.login-page { align-items: center; justify-content: center; }
.login-page .main { flex: 0 1 440px; padding: 0; }
.login-card { padding: 36px 32px; display: flex; flex-direction: column; gap: 18px; }
.login-card .brand { align-items: center; text-align: center; }
.login-card .brand img { width: 120px; }
.login-card .brand small { color: var(--muted); }
.login-card h1 { font-size: 32px; text-align: center; }
.login-card .subtitle { text-align: center; }
.login-card .btn { width: 100%; }

/* ---------- Faixa do ambiente de teste ---------- */
.test-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: 28px; line-height: 28px;
  background: var(--bad); color: #fff; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 12px; }
body.test-env .app { padding-top: 44px; }

/* ---------- Celular / tablet: sidebar vira bloco no topo ---------- */
@media (max-width: 820px) {
  .sidebar { padding: 18px 14px; gap: 14px; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .nav-sep { display: none; }
  .nav { padding: 10px 12px; font-size: 14px; }
  .sidebar .user { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .logout { margin: 0; }
  .card { padding: 18px; }
  .login-card { padding: 28px 20px; }
}

/* ---------- Campanhas ---------- */
/* Status: cor só na bolinha; o texto segue em preto. */
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #8E8E93; flex: none; }
.status.ok::before { background: var(--ok); }
.status.warn::before { background: var(--warn); }
.cell-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
tr.editing td { background: rgba(0,0,0,.04); }

/* Formulário + quadro de ajuda lado a lado */
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.help dl { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.help dt { font-weight: 700; font-size: 14px; }
.help dd { margin: 4px 0 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

/* Cálculo ao vivo das métricas */
.calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 18px; }
.calc > div { padding: 12px 14px; border-radius: var(--r-sm); background: rgba(255,255,255,.5); border: 1px solid var(--line); }
.calc .lbl { display: block; font-size: 12px; }
.calc b { display: block; font-size: 20px; letter-spacing: -.02em; margin-top: 4px; }

@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; }
}

/* ---------- Registro do lead ---------- */
.questions { margin-top: 20px; }
.question { padding: 14px 0; border-top: 1px solid var(--line); }
.question[hidden], .q-more[hidden], .q-note[hidden] { display: none; }
.q-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.q-label { font-size: 16px; font-weight: 600; }
.q-more { margin-top: 14px; }
.q-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.yesno button:disabled { opacity: .4; cursor: not-allowed; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 18px; height: 18px; }
.save-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 22px; }
.stage-preview { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.inline-form.wrap { flex-wrap: wrap; }
.inline-form.wrap .input { flex: 1 1 240px; }
details.more { margin-top: 18px; }
details.more summary { cursor: pointer; font-weight: 600; font-size: 14px; }

/* Sim/Não dentro da tabela de contatos (mantém 44px de altura) */
.yesno.sm button { min-width: 52px; padding: 0 12px; font-size: 14px; }
td form { margin: 0; }

/* Para fazer hoje */
.todo h3 { font-size: 14px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.todo .count { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.06); color: var(--ink-2); }
.todo-group + .todo-group { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.todo ul { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.todo li { display: flex; flex-direction: column; }

/* ---------- Configurações ---------- */
.wrap-text { white-space: normal; max-width: 340px; }
td .input[name^="name"] { min-width: 220px; }

/* ---------- Dashboard e relatórios ---------- */
.delta b { font-weight: 700; }
.dark .delta b.is-ok { color: #7FD3A6; } .dark .delta b.is-bad { color: #FF9C93; }
.diag { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.diag li { display: flex; gap: 12px; align-items: flex-start; }
.diag .tag { flex: none; margin-top: 2px; }
.diag-action { font-size: 13px; margin-top: 4px; }
.funnel .step > span:last-child { white-space: nowrap; }
.funnel .cell-sub { display: inline; margin-left: 4px; }

.report { display: flex; flex-direction: column; gap: 20px; }
.report-cover { display: flex; flex-direction: column; gap: 8px; padding: 36px 32px; }
.report-logo { width: 140px; height: auto; margin-bottom: 18px; }
.report-cover h1 { font-size: 40px; margin: 0; }
.report-period { font-size: 18px; font-weight: 600; margin: 0; }
.report-summary { margin: 0 0 20px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; line-height: 1.5; }
.report-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.report-cols h3 { font-size: 15px; margin: 0 0 10px; }
.report-cols ul, .report-cols ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.report-comment { margin: 0; line-height: 1.6; white-space: normal; }

/* Impressão / "Salvar como PDF": A4, sem menu, fundo branco. */
@media print {
  @page { size: A4; margin: 14mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff; }
  body::before, .app::before, .app::after, .sidebar, .no-print, .test-banner { display: none !important; }
  .app, body.test-env .app { display: block; padding: 0; min-height: 0; }
  .main { padding: 0; gap: 12px; }
  .glass, .dark { background: #fff !important; color: var(--ink) !important; border: 1px solid #DDD !important;
    box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .dark .lbl, .dark .sub, .dark .num { color: var(--ink) !important; }
  .dark .delta b.is-ok { color: var(--ok); } .dark .delta b.is-bad { color: var(--bad); }
  .report-cover { break-after: page; min-height: 240mm; justify-content: center; border: 0 !important; }
  .report-section { break-inside: avoid; }
  .kpis { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .kpis .card { padding: 12px; break-inside: avoid; }
  .num { font-size: 22px; }
  .table-wrap { overflow: visible; padding: 0; }
  th, td { padding: 6px; font-size: 10px; white-space: normal; }
  .funnel .step { grid-template-columns: 130px 1fr 150px; }
  a { text-decoration: none; color: inherit; }
}

/* ---------- Mensagens prontas ---------- */
mark.var { background: rgba(0,0,0,.08); color: var(--ink); font-weight: 600; padding: 0 4px; border-radius: 6px; }
.msg-tools .chips { margin-top: 16px; }
.chips .count, .pill .count { font-size: 12px; opacity: .7; margin-left: 4px; }
.msg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.msg-list > [hidden] { display: none; }
.msg-card { display: flex; flex-direction: column; gap: 10px; }
.msg-card h3 { margin: 0; font-size: 17px; }
.msg-card p { margin: 0; }
.msg-card.inactive { opacity: .6; }
.msg-card.focus { outline: 2px solid var(--ink); outline-offset: 2px; }
.msg-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.msg-num { font-weight: 700; font-size: 13px; margin-right: 4px; }
.msg-actions { margin-top: 4px; }
.msg-actions form { margin: 0; }

/* ---------- Dicas de vendas ---------- */
.section-title { margin: 8px 0 14px; }
.tips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tips-grid h3 { margin: 0 0 8px; font-size: 17px; }
.tip-num { font-size: 28px; font-weight: 700; letter-spacing: -.03em; color: var(--muted); margin-bottom: 6px; }
.tip-text { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.tip-example { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.phrase-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: start; margin-bottom: 10px; }
.phrase-row p { margin: 4px 0 0; font-weight: 600; }
.phrase-avoid { text-decoration: line-through; color: var(--muted); }
.phrase-arrow { font-size: 22px; padding-top: 14px; }
.checklist { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.checklist li { padding: 10px 0; border-top: 1px solid var(--line); }
.checklist .check { align-items: flex-start; cursor: pointer; }
.checklist .check input { margin-top: 2px; flex: none; }
.checklist .check span { display: flex; flex-direction: column; gap: 2px; }
.checklist form { margin: 0; display: flex; align-items: center; gap: 10px; justify-content: space-between; }
@media (max-width: 720px) {
  .phrase-row { grid-template-columns: 1fr; }
  .phrase-arrow { display: none; }
}

/* Catálogo de plataformas: campos do cadastro de campanha escondidos conforme a plataforma. */
.field[hidden] { display: none; }

/* ---------- Senhas ---------- */
.login-link { margin: 0; text-align: center; font-size: 14px; }
.login-link a, .link-btn { color: var(--muted); font-weight: 600; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.temp-password p { margin: 0 0 14px; }
.temp-password .alert { margin: 14px 0 0; }
.temp-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.temp-box code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 20px; font-weight: 600; letter-spacing: .06em;
  padding: 10px 16px; border-radius: var(--r-sm); background: rgba(255,255,255,.7); border: 1px solid var(--line); user-select: all; word-break: break-all; }

/* ---------- Ícones ⓘ (info_icon) ---------- */
/* Área de toque de 32px sem aumentar a altura da linha. */
.info-tip { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: -8px -6px -8px -2px;
  padding: 0; border: 0; border-radius: 50%; background: none; color: #8E8E93; font: inherit; font-size: 15px; line-height: 1;
  vertical-align: middle; cursor: help; }
.info-tip:hover, .info-tip[aria-expanded="true"] { color: var(--ink); }
.info-tip:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
.dark .info-tip, .sidebar .info-tip { color: rgba(255,255,255,.6); }
.dark .info-tip:hover, .dark .info-tip[aria-expanded="true"] { color: #fff; }
.tip-pop { position: fixed; z-index: 2100; max-width: 280px; padding: 10px 12px; border-radius: var(--r-sm);
  background: #1C1C1E; color: #fff; font-size: 13px; font-weight: 500; line-height: 1.45; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.tip-pop[hidden] { display: none; }

/* ---------- Tour guiado ---------- */
.tour-layer { position: fixed; inset: 0; z-index: 2000; }
.tour-block { position: absolute; inset: 0; }
.tour-layer.no-target .tour-block { background: rgba(0,0,0,.6); }
.tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,.6); pointer-events: none; transition: all .2s ease; }
.tour-box { position: fixed; width: min(380px, calc(100vw - 24px)); padding: 20px; border-radius: var(--r-md);
  background: #fff; color: var(--ink); box-shadow: 0 16px 40px rgba(0,0,0,.3); outline: none; }
.tour-layer.no-target .tour-box { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); }
.tour-count { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tour-box h3 { margin: 0 0 8px; font-size: 19px; }
.tour-text { margin: 0; font-size: 15px; line-height: 1.5; }
.tour-actions { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.tour-actions .btn { margin-left: auto; }
.tour-actions .btn:disabled { opacity: .5; cursor: not-allowed; }
.tour-skip { font-size: 14px; color: var(--muted); }
.tour-options { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.tour-option { min-height: 48px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff;
  font: inherit; font-size: 16px; font-weight: 600; text-align: left; cursor: pointer; color: var(--ink); }
.tour-option:hover:not(:disabled) { border-color: var(--ink); }
.tour-option.right { border-color: var(--ok); color: var(--ok); }
.tour-option.wrong { border-color: var(--bad); color: var(--bad); }
.tour-option:disabled:not(.right) { opacity: .5; }
.tour-feedback { margin: 12px 0 0; font-size: 14px; font-weight: 600; line-height: 1.45; }
.tour-feedback.is-ok { color: var(--ok); } .tour-feedback.is-bad { color: var(--bad); }
@media (max-width: 820px) {
  /* Celular: balão fixo embaixo da tela. */
  .tour-box, .tour-layer.no-target .tour-box { left: 0 !important; right: 0; top: auto !important; bottom: 0; transform: none;
    width: 100%; border-radius: var(--r-md) var(--r-md) 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 70vh; overflow-y: auto; }
}

/* ---------- Central de Ajuda ---------- */
.faq-search-card { display: flex; flex-direction: column; gap: 8px; }
.faq-search-card .input { width: 100%; font-size: 16px; }
.faq-group h2 { margin-bottom: 8px; }
.faq-group[hidden], .faq-item[hidden] { display: none; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item summary { cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--muted); flex: none; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 0 0 14px; color: var(--ink-2); line-height: 1.55; }
.faq-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.faq-footer h2 { margin: 0; color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media print { .info-tip, .tip-pop, .tour-layer { display: none !important; } }

/* ---------- Login: lembrar e-mail / manter conectado ---------- */
.login-options { display: flex; flex-direction: column; gap: 10px; }
.login-options .field-note { margin: -4px 0 0 26px; }
td form + form { margin-top: 6px; }

/* ---------- Contatos: editar, excluir, lixeira, histórico (seção 16) ---------- */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; white-space: nowrap; }
.btn-2.sm.icon-btn { min-height: 44px; }
.icon-btn .ui-icon { flex: none; }
.icon-btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn.danger { color: var(--bad); }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.row-actions form { margin: 0; }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bulk-bar .input { width: auto; min-height: 44px; }
.col-check { width: 44px; text-align: center; }
.col-check input, .bulk-bar input[type="checkbox"] { width: 22px; height: 22px; margin: 11px; cursor: pointer; }
details.history summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-weight: 600; }
.history-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; }
.history-list li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.5; }
.history-list s { color: var(--muted); }
@media (max-width: 820px) {
  .row-actions .icon-btn { padding: 0 12px; }
  .bulk-bar > * { flex: 1 1 auto; }
}

/* =========================================================
   Acabamento visual (revisão de 30/10/2026)
   ========================================================= */

/* Utilitários de espaçamento (no lugar de style="" nas telas) */
.pb-0 { padding-bottom: 0 !important; } .pt-0 { padding-top: 0 !important; } .p-0 { padding: 0 !important; }
.mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }

/* Ícones */
.ui-icon { flex: none; display: inline-block; vertical-align: -3px; }
.nav .ui-icon { opacity: .8; }
.nav.active .ui-icon, .nav:hover .ui-icon { opacity: 1; }

/* Menu lateral fixo no computador: o conteúdo rola, o menu fica. */
@media (min-width: 821px) {
  .sidebar { flex: 0 0 248px; position: sticky; top: 16px; align-self: flex-start;
    max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
  .main { flex: 1 1 0; }
  body.test-env .sidebar { top: 44px; max-height: calc(100vh - 60px); }
}
@media (min-width: 821px) and (max-width: 1100px) { h1 { font-size: 36px; } }

/* Botões: resposta ao toque/mouse e foco visível pelo teclado */
.btn, .btn-2, .pill, .nav, .yesno button { transition: background-color .18s ease, box-shadow .18s ease, transform .1s ease, color .18s ease; }
.btn:hover { background: #262628; }
.btn-2:hover { background: rgba(255,255,255,.88); }
.btn:active, .btn-2:active, .pill:active { transform: translateY(1px); }
.btn:disabled, .btn-2:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn:focus-visible, .btn-2:focus-visible, .pill:focus-visible, .yesno button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 2px; }
.sidebar .nav:focus-visible, .sidebar select:focus-visible, .dark .btn-2:focus-visible { outline-color: #fff; }
.input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }

/* Campos com a mesma altura (inclusive data no Safari) e menus com seta própria */
.field input:not([type="checkbox"]):not([type="radio"]), .field select, select.input { min-height: 48px; }
.field textarea { line-height: 1.5; resize: vertical; }
.field select, select.input {
  -webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23555558' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px; }
.sidebar select { -webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px; }
.sidebar select option { color: var(--ink); }
input[type="date"], input[type="datetime-local"] { -webkit-appearance: none; appearance: none; display: block; }
input[type="date"]::-webkit-date-and-time-value, input[type="datetime-local"]::-webkit-date-and-time-value { text-align: left; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ink); }
.field input::placeholder, .input::placeholder, .field textarea::placeholder { color: #8E8E93; }

/* Tabelas: linha em destaque ao passar o mouse e linha vazia centralizada */
td { vertical-align: middle; }
tbody tr { transition: background-color .15s ease; }
tbody tr:hover td { background: rgba(255,255,255,.4); }
td[colspan] { text-align: center; color: var(--muted); padding: 28px 14px; white-space: normal; }
.table-wrap { scrollbar-width: thin; }

/* Cabeçalho das páginas e seções */
.page-head .subtitle { max-width: 760px; line-height: 1.45; }
.card > h2:first-child, .card > div > h2:first-child { line-height: 1.25; }
.alert { line-height: 1.45; }
.alert a { font-weight: 700; }

/* Celular */
@media (max-width: 820px) {
  /* Menu em uma linha que desliza para o lado, em vez de várias linhas empilhadas */
  .sidebar nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin: 0 -14px; padding: 0 14px 4px; scroll-padding: 0 14px; }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .sidebar .nav { flex: none; white-space: nowrap; gap: 8px; }
  .page-head { align-items: flex-start; }
  .page-head .actions { width: 100%; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis .card { padding: 16px; }
  .kpis .num { font-size: 24px; overflow-wrap: anywhere; }
  .kpis .sub { font-size: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-actions .btn, .form-actions .btn-2 { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
/* Ações da linha lado a lado no computador; no celular podem quebrar. */
@media (min-width: 821px) { .row-actions { flex-wrap: nowrap; } }
/* Celular: o fim do menu esmaece, indicando que dá para deslizar. */
@media (max-width: 820px) {
  .sidebar nav { -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); }
}

/* ---------- Dashboard compacto (30/10/2026): números e o essencial; explicações no ⓘ ---------- */
.kpis.compact { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpis.compact .card { padding: 16px 18px; border-radius: var(--r-md); }
.kpis.compact .lbl { font-size: 11px; display: flex; align-items: center; gap: 2px; min-height: 20px; }
.kpis.compact .num { font-size: 28px; margin-top: 6px; }
.kpis.compact .sub { font-size: 12.5px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-index { gap: 16px; }
.page-index h1 { font-size: 34px; }
.page-index h2 { font-size: 17px; }
.page-index .card h2 { margin-bottom: 4px; display: flex; align-items: center; gap: 2px; }
.page-index .funnel { gap: 10px; margin-top: 14px; }
.page-index .funnel .bar { height: 22px; border-radius: 8px; }
.page-index .funnel .step { grid-template-columns: 140px 1fr 120px; font-size: 13px; }
.page-index .diag { gap: 10px; margin-top: 10px; }
.page-index .diag .cell-sub { font-size: 13px; }
.page-index .alert { padding: 10px 14px; font-size: 13.5px; }
.page-index .page-head .pill { min-height: 36px; font-size: 13px; padding: 0 14px; }
.page-index .page-head .actions .input { min-height: 36px; font-size: 13px; }
@media (max-width: 720px) {
  .page-index h1 { font-size: 28px; }
  .page-index .funnel .step { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .kpis.compact .num { font-size: 22px; }
}
/* Ajustes da prévia: valor nunca quebra; linha de baixo pode ter 2 linhas em vez de cortar. */
.kpis.compact { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.kpis.compact .num { font-size: 26px; white-space: nowrap; }
.kpis.compact .sub { white-space: normal; overflow: visible; line-height: 1.4; }
.page-index .diag b { font-size: 14px; line-height: 1.35; }
@media (max-width: 560px) { .kpis.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis.compact .num { font-size: 20px; } }
.dark .sub b.is-ok { color: #7FD3A6; } .dark .sub b.is-bad { color: #FF9C93; }
