/* ===== VARIABLES CSS ===== */
:root{
    --inno-primary-light: #f8f8f8;
    --inno-primary-dark: #444444;
    --inno-secondary-light: #ccccccb6;
    --inno-secondary-dark: #d3d3d3;
    --inno-tertiary-light: #444444;
    --inno-tertiary-dark: #f8f8f8;
    --inno-dark: #000;
    --inno-light: #FFF;
    --inno-danger: #ff0000;
    --inno-success: #00ff00;
    --inno-warning: #ffcc00;
    --inno-info: #00ccff;
    --inno-empresa: #002F5F;
    --inno-empresa-secondary: #DBDBDB;
}

/* ===== CAMPOS DE ENTRADA (formularios, tablas DataTables, buscadores) ===== */
.form-control:not(.form-check-input):not(.form-control-color):not(.form-control-plaintext),
.form-select,
textarea.form-control,
input.ped-search {
    border: 1px solid #dee2e6 !important;
    border-radius: 16px !important;
    font-size: 0.95rem !important;
    background: #fff !important;
    color: #333 !important;
}
div.dt-container .dt-search input,
div.dt-container .dt-input {
    border: 1px solid #dee2e6 !important;
    border-radius: 16px !important;
    font-size: 0.95rem !important;
    background: #fff !important;
    color: #333 !important;
}

/* Título principal de página (dashboard, pedidos, empresa, perfil) */
.page-title-main, .page-title-dashboard {
    font-size: 1.6rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 1.2rem;
}

@supports not (color: color-mix(in srgb, black, white)) {
    .page-title-main {
        background: linear-gradient(90deg, rgba(0, 47, 95, 0.07) 0%, #fff 72%);
    }
}

/* Subtítulos de sección en el dashboard */
.dashboard-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1rem !important;
    padding: 0.35rem 0.65rem 0.35rem 0.75rem;
    border-left: 2px solid var(--inno-empresa);
    border-radius: 0 10px 10px 0;
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--inno-empresa) 7%, #fff) 0%,
        transparent 100%
    );
}

@supports not (color: color-mix(in srgb, black, white)) {
    .dashboard-section-title {
        background: linear-gradient(90deg, rgba(0, 47, 95, 0.06) 0%, transparent 100%);
    }
}

/* ===== ESTILOS BASE ===== */
.btn{
    font-size: 0.9rem !important;
}
.btn-outline-primary{
    border-color: var(--inno-empresa) !important;
    color: var(--inno-empresa) !important;
}
.btn-outline-primary:hover
,.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.disabled,
.btn-outline-primary:disabled
{
    border-color: var(--inno-empresa) !important;
    color: var(--inno-empresa) !important;
}

.btn-outline-primary:hover{
    background-color: var(--inno-empresa) !important;
    color: var(--inno-primary-light) !important;
}

.btn-outline-primary:focus{
    background-color: var(--inno-empresa) !important;
    color: var(--inno-primary-light) !important;
}

.btn-outline-primary:active{
    background-color: var(--inno-empresa) !important;
    color: var(--inno-primary-light) !important;
}

.btn-outline-primary.disabled{
    background-color: var(--inno-empresa) !important;
    color: var(--inno-primary-light) !important;
}

.btn-outline-primary:disabled{
    background-color: var(--inno-empresa) !important;
    color: var(--inno-primary-light) !important;
}

button .fas {margin-left: -2px !important;}

.btn-secondary{border-radius: 16px !important;}
.btn-primary{background-color: var(--inno-empresa) !important; border-color: var(--inno-empresa) !important;}
.row{
    margin: 0;
}

.row>*{
    padding-left: 2px;
    padding-right: 2px;
    gap: 2px;
}

.modal-header{padding: 10px !important;}
.modal-content{padding: 30px !important;}
.alert-info{background: transparent !important; border-color: var(--inno-empresa) !important; color: var(--inno-empresa) !important;}

