:root {
    /* Colores Primarios */
    --color-success  : #00bf86;
    --color-primary  : #00c0ef;
    --color-secondary: #007bff;
    --color-highlight: #ff761b;
    /* --color-primary  : #2d96ff; */

    /* Colores de Fondo */
    --color-bg-light    : #fff;
    --color-bg-grey     : #f5f5f5;
    --color-bg-dark-grey: #e0e0e0;
    --color-bg-disabled : #f0f0f0;

    /* Colores de Texto */
    --color-text-dark       : #000;
    --color-text-light      : #495057;
    --color-text-link       : #007bff;
    --color-text-link-hover : #0056b3;
    --color-text-link-active: #003f7f;

    /* Colores de Bordes */
    --color-border          : rgba(0, 0, 0, 0.15);
    --color-border-secondary: #d1d1d1;

    /* Colores de Toast */
    --color-toast-success-bg    : #D4EDDA;
    --color-toast-success-border: #C3E6CB;
    --color-toast-success-text  : #155724;
    --color-toast-error-bg      : #F8D7DA;
    --color-toast-error-border  : #F5C6CB;

    /* -------------------------- Border radius global -------------------------- */
    --border-radius-global: 1.5rem;
    --border-radius-table : 10px ;
}
.outer{
    margin-bottom: 3rem;
}


/* -------------------------------------------------------------------------- */
/*                                   Labels                                   */
/* -------------------------------------------------------------------------- */
label{
    font-size: 1rem;
}

/* -------------------------------------------------------------------------- */
/*                                   Margins                                  */
/* -------------------------------------------------------------------------- */
.ms-4{
    margin-left: 1.4rem;
}
.mt-10{
    margin-top: 5rem;
}
.inner{
    min-height: 90vh;
}

/* -------------------------------------------------------------------------- */
/*                                Welcome page                                */
/* -------------------------------------------------------------------------- */
.welcome-container {
    display         : flex;
    justify-content : center;
    align-items     : center;
    height          : 93vh;
    background-color: var(--color-bg-light);
    text-align      : center;
    border-radius   : 20px;
}
.welcome-text {
    max-width: 600px;
}

/* -------------------------------------------------------------------------- */
/*                                    Menu                                    */
/* -------------------------------------------------------------------------- */
.menu_scroll{
    min-height: 100vh;
}

.no-transition {
    transition: none !important;
}

#toggleButton:hover {
    background-color: #0056b3;
}

.hidden-menu #left {
    width: 0;
}

.hidden-menu #content {
    margin-left: 0;
}

.hidden-menu #toggleButton {
    left: 2px;
}

#toggleButton {
    display         : flex;
    align-items     : center;
    justify-content : center;
    position        : absolute;
    left            : 250px;
    top             : 400px;
    width           : 20px;
    height          : 50px;
    background-color: #007bff;
    color           : white;
    border-top-right-radius: var(--border-radius-global);
    border-bottom-right-radius: var(--border-radius-global);
    cursor          : pointer;
    box-shadow      : 0px 4px 8px rgba(0, 0, 0, 0.2);
    transition      : left 0.3s ease;
    z-index         : 999;
}

/* -------------------------------------------------------------------------- */
/*                              Mobile Menu Fixes                            */
/* -------------------------------------------------------------------------- */

/* Estilos específicos para dispositivos móviles */
@media (max-width: 767px) {
    /* Asegurar que el menú sea visible cuando está abierto en móviles */
    body.sidebar-left-opened #left {
        left: 0 !important;
        height: 100vh !important;
        width: 240px !important;
        position: fixed !important;
        z-index: 1050 !important;
        overflow-y: auto !important;
        background-color: #fff !important;
        box-shadow: 0 10px 8px 3px #ccc !important;
    }

    /* El toggle button mantiene su posición original en móviles también */
    #toggleButton {
        position: absolute !important;
        left: 250px !important;
        top: 400px !important;
        z-index: 1051 !important;
    }

    /* Cuando está oculto en móviles */
    .hidden-menu #toggleButton {
        left: 2px !important;
    }

    /* Overlay para cerrar el menú en móviles */
    body.sidebar-left-opened::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        display: block;
    }

    /* Asegurar que el contenido principal no se desplace */
    body.sidebar-left-opened #content {
        margin-left: 0 !important;
    }

    /* Ocultar completamente el menú cuando está cerrado en móviles */
    #left {
        left: -250px !important;
        transition: left 0.3s ease !important;
    }

    /* Ajustar el wrapper para móviles */
    .wrapper {
        margin-left: 0 !important;
    }
}

