

/* ======================================================
   ESTILOS GENERALES
====================================================== */

.form-select,
.form-control {
    font-size: 14px;
}

/* ======================================================
   ESPECIALIDADES
====================================================== */

.especialidades-container {
    columns: 2;
    font-size: 13px;
}

/* ======================================================
   CARDS
====================================================== */

.card {
    border-radius: 14px;
    border: 1px solid #e9ecef;
    transition: box-shadow .2s ease;
}

.card:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.card.border-success {
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

/* ======================================================
   SELECTS CICLO Y FUERZA
====================================================== */

.dropdown-container {
    display: inline-block;
    margin-right: 30px;
}

.dropdown-container label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}

.custom-select {
    width: auto !important;
    min-width: 140px;
    max-width: 220px;
    display: inline-block;
    padding: 4px 28px 4px 10px;
    font-size: 14px;
}

.card-header .form-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 25px;
}

/* ======================================================
   TABLAS DINÁMICAS (PARRILLAS)
====================================================== */

.mi-tabla-estilo {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    font-size: 12px;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-collapse: collapse;
}

.mi-tabla-estilo th {
    background: #f8f9fa;
    font-weight: 600;
    text-align: center;
    padding: 6px;
}

.mi-tabla-estilo td {
    padding: 6px;
    text-align: center;
}

.mi-tabla-estilo td:first-child {
    text-align: left;
}

/* ======================================================
   SCROLL HORIZONTAL PROFESIONAL
====================================================== */

.tablas-container,
#contenedorTablas_resultado {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px;
    scroll-behavior: smooth;
}

.tablas-container::-webkit-scrollbar,
#contenedorTablas_resultado::-webkit-scrollbar {
    height: 8px;
}

.tablas-container::-webkit-scrollbar-thumb,
#contenedorTablas_resultado::-webkit-scrollbar-thumb {
    background: #c8c8c8;
    border-radius: 10px;
}

/* ======================================================
   TITULOS
====================================================== */

.titulo-contenedor h4 {
    background: #e9ecef;
    padding: 8px 14px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 16px;
    display: inline-block;
}

/* ======================================================
   TABLA CICLO ACTUAL (VERDE)
====================================================== */

#tablaActual {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    table-layout: auto;
}

#tablaActual th {
    background-color: #8FBC8F;
    color: #000;
    font-weight: 600;
    padding: 8px 12px;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

#tablaActual td {
    padding: 6px;
    text-align: center;
    border: 1px solid #e6e6e6;
}

#tablaActual tr:hover td {
    background-color: #f3faf3;
    transition: background-color .2s ease;
}

#tablaActual tr:last-child {
    background-color: #A7D7A7;
    font-weight: bold;
    border-top: 2px solid rgba(0,0,0,0.1);
}

/* ======================================================
   TABLA DIFERENCIA (AZUL)
====================================================== */

#tablaDiferencia {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    table-layout: auto;
}

#tablaDiferencia th {
    background-color: #67C5C0;
    color: #000;
    font-weight: 600;
    padding: 8px 12px;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

#tablaDiferencia td {
    padding: 6px;
    text-align: center;
    border: 1px solid #e6e6e6;
}

#tablaDiferencia tr:hover td {
    background-color: #f2fbfb;
    transition: background-color .2s ease;
}

#tablaDiferencia tr:last-child {
    background-color: #8EDFD9;
    font-weight: bold;
    border-top: 2px solid rgba(0,0,0,0.1);
}

/* ======================================================
   PARRILLAS RESULTADOS (CARDS HORIZONTALES)
====================================================== */

#contenedorTablas_resultado table {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-size: 12px;
    min-width: 180px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

#contenedorTablas_resultado td {
    padding: 4px 8px;
    text-align: center;
}

/* ======================================================
   BOTONES
====================================================== */

.btn {
    font-size: 13px;
}

/* ======================================================
   RESPONSIVE
====================================================== */

@media (max-width: 900px) {
    .especialidades-container {
        columns: 1;
    }

    .card-header .form-group {
        flex-direction: column;
        align-items: flex-start;
    }
}


/******** BOTONES PROFESIONALES ********/

.btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.btn-success {
    background: linear-gradient(135deg, #16a34a, #15803d);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}


/******** TABLA PROFESIONAL ********/

#usuarios {
    width: 85%;
    margin: 30px auto;
    background: white;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* Encabezado */
#usuarios thead {
    background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
    color: #ffffff;
}

#usuarios thead th {
    padding: 14px;
    font-weight: 600;
    text-align: center;
}

/* Filas */
#usuarios tbody tr {
    transition: all 0.2s ease;
}

#usuarios tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
}

/* Hover */
#usuarios tbody tr:hover {
    background-color: #f1f5f9;
    transform: scale(1.01);
}

/* Última fila sin borde */
#usuarios tbody tr:last-child td {
    border-bottom: none;
}


/* ======================================================
   🔧 ARREGLO PARA PARRILLAS QUE SE SALEN DEL MARCO
====================================================== */

#resultadosContainer_na,
#resultadosContainer_sem {

    display: flex;
    flex-wrap: nowrap;
    gap: 20px;

    overflow-x: auto;
    overflow-y: hidden;

    padding: 15px;

    border-radius: 12px;

    background: #f8f9fa;

    scroll-behavior: smooth;
}