@media (max-width: 480px) {
    .modal-content {
        padding: 0px !important;
    }
    
    /* Asegurar scroll táctil en móvil */
    .modal-body {
        -webkit-overflow-scrolling: touch !important;
        overflow-scrolling: touch !important;
        overflow-y: auto !important;
        max-height: 70vh !important;
    }
    
    /* Asegurar que los contenedores permitan scroll */
    .modal {
        -webkit-overflow-scrolling: touch !important;
        overflow-scrolling: touch !important;
    }
    
    /* Asegurar scroll en body y html */
    body, html {
        -webkit-overflow-scrolling: touch !important;
        overflow-scrolling: touch !important;
    }
    
    /* Asegurar que los contenedores principales permitan scroll */
    .container, .container-fluid {
        -webkit-overflow-scrolling: touch !important;
        overflow-scrolling: touch !important;
    }
}

/* ===== CONTROL DE SCROLL CON MODALES ===== */
/* Cuando hay un modal abierto, bloquear el scroll del body */
body.modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* Asegurar que el modal tenga su propio scroll */
.modal.show {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overflow-scrolling: touch !important;
}

/* Asegurar que el contenido del modal sea scrollable */
.modal.show .modal-body {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overflow-scrolling: touch !important;
    max-height: 70vh !important;
}

/* Para modales fullscreen en móvil */
.modal-fullscreen.show {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overflow-scrolling: touch !important;
}

.modal-fullscreen.show .modal-body {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overflow-scrolling: touch !important;
    max-height: calc(100vh - 120px) !important;
}

.menu a {
    cursor:pointer;
}
    
a{text-decoration: none !important;}

a:hover{
    color: var(--inno-tertiary-light);
}

/* ===== LAYOUT PRINCIPAL ===== */
.container {
    display: flex;
    height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.sidebar {
    width: 15%;
    overflow-y: auto;
}

.sidebar_mvl {
    display: none;
}

/* ===== MENÚ LATERAL ===== */
.sidebar-menu {
    list-style-type: none;
    padding: 0;
    width: 100%;
}

.nav-item {
    margin: 10px 0;
    margin-top: 6px;
}

.menu-btn {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: var(--inno-tertiary-light);
    padding: 10px;
    text-align: left;
    cursor: pointer;
    width: 100%;
}

.menu-title{
    margin-left: 10px;
}

.sidebar-menu .sub-menu{
    list-style: none;
    padding-left: 0;
}

.submenu-item {
    color: var(--inno-tertiary-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 8px;
    list-style-type: none;
    margin-left: 10px;
}

.sub-menu li:hover{
    background-color: var(--inno-secondary-light);
    border-radius: 16px;
}

.submenu-item i{
    padding-right: 8px;
}

.submenu-item span{
    font-size: 16px;
    font-weight: 500;
    color: var(--inno-empresa);
}

/* ===== AVATAR Y PERFIL ===== */
.avatar {
    width: 22px;
    height: 22px;
    border-radius: 16px;
    background-color: var(--inno-tertiary-light);
    color: var(--inno-primary-light);  
    font-size: 18px; 
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px; 
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
}

.user-initial {
    width: 32px;
    height: 32px;
    background-color: var(--inno-empresa);
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.user-name {
    color: black;
    font-weight: 500;
    font-size: 14px;
}

/* ===== PANEL PRINCIPAL ===== */
.main-panel {
    width: 85%;
    padding: 20px;
    overflow-y: auto;
}

/* ===== FORMULARIOS Y CONTROLES ===== */
select{
    font-size: 16px;
    padding: 8px 14px 8px 8px; 
    border-radius: 16px;
    border: 1px solid var(--inno-secondary-dark);
    background-color: var(--inno-secondary-light);
    color: var(--inno-tertiary-light);
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><polygon points="0,4 16,4 8,12" fill="var(--inno-tertiary-light)"/></svg>');
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 12px 12px; 
    padding-right: 30px;
}

.btn-search{
    font-size: 16px;
    padding: 8px 14px 8px 8px; 
    border-radius: 16px;
    border: 1px solid var(--inno-secondary-dark);
    background-color: var(--inno-secondary-light);
    color: var(--inno-tertiary-light);
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 30px;
}

select:focus {
    background-color: var(--inno-primary-light);
}

#datepicker {
    font-size: 16px;
    padding: 8px 14px 8px 8px;
    border-radius: 16px;
    border: 1px solid var(--inno-secondary-dark);
    background-color: var(--inno-secondary-light);
    color: var(--inno-tertiary-light);
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    appearance: none; 
    padding-right: 30px; 
}

#datepicker::-webkit-calendar-picker-indicator {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><polygon points="0,4 16,4 8,12" fill="var(--inno-tertiary-light)"/></svg>');
    background-position: center;
    background-repeat: no-repeat;
    background-size: 12px 12px;
    padding: 5px;
}

#datepicker:focus {
    background-color: var(--inno-primary-light);
}