/* Estilos para tablets y desktop */
@media (min-width: 768px) {
    /* Restaurar comportamiento de desktop */
    body.sidebar-left-opened #left {
        left: 0;
        height: auto;
        position: relative;
    }

    /* Toggle button mantiene su posición original en desktop */
    #toggleButton {
        position: absolute !important;
        left: 250px !important;
        top: 400px !important;
        z-index: 999 !important;
    }

    /* Cuando está oculto en desktop */
    .hidden-menu #toggleButton {
        left: 2px !important;
    }

    /* No mostrar overlay en desktop */
    body.sidebar-left-opened::before {
        display: none !important;
    }

    /* Asegurar que no se apliquen estilos de móvil en desktop */
    body.sidebar-left-opened #toggleButton {
        left: 250px !important;
    }
}


/* -------------------------------------------------------------------------- */
/*                                   Images                                   */
/* -------------------------------------------------------------------------- */
#img-nav{
    width: 60%;
    height: auto;
}

.profile-image {
    width        : 50px;
    height       : 50px;
    border-radius: 50%;
    object-fit   : cover;
    border       : 2px solid var(--color-border-secondary);
}

.profile-image-md {
    width        : 80px;
    height       : 80px;
    border-radius: 50%;
    object-fit   : cover;
    border       : 2px solid var(--color-border-secondary);
}


.img-profile-r{
    border-radius: var(--border-radius-global);
}

/* -------------------------------------------------------------------------- */
/*                                    Texts                                   */
/* -------------------------------------------------------------------------- */
.fs-4{
    font-size: 1.4rem;
}
.fs-3{
    font-size: 1.3rem;
}
.fs-2{
    font-size: 1.2rem;
}
.text-end{
    text-align: right;
}
.text-center{
    text-align: center;
}

.text-dark{
    color: #000;
}
.vertical-text {
    writing-mode: vertical-rl;     /* Hace que el texto esté en modo vertical */
    transform   : rotate(180deg);  /* Gira el texto para que se lea de arriba hacia abajo */
}



/* -------------------------------------------------------------------------- */
/*                                 Background                                 */
/* -------------------------------------------------------------------------- */
.bg-white{
    background-color: var(--color-bg-light);
}
.bg-grey {
    background: linear-gradient(to right, var(--color-bg-grey), var(--color-bg-dark-grey));
}
.bg-disabled{
    background-color: var(--color-bg-disabled);
    color           : #a0a0a0;
    opacity         : 0.6;
}

.bg-primary{
    background-color: #2d96ff;
}
.bg-purple{
    background-color: #c080c0;
    color           : white
}

.table-light tr{
    background-color: #ffffff;
    /* color           : #495057; */
    border-color    : #e9ecef;
}

/* -------------------------------------------------------------------------- */
/*                                    Cards                                   */
/* -------------------------------------------------------------------------- */

.card-full{
    min-height: 90vh;
}
.card-md{
    min-height: 300px;
}

.card-scrollable-300 {
    max-height: 300px; /* Ajusta la altura máxima según sea necesario */
    overflow-y: auto;
    overflow-x: none;
}

.card {
    background-color: #ffffff;
    border-radius   : var(--border-radius-global) !important;
    box-shadow      : 0 10px 20px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1);
    transition      : transform 0.3s ease,            box-shadow 0.3s ease;
    padding-bottom  : 20px;
    overflow        : visible;
    margin          : 10px 0px;
}

