/* PERISCOPE SIS Dashboard Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.pse-dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    background: #f5f7fa;
    min-height: 100vh;
}

/* Header */
.pse-dashboard-header {
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.pse-dashboard-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: bold;
}

.pse-subtitle {
    font-size: 16px;
    opacity: 0.9;
}

/* Loading */
.pse-loading {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 10px;
}

.pse-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #ecf0f1;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Summary Cards */
.pse-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.pse-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.pse-card-icon {
    font-size: 40px;
}

.pse-card-content h3 {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 600;
}

.pse-card-value {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
}

.pse-card small {
    font-size: 12px;
    color: #95a5a6;
}

.pse-card-total {
    border-left: 4px solid #3498db;
}

.pse-card-paye {
    border-left: 4px solid #27ae60;
}

.pse-card-retard {
    border-left: 4px solid #f39c12;
}

.pse-card-impaye {
    border-left: 4px solid #e74c3c;
}

/* Ecoles Grid */
.pse-ecoles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.pse-ecole-card {
    background: white;
    border-radius: 10px;
    border-top: 5px solid #3498db;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s, transform 0.3s;
}

.pse-ecole-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

/* Ecole Header */
.pse-ecole-header {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05) 0%, rgba(41, 128, 185, 0.05) 100%);
    padding: 20px;
    border-bottom: 1px solid #ecf0f1;
}

.pse-ecole-header h2 {
    font-size: 18px;
    margin-bottom: 5px;
    font-weight: bold;
}

.pse-ecole-code {
    font-size: 12px;
    color: #95a5a6;
    text-transform: uppercase;
}

/* Ecole Info */
.pse-ecole-info {
    padding: 15px 20px;
    background: #fafbfc;
    border-bottom: 1px solid #ecf0f1;
}

.pse-info-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
}

.pse-info-item:last-child {
    margin-bottom: 0;
}

.pse-info-label {
    font-weight: 600;
    color: #2c3e50;
    min-width: 100px;
}

.pse-info-value {
    color: #7f8c8d;
    word-break: break-word;
}

/* Effectif */
.pse-ecole-effectif {
    padding: 20px;
    background: white;
    border-bottom: 1px solid #ecf0f1;
    text-align: center;
}

.pse-ecole-effectif h4 {
    font-size: 12px;
    color: #95a5a6;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.pse-effectif-number {
    font-size: 36px;
    font-weight: bold;
    color: #3498db;
}

.pse-ecole-effectif small {
    font-size: 12px;
    color: #7f8c8d;
}

/* Paiements */
.pse-ecole-paiements {
    padding: 20px;
    border-bottom: 1px solid #ecf0f1;
}

.pse-ecole-paiements h4 {
    font-size: 12px;
    color: #95a5a6;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.pse-paiements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.pse-paiement-item {
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.pse-paiement-icon {
    font-size: 20px;
}

.pse-paiement-info {
    display: flex;
    flex-direction: column;
}

.pse-paiement-label {
    font-size: 11px;
    color: #7f8c8d;
    text-transform: uppercase;
}

.pse-paiement-count {
    font-size: 18px;
    font-weight: bold;
}

.pse-paiement-paye {
    background: #d5f4e6;
    color: #27ae60;
}

.pse-paiement-retard {
    background: #ffeaa7;
    color: #f39c12;
}

.pse-paiement-impaye {
    background: #fab1a0;
    color: #e74c3c;
}

/* Eleves Table */
.pse-ecole-eleves-preview {
    padding: 20px;
    border-bottom: 1px solid #ecf0f1;
}

.pse-ecole-eleves-preview h4 {
    font-size: 12px;
    color: #95a5a6;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.pse-eleves-table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}

.pse-eleves-table thead {
    background: #f5f7fa;
}

.pse-eleves-table th {
    padding: 8px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #ecf0f1;
}

.pse-eleves-table td {
    padding: 8px;
    border-bottom: 1px solid #ecf0f1;
    color: #7f8c8d;
}

.pse-eleves-table tbody tr:hover {
    background: #f9f9f9;
}

.pse-ecole-eleves-preview small {
    display: block;
    margin-top: 10px;
    color: #95a5a6;
    font-size: 11px;
}

/* Actions */
.pse-ecole-actions {
    padding: 20px;
    text-align: center;
    background: #fafbfc;
}

.pse-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.pse-btn-primary {
    background: #3498db;
    color: white;
}

.pse-btn-primary:hover {
    background: #2980b9;
    transform: scale(1.05);
}

/* Footer */
.pse-footer {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
    font-size: 12px;
    background: white;
    border-radius: 10px;
    margin-top: 40px;
}

.pse-footer p {
    margin: 5px 0;
}

.pse-refresh-time {
    font-size: 11px;
    color: #95a5a6;
}

/* Responsive */
@media (max-width: 1024px) {
    .pse-ecoles-grid {
        grid-template-columns: 1fr;
    }
    
    .pse-paiements-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .pse-dashboard-container {
        padding: 15px;
    }
    
    .pse-dashboard-header {
        padding: 20px;
    }
    
    .pse-dashboard-header h1 {
        font-size: 22px;
    }
    
    .pse-summary-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .pse-card {
        flex-direction: column;
        text-align: center;
    }
    
    .pse-card-value {
        font-size: 24px;
    }
}