input[type='text'], input[type='number']{
    font-size: 16px;
    padding: 8px 14px 8px 8px;
    border-radius: 16px;
    border: 1px solid var(--inno-secondary-dark);
    background-color: var(--inno-secondary-light);
    color: var(--inno-tertiary-light);
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* ===== NAVEGACIÓN ===== */
.menu.list-group {
    box-shadow: none;
    border-radius: 16px;
    overflow: visible;
    background-color: transparent;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.list-group-item {
    color: #000000;
    border: none;
    padding: 7px 15px;
    transition: all 0.2s ease;
    margin-bottom: 5px;
    background-color: transparent;
    display: grid;
    grid-template-columns: 20px 1fr;
    column-gap: 8px;
    align-items: center;
    justify-content: start;
    font-size: 14px;
    position: relative;
    text-align: left;
    width: 100%;
    background-color: transparent;
}

.list-group-item:hover {
    color: #000000;
    border-radius: 16px;
    background-color: #d6d6d6;
}

.list-group-item.active {
    background-color: transparent;
    color: #000000;
    border: none;
    font-weight: 600;
}

.list-group-item.list-group-item-action.active {
    background-color: transparent;
    color: #000000;
    border: none;
    font-weight: 600;
}

.sidenav {
    background-color: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.menu.list-group {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

.icon-container {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-group-item i.fa, 
.list-group-item i.fas, 
.list-group-item i.far {
    width: 20px;
    text-align: center;
    font-size: 16px;
    color: #000000;
    grid-column: 1;
    justify-self: center;
}

.list-group-item span {
    grid-column: 2;
    text-align: left;
}

/* ===== DIALOGOS Y MODALES ===== */
.dialog-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10;
}

.dialog-box {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ===== MEJORAS PARA MODALES CON SCROLL ===== */
.dialog-content {
    max-height: calc(95vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
}

/* Scroll personalizado para el contenido del modal */
.dialog-content::-webkit-scrollbar {
    width: 8px;
}

.dialog-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 16px;
}

.dialog-content::-webkit-scrollbar-thumb {
    background: var(--inno-empresa);
    border-radius: 16px;
}

.dialog-content::-webkit-scrollbar-thumb:hover {
    background: var(--inno-empresa);
    opacity: 0.8;
}

/* Scrollbars generales para toda la aplicación */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 16px;
}

::-webkit-scrollbar-thumb {
    background: var(--inno-empresa);
    border-radius: 16px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--inno-empresa);
    opacity: 0.8;
}

/* Scrollbars generales para toda la aplicación */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 16px;
}

::-webkit-scrollbar-thumb {
    background: var(--inno-empresa);
    border-radius: 16px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--inno-empresa);
    opacity: 0.8;
}

/* Mejoras específicas para modales con DataTables */
.modal-lg .dialog-content {
    max-height: calc(95vh - 140px);
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

/* Asegurar que las tablas dentro del modal sean responsivas */
.modal-lg .table-responsive {
    max-height: calc(95vh - 200px);
    overflow-y: auto;
}

/* Estilos para el contenedor de DataTables en modales */
.modal-lg .dt-container {
    max-height: calc(95vh - 200px);
    overflow-y: auto;
}

.modal-lg .dt-container .dataTables_wrapper {
    max-height: calc(95vh - 220px);
    overflow-y: auto;
}

/* Mejoras para el modal de especialidades */
.dialog-box.modal-lg {
    max-width: 90vw;
    max-height: 95vh;
    margin: 2.5vh auto;
}

.dialog-box.modal-lg .modal-content {
    max-height: 95vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dialog-box.modal-lg .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

/* ===== PÁGINA DE INICIO ===== */
.inicio {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-color: var(--inno-primary-light);
    color: #fff;
}

.inicio h1,
.inicio h2,
.inicio h3,
.inicio h4,
.inicio h5,
.inicio h6 {
    font-family: 14px/22px "Raleway", Arial, Helvetica, sans-serif;
}

.inicio h1 {
    font-size: 48px;
    line-height: 48px;
    font-weight: 800;
    margin: 15px 0;
}

.inicio p {
    font-family: "Raleway", sans-serif;
    color: var(--inno-primary-dark);
}

.inicio a {
    color: var(--inno-primary-dark);
    text-decoration: none;
}

.inicio .enlaces-inicio{
    font-size: 14px !important;
}

.inicio .dialog-container {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10;
}

.inicio .user-auth {
    padding: 0;
    display: flex;
    height: 100vh;
}

.inicio .container-fluid {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin-right: auto;
    margin-left: auto;
}

.inicio .img {
    flex: 1;
    background-size: cover;
    background-position: center;
    background-image: url('img/logo.png');
    min-width: 250px;
}

.inicio .login-wrap {
    flex: 1.5;
    padding: 40px;
    background: var(--secundario);
}

.inicio .login-wrap h3 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

.inicio .social-media {
    display: flex;
    gap: 10px;
}

.inicio .social-media a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--secundario);
    color: #fff;
    text-decoration: none;
    transition: background 0.3s;
}

.inicio .social-media a:hover {
    background: #205a83;
}

.inicio .form-group {
    margin-bottom: 15px;
}

.inicio .form-group label {
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 5px;
    display: block;
    color: var(--inno-primary-dark);
}

.inicio .form-links {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.inicio .form-links a {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--inno-primary-dark);
}

.inicio .form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #333;
    border-radius: 16px;
    outline: none;
    font-family: var(--letra-familia);
    font-size: 0.95rem;
}

