/* 
   KPI Dashboard Styles
   Specific to kpi_admin.html
*/

.kpi-dashboard {
    padding: 120px 0 60px; /* Offset for fixed navbar */
    min-height: 100vh; /* BUG FIX: prevent flux issues */
}

.kpi-header {
    margin-bottom: 2.5rem;
    text-align: left;
}

.header-content-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Stats Overview Cards */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 3rem;
}

.icon-certif { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.icon-success { background: rgba(16, 185, 129, 0.1); color: #10b981; }

/* Table Section */
.dashboard-table-section {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.table-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.table-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.kpi-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.kpi-table th {
    padding: 12px 15px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kpi-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
    font-size: 0.95rem;
}

.kpi-table tr:last-child td {
    border-bottom: none;
}

.kpi-table tr:hover {
    background: rgba(99, 102, 241, 0.03);
}

.badge-id {
    font-family: monospace;
    background: rgba(0,0,0,0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.chart-container {
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* BUG FIX: Bloquer la hauteur */
    position: relative;
    height: 350px !important;
    width: 100%;
}

@media (max-width: 768px) {
    .kpi-header {
        text-align: center;
    }
    .header-content-flex {
        flex-direction: column;
    }
    .table-container {
        overflow-x: auto;
    }
    .kpi-table {
        min-width: 600px;
    }
}
