/* ============================================
   GradeFlow - Subjects Page Styles
   ============================================ */

.page-header-large {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.page-title-large {
    font-size: 2.25rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.page-actions {
    display: flex;
    gap: 0.75rem;
}

/* Stats Grid 3 Columns */
.stats-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.stat-icon {
    color: var(--text-secondary);
    font-size: 1.25rem;
}

.stat-card.highlight {
    box-shadow: 0 0 10px rgba(19, 127, 236, 0.2);
    border-color: var(--primary-40);
}

.stat-card.highlight .stat-icon {
    color: var(--primary);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.stat-trend.positive {
    color: var(--success);
}

.stat-trend.negative {
    color: var(--warning);
}

.stat-trend .material-symbols-outlined {
    font-size: 1rem;
}

/* Section Title with Info Icon */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-icon {
    font-size: 1rem;
    color: var(--text-secondary);
    cursor: help;
}

/* Grades Table */
.grades-table-container {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.grades-table {
    width: 100%;
    border-collapse: collapse;
}

.grades-table thead {
    background: var(--bg-card);
}

.grades-table th {
    padding: 1rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
}

.th-center {
    text-align: center !important;
}

.grades-table td {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
}

.grades-table tbody tr {
    transition: background 0.2s;
}

.grades-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Subject Cell */
.subject-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.subject-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-10);
    border-radius: var(--radius-lg);
    color: var(--primary);
}

.subject-icon .material-symbols-outlined {
    font-size: 1.25rem;
}

.subject-name {
    font-weight: 500;
}

/* Grade Inputs */
.grade-input-cell {
    text-align: center;
}

.grade-input {
    width: 64px;
    padding: 0.5rem;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.875rem;
}

.grade-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Calculated Badge */
.calculated-cell {
    text-align: center;
}

.calculated-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--primary-20);
    border: 1px solid var(--primary-40);
    border-radius: var(--radius-full);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 0 10px rgba(19, 127, 236, 0.2);
}

.calculated-badge .material-symbols-outlined {
    font-size: 0.875rem;
}

.reliability {
    display: block;
    font-size: 0.625rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* Final Grade Cell */
.final-grade-cell {
    text-align: center;
}

.final-grade {
    font-size: 1.125rem;
    font-weight: 900;
    cursor: pointer;
}

.final-grade.empty {
    color: var(--text-secondary);
}

.final-grade.set {
    color: var(--text-primary);
    background: var(--primary-10);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
}

/* Participation Cell */
.participation-cell {
    min-width: 150px;
}

.participation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.participation-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.participation-value {
    font-size: 0.75rem;
    font-weight: 600;
}

.participation-bar {
    height: 6px;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.participation-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.participation-fill.high {
    background: var(--primary);
    box-shadow: 0 0 8px rgba(19, 127, 236, 0.4);
}

.participation-fill.medium {
    background: var(--orange);
}

.participation-fill.low {
    background: var(--warning);
}

/* Add Subject Card */
.add-subject-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2.5rem;
    margin-top: 2rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.add-subject-card:hover {
    border-color: var(--primary-40);
}

.add-subject-card:hover .add-subject-icon {
    background: var(--primary-20);
    color: var(--primary);
}

.add-subject-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.add-subject-title {
    font-weight: 700;
    font-size: 1.125rem;
}

.add-subject-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Actions Cell */
.actions-cell {
    text-align: right;
}

.action-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .stats-grid-3 {
        grid-template-columns: 1fr;
    }
    
    .page-header-large {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .page-title-large {
        font-size: 1.5rem;
    }
    
    .grades-table {
        font-size: 0.75rem;
    }
    
    .grades-table th,
    .grades-table td {
        padding: 0.75rem;
    }
}