.card-header {
    border-top             : 5px solid #d2d21a;
    background             : #FFF;
    border-bottom          : none;
    padding                : 15px 10px !important;
    margin-top             : -5px;
    position               : relative;
    border-top-right-radius: var(--border-radius-global) !important;
    border-top-left-radius : var(--border-radius-global) !important;
}

.card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1); /* Sombras suaves */
}


/* -------------------------------------------------------------------------- */
/*                                   Inputs                                   */
/* -------------------------------------------------------------------------- */
.form-control{
    border-radius: var(--border-radius-global) !important;
    padding      : 7px 15px !important;
}

.telefono {
    max-width    : 120px;     /* Ajusta este valor según tus necesidades */
    white-space  : wrap;
    overflow     : hidden;
    text-overflow: ellipsis;
    height       : 25px;      /* Ajusta la altura según tus preferencias */
    line-height  : 25px;      /* Asegura que el texto esté centrado verticalmente */
    padding      : 0 5px;
}


.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-upload-wrapper input[type=file] {
    position: absolute;
    left: -9999px;
}

.file-upload-btn {
    display         : inline-block;
    padding         : 5px 20px;
    cursor          : pointer;
    border-radius   : var(--border-radius-global);
    background-color: #007bff;
    color           : white;
    border          : none;
    width           : 100%;
    text-align      : center;
    transition      : background-color 0.3s;
}

.file-upload-btn:hover {
    background-color: #0056b3;
}

.file-upload-btn i {
    margin-right: 8px;
}

.file-name-display {
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
    min-height: 18px;
}

.file-name-display.has-file {
    color: #28a745;
    font-weight: 500;
}
/* -------------------------------------------------------------------------- */
/*                                Inputs chosen                               */
/* -------------------------------------------------------------------------- */

.chosen-container.chosen-container-active {
    z-index: 1050 !important;
}

.chosen-container .chosen-drop {
    z-index         : 1051 !important;
    position        : absolute !important;
    background-color: #fff !important;
    border          : 1px solid #ccc !important;
    box-shadow      : 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}
.chosen-container-single .chosen-single {
    position: relative;
    z-index : 1;
}

.chosen-container {
    font-size: 1rem !important;
    display  : block !important;
    width    : 100% !important;
    border-radius   : var(--border-radius-global) !important;
}

.search-field .default{
    width      : 100% !important;
    color      : #d1d1d1;
    font-weight: 400;

}

.chosen-container .chosen-single {
    padding         : 0.5rem 0.75rem !important;
    font-size       : 1rem !important;
    line-height     : 1.25 !important;
    color           : #495057 !important;
    background-color: #fff !important;
    background-image: none !important;
    background-clip : padding-box !important;
    border          : 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius   : var(--border-radius-global) !important;
    height          : calc(2.25rem + 2px) !important;
    transition      : border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s !important;
    box-shadow      : none !important;
}
.chosen-choices{
    padding         : 0.2rem 0.5rem !important;
}
.chosen-container-active .chosen-choices {
    color           : #495057 !important;
    background-color: #fff !important;
    border-color    : #70e3ff !important;
    outline         : none !important;
    box-shadow      : none !important;
}

.chosen-container-multi .chosen-choices {
    border          : 1px solid #d9d9d9 !important;
    background-image: none !important;
    border-radius   : var(--border-radius-global) !important;
}

.chosen-container .chosen-results li.highlighted {
    background-color: #f0f0f0 !important;
    background-image: none !important;
    color           : #333 !important;
}

.chosen-results .result-selected {
    background-color: #e0e0e0 !important;
    color           : #999999 !important;
    cursor          : not-allowed !important;
    text-decoration : line-through !important;
    opacity         : 0.6 !important;
}

.chosen-container-multi .chosen-choices li.search-choice {
    border-radius   : var(--border-radius-global) !important;
    background-color: var(--color-primary-light) !important;
    color           : var( --color-text-light ) !important;
    opacity         : 0.9 !important;
    background-image: none !important;
    box-shadow      : 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    font-weight     : 500 !important;
    max-width       : calc(100% - 1rem) !important;
    transition      : all 0.3s ease-in-out !important;
}

