/* ──────────────────────────────────────────────────────────────────────────
   Central Silomaque — tema dark sobre Bootstrap 5.3
   Inspirado no estilo T3RRA, adaptado pro domínio SST/canteiro de obras.
   ────────────────────────────────────────────────────────────────────── */

:root {
    --sidebar-width: 175px;
    --sidebar-bg:    #0a1120;
    --bg-dark:       #0f172a;
    --bg-card:       #1e293b;
    --bg-input:      #0f172a;
    --border:        #334155;
    --text:          #e2e8f0;
    --muted:         #94a3b8;
    --accent:        #6366f1;
    --accent-h:      #4f46e5;
    --success:       #22c55e;
    --danger:        #ef4444;
    --warning:       #f59e0b;
    --info:          #38bdf8;
}

* { box-sizing: border-box; }

html, body {
    /* iOS (atalho na tela inicial): sem o "quique" elástico que arrasta a página inteira */
    overscroll-behavior-y: none;
}
body {
    background: var(--bg-dark);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-text-size-adjust: 100%;
}
/* Menu aberto no celular: a página de trás fica parada (o arrasto rola só o menu) */
body.menu-aberto { overflow: hidden; touch-action: none; }

a { text-decoration: none; }

/* ── Login (página standalone, sem sidebar) ───────────────────────────── */
body.login-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; padding: 1rem;
}

/* ── SIDEBAR ──────────────────────────────────────────────────────────── */
.sidebar {
    position: fixed; top: 0; left: 0;
    width: var(--sidebar-width); height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    z-index: 1000;
    transition: transform .25s ease;
    overflow-y: auto;
    height: 100dvh;                        /* altura real da tela no iOS (100vh passa da tela) */
    -webkit-overflow-scrolling: touch;     /* rolagem com inércia no iOS */
    overscroll-behavior: contain;          /* o arrasto no fim do menu não passa para a página */
    touch-action: pan-y;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1rem; height: 42px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.logo-text {
    font-size: .88rem; font-weight: 700;
    letter-spacing: .12em;
    color: var(--accent);
}
.sidebar nav { flex: 1; padding-bottom: 1rem; }
.sidebar .nav { padding-top: .5rem; }
.nav-section {
    padding: .8rem 1.2rem .25rem;
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #475569;
    font-weight: 700;
}
.sidebar .nav-link {
    display: flex; align-items: center; gap: .5rem;
    padding: .45rem .85rem;
    color: var(--muted) !important;
    font-size: .8rem;
    border-left: 3px solid transparent;
    transition: all .15s;
    border-radius: 0;
}
.sidebar .nav-link i { font-size: .9rem; width: 16px; }
.nav-section { padding: .65rem .85rem .2rem; font-size: .62rem; }
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: var(--text) !important;
    background: rgba(99, 102, 241, .12);
    border-left-color: var(--accent);
}
.sidebar .nav-link i {
    font-size: 1rem;
    width: 18px;
    text-align: center;
}

/* User avatar (sidebar + tabelas) */
.user-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff; font-weight: 700; font-size: .7rem;
    line-height: 1;
}
.dropdown-menu-dark-custom {
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}
.dropdown-menu-dark-custom .dropdown-item {
    color: var(--text);
    font-size: .85rem;
}
.dropdown-menu-dark-custom .dropdown-item:hover {
    background: rgba(99, 102, 241, .12);
    color: var(--text);
}

/* ── TOPBAR ───────────────────────────────────────────────────────────── */
.topbar {
    margin-left: var(--sidebar-width);
    display: flex; align-items: center;
    height: 42px; padding: 0 1rem;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
}
.topbar-title {
    color: var(--text);
    font-size: .95rem;
    font-weight: 600;
}
.topbar-subtitle {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 400;
    margin-left: .5rem;
}
#sidebarToggle { display: none; }