.inicio .form-control:focus {
    border: 1px solid #dee2e6;
    background-color: #fff;
    color: #333;
}

.inicio .btn {
    display: inline-block;
    background: var(--inno-primary-dark);
    color: #fff;
    border: none;
    padding: 10px;
    text-transform: uppercase;
    border-radius: 16px;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

.inicio .btn:hover {
    background: var(--inno-primary-dark);
    color: var(--inno-primary-light);
    border: 1px solid var(--inno-primary-dark);
}

.inicio .checkbox-wrap {
    display: flex;
    align-items: center;
}

.inicio .checkbox-wrap input {
    margin-right: 10px;
}

.inicio .left-section {
    max-width: 33%;
    width: 33%;
}

.inicio .logo img {
    width: 180px;
}

.inicio .logo {
    z-index: 10;
}

.inicio .carousel-inner img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
}

.inicio .carousel-caption {
    position: absolute;
    bottom: 20px; 
    right: 20px;
    z-index: 5;
}

.inicio blockquote p {
    position: relative;
    margin-bottom: 40px;
    font-style: italic;
    color: #fff;
    font-family: "Raleway", sans-serif;
    font-weight: 400;
}

.inicio blockquote p:before {
    margin-right: 20px;
    content: "\f10d";
}

.inicio blockquote p:before, .inicio blockquote p:after {
    font-family: "FontAwesome";
}

.inicio blockquote p:after {
    margin-left: 20px;
    content: "\f10e";
}

.inicio a{border: 1px solid transparent;}

.inicio a:hover{
    border-bottom: 1px solid var(--inno-empresa);
}

.inicio .text-center {
    text-align: center;
    text-decoration: none;
}

.inicio h1>span {
    color: var(--inno-primary-dark);
}

.inicio .right-section {
    max-width: 66%;
    width: 66%;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    height: 100vh; 
    box-sizing: border-box;
    flex-direction: column;
}

.inicio .version-info {
    text-align: center;
    margin-top: 20px;
}

.inicio .version-info small {
    display: block;
    color: var(--inno-primary-dark);
}

.inicio .form-container p {
    text-transform: uppercase;
    margin-bottom: 40px;
}

.inicio .form-container form .form-group {
    margin: 0 auto;
    margin-bottom: 30px;
}

.inicio .form-container form {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}
.alert-info{
    border-radius: 16px !important;
    border-color: var(--inno-empresa) !important;
}