.chosen-search input{
    border-radius   : var(--border-radius-global) !important;
    padding         : 0.5rem 0.75rem !important;
}

/* -------------------------------------------------------------------------- */
/*                                   Switch                                   */
/* -------------------------------------------------------------------------- */
.switch {
    position: relative;
    display : inline-block;
    width   : 40px;          /* Ajusta el ancho según sea necesario */
    height  : 20px;          /* Reducimos la altura a 20px */
    cursor  : pointer;
}

.switch input {
    opacity: 0;
    width  : 0;
    height : 0;
}

.lever {
    position        : absolute;
    top             : 0;
    left            : 0;
    right           : 0;
    bottom          : 0;
    background-color: #ccc;
    border-radius   : 20px;      /* Borde redondeado coincide con la nueva altura */
    transition      : 0.4s;
}

.lever:before {
    position        : absolute;
    content         : "";
    height          : 16px;      /* Ajustamos el tamaño del círculo */
    width           : 16px;      /* Ajustamos el tamaño del círculo */
    left            : 2px;
    bottom          : 2px;
    background-color: white;
    border-radius   : 50%;
    transition      : 0.4s;
}

input:checked + .lever {
    background-color: var(--color-primary);
}

input:checked + .lever:before {
    transform: translateX(20px);
}

/* -------------------------------------------------------------------------- */
/*                                   Buttons                                  */
/* -------------------------------------------------------------------------- */
/* Estilos para el botón del acordeón */
.btn-toggle-accordion {
    width          : 36px;
    height         : 36px;
    border-radius  : 50%;
    background     : #f1f1f1;
    display        : inline-flex;
    justify-content: center;
    align-items    : center;
    text-decoration: none;
    color          : #555;
    transition     : background-color 0.2s ease;
    padding        : 0;
}

/* Efecto visual al pasar el mouse por encima */
.btn-toggle-accordion:hover {
    background: #e0e0e0; /* Se oscurece un poco al pasar el mouse */
}

/* Regla para la animación suave del ícono (sin cambios) */
.btn-toggle-accordion .fa-chevron-down {
    transition: transform 0.3s ease-in-out;
}

/* Regla que se aplica CUANDO el acordeón está ABIERTO (sin cambios) */
.btn-toggle-accordion:not(.collapsed) .fa-chevron-down {
    transform: rotate(180deg);
}

.btn-outline-light {
    color           : #f8f9fa;
    border-color    : #ebebeb;
    background-color: transparent;
    border-width    : 2px;

}

.btn-outline-light:hover {
    color           : #212529;
    background-color: #f8f9fa;
    border-color    : #ebebeb;
    border-width    : 2px;

}



.btn{
    border-radius   : var(--border-radius-global) !important;
}

.btn-primary {
    color           : #fff;
    background-color: #2d96ff;
    border-color    : #2d96ff;
}

.btn-purple{
    color           : #fff;
    background-color: #766780;
    border-color    : #766780;
}

.btn-purple:hover{
    color           : #fff;
    background-color: #5a2a7a;
    border-color    : #5a2a7a;
}


/* -------------------------------------------------------------------------- */
/*                                   Modals                                   */
/* -------------------------------------------------------------------------- */
.modal-xl {
    max-width: 70% !important;
}

.modal-xxl {
    max-width: 90% !important;
}

.modal-content{
    border-radius   : var(--border-radius-global) !important;
}

.modal-footer{
    /* margin: .6rem .7rem ; */
    padding: .5rem .8rem;
}

