/* CSV Registration Dashboard - Frontend Styles */

.csv-registration-dashboard {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Header */
.csv-dashboard-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.csv-dashboard-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 10px 0;
}

.csv-dashboard-subtitle {
    font-size: 18px;
    color: #6b7280;
    margin: 0 0 15px 0;
}

.csv-dashboard-last-updated {
    font-size: 14px;
    color: #9ca3af;
    transition: all 0.3s ease;
}

.csv-dashboard-last-updated.updated {
    color: #10b981;
    font-weight: 600;
}

.csv-dashboard-last-updated.updated .csv-last-update-time {
    color: #10b981;
}

/* Content Layout */
.csv-dashboard-content {
    display: grid;
    gap: 30px;
}

.csv-dashboard-content.style-full {
    grid-template-columns: 1fr;
}

.csv-dashboard-content.style-compact {
    grid-template-columns: 1fr 400px;
}

.csv-dashboard-content.style-chart-only {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 0 auto;
}

.csv-dashboard-content.style-text-only {
    grid-template-columns: 1fr;
}

/* Stats Cards */
.csv-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.csv-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 25px;
    color: white;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.csv-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.csv-stat-card.total {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.csv-stat-card.registered {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.csv-stat-card.pending {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.csv-stat-card.percentage {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.csv-stat-icon {
    flex-shrink: 0;
    opacity: 0.8;
}

.csv-stat-icon svg {
    display: block;
}

.csv-stat-content {
    flex: 1;
}

.csv-stat-label {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.csv-stat-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

/* Progress Bar */
.csv-progress-bar-container {
    grid-column: 1 / -1;
    margin-top: 10px;
}

.csv-progress-bar {
    background: #e5e7eb;
    height: 50px;
    border-radius: 25px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.csv-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    transition: width 1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.csv-progress-text {
    color: white;
    font-weight: 600;
    font-size: 16px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Chart */
.csv-dashboard-chart {
    background: #f9fafb;
    border-radius: 12px;
    padding: 30px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.csv-dashboard-chart canvas {
    max-height: 400px !important;
}

/* Footer */
.csv-dashboard-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.csv-auto-refresh-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
    padding: 8px 16px;
    background: #f9fafb;
    border-radius: 20px;
}

.csv-refresh-icon {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
.csv-dashboard-error {
    padding: 20px;
    background: #fee2e2;
    border: 2px solid #ef4444;
    border-radius: 8px;
    color: #991b1b;
    font-weight: 600;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .csv-dashboard-content.style-compact {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .csv-registration-dashboard {
        padding: 20px;
        margin: 20px auto;
    }
    
    .csv-dashboard-title {
        font-size: 24px;
    }
    
    .csv-dashboard-subtitle {
        font-size: 16px;
    }
    
    .csv-dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .csv-stat-card {
        padding: 20px;
    }
    
    .csv-stat-value {
        font-size: 28px;
    }
    
    .csv-progress-bar {
        height: 40px;
    }
    
    .csv-progress-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .csv-registration-dashboard {
        padding: 15px;
        margin: 10px;
        border-radius: 8px;
    }
    
    .csv-dashboard-title {
        font-size: 20px;
    }
    
    .csv-stat-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .csv-stat-icon {
        margin: 0 auto;
    }
    
    .csv-stat-value {
        font-size: 24px;
    }
}

/* Print Styles */
@media print {
    .csv-registration-dashboard {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    .csv-dashboard-footer {
        display: none;
    }
    
    .csv-stat-card {
        break-inside: avoid;
    }
}
