html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}


.bodyMain {
    min-width: 100vh;
    display: flex;
    flex-direction: column;
}

.footMain {
    margin-top: auto;
    min-height:10vh;
}

#tblPresupuesto{
    border:solid;
    border-width: 1px;
    margin: 15px;
}

tblPresupuesto thead {
    background-color: #00A7BA;
    color: white;
}

tblPresupuesto tr:nth-child(even) {
    background-color: #f2f2f2;
}

.perfiles:hover {
    background-color: #02A8BB;
    color: white;
}

.org-chart {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
}
/*
.node {
    text-align: center;
    margin: 0 20px;
}

.sub-node {
    margin-top: 20px;
    text-align: center;
}

.sub-sub-node {
    margin-top: 20px;
    text-align: center;
}
*/
#tblPerfiles tr:hover {
    background-color: #02A8BB;
    color: white;
}

.hierarchy-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

.node {
    padding: 10px;
    margin: 5px;
    border: 1px solid #000;
    border-radius: 5px;
    text-align: center;
    width: 150px;
    background-color: #f0f0f0;
}

.nodeInactivo {
    padding: 10px;
    margin: 5px;
    border: 1px solid #000;
    border-radius: 5px;
    text-align: center;
    width: 150px;
    background-color: #ff0000;
    color:#ffff;
}
/*
.node:hover {
    padding: 10px;
    margin: 5px;
    border: 1px solid #000;
    border-radius: 5px;
    text-align: center;
    width: 150px;
    background-color: #f0f0f0;
    color: #ff0000;
    cursor:pointer;
}*/

.connector {
    width: 2px;
    height: 20px;
    background-color: #000;
}


/*body {
    background-color: #19616A;
    color: white;
}*/


.tblAreas tr:nth-child(even) {
    background-color: #f2f2f2;
}

.tblAreas tr:hover {
    background-color: #f2f2f2;
    color:white;
}

#AP thead th {
    position: sticky; /* Make the header sticky */
    top: 0; /* Stick it to the top */
    background-color: #f1f1f1; /* Add background color to the header */
    z-index: 1; /* Ensure the header is above the body rows */
    border-bottom: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

#AP tbody tr:hover {
    color: white;
    background-color: #f5f5f5;
    cursor: pointer;
}

#AP2 thead th {
    position: sticky; /* Make the header sticky */
    top: 0; /* Stick it to the top */
    background-color: #f1f1f1; /* Add background color to the header */
    /*z-index: 1;*/ /* Ensure the header is above the body rows */
    z-index: 4; /* Ensure the header is above the body rows */
    border-bottom: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

#AP2 thead th.sticky-col {
        left: 0; /* pegado a la izquierda */
        z-index: 5; /* encima del resto */
    }

.sticky-col {
    position: sticky;
    left: 0;
    background: white; /* importante */
    background-color: royalblue;
    z-index: 2;
}

.DetalleRE thead th {
    /*position: sticky;*/ /* Make the header sticky */
    top: 0; /* Stick it to the top */
    /*background-color: blue;*/ /* Add background color to the header */
    background-color: #f1f1f1; /* Add background color to the header */
    /*color: white;*/
    z-index: 1; /* Ensure the header is above the body rows */
    border-bottom: 1px solid #ddd;
    padding: 8px;
    /*text-align: center;*/
}


/*#AP2 tbody tr:hover {
    color: white;
    background-color: #f5f5f5;
    cursor: pointer;
}*/

#AP2 tbody tr:nth-child(even) {
    background-color: #D6EEEE;
}

#AP2 table tr td {
    width: 1%;
    white-space: nowrap;
}
/*uncambioJC*/

.texto-titulo {
    font-style: normal;
    color: black;
    font-size: 18px;
}

.texto-cursiva {
    font-style: italic;
    color: gray;
    font-size: 8px;
    line-height: 1.2; /* Ajusta este valor según lo que necesites */
    padding: 3px; /* Opcional: reduce el espacio interno */
    margin: 0; /* Elimina márgenes si hay */
}

.texto-instruccion {
    font-style: italic;
    color: gray;
    font-size: 10px;
    line-height: 1.2; /* Ajusta este valor según lo que necesites */
    padding: 3px; /* Opcional: reduce el espacio interno */
    margin: 0; /* Elimina márgenes si hay */
}

.texto-instruccion2 {
    font-style: normal;
    color: black;
    font-size: 12px;
}

.texto-instruccion3 {
    font-style: normal;
    color: black;
    font-size: 11px;
}

.texto-input {
    font-style: normal;
    color: black;
    font-size: 12px;
}

