/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    /* Melhorias para dispositivos touch */
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Melhorias gerais para responsividade */
img {
    max-width: 100%;
    height: auto;
}

/* Smooth scrolling para melhor UX */
html {
    scroll-behavior: smooth;
}

/* Melhor experiência de scroll em dispositivos touch */
.scrollable {
    -webkit-overflow-scrolling: touch;
}

/* Container principal */
.container {
    display: flex;
    min-height: 100vh;
}

/* Menu lateral esquerdo */
.sidebar {
    width: 280px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

.sidebar.collapsed {
    transform: translateX(-200px);
    width: 80px;
    padding: 20px 5px;
    z-index: 999;
}

.sidebar.collapsed .menu-item span {
    display: none;
}

.sidebar.collapsed .sidebar-header h2 span {
    display: none;
}

.sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 15px 10px;
    text-align: center;
}

.sidebar.collapsed .menu-item i {
    margin-right: 0;
    font-size: 18px;
}

/* Tooltips para menu retraído */
.sidebar.collapsed .menu-item {
    position: relative;
}

.sidebar.collapsed .menu-item:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 1002;
    margin-left: 10px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.sidebar.collapsed .menu-item:hover::before {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #333;
    z-index: 1002;
    margin-left: 4px;
}

/* Novo botão toggle no estilo moderno */
.menu-toggle {
    position: fixed;
    top: 85px;
    left: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    z-index: 9999;
    font-size: 14px;
    font-weight: 500;
    user-select: none;
}

.menu-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.toggle-icon {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 18px;
}

.toggle-icon span {
    display: block;
    height: 2px;
    background: white;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.toggle-icon span:nth-child(1) {
    width: 100%;
}

.toggle-icon span:nth-child(2) {
    width: 75%;
}

.toggle-icon span:nth-child(3) {
    width: 50%;
}

/* Animação quando menu está aberto */
.menu-toggle.active .toggle-icon span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active .toggle-icon span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .toggle-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 100%;
}

.toggle-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sidebar-header i {
    font-size: 1.6rem;
    color: #ffd700;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.menu-item {
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
    gap: 15px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: #ffd700;
}

.menu-item.active {
    background-color: rgba(255, 255, 255, 0.15);
    border-left-color: #ffd700;
}

.menu-item i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.menu-item span {
    font-weight: 500;
}

/* Área de conteúdo principal */
.main-content {
    flex: 1;
    margin-left: 280px;
    background-color: #f8fafc;
    transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out;
    width: calc(100% - 280px);
}

.main-content.expanded {
    margin-left: 80px;
    width: calc(100% - 80px);
}

/* Adaptação para sidebar recolhido */
body.sidebar-collapsed .main-content {
    margin-left: 80px;
    width: calc(100% - 80px);
}

body.sidebar-collapsed .sidebar {
    width: 80px;
}

.content-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.content-header h1 {
    color: #2d3748;
    font-size: 1.8rem;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-weight: 500;
}

.user-info i {
    font-size: 1.5rem;
    color: #667eea;
}

.user-text-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

/* User Profile Container */
.user-profile-container {
    position: relative;
    display: flex;
    align-items: center;
}

.btn-user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-user-profile:hover {
    background-color: var(--hover-color);
}

.btn-user-profile i {
    font-size: 1.5rem;
    color: #667eea;
}

/* User Profile Dropdown */
.user-profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
}

.user-profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-avatar {
    font-size: 40px;
    color: #667eea;
}

/* Estilos para imagens de perfil */
.user-profile-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
}

.profile-avatar-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-color);
}

.profile-role {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.profile-dropdown-menu {
    padding: 8px;
}

.profile-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.profile-menu-item:hover {
    background-color: var(--hover-color);
    color: #667eea;
}

.profile-menu-item i {
    font-size: 14px;
    width: 18px;
    text-align: center;
}

/* Modal de Edição de Perfil */
.modal-medium {
    max-width: 500px;
    width: 90%;
}

.form-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.form-section h4 {
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
}

.form-help-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-style: italic;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background-color: var(--input-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Select (combobox) base — aparência consistente com o tema */
.form-select {
    width: auto;
    min-height: 40px;
    padding: 10px 36px 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background-color: var(--input-bg);
    color: var(--text-color);
    transition: all 0.2s ease;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='%233498db'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}
.form-select:hover { border-color: rgba(var(--primary-color-rgb), 0.5); }
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.15);
}
.form-select:disabled { opacity: 0.7; cursor: not-allowed; }

/* Combobox da agenda do professor — alinhamento do label e espaçamento */
#agenda-professor-hoje .filter-group { gap: 10px; }
#agenda-professor-hoje label { color: var(--text-color); }
#prof-agenda-turma-select { min-width: 260px; }

/* Removido: .form-control:invalid para evitar bordas vermelhas antes da validação */

/* Validação manual - aplicada apenas quando necessário */
.form-control.is-invalid, .form-select.is-invalid {
    border-color: #e53e3e;
    box-shadow: 0 0 0 0.2rem rgba(229, 62, 62, 0.25);
}

.form-control.is-valid, .form-select.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.btn-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-close:hover {
    color: var(--text-color);
    background-color: var(--hover-color);
}

/* Seção de Upload de Imagem */
.profile-image-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.current-profile-image,
.new-image-preview {
    text-align: center;
    flex: 1;
}

.profile-preview-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.profile-preview-img:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.image-help-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.file-upload-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.file-upload-label i {
    margin-right: 8px;
    font-size: 16px;
}

.file-upload-input {
    display: none;
}

.new-image-preview {
    padding: 20px;
    border: 2px dashed #667eea;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    animation: fadeIn 0.3s ease;
}

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

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
    margin-top: 10px;
    border-radius: 6px;
    font-weight: 500;
}

@media (min-width: 600px) {
    .profile-image-section {
        flex-direction: row;
        justify-content: space-around;
        align-items: flex-start;
        gap: 30px;
    }
    
    .current-profile-image,
    .new-image-preview {
        max-width: 150px;
    }
    
    .profile-preview-img {
        width: 120px;
        height: 120px;
    }
}

/* Área de conteúdo */
.content-area {
    padding: 30px;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Centralização específica para o formulário do mural */
.centered-section .section-body {
    display: flex;
    justify-content: center;
}

.centered-section .mural-form {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid #667eea;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.card-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
}

.card-info p {
    color: #64748b;
    font-weight: 500;
}

/* Seções */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-buttons .btn {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.header-buttons .btn i {
    font-size: 14px;
}

.section-header h2 {
    color: #2d3748;
    font-size: 1.6rem;
    font-weight: 600;
}



/* Botões */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.4);
}

