/*=============================================
TEMA DE MARCA DURAMAS — paleta oro/negro (#D4AF37 / #1A1A1A / #000000)
aplicada sobre el skin "skin-blue" de AdminLTE. Archivo aditivo:
no se toca ningún .php, solo se recolorea/reorganiza visualmente
el header, el sidebar y los componentes nuevos (panel de usuario,
pestañas rápidas de estado, paneles deslizantes de Agregar/Editar
Usuario). Se usan !important donde el skin de AdminLTE tiene mayor
especificidad (selectores .skin-blue ...).
=============================================*/

/* El overlay oscuro detrás de los modales venía con la opacidad por
defecto de Bootstrap (solo 50%), así que con tablas de colores
vivos detrás (badges de Clientes, por ejemplo) se notaba demasiado
el contenido de fondo y se veía desordenado. Se oscurece más para
un look más limpio tipo panel deslizante. */
.modal-backdrop.in {
    opacity: .75 !important;
}

/* ---------- HEADER ---------- */
.main-header {
    background: #1A1A1A !important;
}
.main-header .navbar,
.skin-blue .main-header .navbar {
    background: #1A1A1A !important;
}
.main-header .logo,
.skin-blue .main-header .logo {
    background: #000000 !important;
    color: #D4AF37 !important;
    font-weight: 700;
    border-bottom: none;
}
.main-header .logo:hover,
.skin-blue .main-header .logo:hover {
    background: #000000 !important;
    color: #D4AF37 !important;
}
/* En escritorio el sidebar queda siempre visible, así que el botón
de "hamburguesa" no hace falta ahí — solo se necesita en celular
para poder abrir/cerrar el menú (ver cabezote.php). */
.main-header .navbar .sidebar-toggle,
.skin-blue .main-header .navbar .sidebar-toggle {
    color: #D4AF37;
}
.main-header .navbar .sidebar-toggle:hover,
.skin-blue .main-header .navbar .sidebar-toggle:hover {
    color: #ffffff;
    background: #000000;
}
@media (min-width: 768px) {
    .main-header .navbar .sidebar-toggle {
        display: none;
    }
}
#headerPageTitle {
    color: #D4AF37;
    font-size: 18px;
    font-weight: 600;
    margin-left: 15px;
    line-height: 50px;
}
/* El <h1> propio de cada módulo (.content-header) queda oculto: el
título visible ahora vive en la barra superior (#headerPageTitle,
copiado por JS en cabezote.php). */
.content-header {
    display: none !important;
}

/* El botón para colapsar el sidebar ya no se muestra en escritorio,
pero si el navegador había guardado (cookie/localStorage de AdminLTE)
el estado "colapsado" de cuando ese botón sí existía, el body sigue
llegando con la clase .sidebar-collapse y esconde el sidebar fuera
de pantalla. Se fuerza a que en escritorio SIEMPRE se vea, sin
importar esa clase. */
@media (min-width: 768px) {
    .sidebar-collapse .main-sidebar {
        -webkit-transform: translate(0, 0) !important;
        -ms-transform: translate(0, 0) !important;
        transform: translate(0, 0) !important;
    }
    .sidebar-collapse .content-wrapper,
    .sidebar-collapse .main-footer {
        margin-left: 230px !important;
    }
}

/* ---------- SIDEBAR ---------- */
.main-sidebar,
.skin-blue .main-sidebar,
.left-side {
    background: #1A1A1A !important;
}
.sidebar-menu > li.header,
.skin-blue .sidebar-menu > li.header {
    background: #1A1A1A;
    color: #D4AF37;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 10px 15px 6px;
}
.sidebar-menu > li > a,
.skin-blue .sidebar-menu > li > a {
    color: #e6e6e6;
    border-left: 3px solid transparent;
}
.sidebar-menu > li:hover > a,
.sidebar-menu > li.active > a,
.sidebar-menu > li.menu-open > a,
.skin-blue .sidebar-menu > li:hover > a,
.skin-blue .sidebar-menu > li.active > a,
.skin-blue .sidebar-menu > li.menu-open > a {
    background: #000000;
    color: #D4AF37;
    border-left-color: #D4AF37;
}
.sidebar-menu > li > .treeview-menu,
.skin-blue .sidebar-menu > li > .treeview-menu {
    background: #141414;
}
.sidebar-menu .treeview-menu > li > a,
.skin-blue .sidebar-menu .treeview-menu > li > a {
    color: #cfcfcf;
}
.sidebar-menu .treeview-menu > li.active > a,
.sidebar-menu .treeview-menu > li > a:hover,
.skin-blue .sidebar-menu .treeview-menu > li.active > a,
.skin-blue .sidebar-menu .treeview-menu > li > a:hover {
    color: #D4AF37;
}
.sidebar a,
.skin-blue .sidebar a {
    color: #e6e6e6;
}

/* ---------- PANEL DE USUARIO, FIJO ABAJO DEL SIDEBAR (estilo
Orderry) — foto/nombre/perfil + icono de cerrar sesión. Vive en
vistas/modulos/menu.php, no en el header. ---------- */
.main-sidebar {
    display: flex;
    flex-direction: column;
}
.main-sidebar .sidebar {
    flex: 1 1 auto;
    overflow-y: auto;
}
/* Por defecto AdminLTE hace .main-sidebar position:absolute con
min-height:100% — es decir, el sidebar crece junto con el alto del
CONTENIDO de la página, no con el de la pantalla. Si una pantalla
es más alta que el viewport (aparece scroll de página), el sidebar
también se estira de más y el panel de usuario/cerrar sesión
(abajo, flex-shrink:0) queda empujado fuera de la vista. Se fija el
sidebar al viewport para que el panel de usuario siempre quede
anclado abajo, sin importar cuánto contenido tenga la página. Solo
en escritorio — en celular el sidebar usa su propio comportamiento
deslizante (transform) que no debe tocarse. */
@media (min-width: 768px) {
    .main-sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        height: 100vh !important;
        min-height: 100vh !important;
    }
}
.sidebar-user-panel {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #000000;
    border-top: 1px solid #2a2a2a;
    cursor: pointer;
}
.sidebar-user-image {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.sidebar-user-info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.sidebar-user-name {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-role {
    color: #D4AF37;
    font-size: 11px;
}
.sidebar-user-logout {
    color: #999;
    font-size: 16px;
    flex-shrink: 0;
}
.sidebar-user-panel:hover .sidebar-user-logout {
    color: #D4AF37;
}

/* ---------- PESTAÑAS RÁPIDAS DE ESTADO (Clientes/Usuarios/Seguimiento Bot) ---------- */
#tabsEstadoCliente > li > a,
#tabsEstadoUsuario > li > a,
#tabsEstadoLeadBot > li > a {
    color: #1A1A1A;
    border-radius: 20px;
}
#tabsEstadoCliente > li.active > a,
#tabsEstadoCliente > li.active > a:hover,
#tabsEstadoCliente > li.active > a:focus,
#tabsEstadoUsuario > li.active > a,
#tabsEstadoUsuario > li.active > a:hover,
#tabsEstadoUsuario > li.active > a:focus,
#tabsEstadoLeadBot > li.active > a,
#tabsEstadoLeadBot > li.active > a:hover,
#tabsEstadoLeadBot > li.active > a:focus {
    background-color: #1A1A1A;
    color: #D4AF37;
}

/* --- Modales "Agregar usuario" y "Editar usuario" como PANEL
DESLIZANTE desde la derecha (estilo Orderry), en vez de modal
centrado. Mismos campos y misma lógica de guardado de siempre,
solo cambia la presentación — ambos modales comparten exactamente
el mismo estilo. */
#modalEditarUsuario .modal-dialog, #modalAgregarUsuario .modal-dialog {
    position: fixed !important;
    top: 0;
    right: 0;
    margin: 0;
    height: 100%;
    width: 520px;
    max-width: 94vw;
    display: block !important;
}
#modalEditarUsuario.fade .modal-dialog, #modalAgregarUsuario.fade .modal-dialog {
    -webkit-transform: translate(100%, 0);
    -ms-transform: translate(100%, 0);
    transform: translate(100%, 0);
    -webkit-transition: -webkit-transform .25s ease-out;
    transition: transform .25s ease-out;
}
#modalEditarUsuario.in .modal-dialog, #modalAgregarUsuario.in .modal-dialog {
    -webkit-transform: translate(0, 0);
    -ms-transform: translate(0, 0);
    transform: translate(0, 0);
}
#modalEditarUsuario .modal-content, #modalAgregarUsuario .modal-content {
    height: 100%;
    border-radius: 0;
    border: none;
    box-shadow: -8px 0 30px rgba(0,0,0,.15);
    display: flex;
    flex-direction: column;
}
#modalEditarUsuario .modal-header, #modalAgregarUsuario .modal-header {
    background: #ffffff !important;
    color: #1A1A1A !important;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    padding: 18px 20px;
}
#modalEditarUsuario .modal-header .close, #modalAgregarUsuario .modal-header .close {
    color: #1A1A1A;
    opacity: .5;
}
#modalEditarUsuario .modal-header .close:hover, #modalAgregarUsuario .modal-header .close:hover {
    opacity: 1;
}
#modalEditarUsuario .modal-title, #modalAgregarUsuario .modal-title {
    font-weight: 700;
    font-size: 18px;
    color: #1A1A1A;
}
#modalEditarUsuario .modal-body, #modalAgregarUsuario .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 24px;
    /* Se deja overflow-y:auto como respaldo (por si en una pantalla
    muy chica no cupiera algo), pero el espaciado de abajo (form-group,
    label, input-lg) está calculado para que en pantallas normales
    el contenido quepa completo sin necesidad de scroll. */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#modalEditarUsuario .modal-body::-webkit-scrollbar, #modalAgregarUsuario .modal-body::-webkit-scrollbar {
    width: 0;
    height: 0;
}
#modalEditarUsuario .form-group label, #modalAgregarUsuario .form-group label {
    display: block;
    font-weight: 700;
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 5px;
}
#modalEditarUsuario .input-group-addon, #modalAgregarUsuario .input-group-addon {
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
}
#modalEditarUsuario .form-control, #modalAgregarUsuario .form-control {
    border-radius: 6px;
}
/* Todos los campos (input de texto, select normal y select de
Select2) deben verse con el MISMO ancho, ocupando casi todo el
panel — antes el ancho de cada uno dependía de su propio contenido
y Select2 rompía el "display:table" de .input-group, así que se
fuerza todo a flex con un solo ancho de icono fijo y el resto
repartido igual en cada fila. */
#modalEditarUsuario .input-group, #modalAgregarUsuario .input-group {
    display: flex;
    width: 100%;
}
#modalEditarUsuario .input-group > .input-group-addon, #modalAgregarUsuario .input-group > .input-group-addon {
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#modalEditarUsuario .input-group > .form-control, #modalAgregarUsuario .input-group > .form-control,
#modalEditarUsuario .input-group > .select2-container, #modalAgregarUsuario .input-group > .select2-container {
    flex: 1 1 auto;
    width: 1% !important;
    min-width: 0;
}
#modalEditarUsuario .select2-container--default .select2-selection--single, #modalAgregarUsuario .select2-container--default .select2-selection--single,
#modalEditarUsuario .select2-container--default .select2-selection--multiple, #modalAgregarUsuario .select2-container--default .select2-selection--multiple {
    height: 34px;
    border-color: #ddd;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