.texto-input-titulo {
    font-style: normal;
    color: black;
    font-size: 10px;
    line-height: 1.2; /* Ajusta este valor según lo que necesites */
    padding: 1px; /* Opcional: reduce el espacio interno */
    margin: 0; /* Elimina márgenes si hay */
}

.texto-input-titulo-sol {
    font-style: normal;
    color: black;
    font-size: 9px;
    line-height: 1.2; /* Ajusta este valor según lo que necesites */
    padding: 1px; /* Opcional: reduce el espacio interno */
    margin: 0; /* Elimina márgenes si hay */
}


.texto-input-titulo_Detalle {
    font-style: normal;
    color: black;
    font-size: 11px;
    line-height: 1.2; /* Ajusta este valor según lo que necesites */
    padding: 1px; /* Opcional: reduce el espacio interno */
    margin: 0; /* Elimina márgenes si hay */
}
.texto-etiqueta {
    font-style: normal;
    color: black;
    font-size: 14px;
}
.texto-table-head {
    font-style: normal;
    color: black;
    font-size: 14px;
    text-align: center;
}
.texto-table-body {
    font-style: normal;
    color: black;
    font-size: 12px;
    text-align: center;
}

.texto-input-table {
    font-style: normal;
    color: black;
    font-size: 12px;
    width:120px;
}

.btn-general {
    font-size: smaller;
}

.btn-Menu {
    font-size: x-small;
}

.btn-file {
    font-size: x-small;
}

.table-reporte-head {
    width: 1%;
    white-space: nowrap;
    font-style: normal;
    color: black;
    font-size: 10px;
    text-align: center;
}

.table-reporte-body {
    font-style: normal;
    color: black;
    font-size: 10px;
    text-align: center;
}

.table-reporte-table {
    font-style: normal;
    color: black;
    font-size: 12px;
    width: 120px;
}

.texto-input-filtros {
    font-style: normal;
    color: black;
    font-size: 11px;
    /*width: 120px;*/
}

.texto-medianos-input-filtros {
    font-style: normal;
    color: black;
    font-size: 11px;
    width: 200px;
}

.texto-largo-input-filtros {
    font-style: normal;
    color: black;
    font-size: 11px;
    width: 300px;
}

.texto-largo2-input-filtros {
    font-style: normal;
    color: black;
    font-size: 11px;
    width: 475px;
}

.selectable-lg {
    height: 310px;
    overflow-y: auto;
    list-style-type: none;
    padding: 0;
    border-radius: 3px;
    border: 1px solid #ccc;
}

    .selectable-lg li {
        cursor: pointer;
        border-bottom: 1px #eee solid;
        padding: 2px 10px;
        font-size: 14px;
    }

        .selectable-lg li:hover {
            background-color: #08c;
            color: #fff;
        }

.table-con-encabezado {
    max-height: 400px; /* o cualquier valor deseado */
    overflow-y: auto;
    display: block;
}

    .table-con-encabezado table {
        width: 100%;
        border-collapse: collapse;
    }


.tabla-scroll {
    overflow-y: auto;
    display: block;
}

    .tabla-scroll table {
        width: 100%;
        border-collapse: collapse;
    }

    .tabla-scroll th {
        position: sticky;
        top: 0;
        background-color: #f2f2f2;
        z-index: 1;
    }

/*th, td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}*/

/*.tr-borde-gris-oscuro {
    border: 2px solid #343a40;*/ /* gris oscuro */
/*}

.td-fondo-gris-claro {
    background-color: #f8f9fa;*/ /* gris claro */
/*}*/

.borde-superior-sol {
    border-top: 2px solid #808080; /* Gris oscuro, puedes cambiar el color o grosor */
}

.borde-inferior-sol {
    border-bottom: 2px solid #808080; /* gris oscuro */
}

.borde-izquierdo-sol {
    border-left: 2px solid #808080;
}

.borde-derecho-sol {
    border-right: 2px solid #808080;
}

.borde-separador {
    border-right: 1px solid #808080;
}
.borde-separador-sup {
    border-top: 1px solid #808080;
}


th {
    font-size: 11px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

td {
    font-size: 9px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.borde-superior-partida {
    border-top: 1px solid #ccc; /* Gris oscuro, puedes cambiar el color o grosor */
}

.borde-inferior-partida {
    border-bottom: 1px solid #ccc; /* gris oscuro */
}

.borde-izquierdo-partida {
    border-left: 1px solid #ccc;
}

.borde-derecho-partida {
    border-right: 1px solid #ccc;
}

/* Primera fila sticky */
#table thead tr:nth-child(1) th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

/* Segunda fila sticky */
#table thead tr:nth-child(2) th {
    position: sticky;
    top: 20px; /* altura primera fila */
    background: white;
    z-index: 5;
}

#table thead th.sticky-col {
    left: 0; /* pegado a la izquierda */
    z-index: 5; /* encima del resto */
}

