/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9fafb;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: linear-gradient(135deg, #7c2d12 0%, #5c1a1a 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
    text-align: center;
    margin-bottom: 1.5rem;
}

.header h1 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.header p {
    font-size: 1.125rem;
    opacity: 0.9;
}

.nav {
    display: flex;
    justify-content: center;
}

.nav-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 0.25rem;
    backdrop-filter: blur(4px);
}

.nav-button {
    background: transparent;
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    margin-right: 0.5rem;
}

.nav-button:last-child {
    margin-right: 0;
}

.nav-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-button.active {
    background: white;
    color: #7c2d12;
}

/* Main Content */
.main {
    padding: 2rem 0;
}

.filters-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.filter-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.filter-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: #7c2d12;
    box-shadow: 0 0 0 3px rgba(124, 45, 18, 0.1);
}

.content-section {
    animation: fadeIn 0.5s ease-out;
}

.content-section.hidden {
    display: none;
}

.section-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #7c2d12;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #7c2d12;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Schedule Cards */
.schedule-card {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.schedule-header {
    background: #fef7f0;
    padding: 1.5rem;
    border-bottom: 1px solid #fed7aa;
}

.schedule-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.schedule-class-name {
    font-size: 1.25rem;
    font-weight: bold;
    color: #7c2d12;
}

.schedule-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-trimester-1 {
    background: #dbeafe;
    color: #1e40af;
}

.badge-trimester-2 {
    background: #dcfce7;
    color: #166534;
}

.badge-trimester-3 {
    background: #fef3c7;
    color: #d97706;
}

.badge-trimester-4 {
    background: #f3e8ff;
    color: #7c3aed;
}

.schedule-theme {
    font-size: 0.875rem;
    color: #7c2d12;
    font-weight: 500;
}

/* Table */
.table-container {
    overflow-x: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.schedule-table thead {
    background: #fef7f0;
}

.schedule-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #7c2d12;
    border-bottom: 1px solid #fed7aa;
}

.schedule-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.schedule-table tbody tr:hover {
    background: rgba(254, 247, 240, 0.5);
}

.lesson-number {
    font-weight: 600;
    color: #7c2d12;
}

.teacher-name {
    font-weight: 500;
    color: #374151;
}

/* Lessons Grid */
.lessons-section {
    margin-bottom: 2rem;
}

.lessons-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.lessons-section-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #7c2d12;
}

.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.lesson-card {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.lesson-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lesson-image {
    position: relative;
    height: 12rem; 
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lesson-image img {
    width: 100%;   
    height: 100%;  
    object-fit: contain;
    transition: transform 0.3s ease;
}

.lesson-card:has(.badge-type-professor) .lesson-image {
    background-color: #f7e0d3; 
}

.lesson-card:has(.badge-type-aluno) .lesson-image {
    background-color: #d3eaf7; 
}

.lesson-card:has(.badge-type-livro-de-apoio) .lesson-image {
    background-color: #e0f7d3; 
}

.lesson-card:has(.badge-type-material) .lesson-image {
    background-color: #f7d3e0; 
}

.lesson-card:not(:has(.badge-type-professor)):not(:has(.badge-type-aluno)):not(:has(.badge-type-livro-de-apoio)):not(:has(.badge-type-material)) .lesson-image {
    background-color: #f0f0f0;
}

.lesson-card:hover .lesson-image img {
    transform: scale(1.05);
}

.lesson-badges-bottom {
    display: flex;
    flex-wrap: wrap; 
    gap: 0.5rem;
    margin-bottom: 0.75rem; 
    align-items: center; 
}

.badge-type-professor {
    --badge-bg-professor: #fef7f0;
    --badge-color-professor: #7c2d12; 
    background: var(--badge-bg-professor);
    color: var(--badge-color-professor);
}

.badge-type-aluno {
    --badge-bg-aluno: #fff7ed; 
    --badge-color-aluno: #ea580c; 
    background: var(--badge-bg-aluno);
    color: var(--badge-color-aluno);
}

.badge-type-livro-de-apoio {
    --badge-bg-livro-de-apoio: #ecfccb;
    --badge-color-livro-de-apoio: #365314;
    background: var(--badge-bg-livro-de-apoio);
    color: var(--badge-color-livro-de-apoio);
}

.badge-type-material {
    --badge-bg-material: #e0f2fe;
    --badge-color-material: #0369a1;
    background: var(--badge-bg-material);
    color: var(--badge-color-material);
}

.lesson-badges-bottom .badge {
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap; 
}

.lesson-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lesson-card:hover .lesson-overlay {
    background: rgba(0, 0, 0, 0.2);
}

.lesson-icon {
    width: 2rem;
    height: 2rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lesson-card:hover .lesson-icon {
    opacity: 1;
}

.lesson-content {
    padding: 1.5rem;
}

.lesson-title {
    font-size: 1.125rem;
    font-weight: bold;
    color: #7c2d12;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.lesson-card:hover .lesson-title {
    color: #5c1a1a;
}

.lesson-theme {
    color: #7c2d12;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.lesson-description {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.empty-state-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    color: #d1d5db;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #7c2d12 0%, #5c1a1a 100%);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .nav-button {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .schedule-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .lessons-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .filters-card {
        padding: 1rem;
    }
    
    .schedule-header {
        padding: 1rem;
    }
    
    .schedule-table th,
    .schedule-table td {
        padding: 0.5rem;
    }
}

/* --- Estilos da Visão Geral (Dashboard) --- */

.overview-container {
    animation: fadeIn 0.5s ease-out;
}

.overview-header {
    text-align: center;
    margin-bottom: 1rem;
}

.overview-header h3 {
    color: #7c2d12;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.shadow-card {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 0.5rem;
    overflow: hidden;
    background: white;
}

.overview-table th {
    background-color: #fff7ed; /* Um laranja bem clarinho */
    color: #9a3412;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.overview-table .class-col {
    font-weight: 700;
    color: #7c2d12;
}

.overview-table .teacher-col {
    color: #1f2937;
    font-weight: 600;
}

.lesson-cell {
    display: flex;
    flex-direction: column;
}

.lesson-tag {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: normal;
}

.theme-text {
    font-weight: 500;
    color: #374151;
}

/* Estilos do Card de Destaque Individual */
.highlight-card {
    border-left: 5px solid #ea580c;
    background-color: #fff7ed;
    margin-bottom: 2rem;
}

.highlight-header {
    background-color: #ffedd5;
    border-bottom: 1px solid #fed7aa;
}

.highlight-badge {
    background: #ea580c; 
    color: white; 
    margin-bottom: 0.5rem; 
    display: inline-block;
}

.label-sm {
    font-size: 0.875rem; 
    color: #666; 
    margin-bottom: 0.25rem;
}

.value-lg {
    font-size: 1.125rem; 
    font-weight: bold; 
    color: #333;
}
