/* ══ BaukoDS · CAMADA CELULAR (prévia item 7/8 — 16/11/2026) ═══════════════════
 * Só vale abaixo de 600 px e só nos módulos que carregam bauko-celular.js
 * (ele põe a classe "bds-cel" no <html>). Não muda nada no computador.
 * Régua: botão/campo com 44 px de altura, alvo mínimo 40 px, campo com fonte
 * de 16 px (o iPhone não dá zoom ao tocar), abas numa linha que rola,
 * tabela larga dentro de caixa que rola, filtros recolhidos em "Filtros (n)". */
@media (max-width: 600px) {
  /* ---- campos: 16 px e 44 px de altura ---- */
  html.bds-cel input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]),
  html.bds-cel select, html.bds-cel textarea {
    font-size: 16px !important; min-height: 44px; box-sizing: border-box;
  }
  html.bds-cel textarea { min-height: 88px; }
  html.bds-cel input[type=checkbox], html.bds-cel input[type=radio] { width: 22px; height: 22px; }

  /* ---- botões: 44 px; botões só de ícone: 40×40 ---- */
  html.bds-cel .bds-btn, html.bds-cel .btn, html.bds-cel button.primary,
  html.bds-cel .bds-dialog button, html.bds-cel .modal button, html.bds-cel .bds-cel-alvo {
    min-height: 44px;
  }
  html.bds-cel .bds-topbar--v3 .hbtn-sm { height: 40px; min-width: 40px; }
  html.bds-cel .bds-topbar--v3 .hbtn-sm.bds-tb3-ic { width: 40px; }
  html.bds-cel .bds-topbar--v3 .bds-topbar__back { min-height: 40px; min-width: 40px; }

  /* ---- abas: uma linha que rola, com sombra na borda indicando que há mais ---- */
  html.bds-cel .bds-tabs {
    overflow-x: auto; flex-wrap: nowrap; gap: 18px; padding: 0 14px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent);
            mask-image: linear-gradient(90deg, #000 86%, transparent);
  }
  html.bds-cel .bds-tabs.bds-cel-fim { -webkit-mask-image: none; mask-image: none; }
  html.bds-cel .bds-tabs::-webkit-scrollbar { display: none; }
  html.bds-cel .bds-tab { flex-shrink: 0; white-space: nowrap; min-height: 48px; }

  /* ---- topo: botões que não cabem vão para o menu "⋯" (bauko-celular.js) ---- */
  html.bds-cel .bds-topbar__actions { max-width: none !important; overflow: visible !important; }
  html.bds-cel .bds-cel-oculto { display: none !important; }
  .bds-cel-mais { position: relative; }
  .bds-cel-menu {
    position: fixed; right: 8px; top: 56px; z-index: 900; min-width: 220px; max-width: calc(100vw - 16px);
    background: var(--surface, #fff); color: var(--tx, #1d2733); border: 1px solid var(--border, #dde3e8);
    border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; display: none;
  }
  .bds-cel-menu.on { display: block; }
  .bds-cel-menu button {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 12px;
    background: none; border: 0; border-radius: 8px; font: 500 15px var(--ff-body, system-ui, sans-serif);
    color: inherit; text-align: left; cursor: pointer;
  }
  .bds-cel-menu button:active { background: var(--surface-2, #f1f4f2); }

  /* ---- tabela larga: caixa que rola (criada pelo bauko-celular.js) ---- */
  .bds-cel-rola { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

  /* ---- toggles/segmentados: faixa que rola em vez de quebrar em buracos ---- */
  html.bds-cel .bds-toggle, html.bds-cel .seg {
    display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; max-width: 100%;
  }
  html.bds-cel .bds-toggle > *, html.bds-cel .seg > * { flex-shrink: 0; min-height: 40px; white-space: nowrap; }

  /* ---- "Filtros (n)": barra de filtros recolhida ---- */
  .bds-cel-fbtn {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
    min-height: 48px; margin: 8px 0; padding: 0 14px; border: 1px solid var(--border, #dde3e8);
    border-radius: 10px; background: var(--surface, #fff); color: var(--tx, #1d2733);
    font: 600 15px var(--ff-body, system-ui, sans-serif); cursor: pointer;
  }
  .bds-cel-fbtn .n {
    display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px;
    border-radius: 12px; background: var(--grn, #007c44); color: #fff; font-size: 13px;
  }
  .bds-cel-fbtn .n.zero { background: var(--surface-2, #eef1ef); color: var(--tx-3, #6b7785); }
  .bds-cel-fbtn .seta { transition: transform .15s; color: var(--tx-3, #6b7785); }
  .bds-cel-fbtn[aria-expanded=true] .seta { transform: rotate(180deg); }
  .bds-cel-fbtn .res { flex: 1; text-align: left; font-weight: 400; font-size: 13px; color: var(--tx-3, #6b7785);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.bds-cel .bds-cel-recolhido { display: none !important; }
}
/* no computador, o botão "Filtros (n)" não existe */
@media (min-width: 601px) { .bds-cel-fbtn, .bds-cel-menu { display: none !important; } }

/* ---- cartão de número (BaukoDS.KpiCard): mais compacto no celular — mesmo conteúdo ---- */
@media (max-width: 600px) {
  html.bds-cel .bds-card:has(> .eyebrow) { padding: 12px 14px !important; gap: 4px !important; min-width: 0 !important; }
  html.bds-cel .bds-card:has(> .eyebrow) > div > div[style*="ff-display"] { font-size: 30px !important; }
  html.bds-cel .bds-card:has(> .eyebrow) div[style*="ff-mono"][style*="13px"] { font-size: 12px !important; font-family: var(--ff-body) !important; }
}
@media (max-width: 600px) {
  .bds-cel-mais.bds-cel-ponto::after { content: ''; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: #f4a300; box-shadow: 0 0 0 2px var(--grn, #007c44); }
  .bds-cel-menu button[aria-current=true] { background: var(--grn-050, #e6f2ec); font-weight: 700; }
}