/* ================================
   CONFIGURACIÓN GENERAL DE TABLA
================================ */
#AP3 table {
    border-collapse: separate;
    border-spacing: 0;
}

/* ================================
   FIJAR PRIMERAS DOS FILAS (thead)
================================ */

/* Primera fila */
#AP3 thead tr:nth-child(1) th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 5;
}

/* Segunda fila */
#AP3 thead tr:nth-child(2) th {
    position: sticky;
    top: 40px; /* altura de la primera fila */
    background: white;
    z-index: 6;
}


#AP3 thead tr:nth-child() th.sticky-column {
    left: 0; /* pegado a la izquierda */
    z-index: 6; /* encima del resto */
}

.sticky-column {
    position: sticky;
    left: 0;
    background: white; /* importante */
    background-color: royalblue;
    z-index: 2;
}


#AP4 thead th {
    position: sticky; /* Make the header sticky */
    top: 0; /* Stick it to the top */
    background-color: #f1f1f1; /* Add background color to the header */
    z-index: 1; /* Ensure the header is above the body rows */
    border-bottom: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

    #AP4 thead th.sticky-col {
        left: 0; /* pegado a la izquierda */
        z-index: 5; /* encima del resto */
    }

.sticky-colDetalle {
    position: sticky;
    left: 0;
    background: white; /* importante */
    z-index: 2;
}

/*Colores*/

.badge-verde {
    background-color: #B4D200;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
}

.badge-rojo {
    background-color: #D50000;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
}

.badge-azul-turqueza {
    background-color: #00B7D9;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
}

.badge-gris-oscuro {
    background-color: #3D3C3D;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
}

.badge-gris-claro {
    background-color: #E2E2E2;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
}

.badge-azul-fuerte {
    background-color: #0C5DFE;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
}

.badge-amarillo-oro {
    background-color: #F3B424;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
}

.badge-gris-oxford {
    background-color: #696969;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
}

.button-amarillo-oro {
    background-color: #E29500;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
}

.button-verde {
    background-color: #B4D200;
    color: white;
    padding: 4px 15px;
    border-radius: 12px;
}

.button-rojo {
    background-color: #C31114;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
}

.button-negro {
    background-color: #3D3C3D;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
}

.button-azul-turqueza {
    background-color: #25ADD3;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
}

.button-gris-oxford {
    background-color: #696969;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
}

.button-azul-fuerte {
    background-color: #0C5DFE;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
}

.badge-morado {
    background-color: #660066;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
}

.no-gap {
    margin: 0;
    padding: 0;
}

/*Tree*/


/* --- Contenedor ---------------------------------------- */
.tree-container {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    color: #1e293b;
    user-select: none;
}

/* --- Barra de busqueda --------------------------------- */
.tree-search-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 10px;
    margin-bottom: 6px;
    transition: border-color 0.15s;
}

    .tree-search-wrapper:focus-within {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59,130,246,.15);
    }

.search-icon {
    font-size: 14px;
    flex-shrink: 0;
    opacity: .6;
}

.tree-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    color: #1e293b;
}

    .tree-search-input::placeholder {
        color: #94a3b8;
    }

.search-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 13px;
    padding: 0 2px;
    line-height: 1;
    transition: color .15s;
}

    .search-clear:hover {
        color: #ef4444;
    }

/* --- Resumen resultados -------------------------------- */
.search-summary {
    font-size: 12px;
    color: #64748b;
    padding: 2px 4px 6px;
}

    .search-summary .no-results {
        color: #ef4444;
    }

/* --- Barra de controles de expansion ------------------- */
.tree-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 4px;
    margin-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}

.controls-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

    /* Separador visual entre grupos */
    .controls-group + .controls-group {
        padding-left: 8px;
        border-left: 1px solid #e2e8f0;
    }

/* Boton Expandir / Colapsar todo */
.ctrl-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
}

    .ctrl-btn:hover {
        background: #e2e8f0;
        color: #1e293b;
        border-color: #cbd5e1;
    }

.ctrl-icon {
    font-size: 9px;
    line-height: 1;
}

/* Etiqueta "Nivel:" */
.ctrl-label {
    font-size: 12px;
    color: #64748b;
    margin-right: 2px;
}

