/* =============================================================================
 * HERMES BI — ANALYTICS AVANÇADO, CURVA ABC, EXCEL & BOLETIM
 * Compativel com Apple Liquid Glass Dark Mode, Mobile e body.theme-light
 * ============================================================================= */

.btn-relatorios-hermes {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(118, 216, 0, 0.16), rgba(16, 185, 129, 0.14));
    border: 1px solid rgba(118, 216, 0, 0.42);
    color: #b7ff66;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    white-space: nowrap;
}

.btn-relatorios-hermes:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, rgba(118, 216, 0, 0.25), rgba(16, 185, 129, 0.22));
    box-shadow: 0 6px 18px rgba(118, 216, 0, 0.18);
}

.hermes-mobile-quickbar {
    display: none;
    gap: 8px;
    margin-bottom: 14px;
}

@media (max-width: 900px) {
    #btnRelatoriosCentralDesktop {
        display: none !important;
    }
    .hermes-mobile-quickbar {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .hermes-mobile-quickbtn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 10px 10px;
        border-radius: 12px;
        border: 1px solid rgba(118, 216, 0, 0.32);
        background: rgba(118, 216, 0, 0.10);
        color: #c4ff7c;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
    }
    .hermes-mobile-quickbtn.secondary {
        border-color: rgba(56, 189, 248, 0.35);
        background: rgba(56, 189, 248, 0.10);
        color: #7dd3fc;
    }
}

/* Identidade da Loja no Topo Mobile + Compartilhar dentro do Card Faturamento + Hero Integrado */
.mobile-store-identity-strip {
    display: none;
}

.hermes-share-mini-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 10px;
    border: 1px solid rgba(118, 216, 0, 0.40);
    background: linear-gradient(135deg, rgba(118, 216, 0, 0.16), rgba(16, 185, 129, 0.12));
    color: #c4ff7c;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    transition: transform 0.15s ease, background 0.15s ease;
}

.hermes-share-mini-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, rgba(118, 216, 0, 0.26), rgba(16, 185, 129, 0.22));
}

.hermes-share-mini-btn svg {
    flex-shrink: 0;
}

/* Desktop: Header da Loja limpo e Faturamento + Compartilhar + Meta/Recorde na horizontal */
@media (min-width: 769px) {
    #storeBiSection .store-bi-header-container {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 18px !important;
    }
    #storeBiSection .store-bi-title-group {
        margin-top: 0 !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    #storeBiSection .hermes-store-title-main {
        min-width: 0 !important;
    }
}

/* Integração Meta + Recorde + Compartilhar dentro do Card de Faturamento */
#storeBiSection #bi-subtab-vendas .kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-bottom: 18px !important;
}

#storeBiSection #cardKpiFaturamentoHero.hermes-fat-hero {
    grid-column: 1 / -1 !important;
    order: -1 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 460px) !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 15px 18px !important;
}

#storeBiSection #cardKpiFaturamentoHero .hermes-fat-top-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    min-width: 0 !important;
    width: 100% !important;
}

#storeBiSection #cardKpiFaturamentoHero .hermes-fat-top-row .kpi-info {
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

#storeBiSection #cardKpiFaturamentoHero.hermes-fat-hero .hermes-hero-perf {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin: 0 !important;
    width: 100% !important;
}

#storeBiSection #cardKpiFaturamentoHero.hermes-fat-hero .hermes-hero-perf.single-card {
    grid-template-columns: 1fr !important;
}

#storeBiSection #cardKpiFaturamentoHero .perf-card {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    border-radius: 13px !important;
    padding: 10px 12px !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    min-height: 0 !important;
    min-width: 0 !important;
    text-align: left !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    gap: 4px !important;
    cursor: pointer !important;
}

#storeBiSection #cardKpiFaturamentoHero .perf-card.meta-card {
    border-color: rgba(16, 185, 129, 0.25) !important;
}

#storeBiSection #cardKpiFaturamentoHero .perf-card.record-card {
    border-color: rgba(245, 208, 97, 0.28) !important;
}

#storeBiSection #cardKpiFaturamentoHero .perf-card-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    margin: 0 !important;
    width: 100% !important;
}

#storeBiSection #cardKpiFaturamentoHero .perf-card-tag {
    font-size: 9px !important;
    font-weight: 800 !important;
    letter-spacing: 0.35px !important;
    white-space: nowrap !important;
}

@media (max-width: 768px) {
    /* Mobile: nome do restaurante sobe para o cabeçalho verde do topo e oculta o card redundante Voltar/Atualizar */
    body.in-store-bi .topbar {
        gap: 9px !important;
        margin-bottom: 12px !important;
    }

    body.in-store-bi #mobileStoreIdentityStrip {
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
        padding: 8px 10px !important;
        border-radius: 12px !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.10) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .mobile-store-id-row {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        min-width: 0 !important;
    }

    .mobile-store-id-row strong {
        font-size: 14.5px !important;
        font-weight: 800 !important;
        color: #ffffff !important;
        letter-spacing: -0.2px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        min-width: 0 !important;
    }

    .mobile-store-id-row .badge {
        font-size: 10px !important;
        padding: 2px 7px !important;
        flex-shrink: 0 !important;
    }

    #mobileTopStoreSub {
        font-size: 10.5px !important;
        color: #94a3b8 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    body.theme-light #mobileStoreIdentityStrip {
        background: rgba(15, 23, 42, 0.04) !important;
        border-color: rgba(15, 23, 42, 0.10) !important;
    }

    body.theme-light .mobile-store-id-row strong {
        color: #0f172a !important;
    }

    body.theme-light #mobileTopStoreSub {
        color: #475569 !important;
    }

    #storeBiSection .store-bi-header-container {
        display: none !important;
    }

    #storeBiSection .store-bi-card:not(.has-channels) {
        display: none !important;
    }

    #storeBiSection .store-bi-card.has-channels {
        padding: 10px 12px !important;
        margin-bottom: 12px !important;
    }

    #storeBiSection .store-bi-card.has-channels #biChannelsContainer {
        margin-top: 0 !important;
    }
}

#storeBiSection #cardKpiFaturamentoHero .btn-perf-action,
#storeBiSection #cardKpiFaturamentoHero .perf-badge-gold {
    padding: 2px 7px !important;
    font-size: 9.5px !important;
    border-radius: 999px !important;
    margin: 0 !important;
}

#storeBiSection #cardKpiFaturamentoHero .perf-card-body {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
    width: 100% !important;
    text-align: left !important;
}

#storeBiSection #cardKpiFaturamentoHero .perf-value {
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    margin: 0 !important;
    width: auto !important;
    text-align: left !important;
    white-space: nowrap !important;
}

#storeBiSection #cardKpiFaturamentoHero .perf-sub {
    font-size: 10.5px !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    width: 100% !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: var(--text-muted, #94a3b8) !important;
}

#storeBiSection #cardKpiFaturamentoHero .perf-progress-bg {
    height: 4px !important;
    margin: 3px 0 0 !important;
}

#storeBiSection #cardKpiFaturamentoHero .perf-card.is-full-width {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 9px 13px !important;
}

#storeBiSection #cardKpiFaturamentoHero .perf-card.is-full-width .perf-card-header {
    width: auto !important;
    flex: 0 0 auto !important;
    gap: 6px !important;
}