.modal-dialog-centered {
    margin   : auto;
    transform: translate(0, -70%);
    top      : 30%;
    position : relative;
}
@media (max-width: 767.98px) {
    .modal-xl, .modal-lg {
        max-width: 95% !important;
        margin: 0.5rem auto;
    }
    
    .modal-body {
        padding: 1rem 0.75rem;
    }
    
    .row > [class*="col-"] {
        margin-bottom: 0.75rem;
    }
    
    .file-upload-wrapper {
        margin-bottom: 0.5rem;
    }
    
    .form-control, .chosen-container {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .modal-header h4 {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .alert {
        font-size: 0.85rem;
        padding: 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .modal-footer {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin: 0;
    }
}


/* -------------------------------------------------------------------------- */
/*                                    Toast                                   */
/* -------------------------------------------------------------------------- */
.toast-success {
    position        : fixed;
    top             : 20px;
    right           : 20px;
    transform       : none;
    width           : 500px;
    z-index         : 10000;
    animation       : fadeInOut 3s forwards;
    background-color: #D4EDDA;
    border          : 1px solid #C3E6CB;
    color           : #155724;
    padding         : 10px;
    border-radius   : var(--border-radius-global) !important;
    box-shadow      : 0 0 10px rgba(0, 0, 0, 0.1);
}

.toast-error{
    position        : fixed;
    top             : 20px;
    right           : 20px;
    transform       : none;
    width           : 500px;
    z-index         : 10000;
    animation       : fadeInOut 3s forwards;
    background-color: #F8D7DA;
    border          : 1px solid #F5C6CB;
    padding         : 10px;
    border-radius   : var(--border-radius-global) !important;
    box-shadow      : 0 0 10px rgba(0, 0, 0, 0.1);
}

.toast-info {
    position        : fixed;
    top             : 20px;
    right           : 20px;
    width           : 500px;
    z-index         : 10000;
    animation       : fadeInOut 3s forwards;
    padding         : 10px;
    border-radius   : var(--border-radius-global) !important;
    box-shadow      : 0 0 10px rgba(0, 0, 0, 0.1);
    background-color: #E6F4FF;
    color           : #004085;
}


/* -------------------------------------------------------------------------- */
/*                                   Canvas                                   */
/* -------------------------------------------------------------------------- */

/* Fondo semitransparente detrás del canvas */
.canvas-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
    transition: opacity 0.3s ease;
}

body.offcanvas-panel-open {
    overflow: hidden;
}

.canvas-backdrop.show {
    display: block;
    opacity: 1;
}
.canvas-md{
    width: 50% !important;
}

.canvas-xl{
    width: 80% !important;
}
.canvas-full{
    width: 90% !important;
}
.canvas {
    position        : fixed;
    top             : 0;
    right           : -100%;
    width           : 500px;
    height          : 100%;
    background-color: #fff;
    box-shadow      : -2px 0 5px rgba(0, 0, 0, 0.1);
    transition      : right 0.3s ease;
    z-index         : 1050;
    overflow-y      : auto;
    border-radius   : var(--border-radius-global) !important;
}

.canvas.show {
    right: 0;
}

.canvas-header {
    display         : flex;
    justify-content : space-between;
    align-items     : center;
    padding         : 15px;
    border-bottom   : 1px solid #e5e5e5;
    background-color: #f8f9fa;
}

.canvas-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.canvas-body {
    padding: 15px;
}

.canvas-section {
    margin-bottom: 20px;
}

.canvas-section h5 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.canvas-section p {
    margin-bottom: 0;
}


/* -------------------------------------------------------------------------- */
/*                                   Badgets                                  */
/* -------------------------------------------------------------------------- */
.number-indicator {
    display        : inline-flex;
    justify-content: center;
    align-items    : center;
    border-radius  : 50%;
    height         : 40px;
    width          : 40px;
    font-size      : 1rem;
    margin-right   : 10px;
    vertical-align : middle;
    border         : 1px solid #d1d1d1;
}

/* -------------------------------------------------------------------------- */
/*                                    fonts                                   */
/* -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6{
    color: #ff761b;
}
.uppercase {
    text-transform: uppercase;
}
.fs-1{
    font-size: 1.5rem;
    color    : #ff761b;
}
.fs-2{
    font-size: 1.4rem;
    color    : #ff761b;
}

/* -------------------------------------------------------------------------- */
/*                                    links                                   */
/* -------------------------------------------------------------------------- */
.text-white{
    color: var(--color-bg-light) !important;
}
.text-link {
    color: #007bff;
    text-decoration: none;
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
    cursor: pointer;
}

.text-link::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #007bff;
    visibility: hidden;
    transform: scaleX(0);
    transition: all 0.3s ease-in-out;
}

.text-link:hover {
    color: #0056b3;
}

.text-link:hover::before {
    visibility: visible;
    transform: scaleX(1);
}

.text-link:active {
    color: #003f7f;
}

.text-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5);
}