/* ── MAIN CONTENT ─────────────────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 1rem 1.1rem;
    min-height: calc(100vh - 42px);
}

/* ── CARDS ────────────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px;
    color: var(--text);
    overflow: hidden;
}
.card-body { color: var(--text); }
.card-header {
    background: rgba(99, 102, 241, .1) !important;
    border-bottom: 1px solid rgba(99, 102, 241, .25) !important;
    color: var(--text) !important;
    font-weight: 600;
    font-size: .9rem;
    padding: .75rem 1.25rem;
}

/* Stat cards (compactos, estilo Métricas) */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .7rem .85rem;
    transition: transform .15s, border-color .15s;
    height: 100%;
    display: flex; align-items: center; gap: .7rem;
}
.stat-card:hover {
    transform: translateY(-1px);
    border-color: rgba(99, 102, 241, .35);
}
.stat-card .stat-icon {
    width: 34px; height: 34px;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.stat-card .stat-info { display: flex; flex-direction: column; line-height: 1.15; }
.stat-card .stat-value {
    font-size: 1.25rem; font-weight: 700; color: var(--text);
}
.stat-card .stat-label {
    font-size: .72rem;
    color: var(--muted);
    margin-top: 0;
}

.icon-bg-accent  { background: rgba(99, 102, 241, .18); color: var(--accent); }
.icon-bg-warning { background: rgba(245, 158, 11, .18); color: var(--warning); }
.icon-bg-danger  { background: rgba(239,  68,  68, .18); color: var(--danger); }
.icon-bg-success { background: rgba( 34, 197,  94, .18); color: var(--success); }
.icon-bg-info    { background: rgba( 56, 189, 248, .18); color: var(--info); }

/* ── BADGES ───────────────────────────────────────────────────────────── */
.badge-soft-success,
.badge-soft-warning,
.badge-soft-danger,
.badge-soft-info {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 12px;
    font-size: .72rem;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.3;
}
.badge-soft-success { background: rgba(34,197,94,.15);  color: var(--success); }
.badge-soft-warning { background: rgba(245,158,11,.15); color: var(--warning); }
.badge-soft-danger  { background: rgba(239,68,68,.15);  color: var(--danger);  }
.badge-soft-info    { background: rgba(56,189,248,.15); color: var(--info);    }
.cell-na { color: #475569; font-size: .85rem; }

/* ── FORMS ────────────────────────────────────────────────────────────── */
.form-control, .form-select {
    background: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    border-radius: 8px;
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 .2rem rgba(99, 102, 241, .2) !important;
}
.form-label { color: var(--muted); font-size: .85rem; margin-bottom: .35rem; }
.form-control::placeholder { color: #64748b !important; opacity: 1 !important; }

/* ── BUTTONS ──────────────────────────────────────────────────────────── */
.btn-primary {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}
.btn-primary:hover {
    background: var(--accent-h) !important;
    border-color: var(--accent-h) !important;
}

/* ── TABELAS ──────────────────────────────────────────────────────────── */
.table {
    --bs-table-bg: transparent;
    color: var(--text);
}
.table th {
    background: #0a1120;
    color: var(--muted);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: .5rem .6rem;
    border-color: var(--border) !important;
}
.table td {
    padding: .45rem .6rem;
    border-color: rgba(51, 65, 85, .5) !important;
    font-size: .82rem;
    white-space: nowrap;
}
.table td.cell-wrap { white-space: normal; }

/* ── FILTROS estilo Métricas (linhas com ícone + pills) ───────────────── */
.filtros-bar { display: flex; flex-direction: column; gap: .55rem; }
.filtro-linha {
    display: flex; align-items: flex-start; flex-wrap: wrap; gap: .45rem .4rem;
    min-height: 32px;
}
.filtro-icone {
    width: 24px; text-align: center; flex-shrink: 0;
    color: var(--muted); font-size: 1.05rem;
    line-height: 32px;
}
.pill {
    display: inline-flex; align-items: center; gap: .35rem;
    background-color: var(--bg-card) !important;
    color: var(--muted) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px;
    padding: .35rem .7rem;
    font-size: .82rem; font-weight: 500;
    line-height: 1.2;
    transition: all .12s;
    cursor: pointer;
    white-space: nowrap;
    outline: none;
    box-shadow: none;
    font-family: inherit;
}
.pill:focus { outline: none; box-shadow: none; }
.pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pill:hover { color: var(--text) !important; border-color: rgba(99,102,241,.4) !important; }
.pill.active {
    background-color: var(--accent) !important;   /* filtro escolhido: cheio, bem visível */
    color: #fff !important;
    border-color: var(--accent) !important;
    font-weight: 600;
}
.pill-todos.active {
    background-color: var(--accent) !important;
    color: #fff !important;
    border-color: var(--accent) !important;
}
.pill-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
}
.pill-count {
    background: rgba(255,255,255,.08);
    color: var(--muted);
    border-radius: 10px;
    padding: 0 .45rem;
    font-size: .68rem; font-weight: 600;
    margin-left: .2rem;
}
.pill.active .pill-count { background: rgba(255,255,255,.18); color: #fff; }

/* ── Badges de status do funcionário (7 cores) ────────────────────────── */
.badge-status {
    display: inline-block;
    padding: .22rem .55rem;
    border-radius: 12px;
    font-size: .72rem; font-weight: 600;
    white-space: nowrap;
    border: 1px solid;
}
.badge-status-success { background: rgba(34,197,94,.15);  color: var(--success); border-color: rgba(34,197,94,.3); }
.badge-status-info    { background: rgba(56,189,248,.15); color: var(--info);    border-color: rgba(56,189,248,.3); }
.badge-status-warning { background: rgba(245,158,11,.15); color: var(--warning); border-color: rgba(245,158,11,.3); }
.badge-status-orange  { background: rgba(251,146,60,.15); color: #fb923c;        border-color: rgba(251,146,60,.3); }
.badge-status-pink    { background: rgba(236,72,153,.15); color: #ec4899;        border-color: rgba(236,72,153,.3); }
.badge-status-cyan    { background: rgba(34,211,238,.15); color: #22d3ee;        border-color: rgba(34,211,238,.3); }
.badge-status-gray    { background: rgba(148,163,184,.18);color: #94a3b8;        border-color: rgba(148,163,184,.35); }
.badge-status-muted   { background: rgba(71,85,105,.2);   color: #94a3b8;        border-color: rgba(71,85,105,.4); }
.badge-status-danger  { background: rgba(239,68,68,.15);  color: var(--danger);  border-color: rgba(239,68,68,.3); }

/* ── BOTÕES DE AÇÃO (ícones compactos em tabela) ──────────────────────── */
.action-icons {
    display: inline-flex;
    gap: .3rem;
    justify-content: flex-end;
}
.btn-icon {
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted);
    transition: all .12s;
    cursor: pointer;
    padding: 0;
    font-size: .85rem;
    line-height: 1;
}
.btn-icon:hover {
    background: rgba(99, 102, 241, .15);
    color: var(--text);
    border-color: var(--accent);
}
.btn-icon:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.btn-icon:disabled:hover {
    background: transparent;
    color: var(--muted);
    border-color: var(--border);
}

/* ── EMPTY STATE (placeholder) ────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
}
.empty-state i {
    font-size: 2.5rem;
    opacity: .35;
    margin-bottom: .75rem;
    display: block;
}

/* ── MOBILE: sidebar colapsa ──────────────────────────────────────────── */
#sidebarOverlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 999;
    touch-action: none;
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .topbar, .main-content { margin-left: 0; }
    #sidebarToggle { display: inline-flex; }
    #sidebarOverlay.show { display: block; }
}

/* Ícones (Bootstrap Icons vem de CDN): reserva o espaço do ícone antes da fonte carregar,
   senão setas/botões nascem com largura zero e a página "pula" quando a fonte chega. */
i.bi { display: inline-block; min-width: 1em; }
.pipeline-sep { width: 1rem; justify-content: center; }

/* ── Ficha do funcionário: modo leitura × edição (views/rh/funcionarios/_campos.php) ──
   Aqui no app.css (carrega antes do HTML) pra não piscar a versão de edição ao abrir. */
/* Modo leitura × edição: mesmo HTML, a classe no container decide o que aparece */
.ficha-leitura .valor-edicao { display: none !important; }
.ficha-edicao .valor-leitura { display: none !important; }
.campo .form-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); margin-bottom: .15rem; }
.obrig-ast { color: var(--danger); }
.valor-leitura { color: var(--text); font-size: .92rem; min-height: 1.6rem; padding: .1rem 0 .35rem;
                 border-bottom: 1px solid rgba(255,255,255,.05); overflow-wrap: anywhere; }
.valor-longo { white-space: pre-wrap; }
.valor-vazio { color: var(--muted); opacity: .6; }
.ficha-leitura .card-body { padding-top: .75rem; padding-bottom: .75rem; }
.foto-mini { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.foto-vazia { background: var(--bg-input); border-style: dashed; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 1.6rem; }

/* Reserva sempre o espaço da barra de rolagem: sem isso, página curta (sem barra) × página longa
   (com barra) muda a largura em ~15px e tudo "anda" pro lado ao trocar de aba ou enquanto carrega. */
html { scrollbar-gutter: stable; }

/* Linha de tabela que abre a ficha (tr[data-href], ver app.js) */
tr[data-href] { cursor: pointer; }
tr[data-href]:hover > td { background: rgba(99,102,241,.08) !important; }

/* Visualizador de documentos (app.js): janela por cima de tudo, inclusive dos modais do recrutamento */
.visu-doc { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.72); display: none;
            align-items: center; justify-content: center; padding: 16px; }
.visu-doc.aberto { display: flex; }
.visu-doc-janela { width: min(1000px, 100%); height: min(92vh, 100%); background: var(--bg-card, #1e2530);
                   border: 1px solid var(--border); border-radius: 10px; display: flex; flex-direction: column; overflow: hidden; }
.visu-doc-topo { display: flex; align-items: center; gap: .5rem; padding: .55rem .75rem; border-bottom: 1px solid var(--border); }
.visu-doc-titulo { flex: 1; min-width: 0; color: var(--text); font-weight: 600; font-size: .9rem;
                   white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visu-doc-frame { flex: 1; width: 100%; border: 0; background: #2a2f37; }

/* Ícone ⓘ de ajuda (tooltip) — substitui textos de explicação pra despoluir os formulários */
.dica { color: var(--muted); font-size: .85rem; cursor: help; margin-left: .35rem; opacity: .8; }
.dica:hover, .dica:focus { color: var(--text); opacity: 1; outline: none; }
.tooltip-inner { max-width: 320px; text-align: left; font-size: .8rem; }

/* ── MOBILE: utilitários (tabelas viram cards, filtros com rolagem, botão flutuante) ──────────
   Uso: <table class="table m-cards"> e, nas <td>: m-titulo (linha principal), m-valor (valor à
   direita), m-acoes (botões no fim), m-hide (some no celular), m-quebra (ocupa a linha toda).
   <tr class="m-grupo"> = cabeçalho de grupo (ex.: dia). .m-scroll = linha de pills que rola de lado.
   .m-so = só aparece no celular; .m-fab = botão flutuante no canto (só no celular). */
@media (min-width: 768px) { .m-so { display: none !important; } .m-fab { display: none !important; } }
@media (max-width: 767.98px) {
    .main-content { padding: .75rem .65rem 5.5rem; }
    .stat-card { padding: .55rem .6rem; gap: .5rem; }
    .stat-card .stat-icon { width: 28px; height: 28px; font-size: .85rem; }
    .stat-card .stat-value { font-size: 1rem; }
    .stat-card .stat-label { font-size: .66rem; }
    .card-header { padding: .6rem .8rem; }
    .m-scroll { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
    .m-scroll::-webkit-scrollbar { display: none; }
    .m-scroll > * { flex-shrink: 0; }
    .m-hide-sm { display: none !important; }
    .m-full { width: 100% !important; max-width: 100% !important; }

    table.m-cards thead { display: none; }
    table.m-cards, table.m-cards tbody { display: block; width: 100%; }
    table.m-cards tr { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .45rem; padding: .65rem .8rem; border-bottom: 1px solid rgba(255,255,255,.07); }
    table.m-cards td { display: block; order: 3; padding: 0 !important; border: 0 !important; background: transparent !important; white-space: normal; text-align: left; }
    table.m-cards td.m-titulo { order: 1; flex: 1 1 calc(100% - 8.5rem); min-width: 0; font-weight: 600; }
    table.m-cards td.m-titulo .sub { font-weight: 400; }
    table.m-cards td.m-valor { order: 2; margin-left: auto; text-align: right; font-weight: 700; font-size: .95rem; }
    table.m-cards td.m-quebra { flex-basis: 100%; }
    table.m-cards td.m-sit { order: 2; flex-basis: 100%; }
    table.m-cards td.m-hide { display: none; }
    table.m-cards td.m-acoes { order: 9; margin-left: auto; width: auto !important; }
    table.m-cards tr.m-grupo { padding: .4rem .8rem; background: rgba(255,255,255,.045); }
    table.m-cards tr.m-grupo td:first-child { flex: 1; }
    table.m-cards tr.m-grupo td { order: 0; }
    table.m-cards td[colspan] { flex-basis: 100%; }
    table.m-cards tr.m-grupo td[colspan] { flex-basis: auto; }
    .table-responsive:has(> table.m-cards) { overflow-x: visible; }

    .m-fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 1030;
             border-radius: 999px; padding: .75rem 1.05rem; box-shadow: 0 6px 20px rgba(0,0,0,.45); font-size: .95rem; }
}

/* ── Padrão de topo das telas: linha 1 = busca + botões de ação; linha 2 = filtros ───────────── */
.barra-acoes { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .6rem; }
.barra-acoes .busca { position: relative; flex: 1 1 280px; max-width: 520px; margin: 0; }
.barra-acoes .busca > i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.barra-acoes .busca input { padding-left: 2.2rem; }
.barra-acoes .acoes-dir { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.barra-filtros { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .75rem; }
.barra-filtros .rot { color: var(--muted); font-size: .85rem; margin-right: .15rem; }
.barra-filtros .sep { color: var(--muted); margin: 0 .25rem; }
[data-busca-oculto] { display: none !important; }
@media (max-width: 575.98px) { .barra-acoes .busca { max-width: none; } .barra-acoes .acoes-dir { margin-left: 0; } }

/* ══ Padrão de UX (auditoria rodada 1, 22/11/2026) ═══════════════════════════════════════════════
   Botões: primário roxo cheio (1 por tela/modal) · secundário contorno · perigo contorno vermelho.
   Altura 38 px (pequeno 32 px; celular ≥ 44 px) · raio 8 px · filtro selecionado = roxo suave. */
.btn { border-radius: 8px; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; }
.btn-sm { min-height: 32px; border-radius: 8px; }
.btn.btn-link { min-height: 0; }
.pill { min-height: 32px; }
.pill.active, .pill-todos.active {
    background-color: rgba(99, 102, 241, .24) !important;   /* selecionado: suave (o roxo cheio é só do botão de ação) */
    color: #fff !important;
    border-color: var(--accent) !important;
}
/* selects com a seta (o fundo escuro tirava) */
.form-select {
    background-color: var(--bg-input) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3e%3cpath fill=%27none%27 stroke=%27%2394a3b8%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important; background-position: right .7rem center !important; background-size: 14px 10px !important;
    padding-right: 2.1rem !important;
}
/* contraste dos títulos de seção do menu (antes 2,5:1) */
.nav-section { color: #8b9ab0 !important; }
/* validação visível: borda vermelha + frase embaixo; nada de "verde de válido" */
.was-validated .form-control:valid, .was-validated .form-select:valid { border-color: var(--border) !important; box-shadow: none !important; }
.was-validated .form-check-input:valid ~ .form-check-label { color: inherit !important; }
.was-validated .form-check-input:valid { border-color: var(--border) !important; background-color: transparent; }
.campo-erro, .was-validated .form-control:invalid, .was-validated .form-select:invalid { border-color: #ef4444 !important; box-shadow: 0 0 0 .15rem rgba(239, 68, 68, .2) !important; }
.erro-campo { color: #fca5a5; font-size: .78rem; margin-top: .25rem; }
.aviso-erros { background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .45); color: #fecaca; border-radius: 8px; padding: .5rem .75rem; font-size: .85rem; margin-bottom: .75rem; }
label.obrig::after, .form-label.obrig::after { content: " *"; color: #f87171; font-weight: 600; }
/* ⓘ no título do card (explicação que antes ficava em texto embaixo) */
.info-i { color: var(--muted); cursor: help; font-size: .9rem; margin-left: .4rem; opacity: .8; vertical-align: middle; }
.info-i:hover, .info-i:focus { color: var(--text); opacity: 1; outline: none; }
.tooltip-inner, .popover-body { text-align: left; max-width: 340px; }
/* números: zero neutro, negativo vermelho */
.v-zero { color: var(--muted) !important; } .v-neg { color: #fca5a5 !important; }
/* celular: alvos de toque ≥ 44 px */
@media (max-width: 767.98px) {
    #sidebarToggle, #userMenuBtn { min-width: 44px; min-height: 44px; display: inline-flex !important; align-items: center; justify-content: center; }
    .btn { min-height: 44px; } .btn-sm { min-height: 40px; min-width: 40px; }
    .pill { min-height: 40px; }
}

/* ── Celular (P2): rótulo antes de cada número do card, filtros quebram linha, gráficos/DRE legíveis ── */
@media (max-width: 767.98px) {
    table.m-cards td[data-rot] { font-size: .82rem; }
    table.m-cards td[data-rot]::before { content: attr(data-rot) " "; color: var(--muted); font-weight: 400; font-size: .72rem; margin-right: .15rem; }
    table.m-cards td[data-rot]:not(:last-child)::after { content: ""; }
    .barra-filtros.m-scroll, .filtros-bar, .ficha-tabs { flex-wrap: wrap !important; overflow: visible !important; }
    .dre .kpi .v { font-size: 1rem; white-space: normal; overflow-wrap: anywhere; }
    .dre .kpi .v .fs-6 { font-size: .75rem !important; }
    .dre .cc-esq { overflow-x: auto; border-right: 0; }
    .dre .kpi i.ic { display: none; }
    .div .eixo span { white-space: nowrap; font-size: .55rem; }
    .graf-dica-mouse { display: none; }
}
