.role-table span {
    font-size: 0.75rem;
}

.role-table-module span {
    font-size: 0.75rem;
}

.role-table-permission---- {
    color: red;
}

.role-table-permission-r-- {
    color: orange;
}

.role-table-permission-rw- {
    color: dodgerblue;
}

.role-table-permission-rwx {
    color: limegreen;
}

.role-table {
    width: 100%;
    border: 0 !important;
    border-collapse: separate;
    border-spacing: 1px;
    padding: 1px;
    color: #666666;
    font-size: 0.75rem;
}

.role-collapse {
    display: none;
}

.role-collapse-row-module {
    background-color: #e5e5e5;
    color: var(--black-color) !important;
    font-size: 0.75rem;
    font-family: var(--body-font);
    border-bottom: 2px solid #ffffff;
    border-radius: 4px;
    margin-bottom: 6px;
}

.role-collapse-row-other-odd {
    background-color: #ffffff;
    border-bottom: 2px solid #ffffff;
    font-size: 0.65rem;
}

.role-collapse-row-other-even {
    background-color: #f3f3f3;
    border-bottom: 2px solid #ffffff;
    font-size: 0.65rem;
}

.role-column-other-odd {
    border-right: 1px solid #f2f5f5;
}

.role-column-other-even {
    border-right: 1px solid #ffffff;
}

.role-control-input {
    /*
    height: 20px !important;
    */
    width: 200px;
    padding: 2px 2px 2px 12px !important;
    margin: 4px 0 4px 0;
}

.role-title-rotate {
    font-size: 0.75rem;
    display: inline-block;
    transform: rotate(315deg);
    -webkit-transform: rotate(315deg);
    -moz-transform: rotate(315deg);
    height: 100px;
    width: 185px;
    margin-left: 20px;
}

/**
    Role v2
 */
h4.role-v2-config {
    font-size: 1.5rem;
    background-color: #f4f4f4;
    margin: 0;
    padding: 20px;
}

.role-v2-table span {
    font-size: 0.75rem;
}

.role-v2-table-module span {
    font-size: 0.75rem;
}

.role-v2-table-permission---- {
    color: red;
}

.role-v2-table-permission-r-- {
    color: orange;
}

.role-v2-table-permission-rw- {
    color: dodgerblue;
}

.role-v2-table-permission-rwx {
    color: limegreen;
}

.role-v2-table {
    width: 100%;
    border: 0 !important;
    border-collapse: separate;
    border-spacing: 1px;
    padding: 1px;
    color: #666666;
    font-size: 0.75rem;
}

.role-v2-collapse {
    display: none;
}

.role-v2-collapse-row-module {
    background-color: #f3f3f3;
    color: var(--black-color) !important;
    font-size: 0.75rem;
    border-bottom: 2px solid #ffffff;
    border-radius: 4px;
    margin-bottom: 6px;
}

.role-v2-collapse-row-other-odd {
    background-color: #ffffff;
    border-bottom: 2px solid #ffffff;
    font-size: 0.65rem;
}

.role-v2-collapse-row-other-even {
    background-color: #f3f3f3;
    border-bottom: 2px solid #ffffff;
    font-size: 0.65rem;
}

.role-v2-column-other-odd {
    border-right: 1px solid #f2f5f5;
}

.role-v2-column-other-even {
    border-right: 1px solid #ffffff;
}

.role-v2-control-input {
    /*
    height: 20px !important;
    */
    width: 200px;
    padding: 2px 2px 2px 12px !important;
    margin: 4px 0 4px 0;
}

.role-v2-title-rotate {
    font-size: 0.75rem;
    display: inline-block;
    transform: rotate(315deg);
    -webkit-transform: rotate(315deg);
    -moz-transform: rotate(315deg);
    height: 100px;
    width: 185px;
    margin-left: 20px;
}

/*.filters-sticky {
    position: sticky;
    top: 44px;
    z-index: 10;
    background: #fff;
    padding: 16px 0;
}*/

.tab-content {
    height: 80vh;
    overflow-y: auto;
}


/* Estilos personalizados para los filtros */
.filters-sticky {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
}

.form-check {
    margin-bottom: 0.5rem;
}

.form-check-label {
    cursor: pointer;
    transition: color 0.2s ease;
}

.form-check-label:hover {
    color: #007bff; /* Azul primario de Bootstrap */
}