/* Botones de nivel numerico */
.ctrl-level-btn {
    min-width: 28px;
    height: 28px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}

    .ctrl-level-btn:hover {
        background: #dbeafe;
        color: #1d4ed8;
        border-color: #93c5fd;
    }

    .ctrl-level-btn.active {
        background: #3b82f6;
        color: #fff;
        border-color: #3b82f6;
    }

/* --- Resaltado de busqueda ----------------------------- */
.tree-highlight {
    background: #fef08a;
    color: #713f12;
    border-radius: 2px;
    padding: 0 1px;
    font-weight: 600;
}

/* --- Listas -------------------------------------------- */
.tree-root,
.tree-children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tree-children {
    border-left: 1px dashed #cbd5e1;
    margin-left: 20px;
}

/* --- Fila del nodo ------------------------------------- */
.tree-item {
    position: relative;
}

.tree-node {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: nowrap;
}

    .tree-node:hover {
        background: #f1f5f9;
        color: #0f172a;
    }

    .tree-node.selected {
        background: #dbeafe;
        color: #1d4ed8;
        font-weight: 600;
    }

    .tree-node.disabled {
        opacity: .45;
        pointer-events: none;
    }

    /* Cursor especial en nodos con hijos para indicar doble-clic */
    .tree-node:not(.disabled):has(.toggle-icon) {
        cursor: default;
    }

/* --- Toggle -------------------------------------------- */
.tree-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    flex-shrink: 0;
}

.toggle-icon {
    display: inline-block;
    font-size: 10px;
    color: #64748b;
    transition: transform .2s ease;
    transform: rotate(0deg);
    cursor: pointer;
}

    .toggle-icon:hover {
        color: #3b82f6;
    }

    .toggle-icon.expanded {
        transform: rotate(90deg);
    }

.toggle-placeholder {
    display: inline-block;
    width: 10px;
}

/* --- Icono y label ------------------------------------- */
.tree-icon {
    font-size: 16px;
    flex-shrink: 0;
    line-height: 1;
}

.tree-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Indicador sutil de doble-clic en nodos con hijos */
.dblclick-hint {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #cbd5e1;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity .2s;
}

.tree-node:hover .dblclick-hint {
    opacity: 1;
}

/* --- Badge --------------------------------------------- */
.tree-badge {
    background: #3b82f6;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 999px;
    margin-left: auto;
    flex-shrink: 0;
}

/* --- Modal usuario ------------------------------------ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    min-width: 320px;
    max-width: 480px;
    width: 100%;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-title {
    font-weight: 600;
    font-size: 15px;
    color: #1e293b;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 16px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color .15s, background .15s;
}

    .modal-close:hover {
        color: #ef4444;
        background: #fee2e2;
    }

.modal-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.modal-key {
    font-size: 12px;
    color: #64748b;
    min-width: 100px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.modal-val {
    font-size: 14px;
    color: #1e293b;
    font-weight: 400;
}

/*Busqueda*/
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
}

.modal-btn {
    padding: 7px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .15s, color .15s;
}

.modal-btn-primary {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

    .modal-btn-primary:hover:not(:disabled) {
        background: #2563eb;
    }

    .modal-btn-primary:disabled {
        opacity: .45;
        cursor: not-allowed;
    }

.modal-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

    .modal-btn-secondary:hover {
        background: #e2e8f0;
    }

.modal-search-wrapper {
    position: relative;
    flex: 1;
}

.modal-search-input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    outline: none;
    color: #1e293b;
    transition: border-color .15s;
    box-sizing: border-box;
}

    .modal-search-input:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59,130,246,.15);
    }

.modal-search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    list-style: none;
    margin: 0;
    padding: 4px 0;
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
}

.modal-search-item {
    padding: 8px 14px;
    font-size: 13px;
    color: #1e293b;
    cursor: pointer;
    transition: background .1s;
}

    .modal-search-item:hover {
        background: #f1f5f9;
        color: #1d4ed8;
    }


/* Nodo inactivo en el árbol */
.nodo-inactivo .tree-label {
    color: #ef4444;
}

.nodo-inactivo .tree-icon svg {
    color: #ef4444 !important;
}

/* Badge inactivo en modal */
.modal-badge-inactivo {
    background: #fee2e2;
    color: #ef4444;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    margin-right: auto;
}

.texto-inactivo {
    color: #ef4444;
}

/* Divider */
.modal-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 0;
}

/* Alcance */
.modal-row-alcance {
    align-items: flex-start;
}