#modalEditarUsuario .select2-container--default .select2-selection--single .select2-selection__rendered, #modalAgregarUsuario .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 32px;
}
#modalEditarUsuario .select2-container--default .select2-selection--single .select2-selection__arrow, #modalAgregarUsuario .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 32px;
}
#modalEditarUsuario .btn-primary, #modalAgregarUsuario .btn-primary {
    background-color: #1A1A1A;
    border-color: #1A1A1A;
    color: #D4AF37;
    border-radius: 20px;
    font-weight: 700;
}
#modalEditarUsuario .btn-default, #modalAgregarUsuario .btn-default {
    border-radius: 20px;
}
/* "Salir" y "Modificar/Guardar usuario" como barra fija al final
del panel (ya pegada abajo por el flex del .modal-content, pero se
refuerza el look de footer y se reparte el ancho entre los dos
botones). */
#modalEditarUsuario .modal-footer, #modalAgregarUsuario .modal-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    padding: 14px 24px;
}
#modalEditarUsuario .modal-footer .btn, #modalAgregarUsuario .modal-footer .btn {
    flex: 1 1 0;
    margin: 0;
}
/* La previsualización de la foto no tenía alto fijo — si la imagen
subida no era cuadrada salía estirada/gigante y empujaba todo el
panel, obligando a scrollear. Se fija a un tamaño cuadrado parejo
sin importar el tamaño/proporción de la foto original. */
#modalEditarUsuario .previsualizarEditar, #modalAgregarUsuario .previsualizarEditar,
#modalEditarUsuario .previsualizar, #modalAgregarUsuario .previsualizar {
    width: 72px !important;
    height: 72px !important;
    object-fit: cover;
}
/* Un campo por fila. El margen entre campos quedaba muy generoso
(32px) y eso era justo lo que hacía que el panel no cupiera entero
en la pantalla y apareciera scroll — se reduce para que los campos
quepan sin necesidad de scrollear. */
#modalEditarUsuario .form-group, #modalAgregarUsuario .form-group {
    margin-bottom: 14px;
}
#modalEditarUsuario .input-group-addon, #modalAgregarUsuario .input-group-addon {
    width: 38px;
    font-size: 14px;
    color: #1A1A1A;
    background: #faf8f2;
    border-color: #e5decb;
    padding: 4px 8px;
}
#modalEditarUsuario select.form-control:not([multiple]), #modalAgregarUsuario select.form-control:not([multiple]) {
    height: 34px;
}
#modalEditarUsuario .input-lg, #modalAgregarUsuario .input-lg {
    height: 34px;
    padding: 5px 10px;
    font-size: 13px;
}
#modalEditarUsuario label, #modalAgregarUsuario label {
    margin-bottom: 4px;
}

/* --- Modal "Agregar Cliente" como PANEL DESLIZANTE desde la
derecha, estilo Orderry ("Nueva factura"): panel más ancho que el
de Usuarios y con varios campos EMPAREJADOS lado a lado (2 por
fila) en vez de uno debajo de otro, para aprovechar el ancho y que
no quede tan largo. */
body.ruta-clientes #modalAgregarCliente .modal-dialog {
    position: fixed !important;
    top: 0;
    right: 0;
    margin: 0;
    height: 100%;
    width: 640px;
    max-width: 96vw;
    display: block !important;
}
/* Fila de 2 campos lado a lado (ver vistas/modulos/clientes.php) */
body.ruta-clientes #modalAgregarCliente .form-row {
    display: flex;
    gap: 16px;
}
body.ruta-clientes #modalAgregarCliente .form-row > .form-group {
    flex: 1 1 0;
    min-width: 0;
}
body.ruta-clientes #modalAgregarCliente.fade .modal-dialog {
    -webkit-transform: translate(100%, 0);
    -ms-transform: translate(100%, 0);
    transform: translate(100%, 0);
    -webkit-transition: -webkit-transform .25s ease-out;
    transition: transform .25s ease-out;
}
body.ruta-clientes #modalAgregarCliente.in .modal-dialog {
    -webkit-transform: translate(0, 0);
    -ms-transform: translate(0, 0);
    transform: translate(0, 0);
}
body.ruta-clientes #modalAgregarCliente .modal-content {
    height: 100%;
    border-radius: 0;
    border: none;
    box-shadow: -8px 0 30px rgba(0,0,0,.15);
    display: flex;
    flex-direction: column;
}
body.ruta-clientes #modalAgregarCliente .modal-header {
    background: #ffffff !important;
    color: #1A1A1A !important;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    padding: 18px 20px;
}
body.ruta-clientes #modalAgregarCliente .modal-header .close {
    color: #1A1A1A;
    opacity: .5;
}
body.ruta-clientes #modalAgregarCliente .modal-header .close:hover {
    opacity: 1;
}
body.ruta-clientes #modalAgregarCliente .modal-title {
    font-weight: 700;
    font-size: 18px;
    color: #1A1A1A;
}
body.ruta-clientes #modalAgregarCliente .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 24px;
}
body.ruta-clientes #modalAgregarCliente .form-group label {
    display: block;
    font-weight: 700;
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 4px;
}
body.ruta-clientes #modalAgregarCliente .input-group-addon {
    width: 38px;
    font-size: 14px;
    color: #1A1A1A;
    background: #faf8f2;
    border-color: #e5decb;
    padding: 4px 8px;
}
body.ruta-clientes #modalAgregarCliente .form-control {
    border-radius: 6px;
}
/* Todos los campos con el mismo ancho, igual que en Usuarios. */
body.ruta-clientes #modalAgregarCliente .input-group {
    display: flex;
    width: 100%;
}
body.ruta-clientes #modalAgregarCliente .input-group > .input-group-addon {
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}
body.ruta-clientes #modalAgregarCliente .input-group > .form-control {
    flex: 1 1 auto;
    width: 1% !important;
}
body.ruta-clientes #modalAgregarCliente select.form-control:not([multiple]) {
    height: 34px;
}
body.ruta-clientes #modalAgregarCliente .input-lg {
    height: 34px;
    padding: 5px 10px;
    font-size: 13px;
}
body.ruta-clientes #modalAgregarCliente textarea.input-lg {
    height: auto;
    min-height: 70px;
}
body.ruta-clientes #modalAgregarCliente .form-group {
    margin-bottom: 18px;
}
body.ruta-clientes #modalAgregarCliente .btn-primary {
    background-color: #1A1A1A;
    border-color: #1A1A1A;
    color: #D4AF37;
    border-radius: 20px;
    font-weight: 700;
}
body.ruta-clientes #modalAgregarCliente .btn-default {
    border-radius: 20px;
}
body.ruta-clientes #modalAgregarCliente .modal-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    padding: 14px 24px;
}
body.ruta-clientes #modalAgregarCliente .modal-footer .btn {
    flex: 1 1 0;
    margin: 0;
}