#storeBiSection #cardKpiFaturamentoHero .perf-card.is-full-width .perf-card-body {
    width: auto !important;
    flex: 1 1 auto !important;
    flex-direction: row !important;
    align-items: baseline !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    min-width: 0 !important;
}

#storeBiSection #cardKpiFaturamentoHero .perf-card.is-full-width .perf-sub {
    width: auto !important;
    flex: 0 1 auto !important;
}

@media (max-width: 960px) {
    #storeBiSection #bi-subtab-vendas .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
        margin-bottom: 14px !important;
    }

    #storeBiSection #cardKpiFaturamentoHero.hermes-fat-hero {
        grid-column: 1 / -1 !important;
        order: -1 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 13px 14px 11px !important;
        gap: 9px !important;
    }

    #storeBiSection #cardKpiFaturamentoHero .hermes-fat-top-row {
        align-items: flex-start !important;
        gap: 10px !important;
    }

    #storeBiSection #cardKpiFaturamentoHero .hermes-fat-top-row .kpi-icon {
        display: none !important;
    }

    #storeBiSection #cardKpiFaturamentoHero.hermes-fat-hero .hermes-hero-perf {
        padding-top: 9px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.09) !important;
        gap: 8px !important;
    }

    #storeBiSection #cardKpiFaturamentoHero .perf-card {
        padding: 8px 10px !important;
        border-radius: 12px !important;
    }

    #storeBiSection #cardKpiFaturamentoHero .perf-value {
        font-size: 14px !important;
    }

    #storeBiSection #cardKpiFaturamentoHero .perf-card.is-full-width {
        padding: 7px 11px !important;
    }

    #storeBiSection #cardKpiFaturamentoHero .perf-card.is-full-width .perf-badge-gold {
        display: none !important;
    }

    #storeBiSection #bi-subtab-vendas .kpi-grid .kpi-card:nth-child(2),
    #storeBiSection #bi-subtab-vendas .kpi-grid .kpi-card:nth-child(3) {
        grid-column: span 1 !important;
        order: initial !important;
        padding: 11px 10px !important;
    }
}

@media (max-width: 480px) {
    #storeBiSection #cardKpiFaturamentoHero .hermes-share-mini-btn span {
        display: none;
    }
    #storeBiSection #cardKpiFaturamentoHero .hermes-share-mini-btn {
        width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 11px;
    }
    #storeBiSection #cardKpiFaturamentoHero .hermes-share-mini-btn.is-locked-pro {
        width: auto;
        height: 34px;
        padding: 0 9px;
        gap: 5px;
    }
    #storeBiSection #cardKpiFaturamentoHero .hermes-share-mini-btn.is-locked-pro .hermes-pro-pill-inline {
        display: inline-flex;
    }
}

.share-status-loading {
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.32);
    color: #bae6fd;
    padding: 9px 12px;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 10px;
}

.share-ready-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(118, 216, 0, 0.10));
    border: 1px solid rgba(16, 185, 129, 0.45);
    border-radius: 13px;
    padding: 11px 13px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.share-ready-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.share-ready-top strong {
    font-size: 13px;
    color: #34d399;
}

.share-ready-top small {
    font-size: 11px;
    color: #cbd5e1;
    word-break: break-all;
}

.share-ready-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.share-card-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.relatorio-option-card.is-pdf-featured {
    border-color: rgba(118, 216, 0, 0.35);
    background: linear-gradient(135deg, rgba(118, 216, 0, 0.08), rgba(255, 255, 255, 0.03));
}

body.theme-light .hermes-share-mini-btn {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

body.theme-light #cardKpiFaturamentoHero.hermes-fat-hero .hermes-hero-perf {
    border-top-color: rgba(15, 23, 42, 0.08) !important;
}

body.theme-light #cardKpiFaturamentoHero .perf-card {
    background: rgba(248, 250, 252, 0.92) !important;
    border-color: #e2e8f0 !important;
}

body.theme-light #cardKpiFaturamentoHero .perf-value {
    color: #0f172a !important;
}

body.theme-light #cardKpiFaturamentoHero .perf-card.record-card .perf-value {
    color: #b45309 !important;
}

body.theme-light #cardKpiFaturamentoHero .perf-sub {
    color: #475569 !important;
}

body.theme-light .share-ready-banner {
    background: #ecfdf5;
    border-color: #6ee7b7;
}

body.theme-light .share-ready-top strong {
    color: #047857;
}

body.theme-light .share-ready-top small {
    color: #334155;
}

/* Cabeçalho padrão dos novos cards */
.hermes-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.hermes-card-head h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main, #ffffff);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hermes-card-head .card-desc {
    margin: 4px 0 0;
}

