/* Cabeçalho da Página */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.8rem;
}

.header-actions {
    display: flex;
    gap: 15px;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.85rem;
}

/* Filtros */
.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.filter-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.filter-group select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
    font-size: 0.9rem;
}

/* Resumo de Notas */
.grades-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 15px;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.card-content {
    flex: 1;
}

.card-content h3 {
    margin: 0 0 5px;
    font-size: 1rem;
    color: #7f8c8d;
    font-weight: 500;
}

.big-number {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.trend {
    font-size: 0.8rem;
    margin: 5px 0 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.trend.up {
    color: #27ae60;
}

.trend.down {
    color: #e74c3c;
}

/* Tabela de Notas */
.grades-table-container {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #2c3e50;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.table-responsive {
    overflow-x: auto;
}

.grades-table {
    width: 100%;
    border-collapse: collapse;
}

.grades-table th, .grades-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.grades-table th {
    background-color: #f8f9fa;
    color: #7f8c8d;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
}

.grades-table tr:hover {
    background-color: #f8f9fa;
}

.grades-table td {
    color: #2c3e50;
}

.btn-link {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-weight: 500;
    padding: 0;
}

.btn-link:hover {
    text-decoration: underline;
}

.table-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-number {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Médias por Disciplina */
.subject-averages {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.subject-averages h2 {
    margin: 0 0 20px;
    font-size: 1.2rem;
    color: #2c3e50;
}

.averages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.average-card {
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.average-card h3 {
    margin: 0 0 15px;
    font-size: 1rem;
    color: #2c3e50;
}

.progress-container {
    height: 30px;
    background-color: #f1f1f1;
    border-radius: 15px;
    margin-bottom: 15px;
    position: relative;
}

.progress-bar {
    height: 100%;
    border-radius: 15px;
    background-color: #3498db;
    position: relative;
    transition: width 0.5s ease;
}

.progress-bar.warning {
    background-color: #f39c12;
}

.progress-bar span {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: 500;
    font-size: 0.8rem;
}

.average-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.average-info div {
    display: flex;
    flex-direction: column;
}

.average-info span {
    font-size: 0.8rem;
    color: #7f8c8d;
}

.average-info strong {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-top: 3px;
}

/* Responsividade */
@media (max-width: 992px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .averages-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .filters-container {
        flex-direction: column;
    }
    
    .filter-group {
        min-width: 100%;
    }
}

@media (max-width: 576px) {
    .grades-summary {
        grid-template-columns: 1fr;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .table-actions {
        width: 100%;
        justify-content: flex-end;
    }
}