#meta-role-users-list {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tree ul {
    list-style: none !important; /* Eliminamos los puntos predeterminados */
    padding-left: 30px; /* Espaciado de los hijos respecto al padre */
    margin: 0;
    position: relative; /* Para controlar las líneas de conexión */
}

.tree li {
    margin: 15px 0; /* Espaciado vertical entre nodos */
    padding-left: 20px; /* Espaciado interno en cada nodo */
    position: relative; /* Permite posicionar las pseudo-elementos de las líneas */
}

/* Línea vertical que conecta con el padre */
.tree li:before {
    content: ''; /* Línea vertical */
    position: absolute;
    top: -2px; /* Ajuste para conectar con el nodo padre */
    left: 0; /* Alinea la línea al borde izquierdo */
    width: 1px; /* Grosor de la línea */
    height: calc(100% + 15px); /* Extensión: desde el nodo superior hasta el inferior */
    background-color: #ccc; /* Color de la línea */
}

/* Línea horizontal que conecta al padre */
.tree li:after {
    content: ''; /* Línea horizontal */
    position: absolute;
    top: 20px; /* Centrada con el nodo actual */
    left: 0; /* Extiende hacia la izquierda para conectar con la línea vertical */
    width: 20px; /* Longitud de la conexión horizontal */
    height: 1px; /* Grosor de la línea */
    background-color: #ccc; /* Color de la línea */
}

/* Eliminar línea vertical en el último nodo del nivel */
.tree li:last-child:before {
    height: 25px;
}

/* Estilo del grupo de empresas */
.tree-company-group {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    padding: 2px 20px;
    background-color: #ecf0f1;
    border-radius: 8px;
    display: inline-block;
}

/* Estilo de las empresas */
.tree-company {
    font-size: 1.2rem;
    font-weight: 600;
    color: #16a085;
    padding: 2px 20px;
    background-color: #d1f2eb;
    border-radius: 5px;
    display: inline-block;
}

/* Estilo de los proyectos */
.tree-project {
    font-size: .8rem;
    padding: 2px 20px;
    border-radius: 4px;
    display: inline-block;
    position: relative;
    width: 20%;
    height: 24px;
    color: #2980b9;
    background-color: #d6eaf8;
}

/* Estilo de los roles */
.tree-meta-role {
    font-size: .8rem;
    padding: 2px 20px;
    border-radius: 4px;
    display: inline-block;
    position: relative;
    width: 20%;
    height: 24px;
    color: #2980b9;
    background-color: #d6eaf8;

}

.tree-role {
    font-size: .9rem;
    padding: 2px 20px;
    border-radius: 4px;
    display: inline-block;
    position: relative;
    width: 20%;
    height: 24px;
    color: #666666;
    background-color: #fcf3e6;
}

/* Efectos hover */
.tree li:hover > .tree-company-group,
.tree li:hover > .tree-company,
.tree li:hover > .tree-project {
    background-color: #e0e0e0;
    transition: background-color 0.2s ease-in-out;
}

.tree li:hover > .tree-role {
    background-color: #2c3e50;
    transition: background-color 0.2s;
}


.allowed {
    font-size: 0.8rem;
    height: 24px;
    border-radius: 4px;
    background-color: #addcad;
    color: #fff;
    padding: 1px 10px;
    border: 2px solid #ffffff;
}

.denied {
    font-size: 0.8rem;
    height: 24px;
    border-radius: 4px;
    background-color: #ff9f9f;
    color: #fff;
    padding: 1px 10px;
    border: 2px solid #ffffff;
}

.temporal {
    font-size: 0.8rem;
    height: 24px;
    border-radius: 4px;
    background-color: #ffdd9f;
    color: #666666;
    padding: 1px 10px;
    border: 2px solid #ffffff;
}

/* Estilo para checkbox y su label */
.form-check-input {
    width: 16px;
    height: 16px;
    margin-right: 10px;
}

.form-check-label {
    font-size: 12px;
    line-height: 16px;
    display: inline-block;
    width: 80px;
    white-space: nowrap;
    /*overflow: hidden;
    text-overflow: ellipsis;*/
}

.modal-title strong {
    background-color: #b5b5b5;
    color: #ffffff;
    padding: 3px 6px;
    border-radius: 4px;
}

.modal-title span {
    background-color: #297db6;
    color: #ffffff;
    padding: 3px 6px;
    border-radius: 4px;
}