.text-link-icon {
    margin-right: 5px;
    vertical-align: middle;
}

.text-link-with-icon {
    display: inline-flex;
    align-items: center;
}

.text-link-with-icon .text-link-icon {
    transition: transform 0.3s ease;
}

.text-link-with-icon:hover .text-link-icon {
    transform: translateX(5px);
}

/* -------------------------------------------------------------------------- */
/*                                   Tables                                   */
/* -------------------------------------------------------------------------- */

.equal-width-table th,
.equal-width-table td {
    width      : 12.5%;   /* 100% dividido entre 8 columnas = 12.5% */
    text-align : center;  /* Opcional: Centrar el texto */
    white-space: nowrap;  /* Opcional: Evita el salto de línea en celdas */
}


.custom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.custom-buttons {
    text-align: center;
    margin-bottom: 15px;
}

.custom-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}


.table-container-sm{
    height: 300px;
    overflow-y: auto;
}


/* Estilos generales para la tabla */
.table {
    width: 100%;
    color: #333;
}

.table thead {
    background-color: #f7f7f774;
    font-weight: bold;
}

.table td {
    padding-right  : 5px !important;
    padding-top   : 2px !important;
    padding-bottom: 0px !important;
}

.table th {
    background-color: #e0e0e0;
    color           : #666;
    border-radius   : var(--border-radius-table) !important;
    padding-top     : 2px;
    padding-bottom  : 2px;
    padding-left    : 10px;
    padding-right   : 7px;
}

.table tbody tr {
    transition: background-color 0.3s ease, border-left 0.3s ease;
}

.table tbody tr:hover {
    background-color: #f1f1f1;
}

.pagination li {
    /* border-radius   : var(--border-radius-global) !important; */
    border-radius: .5rem !important;
    padding      : 5px !important;
    margin       : 0.5px;
}

/* ------------------------------- Sub-tables ------------------------------- */
.table .sub-table {
    background-color: #f8f9fa;
    border          : 1px solid #dee2e6;
    margin          : 5px 0 5px 20px;
}

.table .sub-table thead {
    background-color: #4a6baf;
    color: white;
    margin          : 5px 0 5px 20px;
}

.table .sub-table th {
    padding: 4px 8px; /* Padding reducido */
    font-weight: 500;
}

.table .sub-table td {
    padding: 3px 8px; /* Padding reducido */
    line-height: 1.2; /* Menor altura de línea */
}

/* Efectos visuales para diferenciar */
.table .sub-table {
    position: relative;
}

.table .sub-table::before {
    content         : "";
    position        : absolute;
    left            : -12px;
    top             : 0;
    bottom          : 0;
    width           : 2px;
    opacity         : 0.3;
}

/* Efecto hover más sutil en subtables */
.table .sub-table tbody tr:hover {
    background-color: #e9ecef;
}

/* Compactar aún más las celdas */
.table .sub-table td, 
.table .sub-table th {
    white-space: nowrap; /* Evita saltos de línea */
}

.table.table-sm > thead > tr > th,
.table.table-sm > tbody > tr > th,
.table.table-sm > tfoot > tr > th,
.table.table-sm > thead > tr > td,
.table.table-sm > tbody > tr > td,
.table.table-sm > tfoot > tr > td {
    padding    : 0.25rem 0.5rem;
    font-size  : 1em;
    line-height: 1.2;
}

.table.table-sm .sub-table {
    margin: 3px 0 3px 15px;
}
.table.table-sm .sub-table th {
    padding: 2px 4px;
    font-size: 0.95em;
}
.table.table-sm .sub-table td {
    padding: 1px 4px;
    font-size: 0.95em;
    line-height: 1.1;
}

