.crm-form-wrapper {
    display: flex;
    justify-content: center;
    padding: 30px;
    background-color: #f4f6f9;
}

.crm-card {
    width: 420px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.crm-card-header {
    padding: 18px 24px;
    border-bottom: 1px solid #eee;
    background-color: #fafafa;
}

    .crm-card-header h4 {
        margin: 0;
        font-weight: 600;
        font-size: 16px;
        color: #333;
    }

.crm-card-body {
    padding: 24px;
}

/* Formulario edición tenant (página completa): ancho amplio + rejilla */
.crm-form-wrapper.tenant-edit-form {
    justify-content: flex-start;
    padding: 16px 20px 32px;
}

.crm-form-wrapper.tenant-edit-form .crm-card {
    width: 100%;
    max-width: 1180px;
}

.tenant-edit-form .crm-card-body {
    padding: 20px 22px 28px;
}

.tenant-edit-form .row {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 0.75rem;
}

.tenant-edit-form .control-wrapper,
.tenant-edit-form .control-wrapper .e-ddl,
.tenant-edit-form .control-wrapper .e-input-group {
    width: 100%;
}

.tenant-edit-form .e-input-group.e-control-wrapper {
    width: 100% !important;
}

.tenant-edit-form .tenant-edit-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    color: #6c757d;
}

@media (max-width: 767.98px) {
    .crm-form-wrapper.tenant-edit-form {
        padding: 12px;
    }
}

.form-group {
    margin-bottom: 18px;
}

    .form-group label {
        display: block;
        font-size: 13px;
        font-weight: 500;
        margin-bottom: 6px;
        color: #555;
    }

.form-control {
    width: 100%;
    height: 38px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #dcdcdc;
    font-size: 14px;
    transition: all 0.2s ease;
}

    .form-control:focus {
        border-color: #006d4e; /* tu verde SICAFI */
        box-shadow: 0 0 0 2px rgba(0, 109, 78, 0.1);
        outline: none;
    }
/* ============================= */
/* PAGE WRAPPER */
/* ============================= */
.soc-page {
    width: 100%;
    margin: 0;
    padding: 0;
}

.soc-page-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 20px 24px 40px;
}

/* Layout dedicado /plataforma (sin sidebar) — mismo padding aproximado que .soc-main-content */
.soc-plataforma-layout {
    flex: 1;
    min-height: 0;
    padding: 20px 24px 40px;
    overflow: auto;
}

/* ============================= */
/* HEADER */
/* ============================= */
.soc-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.soc-title {
    font-size: 18px;
    font-weight: 600;
    color: #006d4e;
    letter-spacing: 0.01em;
}

/* ============================= */
/* BUTTON */
/* ============================= */
.soc-btn-primary {
    background-color: #006d4e !important;
    border-color: #006d4e !important;
    color: white !important;
    border-radius: 6px !important;
    padding: 6px 18px !important;
}

    .soc-btn-primary:hover {
        background-color: #00543c !important;
    }

/* ============================= */
/* GRID STYLE */
/* ============================= */
.soc-grid .e-gridheader {
    background-color: transparent;
    border-bottom: 2px solid #006d4e;
}

.soc-grid .e-headercell {
    font-weight: 600;
    color: #222;
}

.soc-grid .e-rowcell {
    border-bottom: 1px solid #dcdcdc;
    padding: 10px 8px;
}

.soc-grid .e-row:hover {
    background-color: #f6f9f8;
}

/* solo líneas horizontales */
.soc-grid .e-gridcontent {
    border: none;
}

/* ============================= */
/* DIALOG */
/* ============================= */
.soc-dialog .e-dlg-header,
.soc-dialog .e-dlg-header .e-dlg-title,
.soc-dialog .e-dlg-header-content .e-dlg-title,
.soc-dialog .e-dlg-header .e-dialog-title,
.soc-dialog .e-dlg-header-content .e-dialog-title {
    font-weight: 600;
    color: #006d4e !important;
}

/* Diálogos de Mi Equipo: scroll interno para no quedar tapados por el header */
.soc-staff-dialog.e-dialog {
    max-height: calc(100vh - 90px) !important;
}
.soc-staff-dialog .e-dlg-content {
    overflow-y: auto;
    max-height: calc(100vh - 170px);
}

/* Diálogos específicos de Leads: encabezado verde con texto blanco */
.soc-leads-dialog .e-dlg-header-content,
.soc-leads-dialog .e-dlg-header {
    background-color: #006d4e;
    color: #ffffff;
}

.soc-leads-dialog .e-dlg-header .e-dlg-title,
.soc-leads-dialog .e-dlg-header-content .e-dlg-title {
    color: #ffffff;
}

.soc-leads-dialog .e-dlg-closeicon-btn .e-btn-icon {
    color: #ffffff;
}

/* Asegura que los diálogos de Leads queden por encima del overlay (forzado a 9999) y del sidebar de chat IA */
.soc-leads-dialog.e-dialog {
    z-index: 10000 !important;
}

/* Cambiar contraseña: un renglón por campo y botón */
.soc-change-password-form {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.soc-change-password-form .soc-password-row {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
}
.soc-change-password-form .soc-password-row:last-of-type,
.soc-change-password-form .soc-password-row-button {
    margin-bottom: 0;
    margin-top: 0.5rem;
}
.soc-change-password-form .soc-password-row .e-input-group,
.soc-change-password-form .soc-password-row input {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}

/* Sidebar fondo principal */
.soc-sf-sidebar.e-sidebar {
    background-color: #006d4e !important;
    color: #ffffff !important;
}

/* Texto general dentro del sidebar */
.soc-sf-sidebar .e-menu,
.soc-sf-sidebar .e-menu .e-menu-item,
.soc-sf-sidebar .e-menu .e-menu-item .e-menu-text {
    color: #ffffff !important;
    background-color: transparent !important;
}

    /* Hover del menú */
    .soc-sf-sidebar .e-menu .e-menu-item:hover {
        background-color: rgba(255, 255, 255, 0.15) !important;
    }

    /* Item activo */
    .soc-sf-sidebar .e-menu .e-menu-item.e-selected {
        background-color: rgba(255, 255, 255, 0.25) !important;
        color: #ffffff !important;
    }

/* Header superior */
.soc-sidebar-header {
    background-color: #006d4e;
    color: #ffffff;
}

/* Botón cerrar */
.soc-sidebar-close {
    color: #ffffff;
}
/* Fondo real del sidebar */
.soc-sf-sidebar,
.soc-sf-sidebar.e-sidebar,
.soc-sf-sidebar .e-sidebar,
.soc-sf-sidebar .e-sidebar-content {
    background-color: #006d4e !important;
    color: #ffffff !important;
}

    /* Fondo del menú interno */
    .soc-sf-sidebar .e-menu {
        background-color: #006d4e !important;
    }

        /* Items del menú */
        .soc-sf-sidebar .e-menu .e-menu-item {
            background-color: transparent !important;
            color: #ffffff !important;
        }

        /* Texto del menú */
        .soc-sf-sidebar .e-menu .e-menu-text {
            color: #ffffff !important;
        }

        /* Hover */
        .soc-sf-sidebar .e-menu .e-menu-item:hover {
            background-color: rgba(255,255,255,0.15) !important;
        }

        /* Seleccionado */
        .soc-sf-sidebar .e-menu .e-menu-item.e-selected {
            background-color: rgba(255,255,255,0.25) !important;
        }
        /* Quitar fondo gris del item seleccionado */
        .soc-sf-sidebar .e-menu .e-menu-item.e-selected,
        .soc-sf-sidebar .e-menu .e-menu-item.e-focused,
        .soc-sf-sidebar .e-menu .e-menu-item.e-active {
            background-color: rgba(255,255,255,0.20) !important;
            color: #ffffff !important;
        }

        /* Quitar fondo gris por defecto */
        .soc-sf-sidebar .e-menu .e-menu-item {
            background-color: transparent !important;
        }

            /* Hover elegante */
            .soc-sf-sidebar .e-menu .e-menu-item:hover {
                background-color: rgba(255,255,255,0.15) !important;
            }

    /* Forzar fondo corporativo completo */
    .soc-sf-sidebar.e-sidebar,
    .soc-sf-sidebar .e-sidebar-content,
    .soc-sf-sidebar .e-menu,
    .soc-sf-sidebar .e-menu-parent {
        background-color: #006d4e !important;
    }

        /* Quitar fondo gris del item */
        .soc-sf-sidebar .e-menu .e-menu-item,
        .soc-sf-sidebar .e-menu-parent .e-menu-item {
            background-color: transparent !important;
            color: #ffffff !important;
        }

            /* Quitar gris cuando está seleccionado */
            .soc-sf-sidebar .e-menu .e-menu-item.e-selected,
            .soc-sf-sidebar .e-menu .e-menu-item.e-focused,
            .soc-sf-sidebar .e-menu .e-menu-item.e-active {
                background-color: rgba(255,255,255,0.20) !important;
                color: #ffffff !important;
            }

            /* Hover */
            .soc-sf-sidebar .e-menu .e-menu-item:hover {
                background-color: rgba(255,255,255,0.15) !important;
                color: #ffffff !important;
            }

            /* Iconos blancos */
            .soc-sf-sidebar .e-menu .e-menu-item .e-menu-icon {
                color: #ffffff !important;
            }
.e-sidebar-overlay {
    background-color: transparent !important;
}
.e-sidebar-overlay,
.e-backdrop {
    display: none !important;
    background: transparent !important;
}

/* Quitar fondo del anchor interno */
.soc-sf-sidebar .e-menu-item .e-menu-url {
    background-color: transparent !important;
    color: #ffffff !important;
}

/* Quitar fondo del wrapper interno */
.soc-sf-sidebar .e-menu-item .e-anchor-wrap {
    background-color: transparent !important;
}

/* Forzar item seleccionado */
.soc-sf-sidebar .e-menu-item.e-selected .e-menu-url,
.soc-sf-sidebar .e-menu-item.e-active .e-menu-url {
    background-color: rgba(255,255,255,0.20) !important;
    color: #ffffff !important;
}

/* Hover real */
.soc-sf-sidebar .e-menu-item:hover .e-menu-url {
    background-color: rgba(255,255,255,0.15) !important;
    color: #ffffff !important;
}
/* Fondo base completo */
.soc-sf-sidebar .e-menu-parent.e-vertical {
    background-color: #006d4e !important;
}

    /* Quitar fondo gris real */
    .soc-sf-sidebar .e-menu-parent.e-vertical .e-menu-item {
        background-color: transparent !important;
    }

        /* Quitar gris del anchor */
        .soc-sf-sidebar .e-menu-parent.e-vertical .e-menu-item .e-menu-url {
            background-color: transparent !important;
            color: #ffffff !important;
        }

        /* Hover */
        .soc-sf-sidebar .e-menu-parent.e-vertical .e-menu-item:hover,
        .soc-sf-sidebar .e-menu-parent.e-vertical .e-menu-item:hover .e-menu-url {
            background-color: rgba(255,255,255,0.15) !important;
            color: #ffffff !important;
        }

        /* Seleccionado */
        .soc-sf-sidebar .e-menu-parent.e-vertical .e-menu-item.e-selected,
        .soc-sf-sidebar .e-menu-parent.e-vertical .e-menu-item.e-selected .e-menu-url {
            background-color: rgba(255,255,255,0.25) !important;
            color: #ffffff !important;
        }

/* ============================= */
/* MÓDULO CONTACTO / BARRA DE HERRAMIENTAS */
/* ============================= */
.contacto-module {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

.soc-contact-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.soc-contact-stepper-wrap {
    flex: 1;
    min-width: 0;
    max-width: 100%;
}
.soc-contact-stepper-wrap .soc-contact-stepper {
    width: 100%;
}
@media (max-width: 900px) {
    .soc-contact-header-row { flex-direction: column; align-items: flex-start; }
    .soc-contact-stepper-wrap { width: 100%; }
}

/* Filtros broker/empleado en /Contacts (alineado con Kanban) */
.soc-contacts-scope-filters {
    max-width: 420px;
    width: 100%;
    margin-bottom: 8px;
}
.soc-contacts-scope-filters .soc-form-row { margin-bottom: 14px; }
.soc-contacts-scope-filters .soc-form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 6px;
}
.soc-contacts-scope-filters .e-ddl,
.soc-contacts-scope-filters .e-input-group.e-outline {
    width: 100%;
}
.soc-opportunities-scope-filters {
    max-width: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 420px));
    gap: 12px 16px;
    align-items: end;
}
.soc-opportunities-scope-filters .soc-form-row { margin-bottom: 0; }
@media (max-width: 900px) {
    .soc-opportunities-scope-filters { grid-template-columns: 1fr; }
}

.soc-contact-toolbar {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    width: 100%;
    min-height: 44px;
    padding: 6px 16px;
    margin: 0;
    background-color: #F4F7FB;
    border-bottom: 2px solid #D1DCE8;
    box-shadow: none;
    box-sizing: border-box;
}

.soc-contact-toolbar .e-btn {
    background-color: #ffffff !important;
    border: 1px solid #D1D5DB !important;
    color: #374151 !important;
    border-radius: 6px !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

.soc-contact-toolbar .e-btn:hover:not(:disabled) {
    background-color: #F9FAFB !important;
    border-color: #006d4e !important;
    color: #006d4e !important;
}

.soc-contact-toolbar .e-btn.e-disabled,
.soc-contact-toolbar .e-btn:disabled {
    opacity: 0.5;
}

/* Toolbar en módulo Contacto */
.contacto-module .soc-contact-toolbar {
    padding: 6px 20px;
    margin-bottom: 0;
    min-height: 44px;
}

/* /Contacts — grupo de botones conectados estilo toolbar enterprise */
.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action {
    background-color: #0064a6 !important;
    border: 1px solid #069bd8 !important;
    border-right: 1px solid rgba(255,255,255,0.25) !important;
    color: #ffffff !important;
    border-radius: 0 !important;
    padding: 6px 13px !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em !important;
    box-shadow: none !important;
    transition: background-color 0.12s ease !important;
}

.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action:first-of-type {
    border-radius: 4px 0 0 4px !important;
}

.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action:last-of-type {
    border-radius: 0 4px 4px 0 !important;
    border-right: 1px solid #069bd8 !important;
}

.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action .e-btn-icon,
.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action .e-btn-icon::before,
.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action .e-btn-content {
    color: #ffffff !important;
}

.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action:hover:not(:disabled):not(.e-disabled) {
    background-color: #0589d2 !important;
    border-color: #0589d2 !important;
    border-right: 1px solid rgba(255,255,255,0.25) !important;
    color: #ffffff !important;
}

.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action:hover:not(:disabled):not(.e-disabled):last-of-type {
    border-right: 1px solid #0589d2 !important;
}

.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action:hover:not(:disabled):not(.e-disabled) .e-btn-icon,
.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action:hover:not(:disabled):not(.e-disabled) .e-btn-icon::before,
.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action:hover:not(:disabled):not(.e-disabled) .e-btn-content {
    color: #ffffff !important;
}

.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action:disabled,
.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action.e-disabled {
    opacity: 1 !important;
    background-color: #80cff5 !important;
    border-color: #80cff5 !important;
    border-right: 1px solid rgba(255,255,255,0.25) !important;
    color: #ffffff !important;
    cursor: default !important;
}

.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action:disabled .e-btn-icon,
.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action:disabled .e-btn-icon::before,
.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action:disabled .e-btn-content,
.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action.e-disabled .e-btn-icon,
.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action.e-disabled .e-btn-icon::before,
.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action.e-disabled .e-btn-content {
    color: #ffffff !important;
}

.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action .bi {
    color: #ffffff !important;
}

.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action:hover:not(:disabled):not(.e-disabled) .bi {
    color: #ffffff !important;
}

.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action:disabled .bi,
.contacto-module .soc-contact-toolbar .e-btn.soc-contact-toolbar-action.e-disabled .bi {
    color: #ffffff !important;
}

/* ============================= */
/* CONTACTO — Toolbar botones estilo limpio */
/* ============================= */
.contacto-sf-toolbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid #E5E7EB !important;
    box-shadow: none !important;
    gap: 2px !important;
}

/* Botón transparente, texto e icono azul */
.contacto-sf-toolbar .e-btn.soc-tb-btn {
    background: transparent !important;
    border: none !important;
    border-radius: 6px !important;
    color: #0064a6 !important;
    height: 32px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    transition: background-color 0.12s ease, color 0.12s ease !important;
}

.contacto-sf-toolbar .e-btn.soc-tb-btn .e-btn-icon,
.contacto-sf-toolbar .e-btn.soc-tb-btn .e-btn-icon::before,
.contacto-sf-toolbar .e-btn.soc-tb-btn .e-btn-content {
    color: #0064a6 !important;
}

/* Hover: fondo azul fuerte, texto blanco */
.contacto-sf-toolbar .e-btn.soc-tb-btn:hover:not(:disabled):not(.e-disabled) {
    background-color: #0589d2 !important;
    color: #ffffff !important;
}

.contacto-sf-toolbar .e-btn.soc-tb-btn:hover:not(:disabled):not(.e-disabled) .e-btn-icon,
.contacto-sf-toolbar .e-btn.soc-tb-btn:hover:not(:disabled):not(.e-disabled) .e-btn-icon::before,
.contacto-sf-toolbar .e-btn.soc-tb-btn:hover:not(:disabled):not(.e-disabled) .e-btn-content {
    color: #ffffff !important;
}

/* Deshabilitado (Guardar sin contacto seleccionado) */
.contacto-sf-toolbar .e-btn.soc-tb-btn.e-disabled,
.contacto-sf-toolbar .e-btn.soc-tb-btn:disabled {
    background: transparent !important;
    border: none !important;
    opacity: 0.35 !important;
    box-shadow: none !important;
}

.contacto-sf-toolbar .e-btn.soc-tb-btn.e-disabled .e-btn-icon,
.contacto-sf-toolbar .e-btn.soc-tb-btn.e-disabled .e-btn-icon::before,
.contacto-sf-toolbar .e-btn.soc-tb-btn.e-disabled .e-btn-content {
    color: #0064a6 !important;
}

/* Botones píldora (primario relleno / secundario contorno) — guía azul SOC + estados hover y deshabilitado */
.e-btn.soc-proposal-pill-primary,
button.e-btn.soc-proposal-pill-primary {
    border-radius: 9999px !important;
    padding: 8px 22px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
    background-color: #0064a6 !important;
    border: 1px solid #0064a6 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.e-btn.soc-proposal-pill-primary:hover:not(:disabled):not(.e-disabled),
button.e-btn.soc-proposal-pill-primary:hover:not(:disabled):not(.e-disabled) {
    background-color: #005a9c !important;
    border-color: #005a9c !important;
    color: #ffffff !important;
}

.e-btn.soc-proposal-pill-primary:disabled,
.e-btn.soc-proposal-pill-primary.e-disabled,
button.e-btn.soc-proposal-pill-primary:disabled,
button.e-btn.soc-proposal-pill-primary.e-disabled {
    background-color: #8ed6f7 !important;
    border-color: #8ed6f7 !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

.e-btn.soc-proposal-pill-primary .e-btn-icon,
.e-btn.soc-proposal-pill-primary .e-btn-icon::before {
    color: #ffffff !important;
}

/* Botón azul claro (Enviar Acceso) */
.e-btn.soc-proposal-pill-primary.inm-btn-azul-claro,
button.e-btn.soc-proposal-pill-primary.inm-btn-azul-claro {
    background: #79ceff !important;
    border: 1px solid #79ceff !important;
    color: #0c4a6e !important;
}
.e-btn.soc-proposal-pill-primary.inm-btn-azul-claro:hover:not(:disabled):not(.e-disabled),
button.e-btn.soc-proposal-pill-primary.inm-btn-azul-claro:hover:not(:disabled):not(.e-disabled) {
    background: #4db8f5 !important;
    border-color: #4db8f5 !important;
    color: #0c4a6e !important;
}
.e-btn.soc-proposal-pill-primary.inm-btn-azul-claro .e-btn-icon,
.e-btn.soc-proposal-pill-primary.inm-btn-azul-claro .e-btn-icon::before {
    color: #0c4a6e !important;
}

/* Botón verde claro (Editar) */
.e-btn.soc-proposal-pill-primary.inm-btn-verde,
button.e-btn.soc-proposal-pill-primary.inm-btn-verde {
    background: #c0f2cf !important;
    border: 1px solid #c0f2cf !important;
    color: #14532d !important;
}
.e-btn.soc-proposal-pill-primary.inm-btn-verde:hover:not(:disabled):not(.e-disabled),
button.e-btn.soc-proposal-pill-primary.inm-btn-verde:hover:not(:disabled):not(.e-disabled) {
    background: #a3e8bb !important;
    border-color: #a3e8bb !important;
    color: #14532d !important;
}
.e-btn.soc-proposal-pill-primary.inm-btn-verde .e-btn-icon,
.e-btn.soc-proposal-pill-primary.inm-btn-verde .e-btn-icon::before {
    color: #14532d !important;
}

/* Botón naranja (combina con el azul del icono y el gris de los demás botones) */
.e-btn.soc-proposal-pill-primary.inm-btn-naranja,
button.e-btn.soc-proposal-pill-primary.inm-btn-naranja {
    background: #ffd2c7 !important;
    border: 1px solid #ffd2c7 !important;
    color: #7c2d12 !important;
}
.e-btn.soc-proposal-pill-primary.inm-btn-naranja:hover:not(:disabled):not(.e-disabled),
button.e-btn.soc-proposal-pill-primary.inm-btn-naranja:hover:not(:disabled):not(.e-disabled) {
    background: #ffbfae !important;
    border-color: #ffbfae !important;
    color: #7c2d12 !important;
}
.e-btn.soc-proposal-pill-primary.inm-btn-naranja .e-btn-icon,
.e-btn.soc-proposal-pill-primary.inm-btn-naranja .e-btn-icon::before {
    color: #7c2d12 !important;
}

/* Botón naranja sólido (Cancelar en diálogos) */
.e-btn.soc-proposal-pill-primary.soc-btn-naranja-solido,
button.e-btn.soc-proposal-pill-primary.soc-btn-naranja-solido {
    background: #ff7150 !important;
    border: 1px solid #ff7150 !important;
    color: #ffffff !important;
}
.e-btn.soc-proposal-pill-primary.soc-btn-naranja-solido:hover:not(:disabled):not(.e-disabled),
button.e-btn.soc-proposal-pill-primary.soc-btn-naranja-solido:hover:not(:disabled):not(.e-disabled) {
    background: #e65f3f !important;
    border-color: #e65f3f !important;
    color: #ffffff !important;
}
.e-btn.soc-proposal-pill-primary.soc-btn-naranja-solido .e-btn-icon,
.e-btn.soc-proposal-pill-primary.soc-btn-naranja-solido .e-btn-icon::before {
    color: #ffffff !important;
}

/* Botón rojo sólido (Borrar/Eliminar) */
.e-btn.soc-proposal-pill-primary.soc-btn-rojo-solido,
button.e-btn.soc-proposal-pill-primary.soc-btn-rojo-solido {
    background: #e5431d !important;
    border: 1px solid #e5431d !important;
    color: #ffffff !important;
}
.e-btn.soc-proposal-pill-primary.soc-btn-rojo-solido:hover:not(:disabled):not(.e-disabled),
button.e-btn.soc-proposal-pill-primary.soc-btn-rojo-solido:hover:not(:disabled):not(.e-disabled) {
    background: #c83714 !important;
    border-color: #c83714 !important;
    color: #ffffff !important;
}
.e-btn.soc-proposal-pill-primary.soc-btn-rojo-solido .e-btn-icon,
.e-btn.soc-proposal-pill-primary.soc-btn-rojo-solido .e-btn-icon::before {
    color: #ffffff !important;
}

.soc-anuncio-action-btn.e-btn {
    width: 26px !important;
    min-width: 26px !important;
    flex: 0 0 auto !important;
    padding: 0 !important;
    font-size: 12px !important;
    min-height: 26px !important;
    height: 26px !important;
    line-height: 1 !important;
    border-radius: 999px !important;
}
.soc-anuncio-action-btn.e-btn .e-btn-icon {
    font-size: 12px !important;
    margin: 0 !important;
}

/* Botón azul (Activar) */
.e-btn.soc-proposal-pill-primary.inm-btn-azul-activar,
button.e-btn.soc-proposal-pill-primary.inm-btn-azul-activar {
    background: #007ecd !important;
    border: 1px solid #007ecd !important;
    color: #ffffff !important;
}
.e-btn.soc-proposal-pill-primary.inm-btn-azul-activar:hover:not(:disabled):not(.e-disabled),
button.e-btn.soc-proposal-pill-primary.inm-btn-azul-activar:hover:not(:disabled):not(.e-disabled) {
    background: #006aad !important;
    border-color: #006aad !important;
    color: #ffffff !important;
}
.e-btn.soc-proposal-pill-primary.inm-btn-azul-activar .e-btn-icon,
.e-btn.soc-proposal-pill-primary.inm-btn-azul-activar .e-btn-icon::before {
    color: #ffffff !important;
}

/* Botón rojo (Desactivar) */
.e-btn.soc-proposal-pill-primary.inm-btn-rojo,
button.e-btn.soc-proposal-pill-primary.inm-btn-rojo {
    background: #e5431d !important;
    border: 1px solid #e5431d !important;
    color: #ffffff !important;
}
.e-btn.soc-proposal-pill-primary.inm-btn-rojo:hover:not(:disabled):not(.e-disabled),
button.e-btn.soc-proposal-pill-primary.inm-btn-rojo:hover:not(:disabled):not(.e-disabled) {
    background: #c2360f !important;
    border-color: #c2360f !important;
    color: #ffffff !important;
}
.e-btn.soc-proposal-pill-primary.inm-btn-rojo .e-btn-icon,
.e-btn.soc-proposal-pill-primary.inm-btn-rojo .e-btn-icon::before {
    color: #ffffff !important;
}

/* Botón primario azul corporativo (mismo azul que el icono de ai-dash-header) */
.e-btn.soc-btn-azul-icono,
button.e-btn.soc-btn-azul-icono {
    background: linear-gradient(135deg, #0064a6 0%, #4da3d9 100%) !important;
    border: 1px solid #0064a6 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}
.e-btn.soc-btn-azul-icono:hover:not(:disabled):not(.e-disabled),
button.e-btn.soc-btn-azul-icono:hover:not(:disabled):not(.e-disabled) {
    background: linear-gradient(135deg, #00578f 0%, #3b8fc4 100%) !important;
    border-color: #00578f !important;
    color: #ffffff !important;
}
.e-btn.soc-btn-azul-icono .e-btn-icon,
.e-btn.soc-btn-azul-icono .e-btn-icon::before {
    color: #ffffff !important;
}

/* Botón principal en variante naranja (ej. Cancelar en modales) */
.e-btn.soc-proposal-pill-primary.soc-btn-naranja-cancelar,
button.e-btn.soc-proposal-pill-primary.soc-btn-naranja-cancelar {
    background: #ff7150 !important;
    border: 1px solid #ff7150 !important;
    color: #ffffff !important;
}
.e-btn.soc-proposal-pill-primary.soc-btn-naranja-cancelar:hover:not(:disabled):not(.e-disabled),
button.e-btn.soc-proposal-pill-primary.soc-btn-naranja-cancelar:hover:not(:disabled):not(.e-disabled) {
    background: #e6603f !important;
    border-color: #e6603f !important;
    color: #ffffff !important;
}
.e-btn.soc-proposal-pill-primary.soc-btn-naranja-cancelar .e-btn-icon,
.e-btn.soc-proposal-pill-primary.soc-btn-naranja-cancelar .e-btn-icon::before {
    color: #ffffff !important;
}

/* Variante gris claro (combina con el fondo neutro del header ai-dash) */
.e-btn.soc-proposal-pill-primary.kc-btn-green,
button.e-btn.soc-proposal-pill-primary.kc-btn-green {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
}

.e-btn.soc-proposal-pill-primary.kc-btn-green:hover:not(:disabled):not(.e-disabled),
button.e-btn.soc-proposal-pill-primary.kc-btn-green:hover:not(:disabled):not(.e-disabled) {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%) !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
}

.e-btn.soc-proposal-pill-primary.kc-btn-green .e-btn-icon,
.e-btn.soc-proposal-pill-primary.kc-btn-green .e-btn-icon::before {
    color: #1e293b !important;
}

.e-btn.soc-proposal-pill-outline,
button.e-btn.soc-proposal-pill-outline {
    border-radius: 9999px !important;
    padding: 8px 22px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
    background-color: #ffffff !important;
    border: 1px solid #0064a6 !important;
    color: #0064a6 !important;
    box-shadow: none !important;
}

.e-btn.soc-proposal-pill-outline:hover:not(:disabled):not(.e-disabled),
button.e-btn.soc-proposal-pill-outline:hover:not(:disabled):not(.e-disabled) {
    background-color: #ffffff !important;
    border-color: #005a9c !important;
    color: #005a9c !important;
}

.e-btn.soc-proposal-pill-outline:hover:not(:disabled):not(.e-disabled) .e-btn-icon,
.e-btn.soc-proposal-pill-outline:hover:not(:disabled):not(.e-disabled) .e-btn-icon::before {
    color: #005a9c !important;
}

.e-btn.soc-proposal-pill-outline:disabled,
.e-btn.soc-proposal-pill-outline.e-disabled,
button.e-btn.soc-proposal-pill-outline:disabled,
button.e-btn.soc-proposal-pill-outline.e-disabled {
    border-color: #8ed6f7 !important;
    color: #8ed6f7 !important;
    background-color: #ffffff !important;
    opacity: 1 !important;
}

.e-btn.soc-proposal-pill-outline .e-btn-icon,
.e-btn.soc-proposal-pill-outline .e-btn-icon::before {
    color: inherit !important;
}

/* Sobreescribe reglas verdes del contenido de pestañas en Contactos cuando usan clases de propuesta */
.contacto-module .soc-tab-content .e-btn.soc-proposal-pill-primary,
.contacto-module .soc-tab-content button.e-btn.soc-proposal-pill-primary {
    background-color: #0064a6 !important;
    border: 1px solid #0064a6 !important;
    color: #ffffff !important;
}

.contacto-module .soc-tab-content .e-btn.soc-proposal-pill-primary:hover:not(:disabled):not(.e-disabled),
.contacto-module .soc-tab-content button.e-btn.soc-proposal-pill-primary:hover:not(:disabled):not(.e-disabled) {
    background-color: #005a9c !important;
    border-color: #005a9c !important;
    color: #ffffff !important;
}

.contacto-module .soc-tab-content .e-btn.soc-proposal-pill-outline,
.contacto-module .soc-tab-content button.e-btn.soc-proposal-pill-outline {
    background-color: #ffffff !important;
    border: 1px solid #0064a6 !important;
    color: #0064a6 !important;
}

.contacto-module .soc-tab-content .e-btn.soc-proposal-pill-outline:hover:not(:disabled):not(.e-disabled),
.contacto-module .soc-tab-content button.e-btn.soc-proposal-pill-outline:hover:not(:disabled):not(.e-disabled) {
    background-color: #ffffff !important;
    border-color: #005a9c !important;
    color: #005a9c !important;
}

/* Botones dentro de las pestañas de Contacto */
.contacto-module .soc-tab-content .e-btn:not(.soc-proposal-pill-primary):not(.soc-proposal-pill-outline):not(.soc-btn-azul-icono),
.contacto-module .soc-tab-content button.e-btn:not(.soc-proposal-pill-primary):not(.soc-proposal-pill-outline):not(.soc-btn-azul-icono) {
    background-color: #ffffff !important;
    border: 1.5px solid #006d4e !important;
    color: #006d4e !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}
.contacto-module .soc-tab-content .e-btn:hover:not(:disabled):not(.soc-proposal-pill-primary):not(.soc-proposal-pill-outline):not(.soc-btn-azul-icono),
.contacto-module .soc-tab-content button.e-btn:hover:not(:disabled):not(.soc-proposal-pill-primary):not(.soc-proposal-pill-outline):not(.soc-btn-azul-icono) {
    background-color: #006d4e !important;
    border-color: #006d4e !important;
    color: #ffffff !important;
}
.contacto-module .soc-tab-content .e-btn:disabled,
.contacto-module .soc-tab-content .e-btn.e-disabled {
    opacity: 0.45;
}

/* Toolbar en módulo Oportunidad — estilos heredados de .contacto-sf-toolbar */
.oportunidad-module .soc-contact-toolbar {
    padding: 6px 20px;
    margin-bottom: 0;
}

/* Botones dentro de las pestañas de Oportunidades */
.oportunidad-module .soc-tab-content .e-btn:not(.soc-proposal-pill-primary):not(.soc-proposal-pill-outline):not(.soc-btn-azul-icono),
.oportunidad-module .soc-tab-content button.e-btn:not(.soc-proposal-pill-primary):not(.soc-proposal-pill-outline):not(.soc-btn-azul-icono) {
    background-color: #ffffff !important;
    border: 1.5px solid #006d4e !important;
    color: #006d4e !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

.oportunidad-module .soc-tab-content .e-btn:hover:not(:disabled):not(.soc-proposal-pill-primary):not(.soc-proposal-pill-outline):not(.soc-btn-azul-icono),
.oportunidad-module .soc-tab-content button.e-btn:hover:not(:disabled):not(.soc-proposal-pill-primary):not(.soc-proposal-pill-outline):not(.soc-btn-azul-icono) {
    background-color: #006d4e !important;
    border-color: #006d4e !important;
    color: #ffffff !important;
}

.oportunidad-module .soc-tab-content .e-btn:disabled,
.oportunidad-module .soc-tab-content .e-btn.e-disabled {
    opacity: 0.45;
}

.soc-search-wrap { display: flex; align-items: center; }
.soc-tabs { margin-top: 16px; }
.soc-tab-headers {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 20px;
}
.soc-tab {
    padding: 10px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #6B7280;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s ease;
    letter-spacing: 0.01em;
}
.soc-tab:hover { color: #006d4e; }
.soc-tab.active { color: #006d4e; font-weight: 600; border-bottom-color: #006d4e; }
.soc-tab-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 17px; height: 17px; padding: 0 4px; margin-left: 5px;
    font-size: 10px; font-weight: 700; color: #fff;
    background: #e53e3e; border-radius: 9px; vertical-align: middle; line-height: 1;
}
.soc-tab-content { min-height: 200px; }
.soc-subtabs { margin-top: 8px; }
.soc-subtabs .soc-tab-headers { margin-bottom: 12px; border-bottom-color: #eef0f3; }
.soc-subtabs .soc-tab { padding: 6px 12px; font-size: 12.5px; }
.soc-tab-content-full { min-height: calc(100vh - 280px); }
.soc-card-evento-full { min-height: calc(100vh - 320px); }
.soc-seguimiento-columns-full { min-height: calc(100vh - 320px); align-items: stretch; }
.soc-seguimiento-columns-full .soc-seguimiento-col { min-height: calc(100vh - 340px); overflow-y: auto; }
.soc-detalles-grid-full { min-height: calc(100vh - 320px); align-items: stretch; }
.soc-detalles-grid-full .soc-detalle-card { min-height: calc(100vh - 360px); }
/* Pestaña Histórico: estilo gris */
.soc-tab-content-historico { background: #f0f0f0; border-radius: 8px; padding: 16px; }
.soc-historico-grid-wrap { background: #fff; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.soc-historico-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.soc-historico-table thead { background: #006d4e; color: #fff; }
.soc-historico-table th { padding: 10px 12px; text-align: left; font-weight: 600; border-bottom: 2px solid #005a40; }
.soc-historico-table td { padding: 10px 12px; border-bottom: 1px solid #e5e5e5; color: #555; }
.soc-historico-table tbody tr:hover { background: #f8f8f8; }
.soc-historico-table th:nth-child(1) { width: 140px; }
.soc-historico-table th:nth-child(2) { width: 160px; }

/* Pestaña Documentos */
/* Widget documentos por vencer / vencidos en Resumen */
.soc-doc-caducidad-widget { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; }
.soc-doc-caducidad-widget-header { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: #fff8e1; border-bottom: 1px solid #ffe082; font-weight: 600; font-size: 13px; color: #7c5c00; }
.soc-doc-caducidad-list { list-style: none; margin: 0; padding: 0; }
.soc-doc-caducidad-item { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.soc-doc-caducidad-item:last-child { border-bottom: none; }
.soc-doc-caducidad-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.badge-vencido { background: #fde8e8; color: #c0392b; border: 1px solid #f5c6c6; }
.badge-por-vencer { background: #fff8e1; color: #b45309; border: 1px solid #fcd34d; }
.soc-doc-caducidad-nombre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #333; }
.soc-doc-caducidad-tipo { color: #666; font-size: 12px; white-space: nowrap; flex-shrink: 0; }
.soc-doc-caducidad-fecha { font-weight: 600; font-size: 12px; white-space: nowrap; flex-shrink: 0; color: #555; }
.soc-documentos-section { margin-top: 0; }
.soc-documentos-form { margin-bottom: 24px; padding: 16px; background: #f8f9fa; border-radius: 8px; }
.soc-documentos-form-title { margin: 0 0 12px; font-size: 1rem; color: #222; }
.soc-documentos-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.soc-doc-field { min-width: 180px; }
.soc-doc-field label { display: block; font-size: 12px; color: #555; margin-bottom: 4px; }
.soc-doc-field .e-outline { width: 100%; }
.soc-doc-field-btn { align-self: flex-end; }
.soc-input-file { display: block; font-size: 13px; padding: 6px 0; }
.soc-doc-file-name { font-size: 12px; color: #666; margin-left: 8px; }
.soc-upload-loading { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #f0faf5; border: 1px solid #a7d9be; border-radius: 6px; color: #1a6b3c; font-size: 13px; margin-top: 10px; }
.soc-upload-spinner { width: 16px; height: 16px; border: 2px solid #a7d9be; border-top-color: #1a6b3c; border-radius: 50%; animation: soc-spin 0.8s linear infinite; flex-shrink: 0; }
@keyframes soc-spin { to { transform: rotate(360deg); } }
.soc-documentos-list-wrap h4 { margin: 0 0 12px; font-size: 1rem; color: #222; }
.soc-docs-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 6px; border: 1px solid #e0e0e0; }
.soc-docs-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: auto; }
.soc-docs-table thead { background: #006d4e; color: #fff; }
.soc-docs-table th { padding: 9px 10px; text-align: left; font-weight: 600; white-space: nowrap; }
.soc-docs-table td { padding: 8px 10px; border-bottom: 1px solid #e5e5e5; color: #555; white-space: nowrap; }
/* Columna Archivo: flexible, se lleva el espacio disponible */
.soc-docs-table .col-archivo { min-width: 140px; max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
/* Columnas secundarias: anchos fijos compactos, ceden espacio primero */
.soc-docs-table .col-expand   { width: 36px;  min-width: 36px; }
.soc-docs-table .col-origen   { width: 85px;  min-width: 70px; }
.soc-docs-table .col-tipo     { width: 110px; min-width: 80px; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.soc-docs-table .col-fecha    { width: 125px; min-width: 110px; }
.soc-docs-table .col-by       { width: 140px; min-width: 100px; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.soc-docs-table .col-caducidad{ width: 95px;  min-width: 80px; }
.soc-docs-table .col-estado   { width: 70px;  min-width: 60px; }
.soc-docs-table .col-visible  { width: 95px;  min-width: 80px; }
.soc-docs-table .col-acciones { width: 85px;  min-width: 80px; }
.soc-docs-table tbody tr:hover { background: #f8f8f8; }
.soc-docs-table tbody tr.soc-doc-nota-row:hover { background: #f4f8f6; }
.soc-link-doc { background: none; border: none; color: #006d4e; cursor: pointer; padding: 0; font-size: inherit; text-decoration: underline; }
.soc-link-doc:hover { color: #005a40; }
/* Fila de detalle / nota expandida en documentos */
.soc-doc-detail-row { padding: 12px 16px; background: #f4f8f6; border-left: 3px solid #006d4e; }
.soc-doc-detail-nota-wrap { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; }
.soc-doc-detail-item { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 200px; }
.soc-doc-detail-label { font-size: 11px; font-weight: 600; color: #006d4e; text-transform: uppercase; letter-spacing: .04em; }
.soc-doc-detail-value { font-size: 13px; color: #333; white-space: pre-wrap; word-break: break-word; }
.soc-doc-detail-empty { font-size: 13px; color: #999; font-style: italic; align-self: center; flex: 1; }
.soc-doc-nota-row td { padding: 0 !important; background: #f4f8f6; border-bottom: 1px solid #d6e8df; }
/* Botones de acción de nota */
.soc-doc-nota-btns { display: flex; flex-wrap: wrap; gap: 6px; align-self: center; flex-shrink: 0; }
.soc-doc-nota-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 500; cursor: pointer; border: 1px solid; transition: background .15s, opacity .15s; white-space: nowrap; }
.soc-doc-nota-btn-edit  { background: #fff; border-color: #006d4e; color: #006d4e; }
.soc-doc-nota-btn-edit:hover  { background: #e8f3ee; }
.soc-doc-nota-btn-add   { background: #006d4e; border-color: #006d4e; color: #fff; }
.soc-doc-nota-btn-add:hover   { background: #005a40; }
.soc-doc-nota-btn-del   { background: #fff; border-color: #c0392b; color: #c0392b; }
.soc-doc-nota-btn-del:hover   { background: #fdf0ee; }
/* Lista de notas en panel expandido */
.soc-doc-notas-panel { flex-direction: column; gap: 0; padding: 8px 16px; }
.soc-doc-nota-item { padding: 8px 0; border-bottom: 1px solid #d6e8df; }
.soc-doc-nota-item:last-child { border-bottom: none; }
.soc-doc-nota-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.soc-doc-nota-autor { font-size: 12px; font-weight: 600; color: #006d4e; }
.soc-doc-nota-fecha { font-size: 11px; color: #999; }
.soc-doc-nota-texto { font-size: 13px; color: #333; white-space: pre-wrap; word-break: break-word; padding-left: 2px; }
.soc-doc-nota-oculta { display: inline-block; margin: 4px 0 0 2px; font-size: 11px; font-weight: 600; color: #b35900; background: #fff3e0; padding: 1px 8px; border-radius: 10px; }
.soc-doc-nota-visible-checks { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.soc-doc-nota-visible-check { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #555; cursor: pointer; }
.soc-doc-nota-visible-check input { cursor: pointer; }
/* Formulario inline de edición de nota */
.soc-doc-nota-form { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.soc-doc-nota-textarea { width: 100%; padding: 8px 10px; font-size: 13px; border: 1px solid #c5d9d0; border-radius: 4px; resize: vertical; font-family: inherit; outline: none; background: #fff; }
.soc-doc-nota-textarea:focus { border-color: #006d4e; box-shadow: 0 0 0 2px rgba(0,109,78,.12); }
.soc-doc-nota-form-actions { display: flex; gap: 8px; }
.soc-btn-save-nota   { padding: 5px 16px; background: #006d4e; color: #fff; border: none; border-radius: 4px; font-size: 13px; font-weight: 600; cursor: pointer; }
.soc-btn-save-nota:hover   { background: #005a40; }
.soc-btn-cancel-nota { padding: 5px 14px; background: #fff; color: #555; border: 1px solid #ccc; border-radius: 4px; font-size: 13px; cursor: pointer; }
.soc-btn-cancel-nota:hover { background: #f0f0f0; }
/* Botón editar fecha caducidad */
.soc-doc-caducidad-edit-btn { background: none; border: none; padding: 2px 4px; cursor: pointer; color: #aaa; border-radius: 3px; line-height: 1; }
.soc-doc-caducidad-edit-btn:hover { color: #006d4e; background: #e8f3ee; }
/* Botón chevron expandir doc en tabla oportunidades */
.soc-doc-expand-btn { background: none; border: 1px solid #ccc; border-radius: 4px; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: #555; transition: background .15s, border-color .15s; padding: 0; }
.soc-doc-expand-btn:hover { background: #e8f3ee; border-color: #006d4e; color: #006d4e; }
.soc-doc-expand-btn-open { background: #e8f3ee; border-color: #006d4e; color: #006d4e; }
.soc-doc-expand-btn-has-nota { background: #006d4e; border-color: #006d4e; color: #fff; }
.soc-doc-expand-btn-has-nota:hover { background: #005a40; border-color: #005a40; }
.soc-doc-expand-btn-has-nota.soc-doc-expand-btn-open { background: #005a40; border-color: #005a40; color: #fff; }

/* Modal visor PDF */
.soc-pdf-viewer-dialog.e-dialog {
    width: 88vw !important;
    max-width: 1300px;
    height: 90vh !important;
    max-height: 90vh;
    z-index: 10000 !important;
}
/* El overlay de Syncfusion va antes del dialog en el DOM, el selector ~ no funciona.
   Se fuerza z-index alto en todos los overlays de modal. */
.e-dlg-overlay {
    z-index: 9999 !important;
}
.soc-pdf-viewer-dialog .e-dlg-content {
    padding: 0;
    height: calc(90vh - 64px) !important;
    display: flex;
    flex-direction: column;
}
.soc-pdf-viewer-iframe {
    width: 100%;
    flex: 1;
    min-height: 0;
    border: none;
    display: block;
}
/* Contenedor visor PDF con pdf.js (Detalles) */
.soc-pdfjs-viewer-container {
    width: 100%;
    max-width: 100%;
    height: calc(100vh - 220px); /* -100px de alto útil respecto al anterior */
    min-height: 60vh;
    background: #4b4b4b;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: auto;
    padding: 16px;
    box-sizing: border-box;
}
.soc-pdfjs-viewer-container canvas {
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    background: #ffffff;
}

/* Botones del visor PDF (Detalles) */
.soc-pdf-viewer-actions {
    padding-right: 100px;
}

.soc-buscar-contacto {
    border: 1px solid rgba(0,109,78,0.3);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    background: #fafafa;
}
/* Sombra verde en el campo de buscar contacto */
.soc-buscar-contacto .e-input-group:focus-within,
.soc-buscar-contacto .e-input:focus {
    box-shadow: none !important;
    outline: none;
    border-color: #006d4e !important;
}
.soc-buscar-contacto .e-input-group.e-input-focus {
    box-shadow: none !important;
    border-color: #006d4e !important;
}
/* Evita doble borde/recuadro dentro del textbox de búsqueda */
.soc-buscar-contacto .e-input-group .e-input,
.soc-buscar-contacto .e-control-wrapper .e-input {
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
}
.soc-buscar-contacto h4,
.soc-milista-section h4 { margin: 0 0 12px 0; font-size: 15px; color: #333; }
.soc-contact-results { margin-top: 12px; }
.soc-contact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}
.soc-contact-row:last-child { border-bottom: none; }

/* Botón Mostrar en color verde #006d4e (Buscar contacto, Busca Oportunidad, Mi Lista, grid Oportunidades) */
.soc-buscar-contacto .e-btn.e-primary,
.soc-buscar-oportunidad .e-btn.e-primary,
.soc-milista-section .e-btn.e-primary:not(.soc-proposal-pill-primary),
.soc-milista-modal .e-btn.e-primary:not(.soc-proposal-pill-primary),
.soc-card-oportunidades .e-btn.e-primary:not(.soc-proposal-pill-primary) {
    background-color: #006d4e !important;
    border-color: #006d4e !important;
    color: #fff !important;
}
.soc-buscar-contacto .e-btn.e-primary:hover:not(:disabled),
.soc-buscar-oportunidad .e-btn.e-primary:hover:not(:disabled),
.soc-milista-section .e-btn.e-primary:hover:not(:disabled):not(.soc-proposal-pill-primary),
.soc-milista-modal .e-btn.e-primary:hover:not(:disabled):not(.soc-proposal-pill-primary),
.soc-card-oportunidades .e-btn.e-primary:hover:not(:disabled):not(.soc-proposal-pill-primary) {
    background-color: #005a40 !important;
    border-color: #005a40 !important;
    color: #fff !important;
}

/* Scheduler: botón Guardar del editor y color de citas en verde #006d4e.
   La clase body se añade desde Scheduler.razor para que el diálogo (renderizado en portal) también se estilice. */
body.soc-scheduler-page-active .e-dialog .e-footer-content .e-btn.e-primary,
body.soc-scheduler-page-active .e-dialog .e-btn.e-primary {
    background-color: #006d4e !important;
    border-color: #006d4e !important;
    color: #fff !important;
}
body.soc-scheduler-page-active .e-dialog .e-footer-content .e-btn.e-primary:hover:not(:disabled),
body.soc-scheduler-page-active .e-dialog .e-btn.e-primary:hover:not(:disabled) {
    background-color: #005a40 !important;
    border-color: #005a40 !important;
    color: #fff !important;
}
/* Citas del calendario (eventos) en verde */
.soc-scheduler-es .e-appointment,
.soc-scheduler-page .e-schedule .e-appointment {
    background-color: #006d4e !important;
    border-color: #005a40 !important;
}
.soc-scheduler-es .e-appointment:hover,
.soc-scheduler-page .e-schedule .e-appointment:hover {
    background-color: #005a40 !important;
    border-color: #004d36 !important;
}
/* Kanban: diálogo de edición de tarjeta */
.soc-kanban-dialog .e-footer-content .e-btn:first-child {
    /* Ocultar botón Eliminar */
    display: none !important;
}
.soc-kanban-dialog .e-footer-content .e-btn.e-primary {
    /* Botón Guardar (Actualizar) en verde corporativo */
    background-color: #006d4e !important;
    border-color: #006d4e !important;
    color: #fff !important;
}
.soc-kanban-dialog .e-footer-content .e-btn.e-primary:hover:not(:disabled) {
    background-color: #005a40 !important;
    border-color: #005a40 !important;
}
.soc-kanban-dialog .e-footer-content .e-btn:not(.e-primary) {
    /* Botón Cancelar en gris oscuro */
    background-color: #6B7280 !important;
    border-color: #6B7280 !important;
    color: #fff !important;
}
/* Campo Oportunidad solo lectura (primer input de texto del diálogo) */
.soc-kanban-dialog .e-dlg-content input[type="text"]:first-of-type {
    pointer-events: none;
    background-color: #f5f5f5;
    color: #333;
    caret-color: transparent;
}
.soc-kanban-dialog .e-dlg-content input[type="text"]:first-of-type::selection {
    background-color: transparent;
}
/* Campo Resumen bloqueado (solo lectura) en el diálogo de edición del Kanban */
.soc-kanban-dialog .e-dlg-content textarea {
    pointer-events: none;
    background-color: #f5f5f5;
    color: #333;
    caret-color: transparent;
}
.soc-kanban-dialog .e-dlg-content textarea::selection {
    background-color: transparent;
}

.soc-milista-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    background: #fff;
}
/* Fila 1: tres columnas del mismo ancho (Datos, Reuniones, Prioridades). Fila 2: Oportunidades ancho completo */
.soc-datos-detalle {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr) minmax(200px, 1fr);
    gap: 20px;
    align-items: stretch;
}
/* Cada panel respeta su columna y no invade la de al lado */
.soc-datos-contacto-card,
.soc-card-evento,
.soc-card-prioridades {
    min-width: 0;
    overflow-wrap: break-word;
}
.soc-card-oportunidades {
    grid-column: 1 / -1;
}
@media (max-width: 1000px) {
    .soc-datos-detalle { grid-template-columns: 1fr; }
    .soc-card-oportunidades { grid-column: 1; }
}
/* Bordes de contenedores: Datos del Contacto, Mis Reuniones, Top 5 Prioridades, Oportunidades */
.soc-datos-contacto-card,
.soc-card-evento,
.soc-card-prioridades,
.soc-card-oportunidades {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* Títulos de sección dentro de tarjetas */
.soc-datos-contacto-card h4,
.soc-card-evento h4,
.soc-card-prioridades h4,
.soc-card-oportunidades h4 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #006d4e;
    margin: 0 0 16px 0;
}

.soc-card-oportunidades-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.soc-link-action {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #006d4e;
    cursor: pointer;
}

.soc-link-action:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Nombre del cliente en el header de Oportunidad: indica que es clickeable y lleva al contacto */
.soc-opp-client-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0064a6;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: rgba(0,100,166,0.4);
    text-underline-offset: 2px;
}

.soc-opp-client-link:hover {
    color: #00497a;
    text-decoration-style: solid;
    text-decoration-color: #00497a;
}

.soc-opp-client-link-icon {
    font-size: 11px;
    opacity: 0.7;
    transition: transform 0.15s;
}

.soc-opp-client-link:hover .soc-opp-client-link-icon {
    transform: translateX(2px);
    opacity: 1;
}

/* ── Oportunidades (Resumen de Contacto): tarjetas visuales ──────────────── */
.soc-opps-card {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 60%);
    border-color: #cbd5e1;
}
.soc-opps-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.soc-opps-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.soc-opps-header-left h4 { margin: 0; }
.soc-opps-count {
    background: #006d4e;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 9px;
    line-height: 18px;
}
.soc-opps-total {
    font-size: 12.5px;
    color: #475569;
}
.soc-opps-total strong { color: #1e293b; }

.soc-opps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.soc-opp-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: 3px solid #0064a6;
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}
.soc-opp-card:hover {
    border-color: #4da3d9;
    box-shadow: 0 6px 18px rgba(0, 100, 166, 0.15);
    transform: translateY(-2px);
}
.soc-opp-card:focus-visible {
    outline: 2px solid #0064a6;
    outline-offset: 2px;
}

.soc-opp-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.soc-opp-card-number {
    font-size: 12px;
    font-weight: 700;
    color: #0064a6;
    letter-spacing: 0.02em;
}
.soc-opp-stage-badge {
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 10px;
    white-space: nowrap;
}
/* Colores por índice de etapa: Prospecto → Firma */
.soc-opp-stage--0 { background: #e2e8f0; color: #475569; }
.soc-opp-stage--1 { background: #e0f2fe; color: #0369a1; }
.soc-opp-stage--2 { background: #e0e7ff; color: #4338ca; }
.soc-opp-stage--3 { background: #fef3c7; color: #b45309; }
.soc-opp-stage--4 { background: #ede9fe; color: #6d28d9; }
.soc-opp-stage--5 { background: #ccfbf1; color: #0f766e; }
.soc-opp-stage--6 { background: #dcfce7; color: #15803d; }

.soc-opp-card-amount-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.soc-opp-card-amount {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}
.soc-opp-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    padding: 2px 10px;
    white-space: nowrap;
    border: 1px solid transparent;
}
.soc-opp-status-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.soc-opp-status--ok     { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.soc-opp-status--warn   { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.soc-opp-status--danger { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.soc-opp-card-product {
    font-size: 13px;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}
.soc-opp-card-bank-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.soc-opp-card-product-name {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.soc-opp-bank-logo-img {
    height: 26px;
    max-width: 110px;
    object-fit: contain;
    object-position: left center;
    align-self: flex-start;
}
.soc-opp-card-bank { font-weight: 700; }
.soc-opp-card-sep { color: #94a3b8; }
.soc-opp-card-type {
    font-size: 12px;
    color: #64748b;
}
.soc-opp-card-credit-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.soc-opp-credit-chip {
    font-size: 11px;
    font-weight: 600;
    color: #0064a6;
    background: #eaf4fb;
    border: 1px solid #d6ebf8;
    border-radius: 999px;
    padding: 2px 9px;
    white-space: nowrap;
}
.soc-opp-card-registered-by {
    font-size: 11px;
    color: #94a3b8;
    margin-top: -4px;
}

.soc-opp-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}
.soc-opp-progress-track {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.soc-opp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0064a6 0%, #4da3d9 100%);
    border-radius: 999px;
    transition: width 0.3s ease;
}
.soc-opp-progress-fill--complete {
    background: linear-gradient(90deg, #15803d 0%, #4ade80 100%);
}
.soc-opp-progress-label {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

.soc-opp-card-people {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 6px;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 8px;
}
.soc-opp-card-person {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.soc-opp-card-person-label {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.soc-opp-card-person-name {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.soc-opp-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}
.soc-opp-card-meta {
    font-size: 11.5px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.soc-opp-card-cta {
    font-size: 12px;
    font-weight: 700;
    color: #0064a6;
    white-space: nowrap;
}
.soc-opp-card:hover .soc-opp-card-cta { text-decoration: underline; }

/* Estado vacío de oportunidades */
.soc-opps-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 26px 20px;
}
.soc-opps-empty-icon {
    font-size: 34px;
    margin-bottom: 8px;
}
.soc-opps-empty-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 4px;
}
.soc-opps-empty-sub {
    font-size: 12.5px;
    color: #94a3b8;
    margin: 0;
    max-width: 360px;
    line-height: 1.5;
}

.soc-link-action:not(:disabled):hover {
    text-decoration: underline;
}

.soc-datos-contacto-card,
.soc-card-evento,
.soc-card-prioridades,
/* Enlace del número de oportunidad (móvil y escritorio): mismo destino que el botón Mostrar */
.soc-link-oportunidad {
    color: #006d4e;
    font-weight: 500;
    text-decoration: none;
}
.soc-link-oportunidad:hover {
    text-decoration: underline;
}

/* Tarjetas del Kanban */
.soc-kanban-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-transform: uppercase;
    font-size: 11px;
}

.soc-kanban-card-body {
    font-size: 11px;
    line-height: 1.3;
    white-space: pre-line;
}

.soc-kanban-contact-name {
    font-weight: 700;
    font-size: 11px;
    line-height: 1.3;
}

.soc-kanban-opp-number {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #006d4e;
    background: #e6f4ef;
    border-radius: 3px;
    padding: 1px 5px;
    margin-bottom: 3px;
    letter-spacing: 0.3px;
}

.soc-kanban-card-footer {
    margin-top: 0;
    padding-top: 2px;
    padding-bottom: 0;
    border-top: 1px solid #e5e7eb;
    background-color: transparent;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 0;
    line-height: 1;
}

.soc-kanban-card-footer .soc-link-action {
    padding: 0;
    margin: 0;
    line-height: 1;
    font-size: 13px;
}

/* Monto solicitado en grid Oportunidades (Contactos): visible en móvil; oculto en escritorio */
.soc-monto-en-linea,
.soc-monto-solicitado-movil {
    display: block !important;
    visibility: visible !important;
    font-size: 13px;
    color: #333;
    margin-top: 4px;
    font-weight: 500;
}
.soc-monto-label {
    font-weight: 600;
    color: #555;
    margin-right: 4px;
}
.soc-oportunidad-cell {
    display: block;
}

@media (min-width: 769px) {
    .soc-card-oportunidades .soc-monto-en-linea,
    .soc-card-oportunidades .soc-monto-solicitado-movil {
        display: none !important;
    }
}

.soc-card-evento {
    min-height: 420px;
}
/* Diálogo de aceptaciones siempre por encima del sidebar (z-index 1050-1100) */
.soc-aceptaciones-dialog.e-dialog { z-index: 10001 !important; }

/* Diálogo de aceptaciones — columnas tipo card */
.soc-acept-col {
    flex: 1;
    min-width: 260px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
}
.soc-acept-col-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-weight: 600;
    font-size: 14px;
    color: #334155;
}
.soc-acept-col-header .e-icons {
    font-size: 16px;
}
.soc-acept-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 9999px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    margin-left: auto;
}
.soc-acept-search {
    position: relative;
    margin-bottom: 10px;
}
.soc-acept-search .e-icons {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #94a3b8;
    pointer-events: none;
}
.soc-acept-search input.e-input {
    width: 100%;
    padding: 7px 10px 7px 30px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    background: #fff !important;
}
.soc-acept-search input.e-input:focus {
    border-color: #0064a6 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(0,100,166,0.12) !important;
}
.soc-acept-filter-info {
    font-size: 11px;
    color: #94a3b8;
    margin: -4px 0 8px;
}
.soc-acept-list {
    max-height: 360px;
    overflow-y: auto;
    border-radius: 8px;
}
.soc-acept-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #f1f5f9;
    margin-bottom: 6px;
}
.soc-acept-row:last-child { margin-bottom: 0; }
.soc-acept-row-name {
    font-weight: 600;
    font-size: 13px;
    color: #334155;
    display: block;
}
.soc-acept-row-sub {
    display: block;
    font-size: 11px;
    color: #94a3b8;
}
.soc-acept-row-date {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    text-align: right;
    flex-shrink: 0;
}
.soc-acept-empty {
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
    padding: 24px 0;
}

.soc-anuncio-badge { display:inline-block; border-radius:4px; padding:2px 8px; font-size:11px; font-weight:600; }
.soc-anuncio-badge-activo   { background:#dcfce7; color:#166534; }
.soc-anuncio-badge-inactivo { background:#f1f5f9; color:#64748b; }
.soc-anuncio-badge-contrato { background:#dbeafe; color:#1e40af; display:block; }
.soc-filter-tabs { display: flex; gap: 4px; background: var(--soc-bg-soft,#f8fafc); border: 1px solid var(--soc-border,#e2e8f0); border-radius: 8px; padding: 3px; }
.soc-filter-tab { background: transparent; border: none; border-radius: 6px; padding: 5px 14px; font-size: 13px; font-weight: 500; color: var(--soc-text-muted,#64748b); cursor: pointer; transition: background 0.15s, color 0.15s; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.soc-filter-tab:hover { background: var(--soc-border,#e2e8f0); color: var(--soc-text,#1e293b); }
.soc-filter-tab.active { background: #fff; color: var(--soc-primary-dark,#006d4e); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.soc-filter-count { background: var(--soc-border,#e2e8f0); color: var(--soc-text-muted,#64748b); border-radius: 10px; padding: 0 6px; font-size: 11px; font-weight: 600; }
.soc-filter-tab.active .soc-filter-count { background: var(--soc-primary-dark,#006d4e); color: #fff; }
.soc-timeline-wrap { margin-top: 8px; }
.soc-timeline-list { list-style: none; margin: 8px 0 0; padding: 0; border-left: 2px solid rgba(0,109,78,0.35); padding-left: 12px; }
.soc-timeline-item { position: relative; padding-bottom: 12px; }
.soc-timeline-item::before { content: ""; position: absolute; left: -17px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: #006d4e; }
.soc-timeline-time { font-size: 12px; font-weight: 600; color: #006d4e; display: block; margin-bottom: 2px; }
.soc-timeline-content { display: block; }
.soc-timeline-title { font-weight: 600; color: #222; }
.soc-timeline-desc { font-size: 12px; color: #666; margin-top: 2px; display: block; }
.soc-timeline-actions { margin-top: 6px; }
.soc-timeline-actions .soc-btn-link { font-size: 12px; padding: 0; }
.soc-timeline-item.soc-cosa-completed .soc-timeline-title { text-decoration: line-through; opacity: 0.85; }
.soc-timeline-item.soc-cosa-completed .soc-timeline-desc { opacity: 0.85; }
/* Filtro Cosas por hacer: Activas / Terminadas */
.soc-cosas-filtro { display: flex; gap: 0; margin-bottom: 12px; }
.soc-filtro-btn { padding: 6px 14px; font-size: 13px; border: 1px solid #ccc; background: #fff; color: #555; cursor: pointer; border-radius: 0; }
.soc-filtro-btn:first-child { border-radius: 6px 0 0 6px; }
.soc-filtro-btn:last-child { border-radius: 0 6px 6px 0; border-left: none; }
.soc-filtro-btn:hover { background: #f5f5f5; color: #333; }
.soc-filtro-btn.soc-filtro-btn-active { background: #0064a6; color: #fff; border-color: #0064a6; }
.soc-filtro-btn.soc-filtro-btn-active:hover { background: #00568d; color: #fff; }
.soc-card-prioridades {
    min-height: 420px;
}

/* MyDay: grid tres columnas iguales (Mis Reuniones | Actividades | Cosas por hacer) */
.soc-myday-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    align-items: start;
}
@media (max-width: 1000px) {
    .soc-myday-grid { grid-template-columns: 1fr; }
}
/* MyDay: Mis Reuniones - mismo aspecto que Contacto: fondo blanco, título y línea/dot verde, texto gris */
.myday-module .soc-myday-timeline-card { min-height: 320px; background: #fff; }
.myday-module .soc-myday-timeline-title { color: #585858; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 16px; }
/* MyDay: Actividades */
.myday-module .soc-myday-actividades-card { min-height: 320px; background: #fff; }
.myday-module .soc-myday-actividades-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.myday-module .soc-myday-actividades-title { color: #585858; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin: 0; }
/* MyDay: Cosas por hacer */
.myday-module .soc-myday-cosas-card { min-height: 320px; background: #fff; }
.myday-module .soc-myday-cosas-card .soc-myday-actividades-header { margin-bottom: 12px; }
.myday-module .soc-myday-cosas-title { color: #585858; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin: 0; }

/* MyDay: botones con outline verde */
.myday-module .e-btn,
.myday-module button.e-btn {
    background-color: #ffffff !important;
    border: 1.5px solid #006d4e !important;
    color: #006d4e !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}
.myday-module .e-btn:hover:not(:disabled),
.myday-module button.e-btn:hover:not(:disabled) {
    background-color: #006d4e !important;
    border-color: #006d4e !important;
    color: #ffffff !important;
}
.myday-module .e-btn:disabled,
.myday-module .e-btn.e-disabled {
    opacity: 0.45;
}
.soc-cosas-list { display: flex; flex-direction: column; gap: 10px; margin-top: 0; }
.soc-cosa-card { border-radius: 6px; padding: 10px 12px; background: #f8f9fa; border-left: 3px solid #006d4e; }
.soc-cosa-card.soc-cosa-completed { opacity: 0.75; border-left-color: #6b7280; }
.soc-cosa-card-title { font-weight: 600; font-size: 14px; color: #333; margin-bottom: 4px; }
.soc-cosa-card-desc { font-size: 13px; color: #555; margin-bottom: 6px; white-space: pre-wrap; }
.soc-cosa-card-meta { font-size: 12px; color: #666; }
.soc-form-row-inline.soc-switch-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.soc-form-row-inline.soc-switch-row .soc-check-label { margin: 0; }

.soc-kanban-header { padding: 12px 24px; }
.soc-kanban-controls { flex-direction: column; align-items: stretch; gap: 8px; flex: 1 1 auto; min-width: 0; }
.soc-kanban-row-wide { width: 100%; }
.soc-kanban-controls-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.soc-kanban-controls-row:has(.e-ddl) { flex-wrap: nowrap; }
.soc-kanban-controls-row .soc-form-row-inline { display: flex; align-items: center; gap: 8px; margin-bottom: 0; }
.soc-kanban-controls-row .soc-switch-row { gap: 10px; }
.soc-kanban-controls-row .soc-check-label { font-weight: 500; color: #495057; white-space: nowrap; }
.soc-kanban-controls-row .e-date-wrapper { width: 150px; }

.soc-card-prioridades .soc-placeholder { border: none; padding: 8px 0; }
.soc-card-prioridades.soc-sin-prioridades .soc-placeholder { border: none; }
.soc-prioridades-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.soc-prioridad-card { border-radius: 6px; padding: 10px 14px; background: #F8FAFB; border: 1px solid #E5E7EB; }
.soc-prioridad-title { font-weight: 600; font-size: 13px; color: #6B7280; margin-bottom: 3px; }
.soc-prioridad-comment { font-size: 12px; color: #6B7280; margin-bottom: 6px; }
.soc-prioridad-date { font-size: 11px; color: #9CA3AF; text-align: right; }
.soc-badge-registrado {
    background: #006d4e;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}
.soc-badge-descartado {
    background: #b91c1c;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}
.soc-badge-btn {
    border: 0;
    cursor: pointer;
    font-weight: 600;
}
.soc-badge-btn:hover {
    filter: brightness(0.96);
}

/* Botón de estatus (base) */
.soc-opp-status-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background-color: #ffffff;
    border: 1.5px solid #0064a6;
    color: #0064a6;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.soc-opp-status-btn:hover {
    background-color: #0589d2;
    border-color: #0589d2;
    color: #ffffff;
}
.soc-opp-status-btn:hover .soc-status-dot {
    background-color: rgba(255,255,255,0.85) !important;
}
.soc-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.soc-dl { margin: 0; }
.soc-dl dt {
    font-weight: 500;
    color: #9CA3AF;
    font-size: 10px;
    margin-top: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.soc-dl dt:first-child { margin-top: 0; }
.soc-dl dd {
    margin: 3px 0 0 0;
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
}
.soc-placeholder { color: #888; font-size: 13px; margin: 8px 0; }
.soc-placeholder.soc-error-msg { color: #c00; font-weight: 500; margin-bottom: 12px; }
.soc-detalles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.soc-detalle-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    background: #fff;
}
.soc-detalle-card h4 { margin: 0 0 12px 0; font-size: 14px; color: #006d4e; }
.soc-form-row { margin-bottom: 12px; }
.soc-form-row label { display: block; font-size: 12px; color: #555; margin-bottom: 4px; }
.soc-form-row .e-input-group { width: 100%; }
.soc-field-error { font-size: 11px; color: #d32f2f; margin-top: -8px; margin-bottom: 8px; }
.soc-variante-ddl.e-popup .e-list-item,
.e-ddl.e-popup.soc-variante-ddl .e-list-item {
    white-space: normal;
    text-overflow: initial;
    line-height: 1.3;
    height: auto;
    padding-top: 8px;
    padding-bottom: 8px;
}
/* Select nativo con aspecto de Syncfusion DropDownList: ancho completo en formularios y modales */
.e-input-group.soc-select-wrap {
    display: flex; align-items: center; position: relative;
    width: 100%; min-width: 0; box-sizing: border-box;
}
.e-input-group.soc-select-wrap select.soc-select-native {
    width: 100%; min-width: 0; min-height: 36px; font-size: 14px; color: inherit;
    border: none; background: transparent; padding: 8px 28px 8px 12px;
    appearance: none; cursor: pointer; flex: 1; box-sizing: border-box;
}
.e-input-group.soc-select-wrap select.soc-select-native:focus { outline: none; }
.soc-select-arrow {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    font-size: 10px; color: #666; pointer-events: none; line-height: 1;
}
.soc-seguimiento-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 768px) { .soc-seguimiento-columns { grid-template-columns: 1fr; } }
.soc-seguimiento-col {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    background: #fff;
}
.soc-seguimiento-col h4 { margin: 0 0 12px 0; font-size: 14px; }
.soc-seguimiento-col .e-btn { margin-bottom: 12px; }

.soc-agenda-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.soc-agenda-header h4 { margin: 0; }
.soc-agenda-date { margin-bottom: 12px; }
.soc-agenda-date .e-input { width: 100%; max-width: 220px; }
.soc-agenda-list { display: flex; flex-direction: column; gap: 10px; }
.soc-agenda-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.soc-agenda-card-title { font-weight: 600; color: #222; }
.soc-agenda-card-time { font-size: 12px; color: #666; }
.soc-agenda-card .soc-btn-link { align-self: flex-end; color: #006d4e; padding: 4px 0; }
.soc-form-nuevo-evento .soc-form-row { margin-bottom: 16px; }
.soc-form-nuevo-evento .soc-form-row label { display: block; font-size: 12px; color: #555; margin-bottom: 6px; }
.soc-form-row-group { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.soc-datetime-row { display: flex; gap: 8px; flex-wrap: wrap; }
.soc-datetime-row .e-input { flex: 1; min-width: 100px; }
.soc-dialog-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid #eee; }
@media (max-width: 500px) { .soc-form-row-group { grid-template-columns: 1fr; } }

.soc-form-actividad .soc-form-row { margin-bottom: 16px; }
.soc-form-actividad .soc-form-row label { display: block; font-size: 12px; color: #555; margin-bottom: 6px; }
.soc-form-row-inline { margin-bottom: 12px; }
.soc-form-row-inline .soc-check-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: normal; }
.soc-form-row-inline .soc-check-label input { margin: 0; }

.soc-actividades-list { display: flex; flex-direction: column; gap: 10px; }
.soc-actividad-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.soc-actividad-card.soc-actividad-prioritaria { border-left: 4px solid rgba(0, 109, 78, 0.5); }
.soc-actividad-card.soc-actividad-origen-contacto { border-left: 4px solid rgba(0, 109, 78, 0.9); }
.soc-actividad-card.soc-actividad-origen-oportunidad { border-left: 4px solid #1a73e8; }
.soc-actividad-card-title { font-weight: 600; color: #222; }
.soc-actividad-card-comment { font-size: 13px; color: #555; }
.soc-actividad-card-date { font-size: 12px; color: #666; }
.soc-actividad-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; flex-wrap: wrap; gap: 8px; }
.soc-actividad-check { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #555; cursor: default; }
.soc-actividad-check input { margin: 0; }
.soc-actividad-card-footer .soc-btn-link { color: #006d4e; }

.soc-form-nota .soc-form-row { margin-bottom: 16px; }
.soc-form-nota .soc-form-row label { display: block; font-size: 12px; color: #555; margin-bottom: 6px; }
.soc-form-hint { display: block; font-size: 11px; color: #777; margin-top: 4px; }

.soc-notas-list { display: flex; flex-direction: column; gap: 10px; }
.soc-nota-card {
    border: 1px solid #006d4e;
    border-radius: 6px;
    padding: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.soc-nota-card-title { font-weight: 600; color: #222; font-size: 14px; }
.soc-nota-card-body { font-size: 13px; color: #555; }
.soc-nota-card-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.soc-nota-meta { font-size: 11px; color: #888; }
.soc-nota-card-footer .soc-btn-link { color: #006d4e; }

.mt-2 { margin-top: 8px; }
.text-muted { color: #888; font-size: 12px; }
.soc-datos-list { display: flex; flex-direction: column; }

/* Oportunidad */
.oportunidad-module {
    text-transform: uppercase;
}
.oportunidad-module .soc-opportunity-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.oportunidad-module .soc-opportunity-header-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.oportunidad-module .soc-opportunity-header-main .soc-title {
    color: #4f4f4f;
}
.oportunidad-module .soc-opportunity-header-main .soc-title .e-icons {
    color: #4f4f4f;
}
.oportunidad-module .soc-opportunity-subtitle {
    font-size: 0.9rem;
    color: #4f4f4f;
    text-transform: none;
}
.oportunidad-module .soc-opportunity-subtitle .soc-link-action {
    color: #4f4f4f;
}
.oportunidad-module .soc-opportunity-subtitle .soc-link-action:not(:disabled):hover {
    color: #006d4e;
}
.oportunidad-module .soc-opportunity-stepper {
    width: 100%;
    min-width: 320px;
    --e-primary: #0064a6;
    --e-primary-color: #0064a6;
}
.oportunidad-module .soc-opportunity-stepper .e-step-container {
    flex: 1 1 0;
}
/* Fila de links de estatus bajo cada etapa del stepper */
.soc-stepper-status-row {
    display: flex;
    width: 100%;
    margin-top: 2px;
    overflow: hidden;
}
.soc-stepper-status-item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
.soc-stepper-status-link {
    display: block;
    background: none;
    border: none;
    padding: 0 2px;
    font-size: 10px;
    color: #aaa;
    cursor: pointer;
    text-decoration: underline;
    line-height: 1.3;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s;
}
.soc-stepper-status-link:not(.soc-stepper-status-readonly):hover {
    color: #0064a6;
}
.soc-stepper-status-link.soc-stepper-status-readonly {
    cursor: default;
    text-decoration: none;
}
.soc-stepper-status-link.soc-stepper-status-active {
    color: #0064a6;
    font-weight: 600;
}
.soc-stepper-status-link.soc-stepper-status-has-data {
    color: #0064a6;
    font-weight: 400;
}
.soc-stepper-status-item:nth-last-child(1),
.soc-stepper-status-item:nth-last-child(2) {
    justify-content: flex-end;
}
.soc-stepper-status-item:nth-last-child(1) .soc-stepper-status-link,
.soc-stepper-status-item:nth-last-child(2) .soc-stepper-status-link {
    text-align: right !important;
    width: auto;
}
.oportunidad-module .soc-opportunity-stepper .e-step-label {
    font-size: 11px;
}
/* Stepper oportunidades: acento #0064a6 (azul) */
.oportunidad-module .soc-opportunity-stepper .e-stepper-progressbar {
    background-color: #e0e0e0 !important;
    height: 3px !important;
    min-height: 3px !important;
}
.oportunidad-module .soc-opportunity-stepper .e-stepper-progressbar-value,
.oportunidad-module .soc-opportunity-stepper .e-progressbar-value {
    background-color: #0064a6 !important;
    height: 3px !important;
    min-height: 3px !important;
}
/* Quitar el cuadro de color del paso actual: contenedor del paso en progreso sin fondo */
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-inprogress,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-selected,
.oportunidad-module .soc-opportunity-stepper li.e-step-container.e-step-inprogress,
.oportunidad-module .soc-opportunity-stepper li.e-step-container.e-step-selected {
    background: transparent !important;
    box-shadow: none !important;
}
/* Círculo del paso: azul en completados e in-progress; icono blanco */
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-inprogress .e-step.e-indicator,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-selected .e-step.e-indicator,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-completed .e-step.e-indicator {
    background-color: #0064a6 !important;
    border-color: #0064a6 !important;
    color: #fff !important;
}
.oportunidad-module .soc-opportunity-stepper .e-step.e-indicator .e-icons {
    color: #fff !important;
}
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-completed .e-step.e-indicator .e-icons {
    color: #fff !important;
}
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-inprogress .e-step-label,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-completed .e-step-label {
    color: #0064a6 !important;
    font-weight: 600;
}
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-inprogress .e-step-text,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-completed .e-step-text,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-inprogress .e-step-label-container,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-completed .e-step-label-container,
.oportunidad-module .soc-opportunity-stepper .e-stepper-item a,
.oportunidad-module .soc-opportunity-stepper .e-stepper-item .e-step-text {
    color: #0064a6 !important;
}
/* Líneas/conectores en azul */
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-completed::before,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-completed::after {
    border-color: #0064a6 !important;
    background-color: transparent !important;
}
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-inprogress::before,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-inprogress::after {
    border-color: #0064a6 !important;
    background-color: transparent !important;
    box-shadow: none !important;
}
/* Stepper de estatus del contacto (verde, igual estructura que el de oportunidades) */
.contacto-module .soc-contact-stepper {
    width: 100%;
    --e-primary: #006d4e;
    --e-primary-color: #006d4e;
}
.contacto-module .soc-contact-stepper .e-step-label {
    font-size: 11px;
}
.contacto-module .soc-contact-stepper .e-stepper-progressbar {
    background-color: #e0e0e0 !important;
    height: 3px !important;
    min-height: 3px !important;
}
.contacto-module .soc-contact-stepper .e-stepper-progressbar-value,
.contacto-module .soc-contact-stepper .e-progressbar-value {
    background-color: #006d4e !important;
    height: 3px !important;
    min-height: 3px !important;
}
.contacto-module .soc-contact-stepper .e-step-container.e-step-inprogress,
.contacto-module .soc-contact-stepper .e-step-container.e-step-selected,
.contacto-module .soc-contact-stepper li.e-step-container.e-step-inprogress,
.contacto-module .soc-contact-stepper li.e-step-container.e-step-selected {
    background: transparent !important;
    box-shadow: none !important;
}
.contacto-module .soc-contact-stepper .e-step-container.e-step-inprogress .e-step.e-indicator,
.contacto-module .soc-contact-stepper .e-step-container.e-step-selected .e-step.e-indicator,
.contacto-module .soc-contact-stepper .e-step-container.e-step-completed .e-step.e-indicator {
    background-color: #006d4e !important;
    border-color: #006d4e !important;
    color: #fff !important;
}
.contacto-module .soc-contact-stepper .e-step.e-indicator .e-icons {
    color: #fff !important;
}
.contacto-module .soc-contact-stepper .e-step-container.e-step-completed .e-step.e-indicator .e-icons {
    color: #fff !important;
}
.contacto-module .soc-contact-stepper .e-step-container.e-step-inprogress .e-step-label,
.contacto-module .soc-contact-stepper .e-step-container.e-step-completed .e-step-label {
    color: #006d4e !important;
    font-weight: 600;
}
.contacto-module .soc-contact-stepper .e-step-container.e-step-inprogress .e-step-text,
.contacto-module .soc-contact-stepper .e-step-container.e-step-completed .e-step-text,
.contacto-module .soc-contact-stepper .e-step-container.e-step-inprogress .e-step-label-container,
.contacto-module .soc-contact-stepper .e-step-container.e-step-completed .e-step-label-container,
.contacto-module .soc-contact-stepper .e-stepper-item a,
.contacto-module .soc-contact-stepper .e-stepper-item .e-step-text {
    color: #006d4e !important;
}
.contacto-module .soc-contact-stepper .e-step-container.e-step-completed::before,
.contacto-module .soc-contact-stepper .e-step-container.e-step-completed::after {
    border-color: #006d4e !important;
    background-color: transparent !important;
}
.contacto-module .soc-contact-stepper .e-step-container.e-step-inprogress::before,
.contacto-module .soc-contact-stepper .e-step-container.e-step-inprogress::after {
    border-color: #006d4e !important;
    background-color: transparent !important;
}
.contacto-module .soc-contact-stepper .soc-step-last-active .e-step.e-indicator {
    background: #fff !important;
    border-color: #006d4e !important;
    color: #006d4e !important;
}
.contacto-module .soc-contact-stepper .soc-step-last-active .e-step.e-indicator .e-icons {
    color: #006d4e !important;
}
.contacto-module .soc-contact-stepper .e-stepper-item {
    background-color: transparent !important;
    box-shadow: none !important;
}
.contacto-module .soc-contact-stepper .e-stepper-item.e-selected .e-step-label,
.contacto-module .soc-contact-stepper .e-stepper-item.e-selected .e-step-text,
.contacto-module .soc-contact-stepper .e-stepper-item.e-active .e-step-label,
.contacto-module .soc-contact-stepper .e-stepper-item.e-active .e-step-text,
.contacto-module .soc-contact-stepper .e-stepper-item.e-step-inprogress .e-step-label,
.contacto-module .soc-contact-stepper .e-stepper-item.e-step-inprogress .e-step-text,
.contacto-module .soc-contact-stepper .e-stepper-item.e-step-completed .e-step-label,
.contacto-module .soc-contact-stepper .e-stepper-item.e-step-completed .e-step-text {
    color: #006d4e !important;
}
.contacto-module .soc-contact-stepper .e-stepper-item.e-selected .e-step.e-indicator,
.contacto-module .soc-contact-stepper .e-stepper-item.e-active .e-step.e-indicator,
.contacto-module .soc-contact-stepper .e-stepper-item.e-step-inprogress .e-step.e-indicator,
.contacto-module .soc-contact-stepper .e-stepper-item.e-step-completed .e-step.e-indicator {
    background: #006d4e !important;
    border-color: #006d4e !important;
    color: #fff !important;
}

/* Variaciones del tema Syncfusion */
.oportunidad-module .soc-opportunity-stepper .e-stepper-item.e-selected .e-step-label,
.oportunidad-module .soc-opportunity-stepper .e-stepper-item.e-selected .e-step-text,
.oportunidad-module .soc-opportunity-stepper .e-stepper-item.e-active .e-step-label,
.oportunidad-module .soc-opportunity-stepper .e-stepper-item.e-active .e-step-text,
.oportunidad-module .soc-opportunity-stepper .e-stepper-item.e-step-inprogress .e-step-label,
.oportunidad-module .soc-opportunity-stepper .e-stepper-item.e-step-inprogress .e-step-text,
.oportunidad-module .soc-opportunity-stepper .e-stepper-item.e-step-completed .e-step-label,
.oportunidad-module .soc-opportunity-stepper .e-stepper-item.e-step-completed .e-step-text {
    color: #0064a6 !important;
}
.oportunidad-module .soc-opportunity-stepper .e-stepper-item.e-selected .e-step.e-indicator,
.oportunidad-module .soc-opportunity-stepper .e-stepper-item.e-active .e-step.e-indicator,
.oportunidad-module .soc-opportunity-stepper .e-stepper-item.e-step-inprogress .e-step.e-indicator,
.oportunidad-module .soc-opportunity-stepper .e-stepper-item.e-step-completed .e-step.e-indicator {
    background: #0064a6 !important;
    border-color: #0064a6 !important;
    color: #fff !important;
}
/* Último paso activo: borde azul, icono azul sobre fondo blanco */
.oportunidad-module .soc-opportunity-stepper .soc-step-last-active .e-step.e-indicator {
    background: #fff !important;
    border-color: #0064a6 !important;
    color: #0064a6 !important;
}
.oportunidad-module .soc-opportunity-stepper .soc-step-last-active .e-step.e-indicator .e-icons {
    color: #0064a6 !important;
}
/* Sin recuadro de fondo en los items */
.oportunidad-module .soc-opportunity-stepper .e-stepper-item {
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
}
.oportunidad-module .soc-opportunity-stepper .e-stepper-item.e-selected::before,
.oportunidad-module .soc-opportunity-stepper .e-stepper-item.e-active::before,
.oportunidad-module .soc-opportunity-stepper .e-stepper-item.e-step-inprogress::before,
.oportunidad-module .soc-opportunity-stepper .e-stepper-item.e-selected::after,
.oportunidad-module .soc-opportunity-stepper .e-stepper-item.e-active::after,
.oportunidad-module .soc-opportunity-stepper .e-stepper-item.e-step-inprogress::after {
    background: transparent !important;
    box-shadow: none !important;
}
/* Variables y fallback para el stepper */
.oportunidad-module .soc-opportunity-stepper,
.oportunidad-module .soc-opportunity-stepper * {
    --e-primary: #0064a6 !important;
    --e-primary-color: #0064a6 !important;
}
.oportunidad-module .soc-opportunity-stepper a,
.oportunidad-module .soc-opportunity-stepper [class*="label"],
.oportunidad-module .soc-opportunity-stepper [class*="text"],
.oportunidad-module .soc-opportunity-stepper [class*="active"],
.oportunidad-module .soc-opportunity-stepper [class*="selected"] {
    color: #0064a6 !important;
}
.oportunidad-module .soc-opportunity-stepper [class*="progress"],
.oportunidad-module .soc-opportunity-stepper [class*="connector"],
.oportunidad-module .soc-opportunity-stepper [class*="line"] {
    border-color: #0064a6 !important;
    background-color: #0064a6 !important;
}

/* Indicadores genéricos (pasos completados / actual) */
.oportunidad-module .soc-opportunity-stepper li[class*="step-container"][class*="step-completed"] [class*="step-indicator"],
.oportunidad-module .soc-opportunity-stepper li[class*="step-container"][class*="step-inprogress"] [class*="step-indicator"],
.oportunidad-module .soc-opportunity-stepper li[class*="step-container"][class*="step-selected"] [class*="step-indicator"] {
    background-color: #0064a6 !important;
    border-color: #0064a6 !important;
    color: #fff !important;
}
.oportunidad-module .soc-opportunity-stepper li[class*="step-container"][class*="step-completed"] [class*="step-indicator"] .e-icons,
.oportunidad-module .soc-opportunity-stepper li[class*="step-container"][class*="step-inprogress"] [class*="step-indicator"] .e-icons,
.oportunidad-module .soc-opportunity-stepper li[class*="step-container"][class*="step-selected"] [class*="step-indicator"] .e-icons {
    color: #fff !important;
}
.oportunidad-module .soc-opportunity-stepper li[class*="step-container"][class*="step-completed"] [class*="step-label"],
.oportunidad-module .soc-opportunity-stepper li[class*="step-container"][class*="step-inprogress"] [class*="step-label"],
.oportunidad-module .soc-opportunity-stepper li[class*="step-container"][class*="step-selected"] [class*="step-label"] {
    color: #0064a6 !important;
}

/* Iconos en pasos completados / actual / seleccionado */
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-completed .e-step.e-indicator .e-user,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-completed .e-step.e-indicator .e-edit,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-completed .e-step.e-indicator .e-folder,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-completed .e-step.e-indicator .e-home,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-completed .e-step.e-indicator .e-columns,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-completed .e-step.e-indicator .e-check,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-inprogress .e-step.e-indicator .e-user,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-inprogress .e-step.e-indicator .e-edit,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-inprogress .e-step.e-indicator .e-folder,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-inprogress .e-step.e-indicator .e-home,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-inprogress .e-step.e-indicator .e-columns,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-inprogress .e-step.e-indicator .e-check,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-selected .e-step.e-indicator .e-user,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-selected .e-step.e-indicator .e-edit,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-selected .e-step.e-indicator .e-folder,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-selected .e-step.e-indicator .e-home,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-selected .e-step.e-indicator .e-columns,
.oportunidad-module .soc-opportunity-stepper .e-step-container.e-step-selected .e-step.e-indicator .e-check {
    background-color: #0064a6 !important;
    color: #fff !important;
}

.soc-resumen-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 900px) { .soc-resumen-grid { grid-template-columns: 1fr; } }
.soc-resumen-fields { grid-column: 1; }
.soc-resumen-stages {
    grid-column: 1 / -1;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    background: #fff;
}
.soc-resumen-stages h4 { margin: 0 0 12px 0; font-size: 14px; }
.soc-stages-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.soc-stage {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    background: #e8e8e8;
    color: #666;
}
.soc-stage.active {
    background: #006d4e;
    color: #fff;
}
.soc-buscar-oportunidad { padding: 8px 0; }
/* Sombreado/foco verde en el campo de texto de Busca Oportunidad */
.soc-buscar-oportunidad .e-input-group:focus-within,
.soc-buscar-oportunidad .e-input:focus {
    box-shadow: 0 0 0 2px rgba(0, 109, 78, 0.25) !important;
    outline: none;
    border-color: #006d4e !important;
}
.soc-buscar-oportunidad .e-input-group.e-input-focus {
    box-shadow: 0 0 0 2px rgba(0, 109, 78, 0.25) !important;
    border-color: #006d4e !important;
}
.soc-buscar-oportunidad .e-input-group .e-input,
.soc-buscar-oportunidad .e-control-wrapper .e-input {
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
}
.soc-opportunity-results { margin-top: 12px; }
.soc-opportunity-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid rgba(0,109,78,0.25);
    border-radius: 6px;
    margin-bottom: 8px;
}
.soc-opportunity-contact-list {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 8px;
    max-height: 220px;
    overflow-y: auto;
}
.soc-opportunity-contact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}
.soc-opportunity-contact-row:last-child { border-bottom: none; }
.soc-cp-suggestions {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 6px;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    position: relative;
    z-index: 5;
}
.soc-cp-suggestion-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}
.soc-cp-suggestion-row:last-child { border-bottom: none; }
.soc-cp-suggestion-row:hover { background: #f5f8ff; }
.soc-cp-suggestion-detalle { font-size: 12px; color: #777; }
.soc-search-contact-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.soc-search-contact-info strong { font-size: 14px; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soc-search-contact-sub { font-size: 12px; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soc-selected-contact { margin-top: 8px; color: #006d4e; font-size: 14px; }
.soc-toggle-row { display: flex; align-items: center; gap: 12px; }
.soc-switch-label { position: relative; display: inline-block; width: 44px; height: 24px; }
.soc-switch-input { opacity: 0; width: 0; height: 0; }
.soc-switch-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc; border-radius: 24px; transition: 0.3s;
}
.soc-switch-slider::before {
    content: ""; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px;
    background: #fff; border-radius: 50%; transition: 0.3s;
}
.soc-switch-input:checked + .soc-switch-slider { background: #006d4e; }
.soc-switch-input:checked + .soc-switch-slider::before { transform: translateX(20px); }
.soc-btn-link { background: none; border: none; color: #006d4e; cursor: pointer; font-size: 13px; padding: 4px 0; }
.soc-btn-link:hover { text-decoration: underline; }

/* Teléfono con botón enviar acceso al portal (SMS + correo) */
.soc-phone-with-action { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.soc-phone-with-action .soc-btn-whatsapp-presentacion { background-color: #ffffff; color: #006d4e; border: 1.5px solid #006d4e; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background-color 0.15s, color 0.15s; }
.soc-phone-with-action .soc-btn-whatsapp-presentacion:hover:not(:disabled) { background-color: #006d4e; color: #ffffff; }
.soc-phone-with-action .soc-btn-whatsapp-presentacion:disabled { opacity: 0.45; cursor: not-allowed; }

.contacto-module .soc-phone-with-action .soc-btn-whatsapp-presentacion {
    background-color: #0064a6 !important;
    color: #ffffff !important;
    border: 1px solid #0064a6 !important;
    border-radius: 6px !important;
}
.contacto-module .soc-phone-with-action .soc-btn-whatsapp-presentacion:hover:not(:disabled) {
    background-color: #005a9c !important;
    border-color: #005a9c !important;
    color: #ffffff !important;
}
.contacto-module .soc-phone-with-action .soc-btn-whatsapp-presentacion:disabled {
    opacity: 1 !important;
    background-color: #89d1f7 !important;
    border-color: #89d1f7 !important;
    color: #ffffff !important;
    cursor: not-allowed;
}

/* Contenedor del chat WhatsApp en la pestaña Contactos */
.soc-whatsapp-chat-container { max-width: 100%; }
.soc-chat-ui-wrapper { margin-top: 12px; min-height: 420px; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; }
/* Header del Chat UI en verde corporativo */
.soc-whatsapp-chat-header .e-chat-header { background: #006d4e !important; }

/* Syncfusion inputs: foco con verde corporativo en vez de azul */
.e-input-group.e-input-focus,
.e-input-group.e-control-wrapper.e-input-focus,
.e-float-input.e-input-focus,
.e-float-input.e-control-wrapper.e-input-focus,
.e-float-input.e-input-focus input,
.e-float-input.e-control-wrapper.e-input-focus input {
    border-color: #006d4e !important;
    box-shadow: 0 0 0 2px rgba(0, 109, 78, 0.2) !important;
}

/* Nueva oportunidad: layout con panel de contacto a la derecha */
.soc-opportunity-new-wrapper {
    display: flex;
    gap: 16px;
}

.soc-opportunity-new-main {
    flex: 1 1 auto;
    min-width: 0; /* permite que los hijos con width:100% usen todo el ancho */
}

.soc-opportunity-new-main .mb-3 {
    width: 100%;
    max-width: 100%;
}

.soc-opportunity-new-main .e-input-group.soc-select-wrap {
    width: 100%;
}

.soc-opportunity-new-contact-panel {
    flex: 0 0 340px;
    border-left: 1px solid #e0e0e0;
    padding-left: 16px;
}

.soc-opportunity-new-contact-panel .soc-panel-title {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #006d4e;
}

@media (max-width: 768px) {
    .soc-opportunity-new-wrapper {
        flex-direction: column;
    }

    .soc-opportunity-new-contact-panel {
        border-left: none;
        border-top: 1px solid #e0e0e0;
        padding-left: 0;
        padding-top: 12px;
    }
}

/* Dashboard Home */
/* KPI Cards */
.soc-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.soc-kpi-card {
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    border-top: 3px solid #006d4e;
    background: #fff;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* Home v2 — variante experimental "liquid glass", exclusiva de /home-v2 */
.hv2-glass.soc-kpi-grid {
    padding: 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #004d80 0%, #0064a6 50%, #00543d 100%);
}
.hv2-glass .soc-kpi-card {
    border: 1px solid rgba(255,255,255,0.35);
    border-top: 3px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.30);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}
.hv2-glass .soc-kpi-card .soc-kpi-label { color: rgba(255,255,255,0.85); }
.hv2-glass .soc-kpi-card .soc-kpi-value { color: #fff; }
.hv2-glass .soc-kpi-card .soc-dashboard-card-footer { border-top: 1px solid rgba(255,255,255,0.25); }
.hv2-glass .soc-kpi-card .soc-dashboard-detalle-link { color: #fff; }
.soc-kpi-value { font-size: 2rem; font-weight: 700; color: #6B7280; line-height: 1; }
.soc-kpi-label {
    font-size: 10px;
    color: #9CA3AF;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.soc-kpi-variation-up { color: #16a34a !important; }
.soc-kpi-variation-down { color: #dc2626 !important; }
/* Bottom 2-column grid for charts */
.soc-dashboard-bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
/* Trend bar: lighter accent color */
.soc-trend-bar { background: linear-gradient(180deg, #52deff 0%, #1ab8e0 100%) !important; }

.soc-dashboard-page { padding: 16px 24px; }
.soc-dashboard-title { font-weight: 600; color: #006d4e; margin: 0 0 20px 0; font-size: 18px; }
.soc-dashboard-grid { display: flex; flex-direction: column; gap: 16px; }
.soc-dashboard-cards { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.soc-dashboard-cards--4 { grid-template-columns: repeat(4, 1fr); }
.soc-dashboard-cards--5 { grid-template-columns: repeat(5, 1fr); }
.soc-dashboard-cards--3 { grid-template-columns: repeat(3, 1fr); }
.soc-dashboard-section-title { font-size: 13px; font-weight: 600; color: #374151; padding-bottom: 6px; border-bottom: 1px solid #E5E7EB; margin-bottom: 4px; }
.soc-dashboard-card {
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.soc-dashboard-panel-header {
    background: #F8FAFB;
    color: #374151;
    font-weight: 600;
    padding: 10px 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid #E5E7EB;
}
.soc-dashboard-panel-content { padding: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 72px; }
.soc-dashboard-count { font-size: 1.75rem; font-weight: 700; color: #6B7280; display: block; }
.soc-dashboard-label { font-size: 11px; color: #9CA3AF; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.soc-dashboard-card-footer { padding: 8px 12px; margin-top: auto; text-align: right; border-top: 1px solid #F3F4F6; }
.soc-dashboard-detalle-link { font-size: 12px; color: #006d4e; font-weight: 600; text-decoration: none; }
.soc-dashboard-detalle-link:hover { text-decoration: underline; }
.soc-dashboard-detalle-link--btn { background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.soc-dashboard-card-wide { min-height: 180px; }
.soc-dashboard-card-wide .soc-dashboard-panel-content { min-height: 120px; align-items: flex-start; justify-content: flex-start; }
/* Home v2 — funnel horizontal de etapas */
.hv2-funnel { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid #E5E7EB; border-radius: 8px; padding: 10px 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.hv2-funnel-row { display: grid; grid-template-columns: 160px 1fr 48px; align-items: center; gap: 12px; padding: 6px 0; text-decoration: none; }
.hv2-funnel-label { font-size: 12px; color: #374151; font-weight: 500; }
.hv2-funnel-bar-track { display: block; height: 10px; border-radius: 5px; background: #F3F4F6; overflow: hidden; }
.hv2-funnel-bar-fill { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #52deff 0%, #006d4e 100%); min-width: 2px; }
.hv2-funnel-count { font-size: 13px; font-weight: 700; color: #6B7280; text-align: right; }
.hv2-funnel-row--zero { opacity: 0.45; }
.hv2-funnel-row--zero .hv2-funnel-bar-fill { background: #D1D5DB; }
.hv2-funnel-row:hover:not(.hv2-funnel-row--zero) .hv2-funnel-label { color: #006d4e; }

/* Home v2 — atenuar tarjetas de clientes sin actividad */
.soc-dashboard-card--zero { opacity: 0.5; }

/* Home v2 — variante experimental "liquid glass", exclusiva de /home-v2 */
.hv2-glass-page {
    flex: none;
    height: auto;
    padding: 16px 24px 32px;
    border-radius: 16px;
    background: linear-gradient(165deg, #004d80 0%, #0064a6 45%, #00543d 100%);
}
.hv2-glass-page .ai-dash-header {
    background: rgba(0,30,50,0.30);
    border: 1px solid rgba(255,255,255,0.35);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}
.hv2-glass-page .ai-dash-header h2,
.hv2-glass-page .ai-dash-title-icon i { color: #fff; }
.hv2-glass-page .ai-dash-subtitle { color: rgba(255,255,255,0.85); }
.hv2-glass-page .ai-dash-title-icon { background: rgba(255,255,255,0.25); box-shadow: none; }
.hv2-glass-page .ai-dash-date-field label { color: rgba(255,255,255,0.9); }

.hv2-glass-page .soc-dashboard-section-title { color: #fff; border-bottom-color: rgba(255,255,255,0.3); }

.hv2-glass-page .soc-dashboard-card,
.hv2-glass-page .hv2-funnel {
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.30);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}
.hv2-glass-page .soc-dashboard-panel-header {
    background: rgba(0,30,50,0.18);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.25);
}
.hv2-glass-page .soc-dashboard-count,
.hv2-glass-page .soc-candlestick-candle-value,
.hv2-glass-page .soc-candlestick-ytick,
.hv2-glass-page .soc-candlestick-xlabel { color: #fff; }
.hv2-glass-page .soc-dashboard-label { color: rgba(255,255,255,0.8); }
.hv2-glass-page .soc-dashboard-card-footer { border-top: 1px solid rgba(255,255,255,0.25); }
.hv2-glass-page .soc-dashboard-detalle-link { color: #fff; font-weight: 700; }

.hv2-glass-page .hv2-funnel-label { color: rgba(255,255,255,0.95); }
.hv2-glass-page .hv2-funnel-bar-track { background: rgba(255,255,255,0.22); }
.hv2-glass-page .hv2-funnel-bar-fill { background: linear-gradient(90deg, #52deff 0%, #00d68f 100%); }
.hv2-glass-page .hv2-funnel-row--zero { opacity: 0.7; }
.hv2-glass-page .hv2-funnel-row--zero .hv2-funnel-label,
.hv2-glass-page .hv2-funnel-row--zero .hv2-funnel-count { color: rgba(255,255,255,0.6); }
.hv2-glass-page .hv2-funnel-row--zero .hv2-funnel-bar-fill { background: rgba(255,255,255,0.35); }
.hv2-glass-page .hv2-funnel-count { color: #fff; }
.hv2-glass-page .hv2-funnel-row:hover:not(.hv2-funnel-row--zero) .hv2-funnel-label { color: #fff; opacity: 0.85; }

.soc-dashboard-chart-wrap { width: 100%; }
.soc-dashboard-chart-title { margin: 0 0 12px 0; font-size: 14px; font-weight: 600; color: #333; }
.soc-dashboard-chart-box { width: 100%; min-height: 260px; padding: 16px; border: 1px solid #e0e0e0; border-radius: 8px; background: #fafafa; }
.soc-dashboard-barchart { display: flex; flex-direction: column; gap: 12px; }
.soc-dashboard-barchart-row { display: grid; grid-template-columns: 160px 1fr 48px; align-items: center; gap: 12px; min-height: 28px; }
.soc-dashboard-barchart-label { font-size: 13px; color: #333; }
.soc-dashboard-barchart-bar-bg { height: 24px; background: #e8e8e8; border-radius: 4px; overflow: hidden; }
.soc-dashboard-barchart-bar { height: 100%; background: linear-gradient(90deg, #006d4e 0%, #008f63 100%); border-radius: 4px; min-width: 4px; transition: width 0.35s ease; }
.soc-dashboard-barchart-value { font-size: 14px; font-weight: 600; color: #006d4e; text-align: right; }

/* ===== Home v3 — propuesta corporativa sobria (sin glass, sin gradientes vivos) ===== */
.hv3-page { background: #f8fafc; padding: 16px 24px 32px; border-radius: 16px; }

.hv3-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.hv3-kpi-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 20px 40px;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}
.hv3-kpi-icon {
    flex-shrink: 0;
    width: 38px; height: 38px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem;
}
.hv3-kpi-icon--blue { background: #e6f0f8; color: #0064a6; }
.hv3-kpi-icon--green { background: #e3f6ee; color: #006d4e; }
.hv3-kpi-icon--amber { background: #fef3e2; color: #b45309; }
.hv3-kpi-icon--red { background: #fde8e8; color: #dc2626; }
.hv3-kpi-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hv3-kpi-label { font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.hv3-kpi-value { font-size: 1.65rem; font-weight: 700; color: #1e293b; line-height: 1.1; }
.hv3-kpi-detalle {
    position: absolute; right: 16px; bottom: 12px;
    background: none; border: none; padding: 0; cursor: pointer;
    font-family: inherit; font-size: 12px; font-weight: 600;
    color: #0064a6;
}
.hv3-kpi-detalle:hover { text-decoration: underline; }

.hv3-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}
.hv3-card-header {
    padding: 12px 18px;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    color: #475569;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}
.hv3-card-body { padding: 18px; }
.hv3-card-body--flush { padding: 0; }

/* Gráfica de línea simple en SVG */
.hv3-line-chart { width: 100%; }
.hv3-line-svg { width: 100%; height: 130px; display: block; }
.hv3-line-path { fill: none; stroke: #0064a6; stroke-width: 2; }
.hv3-line-dot { fill: #fff; stroke: #0064a6; stroke-width: 2; }
.hv3-line-xaxis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: #94a3b8; }

/* Barras horizontales (montos por etapa) */
.hv3-bars { display: flex; flex-direction: column; gap: 10px; }
.hv3-bars-row { display: grid; grid-template-columns: 130px 1fr 60px; align-items: center; gap: 10px; }
.hv3-bars-label { font-size: 12px; color: #475569; font-weight: 500; }
.hv3-bars-track { display: block; height: 10px; border-radius: 5px; background: #f1f5f9; overflow: hidden; }
.hv3-bars-fill { display: block; height: 100%; border-radius: 5px; background: #006d4e; min-width: 2px; }
.hv3-bars-value { font-size: 12px; font-weight: 600; color: #334155; text-align: right; }

/* Pipeline — barra apilada única + leyenda */
.hv3-stacked-track {
    display: flex;
    width: 100%;
    height: 14px;
    border-radius: 7px;
    overflow: hidden;
    background: #f1f5f9;
}
.hv3-stacked-segment { display: block; height: 100%; text-decoration: none; }
.hv3-stage-0 { background: #0064a6; }
.hv3-stage-1 { background: #2491c8; }
.hv3-stage-2 { background: #1ab8e0; }
.hv3-stage-3 { background: #52deff; }
.hv3-stage-4 { background: #00a37a; }
.hv3-stage-5 { background: #006d4e; }
.hv3-stage-6 { background: #004d36; }

.hv3-stacked-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.hv3-legend-item { display: flex; align-items: center; gap: 6px; text-decoration: none; font-size: 12px; color: #334155; }
.hv3-legend-item:hover .hv3-legend-label { text-decoration: underline; }
.hv3-legend-item--zero { opacity: 0.45; }
.hv3-legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.hv3-legend-label { font-weight: 500; }
.hv3-legend-count { font-weight: 700; color: #1e293b; }

/* Tabla compacta de clientes por etapa */
.hv3-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hv3-table thead th {
    text-align: left;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
    color: #64748b;
    padding: 10px 18px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}
.hv3-table tbody td { padding: 10px 18px; border-bottom: 1px solid #f1f5f9; color: #334155; vertical-align: middle; }
.hv3-table tbody tr:last-child td { border-bottom: none; }
.hv3-table-count { font-weight: 700; color: #1e293b; }
.hv3-table-track { display: block; width: 100%; max-width: 220px; height: 8px; border-radius: 4px; background: #f1f5f9; overflow: hidden; }
.hv3-table-fill { display: block; height: 100%; border-radius: 4px; background: #0064a6; min-width: 2px; }
.hv3-table-action { text-align: right; }
.hv3-table-link { background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; font-size: 12px; font-weight: 600; color: #0064a6; }
.hv3-table-link:hover { text-decoration: underline; }
.hv3-table-row--zero { opacity: 0.5; }

@@media (max-width: 900px) {
    .hv3-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .hv3-bars-row { grid-template-columns: 100px 1fr 50px; }
}
@@media (max-width: 600px) {
    .hv3-kpi-grid { grid-template-columns: 1fr; }
}

/* Dialog nativo para contactos — top-layer del navegador, siempre por encima de todo */
dialog.soc-native-dialog {
    display: none;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    padding: 0;
    width: 90vw;
    max-width: 1200px;
    min-height: 320px;
    max-height: 85vh;
    overflow: hidden;
}
dialog.soc-native-dialog[open] {
    display: flex;
    flex-direction: column;
}
dialog.soc-native-dialog::backdrop {
    background: rgba(15, 23, 42, 0.45);
}
.soc-native-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #E5E7EB;
    background: #fff;
    flex-shrink: 0;
}
.soc-native-dialog__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #006d4e;
}
.soc-native-dialog__body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
    background: #fff;
}
.soc-native-dialog__footer {
    padding: 12px 20px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: flex-end;
    background: #fff;
    flex-shrink: 0;
}

/* Modal detalle KPI (inicio) — alineado a tarjetas del dashboard */
.soc-kpi-detail-modal-backdrop {
    background: rgba(15, 23, 42, 0.4);
    z-index: 10050 !important;
}
.soc-kpi-detail-modal__content {
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}
.soc-kpi-detail-modal__header {
    border-bottom: 1px solid #E5E7EB;
    background: #fff;
    padding: 16px 20px;
}
.soc-kpi-detail-modal__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #006d4e;
    line-height: 1.35;
    padding-right: 8px;
}
.soc-kpi-detail-modal__header-close {
    opacity: 0.55;
}
.soc-kpi-detail-modal__header-close:hover {
    opacity: 1;
}
.soc-kpi-detail-modal__body {
    padding: 16px 20px;
    background: #fff;
}
.soc-kpi-detail-modal__empty {
    margin: 0;
    font-size: 14px;
    color: #9CA3AF;
}
.soc-kpi-detail-modal__table {
    margin-bottom: 0;
    font-size: 13px;
    color: #111827;
}
.soc-kpi-detail-modal__table thead th {
    font-weight: 700;
    color: #374151;
    border-bottom-color: #E5E7EB;
    white-space: nowrap;
    padding-top: 10px;
    padding-bottom: 10px;
}
.soc-kpi-detail-modal__table tbody td {
    border-color: #F3F4F6;
    vertical-align: middle;
    white-space: nowrap;
}
.soc-kpi-detail-modal__footer {
    border-top: 1px solid #E5E7EB;
    background: #FAFAFA;
    padding: 12px 20px;
    justify-content: flex-end;
}
.soc-kpi-detail-modal__btn-cerrar {
    border: none;
    border-radius: 8px;
    padding: 8px 22px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: #006d4e;
    color: #D1D5DB;
    transition: background 0.15s ease, color 0.15s ease;
}
.soc-kpi-detail-modal__btn-cerrar:hover {
    background: #008a5f;
    color: #F3F4F6;
}
.soc-kpi-detail-modal__btn-cerrar:focus-visible {
    outline: 2px solid #006d4e;
    outline-offset: 2px;
}
.soc-kpi-detail-modal__opp-link {
    color: #006d4e;
    font-weight: 600;
    text-decoration: none;
}
.soc-kpi-detail-modal__opp-link:hover {
    text-decoration: underline;
    color: #008a5f;
}

/* Página Detalles (icono PDF y grid) */
.soc-detalles-header-row { display: flex; align-items: center; justify-content: flex-start; gap: 10px; margin-bottom: 12px; }
.soc-detalles-header-row .soc-placeholder { margin: 0; }
.soc-detalles-pdf-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid #e0e0e0; border-radius: 8px; background: #fff; color: #006d4e; cursor: pointer; font-size: 20px; }
.soc-detalles-pdf-btn .soc-detalles-pdf-icon { width: 22px; height: 22px; object-fit: contain; display: block; }
.soc-detalles-pdf-btn:hover:not(:disabled) { background: rgba(0,109,78,0.08); border-color: #006d4e; }
.soc-detalles-pdf-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Kanban de oportunidades (HTML/CSS, sin Syncfusion para evitar removeChild/circuit) */
.soc-kanban-page { padding: 16px 24px; min-height: calc(100vh - 120px); }

/* Evitar doble scroll vertical: el board maneja su propio overflow horizontal,
   el contenedor principal no debe scrollear cuando se muestra el Kanban */
.soc-main-content:has(.soc-kanban-page) {
    overflow: hidden !important;
    display: flex !important;
}
.soc-main-content:has(.soc-kanban-page) > .soc-kanban-page {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
    width: 100%;
}
.soc-kanban-title { font-weight: 600; color: #006d4e; margin: 0 0 20px 0; font-size: 18px; }
/* Filtros Kanban: mismo patrón visual que formularios (Contactos — ejecutivo asignado) */
.soc-kanban-filters { max-width: 420px; margin-bottom: 8px; }
.soc-kanban-filters .soc-form-row { margin-bottom: 14px; }
.soc-kanban-filters .soc-form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 6px;
}
.soc-kanban-filters .e-ddl,
.soc-kanban-filters .e-input-group.e-outline {
    width: 100%;
}
.soc-scheduler-page { padding: 16px 24px; min-height: calc(100vh - 120px); }
.soc-scheduler-title { font-weight: 600; color: #006d4e; margin: 0 0 20px 0; font-size: 18px; }

/* Texto de las tarjetas del Kanban Syncfusion */
.soc-kanban-page .e-kanban .e-card,
.soc-kanban-page .e-kanban .e-card * {
    color: #585858 !important;
}
/* Resumen de las tarjetas un poco más pequeño */
.soc-kanban-page .e-kanban .e-card .e-card-content {
    font-size: 12px !important;
}

/* Columnas header del Kanban Syncfusion: fondo neutro */
.soc-kanban-page .e-kanban .e-kanban-header .e-header-cells {
    background: #F8FAFB !important;
    border-bottom: 2px solid #006d4e !important;
    height: auto !important;
    min-height: 56px !important;
    overflow: visible !important;
    white-space: normal !important;
}
.soc-kanban-page .e-kanban .e-kanban-header .e-header-cells .e-header-wrap {
    display: flex !important;
    flex-wrap: wrap !important;
    align-content: flex-start !important;
    gap: 2px 0 !important;
}
.soc-kanban-page .e-kanban .e-kanban-header .e-header-cells .e-header-text {
    flex: 0 0 100% !important;
    width: 100% !important;
    color: #374151 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
}
.soc-kanban-page .e-kanban .e-kanban-header .e-header-cells .e-item-count {
    flex: 0 0 100% !important;
    width: 100% !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    color: #6b7280 !important;
    opacity: 1 !important;
    padding: 0 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.soc-kanban-simple {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
    min-height: calc(100vh - 180px);
    align-items: stretch;
}
.soc-kanban-column {
    flex: 0 0 220px;
    min-width: 220px;
    background: #F8FAFB;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.soc-kanban-column-header {
    background: #F8FAFB;
    color: #374151;
    font-weight: 700;
    padding: 10px 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 2px solid #006d4e;
}
.soc-kanban-column-cards {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.soc-kanban-card {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #E5E7EB;
    padding: 8px 10px 4px;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: box-shadow 0.2s, border-color 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.soc-kanban-card:hover {
    border-color: #006d4e;
    box-shadow: 0 2px 8px rgba(0,109,78,0.12);
}
.soc-kanban-card-title { font-weight: 600; font-size: 13px; color: #585858; margin-bottom: 4px; }
.soc-kanban-card-summary { font-size: 12px; color: #6B7280; line-height: 1.35; margin-bottom: 8px; }
.soc-kanban-card-move { margin-top: 8px; padding-top: 8px; border-top: 1px solid #F3F4F6; }
.soc-kanban-card-move-label { font-size: 11px; color: #9CA3AF; display: block; margin-bottom: 4px; }
.soc-kanban-card-select { width: 100%; font-size: 12px; padding: 6px 8px; border: 1px solid #E5E7EB; border-radius: 4px; background: #fff; color: #585858; }
.soc-kanban-card-select:focus { border-color: #006d4e; outline: none; }
.soc-kanban-card-empty { font-size: 13px; color: #9CA3AF; text-align: center; padding: 20px 10px; }

@media (max-width: 768px) {
    .soc-kanban-simple { gap: 12px; min-height: 400px; }
    .soc-kanban-column { flex: 0 0 200px; min-width: 200px; }
}

/* Gráfico tipo candlestick / columnas: suma de montos por etapa */
.soc-candlestick-chart-box {
    width: 100%;
    min-height: 280px;
    padding: 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: #fff;
}
.soc-candlestick-chart {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    min-height: 240px;
}
.soc-candlestick-yaxis {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 32px;
    width: 52px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 11px;
    color: #555;
    padding-right: 8px;
    text-align: right;
}
.soc-candlestick-area {
    position: relative;
    flex: 1;
    min-height: 160px;
    margin-left: 52px;
    /* Dar espacio extra para etiquetas X cuando el texto es largo
       (ej. "Documentos vivienda"). */
    margin-bottom: 46px;
}
.soc-candlestick-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, #F3F4F6 1px, transparent 1px),
        linear-gradient(to bottom, #F3F4F6 1px, transparent 1px);
    background-size: calc(100% / 7) calc(100% / var(--yticks, 6));
    background-repeat: repeat;
    border-radius: 4px;
}
.soc-candlestick-bars {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 0;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 4px;
    padding: 0 4px;
}
.soc-candlestick-candle {
    flex: 1;
    min-width: 0;
    max-width: 48px;
    background: linear-gradient(180deg, #34a876 0%, #006d4e 100%);
    border-radius: 4px 4px 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 4px;
    transition: height 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.soc-candlestick-candle-value {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 0 2px rgba(0,0,0,0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.soc-candlestick-xaxis {
    display: flex;
    justify-content: space-around;
    gap: 4px;
    margin-left: 52px;
    padding: 0 12px 0 4px;
    font-size: 10px;
    color: #555;
    text-align: center;
    align-items: flex-start;
    height: 90px; /* espacio para etiquetas rotadas */
}
.soc-candlestick-xlabel {
    /* Centrar la etiqueta tomando como referencia el ancho de cada columna (candle ~48px). */
    flex: 0 0 48px;
    width: 48px;
    height: 90px; /* debe coincidir con el espacio del eje X */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    word-break: normal;
    line-height: 1.1;
    padding: 0;
    transform: rotate(-90deg);
    transform-origin: center;
}
.soc-candlestick-chart-box .soc-candlestick-chart { position: relative; }
@media (max-width: 1000px) {
    .soc-dashboard-cards { grid-template-columns: repeat(2, 1fr); }
    .soc-dashboard-cards--4 { grid-template-columns: repeat(2, 1fr); }
    .soc-dashboard-cards--5 { grid-template-columns: repeat(3, 1fr); }
    .soc-dashboard-cards--3 { grid-template-columns: repeat(3, 1fr); }
    .soc-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .soc-dashboard-bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .soc-dashboard-cards { grid-template-columns: 1fr; }
    .soc-dashboard-cards--5 { grid-template-columns: repeat(2, 1fr); }
    .soc-dashboard-cards--3 { grid-template-columns: repeat(2, 1fr); }
    .soc-kpi-grid { grid-template-columns: 1fr; }
    .soc-kpi-value { font-size: 1.5rem; }
    .hv2-funnel-row { grid-template-columns: 90px 1fr 36px; gap: 8px; }
    .hv2-funnel-label { font-size: 11px; }
}

/* =========================================================
   RESPONSIVE MÓVIL - Todas las páginas
========================================================= */

@media (max-width: 768px) {
    .soc-dashboard-page,
    .soc-page-inner,
    .contacto-module {
        max-width: 100%;
        box-sizing: border-box;
    }

    .soc-dashboard-page {
        padding: 12px 16px 24px;
        min-height: 0;
    }

    .soc-dashboard-title {
        font-size: 1.25rem;
        margin-bottom: 16px;
    }

    .soc-dashboard-grid {
        gap: 12px;
    }

    .soc-page-inner {
        padding: 12px 16px 24px;
    }

    .soc-page-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 24px;
        gap: 12px;
    }

    .soc-title {
        font-size: 1.25rem;
    }

    .soc-contact-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .soc-contact-stepper-wrap {
        width: 100%;
        overflow-x: hidden;
    }

    .soc-contact-stepper-wrap .soc-contact-stepper {
        width: 100%;
        max-width: 100%;
    }

    .soc-contact-toolbar {
        padding: 8px 12px;
        gap: 8px;
        min-height: 44px;
        flex-wrap: wrap;
        max-width: 100%;
    }

    .soc-contact-toolbar .e-btn {
        padding: 8px 12px !important;
        min-height: 40px;
    }

    /* Pestañas en varias filas para que quepan sin scroll horizontal */
    .soc-tabs,
    .soc-tab-content {
        max-width: 100%;
        overflow-x: hidden;
    }

    .soc-tab-headers {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .soc-tab {
        padding: 8px 12px;
        font-size: 13px;
        white-space: normal;
        flex-shrink: 0;
    }

    .soc-datos-detalle {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .soc-card-oportunidades {
        grid-column: 1;
    }

    .soc-datos-contacto-card,
    .soc-card-evento,
    .soc-card-prioridades,
    .soc-card-oportunidades {
        min-height: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-wrap: break-word;
        overflow-x: hidden;
    }

    .soc-datos-detalle {
        overflow-x: hidden;
    }

    .soc-card-evento {
        min-height: 0;
    }

    .soc-card-prioridades {
        min-height: 0;
    }

    /* Cada tarjeta de prioridad ocupa solo el ancho de pantalla */
    .soc-prioridad-card {
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .soc-prioridad-title,
    .soc-prioridad-comment {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Grid Oportunidades en móvil: solo No. Oportunidad (col 1) y Monto solicitado (col 3); ocultas 2, 4, 5 y botón (6) */
    .soc-card-oportunidades table th:nth-child(2),
    .soc-card-oportunidades table th:nth-child(4),
    .soc-card-oportunidades table th:nth-child(5),
    .soc-card-oportunidades table td:nth-child(2),
    .soc-card-oportunidades table td:nth-child(4),
    .soc-card-oportunidades table td:nth-child(5),
    .soc-card-oportunidades .e-grid th:nth-child(2),
    .soc-card-oportunidades .e-grid th:nth-child(4),
    .soc-card-oportunidades .e-grid th:nth-child(5),
    .soc-card-oportunidades .e-grid td:nth-child(2),
    .soc-card-oportunidades .e-grid td:nth-child(4),
    .soc-card-oportunidades .e-grid td:nth-child(5),
    .soc-card-oportunidades .soc-grid .e-headercell:nth-child(2),
    .soc-card-oportunidades .soc-grid .e-headercell:nth-child(4),
    .soc-card-oportunidades .soc-grid .e-headercell:nth-child(5),
    .soc-card-oportunidades .soc-grid .e-rowcell:nth-child(2),
    .soc-card-oportunidades .soc-grid .e-rowcell:nth-child(4),
    .soc-card-oportunidades .soc-grid .e-rowcell:nth-child(5) {
        display: none !important;
    }

    /* Columna 1 (No. Oportunidad): ancho flexible; en móvil el enlace abre la oportunidad */
    .soc-card-oportunidades table th:nth-child(1),
    .soc-card-oportunidades table td:nth-child(1),
    .soc-card-oportunidades .e-grid th:nth-child(1),
    .soc-card-oportunidades .e-grid td:nth-child(1),
    .soc-card-oportunidades .soc-grid .e-headercell:nth-child(1),
    .soc-card-oportunidades .soc-grid .e-rowcell:nth-child(1) {
        width: 1% !important;
        min-width: 0 !important;
        max-width: calc(100% - 110px) !important;
    }

    /* Columna 3 (Monto solicitado): visible en móvil, sin botón */
    .soc-card-oportunidades table th:nth-child(3),
    .soc-card-oportunidades table td:nth-child(3),
    .soc-card-oportunidades .e-grid th:nth-child(3),
    .soc-card-oportunidades .e-grid td:nth-child(3),
    .soc-card-oportunidades .soc-grid .e-headercell:nth-child(3),
    .soc-card-oportunidades .soc-grid .e-rowcell:nth-child(3) {
        display: table-cell !important;
        width: 110px !important;
        min-width: 90px !important;
        max-width: 120px !important;
        visibility: visible !important;
        white-space: nowrap;
    }

    /* En móvil: monto solicitado visible en la primera columna del grid Oportunidades */
    .soc-card-oportunidades .soc-monto-en-linea,
    .soc-card-oportunidades .soc-monto-solicitado-movil {
        display: block !important;
        visibility: visible !important;
    }
    .soc-card-oportunidades .soc-oportunidad-cell {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    /* En móvil ocultar columna del botón Mostrar: se usa el enlace de la columna 1 */
    .soc-card-oportunidades table th:nth-child(6),
    .soc-card-oportunidades table td:nth-child(6),
    .soc-card-oportunidades .e-grid th:nth-child(6),
    .soc-card-oportunidades .e-grid td:nth-child(6),
    .soc-card-oportunidades .soc-grid .e-headercell:nth-child(6),
    .soc-card-oportunidades .soc-grid .e-rowcell:nth-child(6),
    .soc-card-oportunidades .e-headercell.soc-col-mostrar,
    .soc-card-oportunidades .e-rowcell.soc-col-mostrar,
    .soc-card-oportunidades .e-rowcell:has(.e-btn),
    .soc-card-oportunidades .e-grid th:last-child,
    .soc-card-oportunidades .e-grid td:last-child,
    .soc-card-oportunidades .e-grid .e-headercell:last-child,
    .soc-card-oportunidades .e-grid .e-rowcell:last-child,
    .soc-card-oportunidades table th:last-child,
    .soc-card-oportunidades table td:last-child {
        display: none !important;
    }

    .soc-card-oportunidades .soc-grid,
    .soc-card-oportunidades .e-grid,
    .soc-card-oportunidades .e-gridcontent {
        width: 100% !important;
        max-width: 100% !important;
    }

    .soc-grid-oportunidades-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
    }

    .soc-card-oportunidades .e-grid,
    .soc-card-oportunidades .e-gridcontent {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Que la celda del botón no se recorte: asegurar que el botón sea visible */
    .soc-card-oportunidades .e-grid .e-rowcell .e-btn,
    .soc-card-oportunidades .e-grid td .e-btn {
        visibility: visible !important;
        display: inline-flex !important;
    }

    .soc-card-oportunidades .e-grid .e-gridcontent table,
    .soc-card-oportunidades .e-grid .e-gridheader table {
        width: 100% !important;
        table-layout: fixed !important;
    }

    .soc-card-oportunidades .e-grid colgroup col:nth-child(2),
    .soc-card-oportunidades .e-grid colgroup col:nth-child(4),
    .soc-card-oportunidades .e-grid colgroup col:nth-child(5),
    .soc-card-oportunidades .e-grid colgroup col:nth-child(6) {
        width: 0 !important;
        min-width: 0 !important;
    }

    .soc-card-oportunidades .e-grid colgroup col:nth-child(3) {
        width: 110px !important;
        min-width: 90px !important;
    }

    .soc-card-oportunidades .e-gridpager,
    .soc-card-oportunidades .e-pager,
    .soc-card-oportunidades .e-pagercontainer {
        max-width: 100% !important;
        flex-wrap: wrap !important;
        font-size: 12px !important;
    }

    .soc-card-oportunidades .e-pager .e-pagercontainer {
        justify-content: center !important;
    }

    .soc-historico-grid-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
        margin: 0;
    }

    .soc-historico-table {
        min-width: 400px;
    }

    .soc-grid,
    .e-grid {
        min-width: 0;
        max-width: 100%;
    }

    /* Contenedor para grids Syncfusion: scroll interno, no expande la página (oportunidades usa overflow hidden y columnas ocultas) */
    .soc-main-content .e-gridcontainer,
    .soc-page-inner .e-gridcontainer {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    .soc-detalles-grid {
        grid-template-columns: 1fr;
    }

    .soc-resumen-grid {
        grid-template-columns: 1fr;
    }

    .soc-seguimiento-columns {
        grid-template-columns: 1fr;
    }

    .soc-form-row-group {
        grid-template-columns: 1fr;
    }

    .soc-buscar-contacto {
        padding: 12px;
    }

    .soc-dl dt,
    .soc-dl dd {
        word-break: break-word;
    }

    .soc-milista-section {
        padding: 12px;
    }

    .soc-dialog .e-dlg-content {
        padding: 12px;
    }

    .soc-dialog .e-dlg-header {
        padding: 12px 16px;
    }

    .soc-dialog .e-dlg-content,
    .soc-dialog .e-dlg-overlay {
        max-width: 100vw;
    }

    .e-dialog {
        max-width: calc(100vw - 24px) !important;
    }

    .soc-page .e-input,
    .soc-page .e-dropdownlist {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .soc-page-inner {
        padding: 10px 12px 20px;
    }

    .soc-contact-toolbar {
        padding: 6px 10px;
        gap: 6px;
    }

    .soc-contact-toolbar .e-btn {
        padding: 6px 10px !important;
        font-size: 12px;
    }

    .soc-tab-headers {
        gap: 2px;
    }

    .soc-tab {
        padding: 6px 10px;
        font-size: 12px;
    }

    .soc-title {
        font-size: 1.1rem;
    }

    .soc-datos-contacto-card,
    .soc-card-evento,
    .soc-card-prioridades,
    .soc-card-oportunidades {
        padding: 12px;
    }

    .soc-grid .e-rowcell {
        padding: 8px 6px;
        font-size: 12px;
    }

    .soc-grid .e-headercell {
        font-size: 12px;
    }
}

/* =====================================================
   MÓDULOS: Metas, Lead Form, Checklist, Productos
   ===================================================== */

/* Metas - tabla y barras de progreso */
.soc-metas-table-wrap {
    overflow-x: auto;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
}

.soc-metas-table tr {
    transition: background 0.15s;
}

.soc-metas-table tr:hover {
    background: rgba(0, 109, 78, 0.04);
}

/* Header de tabla Metas: neutro con acento verde inferior */
.soc-metas-table thead {
    background: #F8FAFB !important;
}
.soc-metas-table thead th {
    background: #F8FAFB !important;
    color: #6B7280 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    border-bottom: 2px solid #006d4e !important;
    padding: 12px 12px !important;
}

.soc-meta-progress-bar {
    display: inline-block;
    width: 120px;
    height: 8px;
    background: #E5E7EB;
    border-radius: 5px;
    overflow: hidden;
    vertical-align: middle;
}

.soc-meta-progress-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.3s;
}

.soc-meta-badge-green { background: #006d4e; color: #fff; }
.soc-meta-badge-yellow { background: #d97706; color: #fff; }
.soc-meta-badge-red { background: #dc2626; color: #fff; }

.soc-meta-pct {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Botón Editar en tabla Metas */
.soc-metas-table .soc-btn-link {
    background-color: #ffffff;
    border: 1.5px solid #006d4e;
    color: #006d4e;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
}
.soc-metas-table .soc-btn-link:hover {
    background-color: #006d4e;
    color: #ffffff;
}

/* ============================= */
/* MÓDULO METAS */
/* ============================= */
.metas-module .soc-contact-toolbar .e-btn {
    background-color: #ffffff !important;
    border: 1px solid #D1D5DB !important;
    color: #374151 !important;
    border-radius: 6px !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}
.metas-module .soc-contact-toolbar .e-btn:hover:not(:disabled) {
    background-color: #F9FAFB !important;
    border-color: #006d4e !important;
    color: #006d4e !important;
}

/* Lead form público — estética alineada con socasesores.com/creditos-hipotecarios */
.soc-lead-public {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f0f4f1;
}

.soc-lead-public__topbar {
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 14px 20px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}

.soc-lead-public__brand {
    display: inline-flex;
    align-items: center;
    justify-self: start;
}

.soc-lead-public__logo {
    height: 40px;
    width: auto;
    display: block;
}

.soc-lead-public__topbar-header-img {
    display: flex;
    align-items: center;
    justify-self: center;
}

.soc-lead-public__topbar-header-img img {
    height: 48px;
    width: auto;
    display: block;
}

.soc-lead-public__topbar-spacer {
    justify-self: end;
}

.soc-lead-public__hero {
    position: relative;
    padding: 40px 20px 44px;
    color: #fff;
}

.soc-lead-public__hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #023d2c 0%, #006d4e 42%, #0d9488 100%);
}

.soc-lead-public__hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("https://socasesores.com/img/lineas-negocio/ZW0wjVmU62tK1hmvflL0kvIEcxHIHTmlEE4NV1bE.jpg");
    background-size: cover;
    background-position: center;
    opacity: 0.22;
    mix-blend-mode: soft-light;
}

.soc-lead-public__hero-inner {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.soc-lead-public__hero-kicker {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    opacity: 0.92;
    margin: 0 0 12px;
    font-weight: 600;
    color: #fff !important;
}

.soc-lead-public__hero-title {
    font-size: clamp(1.6rem, 4.2vw, 2.4rem);
    font-weight: 600;
    line-height: 1.22;
    margin: 0 0 16px;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.2);
    color: #fff !important;
}

.soc-lead-public__hero-title-strong {
    font-weight: 800;
    color: #fff !important;
}

.soc-lead-public__hero-lead {
    font-size: 1.04rem;
    line-height: 1.55;
    opacity: 0.96;
    margin: 0 auto;
    max-width: 560px;
}

.soc-lead-public__main {
    flex: 1;
    padding: 26px 16px 36px;
}

.soc-lead-public__grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    gap: 26px;
    grid-template-columns: 1fr;
}

@media (min-width: 960px) {
    .soc-lead-public__grid {
        grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
        align-items: start;
    }

    .soc-lead-public__grid--success {
        grid-template-columns: 1fr;
        max-width: 520px;
    }
}

.soc-lead-public__aside-title {
    font-size: 1.12rem;
    color: #006d4e;
    margin: 0 0 8px;
    font-weight: 700;
}

.soc-lead-public__aside-text {
    color: #5c6670;
    font-size: 0.9rem;
    margin: 0 0 18px;
    line-height: 1.45;
}

.soc-lead-public__tiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 640px) and (max-width: 959px) {
    .soc-lead-public__tiles {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 960px) {
    .soc-lead-public__tiles {
        grid-template-columns: repeat(2, 1fr);
    }
}

.soc-lead-public__tile {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: #1e293b;
    border: 1px solid #e3ebe7;
    box-shadow: 0 2px 12px rgba(0, 109, 78, 0.07);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.soc-lead-public__tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 109, 78, 0.14);
    border-color: #b8e0d4;
}

.soc-lead-public__tile img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.soc-lead-public__tile span {
    padding: 10px 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.25;
}

/* Galería lateral del broker en página pública de leads */
.soc-lead-public__body {
    max-width: 1100px;
    margin: 0 auto;
}

/* En pantallas anchas: 3 columnas — galería izq | contenido | galería der */
@media (min-width: 1360px) {
    .soc-lead-public__body.has-galeria {
        max-width: 1460px;
        display: grid;
        grid-template-columns: 160px 1fr 160px;
        gap: 16px;
        align-items: start;
    }

    .soc-lead-public__body.has-galeria .soc-lead-public__grid {
        max-width: none;
    }
}

/* Columnas de galería: ocultas por defecto, visibles solo en pantallas anchas */
.soc-lead-public__galeria-col {
    display: none;
}

@media (min-width: 1360px) {
    .soc-lead-public__galeria-col {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding-top: 4px;
    }
}

.soc-lead-public__galeria-col-item {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
    box-shadow: 0 2px 12px rgba(0, 109, 78, 0.12);
}

.soc-lead-public__galeria-col-item img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.soc-lead-public__galeria-col-item:hover img {
    transform: scale(1.04);
}

.soc-lead-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    padding: 32px 28px;
    width: 100%;
    max-width: 500px;
    border: 1px solid rgba(0, 109, 78, 0.08);
}

.soc-lead-card--elevated {
    max-width: 500px;
    margin: 0 auto;
}

@media (min-width: 960px) {
    .soc-lead-card--elevated {
        margin: 0;
        max-width: none;
    }
}

.soc-lead-card--success {
    text-align: center;
}

.soc-lead-logo {
    margin-bottom: 16px;
    text-align: center;
}

.soc-lead-public .soc-lead-logo {
    text-align: left;
}

.soc-lead-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
    text-align: center;
    color: #0f172a;
}

.soc-lead-title--form {
    color: #006d4e !important;
}

.soc-lead-subtitle {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

.soc-lead-input {
    border-radius: 8px !important;
}

.soc-lead-input:focus {
    border-color: #006d4e !important;
    box-shadow: 0 0 0 2px rgba(0, 109, 78, 0.15) !important;
}

.soc-lead-public__submit {
    width: 100%;
    padding: 14px 16px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    background: linear-gradient(180deg, #00805c 0%, #006d4e 100%) !important;
    border: none !important;
    color: #fff !important;
    border-radius: 8px !important;
    cursor: pointer;
}

.soc-lead-public__submit:hover:not(:disabled) {
    filter: brightness(1.06);
}

.soc-lead-public__submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.soc-lead-public__footnote {
    margin-top: 18px;
    font-size: 0.9rem;
}

.soc-lead-public__footnote a {
    color: #006d4e;
    font-weight: 600;
}

/* Login / verificar portal — misma rejilla que /leads/nuevo/{slug} */
.soc-lead-public__portal-badge {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: #64748b;
    margin: 0 0 12px;
    text-align: center;
}

.soc-lead-card--portal-auth .soc-lead-title,
.soc-lead-card--portal-auth .soc-lead-subtitle {
    text-align: center;
}

.soc-lead-public .portal-otp-input input,
.soc-lead-public .portal-otp-input input.e-input {
    font-size: 1.45rem !important;
    letter-spacing: 0.28em !important;
    text-align: center !important;
}

.soc-lead-public__back-portal {
    color: #006d4e !important;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
    padding: 0;
}

.soc-lead-public .soc-error-msg {
    color: #b91c1c;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ── Sección "Simula tu crédito" en página pública de leads ── */
.soc-lead-public__sim {
    background: linear-gradient(135deg, #f0faf5 0%, #e6f4ee 60%, #d5eddf 100%);
    border-top: 1px solid #c5e0d2;
    border-bottom: 1px solid #c5e0d2;
    padding: 40px 0 44px;
    overflow: hidden;
}

.soc-lead-public__sim-header {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
    text-align: center;
}

.soc-lead-public__sim-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: #006d4e;
    margin: 0 0 8px;
    line-height: 1.2;
}

.soc-lead-public__sim-sub {
    color: #2d5c44;
    font-size: 0.97rem;
    margin: 0;
    line-height: 1.5;
}

/* Carrusel de logos */
.soc-lead-public__sim-carousel {
    position: relative;
    overflow: hidden;
    margin: 28px 0 32px;
}

.soc-lead-public__sim-carousel::before,
.soc-lead-public__sim-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 1;
    pointer-events: none;
}

.soc-lead-public__sim-carousel::before {
    left: 0;
    background: linear-gradient(to right, #edf7f2, transparent);
}

.soc-lead-public__sim-carousel::after {
    right: 0;
    background: linear-gradient(to left, #edf7f2, transparent);
}

.soc-lead-public__sim-track {
    display: flex;
    align-items: center;
    gap: 48px;
    width: max-content;
    animation: sim-marquee 45s linear infinite;
}

.soc-lead-public__sim-track:hover {
    animation-play-state: paused;
}

@keyframes sim-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.soc-lead-public__sim-track img {
    height: 34px;
    width: auto;
    object-fit: contain;
    opacity: 0.85;
    filter: grayscale(0.08);
    flex-shrink: 0;
}

.soc-lead-public__sim-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 0 16px;
}

.soc-lead-public__sim-btn {
    display: inline-block;
    background: #006d4e;
    color: #fff;
    text-decoration: none;
    padding: 12px 26px;
    border-radius: 50px;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
    box-shadow: 0 3px 12px rgba(0, 109, 78, 0.25);
    white-space: nowrap;
}

.soc-lead-public__sim-btn:hover {
    background: #005a3f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 109, 78, 0.35);
}

.soc-lead-public__partners {
    background: #fff;
    border-top: 1px solid #e5ebe7;
    padding: 22px 16px 28px;
    text-align: center;
    margin-top: auto;
}

.soc-lead-public__partners-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    margin: 0 0 14px;
    font-weight: 700;
}

.soc-lead-public__partners-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 18px 26px;
    max-width: 920px;
    margin: 0 auto;
    filter: grayscale(0.12);
    opacity: 0.9;
}

.soc-lead-public__partners-logos img {
    height: 26px;
    width: auto;
    object-fit: contain;
}

/* Select Tipo de Crédito en formulario público de leads */
.soc-lead-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 8px 32px 8px 12px;
    font-size: 14px;
    color: #495057;
    width: 100%;
    box-sizing: border-box;
}

.soc-lead-select:focus {
    outline: none;
    border-color: #006d4e;
    box-shadow: 0 0 0 2px rgba(0, 109, 78, 0.2);
}

.soc-lead-success-icon {
    font-size: 48px;
    color: #16a34a;
    margin: 16px 0;
}

/* ── Hero: estadísticas de confianza ── */
.soc-lead-public__hero-stats {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.soc-lead-public__hero-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    padding: 10px 16px;
    flex: 1 1 180px;
    text-align: left;
}

.soc-lead-public__hero-stat .soc-input-ic {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: #d6f5e8;
}

.soc-lead-public__hero-stat-value {
    display: block;
    font-weight: 800;
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.2;
}

.soc-lead-public__hero-stat-label {
    display: block;
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.3;
}

/* ── Lista de beneficios en aside ── */
.soc-lead-public__benefits {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.soc-lead-public__benefits li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    color: #2d3b35;
    line-height: 1.4;
}

.soc-lead-public__benefits .soc-input-ic {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
    color: #00805c;
}

/* ── Inputs con icono ── */
.soc-input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.soc-input-icon .soc-input-ic {
    position: absolute;
    left: 12px;
    width: 17px;
    height: 17px;
    color: #94a3b8;
    pointer-events: none;
    z-index: 1;
}

.soc-input-icon input,
.soc-input-icon select {
    padding-left: 38px !important;
}

.soc-input-icon:focus-within .soc-input-ic {
    color: #006d4e;
}

/* ── Filas de formulario en 2 columnas ── */
.soc-lead-public .soc-form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .soc-lead-public .soc-form-row-2col {
        grid-template-columns: 1fr;
    }
}

/* ── Aviso de privacidad ── */
.soc-lead-public__privacy {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 16px 0 0;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
}

.soc-lead-public__privacy .soc-input-ic {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
    color: #00805c;
}

.soc-lead-public__submit {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.soc-lead-public__submit .soc-input-ic {
    width: 18px;
    height: 18px;
}

/* ── Próximos pasos en página de éxito ── */
.soc-lead-public__next-steps {
    list-style: none;
    margin: 4px 0 20px;
    padding: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.soc-lead-public__next-steps li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: #334155;
}

.soc-lead-public__next-steps-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e6f4ee;
    color: #006d4e;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* ── Skeletons de carga (logo / imagen de cabecera del broker) ── */
.soc-skeleton {
    background: linear-gradient(90deg, #eef1ef 25%, #e2e8e4 37%, #eef1ef 63%);
    background-size: 400% 100%;
    animation: soc-skeleton-shimmer 1.4s ease infinite;
    border-radius: 6px;
}

.soc-skeleton--logo {
    width: 110px;
    height: 40px;
}

.soc-skeleton--header-img {
    width: 140px;
    height: 48px;
    justify-self: center;
}

@keyframes soc-skeleton-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* ── Validación en tiempo real ── */
.soc-input-icon input.soc-input-error,
.soc-input-icon input.soc-input-error:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12) !important;
}

.soc-field-error {
    display: block;
    color: #dc2626;
    font-size: 0.76rem;
    margin-top: 4px;
    line-height: 1.3;
}

/* ── Tarjeta del asesor asignado ── */
.soc-lead-public__advisor {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0faf5;
    border: 1px solid #d2ede1;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 18px;
}

.soc-lead-public__advisor-photo {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #006d4e;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

.soc-lead-public__advisor-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.soc-lead-public__advisor-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.soc-lead-public__advisor-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #006d4e;
    font-weight: 700;
}

.soc-lead-public__advisor-name {
    font-size: 0.94rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.soc-lead-public__advisor-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: #475569;
}

.soc-lead-public__advisor-rating .soc-input-ic {
    width: 13px;
    height: 13px;
    fill: #f59e0b;
    stroke: #f59e0b;
}

.soc-lead-public__advisor-rating-count {
    color: #94a3b8;
}

/* ── Botón de envío: barra sticky en móvil ── */
@media (max-width: 640px) {
    .soc-lead-public__submit-bar {
        position: sticky;
        bottom: 0;
        background: #fff;
        margin: 16px -28px -32px;
        padding: 12px 28px calc(12px + env(safe-area-inset-bottom));
        box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.08);
        z-index: 5;
    }
}

/* ── Testimonios ── */
.soc-lead-public__testimonials {
    background: #fff;
    padding: 40px 16px 8px;
}

.soc-lead-public__testimonials-grid {
    max-width: 1100px;
    margin: 28px auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.soc-lead-public__testimonial-card {
    background: #f8faf9;
    border: 1px solid #e3ebe7;
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.soc-lead-public__testimonial-stars {
    display: flex;
    gap: 2px;
}

.soc-lead-public__testimonial-stars .soc-input-ic {
    width: 15px;
    height: 15px;
    color: #cbd5e1;
}

.soc-lead-public__testimonial-stars .is-filled .soc-input-ic {
    fill: #f59e0b;
    stroke: #f59e0b;
}

.soc-lead-public__testimonial-comment {
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.55;
    margin: 0;
    flex: 1;
}

.soc-lead-public__testimonial-author {
    font-size: 0.84rem;
    font-weight: 700;
    color: #006d4e;
    margin: 0;
}

.soc-lead-public__testimonial-author span {
    font-weight: 400;
    color: #94a3b8;
}

/* ── Preguntas frecuentes ── */
.soc-lead-public__faq {
    background: #fff;
    padding: 36px 16px 44px;
}

.soc-lead-public__faq-list {
    max-width: 760px;
    margin: 24px auto 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.soc-lead-public__faq-item {
    border: 1px solid #e3ebe7;
    border-radius: 10px;
    overflow: hidden;
}

.soc-lead-public__faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #f8faf9;
    border: none;
    padding: 14px 16px;
    text-align: left;
    font-size: 0.92rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
}

.soc-lead-public__faq-item.is-open .soc-lead-public__faq-question {
    background: #e6f4ee;
    color: #006d4e;
}

.soc-lead-public__faq-question .soc-input-ic {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #006d4e;
    transition: transform 0.2s ease;
}

.soc-lead-public__faq-item.is-open .soc-lead-public__faq-question .soc-input-ic {
    transform: rotate(180deg);
}

.soc-lead-public__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.soc-lead-public__faq-item.is-open .soc-lead-public__faq-answer {
    max-height: 240px;
}

.soc-lead-public__faq-answer p {
    margin: 0;
    padding: 14px 16px;
    font-size: 0.86rem;
    color: #475569;
    line-height: 1.55;
}

/* ── Botón flotante de WhatsApp ── */
.soc-lead-public__whatsapp {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
    z-index: 50;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.soc-lead-public__whatsapp:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 26px rgba(37, 211, 102, 0.55);
}

.soc-lead-public__whatsapp .soc-input-ic {
    width: 30px;
    height: 30px;
    color: #fff;
}

@media (max-width: 640px) {
    .soc-lead-public__whatsapp {
        right: 14px;
        bottom: 90px;
    }
}

/* Checklist */
.soc-checklist-section {
    padding: 4px 0;
}

.soc-checklist-progress {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 14px;
    gap: 12px;
}

.soc-checklist-group {
    margin-bottom: 16px;
}

.soc-checklist-group-header {
    font-weight: 700;
    font-size: 13px;
    color: var(--soc-primary, #4a7ddc);
    background: rgba(74,125,220,0.07);
    border-radius: 4px;
    padding: 4px 10px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.soc-checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 2px;
    flex-wrap: wrap;
    transition: background 0.1s;
}

.soc-checklist-item:hover {
    background: #f8f9fa;
}

.soc-checklist-item-done {
    background: #f0fff4;
}

.soc-checklist-item-done .soc-checklist-label {
    text-decoration: line-through;
    color: #aaa;
}

.soc-checklist-checkbox {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.soc-checklist-label {
    flex: 1;
    cursor: pointer;
    font-size: 14px;
}

.soc-checklist-optional {
    font-size: 12px;
    color: #aaa;
    margin-left: 4px;
}

.soc-checklist-meta {
    font-size: 11px;
    color: #28a745;
    font-style: italic;
    margin-left: auto;
}

.soc-checklist-notes-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.soc-checklist-notes-btn:hover {
    color: var(--soc-primary, #4a7ddc);
    background: rgba(74,125,220,0.08);
}

.soc-checklist-notes-field {
    width: 100%;
    padding-left: 24px;
}

/* Badge inactivo */
/* Dropdown de búsqueda en mensajes programados */
.soc-search-dropdown-item:hover { background: #f0faf4; }
.soc-search-dropdown { margin-top: 2px; }

.soc-badge-pendiente {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    background: #fff3cd;
    color: #856404;
}
.soc-badge-inactivo {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    background: #e9ecef;
    color: #666;
}

/* ── Simulador de Crédito ─────────────────────────────────── */
.soc-sim-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.soc-sim-form {
    flex: 0 0 420px;
    background: var(--soc-card-bg, #fff);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
}

.soc-sim-form-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--soc-primary, #006d4e);
    margin: 0 0 16px 0;
}

.soc-sim-results {
    flex: 1;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.soc-sim-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.soc-sim-card {
    background: var(--soc-card-bg, #fff);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.soc-sim-card-primary {
    border-color: var(--soc-primary, #006d4e);
    background: var(--soc-primary, #006d4e);
    color: #fff;
}

.soc-sim-card-primary .soc-sim-card-label,
.soc-sim-card-primary .soc-sim-card-value {
    color: #fff;
}

.soc-sim-card-ok {
    border-color: #28a745;
    background: #f0fff4;
}

.soc-sim-card-warn {
    border-color: #dc3545;
    background: #fff5f5;
}

.soc-alert {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid transparent;
}
.soc-alert-success {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}
.soc-alert-error {
    background: #fff5f5;
    border-color: #fca5a5;
    color: #991b1b;
}

.soc-sim-card-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.soc-sim-card-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--soc-text, #1a1a2e);
}

.soc-sim-card-hint {
    font-size: 11px;
    color: #555;
    margin-top: 2px;
}

.soc-sim-table-section {
    background: var(--soc-card-bg, #fff);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px;
}

.soc-sim-table-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: var(--soc-text, #1a1a2e);
}

.soc-sim-table-wrap {
    overflow-x: auto;
    max-height: 360px;
    overflow-y: auto;
    margin-top: 8px;
}
.soc-sim-table-wrap.full {
    max-height: none;
    overflow-y: visible;
}

.soc-sim-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.soc-sim-table th {
    background: #f5f5f5;
    padding: 8px 12px;
    text-align: right;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.soc-sim-table th:first-child { text-align: center; }

.soc-sim-table td {
    padding: 6px 12px;
    text-align: right;
    border-bottom: 1px solid #f0f0f0;
}

.soc-sim-table td:first-child { text-align: center; font-weight: 600; color: #555; }

.soc-sim-table tr:hover td { background: #f9f9f9; }

/* ── Reportes Gerenciales ─────────────────────────────────── */
/* Toolbar de Reportes */
.soc-rep-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #E5E7EB;
}

.soc-rep-toolbar-label {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
}

/* Botones del toolbar de Reportes */
.reportes-module .soc-rep-toolbar .e-btn {
    background-color: #ffffff !important;
    border: 1px solid #D1D5DB !important;
    color: #374151 !important;
    border-radius: 6px !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}
.reportes-module .soc-rep-toolbar .e-btn:hover:not(:disabled) {
    background-color: #F9FAFB !important;
    border-color: #006d4e !important;
    color: #006d4e !important;
}
.reportes-module .soc-rep-toolbar .e-btn:disabled,
.reportes-module .soc-rep-toolbar .e-btn.e-disabled {
    opacity: 0.45;
}

/* Links de navegación como botones outline */
.soc-rep-nav-btn {
    display: inline-flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #D1D5DB;
    color: #374151;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}
.soc-rep-nav-btn:hover {
    border-color: #006d4e;
    color: #006d4e;
}

/* KPI Cards */
.soc-rep-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.soc-rep-kpi-card {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-top: 3px solid #006d4e;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.soc-rep-kpi-up  { border-top-color: #006d4e !important; }
.soc-rep-kpi-down { border-top-color: #dc2626 !important; }

.soc-rep-kpi-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9CA3AF;
    font-weight: 500;
}

.soc-rep-kpi-value {
    font-size: 26px;
    font-weight: 700;
    color: #6B7280;
}

/* Secciones */
.soc-rep-section {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.soc-rep-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #585858;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 16px 0;
}

/* Funnel */
.soc-rep-funnel { display: flex; flex-direction: column; gap: 8px; }

.soc-rep-funnel-row {
    display: grid;
    grid-template-columns: 160px 1fr 50px 60px 78px;
    align-items: center;
    gap: 10px;
}

.soc-rep-funnel-label { font-size: 13px; font-weight: 500; color: #6B7280; white-space: nowrap; }
.soc-rep-funnel-count { text-align: center; font-weight: 700; font-size: 14px; color: #585858; }

.soc-rep-funnel-bar-wrap {
    background: #E5E7EB;
    border-radius: 4px;
    height: 10px;
    overflow: hidden;
}

.soc-rep-funnel-bar {
    height: 100%;
    border-radius: 4px;
    transition: width .3s;
    min-width: 4px;
}

.soc-rep-funnel-conv { font-size: 11px; font-weight: 600; text-align: center; }
.soc-conv-ok  { color: #006d4e; }
.soc-conv-low { color: #dc2626; }
.soc-rep-funnel-detail-btn {
    border: 1px solid #006d4e;
    border-radius: 6px;
    background: #fff;
    color: #006d4e;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.soc-rep-funnel-detail-btn:hover:not(:disabled) {
    background: #006d4e;
    color: #fff;
}
.soc-rep-funnel-detail-btn:disabled {
    border-color: #D1D5DB;
    color: #9CA3AF;
    cursor: not-allowed;
}
.soc-rep-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 9000;
}
.soc-rep-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.22);
    display: flex;
    flex-direction: column;
    max-height: 86vh;
    max-width: 1180px;
    overflow: hidden;
    width: min(1180px, 100%);
}
.soc-rep-modal-header {
    align-items: flex-start;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    padding: 1.1rem 1.25rem 0.9rem;
}
.soc-rep-modal-header h3 {
    color: #006d4e;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
}
.soc-rep-modal-header span {
    color: #6B7280;
    display: block;
    font-size: 0.84rem;
    margin-top: 3px;
}
.soc-rep-modal-close {
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #6B7280;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 6px 8px;
}
.soc-rep-modal-close:hover {
    background: #F3F4F6;
    color: #111827;
}
.soc-rep-modal-body {
    overflow: auto;
    padding: 1rem 1.25rem;
}
.soc-rep-modal-footer {
    background: #FAFAFA;
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: flex-end;
    padding: 0.75rem 1.25rem;
}
.soc-rep-modal-btn {
    background: #006d4e;
    border: 0;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 20px;
}
.soc-rep-modal-btn:hover { background: #008a5f; }
.soc-rep-funnel-detail-table {
    min-width: 1080px;
}
.soc-rep-funnel-detail-table td {
    vertical-align: top;
}
.soc-rep-detail-muted {
    color: #9CA3AF;
    font-size: 0.75rem;
    margin-top: 2px;
}

/* Tendencia */
.soc-rep-trend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 640px) { .soc-rep-trend-grid { grid-template-columns: 1fr; } }

.soc-rep-chart-subtitle { font-size: 11px; color: #9CA3AF; margin: 0 0 8px 0; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.soc-rep-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 120px;
    border-bottom: 1px solid #E5E7EB;
}

.soc-rep-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 2px;
    height: 100%;
    justify-content: flex-end;
}

.soc-rep-bar-val { font-size: 10px; color: #9CA3AF; }

.soc-rep-bar {
    width: 100%;
    border-radius: 3px 3px 0 0;
    min-height: 4px;
    transition: height .3s;
}

.soc-rep-bar-blue  { background: linear-gradient(180deg, #52deff 0%, #1ab8e0 100%); }
.soc-rep-bar-green { background: linear-gradient(180deg, #34a876 0%, #006d4e 100%); }

.soc-rep-bar-label { font-size: 10px; color: #9CA3AF; margin-top: 4px; }

/* Dos columnas */
.soc-rep-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 900px) { .soc-rep-two-col { grid-template-columns: 1fr; } }

.soc-rep-section-col { margin-bottom: 0; }

/* Pipeline por banco */
.soc-rep-banco-list { display: flex; flex-direction: column; gap: 10px; }

.soc-rep-banco-row {
    display: grid;
    grid-template-columns: 130px 1fr auto;
    align-items: center;
    gap: 10px;
}

.soc-rep-banco-name { font-size: 13px; font-weight: 500; color: #585858; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soc-rep-banco-meta { font-size: 12px; color: #9CA3AF; white-space: nowrap; }

/* ═══════════════════════════════════════════════
   POST-FIRMA
═══════════════════════════════════════════════ */
.soc-tab-highlight {
    border-bottom: 2px solid #28a745 !important;
    color: #28a745 !important;
}

.soc-postfirma-pending {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 48px 24px;
    text-align: center;
    color: #555;
}

.soc-pf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.soc-pf-estado-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.soc-pf-estado-select {
    width: 200px;
    font-size: 0.9rem;
}

/* Stepper visual (mismo estilo del stepper de etapas de la oportunidad) */
.soc-pf-stepper-box {
    margin-bottom: 24px;
    padding: 10px 12px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    background: #fff;
}

.soc-pf-stepper-wrap {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.soc-pf-node {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.soc-pf-node-label {
    margin-top: 4px;
    font-size: 11px;
    color: #888;
    text-align: center;
    white-space: nowrap;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.soc-pf-node-done .soc-pf-node-label,
.soc-pf-node-current .soc-pf-node-label {
    color: #0064a6;
    font-weight: 600;
}

.soc-pf-node-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ccc;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #bbb;
    transition: all 0.2s;
}

.soc-pf-node-emoji {
    font-size: 16px;
    line-height: 1;
    filter: grayscale(70%);
    opacity: 0.6;
}

.soc-pf-node-done .soc-pf-node-circle,
.soc-pf-node-current .soc-pf-node-circle {
    border-color: #0064a6;
    background: #0064a6;
    color: #fff;
}

.soc-pf-node-done .soc-pf-node-emoji,
.soc-pf-node-current .soc-pf-node-emoji {
    filter: none;
    opacity: 1;
}

.soc-pf-node-current .soc-pf-node-circle {
    box-shadow: 0 0 0 3px rgba(0,100,166,0.2);
}

.soc-pf-node-line {
    flex: 1 1 auto;
    height: 2px;
    background: #e0e0e0;
    min-width: 20px;
    margin-top: 15px;
}

.soc-pf-node-line-done {
    background: #0064a6;
}

.soc-pf-stepper-status-row .soc-stepper-status-link.soc-stepper-status-active {
    color: #0064a6;
    font-weight: 600;
}

/* Secciones */
.soc-pf-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 768px) { .soc-pf-sections { grid-template-columns: 1fr; } }

.soc-pf-section {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 16px;
}

.soc-pf-section-full { grid-column: 1 / -1; }

.soc-pf-section-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
}

.soc-pf-notes {
    width: 100%;
    resize: vertical;
    border-radius: 4px;
    padding: 8px;
    font-size: 0.88rem;
    border: 1px solid #d1d5db;
    font-family: inherit;
}

/* ═══════════════════════════════════════════════
   LEADS
═══════════════════════════════════════════════ */
.soc-badge-count {
    background: #e5e7eb;
    color: #374151;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 0.82rem;
    font-weight: 600;
}

/* ── Estadísticas (/leads) ──────────────────────────────────────────────── */
.soc-leads-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.soc-leads-stat-card {
    flex: 1;
    min-width: 160px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s;
    text-align: left;
}

.soc-leads-stat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.soc-leads-stat-total  { border-left: 4px solid #94a3b8; }
.soc-leads-stat-new    { border-left: 4px solid #16a34a; }
.soc-leads-stat-week   { border-left: 4px solid #0064a6; }

.soc-leads-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.soc-leads-stat-total .soc-leads-stat-icon  { background: #f1f5f9; color: #64748b; }
.soc-leads-stat-new   .soc-leads-stat-icon  { background: #dcfce7; color: #16a34a; }
.soc-leads-stat-week  .soc-leads-stat-icon  { background: #dbeafe; color: #0064a6; }

.soc-leads-stat-body { flex: 1; min-width: 0; }

.soc-leads-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
    line-height: 1;
}

.soc-leads-stat-label {
    display: block;
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 3px;
    font-weight: 500;
}

.soc-leads-stat-arrow {
    font-size: 0.85rem;
    color: #cbd5e1;
    flex-shrink: 0;
    transition: color 0.15s;
}

.soc-leads-stat-card:hover .soc-leads-stat-arrow { color: #64748b; }

/* ── Cabeceras de sección ───────────────────────────────────────────────── */
.soc-leads-section-header {
    margin-bottom: 14px;
}

.soc-leads-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
}

.soc-leads-section-title i {
    font-size: 1.05rem;
    color: #0064a6;
}

.soc-leads-section-badge {
    font-size: 0.72rem;
    font-weight: 700;
    background: #fef3c7;
    color: #92400e;
    border-radius: 999px;
    padding: 2px 8px;
}

.soc-leads-section-badge--blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.soc-leads-section-desc {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: #9ca3af;
}

/* ── Divisor entre secciones ────────────────────────────────────────────── */
.soc-leads-divider {
    height: 1px;
    background: linear-gradient(to right, #e2e8f0, transparent);
    margin: 36px 0 28px;
}

/* ── Estados vacío y skeleton ───────────────────────────────────────────── */
.soc-leads-empty {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 40px 24px;
    text-align: center;
}

.soc-leads-empty-icon {
    font-size: 2.2rem;
    color: #cbd5e1;
    margin-bottom: 10px;
}

.soc-leads-empty-title {
    font-weight: 600;
    color: #6b7280;
    margin: 0 0 4px;
}

.soc-leads-empty-sub {
    font-size: 0.83rem;
    color: #9ca3af;
    margin: 0;
}

.soc-leads-skeleton {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.soc-leads-skeleton-item {
    height: 72px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    border-radius: 10px;
    animation: soc-shimmer 1.4s infinite;
}

@keyframes soc-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Grid de tarjetas de leads (Sin atender) ────────────────────────────── */
.soc-lead-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.soc-lead-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: 3px solid #94a3b8;
    border-radius: 12px;
    padding: 14px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow 0.15s, transform 0.12s;
}

.soc-lead-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.soc-lead-card--hoy    { border-top-color: #16a34a; }
.soc-lead-card--reciente { border-top-color: #ca8a04; }

/* Cabecera */
.soc-lead-card-top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.soc-lead-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0064a6, #4da3d9);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.soc-lead-card--hoy .soc-lead-card-avatar {
    background: linear-gradient(135deg, #16a34a, #4ade80);
}

.soc-lead-card-header-info {
    flex: 1;
    min-width: 0;
}

.soc-lead-card-nombre {
    font-weight: 700;
    font-size: 0.93rem;
    color: #1e293b;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.soc-lead-card-origen {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Datos de contacto */
.soc-lead-card-contact {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 8px 10px;
}

.soc-lead-card-contact-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.82rem;
    color: #374151;
}

.soc-lead-card-contact-row i {
    color: #0064a6;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.soc-lead-card-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.soc-lead-card-ref {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 2px;
}

/* Footer */
.soc-lead-card-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.soc-lead-card-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #4b5563;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    white-space: nowrap;
}

.soc-lead-card-btn-ghost:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}

.soc-lead-card-btn-primary {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #0064a6, #4da3d9);
    border: none;
    border-radius: 6px;
    padding: 5px 12px;
    cursor: pointer;
    transition: opacity 0.12s, transform 0.1s;
    white-space: nowrap;
}

.soc-lead-card-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Pills compartidas */
.soc-lead-ref-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.73rem;
    font-weight: 600;
    color: #0f766e;
    background: #ccfbf1;
    border-radius: 999px;
    padding: 2px 9px;
}

.soc-lead-ref-link {
    border: none;
    background: none;
    color: #006d4e;
    font-size: 0.78rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.soc-lead-ref-link:hover { color: #004d37; }

.soc-lead-badge {
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 3px 9px;
    white-space: nowrap;
    flex-shrink: 0;
}

.soc-lead-badge-new    { background: #dcfce7; color: #15803d; }
.soc-lead-badge-recent { background: #fef9c3; color: #a16207; }
.soc-lead-badge-old    { background: #f1f5f9; color: #64748b; }

@media (max-width: 640px) {
    .soc-leads-stat-card { min-width: 140px; }
    .soc-lead-cards-grid { grid-template-columns: 1fr; }
}

/* ── Detalles del prospecto (modal) ──────────────────────────────────────── */
.soc-lead-details-section {
    margin: 0 0 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.soc-lead-details-section:not(:first-child) { margin-top: 18px; }

.soc-lead-details-grid {
    display: grid;
    grid-template-columns: 160px 1fr;
    row-gap: 8px;
    column-gap: 12px;
    margin: 0;
}

.soc-lead-details-grid dt { font-weight: 600; color: #6b7280; font-size: 0.85rem; }
.soc-lead-details-grid dd { margin: 0; font-size: 0.9rem; color: #1f2937; }

.soc-lead-details-warning { color: #dc2626; font-weight: 600; }

.soc-lead-details-note {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.soc-lead-details-note-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 4px;
}

.soc-lead-details-note-body {
    font-size: 0.88rem;
    color: #1f2937;
    white-space: pre-wrap;
}

/* ── Leads por ejecutivo — acordeón (/leads) ─────────────────────────────── */
.soc-asesor-leads-group {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: box-shadow 0.15s;
}

.soc-asesor-leads-group.is-open {
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border-color: #bfdbfe;
}

.soc-asesor-leads-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 18px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    gap: 12px;
    transition: background 0.1s;
}

.soc-asesor-leads-header:hover { background: #f8fafc; }
.soc-asesor-leads-group.is-open .soc-asesor-leads-header { background: #eff6ff; }

.soc-asesor-leads-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.soc-asesor-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0064a6, #4da3d9);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.soc-asesor-leads-nombre {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1f2937;
}

.soc-asesor-leads-chevron {
    color: #9ca3af;
    font-size: 0.85rem;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.soc-asesor-leads-group.is-open .soc-asesor-leads-chevron { color: #0064a6; }

.soc-asesor-leads-body {
    border-top: 1px solid #e2e8f0;
    padding: 0 0 4px;
}

.soc-table-wrap {
    overflow-x: auto;
}

.soc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.soc-table th, .soc-table td {
    text-align: left;
    padding: 9px 14px;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
}

.soc-table tbody tr:last-child td { border-bottom: none; }

.soc-table th {
    color: #6b7280;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #f8fafc;
}

.soc-table-lead-name { font-weight: 600; color: #1f2937; }

.soc-table-opp-badge {
    font-size: 0.75rem;
    font-weight: 600;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 6px;
    padding: 2px 8px;
}

.soc-table-status-pill {
    font-size: 0.73rem;
    font-weight: 600;
    background: #f0fdf4;
    color: #15803d;
    border-radius: 999px;
    padding: 2px 9px;
}

.soc-table-empty { color: #d1d5db; }

/* ── Historial de Llamadas (/historialllamadas) ──────────────────────────── */
.soc-call-log-filters {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 18px;
}
.soc-call-log-filter-row {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}
.soc-call-log-filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.soc-call-log-filter-field label { font-size: 12px; color: #555; font-weight: 500; }
.soc-input-date, .soc-input-text {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 13px;
    color: #1e293b;
    background: #fff;
    height: 32px;
}
.soc-input-text { min-width: 180px; }
.soc-call-log-filter-actions { display: flex; gap: 8px; align-items: flex-end; }

/* Resumen estadístico */
.soc-call-log-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.soc-call-log-stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 130px;
}
.soc-call-log-stat-value { font-size: 22px; font-weight: 700; color: #1e293b; }
.soc-call-log-stat-label { font-size: 11px; color: #64748b; margin-top: 2px; }

/* Tabla */
.soc-call-log-table-wrap { overflow-x: auto; }
.soc-call-log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.soc-call-log-table th {
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    padding: 8px 12px;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}
.soc-call-log-table tr.soc-call-log-group-header td {
    background: #eef6f0;
    font-weight: 600;
    color: #166534;
    border-bottom: 1px solid #d1e7dd;
}
.soc-call-log-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}
.soc-call-log-table tr:hover td { background: #f8fafc; }
.soc-call-log-date { font-size: 12px; color: #475569; white-space: nowrap; }
.soc-call-log-time { display: block; font-size: 11px; color: #94a3b8; }
.soc-call-log-contact { font-weight: 500; }
.soc-call-log-phone { font-family: monospace; font-size: 12px; color: #334155; }
.soc-call-log-duration { font-weight: 600; color: #0f766e; }
.soc-call-log-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.soc-call-log-badge--out { background: #dbeafe; color: #1d4ed8; }
.soc-call-log-badge--in  { background: #dcfce7; color: #15803d; }

/* ── Animación "En llamada" (Twilio browser) ─────────────────────────────── */
@keyframes soc-ripple {
    0%   { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(2.2); opacity: 0; }
}
@keyframes soc-call-pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.12); }
}

.soc-call-active-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border: 1.5px solid #66bb6a;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 12px;
}

/* Contenedor del icono + ripples */
.soc-call-ripple {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.soc-call-ripple-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2.5px solid #43a047;
    animation: soc-ripple 1.6s ease-out infinite;
    opacity: 0;
}
.soc-call-ripple-ring--delay1 { animation-delay: 0.53s; }
.soc-call-ripple-ring--delay2 { animation-delay: 1.06s; }

.soc-call-icon {
    font-size: 22px;
    animation: soc-call-pulse 1.4s ease-in-out infinite;
    z-index: 1;
}

/* Texto informativo */
.soc-call-active-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.soc-call-active-label {
    font-size: 11px;
    color: #388e3c;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.soc-call-active-name {
    font-size: 15px;
    font-weight: 700;
    color: #1b5e20;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.soc-call-active-phone {
    font-size: 12px;
    color: #555;
}

/* Botón Colgar */
.soc-btn-hangup {
    background: #e53935;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    flex-shrink: 0;
}
.soc-btn-hangup:hover { background: #c62828; }

@media (max-width: 500px) {
    .soc-call-active-banner { flex-wrap: wrap; }
    .soc-btn-hangup { width: 100%; text-align: center; }
}

/* ── Pestaña Llamadas (Contactos): marcador + historial ──────────────────── */
.soc-calls-layout {
    display: grid;
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.soc-calls-dialer-card,
.soc-calls-history-card { height: 100%; }

/* Cabecera del contacto en el marcador */
.soc-calls-contact-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}
.soc-calls-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0064a6 0%, #4da3d9 100%);
    color: #fff;
    font-size: 19px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 6px rgba(0, 100, 166, 0.25);
}
.soc-calls-contact-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.soc-calls-contact-name {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.soc-calls-contact-sub {
    font-size: 12px;
    color: #64748b;
}

/* Lista de teléfonos con botón de llamada */
.soc-calls-phone-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.soc-calls-phone-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.soc-calls-phone-item:hover {
    border-color: #4da3d9;
    box-shadow: 0 2px 8px rgba(0, 100, 166, 0.10);
}
.soc-calls-phone-item-icon {
    font-size: 20px;
    flex-shrink: 0;
}
.soc-calls-phone-item-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}
.soc-calls-phone-item-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.soc-calls-phone-item-number {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    font-family: monospace;
}
.soc-calls-btn-call {
    background: linear-gradient(135deg, #0064a6 0%, #4da3d9 100%);
    color: #fff;
    border: 1px solid #0064a6;
    border-radius: 9999px;
    padding: 8px 22px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s;
}
.soc-calls-btn-call:hover { background: linear-gradient(135deg, #00578f 0%, #3b8fc4 100%); border-color: #00578f; }

/* Aviso sin teléfonos */
.soc-calls-no-phone {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: #92400e;
}
.soc-calls-no-phone-icon { font-size: 16px; flex-shrink: 0; }

/* Nota de ayuda */
.soc-calls-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 12px;
    background: #eff6ff;
    border-radius: 8px;
    font-size: 12px;
    color: #475569;
    line-height: 1.45;
}
.soc-calls-hint-icon { font-size: 15px; flex-shrink: 0; }

/* Cronómetro en llamada activa */
.soc-calls-elapsed {
    font-size: 18px;
    font-weight: 700;
    color: #1b5e20;
    font-family: monospace;
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}

/* Historial de llamadas del contacto */
.soc-calls-history-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.soc-calls-history-head .soc-myday-timeline-title { margin: 0; }
.soc-calls-history-count {
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 10px;
}

.soc-calls-summary { margin-bottom: 14px; }

.soc-calls-timeline {
    display: flex;
    flex-direction: column;
    max-height: 420px;
    overflow-y: auto;
}
.soc-calls-timeline-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 6px;
    border-bottom: 1px solid #f1f5f9;
}
.soc-calls-timeline-item:last-child { border-bottom: none; }
.soc-calls-timeline-item:hover { background: #f8fafc; border-radius: 8px; }
.soc-calls-timeline-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}
.soc-calls-timeline-icon--out { background: #dbeafe; color: #1d4ed8; }
.soc-calls-timeline-icon--in  { background: #dcfce7; color: #15803d; }
.soc-calls-timeline-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}
.soc-calls-timeline-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.soc-calls-timeline-meta {
    font-size: 11.5px;
    color: #94a3b8;
}
.soc-calls-timeline-note {
    font-size: 12.5px;
    color: #475569;
    background: #f8fafc;
    border-radius: 6px;
    padding: 4px 8px;
    margin: 2px 0 0;
    white-space: pre-wrap;
}
.soc-calls-btn-note {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.soc-calls-btn-note:hover { background: #eff6ff; color: #0064a6; }

/* Estado vacío del historial */
.soc-calls-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px;
}
.soc-calls-empty-art {
    width: 110px;
    height: 110px;
    margin-bottom: 14px;
}
.soc-calls-empty-title {
    font-size: 15px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 6px;
}
.soc-calls-empty-sub {
    font-size: 12.5px;
    color: #94a3b8;
    margin: 0;
    max-width: 340px;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .soc-calls-layout { grid-template-columns: 1fr; }
}

/* Toast fijo: no ocupa espacio en el flujo y no desplaza el contenido al mostrar "Éxito" */
.soc-toast-wrapper-fixed {
    position: fixed;
    inset: 0;
    overflow: visible;
    z-index: 10200;
    pointer-events: none;
}
.soc-toast-wrapper-fixed * {
    pointer-events: auto;
}
.soc-toast-fixed-anchor {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    overflow: visible;
    pointer-events: none;
}
.soc-toast-fixed-anchor * {
    pointer-events: auto;
}
/* Forzar que el contenedor de Syncfusion no participe en el flujo */
.soc-toast-wrapper-fixed .e-toast-container,
.soc-toast-fixed-anchor .e-toast-container {
    position: fixed !important;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    width: 350px;
    max-width: calc(100vw - 24px);
    pointer-events: auto;
    z-index: 10200 !important;
}

/* ── Heatmaps de uso (/admin/uso) ─────────────────────────────────── */
.soc-calendar-heatmap { overflow-x: auto; padding-bottom: 4px; }
.soc-calendar-heatmap table { border-collapse: separate; border-spacing: 3px; }
.soc-calendar-heatmap th { font-size: 10px; color: #6c757d; font-weight: 500; padding: 0 2px; text-align: center; }
.soc-calendar-heatmap td { width: 13px; height: 13px; border-radius: 2px; cursor: default; position: relative; }
.soc-hm-0  { background: #ebedf0; }
.soc-hm-1  { background: #c6e48b; }
.soc-hm-2  { background: #7bc96f; }
.soc-hm-3  { background: #239a3b; }
.soc-hm-4  { background: #196127; }
.soc-hm-empty { background: transparent; }
.soc-calendar-heatmap td:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}
.soc-hourly-heatmap { overflow-x: auto; padding-bottom: 4px; }
.soc-hourly-heatmap table { border-collapse: separate; border-spacing: 2px; }
.soc-hourly-heatmap th { font-size: 10px; color: #6c757d; font-weight: 500; text-align: center; min-width: 22px; }
.soc-hourly-heatmap td.soc-day-label { font-size: 11px; color: #495057; font-weight: 500; padding-right: 6px; white-space: nowrap; }
.soc-hourly-heatmap td.soc-hm-cell { width: 22px; height: 20px; border-radius: 2px; cursor: default; position: relative; }
.soc-hourly-heatmap td.soc-hm-cell:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}
.soc-heatmap-legend { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #6c757d; margin-top: 8px; }
.soc-heatmap-legend span { width: 13px; height: 13px; border-radius: 2px; display: inline-block; }

.soc-selected-range-heatmap {
    margin-top: 1rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
}
.soc-selected-range-heatmap h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.65rem;
}
.soc-selected-range-track {
    overflow-x: auto;
    padding-bottom: 4px;
}
.soc-date-hour-table {
    border-collapse: separate;
    border-spacing: 2px;
    min-width: 760px;
}
.soc-date-hour-table th {
    color: #6c757d;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}
.soc-date-hour-table .soc-date-hour-date {
    min-width: 82px;
    padding-right: 6px;
    text-align: left;
}
.soc-date-hour-table tbody .soc-date-hour-date {
    color: #374151;
    font-weight: 600;
}
.soc-date-hour-cell {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    cursor: default;
    position: relative;
}
.soc-date-hour-cell:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}

/* Detalle diario bajo el heatmap */
.soc-daily-detail { margin-top: 1.5rem; border-top: 1px solid #e5e7eb; padding-top: 1rem; }
.soc-daily-detail h5 { font-size: 0.875rem; font-weight: 600; color: #374151; margin: 0 0 0.75rem; }
.soc-daily-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.soc-daily-table thead th { background: #f9fafb; padding: 6px 10px; text-align: left; font-weight: 600; color: #6b7280; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.soc-daily-table tbody td { padding: 5px 10px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.soc-daily-table tbody tr:last-child td { border-bottom: none; }
.soc-daily-table tbody tr:hover td { background: #f9fafb; }
.soc-daily-row--empty td { color: #9ca3af; }
.soc-daily-date { font-weight: 600; color: #111827; white-space: nowrap; }
.soc-daily-dow  { color: #6b7280; white-space: nowrap; }
.soc-daily-bar  { height: 8px; background: #239a3b; border-radius: 4px; min-width: 3px; transition: width 0.2s; }
.soc-daily-row--clickable { cursor: pointer; }
.soc-daily-row--clickable:hover td { background: #f0fdf4 !important; }

/* Modal detalle de día */
.soc-day-modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center;
    z-index: 9000; padding: 1rem;
}
.soc-day-modal {
    background: #fff; border-radius: 12px; width: 100%; max-width: 640px;
    max-height: 85vh; display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.soc-day-modal-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 1.25rem 1.5rem 1rem; border-bottom: 1px solid #e5e7eb;
}
.soc-day-modal-sub { font-size: 0.82rem; color: #6b7280; display: block; margin-top: 2px; }
.soc-day-modal-close {
    background: none; border: none; font-size: 1.1rem; cursor: pointer;
    color: #6b7280; padding: 2px 6px; border-radius: 4px; line-height: 1;
}
.soc-day-modal-close:hover { background: #f3f4f6; color: #111; }
.soc-day-modal-body { overflow-y: auto; padding: 0.5rem 1.5rem 1.5rem; }
.soc-day-hour-group { margin-top: 1rem; }
.soc-day-hour-label {
    font-size: 0.78rem; font-weight: 700; color: #0064a6;
    text-transform: uppercase; letter-spacing: 0.04em;
    padding: 4px 0; border-bottom: 1px solid #e5e7eb; margin-bottom: 4px;
}
.soc-day-detail-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.soc-day-detail-table th { padding: 4px 8px; text-align: left; font-weight: 600; color: #6b7280; font-size: 0.75rem; }
.soc-day-detail-table td { padding: 5px 8px; border-bottom: 1px solid #f3f4f6; }
.soc-day-detail-table tr:last-child td { border-bottom: none; }
.soc-day-detail-label { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soc-day-tipo-badge { padding: 2px 8px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; }
.soc-day-tipo-página  { background: #dbeafe; color: #1e40af; }
.soc-day-tipo-feature { background: #d1fae5; color: #065f46; }


/* ============================================================
   MÓDULO DE TICKETS
   ============================================================ */

/* Filtros */
.tickets-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    align-items: center;
}
.tickets-filtros .e-input-group, .tickets-filtros .e-ddl {
    min-width: 160px;
    max-width: 220px;
}

/* Contadores rápidos */
.tickets-counters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.ticket-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 18px;
    border-radius: 8px;
    min-width: 90px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}
.ticket-counter__num { font-size: 24px; font-weight: 700; line-height: 1; }
.ticket-counter__label { font-size: 11px; color: #6c757d; margin-top: 4px; }
.ticket-counter--abierto  { border-color: #fd7e14; }
.ticket-counter--abierto .ticket-counter__num  { color: #fd7e14; }
.ticket-counter--atencion { border-color: #0d6efd; }
.ticket-counter--atencion .ticket-counter__num { color: #0d6efd; }
.ticket-counter--espera   { border-color: #6f42c1; }
.ticket-counter--espera .ticket-counter__num   { color: #6f42c1; }
.ticket-counter--resuelto { border-color: #28a745; }
.ticket-counter--resuelto .ticket-counter__num { color: #28a745; }

/* Tabla de tickets */
.tickets-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.tickets-table th {
    background: #f1f3f5;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}
.tickets-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: middle;
}
.ticket-row { cursor: pointer; transition: background 0.15s; }
.ticket-row:hover { background: #f8f9ff; }
.ticket-row--resuelto td, .ticket-row--cerrado td { opacity: 0.7; }
.ticket-asunto { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Folio */
.ticket-folio {
    font-family: monospace;
    font-size: 12px;
    color: #495057;
    background: #f1f3f5;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Badges de prioridad */
.ticket-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.ticket-badge--baja     { background: #e9ecef; color: #6c757d; }
.ticket-badge--media    { background: #fff3cd; color: #856404; }
.ticket-badge--alta     { background: #ffe0cc; color: #c35a00; }
.ticket-badge--urgente  { background: #f8d7da; color: #842029; }

/* Badges de estado */
.ticket-badge--estado-abierto             { background: #fff3cd; color: #856404; }
.ticket-badge--estado-enatencion          { background: #cfe2ff; color: #084298; }
.ticket-badge--estado-esperandorespuesta  { background: #e2d9f3; color: #432874; }
.ticket-badge--estado-resuelto            { background: #d1e7dd; color: #0a3622; }
.ticket-badge--estado-cerrado             { background: #e9ecef; color: #6c757d; }

/* Grid de mis tickets */
.mis-tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 4px;
}
.mis-ticket-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.1s;
    border-left: 4px solid #dee2e6;
}
.mis-ticket-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.10); transform: translateY(-1px); }
.mis-ticket-card--abierto            { border-left-color: #fd7e14; }
.mis-ticket-card--enatencion         { border-left-color: #0d6efd; }
.mis-ticket-card--esperandorespuesta { border-left-color: #6f42c1; }
.mis-ticket-card--resuelto           { border-left-color: #28a745; }
.mis-ticket-card--cerrado            { border-left-color: #adb5bd; opacity: 0.85; }
.mis-ticket-card__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.mis-ticket-card__area   { font-size: 11px; color: #6c757d; margin-bottom: 4px; }
.mis-ticket-card__asunto { font-size: 14px; font-weight: 600; color: #212529; margin-bottom: 8px; line-height: 1.3; }
.mis-ticket-card__meta   { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.mis-ticket-card__agente { font-size: 11px; color: #6c757d; }
.mis-ticket-card__fecha  { font-size: 11px; color: #adb5bd; }
.mis-ticket-card__resolucion { font-size: 11px; color: #28a745; margin-top: 4px; }

/* Detalle del ticket */
.ticket-detalle { max-width: 900px; }
.ticket-detalle__info { background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 8px; padding: 16px; margin-bottom: 20px; }
.ticket-info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ticket-info-item { display: flex; flex-direction: column; gap: 2px; }
.ticket-info-item__label { font-size: 11px; color: #6c757d; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.ticket-info-item__value { font-size: 13px; color: #212529; }
.ticket-descripcion-original { background: #fff; border-left: 3px solid #0d6efd; padding: 10px 14px; border-radius: 0 6px 6px 0; margin-top: 8px; font-size: 13px; }
.ticket-descripcion-original p { margin: 4px 0 0; white-space: pre-wrap; }
.ticket-resolucion-nota { background: #d1e7dd; border-left: 3px solid #28a745; padding: 10px 14px; border-radius: 0 6px 6px 0; margin-top: 8px; font-size: 13px; }
.ticket-resolucion-nota p { margin: 4px 0 0; }

/* Historial */
.ticket-historial h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; color: #495057; }
.ticket-historial__list { list-style: none; padding: 0; margin: 0; border-left: 2px solid #dee2e6; }
.ticket-historial__item {
    position: relative;
    padding: 4px 0 4px 16px;
    font-size: 12px;
    color: #495057;
}
.ticket-historial__item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dee2e6;
}
.ticket-historial__fecha  { color: #adb5bd; margin-right: 6px; }
.ticket-historial__evento { font-weight: 600; }
.ticket-historial__detalle{ color: #6c757d; }
.ticket-historial__por    { font-size: 11px; color: #adb5bd; margin-left: 4px; }

/* Mensajes (chat básico — Fase 2 amplía esto) */
.ticket-mensajes { margin-top: 20px; }
.ticket-mensajes h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; color: #495057; }
.ticket-mensaje {
    max-width: 70%;
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
}
.ticket-mensaje--broker { background: #e9ecef; margin-right: auto; border-bottom-left-radius: 2px; }
.ticket-mensaje--agente { background: #cfe2ff; margin-left: auto; border-bottom-right-radius: 2px; }
.ticket-mensaje__autor  { font-size: 11px; font-weight: 600; color: #6c757d; margin-bottom: 3px; }
.ticket-mensaje__fecha  { font-size: 10px; color: #adb5bd; margin-top: 4px; text-align: right; }

/* Formulario nuevo ticket */
.nuevo-ticket-form { max-width: 600px; }
.nuevo-ticket-form__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.nuevo-ticket-imagenes__hint { font-size: 12px; color: #6c757d; margin: 0 0 8px; }
.nuevo-ticket-imagenes .tc-upload-btn {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
    padding: 8px 12px; border: 1px dashed #adb5bd; border-radius: 6px; background: #f8f9fa;
    font-size: 13px; color: #495057;
}
.nuevo-ticket-imagenes .tc-upload-btn:hover { border-color: #005D4E; background: #f0faf8; }

/* ── Ticket Detalle v2 (Fase 2) ─────────────────────────── */

.ticket-detalle-v2 {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    align-items: start;
    max-width: 1200px;
}
@media (max-width: 768px) {
    .ticket-detalle-v2 { grid-template-columns: 1fr; }
}

/* Sidebar */
.ticket-sidebar { display: flex; flex-direction: column; gap: 12px; }

.ticket-info-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}
.ticket-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 12px;
    font-size: 12px;
    border-bottom: 1px solid #f1f3f5;
}
.ticket-info-row:last-child { border-bottom: none; }
.ticket-info-row span { color: #6c757d; }
.ticket-info-row strong { color: #212529; text-align: right; max-width: 60%; word-break: break-word; }
.ticket-info-row--metric strong { color: #0d6efd; font-size: 13px; }

.ticket-desc-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    font-size: 12px;
}
.ticket-desc-card__label { font-weight: 600; color: #495057; margin-bottom: 6px; }
.ticket-desc-card__body  { color: #495057; white-space: pre-wrap; line-height: 1.5; }

.ticket-resolucion-card {
    background: #d1e7dd;
    border: 1px solid #a3cfbb;
    border-radius: 8px;
    padding: 12px;
    font-size: 12px;
}
.ticket-resolucion-card__label { font-weight: 600; color: #0a3622; margin-bottom: 6px; }
.ticket-resolucion-card__body  { color: #0a3622; white-space: pre-wrap; }

/* Panel agente */
.ticket-agente-panel {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ticket-agente-panel__title { font-size: 11px; font-weight: 700; color: #6c757d; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }

/* Historial sidebar */
.ticket-historial-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
}
.ticket-historial-card__title { font-size: 11px; font-weight: 700; color: #6c757d; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }

/* Chat area */
.ticket-chat-area {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    min-height: 500px;
    max-height: calc(100vh - 160px);
}

/* Adjuntos iniciales */
.ticket-adjuntos-iniciales {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 10px 14px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-size: 12px;
}
.ticket-adjuntos-iniciales__label { color: #6c757d; font-weight: 600; }
.ticket-adjunto-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: #e9ecef;
    border-radius: 12px;
    font-size: 11px;
    color: #495057;
    text-decoration: none;
    transition: background 0.15s;
}
.ticket-adjunto-chip:hover { background: #dee2e6; color: #212529; }
button.ticket-adjunto-chip--btn {
    border: none;
    font: inherit;
    font-size: 11px;
    cursor: pointer;
    text-align: left;
}

.ticket-adjunto-modal-body {
    text-align: center;
    padding: 4px 0 8px;
    max-height: calc(85vh - 120px);
    overflow: auto;
}
.ticket-adjunto-modal-img {
    max-width: 100%;
    max-height: calc(85vh - 140px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    vertical-align: middle;
}
button.tc-adjunto-img-btn {
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 8px;
    line-height: 0;
}
button.tc-adjunto-img-btn:focus-visible {
    outline: 2px solid #005D4E;
    outline-offset: 2px;
}

/* Mensajes scroll */
.ticket-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8f9fa;
}

/* Burbujas */
.tc-burbuja {
    max-width: 72%;
    display: flex;
    flex-direction: column;
}
.tc-burbuja--izquierda { align-self: flex-start; align-items: flex-start; }
.tc-burbuja--derecha   { align-self: flex-end;   align-items: flex-end;   }

.tc-burbuja__autor {
    font-size: 11px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 3px;
}
.tc-burbuja__texto {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.tc-burbuja--izquierda .tc-burbuja__texto {
    background: #fff;
    border: 1px solid #dee2e6;
    border-bottom-left-radius: 4px;
    color: #212529;
}
.tc-burbuja--derecha .tc-burbuja__texto {
    background: #0d6efd;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.tc-burbuja__fecha { font-size: 10px; color: #adb5bd; margin-top: 3px; }

/* Adjuntos en burbuja */
.tc-burbuja__adjuntos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tc-adjunto-img {
    max-width: 200px;
    max-height: 160px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.4);
    transition: transform 0.15s;
}
.tc-adjunto-img:hover { transform: scale(1.03); }

.tc-sin-mensajes { text-align: center; color: #adb5bd; font-size: 13px; padding: 32px 0; }

/* Input area */
.ticket-chat-input-area {
    border-top: 1px solid #dee2e6;
    padding: 12px;
    background: #fff;
}
.tc-adjuntos-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.tc-adjunto-pendiente {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e9ecef;
    border-radius: 12px;
    padding: 3px 8px;
    font-size: 11px;
    color: #495057;
}
.tc-adjunto-remove {
    background: none; border: none; cursor: pointer;
    color: #dc3545; font-size: 14px; line-height: 1;
    padding: 0 2px; margin-left: 2px;
}
.tc-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.tc-input-row .tc-textarea { flex: 1; }
.tc-input-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}
.tc-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #f1f3f5;
    cursor: pointer;
    font-size: 16px;
    color: #6c757d;
    transition: background 0.15s;
}
.tc-upload-btn:hover { background: #dee2e6; color: #495057; }

.soc-alert-upload-btn {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
    padding: 8px 12px; border: 1px dashed #adb5bd; border-radius: 6px; background: #f8f9fa;
    font-size: 13px; color: #495057;
}
.soc-alert-upload-btn:hover { border-color: #005D4E; background: #f0faf8; }

.tc-ticket-cerrado {
    padding: 14px;
    text-align: center;
    color: #6c757d;
    font-size: 13px;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
}

/* ── Módulo Tickets: Métricas (Fase 5) ─────────────────────────────────── */
.metricas-tickets {
    max-width: 1100px;
}
.metricas-seccion-titulo {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #6b7280;
    margin-bottom: 12px;
}
.metricas-kpi-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.metricas-kpi {
    flex: 1;
    min-width: 120px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 20px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.metricas-kpi__num {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 6px;
}
.metricas-kpi__label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.metricas-kpi__sub {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 3px;
}
.metricas-kpi--abierto   { border-top: 3px solid #ef4444; }
.metricas-kpi--abierto .metricas-kpi__num   { color: #ef4444; }
.metricas-kpi--atencion  { border-top: 3px solid #f59e0b; }
.metricas-kpi--atencion .metricas-kpi__num  { color: #f59e0b; }
.metricas-kpi--espera    { border-top: 3px solid #8b5cf6; }
.metricas-kpi--espera .metricas-kpi__num    { color: #8b5cf6; }
.metricas-kpi--resuelto  { border-top: 3px solid #10b981; }
.metricas-kpi--resuelto .metricas-kpi__num  { color: #10b981; }
.metricas-kpi--cerrado   { border-top: 3px solid #6b7280; }
.metricas-kpi--cerrado .metricas-kpi__num   { color: #6b7280; }
.metricas-kpi--tiempo    { border-top: 3px solid #3b82f6; }
.metricas-kpi--tiempo .metricas-kpi__num    { color: #3b82f6; }

.metricas-dos-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 700px) {
    .metricas-dos-cols { grid-template-columns: 1fr; }
}
.metricas-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.metricas-panel__titulo {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 14px;
}
.metricas-barra-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.metricas-barra-item {
    display: grid;
    grid-template-columns: 130px 1fr 36px;
    align-items: center;
    gap: 8px;
}
.metricas-barra-item__label {
    font-size: 13px;
    color: #4b5563;
}
.metricas-barra {
    height: 10px;
    background: #f3f4f6;
    border-radius: 5px;
    overflow: hidden;
}
.metricas-barra__fill {
    height: 100%;
    border-radius: 5px;
    transition: width .4s ease;
}
.metricas-barra--broker     { background: #3b82f6; }
.metricas-barra--plataforma { background: #8b5cf6; }
.metricas-barra--baja       { background: #10b981; }
.metricas-barra--media      { background: #f59e0b; }
.metricas-barra--alta       { background: #ef4444; }
.metricas-barra--urgente    { background: #7f1d1d; }
.metricas-barra-item__valor {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-align: right;
}
/* ── Reasignar: botón en panel agente ── */
.ticket-agente-panel .e-btn + .e-btn {
    margin-top: 6px;
}

/* ── Portal del Cliente ──────────────────────────────────────────────────── */
.portal-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f3f4f6;
    font-family: 'Segoe UI', sans-serif;
}
.portal-header {
    background: #fff;
    padding: 14px 24px;
    color: #006d4e;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.portal-header__inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.portal-header__logo {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: .5px;
    color: #006d4e;
}
.portal-header__sub {
    font-size: 13px;
    font-weight: 600;
    color: #006d4e;
    opacity: .95;
}
.portal-main {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 32px 16px;
}
.portal-main--full {
    padding: 0;
    align-items: stretch;
}
.portal-main--full > * {
    width: 100%;
}
.portal-footer {
    text-align: center;
    padding: 12px;
    font-size: 12px;
    color: #9ca3af;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

/* Login / verificar card */
.portal-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    padding: 36px 32px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}
.portal-card__icon {
    text-align: center;
    margin-bottom: 12px;
}
.portal-card__titulo {
    font-size: 1.3rem;
    font-weight: 700;
    color: #111827;
    text-align: center;
    margin-bottom: 8px;
}
.portal-card__desc {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin-bottom: 24px;
}
.portal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.portal-btn-full {
    width: 100%;
    justify-content: center;
}
.portal-otp-input input {
    font-size: 2rem !important;
    letter-spacing: 8px;
    text-align: center;
}
/* Alerts */
.portal-alert {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
}
.portal-alert--error   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.portal-alert--info    { background: #e8f4fa; color: #0064a6; border: 1px solid #9dc4e0; }
.portal-alert--success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
/* Botones de selección de canal en PortalLogin */
.soc-canal-btn {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.soc-canal-btn:hover { border-color: #1a6b3c; color: #1a6b3c; }
.soc-canal-btn--active {
    border-color: #1a6b3c;
    background: #1a6b3c;
    color: #fff;
}
/* Portal pages */
.portal-page {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}
.portal-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}
.portal-page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px;
}
.portal-page-sub {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}
.portal-loading {
    text-align: center;
    color: #6b7280;
    padding: 48px;
}
/* Chat portal cliente ↔ asesor */
.portal-chat-card {
    padding: 20px;
}
.portal-chat-thread {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
.portal-chat-bubble {
    max-width: 85%;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.45;
}
.portal-chat-bubble--left {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #e5e7eb;
}
.portal-chat-bubble--right {
    align-self: flex-end;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}
.portal-chat-bubble__meta {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 4px;
}
.portal-chat-bubble__text {
    color: #111827;
    white-space: pre-wrap;
    word-break: break-word;
}
.portal-chat-compose {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}
.portal-chat-input {
    width: 100%;
    min-height: 72px;
}
.portal-empty {
    color: #9ca3af;
    font-size: 14px;
    padding: 12px 0;
}
/* Secciones */
.portal-section {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.portal-section__titulo {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #6b7280;
    margin-bottom: 16px;
}
.portal-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
/* Datos del contacto */
.portal-datos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.portal-dato {
    display: flex;
    flex-direction: column;
}
.portal-dato__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #9ca3af;
    margin-bottom: 2px;
}
.portal-dato__valor {
    font-size: 15px;
    color: #111827;
    font-weight: 500;
}
/* Oportunidades */
.portal-opps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.portal-opp-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}
.portal-opp-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
}
.portal-opp-etapa {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.portal-opp-estado {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 99px;
    font-weight: 600;
    background: #e5e7eb;
    color: #374151;
}
.portal-opp-card__body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.portal-opp-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #6b7280;
}
.portal-opp-row strong { color: #111827; }
.portal-checklist-bar {
    padding: 10px 14px;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    color: #6b7280;
}
.portal-barra {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    margin-top: 4px;
    overflow: hidden;
}
.portal-barra__fill {
    height: 100%;
    background: #10b981;
    border-radius: 3px;
    transition: width .3s ease;
}
/* Documentos */
.portal-docs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.portal-doc-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}
.portal-doc-item__info {
    display: flex;
    flex-direction: column;
}
.portal-doc-item__nombre {
    font-size: 14px;
    color: #111827;
    font-weight: 500;
}
.portal-doc-item__tipo {
    font-size: 12px;
    color: #9ca3af;
}

/* ── Portal Inicio: layout estilo dashboard CRM ─────────────────────────── */
.pi-page {
    min-height: 100vh;
    background: #f0f4f8;
    display: flex;
    flex-direction: column;
}
/* Top bar */
.pi-topbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    padding: 0 28px;
    height: 56px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.pi-topbar__marca {
    font-size: 1rem;
    font-weight: 700;
    color: #006d4e;
    white-space: nowrap;
}
.pi-topbar__titulo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #006d4e;
    flex: 1;
    text-align: center;
}
.pi-topbar__right {
    display: flex;
    align-items: center;
    gap: 16px;
    white-space: nowrap;
}
.pi-topbar__usuario {
    font-size: 13px;
    color: #4a5568;
}
.pi-topbar__cerrar {
    font-size: 13px;
    color: #e53e3e;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}
.pi-topbar__cambiar-broker {
    font-size: 13px;
    color: #006d4e;
    background: none;
    border: 1px solid #006d4e;
    border-radius: 6px;
    cursor: pointer;
    padding: 4px 10px;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.pi-topbar__cambiar-broker:hover { background: #006d4e; color: #fff; }

/* ── Selección de broker (multi-broker) ── */
.pi-broker-selector {
    max-width: 680px;
    margin: 48px auto 32px;
    padding: 0 20px;
    text-align: center;
}
.pi-broker-selector__icon { font-size: 2.5rem; margin-bottom: 12px; }
.pi-broker-selector__titulo { font-size: 1.35rem; font-weight: 700; color: #1a202c; margin: 0 0 8px; }
.pi-broker-selector__sub { font-size: 14px; color: #718096; margin: 0 0 32px; }
.pi-broker-selector__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.pi-broker-selector__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 20px 20px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    text-align: center;
    transition: border-color .18s, box-shadow .18s, transform .12s;
}
.pi-broker-selector__card:hover {
    border-color: #006d4e;
    box-shadow: 0 4px 20px rgba(0,109,78,.12);
    transform: translateY(-2px);
}
.pi-broker-selector__logo {
    width: 80px;
    height: 56px;
    object-fit: contain;
}
.pi-broker-selector__logo-placeholder {
    width: 80px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0faf6;
    border-radius: 8px;
}
.pi-broker-selector__nombre {
    font-size: 15px;
    font-weight: 700;
    color: #1a202c;
}
.pi-broker-selector__ejecutivo {
    font-size: 13px;
    color: #718096;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.pi-broker-selector__count {
    font-size: 12px;
    color: #006d4e;
    font-weight: 600;
    background: #f0faf6;
    padding: 2px 10px;
    border-radius: 20px;
}
.pi-broker-selector__cta {
    font-size: 13px;
    font-weight: 600;
    color: #006d4e;
    margin-top: 4px;
}
/* Contenido */
.pi-contenido {
    flex: 1;
    padding: 24px 28px;
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
}
.pi-breadcrumb {
    font-size: 1.4rem;
    font-weight: 600;
    color: #006d4e;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.pi-breadcrumb .e-icons {
    color: #006d4e;
    font-size: 1.15em;
    margin-right: 8px;
}
.pi-bienvenida {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.5;
    margin: 0 0 12px;
    max-width: 820px;
}

.pi-bienvenida--compact {
    font-size: 0.9rem;
    color: #64748b;
}

/* Portal inicio — hero alineado con https://socasesores.com/ (home) */
.pi-soc-hero {
    position: relative;
    color: #fff;
    padding: 18px 20px 24px;
    overflow: hidden;
}

.pi-soc-hero__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(2, 45, 34, 0.93) 0%,
        rgba(0, 109, 78, 0.88) 48%,
        rgba(13, 148, 136, 0.86) 100%
    );
}

.pi-soc-hero__bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("https://socasesores.com/img/banners-2025/Banners-nuevositio-hipotecario-1920.jpg");
    background-size: cover;
    background-position: center 30%;
    opacity: 0.38;
    mix-blend-mode: luminosity;
}

@media (max-width: 768px) {
    .pi-soc-hero__bg::before {
        background-image: url("https://socasesores.com/img/banners-2025/hipotecario-vertical.jpg");
        background-position: center center;
    }
}

.pi-soc-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 4px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.pi-soc-hero__title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 10px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.28);
    color: #fff !important;
    text-align: center;
}

.pi-soc-hero__juntos {
    font-weight: 800;
    color: #fff !important;
}

.pi-soc-hero__real {
    font-weight: 600;
    color: #fff !important;
}

.pi-soc-hero__lead {
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 720px;
    margin: 0 auto 14px;
    opacity: 0.96;
    text-align: center;
}

.pi-soc-hero__tools-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    opacity: 0.88;
    display: block;
    margin-bottom: 8px;
}

.pi-soc-hero__tools {
    text-align: center;
}

.pi-soc-hero__tools-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.pi-soc-hero__tool {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.96);
    color: #006d4e;
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.pi-soc-hero__tool:hover {
    background: #fff;
    color: #004d38;
    transform: translateY(-1px);
}

.pi-soc-partners {
    margin-top: 28px;
    padding: 24px 20px 20px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
}

.pi-soc-partners__title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
    color: #64748b;
    margin: 0 0 8px;
}

.pi-soc-partners__sub {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 18px;
    line-height: 1.45;
}

.pi-soc-partners__sub a {
    color: #006d4e;
    font-weight: 600;
}

.pi-soc-partners__logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px 28px;
    filter: grayscale(0.08);
    opacity: 0.92;
}

.pi-soc-partners__logos img {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.pi-referido-cta {
    margin: 0 0 22px;
}
.pi-referido-dialog .e-dlg-content {
    padding-top: 8px;
    max-height: min(78vh, 640px);
    overflow-y: auto;
}
.pi-referido-intro {
    font-size: 0.88rem;
    color: #4a5568;
    line-height: 1.45;
    margin: 0 0 14px;
}
.pi-referido-context {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: #1e293b;
    display: grid;
    gap: 6px;
}
.pi-referido-context-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #006d4e;
    margin-bottom: 2px;
}
.pi-referido-warn {
    margin-bottom: 12px;
    text-align: left;
}
.pi-referido-success {
    text-align: center;
    padding: 12px 8px 8px;
}
.pi-referido-success-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    font-size: 1.5rem;
    line-height: 48px;
    font-weight: 700;
}
.pi-referido-success-title {
    font-weight: 700;
    color: #006d4e;
    margin: 0 0 8px;
}
.pi-broker-section-titulo {
    color: #006d4e !important;
}
.pi-broker-ident-logo-wrap {
    display: inline-flex;
    align-items: center;
}
.pi-broker-ident-logo {
    max-height: 52px;
    max-width: min(280px, 100%);
    width: auto;
    object-fit: contain;
    object-position: left center;
}
/* KPI cards */
.pi-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
@media (max-width: 900px) { .pi-kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .pi-kpi-row { grid-template-columns: 1fr; } }
.pi-kpi-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.pi-kpi-card__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .6px;
    color: #718096;
    margin-bottom: 8px;
}
.pi-kpi-card__valor {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1;
}
.pi-kpi-card__valor--sm { font-size: 1rem; line-height: 1.4; color: #2d3748; }
.pi-kpi-card--ejecutivo { border-left: 3px solid #1a7a4a; }
.pi-ejecutivo-link {
    display: block;
    font-size: 12px;
    color: #1a7a4a;
    text-decoration: none;
    margin-top: 4px;
}
.pi-ejecutivo-link:hover { text-decoration: underline; }
/* Ejecutivo card */
.pi-ejecutivo-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #1a7a4a;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    margin-bottom: 20px;
}
.pi-ejecutivo-card__titulo {
    font-size: 13px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 14px;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.pi-ejecutivo-card__datos {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
}
.pi-ejecutivo-dato {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pi-ejecutivo-dato__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .5px;
    color: #718096;
    text-transform: uppercase;
}
.pi-ejecutivo-dato__valor {
    font-size: 14px;
    font-weight: 600;
    color: #1a202c;
}
.pi-ejecutivo-dato__link {
    color: #1a7a4a;
    text-decoration: none;
}
.pi-ejecutivo-dato__link:hover { text-decoration: underline; }
/* Etapas */
.pi-etapas-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}
@media (max-width: 1000px) { .pi-etapas-row { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px)  { .pi-etapas-row { grid-template-columns: repeat(2, 1fr); } }
.pi-etapa-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 10px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    opacity: .6;
}
.pi-etapa-card--activa { opacity: 1; border-top: 3px solid #1a7a4a; }
.pi-etapa-card__titulo {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .5px;
    color: #718096;
    margin-bottom: 6px;
}
.pi-etapa-card__num {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1;
}
.pi-etapa-card__sub {
    font-size: 9px;
    color: #a0aec0;
    margin-top: 2px;
}
/* Secciones */
.pi-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.pi-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.pi-section__titulo {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #4a5568;
}
.pi-empty { font-size: 14px; color: #a0aec0; padding: 8px 0; }
/* Oportunidades grid */
.pi-opps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.pi-opp-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.pi-opp-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f7fafc;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
}
.pi-opp-etapa { font-size: 13px; font-weight: 700; color: #2d3748; }
.pi-opp-estado {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 99px;
    background: #c6f6d5;
    color: #276749;
    font-weight: 600;
}
.pi-opp-card__body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.pi-opp-row { display: flex; justify-content: space-between; font-size: 13px; color: #718096; }
.pi-opp-row strong { color: #1a202c; }
.pi-opp-row--asesor { border-top: 1px solid #e2e8f0; margin-top: 6px; padding-top: 6px; color: #4a5568; }
.pi-opp-row--asesor strong { color: #006d4e; }
.pi-opp-checklist {
    padding: 10px 14px;
    border-top: 1px solid #e2e8f0;
    font-size: 12px;
    color: #718096;
}
.pi-opp-checklist--clickable {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-top: 1px solid #e2e8f0;
    padding: 10px 14px;
    font-size: 12px;
    color: #718096;
    cursor: pointer;
    transition: background .15s;
}
.pi-opp-checklist--clickable:hover { background: #f0faf4; }
.pi-opp-card__actions {
    display: flex;
    gap: 8px;
    margin: 10px 14px 14px;
}
.pi-opp-card__upload {
    flex: 1 1 0;
}
.pi-barra { height: 6px; background: #e2e8f0; border-radius: 3px; margin-top: 4px; overflow: hidden; }
.pi-barra__fill { height: 100%; background: #1a7a4a; border-radius: 3px; transition: width .3s; }
/* Documentos */
.pi-docs-list { display: flex; flex-direction: column; gap: 8px; }
.pi-doc-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: #f7fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}
.pi-doc-nombre { font-size: 14px; color: #2d3748; font-weight: 500; }
.pi-doc-meta   { font-size: 12px; color: #a0aec0; margin-top: 1px; }
.pi-doc-item--clickable { cursor: pointer; transition: background .15s, border-color .15s; }
.pi-doc-item--clickable:hover { background: #edf7f1; border-color: #006d4e; }
.pi-doc-viewer-dialog.e-dialog { width: 90vw !important; height: 88vh !important; max-height: 88vh; }
.pi-doc-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-right: 36px;
    width: 100%;
}
.pi-doc-viewer-header__nombre {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pi-doc-viewer-header__descarga {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

/* Modal "Documentos de la solicitud" */
.pi-verdocs-dialog.e-dialog { max-height: 90vh; }
.pi-verdocs-dialog .e-dlg-content {
    max-height: calc(90vh - 110px);
    overflow-y: auto;
}
.pi-verdocs-dialog .soc-docs-table .col-by {
    width: auto;
    max-width: none;
    overflow: visible;
    white-space: nowrap;
}
.pi-doc-viewer-dialog .e-dlg-content { padding: 0 !important; height: calc(88vh - 64px) !important; display: flex; flex-direction: column; overflow: hidden; }
.pi-doc-viewer-dialog .e-dlg-content > div,
.pi-doc-viewer-dialog .e-dlg-content > div > div { flex: 1; min-height: 0; height: 100%; display: flex; flex-direction: column; }
.pi-doc-viewer-dialog .e-dlg-content iframe { flex: 1; min-height: 0; width: 100%; height: calc(88vh - 80px); border: none; display: block; }

/* ══════════════════════════════════════════════════
   Portal — Branding, Calificación, Galería, Mapa
   ══════════════════════════════════════════════════ */

/* Logo en topbar */
.pi-topbar__logo-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    max-width: min(340px, 52vw);
}
.pi-topbar__logo {
    height: 38px;
    max-height: 38px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    object-position: left center;
    flex-shrink: 0;
}

/* Tipo de oficina badge */
.pi-oficina-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-left: 8px;
}
.pi-oficina-diamante { background: #e8f4fd; color: #1a56db; border: 1px solid #93c5fd; }
.pi-oficina-oro      { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.pi-oficina-plata    { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.pi-oficina-bronce   { background: #fdf4ec; color: #92400e; border: 1px solid #f6d49d; }
.pi-oficina-sin-tipo { background: #f7fafc; color: #64748b; border: 1px solid #e2e8f0; }

/* Tu Broker — rejilla (portal inicio) */
.pi-broker-perfil-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #718096;
    margin: 4px 0 0;
    padding-top: 14px;
    border-top: 1px solid #edf2f7;
}
.pi-broker-grid {
    display: grid;
    gap: 12px 18px;
    width: 100%;
}
.pi-broker-grid--ident {
    grid-template-columns: 1fr 1fr;
}
.pi-broker-grid--perfil3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.pi-broker-grid--urls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pi-broker-dato--full {
    grid-column: 1 / -1;
}
.pi-broker-url {
    font-size: 13px;
    font-weight: 500;
    word-break: break-word;
    line-height: 1.35;
}
.pi-broker-url-muted { color: #cbd5e0; user-select: none; }

.pi-social-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #006d4e;
    text-decoration: none;
    border-radius: 8px;
    padding: 4px;
    transition: opacity .15s, transform .1s;
}
.pi-social-icon-link:hover {
    opacity: .88;
    transform: scale(1.06);
}
.pi-social-icon-link:focus-visible {
    outline: 2px solid #006d4e;
    outline-offset: 2px;
}
.pi-social-svg {
    width: 32px;
    height: 32px;
    display: block;
}
.pi-social-svg path {
    fill: currentColor;
}
.pi-maps-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: center;
}
.pi-mapa-modal-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: #006d4e;
    cursor: pointer;
    text-decoration: underline;
}
.pi-mapa-modal-btn:hover {
    opacity: .9;
}
.pi-mapa-dialog.e-dialog {
    max-width: min(92vw, 720px);
}
.pi-mapa-modal-frame {
    width: 100%;
    min-height: 200px;
}
.pi-mapa-modal-frame iframe {
    display: block;
    width: 100%;
    vertical-align: top;
}
.pi-mapa-fallback {
    padding: 8px 4px 12px;
    text-align: center;
}
.pi-mapa-fallback-text {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.5;
    margin: 0 0 18px;
    text-align: left;
}
.pi-mapa-fallback-text code {
    font-size: 0.85em;
    word-break: break-all;
}
.pi-mapa-fallback-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    background: #006d4e;
    color: #fff !important;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: opacity .15s;
}
.pi-mapa-fallback-btn:hover {
    opacity: .92;
    color: #fff !important;
}
.pi-mapa-dialog .e-dlg-content {
    min-height: 200px;
}
.pi-mapa-loading {
    padding: 48px 24px;
    text-align: center;
    font-size: 1rem;
    color: #4a5568;
}
.pi-mapa-osm-note {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.45;
    margin: 12px 0 14px;
}
.pi-mapa-fallback-btn--secondary {
    background: #e2e8f0;
    color: #1e293b !important;
    margin-top: 0;
}
.pi-mapa-fallback-btn--secondary:hover {
    opacity: .95;
    color: #0f172a !important;
}

@media (max-width: 720px) {
    .pi-broker-grid--ident,
    .pi-broker-grid--perfil3,
    .pi-broker-grid--urls {
        grid-template-columns: 1fr;
    }
}

/* Redes sociales */
.pi-social-link { display: inline-flex; align-items: center; text-decoration: none; }

/* Sección de calificación */
.pi-rating-section { }
.pi-rating-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.pi-rating-numero {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1;
}
.pi-rating-estrellas {
    font-size: 1.4rem;
    color: #f59e0b;
    letter-spacing: 1px;
}
.pi-rating-total {
    font-size: .85rem;
    color: #718096;
}
.pi-rating-form { padding-top: 8px; }
.pi-star-picker {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}
.pi-star-btn {
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #d1d5db;
    transition: color .15s, transform .1s;
    padding: 0;
    line-height: 1;
}
.pi-star-btn:hover,
.pi-star-btn.active { color: #f59e0b; transform: scale(1.15); }
.pi-rating-comentario {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: .85rem;
    resize: vertical;
    margin-bottom: 10px;
    font-family: inherit;
}

/* Galería */
.pi-galeria {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.pi-galeria-thumb {
    display: block;
    width: 110px;
    height: 85px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: transform .15s;
}
.pi-galeria-thumb:hover { transform: scale(1.04); }
.pi-galeria-thumb--static {
    cursor: default;
}
.pi-galeria-thumb--static:hover { transform: none; }
.pi-galeria-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Google Maps embed */
.pi-maps-wrapper {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

/* Calificación inline dentro del card de ejecutivo */
.pi-rating-numero-inline { font-size: 1.1rem; font-weight: 700; color: #1a202c; margin-right: 4px; }
.pi-rating-estrellas-inline { font-size: 1rem; color: #f59e0b; letter-spacing: 1px; margin-right: 4px; }
.pi-rating-total-inline { font-size: .8rem; color: #718096; }

.pi-star-readonly {
    font-size: 1.35rem;
    color: #f59e0b;
    letter-spacing: 3px;
    margin: 4px 0 8px;
}
.pi-rating-comentario-leido {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.45;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}
.pi-rating-sin-comentario {
    font-size: 0.85rem;
    color: #9ca3af;
    font-style: italic;
    margin-bottom: 12px;
}
.pi-rating-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 4px;
}

/* Dato de ancho completo (formulario de calificación) */
.pi-ejecutivo-dato--fullwidth { flex-direction: column; align-items: flex-start; gap: 6px; }
.pi-ejecutivo-dato--fullwidth .pi-ejecutivo-dato__valor { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.pi-ejecutivo-dato--rating .pi-ejecutivo-dato__valor { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pi-ejecutivo-dato--rating-fullrow {
    flex-basis: 100%;
    width: 100%;
}
.pi-ejecutivo-promedio-line {
    align-items: center;
    gap: 6px 10px;
}
.pi-rating-max {
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    margin-right: 4px;
}
.pi-resenas-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: #006d4e;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: underline;
    font-family: inherit;
}
.pi-resenas-link:hover {
    color: #004d38;
}
.pi-resenas-intro {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 12px;
    line-height: 1.4;
}
.pi-resenas-list {
    max-height: min(420px, 55vh);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-right: 4px;
}
.pi-resena-item {
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.pi-resena-item__cab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.pi-resena-item__fecha {
    font-size: 0.75rem;
    color: #64748b;
}
.pi-resena-item__com {
    font-size: 0.9rem;
    color: #1e293b;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}
.pi-star-readonly--compact {
    font-size: 1.05rem;
    letter-spacing: 2px;
    margin: 0;
}

/* ── Cards Tu Broker + Tu Ejecutivo en fila ── */
.pi-cards-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}
.pi-card-flex {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;   /* el margen lo maneja el contenedor */
}
@media (max-width: 640px) {
    .pi-cards-row { flex-direction: column; }
}

/* ── Animación de entrada suave ── */
@keyframes pi-fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.pi-card-flex,
.pi-section {
    animation: pi-fade-up .35s ease both;
}
.pi-cards-row .pi-card-flex:nth-child(2) { animation-delay: .06s; }
.pi-section:nth-of-type(2) { animation-delay: .06s; }
.pi-section:nth-of-type(3) { animation-delay: .12s; }

/* ── Avatar de ejecutivo (iniciales) ── */
.pi-ejecutivo-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.pi-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #006d4e, #0d9488);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: .02em;
}
.pi-ejecutivo-header__nombre {
    font-size: 15px;
    font-weight: 700;
    color: #1a202c;
}
.pi-ejecutivo-header__rol {
    font-size: 12px;
    color: #718096;
}

/* ── Iconos junto a etiquetas de datos ── */
.pi-dato-ic {
    width: 13px;
    height: 13px;
    margin-right: 4px;
    vertical-align: -2px;
    color: #006d4e;
}

/* ── Galería: carrusel infinito (marquee) ── */
.pi-galeria-carousel {
    position: relative;
    overflow: hidden;
}
.pi-galeria-carousel::before,
.pi-galeria-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 1;
    pointer-events: none;
}
.pi-galeria-carousel::before {
    left: 0;
    background: linear-gradient(to right, #fff, transparent);
}
.pi-galeria-carousel::after {
    right: 0;
    background: linear-gradient(to left, #fff, transparent);
}
.pi-galeria-track {
    display: flex;
    gap: 12px;
    width: max-content;
    padding: 2px;
    animation: pi-galeria-marquee 35s linear infinite;
}
.pi-galeria-track:hover {
    animation-play-state: paused;
}
@keyframes pi-galeria-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.pi-galeria-slide {
    flex: 0 0 auto;
    width: 240px;
    height: 160px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    padding: 0;
    background: none;
    transition: transform .15s;
}
.pi-galeria-slide:hover { transform: scale(1.02); }
.pi-galeria-slide--static {
    cursor: default;
}
.pi-galeria-slide--static:hover { transform: none; }
.pi-galeria-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
@media (max-width: 640px) {
    .pi-galeria-slide { width: 200px; height: 134px; }
}

/* ── Logo de banco en tarjeta de solicitud ── */
.pi-opp-bank-logo {
    height: 18px;
    width: auto;
    max-width: 60px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 6px;
}

/* ── Variantes de estado en tarjetas de solicitud ── */
.pi-opp-estado--ok      { background: #c6f6d5; color: #276749; }
.pi-opp-estado--warn    { background: #fef3c7; color: #92400e; }
.pi-opp-estado--danger  { background: #fee2e2; color: #991b1b; }
.pi-opp-estado--info    { background: #dbeafe; color: #1e40af; }

/* ── Skeleton de carga (portal/inicio) ── */
.pi-skel-hero {
    height: 150px;
    border-radius: 0;
    margin-bottom: 0;
}
.pi-skel-card {
    flex: 1;
    height: 200px;
    min-width: 0;
}
.pi-skel-section {
    height: 110px;
    margin-bottom: 20px;
}
@media (max-width: 640px) {
    .pi-skel-card { flex: none; width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MÓDULO AGENTES IA — Chat Sidebar
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tortuga (botón flotante del asistente) ── */
.ai-turtle-fab {
    position: fixed;
    bottom: 4px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    z-index: 1000;
    user-select: none;
}
.ai-turtle-imgwrap {
    position: relative;
    width: 80px;
    height: 80px;
    transition: width .3s ease, height .3s ease;
    flex-shrink: 0;
}
.ai-turtle-imgwrap.half {
    width: 40px;
    height: 40px;
}
.ai-turtle-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: 70% 75%;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,.25));
}
.ai-turtle-img.wave {
    animation: aiIdleWave 1.8s ease-in-out infinite;
}
.ai-fab-badge {
    position: absolute;
    top: -2px; right: -2px;
    background: #ef4444;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

/* ── Mensaje de la tortuga ── */
.ai-turtle-message {
    background: #fff;
    border-radius: 16px;
    padding: 10px 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
    font-size: .8rem;
    font-weight: 600;
    color: #1a3a5c;
    max-width: 200px;
    line-height: 1.3;
    animation: aiIdleFadeIn .35s ease-out;
}
@keyframes aiIdleFadeIn {
    from { opacity: 0; transform: translateY(12px) scale(.9); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes aiIdleWave {
    0%        { transform: translateY(0) rotate(0deg); }
    10%       { transform: translateY(-3px) rotate(-12deg); }
    20%       { transform: translateY(0) rotate(10deg); }
    30%       { transform: translateY(-3px) rotate(-10deg); }
    40%       { transform: translateY(0) rotate(8deg); }
    50%       { transform: translateY(-2px) rotate(-4deg); }
    60%, 100% { transform: translateY(0) rotate(0deg); }
}
@media (max-width: 480px) {
    .ai-turtle-fab { right: 16px; bottom: 16px; }
    .ai-turtle-imgwrap { width: 60px; height: 60px; }
    .ai-turtle-imgwrap.half { width: 32px; height: 32px; }
    .ai-turtle-message { font-size: .72rem; max-width: 150px; padding: 8px 12px; }
}

/* ── Panel de chat ── */
.ai-chat-panel {
    position: fixed;
    bottom: 132px;
    right: 24px;
    width: 380px;
    max-height: 560px;
    background: #f3f4f6;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
    display: flex;
    flex-direction: column;
    z-index: 999;
    overflow: hidden;
    animation: aiSlideUp .25s cubic-bezier(.4,0,.2,1);
}
@keyframes aiSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ── */
.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, #006d4e, #00b386);
    border-bottom: 1px solid rgba(0,0,0,.08);
}
.ai-chat-header-info { display: flex; align-items: center; gap: 10px; }
.ai-chat-header-icon { font-size: 1.4rem; color: #d4a843; }
.ai-chat-header-title { font-size: .95rem; font-weight: 700; color: #f8fafc; }
.ai-chat-header-sub   { font-size: .72rem; color: rgba(248,250,252,.5); }
.ai-chat-clear {
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,.6); padding: 4px;
    border-radius: 6px; transition: color .2s, background .2s;
}
.ai-chat-clear:hover { color: #fff; background: rgba(255,255,255,.15); }

/* ── Mensajes ── */
.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,.15) transparent;
}

/* Estado vacío */
.ai-chat-empty { text-align: center; padding: 12px 8px; }
.ai-chat-empty-icon { width: 40px; height: 40px; object-fit: contain; margin-bottom: 8px; }
.ai-chat-empty p { font-size: .82rem; color: #64748b; line-height: 1.5; margin-bottom: 14px; }
.ai-chat-suggestions { display: flex; flex-direction: column; gap: 6px; }
.ai-suggestion {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 7px 14px;
    font-size: .78rem;
    color: #475569;
    cursor: pointer;
    text-align: left;
    transition: background .2s, border-color .2s;
}
.ai-suggestion:hover { background: rgba(0,135,95,.08); border-color: rgba(0,135,95,.4); color: #00513a; }

/* Burbujas */
.ai-msg { display: flex; flex-direction: column; max-width: 85%; }
.ai-msg-user { align-self: flex-end; align-items: flex-end; }
.ai-msg-bot  { align-self: flex-start; align-items: flex-start; }
.ai-msg-agent { font-size: .68rem; color: #00875f; font-weight: 600; margin-bottom: 3px; }
.ai-msg-bubble {
    padding: 9px 13px;
    border-radius: 12px;
    font-size: .82rem;
    line-height: 1.5;
    color: #1e293b;
}
.ai-msg-user .ai-msg-bubble { background: #00875f; color: #fff; border-radius: 12px 12px 2px 12px; }
.ai-msg-bot  .ai-msg-bubble { background: #fff; border-radius: 12px 12px 12px 2px; border: 1px solid #e2e8f0; }
.ai-msg-emoji-tortuga { width: 18px; height: auto; vertical-align: middle; display: inline-block; border-radius: 3px; }
.ai-msg-time { font-size: .65rem; color: #94a3b8; margin-top: 3px; }

/* Typing indicator */
.ai-typing { display: flex; gap: 4px; align-items: center; padding: 12px 14px !important; }
.ai-typing span {
    width: 7px; height: 7px;
    background: #94a3b8;
    border-radius: 50%;
    animation: aiTypingPulse 1.2s infinite;
}
.ai-typing span:nth-child(2) { animation-delay: .2s; }
.ai-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes aiTypingPulse {
    0%, 80%, 100% { opacity: .3; transform: scale(1); }
    40%           { opacity: 1;  transform: scale(1.2); }
}

/* ── Input ── */
.ai-chat-input-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid #e2e8f0;
    background: #e9edf1;
}
.ai-chat-input {
    flex: 1;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: .84rem;
    color: #1e293b;
    resize: none;
    outline: none;
    font-family: inherit;
    max-height: 100px;
    transition: border-color .2s;
}
.ai-chat-input:focus { border-color: rgba(0,135,95,.5); }
.ai-chat-input::placeholder { color: #94a3b8; }
.ai-chat-input:disabled { opacity: .5; }

.ai-chat-send {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #00875f;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background .2s, transform .15s;
    font-size: .9rem;
}
.ai-chat-send:hover:not(.disabled) { background: #00b386; transform: scale(1.05); }
.ai-chat-send.disabled { background: #cbd5e1; cursor: not-allowed; }

.ai-mic-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    border: none;
    color: #64748b;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background .2s, transform .15s;
    font-size: .9rem;
}
.ai-mic-btn:hover:not(:disabled) { background: #cbd5e1; color: #1e293b; }
.ai-mic-btn:disabled { opacity: .4; cursor: not-allowed; }
.ai-mic-btn.recording {
    background: #dc2626;
    color: #fff;
    animation: ai-mic-pulse 1.2s ease-in-out infinite;
}
.ai-mic-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #fff;
    display: block;
}
@keyframes ai-mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.5); }
    50%       { box-shadow: 0 0 0 6px rgba(220,38,38,0); }
}

/* Responsive: en móvil ocupa todo el ancho */
@media (max-width: 480px) {
    .ai-chat-panel { width: calc(100vw - 32px); right: 16px; bottom: 80px; }
}

/* ============================================================
   DASHBOARD AGENTES IA — /admin/agentes-ia
   ============================================================ */
.ai-dashboard {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Encabezado */
.ai-dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    height: fit-content;
    margin-top: 12px;
    margin-bottom: 24px;
    padding: 20px 24px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #fcfcfd 100%);
    border: 1px solid #e5e7eb;
    color: #334155;
    box-shadow: 0 1px 3px rgba(16,24,40,0.04);
}
.ai-dash-title { display: flex; align-items: center; gap: 14px; }
.ai-dash-title-icon {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 12px;
    background: linear-gradient(135deg, #0064a6 0%, #4da3d9 100%);
    color: #fff;
    font-size: 1.3rem; flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,100,166,.25);
}
.ai-dash-header h2 { margin: 0; font-size: 1.35rem; font-weight: 700; color: #334155; }
.ai-dash-subtitle { margin: 2px 0 0; font-size: 0.8rem; color: #64748b; }

.soc-opportunity-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex: 1 1 auto;
}
.soc-opportunity-header-right .ai-dash-controls {
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.ai-dash-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* SfDropDownList dentro de ai-dash-controls: el icono de despliegue debe quedar pegado al borde derecho */
.ai-dash-controls .e-ddl.e-input-group {
    display: inline-flex;
    align-items: center;
}
.ai-dash-controls .e-ddl.e-input-group input.e-dropdownlist {
    flex: 1 1 auto;
    min-width: 0;
}
.ai-dash-controls .e-ddl.e-input-group .e-ddl-icon {
    position: static;
    flex: 0 0 auto;
    margin-top: 0;
}

.soc-metas-controls { flex-direction: column; align-items: flex-end; gap: 8px; }
.soc-metas-controls-row { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; }

.ai-dash-broker-select {
    padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px;
    background: #fff; font-size: 0.85rem; color: #334155;
    cursor: pointer; min-width: 200px;
    -webkit-appearance: none; appearance: none;
}
.ai-dash-broker-select option { color: #1f2937; }
.ai-dash-broker-select:focus { outline: none; border-color: #0064a6; box-shadow: 0 0 0 2px rgba(0,100,166,0.15); }
.ai-dash-date-field { display: flex; align-items: center; gap: 8px; }
.ai-dash-date-field label { font-size: 0.8rem; font-weight: 600; color: #64748b; white-space: nowrap; }
.ai-dash-date-input {
    padding: 7px 12px; border: 1px solid #d1d5db; border-radius: 8px;
    background: #fff; font-size: 0.85rem; color: #334155;
}
.ai-dash-date-input:focus { outline: none; border-color: #0064a6; box-shadow: 0 0 0 2px rgba(0,100,166,0.15); }
.ai-dash-period { display: flex; gap: 6px; background: #fff; border: 1px solid #d1d5db; padding: 4px; border-radius: 10px; }
.ai-dash-btn { padding: 6px 14px; border: none; border-radius: 7px; background: transparent; cursor: pointer; font-size: 0.85rem; font-weight: 500; color: #64748b; transition: background 0.15s, color 0.15s; }
.ai-dash-btn:hover { background: #f1f5f9; color: #334155; }
.ai-dash-btn.active { background: #0064a6; color: #fff; font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,0.15); }
.ai-dash-loading { padding: 64px; text-align: center; color: #6b7280; font-size: 0.95rem; }
.ai-dash-loading::before {
    content: ''; display: block; margin: 0 auto 14px; width: 36px; height: 36px;
    border: 3px solid #e5e7eb; border-top-color: #0064a6; border-radius: 50%;
    animation: ai-dash-spin 0.8s linear infinite;
}
@keyframes ai-dash-spin { to { transform: rotate(360deg); } }

/* KPIs */
.ai-dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.ai-kpi {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    padding: 18px 20px; display: flex; align-items: center; gap: 14px;
    box-shadow: 0 1px 3px rgba(16,24,40,0.04);
    transition: box-shadow 0.15s, transform 0.15s;
}
.ai-kpi:hover { box-shadow: 0 4px 12px rgba(16,24,40,0.08); transform: translateY(-1px); }
.ai-kpi-icon {
    flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
    background: rgba(0,100,166,0.10); color: #0064a6;
}
.ai-kpi-icon--green  { background: rgba(0,109,78,0.10); color: #006d4e; }
.ai-kpi-icon--amber  { background: rgba(217,119,6,0.10); color: #d97706; }
.ai-kpi-icon--red    { background: rgba(220,38,38,0.10); color: #dc2626; }
.ai-kpi-icon--purple { background: rgba(99,102,241,0.10); color: #6366f1; }
.ai-kpi-body { min-width: 0; }
.ai-kpi-value { font-size: 1.6rem; font-weight: 700; color: #111827; line-height: 1.15; }
.ai-kpi-label { font-size: 0.78rem; color: #6b7280; margin-top: 2px; }
.ai-kpi-warn .ai-kpi-value { color: #dc2626; }

/* Secciones */
.ai-dash-section {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    padding: 20px 22px; margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(16,24,40,0.04);
}
.ai-dash-section h3 {
    margin: 0 0 16px; font-size: 1rem; font-weight: 700; color: #1f2937;
    display: flex; align-items: center; gap: 8px;
}
.ai-dash-section h3 i { color: #0064a6; font-size: 1.05rem; }

/* Encabezado de sección con acento de color (fondo gris claro) */
.ai-dash-section-header-accent {
    display: flex; align-items: center; gap: 8px;
    margin: -20px -22px 16px -22px;
    padding: 14px 22px;
    background: #f1f5f9;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 14px 14px 0 0;
}
.ai-dash-section-header-accent h3 {
    margin: 0; color: #334155;
}
.ai-dash-section-header-accent h3 i { color: #0064a6; }

/* Tabla */
.ai-dash-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.ai-dash-table th {
    background: #f8fafc; padding: 10px 14px; text-align: left; font-weight: 600;
    color: #475569; border-bottom: 1px solid #e5e7eb;
    text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.04em;
}
.ai-dash-table th:first-child { border-top-left-radius: 8px; }
.ai-dash-table th:last-child { border-top-right-radius: 8px; }
.ai-dash-table td { padding: 11px 14px; border-bottom: 1px solid #f1f5f9; color: #374151; vertical-align: middle; }
.ai-dash-table tr:last-child td { border-bottom: none; }
.ai-dash-table tr:hover td { background: #f0f7ff; }

/* Agent badges */
.ai-agent-badge { padding: 4px 11px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; }
.ai-agent-plataforma  { background: #dbeafe; color: #1e40af; }
.ai-agent-negocio     { background: #dbeafe; color: #1e40af; }
.ai-agent-procesos    { background: #d1fae5; color: #065f46; }
.ai-agent-broker      { background: #fef3c7; color: #92400e; }
.ai-agent-cliente     { background: #fce7f3; color: #9d174d; }
.ai-agent-importador  { background: #e0f2fe; color: #075985; }

.ai-escalacion-badge { background: #fee2e2; color: #dc2626; padding: 4px 11px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; }
.ai-ok-badge { background: #d1fae5; color: #065f46; padding: 4px 11px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; }
.ai-msg-preview { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #6b7280; font-size: 0.8rem; }
.ai-msg-dialog-content { white-space: pre-wrap; word-break: break-word; max-height: 400px; overflow-y: auto; font-size: 0.9rem; color: #334155; line-height: 1.5; }
.ai-msg-copiado { margin-top: 10px; color: #15803d; font-size: 0.85rem; font-weight: 600; }
.ai-voyage-summary { display: flex; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.ai-kpi--sm { padding: 12px 18px; }
.ai-kpi--sm .ai-kpi-value { font-size: 1.3rem; }
.ai-dash-empty { color: #6b7280; font-size: 0.875rem; padding: 0.5rem 0; }
.ai-voyage-op-badge { background: #e0f2fe; color: #075985; padding: 3px 11px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; }

/* Grid de conversaciones recientes (Syncfusion) */
.ai-dash-grid.e-grid { border-radius: 10px; overflow: hidden; border: 1px solid #e5e7eb; font-size: 0.85rem; }
.ai-dash-grid.e-grid .e-gridheader {
    background: #f8fafc; border-bottom: 1px solid #e5e7eb;
}
.ai-dash-grid.e-grid .e-headercell {
    background: #f8fafc; color: #475569; font-weight: 600;
    text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.04em;
}
.ai-dash-grid.e-grid .e-rowcell { color: #374151; vertical-align: middle; }
.ai-dash-grid.e-grid .e-row:hover .e-rowcell { background: #f0f7ff; }
.ai-dash-grid.e-grid .e-pager { background: #f8fafc; border-top: 1px solid #e5e7eb; }
.ai-dash-grid.e-grid .e-pager .e-currentitem,
.ai-dash-grid.e-grid .e-pager .e-link.e-currentitem,
.ai-dash-grid.e-grid .e-pager .e-numericitem.e-currentitem {
    background-color: #0064a6 !important; color: #fff !important; border-radius: 6px;
}

/* ============================================================
   MÓDULO EXPERIENCIAS BROKER — /experiencias
   ============================================================ */
.experiencias-module .soc-contact-toolbar {
    display: flex; align-items: center; padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb; background: #fff;
}

.experiencias-info-banner {
    background: #f0f0ff; border: 1px solid #c7d2fe;
    border-radius: 8px; padding: 10px 16px;
    font-size: 0.85rem; color: #4338ca;
    margin-bottom: 16px; display: flex; align-items: center;
}

/* Dropdown de filtro de broker en la toolbar */
.exp-broker-filter.e-ddl { min-width: 220px; max-width: 320px; }

.experiencias-filtros {
    display: flex; gap: 12px; flex-wrap: wrap;
    margin-bottom: 16px;
}
.experiencias-filtros .e-input-group { min-width: 200px; }

/* Contadores */
.experiencias-counters {
    display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px;
}
.exp-counter {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 12px 20px; text-align: center; min-width: 90px;
}
.exp-counter__num { display: block; font-size: 1.6rem; font-weight: 700; }
.exp-counter__label { font-size: 0.75rem; color: #6b7280; }
.exp-counter--total    .exp-counter__num { color: #6366f1; }
.exp-counter--aprobado .exp-counter__num { color: #059669; }
.exp-counter--rechazado .exp-counter__num { color: #dc2626; }
.exp-counter--proceso  .exp-counter__num { color: #d97706; }
.exp-counter--pending  .exp-counter__num { color: #d97706; }
.exp-counter--pending  .exp-counter__label { color: #92400e; }

/* Estado activo (filtro aplicado) */
.exp-counter--active { box-shadow: 0 0 0 2px currentColor; }
.exp-counter--total.exp-counter--active    { border-color: #6366f1; background: #eef2ff; box-shadow: 0 0 0 2px #6366f1; }
.exp-counter--aprobado.exp-counter--active { border-color: #059669; background: #ecfdf5; box-shadow: 0 0 0 2px #059669; }
.exp-counter--pending.exp-counter--active  { border-color: #d97706; background: #fffbeb; box-shadow: 0 0 0 2px #d97706; }
.exp-counter--rechazado.exp-counter--active{ border-color: #dc2626; background: #fef2f2; box-shadow: 0 0 0 2px #dc2626; }
.exp-counter:hover { filter: brightness(0.97); }

/* Grid de tarjetas */
.experiencias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 16px;
}

.exp-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    overflow: hidden; display: flex; flex-direction: column;
    border-left: 4px solid #e5e7eb;
    transition: box-shadow .2s;
}
.exp-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.exp-card--aprobado { border-left-color: #059669; }
.exp-card--rechazado { border-left-color: #dc2626; }
.exp-card--enproceso { border-left-color: #d97706; }
.exp-card--cancelado { border-left-color: #6b7280; }
.exp-card--pendientedocumentacion { border-left-color: #0064a6; }
/* Estados de revisión */
.exp-card--pending { background: #fffef0; border: 1px solid #fcd34d; border-left: 4px solid #f59e0b; }
.exp-card--rechazada { opacity: .65; }

/* Badge de estado de revisión */
.exp-badge--pending-estado { background: #fef3c7; color: #92400e; }
.exp-badge--rechazada-estado { background: #fee2e2; color: #b91c1c; }

/* Banner de pendientes de revisión */
.experiencias-revision-banner {
    background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px;
    padding: 10px 16px; margin-bottom: 16px;
    font-size: 0.875rem; color: #78350f;
    display: flex; align-items: center; gap: 4px;
    cursor: pointer; transition: background .15s;
}
.experiencias-revision-banner:hover { background: #fef3c7; }
.exp-banner-link { color: #d97706; font-weight: 600; margin-left: auto; white-space: nowrap; }

/* Badge en el título de la página */
.exp-pending-badge {
    display: inline-block; background: #f59e0b; color: #fff;
    font-size: 0.7rem; font-weight: 700; padding: 2px 10px;
    border-radius: 20px; margin-left: 10px; vertical-align: middle;
    letter-spacing: .03em; cursor: default;
}

/* Acciones de revisión en el footer de la tarjeta */
.exp-revision-actions {
    display: flex; gap: 6px; margin-left: auto;
}
.exp-btn-aprobar { color: #065f46 !important; border-color: #059669 !important; background: #d1fae5 !important; }
.exp-btn-aprobar:hover { background: #a7f3d0 !important; }
.exp-btn-rechazar { color: #dc2626 !important; }

.exp-card-header {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    padding: 12px 14px; border-bottom: 1px solid #f3f4f6;
    background: #fafafa;
}

.exp-badge {
    padding: 2px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 600;
}
.exp-badge--cat { background: #ede9fe; color: #5b21b6; }
.exp-badge--banco { background: #dbeafe; color: #1e40af; }
.exp-badge--origen { background: #f1f5f9; color: #475569; }
.exp-badge--frec-muycomun { background: #dcfce7; color: #166534; }
.exp-badge--frec-comun { background: #e0f2fe; color: #075985; }
.exp-badge--frec-pococomun { background: #fef9c3; color: #854d0e; }
.exp-badge--frec-excepcion { background: #fee2e2; color: #991b1b; }
.exp-badge--aprobado { background: #d1fae5; color: #065f46; }
.exp-badge--rechazado { background: #fee2e2; color: #dc2626; }
.exp-badge--enproceso { background: #fef3c7; color: #92400e; }
.exp-badge--cancelado { background: #f3f4f6; color: #4b5563; }
.exp-badge--pendientedocumentacion { background: #ede9fe; color: #0064a6; }

.exp-card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 10px; }

.exp-section-label { font-size: 0.72rem; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.exp-section-text { font-size: 0.875rem; color: #1f2937; line-height: 1.5; }
.exp-section-text--notes { color: #6b7280; font-style: italic; font-size: 0.82rem; }

.exp-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.exp-tag { background: #f3f4f6; color: #374151; padding: 2px 9px; border-radius: 20px; font-size: 0.75rem; }

.exp-card-footer {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-top: 1px solid #f3f4f6;
    font-size: 0.75rem; color: #9ca3af; background: #fafafa;
}

/* Formulario dialog */
.exp-form { display: flex; flex-direction: column; gap: 14px; padding: 4px 0; }
.exp-form-row { display: flex; flex-direction: column; gap: 4px; }
.exp-form-row label { font-size: 0.82rem; font-weight: 600; color: #374151; }
.exp-form-row--2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.exp-form-hint { font-size: 0.75rem; color: #9ca3af; }

.soc-empty { text-align: center; padding: 48px 24px; color: #9ca3af; display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* =====================================================================
   IMPORTAR HISTORIAL DE PEDIDOS
   ===================================================================== */
.import-hist-page { max-width: 1000px; margin: 0 auto; padding: 24px 16px; }
.import-hist-header { margin-bottom: 24px; }
.import-hist-header h2 { font-size: 1.4rem; font-weight: 700; color: #111827; margin: 0 0 6px; }
.import-hist-desc { color: #6b7280; font-size: 0.9rem; margin: 0; }

.import-hist-step { margin-bottom: 18px; }
.import-hist-label { display: block; font-weight: 600; font-size: 0.88rem; color: #374151; margin-bottom: 6px; }
.import-hist-select { width: 100%; max-width: 480px; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 0.9rem; color: #1f2937; background: #fff; }
.import-hist-select:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99,102,241,.15); }

.import-hist-loading { padding: 20px 0; color: #6b7280; font-size: 0.9rem; }
.import-hist-loading-inline { color: #6b7280; font-size: 0.88rem; }
.import-hist-empty { color: #9ca3af; font-size: 0.88rem; }
.import-hist-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; border-radius: 8px; padding: 12px 16px; font-size: 0.88rem; margin-bottom: 16px; }

/* Tabla de pedidos disponibles */
.import-hist-table-section { margin-top: 8px; }

.import-hist-table-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px;
    margin-bottom: 12px;
}
.import-hist-table-counts { display: flex; gap: 8px; flex-wrap: wrap; }
.import-hist-badge {
    padding: 3px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 600;
}
.import-hist-badge--total { background: #f3f4f6; color: #374151; }
.import-hist-badge--new   { background: #dbeafe; color: #1e40af; }
.import-hist-badge--done  { background: #d1fae5; color: #065f46; }

.import-hist-table-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.import-hist-btn-link {
    background: none; border: none; color: #6366f1; font-size: 0.84rem;
    cursor: pointer; text-decoration: underline; padding: 0;
}
.import-hist-btn-link:hover { color: #4338ca; }

.import-hist-btn {
    padding: 8px 20px; background: #6366f1; color: #fff; border: none;
    border-radius: 8px; font-size: 0.88rem; font-weight: 600; cursor: pointer;
    transition: background .15s;
}
.import-hist-btn:hover:not(:disabled) { background: #4f46e5; }
.import-hist-btn:disabled { opacity: .5; cursor: not-allowed; }
.import-hist-btn--secondary { background: #e5e7eb; color: #374151; }
.import-hist-btn--secondary:hover:not(:disabled) { background: #d1d5db; }

.import-hist-table-wrap { overflow-x: auto; border: 1px solid #e5e7eb; border-radius: 10px; }
.import-hist-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.import-hist-table thead { background: #f9fafb; }
.import-hist-table th {
    padding: 10px 12px; text-align: left; font-weight: 600; font-size: 0.78rem;
    color: #6b7280; text-transform: uppercase; letter-spacing: .04em;
    border-bottom: 1px solid #e5e7eb;
}
.import-hist-th-check { width: 36px; }
.import-hist-table td { padding: 9px 12px; border-bottom: 1px solid #f3f4f6; color: #1f2937; vertical-align: middle; }
.import-hist-table tbody tr:last-child td { border-bottom: none; }
.import-hist-table tbody tr:hover { background: #f9fafb; }
.import-hist-row--done { opacity: .65; }
.import-hist-td-check { width: 36px; }
.import-hist-td-nopedido { font-weight: 600; color: #374151; white-space: nowrap; }

.import-hist-tag {
    display: inline-block; padding: 2px 10px; border-radius: 20px;
    font-size: 0.74rem; font-weight: 600;
}
.import-hist-tag--new  { background: #dbeafe; color: #1e40af; }
.import-hist-tag--done { background: #d1fae5; color: #065f46; }

/* Barra de progreso */
.import-hist-progress-wrap { margin-top: 16px; }
.import-hist-progress-bar { height: 10px; background: #e5e7eb; border-radius: 99px; overflow: hidden; margin-bottom: 8px; }
.import-hist-progress-fill { height: 100%; background: #6366f1; border-radius: 99px; transition: width .3s; }
.import-hist-progress-label { font-size: 0.88rem; color: #374151; font-weight: 600; }
.import-hist-progress-note { font-size: 0.82rem; color: #9ca3af; margin-top: 6px; }

/* Resultado */
.import-hist-resultado { margin-top: 20px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; padding: 24px; }
.import-hist-resultado h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 16px; color: #111827; }
.import-hist-result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin-bottom: 16px; }
.import-hist-result-item { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px; text-align: center; display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; color: #6b7280; }
.import-hist-result-num { font-size: 1.6rem; font-weight: 700; color: #1f2937; }
.import-hist-result-item--ok .import-hist-result-num { color: #059669; }
.import-hist-result-item--error .import-hist-result-num { color: #dc2626; }
.import-hist-result-note { font-size: 0.88rem; color: #374151; margin: 0 0 12px; }
.import-hist-result-note a { color: #6366f1; }
.import-hist-detalles { font-size: 0.84rem; color: #6b7280; margin-bottom: 16px; }
.import-hist-detalles summary { cursor: pointer; font-weight: 600; color: #374151; }
.import-hist-detalles ul { margin: 8px 0 0 16px; padding: 0; }
.import-hist-detalles li { margin-bottom: 4px; }

/* =====================================================================
   PAGINACIÓN — /experiencias
   ===================================================================== */
.exp-paginacion {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 4px;
    margin-top: 24px; padding: 16px 0;
}
.exp-pag-btn {
    min-width: 34px; height: 34px; padding: 0 8px;
    border: 1px solid #e5e7eb; border-radius: 7px;
    background: #fff; color: #374151;
    font-size: 0.875rem; font-weight: 500; cursor: pointer;
    transition: background .12s, border-color .12s;
    display: flex; align-items: center; justify-content: center;
}
.exp-pag-btn:hover:not(:disabled) { background: #f3f4f6; border-color: #d1d5db; }
.exp-pag-btn:disabled { opacity: .4; cursor: not-allowed; }
.exp-pag-btn--active {
    background: #6366f1 !important; color: #fff !important;
    border-color: #6366f1 !important; font-weight: 700;
}
.exp-pag-ellipsis {
    min-width: 28px; text-align: center;
    color: #9ca3af; font-size: 0.9rem; line-height: 34px;
}
.exp-pag-info {
    margin-left: 10px; font-size: 0.8rem; color: #9ca3af;
}

/* ============================================================
   RESPONSIVE GLOBAL — wrapper para tablas con scroll horizontal
   ============================================================ */
.table-responsive-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.soc-rep-asesor-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 768px) {
    /* Tablas: scroll horizontal en lugar de desbordarse */
    .tickets-table     { min-width: 620px; }
    .soc-historico-table { min-width: 480px; }
    .soc-docs-table    { min-width: 700px; }
    .ai-dash-table     { min-width: 520px; }

    /* Selectes con width fijo en reportes y metas */
    .soc-historico-grid-wrap select,
    .soc-metas-wrap select,
    .soc-rep-filters select {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    /* Filtros de reportes en columna */
    .soc-historico-filtros,
    .soc-rep-filters,
    .soc-metas-filtros {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .soc-historico-filtros select,
    .soc-rep-filters select,
    .soc-metas-filtros select {
        width: 100% !important;
    }

    /* Dashboard IA */
    .ai-dashboard { padding: 12px; }
    .ai-dash-header { padding: 16px; flex-direction: column; align-items: stretch; }
    .ai-dash-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
    .ai-kpi { padding: 14px 16px; }
    .ai-kpi-icon { width: 36px; height: 36px; font-size: 1rem; }
    .ai-kpi-value { font-size: 1.3rem; }
    .ai-dash-section { padding: 14px; }
    .ai-dash-controls { flex-direction: column; align-items: stretch; }
    .ai-dash-broker-select { min-width: unset; width: 100%; }
    .ai-dash-period { justify-content: center; }

    /* Experiencias */
    .exp-filtros { flex-direction: column; gap: 8px; }
    .exp-filtros select,
    .exp-filtros input { width: 100% !important; }
    .exp-contadores { gap: 8px; }
    .exp-contador { padding: 10px 14px; }

    /* Importar historial */
    .import-hist-table-toolbar { flex-direction: column; gap: 10px; }
    .import-hist-table-actions { flex-wrap: wrap; justify-content: flex-start; }

    /* Admin — páginas de catálogos */
    .ai-voyage-summary { flex-direction: column; }
}

@media (max-width: 480px) {
    /* KPIs en 2 columnas ajustadas */
    .ai-dash-kpis { display: grid; grid-template-columns: 1fr 1fr; }
    .ai-kpi { min-width: unset; }

    /* Ocultar columnas menos importantes en tickets */
    .tickets-table th:nth-child(5),
    .tickets-table td:nth-child(5) { display: none; }
}

/* ── Formulario Agregar Personal (sin Syncfusion) ─────────────────────────── */
.add-staff-form {
    padding: 4px 0;
}
.asf-field {
    margin-bottom: 14px;
}
.asf-label {
    display: block;
    font-size: 12px;
    color: rgba(0,0,0,0.6);
    margin-bottom: 4px;
    font-weight: 500;
}
.asf-input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(0,0,0,0.23);
    border-radius: 4px;
    font-size: 14px;
    color: rgba(0,0,0,0.87);
    background: #fff;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}
.asf-input:focus {
    border-color: #1a7a4a;
    box-shadow: 0 0 0 2px rgba(26,122,74,0.15);
}
.asf-input.asf-disabled,
.asf-input:disabled {
    background: #f5f5f5;
    color: rgba(0,0,0,0.45);
    cursor: default;
}
.asf-select {
    height: 38px;
    appearance: auto;
    cursor: pointer;
}

/* ── Tutorial / Intro.js ─────────────────────────────────────── */
.soc-tour-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 1200;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #006d4e;
    color: #fff;
    border: none;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.soc-tour-btn:hover { background: #004f38; transform: scale(1.08); }

/* Intro.js: z-index forzado sobre Syncfusion y header */
.introjs-overlay              { z-index:  999990 !important; }
.introjs-helperLayer          { z-index:  999991 !important; }
/* Tooltip siempre al frente — por encima de cualquier componente Syncfusion */
.introjs-tooltipReferenceLayer { z-index: 2147483647 !important; }
.introjs-tooltip               { z-index: 2147483647 !important; }
.introjs-fixedTooltip          { z-index: 2147483647 !important; }

/* Mientras el tutorial está activo, el overlay de Syncfusion no intercepta clics */
body.soc-tutorial-active .e-dlg-overlay { pointer-events: none !important; }

/* Durante un paso con diálogo abierto, desactivar TAMBIÉN el overlay del propio intro.js
   para que los botones del tooltip sean siempre clickeables */
body.soc-tutorial-dialog-open .introjs-overlay { pointer-events: none !important; }
body.soc-tutorial-dialog-open .e-dlg-overlay { pointer-events: none !important; }

.soc-tour-tooltip.introjs-tooltip {
    min-width: 340px;
    max-width: 480px;
    width: 480px;
    border-radius: 10px;
    font-family: inherit;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}
.soc-tour-tooltip .introjs-tooltiptext { font-size: 14px; line-height: 1.6; padding: 8px 4px; }
.soc-tour-tooltip .introjs-button {
    background: #006d4e;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 6px 14px;
    font-size: 13px;
    text-shadow: none;
}
.soc-tour-tooltip .introjs-button:hover { background: #004f38; }
.soc-tour-tooltip .introjs-skipbutton { color: #888; font-size: 18px; }
.introjs-progressbar { background: #006d4e !important; }
.introjs-tooltip { min-width: 340px !important; max-width: 480px !important; }

/* ── Módulo: Sesiones Activas (/admin/sesiones-activas) ─────────────────── */
.sa-header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}
.sa-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 8px 20px;
    min-width: 80px;
}
.sa-counter-total {
    background: #f5f5f5;
    border-color: #bdbdbd;
}
.sa-counter-number {
    font-size: 28px;
    font-weight: 700;
    color: #1a7a4a;
    line-height: 1;
}
.sa-counter-total .sa-counter-number {
    color: #555;
}
.sa-counter-label {
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sa-empty {
    padding: 48px;
    text-align: center;
    color: #999;
    font-size: 15px;
}
.sa-table-wrapper {
    overflow-x: auto;
    margin-top: 16px;
}
.sa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.sa-table th {
    background: #f9f9f9;
    border-bottom: 2px solid #e0e0e0;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}
.sa-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.sa-table tr:hover td {
    background: #fafafa;
}
.sa-row-offline td {
    color: #aaa;
}
.sa-status-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 7px;
    vertical-align: middle;
}
.sa-dot-on {
    background: #4caf50;
    box-shadow: 0 0 4px #4caf5088;
}
.sa-dot-off {
    background: #bdbdbd;
}
.sa-role-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 12px;
    font-weight: 500;
}
.sa-page-cell {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1a7a4a;
    font-family: monospace;
    font-size: 12px;
}

/* ── Gráfico de uso por broker (/admin/uso) ─────────────────────────────── */
.ubr-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ubr-row {
    display: grid;
    grid-template-columns: 180px 1fr 72px 82px 110px;
    align-items: center;
    gap: 10px;
}
.ubr-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}
.ubr-bar-wrap {
    background: #f0f0f0;
    border-radius: 4px;
    height: 22px;
    overflow: hidden;
}
.ubr-bar {
    height: 100%;
    background: linear-gradient(90deg, #1a7a4a, #34a869);
    border-radius: 4px;
    min-width: 4px;
    transition: width 0.4s ease;
}
.ubr-count {
    font-size: 13px;
    font-weight: 700;
    color: #1a7a4a;
    text-align: right;
    white-space: nowrap;
}
/* ── Botones de ordenación en tab Broker ── */
.ubr-sort-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.ubr-sort-label {
    font-size: 12px;
    color: #888;
    margin-right: 2px;
}
.ubr-sort-btn {
    padding: 4px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 20px;
    background: #fff;
    color: #555;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.ubr-sort-btn:hover {
    border-color: #1a7a4a;
    color: #1a7a4a;
}
.ubr-sort-btn--active          { background: #f0fdf4; font-weight: 700; }
.ubr-sort-btn--active.ubr-sort-btn--acciones  { border-color: #1a7a4a; color: #1a7a4a; }
.ubr-sort-btn--active.ubr-sort-btn--contactos { border-color: #2563eb; color: #2563eb; background: #eff6ff; }
.ubr-sort-btn--active.ubr-sort-btn--opps      { border-color: #7c3aed; color: #7c3aed; background: #f5f3ff; }
.ubr-sort-arrow {
    display: inline-block;
    margin-left: 4px;
    font-size: 11px;
    vertical-align: middle;
    line-height: 1;
}

/* chips de stat (acciones / contactos / oportunidades) */
.ubr-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
.ubr-stat-value {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.2;
}
.ubr-stat-label {
    font-size: 10px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.ubr-stat--acciones .ubr-stat-value  { color: #1a7a4a; }
.ubr-stat--contactos .ubr-stat-value  { color: #2563eb; }
.ubr-stat--opps .ubr-stat-value       { color: #7c3aed; }
.ubr-stat--interactive {
    cursor: pointer;
    border-radius: 6px;
    padding: 2px 4px;
    transition: background 0.15s;
}
.ubr-stat--interactive:hover { background: rgba(0,0,0,0.06); }

@media (max-width: 700px) {
    .ubr-row {
        grid-template-columns: 110px 1fr 52px;
    }
    .ubr-stat--contactos,
    .ubr-stat--opps {
        display: none;
    }
}

/* ── Fix overflow en grid de cards (/admin/uso pestaña Detalle) ─────────── */
.ur-detalle-grid > * {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ── Pestañas UsageReport (/admin/uso) ──────────────────────────────────── */
.ur-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e0e0e0;
    margin-top: 1.25rem;
}
.ur-tab {
    padding: 9px 22px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    border-radius: 4px 4px 0 0;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.ur-tab:hover {
    color: #1a7a4a;
    background: #f0faf4;
}
.ur-tab--active {
    color: #1a7a4a;
    border-bottom-color: #1a7a4a;
    background: #f0faf4;
    font-weight: 600;
}

/* ── Modal detalle de broker (/admin/uso pestaña Broker) ────────────────── */
.ubr-row--clickable {
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
}
.ubr-row--clickable:hover .ubr-bar {
    filter: brightness(1.12);
}
.ubr-row--clickable:hover .ubr-name,
.ubr-row--clickable:hover .ubr-stat-value {
    color: #145f39;
}
.bm-modal {
    max-width: 780px !important;
    width: 96vw !important;
}
.bm-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e8e8e8;
}
.bm-user-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 4px;
}
.bm-user-table th {
    background: #f9f9f9;
    padding: 7px 10px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #e0e0e0;
}
.bm-user-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.bm-username {
    font-weight: 500;
    white-space: nowrap;
}
.bm-minichart-cell {
    width: 100%;
}
.bm-minichart {
    display: flex;
    gap: 2px;
    height: 18px;
}
.bm-minichart-cell-inner {
    flex: 1;
    border-radius: 2px;
    min-width: 6px;
}
.bm-minichart-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #aaa;
    margin-top: 2px;
    padding: 0 1px;
}
.bm-hour-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.bm-hour-block {
    background: #f9f9f9;
    border: 1px solid #ebebeb;
    border-radius: 6px;
    padding: 8px 12px;
    min-width: 140px;
    flex: 1 1 140px;
    max-width: 220px;
}
.bm-hour-label {
    font-size: 12px;
    font-weight: 700;
    color: #1a7a4a;
    margin-bottom: 6px;
}
.bm-hour-user {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    padding: 2px 0;
    gap: 8px;
}
.bm-hour-uname {
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
    flex: 1;
}
.bm-hour-ucount {
    font-weight: 700;
    color: #1a7a4a;
    white-space: nowrap;
}
.bm-hour-detalle-btn {
    border: 1px solid #c7e8d4;
    background: #f0fbf5;
    color: #1a7a4a;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4;
}
.bm-hour-detalle-btn:hover {
    background: #1a7a4a;
    color: #fff;
    border-color: #1a7a4a;
}

/* ── Agrupación por día en modal de broker ──────────────────────────────── */
.bm-day-block {
    margin-bottom: 18px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}
.bm-day-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: #f4f6f8;
    border-bottom: 1px solid #e0e0e0;
}
.bm-day-dow {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    min-width: 28px;
}
.bm-day-date {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    flex: 1;
}
.bm-day-total {
    font-size: 12px;
    color: #1a7a4a;
    font-weight: 600;
    background: #e8f5ee;
    border-radius: 10px;
    padding: 2px 9px;
}
.bm-day-block .bm-hour-grid {
    padding: 10px 12px;
    background: #fff;
}

/* ── Botón PDF dentro del modal de broker ───────────────────────────────── */
.bm-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border: 1.5px solid #1a7a4a;
    border-radius: 6px;
    background: #fff;
    color: #1a7a4a;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.bm-pdf-btn:hover {
    background: #1a7a4a;
    color: #fff;
}
.bm-pdf-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

/* ─── RouteGuard: Acceso denegado ─────────────────────────────────────────── */
.soc-access-denied {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 16px;
    text-align: center;
    color: #555;
}
.soc-access-denied-icon {
    font-size: 56px;
    color: #c0392b;
    opacity: 0.7;
}
.soc-access-denied-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #333;
}
.soc-access-denied-msg {
    font-size: 15px;
    margin: 0;
}


/* ─── Módulo Tutoriales ───────────────────────────────────────────────────── */

/* ── Variables de color compartidas ── */
:root {
    --tut-green: #006d4e;
    --tut-green-light: rgba(0,109,78,0.08);
    --tut-danger: #c0392b;
    --tut-gray-bg: #f4f6f9;
    --tut-border: #dce1e8;
    --tut-text: #2c3e50;
    --tut-text-muted: #7f8c8d;
}

/* ── Página de listado ── */
.crm-tutorials-list-page {
    padding: 28px 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.crm-tut-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.crm-tut-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--tut-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.crm-tut-subtitle {
    color: var(--tut-text-muted);
    font-size: 14px;
    margin: 4px 0 0;
}

/* ── Filtros ── */
.crm-tut-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.crm-tut-search {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid var(--tut-border);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}
.crm-tut-search:focus { border-color: var(--tut-green); }

.crm-tut-select {
    padding: 8px 12px;
    border: 1px solid var(--tut-border);
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    outline: none;
    cursor: pointer;
}

/* ── Grid de tarjetas ── */
.crm-tut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.crm-tut-card {
    background: #fff;
    border: 1px solid var(--tut-border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.15s;
}
.crm-tut-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.crm-tut-card-inactivo { opacity: 0.65; }

.crm-tut-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--tut-gray-bg);
    border-bottom: 1px solid var(--tut-border);
    gap: 8px;
}

.crm-tut-card-badge-pag {
    font-size: 12px;
    color: var(--tut-text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.crm-tut-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.crm-tut-badge-activo  { background: #e8f8f2; color: #006d4e; }
.crm-tut-badge-inactivo { background: #f8e8e8; color: #c0392b; }

.crm-tut-card-body { padding: 14px; flex: 1; }

.crm-tut-card-nombre {
    font-size: 15px;
    font-weight: 700;
    color: var(--tut-text);
    margin: 0 0 6px;
}

.crm-tut-card-desc {
    font-size: 13px;
    color: var(--tut-text-muted);
    margin: 0 0 10px;
    line-height: 1.4;
}

.crm-tut-card-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--tut-text-muted);
    flex-wrap: wrap;
}
.crm-tut-card-meta span { display: flex; align-items: center; gap: 4px; }

.crm-tut-card-actions {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid var(--tut-border);
    background: var(--tut-gray-bg);
}

/* ── Botones ── */
.crm-tut-btn-primary {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--tut-green); color: #fff;
    border: none; border-radius: 6px;
    padding: 8px 18px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: background 0.15s, opacity 0.15s;
}
.crm-tut-btn-primary:hover:not(:disabled) { background: #005a40; }
.crm-tut-btn-primary:disabled { opacity: 0.6; cursor: default; }

.crm-tut-btn-secondary {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff; color: var(--tut-text);
    border: 1px solid var(--tut-border); border-radius: 6px;
    padding: 8px 16px; font-size: 14px; font-weight: 500;
    cursor: pointer; transition: background 0.15s;
}
.crm-tut-btn-secondary:hover { background: var(--tut-gray-bg); }

.crm-tut-btn-preview {
    display: inline-flex; align-items: center; gap: 6px;
    background: #1a6fa8; color: #fff;
    border: none; border-radius: 6px;
    padding: 8px 16px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: background 0.15s;
}
.crm-tut-btn-preview:hover { background: #155c8e; }

.crm-tut-btn-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    background: #f0f0f0; border: 1px solid #ddd;
    border-radius: 6px; cursor: pointer; font-size: 14px;
    transition: background 0.15s, color 0.15s;
}
.crm-tut-btn-icon:hover { background: var(--tut-green); color: #fff; border-color: var(--tut-green); }
.crm-tut-btn-icon.crm-tut-btn-danger:hover { background: var(--tut-danger); border-color: var(--tut-danger); color: #fff; }

.crm-tut-btn-danger-solid {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--tut-danger); color: #fff;
    border: none; border-radius: 6px;
    padding: 8px 16px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: background 0.15s, opacity 0.15s;
}
.crm-tut-btn-danger-solid:disabled { opacity: 0.6; cursor: default; }
.crm-tut-btn-danger-solid:hover:not(:disabled) { background: #a93226; }

/* ── Estados vacío/carga ── */
.crm-tut-empty, .crm-tut-loading {
    text-align: center;
    padding: 60px 24px;
    color: var(--tut-text-muted);
    display: flex; flex-direction: column;
    align-items: center; gap: 12px;
}

/* ── Modal ── */
.crm-tut-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 10000;
    display: flex; align-items: center; justify-content: center;
}

.crm-tut-modal {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.25);
    min-width: 420px;
    max-width: 94vw;
    overflow: hidden;
    display: flex; flex-direction: column;
}

.crm-tut-modal-paso {
    min-width: 560px;
    max-height: 92vh;
    overflow-y: auto;
}

.crm-tut-modal-header {
    display: flex; align-items: center;
    padding: 16px 20px;
    background: var(--tut-gray-bg);
    border-bottom: 1px solid var(--tut-border);
    font-size: 16px; font-weight: 700;
    color: var(--tut-text);
}

.crm-tut-modal-close {
    margin-left: auto;
    background: none; border: none;
    font-size: 16px; cursor: pointer;
    color: var(--tut-text-muted);
    padding: 2px 6px; border-radius: 4px;
}
.crm-tut-modal-close:hover { background: #e0e0e0; color: #333; }

.crm-tut-modal-body { padding: 20px; }

.crm-tut-modal-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--tut-border);
    background: var(--tut-gray-bg);
}

.crm-tut-modal-warning { color: var(--tut-danger); font-size: 13px; }

/* ── Editor de tutorial ── */
.crm-tut-editor-page {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: calc(100vh - 64px);
}

.crm-tut-editor-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 28px;
    background: #fff;
    border-bottom: 1px solid var(--tut-border);
    position: sticky; top: 0; z-index: 100;
    flex-wrap: wrap;
}

.crm-tut-editor-title {
    font-size: 17px; font-weight: 700;
    color: var(--tut-text); margin: 0;
    flex: 1; display: flex; align-items: center; gap: 8px;
}

.crm-tut-editor-topbar-actions {
    display: flex; gap: 10px; align-items: center;
}

.crm-tut-btn-back {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: 1px solid var(--tut-border);
    border-radius: 6px; padding: 6px 14px;
    font-size: 13px; cursor: pointer; color: var(--tut-text-muted);
    transition: background 0.15s;
}
.crm-tut-btn-back:hover { background: var(--tut-gray-bg); color: var(--tut-text); }

.crm-tut-editor-body {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 0;
    flex: 1;
    min-height: 0;
}

@media (max-width: 900px) {
    .crm-tut-editor-body { grid-template-columns: 1fr; }
}

.crm-tut-editor-left {
    padding: 20px;
    border-right: 1px solid var(--tut-border);
    overflow-y: auto;
    background: var(--tut-gray-bg);
}

.crm-tut-editor-right {
    padding: 20px;
    overflow-y: auto;
}

.crm-tut-section {
    background: #fff;
    border: 1px solid var(--tut-border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.crm-tut-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tut-text-muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.crm-tut-field { margin-bottom: 14px; }
.crm-tut-field label {
    display: block;
    font-size: 12px; font-weight: 600;
    color: var(--tut-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 5px;
}
.crm-tut-field .req { color: var(--tut-danger); }

.crm-tut-input, .crm-tut-textarea, .crm-tut-select-full {
    width: 100%;
    padding: 8px 11px;
    border: 1px solid var(--tut-border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--tut-text);
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s;
    outline: none;
}
.crm-tut-input:focus, .crm-tut-textarea:focus, .crm-tut-select-full:focus {
    border-color: var(--tut-green);
    box-shadow: 0 0 0 2px rgba(0,109,78,0.12);
}

.crm-tut-textarea { resize: vertical; min-height: 72px; }
.crm-tut-select-full { cursor: pointer; }

.crm-tut-hint { font-size: 11px; color: var(--tut-text-muted); margin-top: 4px; display: block; }

.crm-tut-field-row { display: flex; gap: 12px; }

.crm-tut-toggle-row { display: flex; align-items: center; gap: 8px; padding-top: 4px; }
.crm-tut-checkbox { width: 18px; height: 18px; accent-color: var(--tut-green); cursor: pointer; }
.crm-tut-toggle-label { font-size: 14px; cursor: pointer; font-weight: 600; color: var(--tut-text); }

/* ── Alertas ── */
.crm-tut-alert-error {
    background: #fdf0f0; border: 1px solid #f5c6c6;
    color: var(--tut-danger); border-radius: 6px;
    padding: 10px 14px; font-size: 13px;
    display: flex; align-items: center; gap: 8px;
    margin-top: 10px;
}
.crm-tut-alert-ok {
    background: #e8f8f2; border: 1px solid #a8dfca;
    color: var(--tut-green); border-radius: 6px;
    padding: 10px 14px; font-size: 13px;
    display: flex; align-items: center; gap: 8px;
    margin-top: 10px;
}

/* ── Pasos del tutorial ── */
.crm-tut-section-steps { }

.crm-tut-pasos-lista-scroll {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 2px;
}

.crm-tut-empty-steps {
    text-align: center; padding: 40px;
    color: var(--tut-text-muted);
    display: flex; flex-direction: column;
    align-items: center; gap: 10px;
}

.crm-tut-pasos-lista { display: flex; flex-direction: column; gap: 8px; }

.crm-tut-paso-row {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--tut-border);
    border-radius: 8px; background: #fff;
    transition: box-shadow 0.15s;
}
.crm-tut-paso-row:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.crm-tut-paso-numero {
    width: 28px; height: 28px; min-width: 28px;
    border-radius: 50%; background: var(--tut-green);
    color: #fff; font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

.crm-tut-paso-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }

.crm-tut-paso-titulo {
    font-size: 14px; font-weight: 600; color: var(--tut-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.crm-tut-paso-selector {
    font-size: 11px; color: #555; background: #f0f0f0;
    padding: 1px 5px; border-radius: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 260px;
}

.crm-tut-paso-no-selector { font-size: 11px; color: #999; font-style: italic; }

.crm-tut-paso-img-badge {
    font-size: 11px; color: #1a6fa8;
    display: flex; align-items: center; gap: 3px;
}

.crm-tut-paso-actions { display: flex; gap: 4px; }

.crm-tut-btn-icon-sm {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    background: #f0f0f0; border: 1px solid #ddd;
    border-radius: 5px; cursor: pointer; font-size: 13px;
    transition: background 0.15s, color 0.15s;
}
.crm-tut-btn-icon-sm:hover:not(:disabled) { background: var(--tut-green); color: #fff; border-color: var(--tut-green); }
.crm-tut-btn-icon-sm:disabled { opacity: 0.4; cursor: default; }
.crm-tut-btn-danger-sm:hover:not(:disabled) { background: var(--tut-danger) !important; border-color: var(--tut-danger) !important; color: #fff !important; }

/* ── Botones de acciones especiales ── */
.crm-tut-btn-add-step {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--tut-green); color: #fff;
    border: none; border-radius: 5px;
    padding: 5px 12px; font-size: 12px; font-weight: 600;
    cursor: pointer; transition: background 0.15s, opacity 0.15s;
}
.crm-tut-btn-add-step:hover:not(:disabled) { background: #005a40; }
.crm-tut-btn-add-step:disabled { opacity: 0.5; cursor: default; }

.crm-tut-btn-inspector {
    display: inline-flex; align-items: center; gap: 5px;
    background: #1a6fa8; color: #fff;
    border: none; border-radius: 5px;
    padding: 5px 12px; font-size: 12px; font-weight: 600;
    cursor: pointer; transition: background 0.15s;
}
.crm-tut-btn-inspector:hover { background: #155c8e; }

.crm-tut-btn-scan {
    display: inline-flex; align-items: center; gap: 4px;
    background: #8e44ad; color: #fff;
    border: none; border-radius: 5px;
    padding: 3px 10px; font-size: 11px; font-weight: 600;
    cursor: pointer;
}
.crm-tut-btn-scan:hover { background: #6c3483; }

/* ── Inspector en modal ── */
.crm-tut-selector-row {
    display: flex; gap: 6px;
}
.crm-tut-selector-row .crm-tut-input { flex: 1; }

.crm-tut-btn-inspector-mini, .crm-tut-btn-verify {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; min-width: 36px; height: 36px;
    border-radius: 6px; border: 1px solid var(--tut-border);
    cursor: pointer; font-size: 15px;
    transition: background 0.15s, color 0.15s;
}
.crm-tut-btn-inspector-mini { background: #1a6fa8; color: #fff; border-color: #1a6fa8; }
.crm-tut-btn-inspector-mini:hover { background: #155c8e; }
.crm-tut-btn-verify { background: #fff; color: var(--tut-text-muted); }
.crm-tut-btn-verify:hover { background: var(--tut-green); color: #fff; border-color: var(--tut-green); }

.crm-tut-selector-msg {
    margin-top: 5px; font-size: 12px; font-weight: 500;
    padding: 4px 8px; border-radius: 4px;
    display: flex; align-items: center; gap: 6px;
}
.crm-tut-selector-msg.ok   { background: #e8f8f2; color: var(--tut-green); }
.crm-tut-selector-msg.error { background: #fdf0f0; color: var(--tut-danger); }

/* ── Upload de imagen ── */
.crm-tut-upload-area {
    border: 2px dashed var(--tut-border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    position: relative;
    transition: border-color 0.15s, background 0.15s;
    cursor: pointer;
}
.crm-tut-upload-area:hover { border-color: var(--tut-green); background: var(--tut-green-light); }

.crm-tut-file-input {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}

.crm-tut-upload-label {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    font-size: 14px; color: var(--tut-text-muted); cursor: pointer;
}
.crm-tut-upload-label i { font-size: 24px; color: var(--tut-green); }
.crm-tut-upload-label small { font-size: 11px; }

.crm-tut-imagen-preview {
    position: relative; display: inline-block;
}
.crm-tut-btn-remove-img {
    position: absolute; top: -8px; right: -8px;
    background: var(--tut-danger); color: #fff;
    border: none; border-radius: 50%;
    width: 22px; height: 22px; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* ── Escáner de elementos ── */
.crm-tut-elementos-lista {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--tut-border);
    border-radius: 6px;
    margin-top: 8px;
}

.crm-tut-elemento-item {
    padding: 8px 12px;
    border-bottom: 1px solid var(--tut-border);
    cursor: pointer;
    display: flex; flex-direction: column; gap: 2px;
    transition: background 0.12s;
}
.crm-tut-elemento-item:last-child { border-bottom: none; }
.crm-tut-elemento-item:hover { background: var(--tut-green-light); }

.crm-tut-el-cat {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--tut-green);
}

.crm-tut-el-texto {
    font-size: 13px; color: var(--tut-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.crm-tut-el-selector {
    font-size: 11px; color: #666;
    background: #f0f0f0; padding: 1px 5px; border-radius: 3px;
    font-family: monospace;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 100%;
}

/* ── Detalles avanzados (accordion) ── */
.crm-tut-details {
    border: 1px solid var(--tut-border);
    border-radius: 6px; overflow: hidden;
}
.crm-tut-details-summary {
    padding: 10px 14px;
    font-size: 13px; font-weight: 600;
    color: var(--tut-text-muted);
    cursor: pointer;
    background: var(--tut-gray-bg);
    display: flex; align-items: center; gap: 6px;
    list-style: none;
    transition: background 0.15s;
}
.crm-tut-details-summary:hover { background: #e8ecf0; }
.crm-tut-details > div { padding: 0 14px; }

/* ─── Fin Módulo Tutoriales ───────────────────────────────────────────────── */

/* ─── Inspector iframe: animación de pulso ─── */
@keyframes soc-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ─── Tutoriales: botón toggle activo/inactivo ─── */
.crm-tut-btn-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    border: none; border-radius: 6px;
    padding: 6px 14px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background 0.15s, color 0.15s;
}
.crm-tut-btn-toggle.activo {
    background: #e8f8f2; color: #006d4e;
    border: 1.5px solid #a8dfca;
}
.crm-tut-btn-toggle.activo:hover { background: #006d4e; color: #fff; }
.crm-tut-btn-toggle.inactivo {
    background: #f8e8e8; color: #c0392b;
    border: 1.5px solid #f5c6c6;
}
.crm-tut-btn-toggle.inactivo:hover { background: #c0392b; color: #fff; }
.crm-tut-btn-toggle i { font-size: 16px; }

/* ─── Tutoriales: layout de lista horizontal ─── */
.crm-tut-lista {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.crm-tut-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid var(--tut-border);
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: box-shadow 0.15s;
}
.crm-tut-row:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.crm-tut-card-inactivo.crm-tut-row { opacity: 0.65; }

.crm-tut-row-pagina { flex-shrink: 0; min-width: 120px; }

.crm-tut-row-nombre {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.crm-tut-row-titulo {
    font-size: 14px;
    font-weight: 700;
    color: var(--tut-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.crm-tut-row-desc {
    font-size: 12px;
    color: var(--tut-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-tut-row-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--tut-text-muted);
    flex-shrink: 0;
    white-space: nowrap;
}
.crm-tut-row-meta span { display: flex; align-items: center; gap: 4px; }

.crm-tut-row-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

/* ─── Tutoriales: fila de encabezados ─── */
.crm-tut-row-header {
    background: var(--tut-gray-bg);
    border: 1px solid var(--tut-border);
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tut-text-muted);
    padding: 8px 16px;
}
.crm-tut-row-header .crm-tut-row-meta {
    display: flex;
    gap: 14px;
    font-size: 11px;
    font-weight: 700;
}

/* ─── Tutoriales: historial de cambios ─── */
.crm-tut-section-historial { max-height: 400px; overflow-y: auto; }

.crm-tut-historial-lista { display: flex; flex-direction: column; gap: 6px; }

.crm-tut-historial-row {
    border: 1px solid var(--tut-border);
    border-radius: 6px;
    padding: 10px 12px;
    background: #fff;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.crm-tut-historial-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.crm-tut-historial-right {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    color: var(--tut-text-muted);
    text-align: right;
    flex-shrink: 0;
}

.crm-tut-historial-accion {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 2px 8px;
    border-radius: 20px;
    align-self: flex-start;
}
.crm-tut-hist-add    { background: #e8f8f2; color: #006d4e; }
.crm-tut-hist-del    { background: #fdf0f0; color: #c0392b; }
.crm-tut-hist-edit   { background: #e8f0fd; color: #1a6fa8; }
.crm-tut-hist-save   { background: #f0f8e8; color: #27ae60; }
.crm-tut-hist-toggle { background: #fdf5e8; color: #e67e22; }
.crm-tut-hist-move   { background: #f5f0fd; color: #8e44ad; }

.crm-tut-historial-desc { font-size: 13px; color: var(--tut-text); }
.crm-tut-historial-quien { font-size: 11px; color: var(--tut-text-muted); }
.crm-tut-historial-fecha { font-size: 11px; color: var(--tut-text-muted); }

.crm-tut-historial-detalle {
    width: 100%;
    font-size: 12px;
    border-top: 1px solid var(--tut-border);
    padding-top: 6px;
    margin-top: 4px;
}
.crm-tut-historial-detalle summary {
    cursor: pointer;
    color: var(--tut-text-muted);
    font-weight: 600;
    user-select: none;
}
.crm-tut-hist-antes, .crm-tut-hist-despues {
    font-family: monospace;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 4px;
    word-break: break-all;
}
.crm-tut-hist-antes   { background: #fdf0f0; color: #c0392b; }
.crm-tut-hist-despues { background: #e8f8f2; color: #006d4e; }

/* ─── Tutoriales: input de solo lectura ─── */
.crm-tut-input-readonly {
    background: var(--tut-gray-bg) !important;
    color: var(--tut-text-muted) !important;
    cursor: not-allowed !important;
    border-color: var(--tut-border) !important;
    user-select: text;
}
.crm-tut-input-readonly:focus {
    box-shadow: none !important;
    border-color: var(--tut-border) !important;
}

/* ─── Módulo Monitoreo de Alertas ─────────────────────────────────────────── */
.soc-monitoreo-config-grid { display: flex; flex-direction: column; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; }
.soc-monitoreo-config-header { display: grid; grid-template-columns: 1fr 160px 160px 80px; gap: 0; padding: 10px 16px; background: #006d4e; color: #fff; font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; align-items: center; }
.soc-monitoreo-config-row { display: grid; grid-template-columns: 1fr 160px 160px 80px; gap: 0; padding: 10px 16px; border-top: 1px solid #e0e0e0; align-items: center; }
.soc-monitoreo-config-row:hover { background: rgba(0,109,78,0.04); }
.soc-monitoreo-config-label { font-size: 0.93rem; color: #333; }
.soc-monitoreo-config-input { display: flex; align-items: center; justify-content: center; }
.soc-numeric-small.e-numerictextbox { max-width: 90px; }
/* Badges de alerta en Detalles */
.soc-alerta-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.soc-alerta-verde  { background: #e6f4ee; color: #006d4e; }
.soc-alerta-amarillo { background: #fef9c3; color: #92400e; }
.soc-alerta-rojo   { background: #fde8e8; color: #b91c1c; }
.soc-alerta-na     { background: #f3f4f6; color: #6b7280; }
.soc-detalles-alertas-panel { margin-top: 28px; padding: 16px; background: #fafafa; border: 1px solid #e0e0e0; border-radius: 8px; }
.soc-detalles-alertas-panel h3 { font-size: 0.92rem; font-weight: 700; color: #006d4e; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.soc-alertas-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.soc-alertas-table th { background: #006d4e; color: #fff; padding: 6px 10px; text-align: left; white-space: nowrap; }
.soc-alertas-table td { padding: 5px 10px; border-bottom: 1px solid #e8e8e8; vertical-align: middle; }
.soc-alertas-table tr:last-child td { border-bottom: none; }
.soc-alertas-table tr:hover td { background: rgba(0,109,78,0.04); }
/* ─── Fin Módulo Monitoreo ─────────────────────────────────────────────────── */

/* ─── Módulo Inmobiliarias ─────────────────────────────────────────────────── */
.inm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-top: 16px; }
.inm-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s, transform .15s;
}
.inm-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }

/* Encabezado: avatar + nombre/titular + badge de estatus */
.inm-card__header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 18px 16px;
    background: linear-gradient(135deg, #f0faf4 0%, #ffffff 100%);
    border-bottom: 1px solid #f1f5f9;
}
.inm-card__avatar {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #006d4e 0%, #00a874 100%);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0,109,78,.25);
}
.inm-card__title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inm-card__nombre {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.inm-card__titular {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 5px;
}
.inm-card__titular .e-icons { font-size: 12px; }

/* Datos de contacto */
.inm-card__contact { padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.inm-contact-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: #374151;
}
.inm-contact-item .e-icons { font-size: 14px; color: #00a874; flex: 0 0 auto; }
.inm-contact-empty { color: #9ca3af; font-style: italic; }

/* Estadísticas (empleados / clientes asignados) */
.inm-card__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 18px 16px;
}
.inm-stat-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8faf9;
    border: 1px solid #eef2f1;
    border-radius: 10px;
    padding: 10px 12px;
    position: relative;
}
.inm-stat-mini__icon {
    font-size: 18px;
    color: #00a874;
    flex: 0 0 auto;
}
.inm-stat-mini__info { display: flex; flex-direction: column; min-width: 0; }
.inm-stat-mini__num { font-size: 1.1rem; font-weight: 800; color: #006d4e; line-height: 1.1; }
.inm-stat-mini__label { font-size: 10.5px; color: #6b7280; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inm-stat-mini__link {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    color: #006d4e;
    text-decoration: underline;
    flex: 0 0 auto;
}

/* Acciones */
.inm-card__actions { padding: 12px 18px; border-top: 1px solid #f3f4f6; display: flex; gap: 8px; flex-wrap: nowrap; }
.inm-card__actions .e-btn.soc-proposal-pill-primary,
.inm-card__actions button.e-btn.soc-proposal-pill-primary {
    padding: 4px 12px !important;
    font-size: 12px !important;
}

.inm-link { color: #006d4e; text-decoration: none; } .inm-link:hover { text-decoration: underline; }
.inm-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}
.inm-badge__dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: currentColor; }
.inm-badge--activo { background: #e6f4ee; color: #006d4e; }
.inm-badge--inactivo { background: #f3f4f6; color: #6b7280; }
/* Detalle inmobiliaria */
.inm-detalle { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 24px; }
.inm-detalle__cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.inm-detalle__info { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 28px; }
.inm-seccion { margin-top: 28px; }
.inm-seccion__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.inm-seccion__titulo { font-size: 1rem; font-weight: 700; color: #006d4e; }
/* Tabla empleados */
.inm-empleados-tabla { border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.inm-empleados-tabla__header { display: grid; grid-template-columns: 1.5fr 1.5fr 1fr .7fr auto; gap: 0; padding: 8px 12px; background: #006d4e; color: #fff; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.inm-empleados-tabla__row { display: grid; grid-template-columns: 1.5fr 1.5fr 1fr .7fr auto; gap: 0; padding: 10px 12px; border-top: 1px solid #f3f4f6; font-size: 13px; align-items: center; }
.inm-empleados-tabla__row:hover { background: rgba(0,109,78,.04); }
@media (max-width: 700px) {
  .inm-empleados-tabla__header, .inm-empleados-tabla__row { grid-template-columns: 1fr; }
}
/* Portal inmobiliarias — estadísticas */
.inm-stat-card { background: #f0faf4; border: 1px solid #c6e6d6; border-radius: 10px; padding: 20px 28px; text-align: center; min-width: 140px; }
.inm-stat-card__num { display: block; font-size: 2.2rem; font-weight: 800; color: #006d4e; line-height: 1; }
.inm-stat-card__label { display: block; font-size: 12px; color: #374151; margin-top: 4px; }
/* Lista de contactos en portal inmobiliarias */
.inm-contactos-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 8px; }
.inm-contacto-card { background: #fff; border: 1.5px solid #e5e7eb; border-radius: 8px; padding: 14px 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.inm-contacto-card:hover { border-color: #006d4e; box-shadow: 0 2px 8px rgba(0,109,78,.12); }
.inm-contacto-card--activo { border-color: #006d4e; background: #f0faf4; box-shadow: 0 2px 8px rgba(0,109,78,.15); }
.inm-contacto-card__nombre { font-weight: 700; font-size: 0.95rem; color: #1a1a1a; margin-bottom: 4px; }
.inm-contacto-card__meta { font-size: 12px; color: #6b7280; display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.inm-contacto-card__footer { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* ─── Fin Módulo Inmobiliarias ─────────────────────────────────────────────── */

/* ─── Módulo Reseñas de Clientes (/resenas) ──────────────────────────────── */
.resenas-module .soc-page-header { margin-bottom: 24px; }
.resenas-module .soc-subtitle { color: #6b7280; font-size: 14px; margin-top: 4px; }

/* KPIs */
.resenas-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.resenas-kpi { background: #fff; border: 1.5px solid #e5e7eb; border-radius: 12px; padding: 20px 24px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.resenas-kpi__valor { font-size: 2rem; font-weight: 800; color: #006d4e; line-height: 1.1; }
.resenas-kpi__label { font-size: 12px; color: #6b7280; margin-top: 4px; }

/* Destacados */
.resenas-destacados { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.resenas-destacado { flex: 1; min-width: 240px; padding: 12px 16px; border-radius: 10px; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.resenas-destacado--top { background: #f0faf4; border: 1.5px solid #86efac; }
.resenas-destacado--low { background: #fff5f5; border: 1.5px solid #fca5a5; }
.resenas-estrella-badge { background: #006d4e; color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; }
.resenas-estrella-badge--red { background: #dc2626; }

/* Resumen por ejecutivo */
.resenas-resumen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.resenas-resumen-card { background: #fff; border: 2px solid #e5e7eb; border-radius: 12px; padding: 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.resenas-resumen-card:hover { border-color: #006d4e; box-shadow: 0 2px 10px rgba(0,109,78,.1); }
.resenas-resumen-card--active { border-color: #006d4e; background: #f0faf4; }
.resenas-resumen-card__nombre { font-weight: 700; font-size: 14px; color: #1a1a1a; margin-bottom: 4px; }
.resenas-resumen-card__promedio { font-size: 1.4rem; font-weight: 800; line-height: 1.1; margin-bottom: 2px; }
.resenas-resumen-card__total { font-size: 12px; color: #6b7280; margin-bottom: 12px; }

/* Mini bar de distribución */
.resenas-bar-mini { display: flex; flex-direction: column; gap: 3px; }
.resenas-bar-mini__row { display: flex; align-items: center; gap: 6px; }
.resenas-bar-mini__label { font-size: 10px; color: #9ca3af; width: 22px; text-align: right; flex-shrink: 0; }
.resenas-bar-mini__track { flex: 1; height: 6px; background: #f3f4f6; border-radius: 999px; overflow: hidden; }
.resenas-bar-mini__fill { height: 100%; border-radius: 999px; transition: width .3s; }
.resenas-bar-mini__fill--5 { background: #15803d; }
.resenas-bar-mini__fill--4 { background: #22c55e; }
.resenas-bar-mini__fill--3 { background: #f59e0b; }
.resenas-bar-mini__fill--2 { background: #f97316; }
.resenas-bar-mini__fill--1 { background: #dc2626; }
.resenas-bar-mini__count { font-size: 10px; color: #9ca3af; width: 16px; flex-shrink: 0; }

/* Filtros */
.resenas-filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.resenas-search { min-width: 220px; max-width: 300px; }
.resenas-select { min-width: 170px; }

/* Clear filter chip */
.resenas-clear-filter { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; padding: 3px 10px; border-radius: 999px; background: #006d4e; color: #fff; font-size: 12px; border: none; cursor: pointer; }
.resenas-clear-filter:hover { background: #005d4e; }

/* Lista de reseñas */
.resenas-lista { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.resenas-item { background: #fff; border: 1.5px solid #e5e7eb; border-radius: 10px; padding: 14px 16px; transition: border-color .15s; }
.resenas-item:hover { border-color: #cbd5e1; }
.resenas-item__cab { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.resenas-item__ejecutivo { font-weight: 700; font-size: 13px; color: #006d4e; flex: 1; }
.resenas-item__stars { font-size: 1rem; color: #f59e0b; letter-spacing: 1px; }
.resenas-item__fecha { font-size: 11px; color: #9ca3af; }
.resenas-item__cliente { font-size: 13px; color: #374151; margin-bottom: 6px; display: flex; align-items: center; }
.resenas-item__comentario { font-size: 13px; color: #4b5563; font-style: italic; display: flex; align-items: flex-start; gap: 4px; }
.resenas-item__comentario--vacio { color: #9ca3af; }
.resenas-count { font-size: 12px; color: #9ca3af; text-align: right; }

/* Acceso denegado / loading */
.soc-acceso-denegado, .soc-loading-center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 60px 0; color: #6b7280; }

@media (max-width: 900px) {
  .resenas-kpis { grid-template-columns: repeat(2, 1fr); }
  .resenas-resumen-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (max-width: 600px) {
  .resenas-kpis { grid-template-columns: 1fr 1fr; }
  .resenas-item__cab { flex-direction: column; align-items: flex-start; gap: 4px; }
}
/* ─── Fin Módulo Reseñas ─────────────────────────────────────────────────── */

/* ─── Reseñas: selector de broker y estado vacío ────────────────────────── */
.resenas-broker-selector { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; padding: 14px 18px; background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 10px; flex-wrap: wrap; }
.resenas-broker-selector__label { font-size: 13px; font-weight: 600; color: #374151; white-space: nowrap; }
.resenas-broker-select { min-width: 280px; max-width: 420px; }
.resenas-broker-badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; padding: 8px 14px; background: #f0faf4; border: 1.5px solid #86efac; border-radius: 8px; font-size: 14px; color: #15803d; }
.resenas-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 60px 0; text-align: center; color: #6b7280; }
/* ─── Fin estilos adicionales reseñas ───────────────────────────────────── */

/* ─── Kanban Clientes ────────────────────────────────────────────────────── */
.soc-kc-name { font-weight: 600; font-size: 13px; color: #111827; margin-bottom: 4px; }
.soc-kc-detail { font-size: 12px; color: #4b5563; margin-top: 2px; line-height: 1.4; }
.soc-kc-email { word-break: break-all; }
.soc-kc-label { font-weight: 500; color: #6b7280; }
.soc-kc-created { font-size: 10px; color: #9ca3af; text-transform: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soc-kc-col-body .soc-kanban-card-footer { justify-content: space-between; gap: 8px; }

/* Tablero personalizado con paginación y colapso de columnas */
.soc-kc-board {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 16px;
    flex: 1 1 auto;
    min-height: 0;
    align-items: flex-start;
    scrollbar-width: thin;
    scrollbar-color: #006d4e #e5e7eb;
}
.soc-kc-board::-webkit-scrollbar {
    height: 10px;
    width: 10px;
}
.soc-kc-board::-webkit-scrollbar-track {
    background: #e5e7eb;
    border-radius: 6px;
}
.soc-kc-board::-webkit-scrollbar-thumb {
    background-color: #006d4e;
    border-radius: 6px;
    border: 2px solid #e5e7eb;
}
.soc-kc-board::-webkit-scrollbar-thumb:hover {
    background-color: #00513b;
}
.soc-kc-col {
    flex: 1 1 0;
    min-width: 290px;
    background: #F8FAFB;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: flex 0.25s ease, min-width 0.25s ease, max-width 0.25s ease;
}
.soc-kc-col--collapsed {
    flex: 0 0 44px;
    min-width: 44px;
    max-width: 44px;
}
.soc-kc-col-header {
    background: #F8FAFB;
    border-bottom: 2px solid #006d4e;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    min-height: 48px;
}
.soc-kc-col-header:hover { background: #eef2f0; }
.soc-kc-col--collapsed .soc-kc-col-header {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    min-height: 0;
    padding: 10px 4px;
    border-bottom: none;
    border-right: 2px solid #006d4e;
    gap: 10px;
}
.soc-kc-col-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #374151;
    text-transform: uppercase;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.soc-kc-col-title-v {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #374151;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    overflow: hidden;
    max-height: 150px;
    flex-shrink: 0;
}
.soc-kc-col-count {
    background: #006d4e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    padding: 1px 7px;
    line-height: 1.6;
    white-space: nowrap;
    flex-shrink: 0;
}
.soc-kc-chevron {
    font-size: 11px;
    color: #6b7280;
    flex-shrink: 0;
}
.soc-kc-col-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scrollbar-width: thin;
    scrollbar-color: #006d4e #e5e7eb;
}
.soc-kc-col-body::-webkit-scrollbar {
    width: 8px;
}
.soc-kc-col-body::-webkit-scrollbar-track {
    background: #e5e7eb;
    border-radius: 6px;
}
.soc-kc-col-body::-webkit-scrollbar-thumb {
    background-color: #006d4e;
    border-radius: 6px;
}
.soc-kc-col-body::-webkit-scrollbar-thumb:hover {
    background-color: #00513b;
}
.soc-kc-col-body .soc-kanban-opp-card { cursor: grab; }
.soc-kc-col-body .soc-kanban-opp-card:active { cursor: grabbing; }

/* Tarjeta de oportunidad estilo "soc-opp-card" adaptada al ancho de columna del Kanban */
.soc-kanban-opp-card {
    border-top-width: 3px;
    padding: 10px 12px;
    gap: 4px;
}
.soc-kanban-opp-card:hover {
    transform: none;
}
.soc-kanban-opp-card .soc-opp-card-amount {
    font-size: 16px;
}
.soc-kanban-opp-card .soc-opp-card-number {
    font-size: 11px;
}
.soc-kanban-opp-card .soc-opp-stage-badge,
.soc-kanban-opp-card .soc-opp-status-pill,
.soc-kanban-opp-card .soc-opp-credit-chip {
    font-size: 10px;
}
.soc-kanban-opp-card .soc-opp-card-product,
.soc-kanban-opp-card .soc-opp-card-type {
    font-size: 11px;
}
.soc-kanban-opp-card .soc-opp-bank-logo-img {
    height: 20px;
    max-width: 90px;
}
.soc-kanban-opp-card .soc-opp-card-people {
    grid-template-columns: 1fr 1fr;
    padding: 6px 8px;
    margin-top: 4px;
}
.soc-kanban-opp-card .soc-opp-card-person-name {
    font-size: 11px;
}
.soc-kanban-opp-card .soc-opp-card-footer {
    margin-top: 4px;
    padding-top: 6px;
}
.soc-kanban-opp-card .soc-opp-card-meta {
    font-size: 10.5px;
}
.soc-kanban-opp-card .soc-opp-card-cta {
    font-size: 11px;
}
.soc-kanban-opp-card .soc-kanban-contact-name {
    font-weight: 700;
    font-size: 12px;
    color: #1e293b;
}
.soc-kc-vermas {
    background: none;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    width: 100%;
    font-size: 12px;
    color: #006d4e;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.soc-kc-vermas:hover {
    background: rgba(0,109,78,0.05);
    border-color: #006d4e;
}
/* ─── Fin Kanban Clientes ────────────────────────────────────────────────── */

/* ─── Toast copiado al portapapeles ─────────────────────────────────────── */
.soc-copy-toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: #15803d; color: #fff; padding: 10px 22px; border-radius: 8px; font-size: 14px; font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,.18); z-index: 9999; pointer-events: none; animation: soc-toast-in .2s ease; }
@keyframes soc-toast-in { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
/* ─── Fin Toast copiado ──────────────────────────────────────────────────── */

/* ─── Seguimiento de Operadores ──────────────────────────────────────────── */
.seguimiento-operadores-module .soc-seguimiento-loading {
    display: flex; align-items: center; gap: 10px;
    padding: 2rem; color: #666; font-size: 0.95rem;
}
.seguimiento-operadores-module .soc-seguimiento-toolbar {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 1.25rem; flex-wrap: wrap;
}
.seguimiento-operadores-module .soc-seguimiento-label { font-weight: 600; font-size: 0.9rem; }
.seguimiento-operadores-module .soc-seguimiento-select { max-width: 280px; min-width: 180px; }
.soc-btn-primary-small {
    background: #1d4ed8; color: #fff; border: none; border-radius: 6px;
    padding: 6px 14px; font-size: 0.85rem; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px;
}
.soc-btn-primary-small:hover { background: #1e40af; }
.soc-btn-primary-small:disabled { background: #93c5fd; cursor: not-allowed; }

/* KPIs */
.soc-seguimiento-kpis {
    display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 1.5rem;
}
.soc-seg-kpi {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 14px 18px; min-width: 130px; flex: 1;
    display: flex; flex-direction: column; align-items: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.soc-seg-kpi--warn  { border-color: #f59e0b; background: #fffbeb; }
.soc-seg-kpi--danger { border-color: #ef4444; background: #fef2f2; }
.soc-seg-kpi-val { font-size: 1.9rem; font-weight: 700; color: #1e293b; line-height: 1; }
.soc-seg-kpi--warn  .soc-seg-kpi-val  { color: #b45309; }
.soc-seg-kpi--danger .soc-seg-kpi-val { color: #dc2626; }
.soc-seg-kpi-lbl { font-size: 0.75rem; color: #64748b; margin-top: 4px; text-align: center; }

/* Tabla de operadores */
.soc-seguimiento-table-wrap { overflow-x: auto; }
.soc-seguimiento-table {
    width: 100%; border-collapse: collapse; font-size: 0.875rem;
    background: #fff; border-radius: 10px; overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,.08);
}
.soc-seguimiento-table thead tr { background: #f1f5f9; }
.soc-seguimiento-table th {
    padding: 10px 12px; text-align: left; font-weight: 600; font-size: 0.78rem;
    color: #475569; border-bottom: 2px solid #e2e8f0; white-space: nowrap;
}
.soc-seguimiento-table th small { font-weight: 400; color: #94a3b8; }
.soc-seg-operador-row {
    cursor: pointer; border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}
.soc-seg-operador-row td { padding: 10px 12px; vertical-align: middle; }
.soc-seg-operador-row:hover { background: #f8fafc; }
.soc-seg-operador-row.soc-seg-row--warn  { background: #fffbeb; }
.soc-seg-operador-row.soc-seg-row--warn:hover  { background: #fef3c7; }
.soc-seg-operador-row.soc-seg-row--danger { background: #fef2f2; }
.soc-seg-operador-row.soc-seg-row--danger:hover { background: #fee2e2; }

.soc-seg-expand-cell { width: 28px; color: #94a3b8; }
.soc-seg-operador-nombre { font-weight: 600; color: #1e293b; }
.soc-seg-operador-email  { font-size: 0.75rem; color: #94a3b8; margin-top: 2px; }
.soc-seg-operador-broker { font-size: 0.7rem; color: #0064a6; margin-top: 2px; font-weight: 600; }

.soc-seg-rol-badge {
    display: inline-block; padding: 2px 8px; border-radius: 12px;
    font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
}
.soc-seg-rol-operador { background: #dbeafe; color: #1d4ed8; }
.soc-seg-rol-administrador { background: #ede9fe; color: #6d28d9; }

.soc-seg-count-total   { font-weight: 700; color: #1e293b; }
.soc-seg-count-activas { color: #16a34a; font-weight: 600; }
.soc-seg-count-pausa   { color: #d97706; font-weight: 600; }
.soc-seg-count-sep     { color: #cbd5e1; margin: 0 2px; }

/* Días / actividad */
.soc-seg-dias--ok       { color: #16a34a; font-weight: 600; }
.soc-seg-dias--warn     { color: #d97706; font-weight: 600; }
.soc-seg-dias--danger   { color: #dc2626; font-weight: 600; }
.soc-seg-dias--critical { color: #7f1d1d; font-weight: 700; }
.soc-seg-sin-actividad  { color: #94a3b8; font-size: 0.8rem; }

/* Progress bar */
.soc-seg-progress-bar {
    width: 100%; height: 8px; background: #e2e8f0; border-radius: 4px;
    overflow: hidden; margin-bottom: 2px;
}
.soc-seg-progress-bar--sm { height: 5px; }
.soc-seg-progress-fill {
    height: 100%; background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 4px; transition: width .3s;
}

/* Badges */
.soc-seg-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; padding: 0 6px;
    border-radius: 11px; font-size: 0.75rem; font-weight: 700;
}
.soc-seg-badge--warn     { background: #fef3c7; color: #b45309; }
.soc-seg-badge--danger   { background: #fee2e2; color: #dc2626; }
.soc-seg-badge--critical { background: #7f1d1d; color: #fff; }
.soc-seg-badge--info     { background: #dbeafe; color: #1d4ed8; }
.soc-seg-badge--msg      { background: #f0fdf4; color: #16a34a; }

/* Alertas */
.soc-seg-alerta {
    display: inline-block; padding: 2px 7px; border-radius: 10px;
    font-size: 0.72rem; font-weight: 700;
}
.soc-seg-alerta--warn     { background: #fef3c7; color: #b45309; }
.soc-seg-alerta--danger   { background: #fee2e2; color: #dc2626; }
.soc-seg-alerta--critical { background: #7f1d1d; color: #fff; }

/* Estrellas */
.soc-seg-stars { color: #f59e0b; font-weight: 700; font-size: 0.85rem; }

/* Detalle expandido */
.soc-seg-detalle-row { background: #f8fafc; }
.soc-seg-detalle-panel { padding: 1rem 1.5rem 1.25rem; border-top: 2px solid #e0e7ff; }
.soc-seg-detalle-header {
    font-size: 0.85rem; color: #475569; margin-bottom: 0.75rem;
    display: flex; align-items: center; gap: 6px;
}

/* Tabla oportunidades (detalle) */
.soc-seg-opp-table {
    width: 100%; border-collapse: collapse; font-size: 0.82rem;
    background: #fff; border-radius: 8px; overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.soc-seg-opp-table thead tr { background: #f1f5f9; }
.soc-seg-opp-table th {
    padding: 8px 10px; font-weight: 600; font-size: 0.74rem;
    color: #64748b; border-bottom: 1px solid #e2e8f0; white-space: nowrap;
}
.soc-seg-opp-table tbody tr { border-bottom: 1px solid #f1f5f9; }
.soc-seg-opp-table tbody tr td { padding: 8px 10px; vertical-align: middle; }
.soc-seg-opp-table tbody tr:hover { background: #f8fafc; }
.soc-seg-opp-row--inactive td { opacity: 0.55; }
.soc-seg-opp-row--warn     { background: #fffbeb; }
.soc-seg-opp-row--danger   { background: #fef2f2; }
.soc-seg-opp-row--critical { background: #fff1f2; }

/* Badges de etapa/estado */
.soc-seg-etapa-badge {
    display: inline-block; background: #e0e7ff; color: #3730a3;
    border-radius: 8px; padding: 2px 8px; font-size: 0.72rem; font-weight: 600;
}
.soc-seg-status-badge {
    display: inline-block; border-radius: 8px; padding: 2px 8px;
    font-size: 0.72rem; font-weight: 600;
}
.soc-seg-status-activo      { background: #dcfce7; color: #15803d; }
.soc-seg-status-enpausa     { background: #fef3c7; color: #b45309; }
.soc-seg-status-descartado  { background: #f1f5f9; color: #94a3b8; }

/* Link a oportunidad */
.soc-seg-opp-link { color: #6366f1; font-size: 0.8rem; padding: 2px 4px; }
.soc-seg-opp-link:hover { color: #4f46e5; }

/* Leyenda */
.soc-seg-leyenda {
    margin-top: 1rem; font-size: 0.78rem; color: #64748b;
    padding: 8px 12px; background: #f8fafc; border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* Sin acceso */
.soc-seg-no-acceso {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 4rem 2rem; text-align: center; color: #64748b; gap: 0.75rem;
}
.soc-seg-no-acceso p { margin: 0; font-size: 1rem; }

/* Spin animation */
@keyframes soc-seg-spin { to { transform: rotate(360deg); } }
.soc-spin { display: inline-block; animation: soc-seg-spin 1s linear infinite; }
/* ─── Fin Seguimiento de Operadores ──────────────────────────────────────── */

/* ═══════════════════════════════════════════════
   LOGS DE ERRORES
═══════════════════════════════════════════════ */
.soc-badge-nivel {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
}
.soc-badge-nivel-error { background: #e5431d; }
.soc-badge-nivel-warning { background: #f59e0b; }
.soc-badge-nivel-info { background: #0064a6; }

.soc-row-resuelto { opacity: 0.6; }

.soc-error-detalle-pre {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px;
    font-size: 0.82rem;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 240px;
    overflow-y: auto;
}

.soc-btn-link-rojo { color: #e5431d; }
.soc-btn-link-rojo:hover { color: #c4350f; }
/* ─── Fin Logs de Errores ──────────────────────────────────────── */

/* ── Tarjetas de actividad por ejecutivo (/uso-broker) ──────────────────── */
.ub-eje-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.ub-eje-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.ub-eje-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}
.ub-eje-card__name {
    font-weight: 700;
    font-size: 1rem;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ub-eje-card__username {
    font-size: 0.75rem;
    color: #9ca3af;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ub-eje-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.ub-eje-badge--alta { background: #dcfce7; color: #15803d; }
.ub-eje-badge--media { background: #fef9c3; color: #a16207; }
.ub-eje-badge--baja { background: #fee2e2; color: #b91c1c; }

.ub-eje-card__kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}
.ub-eje-kpi {
    text-align: center;
    background: #f9fafb;
    border-radius: 8px;
    padding: 0.5rem 0.25rem;
}
.ub-eje-kpi__value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0064a6;
    line-height: 1.1;
    white-space: nowrap;
}
.ub-eje-kpi__label {
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 2px;
}
.ub-eje-card__section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.35rem;
}
.ub-eje-hint {
    font-size: 0.75rem;
    color: #4b5563;
    margin: 0.4rem 0 0;
}
.ub-eje-card__footer {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.6rem;
}
.ub-eje-footer-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.ub-eje-footer-label {
    font-size: 0.7rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.ub-eje-footer-value {
    font-size: 0.8rem;
    color: #374151;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* ─── Fin tarjetas de actividad por ejecutivo ─────────────────────────── */

/* ── Gráfico de barras horizontales (/uso-broker, secciones más visitadas) ── */
.ub-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.ub-bar-row {
    display: grid;
    grid-template-columns: 180px 1fr 60px;
    align-items: center;
    gap: 0.75rem;
}
.ub-bar-label {
    font-size: 0.85rem;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ub-bar-track {
    background: #f1f5f9;
    border-radius: 6px;
    height: 14px;
    overflow: hidden;
}
.ub-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4da3d9, #0064a6);
    border-radius: 6px;
    min-width: 2px;
    transition: width 0.3s ease;
}
.ub-bar-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1f2937;
    text-align: right;
}
@media (max-width: 640px) {
    .ub-bar-row { grid-template-columns: 110px 1fr 45px; }
}
/* ─── Fin gráfico de barras horizontales ──────────────────────────────── */

/* ============================================================
   /admin/tenants — acciones compactas y badges de estatus
   ============================================================ */
.soc-tenant-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
}

/* Botón circular solo-icono, base para todas las acciones de la fila */
.soc-tenant-action-btn.e-btn {
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1 !important;
    box-shadow: none !important;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.soc-tenant-action-btn.e-btn .e-btn-icon {
    margin: 0 !important;
    font-size: 14px !important;
}
.soc-tenant-action-btn.e-btn:hover:not(:disabled):not(.e-disabled) {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(16,24,40,0.18);
}

/* Variantes de color (mismo lenguaje cromático que el resto del sistema) */
.soc-tenant-action-btn.soc-tenant-action-edit {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0064a6 !important;
}
.soc-tenant-action-btn.soc-tenant-action-edit .e-btn-icon { color: #0064a6 !important; }
.soc-tenant-action-btn.soc-tenant-action-edit:hover:not(:disabled):not(.e-disabled) {
    background: #f0f7fc !important;
    border-color: #0064a6 !important;
}

.soc-tenant-action-btn.soc-tenant-action-staff {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #64748b !important;
}
.soc-tenant-action-btn.soc-tenant-action-staff .e-btn-icon { color: #64748b !important; }
.soc-tenant-action-btn.soc-tenant-action-staff:hover:not(:disabled):not(.e-disabled) {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
}

.soc-tenant-action-btn.soc-tenant-action-wa {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #1ba84a !important;
}
.soc-tenant-action-btn.soc-tenant-action-wa .e-btn-icon { color: #1ba84a !important; }
.soc-tenant-action-btn.soc-tenant-action-wa:hover:not(:disabled):not(.e-disabled) {
    background: #f0fbf4 !important;
    border-color: #1ba84a !important;
}

.soc-tenant-action-btn.soc-tenant-action-baja {
    background: #fff1ed !important;
    border: 1px solid #f7b8a4 !important;
    color: #e5431d !important;
}
.soc-tenant-action-btn.soc-tenant-action-baja .e-btn-icon { color: #e5431d !important; }
.soc-tenant-action-btn.soc-tenant-action-baja:hover:not(:disabled):not(.e-disabled) {
    background: #e5431d !important;
    border-color: #e5431d !important;
    color: #ffffff !important;
}
.soc-tenant-action-btn.soc-tenant-action-baja:hover:not(:disabled):not(.e-disabled) .e-btn-icon {
    color: #ffffff !important;
}

.soc-tenant-action-btn.soc-tenant-action-reactivar {
    background: #eef8f1 !important;
    border: 1px solid #9bd9ad !important;
    color: #1ba84a !important;
}
.soc-tenant-action-btn.soc-tenant-action-reactivar .e-btn-icon { color: #1ba84a !important; }
.soc-tenant-action-btn.soc-tenant-action-reactivar:hover:not(:disabled):not(.e-disabled) {
    background: #1ba84a !important;
    border-color: #1ba84a !important;
    color: #ffffff !important;
}
.soc-tenant-action-btn.soc-tenant-action-reactivar:hover:not(:disabled):not(.e-disabled) .e-btn-icon {
    color: #ffffff !important;
}

/* Badge de Status (Activo / Suspendido / Baja) */
.soc-tenant-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.soc-tenant-status-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.soc-tenant-status-badge.soc-status-activo {
    background: #eaf8ee;
    color: #157a3c;
}
.soc-tenant-status-badge.soc-status-activo::before { background: #1ba84a; }

.soc-tenant-status-badge.soc-status-suspendido {
    background: #fef6e7;
    color: #92660b;
}
.soc-tenant-status-badge.soc-status-suspendido::before { background: #e8a317; }

.soc-tenant-status-badge.soc-status-baja {
    background: #fdeae5;
    color: #b33215;
}
.soc-tenant-status-badge.soc-status-baja::before { background: #e5431d; }

/* Celda atenuada para tenants dados de baja */
.soc-tenant-cell-baja,
.soc-detail-table tr.soc-tenant-row-baja td {
    color: #94a3b8 !important;
}
.soc-tenant-row-baja .soc-tenant-action-edit,
.soc-tenant-row-baja .soc-tenant-action-staff,
.soc-tenant-row-baja .soc-tenant-action-wa {
    opacity: 0.55;
}
/* ─── Fin gráfico de barras horizontales ──────────────────────────────── */

/* ─── AlertCenter: tarjetas de "Alertas enviadas" ─────────────────────── */
.soc-sent-alert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    margin-top: 10px;
}
.soc-sent-alert-card {
    background: #fff;
    border: 1px solid #e6e8ec;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.soc-sent-alert-card.is-inactive { opacity: 0.7; }
.soc-sent-alert-card-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.soc-sent-alert-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #cbd5e1;
    margin-top: 5px;
    flex-shrink: 0;
}
.soc-sent-alert-status-dot.is-active { background: #0064a6; }
.soc-sent-alert-card-titlewrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.soc-sent-alert-title {
    font-weight: 600;
    font-size: 14px;
    color: #1a1f29;
    word-break: break-word;
}
.soc-sent-alert-time {
    font-size: 11px;
    color: #8a93a3;
    margin-top: 1px;
}
.soc-sent-alert-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-radius: 999px;
    padding: 3px 9px;
    white-space: nowrap;
    flex-shrink: 0;
}
.soc-sent-alert-badge.badge-active { background: #e6f4ea; color: #1a7f4a; }
.soc-sent-alert-badge.badge-inactive { background: #f1f2f4; color: #8a93a3; }
.soc-sent-alert-comment {
    font-size: 12.5px;
    color: #555c69;
    margin: 0;
    line-height: 1.4;
}
.soc-sent-alert-adjuntos { margin: 0; }
.soc-sent-alert-progress-btn {
    background: none;
    border: none;
    padding: 0;
    margin-top: 4px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    text-align: left;
}
.soc-sent-alert-progress-track {
    height: 6px;
    border-radius: 999px;
    background: #eef0f3;
    overflow: hidden;
    display: block;
}
.soc-sent-alert-progress-fill {
    height: 100%;
    display: block;
    background: linear-gradient(90deg, #4da3d9, #0064a6);
    border-radius: 999px;
    transition: width 0.2s ease;
}
.soc-sent-alert-progress-label {
    font-size: 11.5px;
    color: #5b6472;
    display: flex;
    align-items: center;
    gap: 4px;
}
.soc-sent-alert-progress-label i { font-size: 10px; }
.soc-sent-alert-recipients {
    list-style: none;
    margin: 4px 0 0;
    padding: 6px 0 0;
    border-top: 1px dashed #e6e8ec;
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.soc-sent-alert-recipients li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}
.soc-sent-alert-recipients li.is-seen i { color: #1a7f4a; }
.soc-sent-alert-recipients li.is-pending i { color: #c2c8d1; }
.soc-sent-alert-recipient-name {
    color: #333a45;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.soc-sent-alert-recipient-meta {
    color: #8a93a3;
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
}
.soc-sent-alert-no-recipients {
    font-size: 11.5px;
    color: #8a93a3;
    margin-top: 2px;
}
.soc-sent-alert-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    border-top: 1px dashed #e6e8ec;
    padding-top: 8px;
}
.soc-sent-alert-card-actions .soc-btn-link { padding: 0; }
/* ─── Fin AlertCenter: tarjetas de "Alertas enviadas" ─────────────────── */

/* ─── AlertCenter: tarjetas de "Alertas recibidas" (clicables) ───────── */
.soc-received-alert-card {
    cursor: pointer;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.soc-received-alert-card:hover {
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.10);
    border-color: #d0d5dd;
}
.soc-received-alert-card.is-unseen {
    border-left: 3px solid #0064a6;
    background: #f7fbfe;
}
.soc-received-alert-seen-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}
.soc-received-alert-seen-dot.is-unseen { background: #0064a6; box-shadow: 0 0 0 3px rgba(0,100,166,0.15); }
.soc-received-alert-seen-dot.is-seen { background: #cbd5e1; }
.soc-received-alert-seen-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-radius: 999px;
    padding: 3px 9px;
    white-space: nowrap;
    flex-shrink: 0;
}
.soc-received-alert-seen-badge.badge-unseen { background: #e7f1fb; color: #0064a6; }
.soc-received-alert-seen-badge.badge-seen { background: #f1f2f4; color: #8a93a3; }
.soc-received-alert-adjuntos-count {
    font-size: 11px;
    color: #8a93a3;
    margin-left: 2px;
}
.soc-received-alert-routing {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11.5px;
    color: #5b6472;
    background: #f8fafc;
    border-radius: 6px;
    padding: 6px 8px;
    margin-top: 2px;
}
.soc-received-alert-routing i { font-size: 10px; margin-right: 2px; color: #8a93a3; }
.soc-alert-admin-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 4px;
}
/* ─── Fin AlertCenter: tarjetas de "Alertas recibidas" ────────────────── */

/* ─── AlertCenter: modal de detalle ───────────────────────────────────── */
.soc-alert-detail-header {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.soc-alert-detail-title {
    font-size: 17px;
    font-weight: 600;
    color: #1a1f29;
    margin: 0 0 4px;
}
.soc-alert-detail-meta {
    font-size: 12px;
    color: #8a93a3;
    margin: 0 0 10px;
}
.soc-alert-detail-comment {
    font-size: 13.5px;
    color: #333a45;
    line-height: 1.5;
    white-space: pre-wrap;
    margin: 0 0 12px;
}
.soc-alert-detail-section { margin-bottom: 12px; }
.soc-alert-detail-section label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #8a93a3;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
}
/* ─── Fin AlertCenter: modal de detalle ───────────────────────────────── */