.tag-cloud-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fdfdfd;
}

.tag-item {
    background-color: #dadada;
    color: #888888;
    padding: 4px 12px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tag-item.active {
    background-color: #3498db;
    color: #ffffff
}

.tag-item.inactive {
    background-color: #db3434;
    color: #ffffff
}

.tag-item:hover {
    background-color: #c1c1c1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.tag-item.active:hover {
    background-color: #2980b9;
    color: #ffffff
}

.tag-item.inactive:hover {
    background-color: #b92929;
    color: #ffffff
}


.predictive-search-container {
    position: relative;
    width: 50%;
}

.search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.result-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background-color: #f5f5f5;
}

.result-item-error {
    padding: 10px;
    color: #d9534f;
}


.search-wrapper {
    position: relative;
    width: 50%;
    margin: 10px auto;
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
}

.search-all, .search-user-companies-admin {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid #bbbbbb;
    border-radius: 5px;
    font-size: 14px;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.search-all:focus, .search-user-companies-admin:focus {
    border-color: #7a7a7a;
    background: #fff;
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 13px;
    color: #bbbbbb;
    font-size: 18px;
    pointer-events: none;
}

#search-results, #companies-groups-results {
    position: absolute;
    top: 45px;
    left: 0;
    background: #fff;
    border: 1px solid #e0e9f3;
    box-shadow: 0 6px 20px rgba(34, 95, 158, 0.13);
    width: 100%;
    max-height: 500px;
    overflow-y: auto;
    border-radius: 14px;
    z-index: 1000;
    padding: 4px 0;
    animation: fadeIn 0.25s;
    display: none;
}

/* Estilo individual de cada resultado */
#search-results .search-result-item,
#companies-groups-results .search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 16px;
    color: #34495e;
    border-bottom: 1px solid #f0f5fa;
    transition: background 0.15s, color 0.15s;
}

/* Quitar borde al último resultado */
#search-results .search-result-item:last-child,
#companies-groups-results .search-result-item:last-child {
    border-bottom: none;
}

/* Hover y active sobre opciones */
#search-results .search-result-item:hover,
#companies-groups-results .search-result-item:hover,
#search-results .search-result-item.active,
#companies-groups-results .search-result-item.active {
    background: #f1f7fd;
    color: #1e90ff;
}

/* Iconos en ambos buscadores */
#search-results .result-icon,
#companies-groups-results .result-icon {
    margin-right: 12px;
    color: #c3cde6;
    font-size: 18px;
}

/* Animación opcional (por si no tienes definida) */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px);}
    to { opacity: 1; transform: none;}
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Elegancia en contenedores */
#role-permissions .col-md-6 {
    transition: box-shadow 0.25s, border-color 0.25s;
    background: #fcfcff;
    box-shadow: 0 1px 8px 0 rgba(0, 0, 0, .05);
    border-color: #d9e2ec !important;
}

#role-permissions .col-md-6:hover {
    box-shadow: 0 4px 20px 0 rgba(63, 81, 181, 0.10);
    border-color: #5b8def !important;
}

/* Para selects más bonitos */
#role-permissions select.form-select,
#role-permissions .custom-select {
    border-radius: 0.4rem;
    background-color: #f6f9ff;
    border: 1px solid #b6c2fa;
    box-shadow: none;
    padding: .375rem .75rem;
    transition: border-color .2s, box-shadow .2s;
}

#role-permissions select.form-select:focus,
#role-permissions .custom-select:focus {
    border-color: #4361ee;
    outline: 0;
    box-shadow: 0 0 0 0.2rem #b6c2fa33;
}

/* Texto de títulos */
#role-permissions h4 {
    font-weight: 600;
    letter-spacing: .02em;
    border-bottom: 1px solid #e7eaf3;
    padding-bottom: .2rem;
    margin-bottom: .6rem !important;
    font-size: .8rem;
}


.pill-radio {
    display: inline-block;
}

.pill-label {
    padding: 1px 3px;
    border-radius: 3px;
    background: #f4f5fa;
    margin: 0 2px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
    border: 1px solid #e0e1e8;
    font-size: 0.65em;
    display: inline-block;
    text-align: center;
}


.form-check-input:checked + .pill-label {
    background: #0061bb;
    color: #fff;
    border-color: #0061bb;
    font-weight: 600;
}

.pill-label:hover {
    background: #e2e9f7;
    border-color: #acb8d8;
    color: #135192;
}