/* --- Modal "Modificar Cliente" (#myModalTabs) — ahora como PANEL
DESLIZANTE desde la derecha, mismo estilo que Agregar Cliente, con
pestañas de TEXTO (Información/Indicadores/Historial/Oportunidades)
en vez de los iconos circulares de colores (esos colores venían
cableados en AdminLTE.css, buscar "MODALPARA CLIENTE" ahí — con
pestañas de texto ese CSS viejo ya no aplica a nada). Las pestañas
se pueden clickear en cualquier orden: no es un asistente lineal.
Los <form>/ids/tablas de cada paso NO se tocaron, solo el armazón
visual de alrededor. */
#myModalTabs .modal-dialog {
    position: fixed !important;
    top: 0;
    right: 0;
    margin: 0;
    height: 100%;
    width: 760px;
    max-width: 96vw;
    display: block !important;
}
#myModalTabs.fade .modal-dialog {
    -webkit-transform: translate(100%, 0);
    -ms-transform: translate(100%, 0);
    transform: translate(100%, 0);
    -webkit-transition: -webkit-transform .25s ease-out;
    transition: transform .25s ease-out;
}
#myModalTabs.in .modal-dialog {
    -webkit-transform: translate(0, 0);
    -ms-transform: translate(0, 0);
    transform: translate(0, 0);
}
#myModalTabs .modal-content {
    height: 100%;
    border-radius: 0;
    border: none;
    box-shadow: -8px 0 30px rgba(0,0,0,.15);
    display: flex;
    flex-direction: column;
}
#myModalTabs .modal-header {
    background: #ffffff !important;
    color: #1A1A1A !important;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    padding: 18px 24px 0;
}
#myModalTabs .modal-header .close {
    color: #1A1A1A;
    opacity: .5;
}
#myModalTabs .modal-header .close:hover {
    opacity: 1;
}
#myModalTabs .modal-title {
    font-weight: 700;
    font-size: 18px;
    color: #1A1A1A;
    margin-bottom: 14px;
}
#myModalTabs .modal-body {
    flex: 1 1 auto;
    /* Sin min-height:0 un hijo flex no se encoge por debajo del alto
    de su contenido (bug clásico de flexbox) — con una tabla grande
    adentro eso empujaba TODO el panel más allá de la pantalla en vez
    de scrollear solo aquí adentro. */
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 22px 24px;
}
#myModalTabs .modal-body .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0;
}
/* Las tablas (Recategorización/Indicadores/Historial/Oportunidades)
pueden ser más anchas que el panel (la de Historial tiene 8
columnas) — que scrolleen ellas solas horizontalmente, no toda la
página/panel. */
#myModalTabs .box-body {
    overflow-x: auto;
}
/* Pestañas de texto tipo píldora, igual estilo que #tabsEstadoCliente
— se puede clickear cualquiera, no hay orden forzado. */
#myModalTabs .nav-tabs {
    border-bottom: none;
    display: flex;
    gap: 8px;
}
/* AdminLTE.css (ver "MODALPARA CLIENTE") deja ".nav-tabs>li{width:25%}"
y ".nav-tabs>li a{line-height:70px}" de cuando eran círculos grandes
— eso es lo que inflaba las pestañas de texto a bloques enormes.
Se pisa todo explícitamente para que queden como píldoras chicas. */
#myModalTabs .nav-tabs > li {
    width: auto !important;
    float: none !important;
}
/* Flechita/triángulo bajo la pestaña activa: es un ":after" que
quedó del diseño viejo de círculos (apuntaba de un círculo al
siguiente) — con pestañas de texto no pinta nada, se oculta. */
#myModalTabs .nav-tabs > li:after {
    display: none !important;
    content: none !important;
}
#myModalTabs .nav-tabs > li > a {
    border: none !important;
    background: #f5f5f5 !important;
    color: #1A1A1A !important;
    border-radius: 20px !important;
    width: auto !important;
    height: auto !important;
    line-height: normal !important;
    padding: 7px 16px !important;
    font-weight: 600;
    font-size: 12px;
    margin: 0 !important;
    display: inline-block !important;
}
#myModalTabs .nav-tabs > li.active > a,
#myModalTabs .nav-tabs > li.active > a:hover,
#myModalTabs .nav-tabs > li.active > a:focus {
    background: #1A1A1A !important;
    color: #D4AF37 !important;
}
#myModalTabs h3 {
    color: #1A1A1A;
    font-weight: 700;
    border-bottom: 2px solid #D4AF37;
    padding-bottom: 8px;
    margin-bottom: 18px;
}
#myModalTabs label {
    font-weight: 700;
    color: #1A1A1A;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
#myModalTabs .btn-primary {
    background-color: #1A1A1A;
    border-color: #1A1A1A;
    color: #D4AF37;
    border-radius: 20px;
    font-weight: 700;
}
#myModalTabs .btn-success {
    background-color: #2e7d32;
    border-color: #2e7d32;
    border-radius: 20px;
    font-weight: 700;
}
#myModalTabs .table > thead > tr > th {
    background: #1A1A1A;
    color: #D4AF37;
}

/* --- Módulo RECORRIDOS: modal "Editar cliente" (botón lápiz) como
PANEL DESLIZANTE DESDE LA IZQUIERDA (al revés que los demás paneles,
que salen por la derecha — pedido explícito para este módulo). El
id #modalEditarCliente también existe en digitales.php, así que
todo esto va scoped a "body.ruta-recorrido" para no filtrarse ahí.
No se cambia ningún campo/nombre/lógica de guardado, solo el
armazón visual y el color de las cajas de "Información de..." que
tenían azul (#3c8dbc) cableado por estilo inline. --- */
body.ruta-recorrido #modalEditarCliente .modal-dialog {
    position: fixed !important;
    top: 0;
    left: 0;
    right: auto;
    margin: 0;
    height: 100%;
    width: 640px;
    max-width: 96vw;
    display: block !important;
}
body.ruta-recorrido #modalEditarCliente.fade .modal-dialog {
    -webkit-transform: translate(-100%, 0);
    -ms-transform: translate(-100%, 0);
    transform: translate(-100%, 0);
    -webkit-transition: -webkit-transform .25s ease-out;
    transition: transform .25s ease-out;
}
body.ruta-recorrido #modalEditarCliente.in .modal-dialog {
    -webkit-transform: translate(0, 0);
    -ms-transform: translate(0, 0);
    transform: translate(0, 0);
}
body.ruta-recorrido #modalEditarCliente .modal-content {
    height: 100%;
    background: #ffffff;
    border-radius: 0;
    border: none;
    box-shadow: 8px 0 30px rgba(0,0,0,.15);
    display: flex;
    flex-direction: column;
}
body.ruta-recorrido #modalEditarCliente .modal-header {
    background: #ffffff !important;
    color: #1A1A1A !important;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    padding: 18px 24px;
}
body.ruta-recorrido #modalEditarCliente .modal-header .close {
    color: #1A1A1A;
    opacity: .5;
}
body.ruta-recorrido #modalEditarCliente .modal-header .close:hover {
    opacity: 1;
}
body.ruta-recorrido #modalEditarCliente .modal-title {
    font-weight: 700;
    font-size: 18px;
    color: #1A1A1A;
}
body.ruta-recorrido #modalEditarCliente .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    background: #ffffff;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px;
}
/* Las 3 cajas "Información de su contacto/obra/adicional" tenían
fondo gris plano y el título en azul (#3c8dbc) escrito inline en el
PHP — se recolorea a la paleta de marca sin tocar el HTML. */
body.ruta-recorrido #modalEditarCliente .contact-info-container {
    background: #faf8f2 !important;
    border-color: #e5decb !important;
}
body.ruta-recorrido #modalEditarCliente .contact-info-container h4 {
    color: #1A1A1A !important;
    border-left: 3px solid #D4AF37;
    padding-left: 10px;
}
/* 2 campos por fila (igual que Agregar Cliente) — con ~19 campos
en 3 secciones, pasar de 1 a 2 columnas es lo que de verdad permite
que todo quepa en una sola pantalla sin perder legibilidad. */
body.ruta-recorrido #modalEditarCliente .form-row {
    display: flex;
    gap: 14px;
}
body.ruta-recorrido #modalEditarCliente .form-row > .form-group {
    flex: 1 1 0;
    min-width: 0;
}
body.ruta-recorrido #modalEditarCliente .form-group {
    margin-bottom: 12px;
}
/* "Información de Contacto Adicional" es secundaria/opcional — se
deja colapsada por defecto para que el resto (lo que SÍ se llena
siempre) quepa en una sola pantalla sin scrollear. */
body.ruta-recorrido #modalEditarCliente .contacto-adicional-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #1A1A1A;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 2px;
}
body.ruta-recorrido #modalEditarCliente .contacto-adicional-toggle .fa {
    transition: transform .2s ease;
    color: #D4AF37;
}
body.ruta-recorrido #modalEditarCliente .contacto-adicional-toggle[aria-expanded="true"] .fa {
    transform: rotate(90deg);
}
/* El contenido colapsable (y el .box-body que envuelve todo el
formulario) deben tener fondo sólido explícito — si no, durante o
después de la animación de abrir/cerrar quedaba un hueco donde se
veía la tabla de fondo "a través" del panel. */
body.ruta-recorrido #modalEditarCliente .box-body,
body.ruta-recorrido #modalEditarCliente #recorridoContactoAdicional {
    background: #ffffff;
}
body.ruta-recorrido #modalEditarCliente .input-group {
    display: flex;
    width: 100%;
}
body.ruta-recorrido #modalEditarCliente .input-group > .input-group-addon {
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
}
body.ruta-recorrido #modalEditarCliente .input-group > .form-control,
body.ruta-recorrido #modalEditarCliente .input-group > .select2-container {
    flex: 1 1 auto;
    width: 1% !important;
    min-width: 0;
}
body.ruta-recorrido #modalEditarCliente .form-control {
    border-radius: 6px;
}
body.ruta-recorrido #modalEditarCliente .input-lg {
    height: 36px;
    padding: 6px 10px;
    font-size: 13px;
}
body.ruta-recorrido #modalEditarCliente .previsualizar {
    width: 72px !important;
    height: 72px !important;
    object-fit: cover;
}
body.ruta-recorrido #modalEditarCliente .btn-primary {
    background-color: #1A1A1A;
    border-color: #1A1A1A;
    color: #D4AF37;
    border-radius: 20px;
    font-weight: 700;
}
body.ruta-recorrido #modalEditarCliente .btn-default {
    border-radius: 20px;
}
body.ruta-recorrido #modalEditarCliente .modal-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    padding: 14px 24px;
}
body.ruta-recorrido #modalEditarCliente .modal-footer .btn {
    flex: 1 1 0;
    margin: 0;
}

