/* Estilos para cards */
.cards {
    display: flex;
    gap: 20px;
}

.card {
    background: var(--card-bg);
    position: relative;
    margin: 20px 0;
    border-radius: 10px;
    flex: 1;
    backdrop-filter: blur(50px);
    /* border: solid 1px var(--border-color); */
    /* box-shadow: var(--shadow); */
}
/* .card.filters {
    background: var(--filter-bg);
} */

/* .card.blur {
    background: var(--card-bg-blur);
    backdrop-filter: blur(50px);
} */

.card-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    gap: 10px;
}
.card:has(.card-body) .card-header::before {
    content: '';
    display: block;
    background: var(--border-color);
    height: 1px;
    opacity: .5;
    position: absolute;
    bottom: 0;
    left: 30px;
    right: 30px;

}

.card.p-4 .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    border-bottom: none;
    gap: 10px;
}

.buttons-placement{
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.filters .card-header {
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-header .material-symbols-rounded {
    font-size: 40px;
}

.filters .card-header a {
    display: block;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.3s ease;
}
.filters .card-header a:hover {
    background: #55555522;
}
.filters .card-header .material-symbols-rounded {
    font-size: 22px;
    margin-right: 10px;
}

.card-header div {
     /* width: 100%;  */
}

.card-title {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    display: flex;
    justify-content: start;
    align-items: center;
}

.card-subtitle {
    font-size: 14px;
    font-weight: 300;
    opacity: 0.5;
    margin: 5px 0 0 0;
}

.card-body {
    padding: 30px;
}

.card-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    gap: 10px;
}

/* Variantes de cards */
.card-primary {
    border-top: 3px solid var(--border-color);
}

.card-secondary {
    border-top: 3px solid rgba(255, 99, 132, 0.8);
}

.card-outline {
    background: transparent;
    border: 1px dashed var(--main);
}

/* Card com ícone */
.card-icon {
    display: flex;
    gap: 15px;
}

.card-icon .icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--main);
    color: white;
    flex-shrink: 0;
}

.card-icon .card-content {
    flex: 1;
}

/* Card de estatísticas */
.stat-card {
    background: var(--card-bg);
    text-align: left;
    padding: 0;
    display: flex;
    border-radius: 10px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    padding-left: 15px;
}

.stat-card .stat-label {
    font-size: 14px;
    color: var(--text);
    padding-left: 15px;
}

.stat-card .material-symbols-rounded {
    font-size: 44px;
    background: var(--main);
    color: var(--text);
    padding: 10px;
    border-radius: 10px 0 0 10px;
}

/* Card grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

#filters {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out,  padding 0.4s ease-in-out;
    padding-top: 0;
    padding-bottom: 0;
    z-index: 8;
}

/* Classe ativada ao abrir */
#filters.open {
    overflow: visible;
    max-height: 1000px; /* ou um valor alto o suficiente */
    opacity: 1;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}


/* Card responsivo */
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .card-icon {
        flex-direction: column;
    }
    
    .card-icon .icon {
        margin-bottom: 10px;
    }
}