/* ScoreKit - Grade Management System Styles */

.scorekit-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #f8fafc;
    min-height: 100vh;
}

.scorekit-header {
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.3);
}

.scorekit-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.scorekit-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.scorekit-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.nav-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    min-width: 200px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-color: #4f46e5;
    text-decoration: none;
    color: inherit;
}

.nav-card .nav-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.nav-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.nav-card p {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Course Management */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.course-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.course-card h3 {
    color: #4f46e5;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.course-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

/* Grade Input Grid */
.grade-input-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.grade-grid {
    display: grid;
    grid-template-columns: 200px repeat(auto-fit, minmax(100px, 1fr));
    gap: 1px;
    background-color: #e5e7eb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.grid-header {
    background: #4f46e5;
    color: white;
    padding: 1rem;
    font-weight: 600;
    text-align: center;
    font-size: 0.9rem;
}

.grid-cell {
    background: white;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-student-name {
    background: #f9fafb;
    padding: 1rem;
    font-weight: 600;
    color: #1f2937;
    justify-content: flex-start;
}

.grade-input {
    width: 100%;
    border: none;
    text-align: center;
    font-weight: 600;
    padding: 0.5rem;
    background: transparent;
    transition: all 0.2s ease;
}

.grade-input:focus {
    outline: 2px solid #4f46e5;
    background: #eff6ff;
}

.grade-input.invalid {
    background: #fef2f2;
    color: #dc2626;
}

/* Statistics Panel */
.stats-panel {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Grade Distribution Chart */
.distribution-chart {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.grade-bars {
    display: flex;
    align-items: end;
    gap: 1rem;
    height: 200px;
    margin-bottom: 1rem;
}

.grade-bar {
    flex: 1;
    background: #4f46e5;
    border-radius: 4px 4px 0 0;
    min-height: 10px;
    position: relative;
    display: flex;
    align-items: end;
    justify-content: center;
    color: white;
    font-weight: 600;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.grade-bar:hover {
    background: #3730a3;
    transform: scale(1.05);
}

.grade-bar.grade-a { background: #10b981; }
.grade-bar.grade-b { background: #3b82f6; }
.grade-bar.grade-c { background: #f59e0b; }
.grade-bar.grade-d { background: #ef4444; }
.grade-bar.grade-f { background: #6b7280; }

.grade-labels {
    display: flex;
    gap: 1rem;
}

.grade-label {
    flex: 1;
    text-align: center;
    font-weight: 600;
    color: #4b5563;
}

/* Settings Panel */
.settings-panel {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.setting-group {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
}

.setting-group h4 {
    color: #4f46e5;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.setting-item {
    margin-bottom: 1rem;
}

.setting-item label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.setting-item input,
.setting-item select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
}

.setting-item input:focus,
.setting-item select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Buttons */
.btn-scorekit {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-scorekit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
    color: white;
    text-decoration: none;
}

.btn-scorekit-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-scorekit-secondary:hover {
    background: #e5e7eb;
    color: #374151;
}

.btn-scorekit-danger {
    background: #dc2626;
}

.btn-scorekit-danger:hover {
    background: #b91c1c;
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.4);
}

/* CSV Import/Export */
.csv-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.csv-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    left: -9999px;
}

.file-input-label {
    background: #f3f4f6;
    color: #374151;
    padding: 0.75rem 2rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.file-input-label:hover {
    background: #e5e7eb;
}

/* Reports */
.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.report-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.report-card .report-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.report-card h3 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.report-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Loading States */
.loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .scorekit-container {
        padding: 1rem;
    }

    .scorekit-header {
        padding: 2rem 1rem;
    }

    .scorekit-header h1 {
        font-size: 2rem;
    }

    .grade-grid {
        grid-template-columns: 150px repeat(auto-fit, minmax(80px, 1fr));
    }

    .nav-card {
        min-width: 150px;
        padding: 1.5rem;
    }

    .course-info {
        grid-template-columns: 1fr;
    }

    .csv-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Notification */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: #10b981;
}

.notification.error {
    background: #dc2626;
}

.notification.warning {
    background: #f59e0b;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}