.inicio .custom-button, .inicio .custom-button-login {
    border: none;
    color: var(--inno-primary-light-dark);
    text-decoration: none;
    background: var(--inno-empresa);
    cursor: pointer;
    border: 1px solid var(--inno-primary-light-dark);
    display: inline-block;
    outline: none;
    box-shadow: none;
    text-shadow: none;
    position: relative;
    letter-spacing: 0;
    -webkit-transition: all 0.3s ease 0s;
    transition: all 0.3s ease 0s;
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
    margin-top: 10px;
    text-transform: uppercase;
    padding: 8px 20px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
}

.inicio .form-container .custom-button.login:before {
    content: "\f090";
    margin-top: -9px;
}

.inicio .custom-button:hover:before {
    opacity: 1;
    filter: alpha(opacity=100);
    -webkit-transform: translateX(0);
    transform: translateX(0);
}

.inicio .custom-button:before {
    content: "\f1d8";
    font: 14px / 1.2em FontAwesome;
    color: var(--inno-empresa);
    position: absolute;
    height: 100%;
    right: 18px;
    top: 51%;
    margin-top: -10px;
    -webkit-transition: all 0.3s ease 0s;
    transition: all 0.3s ease 0s;
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
    opacity: 0;
    filter: alpha(opacity=0);
    -webkit-transform: translateX(-20px);
    transform: translateX(-20px);
}

.inicio .form-container .custom-button {
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    margin: 0 auto;
    display: block;
    margin-bottom: 10px;
    width: 100%;
    padding: 8px 15px;
}

.inicio .form-container .form-group p {
    font-size: 12px;
}

.inicio .copyright-text {
    font-size: 12px;
    width: 100%;
    opacity: .8;
}

/* ===== MENÚ MÓVIL ===== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 2;
    margin-top: 20px;
    align-self: flex-end;
    margin-left: auto;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--inno-empresa);
    margin: 5px 0;
    transition: 0.3s;
}

.close-menu {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    color: var(--inno-empresa);
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
}

.sidebar-menu-container {
    transition: transform 0.3s ease;
}

.logo {
    border: none !important;
}

/* ===== REGISTRO Y AUTENTICACIÓN ===== */
.password-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    z-index: 10;
    display: flex !important;
}

.toggle-password:hover {
    color: var(--inno-empresa);
}

.password-group input[type="password"],
.password-group input[type="text"] {
    padding-right: 40px !important;
}

.password-group input.password-visible {
    -webkit-text-security: none !important;
    text-security: none !important;
}

.password-group input[type="password"]:not(.password-visible) {
    -webkit-text-security: disc !important;
    text-security: disc !important;
}

/* ===== COMPONENTES UI ===== */
.alert{
    padding: 0.8rem 0.8rem;
    border-radius: 16px;
}

.btn-primary, .btn-success, .btn-danger, .ver-observaciones, .btn-warning, .btn-info, .btn-light, .btn-dark, .btn-link, .btn-outline-primary, .btn-outline-success, .btn-outline-danger, .btn-outline-warning, .btn-outline-info, .btn-outline-light, .btn-outline-dark, .btn-outline-link,.btn{
    cursor: pointer;
    padding: .375rem .75rem !important;
}

.btn-primary{
    border-radius: 16px !important;
}

.btn-primary:hover{
    background-color: var(--inno-empresa) !important;
}

.btn, .btn-outline-primary{
    border-radius: 16px !important;
}

.bg-primary{
    background-color: var(--inno-empresa) !important;
}

.text-primary{
    color: var(--inno-empresa) !important;
}

.btn-outline-danger{
    color: darkred !important;
    border-color: darkred !important;
}

.btn-outline-danger:hover{
    color: white !important;
    background-color: darkred !important;
    border-color: darkred !important;
}

.btn-close {
    color: black !important;
    border-radius: 16px !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1 !important;
}

.btn-check:focus+.btn-primary,
.btn-primary:focus{
   background-color: var(--inno-empresa) !important; 
   border-color: var(--inno-empresa) !important;
   color: white !important;
}

.btn-close:hover {
    opacity: 0.8 !important;
}

