/* ===== RESET E CONFIGURAÇÕES GERAIS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER ===== */
header {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px 0;
    background: linear-gradient(135deg, #2c3e50 0%, #4a6491 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.15);
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

h1 img {
    height: 40px;
    margin-right: 10px;
}

.subtitle {
    font-size: 1.3rem;
    color: #ecf0f1;
    font-weight: 300;
    opacity: 0.9;
}

/* ===== CONTROLES E FILTROS ===== */
.controls {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 180px;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.search-container {
    display: flex;
    flex-direction: column;
    flex: 2;
    min-width: 250px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: #95a5a6;
}

#search-input {
    padding: 10px 12px 10px 40px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    width: 100%;
    transition: all 0.3s ease;
}

#search-input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.reset-btn {
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 42px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.reset-btn:hover {
    background-color: #7f8c8d;
    transform: translateY(-1px);
}

/* ===== TABELA ===== */
.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    overflow-x: auto;
    flex: 1;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

thead {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
}

th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

th:last-child {
    border-right: none;
}

/* CORES POR TURNO */


/* Adicionar ao CSS da Engenharia Civil (opcional) */
.manha-row {
    background-color: #fff9e6;
    border-left: 4px solid #f39c12;
}

.manha-row:hover {
    background-color: #fff4cc;
}

.manha-row:nth-child(even) {
    background-color: #fff5d9;
}

.manha-row:nth-child(even):hover {
    background-color: #fff0bf;
}

.noite-row {
    background-color: #e8f4f8;
    border-left: 4px solid #3498db;
}

.noite-row:hover {
    background-color: #d9ecf4;
}

.noite-row:nth-child(even) {
    background-color: #f0f8fb;
}

.noite-row:nth-child(even):hover {
    background-color: #e1f0f7;
}

tbody tr {
    border-bottom: 1px solid #eee;
    transition: all 0.2s ease;
}

td {
    padding: 14px 12px;
    font-size: 0.95rem;
    color: #333;
    vertical-align: middle;
}

/* ÍCONES DE TURNO */
.turno-icon {
    margin-right: 8px;
    font-size: 1rem;
    vertical-align: middle;
}

.manha-icon {
    color: #f39c12;
}

.noite-icon {
    color: #3498db;
}

.turma-cell {
    font-weight: 600;
    color: #2c3e50;
}

.dia-cell {
    text-transform: capitalize;
}

/* ===== PAGINAÇÃO ===== */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.page-info {
    font-weight: 600;
    color: #2c3e50;
}

.page-controls {
    display: flex;
    gap: 8px;
}

.page-btn {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-btn:hover:not(:disabled) {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.page-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* ===== ESTADOS DA APLICAÇÃO ===== */
.loading {
    text-align: center;
    padding: 80px 20px;
    font-size: 1.2rem;
    color: #666;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loading i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #3498db;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #7f8c8d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #ddd;
}

#message-area {
    margin-bottom: 20px;
}

.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.info {
    background-color: #e8f4fd;
    border-left: 4px solid #3498db;
    color: #2c3e50;
}

.message.warning {
    background-color: #fff8e6;
    border-left: 4px solid #f39c12;
    color: #2c3e50;
}

.message.error {
    background-color: #fde8e8;
    border-left: 4px solid #e74c3c;
    color: #2c3e50;
}

.message.success {
    background-color: #e8f8ef;
    border-left: 4px solid #27ae60;
    color: #2c3e50;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

footer p {
    margin-bottom: 8px;
}

.footer-note {
    font-size: 0.8rem;
    color: #95a5a6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-note i {
    font-size: 0.9rem;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group, .search-container {
        min-width: 100%;
    }
    
    h1 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 8px;
    }
    
    h1 i {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .pagination {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .page-controls {
        width: 100%;
        justify-content: center;
    }
    
    .footer-note {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 15px 10px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .filter-select, #search-input {
        font-size: 16px; /* Evita zoom no iOS */
    }
    
    td, th {
        padding: 10px 8px;
        font-size: 0.9rem;
    }
}