/* --- Módulo RECORRIDOS: modal "Agregar Cliente Recorrido" — mismo
estilo y mecánica (panel desde la izquierda) que "Editar cliente",
para que ambos se vean consistentes. El id #modalAgregarCliente
también existe en Clientes/Digitales/Crear-venta, así que todo va
scoped a "body.ruta-recorrido". --- */
body.ruta-recorrido #modalAgregarCliente .modal-dialog {
    position: fixed !important;
    top: 0;
    left: 0;
    right: auto;
    margin: 0;
    height: 100%;
    width: 640px;
    max-width: 96vw;
    display: block !important;
}
body.ruta-recorrido #modalAgregarCliente.fade .modal-dialog {
    -webkit-transform: translate(-100%, 0);
    -ms-transform: translate(-100%, 0);
    transform: translate(-100%, 0);
    -webkit-transition: -webkit-transform .25s ease-out;
    transition: transform .25s ease-out;
}
body.ruta-recorrido #modalAgregarCliente.in .modal-dialog {
    -webkit-transform: translate(0, 0);
    -ms-transform: translate(0, 0);
    transform: translate(0, 0);
}
body.ruta-recorrido #modalAgregarCliente .modal-content {
    height: 100%;
    background: #ffffff;
    border-radius: 0;
    border: none;
    box-shadow: 8px 0 30px rgba(0,0,0,.15);
    display: flex;
    flex-direction: column;
}
body.ruta-recorrido #modalAgregarCliente .modal-header {
    background: #ffffff !important;
    color: #1A1A1A !important;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    padding: 18px 24px;
}
body.ruta-recorrido #modalAgregarCliente .modal-header .close {
    color: #1A1A1A;
    opacity: .5;
}
body.ruta-recorrido #modalAgregarCliente .modal-header .close:hover {
    opacity: 1;
}
body.ruta-recorrido #modalAgregarCliente .modal-title {
    font-weight: 700;
    font-size: 18px;
    color: #1A1A1A;
}
body.ruta-recorrido #modalAgregarCliente .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    background: #ffffff;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px;
}
body.ruta-recorrido #modalAgregarCliente .contact-info-container {
    background: #faf8f2 !important;
    border-color: #e5decb !important;
}
body.ruta-recorrido #modalAgregarCliente .contact-info-container h4 {
    color: #1A1A1A !important;
    border-left: 3px solid #D4AF37;
    padding-left: 10px;
}
body.ruta-recorrido #modalAgregarCliente .form-row {
    display: flex;
    gap: 14px;
}
body.ruta-recorrido #modalAgregarCliente .form-row > .form-group {
    flex: 1 1 0;
    min-width: 0;
}
body.ruta-recorrido #modalAgregarCliente .form-group {
    margin-bottom: 12px;
}
body.ruta-recorrido #modalAgregarCliente .contacto-adicional-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #1A1A1A;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 2px;
}
body.ruta-recorrido #modalAgregarCliente .contacto-adicional-toggle .fa {
    transition: transform .2s ease;
    color: #D4AF37;
}
body.ruta-recorrido #modalAgregarCliente .contacto-adicional-toggle[aria-expanded="true"] .fa {
    transform: rotate(90deg);
}
body.ruta-recorrido #modalAgregarCliente .box-body,
body.ruta-recorrido #modalAgregarCliente #recorridoAgregarContactoAdicional {
    background: #ffffff;
}
body.ruta-recorrido #modalAgregarCliente .input-group {
    display: flex;
    width: 100%;
}
body.ruta-recorrido #modalAgregarCliente .input-group > .input-group-addon {
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
}
body.ruta-recorrido #modalAgregarCliente .input-group > .form-control,
body.ruta-recorrido #modalAgregarCliente .input-group > .select2-container {
    flex: 1 1 auto;
    width: 1% !important;
    min-width: 0;
}
body.ruta-recorrido #modalAgregarCliente .form-control {
    border-radius: 6px;
}
body.ruta-recorrido #modalAgregarCliente .input-lg {
    height: 36px;
    padding: 6px 10px;
    font-size: 13px;
}
body.ruta-recorrido #modalAgregarCliente .btn-primary {
    background-color: #1A1A1A;
    border-color: #1A1A1A;
    color: #D4AF37;
    border-radius: 20px;
    font-weight: 700;
}
body.ruta-recorrido #modalAgregarCliente .btn-default {
    border-radius: 20px;
}
body.ruta-recorrido #modalAgregarCliente .modal-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    padding: 14px 24px;
}
body.ruta-recorrido #modalAgregarCliente .modal-footer .btn {
    flex: 1 1 0;
    margin: 0;
}

/* --- Modal "Galería de fotos" — el contenido se trae por AJAX y se
mete directo en el modal (sin iframe: evita todo el lío de que el
alto no se propague bien entre documentos). Mismo truco de
position:fixed que ya funciona en los demás paneles. --- */
body.ruta-recorrido #modalGaleriaFotos .modal-dialog {
    display: block !important;
    position: fixed !important;
    top: 4vh !important;
    left: 4vw !important;
    width: 92vw !important;
    height: 92vh !important;
    max-width: none !important;
    margin: 0 !important;
}
body.ruta-recorrido #modalGaleriaFotos .modal-content {
    height: 100% !important;
    width: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
}
body.ruta-recorrido #modalGaleriaFotos .modal-header {
    background: #1A1A1A !important;
    color: #D4AF37 !important;
    flex-shrink: 0;
}
body.ruta-recorrido #modalGaleriaFotos .modal-header .close {
    color: #D4AF37;
    opacity: .8;
}
body.ruta-recorrido #modalGaleriaFotos .modal-header .close:hover {
    opacity: 1;
}
body.ruta-recorrido #modalGaleriaFotos .modal-title {
    color: #D4AF37;
}
body.ruta-recorrido #modalGaleriaFotos .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    background: #fff;
    overflow-y: auto;
    padding: 20px;
}

/* --- Modal "Cámara" (#tomarFoto) — antes sin ningún estilo propio
(se veía "en crudo"): se le da la misma paleta de marca, un marco
prolijo para el video y un botón de disparo centrado. También
existe en Ruteros, así que todo va scoped a Recorridos. --- */
body.ruta-recorrido #tomarFoto .modal-dialog {
    display: block !important;
    width: 480px;
    max-width: 94vw;
}
body.ruta-recorrido #tomarFoto .modal-content {
    border-radius: 10px;
    overflow: hidden;
}
body.ruta-recorrido #tomarFoto .modal-header {
    background: #1A1A1A !important;
    color: #D4AF37 !important;
}
body.ruta-recorrido #tomarFoto .modal-header .close {
    color: #D4AF37;
    opacity: .8;
}
body.ruta-recorrido #tomarFoto .modal-header .close:hover {
    opacity: 1;
}
body.ruta-recorrido #tomarFoto .modal-title {
    color: #D4AF37;
    font-weight: 700;
}
body.ruta-recorrido #tomarFoto .modal-body {
    background: #000;
    padding: 20px;
}
body.ruta-recorrido #tomarFoto .contenedor {
    border-radius: 8px;
    overflow: hidden;
    background: #111;
    margin-bottom: 16px;
}
body.ruta-recorrido #tomarFoto #video {
    width: 100%;
    display: block;
    border-radius: 8px;
}
body.ruta-recorrido #tomarFoto #contBtns {
    text-align: center;
}
body.ruta-recorrido #tomarFoto #boton {
    background: #D4AF37;
    color: #1A1A1A;
    border: none;
    border-radius: 30px;
    padding: 12px 28px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,.3);
}
body.ruta-recorrido #tomarFoto #boton:hover {
    background: #c7a233;
}
body.ruta-recorrido #tomarFoto #boton .fa {
    margin-right: 6px;
}
body.ruta-recorrido #tomarFoto #estado,
body.ruta-recorrido #tomarFoto #duracion {
    color: #D4AF37;
    margin-top: 10px;
}

/* --- Galería de fotos (list-foto-video.php) — el CSS original
(cableado en AdminLTE.css, buscar "Seccion de Galeria" ahí) tenía
".section__masonry{margin-top:10em}" (el hueco blanco enorme arriba),
".section__masonry-wrapper{width:576}" (sin unidad, CSS inválido) y
un layout por "columns" tipo revista, no por cuadrícula — por eso
una miniatura rota (sin alto real) y una foto nueva quedaban
flotando desalineadas una al lado de la otra. Se reemplaza todo por
una cuadrícula de verdad, con tarjetas de tamaño uniforme. */
.section__masonry {
    display: block !important;
    margin-top: 0 !important;
    padding: 20px;
}
.section__masonry-wrapper {
    width: auto !important;
    columns: auto !important;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    padding: 0 !important;
}
.section__masonry-wrapper__item {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    border: 1px solid #eee;
}
.section__masonry-wrapper__item iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.section__masonry-wrapper__item-img {
    width: 100% !important;
    height: 100% !important;
    margin-bottom: 0 !important;
    object-fit: cover;
    display: block;
}
/* Botón de borrar, como overlay en la esquina — ya no "flotando"
suelto al lado de la foto. */
.section__masonry-wrapper__item .btnEliminarFoto {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(26,26,26,.75);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.section__masonry-wrapper__item .btnEliminarFoto:hover {
    background: #c0392b;
}

/* --- Modal "Ver detalle" (#modalDatosRecorrido, botón ⓘ) — mismo
estilo de marca que el resto: header negro/dorado, etiquetas en
mayúsculas, valores en negro. Modal chico y simple, no hace falta
panel deslizante aquí. --- */
body.ruta-recorrido #modalDatosRecorrido .modal-content {
    border-radius: 10px;
    overflow: hidden;
    border: none;
}
body.ruta-recorrido #modalDatosRecorrido .modal-header {
    background: #1A1A1A !important;
    color: #D4AF37 !important;
    border-bottom: none;
}
body.ruta-recorrido #modalDatosRecorrido .modal-header .close {
    color: #D4AF37;
    opacity: .8;
}
body.ruta-recorrido #modalDatosRecorrido .modal-header .close:hover {
    opacity: 1;
}
body.ruta-recorrido #modalDatosRecorrido .modal-title {
    color: #D4AF37;
    font-weight: 700;
}
body.ruta-recorrido #modalDatosRecorrido .modal-body {
    padding: 22px 24px;
}
body.ruta-recorrido #modalDatosRecorrido .dl-horizontal dt {
    width: 170px;
    color: #777;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    white-space: normal;
}
body.ruta-recorrido #modalDatosRecorrido .dl-horizontal dd {
    margin-left: 180px;
    color: #1A1A1A;
    font-weight: 600;
    margin-bottom: 14px;
}
body.ruta-recorrido #modalDatosRecorrido .modal-footer {
    border-top: 1px solid #eee;
}
body.ruta-recorrido #modalDatosRecorrido .modal-footer .btn-default {
    border-radius: 20px;
}

