/* ESTILOS PRO - UI FIXES */
        :root {
            --sidebar-width: 260px;
            --primary-color: #0d6efd;
        }

        body {
            font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
            background-color: #f4f6f9;
            overflow-x: hidden; /* Evita scroll horizontal al animar */
        }

        /* WRAPPER PRINCIPAL */
        #wrapper {
            display: flex;
            width: 100%;
            transition: all 0.3s ease;
        }

        /* SIDEBAR (Menú Lateral) */
        #sidebar-wrapper {
            width: var(--sidebar-width);
            min-height: 100vh;
            background: #fff;
            border-right: 1px solid #e9ecef;
            
            /* Flexbox para empujar el botón de salir al fondo correctamente */
            display: flex; 
            flex-direction: column; 
            
            /* Transición suave */
            margin-left: calc(var(--sidebar-width) * -1);
            transition: margin 0.3s ease-in-out;
            position: fixed; /* Fijo en móvil */
            z-index: 1000;
            height: 100%;
        }

        /* CONTENIDO DE LA PÁGINA */
        #page-content-wrapper {
            width: 100%;
            min-height: 100vh;
            transition: all 0.3s ease-in-out;
        }

        #wrapper.toggled #sidebar-wrapper { margin-left: 0; }

        @media (min-width: 768px) {
            #sidebar-wrapper {
                margin-left: 0;
                position: relative; 
                height: 100vh;
            }
            #page-content-wrapper { width: calc(100% - var(--sidebar-width)); }
            #wrapper.toggled #sidebar-wrapper { margin-left: calc(var(--sidebar-width) * -1); }
            #wrapper.toggled #page-content-wrapper { width: 100%; }
        }

        /* ÍTEMS MENÚ */
        .list-group-item {
            border: none;
            padding: 12px 20px;
            font-weight: 500;
            color: #6c757d;
            border-radius: 8px !important;
            margin-bottom: 5px;
            transition: all 0.2s;
            cursor: pointer; /* Importante para UX */
        }
        .list-group-item:hover {
            background-color: #f8f9fa;
            color: var(--primary-color);
            transform: translateX(5px);
        }
        .list-group-item.active {
            background-color: #e7f1ff;
            color: var(--primary-color);
            border: none;
            font-weight: 600;
        }

        .avatar {
            width: 38px; 
            height: 38px; 
            font-size: 0.9rem;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }

        .logout-container {
            margin-top: auto;
            padding: 20px;
            border-top: 1px solid #f0f0f0;
        }

        /* --- NUEVOS ESTILOS: TIMELINE --- */
        .timeline {
            position: relative;
            padding-left: 20px;
            border-left: 2px solid #e9ecef;
            margin-left: 10px;
        }
        .timeline-item {
            position: relative;
            padding-bottom: 2rem;
        }
        .timeline-item::before {
            content: '';
            position: absolute;
            left: -27px;
            top: 4px;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #fff;
            border: 2px solid #0d6efd;
            transition: all 0.3s;
        }
        .timeline-date {
            font-size: 0.85rem;
            color: #6c757d;
            font-weight: 600;
        }
        /* Colores de estado Timeline */
        .timeline-item.closed::before { border-color: #198754; background: #198754; } /* Verde */
        .timeline-item.new::before { border-color: #dc3545; background: #dc3545; } /* Rojo */
        .timeline-item:hover::before { transform: scale(1.2); }

        [v-cloak] { display: none; }

/* Colores por estado */
.timeline-item.closed::before { border-color: #198754; background: #198754; } /* Verde */
.timeline-item.new::before { border-color: #dc3545; background: #dc3545; } /* Rojo */

/* =========================================================
   LEXIA AI ASSISTANT - ESTILOS PREMIUM
   ========================================================= */

/* Paleta B2B Legal */
:root {
    --lexia-primary: #1A365D; /* Azul oscuro corporativo */
    --lexia-secondary: #2B6CB0; /* Azul vibrante para acentos */
    --lexia-bg: #F7FAFC; /* Gris muy claro para el fondo del chat */
    --lexia-text: #2D3748; /* Gris oscuro para texto */
    --lexia-border: #E2E8F0;
    --lexia-assistant-bubble: #FFFFFF;
    --lexia-user-bubble: #EBF8FF;
}

/* Botón Flotante Disparador */
.lexia-trigger-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: var(--lexia-primary);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 9900;
    transition: transform 0.2s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lexia-trigger-btn:hover {
    transform: translateY(-2px);
    background-color: var(--lexia-secondary);
}

/* Contenedor Principal (Panel Lateral Offcanvas) */
.lexia-sidebar {
    position: fixed;
    top: 0;
    right: -420px; /* Oculto por defecto */
    width: 400px;
    height: 100vh;
    background-color: var(--lexia-bg);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.lexia-sidebar.is-open {
    right: 0; /* Aparece suavemente */
}

/* Cabecera del Panel */
.lexia-header {
    background-color: var(--lexia-primary);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.lexia-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
}

.close-btn:hover { opacity: 1; }

/* Área de Mensajes */
.lexia-messages {
    flex: 1 1 auto;
    min-height: 0;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.message.user {
    align-self: flex-end;
}

.message.assistant {
    align-self: flex-start;
}

/* Burbujas de Chat */
.bubble {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--lexia-text);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.message.user .bubble {
    background-color: var(--lexia-user-bubble);
    border-bottom-right-radius: 2px;
    color: var(--lexia-primary);
    font-weight: 500;
}

.message.assistant .bubble {
    background-color: var(--lexia-assistant-bubble);
    border: 1px solid var(--lexia-border);
    border-bottom-left-radius: 2px;
}

/* Formato dentro de la burbuja del asistente */
.message.assistant .bubble strong { color: var(--lexia-primary); }
.message.assistant .bubble a { color: var(--lexia-secondary); text-decoration: none; font-weight: 600; }
.message.assistant .bubble a:hover { text-decoration: underline; }

/* Sugerencias Rápidas (Chips) */
.lexia-suggestions {
    padding: 10px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lexia-suggestions span {
    background-color: white;
    border: 1px solid var(--lexia-border);
    color: var(--lexia-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.lexia-suggestions span:hover {
    background-color: var(--lexia-user-bubble);
    border-color: var(--lexia-secondary);
}

/* Área de Input */
.lexia-input-area {
    padding: 15px 20px;
    background-color: white;
    border-top: 1px solid var(--lexia-border);
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.lexia-input-area textarea {
    flex-grow: 1;
    border: 1px solid var(--lexia-border);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    resize: none;
    outline: none;
    background-color: var(--lexia-bg);
    transition: border-color 0.2s;
}

.lexia-input-area textarea:focus { border-color: var(--lexia-secondary); }

.lexia-input-area button {
    background-color: var(--lexia-secondary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.lexia-input-area button:disabled { background-color: #CBD5E0; cursor: not-allowed; }
.lexia-input-area button:hover:not(:disabled) { background-color: var(--lexia-primary); }

/* Indicador de "Escribiendo..." */
.typing-indicator { font-style: italic; color: #718096; }

/* Overlay (Opcional, oscurece el fondo del CRM) */
.lexia-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: rgba(0,0,0,0.3);
    z-index: 9998;
    backdrop-filter: blur(2px);
}
/* ===============================
   Sprint 8 - LegalOps UI
   =============================== */
.legalops-view .legalops-card {
    border-radius: 18px;
    overflow: hidden;
}
.legalops-metric {
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: 18px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    min-height: 96px;
}
.legalops-metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.legalops-metric-value {
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
    color: #111827;
}
.legalops-metric-label {
    color: #6b7280;
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.legalops-table-wrap {
    max-height: 520px;
    overflow: auto;
}
.legalops-view .form-label {
    color: #4b5563;
}
.legalops-view .badge {
    border-radius: 999px;
}
@media (max-width: 768px) {
    .legalops-metric { align-items: flex-start; }
    .legalops-metric-value { font-size: 1.5rem; }
}

/* Sprint 8.1 - LegalOps por pestañas */
.legalops-tab-nav .nav-link {
    border-radius: 14px;
    color: #536072;
    font-weight: 700;
    padding: 0.72rem 1rem;
    border: 1px solid transparent;
}
.legalops-tab-nav .nav-link.active {
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.10);
    border-color: rgba(13, 110, 253, 0.25);
    box-shadow: 0 8px 18px rgba(13, 110, 253, 0.08);
}
.legalops-tabs {
    border-radius: 18px;
}
@media (max-width: 768px) {
    .legalops-tab-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }
    .legalops-tab-nav .nav-link {
        white-space: nowrap;
    }
}

/* Sprint 8.2 - Searchable selects and LegalOps UX refinements */
.search-select { position: relative; width: 100%; }
.search-select-control { min-height: 38px; border: 1px solid #dee2e6; border-radius: .5rem; background: #fff; display: flex; align-items: center; gap: .35rem; padding: 0 .55rem; cursor: text; }
.search-select-control:focus-within { border-color: #0d6efd; box-shadow: 0 0 0 .2rem rgba(13,110,253,.12); }
.search-select-input { border: 0; outline: 0; width: 100%; min-width: 0; padding: .42rem 0; background: transparent; font-size: .95rem; }
.search-select-input::placeholder { color: #6c757d; opacity: .9; }
.search-select-clear { border: 0; background: transparent; color: #6c757d; font-size: 1.2rem; line-height: 1; padding: 0 .15rem; }
.search-select-icon { color: #6c757d; font-size: .75rem; }
.search-select-menu { position: absolute; z-index: 2055; top: calc(100% + 4px); left: 0; right: 0; max-height: 260px; overflow-y: auto; background: #fff; border: 1px solid #dee2e6; border-radius: .65rem; padding: .35rem; }
.search-select-option { width: 100%; border: 0; background: transparent; text-align: left; padding: .55rem .65rem; border-radius: .45rem; font-size: .9rem; color: #111827; }
.search-select-option:hover { background: #eef5ff; color: #0d6efd; }
.search-select-empty { padding: .65rem; color: #6c757d; font-size: .85rem; text-align: center; }
.multi-chip { display: inline-flex; align-items: center; gap: .35rem; background: #eaf2ff; color: #0d6efd; border: 1px solid rgba(13,110,253,.16); border-radius: 999px; padding: .25rem .55rem; margin: .1rem .2rem .1rem 0; font-size: .82rem; font-weight: 600; }
.multi-chip button { border: 0; background: transparent; color: #0d6efd; font-weight: 800; padding: 0; line-height: 1; }
.legalops-table-wrap { max-height: 440px; overflow: auto; }
.legalops-card { border-radius: 1rem; }

/* Sprint 10 - Gestión Documental + LexIA Templates */
.documents-view .doc-kpi {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    min-height: 92px;
}
.documents-view .doc-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.documents-view .doc-kpi h4 {
    margin: 0;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}
.documents-view .doc-kpi small {
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 10px;
}
.documents-view .analysis-list {
    display: grid;
    gap: 12px;
    max-height: 620px;
    overflow-y: auto;
    padding-right: 4px;
}
.documents-view .analysis-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #f8fafc;
    padding: 14px 16px;
}
.documents-view .empty-state-soft {
    border: 1px dashed rgba(37, 99, 235, 0.25);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(239, 246, 255, .85), rgba(255,255,255,.95));
    padding: 42px 28px;
    text-align: center;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* Sprint 10 Hotfix 6 - Corrección visual pestañas Documentos */
.document-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 6px 0 2px;
}
.document-tabs .legalops-tab {
    appearance: none;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: #ffffff;
    color: #475569;
    border-radius: 14px;
    min-height: 44px;
    padding: 10px 14px;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    transition: all .18s ease;
    white-space: nowrap;
}
.document-tabs .legalops-tab i {
    font-size: .95rem;
    margin-right: 0 !important;
}
.document-tabs .legalops-tab:hover {
    border-color: rgba(37, 99, 235, 0.25);
    color: #1d4ed8;
    background: #f8fbff;
    transform: translateY(-1px);
}
.document-tabs .legalops-tab.active {
    border-color: rgba(37, 99, 235, 0.28);
    background: linear-gradient(180deg, #eff6ff 0%, #e0ecff 100%);
    color: #1d4ed8;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
}
.document-tabs .legalops-tab:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}
@media (max-width: 992px) {
    .document-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
        scrollbar-width: thin;
    }
    .document-tabs .legalops-tab {
        flex: 0 0 auto;
    }
}

/* Sprint 11 - RAG Workbench */
.rag-result-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #ffffff;
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}
.rag-payload-preview {
    max-height: 320px;
    overflow: auto;
}

/* Sprint 12.2 - Forced RAG Workbench UI */
.rag-test-workbench {
    background: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}
.rag-result-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #ffffff;
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}
.rag-payload-preview {
    max-height: 320px;
    overflow: auto;
}

/* Sprint 12.3 - RAG Workbench exact insert */
.rag-test-workbench {
    background: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}
.rag-result-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #ffffff;
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}
.rag-payload-preview {
    max-height: 320px;
    overflow: auto;
}

/* Sprint 13 - LexIA RAG Answer */
.lexia-answer-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.white-space-preline {
    white-space: pre-line;
}


/* Sprint 14.1 - Toast notifications */
.lexis-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    width: min(420px, calc(100vw - 32px));
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}
.lexis-toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-left: 5px solid #2563eb;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
    padding: 14px 42px 14px 14px;
    overflow: hidden;
    pointer-events: auto;
    animation: lexisToastIn .22s ease-out both;
}
.lexis-toast-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    color: #2563eb;
    flex: 0 0 auto;
}
.lexis-toast-body strong {
    display: block;
    color: #0f172a;
    font-size: .94rem;
    line-height: 1.25;
}
.lexis-toast-body p {
    margin: 3px 0 0;
    color: #475569;
    font-size: .88rem;
    line-height: 1.35;
    white-space: pre-line;
}
.lexis-toast-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    padding: 4px;
    line-height: 1;
}
.lexis-toast-close:hover { color: #0f172a; }
.lexis-toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    transform-origin: left;
    background: currentColor;
    opacity: .35;
    animation-name: lexisToastProgress;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}
.lexis-toast-success { border-left-color: #16a34a; }
.lexis-toast-success .lexis-toast-icon { background: #dcfce7; color: #16a34a; }
.lexis-toast-danger { border-left-color: #dc2626; }
.lexis-toast-danger .lexis-toast-icon { background: #fee2e2; color: #dc2626; }
.lexis-toast-warning { border-left-color: #f59e0b; }
.lexis-toast-warning .lexis-toast-icon { background: #fef3c7; color: #d97706; }
.lexis-toast-info { border-left-color: #0891b2; }
.lexis-toast-info .lexis-toast-icon { background: #cffafe; color: #0891b2; }
@keyframes lexisToastIn {
    from { opacity: 0; transform: translateX(18px) translateY(-4px); }
    to { opacity: 1; transform: translateX(0) translateY(0); }
}
@keyframes lexisToastProgress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* Sprint 15 - RAG Upload */
.rag-upload-box {
    background: #f8fbff;
    border: 1px dashed rgba(37, 99, 235, 0.32);
    border-radius: 16px;
    padding: 14px;
}


/* Sprint 15.1 - UX cleanup */
[v-cloak] { display: none !important; }
.lexis-login-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px; position: relative; overflow: hidden; background: radial-gradient(circle at 20% 20%, rgba(37,99,235,.16), transparent 32%), radial-gradient(circle at 85% 10%, rgba(14,165,233,.14), transparent 28%), linear-gradient(135deg,#f8fbff 0%,#edf4ff 48%,#fff 100%); }
.lexis-login-bg-orb { position: absolute; border-radius: 999px; filter: blur(10px); opacity: .55; }
.lexis-login-bg-orb.orb-1 { width: 280px; height: 280px; background: #bfdbfe; left: -80px; bottom: -70px; }
.lexis-login-bg-orb.orb-2 { width: 220px; height: 220px; background: #a7f3d0; right: -40px; top: -40px; }
.lexis-login-card { width: min(1040px,100%); display: grid; grid-template-columns: 1.05fr .95fr; border-radius: 30px; overflow: hidden; box-shadow: 0 30px 80px rgba(15,23,42,.16); background: #fff; border: 1px solid rgba(15,23,42,.08); position: relative; z-index: 1; }
.lexis-login-brand-panel { padding: 52px; color: #fff; background: linear-gradient(135deg,rgba(15,23,42,.94),rgba(30,64,175,.92)); display: flex; flex-direction: column; justify-content: center; }
.brand-mark,.login-avatar { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; }
.brand-mark { background: rgba(255,255,255,.12); color: #bfdbfe; font-size: 1.8rem; margin-bottom: 24px; }
.login-avatar { background: #eff6ff; color: #2563eb; font-size: 1.8rem; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 800; margin-bottom: 12px; }
.lexis-login-brand-panel h1 { font-size: clamp(2rem,4vw,3.2rem); line-height: 1.02; font-weight: 800; margin-bottom: 16px; }
.lexis-login-brand-panel p { color: rgba(255,255,255,.78); font-size: 1.03rem; }
.login-proof-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 34px; }
.login-proof-grid div { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.14); border-radius: 18px; padding: 14px; }
.login-proof-grid strong { display: block; font-size: 1.1rem; }
.login-proof-grid small { color: rgba(255,255,255,.68); }
.lexis-login-form-panel { padding: 52px 46px; }
.lexis-login-input .input-group-text { background: #fff; border-right: 0; color: #64748b; }
.lexis-login-input .form-control { border-left: 0; }
.lexis-login-btn { border-radius: 16px; min-height: 52px; font-weight: 800; box-shadow: 0 14px 28px rgba(37,99,235,.22); }
.login-security-note { margin-top: 18px; color: #64748b; font-size: .86rem; display: flex; gap: 8px; align-items: center; justify-content: center; }
.rag-experience { padding-bottom: 28px; }
.rag-hero-card { background: linear-gradient(135deg,#fff 0%,#eef7ff 100%); border: 1px solid rgba(37,99,235,.12); border-radius: 24px; padding: 24px; box-shadow: 0 18px 45px rgba(15,23,42,.06); display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.rag-stepper { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.rag-step { background: #fff; border: 1px solid rgba(15,23,42,.08); border-radius: 20px; padding: 16px; box-shadow: 0 10px 26px rgba(15,23,42,.04); }
.rag-step span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 12px; background: #eff6ff; color: #2563eb; font-weight: 900; margin-bottom: 10px; }
.rag-step strong { display: block; } .rag-step small { color: #64748b; }
.rag-workbench-pro { background: #fff; border: 1px solid rgba(15,23,42,.08); border-radius: 26px; padding: 24px; box-shadow: 0 20px 55px rgba(15,23,42,.07); }
.rag-workbench-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.rag-panel { height: 100%; background: #f8fbff; border: 1px solid rgba(37,99,235,.12); border-radius: 22px; padding: 20px; }
.rag-panel h5 { font-weight: 800; margin-bottom: 6px; }
.rag-action-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.rag-action-wide { grid-column: 1 / -1; }
.rag-action-grid .btn,.rag-panel .btn { min-height: 46px; font-weight: 700; border-radius: 14px; }
@media (max-width: 991px) { .lexis-login-card { grid-template-columns: 1fr; } .lexis-login-brand-panel,.lexis-login-form-panel { padding: 34px; } .rag-stepper { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 575px) { .lexis-login-shell { padding: 16px; } .login-proof-grid,.rag-stepper,.rag-action-grid { grid-template-columns: 1fr; } .rag-hero-card { flex-direction: column; align-items: stretch; } }

/* Sprint 36 - Tenant enforcement UX */
.enforcement-ux-overlay{
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.42);
    backdrop-filter:blur(7px);
    z-index:10050;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:22px;
}
.enforcement-ux-card{
    width:min(560px,100%);
    background:#fff;
    border-radius:26px;
    padding:26px;
    display:grid;
    grid-template-columns:72px 1fr;
    gap:18px;
    box-shadow:0 30px 80px rgba(15,23,42,.28);
    border:1px solid rgba(148,163,184,.28);
}
.enforcement-ux-icon{
    width:72px;
    height:72px;
    border-radius:24px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:30px;
    background:#eff6ff;
    color:#2563eb;
}
.enforcement-ux-card.enforcement-blocked .enforcement-ux-icon{background:#fee2e2;color:#dc2626}
.enforcement-ux-card.enforcement-limited .enforcement-ux-icon{background:#fef3c7;color:#d97706}
.enforcement-ux-card.enforcement-warning_only .enforcement-ux-icon{background:#e0f2fe;color:#0284c7}
.enforcement-ux-card.enforcement-released .enforcement-ux-icon{background:#dcfce7;color:#16a34a}
.enforcement-ux-content h4{margin:0 0 8px;font-weight:800;color:#172033}
.enforcement-ux-content p{margin:0;color:#475569;line-height:1.5}
.enforcement-ux-details{
    margin-top:14px;
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}
.enforcement-ux-details span{
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:999px;
    padding:6px 10px;
    font-size:12px;
    color:#334155;
}
.enforcement-ux-actions{
    margin-top:20px;
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}
@media(max-width:560px){
    .enforcement-ux-card{grid-template-columns:1fr;text-align:center}
    .enforcement-ux-icon{margin:0 auto}
    .enforcement-ux-actions{justify-content:center}
    .enforcement-ux-details{justify-content:center}
}

/* Sprint 41.1 - Feedback visual para Flujo E2E LegalOps */
.legalops-processing-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(13,110,253,.10), rgba(13,202,240,.08));
    border: 1px solid rgba(13,110,253,.18);
    color: #0f172a;
}
.legalops-processing-banner small {
    display: block;
    color: #64748b;
    font-weight: 500;
}
.legalops-spinner {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #0d6efd;
    box-shadow: 0 8px 18px rgba(13,110,253,.12);
}
.legalops-result-card {
    border: 1px solid rgba(34,197,94,.12) !important;
}
.legalops-result-pill {
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 14px;
    padding: 12px;
    background: #fff;
    min-height: 72px;
}
.legalops-result-pill strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1;
    color: #111827;
}
.legalops-result-pill span {
    display: block;
    margin-top: 6px;
    font-size: .72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.legalops-result-table {
    max-height: 320px;
    overflow: auto;
    border: 1px solid rgba(15,23,42,.06);
    border-radius: 14px;
}

body.lexia-chat-open { overflow: hidden !important; }
.lexia-header,
.lexia-suggestions,
.lexia-input-area,
.lexia-inline-notice { flex: 0 0 auto; }
.lexia-visualizations,
.lexia-chart-card,
.lexia-message-body,
.message.assistant .bubble { min-width: 0; max-width: 100%; }
.lexia-quick-panel { overscroll-behavior: contain; }

/* Sprint 41.6.6 · LexIA Responses API + herramientas */
.lexia-header > div {
    min-width: 0;
}
.lexia-header small {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    line-height: 1.25;
}
.message.assistant .bubble .lexia-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
    margin: 8px 4px 4px 0;
    padding: 9px 13px;
    border: 1px solid rgba(43, 108, 176, 0.22);
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #edf6ff 100%);
    color: var(--lexia-secondary);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(26, 54, 93, 0.08);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
    overflow-wrap: anywhere;
}
.message.assistant .bubble .lexia-link-button:hover {
    transform: translateY(-1px);
    border-color: rgba(43, 108, 176, 0.48);
    box-shadow: 0 8px 18px rgba(26, 54, 93, 0.12);
    text-decoration: none;
}
.message.assistant .bubble .lexia-link-button i {
    flex: 0 0 auto;
    font-size: 11px;
}
.message.assistant .bubble ul,
.message.assistant .bubble ol {
    margin: 7px 0 7px 18px;
    padding: 0;
}
.message.assistant .bubble li {
    margin: 4px 0;
}
.lexia-line {
    min-height: 1px;
}
.lexia-spacer {
    height: 8px;
}
.lexia-table-wrap {
    width: 100%;
    margin: 8px 0;
    overflow-x: auto;
    border: 1px solid var(--lexia-border);
    border-radius: 10px;
    background: #fff;
}
.lexia-markdown-table {
    width: 100%;
    min-width: 500px;
    border-collapse: collapse;
    font-size: 11.5px;
}
.lexia-markdown-table th,
.lexia-markdown-table td {
    padding: 8px 9px;
    border-bottom: 1px solid var(--lexia-border);
    text-align: left;
    vertical-align: top;
}
.lexia-markdown-table th {
    background: #f1f5f9;
    color: var(--lexia-primary);
    font-weight: 700;
}
.lexia-markdown-table tr:last-child td {
    border-bottom: 0;
}
.lexia-tool-trace {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}
.lexia-tool-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1e40af;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
}
.lexia-tool-chip.is-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}
.lexia-tool-chip.is-warning {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #9a3412;
}
.lexia-processing-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--lexia-secondary);
    animation: lexiaPulse 1.1s ease-in-out infinite;
}
@keyframes lexiaPulse {
    0%, 100% { opacity: .35; transform: scale(.8); }
    50% { opacity: 1; transform: scale(1.15); }
}
@media (max-width: 576px) {
    .lexia-sidebar {
        width: 100vw;
        right: -100vw;
    }
    .message {
        max-width: 92%;
    }
    .message.assistant .bubble .lexia-link-button {
        width: 100%;
    }
}

/* Sprint 41.6.8 · Confirmaciones visuales */
.lexia-confirm-modal { border-radius: 24px; overflow: hidden; }
.lexia-confirm-icon { width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center; font-size: 1.65rem; }
.lexia-confirm-icon.is-primary { background: rgba(13,110,253,.11); color: #0d6efd; }
.lexia-confirm-icon.is-warning { background: rgba(255,193,7,.16); color: #8a6500; }
.lexia-confirm-icon.is-danger { background: rgba(220,53,69,.11); color: #dc3545; }
.lexia-confirm-icon.is-success { background: rgba(25,135,84,.11); color: #198754; }
.task-user-selector { min-width: 250px; }
.task-user-selector .form-select { border-radius: 10px; min-height: 38px; }

/* Sprint 41.6.8 · Dashboard analítico */
.dashboard-pro-view { --dash-border: #e7ebf2; --dash-text: #172033; }
.dashboard-pro-hero { display:flex; justify-content:space-between; align-items:flex-start; gap:24px; padding:28px 30px; border-radius:24px; color:#fff; background:linear-gradient(135deg,#13213c 0%,#1d3f72 58%,#315e9f 100%); box-shadow:0 18px 45px rgba(19,33,60,.18); }
.dashboard-pro-hero h2 { font-size:clamp(1.65rem,2.3vw,2.35rem); margin:.35rem 0 .45rem; font-weight:800; }
.dashboard-pro-hero p { margin:0; max-width:760px; color:rgba(255,255,255,.76); }
.dashboard-eyebrow { text-transform:uppercase; letter-spacing:.12em; font-size:.72rem; font-weight:800; color:#a9c8ff; }
.dashboard-generated { color:rgba(255,255,255,.66); font-size:.75rem; }
.dashboard-kpi-card { height:100%; padding:20px; border:1px solid var(--dash-border); border-radius:20px; background:#fff; box-shadow:0 10px 30px rgba(29,47,79,.06); position:relative; overflow:hidden; }
.dashboard-kpi-card.has-risk { border-color:rgba(220,53,69,.3); box-shadow:0 12px 30px rgba(220,53,69,.08); }
.dashboard-kpi-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:14px; margin-bottom:17px; }
.dashboard-kpi-icon.is-blue { color:#1f65d6; background:#eaf2ff; }
.dashboard-kpi-icon.is-violet { color:#7058d6; background:#f0edff; }
.dashboard-kpi-icon.is-red { color:#cf3f52; background:#fff0f2; }
.dashboard-kpi-icon.is-green { color:#1c8a5a; background:#eaf9f2; }
.dashboard-kpi-icon.is-amber { color:#a56d00; background:#fff7df; }
.dashboard-kpi-label { color:#6e7788; font-size:.78rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.dashboard-kpi-value { font-size:2rem; line-height:1.15; font-weight:850; color:var(--dash-text); margin:.35rem 0; }
.dashboard-kpi-context { color:#7b8494; font-size:.78rem; line-height:1.35; }
.dashboard-panel { background:#fff; border:1px solid var(--dash-border); border-radius:22px; padding:22px; box-shadow:0 10px 30px rgba(29,47,79,.05); }
.dashboard-panel-header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:22px; }
.dashboard-panel-header h5 { margin:0 0 4px; color:var(--dash-text); font-weight:800; }
.dashboard-panel-header p { margin:0; color:#7a8495; font-size:.82rem; }
.dashboard-panel-badge { background:#eef4ff; color:#245ea8; border:1px solid #dbe8fb; padding:7px 10px; border-radius:999px; font-size:.75rem; font-weight:700; }
.dashboard-bar-chart { height:260px; display:grid; grid-template-columns:repeat(7,minmax(32px,1fr)); gap:14px; align-items:end; padding:18px 8px 0; border-top:1px dashed #e5e9ef; }
.dashboard-bar-item { height:100%; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; min-width:0; }
.dashboard-bar-value { font-size:.72rem; font-weight:800; color:#4f5b70; margin-bottom:6px; }
.dashboard-bar-track { height:185px; width:min(36px,72%); background:#f1f4f8; border-radius:12px 12px 5px 5px; display:flex; align-items:flex-end; overflow:hidden; }
.dashboard-bar-fill { width:100%; min-height:8%; background:linear-gradient(180deg,#5d8be0,#275da7); border-radius:12px 12px 5px 5px; transition:height .35s ease; }
.dashboard-bar-label { font-size:.72rem; color:#788397; margin-top:8px; }
.dashboard-task-stack { display:flex; height:13px; background:#eef1f5; border-radius:999px; overflow:hidden; margin-bottom:18px; }
.dashboard-task-segment.is-new { background:#e25565; }
.dashboard-task-segment.is-progress { background:#e8ab2f; }
.dashboard-task-segment.is-closed { background:#3ea675; }
.dashboard-legend-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.dashboard-legend-grid > div { padding:12px; border-radius:14px; background:#f8f9fb; display:grid; grid-template-columns:auto 1fr; gap:2px 7px; align-items:center; }
.dashboard-legend-grid strong { font-size:1.15rem; color:#222c3e; }
.dashboard-legend-grid small { grid-column:2; color:#7a8495; }
.legend-dot { width:9px; height:9px; border-radius:50%; }
.legend-dot.is-new { background:#e25565; }.legend-dot.is-progress { background:#e8ab2f; }.legend-dot.is-closed { background:#3ea675; }
.dashboard-subtitle { font-size:.78rem; text-transform:uppercase; letter-spacing:.07em; color:#6e7788; font-weight:800; margin-bottom:12px; }
.dashboard-distribution-row { margin-bottom:12px; font-size:.82rem; color:#566176; }
.dashboard-distribution-row .progress { height:6px; margin-top:6px; background:#eef1f5; }
.dashboard-events-list { display:flex; flex-direction:column; gap:9px; }
.dashboard-event-item { width:100%; display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:12px; align-items:center; border:1px solid #edf0f4; background:#fff; border-radius:15px; padding:12px; text-align:left; transition:.18s ease; }
.dashboard-event-item:hover { transform:translateY(-1px); border-color:#cad8eb; box-shadow:0 8px 20px rgba(31,63,105,.07); }
.dashboard-event-icon { width:38px; height:38px; display:grid; place-items:center; border-radius:12px; background:#edf4ff; color:#2f65ad; }
.dashboard-event-copy { min-width:0; display:flex; flex-direction:column; }
.dashboard-event-copy strong { color:#263149; font-size:.84rem; }
.dashboard-event-copy small { color:#778195; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dashboard-event-date { font-size:.72rem; color:#8a93a3; white-space:nowrap; }
@media (max-width:767.98px){.dashboard-pro-hero{flex-direction:column;padding:22px}.dashboard-bar-chart{gap:7px}.dashboard-bar-track{width:24px}.dashboard-event-date{display:none}}

/* Telegram connection — Sprint 41.6.8 */
.telegram-link-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(25, 135, 84, .2);
    background: rgba(25, 135, 84, .07);
}
.telegram-status-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #198754;
    color: #fff;
    flex: 0 0 auto;
}
.telegram-qr-panel {
    padding: 18px;
    border-radius: 16px;
    border: 1px solid #e6eaf0;
    background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}
.telegram-step {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: var(--bs-primary, #0d6efd);
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
}
.telegram-qr-frame {
    width: min(100%, 236px);
    padding: 8px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #dde4ee;
    box-shadow: 0 12px 30px rgba(20, 41, 74, .12);
}
.telegram-bot-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(13, 110, 253, .09);
    color: #0b5ed7;
    font-size: .8rem;
    font-weight: 700;
}
.telegram-expiry-note {
    font-size: .72rem;
    color: #687386;
}
.task-assignment-summary {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 7px 9px;
    border-radius: 9px;
    background: rgba(20, 41, 74, .045);
    color: #566176;
    font-size: .72rem;
}

/* ==========================================================
   Sprint 41.6.8 — LexIA expandible, RBAC, procesos y Telegram
   ========================================================== */
.lexia-sidebar {
    right: -110vw;
    width: 420px;
    max-width: calc(100vw - 24px);
    transition: right .28s ease, width .28s ease, height .28s ease, top .28s ease, border-radius .28s ease;
}
.lexia-sidebar.is-open { right: 0; }
.lexia-sidebar.lexia-size-wide { width: min(860px, 78vw); }
.lexia-sidebar.lexia-size-fullscreen {
    width: calc(100vw - 32px);
    max-width: none;
    height: calc(100vh - 32px);
    top: 16px;
    right: -110vw;
    border-radius: 22px;
    overflow: hidden;
}
.lexia-sidebar.lexia-size-fullscreen.is-open { right: 16px; }
.lexia-header { gap: 14px; }
.lexia-header-copy { min-width: 0; }
.lexia-header-copy h4 { margin-bottom: 2px; }
.lexia-header-copy small { display: block; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lexia-header-actions { display: flex; align-items: center; gap: 7px; }
.lexia-header-btn,
.lexia-icon-button {
    border: 0;
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255,255,255,.14);
    color: inherit;
    transition: .18s ease;
}
.lexia-header-btn:hover,
.lexia-header-btn.active { background: rgba(255,255,255,.26); transform: translateY(-1px); }
.lexia-quick-panel {
    position: absolute;
    top: 72px;
    right: 14px;
    z-index: 8;
    width: min(390px, calc(100% - 28px));
    max-height: calc(100% - 150px);
    overflow-y: auto;
    padding: 14px;
    border: 1px solid #e4e9f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(27,45,75,.2);
}
.lexia-quick-panel-header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding-bottom:12px; border-bottom:1px solid #edf0f4; }
.lexia-quick-panel-header strong { display:block; color:#27324a; }
.lexia-quick-panel-header small { display:block; color:#7d8797; margin-top:2px; }
.lexia-quick-panel .lexia-icon-button { background:#f2f5f8; color:#596477; }
.lexia-quick-section { padding-top:12px; }
.lexia-quick-section-title { text-transform:uppercase; letter-spacing:.08em; font-size:.67rem; font-weight:800; color:#8992a1; margin-bottom:7px; }
.lexia-quick-item { width:100%; display:flex; align-items:center; gap:10px; border:0; background:transparent; border-radius:13px; padding:9px; text-align:left; color:#2d374b; }
.lexia-quick-item:hover { background:#f4f7fb; }
.lexia-quick-item > span:last-child { min-width:0; display:flex; flex-direction:column; }
.lexia-quick-item strong { font-size:.8rem; }
.lexia-quick-item small { color:#7b8494; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:290px; }
.lexia-quick-icon { width:34px; height:34px; flex:0 0 auto; display:grid; place-items:center; border-radius:10px; background:#edf4ff; color:#2963ac; }
.lexia-quick-user-row { display:flex; align-items:center; gap:4px; }
.lexia-quick-delete { border:0; background:transparent; color:#a74b56; width:34px; height:34px; border-radius:9px; }
.lexia-quick-delete:hover { background:#fff0f2; }
.lexia-quick-empty { color:#8490a1; font-size:.78rem; padding:12px; background:#f7f9fb; border-radius:12px; text-align:center; }
.lexia-inline-notice { margin:8px 12px 0; padding:8px 11px; border-radius:10px; font-size:.76rem; display:flex; align-items:center; gap:7px; }
.lexia-inline-notice.is-success { background:#eaf8f0; color:#147348; }
.lexia-inline-notice.is-warning { background:#fff5df; color:#8a5a00; }
.lexia-message-body { display:flex; flex-direction:column; align-items:flex-start; max-width:100%; }
.message.user .lexia-message-body { align-items:flex-end; }
.lexia-save-quick { margin-top:5px; border:0; background:transparent; color:#7a8495; font-size:.68rem; padding:4px 7px; border-radius:8px; opacity:.72; }
.lexia-save-quick:hover { background:#f0f3f7; opacity:1; }
.lexia-save-quick.saved { color:#24704c; }
.lexia-size-wide .message.assistant,
.lexia-size-fullscreen .message.assistant { max-width:96%; }
.lexia-size-wide .lexia-markdown-table,
.lexia-size-fullscreen .lexia-markdown-table { min-width:680px; }
.lexia-size-fullscreen .lexia-messages { padding-left:clamp(18px,5vw,90px); padding-right:clamp(18px,5vw,90px); }

.telegram-sidebar-zone { margin-top: auto; }
.telegram-compact-status {
    display:flex;
    align-items:center;
    gap:9px;
    padding:9px 10px;
    border:1px solid rgba(25,135,84,.14);
    border-radius:12px;
    background:rgba(25,135,84,.045);
    color:#536071;
}
.telegram-compact-icon { width:28px; height:28px; border-radius:9px; display:grid; place-items:center; background:#eaf3ff; color:#229ed9; }
.telegram-compact-copy { display:flex; flex-direction:column; min-width:0; flex:1; text-align:left; }
.telegram-compact-copy strong { font-size:.72rem; color:#334055; line-height:1.2; }
.telegram-compact-copy small { font-size:.64rem; color:#8490a0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.telegram-connect-card { border:1px solid #edf0f4 !important; }
.telegram-connect-heading { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.telegram-connect-heading > i { font-size:1.8rem; }
.telegram-connect-heading strong { display:block; color:#344158; font-size:.82rem; }
.telegram-connect-heading small { display:block; color:#818b9a; font-size:.67rem; }
.telegram-connect-card .telegram-qr-panel { padding:10px; }
.telegram-connect-card .telegram-qr-frame { width:min(100%,190px); }

.process-create-icon { width:50px; height:50px; display:grid; place-items:center; border-radius:15px; background:#edf4ff; color:#2965ad; font-size:1.2rem; flex:0 0 auto; }
.process-modal-header { padding:22px 24px; background:linear-gradient(135deg,#f2f7ff,#fff); }
.process-modal-eyebrow { display:block; text-transform:uppercase; letter-spacing:.1em; color:#2b68b1; font-size:.66rem; font-weight:800; margin-bottom:3px; }
.process-modal-tip { background:#eef6ff; color:#345e8f; }

.team-access-tabs { display:inline-flex; gap:5px; padding:5px; border:1px solid #e7ebf1; background:#fff; border-radius:14px; box-shadow:0 5px 18px rgba(31,52,83,.05); }
.team-access-tab { border:0; background:transparent; border-radius:10px; padding:9px 14px; color:#697487; font-weight:700; font-size:.82rem; }
.team-access-tab.active { background:#edf4ff; color:#235f9f; }
.role-card { border:1px solid #edf0f4 !important; transition:.18s ease; }
.role-card:hover { transform:translateY(-2px); box-shadow:0 14px 35px rgba(30,52,85,.09)!important; }
.role-key-pill { display:inline-flex; padding:4px 8px; border-radius:999px; background:#f1f4f8; color:#6e7888; font-family:monospace; font-size:.64rem; }
.role-icon { width:42px; height:42px; border-radius:13px; display:grid; place-items:center; background:#edf4ff; color:#2c66ab; }
.role-permission-summary { display:flex; align-items:baseline; gap:6px; padding:11px 12px; background:#f7f9fc; border-radius:12px; margin:12px 0; }
.role-permission-summary strong { color:#244e7d; font-size:1.15rem; }
.role-permission-summary span { color:#7a8494; font-size:.72rem; }
.role-permission-preview { display:flex; flex-wrap:wrap; gap:5px; }
.role-permission-preview span { padding:4px 7px; background:#f2f5f8; color:#687386; border-radius:7px; font-size:.61rem; }
.role-permission-preview small { color:#8c95a3; align-self:center; }
.permission-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.permission-group { border:1px solid #e8ecf2; border-radius:15px; padding:13px; background:#fff; }
.permission-group-title { display:flex; justify-content:space-between; align-items:center; font-weight:800; color:#354157; margin-bottom:9px; }
.permission-group-title small { background:#edf3fb; color:#3f6f9f; border-radius:999px; padding:3px 7px; }
.permission-option { display:flex; align-items:flex-start; gap:9px; padding:9px; border-radius:10px; cursor:pointer; border:1px solid transparent; }
.permission-option:hover { background:#f7f9fc; }
.permission-option.selected { background:#f0f6ff; border-color:#d7e6fa; }
.permission-option input { margin-top:3px; }
.permission-option span { display:flex; flex-direction:column; }
.permission-option strong { color:#465166; font-size:.75rem; }
.permission-option small { color:#8490a1; font-size:.66rem; margin-top:2px; }

@media (max-width: 991.98px) {
    .permission-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .lexia-sidebar.lexia-size-wide { width:calc(100vw - 16px); max-width:none; }
}
@media (max-width: 575.98px) {
    .lexia-sidebar,
    .lexia-sidebar.lexia-size-wide,
    .lexia-sidebar.lexia-size-fullscreen { width:100vw; max-width:none; height:100vh; top:0; border-radius:0; }
    .lexia-sidebar.lexia-size-fullscreen.is-open { right:0; }
    .permission-grid { grid-template-columns:1fr; }
    .team-access-tabs { width:100%; }
    .team-access-tab { flex:1; }
}

/* =========================================================
   SPRINT 41.6.10 · LEXIA UX STABILITY + TOPBAR CONTEXT
   ========================================================= */
:root {
    --exec-ink: #17233a;
    --exec-muted: #64748b;
    --exec-surface: #ffffff;
    --exec-line: #e6ebf2;
    --exec-bg: #f3f6fb;
    --exec-navy: #152b4b;
    --exec-blue: #3157d5;
    --exec-teal: #18a57a;
    --exec-amber: #f4a62a;
    --exec-danger: #d95162;
    --exec-radius: 20px;
    --exec-shadow: 0 12px 34px rgba(29, 45, 78, .08);
}
body { background: radial-gradient(circle at top right, rgba(49,87,213,.055), transparent 32%), var(--exec-bg); color: var(--exec-ink); }
#page-content-wrapper > nav { position: sticky; top: 0; z-index: 890; background: rgba(255,255,255,.88) !important; backdrop-filter: blur(18px); border-bottom: 1px solid rgba(220,226,237,.78) !important; }
.executive-content-shell { max-width: 1900px; margin: 0 auto; }
.topbar-context-chips { align-items:center; gap:8px; min-width:0; }
.topbar-context-chip {
    display:inline-flex;
    align-items:center;
    gap:7px;
    min-height:34px;
    padding:6px 10px;
    border:1px solid #e7ebf1;
    border-radius:999px;
    background:#f8fafc;
    color:#667386;
    font-size:.72rem;
    font-weight:700;
    white-space:nowrap;
}
.topbar-context-chip i { font-size:.72rem; }
.topbar-context-chip.is-healthy { background:#eef9f4; border-color:#d6eee3; color:#24704c; }
.topbar-context-chip.is-risk { background:#fff2f3; border-color:#f3d9dd; color:#a53e4b; }
.card, .dashboard-panel, .legalops-card { border-radius:var(--exec-radius) !important; border:1px solid rgba(226,231,240,.78) !important; box-shadow:var(--exec-shadow) !important; }
.table { --bs-table-bg: transparent; }
.table thead th { color:#52617a; font-size:.7rem; letter-spacing:.055em; text-transform:uppercase; border-bottom-color:#dfe5ee; padding-top:.9rem; padding-bottom:.9rem; }
.table tbody td { border-bottom-color:#edf0f5; padding-top:.85rem; padding-bottom:.85rem; }
.form-control, .form-select, .search-select-control { border-radius:12px !important; border-color:#dce3ee; min-height:44px; box-shadow:none !important; }
.form-control:focus, .form-select:focus, .search-select-control:focus-within { border-color:#6f8ee9; box-shadow:0 0 0 4px rgba(49,87,213,.08) !important; }
.btn { border-radius:11px; font-weight:650; }
.modal-content { border-radius:24px !important; overflow:hidden; }
.list-group-item { margin-left:10px; margin-right:10px; padding:11px 14px; }

/* Catálogos jurídicos seleccionables y extensibles */
.catalog-combo { position:relative; }
.catalog-combo .search-select-menu { z-index:1085; }
.catalog-create-option { color:#2456c4; background:#f0f5ff; border-top:1px solid #dfe8fb; }
.catalog-create-option:hover { background:#e7efff; }
.catalog-combo .search-select-option { display:flex; justify-content:space-between; align-items:center; gap:12px; }

/* Permisos granulares */
.permission-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:16px; align-items:start; }
.permission-group-granular { padding:0; overflow:hidden; }
.permission-group-granular > .permission-group-title { padding:14px 15px; margin:0; background:linear-gradient(180deg,#f8faff,#f4f7fb); border-bottom:1px solid #e5eaf2; }
.permission-section { padding:12px 14px 14px; border-bottom:1px solid #edf0f5; }
.permission-section:last-child { border-bottom:0; }
.permission-section-title { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; color:#738096; font-size:.68rem; font-weight:850; text-transform:uppercase; letter-spacing:.075em; }
.permission-section-title small { border-radius:999px; background:#eef2f8; padding:2px 7px; }
.permission-option span em { display:inline-flex; margin-top:5px; padding:2px 7px; border-radius:999px; background:#f1f4f8; color:#718096; font-size:.62rem; font-style:normal; font-weight:750; text-transform:uppercase; letter-spacing:.04em; }

/* Visualizaciones dentro de LexIA */
.lexia-visualizations { width:min(100%, 920px); margin-top:10px; display:grid; gap:12px; }
.lexia-chart-card { background:#fff; border:1px solid #dfe6f0; border-radius:18px; padding:15px; box-shadow:0 12px 30px rgba(28,47,80,.08); }
.lexia-chart-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding-bottom:12px; border-bottom:1px solid #edf0f5; }
.lexia-chart-header strong { display:block; color:#1d2c46; font-size:.92rem; }
.lexia-chart-header small { display:block; color:#7a8799; margin-top:3px; font-size:.7rem; }
.lexia-chart-source { display:inline-flex; gap:6px; align-items:center; border-radius:999px; padding:5px 8px; color:#3157d5; background:#edf2ff; font-size:.63rem; font-weight:850; }
.lexia-chart-empty { padding:28px 10px; text-align:center; color:#7a8799; font-size:.78rem; }
.lexia-bar-chart { display:grid; gap:11px; padding:14px 0 4px; }
.lexia-bar-meta { display:flex; justify-content:space-between; align-items:center; gap:12px; font-size:.72rem; }
.lexia-bar-meta span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#49566b; }
.lexia-bar-meta strong { color:#243752; white-space:nowrap; }
.lexia-bar-track { height:9px; border-radius:999px; background:#edf1f6; overflow:hidden; }
.lexia-bar-track span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#3157d5,#5f7fe3); min-width:4px; }
.lexia-donut-layout { display:grid; grid-template-columns:minmax(150px,190px) 1fr; gap:22px; align-items:center; padding:18px 6px 8px; }
.lexia-donut { width:165px; aspect-ratio:1; border-radius:50%; display:grid; place-items:center; position:relative; margin:auto; }
.lexia-donut::after { content:''; position:absolute; inset:25px; border-radius:50%; background:#fff; box-shadow:inset 0 0 0 1px #edf0f5; }
.lexia-donut > div { position:relative; z-index:1; text-align:center; }
.lexia-donut strong { display:block; color:#1d2c46; font-size:1.35rem; line-height:1; }
.lexia-donut small { display:block; color:#7a8799; font-size:.65rem; margin-top:5px; }
.lexia-donut-legend { display:grid; gap:8px; }
.lexia-donut-legend > div { display:grid; grid-template-columns:10px 1fr auto; align-items:center; gap:8px; color:#536076; font-size:.72rem; }
.lexia-donut-legend > div > span:first-child { width:9px; height:9px; border-radius:50%; }
.lexia-donut-legend strong { color:#243752; }
.lexia-line-chart { padding:12px 2px 0; }
.lexia-line-chart svg { width:100%; height:auto; overflow:visible; }
.lexia-grid-line { stroke:#e9edf3; stroke-width:1; }
.lexia-line-path { fill:none; stroke:#3157d5; stroke-width:4; stroke-linecap:round; stroke-linejoin:round; }
.lexia-line-point { fill:#fff; stroke:#3157d5; stroke-width:3; }
.lexia-line-axis { display:flex; justify-content:space-between; color:#8a95a6; font-size:.64rem; padding:0 6px; }
.lexia-chart-footer { display:flex; justify-content:space-between; gap:12px; color:#8a95a6; font-size:.62rem; margin-top:12px; padding-top:9px; border-top:1px solid #edf0f5; }

@media (max-width: 575.98px) {
    .executive-content-shell { padding-left:12px !important; padding-right:12px !important; }
    .lexia-donut-layout { grid-template-columns:1fr; }
    .lexia-chart-footer { flex-direction:column; gap:3px; }
}

/* =========================================================
   SPRINT 41.7.0 · DOCUMENT INTELLIGENCE CENTER
   ========================================================= */
.doc-executive{--doc-navy:#13213c;--doc-blue:#2f6bff;--doc-soft:#f5f7fb;--doc-border:#e2e8f0;--doc-muted:#64748b;color:#172033}
.doc-hero{position:relative;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:28px 30px;border-radius:24px;background:linear-gradient(135deg,#13213c 0%,#1d3f72 62%,#2f6bff 145%);color:#fff;box-shadow:0 18px 44px rgba(19,33,60,.18);overflow:visible}
.doc-hero:after{content:"";position:absolute;right:18%;top:-65px;width:210px;height:210px;border-radius:50%;background:rgba(255,255,255,.06);pointer-events:none}
.doc-hero h2{font-size:clamp(1.6rem,2.3vw,2.35rem);font-weight:800;letter-spacing:-.035em}.doc-hero p{max-width:760px;color:#dce8ff;font-size:.98rem;line-height:1.55}.doc-eyebrow,.doc-section-kicker{display:block;font-size:.68rem;font-weight:800;letter-spacing:.13em;color:#82b5ff;margin-bottom:5px}.doc-hero-actions{position:relative;z-index:3;display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.doc-hero .btn{min-height:42px;border-radius:13px;font-weight:700}.doc-hero .btn-outline-light{border-color:rgba(255,255,255,.35)}
.doc-global-search{position:relative;z-index:5;padding:18px;border:1px solid #dce5f1;background:#fff;border-radius:20px;box-shadow:0 18px 45px rgba(28,48,84,.09)}.doc-global-search .input-group>*{min-height:48px}.doc-search-results{max-height:480px;overflow:auto;padding-right:4px}.doc-search-grid{display:grid;gap:8px}.doc-search-result{display:flex;align-items:center;gap:12px;width:100%;padding:12px 14px;border:1px solid var(--doc-border);border-radius:14px;background:#fff;transition:.18s ease}.doc-search-result:hover{border-color:#a9c4ff;background:#f8fbff;transform:translateY(-1px)}.doc-search-result small{display:block;color:var(--doc-muted);margin-top:3px}.doc-result-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#eaf1ff;color:var(--doc-blue)}.doc-semantic-results{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px}.doc-semantic-card{padding:14px;border-radius:14px;background:#f8fafc;border:1px solid var(--doc-border)}.doc-semantic-card p{margin:7px 0 0;color:#4b5d75;font-size:.86rem;line-height:1.5}
.doc-inline-alert,.doc-schema-alert{border-radius:16px;border-width:1px;box-shadow:0 6px 18px rgba(30,52,89,.05)}
.doc-command-grid{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:14px}.doc-command-card{display:flex;align-items:center;gap:13px;padding:17px;background:#fff;border:1px solid var(--doc-border);border-radius:18px;box-shadow:0 8px 25px rgba(29,47,79,.045);min-height:104px}.doc-command-card.health{background:linear-gradient(145deg,#f0f6ff,#fff);border-color:#cfe0ff}.doc-command-icon{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border-radius:14px;background:#eaf1ff;color:#2f6bff;font-size:1.1rem}.doc-command-icon.green{background:#eef9f4;color:#16a34a}.doc-command-icon.violet{background:#f3efff;color:#7058d6}.doc-command-icon.cyan{background:#e9faff;color:#008bbf}.doc-command-card span,.doc-command-card small{display:block;color:var(--doc-muted);font-size:.73rem}.doc-command-card strong{display:block;font-size:1.65rem;line-height:1.05;margin:3px 0;color:var(--doc-navy);font-weight:800}
.doc-tabs{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;padding:7px;background:#e9eef6;border-radius:18px}.doc-tabs button{display:flex;align-items:center;gap:10px;min-width:0;border:0;background:transparent;border-radius:13px;padding:12px 13px;text-align:left;color:#5b6b82;transition:.18s ease}.doc-tabs button>i{font-size:1rem}.doc-tabs button span{font-weight:800;font-size:.86rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.doc-tabs button small{display:block;font-weight:500;font-size:.68rem;color:#7c8aa0;margin-top:2px}.doc-tabs button.active{background:#fff;color:var(--doc-blue);box-shadow:0 7px 17px rgba(25,46,80,.08)}
.doc-workspace{padding:24px;background:#fff;border:1px solid var(--doc-border);border-radius:22px;box-shadow:0 12px 35px rgba(28,48,84,.045)}.doc-section-header{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:20px}.doc-section-header h3{font-size:1.35rem;font-weight:800;color:var(--doc-navy);margin:0 0 4px}.doc-section-header p{max-width:760px;color:var(--doc-muted);font-size:.88rem;margin:0}.doc-section-header .doc-section-kicker{color:var(--doc-blue)}
.doc-filter-bar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:12px;background:#f7f9fc;border:1px solid #e7ecf3;border-radius:16px;margin-bottom:14px}.doc-filter-bar select,.doc-filter-bar input{border:1px solid #dce3ed;border-radius:10px;background:#fff;min-height:38px;padding:7px 10px;font-size:.83rem;color:#34435a}.doc-filter-search{display:flex;align-items:center;gap:7px;flex:1 1 220px;background:#fff;border:1px solid #dce3ed;border-radius:10px;padding:0 10px}.doc-filter-search input{border:0!important;outline:none;width:100%;padding-left:0}.doc-filter-search i{color:#8a98aa}.doc-bulk-bar{display:flex;align-items:center;gap:8px;padding:10px 13px;margin-bottom:12px;border-radius:13px;background:#eef4ff;border:1px solid #cfddff;color:#1e438a}.doc-bulk-bar strong{margin-right:auto}
.doc-table-shell{overflow:auto;border:1px solid var(--doc-border);border-radius:16px}.doc-data-table{min-width:1020px}.doc-data-table thead th{position:sticky;top:0;z-index:1;padding:12px 13px;background:#f5f8fc!important;color:#516178;font-size:.7rem;letter-spacing:.035em;text-transform:uppercase;border-bottom:1px solid #dfe6ef}.doc-data-table tbody td{padding:13px;border-color:#edf1f6;vertical-align:middle;font-size:.82rem}.doc-data-table tbody tr:hover{background:#fbfdff}.doc-data-table small{display:block;color:var(--doc-muted);font-size:.72rem;margin-top:3px}.doc-title-cell{display:flex;align-items:center;gap:10px;min-width:240px}.doc-file-icon{display:grid;place-items:center;width:37px;height:37px;flex:0 0 37px;border-radius:11px;background:#eef4ff;color:var(--doc-blue);font-size:1rem}.doc-title-link{border:0;background:transparent;padding:0;color:#1d3f72;font-weight:800;text-align:left;line-height:1.3}.doc-title-link:hover{color:var(--doc-blue);text-decoration:underline}.doc-status-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:6px;background:#f4b400}.doc-status-dot.success{background:#16a34a}.doc-status-dot.danger{background:#e5484d}.doc-status-dot.warning{background:#f4b400}.doc-pagination{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:14px;color:var(--doc-muted);font-size:.8rem}.doc-pagination>div{display:flex;align-items:center;gap:8px}
.doc-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(285px,1fr));gap:15px}.doc-template-card{display:flex;flex-direction:column;min-height:260px;padding:18px;border:1px solid var(--doc-border);border-radius:18px;background:#fff;transition:.18s ease}.doc-template-card:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(28,48,84,.08);border-color:#bfd0f3}.doc-template-card header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.doc-template-card h4{font-size:1rem;font-weight:800;color:var(--doc-navy);margin:13px 0 4px}.doc-template-card p{color:var(--doc-muted);font-size:.8rem;line-height:1.45;min-height:38px}.doc-template-meta{display:flex;gap:7px;flex-wrap:wrap;margin:8px 0}.doc-template-meta span{padding:4px 7px;border-radius:8px;background:#f5f7fb;color:#596a80;font-size:.7rem}.doc-template-card footer{display:flex;gap:7px;margin-top:auto;padding-top:14px;border-top:1px solid #edf1f6}.doc-analysis-list{display:grid;gap:12px}.doc-analysis-card{padding:17px;border-radius:17px;border:1px solid var(--doc-border);background:#fff}.doc-analysis-card header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.doc-analysis-card h4{font-size:1rem;font-weight:800;color:var(--doc-navy)}.doc-analysis-card p{color:#4d5e74;line-height:1.55;margin:8px 0}.doc-analysis-card footer{display:flex;justify-content:flex-end;gap:7px}
.doc-memory-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}.doc-memory-grid article{padding:16px;border:1px solid var(--doc-border);border-radius:17px;background:#f8fafc}.doc-memory-grid article.success{background:#f0faf5;border-color:#cceedd}.doc-memory-grid article.warning{background:#fff9e9;border-color:#f3df9b}.doc-memory-grid span,.doc-memory-grid small{display:block;color:var(--doc-muted);font-size:.72rem}.doc-memory-grid strong{display:block;font-size:1.55rem;color:var(--doc-navy);font-weight:800}.doc-memory-test,.doc-memory-sources{height:100%;padding:19px;border:1px solid var(--doc-border);border-radius:18px;background:#f9fbfd}.doc-memory-test h4,.doc-memory-sources h4{font-size:1rem;font-weight:800;color:var(--doc-navy)}.doc-memory-test p{font-size:.8rem;color:var(--doc-muted)}.doc-memory-answer{padding:14px;background:#fff;border:1px solid #dce5f1;border-radius:14px;font-size:.82rem;line-height:1.55}.doc-source-list{display:flex;flex-direction:column;gap:6px;margin-top:12px}.doc-source-chip{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid #dce5f1;border-radius:10px;background:#f8fafc;text-align:left;color:#365171;font-size:.74rem}.doc-source-chip span{display:grid;place-items:center;flex:0 0 22px;width:22px;height:22px;border-radius:50%;background:#2f6bff;color:#fff;font-weight:800}.doc-source-rows{display:flex;flex-direction:column;gap:7px;max-height:470px;overflow:auto}.doc-source-rows article{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid #e2e8f0;border-radius:12px;background:#fff}.doc-source-rows article strong,.doc-source-rows article small{display:block}.doc-source-rows article strong{font-size:.82rem;color:#243653}.doc-source-rows article small{font-size:.69rem;color:var(--doc-muted)}.doc-source-type{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;border-radius:10px;background:#eaf1ff;color:#2f6bff}
.doc-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:180px;padding:30px;text-align:center;color:#728197}.doc-empty i{font-size:1.8rem;color:#a7b5c8}.doc-empty strong{color:#35455d}.doc-empty.compact{min-height:75px;padding:15px;flex-direction:row}.doc-empty.compact i{font-size:1rem}
.lexis-modal-backdrop{position:fixed;inset:0;z-index:1090;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(12,24,45,.55);backdrop-filter:blur(6px);overflow:auto}.lexis-modal{display:flex;flex-direction:column;width:min(680px,100%);max-height:calc(100vh - 48px);background:#fff;border-radius:22px;box-shadow:0 28px 80px rgba(8,20,43,.28);overflow:hidden;animation:docModalIn .2s ease}.lexis-modal.doc-modal-lg{width:min(860px,100%)}.lexis-modal.doc-modal-xl{width:min(1160px,100%)}.lexis-modal>header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:20px 23px;border-bottom:1px solid var(--doc-border);background:#fbfcfe}.lexis-modal>header h3{font-size:1.25rem;font-weight:800;color:var(--doc-navy);margin:1px 0}.lexis-modal>header p{margin:0;color:var(--doc-muted);font-size:.8rem}.lexis-modal>.modal-body{overflow:auto;padding:22px}.lexis-modal>footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:15px 22px;border-top:1px solid var(--doc-border);background:#fbfcfe}.doc-upload-zone{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;min-height:125px;padding:20px;border:2px dashed #bfd0e8;border-radius:16px;background:#f8fbff;text-align:center;cursor:pointer}.doc-upload-zone:hover{border-color:#2f6bff;background:#f1f6ff}.doc-upload-zone i{font-size:1.5rem;color:#2f6bff}.doc-upload-zone input{max-width:100%}.doc-detail-layout{display:grid;grid-template-columns:185px 1fr;gap:22px;min-height:460px}.doc-detail-layout>aside{display:flex;flex-direction:column;gap:5px;padding-right:14px;border-right:1px solid var(--doc-border)}.doc-detail-layout>aside button{border:0;background:transparent;text-align:left;padding:10px 11px;border-radius:10px;color:#66768c;font-size:.8rem;font-weight:700}.doc-detail-layout>aside button.active{background:#eaf1ff;color:#2f6bff}.doc-detail-meta{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.doc-detail-meta span{padding:11px;border-radius:12px;background:#f6f8fb;color:#5e6d82;font-size:.75rem}.doc-detail-meta strong{display:block;color:#263950;margin-bottom:4px}.doc-text-preview{margin-top:14px;max-height:440px;overflow:auto;padding:20px;border:1px solid var(--doc-border);border-radius:14px;background:#fbfcfd;white-space:pre-wrap;font-family:Georgia,serif;line-height:1.65;color:#27354a}.doc-timeline{display:flex;flex-direction:column;gap:12px}.doc-timeline article{display:flex;align-items:flex-start;gap:12px;padding:13px;border:1px solid var(--doc-border);border-radius:13px}.doc-timeline article>span{display:grid;place-items:center;min-width:38px;height:30px;border-radius:9px;background:#eaf1ff;color:#2f6bff;font-size:.72rem;font-weight:800}.doc-timeline article>div{flex:1}.doc-timeline small,.doc-timeline p{display:block;margin:3px 0;color:var(--doc-muted);font-size:.75rem}.doc-comments article{padding:12px 0;border-bottom:1px solid #edf1f5}.doc-comments strong,.doc-comments small{display:block}.doc-comments small{color:var(--doc-muted);font-size:.7rem}.doc-comments p{margin:5px 0 0}.doc-editor-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.doc-editor-toolbar select{max-width:220px}.doc-draft-editor{min-height:480px!important;resize:vertical;font-family:Georgia,"Times New Roman",serif;line-height:1.65;font-size:1rem}.doc-analysis-detail h5{font-size:.83rem;text-transform:uppercase;letter-spacing:.05em;color:#59708d;margin:18px 0 7px}.doc-analysis-detail p,.doc-analysis-detail div{font-size:.9rem;line-height:1.6;color:#34465f}
@keyframes docModalIn{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:none}}
@media(max-width:1350px){.doc-command-grid{grid-template-columns:repeat(3,1fr)}.doc-memory-grid{grid-template-columns:repeat(3,1fr)}.doc-tabs{grid-template-columns:repeat(3,1fr)}}
@media(max-width:992px){.doc-hero{align-items:flex-start;flex-direction:column}.doc-hero-actions{width:100%;justify-content:flex-start}.doc-command-grid{grid-template-columns:repeat(2,1fr)}.doc-tabs{display:flex;overflow:auto}.doc-tabs button{min-width:210px}.doc-memory-grid{grid-template-columns:repeat(2,1fr)}.doc-detail-layout{grid-template-columns:1fr}.doc-detail-layout>aside{display:flex;flex-direction:row;overflow:auto;border-right:0;border-bottom:1px solid var(--doc-border);padding:0 0 10px}.doc-detail-layout>aside button{white-space:nowrap}.doc-detail-meta{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.doc-workspace{padding:15px}.doc-hero{padding:21px}.doc-hero-actions .btn{flex:1}.doc-command-grid,.doc-memory-grid{grid-template-columns:1fr}.doc-section-header{flex-direction:column}.doc-filter-bar>*{width:100%}.doc-pagination{align-items:flex-start;flex-direction:column}.lexis-modal-backdrop{padding:0;align-items:stretch}.lexis-modal,.lexis-modal.doc-modal-lg,.lexis-modal.doc-modal-xl{width:100%;height:100%;max-height:100vh;border-radius:0}.doc-detail-meta{grid-template-columns:1fr}.doc-card-grid{grid-template-columns:1fr}.doc-draft-editor{min-height:55vh!important}}


/* Hotfix 41.7.23 · Premium polish for Documentos > Análisis LexIA */
.doc-analysis-list{gap:16px}.doc-analysis-card{position:relative;padding:22px 22px 18px;border-radius:22px;border:1px solid #e6edf7;background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);box-shadow:0 14px 34px rgba(28,48,84,.055);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}.doc-analysis-card:hover{transform:translateY(-1px);border-color:#c9d8f2;box-shadow:0 18px 42px rgba(28,48,84,.085)}.doc-analysis-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:10px}.doc-analysis-type{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;margin-bottom:7px;border-radius:999px;background:#eef5ff;color:#2457a6;font-size:.68rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.doc-analysis-header h4{margin:0;font-size:1.04rem;font-weight:850;line-height:1.28;color:var(--doc-navy);letter-spacing:-.015em}.doc-analysis-card>p{margin:10px 0 14px;color:#526276;font-size:.92rem;line-height:1.58}.doc-analysis-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:10px 0 12px}.doc-analysis-meta>span{display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:5px 9px;border-radius:999px;background:#f6f8fc;border:1px solid #edf2f8;color:#596a80;font-size:.74rem;font-weight:700;line-height:1}.doc-analysis-meta>span i{color:#7e8da3;font-size:.82rem}.doc-analysis-meta .badge{font-size:.7rem;font-weight:800;padding:.32rem .55rem}.doc-analysis-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding-top:12px;margin-top:6px;border-top:1px solid #eef3f8}.doc-analysis-actions .btn{border-radius:999px;font-weight:800;letter-spacing:-.01em;min-height:34px;display:inline-flex;align-items:center;gap:4px}.doc-analysis-actions .btn-light{background:#f8fafd;border:1px solid #e8eef7;color:#25364d}.doc-analysis-actions .btn-light:hover{background:#edf4ff;border-color:#cad9f4;color:#0d4ea6}.doc-analysis-actions .btn-success{box-shadow:0 9px 18px rgba(25,135,84,.16)}.doc-analysis-actions .btn-outline-secondary{background:#fff;border-color:#d8e0ea;color:#506073}.doc-analysis-actions .btn-outline-primary{background:#fff}.doc-analysis-card small.text-danger{padding:9px 11px;border-radius:12px;background:#fff2f3;border:1px solid #ffd8dd}.doc-analysis-card .badge.rounded-pill{white-space:nowrap}
@media(max-width:720px){.doc-analysis-card{padding:18px}.doc-analysis-header{flex-direction:column}.doc-analysis-actions .btn{width:100%;justify-content:center}.doc-analysis-meta>span{max-width:100%}}

/* Hotfix 41.7.24 · Ayudas contextuales en Análisis LexIA */
.doc-action-helpable{position:relative;gap:6px}.doc-help-dot{display:inline-grid;place-items:center;width:16px;height:16px;margin-left:3px;border-radius:999px;border:1px solid rgba(80,96,115,.22);background:rgba(255,255,255,.78);color:#5f6f84;font-size:.65rem;font-weight:900;line-height:1;vertical-align:middle;flex:0 0 auto}.btn-primary .doc-help-dot,.btn-success .doc-help-dot{border-color:rgba(255,255,255,.42);background:rgba(255,255,255,.18);color:#fff}.doc-action-helpable:hover .doc-help-dot{transform:translateY(-1px);box-shadow:0 4px 10px rgba(28,48,84,.12)}

/* Hotfix 41.7.29 — Ayudas contextuales del Dashboard tenant */
.dashboard-hero-actions{min-width:220px}.dashboard-help-btn{position:absolute;top:14px;right:14px;z-index:2;display:inline-grid;place-items:center;width:28px;height:28px;border-radius:999px;border:1px solid rgba(93,112,138,.2);background:#fff;color:#617085;font-size:.72rem;line-height:1;box-shadow:0 8px 18px rgba(18,32,55,.08);transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,color .16s ease}.dashboard-help-btn:hover{transform:translateY(-1px);border-color:#2f6bff;color:#2f6bff;box-shadow:0 12px 24px rgba(47,107,255,.14)}.dashboard-help-btn.is-inline{position:static;flex:0 0 auto;width:30px;height:30px}.dashboard-help-btn.is-hero{position:static;border-color:rgba(255,255,255,.35);background:rgba(255,255,255,.14);color:#fff;box-shadow:none}.dashboard-help-btn.is-hero:hover{background:#fff;color:#245ea8}.dashboard-panel-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.dashboard-kpi-card{padding-right:52px}.dashboard-help-modal .dashboard-help-lead{margin:0 0 14px;color:#32435b;line-height:1.65}.dashboard-help-list{display:grid;gap:10px;margin:0;padding-left:18px;color:#516278;font-size:.9rem;line-height:1.5}.dashboard-help-action{margin-top:18px;padding:14px 16px;border:1px solid #dbe8fb;border-radius:14px;background:#f5f8ff;color:#304964;font-size:.9rem;line-height:1.55}.dashboard-help-action strong{color:#1d4f98}@media(max-width:767.98px){.dashboard-hero-actions{text-align:left}.dashboard-panel-actions{justify-content:flex-start}.dashboard-help-btn{width:30px;height:30px}}
