/* assets/css/dashboard.css */

.dashboard-container {
    /* CONSIGLIO: 1200px è meglio per 3 colonne. 1000px le rende troppo strette. */
    max-width: 1200px; 
    
    width: 95%; 
    margin: 40px auto;
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
}

/* Tabelle */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    text-align: left;
    padding: 16px; 
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    color: #333;
    font-weight: 600;
    border-radius: 5px 5px 0 0;
}

tr:hover { background-color: #fafafa; }

.thumb {
    width: 80px; 
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #888;
    background: #fafafa;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

/* --- GRIGLIA CORSI A 3 COLONNE (LA PARTE IMPORTANTE) --- */
.course-grid {
    display: grid;
    /* 1fr 1fr 1fr = 3 colonne uguali */
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px; 
    margin-top: 20px;
}

.course-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%; /* Forza tutte le card alla stessa altezza */
    transition: transform 0.2s;
    border: 1px solid #eee; /* Leggero bordo per definizione */
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* --- RESPONSIVITÀ --- */

/* Tablet (o schermi < 1024px): 2 Colonne */
@media (max-width: 1024px) {
    .course-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (o schermi < 650px): 1 Colonna */
@media (max-width: 650px) {
    .course-grid {
        grid-template-columns: 1fr;
    }
}