/* ============================================================
   COMMERCEFLOW — RESPONSIVE MOBILE v1.0
   Fixes globais para todos os perfis (Admin / Vendedor / Ops)
   ============================================================ */

/* ══ 1. GLOBAL ══════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Remove padding duplo — cada página controla o próprio */
  .content-area { padding: 0 !important; overflow-x: hidden; }

  /* Header superior */
  .top-header { padding: 0 12px !important; height: 56px; }
  .top-header h2 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .header-right .badge { font-size: 9px; min-width: 14px; height: 14px; }

  /* Page toolbar padrão */
  .page-toolbar, .toolbar-top, .list-toolbar, .page-header > div {
    flex-direction: column !important; align-items: stretch !important; gap: 8px;
  }
  .search-box, .search-input { max-width: 100% !important; width: 100% !important; }
  .toolbar-actions { flex-direction: column !important; width: 100%; }
  .toolbar-actions .btn, .toolbar-actions button { width: 100%; justify-content: center; }

  /* Tabelas: entre 641px e 768px (celular deitado / tablet pequeno) ainda
     cabem em rolagem horizontal. Abaixo de 640px viram CARTÕES — ver o
     bloco "TABELA → CARTÕES" no fim deste arquivo. */
  .table-wrap, .table-container, .table-responsive, .product-table-wrap,
  .product-table-container, .data-table-wrap, .relatorios-tabela-container,
  .rec-table-wrap, .fin-table-wrap {
    overflow-x: auto !important; -webkit-overflow-scrolling: touch;
  }
  .data-table, .product-table { min-width: 540px; font-size: 12px; }
  .data-table th, .data-table td,
  .product-table th, .product-table td { padding: 10px 8px; white-space: nowrap; }

  /* Modais: bottom sheet */
  .modal-overlay, .modal-bg, [class*="modal-overlay"] {
    align-items: flex-end !important;
  }
  .modal-content, .modal-box, [class*="modal-content"],
  [class$="-modal-box"], [class*="-modal-box "] {
    width: 100% !important; max-width: 100% !important;
    max-height: 92vh !important; max-height: 92dvh !important; overflow-y: auto !important;
    border-radius: 20px 20px 0 0 !important;
    margin: 0 !important;
  }
  /* Modais montados com estilo inline nos módulos (dp-modal etc.) */
  [class$="-modal"]:not(.cf-modal):not(.nv-sheet):not(.arep-sheet) { align-items: flex-end !important; padding: 0 !important; }
  /* Rodapé do modal sempre visível: os botões Salvar/Cancelar não somem
     embaixo do teclado nem exigem rolar até o fim */
  [class$="-modal-foot"], [class$="-modal-footer"], .modal-footer {
    position: sticky; bottom: 0; background: var(--white, #fff);
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Form grids: 1 coluna */
  .form-grid, .form-row, [class*="form-grid"] { grid-template-columns: 1fr !important; }

  /* Touch targets: regra única de 44px vive em mobile-app.css (era duplicada aqui com 40px) */

  /* Modal 'Nova Solicitação' da Reposição (montado com estilos inline):
     vira bottom-sheet no celular — o !important vence o inline */
  #repModal { align-items: flex-end !important; padding: 0 !important; }
  #repModal > div { max-width: 100% !important; max-height: 92vh !important; border-radius: 20px 20px 0 0 !important; }
  #repModal input[type="number"] { width: 76px !important; height: 44px !important; font-size: 16px !important; }

  /* Stat cards: 2 colunas */
  .stats-grid, .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ══ 2. DASHBOARD ════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Colunas e tamanho de fonte NÃO são mais fixados aqui: o grid usa
     auto-fit com mínimo de 300px e o valor usa clamp()+cqi (dashboard.css).
     Forçar 2 colunas espremia o cartão a ~150px e o valor era cortado. */
  .dashboard-grid {
    gap: 10px !important;
    padding: 14px 12px;
  }
  .metric-card { padding: 14px 12px; }
  .metric-card-title { font-size: 10px !important; }
  .metric-card-icon { width: 36px; height: 36px; font-size: 16px; }

  .chart-card { margin: 0 12px 12px; padding: 16px; }
  .chart-wrapper, .chart-container { height: 220px !important; }

  .recent-orders, .recent-table-wrap { overflow-x: auto; padding: 0 12px; }
  .recent-orders .data-table, .recent-table { min-width: 480px; }

  .quick-actions, .acoes-rapidas { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; padding: 0 12px 12px; }
  .quick-action-card { padding: 14px 10px; }
}

@media (max-width: 400px) {
  .metric-card { padding: 10px 8px; }   /* fonte do valor: clamp()+cqi */
}

/* ══ 3. PEDIDOS ══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .pedidos-header, .pedidos-toolbar {
    flex-direction: column !important; gap: 10px; padding: 14px 12px;
  }
  .pedidos-filters {
    flex-wrap: wrap; gap: 8px; padding: 0 12px 12px;
  }
  .pedidos-filters select, .pedidos-filters input { flex: 1; min-width: 130px; }

  .pedido-card { margin: 0 12px 10px; border-radius: 12px; }
  .pedido-card-header { padding: 12px; flex-wrap: wrap; gap: 6px; }
  .pedido-card-body { grid-template-columns: 1fr 1fr !important; padding: 12px; gap: 10px; }
  .pedido-card-actions { flex-direction: column; gap: 8px; padding: 12px; }
  .pedido-card-actions .btn { width: 100%; justify-content: center; }

  .status-steps { overflow-x: auto; flex-wrap: nowrap !important; padding-bottom: 6px; }
  .status-step { flex: 0 0 auto; font-size: 10px; }
  .status-step::after { display: none; }

  .pedido-detalhes { grid-template-columns: 1fr !important; }
  .update-form { padding: 14px; }
}

/* ══ 4. ESTOQUE ══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .estoque-header, .estoque-top {
    flex-direction: column !important; gap: 10px; padding: 14px 12px;
  }
  .estoque-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px; padding: 0 12px 12px;
  }
  .estoque-stat-card { padding: 12px; }
  .estoque-stat-value { font-size: 20px !important; }

  .estoque-toolbar { flex-direction: column !important; gap: 8px; padding: 0 12px 12px; }
  .estoque-search, #searchProduto { width: 100%; max-width: 100% !important; }
  .estoque-filters { flex-wrap: wrap; gap: 6px; }
  .estoque-filters select { flex: 1; min-width: 130px; }

  .product-table-wrap, .estoque-table-wrap { overflow-x: auto; padding: 0 12px 12px; }
  .product-table { min-width: 600px; }
  .action-buttons { gap: 4px; }
  .action-buttons .btn { padding: 6px 8px; font-size: 11px; }
}

/* ══ 5. CLIENTES ══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .clientes-header {
    flex-direction: column !important; gap: 10px; padding: 14px 12px;
  }
  .clientes-grid {
    grid-template-columns: 1fr !important;
    padding: 0 12px; gap: 10px;
  }
  .cliente-card { padding: 14px; }
  .cliente-info-main { flex-direction: column; align-items: flex-start; gap: 6px; }
  .cliente-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .cliente-actions { width: 100%; display: flex; gap: 6px; }
  .cliente-actions button { flex: 1; justify-content: center; min-height: 40px; }
  .cliente-body { grid-template-columns: 1fr 1fr !important; }
}

/* ══ 6. PRODUTOS ══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .produtos-header {
    flex-direction: column !important; gap: 10px; padding: 14px 12px;
  }
  .page-toolbar { flex-direction: column !important; gap: 8px; padding: 0 12px 12px; }
  .product-table-container, .produtos-table-wrap { overflow-x: auto; padding: 0 12px 12px; }
  .produto-form .form-grid { grid-template-columns: 1fr !important; }
  .produto-imagens { grid-template-columns: repeat(3, 1fr) !important; }
}

/* ══ 7. NOVO PEDIDO (VENDAS) ══════════════════════════════════ */
@media (max-width: 768px) {
  /* Layout principal vira coluna, sem overflow hidden */
  .nv-layout {
    flex-direction: column !important;
    height: auto !important;
    overflow: visible !important;
    padding-bottom: 68px;
  }
  .nv-produtos-panel {
    overflow: visible !important;
    height: auto !important;
    flex: none !important;
  }
  /* Oculta painel lateral — substituído pelo bottom sheet */
  .nv-cart-panel { display: none !important; }

  /* Grid de produtos ajustado */
  .nv-search-bar { padding: 10px 12px; }
  .nv-cats { padding: 8px 10px; gap: 5px; }
  .nv-cat-tab { padding: 8px 14px; font-size: 12px; min-height: 36px; }
  .nv-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)) !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    overflow: visible !important;
    flex: none !important;
    height: auto !important;
  }
  .nv-prod-card { padding: 10px 8px; }
  .nv-prod-name { font-size: 11px; }
  .nv-prod-price { font-size: 13px; }
  .nv-prod-img { height: 60px; }

  /* ── Barra inferior do carrinho (mobile) ── */
  .nv-mobile-bar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: #111827; color: white;
    padding: 10px 16px;
    z-index: 500;
    box-shadow: 0 -4px 20px rgba(0,0,0,.22);
    min-height: 58px;
  }
  .nv-mobile-bar-left { display: flex; align-items: center; gap: 10px; }
  .nv-mobile-bar-cnt {
    background: var(--primary); color: white;
    font-size: 13px; font-weight: 700;
    min-width: 26px; height: 26px; border-radius: 13px;
    display: inline-flex; align-items: center; justify-content: center; padding: 0 6px;
  }
  .nv-mobile-bar-label { font-size: 14px; font-weight: 700; }
  .nv-mobile-bar-total { font-size: 13px; font-weight: 600; color: #9ca3af; margin-left: 6px; }
  .nv-mobile-bar-btn {
    background: var(--primary); color: white; border: none;
    padding: 10px 20px; border-radius: 10px;
    font-size: 14px; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; gap: 6px;
  }

  /* ── Bottom sheet carrinho ── */
  .nv-sheet-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.48); z-index: 600;
  }
  .nv-sheet-overlay.open { display: block; }
  .nv-sheet {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: white; border-radius: 20px 20px 0 0;
    z-index: 700; max-height: 88vh;
    display: flex; flex-direction: column;
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
  }
  .nv-sheet.open { transform: translateY(0); }
  .nv-sheet-handle {
    width: 36px; height: 4px; background: #e5e7eb;
    border-radius: 2px; margin: 12px auto 0; flex-shrink: 0;
  }
  .nv-sheet-head {
    padding: 14px 16px; border-bottom: 1px solid #f3f4f6;
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0;
  }
  .nv-sheet-title { font-size: 15px; font-weight: 700; color: #111827; }
  .nv-sheet-close {
    width: 32px; height: 32px; border-radius: 50%; background: #f3f4f6;
    border: none; cursor: pointer; color: #6b7280; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
  }
  .nv-sheet-body { flex: 1; overflow-y: auto; }
  .nv-sheet-footer {
    padding: 10px 16px 24px; border-top: 1px solid #f3f4f6;
    display: flex; flex-direction: column; gap: 10px; flex-shrink: 0;
  }
  /* Conteúdo do sheet reusa os estilos do nv-cart-panel */
  .nv-sheet-body .nv-cart-items { overflow: visible !important; flex: none; padding: 8px 16px; }
  .nv-sheet-body .nv-cliente-box { padding: 10px 16px; border-top: 1px solid #f3f4f6; }
  .nv-sheet-footer .nv-continuar { width: 100%; justify-content: center; border-radius: 12px; margin: 0; }
}

@media (max-width: 400px) {
  .nv-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* ══ 8. VENDEDOR ══════════════════════════════════════════════ */
@media (max-width: 768px) {
  #vendedorPainelContainer { padding: 12px 12px 80px !important; }
  #vendedorPainelContainer .painel-header-simples { padding: 20px 16px !important; border-radius: 14px !important; }
  #vendedorPainelContainer .header-text h2 { font-size: 20px !important; }
  #vendedorPainelContainer .header-text p { font-size: 13px !important; }
  /* Cards: 1 coluna em mobile — conteúdo não fica cortado */
  #vendedorPainelContainer .cards-grid,
  #vendedorPainelContainer .cards-grid-small { grid-template-columns: 1fr !important; gap: 10px !important; }
  #vendedorPainelContainer .acoes-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  /* Cards menores e proporcionais */
  #vendedorPainelContainer .indicator-card { padding: 14px 16px !important; gap: 12px !important; }
  #vendedorPainelContainer .card-icon { font-size: 30px !important; min-width: 44px !important; height: 44px !important; }
  #vendedorPainelContainer .card-label { font-size: 11px !important; margin-bottom: 2px !important; }
  #vendedorPainelContainer .card-value { margin-bottom: 2px !important; }   /* fonte fluida (cqi) */
  #vendedorPainelContainer .card-detail { font-size: 11px !important; }
  /* Ações rápidas */
  #vendedorPainelContainer .btn-acao,
  #vendedorPainelContainer .acao-card { padding: 14px 10px !important; }
  #vendedorPainelContainer .acao-titulo { font-size: 12px !important; }
  #vendedorPainelContainer .secao-secundaria { grid-template-columns: 1fr !important; }
  #vendedorPainelContainer .subsecao { padding: 14px !important; }
  /* Filtros de período */
  #vendedorPainelContainer .filtros-periodo { flex-wrap: wrap !important; gap: 6px !important; }
  #vendedorPainelContainer .btn-filtro { font-size: 12px !important; padding: 6px 10px !important; }
}

/* ══ 9. FORNECEDORES ══════════════════════════════════════════ */
@media (max-width: 768px) {
  .fornecedores-header { flex-direction: column !important; gap: 10px; padding: 14px 12px; }
  .fornecedores-toolbar { flex-direction: column !important; gap: 8px; padding: 0 12px 12px; }
  .fornecedores-grid { grid-template-columns: 1fr !important; padding: 0 12px 12px; gap: 10px; }
  .fornecedor-card { padding: 14px; }
  .forn-form .form-grid, .fornecedor-form .form-grid { grid-template-columns: 1fr !important; }
}

/* ══ 10. FINANCEIRO / RELATÓRIOS ══════════════════════════════ */
@media (max-width: 768px) {
  .fin-header, .rel-header { flex-direction: column !important; gap: 10px; padding: 14px 12px; }
  .fin-stats, .rel-stats { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; padding: 0 12px 12px; }
  .fin-stat-card, .rel-stat-card { padding: 12px; }
  .fin-chart-wrap, .rel-chart-wrap { overflow-x: auto; padding: 0 12px; }
  .fin-table-wrap, .rel-table-wrap { overflow-x: auto; padding: 0 12px 12px; }
  .fin-table, .rel-table { min-width: 500px; font-size: 12px; }
}

/* ══ 11. LOGÍSTICA ════════════════════════════════════════════ */
@media (max-width: 768px) {
  .logistica-header { flex-direction: column !important; gap: 10px; padding: 14px 12px; }
  /* logistica.css já tem boas media queries; aqui só reforçamos o padding */
}

/* ══ 12. CATÁLOGO ADMIN ═══════════════════════════════════════ */
@media (max-width: 768px) {
  .ca-grid { grid-template-columns: 1fr !important; }
  .ca-tabs { overflow-x: auto; flex-wrap: nowrap !important; }
  .ca-tab { flex: 0 0 auto; font-size: 12px; padding: 10px 14px; }
  .ca-field { width: 100% !important; }
}

/* ══ 13. SEPARAÇÃO / OPERAÇÕES (reforço) ══════════════════════ */
@media (max-width: 768px) {
  .op-page { padding: 10px 10px 80px !important; }
  .separacao-container, .sep-page { padding: 12px !important; }
  .pedidos-grid { grid-template-columns: 1fr !important; }
}

/* ══ 14. GERAL — nada estoura a largura da tela ═══════════════════════ */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; max-width: 100vw; }
  /* Selos/pílulas com white-space:nowrap (ex.: "📅 Esta semana (07/09/2026 a
     13/09/2026)") passavam da borda em 375px. No celular podem quebrar linha. */
  .content-area [style*="white-space:nowrap"], .content-area [style*="white-space: nowrap"] {
    white-space: normal !important; line-height: 1.35;
  }
  /* Cabeçalho do gráfico do Dashboard: título + legenda (Vendas/Lucro/
     Despesas) numa linha sem quebra passava 9px da borda em 375px. */
  .chart-card [style*="justify-content: space-between"],
  .dashboard-section [style*="justify-content: space-between"] { flex-wrap: wrap; gap: 8px; }
  .content-area [style*="gap: 16px; align-items: center; font-size: 13px"] { flex-wrap: wrap; gap: 6px 12px !important; }
  .main-content, .content-area { max-width: 100vw; }
  /* Páginas que fixam padding de desktop (24–32px) — no celular 12px */
  .content-area > [class$="-page"], .content-area > [class*="-page "],
  .content-area > .dp-page, .content-area > .relatorios-page, .content-area > .financeiro-page {
    padding: 12px !important;
  }
  /* Toolbars dos módulos com prefixo próprio empilham */
  .dp-toolbar, .rec-header, .cb-header, .usr-header, .tf-header, .atv-toolbar {
    flex-direction: column !important; align-items: stretch !important; gap: 10px !important;
  }
  .dp-toolbar-left { flex-direction: column !important; align-items: stretch !important; }
  .dp-search input, .dp-search { width: 100% !important; }
  .dp-filters { display: flex; }
  .dp-filters .dp-filter-btn { flex: 1; min-height: 40px; }
  .dp-periodo { width: 100%; }
  .dp-periodo label { flex: 1 1 130px; }
  .dp-btn-nova { width: 100%; justify-content: center; min-height: 44px; }
  /* Totais em 2 colunas, o primeiro ocupa a linha inteira */
  .dp-stats { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .dp-stats .dp-stat:first-child { grid-column: 1 / -1; }
  .dp-stat-val { font-size: 18px !important; }
  .dp-grid { grid-template-columns: 1fr !important; }
  .dp-card-actions .dp-btn { flex: 1 1 auto; justify-content: center; min-height: 40px; }
  /* Cartões do financeiro / indicadores */
  .financeiro-resumo { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .financeiro-valor { font-size: clamp(16px, 5.2vw, 22px) !important; }
  .indicadores-grid { grid-template-columns: 1fr 1fr !important; }
  /* Relatórios: cartões de KPI em 2 colunas, filtros empilhados */
  .relatorios-filtros .filtros-row { flex-direction: column !important; }
  .relatorios-filtros .filtro-group { width: 100% !important; }
  .relatorios-filtros .filtros-actions { flex-direction: column !important; }
  .relatorios-filtros .filtros-actions button { width: 100%; min-height: 44px; }
  .relatorios-grid { grid-template-columns: 1fr !important; }
  .relatorios-tabela-header { flex-direction: column !important; align-items: stretch !important; gap: 10px !important; }
  .relatorios-tabela-header .btn-exportar { width: 100%; justify-content: center; }
  /* Botões e chips: nunca menores que o dedo */
  .btn, button:not(.cf-bnav-item):not(.vpd-comp-del):not(.notif-panel-close) { min-height: 40px; }
  /* Listas de filtros em chips rolam na horizontal em vez de quebrar 5 linhas */
  .dp-cat-filters { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 4px; scrollbar-width: none; }
  .dp-cat-filters::-webkit-scrollbar { display: none; }
  .dp-cat-filters .dp-cat-btn { flex: 0 0 auto; min-height: 36px; }
}

@media (max-width: 640px) {
  /* Relatório da Empresa monta grades inline de 3 colunas ("Custo
     Operacional", "Projeção"): em 375px cada coluna ficava com ~100px e o
     bloco passava de 460px — cortado pela borda da tela. */
  .relatorios-tabela-container [style*="grid-template-columns:1fr 1fr 1fr"],
  .relatorios-tabela-container [style*="grid-template-columns: 1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important; gap: 12px !important;
  }
  .relatorios-tabela-container [style*="grid-template-columns:repeat(auto-fit,minmax(160px,1fr))"] {
    grid-template-columns: 1fr 1fr !important;
  }
  /* Gráficos de barras (7 dias / 6 meses) montados em flex com gap:8px —
     em 375px as 7 colunas passavam 2px da borda. */
  .relatorios-tabela-container [style*="align-items:flex-end;gap:8px"] { gap: 4px !important; }
}

@media (max-width: 400px) {
  .financeiro-resumo, .indicadores-grid, .dp-stats { grid-template-columns: 1fr !important; }
  .relatorios-tabela-container [style*="grid-template-columns:repeat(auto-fit,minmax(160px,1fr))"] {
    grid-template-columns: 1fr !important;
  }
}

/* ══ 15. TABELA → CARTÕES (≤ 640px) ══════════════════════════════════
   js/core/cf-responsive.js rotula cada <td> com data-label (texto do <th>)
   e marca a tabela com .cf-rt. Aqui a tabela vira uma lista de cartões:
   uma linha = um cartão; cada célula = "Rótulo ........ valor".
   Sem rolagem horizontal, sem coluna escondida, botões com tamanho de dedo.
   Opt-out: <table data-cf-noresp> ou tabela sem cabeçalho (.cf-scroll). */
@media (max-width: 640px) {
  /* !important de propósito: CSS de módulo com seletor por #id
     (#vendedorPainelContainer .pedidos-tabela { min-width:500px }) vencia
     a regra genérica e a tabela voltava a estourar a tela. */
  table.cf-rt {
    display: block !important; width: 100% !important; min-width: 0 !important; max-width: 100% !important;
    border-collapse: collapse; font-size: 13px; border: 0; background: transparent;
  }
  table.cf-rt > thead, table.cf-rt .cf-rt-cabecalho { display: none !important; }
  table.cf-rt > tbody, table.cf-rt > tfoot, table.cf-rt > tbody > tr, table.cf-rt > tr,
  table.cf-rt > tfoot > tr { display: block !important; width: 100% !important; min-width: 0 !important; }
  table.cf-rt > tbody > tr, table.cf-rt > tr {
    background: var(--white, #fff);
    border: 1px solid var(--gray-200, #dfdcd3);
    border-radius: 12px;
    padding: 4px 14px;
    margin: 0 0 10px;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.05));
  }
  table.cf-rt td {
    display: flex !important; justify-content: space-between; align-items: flex-start; gap: 12px;
    width: 100% !important; min-width: 0 !important; max-width: 100% !important;
    padding: 9px 0 !important;
    border: 0 !important; border-bottom: 1px solid var(--gray-100, #f0eee8) !important;
    white-space: normal !important; text-align: right; overflow-wrap: anywhere;
  }
  table.cf-rt td:last-child { border-bottom: 0 !important; }
  table.cf-rt td::before {
    content: attr(data-label);
    flex: 0 0 40%; max-width: 40%;
    text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: var(--gray-500, #8a8578); line-height: 1.5;
  }
  table.cf-rt td[data-label=""]::before { display: none; }
  table.cf-rt td[data-label=""] { justify-content: flex-start; text-align: left; }
  /* Primeira célula (nome/identificação) é o título do cartão */
  table.cf-rt > tbody > tr > td:first-child:not(.cf-rt-acoes) {
    font-weight: 600; color: var(--gray-900, #211e11); font-size: 14px;
  }
  /* Faixa de ações: botões lado a lado, sem rótulo, área de toque de 40px */
  table.cf-rt td.cf-rt-acoes { justify-content: flex-start; flex-wrap: wrap; gap: 8px; padding-top: 10px !important; }
  table.cf-rt td.cf-rt-acoes::before { display: none; }
  table.cf-rt td.cf-rt-acoes > *, table.cf-rt td.cf-rt-acoes .action-buttons > * {
    flex: 1 1 auto; justify-content: center; min-height: 40px; margin: 0 !important;
  }
  table.cf-rt td.cf-rt-acoes .action-buttons { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
  /* Tabela larga que optou por manter rolagem */
  table.cf-scroll, table[data-cf-noresp] { display: table; }
  .cf-scroll-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Miniaturas dentro de células viram destaque no topo do cartão */
  table.cf-rt td img { max-height: 64px; width: auto; border-radius: 8px; }
}
