
/* --------------------------------------------------------------------------
   ESTILOS GERAIS AREAS E RESULTADOS
   -------------------------------------------------------------------------- */

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

.bb-table th,
.bb-table td {
    padding: 8px;
    border: 1px solid #DDD;
}

.bb-areas-directory .bb-table {
    margin-top: 15px;
}

/* --------------------------------------------------------------------------
   BARRA DE FILTROS
   -------------------------------------------------------------------------- */

.filter-bar {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.filter-bar form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    min-width: 150px;
    font-size: 14px;
}

.filter-bar button {
    padding: 8px 16px;
    background-color: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.filter-bar button:hover {
    background-color: #005a87;
}

/* --------------------------------------------------------------------------
   SISTEMA DE TABELAS RESPONSIVAS
   -------------------------------------------------------------------------- */

.table-responsive-2 .table-container {
    width: 100%;
    overflow-x: auto;
}

.table-row {
    display: flex;
    flex-wrap: nowrap;
    border-bottom: 1px solid #eee;
}

.table-cell {
    flex: 1 1 0;
    padding: 8px 12px;
    min-width: 120px;
    box-sizing: border-box;
    text-align: left;
}

.header-row {
    font-weight: bold;
    background: #f5f5f5;
}

/* --------------------------------------------------------------------------
   BARRA DE PROGRESSO
   -------------------------------------------------------------------------- */

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #81C784);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
    color: #333;
    z-index: 2;
    transition: color 0.3s ease;
}

.progress-bar.high-progress .progress-text {
    color: #fff !important;
}

.progress-bar.low-progress .progress-text {
    color: #333 !important;
}

/* --------------------------------------------------------------------------
   BADGES E STATUS
   -------------------------------------------------------------------------- */

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    min-width: 40px;
    transition: all 0.2s ease;
}

.badge-required {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
}

.badge-optional {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

/* Badges especiais para percentuais */
.badge-percentage {
    min-width: 50px;
    border-radius: 16px;
}

.status-enrolled {
    color: #1976d2;
    font-weight: bold;
}

.status-not-enrolled {
    color: #757575;
    font-weight: bold;
}

.status-completed {
    color: #2e7d32;
    font-weight: bold;
}

.no-score {
    color: #757575;
    font-style: italic;
}

/* --------------------------------------------------------------------------
   PAGINAÇÃO
   -------------------------------------------------------------------------- */

.pagination-container {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination-btn {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    background-color: #fff;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background-color: #f8f9fa;
    text-decoration: none;
}

.pagination-btn.active {
    background-color: #007cba;
    color: white;
    border-color: #007cba;
}

/* --------------------------------------------------------------------------
   RESPONSIVIDADE MOBILE
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    /* Filtros */
    .filter-bar form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select {
        min-width: 100%;
        margin-bottom: 5px;
    }
    
    .filter-bar button {
        width: 100%;
    }

    /* Tabelas */
    .table-header {
        display: none;
    }

    .table-row {
        flex-direction: column;
        border: 1px solid #eee;
        margin-bottom: 12px;
        background: #fff;
        border-radius: 8px;
    }

    .table-cell {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 8px;
        border-bottom: 1px solid #f0f0f0;
        position: relative;
        min-width: 0;
    }

    .table-cell:last-child {
        border-bottom: none;
    }

    .table-cell::before {
        content: attr(data-label);
        font-weight: bold;
        color: #333;
        flex-basis: 50%;
        text-align: left;
        padding-right: 10px;
        white-space: nowrap;
    }

    .table-container {
        background: transparent!important;
        border: none!important;
        border-radius: 10px;
        overflow: hidden;
        width: 100%;
        margin-top: 20px;
    }

    /* Barra de progresso */
    .progress-bar {
        height: 16px;
    }
    
    .progress-text {
        font-size: 10px;
    }
    
    /* Badges */
    .badge {
        font-size: 10px;
        padding: 2px 6px;
        min-width: 35px;
    }

    /* Paginação */
    .pagination-container {
        flex-wrap: wrap;
        gap: 3px;
    }

    .pagination-btn {
        padding: 6px 10px;
        font-size: 14px;
    }
}
