    /* VARIÁVEIS GLOBAIS */
    :root {
        --primary: #3498db;
        --secondary: #2c3e50;
        --success: #2ecc71;
        --warning: #f39c12;
        --danger: #e74c3c;
        --light: #f8f9fa;
        --dark: #2d3436;
        --gray: #95a5a6;
        --ensino-primario: #9b59b6;
        --primeiro-ciclo: #1abc9c;
        --matutino: #f1c40f;
        --vespertino: #e67e22;
        --prof-primary: #3498db;
        --prof-secondary: #2c3e50;
        --prof-success: #2ecc71;
        --prof-warning: #f39c12;
        --prof-danger: #e74c3c;
        --prof-light: #f8f9fa;
        --prof-dark: #2d3436;
        --prof-gray: #95a5a6;
    }

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    }

    body {
        background: linear-gradient(to right, var(--secondary), var(--primary));
        color: #333;
        min-height: 100vh;
        line-height: 1.6;
    }

    .container {
        width: 95%;
        max-width: 1400px;
        margin: 0 auto;
        padding: 15px;
    }

    header {
        background: var(--secondary);
        color: white;
        padding: 1.2rem;
        border-radius: 10px;
        margin-bottom: 15px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        text-align: center;
    }

    header h1 {
        font-size: 1.6rem;
        margin-bottom: 5px;
    }

    header p {
        font-size: 0.9rem;
        opacity: 0.9;
    }

    /* ESTILOS PARA ABAS */
    .tabs {
        display: flex;
        margin-bottom: 15px;
        border-bottom: 2px solid #ccc;
        flex-wrap: wrap;
        gap: 5px;
        justify-content: center;
    }

    .tab {
        padding: 8px 15px;
        cursor: pointer;
        background: #fff;
        border-radius: 6px 6px 0 0;
        transition: all 0.3s ease;
        font-weight: bold;
        font-size: 0.75rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        flex-grow: 1;
        text-align: center;
    }

    .tab:hover {
        background: var(--light);
    }

    .tab.active {
        background: var(--primary);
        color: white;
        font-weight: bold;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .tab-content {
        display: none;
        animation: fadeIn 0.3s ease;
    }

    .tab-content.active {
        display: block;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* ESTILOS PARA CARTÕES */
    .card {
        background: white;
        border-radius: 10px;
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    }

    .card h2,
    .card h3 {
        margin-bottom: 15px;
        color: var(--secondary);
        font-size: 1.2rem;
    }

    .grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    @media (max-width: 992px) {
        .grid {
            grid-template-columns: 1fr;
        }
    }

    /* FORMULÁRIOS */
    .form-group {
        margin-bottom: 12px;
    }

    label {
        margin-bottom: 5px;
        font-weight: 600;
        font-size: 0.85rem;
    }

    input,
    select,
    textarea {
        width: 100%;
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 6px;
        font-size: 14px;
    }

    input:focus,
    select:focus,
    textarea:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
    }

    button:hover {
        background-color: #2980b9;
        transform: translateY(-1px);
    }

    .btn-sm {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    /* GERENCIADOR DE PROFESSORES */
    .teacher-manager {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    @media (min-width: 992px) {
        .teacher-manager {
            flex-direction: row;
        }
    }

    .teacher-list-container {
        flex: 1;
        max-height: 770px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .teacher-form-container {
        flex: 1;
        max-height: 770px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .teacher-list-header {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 12px;
    }

    @media (min-width: 768px) {
        .teacher-list-header {
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
        }
    }

    /* FILTROS */
    .filter-buttons {
        display: flex;
        gap: 5px;
        margin-bottom: 12px;
    }

    .filter-btn {
        background: var(--light);
        color: var(--dark);
        border: 1px solid #ddd;
        padding: 5px 10px;
        border-radius: 20px;
        font-size: 0.75rem;
        cursor: pointer;
        white-space: nowrap;
    }

    .filter-btn.active {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }

    /* LISTA DE PROFESSORES */
    .teacher-list {
        overflow-y: auto;
        flex: 1;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 8px;
        max-height: calc(7 * 84.30px);
    }

    .teacher-list::-webkit-scrollbar {
        width: 6px;
    }

    .teacher-list::-webkit-scrollbar-thumb {
        background-color: var(--primary);
        border-radius: 3px;
    }

    .teacher-list::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .teacher-item {
        padding: 8px 10px;
        margin-bottom: 6px;
        background-color: #e7f1f07d;
        border-radius: 5px;
        font-size: 0.9rem;
        transition: all 0.2s ease;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .teacher-item:hover {
        background-color: #e9ecef;
    }

    .sinal_expandir {
        width: 26px;
        height: 26px;
        border-radius: 50%;
        background: var(--primary);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        font-size: 1rem;
        flex-shrink: 0;
    }

    .action-btn {
        background: transparent;
        border: 1px solid;
        color: var(--gray);
        cursor: pointer;
        font-size: 0.9rem;
        width: auto;
        padding: 5px;
    }

    .action-btn:hover {
        color: var(--primary);
        transform: none;
        background: transparent;
    }

    /* BADGES */
    .badge {
        display: inline-block;
        padding: 4px 8px;
        border-radius: 20px;
        font-size: 11px;
        font-weight: bold;
        margin: 2px;
    }

    .badge-primary {
        background-color: var(--primary);
        color: white;
    }

    .badge-success {
        background-color: var(--success);
        color: white;
    }

    .badge-warning {
        background-color: var(--warning);
        color: white;
    }

    .badge-light {
        background-color: var(--light);
        color: var(--dark);
    }

    .toggle-btn {
        background: var(--primary);
        border: none;
        border-radius: 50%;
        color: white;
        width: 26px;
        height: 26px;
        cursor: pointer;
        font-size: 16px;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }

    .toggle-btn:hover {
        background: #2980b9;
        transform: scale(1.1);
    }

    /* FORM TABS */
    .form-tabs {
        display: flex;
        margin-bottom: 12px;
        border-bottom: 1px solid #ddd;
        overflow-x: auto;
        white-space: nowrap;
    }

    .form-tab {
        padding: 8px 12px;
        cursor: pointer;
        background: #f5f5f5;
        border-radius: 5px 5px 0 0;
        margin-right: 5px;
        font-size: 0.85rem;
    }

    .form-tab.active {
        background: var(--primary);
        color: white;
    }

    /* ESTATÍSTICAS */
    .stats-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 15px;
    }

    @media (min-width: 576px) {
        .stats-container {
            grid-template-columns: repeat(4, 1fr);
        }
    }

    .stat-card {
        background: white;
        border-radius: 8px;
        padding: 12px;
        text-align: center;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .stat-value {
        font-size: 1.5rem;
        font-weight: bold;
        color: var(--primary);
    }

    .stat-label {
        font-size: 0.8rem;
        color: var(--gray);
    }

    .text-muted {
        color: var(--gray);
        font-style: italic;
        text-align: center;
        padding: 10px;
    }

    /* NÍVEIS DE ENSINO */
    .nivel-ensino-tabs {
        display: flex;
        margin-bottom: 15px;
        background: white;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .nivel-ensino-tab {
        flex: 1;
        padding: 12px;
        text-align: center;
        cursor: pointer;
        font-weight: bold;
        transition: all 0.3s;
    }

    .nivel-ensino-tab.primario {
        background: var(--ensino-primario);
        color: white;
    }

    .nivel-ensino-tab.ciclo {
        background: var(--primeiro-ciclo);
        color: white;
    }

    .nivel-ensino-tab.active {
        box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
    }

    .classe-tabs {
        display: none;
        gap: 8px;
        margin-top: 10px;
        flex-wrap: wrap;
    }

    .classe-tabs.active {
        display: flex;
    }

    .classe-tab {
        padding: 8px 12px;
        background: white;
        border-radius: 5px;
        cursor: pointer;
        font-size: 0.8rem;
        font-weight: bold;
        transition: all 0.3s;
        flex-grow: 1;
        text-align: center;
    }

    .classe-tab.primario {
        border-bottom: 3px solid var(--ensino-primario);
    }

    .classe-tab.ciclo {
        border-bottom: 3px solid var(--primeiro-ciclo);
    }

    .classe-tab.active {
        background: #17a2b8;
        color: white;
        font-weight: bold;
    }

    .turmas-container {
        display: none;
    }

    .turmas-container.active {
        display: block;
    }

    /* GRID DE TURMAS */
    .turmas-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .turmas-grid .card {
        min-height: 120px;
        min-width: unset;
        transition: transform 0.2s ease;
        border-radius: 8px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    .turmas-grid .card:hover {
        transform: scale(1.02);
    }

    /* DISCIPLINAS */
    .disciplinas-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .disciplina-card {
        display: flex;
        flex-direction: column;
        color: white;
        border-radius: 10px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
        min-height: 100px;
        transition: transform 0.2s ease;
        cursor: pointer;
    }

    .disciplina-card:hover {
        transform: scale(1.02);
    }

    .disciplina-card.primario {
        background: #6b487f;
    }

    .disciplina-card.ciclo {
        background: #487f50;
    }

    .disciplina-header {
        display: flex;
        justify-content: flex-end;
        gap: 4px;
        background: rgba(0, 0, 0, 0.3);
        padding: 4px;
        border-radius: 10px 10px 0 0;
    }

    .btn-icon {
        background: none;
        border: none;
        color: white;
        font-size: 0.85rem;
        cursor: pointer;
        transition: transform 0.15s ease;
    }

    .btn-icon:hover {
        transform: scale(1.1);
    }

    .btn-icon.view {
        color: #4fc3f7;
    }

    .btn-icon.delete {
        color: #ef5350;
    }

    .btn-icon.edit {
        color: #ffd54f;
    }

    .disciplina-body {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-size: 0.85rem;
        padding: 8px;
    }

    

    /* PAINEL DE DISCIPLINAS */
    #discipline-card {
        display: none;
        transform-origin: top;
        transform: scaleY(0);
        opacity: 0;
        transition: transform 0.3s ease-out, opacity 0.3s ease-out;
        max-height: 80vh;
        overflow-y: auto;
    }

    .grid.expanded #discipline-card {
        display: block;
        transform: scaleY(1);
        opacity: 1;
    }

    #discipline-card h4,
    #discipline-card #professor-selecionado {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        max-width: 100%;
    }

    .panel-disciplinas {
        padding: 16px;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
        display: flex;
        flex-direction: column;
        gap: 12px;
        opacity: 0;
        transform: translateX(20px);
        pointer-events: none;
        transition: opacity 0.35s ease, transform 0.35s ease;
    }

    .panel-disciplinas.active {
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
    }

    .panel-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #eee;
        margin-bottom: 8px;
        padding-bottom: 4px;
    }

    .panel-header h2 {
        font-size: 1.2rem;
        color: var(--secondary);
        margin: 0;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .btn-close {
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--danger);
        cursor: pointer;
        transition: transform 0.2s ease, color 0.2s ease;
    }

    .btn-close:hover {
        color: #c0392b;
        transform: scale(1.1);
    }

    .professor-nome {
        font-weight: bold;
        color: var(--primary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .salvar-btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        font-weight: 600;
        border-radius: 8px;
        padding: 10px;
    }

    /* PROFESSORES POR CLASSE */
    .professores-classe-container {
        margin-bottom: 30px;
    }

    .controls {
        display: flex;
        justify-content: center;
        gap: 7px;
        margin-bottom: 15px;
        flex-wrap: wrap;
        font-size: small;
        align-items: center;
        text-align: center;
    }

    .classes-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .clas-card {
        background: white;
        border-radius: 8px;
        padding: 15px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
        border-left: 4px solid #4b6cb7;
    }
    .class-title {
        font-weight: 600;
        font-size: 1.1rem;
        color: #2c3e50;
    }

    .teacher-count {
        background: #eef2f8;
        padding: 3px 8px;
        border-radius: 12px;
        font-size: 0.85rem;
        color: #4b6cb7;
    }

    .hidden {
        display: none;
    }

    /* ESTILOS ESPECÍFICOS PARA PROFESSORES (PREFIXADOS) */
    .prof-global-body {
        background: linear-gradient(to right, var(--prof-secondary), var(--prof-primary));
        color: #333;
        min-height: 100vh;
        line-height: 1.6;
        margin: 0;
        padding: 0;
        font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    }

    .prof-container {
        width: 95%;
        max-width: 1400px;
        margin: 0 auto;
        padding: 15px;
    }

    .prof-header {
        background: var(--prof-secondary);
        color: white;
        padding: 1.2rem;
        border-radius: 10px;
        margin-bottom: 15px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        text-align: center;
    }

    .prof-header h1 {
        font-size: 1.6rem;
        margin-bottom: 5px;
    }

    .prof-header p {
        font-size: 0.9rem;
        opacity: 0.9;
    }

    .prof-stats {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        margin-bottom: 25px;
    }

    .prof-stat-card {
        background: white;
        border-radius: 8px;
        padding: 15px;
        text-align: center;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        border-left: 4px solid var(--prof-primary);
    }

    .prof-stat-value {
        font-size: 1.8rem;
        font-weight: bold;
        color: var(--prof-primary);
        margin-bottom: 5px;
    }

    .prof-stat-label {
        font-size: 0.9rem;
        color: var(--prof-gray);
    }

    .prof-controls {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        flex-wrap: wrap;
        gap: 15px;
    }

    .prof-search-box {
        display: flex;
        align-items: center;
        background: white;
        border-radius: 20px;
        padding: 8px 15px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        flex: 1;
        min-width: 250px;
    }

    .prof-search-box input {
        border: none;
        outline: none;
        padding: 5px;
        width: 100%;
        font-size: 0.9rem;
    }

    .prof-filter-buttons {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

    .prof-filter-btn {
        padding: 8px 15px;
        background: white;
        border: 1px solid #ddd;
        border-radius: 20px;
        cursor: pointer;
        font-weight: 500;
        font-size: 0.85rem;
        transition: all 0.3s ease;
    }

    .prof-filter-btn:hover,
    .prof-filter-btn.active {
        background: var(--prof-primary);
        color: white;
        border-color: var(--prof-primary);
    }

    .prof-list-container {
        background: white;
        border-radius: 10px;
        padding: 15px;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
        max-height: 70vh;
        overflow-y: auto;
    }

    .prof-item {
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 8px;
        margin-bottom: 12px;
        transition: box-shadow 0.2s ease-in-out;
        overflow: hidden;
    }

    .prof-item:hover {
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    }

    .prof-header-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        padding: 12px;
        background: linear-gradient(to right, #f8f9fa, #e9ecef);
    }

    .prof-info {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1;
    }

    .prof-details {
        flex: 1;
        min-width: 0;
    }

    .prof-details h3 {
        font-size: 1rem;
        margin-bottom: 3px;
        color: var(--prof-secondary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .prof-details p {
        color: var(--prof-gray);
        font-size: 0.85rem;
    }


    .prof-disciplines {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        background: #fafafa;
    }

    .prof-disciplines.active {
        max-height: 500px;
        padding: 15px;
        border-top: 1px solid #eee;
    }

    .prof-disciplines-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 15px;
    }

    .prof-discipline-badge {
        display: inline-flex;
        align-items: center;
        background: white;
        padding: 8px 12px;
        border-radius: 6px;
        border: 1px solid #eee;
        font-size: 0.85rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        max-width: 100%;
    }

    .prof-discipline-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }

    .prof-discipline-actions {
        display: flex;
        gap: 6px;
        margin-left: 10px;
    }

    .prof-action-btn {
        background: none;
        border: none;
        cursor: pointer;
        font-size: 0.9rem;
        color: var(--prof-gray);
        transition: color 0.2s ease;
        padding: 3px;
    }

    .prof-action-btn:hover {
        color: var(--prof-primary);
    }

    .prof-action-btn.delete:hover {
        color: var(--prof-danger);
    }

    .prof-no-disciplines {
        text-align: center;
        padding: 20px;
        color: var(--prof-gray);
        font-style: italic;
    }

    .prof-add-discipline {
        text-align: center;
        margin-top: 10px;
    }

    .prof-add-discipline-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: var(--prof-success);
        color: white;
        border: none;
        border-radius: 20px;
        padding: 8px 16px;
        font-size: 0.9rem;
        font-weight: 500;
        cursor: pointer;
        transition: background 0.3s ease;
    }

    .prof-add-discipline-btn:hover {
        background: #27ae60;
    }

    .prof-footer {
        text-align: center;
        margin-top: 20px;
        padding: 15px;
        color: white;
        background: var(--prof-secondary);
        border-radius: 8px;
    }

    /* RESPONSIVIDADE */
    @media (max-width: 576px) {
        .container {
            padding: 10px;
            width: 100%;
        }

        header {
            padding: 1rem;
            border-radius: 8px;
        }

        header h1 {
            font-size: 1.4rem;
        }

        .tab {
            padding: 6px 10px;
            font-size: 0.7rem;
        }

        .card {
            padding: 12px;
        }

        .card h2,
        .card h3 {
            font-size: 1.1rem;
        }

        input,
        select,
        textarea {
            padding: 8px;
            font-size: 13px;
        }

        .teacher-header {
            padding: 8px;
        }

        .sinal_expandir {
            width: 32px;
            height: 32px;
            font-size: 0.9rem;
        }
    }

    @media (min-width: 577px) and (max-width: 991px) {
        .teacher-manager {
            flex-direction: column;
        }

        .teacher-list-container,
        .teacher-form-container {
            width: 100%;
        }
    }

    @media (max-width: 992px) {
        .grid.expanded {
            grid-template-columns: 1fr;
        }

        #discipline-card {
            order: 2;
            width: 100%;
            max-height: none;
            overflow: visible;
        }

        .panel-disciplinas {
            transform: translateY(-10px);
        }

        .panel-disciplinas.active {
            transform: translateY(0);
        }
    }

    @media (max-width: 768px) {
        .classes-grid {
            grid-template-columns: 1fr;
        }

        .tabs {
            overflow-x: auto;
            white-space: nowrap;
        }

        .oculto-mobile {
            display: none;
        }
    }




    /* ESTILOS PARA O LAYOUT DAS CLASSES */
    .classes-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
        align-items: start;
    }

    .clas-card {
        display: flex;
        flex-direction: column;
        background: white;
        border-radius: 8px;
        padding: 0;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
        height: 100%;
        overflow: hidden;
    }

    .class-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px;
        background: linear-gradient(135deg, #000000, #1a59be);
        color: #fff;
        font-weight: 600;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    }

    .class-title {
        font-size: 16px;
        margin: 0;
    }

    .teacher-count {
        font-size: 14px;
        opacity: 0.9;
        background: rgba(255, 255, 255, 0.2);
        padding: 3px 8px;
        border-radius: 12px;
    }

    .class-body {
        flex-grow: 1;
        padding: 12px;
        min-height: 50px;
    }

    .class-footer {
        padding: 12px;
        border-top: 1px solid #f0f2f5;
        text-align: center;
    }

    /* Estilos compactos para os professores */
    .prof-item {
        margin-bottom: 8px;
        padding: 8px;
        background-color: #f8f9fa;
        border-radius: 6px;
        border: 1px solid #e9ecef;
    }

    .prof-header-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .prof-info {
        display: flex;
        align-items: center;
        flex-grow: 1;
        min-width: 0;
        /* Permite que o texto seja truncado */
    }

    .prof-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        overflow: hidden;
        flex-shrink: 0;
    }

    .prof-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }


    .prof-details {
        flex-grow: 1;
        min-width: 0;
        /* Permite que o texto seja truncado */
    }

    .prof-details h3 {
        margin: 0;
        font-size: 13px;
        font-weight: 600;
        color: #2c3e50;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .prof-details p {
        margin: 2px 0 0;
        font-size: 11px;
        color: #6c757d;
    }

    .btn-delete {
        background: transparent;
        border: none;
        color: #dc3545;
        cursor: pointer;
        font-size: 14px;
        flex-shrink: 0;
        margin-left: 8px;
        padding: 4px;
        border-radius: 4px;
    }

    .btn-delete:hover {
        background-color: rgba(220, 53, 69, 0.1);
    }

    .prof-body-row {
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #e9ecef;
        display: none;
    }

    .prof-disciplines-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 8px;
    }

    .prof-discipline-badge {
        display: flex;
        align-items: center;
        background: white;
        padding: 4px 8px;
        border-radius: 12px;
        border: 1px solid #dee2e6;
        font-size: 11px;
    }

    .prof-discipline-name {
        margin-right: 4px;
        white-space: nowrap;
    }

    .prof-discipline-actions {
        display: flex;
        gap: 4px;
    }

    .prof-action-btn {
        background: none;
        border: none;
        cursor: pointer;
        font-size: 11px;
        padding: 1px;
    }

    .prof-action-btn.delete {
        color: #dc3545;
    }

    .prof-no-disciplines {
        color: #6c757d;
        font-style: italic;
        text-align: center;
        padding: 8px;
        font-size: 12px;
    }

    .prof-add-discipline {
        text-align: center;
        margin-top: 8px;
    }

    .prof-add-discipline-btn {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        background: #28a745;
        color: white;
        border: none;
        border-radius: 4px;
        padding: 4px 8px;
        font-size: 11px;
        cursor: pointer;
    }

    .prof-add-discipline-btn:hover {
        background: #218838;
    }

    .add-prof-btn {
        background-color: #0d6efd;
        border: none;
        padding: 6px 12px;
        font-size: 13px;
        border-radius: 4px;
        color: white;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    .add-prof-btn:hover {
        background-color: #0b5ed7;
    }



    .filter-btn {
        padding: 10px 20px;
        border: 2px solid #4a6ea9;
        background: white;
        color: #4a6ea9;
        border-radius: 25px;
        cursor: pointer;
        font-weight: 500;
        transition: all 0.3s ease;
    }

    .filter-btn:hover,
    .filter-btn.active {
        background: #4a6ea9;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(74, 110, 169, 0.3);
    }

    /* Container principal */
    .classes-container {
        width: 100%;
    }

    /* Grid responsivo */
    .classes-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 20px;
    }

    /* Cartão da classe */
    .classe-card {
        background: white;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        color: #fff;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .classe-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    }


    .class-title {
        font-size: 1.2rem;
        font-weight: 600;
        margin: 0;
    }

    .teacher-count {
        background: rgba(255, 255, 255, 0.2);
        padding: 4px 10px;
        border-radius: 15px;
        font-size: 0.85rem;
    }

    /* Conteúdo */
    .class-content {
        padding: 15px;
        flex-grow: 1;
    }

    .no-teachers {
        text-align: center;
        padding: 30px 15px;
        color: #6c757d;
        font-style: italic;
    }

    .teachers-list {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .teacher-item {
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 12px;
        background: #f8f9fa;
    }

    .teacher-info {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 10px;
        position: relative;
    }

    .teacher-avatar {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        overflow: hidden;
        flex-shrink: 0;
    }

    .teacher-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .teacher-details {
        flex-grow: 1;
    }

    .teacher-details h4 {
        margin: 0 0 4px 0;
        font-size: 1rem;
        color: #2c3e50;
    }

    .disciplines-count {
        font-size: 0.85rem;
        color: #6c757d;
    }

    /* Botão Adicionar Disciplina */
    .add-discipline-btn {
        background: #28a745;
        color: white;
        border: none;
        border-radius: 50%;
        width: 32px;
        height: 32px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.3s ease;
        flex-shrink: 0;
    }

    .add-discipline-btn:hover {
        background: #218838;
        transform: scale(1.1);
    }

    /* Lista de disciplinas */
    .disciplines-list {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .discipline-badge {
        background: white;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 0.8rem;
        border: 1px solid #dee2e6;
        color: #495057;
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .remove-discipline-btn {
        background: none;
        border: none;
        color: #dc3545;
        cursor: pointer;
        padding: 2px;
        border-radius: 50%;
        width: 18px;
        height: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.7rem;
    }

    .remove-discipline-btn:hover {
        background: #dc3545;
        color: white;
    }

    /* Rodapé */
    .class-footer {
        padding: 15px;
        border-top: 1px solid #e9ecef;
        background: #f8f9fa;
    }

    .add-teacher-btn {
        width: 100%;
        padding: 12px;
        background: #4a6ea9;
        color: white;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-weight: 500;
        transition: background-color 0.3s ease;
    }

    .add-teacher-btn:hover {
        background: #3a5a8a;
    }

    /* Responsividade */
    @media (max-width: 768px) {
        .classes-grid {
            grid-template-columns: 1fr;
        }

        .controls {
            justify-content: center;
        }

        .filter-btn {
            padding: 8px 16px;
            font-size: 0.9rem;
        }

        .teacher-info {
            flex-wrap: wrap;
        }
    }

    @media (min-width: 769px) and (max-width: 1200px) {
        .classes-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    .class-content {
        padding: 1rem;
    }

    .teachers-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .teacher-card {
        display: flex;
        flex-direction: column;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        height: 100%;
    }

    .teacher-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 1rem;
        background-color: #f9f9f9;
        border-bottom: 1px solid #e0e0e0;
        cursor: pointer;
        flex-shrink: 0;
    }

    .teacher-info {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        flex: 1;
        cursor: pointer;
    }

    .teacher-avatar img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
    }

    .teacher-name-container {
        flex: 1;
    }

    .teacher-header h4 {
        margin: 0 0 0.25rem 0;
        font-size: 1rem;
        color: #333;
        word-break: break-word;
    }

    .disciplines-count {
        color: #666;
        font-size: 0.85rem;
        display: block;
    }

    .toggle-icon {
        transition: transform 0.3s ease;
        color: #666;
        margin-left: 0.5rem;
        flex-shrink: 0;
        margin-top: 0.25rem;
    }

    .teacher-info.active .toggle-icon {
        transform: rotate(180deg);
    }

    .remove-teacher-btn {
        background: none;
        border: none;
        color: #e74c3c;
        cursor: pointer;
        font-size: 1.1rem;
        padding: 0.25rem;
        border-radius: 4px;
        margin-left: 0.5rem;
        flex-shrink: 0;
    }

    .remove-teacher-btn:hover {
        background-color: #ffeaea;
    }

    .teacher-body {
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        flex-grow: 1;
    }

    .teacher-body.expanded {
        max-height: 500px;
        padding: 1rem;
        padding-bottom: 0.5rem;
    }

    .disciplines-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .discipline-badge {
        display: inline-flex;
        align-items: center;
        background-color: #f0f7ff;
        color: #0066cc;
        padding: 0.35rem 0.75rem;
        border-radius: 16px;
        font-size: 0.85rem;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .remove-discipline-btn {
        background: none;
        border: none;
        color: #0066cc;
        cursor: pointer;
        padding: 0;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .remove-discipline-btn:hover {
        color: #004d99;
    }

    .no-disciplines-msg {
        color: #666;
        font-style: italic;
        margin: 0;
    }

    .teacher-footer {
        padding: 1rem;
        background-color: #f9f9f9;
        border-top: 1px solid #e0e0e0;
        flex-shrink: 0;
    }

    .btn-success {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        background-color: #28a745;
        color: white;
        border: none;
        padding: 0.5rem 0.75rem;
        border-radius: 4px;
        cursor: pointer;
        font-size: 0.9rem;
        transition: background-color 0.2s;
        width: 100%;
        justify-content: center;
    }

    .btn-success:hover {
        background-color: #218838;
    }

    .add-teacher-container {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid #e0e0e0;
        text-align: center;
    }

    .add-teacher-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        background-color: #0066cc;
        color: white;
        border: none;
        padding: 0.75rem 1.5rem;
        border-radius: 6px;
        cursor: pointer;
        font-size: 0.95rem;
        transition: background-color 0.2s;
    }

    .add-teacher-btn:hover {
        background-color: #0052a3;
    }

    .no-teachers {
        text-align: center;
        padding: 2rem;
        color: #666;
        background-color: #f9f9f9;
        border-radius: 8px;
        margin-bottom: 1.5rem;
    }

    /* Responsividade */
    @media (max-width: 768px) {
        .teachers-grid {
            grid-template-columns: 1fr;
        }
    }

    select[multiple] {
        height: 200px;
        min-width: 220px;
        resize: vertical;
    }