/* --- Barra de filtros del "Mapa de Visitas" (#mapRoute) — tenía un
borde azul genérico cableado en AdminLTE.css ("Estilo de filtros
mapa"); se recolorea a la paleta de marca y se agrega el botón
"Buscar" junto al campo de texto (antes buscaba con cada tecla,
disparando una recarga completa del mapa por letra escrita). */
body.ruta-recorrido .filtros-mapa {
    border-color: #D4AF37 !important;
    background-color: #faf8f2 !important;
}
body.ruta-recorrido .buscar-cliente-mapa-wrap {
    display: flex;
    gap: 8px;
    width: 100%;
}
body.ruta-recorrido .buscar-cliente-mapa-wrap #buscarCliente {
    flex: 1 1 auto;
    height: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
body.ruta-recorrido .buscar-cliente-mapa-wrap #btnBuscarClienteMapa {
    flex: 0 0 auto;
    background: #1A1A1A;
    color: #D4AF37;
    border: none;
    border-radius: 4px;
    padding: 0 18px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}
body.ruta-recorrido .buscar-cliente-mapa-wrap #btnBuscarClienteMapa:hover {
    background: #000;
}

/* --- Modal "Mapa de Visitas" (#mapRoute) — header a la paleta de
marca. El id también existe en Ruteros, así que va scoped a
"body.ruta-recorrido". El tamaño del modal (90%x90%) ya lo pone JS
directo por inline style al abrirlo, no se toca esa parte. --- */
body.ruta-recorrido #mapRoute .modal-header {
    background: #1A1A1A !important;
    color: #D4AF37 !important;
    border-bottom: none;
}
body.ruta-recorrido #mapRoute .modal-header .close {
    color: #D4AF37;
    opacity: .8;
}
body.ruta-recorrido #mapRoute .modal-header .close:hover {
    opacity: 1;
}
body.ruta-recorrido #mapRoute .modal-title {
    color: #D4AF37;
    font-weight: 700;
}
body.ruta-recorrido #mapRoute .modal-content {
    border-radius: 10px;
    overflow: hidden;
}

/* --- Select2 "Compartir con" (#seleccionarCompartirVendedor) en
Agregar/Editar Cliente Recorrido — al quedar en una columna de medio
ancho (emparejado con "Etapa"), el cuadro de texto interno donde se
escribe para buscar se desbordaba/no se ajustaba. Se le pone un
alto consistente con los demás campos y se obliga a no pasarse del
ancho de su columna. --- */
body.ruta-recorrido #modalAgregarCliente .select2-container,
body.ruta-recorrido #modalEditarCliente .select2-container {
    max-width: 100%;
}
body.ruta-recorrido #modalAgregarCliente .select2-container--default .select2-selection--multiple,
body.ruta-recorrido #modalEditarCliente .select2-container--default .select2-selection--multiple {
    min-height: 36px;
    border-color: #ddd;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    box-sizing: border-box;
}
body.ruta-recorrido #modalAgregarCliente .select2-selection__rendered,
body.ruta-recorrido #modalEditarCliente .select2-selection__rendered {
    max-width: 100%;
    box-sizing: border-box;
}
body.ruta-recorrido #modalAgregarCliente .select2-search--inline .select2-search__field,
body.ruta-recorrido #modalEditarCliente .select2-search--inline .select2-search__field {
    max-width: 100% !important;
    box-sizing: border-box;
}

/* --- Módulo SEGUIMIENTO BOT: modal "Gestionar Lead del Bot" como
PANEL DESLIZANTE DESDE LA DERECHA (mismo patrón que Usuarios/
Clientes), con campos en 2 columnas por fila. --- */
body.ruta-lead-seguimientos #modalGestionarBot .modal-dialog {
    position: fixed !important;
    top: 0;
    right: 0;
    margin: 0;
    height: 100%;
    width: 640px;
    max-width: 96vw;
    display: block !important;
}
body.ruta-lead-seguimientos #modalGestionarBot.fade .modal-dialog {
    -webkit-transform: translate(100%, 0);
    -ms-transform: translate(100%, 0);
    transform: translate(100%, 0);
    -webkit-transition: -webkit-transform .25s ease-out;
    transition: transform .25s ease-out;
}
body.ruta-lead-seguimientos #modalGestionarBot.in .modal-dialog {
    -webkit-transform: translate(0, 0);
    -ms-transform: translate(0, 0);
    transform: translate(0, 0);
}
body.ruta-lead-seguimientos #modalGestionarBot .modal-content {
    height: 100%;
    background: #ffffff;
    border-radius: 0;
    border: none;
    box-shadow: -8px 0 30px rgba(0,0,0,.15);
    display: flex;
    flex-direction: column;
}
body.ruta-lead-seguimientos #modalGestionarBot .modal-header {
    background: #ffffff !important;
    color: #1A1A1A !important;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    padding: 18px 24px;
}
body.ruta-lead-seguimientos #modalGestionarBot .modal-header .close {
    color: #1A1A1A;
    opacity: .5;
}
body.ruta-lead-seguimientos #modalGestionarBot .modal-header .close:hover {
    opacity: 1;
}
body.ruta-lead-seguimientos #modalGestionarBot .modal-title {
    font-weight: 700;
    font-size: 18px;
    color: #1A1A1A;
}
body.ruta-lead-seguimientos #modalGestionarBot .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    background: #ffffff;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px;
}
body.ruta-lead-seguimientos #modalGestionarBot .form-row {
    display: flex;
    gap: 14px;
}
body.ruta-lead-seguimientos #modalGestionarBot .form-row > .form-group {
    flex: 1 1 0;
    min-width: 0;
}
body.ruta-lead-seguimientos #modalGestionarBot .form-group {
    margin-bottom: 14px;
}
body.ruta-lead-seguimientos #modalGestionarBot .form-group label {
    display: block;
    font-weight: 700;
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 5px;
}
body.ruta-lead-seguimientos #modalGestionarBot .input-group {
    display: flex;
    width: 100%;
}
body.ruta-lead-seguimientos #modalGestionarBot .input-group > .input-group-addon {
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
}
body.ruta-lead-seguimientos #modalGestionarBot .input-group > .form-control,
body.ruta-lead-seguimientos #modalGestionarBot .input-group > .select2-container {
    flex: 1 1 auto;
    width: 1% !important;
    min-width: 0;
}
body.ruta-lead-seguimientos #modalGestionarBot .form-control {
    border-radius: 6px;
}
body.ruta-lead-seguimientos #modalGestionarBot .input-lg {
    height: 36px;
    padding: 6px 10px;
    font-size: 13px;
}
body.ruta-lead-seguimientos #modalGestionarBot .select2-container,
body.ruta-lead-seguimientos #modalGestionarBot .select2-selection__rendered {
    max-width: 100%;
    box-sizing: border-box;
}
body.ruta-lead-seguimientos #modalGestionarBot .select2-container--default .select2-selection--single {
    height: 36px;
    border-color: #ddd;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
body.ruta-lead-seguimientos #modalGestionarBot .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 34px;
}
body.ruta-lead-seguimientos #modalGestionarBot .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 34px;
}
body.ruta-lead-seguimientos #modalGestionarBot .btn-primary {
    background-color: #1A1A1A;
    border-color: #1A1A1A;
    color: #D4AF37;
    border-radius: 20px;
    font-weight: 700;
}
body.ruta-lead-seguimientos #modalGestionarBot .btn-default {
    border-radius: 20px;
}
body.ruta-lead-seguimientos #modalGestionarBot .modal-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    padding: 14px 24px;
}
body.ruta-lead-seguimientos #modalGestionarBot .modal-footer .btn {
    flex: 1 1 0;
    margin: 0;
}

