/* ============================================================
   FRANPEL — CSS GLOBAL DO SISTEMA
   Arquivo: assets/css/franpel.css
   Visual: fundo escuro, vermelho #C8102E, branco
   ============================================================ */

/* --- RESET E BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Cores principais */
    --vermelho:      #C8102E;
    --vermelho-esc:  #9B0C23;
    --vermelho-cla:  #F4D0D5;
    --fundo-esc:     #1A1A1A;
    --fundo-med:     #242424;
    --fundo-cla:     #2E2E2E;
    --fundo-card:    #2A2A2A;
    --borda:         #3A3A3A;
    --borda-cla:     #444444;
    --branco:        #FFFFFF;
    --cinza-cla:     #E8E8E8;
    --cinza-med:     #AAAAAA;
    --cinza-esc:     #666666;

    /* Status */
    --verde:         #1E8449;
    --verde-bg:      #0D2B1A;
    --amarelo:       #D4AC0D;
    --amarelo-bg:    #2B2508;
    --azul:          #2E75B6;
    --azul-bg:       #0A1E35;
    --vermelho-bg:   #2B0A0F;   /* fundo de estado de perigo (os outros temas já definem) */

    /* Tipografia */
    --fonte:         'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --fonte-mono:    'Courier New', monospace;

    /* Tamanhos */
    --sidebar-w:     220px;
    --topbar-h:      56px;
    --radius:        6px;
    --radius-lg:     10px;
    --sombra:        0 2px 8px rgba(0,0,0,0.4);
}

html { font-size: 15px; }

body {
    font-family: var(--fonte);
    background:  var(--fundo-esc);
    color:       var(--branco);
    line-height: 1.6;
    min-height:  100vh;
}

a { color: var(--vermelho); text-decoration: none; }
a:hover { color: var(--vermelho-esc); text-decoration: underline; }

/* --- SCROLLBAR PERSONALIZADA --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--fundo-med); }
::-webkit-scrollbar-thumb { background: var(--borda-cla); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--cinza-esc); }

/* ============================================================
   LAYOUT PRINCIPAL
   ============================================================ */

.franpel-layout {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    grid-template-rows: var(--topbar-h) 1fr;
    min-height: 100vh;
}

/* --- TOPBAR --- */
.topbar {
    grid-column: 1 / -1;
    background:  var(--fundo-med);
    border-bottom: 1px solid var(--borda);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    min-width: calc(var(--sidebar-w) - 1.5rem);
}

.topbar-logo img {
    height: 32px;
    width: auto;
}

.topbar-logo span {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--vermelho);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.topbar-titulo {
    flex: 1;
    font-size: 0.95rem;
    color: var(--cinza-med);
}

.topbar-usuario {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.topbar-usuario .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--vermelho);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--branco);
    flex-shrink: 0;
}

.topbar-usuario .nome {
    font-size: 0.85rem;
    color: var(--cinza-cla);
}

.topbar-usuario .perfil {
    font-size: 0.75rem;
    color: var(--cinza-med);
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--borda-cla);
    color: var(--cinza-med);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}
.btn-logout:hover { border-color: var(--vermelho); color: var(--vermelho); }

/* --- SIDEBAR --- */
.sidebar {
    background: var(--fundo-med);
    border-right: 1px solid var(--borda);
    padding: 1rem 0;
    overflow-y: auto;
    position: sticky;
    top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
}

/* Busca rápida de módulo (Ctrl+K) — campo fica antes do 1º grupo */
.sidebar-busca-wrap {
    padding: 0 1rem 0.75rem;
}
.sidebar-busca {
    width: 100%;
    background: var(--fundo-cla);
    border: 1px solid var(--borda);
    border-radius: var(--radius);
    color: var(--branco);
    font-size: 0.78rem;
    padding: 0.4rem 0.65rem;
    outline: none;
    transition: border-color 0.15s;
}
.sidebar-busca::placeholder { color: var(--cinza-esc); }
.sidebar-busca:focus { border-color: var(--vermelho); }

