body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f0f2f5;
    /* Mesmo fundo do sistema */
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.page-container {
    width: 100%;
    max-width: 1200px;
    text-align: center;
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- IN�CIO: NOVOS ESTILOS PARA A LOGOMARCA --- */
.page-header .logo {
    max-width: 400px;
    /* Define um tamanho máximo para a logo */
    margin-bottom: 15px;
    /* Espaço entre a logo e o título */
}

/* --- FIM: NOVOS ESTILOS PARA A LOGOMARCA --- */

.page-header h1 {
    color: #343a40;
    font-size: 3.5em;
    font-weight: 600;
    margin: 0 0 15px 0;
    letter-spacing: -1px;
}

.page-header .header-divider {
    width: 300px;
    height: 2px;
    background-color: #007bff;
    /* Azul principal */
    margin: 0 auto 50px auto;
    border: none;
}

.card-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.card {
    background-color: white;
    padding: 35px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 280px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.card-icon {
    font-size: 3em;
    color: #007bff;
    margin-bottom: 20px;
}

.card h2 {
    color: #343a40;
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 10px;
}

.card p {
    color: #6c757d;
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 0;
}

.page-footer {
    margin-top: 60px;
    font-size: 0.9em;
    color: #adb5bd;
}

.contact-link {
    margin-bottom: 10px;
}

.contact-link a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-link a:hover {
    color: #007bff;
}

.contact-link .fas {
    margin-right: 8px;
}

/* --- INÍCIO: ESTILOS DO MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.visible {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: white;
    padding: 30px 40px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    width: 90%;
    max-width: 450px;
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2em;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.modal-close-btn:hover {
    color: #333;
}

.modal-icon {
    font-size: 3em;
    margin-bottom: 15px;
    color: #007bff;
}

.modal-content h2 {
    margin-top: 0;
}

/* --- FIM: ESTILOS DO MODAL --- */

@media (max-width: 992px) {
    .card-container {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 600px) {
    .page-header h1 {
        font-size: 2.5em;
    }

    .page-header .logo {
        max-width: 120px;
    }

    .card {
        width: 100%;
        max-width: 350px;
    }
}

/* Complemento ao painel_professor.css e index.css */

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.btn-primary {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.btn-primary:hover { background-color: #218838; }

.btn-secondary {
    background-color: #17a2b8;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.btn-secondary:hover { background-color: #138496; }

/* Grid de Cursos e Aulas */
.course-card, .lesson-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.course-card h3, .lesson-card h3 {
    margin-top: 0;
    color: #34495e;
}

.course-meta {
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 15px;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.btn-edit, .btn-manage {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: white;
}

.btn-edit { background-color: #ffc107; color: #212529;}
.btn-edit:hover { background-color: #e0a800; }
.btn-manage { background-color: #007bff; text-align: center; text-decoration: none;}
.btn-manage:hover { background-color: #0056b3; }
.btn-delete { background-color: #dc3545; color: white; border: none; padding: 8px; border-radius: 4px; cursor: pointer;}
.btn-delete:hover { background-color: #c82333; }

/* Formulários nas Modais */
.modal-body {
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 15px; /* Evita que a barra de rolagem sobreponha o conteúdo */
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #34495e;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Anexos Dinâmicos */
.anexo-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.anexo-item input { flex: 1; }
.btn-add-anexo {
    background: #007bff; color: white; border: none; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; font-size: 1.2em; line-height: 1;
}

/* Loading Modal */
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Reordenação */
.sortable-list { list-style: none; padding: 0; }
.sortable-item {
    padding: 10px 15px; background: #f8f9fa; border: 1px solid #ddd; margin-bottom: 5px; border-radius: 4px; cursor: grab; display: flex; align-items: center; justify-content: space-between;
}
.sortable-item:active { cursor: grabbing; background: #e9ecef; }
.drag-handle { color: #aaa; margin-right: 10px; font-size: 1.2em;}