/* --- Módulo CAMPAÑAS: modal "Editar Campaña" como PANEL DESLIZANTE
DESDE LA DERECHA, mismo patrón que Usuarios/Clientes/Seguimiento
Bot. Solo 3 campos (Nombre y Descripción son de solo lectura), así
que el panel queda más angosto. --- */
body.ruta-campana #modalEditarCampana .modal-dialog {
    position: fixed !important;
    top: 0;
    right: 0;
    margin: 0;
    height: 100%;
    width: 480px;
    max-width: 96vw;
    display: block !important;
}
body.ruta-campana #modalEditarCampana.fade .modal-dialog {
    -webkit-transform: translate(100%, 0);
    -ms-transform: translate(100%, 0);
    transform: translate(100%, 0);
    -webkit-transition: -webkit-transform .25s ease-out;
    transition: transform .25s ease-out;
}
body.ruta-campana #modalEditarCampana.in .modal-dialog {
    -webkit-transform: translate(0, 0);
    -ms-transform: translate(0, 0);
    transform: translate(0, 0);
}
body.ruta-campana #modalEditarCampana .modal-content {
    height: 100%;
    background: #ffffff;
    border-radius: 0;
    border: none;
    box-shadow: -8px 0 30px rgba(0,0,0,.15);
    display: flex;
    flex-direction: column;
}
body.ruta-campana #modalEditarCampana .modal-header {
    background: #ffffff !important;
    color: #1A1A1A !important;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    padding: 18px 24px;
}
body.ruta-campana #modalEditarCampana .modal-header .close {
    color: #1A1A1A;
    opacity: .5;
}
body.ruta-campana #modalEditarCampana .modal-header .close:hover {
    opacity: 1;
}
body.ruta-campana #modalEditarCampana .modal-title {
    font-weight: 700;
    font-size: 18px;
    color: #1A1A1A;
}
body.ruta-campana #modalEditarCampana .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    background: #ffffff;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px;
}
body.ruta-campana #modalEditarCampana .form-group {
    margin-bottom: 16px;
}
body.ruta-campana #modalEditarCampana .form-group label {
    display: block;
    font-weight: 700;
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 5px;
}
body.ruta-campana #modalEditarCampana .input-group {
    display: flex;
    width: 100%;
}
body.ruta-campana #modalEditarCampana .input-group > .input-group-addon {
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
}
body.ruta-campana #modalEditarCampana .input-group > .form-control {
    flex: 1 1 auto;
    width: 1% !important;
    min-width: 0;
}
body.ruta-campana #modalEditarCampana .form-control {
    border-radius: 6px;
}
body.ruta-campana #modalEditarCampana .form-control[readonly] {
    background: #faf8f2;
    color: #777;
}
body.ruta-campana #modalEditarCampana .input-lg {
    height: 36px;
    padding: 6px 10px;
    font-size: 13px;
}
body.ruta-campana #modalEditarCampana .btn-primary {
    background-color: #1A1A1A;
    border-color: #1A1A1A;
    color: #D4AF37;
    border-radius: 20px;
    font-weight: 700;
}
body.ruta-campana #modalEditarCampana .btn-default {
    border-radius: 20px;
}
body.ruta-campana #modalEditarCampana .modal-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    padding: 14px 24px;
}
body.ruta-campana #modalEditarCampana .modal-footer .btn {
    flex: 1 1 0;
    margin: 0;
}

/* --- Módulo CAMPAÑAS: modal "Nueva Campaña" — mismo estilo y
mecánica (panel desde la derecha) que "Editar Campaña". --- */
body.ruta-campana #modalAgregarCampana .modal-dialog {
    position: fixed !important;
    top: 0;
    right: 0;
    margin: 0;
    height: 100%;
    width: 480px;
    max-width: 96vw;
    display: block !important;
}
body.ruta-campana #modalAgregarCampana.fade .modal-dialog {
    -webkit-transform: translate(100%, 0);
    -ms-transform: translate(100%, 0);
    transform: translate(100%, 0);
    -webkit-transition: -webkit-transform .25s ease-out;
    transition: transform .25s ease-out;
}
body.ruta-campana #modalAgregarCampana.in .modal-dialog {
    -webkit-transform: translate(0, 0);
    -ms-transform: translate(0, 0);
    transform: translate(0, 0);
}
body.ruta-campana #modalAgregarCampana .modal-content {
    height: 100%;
    background: #ffffff;
    border-radius: 0;
    border: none;
    box-shadow: -8px 0 30px rgba(0,0,0,.15);
    display: flex;
    flex-direction: column;
}
body.ruta-campana #modalAgregarCampana .modal-header {
    background: #ffffff !important;
    color: #1A1A1A !important;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    padding: 18px 24px;
}
body.ruta-campana #modalAgregarCampana .modal-header .close {
    color: #1A1A1A;
    opacity: .5;
}
body.ruta-campana #modalAgregarCampana .modal-header .close:hover {
    opacity: 1;
}
body.ruta-campana #modalAgregarCampana .modal-title {
    font-weight: 700;
    font-size: 18px;
    color: #1A1A1A;
}
body.ruta-campana #modalAgregarCampana .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    background: #ffffff;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px;
}
body.ruta-campana #modalAgregarCampana .form-group {
    margin-bottom: 16px;
}
body.ruta-campana #modalAgregarCampana .form-group label {
    display: block;
    font-weight: 700;
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 5px;
}
body.ruta-campana #modalAgregarCampana .input-group {
    display: flex;
    width: 100%;
}
body.ruta-campana #modalAgregarCampana .input-group > .input-group-addon {
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
}
body.ruta-campana #modalAgregarCampana .input-group > .form-control {
    flex: 1 1 auto;
    width: 1% !important;
    min-width: 0;
}
body.ruta-campana #modalAgregarCampana .form-control {
    border-radius: 6px;
}
body.ruta-campana #modalAgregarCampana .input-lg {
    height: 36px;
    padding: 6px 10px;
    font-size: 13px;
}
body.ruta-campana #modalAgregarCampana .btn-primary {
    background-color: #1A1A1A;
    border-color: #1A1A1A;
    color: #D4AF37;
    border-radius: 20px;
    font-weight: 700;
}
body.ruta-campana #modalAgregarCampana .btn-default {
    border-radius: 20px;
}
body.ruta-campana #modalAgregarCampana .modal-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    padding: 14px 24px;
}
body.ruta-campana #modalAgregarCampana .modal-footer .btn {
    flex: 1 1 0;
    margin: 0;
}

/* --- Módulo ACTIVIDADES DIARIAS (ventas-cre): botones de acción
(lápiz/asignar/relacionar/borrar) de la tabla con los colores de
marca en vez de los genéricos de Bootstrap. --- */
body.ruta-ventas-cre .custom-table-actividades .btn-group .btn {
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,.15);
    margin-right: 4px;
    border: none;
}
body.ruta-ventas-cre .custom-table-actividades .btn-group .btn:last-child {
    margin-right: 0;
}
body.ruta-ventas-cre .custom-table-actividades .btnEditarVenta,
body.ruta-ventas-cre .custom-table-actividades .btnEditarRecorrido,
body.ruta-ventas-cre .custom-table-actividades .btnEditarClienteDigital {
    background: linear-gradient(180deg,#D4AF37,#b8942c);
    color: #1A1A1A;
}
body.ruta-ventas-cre .custom-table-actividades .btnEditarVenta:hover,
body.ruta-ventas-cre .custom-table-actividades .btnEditarRecorrido:hover,
body.ruta-ventas-cre .custom-table-actividades .btnEditarClienteDigital:hover {
    background: linear-gradient(180deg,#c29d2e,#9c7a20);
    color: #1A1A1A;
}
body.ruta-ventas-cre .custom-table-actividades .btnLeerDatosReAsignacion {
    background: #1A1A1A;
    color: #D4AF37;
}
body.ruta-ventas-cre .custom-table-actividades .btnLeerDatosReAsignacion:hover {
    background: #000000;
    color: #D4AF37;
}
body.ruta-ventas-cre .custom-table-actividades .btnLeerDatos {
    background: #eef1f5;
    color: #3c5a73;
}
body.ruta-ventas-cre .custom-table-actividades .btnLeerDatos:hover {
    background: #dde3ea;
}
body.ruta-ventas-cre .custom-table-actividades .btnEliminarVenta {
    background: #c0392b;
    color: #fff;
}
body.ruta-ventas-cre .custom-table-actividades .btnEliminarVenta:hover {
    background: #962d22;
}

/* --- Módulo ACTIVIDADES DIARIAS: modales "Relacionar Cotización" y
"Asignar Cotización" como PANEL DESLIZANTE DESDE LA DERECHA, mismo
patrón que Usuarios/Clientes/Campañas. Los IDs de estos modales se
repiten en vistas/modulos/ventas.php (Agenda), por eso todo va
scoped con body.ruta-ventas-cre para no afectar esa otra pantalla. --- */
body.ruta-ventas-cre #modalRelacionarCotizacion .modal-dialog,
body.ruta-ventas-cre #modalReasignarCotizacion .modal-dialog {
    position: fixed !important;
    top: 0;
    right: 0;
    margin: 0;
    height: 100%;
    width: 480px;
    max-width: 96vw;
    display: block !important;
}
body.ruta-ventas-cre #modalRelacionarCotizacion.fade .modal-dialog,
body.ruta-ventas-cre #modalReasignarCotizacion.fade .modal-dialog {
    -webkit-transform: translate(100%, 0);
    -ms-transform: translate(100%, 0);
    transform: translate(100%, 0);
    -webkit-transition: -webkit-transform .25s ease-out;
    transition: transform .25s ease-out;
}
body.ruta-ventas-cre #modalRelacionarCotizacion.in .modal-dialog,
body.ruta-ventas-cre #modalReasignarCotizacion.in .modal-dialog {
    -webkit-transform: translate(0, 0);
    -ms-transform: translate(0, 0);
    transform: translate(0, 0);
}
body.ruta-ventas-cre #modalRelacionarCotizacion .modal-content,
body.ruta-ventas-cre #modalReasignarCotizacion .modal-content {
    height: 100%;
    background: #ffffff;
    border-radius: 0;
    border: none;
    box-shadow: -8px 0 30px rgba(0,0,0,.15);
    display: flex;
    flex-direction: column;
}
body.ruta-ventas-cre #modalRelacionarCotizacion .modal-header,
body.ruta-ventas-cre #modalReasignarCotizacion .modal-header {
    background: #1A1A1A !important;
    color: #D4AF37 !important;
    border-bottom: 1px solid #000;
    flex-shrink: 0;
    padding: 18px 24px;
}
body.ruta-ventas-cre #modalRelacionarCotizacion .modal-header .close,
body.ruta-ventas-cre #modalReasignarCotizacion .modal-header .close {
    color: #D4AF37;
    opacity: .7;
}
body.ruta-ventas-cre #modalRelacionarCotizacion .modal-header .close:hover,
body.ruta-ventas-cre #modalReasignarCotizacion .modal-header .close:hover {
    opacity: 1;
}
body.ruta-ventas-cre #modalRelacionarCotizacion .modal-title,
body.ruta-ventas-cre #modalReasignarCotizacion .modal-title {
    font-weight: 700;
    font-size: 18px;
    color: #D4AF37;
}
body.ruta-ventas-cre #modalRelacionarCotizacion .modal-body,
body.ruta-ventas-cre #modalReasignarCotizacion .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    background: #ffffff;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px;
}
body.ruta-ventas-cre #modalRelacionarCotizacion .form-group,
body.ruta-ventas-cre #modalReasignarCotizacion .form-group {
    margin-bottom: 16px;
}
body.ruta-ventas-cre #modalRelacionarCotizacion .form-group label,
body.ruta-ventas-cre #modalReasignarCotizacion .form-group label {
    display: block;
    font-weight: 700;
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 5px;
}
body.ruta-ventas-cre #modalRelacionarCotizacion .input-group,
body.ruta-ventas-cre #modalReasignarCotizacion .input-group {
    display: flex;
    width: 100%;
}
body.ruta-ventas-cre #modalRelacionarCotizacion .input-group > .input-group-addon,
body.ruta-ventas-cre #modalReasignarCotizacion .input-group > .input-group-addon {
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
}
body.ruta-ventas-cre #modalRelacionarCotizacion .input-group > .form-control,
body.ruta-ventas-cre #modalReasignarCotizacion .input-group > .form-control,
body.ruta-ventas-cre #modalRelacionarCotizacion .input-group > .select2-container,
body.ruta-ventas-cre #modalReasignarCotizacion .input-group > .select2-container {
    flex: 1 1 auto;
    width: 1% !important;
    min-width: 0;
}
body.ruta-ventas-cre #modalRelacionarCotizacion .form-control,
body.ruta-ventas-cre #modalReasignarCotizacion .form-control {
    border-radius: 6px;
}
body.ruta-ventas-cre #modalRelacionarCotizacion .input-lg,
body.ruta-ventas-cre #modalReasignarCotizacion .input-lg {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 13px;
}
body.ruta-ventas-cre #modalRelacionarCotizacion .btn-primary,
body.ruta-ventas-cre #modalReasignarCotizacion .btn-primary {
    background-color: #1A1A1A;
    border-color: #1A1A1A;
    color: #D4AF37;
    border-radius: 20px;
    font-weight: 700;
}
body.ruta-ventas-cre #modalRelacionarCotizacion .btn-default,
body.ruta-ventas-cre #modalReasignarCotizacion .btn-default {
    border-radius: 20px;
}
body.ruta-ventas-cre #modalRelacionarCotizacion .modal-footer,
body.ruta-ventas-cre #modalReasignarCotizacion .modal-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    padding: 14px 24px;
}
body.ruta-ventas-cre #modalRelacionarCotizacion .modal-footer .btn,
body.ruta-ventas-cre #modalReasignarCotizacion .modal-footer .btn {
    flex: 1 1 0;
    margin: 0;
}