/* Enquanto a busca está ativa (classe .buscando no .sidebar), os itens
   ficam visíveis independente do accordion normal (sem mexer na classe
   .aberto real dos grupos) — item/grupo sem match soma a classe
   .busca-oculto. Limpar o campo remove .buscando e tudo volta ao estado
   de accordion anterior sozinho, sem recomputar nada. */
.sidebar.buscando .sidebar-itens { display: block; }
.sidebar.buscando .sidebar-item.busca-oculto { display: none; }
.sidebar.buscando .sidebar-grupo.busca-oculto { display: none; }
.sidebar.buscando .sidebar-grupo:not(.busca-oculto) .sidebar-chevron {
    transform: rotate(180deg);
}

.sidebar-grupo {
    margin-bottom: 0.25rem;
}

.sidebar-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cinza-esc);
    padding: 0.75rem 1rem 0.25rem;
}

/* Grupos colapsáveis (accordion) — o label é um <button> */
button.sidebar-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    padding: 0.65rem 1rem;
    transition: color 0.15s;
}
button.sidebar-label:hover { color: var(--cinza-med); }
button.sidebar-label > span:first-child { flex: 1; }

.sidebar-chevron {
    font-size: 0.85rem;
    transition: transform 0.18s;
    flex-shrink: 0;
}
.sidebar-grupo.aberto .sidebar-chevron { transform: rotate(180deg); }

.sidebar-itens { display: none; }
.sidebar-grupo.aberto .sidebar-itens { display: block; }

/* Badge no cabeçalho do grupo (ex.: caixas pendentes) —
   visível só com o grupo fechado; aberto, o badge do item assume */
.grupo-badge {
    background: var(--vermelho);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 20px;
    min-width: 16px;
    text-align: center;
    flex-shrink: 0;
}
.sidebar-grupo.aberto .grupo-badge { display: none; }

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 1rem;
    color: var(--cinza-med);
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.sidebar-item:hover {
    background: var(--fundo-cla);
    color: var(--branco);
    text-decoration: none;
}

.sidebar-item.ativo {
    background: var(--fundo-cla);
    color: var(--branco);
    border-left-color: var(--vermelho);
}

.sidebar-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-sep {
    height: 1px;
    background: var(--borda);
    margin: 0.5rem 1rem;
}

/* --- CONTEÚDO PRINCIPAL --- */
.conteudo {
    padding: 1.5rem;
    overflow-y: auto;
}

/* ============================================================
   COMPONENTES
   ============================================================ */

/* --- CARDS --- */
.card {
    background: var(--fundo-card);
    border: 1px solid var(--borda);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.card-titulo {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--branco);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.card-titulo i { color: var(--vermelho); }

/* Título de página (h1 dentro de .page-header) — usado em
   partials/creditos_haver.php; nunca teve CSS (herdado do haver.php
   original, que também não definia). */
.page-titulo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--branco);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

/* --- KPIs --- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.kpi {
    background: var(--fundo-card);
    border: 1px solid var(--borda);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
}

.kpi-label {
    font-size: 0.75rem;
    color: var(--cinza-med);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.kpi-valor {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--branco);
    line-height: 1.2;
}

.kpi-sub {
    font-size: 0.75rem;
    color: var(--cinza-med);
    margin-top: 0.25rem;
}

.kpi.verde .kpi-valor  { color: var(--verde); }
.kpi.vermelho .kpi-valor { color: var(--vermelho); }
.kpi.amarelo .kpi-valor  { color: var(--amarelo); }
.kpi.azul .kpi-valor     { color: var(--azul); }

/* --- FICHA-STAT (cartão de estatística compacto) ---
   Usado em clientes.php, estoque.php e produtos.php — global porque mais
   de uma tela reaproveita. */
.ficha-stat {
    background: var(--fundo-cla);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    text-align: center;
    min-width: 0;
}
.ficha-stat-val {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ficha-stat-label { font-size: 0.7rem; color: var(--cinza-esc); line-height: 1.3; }

/* --- TABELAS --- */
.tabela-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
}

