/* 📊 Dashboard — Controle de Despesa Pro */

/* Seletor de mês */
.seletor-mes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 8px 0 16px 0;
}

.btn-mes {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #eef2ff;
    color: #1e3a8a;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

.btn-mes:hover {
    background: #e0e7ff;
}

.btn-mes:active {
    transform: scale(0.92);
}

.mes-atual {
    font-size: 16px;
    font-weight: 700;
    color: #1e3a8a;
    min-width: 140px;
    text-align: center;
    text-transform: capitalize;
}

/* Cards de resumo */
.dash-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.dash-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 14px 12px;
    border: 1px solid #edf2f7;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dash-card-total {
    background: linear-gradient(135deg, #2563eb, #1e3a8a);
    border: none;
    grid-column: 1 / -1;
}

.dash-card-total .dash-card-label {
    color: rgba(255,255,255,0.8);
}

.dash-card-total .dash-card-valor {
    color: #ffffff;
    font-size: 26px;
}

.dash-card-label {
    font-size: 11px;
    color: #6b7a94;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dash-card-valor {
    font-size: 18px;
    font-weight: 800;
    color: #1a202c;
}

/* Containers de gráfico */
.dash-grafico {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px;
    border: 1px solid #edf2f7;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    margin-bottom: 16px;
}

.dash-grafico h3 {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: #1e3a8a;
}

.grafico-container {
    position: relative;
    height: 200px;
}

.grafico-container:has(canvas#grafico-cartoes) {
    height: 220px;
}

/* Top estabelecimentos */
.dash-top {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.top-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #1a202c;
}

.top-info strong {
    color: #1e3a8a;
}

.top-barra {
    height: 8px;
    border-radius: 6px;
    background: #eef2f7;
    overflow: hidden;
}

.top-barra-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    transition: width 0.5s;
}

/* Desktop: grid 2 colunas para gráficos */
@media (min-width: 768px) {
    .dash-cards {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .dash-grafico {
        display: inline-block;
        width: calc(50% - 8px);
        vertical-align: top;
    }

    .dash-grafico:nth-child(odd) {
        margin-right: 8px;
    }

    .dash-grafico:nth-child(even) {
        margin-left: 8px;
    }
}

/* 👁️ Olho do dashboard */
.dash-cabecalho {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    position: relative;
}

.dash-cabecalho h1 {
    margin-right: auto;
}

.dash-cabecalho .btn-olho {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.dash-cabecalho .btn-olho:hover {
    background: #e2e8f0;
}

.dash-cabecalho .topo {
    width: 100%;
}