/* -------------------------------------------------------------------------- */
/*                                 Datatables                                 */
/* -------------------------------------------------------------------------- */
.dataTables_filter{
    width     : 100% !important;
    display   : inline-block !important;
    text-align: right !important;
}

.dataTables_filter label{
    display: inline-block;
}

/* -------------------------------------------------------------------------- */
/*                                    icons                                   */
/* -------------------------------------------------------------------------- */
.fa-icon-img{
    margin-right: 3px;
    width: 20px;
    height: auto;
}
.fa-x2{
    font-size: 1.2rem !important;
}

/* -------------------------------------------------------------------------- */
/*                                 organigrama                                */
/* -------------------------------------------------------------------------- */
#organigrama {
    width      : 100%;
    max-width  : 100%;
    overflow-x : auto;
    white-space: nowrap;
    padding    : 20px;
}

.google-visualization-orgchart-node {
    width         : auto !important;
    white-space   : normal !important;
    max-width     : 100% !important;
    word-wrap     : break-word !important;
    text-align    : center !important;
    vertical-align: middle !important;
    font-family   : 'Arial', sans-serif !important;
    cursor        : default !important;
    border        : none !important;
    border-radius : .8rem !important;
    background    : var(--color-primary) !important;
    color         : #FFF !important;
    font-size     : 1rem !important;
    padding       : 10px !important;
    box-shadow    : 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    transition    : background-color 0.3s ease;
}

/* Efecto hover para los nodos */
.google-visualization-orgchart-node:hover {
    background-color: var(--color-toast-success-text) !important;
    color           : #FFF !important;
}

/* Líneas entre nodos, estilo limpio */
.google-visualization-orgchart-lineleft,
.google-visualization-orgchart-lineright,
.google-visualization-orgchart-linebottom {
    border-width : 3px !important;
    border-color : var(--color-toast-success-text) !important;
    border-radius: .5rem !important;
}

/* Estilo para los títulos en cursiva (los puestos de trabajo) */
.google-visualization-orgchart-node div[style*="font-style: italic"] {
    color     : #f0f0f0 !important;
    font-size : 0.85rem !important;
    font-style: italic !important;
}


/* -------------------------------------------------------------------------- */
/*                                    Chips                                   */
/* -------------------------------------------------------------------------- */
.chip{
    width        : 100%;
    height       : 30px;
    border-radius: var(--border-radius-global);
    padding      : 5px;
}

.chip-inline{
    display      : inline-block;
    padding      : 2px 8px;
    border-radius: var(--border-radius-global);
    font-size    : .9rem;
}

.chip-compact {
    /* Estilos base del botón */
    border     : none;
    display    : inline-flex;
    align-items: center;
    
    /* Estilos visuales compactos */
    background-color: var(--color-primary);
    color           : white;
    padding         : 2px 5px 2px 8px;
    border-radius   : var(--border-radius-global);
    font-size       : 0.9rem;
    font-family     : inherit;
    margin          : 2px;
    cursor          : pointer;
    transition      : all 0.2s ease-in-out;
}