table.franpel {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

table.franpel thead th {
    background: var(--fundo-cla);
    color: var(--cinza-med);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.65rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--borda);
    white-space: nowrap;
}

table.franpel tbody td {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--borda);
    color: var(--cinza-cla);
    vertical-align: middle;
}

table.franpel tbody tr:last-child td { border-bottom: none; }

table.franpel tbody tr:hover td {
    background: var(--fundo-cla);
}

table.franpel td.direita,
table.franpel th.direita { text-align: right; }

table.franpel td.centro,
table.franpel th.centro  { text-align: center; }

table.franpel td.num,
table.franpel th.num     { text-align: right; }

/* --- BADGES DE STATUS --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    white-space: nowrap;
}

.badge.verde    { background: var(--verde-bg);   color: #5DBE8A; }
.badge.vermelho { background: #2B0A0F;           color: #F0837E; }
.badge.amarelo  { background: var(--amarelo-bg); color: #F5C842; }
.badge.azul     { background: var(--azul-bg);    color: #6AAEE0; }
.badge.cinza    { background: #232323;           color: var(--cinza-med); }
.badge.roxo     { background: rgba(127,119,221,.16); color: #A79FEE; }
.badge.laranja  { background: rgba(239,159,39,.14);  color: #F0A63F; }

/* --- BOTÕES --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    text-decoration: none;
}

.btn-primario {
    background: var(--vermelho);
    color: var(--branco);
}
.btn-primario:hover { background: var(--vermelho-esc); color: var(--branco); }

.btn-secundario {
    background: transparent;
    color: var(--cinza-cla);
    border: 1px solid var(--borda-cla);
}
.btn-secundario:hover { background: var(--fundo-cla); color: var(--branco); }

.btn-verde   { background: var(--verde);  color: var(--branco); }
.btn-verde:hover { background: #186038; color: var(--branco); }

.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.7rem 1.5rem;  font-size: 1rem; }

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-vermelho { background: var(--vermelho); color: #fff; border: none; }
.btn-vermelho:hover { background: #b91c1c; }

/* --- MODAIS ---
   .modal-overlay/.modal-box/.modal-titulo estavam copiados quase
   idênticos no <style> local de caixa.php, estrategia.php, pix.php,
   usuarios.php, vendedores.php e partials/creditos_haver.php — vieram
   pra cá pelo mesmo motivo do .busca-toggle/.ficha-stat acima (global
   porque mais de uma tela reaproveita). Onde um arquivo tinha um valor
   realmente diferente (cor de fundo, tamanho, z-index), o <style> local
   ficou só com essa diferença, documentada lá. */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.aberto { display: flex; }

.modal-box {
    background: var(--fundo-med);
    border: 1px solid var(--borda);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
}