/* Scroll bonito */

#resultadosContainer_na::-webkit-scrollbar,
#resultadosContainer_sem::-webkit-scrollbar {
    height: 8px;
}

#resultadosContainer_na::-webkit-scrollbar-thumb,
#resultadosContainer_sem::-webkit-scrollbar-thumb {
    background: #c8c8c8;
    border-radius: 10px;
}

/* Tablas dentro de parrillas */

#resultadosContainer_na table,
#resultadosContainer_sem table {

    min-width: 190px;

    border-radius: 12px;

    overflow: hidden;

    border: 1px solid #e5e5e5;

    background: #ffffff;

    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}



/* KPI DASHBOARD DE TERRITORIOS */

.kpi-card{

    min-width:180px;

    padding:12px 20px;

    border-radius:10px;

    background:linear-gradient(135deg,#1e3a8a,#2563eb);

    color:white;

    text-align:center;

    box-shadow:0 6px 18px rgba(0,0,0,0.15);

}

.kpi-title{
    font-size:13px;
}

.kpi-number{
    font-size:32px;
    font-weight:bold;
}


/************** TABLA MATERIALES ****************/

#tabla-materiales {
    font-size: 12px;
    border-collapse: separate;
    border-spacing: 0;
}

/* ===== ENCABEZADO ===== */

#tabla-materiales th {
    font-size: 12px;
    padding: 6px 8px;
    background: linear-gradient(180deg,#1e88e5,#1565c0);
    color: white;
    text-align: center;
    border-right: 1px solid #ffffff30;
    position: sticky;
    top: 0;
    z-index: 2;
}

/* ===== CELDAS ===== */

#tabla-materiales td {
    padding: 5px 8px;
    border-bottom: 1px solid #eeeeee;
    vertical-align: middle;
}

/* ===== FILAS ALTERNADAS ===== */

#tabla-materiales tbody tr:nth-child(even) {
    background-color: #f8fbff;
}

/* ===== HOVER ===== */

#tabla-materiales tbody tr:hover {
    background-color: #e3f2fd;
    transition: 0.2s;
}

/* ===== COLUMNAS NUMERICAS ===== */

#tabla-materiales td:nth-child(4),
#tabla-materiales td:nth-child(6),
#tabla-materiales td:nth-child(7),
#tabla-materiales td:nth-child(8),
#tabla-materiales td:nth-child(9),
#tabla-materiales td:nth-child(10){
    text-align: center;
    font-weight: 500;
}

/* ===== PRODUCTO A LA IZQUIERDA ===== */

#tabla-materiales th:nth-child(3),
#tabla-materiales td:nth-child(3) {
    text-align: left;
    white-space: nowrap;
}

/* ===== SCROLL TABLA ===== */

.table-responsive {
    max-height: 520px;
    overflow-y: auto;
    border-radius: 8px;
}

/* ===== CHECKBOX ===== */

#tabla-materiales input[type="checkbox"]{
    transform: scale(1.3);
    cursor: pointer;
    align-items: center;
}

/************** FILAS SELECCIONADAS **************/

.selected-row {
    background-color: #c8f7dc !important;
    font-weight: 600;
}

/* fila deshabilitada */

.fila-deshabilitada {
    background-color: #e0e0e0;
    opacity: .6;
}

/************** RESPONSIVE **************/

/* Select2 fix */
.select2-container {
    width: 100% !important;
}


.select2-container--default .select2-selection--multiple {
    min-height: 38px !important;
    border: 1px solid #a1ee62;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 4px;
}

/* Input interno */
.select2-search__field {
    margin-top: 2px !important;
}

/* Labels */
.form-label {
    font-size: 13px;
    font-weight: 600;
}


.table {
    font-size: 12px;
}

.table th {
    background-color: #1e3a8a;
    color: white;
    text-align: center;
}

.table td {
    text-align: center;
}

.card {
    border-radius: 14px;
    border: 1px solid #e9ecef;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
}


/*Estilo tabla de Contactos */
#tabla-darwin thead tr {
    background-color: #34c7d1 !important;
    color: white !important;
}

#tabla-darwin th,
#tabla-darwin td {
    text-align: center;
    font-size: 12px;
}


/* 🔥 MODAL COMPLETO */
.modal-content {
    height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-body {
    flex: 1;
    padding: 0 !important;
}

/* 🔥 CONTENEDOR TABLA */
.tabla-container {
    height: 100%;
    overflow: auto;
    background: white;
}

/* 🔥 TABLA */
#tbl-ver-materiales {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

/* 🔥 HEADER FIJO */
#tbl-ver-materiales thead th {
    position: sticky;
    top: 0;
    z-index: 20;
    background: linear-gradient(135deg, #34c7d1, #34c7d1);
    color: white;
    font-size: 11px;
    text-align: center;
    padding: 6px;
    border-bottom: 2px solid #34c7d1;
}

/* 🔥 CELDAS */
#tbl-ver-materiales tbody td {
    font-size: 11px;
    padding: 4px 6px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

/* 🔥 HOVER */
#tbl-ver-materiales tbody tr:hover {
    background-color: #f1f5f9;
}

/* 🔥 SCROLL BONITO */
.tabla-container::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.tabla-container::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 10px;
}

.tabla-container::-webkit-scrollbar-track {
    background: #f1f5f9;
}