/* --- Módulo AGENDA (ventas): mismos modales "Relacionar
Cotización" y "Asignar Cotización", mismo panel deslizante desde la
derecha — scoped a body.ruta-ventas porque estos IDs se repiten en
ventas-cre.php (Actividades Diarias). --- */
body.ruta-ventas #modalRelacionarCotizacion .modal-dialog,
body.ruta-ventas #modalReasignarCotizacion .modal-dialog {
    position: fixed !important;
    top: 0;
    right: 0;
    margin: 0;
    height: 100%;
    width: 480px;
    max-width: 96vw;
    display: block !important;
}
body.ruta-ventas #modalRelacionarCotizacion.fade .modal-dialog,
body.ruta-ventas #modalReasignarCotizacion.fade .modal-dialog {
    -webkit-transform: translate(100%, 0);
    -ms-transform: translate(100%, 0);
    transform: translate(100%, 0);
    -webkit-transition: -webkit-transform .25s ease-out;
    transition: transform .25s ease-out;
}
body.ruta-ventas #modalRelacionarCotizacion.in .modal-dialog,
body.ruta-ventas #modalReasignarCotizacion.in .modal-dialog {
    -webkit-transform: translate(0, 0);
    -ms-transform: translate(0, 0);
    transform: translate(0, 0);
}
body.ruta-ventas #modalRelacionarCotizacion .modal-content,
body.ruta-ventas #modalReasignarCotizacion .modal-content {
    height: 100%;
    background: #ffffff;
    border-radius: 0;
    border: none;
    box-shadow: -8px 0 30px rgba(0,0,0,.15);
    display: flex;
    flex-direction: column;
}
body.ruta-ventas #modalRelacionarCotizacion .modal-header,
body.ruta-ventas #modalReasignarCotizacion .modal-header {
    background: #1A1A1A !important;
    color: #D4AF37 !important;
    border-bottom: 1px solid #000;
    flex-shrink: 0;
    padding: 18px 24px;
}
body.ruta-ventas #modalRelacionarCotizacion .modal-header .close,
body.ruta-ventas #modalReasignarCotizacion .modal-header .close {
    color: #D4AF37;
    opacity: .7;
}
body.ruta-ventas #modalRelacionarCotizacion .modal-header .close:hover,
body.ruta-ventas #modalReasignarCotizacion .modal-header .close:hover {
    opacity: 1;
}
body.ruta-ventas #modalRelacionarCotizacion .modal-title,
body.ruta-ventas #modalReasignarCotizacion .modal-title {
    font-weight: 700;
    font-size: 18px;
    color: #D4AF37;
}
body.ruta-ventas #modalRelacionarCotizacion .modal-body,
body.ruta-ventas #modalReasignarCotizacion .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    background: #ffffff;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px;
}
body.ruta-ventas #modalRelacionarCotizacion .form-group,
body.ruta-ventas #modalReasignarCotizacion .form-group {
    margin-bottom: 16px;
}
body.ruta-ventas #modalRelacionarCotizacion .form-group label,
body.ruta-ventas #modalReasignarCotizacion .form-group label {
    display: block;
    font-weight: 700;
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 5px;
}
body.ruta-ventas #modalRelacionarCotizacion .input-group,
body.ruta-ventas #modalReasignarCotizacion .input-group {
    display: flex;
    width: 100%;
}
body.ruta-ventas #modalRelacionarCotizacion .input-group > .input-group-addon,
body.ruta-ventas #modalReasignarCotizacion .input-group > .input-group-addon {
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
}
body.ruta-ventas #modalRelacionarCotizacion .input-group > .form-control,
body.ruta-ventas #modalReasignarCotizacion .input-group > .form-control,
body.ruta-ventas #modalRelacionarCotizacion .input-group > .select2-container,
body.ruta-ventas #modalReasignarCotizacion .input-group > .select2-container {
    flex: 1 1 auto;
    width: 1% !important;
    min-width: 0;
}
body.ruta-ventas #modalRelacionarCotizacion .form-control,
body.ruta-ventas #modalReasignarCotizacion .form-control {
    border-radius: 6px;
}
body.ruta-ventas #modalRelacionarCotizacion .form-control[readonly],
body.ruta-ventas #modalReasignarCotizacion .form-control[readonly] {
    background: #faf8f2;
    color: #777;
}
body.ruta-ventas #modalRelacionarCotizacion .input-lg,
body.ruta-ventas #modalReasignarCotizacion .input-lg {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 13px;
}
body.ruta-ventas #modalRelacionarCotizacion .btn-primary,
body.ruta-ventas #modalReasignarCotizacion .btn-primary {
    background-color: #1A1A1A;
    border-color: #1A1A1A;
    color: #D4AF37;
    border-radius: 20px;
    font-weight: 700;
}
body.ruta-ventas #modalRelacionarCotizacion .btn-default,
body.ruta-ventas #modalReasignarCotizacion .btn-default {
    border-radius: 20px;
}
body.ruta-ventas #modalRelacionarCotizacion .modal-footer,
body.ruta-ventas #modalReasignarCotizacion .modal-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    padding: 14px 24px;
}
body.ruta-ventas #modalRelacionarCotizacion .modal-footer .btn,
body.ruta-ventas #modalReasignarCotizacion .modal-footer .btn {
    flex: 1 1 0;
    margin: 0;
}
body.ruta-ventas #modalReasignarCotizacion .help-block {
    margin-top: 8px;
    font-size: 12px;
}