/* Formulários */
.form-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    margin-bottom: 25px;
    border-left: 4px solid #667eea;
}

.form-container h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

/* Tabelas */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

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

table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

table td,
.table td {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
}

table tbody tr:hover {
    background-color: #f7fafc;
}

table tbody tr:last-child td {
    border-bottom: none;
}

/* Grade de horários */
.schedule-container {
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
}

.turno-section {
    margin-bottom: 30px;
}

.turno-section:last-child {
    margin-bottom: 0;
}

.turno-title {
    color: #2d3436;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #4CAF50;
    text-align: center;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
    font-size: 12px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.schedule-table th,
.schedule-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
    vertical-align: middle;
}

.schedule-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 10;
}

.turma-header {
    background-color: #007bff !important;
    color: white !important;
    font-size: 14px;
}

.dia-header {
    background-color: #6c757d !important;
    color: white !important;
    font-size: 12px;
}

.horario-header,
.horario-cell {
    background-color: #f8f9fa;
    font-weight: bold;
    min-width: 80px;
    position: sticky;
    left: 0;
    z-index: 5;
}

.aula-cell {
    min-width: 120px;
    max-width: 150px;
    height: 60px;
    padding: 4px;
}

.aula-cell.has-aula {
    background-color: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.aula-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    height: 100%;
    justify-content: center;
    position: relative;
}

/* Botão de exclusão de aula */
.delete-aula-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    opacity: 0;
}

.aula-info:hover .delete-aula-btn {
    opacity: 1;
}

.delete-aula-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

.delete-aula-btn i {
    font-size: 8px;
}

.aula-info .disciplina {
    font-weight: bold;
    color: #1976d2;
    font-size: 11px;
    line-height: 1.2;
}

.aula-info .professor {
    color: #666;
    font-size: 10px;
    line-height: 1.1;
}

.aula-info .sala {
    color: #888;
    font-size: 9px;
    line-height: 1.1;
}

.empty-cell {
    color: #ccc;
    font-size: 14px;
}

/* Responsividade para grade de horários */
@media (max-width: 768px) {
    .schedule-table {
        font-size: 10px;
    }
    
    .aula-cell {
        min-width: 100px;
        max-width: 120px;
        height: 50px;
    }
    
    .aula-info .disciplina {
        font-size: 10px;
    }
    
    .aula-info .professor {
        font-size: 9px;
    }
    
    .aula-info .sala {
        font-size: 8px;
    }
}

/* Modo escuro para grade de horários */
.dark-mode .schedule-container {
    background: #2d3748;
}

.dark-mode .turno-title {
    color: #e2e8f0;
    border-bottom-color: #4CAF50;
}

.dark-mode .schedule-table th,
.dark-mode .schedule-table td {
    border-color: #444;
}

.dark-mode .schedule-table th {
    background-color: #4a5568;
    color: #e2e8f0;
}

.dark-mode .horario-header,
.dark-mode .horario-cell {
    background-color: #4a5568;
    color: #e2e8f0;
}

.dark-mode .aula-cell.has-aula {
    background-color: #2d3748;
    border-left-color: #4299e1;
}

.dark-mode .aula-info .disciplina {
    color: #63b3ed;
}

.dark-mode .aula-info .professor {
    color: #a0aec0;
}

.dark-mode .aula-info .sala {
    color: #718096;
}

.dark-mode .empty-cell {
    color: #4a5568;
}
.schedule-container {
    margin-top: 25px;
}

.turno-container {
    margin-bottom: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    background: white;
    overflow: hidden;
}