.alcance-opciones {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.alcance-opcion {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    flex-direction: row;
    flex-wrap: wrap;
}

    .alcance-opcion:hover {
        border-color: #93c5fd;
        background: #eff6ff;
    }

.alcance-activo {
    border-color: #3b82f6 !important;
    background: #eff6ff !important;
}

.alcance-radio {
    width: 14px;
    height: 14px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
    transition: border-color .15s;
}

.radio-activo {
    border-color: #3b82f6;
    background: radial-gradient(circle, #3b82f6 45%, transparent 45%);
}

.alcance-hint {
    font-size: 11px;
    color: #94a3b8;
    width: 100%;
    padding-left: 22px;
}

/**/

.modal-search-item {
    padding: 8px 14px;
    font-size: 13px;
    color: #1e293b;
    cursor: pointer;
    transition: background .1s;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .modal-search-item:hover {
        background: #f1f5f9;
    }

.search-result-nombre {
    font-weight: 500;
    color: #1e293b;
}

.search-result-detalle {
    font-size: 11px;
    color: #94a3b8;
}

.ctrl-btn.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.texto-input-tablev2 {
    font-size: 8px;
    height: 20px;
    padding: 0px 2px;
    line-height: 1;
}

.texto-input-sm {
    font-style: normal;
    color: black;
    font-size: 9px;
    height: 18px;
    padding: 1px 3px;
}

.tabla-compacta {
    border-collapse: collapse;
    font-size: 9px;
}

    .tabla-compacta th,
    .tabla-compacta td {
        padding: 2px 4px; /* poco espacio interno */
        height: 18px; /* misma altura que el input */
        line-height: 1;
        vertical-align: middle;
    }

    .tabla-compacta th {
        font-size: 8px;
        font-weight: 600;
        background-color: #f5f5f5;
    }

    .tabla-compacta td {
        white-space: nowrap; /* evita que crezca hacia abajo */
    }

    .tabla-compacta input {
        margin: 0 !important; /* elimina márgenes heredados */
    }


/* ============================================================
   PerfilTree.css — Diseño dual panel con cascada de niveles
   ============================================================ */

/*  Wrap */
.pt-wrap {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    color: #1e293b;
    padding: 0.5rem 0;
}

/*  Toolbar */
.pt-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.pt-btn {
    font-size: 12px;
    padding: 4px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    transition: background 0.12s;
}

    .pt-btn:hover {
        background: #e2e8f0;
    }

/* Checkbox global */
.pt-global-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
    margin-left: 8px;
}

/*  Leyenda */
.pt-legend {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
    font-size: 12px;
    color: #64748b;
}

.pt-leg {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pt-dot {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    flex-shrink: 0;
}

.dot-igual {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
}

.dot-diferente {
    background: #fef3c7;
    border: 1px solid #fcd34d;
}

.dot-nuevo {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
}

.dot-sobrante {
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

/*  Árbol base  */
.pt-tree {
    padding-left: 2px;
}

.pt-sol-block {
    margin-bottom: 4px;
}

/*  Fila genérica de nodo  */
.pt-row {
    display: flex;
    align-items: center;
    padding: 2px 6px 2px 2px;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    min-height: 26px;
    transition: background 0.1s;
}

    .pt-row:hover {
        background: #f1f5f9;
    }

/*  Hijos con línea vertical  */
.pt-children {
    padding-left: 20px;
    border-left: 1px solid #e2e8f0;
    margin-left: 9px;
}

/*  Flecha */
.pt-arrow {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #94a3b8;
    transition: transform 0.15s ease;
}

.pt-arrow--open {
    transform: rotate(90deg);
}

.pt-arrow--leaf {
    opacity: 0;
    pointer-events: none;
}

/*  Carpeta */
.pt-folder-icon {
    width: 18px;
    height: 14px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 7px;
}

/*  Label */
.pt-label {
    font-size: 13px;
    color: #1e293b;
    white-space: nowrap;
}

.pt-label--sol {
    font-weight: 600;
}

/*  Checkbox por solicitante  */
.pt-sol-check {
    display: flex;
    align-items: center;
    margin-left: 10px;
    cursor: pointer;
}

.pt-loading {
    color: #94a3b8;
    font-style: italic;
    padding: 1rem 0;
}

/* ============================================================
   AreaCompare — contenedor del área con doble panel
   ============================================================ */

.ac-wrap {
    margin: 4px 0;
}

/* Fila header del área */
.ac-header {
    display: flex;
    align-items: center;
    padding: 2px 6px 2px 2px;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    min-height: 26px;
    transition: background 0.1s;
}

    .ac-header:hover {
        background: #f1f5f9;
    }

/*  Dos paneles lado a lado  */
.ac-panels {
    display: flex;
    gap: 16px;
    margin: 8px 0 8px 28px;
    flex-wrap: wrap;
}

/* Panel base */
.ac-panel {
    flex: 1 1 220px;
    min-width: 200px;
    /*max-width: 360px;*/
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
}

/* Encabezado del panel */
.ac-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.ac-panel-title {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ac-check {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #2563eb;
}

.ac-check-placeholder {
    width: 15px;
    height: 15px;
}

/* Cuerpo del panel */
.ac-panel-body {
    padding: 8px 10px;
}

/* Borde izquierdo diferenciador por tipo de panel */
.ac-panel--nueva {
    border-left: 3px solid #60a5fa;
}

.ac-panel--actual {
    border-left: 3px solid #94a3b8;
}

/* ============================================================
   NivelPanel — filas de nivel en cascada
   ============================================================ */

/* Cada fila de nivel */
.np-nivel {
    font-size: 12.5px;
    padding: 2px 8px;
    border-radius: 4px;
    margin: 2px 0;
    display: inline-block;
    min-width: 60px;
}

/* Indentación en cascada */
.np-indent {
    padding-left: 18px;
}

/* Colores por etiqueta */
.nivel-igual {
    color: #1e293b;
    background: transparent;
}

.nivel-diferente {
    background: #fef08a;
    color: #713f12;
    font-weight: 500;
}

.nivel-nuevo {
    background: #d1fae5;
    color: #1e293b;
    /*color: #7f1d1d;*/
    font-weight: 500;
}

.nivel-sobrante {
    background: #fecaca;
    color: #7f1d1d;
    font-weight: 500;
}
/* ID secundario en panel actual */
.np-id {
    font-size: 11px;
    opacity: 0.65;
    margin-left: 4px;
    font-weight: 400;
}




/* ModalSuplente */

.modal-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 340px;
}
/*.modal-split {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}*/
/* Paneles */

.modal-panel {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}
/*.modal-panel {
    background: var(--bs-body-bg);
    border: 0.5px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}*/
/*.modal-panel-right {
    border: 1.5px solid rgba(55, 138, 221, 0.3);
}*/
.modal-panel-left {
    border-right: 1px solid #e5e7eb;
}
.modal-panel-right {
    border: 1.5px solid rgba(55, 138, 221, 0.3);
}
/*.modal-panel-center {
    border: 1.5px solid rgba(59, 109, 17, 0.3);
}*/
/* Etiqueta de seccion */

.panel-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 12px;
}


/* Header del usuario */

.user-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.user-header-empty {
    opacity: 0.5;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}
.user-avatar-suplente {
    background: #EAF3DE;
    color: #27500A;
}

.user-avatar-nuevo {
    background: #EEEDFE;
    color: #3C3489;
}

.user-avatar-empty {
    background: #f3f4f6;
    color: #9ca3af;
    border: 1.5px dashed #d1d5db;
}

.user-nombre {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

.user-estado {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

/* Campos de datos */

.user-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
}

.field-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.field-label {
    font-size: 11px;
    color: #6b7280;
}

.field-value {
    font-size: 13px;
    color: #111827;
    word-break: break-word;
}

.text-muted {
    color: #9ca3af !important;
}

/* Buscador */

.search-wrapper {
    position: relative;
    margin-bottom: 14px;
}

.search-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 13px;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    color: #111827;
    outline: none;
    transition: border-color 0.15s;
}

    .search-input:focus {
        border-color: #6366f1;
        background: #fff;
    }

.search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    z-index: 100;
    list-style: none;
    margin: 0;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

.search-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: background 0.1s;
}

    .search-item:last-child {
        border-bottom: none;
    }

    .search-item:hover {
        background: #f5f3ff;
    }

.search-nombre {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
}

.search-detalle {
    font-size: 11px;
    color: #6b7280;
}

/* Vigencia */

.vigencia-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

.vigencia-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.date-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 12px;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    color: #111827;
    outline: none;
    transition: border-color 0.15s;
}

    .date-input:focus {
        border-color: #6366f1;
        background: #fff;
    }

/* Botones del footer */

.btn-general {
    font-size: 13px;
    padding: 7px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: opacity 0.15s, background 0.15s;
}

/*.button-gris-oxford {
    background: #e5e7eb;
    color: #374151;
}

    .button-gris-oxford:hover {
        background: #d1d5db;
    }*/
/*
.button-verde {
    background: #16a34a;
    color: #fff;
}

    .button-verde:hover:not(:disabled) {
        background: #15803d;
    }

    .button-verde:disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }
*/

@media (max-width: 768px) {
    .modal-split {
        grid-template-columns: 1fr;
    }
}



/*ModalJerarquia*/

/*  Estado vacío  */
.jerarquia-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 2.5rem 1rem;
    text-align: center;
}

