/* =================== Carteira / Esteira / Comissões =================== */
.mt { margin-top: 14px; } .center { text-align: center; } .sec { margin: 8px 0 4px; font-size: 13px; }
.resp { display: inline-flex; align-items: center; gap: 4px; } .resp svg { width: 14px; height: 14px; }
.hero { display: flex; align-items: center; gap: 28px; padding: 16px 20px; cursor: pointer; background: linear-gradient(120deg, var(--brand), #1D3B6B); color: #fff; border: 0; flex-wrap: wrap; }
.hero small { display: block; color: #9FB0CC; font-size: 12px; } .hero b { font-size: 22px; } .hero .btn { margin-left: auto; background: var(--accent); color: var(--accent-ink); border: 0; }
.pct-wrap { position: relative; } .pct-wrap span { position: absolute; right: 12px; top: 10px; color: var(--ink-3); } .pct-wrap input { padding-right: 30px; }
.cob-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cob-strip .kpi { text-align: left; font: inherit; color: inherit; cursor: pointer; }
.cob-strip .kpi .val { font-size: 22px; }
.assign-bar { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--blue-bg); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.click-n { cursor: pointer; }

.funil { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.funil-i { flex: 1 0 auto; display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; white-space: nowrap; font-size: 13px; color: var(--ink-2); }
.funil-i i { width: 10px; height: 10px; border-radius: 3px; } .funil-i b { color: var(--ink); font-size: 15px; } .funil-i small { color: var(--ink-3); }
.funil-i.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
:root[data-theme="dark"] .funil-i.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 260px); min-height: 200px; }
.col header { display: flex; justify-content: space-between; gap: 8px; padding: 12px 14px 6px; border-top: 4px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.col header small { display: block; color: var(--ink-3); font-size: 11.5px; }
.col header .n { background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 1px 9px; font-size: 12px; font-weight: 700; height: fit-content; }
.col-sum { display: flex; justify-content: space-between; padding: 0 14px 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.col-sum .hoje { color: var(--blue); }
.cards { overflow-y: auto; padding: 0 10px 10px; display: flex; flex-direction: column; gap: 8px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; cursor: pointer; box-shadow: var(--shadow); }
.kcard:hover { border-color: var(--ink-3); } .kcard.late { border-left: 3px solid var(--red); }
.kcard > b { font-size: 13px; display: block; margin-bottom: 6px; line-height: 1.3; }
.kmeta, .kfoot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-3); align-items: center; }
.kmeta { margin-bottom: 4px; } .kmeta b { color: var(--ink); font-size: 13px; }
.kfoot svg { width: 12px; height: 12px; vertical-align: -1px; }
.kzap { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--green-bg); color: var(--green); }
.kzap svg { width: 16px; height: 16px; }

/* =================== Celular =================== */
.bottomnav, .actionbar { display: none; }
@media (max-width: 860px) {
  body { font-size: 15px; }
  .shell { grid-template-rows: 56px 1fr; height: 100dvh; }
  .topbar { padding: 0 10px; gap: 8px; }
  .topbar .gsearch { display: block; flex: 1; } .gsearch kbd { display: none; }
  .main { padding: 16px 12px 96px; }
  .page-head h1 { font-size: 21px; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn, .page-head .actions select { flex: 1; }
  .page-head .actions.muted { display: none; }
  .bottomnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
  .bottomnav a, .bottomnav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--ink-3); background: none; border: 0; padding: 4px 0; position: relative; cursor: pointer; }
  .bottomnav svg { width: 22px; height: 22px; }
  .bottomnav .active { color: var(--brand); font-weight: 700; }
  :root[data-theme="dark"] .bottomnav .active { color: var(--accent); }
  .bottomnav b { position: absolute; top: 0; left: 55%; background: var(--accent); color: var(--accent-ink); font-size: 10px; border-radius: 99px; padding: 0 5px; }
  .sidebar { z-index: 95; }
  .shell.mobile-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 90; }
  .kpi { padding: 12px 14px; } .kpi .val { font-size: 21px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .toolbar { gap: 8px; }
  .toolbar .search, .toolbar select, .toolbar .grow { flex: 1 1 100%; width: 100% !important; min-width: 0; }
  .toolbar .grow { display: none; }
  .split .preview { display: none; }
  /* tabelas viram cartões */
  table.tbl[data-m] thead { display: none; }
  table.tbl[data-m] tbody tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  table.tbl[data-m] td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
  table.tbl[data-m] td::before { content: attr(data-label); color: var(--ink-3); font-size: 12px; text-align: left; font-weight: 600; flex-shrink: 0; }
  table.tbl[data-m] td.who { display: block; text-align: left; padding-bottom: 6px; }
  table.tbl[data-m] td.who::before, table.tbl[data-m] td:not([data-label])::before, table.tbl[data-m] td[data-label=""]::before { display: none; }
  table.tbl[data-m] td:empty { display: none; }
  table.tbl[data-m] td.empty { display: block; text-align: center; }
  .pager { flex-direction: column; gap: 8px; }
  /* esteira: uma etapa por vez */
  .kanban { display: block; }
  .col { display: none; max-height: none; border: 0; background: none; } .col.on { display: flex; }
  .col header { display: none; } .col-sum { padding: 0 2px 10px; } .cards { padding: 0; overflow: visible; }
  .funil { position: sticky; top: -16px; z-index: 5; background: var(--bg); padding: 4px 12px 8px; margin: 0 -12px 8px; }
  .funil-i { flex: 0 0 auto; }
  /* cockpit */
  .client-head .actions { display: none; } .crumbs { flex-wrap: wrap; }
  .actionbar { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); z-index: 70; padding: 8px 12px; background: var(--surface); border-top: 1px solid var(--line); }
  .actionbar .btn { flex: 1; height: 44px; }
  .main:has(.actionbar) { padding-bottom: 170px; }
  .overlay { align-items: end; padding: 0; }
  .modal { max-height: 92dvh; border-radius: 18px 18px 0 0; }
  .input, select.input { height: 44px; font-size: 16px; } textarea.input { font-size: 16px; }
  .btn { height: 42px; } .btn.sm { height: 36px; }
  .hero { gap: 14px; } .hero .btn { margin-left: 0; width: 100%; }
  .cob-strip { grid-template-columns: repeat(2, 1fr); }
  #toast-root { left: 12px; right: 12px; bottom: 140px; } .toast { max-width: none; }
}

/* ---------- Configurações ---------- */
.cfg .card-b { display: flex; flex-direction: column; gap: 4px; max-width: 860px; }
.cfg .card-b > .btn, .cfg .actions-row { align-self: flex-start; margin-top: 8px; }
.cfg .pct-wrap { display: inline-flex; align-items: center; gap: 8px; }
.cfg .pct-wrap span { position: static; white-space: nowrap; }
.cfg .pct-wrap input { padding-right: 12px; max-width: 120px; }
.cfg h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.cfg .field small { display: block; margin-top: 6px; }
.cfg-logo { margin-top: 14px; display: flex; gap: 16px; align-items: center; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; margin-bottom: 14px; }
.cfg-logo img { background: var(--surface-2); border-radius: 10px; padding: 6px; flex: none; }
.cfg-logo p { margin: 4px 0 8px; }
.cfg-preview { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; margin: 6px 0 4px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.cfg-preview:empty { display: none; }
.cfg-faixas td, .cfg-faixas th { vertical-align: middle; }
.brand .brand-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) {
  .cfg-faixas .pct-input { width: 96px; }
  .cfg-logo { flex-direction: column; align-items: flex-start; }
}
