/* =========================================================
   Catálogo de clases — diseño administrativo
   Prefijo "cat-" para evitar colisiones con otros módulos.
   ========================================================= */

.cat-clases {
    background: #f5f7fb;
    padding-top: 0.5rem;
    padding-bottom: 1rem;
}

.cat-clases .card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(31, 45, 80, 0.06);
}

/* ============ KPIs superiores ============ */
.cat-kpi {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cat-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(31, 45, 80, 0.10);
}

.cat-kpi-vacio {
    /*background: #fcfcfd;*/
}

.cat-kpi-icono {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.4rem;
}

.cat-kpi-titulo {
    font-size: 0.78rem;
    color: #6c757d;
    margin-bottom: 0.15rem;
    font-weight: 500;
}

.cat-kpi-valor {
    font-size: 1.6rem;
    font-weight: 700;
    /*color: #1f2d50;*/
    line-height: 1.1;
}

.cat-kpi-vacio-msg {
    font-size: 0.7rem;
    color: #98a2b3;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Variantes de color para los íconos */
.cat-kpi-primary  { background: rgba(64, 105, 230, 0.12);  color: #4069e6; }
.cat-kpi-success  { background: rgba(40, 167, 69, 0.12);   color: #28a745; }
.cat-kpi-info     { background: rgba(23, 162, 184, 0.12);  color: #17a2b8; }
.cat-kpi-warning  { background: rgba(255, 152, 0, 0.12);   color: #ff9800; }
.cat-kpi-danger   { background: rgba(220, 53, 69, 0.12);   color: #dc3545; }
.cat-kpi-purple   { background: rgba(139, 92, 246, 0.12);  color: #8b5cf6; }

/* ============ Filtros ============ */
.cat-filtros .form-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
    color: #8a93a8;
}

.cat-filtros .form-select-sm,
.cat-filtros .form-control {
    border-radius: 8px;
}

.cat-filtros .input-group-text {
    border-radius: 8px 0 0 8px;
    color: #8a93a8;
}

.cat-filtros .input-group .form-control {
    border-radius: 0 8px 8px 0;
}

/* ============ Tabla principal ============ */
.cat-tabla .card-header {
    border-bottom: 1px solid #eef0f6;
    padding: 1rem 1.25rem;
    border-top-left-radius: 14px !important;
    border-top-right-radius: 14px !important;
}

.cat-tabla .card-footer {
    border-top: 1px solid #eef0f6;
    padding: 0.85rem 1.25rem;
    border-bottom-left-radius: 14px !important;
    border-bottom-right-radius: 14px !important;
}

.cat-tabla-temas {
    font-size: 0.9rem;
}

.cat-tabla-temas thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #8a93a8;
    font-weight: 600;
    background: #f8f9fb;
    border-bottom: 1px solid #eef0f6 !important;
    padding: 0.85rem 1rem;
}

.cat-tabla-temas tbody td {
    border-bottom: 1px solid #f4f5fa;
    padding: 0.85rem 1rem;
    vertical-align: middle;
}

.cat-tabla-temas tbody tr:hover {
    /*background: #fafbfd;*/
}

.cat-tabla-temas tbody tr:last-child td {
    border-bottom: none;
}

.cat-tabla-temas .badge {
    font-weight: 600;
    padding: 0.35em 0.7em;
    border-radius: 999px;
}

.cat-tamano-pagina {
    width: auto;
    min-width: 130px;
}

/* Botones de ícono de acciones */
.cat-icon-btn {
    border-radius: 8px;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.cat-icon-btn:hover {
    background: #eef0f6;
    color: #4069e6;
}

.cat-icon-btn-danger:hover {
    background: rgba(220, 53, 69, 0.10);
    color: #dc3545;
}

/* ============ Paneles inferiores: barras ============ */
.cat-barra {
    height: 8px;
    border-radius: 6px;
    background: #eef0f6;
}

.cat-barra .progress-bar {
    border-radius: 6px;
}

.cat-barra-success { background: #28a745; }
.cat-barra-info    { background: #17a2b8; }
.cat-barra-warning { background: #ff9800; }
.cat-barra-danger  { background: #dc3545; }
.cat-barra-purple  { background: #8b5cf6; }
.cat-barra-primary { background: #4069e6; }

.cat-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 0.4rem;
    vertical-align: middle;
}

.cat-dot-success { background: #28a745; }
.cat-dot-info    { background: #17a2b8; }
.cat-dot-warning { background: #ff9800; }
.cat-dot-danger  { background: #dc3545; }
.cat-dot-purple  { background: #8b5cf6; }
.cat-dot-primary { background: #4069e6; }

/* ============ Card "Total" ============ */
.cat-total {
    background: linear-gradient(135deg, #4069e6 0%, #6f86ff 100%);
    color: #fff;
}

.cat-total .text-muted {
    color: rgba(255, 255, 255, 0.85) !important;
}

.cat-total-icono {
    font-size: 2.2rem;
    opacity: 0.85;
    margin-bottom: 0.5rem;
}

.cat-total-valor {
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

/* ============ Responsive ============ */
@media (max-width: 992px) {
    .cat-kpi-valor {
        font-size: 1.4rem;
    }
}

@media (max-width: 576px) {
    .cat-tabla-temas {
        font-size: 0.85rem;
    }

    .cat-tabla-temas thead th,
    .cat-tabla-temas tbody td {
        padding: 0.7rem 0.65rem;
    }
}
