/* Estilos gerais do container */
.grade-container {
    padding: 24px;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.grade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    padding-right: 0 !important;
}

.grade-header h2 {
    margin: 0;
    font-size: 1.6rem;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.grade-header h2 i {
    color: #b71c1c;
    font-size: 1.4rem;
}

.grade-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.grade-actions.botoes-csv {
    display: flex;
    gap: 2px;
    align-items: center;
    margin-left: auto;
    justify-content: flex-end;
}

.btn,
.btn-primary,
.btn-secondary {
    border-radius: 12px !important;
}

.btn {
    padding: 10px 18px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(145deg, #b71c1c, #d32f2f);
    color: white;
    box-shadow: 0 2px 8px rgba(183, 28, 28, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(145deg, #d32f2f, #b71c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(183, 28, 28, 0.25);
}

.btn-secondary {
    background: #f8f9fa;
    color: #444;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
    background: #fff;
    border-color: #d0d0d0;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}

/* Estilos da grade de horários */
.grade-content {
    padding: 12px !important;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: visible !important;
    position: relative;
}

.grade-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    overflow: visible !important;
    table-layout: fixed;
}

.grade-table th, .grade-table td {
    text-align: center;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.grade-table th {
    background: linear-gradient(145deg, #fafafa, #f5f5f5);
    color: #b71c1c;
    font-weight: 600;
    font-size: 1rem;
    border-bottom: 2px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    margin: 0 4px;
}

.grade-table td:first-child {
    color: #000 !important;
    background: #fff !important;
    font-weight: 500;
}

.grade-table td {
    background: #fff;
    cursor: pointer;
    border-right: 1px solid #f5f5f5;
    border-left: 1px solid #f5f5f5;
    border-radius: 8px;
    position: relative;
    min-width: 100px;
    min-height: 60px;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.grade-table td:hover {
    background: #fff8f8;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(183, 28, 28, 0.08);
    z-index: 1;
}

.grade-table td:not(.celula-preenchida):hover::after {
    content: '+';
    color: #b71c1c;
    font-size: 1.4rem;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.2;
    pointer-events: none;
}

.grade-table td.celula-preenchida {
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(183, 28, 28, 0.06);
    animation: fadeInCell 0.4s;
}

@keyframes fadeInCell {
    from { background: #fff; opacity: 0.2; transform: scale(0.98); }
    to { background: linear-gradient(145deg, #fff5f5, #fff0f0); opacity: 1; transform: scale(1); }
}

.aula-item {
    animation: fadeInAula 0.4s;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.95rem;
    color: #b71c1c;
    font-weight: 500;
    background: transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    border: 1.5px solid rgba(0,0,0,0.07);
    margin: 2px 0;
    height: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.aula-item strong,
.aula-item p,
.aula-item small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.aula-item strong {
    color: #b71c1c;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.aula-item p {
    margin: 0;
    color: #555;
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 2px;
}

.aula-item small {
    color: #888;
    font-size: 0.85rem;
}


@keyframes fadeInAula {
    from { opacity: 0; transform: scale(0.95) translateY(5px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Cores das disciplinas - Versão mais vibrante */
.aula-cell.tecnicas { 
    background-color: #b794f4; /* Roxo mais vibrante */
    color: #1a202c;
}

.aula-cell.desenvolvimento { 
    background-color: #f6e05e; /* Amarelo mais vibrante */
    color: #1a202c;
}

.aula-cell.matematica { 
    background-color: #63b3ed; /* Azul mais vibrante */
    color: #1a202c;
}

.aula-cell.estrutura { 
    background-color: #4fd1c5; /* Turquesa mais vibrante */
    color: #1a202c;
}

.aula-cell.engenharia { 
    background-color: #38b2ac; /* Verde-azulado mais vibrante */
    color: #1a202c;
}

.aula-cell.bd { 
    background-color: #fc8181; /* Vermelho mais vibrante */
    color: #1a202c;
}

/* Estilos dos docentes com cores mais vibrantes */
.docentes-section {
    margin-top: 30px;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.docentes-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.2rem;
}

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

.docentes-table td {
    padding: 12px 15px;
    border: none !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.docentes-table td:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Cores dos docentes correspondentes às disciplinas */
.docentes-table td[style*="background-color: #e6ccff"] { background-color: #b794f4 !important; }
.docentes-table td[style*="background-color: #ffffcc"] { background-color: #f6e05e !important; }
.docentes-table td[style*="background-color: #cce6ff"] { background-color: #63b3ed !important; }
.docentes-table td[style*="background-color: #e6f3ff"] { background-color: #4fd1c5 !important; }
.docentes-table td[style*="background-color: #ccffff"] { background-color: #38b2ac !important; }
.docentes-table td[style*="background-color: #ffcccc"] { background-color: #fc8181 !important; }

/* Responsividade */
@media (max-width: 768px) {
    .grade-header {
        flex-direction: column;
        gap: 15px;
    }

    .grade-actions {
        width: 100%;
        justify-content: space-between;
    }

    .grade-table {
        font-size: 14px;
    }

    .aula-cell {
        padding: 5px;
    }
}

@media screen and (max-width: 900px) {
    .grade-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0;
        margin: 0;
        width: 100vw;
        max-width: 100vw;
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        position: relative;
    }
    .grade-content {
        display: block;
        width: 100%;
        margin: 0 auto;
        background: none;
        box-shadow: none;
        padding: 0;
    }
    .grade-table {
        min-width: 520px;
        width: max-content;
        margin-left: auto;
        margin-right: auto;
        border-spacing: 0 8px;
        background: #fff;
        border-radius: 16px;
        box-shadow: none;
        padding-right: 32px;
    }
    .grade-table th, .grade-table td {
        min-width: 60px;
        max-width: 90px;
        font-size: 0.92rem;
        padding: 8px 2px;
    }
    .grade-table th {
        font-size: 0.92rem;
        background: linear-gradient(145deg, #fafafa, #f5f5f5);
        color: #b71c1c;
        border-bottom: 2px solid #e0e0e0;
        letter-spacing: 0.5px;
        font-weight: 600;
        z-index: 1;
    }
    .grade-table th:first-child, .grade-table td:first-child {
        background: #fff !important;
        color: #000 !important;
        font-weight: 500;
        min-width: 60px;
        max-width: 70px;
        width: 65px;
        text-align: center;
        border-right: 2px solid #eee;
        position: sticky;
        left: 0;
        z-index: 20;
        box-shadow: none !important;
    }
    .grade-table td {
        min-width: 70px;
        max-width: 90px;
        height: 36px;
        vertical-align: middle;
        background: #fff;
        border: none;
        text-align: center;
        margin: 0 1px;
    }
    .aula-item, .aula-item * {
        color: #000 !important;
    }
    .aula-item {
        margin-left: 2px;
        margin-right: 2px;
        padding: 5px 1px;
        font-size: 0.88rem;
        background: transparent;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        border: 1.1px solid rgba(0,0,0,0.07);
        margin: 0 auto;
        min-height: 22px;
        max-width: 98%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        text-align: center;
    }
    .aula-item strong {
        font-size: 0.95rem;
        font-weight: 700;
        margin-bottom: 2px;
        text-align: center;
        width: 100%;
        display: block;
    }
    .aula-item p {
        margin: 0;
        font-size: 0.78rem;
        font-weight: 400;
        margin-bottom: 2px;
        text-align: center;
        width: 100%;
    }
    .aula-item small {
        font-size: 0.78rem;
        display: block;
        text-align: center;
        width: 100%;
    }
    .filtros, .grade-actions {
        width: 100vw;
        max-width: 100vw;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 0 8px;
        margin-bottom: 8px;
        box-sizing: border-box;
    }
    .filtros select, .grade-actions button {
        min-width: 90px;
        font-size: 0.95rem;
    }
    .docentes-section {
        margin-top: 24px;
    }
}

@media screen and (max-width: 600px) {
    .grade-table {
        min-width: 480px;
    }
    .grade-table th, .grade-table td {
        font-size: 0.92rem;
        padding: 10px 2px;
        min-width: 80px;
        max-width: 100px;
    }
    .aula-item {
        font-size: 0.92rem;
        padding: 7px 3px;
    }
    .aula-item strong {
        font-size: 0.98rem;
    }
    .aula-item p, .aula-item small {
        font-size: 0.85rem;
    }
}

@media screen and (max-width: 430px) {
    .grade-table {
        min-width: 340px;
    }
    .grade-table th, .grade-table td {
        font-size: 0.85rem;
        padding: 7px 1px;
        min-width: 60px;
        max-width: 80px;
    }
    .aula-item {
        font-size: 0.85rem;
        padding: 5px 1px;
    }
    .aula-item strong {
        font-size: 0.92rem;
    }
    .aula-item p, .aula-item small {
        font-size: 0.78rem;
    }
}
/* Estilos do Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.modal-header h3 {
    margin: 0;
    color: var(--primary);
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
}

.close-modal:hover {
    color: var(--primary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #495057;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.25);
}

.btn {
    padding: 8px 16px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

.horarios-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eef2f7;
}

.horarios-section h4 {
    color: #2d3748;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.horarios-grid {
    display: grid;
    gap: 15px;
}

.horario-item {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    align-items: start;
}

/* Estilos do Toast */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    min-width: 220px;
    padding: 15px 25px;
    border-radius: 5px;
    color: white;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    pointer-events: auto;
}
.toast.success {
    background-color: #4CAF50;
}
.toast.error {
    background-color: #f44336;
}
.toast.loading {
    background-color: #2196F3;
}
.toast i {
    font-size: 1.2em;
}
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Estilo para o botão de horário */
.horario-btn {
    display: none !important;
}

/* Modal de Edição */
#modal-edicao {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
}

#modal-edicao .modal-content {
    background: #fff;
    max-width: 420px;
    margin: 22vh auto 0 auto;
    padding: 32px;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    font-family: inherit;
    animation: modalZoomIn 0.35s cubic-bezier(.4,1.4,.6,1);
}

@keyframes modalZoomIn {
    from { opacity: 0; transform: scale(0.92) translateY(-30px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

#modal-edicao h3 {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 1.4rem;
    font-weight: 600;
    color: #1a1a1a;
}

#modal-edicao label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #444;
    font-size: 0.95rem;
}

#modal-edicao input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 20px;
    border: 1.5px solid #eee;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background: #fafafa;
}

#modal-edicao input[type="text"]:focus {
    border: 1.5px solid #b71c1c;
    outline: none;
    box-shadow: 0 0 0 3px rgba(183, 28, 28, 0.1);
    background: #fff;
}

#modal-edicao .botoes-modal {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    justify-content: flex-end;
}

#modal-edicao .btn-salvar {
    background: linear-gradient(145deg, #b71c1c, #d32f2f);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(183, 28, 28, 0.2);
}

#modal-edicao .btn-salvar:hover {
    background: linear-gradient(145deg, #d32f2f, #b71c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(183, 28, 28, 0.25);
}

#modal-edicao .btn-cancelar {
    background: #f8f9fa;
    color: #444;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

#modal-edicao .btn-cancelar:hover {
    background: #fff;
    border-color: #d0d0d0;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}

.grade-table th .btn-adicionar-horario {
    background: #fff;
    border: 1.5px solid #e0e0e0;
    color: #b71c1c;
    font-size: 1.1rem;
    border-radius: 6px;
    padding: 6px 10px;
    margin-left: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.grade-table th .btn-adicionar-horario:hover {
    background: #fff8f8;
    border-color: #d32f2f;
    color: #d32f2f;
}

.docente-item {
    color: #333 !important;
    font-weight: 600 !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    margin-bottom: 6px !important;
}

.aula-item:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 16px rgba(0,0,0,0.16);
    border: 1.5px solid rgba(0,0,0,0.15);
}

/* Deixar todo o texto dos cards das células preto */
.aula-item, .aula-item * {
    color: #000 !important;
}

/* Deixar o texto dos cabeçalhos dos dias e da coluna de horários preto */
.grade-table th,
.grade-table th:first-child,
.grade-table td:first-child {
    color: #000 !important;
}

/* --- MELHORIAS VISUAIS MODERNAS --- */

/* 1. Destaque suave na célula ao passar o mouse */
.grade-table td:hover {
    background: #fff8f8;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(183, 28, 28, 0.08);
    z-index: 1;
}

/* 2. Células preenchidas com leve sombra e borda */
.grade-table td.celula-preenchida {
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(183, 28, 28, 0.06);
    animation: fadeInCell 0.4s;
}

/* 3. Cabeçalhos com fundo levemente colorido */
.grade-table th {
    background: linear-gradient(145deg, #fafafa, #f5f5f5);
    color: #b71c1c;
    font-weight: 600;
    font-size: 1rem;
    border-bottom: 2px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    margin: 0 4px;
}

/* 4. Bordas arredondadas nas células */
.grade-table td, .grade-table th {
    border-radius: 10px !important;
}

/* 5. Docentes com badge colorido */
.docente-item {
    color: #333 !important;
    font-weight: 600 !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    margin-bottom: 6px !important;
}

/* 6. Transição suave em todos os elementos interativos */
.grade-table td, .grade-table th, .docente-item {
    transition: all 0.3s ease;
}

/* 7. Melhore o espaçamento vertical */
.grade-table th, .grade-table td {
    padding: 16px 0;
}

/* Permitir que o efeito de hover do docente colorido não seja cortado nas bordas da grade */
.grade-table,
.grade-table tr {
    overflow: visible !important;
}

#btn-importar-csv {
    margin-left: 8px !important;
    display: inline-flex !important;
    align-items: center;
    border-radius: 12px !important;
    white-space: nowrap;
    z-index: 1;
}
#btn-importar-csv:hover {
    background: linear-gradient(145deg, #d32f2f, #b71c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(183, 28, 28, 0.25);
}
#csv-feedback {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #b71c1c;
    font-size: 1rem;
    font-weight: 500;
    margin-left: 16px;
    min-width: 0;
}

#csv-feedback .spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid #fff;
    border-top: 2.5px solid #b71c1c;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
    background: transparent;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.grade-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}
.grade-title i {
    color: #b71c1c;
    font-size: 1.4rem;
    margin-right: 12px;
}

.celula-preenchida.dragging, td.dragging {
    outline: 2.5px dashed #1976d2 !important;
    box-shadow: 0 0 0 3px #1976d233 !important;
    opacity: 0.7;
}
.celula-preenchida.drag-over, td.drag-over {
    outline: 2.5px solid #43a047 !important;
    box-shadow: 0 0 0 3px #43a04733 !important;
}

/* --- Drag and Drop e Swap --- */
.celula-preenchida, td.celula-preenchida {
    transition: all 0.3s ease;
}

.celula-preenchida.dragging, td.dragging {
    opacity: 0.5;
    transform: scale(0.95);
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    cursor: grabbing !important;
}

.celula-preenchida.drag-over, td.drag-over {
    border: 2px solid #4CAF50 !important;
    background-color: rgba(76, 175, 80, 0.1) !important;
    transform: scale(1.05);
}

.swap-animation {
    animation: swap 0.5s ease;
}

@keyframes swap {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
        background-color: rgba(76, 175, 80, 0.2);
    }
    100% {
        transform: scale(1);
    }
}

.grade-container .mensagem-vazia {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.mensagem-vazia i {
    font-size: 24px;
    color: #666;
    margin-bottom: 10px;
}

.mensagem-vazia p {
    color: #666;
    margin: 0;
    font-size: 16px;
}

/* Garantir box-sizing para todos */
*, *::before, *::after {
    box-sizing: border-box;
} 

.text-danger {
    color: var(--danger);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.adm-subitem.text-danger { color: #dc3545; }
.adm-subitem i { width: 20px; text-align: center; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #f8f9fa;
    background: none;
    border: none;
    text-decoration: none;
    font-size: 1rem;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.sidebar-link:hover,
.sidebar-link.active {
    color: #fff;
    background: rgba(255,255,255,0.08);
}
.sidebar-link i {
    width: 20px;
    text-align: center;
}
.sidebar-link.text-danger {
    color: #ffb3b3;
}
.sidebar-link.text-danger:hover {
    color: #fff;
    background: rgba(255,0,0,0.08);
}

/* Estilos do dropdown de exportação */
.export-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.export-btn {
    margin: 0;
    border-radius: 12px;
    white-space: nowrap;
    z-index: 2;
}

.export-options {
    position: absolute;
    top: 110%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 10;
    min-width: 180px;
    border: 1px solid #eee;
    flex-direction: column;
    padding: 4px 0;
}

.export-dropdown.active .export-options {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.export-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    cursor: pointer;
    color: #333;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    text-align: left;
}

.export-option:hover {
    background: #f8f9fa;
    color: #b71c1c;
}

.export-option i {
    width: 20px;
    text-align: center;
    color: #b71c1c;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
} 
/* --------------------------------------------------
   Força cores sólidas nos cards e desativa efeitos
   para quando for capturado via html2canvas ou print
   -------------------------------------------------- */
.grade-table td[class^="aula-cell"] .aula-item,
.grade-table td[class*=" aula-cell"] .aula-item {
  /* herdando a cor do td (que tem background-color definido) */
  background-color: inherit !important;
  /* remove sombras/transições que possam interferir */
  box-shadow: none       !important;
  filter:     none       !important;
  opacity:    1          !important;
}