.jerarquia-empty-icon {
    opacity: .35;
}

.jerarquia-empty-text {
    font-size: 13px;
    color: #888;
    margin: 0;
}

/* Contenedor árbol  */
.jerarquia-tree {
    padding: .5rem 0;
}

/* Sub-árboles con conectores */
.jsubtree {
    padding-left: 20px;
    margin-top: 3px;
}

.jconector-sol {
    border-left: 1.5px solid #97C459;
}

.jconector-apr {
    border-left: 1.5px solid #B5D4F4;
}

/* Suplente: borde punteado ámbar, sangría extra */
.jsubtree-sup {
    padding-left: 36px;
    border-left: 1.5px dashed #FAC775;
    margin-left: 20px;
    margin-top: 2px;
}

/* Nodo base */
.jnodo {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    border-radius: 8px;
    border: 0.5px solid transparent;
    margin-bottom: 3px;
    font-size: 12px;
}

/* Colores por tipo */
.jnodo-cat {
    background: #f5f5f5;
    border-color: #e0e0e0;
}

.jnodo-sol {
    background: #EAF3DE;
    border-color: #97C459;
}

.jnodo-apr {
    background: #E6F1FB;
    border-color: #85B7EB;
}

.jnodo-sup {
    background: #FAEEDA;
    border-color: #FAC775;
}

