* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background: #f5f5f5; 
}

.container { 
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 20px; 
}

.header { 
    background: #2c3e50; 
    color: white; 
    padding: 20px; 
    border-radius: 8px; 
    margin-bottom: 20px; 
}

.header h1 { 
    font-size: 2em; 
    margin-bottom: 10px; 
}

.nav-tabs { 
    display: flex; 
    margin-bottom: 20px; 
}

.nav-tab { 
    background: #ecf0f1; 
    color: #2c3e50; 
    padding: 12px 24px; 
    border: none; 
    cursor: pointer; 
    margin-right: 5px; 
    border-radius: 5px 5px 0 0; 
}

.nav-tab.active { 
    background: #3498db; 
    color: white; 
}

.tab-content { 
    display: none; 
}

.tab-content.active { 
    display: block; 
}

.card { 
    background: white; 
    padding: 20px; 
    border-radius: 8px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    margin-bottom: 20px; 
}

.card h3 { 
    color: #2c3e50; 
    margin-bottom: 15px; 
    border-bottom: 2px solid #3498db; 
    padding-bottom: 10px; 
}

.status-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); 
    gap: 10px; 
}

.status-item { 
    text-align: center; 
    padding: 15px; 
    border-radius: 6px; 
}

.status-MAIL_RECU { 
    background: #e8f4fd; 
    color: #2980b9; 
}

.status-DEPOT_QUAI { 
    background: #fff3cd; 
    color: #856404; 
}

.status-ENVOYE_AZURE { 
    background: #d1ecf1; 
    color: #0c5460; 
}

.status-JSON_GENERE { 
    background: #d4edda; 
    color: #155724; 
}

.status-ERREUR { 
    background: #f8d7da; 
    color: #721c24; 
}

.status-VALIDE { 
    background: #d4edda; 
    color: #155724; 
}

.status-REJETE { 
    background: #f8d7da; 
    color: #721c24; 
}

.status-item .count { 
    font-size: 2em; 
    font-weight: bold; 
}

.status-item .label { 
    font-size: 0.9em; 
    margin-top: 5px; 
}

.btn { 
    background: #3498db; 
    color: white; 
    border: none; 
    padding: 10px 20px; 
    border-radius: 5px; 
    cursor: pointer; 
    margin: 5px; 
}

.btn:hover { 
    background: #2980b9; 
}

.btn-success { 
    background: #27ae60; 
}

.table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 15px; 
}

.table th, .table td { 
    padding: 12px; 
    text-align: left; 
    border-bottom: 1px solid #ddd; 
}

.table th { 
    background: #f8f9fa; 
    font-weight: bold; 
}

.table tr:hover { 
    background: #f5f5f5; 
}

.badge { 
    padding: 4px 8px; 
    border-radius: 12px; 
    font-size: 0.8em; 
    font-weight: bold; 
}

.badge-success { 
    background: #d4edda; 
    color: #155724; 
}

.badge-warning { 
    background: #fff3cd; 
    color: #856404; 
}

.badge-danger { 
    background: #f8d7da; 
    color: #721c24; 
}

.badge-info { 
    background: #d1ecf1; 
    color: #0c5460; 
}

.refresh-btn { 
    position: fixed; 
    top: 20px; 
    right: 20px; 
    background: #27ae60; 
    color: white; 
    border: none; 
    padding: 10px 15px; 
    border-radius: 50%; 
    cursor: pointer; 
    font-size: 1.2em; 
}

.loading { 
    text-align: center; 
    padding: 20px; 
    color: #666; 
}

.error { 
    color: #e74c3c; 
    background: #f8d7da; 
    padding: 10px; 
    border-radius: 4px; 
    margin: 10px 0; 
}

.reject-reason { 
    background: #f8d7da; 
    color: #721c24; 
    padding: 8px; 
    border-radius: 4px; 
    margin: 5px 0; 
    font-size: 0.9em; 
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.data-table thead {
    background: #34495e;
    color: white;
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.data-table th:hover {
    background: #2c3e50;
}

.data-table th.sortable::after {
    content: ' ↕';
    opacity: 0.5;
    font-size: 0.8em;
}

.data-table th.sort-asc::after {
    content: ' ↑';
    opacity: 1;
}

.data-table th.sort-desc::after {
    content: ' ↓';
    opacity: 1;
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #ecf0f1;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.data-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.data-table tbody tr:nth-child(even):hover {
    background: #f0f0f0;
}

.data-table th.col-wide,
.data-table td.col-wide {
    min-width: 200px;
    width: 200px;
}