.hermes-head-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hermes-segmented {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.hermes-seg-btn {
    border: none;
    background: transparent;
    color: var(--text-muted, #94a3b8);
    font-size: 11.5px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.hermes-seg-btn.active {
    background: rgba(118, 216, 0, 0.2);
    color: #b7ff66;
    box-shadow: inset 0 0 0 1px rgba(118, 216, 0, 0.38);
}

.hermes-excel-mini-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    border-radius: 9px;
    font-size: 11.5px;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.hermes-excel-mini-btn:hover {
    background: rgba(16, 185, 129, 0.24);
}

/* Chavinha Horário de Consumo vs Pagamento + Botão ? */
.horarios-mode-bar {
    position: relative;
    margin-bottom: 14px;
}

.horarios-mode-switch-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.horarios-mode-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted, #94a3b8);
    white-space: nowrap;
}

.horarios-mode-seg {
    max-width: 100%;
}

.horarios-help-btn {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.42);
    background: rgba(56, 189, 248, 0.14);
    color: #7dd3fc;
    font-size: 13px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.horarios-help-btn:hover,
.horarios-help-btn.is-open {
    background: rgba(56, 189, 248, 0.28);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
    transform: translateY(-1px);
}

.horarios-help-popover {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 13px;
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 680px;
}

.horarios-help-popover[hidden] {
    display: none !important;
}

.horarios-help-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12.5px;
    color: #bae6fd;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 7px;
}

.horarios-help-close {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.horarios-help-item strong {
    display: block;
    font-size: 12px;
    color: #ffffff;
    margin-bottom: 3px;
}

.horarios-help-item p {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.45;
    color: #cbd5e1;
}

.horarios-coverage-note {
    font-size: 11.5px;
    line-height: 1.35;
    color: #bae6fd;
    background: rgba(56, 189, 248, 0.10);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 10px;
    padding: 7px 11px;
    margin-bottom: 12px;
}

@media (max-width: 560px) {
    .horarios-mode-label {
        display: none;
    }
    .horarios-mode-switch-wrap {
        width: 100%;
        flex-wrap: nowrap;
        gap: 6px;
    }
    .horarios-mode-seg {
        flex: 1 1 auto;
        min-width: 0;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .horarios-mode-seg .hermes-seg-btn {
        font-size: 11px;
        line-height: 1.2;
        padding: 6px 6px;
        text-align: center;
        white-space: normal;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .horarios-help-btn {
        width: 28px;
        height: 28px;
    }
}

body.theme-light .horarios-help-btn {
    background: #e0f2fe;
    border-color: #38bdf8;
    color: #0369a1;
}

body.theme-light .horarios-help-popover {
    background: #ffffff;
    border-color: #bae6fd;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

body.theme-light .horarios-help-head {
    color: #0369a1;
    border-bottom-color: #e2e8f0;
}

body.theme-light .horarios-help-close {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

body.theme-light .horarios-help-item strong {
    color: #0f172a;
}

body.theme-light .horarios-help-item p {
    color: #475569;
}

body.theme-light .horarios-coverage-note {
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #0369a1;
}

/* Destaques Picos Horários */
.horarios-highlights-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

@media (max-width: 720px) {
    .hermes-head-controls {
        width: 100%;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 6px;
    }
    .hermes-head-controls .hermes-segmented {
        flex: 1 1 auto;
        min-width: 0;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
    }
    .hermes-head-controls .hermes-seg-btn {
        padding: 6px 5px;
        font-size: 11px;
        text-align: center;
    }
    .hermes-head-controls .hermes-excel-mini-btn {
        flex-shrink: 0;
        padding: 6px 9px;
        font-size: 11px;
    }
    .horarios-highlights-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .horario-highlight-pill.peak-fat {
        grid-column: 1 / -1;
    }
    .horario-highlight-pill {
        padding: 10px 11px;
    }
}

.horario-highlight-pill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 11px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.horario-highlight-pill.peak-fat {
    border-color: rgba(118, 216, 0, 0.28);
    background: linear-gradient(135deg, rgba(118, 216, 0, 0.08), rgba(255, 255, 255, 0.02));
}

.horario-highlight-pill.peak-com {
    border-color: rgba(56, 189, 248, 0.28);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(255, 255, 255, 0.02));
}

.horario-highlight-pill.peak-tm {
    border-color: rgba(245, 158, 11, 0.28);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(255, 255, 255, 0.02));
}

.hl-kicker {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted, #94a3b8);
}

.hl-main {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main, #ffffff);
}

.hl-sub {
    font-size: 11.5px;
    color: var(--text-muted, #94a3b8);
}

/* Gráfico de Barras Interativo por Hora */
.horarios-chart-scroll {
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 14px;
    scrollbar-width: thin;
}

.horarios-bars-wrap {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    min-height: 170px;
    padding: 20px 8px 6px;
    background: rgba(0, 0, 0, 0.20);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    min-width: max-content;
}

@media (min-width: 900px) {
    .horarios-bars-wrap {
        min-width: 100%;
    }
}

.hora-bar-col {
    flex: 1 1 36px;
    min-width: 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 4px 2px;
    border-radius: 10px;
    transition: background 0.15s ease, opacity 0.15s ease;
    border: 1px solid transparent;
}

.hora-bar-col:hover {
    background: rgba(255, 255, 255, 0.05);
}

.hora-bar-col.is-dimmed {
    opacity: 0.36;
}

.hora-bar-col.is-selected {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.38);
}

.hora-bar-topval {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 5px;
    white-space: nowrap;
}

.hora-bar-track {
    width: 100%;
    max-width: 26px;
    height: 108px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    overflow: hidden;
}

.hora-bar-fill {
    width: 100%;
    min-height: 4px;
    border-radius: 7px 7px 3px 3px;
    background: linear-gradient(180deg, #76D800 0%, rgba(118, 216, 0, 0.45) 100%);
    transition: height 0.3s ease;
}

.hora-bar-col.is-peak .hora-bar-fill {
    background: linear-gradient(180deg, #F59E0B 0%, #ea580c 100%);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.hora-bar-col.is-selected .hora-bar-fill {
    background: linear-gradient(180deg, #38BDF8 0%, #0284c7 100%);
}

.hora-bar-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-main, #e2e8f0);
    margin-top: 6px;
}

.hora-bar-sub {
    font-size: 9.5px;
    color: var(--text-muted, #94a3b8);
}

.horarios-hint-click {
    font-size: 11.5px;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 4 Turnos */
.turnos-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

@media (max-width: 900px) {
    .turnos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.turno-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: left;
}

.turno-card:hover {
    border-color: rgba(118, 216, 0, 0.35);
    background: rgba(255, 255, 255, 0.05);
}

.turno-card.active {
    border-color: #F59E0B;
    background: rgba(245, 158, 11, 0.10);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25);
}

.turno-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text-main, #ffffff);
}

.turno-faixa {
    font-size: 10.5px;
    color: var(--text-muted, #94a3b8);
    margin-top: 2px;
}

.turno-val {
    font-size: 15px;
    font-weight: 800;
    color: #76D800;
    margin-top: 8px;
}

.turno-meta {
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
    margin-top: 3px;
}

.turno-bar-bg {
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    margin-top: 8px;
    overflow: hidden;
}

.turno-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #76D800, #38BDF8);
}

/* Recorte Recorrente de Faixa Horária */
.recorte-box {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: 16px;
    padding: 14px;
}

.recorte-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.recorte-title-row strong {
    font-size: 13.5px;
    color: #e0f2fe;
}

.recorte-presets {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 11px;
}

@media (max-width: 900px) {
    .recorte-presets {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }
}

.recorte-preset-pill {
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-main, #e2e8f0);
    cursor: pointer;
    transition: all 0.15s ease;
}

.recorte-presets .recorte-preset-pill {
    border-radius: 11px;
    padding: 7px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    line-height: 1.2;
    text-align: center;
    min-width: 0;
}

.recorte-presets .recorte-preset-pill span {
    font-size: 11.5px;
    font-weight: 800;
    white-space: nowrap;
}

.recorte-presets .recorte-preset-pill small {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
}

.recorte-preset-pill.active {
    background: rgba(56, 189, 248, 0.22);
    border-color: #38BDF8;
    color: #bae6fd;
}

.recorte-presets .recorte-preset-pill.active small {
    color: #e0f2fe;
}

.recorte-inputs-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.recorte-times-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.recorte-time-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted, #94a3b8);
}

.recorte-time-field input[type="time"] {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    padding: 6px 8px;
    color: var(--text-main, #ffffff);
    font-size: 12.5px;
    font-weight: 700;
}

.recorte-dow-pills {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
    align-items: center;
}

.recorte-dow-pill {
    padding: 6px 4px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    text-align: center;
}

.recorte-dow-pill.active {
    background: rgba(118, 216, 0, 0.22);
    border-color: rgba(118, 216, 0, 0.55);
    color: #b7ff66;
}

.recorte-apply-btn {
    padding: 7px 14px;
    font-size: 12px;
    white-space: nowrap;
}

@media (max-width: 860px) {
    .recorte-inputs-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .recorte-times-group {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }
    .recorte-time-field {
        width: 100%;
        justify-content: space-between;
    }
    .recorte-time-field input[type="time"] {
        flex: 1 1 auto;
        min-width: 0;
    }
    .recorte-apply-btn {
        width: 100%;
        justify-content: center;
    }
}

.recorte-result-panel {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.recorte-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

@media (max-width: 720px) {
    .recorte-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.recorte-kpi-box {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 10px;
    padding: 9px 10px;
}

.recorte-kpi-box small {
    display: block;
    font-size: 10.5px;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 2px;
}

.recorte-kpi-box strong {
    font-size: 14px;
    color: var(--text-main, #ffffff);
}

.recorte-prods-title {
    font-size: 12px;
    font-weight: 700;
    color: #bae6fd;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.recorte-prods-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

@media (max-width: 760px) {
    .recorte-prods-list {
        grid-template-columns: 1fr;
    }
}

.recorte-prod-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    min-width: 0;
}

.recorte-prod-left {
    min-width: 0;
    flex: 1;
}

.recorte-prod-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main, #ffffff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recorte-prod-meta {
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
}

.recorte-prod-val {
    text-align: right;
    white-space: nowrap;
    font-size: 12.5px;
    font-weight: 800;
    color: #76D800;
}

/* Dia da Semana */
.dow-summary-badges {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

@media (max-width: 760px) {
    .dow-summary-badges {
        grid-template-columns: 1fr;
    }
}

.dow-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    min-width: 0;
}

.dow-badge-pill.best {
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.dow-badge-pill.worst {
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
}

.dow-grid-7 {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

@media (max-width: 960px) {
    .dow-grid-7 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dow-day-card:last-child {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "head main"
            "bar bar"
            "sub sub";
        align-items: center;
        column-gap: 12px;
        row-gap: 5px;
        padding: 11px 12px;
    }
    .dow-day-card:last-child .dow-day-head {
        grid-area: head;
        justify-content: flex-start;
        gap: 8px;
    }
    .dow-day-card:last-child .dow-day-mainval {
        grid-area: main;
        text-align: right;
    }
    .dow-day-card:last-child .dow-bar-track {
        grid-area: bar;
    }
    .dow-day-card:last-child .dow-day-sub {
        grid-area: sub;
    }
}

.dow-day-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 13px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.dow-day-card.is-best {
    border-color: rgba(16, 185, 129, 0.45);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.12), rgba(255, 255, 255, 0.02));
}

.dow-day-card.is-closed {
    opacity: 0.48;
}

.dow-day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--text-main, #ffffff);
}

.dow-day-open {
    font-size: 9.5px;
    color: var(--text-muted, #94a3b8);
    white-space: nowrap;
}

.dow-bar-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 99px;
    overflow: hidden;
    margin: 2px 0;
}

.dow-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #38BDF8, #76D800);
}

.dow-day-card.is-best .dow-bar-fill {
    background: linear-gradient(90deg, #10B981, #76D800);
}

.dow-day-mainval {
    font-size: clamp(11px, 0.95vw, 13px);
    font-weight: 800;
    color: var(--text-main, #ffffff);
    white-space: nowrap;
}

.dow-day-sub {
    font-size: 10.5px;
    color: var(--text-muted, #94a3b8);
    line-height: 1.35;
}

/* Curva ABC Completa & Sem Venda (Donut Integrado) */
.abc-module-box {
    margin-top: 4px;
    padding-top: 4px;
}

.abc-donut-hero {
    display: grid;
    grid-template-columns: 184px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
    margin-bottom: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 720px) {
    .abc-donut-hero {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 14px;
        padding: 12px;
    }
}

.abc-donut-ring-box {
    position: relative;
    width: 172px;
    height: 172px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.abc-donut-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}

.abc-donut-center {
    position: absolute;
    width: 106px;
    height: 106px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6px;
    pointer-events: none;
}

.abc-donut-center small {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: var(--text-muted, #94a3b8);
}

.abc-donut-center strong {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--text-main, #ffffff);
    margin: 2px 0 1px;
}

.abc-donut-center span {
    font-size: 10.5px;
    font-weight: 700;
    color: #76D800;
}

.abc-curve-side {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.abc-curve-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.abc-filter-hint {
    font-size: 11px;
    font-weight: 700;
    color: #7dd3fc;
}

.abc-curve-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.abc-curve-card {
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 9px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text-main, #f8fafc);
}

.abc-curve-card:hover {
    background: rgba(255, 255, 255, 0.06);
}

.abc-curve-card.c-A.active { border-color: #10B981; background: rgba(16, 185, 129, 0.12); }
.abc-curve-card.c-B.active { border-color: #F59E0B; background: rgba(245, 158, 11, 0.12); }
.abc-curve-card.c-C.active { border-color: #94A3B8; background: rgba(148, 163, 184, 0.14); }

.abc-curve-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12.5px;
}

.abc-curve-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}

.abc-curve-title small {
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
}

.abc-curve-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    flex-shrink: 0;
}

.abc-curve-pct {
    font-weight: 800;
    font-size: 12.5px;
    white-space: nowrap;
}

.abc-curve-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--text-muted, #94a3b8);
}

.abc-curve-card-bottom strong {
    color: var(--text-main, #ffffff);
    font-size: 12.5px;
}

.abc-curve-bar-bg {
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    margin-top: 6px;
    overflow: hidden;
}

.abc-curve-bar-fill {
    height: 100%;
    border-radius: 99px;
}

.abc-switches-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Gráfico Top 10 Horizontal Integrado (R$ e Qtd/Vol.) */
.top10-chart-box {
    padding: 14px;
    margin-bottom: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.top10-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.top10-chart-header strong {
    display: block;
    font-size: 13.5px;
    color: var(--text-main, #ffffff);
}

.top10-chart-header small {
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
}

.top10-share-pill {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(118, 216, 0, 0.14);
    border: 1px solid rgba(118, 216, 0, 0.32);
    color: #b7ff66;
    white-space: nowrap;
}

.top10-bars-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.top10-bar-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.top10-bar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.top10-bar-title {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex: 1;
}

.top10-rank {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted, #94a3b8);
    min-width: 22px;
}

.top10-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main, #ffffff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top10-val-wrap {
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}

.top10-val-wrap strong {
    font-size: 12.5px;
    font-weight: 800;
    color: #76D800;
}

.top10-val-wrap small {
    font-size: 10px;
    color: var(--text-muted, #94a3b8);
}

.top10-track {
    height: 7px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.top10-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.25s ease;
}

.abc-rest-caption {
    font-size: 11.5px;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 8px;
}

.abc-tabs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.abc-tab-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.abc-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 13px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
}

.abc-tab-btn.active {
    background: rgba(118, 216, 0, 0.16);
    border-color: rgba(118, 216, 0, 0.45);
    color: #c4ff7c;
}

.abc-count-badge {
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10.5px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.abc-summary-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.abc-class-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main, #e2e8f0);
    white-space: nowrap;
}

.abc-class-chip.active {
    box-shadow: 0 0 0 1px currentColor;
}

.abc-class-chip.c-A { color: #34d399; border-color: rgba(16, 185, 129, 0.32); }
.abc-class-chip.c-B { color: #fbbf24; border-color: rgba(245, 158, 11, 0.32); }
.abc-class-chip.c-C { color: #94a3b8; border-color: rgba(148, 163, 184, 0.32); }

.abc-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.abc-search-input {
    flex: 1 1 220px;
    min-width: 160px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12.5px;
    color: var(--text-main, #ffffff);
}

@media (max-width: 780px) {
    .abc-tabs-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .abc-tab-pills {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }
    .abc-tab-btn {
        width: 100%;
        justify-content: space-between;
        padding: 8px 10px;
        font-size: 11.5px;
        white-space: nowrap;
        min-width: 0;
    }
    .abc-tab-btn span:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .abc-switches-group {
        display: grid;
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
        gap: 8px;
        width: 100%;
    }
    .abc-switches-group .hermes-segmented {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }
    .abc-switches-group .hermes-seg-btn {
        padding: 6px 4px;
        font-size: 11px;
        text-align: center;
    }
    .abc-toolbar {
        flex-wrap: nowrap;
        gap: 8px;
    }
    .abc-search-input {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 12px;
        padding: 8px 10px;
    }
    .abc-toolbar .hermes-excel-mini-btn {
        flex-shrink: 0;
        padding: 8px 10px;
    }
}

.abc-list-rows {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.abc-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    min-width: 0;
}

.abc-item-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    flex: 1;
}

.abc-rank-num {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--text-muted, #94a3b8);
    min-width: 30px;
}

.abc-letter-badge {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.abc-letter-badge.A { background: rgba(16, 185, 129, 0.22); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.abc-letter-badge.B { background: rgba(245, 158, 11, 0.22); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.abc-letter-badge.C { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.35); }
.abc-letter-badge.Z { background: rgba(255, 71, 87, 0.16); color: #fb7185; border: 1px solid rgba(255, 71, 87, 0.35); }

.abc-item-info {
    min-width: 0;
    flex: 1;
}

.abc-item-name {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main, #ffffff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.abc-item-meta {
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
}

.abc-item-right {
    text-align: right;
    flex-shrink: 0;
}

.abc-item-val {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main, #ffffff);
}

.abc-item-pct {
    font-size: 10.5px;
    color: var(--text-muted, #94a3b8);
}

.abc-loadmore-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

/* Modal Central de Relatórios & Boletim Automático */
.hermes-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 13, 0.78);
    backdrop-filter: blur(8px);
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.hermes-modal-card {
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    overflow-y: auto;
    background: #101624;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    color: #f8fafc;
}

.hermes-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.hermes-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
}

.relatorios-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

@media (max-width: 680px) {
    .relatorios-grid {
        grid-template-columns: 1fr;
    }
}

.relatorio-option-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}

.relatorio-option-card h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
}

.relatorio-option-card p {
    margin: 4px 0 0;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}

/* Simulação de E-mail Boletim — Estética Escura & Alto Contraste */
.email-preview-shell {
    margin-top: 12px;
    background: #0b1120;
    color: #f1f5f9;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(118, 216, 0, 0.28);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.email-preview-hero-img {
    background: #080b10;
    width: 100%;
    overflow: hidden;
}

.email-preview-hero-img img {
    display: block;
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    object-position: center;
}

.email-preview-topbar {
    background: #090e1a;
    color: #ffffff;
    padding: 13px 16px;
    border-top: 2px solid #76D800;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.email-preview-topbar small {
    color: #76D800;
    font-weight: 800;
    font-size: 10.5px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.email-preview-topbar h5 {
    margin: 4px 0 2px;
    font-size: 15px;
    color: #ffffff;
}

.email-preview-body {
    padding: 15px 16px;
    font-size: 12.5px;
    line-height: 1.5;
    background: #0f172a;
    color: #e2e8f0;
}

.email-kpi-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 13px;
}

@media (max-width: 540px) {
    .email-kpi-strip {
        grid-template-columns: 1fr;
    }
}

.email-kpi-cell {
    background: #162033;
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 11px;
    padding: 9px 11px;
}

.email-kpi-cell.is-fat {
    border-color: rgba(118, 216, 0, 0.42);
    background: linear-gradient(135deg, rgba(118, 216, 0, 0.12), #162033);
}

.email-kpi-cell small {
    display: block;
    color: #94a3b8;
    font-size: 10.5px;
}

.email-kpi-cell strong {
    font-size: 14.5px;
    color: #ffffff;
}

.email-kpi-cell.is-fat strong {
    color: #a3e635;
}

.email-highlights-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 11px;
    padding: 9px 12px;
    margin-bottom: 13px;
    font-size: 12px;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.email-sec-title {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 4px;
}

.email-preview-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 4px;
    font-size: 12px;
}

.email-preview-table th,
.email-preview-table td {
    padding: 7px 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    text-align: left;
    color: #f1f5f9 !important;
}

.email-preview-table th {
    color: #94a3b8 !important;
    font-size: 11px;
    background: #162033;
    font-weight: 700;
}

.email-preview-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.025);
}

/* =============================================================================
 * LIGHT MODE SUPPORT (body.theme-light)
 * ============================================================================= */
body.theme-light .btn-relatorios-hermes {
    color: #15803d;
    background: rgba(118, 216, 0, 0.16);
    border-color: rgba(22, 163, 74, 0.35);
}

body.theme-light .hermes-segmented {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

body.theme-light .hermes-seg-btn.active {
    background: #ffffff;
    color: #15803d;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

body.theme-light .horarios-bars-wrap {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.theme-light .hora-bar-track {
    background: #e2e8f0;
}

body.theme-light .horario-highlight-pill,
body.theme-light .turno-card,
body.theme-light .dow-day-card,
body.theme-light .abc-item-row,
body.theme-light .recorte-prod-row,
body.theme-light .abc-donut-hero,
body.theme-light .abc-curve-card,
body.theme-light .top10-chart-box {
    background: #ffffff;
    border-color: #e2e8f0;
}

body.theme-light .top10-track {
    background: #e2e8f0;
}

body.theme-light .top10-val-wrap strong {
    color: #15803d;
}

body.theme-light .top10-share-pill {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

body.theme-light .abc-donut-center {
    background: rgba(255, 255, 255, 0.94);
    border-color: #e2e8f0;
}

body.theme-light .abc-donut-center span,
body.theme-light .abc-curve-card-bottom strong {
    color: #15803d;
}

body.theme-light .abc-donut-center strong {
    color: #0f172a;
}

body.theme-light .abc-filter-hint {
    color: #0369a1;
}

body.theme-light .recorte-box {
    background: #f0f9ff;
    border-color: #bae6fd;
}

body.theme-light .recorte-title-row strong,
body.theme-light .recorte-prods-title {
    color: #0369a1;
}

body.theme-light .recorte-time-field input[type="time"],
body.theme-light .abc-search-input {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}

body.theme-light .abc-tab-btn.active {
    background: #dcfce7;
    color: #15803d;
    border-color: #86efac;
}

body.theme-light .abc-count-badge {
    background: #0f172a;
    color: #ffffff;
}

body.theme-light .hermes-modal-card {
    background: #ffffff;
    color: #0f172a;
    border-color: #cbd5e1;
}

body.theme-light .hermes-modal-close {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

body.theme-light .relatorio-option-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.theme-light .relatorio-option-card h5 {
    color: #0f172a;
}

body.theme-light .turno-val,
body.theme-light .recorte-prod-val,
body.theme-light .abc-item-val {
    color: #15803d;
}

body.theme-light .hermes-excel-mini-btn {
    color: #047857;
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.38);
}

body.theme-light .dow-badge-pill.best {
    color: #047857;
}

body.theme-light .dow-badge-pill.worst {
    color: #b45309;
}

body.theme-light .recorte-preset-pill,
body.theme-light .recorte-dow-pill,
body.theme-light .abc-tab-btn,
body.theme-light .abc-class-chip {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
}

body.theme-light .recorte-preset-pill.active,
body.theme-light .recorte-dow-pill.active {
    background: #dcfce7;
    border-color: #16a34a;
    color: #166534;
}

body.theme-light .recorte-presets .recorte-preset-pill.active small {
    color: #15803d;
}

body.theme-light .abc-class-chip.c-A { color: #15803d; border-color: #86efac; }
body.theme-light .abc-class-chip.c-B { color: #b45309; border-color: #fcd34d; }
body.theme-light .abc-class-chip.c-C { color: #475569; border-color: #cbd5e1; }

body.theme-light .abc-letter-badge.A { background: #dcfce7; color: #15803d; }
body.theme-light .abc-letter-badge.B { background: #fef3c7; color: #b45309; }
body.theme-light .abc-letter-badge.C { background: #f1f5f9; color: #475569; }
body.theme-light .abc-letter-badge.Z { background: #fee2e2; color: #b91c1c; }

body.theme-light .hermes-mobile-quickbtn {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

body.theme-light .hermes-mobile-quickbtn.secondary {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0369a1;
}


@media print {
    .sidebar, .topbar, .mobile-bottom-nav, .store-bi-actions-row, .bi-subtabs-nav, .hermes-mobile-quickbar {
        display: none !important;
    }
    body, .main-content, .content-card {
        background: #ffffff !important;
        color: #000000 !important;
        box-shadow: none !important;
    }
}

/* =============================================================================
 * MÓDULO DRE / RESUMO DE CONTAS (ATALHO FINANCEIRO + TELA CHEIA MAXIMIZADA)
 * ============================================================================= */
.fin-module-switcher {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.fin-switcher-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fin-switcher-pills {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(2, 6, 23, 0.72);
    padding: 4px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.fin-lbl-short { display: none; }
.fin-lbl-full { display: inline; }
.fin-dre-exit-mobile { display: none !important; }

.fin-switch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.fin-switch-btn:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.05);
}

.fin-switch-btn.active {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.fin-pro-pill {
    font-size: 9.5px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
    letter-spacing: 0.4px;
}

.fin-switcher-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.fin-dre-store-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fin-dre-store-pill {
    font-size: 12px;
    font-weight: 800;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 5px 10px;
    border-radius: 999px;
}

.fin-dre-modo-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 999px;
}

.fin-dre-modo-pill.is-conc {
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.fin-dre-modo-pill.is-normal {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.fin-dre-exit-btn {
    border: 1px solid rgba(248, 113, 113, 0.38);
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 11px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.fin-dre-exit-btn:hover {
    background: rgba(239, 68, 68, 0.28);
    color: #ffffff;
}

/* MODO TELA CHEIA QUANDO DRE ESTÁ ATIVO */
body.dre-fullscreen-mode,
body.dre-fullscreen-mode.mobile-mode {
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    overflow-x: hidden !important;
}

body.dre-fullscreen-mode #appSidebar,
body.dre-fullscreen-mode .sidebar,
body.dre-fullscreen-mode .sidebar-overlay,
body.dre-fullscreen-mode .topbar,
body.dre-fullscreen-mode #storeBiCard,
body.dre-fullscreen-mode .bi-subtabs-nav,
body.dre-fullscreen-mode .mobile-store-identity-strip,
body.dre-fullscreen-mode #mobileBottomNav,
body.dre-fullscreen-mode .mobile-bottom-nav,
body.dre-fullscreen-mode #mobileBottomSheet,
body.dre-fullscreen-mode #mobileSheetOverlay,
body.dre-fullscreen-mode .hermes-mobile-quickbar,
body.dre-fullscreen-mode #hermesLabFloatingBar {
    display: none !important;
}

body.dre-fullscreen-mode #mainDashboard,
body.dre-fullscreen-mode .app-layout {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100dvh !important;
}

body.dre-fullscreen-mode .main-content,
body.dre-fullscreen-mode.mobile-mode .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100dvh !important;
}

body.dre-fullscreen-mode #storeBiSection {
    padding: 8px 12px 14px !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

body.dre-fullscreen-mode .fin-module-switcher {
    margin-bottom: 8px;
    padding: 6px 10px;
}

.dre-fullscreen-deck,
.dre-dynamic-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.dre-schedule-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #94a3b8;
    padding: 0 4px;
    line-height: 1.3;
}

.dre-schedule-note strong {
    color: #cbd5e1;
    font-weight: 700;
}

.dre-schedule-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38bdf8;
    flex-shrink: 0;
}

.dre-controls-bar {
    background: rgba(15, 23, 42, 0.80);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 9px 12px;
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px 12px;
}

/* No Desktop, grupos transparentes para formar barra horizontal unificada */
.dre-controls-primary,
.dre-primary-visao-row,
.dre-controls-extra,
.dre-two-col-mobile,
.dre-search-check-mobile {
    display: contents;
}

.dre-mob-filter-toggle,
.dre-mobile-meta-strip {
    display: none;
}

.dre-field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dre-field-group > label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #94a3b8;
    white-space: nowrap;
}

.dre-check-spacer-lbl {
    opacity: 0;
    pointer-events: none;
    user-select: none;
}

.dre-period-pills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.dre-pill-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(2, 6, 23, 0.7);
    color: #cbd5e1;
    font-size: 11.5px;
    font-weight: 700;
    height: 36px;
    padding: 0 11px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dre-pill-btn:hover {
    border-color: rgba(56, 189, 248, 0.35);
    color: #f8fafc;
}

.dre-pill-btn.active {
    background: rgba(56, 189, 248, 0.22);
    border-color: rgba(56, 189, 248, 0.6);
    color: #7dd3fc;
}

.dre-dates-inputs {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dre-date-sep {
    font-size: 11px;
    color: #94a3b8;
}

.dre-input,
.dre-select {
    background: rgba(2, 6, 23, 0.85);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    height: 36px;
    padding: 0 9px;
    font-size: 12px;
    font-weight: 600;
    outline: none;
    box-sizing: border-box;
}

.dre-apply-btn {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #6ee7b7;
    font-size: 11.5px;
    font-weight: 700;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.dre-checkbox-pill {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 36px;
    padding: 0 11px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(2, 6, 23, 0.85);
    cursor: pointer;
    text-transform: none !important;
    font-size: 12px !important;
    font-weight: 700;
    color: #cbd5e1 !important;
    box-sizing: border-box;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.dre-checkbox-pill input[type="checkbox"] {
    accent-color: #38bdf8;
    width: 15px;
    height: 15px;
    margin: 0;
}

.dre-checkbox-pill.is-active {
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.55);
    color: #7dd3fc !important;
}

.dre-search-group {
    flex: 1 1 170px;
    min-width: 150px;
}

.dre-search-input {
    width: 100%;
    box-sizing: border-box;
}

.dre-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.dre-kpi-card {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dre-kpi-card.is-receita { border-left: 4px solid #10b981; }
.dre-kpi-card.is-despesa { border-left: 4px solid #ef4444; }
.dre-kpi-card.is-lucro.is-pos { border-left: 4px solid #38bdf8; }
.dre-kpi-card.is-lucro.is-neg { border-left: 4px solid #f59e0b; }

.dre-kpi-lbl {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
}

.dre-kpi-val {
    font-size: 19px;
    font-weight: 800;
    color: #f8fafc;
    font-variant-numeric: tabular-nums;
}

.dre-kpi-sub {
    font-size: 10.5px;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.25;
}

.dre-kpi-card.is-receita .dre-kpi-val { color: #34d399; }
.dre-kpi-card.is-despesa .dre-kpi-val { color: #f87171; }
.dre-kpi-card.is-lucro.is-pos .dre-kpi-val { color: #38bdf8; }
.dre-kpi-card.is-lucro.is-neg .dre-kpi-val { color: #fbbf24; }

.dre-margem-pill {
    font-size: 10.5px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

.dre-nluc-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 9px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    font-size: 11.5px;
    color: #bae6fd;
}

.dre-alert-box,
.dre-loading-bar {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 12.5px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dre-loading-bar {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #7dd3fc;
    font-weight: 700;
}

.dre-alert-box.is-info {
    background: rgba(56, 189, 248, 0.10);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #cbd5e1;
}

.dre-alert-box.is-warn {
    background: rgba(245, 158, 11, 0.10);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fde68a;
}

.dre-alert-box.is-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.dre-table-shell {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    overflow: hidden;
    flex: 1 1 auto;
}

.dre-table-scroll {
    max-height: calc(100dvh - 255px);
    min-height: 280px;
    overflow: auto;
}

.dre-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.dre-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #0f172a;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    text-align: left;
}

.dre-table th.col-val,
.dre-table td.col-val,
.dre-table th.col-pct,
.dre-table td.col-pct {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dre-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dre-mob-inline-prefix,
.dre-mob-pcts,
.dre-mob-only-th {
    display: none;
}

.dre-row.is-clickable { cursor: pointer; }
.dre-row.is-clickable:hover { background: rgba(56, 189, 248, 0.08); }

.dre-lv1 { background: rgba(255, 255, 255, 0.05); font-weight: 800; color: #f8fafc; }
.dre-lv2 { background: rgba(255, 255, 255, 0.02); font-weight: 700; color: #e2e8f0; }
.dre-lv2 .col-cod { padding-left: 24px; }
.dre-lv3 .col-cod { padding-left: 42px; }
.dre-lv3 { color: #cbd5e1; font-weight: 500; }

.dre-caret {
    display: inline-block;
    width: 14px;
    color: #38bdf8;
    font-size: 12px;
}

.dre-caret-spacer {
    display: inline-block;
    width: 14px;
}

.dre-table code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    color: #7dd3fc;
    background: transparent;
}

.dre-nluc-tag {
    display: inline-block;
    margin-left: 6px;
    font-size: 9.5px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 5px;
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
}

.col-val.val-pos { color: #34d399; }
.col-val.val-neg { color: #f87171; }
.col-val.val-zero { color: #64748b; }

.dre-empty-rows,
.dre-empty-card {
    padding: 36px 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

/* MODO CLARO (theme-light) */
body.theme-light .fin-module-switcher,
body.theme-light .dre-controls-bar,
body.theme-light .dre-kpi-card,
body.theme-light .dre-table-shell {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #0f172a;
}

body.theme-light .fin-switcher-pills {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

body.theme-light .fin-switch-btn { color: #475569; }
body.theme-light .fin-switch-btn.active { color: #ffffff; }
body.theme-light .fin-dre-store-pill { background: #f1f5f9; border-color: #cbd5e1; color: #0f172a; }
body.theme-light .fin-dre-modo-pill.is-conc { background: #e0f2fe; border-color: #7dd3fc; color: #0369a1; }
body.theme-light .fin-dre-modo-pill.is-normal { background: #dcfce7; border-color: #86efac; color: #15803d; }
body.theme-light .fin-dre-exit-btn { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
body.theme-light .dre-pill-btn,
body.theme-light .dre-mob-filter-toggle,
body.theme-light .dre-checkbox-pill { background: #f8fafc; border-color: #cbd5e1; color: #334155 !important; }
body.theme-light .dre-pill-btn.active,
body.theme-light .dre-mob-filter-toggle.is-open,
body.theme-light .dre-checkbox-pill.is-active { background: #e0f2fe; border-color: #0284c7; color: #0369a1 !important; }
body.theme-light .dre-meta-chip { background: #f1f5f9; border-color: #e2e8f0; color: #475569; }
body.theme-light .dre-margem-pill { background: #e2e8f0; color: #1e293b; }
body.theme-light .dre-nluc-strip { background: #f0f9ff; border-color: #bae6fd; color: #0369a1; }
body.theme-light .dre-loading-bar { background: #e0f2fe; border-color: #7dd3fc; color: #0369a1; }
body.theme-light .dre-schedule-note { color: #64748b; }
body.theme-light .dre-schedule-note strong { color: #334155; }
body.theme-light .dre-schedule-dot { background: #0284c7; }
body.theme-light .dre-alert-box.is-info { background: #f0f9ff; border-color: #bae6fd; color: #334155; }
body.theme-light .dre-alert-box.is-warn { background: #fefce8; border-color: #fde047; color: #854d0e; }
body.theme-light .dre-table thead th { background: #f8fafc; color: #475569; border-bottom-color: #e2e8f0; }
body.theme-light .dre-lv1 { background: #f1f5f9; color: #0f172a; }
body.theme-light .dre-lv2 { background: #f8fafc; color: #1e293b; }
body.theme-light .dre-lv3 { color: #334155; }
body.theme-light .dre-input,
body.theme-light .dre-select { background: #ffffff; color: #0f172a; border-color: #cbd5e1; }
body.theme-light .dre-table code { color: #0369a1; }
body.theme-light .dre-mob-code { background: #e0f2fe !important; }
body.theme-light .dre-mob-pcts { color: #64748b; }
body.theme-light .col-val.val-pos { color: #059669; }
body.theme-light .col-val.val-neg { color: #dc2626; }

/* RESPONSIVO MOBILE (iPhone / Android) */
@media (max-width: 768px) {
    .fin-lbl-full { display: none; }
    .fin-lbl-short { display: inline; }
    .fin-dre-exit-desktop { display: none !important; }

    .fin-module-switcher {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 6px;
        margin-bottom: 12px;
    }

    .fin-switcher-top {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .fin-switcher-pills {
        flex: 1 1 auto;
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
    }

    .fin-switch-btn {
        width: 100%;
        min-height: 36px;
        font-size: 12px;
        padding: 7px 6px;
        gap: 5px;
    }

    .fin-dre-exit-mobile {
        display: none !important;
    }

    body.dre-fullscreen-mode .fin-dre-exit-mobile {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        min-height: 36px;
        padding: 7px 11px;
        font-size: 12px;
    }

    body.dre-fullscreen-mode #storeBiSection {
        padding: 0 0 18px 0 !important;
    }

    body.dre-fullscreen-mode .fin-module-switcher {
        position: sticky;
        top: 0;
        z-index: 60;
        border-radius: 0 0 14px 14px;
        border-top: none;
        border-left: none;
        border-right: none;
        padding: calc(var(--safe-top, env(safe-area-inset-top, 0px)) + 8px) 10px 8px;
        margin: 0 0 8px 0;
        background: rgba(8, 12, 22, 0.95);
    }

    body.theme-light.dre-fullscreen-mode .fin-module-switcher {
        background: rgba(255, 255, 255, 0.96);
    }

    body.dre-fullscreen-mode .fin-switcher-right {
        width: 100%;
    }

    body.dre-fullscreen-mode .fin-dre-store-meta {
        width: 100%;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 8px;
    }

    body.dre-fullscreen-mode .fin-dre-store-pill {
        max-width: 66%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 11.5px;
        padding: 3px 9px;
    }

    body.dre-fullscreen-mode .fin-dre-modo-pill {
        flex-shrink: 0;
        font-size: 10.5px;
        padding: 3px 8px;
    }

    .dre-fullscreen-deck {
        padding: 0 8px;
        gap: 8px;
    }

    .dre-controls-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 9px 10px;
    }

    .dre-controls-primary {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .dre-period-pills {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 5px;
        width: 100%;
    }

    .dre-pill-btn {
        height: 36px;
        padding: 0 4px;
        font-size: 11.5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .dre-primary-visao-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        align-items: end;
        width: 100%;
    }

    .dre-visao-group {
        min-width: 0;
    }

    .dre-mob-filter-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        height: 40px;
        padding: 0 12px;
        border-radius: 9px;
        border: 1px solid rgba(255, 255, 255, 0.16);
        background: rgba(2, 6, 23, 0.85);
        color: #e2e8f0;
        font-size: 12.5px;
        font-weight: 700;
        cursor: pointer;
        white-space: nowrap;
    }

    .dre-mob-filter-toggle.is-open {
        background: rgba(56, 189, 248, 0.18);
        border-color: rgba(56, 189, 248, 0.5);
        color: #7dd3fc;
    }

    .dre-mob-filter-badge {
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        border-radius: 999px;
        background: #0ea5e9;
        color: #ffffff;
        font-size: 10.5px;
        font-weight: 800;
        align-items: center;
        justify-content: center;
    }

    .dre-mobile-meta-strip {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        width: 100%;
    }

    .dre-meta-chip {
        font-size: 10.5px;
        font-weight: 600;
        color: #94a3b8;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 999px;
        padding: 2px 8px;
    }

    .dre-controls-extra {
        display: none;
        flex-direction: column;
        gap: 8px;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        width: 100%;
    }

    .dre-controls-extra.is-open {
        display: flex;
    }

    .dre-dates-inputs {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 6px;
        align-items: center;
        width: 100%;
    }

    .dre-dates-inputs .dre-apply-btn {
        grid-column: 1 / -1;
        width: 100%;
        height: 38px;
        font-size: 12.5px;
    }

    .dre-two-col-mobile {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
        width: 100%;
    }

    .dre-search-check-mobile {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        align-items: end;
        width: 100%;
    }

    .dre-search-group {
        min-width: 0;
        flex: initial;
    }

    .dre-input,
    .dre-select {
        width: 100%;
        min-width: 0;
        height: 40px;
        font-size: 16px;
    }

    .dre-checkbox-pill {
        height: 40px;
        padding: 0 11px;
    }

    .dre-check-spacer-lbl {
        display: none !important;
    }

    .dre-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .dre-kpi-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 9px;
        min-width: 0;
    }

    .dre-kpi-lbl {
        font-size: 10.5px;
        width: 100%;
    }

    .dre-kpi-visao-sub {
        display: none;
    }

    .dre-kpi-val {
        font-size: clamp(13px, 3.8vw, 15.5px);
        white-space: nowrap;
        max-width: 100%;
    }

    .dre-kpi-sub {
        font-size: 9.5px;
        line-height: 1.2;
    }

    .dre-kpi-card.is-lucro {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 9px 12px;
    }

    .dre-kpi-card.is-lucro .dre-kpi-lbl {
        width: auto;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .dre-kpi-card.is-lucro .dre-kpi-val {
        font-size: 16.5px;
    }

    .dre-nluc-strip {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
        font-size: 11px;
    }

    .dre-table-scroll {
        max-height: none;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: visible;
    }

    .dre-table th.col-cod,
    .dre-table td.col-cod,
    .dre-table th.col-pct,
    .dre-table td.col-pct {
        display: none;
    }

    .dre-mob-inline-prefix {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        margin-right: 5px;
        vertical-align: middle;
    }

    .dre-mob-code {
        font-size: 10.5px !important;
        padding: 1px 4px;
        border-radius: 4px;
        background: rgba(56, 189, 248, 0.13) !important;
    }

    .dre-mob-pcts,
    .dre-mob-only-th {
        display: block;
    }

    .dre-mob-only-th {
        display: inline;
    }

    .dre-table thead th {
        position: static;
        padding: 8px 10px;
        font-size: 10.5px;
    }

    .dre-table td {
        padding: 8px 10px;
        font-size: 12px;
        vertical-align: middle;
    }

    .dre-lv2 .col-desc {
        padding-left: 16px !important;
    }

    .dre-lv3 .col-desc {
        padding-left: 26px !important;
    }

    .dre-table td.col-desc {
        white-space: normal;
        word-break: break-word;
        line-height: 1.32;
    }

    .dre-val-main {
        display: block;
        font-size: 12.5px;
        font-weight: 800;
    }

    .dre-mob-pcts {
        font-size: 10px;
        font-weight: 600;
        color: #94a3b8;
        margin-top: 2px;
    }
}

.hermes-pro-pill-inline {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.4px;
    background: rgba(245, 158, 11, 0.20);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.45);
    line-height: 1.3;
    flex-shrink: 0;
}

.is-locked-pro {
    border-color: rgba(245, 158, 11, 0.38) !important;
    opacity: 0.92;
}

body.theme-light .hermes-pro-pill-inline {
    background: rgba(217, 119, 6, 0.14);
    color: #b45309;
    border-color: rgba(217, 119, 6, 0.35);
}

.boletim-config-card {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(118, 216, 0, 0.32);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.boletim-config-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.boletim-config-head strong {
    font-size: 13px;
    color: #f8fafc;
}

.boletim-toggles-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

@media (max-width: 560px) {
    .boletim-toggles-row {
        grid-template-columns: 1fr;
    }
}

.boletim-toggle-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.24);
    cursor: pointer;
    font-size: 12px;
    color: #e2e8f0;
}

.boletim-toggle-pill input {
    width: 16px;
    height: 16px;
    accent-color: #76D800;
    cursor: pointer;
    flex-shrink: 0;
}

.boletim-toggle-pill small {
    display: block;
    font-size: 10.5px;
    color: #94a3b8;
}

.boletim-email-input {
    width: 100%;
    padding: 8px 11px;
    border-radius: 9px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(2, 6, 23, 0.72);
    color: #f8fafc;
    font-size: 12.5px;
    box-sizing: border-box;
}

.boletim-actions-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

body.theme-light .boletim-config-card {
    background: #f8fafc;
    border-color: rgba(22, 163, 74, 0.35);
}

body.theme-light .boletim-config-head strong {
    color: #0f172a;
}

body.theme-light .boletim-toggle-pill {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #1e293b;
}

body.theme-light .boletim-email-input {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}