/* Avatar */
.jav {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 600;
    flex-shrink: 0;
}

.jav-sol {
    background: #639922;
    color: #EAF3DE;
}

.jav-apr {
    background: #185FA5;
    color: #E6F1FB;
}

.jav-sup {
    background: #BA7517;
    color: #FAEEDA;
}

/*  Nombre del nodo  */
.jnodo-name {
    flex: 1;
    font-weight: 500;
}

.jname-sol {
    color: #27500A;
}

.jname-apr {
    color: #0C447C;
}

.jname-sup {
    color: #633806;
    font-weight: 400;
}

/* Badge */
.jbadge {
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 99px;
    flex-shrink: 0;
}

.jbadge-cat {
    background: #e8e8e8;
    color: #555;
}

.jbadge-sol {
    background: #C0DD97;
    color: #27500A;
}

.jbadge-apr {
    background: #B5D4F4;
    color: #0C447C;
}

.jbadge-sup {
    background: #FAC775;
    color: #633806;
}

/*  Acciones del nodo */
.jacciones {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.jbtn-accion {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    line-height: 1;
    opacity: .6;
    transition: opacity .15s, background .15s;
}

    .jbtn-accion:hover {
        opacity: 1;
        background: rgba(0,0,0,.06);
    }

/* Botones "agregar" en árbol  */
.jbtn-add {
    width: 100%;
    background: none;
    border: 0.5px dashed;
    border-radius: 7px;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    text-align: center;
    margin-top: 3px;
    margin-bottom: 3px;
    transition: background .15s;
    display: block;
}

.jbtn-add-sol {
    color: #3B6D11;
    border-color: #C0DD97;
}

    .jbtn-add-sol:hover {
        background: #EAF3DE;
    }

.jbtn-add-apr {
    color: #185FA5;
    border-color: #B5D4F4;
}

    .jbtn-add-apr:hover {
        background: #E6F1FB;
    }

.jbtn-add-sup {
    color: #854F0B;
    border-color: #FAC775;
}

    .jbtn-add-sup:hover {
        background: #FAEEDA;
    }

/* Formulario inline  */
.jinline-form {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    margin-bottom: 3px;
    flex-wrap: wrap;
}

.jinline-sup {
    padding-left: 0;
}

.jinline-apr {
    padding-left: 0;
}

.jinline-input {
    flex: 1;
    min-width: 140px;
    font-size: 12px;
    padding: 5px 9px;
    border-radius: 7px;
    border: 0.5px solid #85B7EB;
    background: #fff;
    color: #111;
    outline: none;
}

    .jinline-input:focus {
        border-color: #185FA5;
        box-shadow: 0 0 0 2px rgba(24,95,165,.12);
    }

/*  Botones OK / Cancelar inline */
.jbtn-ok {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 6px;
    border: none;
    color: #fff;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
}

.jbtn-verde {
    background: #639922;
}

    .jbtn-verde:hover {
        background: #527d1b;
    }

.jbtn-azul {
    background: #185FA5;
}

    .jbtn-azul:hover {
        background: #0c447c;
    }

.jbtn-ambar {
    background: #BA7517;
}

    .jbtn-ambar:hover {
        background: #9a600f;
    }

.jbtn-cancel {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    border: 0.5px solid #d0d0d0;
    background: none;
    color: #888;
    cursor: pointer;
}

    .jbtn-cancel:hover {
        background: #f5f5f5;
    }

/*  Tipo de suplente (Temporal / Permanente) */
.jsup-tipo-opts {
    display: flex;
    gap: 4px;
}

.jsup-tipo-btn {
    font-size: 10px;
    padding: 2px 9px;
    border-radius: 99px;
    border: 0.5px solid #d0d0d0;
    background: none;
    color: #888;
    cursor: pointer;
    transition: background .12s, color .12s;
}

    .jsup-tipo-btn.active {
        background: #FAEEDA;
        color: #854F0B;
        border-color: #FAC775;
    }

/*  Leyenda en footer del modal */
.jerarquia-leyenda {
    display: flex;
    gap: 12px;
}

.jleg {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #888;
}

.jleg-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ruser-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rfield-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rfield-label {
    font-weight: 600;
    white-space: nowrap;
}

.rfield-value {
    color: #555;
}

/* ReqItem */
.req-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #888;
    transition: color 0.2s;
}

    .req-item.ok {
        color: #1a7f5a;
    }

    .req-item.fail {
        color: #c0392b;
    }