/**
Selects
 */

.form-select.report-list {
    font-size: .6rem;
    background-color: #ffffff;
    border: 1px solid #ffffff;
    border-radius: 0.25rem;
    height: 22px;
    padding: 1px 1px 1px 8px;
}


.results-list {
    font-family: 'Liberation Mono', monospace;
    font-size: 0.6rem;
}

/* Contenedor principal del panel de información */
.info-panel-compact {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}




/**
TODO Debe de ir en styles de core
 */

tr.disabled{
    opacity: 0.5;
}
td.disabled {
    pointer-events: none;
}
/**
/TODO Debe de ir en styles de core
 */


.status-loading {
    opacity: 0.5;
    cursor: wait !important;
}

.invite-user-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: max-height;
}

.invite-user-collapse.open {
    max-height: 1000px;
}

.btn-outline-primary {
    transition: box-shadow 0.2s;
}
.btn-outline-primary:active, .btn-outline-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(49,132,253,.25);
}

/* Clase base para todos los tags-checkbox */
.tag-checkbox {
    display: inline-block;
    cursor: pointer;
    margin: 0 4px 4px 0;
}

.tag-checkbox input[type="checkbox"] {
    display: none; /* Oculta el checkbox real */
}

.tag-checkbox span {
    display: inline-block;
    padding: 3px 12px;
    background-color: #e0e0e0;
    color: #505050;
    transition: background 0.2s, color 0.2s, border 0.2s, box-shadow 0.2s;
    font-size: .7em;
    box-shadow: none;
    border-radius: 3px;
    font-weight: 600;
    border-width: 1px;
    border-color: #bdbdbd;
}

.tag-checkbox input[type="checkbox"]:checked + span {
    background-color: #1976d2;
    color: #fff;
}

.department-tag-checkbox {
    /* Hereda todo de .tag-checkbox */
}
.department-tag-checkbox span {

}

.category-tag-checkbox span {
    font-size: 0.9em;
}
.category-tag-checkbox input[type="checkbox"]:checked + span {
    background-color: #1565c0;
}

/* All: aún más grande y llamativo */
.all-tag-checkbox {

}
.all-tag-checkbox span {
    background-color: #f5f5f5;
    color: #24355a;
    font-size: 1.1em;
}
.all-tag-checkbox input[type="checkbox"]:checked + span {
    background-color: #388e3c;
    color: #fff;
}

/* Panel de información genérico */
.info-panel {
    background: #fff;
    border: 1px solid #e1e5ed;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(72,94,144,0.04);
    padding: 0;
    margin-bottom: 1.2rem;
    overflow: hidden;
}

/* Cabecera llamativa */
.info-panel-header {
    background-color: #e3e9f6;
    color: #344767;
    padding: 16px 20px 12px 20px;
    border-radius: 0.5rem 0.5rem 0 0;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e1e5ed;
}


/* Título secundario dentro del panel */
.info-panel-subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: #1a3552;
    margin-top: 10px;
    margin-bottom: 8px;
}

/* Cuerpo del panel */
.info-panel-body {
    padding: 16px 22px 18px 22px;
}

/* Listado de campos en línea (por ejemplo, datos tipo clave: valor) */
.info-panel-field-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.info-panel-field-list li {
    display: flex;
    align-items: center;
    font-size: 0.87rem;
    margin-bottom: 7px;
}
.info-panel-field-label {
    font-weight: 500;
    color: #35598d;
    margin-right: 8px;
    min-width: 110px;
}
.info-panel-field-value {
    color: #222a3a;
}

/* Estilos para <dl> en paneles */
.info-panel-dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    row-gap: 7px;
    column-gap: 14px;
    margin: 0 0 18px 0;
    padding: 0;
}

.info-panel-dl dt {
    font-weight: 600;
    color: #35598d;
    font-size: 0.97rem;
    /* Alineado a la derecha si lo prefieres: text-align: right; */
    margin: 0;
    padding: 0;
}
.info-panel-dl dd {
    color: #223;
    font-size: 0.97rem;
    margin: 0;
    padding: 0 0 0 2px;
    /* Si tienes texto muy largo, puedes limitar el ancho o poner word-break: break-word; */
}


@media (max-width: 600px) {
    .info-panel-header, .info-panel-body {
        padding: 10px;
    }
    .info-panel-field-label {
        min-width: 70px;
    }
}