/* Efecto hover sutil para no ocupar más espacio */
.chip-compact:hover {
    background-color: var(--color-primary);
    transform       : translateY(-1px);
    box-shadow      : 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Contenedor del ícono, más pequeño */
.chip-compact .icon-container {
    display        : flex;
    align-items    : center;
    justify-content: center;
    width          : 20px;
    height         : 20px;
    margin-left    : 5px;
    border-radius  : 50%;
    transition     : background-color 0.2s ease;
}

/* Efecto hover en el ícono */
.chip-compact:hover .icon-container {
    background-color: rgba(117, 117, 117, 0.2);
}

/* Ícono más pequeño */
.chip-compact .fa {
    font-size: 12px;
    color    : white;
}


/* -------------------------------------------------------------------------- */
/*                                Alings objets                               */
/* -------------------------------------------------------------------------- */
.float-end {
    float: right;
    /* text-align: right; */
}

.float-start {
    float: left;
    /* text-align: right; */
}


/* -------------------------------------------------------------------------- */
/*                               Items Trackings                              */
/* -------------------------------------------------------------------------- */
.locbar {
    border-radius:5px;
    background-color: #ffffff;
    height:35px;
    padding-left:10px;
    text-align: center;
}

.item_tracking {
    float:left;
    display:inline-block;
    line-height:35px;
    padding-left:10px;
    font-family:Arial;
    width:15%;
}

.done{
    background-color: #06b415;
    color:white;
}

.undone{
    background-color: #dedede;
    color:black;
}

.current{
    background-color: #0680b4;
    color:white !important;
}

.arrow_tracking {
    float    : left;
    position : relative;
    transform: rotate(-45deg) skew(-15deg, -15deg);
    display  : inline-block;
    width    : 19px;
    height   : 19px;
    top      : 8px;
    left     : -10px;
}


/* -------------------------------------------------------------------------- */
/*                                   Alerts                                   */
/* -------------------------------------------------------------------------- */
.alert-float {
    padding: 5px 10px; /* Reducir el padding */
    font-size: 0.9em; /* Tamaño de fuente más pequeño */
    margin-bottom: 5px; /* Espacio reducido entre alertas */
}

/* Animación para aparecer y desaparecer */
@keyframes fadeInOut {
    0% {
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Estilo para el cuerpo del toast */
.toast-body {
    padding: 10px;
}



/* =================================================================== */
/*   ESTILOS ESPECÍFICOS PARA LA TARJETA DE PRODUCTO REFINADA         */
/* =================================================================== */

/* Contenedor principal de la tarjeta */
.prod-card-v3 {
    border-radius   : var(--border-radius-global, 6px);
    background-color: #fff;
    box-shadow      : 0 2px 4px rgba(0,0,0,0.05);
    transition      : all 0.2s ease-in-out;
    height          : 100%;
    display         : flex;
    border-left     : 5px solid;
}
.prod-card-v3:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transform: scale(0.98);     
}

/* Divisor de Fecha */
.prod-date-divider {
    padding         : 8px 15px;
    background-color: #fff;
    border-radius   : var(--border-radius-global, 6px);
    display         : inline-block;
    box-shadow      : 0 2px 4px rgba(0,0,0,0.05);
}

/* Contenido interno, también es un contenedor flex para que las acciones se alineen */
.prod-card-content {
    padding        : 0.75rem 1rem;
    width          : 100%;
    display        : flex;
    flex-direction : column;
    justify-content: space-between;
}

/* Sección de información (la parte de arriba) */
.prod-info-section .prod-title {
    font-size  : 1.4rem;
    font-weight: 600;
    margin     : 0;
    line-height: 1.2;
}
.prod-info-section .prod-caducidad {
    font-size : 0.9rem;
    color     : #888;
    font-style: italic;
    white-space: nowrap;
    margin-left: 1rem;
}
.prod-info-grid {
    display              : grid;
    grid-template-columns: auto 1fr;
    gap                  : 0.25rem 0.75rem;
    font-size            : 0.9rem;
    margin-top           : 0.75rem;
    color                : #555;
}
.prod-info-grid .label {
    font-weight: 500;
    color: #888;
    text-align: right;
}

/* --- CAMBIOS PRINCIPALES AQUÍ --- */
@media (min-width: 992px) {
    .prod-info-grid {
        grid-template-columns: auto 1fr auto 1fr;
        gap: 0.25rem 1rem;
    }
    
    /* NUEVA CLASE para el elemento que debe ocupar todo el ancho */
    .prod-info-full-width {
        /* Le decimos que empiece en la columna 2 y termine en la última (-1) */
        grid-column: 2 / -1;
    }
}


/* Sección de acciones (la parte de abajo) */
.prod-actions-section {
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}
.prod-actions-section .btn {
    width: 100%;
    margin-bottom: 0.25rem;
}
.prod-actions-section .btn:last-child {
    margin-bottom: 0;
}