.req-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ccc;
    flex-shrink: 0;
    transition: background 0.2s;
}

.req-item.ok .req-dot {
    background: #1a7f5a;
}

.req-item.fail .req-dot {
    background: #c0392b;
}

.pw-requirements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    margin-top: 4px;
}

.texto-resumen {
    font-style: normal;
    color: black;
    font-size: 12px;
}

/*revisar si no afecta en otro lado*/
/*.modal-card-wide {
    min-width: 700px;
    max-width: 900px;
    width: 90%;
}

.modal-body-horizontal {
    display: flex;
    flex-direction: row;
    gap: 0;
    padding: 16px 0;
    min-height: 200px;
}

.modal-col {
    flex: 1;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-col-title {
    font-weight: 700;
    font-size: 13px;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 4px;
}

.modal-col-divider {
    width: 1px;
    background: #e2e8f0;
    margin: 8px 0;
    flex-shrink: 0;
}
.modal-card-wide {*/
    /* Quita el min-width fijo */
    /*max-width: 900px;
    width: fit-content;*/ /* se ajusta al contenido */
    /*min-width: 320px;*/ /* mínimo razonable */
/*}
.modal-col {
    flex: 0 1 auto;*/ /* no crece, se ajusta al contenido */
    /*min-width: 240px;*/ /* ancho mínimo por columna */
    /*max-width: 280px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-body-horizontal {
    display: flex;
    flex-direction: row;
    gap: 0;
    padding: 16px 0;
    justify-content: flex-start;*/ /* alinea a la izquierda */
/*}*/


/* Modal árbol v2 */
.modal-card-v2 {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    width: 380px;
    overflow: visible;
    transition: width 0.25s ease;
    height: fit-content; 
}

.modal-card-v2--expanded {
    width: 720px;
}

.modal-body-v2 {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-body-v2--expanded {
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
    padding: 16px 0;
}
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center; /* <-- debe ser center, no stretch */
    justify-content: center;
    z-index: 1000;
}
/* Columna izquierda — info del usuario */
.mv2-col-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 20px;
    flex: 0 0 340px;
}

/* Separador vertical */
.mv2-col-divider {
    width: 1px;
    background: #e2e8f0;
    align-self: stretch;
    flex-shrink: 0;
}

/* Columna derecha — buscadores */
.mv2-col-edit {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 20px;
    flex: 1;
    min-width: 0;
}

/* Tarjeta de usuario/suplente */
.mv2-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
}

.mv2-card-suplente {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.mv2-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    text-transform: uppercase;
}

.mv2-avatar-user {
    background: #dbeafe;
    color: #1d4ed8;
}

.mv2-avatar-sup {
    background: #dcfce7;
    color: #15803d;
}

.mv2-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.mv2-sup-label {
    font-size: 10px;
    font-weight: 600;
    color: #15803d;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.mv2-card-name {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mv2-card-sub {
    font-size: 12px;
    color: #64748b;
}

.mv2-card-dept {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mv2-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.mv2-tag {
    font-size: 11px;
    background: #e2e8f0;
    color: #475569;
    padding: 2px 8px;
    border-radius: 999px;
}

.mv2-search-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mv2-search-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.modal-card-v2--expanded {
    width: 950px; /* más ancho para 3 columnas */
}

.mv2-col-alcance {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 20px;
    flex: 0 0 300px;
    /*flex: 0 0 220px;*/
}