.modal-titulo {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- ALTERNADOR DE ABAS (segmented control) ---
   Usado em clientes.php (Cliente/Pedido) e creditos_cliente.php (Haver/
   Crédito de Produto). Global porque mais de uma tela reaproveita. */
.busca-toggle {
    display: flex;
    background: var(--fundo-cla);
    border-radius: var(--radius);
    padding: 2px;
    gap: 2px;
}
.busca-toggle-btn {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    border: none;
    background: transparent;
    color: var(--cinza-med);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.busca-toggle-btn.ativo { background: var(--fundo-med); color: var(--branco); }

/* --- FORMULÁRIOS --- */
.form-grupo {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    color: var(--cinza-med);
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    background: var(--fundo-cla);
    border: 1px solid var(--borda-cla);
    border-radius: var(--radius);
    color: var(--branco);
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    font-family: var(--fonte);
    transition: border-color 0.15s;
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--vermelho);
}

.form-input::placeholder { color: var(--cinza-esc); }

.form-select option {
    background: var(--fundo-cla);
    color: var(--branco);
}

.form-textarea { resize: vertical; min-height: 80px; }

.form-erro {
    font-size: 0.78rem;
    color: #F0837E;
    margin-top: 0.25rem;
}

.form-linha {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* --- ALERTAS --- */
.alerta {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

.alerta i { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }

.alerta.verde    { background: var(--verde-bg);  color: #5DBE8A;  border: 1px solid #1E5C35; }
.alerta.vermelho { background: #2B0A0F;          color: #F0837E;  border: 1px solid #5C1A1A; }
.alerta.amarelo  { background: var(--amarelo-bg);color: #F5C842;  border: 1px solid #5C4A0D; }
.alerta.azul     { background: var(--azul-bg);   color: #6AAEE0;  border: 1px solid #0E3560; }

/* --- DIVISOR --- */
.divisor {
    height: 1px;
    background: var(--borda);
    margin: 1.25rem 0;
}

/* --- LOADING --- */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--cinza-med);
    gap: 0.5rem;
    font-size: 0.9rem;
}

.spinner {
    width: 18px; height: 18px;
    border: 2px solid var(--borda-cla);
    border-top-color: var(--vermelho);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* --- RESPONSIVIDADE --- */
@media (max-width: 768px) {

    /* ── LAYOUT BASE ────────────────────────────────────── */
    .franpel-layout { grid-template-columns: 1fr }
    .conteudo {
        padding: .75rem .75rem 80px;
        margin: 0;
        max-width: 100%;
    }

    /* ── TOPBAR ─────────────────────────────────────────── */
    .topbar { padding: 0 .85rem }
    .topbar-titulo { display: none }
    .topbar-usuario span { display: none }
    .topbar-usuario .avatar { width: 32px; height: 32px; font-size: .8rem }

    /* ── SIDEBAR — gaveta lateral ───────────────────────── */
    .sidebar {
        display: none;
        position: fixed;
        top: var(--topbar-h);
        left: 0;
        width: 280px;
        height: calc(100vh - var(--topbar-h));
        z-index: 200;
        overflow-y: auto;
        box-shadow: 4px 0 20px rgba(0,0,0,.5);
    }
    .sidebar.aberto { display: block }
    .sidebar.aberto::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.5);
        z-index: -1;
    }

    /* ── KPIs ───────────────────────────────────────────── */
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: .5rem;
    }
    .kpi { padding: .65rem .75rem }
    .kpi-label { font-size: .7rem }
    .kpi-valor { font-size: 1.2rem }
    .kpi-sub   { font-size: .68rem }

    /* ── CARDS ──────────────────────────────────────────── */
    .card { padding: .75rem }
    .card-titulo {
        font-size: .85rem;
        flex-wrap: wrap;
        gap: .35rem;
    }

    /* ── GRIDS ──────────────────────────────────────────── */
    .cols-2 { grid-template-columns: 1fr }
    .cols-3 { grid-template-columns: 1fr }

    /* Colunas fixas de importação viram blocos */
    div[style*="grid-template-columns:260px"],
    div[style*="grid-template-columns:320px"],
    div[style*="grid-template-columns:340px"] {
        display: block !important;
    }

    /* Coluna esquerda de importação — oculta no mobile */
    div[style*="grid-template-columns:260px"] > div:first-child,
    div[style*="grid-template-columns:320px"] > div:first-child,
    div[style*="grid-template-columns:340px"] > div:first-child {
        display: none;
    }

    /* Meta cards — 1 coluna */
    div[style*="repeat(auto-fill,minmax(320px"] {
        grid-template-columns: 1fr !important;
    }

    /* ── TABELAS ────────────────────────────────────────── */
    .tabela-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch }
    .franpel { font-size: .76rem; min-width: 480px }
    .franpel th, .franpel td { padding: .4rem .55rem }
    .franpel .hide-mobile { display: none }

    /* ── FORMULÁRIOS ────────────────────────────────────── */
    .form-linha { grid-template-columns: 1fr }
    .form-input, .form-select { font-size: 16px } /* evita zoom iOS */

    /* ── FILTROS ────────────────────────────────────────── */
    .filtros-card form {
        grid-template-columns: 1fr 1fr !important;
        gap: .5rem !important;
    }

    /* ── ABAS ───────────────────────────────────────────── */
    .tabs-rel, .tabs-ins, .tabs-m, .rh-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }
    .tabs-rel::-webkit-scrollbar,
    .tabs-ins::-webkit-scrollbar,
    .tabs-m::-webkit-scrollbar { display: none }
    .tab-rel, .tab-ins, .tab-m {
        white-space: nowrap;
        font-size: .76rem;
        padding: .5rem .65rem;
    }

    /* ── TOOLTIPS ───────────────────────────────────────── */
    .tip-balao { max-width: calc(100vw - 24px) }

    /* ── BOTÕES ─────────────────────────────────────────── */
    .fab-imprimir { bottom: 70px; right: 1rem; width: 42px; height: 42px }
    .btn { font-size: .82rem; padding: .45rem .85rem }
    .btn-sm { font-size: .76rem; padding: .3rem .65rem }

    /* ── ALERTAS ────────────────────────────────────────── */
    .alerta { font-size: .8rem; padding: .65rem .85rem }

    /* ── UTILITÁRIOS MOBILE ─────────────────────────────── */
    .no-mobile { display: none !important }
    .only-mobile { display: block !important }
    .no-print { display: block }

    /* ── DASHBOARD MOBILE ───────────────────────────────── */
    /* Gráfico e seções secundárias — esconder no mobile */
    .dash-grafico-wrap { display: none }
    /* Top clientes e vendedores ficam visíveis mas em 1 col */
    .dash-grid-2 { grid-template-columns: 1fr !important }
}

/* ── TELAS MUITO PEQUENAS (< 400px) ─────────────────────────── */
@media (max-width: 400px) {
    .kpi-grid { grid-template-columns: 1fr }
    .kpi-valor { font-size: 1.1rem }
    .filtros-card form { grid-template-columns: 1fr !important }
    .conteudo { padding: .6rem .6rem 80px }
}

/* ── TABLET (769px - 1024px) ────────────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr) }
    .cols-3 { grid-template-columns: 1fr 1fr }
    div[style*="grid-template-columns:260px"] {
        grid-template-columns: 220px 1fr !important;
    }
}

/* ── NAVEGAÇÃO INFERIOR MOBILE ──────────────────────────────── */
.mobile-nav { display: none }

@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 58px;
        background: var(--fundo-med);
        border-top: 1px solid var(--borda);
        z-index: 300;
        align-items: stretch;
        box-shadow: 0 -2px 12px rgba(0,0,0,.3);
    }

    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        text-decoration: none;
        color: var(--cinza-esc);
        font-size: .58rem;
        font-weight: 500;
        padding: .25rem 0;
        transition: color .15s;
        position: relative;
    }
    .mobile-nav-item i { font-size: 1.2rem }
    .mobile-nav-item.ativo { color: var(--vermelho) }
    .mobile-nav-item.ativo i { color: var(--vermelho) }
    .mobile-nav-item:active { opacity: .7 }

    /* Badge de notificação na nav */
    .mobile-nav-item .nav-badge {
        position: absolute;
        top: 4px;
        right: calc(50% - 16px);
        background: var(--vermelho);
        color: #fff;
        font-size: .55rem;
        font-weight: 700;
        padding: 0 4px;
        border-radius: 10px;
        min-width: 14px;
        text-align: center;
        line-height: 14px;
    }
}


/* --- UTILITÁRIOS --- */
.mt-1  { margin-top: 0.5rem; }
.mt-2  { margin-top: 1rem; }
.mb-1  { margin-bottom: 0.5rem; }
.mb-2  { margin-bottom: 1rem; }
.flex  { display: flex; }
.flex-entre { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.texto-direita { text-align: right; }
.texto-centro  { text-align: center; }
.negrito { font-weight: 600; }
.verde-texto    { color: var(--verde); }
.vermelho-texto { color: var(--vermelho); }
.amarelo-texto  { color: var(--amarelo); }
.cinza-texto    { color: var(--cinza-med); }
.azul-texto     { color: var(--azul-texto); }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.cols-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.25rem; }