/* Estilo Base (Celular/Telas pequenas) */
.dashboard-card {
    height: calc(100vh - 180px);
    width: 100%;
}

/* Telas Médias (Ex: Notebooks 1366x768) */
@media (min-width: 1024px) {
    .dashboard-card {
        height: calc(100vh - 140px);
    }
}

/* Telas Grandes (Ex: Monitores 1920x1080) */
@media (min-width: 1600px) {
    .dashboard-card {
        height: calc(100vh - 100px);
    }

    .dashboard {
        height: 99vh !important;
        max-height: 99vh;
    }

    .dashboard .main-wrapper {
        max-height: 100%;
    }
}

/* Responsividade */
@media (max-width: 1200px) {
    .card-sales, .card-expenses { grid-column: span 6; }
    .card-customer { grid-column: span 12; grid-row: span 1; }
    .card-period { grid-column: span 12; }
    .card-revenue, .card-sales-overview { grid-column: span 12; }
    .card-analytics { grid-column: span 12; }
    .card-ai { grid-column: span 12; }
    .dashboard {
        display: flex;
        flex-direction: row;
        width: 100%;
        max-width: 1500px;
        height: 95vh;
        background: transparent;
        border-radius: var(--radius);
        overflow: hidden;
        gap: 20px;
    }
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 50;
        margin-left: 0 !important;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .sidebar.collapsed {
        left: -280px;
    }
    .header-menu-mobile { 
        display: flex; 
    }
    .sidebar .menu-toggle {
        display: none; /* Esconder a seta flutuante em ecrãs móveis */
    }
    .card-sales, .card-expenses { grid-column: span 12; }
    .progress-bars-container { flex-direction: column; align-items: stretch; }
    .h-bar-row { flex-wrap: wrap; }
}