/* ===== TABLAS Y CARDS ===== */
.tabla-redondeada{
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

table.dataTable thead>tr>th.dt-orderable-asc,
table.dataTable thead>tr>th.dt-orderable-desc,
table.dataTable thead>tr>td.dt-orderable-asc,
table.dataTable thead>tr>td.dt-orderable-desc{
    background-color: var(--inno-empresa) !important;
    color: var(--inno-empresa-secondary) !important;
}
/* Cabeceras de tablas (incluye DataTables) con color corporativo */
.tabla-redondeada thead th {
    background-color: var(--inno-empresa);
    color: #fff;
    border-color: var(--inno-empresa);
    font-weight: 600;
}

.dataTable thead th {
    background-color: var(--inno-empresa);
    color: #fff;
    border-color: var(--inno-empresa);
    font-weight: 600;
}

.card{
    border-radius: 16px;
    border: none;
    background: transparent !important;
}

.table-responsive .dt-container{
    box-shadow: none !important;
    background: transparent !important;
}

/* Forzar fondo transparente en cualquier contenedor de DataTables */
.dt-container {
    background: transparent !important;
}

/* ===== SELECT2 ===== */
.select2-container--bootstrap-5 .select2-selection {
    background-color: var(--inno-empresa-secondary) !important;
}

.select2-container--bootstrap-5 .select2-selection--single {
    background-color: var(--inno-empresa-secondary) !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple {
    background-color: var(--inno-empresa-secondary) !important;
}

.select2-container--bootstrap-5 .select2-selection__rendered {
    background-color: var(--inno-empresa-secondary) !important;
}

/* ===== LIGHTBOX ===== */
.lb-data .lb-caption {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #2d3748;
}

.lb-nav a.lb-prev,
.lb-nav a.lb-next {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.lb-nav a.lb-prev:hover,
.lb-nav a.lb-next:hover {
    opacity: 1;
}

.lb-closeContainer .lb-close {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.lb-closeContainer .lb-close:hover {
    opacity: 1;
}

.lb-outerContainer {
    border-radius: 16px;
    overflow: hidden;
}

.lb-dataContainer {
    border-radius: 16px 0 16px 16px;
}

.lb-number {
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    color: #718096;
}

/* ===== ADJUNTOS ===== */
.adjuntos-preview a[data-lightbox] {
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.adjuntos-preview a[data-lightbox]:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.adjuntos-preview a[data-lightbox] img {
    border-radius: 16px;
    transition: all 0.3s ease;
}

.adjuntos-preview a[target="_blank"] {
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.adjuntos-preview a[target="_blank"]:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.adjuntos-preview a[target="_blank"] embed {
    border-radius: 16px;
    transition: all 0.3s ease;
}

.adjunto-existente {
    position: relative;
}

.adjunto-existente::before {
    content: 'Guardado';
    position: absolute;
    top: -8px;
    left: 8px;
    background: #28a745;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 16px;
    z-index: 1;
}

.adjunto-nuevo {
    position: relative;
}

.adjunto-nuevo::before {
    content: 'Nuevo';
    position: absolute;
    top: -8px;
    left: 8px;
    background: #007bff;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 16px;
    z-index: 1;
}

.adjuntos-preview .d-inline-block {
    border: none !important;
}

.adjuntos-preview,
[class^="adjuntos-preview-"] {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
}

.adjuntos-preview,
.adjuntos-preview * {
    box-sizing: border-box;
}

/* ===== BOTÓN SCROLL TO TOP ===== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background-color: var(--inno-empresa);
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
}

.scroll-to-top:hover {
    background-color: #001f3f;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.scroll-to-top.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.scroll-to-top i {
    transition: transform 0.3s ease;
}

.scroll-to-top:hover i {
    animation: scrollUp 0.6s ease infinite;
}

@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
    100% {
        transform: translateY(0);
    }
}

/* ===== PDF Y DOCUMENTOS ===== */
.adjuntos-preview a[title*="Ver PDF"] div {
    transition: all 0.3s ease;
}

.adjuntos-preview a[title*="Ver PDF"]:hover div {
    background-color: #e9ecef !important;
    border-color: #adb5bd !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.adjuntos-preview a[title*="Ver PDF"]:hover i {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.pdf-preview {
    transition: all 0.3s ease;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.pdf-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pdf-preview embed {
    transition: all 0.3s ease;
    pointer-events: none;
}

.pdf-preview:hover embed {
    border-color: var(--inno-empresa) !important;
}

.pdf-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.pdf-overlay:hover {
    background-color: rgba(0, 47, 95, 0.1);
}

#pdfModal .modal-dialog {
    max-width: 70%;
    margin: 1.75rem auto;
}

#pdfModal .modal-body {
    padding: 1rem;
    background-color: #f8f9fa;
}

#pdfEmbed {
    border: 1px solid #dee2e6;
    border-radius: 16px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ===== TOGGLE SWITCH ===== */
.checkbox-wrapper-2 .ikxBAC {
  appearance: none;
  background-color: #dfe1e4;
  border-radius: 16px;
  border-style: none;
  flex-shrink: 0;
  height: 20px;
  margin: 0;
  position: relative;
  width: 30px;
  cursor: pointer;
}

.checkbox-wrapper-2 .ikxBAC::before {
  bottom: -6px;
  content: "";
  left: -6px;
  position: absolute;
  right: -6px;
  top: -6px;
}

.checkbox-wrapper-2 .ikxBAC,
.checkbox-wrapper-2 .ikxBAC::after {
  transition: all 100ms ease-out;
}

.checkbox-wrapper-2 .ikxBAC::after {
  background-color: #fff;
  border-radius: 16px;
  content: "";
  height: 14px;
  left: 3px;
  position: absolute;
  top: 3px;
  width: 14px;
}

.checkbox-wrapper-2 .ikxBAC:hover {
  background-color: #c9cbcd;
  transition-duration: 0s;
}

.checkbox-wrapper-2 .ikxBAC:checked {
  background-color: var(--inno-empresa);
}

.checkbox-wrapper-2 .ikxBAC:checked::after {
  background-color: #fff;
  left: 13px;
}

.checkbox-wrapper-2 :focus:not(.focus-visible) {
  outline: 0;
}

.checkbox-wrapper-2 .ikxBAC:checked:hover {
  background-color: var(--inno-empresa);
  filter: brightness(90%);
}

/* ===== HORARIOS ===== */
.hora_horario.active .btn-cancelar-horario,
.hora_horario .btn-cancelar-horario {
  display: flex !important;
  position: absolute !important;
  top: -7px !important;
  right: -7px !important;
  width: 16px !important;
  height: 16px !important;
  background: #ff4d4f !important;
  color: #fff !important;
  border-radius: 16px !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.95rem !important;
  cursor: pointer !important;
  border: none !important;
  z-index: 2 !important;
  transition: background 0.2s, color 0.2s !important;
  box-shadow: 0 1px 4px #0001 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.hora_horario .btn-cancelar-horario i {
  font-size: 11px !important;
  line-height: 1 !important;
  color: #fff !important;
  width: 100% !important;
  height: 100% !important;
  text-align: center !important;
  display: block !important;
  margin-top: 4px;
}

.hora_horario.active .btn-cancelar-horario:hover,
.hora_horario .btn-cancelar-horario:hover {
  background: #d32f2f !important;
}

.hora_horario.active {
  background: #d6f5e3 !important;
  border: 3px solid #2ecc40 !important;
  color: #111 !important;
  font-weight: bold;
  box-shadow: 0 2px 8px #2ecc4033;
  border-radius: 16px;
  position: relative;
}

.hora_horario.bloqueado:not(.active) {
  background: #fff0f0 !important;
  border: 2px solid #ff4d4f !important;
  color: #d32f2f !important;
  font-weight: bold;
  position: relative;
}

.bloqueado-texto {
  display: block;
  margin-top: 6px;
  color: #d32f2f;
  font-weight: bold;
  background: #ffd6d6;
  border-radius: 16px;
  padding: 2px 10px;
  font-size: 0.95em;
}

.hora_horario {
  position: relative !important;
}

/* ===== BOTÓN VOLVER ATRÁS ===== */
.back-arrow {
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--inno-empresa);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid var(--inno-empresa);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: fixed;
    top: 20px;
    right: 20px;
}

.back-arrow:hover {
    background: var(--inno-empresa);
    color: white;
    transform: translateX(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    text-decoration: none;
}

.back-arrow:active {
    transform: translateX(-1px);
    transition: transform 0.1s ease;
}

.back-arrow i {
    font-size: 20px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.back-arrow:hover i {
    transform: translateX(-2px);
}

/* ===== TOASTR ===== */
#toast-container .toast,
.toast-container .toast,
.toast {
    border-radius: 16px !important;
}

#toast-container .toast-success,
.toast-container .toast-success,
.toast-success {
    border-radius: 16px !important;
}

#toast-container .toast-error,
.toast-container .toast-error,
.toast-error {
    border-radius: 16px !important;
}

#toast-container .toast-warning,
.toast-container .toast-warning,
.toast-warning {
    border-radius: 16px !important;
}

#toast-container .toast-info,
.toast-container .toast-info,
.toast-info {
    border-radius: 16px !important;
}

#toast-container,
.toast-container {
    border-radius: 16px !important;
}

#toast-container .toast *,
.toast-container .toast *,
.toast * {
    border-radius: 16px !important;
}

/* ===== MEDIA QUERIES ===== */

/* (se ha revertido la lógica de sidebar colapsable de escritorio para estabilizar el layout) */

@media (max-width: 1366px) {
    .inicio .left-section {
        display: none;
    }

    .inicio .right-section {
        max-width: 100%;
        width: 100%;
    }
    .container {
        flex-direction: column;
    }

    /* En tablet anulamos la rejilla lateral (col-sm-2 / col-sm-10) */
    .content {
        margin: 0 !important;
    }
    .content > .sidenav {
        flex: 0 0 0 !important;
        max-width: 0 !important;
        width: 0 !important;
        padding: 0 !important;
        overflow: visible;
    }
    .content > .main-content-mobile {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .menu-toggle {
        display: block;
        position: fixed;
        top: 14px;
        right: 14px;
        left: auto;
        margin: 0;
        z-index: 1001;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
        padding: 6px 8px;
    }

    /* Dar aire superior en tablet para títulos y contenido */
    .header-page {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
    .main-content-mobile {
        padding-top: 0.65rem;
    }

    .menu-open .menu-toggle {
        display: none;
    }

    .close-menu {
        display: block;
    }

    .sidebar-menu-container {
        position: fixed;
        top: 0;
        left: 0;
        width: min(86vw, 320px);
        height: 100%;
        background-color: white;
        z-index: 999;
        transform: translateX(-100%);
        overflow-y: auto;
        transition: transform 0.25s ease;
    }

    .sidebar-menu-container.active {
        transform: translateX(0);
    }

    .sidebar_mvl {
        display: block;
    }

    .main-panel {
        width: 100%;
    }

    body.menu-open {
        overflow: hidden;
    }
}

@media (max-width: 767px) {
    .sidebar-menu-container {
        width: 100%;
    }

    .sidebar-menu {
        padding-top: 60px;
        text-align: center;
    }

    .nav-item {
        margin: 15px 0;
    }

    .menu-btn {
        font-size: 18px;
    }

    .menu.list-group {
        align-items:center;
    }
    .inicio .form-container form {
        max-width: 100%;
    }
    .inicio .form-container form .form-group{
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 992px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .back-arrow {
        width: 40px;
        height: 40px;
        right: 15px;
        top: 15px;
    }
    
    .back-arrow i {
        font-size: 18px;
    }

    .header-page{
        padding: 0 !important;
    }
    .pagination{
        flex-wrap: wrap !important;
    }
}

@media screen and (max-width: 765px) and (min-width: 575px) {
    .main-content-mobile{
        margin-top: 30px;
    }
}

@media screen and (max-width: 575px) {
    .modal-dialog {
        max-width: 800px !important;
        margin: 1.75rem auto !important;
    }

    .sidebar-menu{
        display: flex;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        padding-top: 20px !important;
    }

    .sidebar-menu .nav-item{
        width: 100% !important;
        text-align: left !important;
        margin: 2px 0 !important;
    }

    .menu-btn {
        font-size: 14px !important;
    }

    .menu-btn i{
        font-size: 14px !important;
    }
    .list-group-item{
        padding: 4px 18px !important;
    }
}