/* --- Módulo AGENDA: botones de acción (lápiz/asignar/relacionar/
borrar) de la tabla con los colores de marca en vez de los
genéricos de Bootstrap — mismo patrón que Actividades Diarias. El
<td> de Acciones usa white-space:nowrap + botones compactos para
que los 3 iconos queden en una sola fila (el HTML no siempre cierra
el .btn-group, así que el selector apunta a cualquier .btn dentro
de la última columna, no solo a los de adentro del grupo). --- */
body.ruta-ventas .custom-table-agenda td:last-child {
    white-space: nowrap;
}
body.ruta-ventas .custom-table-agenda td:last-child .btn {
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,.15);
    margin-right: 4px;
    margin-bottom: 0;
    border: none;
    padding: 6px 9px;
    font-size: 12px;
}
body.ruta-ventas .custom-table-agenda td:last-child .btn:last-child {
    margin-right: 0;
}
body.ruta-ventas .custom-table-agenda .btnEditarVenta,
body.ruta-ventas .custom-table-agenda .btnEditarRecorrido,
body.ruta-ventas .custom-table-agenda .btnEditarClienteDigital {
    background: linear-gradient(180deg,#D4AF37,#b8942c);
    color: #1A1A1A;
}
body.ruta-ventas .custom-table-agenda .btnEditarVenta:hover,
body.ruta-ventas .custom-table-agenda .btnEditarRecorrido:hover,
body.ruta-ventas .custom-table-agenda .btnEditarClienteDigital:hover {
    background: linear-gradient(180deg,#c29d2e,#9c7a20);
    color: #1A1A1A;
}
body.ruta-ventas .custom-table-agenda .btnLeerDatosReAsignacion {
    background: #1A1A1A;
    color: #D4AF37;
}
body.ruta-ventas .custom-table-agenda .btnLeerDatosReAsignacion:hover {
    background: #000000;
    color: #D4AF37;
}
body.ruta-ventas .custom-table-agenda .btnLeerDatos {
    background: #eef1f5;
    color: #3c5a73;
}
body.ruta-ventas .custom-table-agenda .btnLeerDatos:hover {
    background: #dde3ea;
}
body.ruta-ventas .custom-table-agenda .btnEliminarVenta {
    background: #c0392b;
    color: #fff;
}
body.ruta-ventas .custom-table-agenda .btnEliminarVenta:hover {
    background: #962d22;
}

/* --- Módulo CLIENTES DIGITALES: modal "Agregar Cliente Digital"
como PANEL DESLIZANTE DESDE LA DERECHA, mismo patrón que
Usuarios/Clientes/Campañas/Agenda. Más ancho que los demás (600px)
porque tiene bastantes más campos. El ID #modalAgregarCliente se
repite en Clientes/Recorrido/Crear Venta, por eso todo va scoped a
body.ruta-digitales. --- */
body.ruta-digitales #modalAgregarCliente .modal-dialog {
    position: fixed !important;
    top: 0;
    right: 0;
    margin: 0;
    height: 100%;
    width: 600px;
    max-width: 96vw;
    display: block !important;
}
body.ruta-digitales #modalAgregarCliente.fade .modal-dialog {
    -webkit-transform: translate(100%, 0);
    -ms-transform: translate(100%, 0);
    transform: translate(100%, 0);
    -webkit-transition: -webkit-transform .25s ease-out;
    transition: transform .25s ease-out;
}
body.ruta-digitales #modalAgregarCliente.in .modal-dialog {
    -webkit-transform: translate(0, 0);
    -ms-transform: translate(0, 0);
    transform: translate(0, 0);
}
body.ruta-digitales #modalAgregarCliente .modal-content {
    height: 100%;
    background: #ffffff;
    border-radius: 0;
    border: none;
    box-shadow: -8px 0 30px rgba(0,0,0,.15);
    display: flex;
    flex-direction: column;
}
body.ruta-digitales #modalAgregarCliente .modal-header {
    background: #1A1A1A !important;
    color: #D4AF37 !important;
    border-bottom: 1px solid #000;
    flex-shrink: 0;
    padding: 18px 24px;
}
body.ruta-digitales #modalAgregarCliente .modal-header .close {
    color: #D4AF37;
    opacity: .7;
}
body.ruta-digitales #modalAgregarCliente .modal-header .close:hover {
    opacity: 1;
}
body.ruta-digitales #modalAgregarCliente .modal-title {
    font-weight: 700;
    font-size: 18px;
    color: #D4AF37;
}
body.ruta-digitales #modalAgregarCliente .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    background: #ffffff;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px;
}
/* Dos columnas: los campos se acomodan de a 2 por fila (en vez de
uno debajo del otro) para aprovechar el panel más ancho. El campo
de Observación (.campo-ancho) ocupa las 2 columnas, en su propia
fila. */
body.ruta-digitales #modalAgregarCliente .modal-body > .box-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    align-items: start;
}
/* A TODOS los campos se les da una columna explícita (impar=1,
par=2) — si solo el campo ancho tenía columna explícita y el resto
quedaba en auto-posicionado, el algoritmo de CSS Grid coloca primero
los que tienen columna fija (sin importar en qué orden aparecen en
el HTML) y recién después acomoda el resto alrededor, lo que
desordenaba todo el formulario. Dándole columna a todos se evita esa
mezcla y quedan en el orden real del HTML. */
body.ruta-digitales #modalAgregarCliente .modal-body > .box-body > .form-group:nth-of-type(odd) {
    grid-column: 1;
}
body.ruta-digitales #modalAgregarCliente .modal-body > .box-body > .form-group:nth-of-type(even) {
    grid-column: 2;
}
body.ruta-digitales #modalAgregarCliente .modal-body > .box-body > .campo-ancho {
    grid-column: 1 / -1 !important;
}
body.ruta-digitales #modalAgregarCliente .form-group {
    margin-bottom: 16px;
}
body.ruta-digitales #modalAgregarCliente .form-group label {
    display: block;
    font-weight: 700;
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 5px;
}
body.ruta-digitales #modalAgregarCliente .input-group {
    display: flex;
    width: 100%;
}
body.ruta-digitales #modalAgregarCliente .input-group > .input-group-addon {
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
}
body.ruta-digitales #modalAgregarCliente .input-group > .form-control,
body.ruta-digitales #modalAgregarCliente .input-group > .select2-container {
    flex: 1 1 auto;
    width: 1% !important;
    min-width: 0;
}
body.ruta-digitales #modalAgregarCliente .form-control {
    border-radius: 6px;
}
body.ruta-digitales #modalAgregarCliente .input-lg {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 13px;
}
body.ruta-digitales #modalAgregarCliente .btn-primary,
body.ruta-digitales #modalAgregarCliente input[type="submit"].btn-primary {
    background-color: #1A1A1A;
    border-color: #1A1A1A;
    color: #D4AF37;
    border-radius: 20px;
    font-weight: 700;
}
body.ruta-digitales #modalAgregarCliente .btn-default {
    border-radius: 20px;
}
body.ruta-digitales #modalAgregarCliente .modal-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    padding: 14px 24px;
}
body.ruta-digitales #modalAgregarCliente .modal-footer .btn,
body.ruta-digitales #modalAgregarCliente .modal-footer input[type="submit"] {
    flex: 1 1 0;
    margin: 0;
}

/* --- Módulo CLIENTES DIGITALES: modal "Información Cliente" (el
que abre el lápiz) — mismo panel deslizante y mismas 2 columnas que
"Agregar Cliente Digital". El ID #modalEditarCliente se repite en
Recorrido, por eso va scoped a body.ruta-digitales. --- */
body.ruta-digitales #modalEditarCliente .modal-dialog {
    position: fixed !important;
    top: 0;
    right: 0;
    margin: 0;
    height: 100%;
    width: 600px;
    max-width: 96vw;
    display: block !important;
}
body.ruta-digitales #modalEditarCliente.fade .modal-dialog {
    -webkit-transform: translate(100%, 0);
    -ms-transform: translate(100%, 0);
    transform: translate(100%, 0);
    -webkit-transition: -webkit-transform .25s ease-out;
    transition: transform .25s ease-out;
}
body.ruta-digitales #modalEditarCliente.in .modal-dialog {
    -webkit-transform: translate(0, 0);
    -ms-transform: translate(0, 0);
    transform: translate(0, 0);
}
body.ruta-digitales #modalEditarCliente .modal-content {
    height: 100%;
    background: #ffffff;
    border-radius: 0;
    border: none;
    box-shadow: -8px 0 30px rgba(0,0,0,.15);
    display: flex;
    flex-direction: column;
}
body.ruta-digitales #modalEditarCliente .modal-header {
    background: #1A1A1A !important;
    color: #D4AF37 !important;
    border-bottom: 1px solid #000;
    flex-shrink: 0;
    padding: 18px 24px;
}
body.ruta-digitales #modalEditarCliente .modal-header .close {
    color: #D4AF37;
    opacity: .7;
}
body.ruta-digitales #modalEditarCliente .modal-header .close:hover {
    opacity: 1;
}
body.ruta-digitales #modalEditarCliente .modal-title {
    font-weight: 700;
    font-size: 18px;
    color: #D4AF37;
}
body.ruta-digitales #modalEditarCliente .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    background: #ffffff;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px;
}
body.ruta-digitales #modalEditarCliente .modal-body > .box-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    align-items: start;
}
body.ruta-digitales #modalEditarCliente .modal-body > .box-body > .form-group:nth-of-type(odd) {
    grid-column: 1;
}
body.ruta-digitales #modalEditarCliente .modal-body > .box-body > .form-group:nth-of-type(even) {
    grid-column: 2;
}
body.ruta-digitales #modalEditarCliente .modal-body > .box-body > .campo-ancho {
    grid-column: 1 / -1 !important;
}
body.ruta-digitales #modalEditarCliente .form-group {
    margin-bottom: 16px;
}
body.ruta-digitales #modalEditarCliente .form-group label {
    display: block;
    font-weight: 700;
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 5px;
}
body.ruta-digitales #modalEditarCliente .input-group {
    display: flex;
    width: 100%;
}
body.ruta-digitales #modalEditarCliente .input-group > .input-group-addon {
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
}
body.ruta-digitales #modalEditarCliente .input-group > .form-control,
body.ruta-digitales #modalEditarCliente .input-group > .select2-container {
    flex: 1 1 auto;
    width: 1% !important;
    min-width: 0;
}
body.ruta-digitales #modalEditarCliente .form-control {
    border-radius: 6px;
}
body.ruta-digitales #modalEditarCliente .input-lg {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 13px;
}
body.ruta-digitales #modalEditarCliente .btn-primary,
body.ruta-digitales #modalEditarCliente input[type="submit"].btn-primary {
    background-color: #1A1A1A;
    border-color: #1A1A1A;
    color: #D4AF37;
    border-radius: 20px;
    font-weight: 700;
}
body.ruta-digitales #modalEditarCliente .btn-default {
    border-radius: 20px;
}
body.ruta-digitales #modalEditarCliente .modal-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    padding: 14px 24px;
}
body.ruta-digitales #modalEditarCliente .modal-footer .btn,
body.ruta-digitales #modalEditarCliente .modal-footer input[type="submit"] {
    flex: 1 1 0;
    margin: 0;
}