.turno-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.turno-container .schedule-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.turno-container .schedule-table th {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.turno-container .schedule-table td {
    padding: 12px 8px;
    border: 1px solid #e2e8f0;
    text-align: center;
    vertical-align: middle;
    min-height: 60px;
    position: relative;
}

.turno-container .schedule-table .time-slot {
    background-color: #f8fafc;
    font-weight: 600;
    color: #4a5568;
    position: sticky;
    left: 0;
    z-index: 5;
    min-width: 100px;
}

.turno-container .schedule-cell {
    min-width: 120px;
    height: 60px;
    position: relative;
    background-color: #fff;
    transition: background-color 0.3s ease;
}

.turno-container .schedule-cell:hover {
    background-color: #f0f8ff;
}

.turno-container .empty-slot {
    color: #ccc;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    transition: color 0.3s ease;
}

.turno-container .empty-slot:hover {
    color: #667eea;
    transform: scale(1.2);
}

.turno-container .aula-info {
    padding: 4px;
    border-radius: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 11px;
    line-height: 1.2;
    margin: 2px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.turno-container .aula-info:hover {
    transform: scale(1.05);
}

.turno-container .aula-info .professor {
    font-weight: bold;
    margin-bottom: 2px;
    color: white;
}

.turno-container .aula-info .disciplina {
    font-style: italic;
    margin-bottom: 2px;
    color: white;
}

.turno-container .aula-info .sala {
    font-size: 10px;
    opacity: 0.9;
    color: white;
}

.turno-container .schedule-table .time-slot.intervalo {
    background-color: #fed7d7;
    color: #c53030;
    font-weight: 700;
    text-align: center;
}

.turno-container .schedule-table .intervalo-cell {
    background-color: #fed7d7;
    color: #c53030;
    font-style: italic;
    text-align: center;
    font-weight: 500;
}

/* Estilos específicos por turno */
.turno-container:nth-child(1) .turno-title {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.turno-container:nth-child(2) .turno-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.turno-container:nth-child(3) .turno-title {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

/* Responsividade para as grades */
@media (max-width: 768px) {
    .turno-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        position: relative;
    }
    
    .turno-title {
        font-size: 16px;
        padding: 12px 15px;
        position: sticky;
        left: 0;
        background: inherit;
        z-index: 2;
    }
    
    .turno-container .schedule-table {
        min-width: 600px;
    }
    
    .turno-container .schedule-cell {
        min-width: 100px;
        height: 50px;
        font-size: 12px;
    }
    
    /* Indicador de scroll para grades de horário */
    .turno-container::after {
        content: '← Deslize →';
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 10px;
        color: #666;
        background: rgba(255, 255, 255, 0.8);
        padding: 2px 6px;
        border-radius: 3px;
        pointer-events: none;
        z-index: 3;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal[style*="flex"], .modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Garantir centralização específica para o modal de horários */
#horarioModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

#horarioModal[style*="block"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Garantir centralização específica para o modal de provas */
#prova-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

#prova-modal[style*="block"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Garantir centralização específica para o modal de aula extra */
#aula-extra-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

#aula-extra-modal[style*="block"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 0.5rem;
    pointer-events: none;
}

.modal-dialog.modal-lg {
    max-width: 800px;
}

.modal-content {
    background-color: #fff;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    position: relative;
    pointer-events: auto;
}

.modal-content.modal-lg {
    max-width: 800px;
    width: 90%;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
}

.close:hover {
    opacity: 0.7;
}

.modal-header .btn-close {
    color: white;
    font-size: 24px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-header .btn-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

.modal-body {
    padding: 20px;
}

.modal-body .form-group {
    margin-bottom: 16px;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.modal-body input,
.modal-body select,
.modal-body textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-body input[readonly] {
    background-color: #f8fafc;
    color: #64748b;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-radius: 0 0 12px 12px;
}

.modal-footer .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-footer .btn-secondary {
    background-color: #64748b;
    color: white;
}

.modal-footer .btn-secondary:hover {
    background-color: #475569;
}

.modal-footer .btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.modal-footer .btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Estilo para texto de ajuda no modal de professores */
.modal-body .form-text {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 4px;
    font-style: italic;
}

/* Responsividade do Modal */
@media (max-width: 768px) {
    .modal-content {
        margin: 5% auto;
        width: 95%;
        max-width: none;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 12px 16px;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .modal-body .form-group {
        margin-bottom: 14px;
    }
    
    .modal-footer {
        padding: 12px 16px;
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-footer .btn {
        width: 100%;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 2% auto;
        width: 98%;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 10px 14px;
    }
    
    .modal-header h3 {
        font-size: 1rem;
    }
    
    .close {
        font-size: 24px;
    }
    
    .modal-body {
        padding: 14px;
    }
    
    .modal-body .form-group {
        margin-bottom: 12px;
    }
    
    .modal-body input,
    .modal-body select,
    .modal-body textarea {
        padding: 10px;
        font-size: 0.95rem;
    }
    
    .modal-footer {
        padding: 10px 14px;
    }
}

@media (max-height: 600px) {
    .modal-content {
        margin: 1% auto;
        max-height: 98vh;
    }
    
    .modal-body {
        padding: 12px;
    }
    
    .modal-body .form-group {
        margin-bottom: 10px;
    }
}

/* Orientação landscape em dispositivos móveis */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .main-content {
        padding: 50px 15px 15px 15px;
    }
    
    .menu-toggle {
        top: 10px;
        z-index: 1001;
    }
    
    .sidebar {
        width: 250px;
    }
    
    .modal-content {
        width: 90%;
        max-width: 600px;
        max-height: 80vh;
        margin: 2vh auto;
        overflow-y: auto;
    }
    
    .dashboard-cards {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 10px;
    }
    
    .card {
        padding: 10px;
        min-height: auto;
    }
    
    .card-icon {
        width: 35px;
        height: 35px;
    }
    
    .content-header {
        padding: 10px 15px;
    }
    
    .content-area {
        padding: 15px;
    }
    
    /* Ajustes para tabelas em landscape */
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .form-group {
        margin-bottom: 0.75rem;
    }
}

/* Melhorias para dispositivos muito pequenos */
@media (max-width: 320px) {
    .main-content {
        padding: 55px 8px 10px 8px;
    }
    
    .modal-content {
        width: 98%;
        margin: 2% auto;
    }
    
    .btn {
        font-size: 12px;
        padding: 10px 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 14px;
        padding: 10px;
    }
    
    .sidebar-header h2 {
        font-size: 16px;
    }
}

/* Estilos da grade de horários - Compatibilidade com versão anterior */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 11px;
    table-layout: fixed;
}

.schedule-table th,
.schedule-table td {
    border: 1px solid #333;
    padding: 4px;
    text-align: center;
    vertical-align: middle;
    word-wrap: break-word;
}

.schedule-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 10px;
}

/* Cabeçalho de turmas */
#turmas-header th {
    background-color: #FF0000;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 8px 4px;
}

/* Cabeçalho de dias */
#dias-header th {
    background-color: #FF0000;
    color: white;
    font-weight: bold;
    font-size: 9px;
    padding: 4px 2px;
}

.time-slot {
    background-color: #e9ecef;
    font-weight: bold;
    min-width: 100px;
    width: 100px;
    position: sticky;
    left: 0;
    z-index: 5;
    font-size: 10px;
    padding: 8px 4px;
}

.schedule-cell {
    min-height: 50px;
    height: 50px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 80px;
    max-width: 80px;
}

.schedule-cell:hover {
    background-color: #f8f9fa;
}

.aula-info {
    padding: 2px;
    border-radius: 2px;
    margin: 1px;
    background-color: #007bff;
    color: white;
    font-size: 8px;
    line-height: 1.1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.aula-info .professor {
    font-weight: bold;
    margin-bottom: 1px;
    color: white;
}

.aula-info .disciplina {
    font-style: italic;
    margin-bottom: 1px;
    color: white;
}

.aula-info .sala {
    font-size: 7px;
    opacity: 0.9;
    color: white;
}

.empty-slot {
    color: #6c757d;
    font-size: 16px;
    opacity: 0.5;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.turno {
    background-color: #28a745;
    color: white;
    font-weight: bold;
}

.intervalo {
    background-color: #FFE4B5 !important; /* Cor bege claro */
    color: #8B4513 !important; /* Marrom escuro */
    font-weight: bold;
    text-align: center;
    border: 2px solid #DEB887 !important; /* Borda bege mais escura */
    box-shadow: inset 0 0 5px rgba(222, 184, 135, 0.3);
    font-style: italic;
}

.intervalo-cell {
    background-color: #FFE4B5 !important; /* Cor bege claro */
    color: #8B4513 !important; /* Marrom escuro */
    font-weight: bold;
    text-align: center;
    border: 2px solid #DEB887 !important; /* Borda bege mais escura */
    box-shadow: inset 0 0 5px rgba(222, 184, 135, 0.3);
    font-style: italic;
}

.turno-cell {
    background-color: #d4edda;
}

/* Cores específicas das turmas */
th[style*="#FF6B6B"] {
    background-color: #FF6B6B !important;
}

th[style*="#4ECDC4"] {
    background-color: #4ECDC4 !important;
}

th[style*="#45B7D1"] {
    background-color: #45B7D1 !important;
}

th[style*="#96CEB4"] {
    background-color: #96CEB4 !important;
}

.aula-item {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    margin: 2px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.aula-item:hover {
    transform: scale(1.05);
}

.aula-item .professor {
    font-weight: 600;
    display: block;
}

.aula-item .disciplina {
    font-size: 0.7rem;
    opacity: 0.9;
}

.aula-item .sala {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Responsividade para telas menores */
@media (max-width: 1200px) {
    .schedule-table {
        font-size: 9px;
    }
    
    .schedule-cell {
        width: 60px;
        max-width: 60px;
        min-height: 40px;
        height: 40px;
    }
    
    .aula-info {
        font-size: 7px;
    }
    
    .time-slot {
        width: 80px;
        min-width: 80px;
        font-size: 9px;
    }
}

/* Status badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pendente {
    background-color: #fed7d7;
    color: #c53030;
}

.status-aprovada {
    background-color: #c6f6d5;
    color: #2f855a;
}

.status-rejeitada {
    background-color: #fed7d7;
    color: #c53030;
}

/* Responsividade */
@media (max-width: 1024px) {
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        margin-left: 250px;
        padding: 80px 20px 20px 20px;
    }
    
    .main-content.expanded {
        margin-left: 80px;
    }
    
    /* Melhorias para tablets */
    .dashboard-cards {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .modal-content {
        width: 90%;
        max-width: 500px;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .schedule-table {
        font-size: 0.9rem;
    }
    
    .btn {
        min-height: 40px;
        padding: 10px 16px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.collapsed {
        transform: translateX(-100%);
    }
    
    .sidebar:not(.collapsed) {
        transform: translateX(0);
    }
    
    .sidebar.show {
        transform: translateX(0) !important;
    }
    
    .menu-toggle {
        top: 75px;
        left: 15px;
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .toggle-icon {
        width: 17px;
    }
    
    .main-content {
        margin-left: 0;
        padding: 70px 15px 20px 15px;
        width: 100%;
        transition: all 0.3s ease;
    }
    
    .main-content.expanded {
        margin-left: 0;
        width: 100%;
    }
    

    
    .content-header {
        padding: 15px 20px;
    }
    
    .content-area {
        padding: 20px;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .schedule-table {
        font-size: 0.8rem;
    }
    
    .schedule-table th,
    .schedule-table td {
        padding: 8px 4px;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
        font-size: 14px;
    }
    
    .sidebar-header {
        padding: 20px 15px;
    }
    
    .sidebar-header h2 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .menu-toggle {
        padding: 10px 12px;
        font-size: 12px;
        top: 70px;
        left: 10px;
    }
    
    .toggle-icon {
        width: 16px;
    }
    
    .toggle-text {
        display: none;
    }
    
    .main-content {
        padding: 60px 10px 15px 10px;
    }
    
    .content-header h1 {
        font-size: 1.4rem;
    }
    
    .card {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
    }
    
    .card-info h3 {
        font-size: 16px;
    }
    
    .dashboard-cards {
        gap: 10px;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
        font-size: 12px;
    }
    
    /* Melhorias para modais em dispositivos móveis */
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-header h3 {
        font-size: 1rem;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Evita zoom no iOS */
        padding: 12px;
        min-height: 44px; /* Tamanho mínimo para touch */
    }
    
    .btn {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 14px;
        margin: 5px;
    }
    
    .form-actions {
        padding: 15px;
        gap: 10px;
    }
    
    /* Melhorias para tabelas responsivas */
    .table-responsive {
        border: 1px solid #ddd;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .table-responsive table {
        margin: 0;
        border: none;
    }
    
    /* Scroll indicator para tabelas */
    .table-container::after {
        content: '← Deslize para ver mais →';
        position: absolute;
        bottom: 5px;
        right: 10px;
        font-size: 11px;
        color: #666;
        background: rgba(255, 255, 255, 0.9);
        padding: 2px 6px;
        border-radius: 3px;
        pointer-events: none;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section.active {
    animation: fadeIn 0.3s ease;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* Estilos para impressão */
@media print {
    body * {
        visibility: hidden;
    }
    
    #printContent, #printContent * {
        visibility: visible;
    }
    
    #printContent {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    
    .header {
        text-align: center;
        margin-bottom: 20px;
        border-bottom: 2px solid #333;
        padding-bottom: 10px;
    }
    
    .turno-section {
        margin-bottom: 30px;
        page-break-inside: avoid;
    }
    
    .turno-title {
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 5px;
        background-color: #2c3e50 !important;
        color: white !important;
        padding: 8px;
        text-align: center;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .turmas-info {
        text-align: center;
        margin-bottom: 10px;
        padding: 5px;
        background-color: #ecf0f1 !important;
        border: 1px solid #bdc3c7;
        font-size: 14px;
        color: #2c3e50 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 20px;
        font-size: 10px;
    }
    
    th, td {
        border: 1px solid #333;
        padding: 4px;
        text-align: center;
        vertical-align: top;
    }
    
    /* Primeira coluna (horários) com cor de fundo */
    td:first-child {
        background-color: #f0f8ff !important;
        font-weight: bold;
        color: #2c3e50 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    th {
        background-color: #4a90e2 !important;
        color: white !important;
        font-weight: bold;
        font-size: 9px;
        line-height: 1.1;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .intervalo-row {
        background-color: #f9f9f9;
    }
    
    .aula-info {
        font-size: 8px;
        line-height: 1.1;
        margin: 1px 0;
    }
    
    .professor {
        font-weight: bold;
    }
    
    .disciplina {
        font-style: italic;
    }
    
    .sala {
        color: #666;
    }
}

/* === ESTILOS PARA SISTEMA DE AUTENTICAÇÃO === */

/* Estilos removidos - botão logout agora usa profile-menu-item */

/* Informações do usuário no header */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-role {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Estilos para elementos visíveis apenas para administradores */
.admin-only {
    display: none !important;
}

.admin-only.show {
    display: block !important;
}

.menu-item.admin-only.show {
    display: flex !important;
}

/* Seções de conteúdo administrativo só devem aparecer quando ativas E autorizadas */
.content-section.admin-only.show {
    display: none !important;
}

.content-section.admin-only.show.active {
    display: block !important;
}

/* Estilos para elementos visíveis apenas para professores */
.professor-only {
    display: none !important;
}

.professor-only.show {
    display: block !important;
}

.menu-item.professor-only.show {
    display: flex !important;
}

/* Seções de conteúdo para professores só devem aparecer quando ativas E autorizadas */
.content-section.professor-only.show {
    display: none !important;
}

.content-section.professor-only.show.active {
    display: block !important;
}

/* Estilos específicos para a seção de usuários */
#usuarios .data-table th:nth-child(6) {
    text-align: center;
}

#usuarios .data-table td:nth-child(6) {
    text-align: center;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.ativo {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.inativo {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-badge.pendente {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge.rejeitado {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.perfil-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.perfil-badge.administrador {
    background-color: #e7f3ff;
    color: #0066cc;
    border: 1px solid #b3d9ff;
}

.perfil-badge.professor {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Responsividade para telas menores */
@media (max-width: 768px) {
    .user-info {
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
    }
    
    .user-text-info {
        align-items: flex-end;
    }
    
    .user-role {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .btn-logout {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Animações para transições suaves */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* === ESTILOS PARA TABELA DE HORÁRIOS === */
.horarios-table th {
    text-align: center !important;
    vertical-align: middle !important;
}

.horarios-table .table-dark th {
    text-align: center !important;
    vertical-align: middle !important;
}

.turno-section h4 {
    text-align: center !important;
}

/* === ESTILOS PARA PLANOS DE AULA === */

/* Filtros de planos de aula */
.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 8px 16px;
    border: 2px solid #667eea;
    background: transparent;
    color: #667eea;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Estilos para upload de arquivos */
.upload-area {
    border: 2px dashed #667eea;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: rgba(102, 126, 234, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: #4c63d2;
    background: rgba(102, 126, 234, 0.1);
}

.upload-area.dragover {
    border-color: #4c63d2;
    background: rgba(102, 126, 234, 0.15);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.upload-text {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 10px;
}

.upload-hint {
    color: #6c757d;
    font-size: 14px;
}

/* Status dos planos */
.status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-approved {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Botões de ação */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    margin: 0 3px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100px;
    justify-content: center;
}

/* Container para botões de ação nas tabelas */
.action-buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    min-width: 140px;
}

/* Estilos específicos para botões em tabelas */
.action-buttons .btn-sm {
    margin: 0;
    flex: 0 0 auto;
}

.btn-success {
    background: #28a745;
    color: white;
    border-radius: 20px;
    font-weight: 600;
    padding: 6px 12px;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border-radius: 20px;
    font-weight: 600;
    padding: 6px 12px;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
}

.btn-warning {
    background: #ffc107;
    color: #212529;
    border-radius: 20px;
    font-weight: 600;
    padding: 6px 12px;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.4);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    font-weight: 600;
    padding: 6px 12px;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.4);
}

.btn-outline-secondary {
    background: transparent;
    color: #6c757d;
    border: 1px solid #6c757d;
    border-radius: 20px;
    font-weight: 600;
    padding: 6px 12px;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.4);
}

/* Responsividade para planos de aula */
@media (max-width: 768px) {
    .filter-tabs {
        flex-direction: column;
        gap: 5px;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .upload-icon {
        font-size: 36px;
    }
}
    
    .tab-btn {
        text-align: center;
    }
    
    .btn-sm {
        display: block;
        width: 100%;
        margin: 2px 0;
    }

/* ===== MODO NOTURNO ===== */

/* Variáveis CSS para temas */
:root {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #e0e6ed;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    --sidebar-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --input-bg: #ffffff;
    --modal-bg: #ffffff;
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --primary-color-rgb: 52, 152, 219;
    --bg-light: #f8f9fa;
    --text-muted: #6c757d;
    --hover-color: #f8f9fa;
}

/* Tema escuro */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --border-color: #404040;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --card-bg: #2d2d2d;
    --sidebar-bg: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --input-bg: #404040;
    --modal-bg: #2d2d2d;
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --primary-color-rgb: 52, 152, 219;
    --bg-light: #404040;
    --text-muted: #999999;
    --hover-color: #404040;
}

/* Aplicar variáveis aos elementos principais */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Botão de alternância de tema */
.btn-theme-toggle {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 15px;
    font-size: 16px;
}

.btn-theme-toggle:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

/* Sistema de Notificações */
.notification-container {
    position: relative;
    margin-right: 15px;
}

.btn-notifications {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    position: relative;
}

.btn-notifications:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    width: 380px;
    max-height: 450px;
    overflow: hidden;
    z-index: 1000;
    display: none;
    margin-top: 10px;
}

.notification-dropdown.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.notification-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), #4a90e2);
    color: white;
    border-radius: 12px 12px 0 0;
}

.notification-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.btn-mark-all-read {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-mark-all-read:hover {
    background: rgba(255, 255, 255, 0.3);
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 15px 18px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.notification-item:hover {
    background: var(--hover-color);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background: rgba(52, 152, 219, 0.1);
    border-left: 3px solid var(--primary-color);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 15px;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translateY(-50%);
}

.notification-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 0.95rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.notification-message {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 6px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    max-width: 100%;
}

.notification-message:not(.expanded) {
    display: -webkit-box;
    /* -webkit-line-clamp: 4; */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-message.expanded {
    display: block;
    max-height: none;
    overflow: visible;
}

.message-ellipsis {
    color: var(--text-muted);
    font-weight: 500;
}

.btn-show-more {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 4px;
    margin-left: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-decoration: underline;
}

.btn-show-more:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-show-more:active {
    transform: translateY(0);
}

.notification-time {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.no-notifications {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

/* Botão de tema para páginas de login/cadastro */
.btn-theme-toggle-login {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #333;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    font-size: 18px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-theme-toggle-login:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

[data-theme="dark"] .btn-theme-toggle-login {
    background: rgba(45, 45, 45, 0.9);
    color: #ffffff;
}

[data-theme="dark"] .btn-theme-toggle-login:hover {
    background: rgba(45, 45, 45, 1);
}

/* Ícone do tema */
[data-theme="dark"] .btn-theme-toggle i,
[data-theme="dark"] .btn-theme-toggle-login i {
    transform: rotate(180deg);
}

/* Aplicar tema escuro aos componentes principais */
[data-theme="dark"] .sidebar {
    background: var(--sidebar-bg);
}

[data-theme="dark"] .main-content {
    background-color: var(--bg-primary);
}

[data-theme="dark"] .content-header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px var(--shadow-color);
}

[data-theme="dark"] .modal-content {
    background-color: var(--modal-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .modal-body {
    background-color: var(--modal-bg);
    color: var(--text-primary);
}

[data-theme="dark"] .modal-body p {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .modal-body * {
    color: var(--text-primary);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: var(--input-bg);
    border-color: #667eea;
    color: var(--text-primary);
}



[data-theme="dark"] .table {
    background-color: var(--card-bg);
    color: var(--text-primary);
}

[data-theme="dark"] .table th {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .table td {
    border-color: var(--border-color);
}

[data-theme="dark"] .table tbody tr:hover {
    background-color: var(--bg-secondary);
}

/* Tema escuro para páginas de login/cadastro */
[data-theme="dark"] body {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

[data-theme="dark"] .login-container,
[data-theme="dark"] .register-container {
    background: var(--modal-bg);
}

/* Estilos para botão de exclusão de aulas */
.aula-info {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.aula-content {
    flex: 1;
    padding: 4px;
}

.delete-aula-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border: none;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: all 0.2s ease;
    z-index: 10;
}

.delete-aula-btn:hover {
    opacity: 1;
    background-color: #c82333;
    transform: scale(1.1);
}

.delete-aula-btn:active {
    transform: scale(0.95);
}

/* Estilos para modal de confirmação de exclusão de aula */
.confirmation-content {
    text-align: center;
    padding: 20px;
}

.warning-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.aula-details {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    text-align: left;
}

.aula-details p {
    margin: 8px 0;
    font-size: 14px;
}

.aula-details strong {
    color: #495057;
    font-weight: 600;
}

.warning-text {
    color: #dc3545;
    font-weight: 500;
    font-style: italic;
    margin-top: 15px;
}

/* Tema escuro para modal de confirmação */
.dark-theme .aula-details {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

.dark-theme .aula-details strong {
    color: #cbd5e0;
}

/* Modais Personalizados */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.custom-modal {
    background: var(--modal-bg);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

.custom-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.custom-modal-header.error {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.custom-modal-header.success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.custom-modal-header.warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
}

.custom-modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: inherit;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.custom-modal-body {
    padding: 25px;
    color: var(--text-primary);
}

.custom-modal-body * {
    color: var(--text-primary);
}

.aula-details p {
    color: var(--text-primary);
}

.confirmation-content {
    color: var(--text-primary);
}

.confirmation-content * {
    color: var(--text-primary);
}

/* Estilos para modais personalizados no modo noturno */
[data-theme="dark"] .custom-modal {
    background: var(--modal-bg);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .custom-modal-body {
    background-color: var(--modal-bg);
    color: var(--text-primary) !important;
}

[data-theme="dark"] .custom-modal-body * {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .aula-details {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .aula-details p {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .aula-details strong {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .confirmation-content {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .confirmation-content * {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .details-section {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .details-section h4 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .constraint-info {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .constraint-info p {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .constraint-info ul {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .constraint-info li {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .custom-modal-footer {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .summary-item {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .summary-item strong {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .aula-item strong {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .details-section h4 {
    color: var(--text-primary) !important;
}

/* Estilos para modais de cadastro no modo noturno */
[data-theme="dark"] .modal-body {
    background-color: var(--modal-bg);
    color: var(--text-primary);
}

[data-theme="dark"] .modal-body label {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .modal-body .form-group label {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .modal-body input,
[data-theme="dark"] .modal-body select,
[data-theme="dark"] .modal-body textarea {
    background-color: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .modal-body input::placeholder,
[data-theme="dark"] .modal-body textarea::placeholder {
    color: var(--text-secondary);
}

[data-theme="dark"] .modal-body .form-text {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .modal-footer {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

.warning-text {
    color: #dc3545 !important;
}

.error-message, .success-message {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.error-message {
    color: #721c24;
}

.success-message {
    color: #155724;
}

.details-section {
    margin-top: 20px;
    padding: 15px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.details-section h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1.1rem;
}

.aulas-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aula-item {
    background: var(--bg-secondary);
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.aula-item strong {
    color: #495057;
    font-size: 1rem;
}

.disciplina {
    color: #007bff;
    font-weight: 500;
}

.turma {
    color: #6c757d;
    font-weight: 500;
}

.constraint-info {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

.constraint-info p {
    margin: 0 0 10px 0;
    color: #495057;
}

.constraint-info ul {
    margin: 0;
    padding-left: 20px;
    color: #6c757d;
}

.constraint-info li {
    margin-bottom: 5px;
    line-height: 1.4;
}

.operation-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-item {
    background: var(--bg-secondary);
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.summary-item strong {
    color: var(--text-primary);
}

.custom-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background-color: var(--bg-secondary);
    border-radius: 0 0 12px 12px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsividade para modais personalizados */
@media (max-width: 768px) {
    .custom-modal {
        width: 95%;
        margin: 10px;
    }
    
    .custom-modal-header, .custom-modal-body, .custom-modal-footer {
        padding: 15px 20px;
    }
    
    .custom-modal-header h3 {
        font-size: 1.2rem;
    }
}

/* Corrigir cores das fontes do dashboard no modo noturno */
[data-theme="dark"] .card-info h3 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .card-info p {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .content-header h1 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .user-info {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .section-header h2 {
    color: var(--text-primary) !important;
}

/* Melhorar adaptação das tabelas ao modo noturno */
[data-theme="dark"] .table-container {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .table tbody tr {
    background-color: var(--card-bg);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    text-transform: capitalize;
}

.status-pendente {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-aprovado {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-rejeitado {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#detalhes-modal-actions {
    display: flex;
    gap: 10px;
}

/* Responsividade para o modal de detalhes */
@media (max-width: 768px) {
    .modal-large {
        width: 95%;
        max-width: none;
    }
}

[data-theme="dark"] .status-pendente {
    background-color: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.3);
}

[data-theme="dark"] .status-aprovado {
    background-color: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border-color: rgba(40, 167, 69, 0.3);
}

[data-theme="dark"] .status-rejeitado {
    background-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.3);
}

[data-theme="dark"] .table tbody tr:nth-child(even) {
    background-color: var(--bg-secondary);
}

[data-theme="dark"] .table tbody tr:hover {
    background-color: var(--bg-primary) !important;
}

[data-theme="dark"] .table td {
    color: var(--text-primary) !important;
    border-color: var(--border-color);
}

[data-theme="dark"] .table th {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color);
}

/* Estilos para grade de horários no modo noturno */
[data-theme="dark"] .schedule-table {
    background-color: var(--card-bg);
}

[data-theme="dark"] .schedule-table th,
[data-theme="dark"] .schedule-table td {
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .schedule-table th {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .time-slot {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .schedule-cell:hover {
    background-color: var(--bg-primary);
}

[data-theme="dark"] .turno-container {
    background-color: var(--card-bg);
}

[data-theme="dark"] .turno-title {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    color: var(--text-primary) !important;
}

/* Estilos para tabelas data-table no modo noturno */
[data-theme="dark"] .data-table {
    background-color: var(--card-bg) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .data-table th {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .data-table td {
    background-color: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .data-table tbody tr:hover {
    background-color: var(--bg-secondary) !important;
}

/* Estilos para impressão por turno */
@media print {
    @page {
        size: A4 landscape;
        margin: 1cm;
    }
    
    body {
        font-size: 12px;
        line-height: 1.2;
        color: #000 !important;
        background: white !important;
    }
    
    /* Ocultar elementos desnecessários na impressão */
    .navbar,
    .sidebar,
    .btn,
    .modal,
    .alert,
    .pagination,
    .no-print {
        display: none !important;
    }
    
    /* Container principal para impressão */
    .print-container {
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    /* Cada turno em uma página separada */
    .turno-print-page {
        page-break-before: always;
        page-break-after: always;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .turno-print-page:first-child {
        page-break-before: auto;
    }
    
    /* Título do turno para impressão */
    .turno-print-title {
        text-align: center;
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 20px;
        color: #000 !important;
        background: none !important;
        border: none !important;
        padding: 10px 0;
    }
    
    /* Tabela de horários para impressão */
    .turno-print-table {
        width: 100%;
        border-collapse: collapse;
        margin: 0;
        font-size: 10px;
    }
    
    .turno-print-table th,
    .turno-print-table td {
        border: 1px solid #000 !important;
        padding: 4px;
        text-align: center;
        vertical-align: middle;
        background: white !important;
        color: #000 !important;
    }
    
    .turno-print-table th {
        background: #f0f0f0 !important;
        font-weight: bold;
        font-size: 9px;
    }
    
    /* Cabeçalho de horários */
    .turno-print-table .horario-header {
        background: #e0e0e0 !important;
        font-weight: bold;
        width: 80px;
    }
    
    /* Células de horário */
    .turno-print-table .horario-cell {
        background: #f8f8f8 !important;
        font-weight: bold;
        width: 80px;
        font-size: 9px;
    }
    
    /* Células de aula */
    .turno-print-table .aula-print-cell {
        font-size: 8px;
        line-height: 1.1;
        padding: 2px;
        min-height: 40px;
        vertical-align: top;
    }
    
    .turno-print-table .aula-print-info {
        display: block;
    }
    
    .turno-print-table .disciplina-print {
        font-weight: bold;
        margin-bottom: 2px;
    }
    
    .turno-print-table .professor-print {
        font-size: 7px;
        margin-bottom: 1px;
    }
    
    .turno-print-table .sala-print {
        font-size: 7px;
        font-style: italic;
    }
    
    /* Células de intervalo */
    .turno-print-table .intervalo-print-cell {
        background: #f0f0f0 !important;
        font-style: italic;
        font-weight: bold;
        color: #666 !important;
    }
    
    /* Células vazias */
    .turno-print-table .empty-print-cell {
        background: white !important;
        color: #ccc !important;
    }
    
    /* Estilos para campos de assinatura */
    .signature-section {
        margin-top: 40px;
        margin-bottom: 20px;
        page-break-inside: avoid;
    }
    
    .signature-row {
        display: flex;
        justify-content: space-around;
        align-items: flex-end;
        gap: 50px;
    }
    
    .signature-field {
        flex: 1;
        text-align: center;
        min-width: 200px;
    }
    
    .signature-line {
        border-bottom: 1px solid #000;
        height: 40px;
        margin-bottom: 5px;
        width: 100%;
    }
    
    .signature-label {
        font-size: 11px;
        font-weight: bold;
        margin: 0;
        text-align: center;
        text-transform: uppercase;
    }
}

[data-theme="dark"] .data-table tbody tr:hover td {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .login-header,
[data-theme="dark"] .register-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

[data-theme="dark"] .form-control {
    background-color: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control::placeholder {
    color: var(--text-secondary);
}

[data-theme="dark"] .text-muted {
    color: var(--text-secondary) !important;
}

/* Animações suaves para transição de tema */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ===== MODAL DE TODAS AS NOTIFICAÇÕES ===== */

.modal-lg {
    max-width: 800px;
    width: 90%;
}

.notifications-container {
    max-height: 500px;
    overflow-y: auto;
}

.notifications-actions {
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 15px;
    text-align: right;
}

.all-notifications-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.notification-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.notification-item.unread {
    border-left: 4px solid #007bff;
    background-color: #f8f9ff;
}

.notification-item.read {
    opacity: 0.8;
}

.notification-content {
    flex: 1;
    margin-right: 15px;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.notification-type {
    background-color: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.notification-time {
    color: #6c757d;
    font-size: 12px;
}

.notification-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.notification-message {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

.loading-notifications,
.no-notifications {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

/* ===== MODAL DE COMUNICAÇÃO INSTITUCIONAL ===== */

.message-preview {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    margin-top: 15px;
    font-size: 13px;
    color: #6c757d;
}

.form-text {
    font-size: 12px;
    margin-top: 5px;
}

/* ===== BOTÃO DE COMUNICAÇÃO INSTITUCIONAL ===== */

/* Estilos admin-only removidos para manter aparência padrão */

/* ===== DROPDOWN DE NOTIFICAÇÕES ATUALIZADO ===== */

.notification-dropdown-footer,
.notification-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
    text-align: center;
    border-radius: 0 0 12px 12px;
}

.notification-dropdown-footer .btn,
.btn-view-all-notifications {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.notification-dropdown-footer .btn:hover,
.btn-view-all-notifications:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* ===== TEMA ESCURO PARA NOVOS ELEMENTOS ===== */

[data-theme="dark"] .notification-item {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .notification-item.unread {
    background-color: rgba(0, 123, 255, 0.1);
    border-left-color: #007bff;
}

[data-theme="dark"] .notification-title {
    color: var(--text-primary);
}

[data-theme="dark"] .notification-message {
    color: var(--text-secondary);
}

[data-theme="dark"] .notifications-actions {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .message-preview {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

[data-theme="dark"] .notification-dropdown-footer {
    background-color: var(--bg-secondary);
    border-top-color: var(--border-color);
}

[data-theme="dark"] .loading-notifications,
[data-theme="dark"] .no-notifications {
    color: var(--text-secondary);
}

/* ===== ESTILOS PARA BOTÕES NO TEMA ESCURO ===== */

[data-theme="dark"] .btn-secondary {
    background: #4a5568;
    color: #e2e8f0;
    border: 1px solid #718096;
}

[data-theme="dark"] .btn-secondary:hover {
    background: #2d3748;
    color: #ffffff;
    border-color: #4a5568;
}

[data-theme="dark"] .modal-footer .btn-secondary {
    background: #4a5568;
    color: #e2e8f0;
    border: 1px solid #718096;
}

[data-theme="dark"] .modal-footer .btn-secondary:hover {
    background: #2d3748;
    color: #ffffff;
    border-color: #4a5568;
}

[data-theme="dark"] .btn-outline-primary {
    background: transparent;
    color: #60a5fa;
    border: 1px solid #60a5fa;
}

[data-theme="dark"] .btn-outline-primary:hover {
    background: #60a5fa;
    color: #1a202c;
    border-color: #60a5fa;
}

[data-theme="dark"] .btn-outline-secondary {
    background: transparent;
    color: #a0aec0;
    border: 1px solid #a0aec0;
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background: #a0aec0;
    color: #1a202c;
    border-color: #a0aec0;
}

/* Estilos para filtros automáticos */
.filter-info {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    text-align: center;
}

.filter-info .text-muted {
    color: #6c757d;
    font-size: 13px;
}

.filter-info .fas {
    margin-right: 5px;
    color: #17a2b8;
}

/* ===== Mural de Avisos ===== */
.mural-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  padding: 12px 14px;
}
.mural-card-mini { padding: 10px 12px; }
.mural-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.mural-card-title {
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.mural-icon { color: var(--primary, #1f6feb); }

/* Agenda do Professor — lista compacta e consistente com o tema */
.prof-agenda-list { display: grid; gap: 8px; }
.prof-agenda-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--card-bg);
  border: 1px solid rgba(var(--primary-color-rgb), 0.15);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.prof-agenda-item:hover { border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.08); }
.prof-agenda-time { font-weight: 600; color: var(--primary-color); min-width: 120px; }
.prof-agenda-info { display: flex; align-items: center; gap: 8px; }
.prof-agenda-disciplina { font-weight: 500; }
.prof-agenda-room {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  background: rgba(var(--primary-color-rgb), 0.10);
  color: var(--primary-color);
  border: 1px solid rgba(var(--primary-color-rgb), 0.25);
}
.mural-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.mural-card-meta .badge { font-size: 12px; }
.mural-card-meta .badge-turma {
    font-size: 14px;
    font-weight: 700;
}
.mural-card-turma { margin-top: 6px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
/* Base de badge de turma e variações de cor */
.badge-turma {
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(var(--primary-color-rgb), 0.25);
  background: rgba(var(--primary-color-rgb), 0.10);
  color: var(--primary-color);
  max-width: 100%;
  line-height: 1.4;
}
.badge-turma-c1 { background: #eaf5ff; color: #1f6feb; border-color: #cfe7ff; }
.badge-turma-c2 { background: rgba(46,204,113,0.14); color: #27ae60; border-color: rgba(46,204,113,0.35); }
.badge-turma-c3 { background: rgba(243,156,18,0.16); color: #d35400; border-color: rgba(243,156,18,0.40); }
.badge-turma-c4 { background: rgba(155,89,182,0.16); color: #8e44ad; border-color: rgba(155,89,182,0.40); }
.badge-turma-c5 { background: rgba(26,188,156,0.16); color: #16a085; border-color: rgba(26,188,156,0.40); }
.badge-turma-c6 { background: rgba(231,76,60,0.14); color: #c0392b; border-color: rgba(231,76,60,0.40); }

[data-theme='dark'] .badge-turma-c1 { background: rgba(31,111,235,0.22); color: #a9c7ff; border-color: rgba(31,111,235,0.45); }
[data-theme='dark'] .badge-turma-c2 { background: rgba(46,204,113,0.22); color: #95d6ac; border-color: rgba(46,204,113,0.45); }
[data-theme='dark'] .badge-turma-c3 { background: rgba(243,156,18,0.22); color: #f0c083; border-color: rgba(243,156,18,0.45); }
[data-theme='dark'] .badge-turma-c4 { background: rgba(155,89,182,0.22); color: #c9a6dd; border-color: rgba(155,89,182,0.45); }
[data-theme='dark'] .badge-turma-c5 { background: rgba(26,188,156,0.22); color: #91d7c7; border-color: rgba(26,188,156,0.45); }
[data-theme='dark'] .badge-turma-c6 { background: rgba(231,76,60,0.22); color: #f0a8a0; border-color: rgba(231,76,60,0.45); }
.mural-card-content {
  margin-top: 6px;
  color: var(--text-muted);
  white-space: pre-wrap;
}
.mural-card-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}
.btn.btn-xs { font-size: 12px; padding: 4px 8px; }
.btn-danger { background: #e5534b; color: #fff; border: none; border-radius: 4px; }
.btn-danger:hover { background: #d6453d; }

/* Rolagem apenas no mural (coluna direita do dashboard) */
.dashboard-right #mural-list {
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 4px; /* ajuda no scrollbar */
}

/* Ajuste para telas mais baixas */
@media (max-height: 700px) {
  .dashboard-right #mural-list { max-height: 50vh; }
}

/* ===== Dashboard Split Layout ===== */
.dashboard-split {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.dashboard-left { flex: 1 1 auto; }
.dashboard-right {
  flex: 0 0 38%;
  max-width: 520px;
}

@media (max-width: 1024px) {
  .dashboard-split { flex-direction: column; }
  .dashboard-right { flex: 1 1 auto; max-width: none; }
}