.cnecapacitor-bubble {
    position: fixed;
    right: 26px;
    bottom: 26px;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 0 0 3px #1C3F86, 0 8px 22px rgba(28, 63, 134, .28), 0 4px 12px rgba(0, 0, 0, .16);
    cursor: pointer;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-family: inherit;
    animation: cnecapacitor-flotar 3.2s ease-in-out infinite;
    transition: transform .15s, box-shadow .15s;
}

.cnecapacitor-bubble::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(28, 63, 134, .5);
    animation: cnecapacitor-pulso 2.4s ease-out infinite;
    pointer-events: none;
}

.cnecapacitor-bubble::after {
    content: '✦ IA';
    position: absolute;
    top: -4px;
    right: -2px;
    min-width: 26px;
    height: 19px;
    border-radius: 999px;
    padding: 0 6px;
    background: #1C3F86;
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 19px;
    text-align: center;
    box-shadow: 0 0 0 2px #ffffff, 0 2px 6px rgba(0, 0, 0, .3);
    animation: cnecapacitor-brillo 2.4s ease-in-out infinite;
}

.cnecapacitor-estado {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 3px #ffffff, 0 2px 6px rgba(22, 163, 74, .4);
    pointer-events: none;
}

.cnecapacitor-bubble.cnecapacitor-estudiando .cnecapacitor-estado {
    background: #1C3F86;
    box-shadow: 0 0 0 3px #ffffff, 0 2px 6px rgba(28, 63, 134, .45);
    animation: cnecapacitor-estado-pulso 1.2s ease-in-out infinite;
}

@keyframes cnecapacitor-estado-pulso {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: .65; }
}

.cnecapacitor-bubble:hover {
    transform: scale(1.08);
    box-shadow: 0 0 0 4px #295CA6, 0 0 0 8px rgba(41, 92, 166, .22), 0 12px 28px rgba(41, 92, 166, .38);
    animation-play-state: paused;
}

.cnecapacitor-bubble img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.cnecapacitor-bubble:focus-visible {
    outline: 3px solid #1C3F86;
    outline-offset: 7px;
}

.cnecapacitor-conexion-etiqueta {
    position: absolute;
    right: calc(100% + 14px);
    width: max-content;
    max-width: min(178px, calc(100vw - 132px));
    padding: 8px 10px;
    border: 1px solid #c8a84b;
    border-radius: 10px;
    background: #fff8d6;
    color: #594814;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    box-shadow: 0 3px 10px rgba(22, 50, 79, .1);
    pointer-events: none;
}

.cnecapacitor-left .cnecapacitor-conexion-etiqueta {
    right: auto;
    left: calc(100% + 14px);
}

.cnecapacitor-conexion-etiqueta[hidden],
.cnecapacitor-aviso-conexion[hidden] {
    display: none;
}

.cnecapacitor-bubble.cnecapacitor-red-interrumpida {
    animation: none;
    box-shadow: 0 0 0 3px #c8a84b, 0 8px 22px rgba(28, 63, 134, .18);
}

.cnecapacitor-bubble.cnecapacitor-red-interrumpida::before,
.cnecapacitor-bubble.cnecapacitor-red-interrumpida::after,
.cnecapacitor-bubble.cnecapacitor-red-interrumpida .cnecapacitor-estado {
    animation: none;
}

.cnecapacitor-bubble.cnecapacitor-red-interrumpida .cnecapacitor-estado {
    width: 20px;
    height: 20px;
    background: #FFD100;
    color: #16324f;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 0 0 3px #ffffff;
}

.cnecapacitor-aviso-conexion {
    padding: 10px 14px;
    background: #fff8d6;
    color: #594814;
    border-bottom: 1px solid #c8a84b;
    font-size: 13px;
    line-height: 1.45;
    flex-shrink: 0;
}

.cnecapacitor-red-interrumpida .cnecapacitor-header-avatar {
    outline: 2px solid #FFD100;
    outline-offset: 2px;
}

@keyframes cnecapacitor-flotar {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-6px) rotate(-2deg); }
    50% { transform: translateY(-10px) rotate(0deg); }
    75% { transform: translateY(-6px) rotate(2deg); }
}

@keyframes cnecapacitor-pulso {
    0% { box-shadow: 0 0 0 0 rgba(28, 63, 134, .5); }
    70% { box-shadow: 0 0 0 22px rgba(28, 63, 134, 0); }
    100% { box-shadow: 0 0 0 0 rgba(28, 63, 134, 0); }
}

@keyframes cnecapacitor-brillo {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.18) rotate(8deg); opacity: .9; }
}

@media (prefers-reduced-motion: reduce) {
    .cnecapacitor-bubble,
    .cnecapacitor-bubble::before,
    .cnecapacitor-bubble::after {
        animation: none;
    }
}

.cnecapacitor-panel {
    position: fixed;
    right: 26px;
    bottom: 112px;
    width: 420px;
    max-width: calc(100vw - 32px);
    height: 700px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(15, 40, 60, .22);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 99999;
}

.cnecapacitor-panel.cnecapacitor-abierto {
    display: flex;
    animation: cnecapacitor-aparecer .18s ease-out;
}

@keyframes cnecapacitor-aparecer {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.cnecapacitor-header {
    background: #1C3F86;
    color: #ffffff;
    min-height: 52px;
    padding: 0 8px 0 14px;
    border-bottom: 3px solid #D3112A;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.cnecapacitor-header > span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -.01em;
}

.cnecapacitor-close,
.cnecapacitor-expand,
.cnecapacitor-reiniciar,
.cnecapacitor-aportar-btn,
.cnecapacitor-header-btn,
.cnecapacitor-mas {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #64748b;
    font-size: 17px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.cnecapacitor-close {
    font-size: 22px;
}

.cnecapacitor-mas {
    font-size: 20px;
}

.cnecapacitor-menu {
    position: absolute;
    top: 48px;
    right: 44px;
    min-width: 208px;
    background: #ffffff;
    border: 1px solid #e6ecf2;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(15, 40, 60, .18);
    padding: 6px;
    display: flex;
    flex-direction: column;
    z-index: 8;
}

.cnecapacitor-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: transparent;
    border: 0;
    border-radius: 10px;
    padding: 9px 10px;
    font-family: inherit;
    font-size: 13.5px;
    line-height: 1.3;
    color: #14324a;
    text-align: left;
    cursor: pointer;
    transition: background .15s;
}

.cnecapacitor-menu-item:hover {
    background: #f0f4f8;
}

.cnecapacitor-menu-item:focus-visible {
    outline: 2px solid #1C3F86;
    outline-offset: -2px;
}

.cnecapacitor-menu-icono {
    width: 20px;
    flex: 0 0 auto;
    text-align: center;
    font-size: 15px;
    color: #64748b;
}

.cnecapacitor-header .cnecapacitor-close,
.cnecapacitor-header .cnecapacitor-expand,
.cnecapacitor-header .cnecapacitor-reiniciar,
.cnecapacitor-header .cnecapacitor-aportar-btn,
.cnecapacitor-header .cnecapacitor-header-btn,
.cnecapacitor-header .cnecapacitor-mas {
    color: #dce6f5;
}

.cnecapacitor-close:hover,
.cnecapacitor-expand:hover,
.cnecapacitor-reiniciar:hover,
.cnecapacitor-aportar-btn:hover,
.cnecapacitor-header-btn:hover,
.cnecapacitor-mas:hover {
    background: #f0f4f8;
    color: #14324a;
}

.cnecapacitor-header .cnecapacitor-close:hover,
.cnecapacitor-header .cnecapacitor-expand:hover,
.cnecapacitor-header .cnecapacitor-reiniciar:hover,
.cnecapacitor-header .cnecapacitor-aportar-btn:hover,
.cnecapacitor-header .cnecapacitor-header-btn:hover,
.cnecapacitor-header .cnecapacitor-mas:hover {
    background: #295CA6;
    color: #ffffff;
}

.cnecapacitor-header .cnecapacitor-close:focus-visible,
.cnecapacitor-header .cnecapacitor-expand:focus-visible,
.cnecapacitor-header .cnecapacitor-reiniciar:focus-visible,
.cnecapacitor-header .cnecapacitor-aportar-btn:focus-visible,
.cnecapacitor-header .cnecapacitor-header-btn:focus-visible,
.cnecapacitor-header .cnecapacitor-mas:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 1px;
}

.cnecapacitor-close:focus-visible,
.cnecapacitor-expand:focus-visible,
.cnecapacitor-reiniciar:focus-visible,
.cnecapacitor-aportar-btn:focus-visible,
.cnecapacitor-header-btn:focus-visible,
.cnecapacitor-mas:focus-visible {
    outline: 2px solid #1C3F86;
    outline-offset: 1px;
}

.cnecapacitor-aportar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 40, 60, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 5;
}

.cnecapacitor-aportar-caja {
    position: relative;
    background: #ffffff;
    border-radius: 14px;
    padding: 18px 18px 14px;
    width: 100%;
    max-width: 340px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}

.cnecapacitor-aportar-titulo {
    font-weight: 700;
    font-size: 15px;
    color: #1C3F86;
    margin-bottom: 6px;
}

.cnecapacitor-aportar-ayuda {
    font-size: 12.5px;
    color: #5a6b78;
    margin: 0 0 10px;
}

.cnecapacitor-aportar-texto {
    width: 100%;
    border: 1px solid #cfd8e0;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    resize: vertical;
    outline: none;
}

.cnecapacitor-aportar-texto:focus {
    border-color: #1C3F86;
}

.cnecapacitor-aportar-aviso {
    color: #D3112A;
    font-size: 12px;
    min-height: 16px;
    margin-top: 4px;
}

.cnecapacitor-aportar-acciones {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

.cnecapacitor-aportar-enviar {
    background: #1C3F86;
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.cnecapacitor-aportar-enviar:disabled {
    opacity: .6;
    cursor: default;
}

.cnecapacitor-aportar-cancelar {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #98a6b2;
    cursor: pointer;
}

.cnecapacitor-util {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    padding: 2px 4px;
    margin-top: 4px;
    opacity: .55;
    transition: opacity .15s ease;
}

.cnecapacitor-util:hover {
    opacity: 1;
}

.cnecapacitor-util-on {
    opacity: 1;
    color: #1f9d55;
    cursor: default;
}

.cnecapacitor-panel.cnecapacitor-full {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    transform: none;
    width: min(960px, 92vw);
    height: min(840px, 88vh);
    max-width: 92vw;
    max-height: 88vh;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
}

.cnecapacitor-panel.cnecapacitor-full::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(12, 24, 33, .5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: -1;
}

.cnecapacitor-msgs {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 10px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cnecapacitor-msg {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.62;
    color: #14324a;
    word-wrap: break-word;
    white-space: normal;
}

.cnecapacitor-msg-user {
    align-self: flex-end;
    background: #1C3F86;
    color: #ffffff;
    border-bottom-right-radius: 5px;
}

.cnecapacitor-msg-bot {
    align-self: flex-start;
    background: #ffffff;
    color: #14324a;
    border: 1px solid #e6ecf2;
    border-bottom-left-radius: 5px;
    box-shadow: 0 1px 2px rgba(15, 40, 60, .04);
}

.cnecapacitor-msg-bot ul,
.cnecapacitor-msg-bot ol {
    margin: 6px 0;
    padding-left: 20px;
}

.cnecapacitor-msg-bot li {
    margin-bottom: 3px;
}

.cnecapacitor-msg-bot p {
    margin: 0 0 8px 0;
}

.cnecapacitor-msg-bot p:last-child {
    margin-bottom: 0;
}

.cnecapacitor-msg-bot h1,
.cnecapacitor-msg-bot h2,
.cnecapacitor-msg-bot h3,
.cnecapacitor-msg-bot h4,
.cnecapacitor-msg-bot h5 {
    font-size: 15px;
    font-weight: 700;
    margin: 10px 0 4px 0;
    color: #0f2733;
}

.cnecapacitor-msg-bot a {
    color: #1C3F86;
    text-decoration: underline;
}

.cnecapacitor-msg-bot table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0;
    font-size: 13px;
}

.cnecapacitor-msg-bot th,
.cnecapacitor-msg-bot td {
    border: 1px solid #e2e8f0;
    padding: 5px 7px;
    text-align: left;
}

.cnecapacitor-msg-bot code {
    background: #e2e9f0;
    border-radius: 4px;
    padding: 1px 4px;
    font-size: 12.5px;
}

.cnecapacitor-msg-bot pre {
    background: #0f27330d;
    border-radius: 8px;
    padding: 10px;
    overflow-x: auto;
    margin: 6px 0;
}

.cnecapacitor-faq-bar {
    padding: 0 12px 10px;
    background: #ffffff;
}

.cnecapacitor-faq-btn {
    width: 100%;
    border: 1px solid #e6ecf2;
    background: #f4f7fa;
    color: #1C3F86;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

.cnecapacitor-faq-btn:hover {
    background: #EDF1F9;
    border-color: #B6C6E3;
    color: #295CA6;
}

.cnecapacitor-faq-btn:focus-visible {
    outline: 2px solid #1C3F86;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px #FFD100;
}

.cnecapacitor-faq-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 40, 60, .45);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 14px;
    z-index: 6;
}

.cnecapacitor-faq-caja {
    position: relative;
    background: #ffffff;
    border-radius: 14px;
    padding: 16px 14px 14px;
    width: 100%;
    max-height: 78%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
}

.cnecapacitor-faq-titulo {
    font-weight: 700;
    font-size: 14px;
    color: #1C3F86;
    margin: 0 0 10px;
}

.cnecapacitor-faq-cerrar {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #98a6b2;
    cursor: pointer;
}

.cnecapacitor-faq-lista {
    display: flex;
    flex-direction: column;
    gap: 7px;
    overflow-y: auto;
}

.cnecapacitor-faq-item {
    text-align: left;
    border: 1px solid #C5D2EA;
    background: #EDF1F9;
    color: #1C3F86;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 13.5px;
    font-family: inherit;
    line-height: 1.4;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.cnecapacitor-faq-item:hover {
    background: #DCE4F3;
    border-color: #A9BBDF;
}

.cnecapacitor-faq-item:focus-visible {
    outline: 2px solid #1C3F86;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px #FFD100;
}

.cnecapacitor-faq-grupo {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b8496;
    margin: 6px 2px 1px;
}

.cnecapacitor-chips-inline {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
    max-width: 100%;
}

.cnecapacitor-chip-inline {
    position: relative;
    display: block;
    width: 100%;
    border: 1px solid #C5D2EA;
    background: #EDF1F9;
    color: #1C3F86;
    border-radius: 14px;
    padding: 12px 34px 12px 14px;
    font-size: 13.5px;
    font-family: inherit;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.cnecapacitor-chip-inline::after {
    content: '\203A';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #1C3F86;
    font-size: 18px;
    line-height: 1;
    transition: color .15s, right .15s;
}

.cnecapacitor-chip-inline:hover {
    background: #DCE4F3;
    border-color: #A9BBDF;
}

.cnecapacitor-chip-inline:hover::after {
    right: 11px;
}

.cnecapacitor-chip-inline:focus-visible {
    outline: 2px solid #1C3F86;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px #FFD100;
}

.cnecapacitor-input {
    display: block;
    padding: 10px 12px 4px;
    border-top: 1px solid #e6ecf2;
    background: #ffffff;
}

.cnecapacitor-pill {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    background: #f4f7fa;
    border: 1px solid #e6ecf2;
    border-radius: 24px;
    padding: 5px 5px 5px 14px;
    transition: background .15s, border-color .15s;
}

.cnecapacitor-pill:focus-within {
    background: #ffffff;
    border-color: #1C3F86;
}

.cnecapacitor-input textarea {
    flex: 1;
    resize: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #14324a;
    padding: 8px 0;
    font-size: 14.5px;
    line-height: 1.45;
    font-family: inherit;
    max-height: 104px;
    outline: none;
}

.cnecapacitor-send {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1C3F86;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    padding: 0;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s, transform .12s;
}

.cnecapacitor-send:hover {
    background: #295CA6;
}

.cnecapacitor-voz {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 1px solid #cfdaea;
    border-radius: 50%;
    background: #fff;
    color: #1c3f86;
    padding: 9px;
    line-height: 1;
    cursor: pointer;
}

.cnecapacitor-voz svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
}

.cnecapacitor-voz:hover { background: #eaf0fa; }
.cnecapacitor-voz:focus-visible { outline: 3px solid #1c3f86; outline-offset: 3px; }
.cnecapacitor-voz:disabled { opacity: .5; cursor: default; }
.cnecapacitor-voz-activa { background: #ffd100; border-color: #1c3f86; }
.cnecapacitor-voz-activa:hover { background: #ffe36b; }
.cnecapacitor-voz-estado { color: #5b6b7a; font-size: 12px; line-height: 1.4; padding: 8px 4px 2px; display: flex; align-items: center; gap: 8px; }
.cnecapacitor-voz-estado:empty, .cnecapacitor-voz-estado[hidden] { display: none; }
.cnecapacitor-voz-ondas { display: none; width: 24px; height: 22px; flex: 0 0 24px; align-items: center; justify-content: center; gap: 3px; color: #1c3f86; }
.cnecapacitor-voz-ondas i { display: block; width: 3px; height: 16px; border-radius: 2px; background: currentColor; transform: scaleY(.35); }
.cnecapacitor-voz-estado[data-estado="escuchando"] .cnecapacitor-voz-ondas,
.cnecapacitor-voz-estado[data-estado="hablando"] .cnecapacitor-voz-ondas { display: inline-flex; }
.cnecapacitor-voz-estado[data-estado="hablando"] .cnecapacitor-voz-ondas i { animation: cnecapacitor-voz-onda .8s ease-in-out infinite alternate; }
.cnecapacitor-voz-ondas i:nth-child(2) { animation-delay: -.5s !important; }
.cnecapacitor-voz-ondas i:nth-child(3) { animation-delay: -.2s !important; }
.cnecapacitor-voz-ondas i:nth-child(4) { animation-delay: -.7s !important; }
.cnecapacitor-voz-estado[data-estado="permiso"]::before,
.cnecapacitor-voz-estado[data-estado="activando"]::before,
.cnecapacitor-voz-estado[data-estado="terminando"]::before { content: ''; width: 16px; height: 16px; flex: 0 0 16px; border: 2px solid #cfe1ec; border-top-color: #1c3f86; border-radius: 50%; animation: cnecapacitor-voz-giro 1s linear infinite; }
.cnecapacitor-voz-estado[data-estado="listo"]::before { content: '✓'; color: #1c3f86; font-size: 18px; font-weight: 700; }
@keyframes cnecapacitor-voz-onda { from { transform: scaleY(.3); } to { transform: scaleY(1); } }
@keyframes cnecapacitor-voz-giro { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .cnecapacitor-voz-estado::before,
    .cnecapacitor-voz-estado[data-estado="hablando"] .cnecapacitor-voz-ondas i { animation: none; }
    .cnecapacitor-voz-estado[data-estado="hablando"] .cnecapacitor-voz-ondas i { transform: scaleY(.8); }
}

.cnecapacitor-send:active {
    transform: scale(.94);
}

.cnecapacitor-send:focus-visible {
    outline: 2px solid #1C3F86;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px #FFD100;
}

.cnecapacitor-send:disabled {
    opacity: 0.45;
    cursor: default;
}

.cnecapacitor-pensando {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-style: italic;
}

.cnecapacitor-dots {
    display: inline-flex;
    gap: 3px;
}

.cnecapacitor-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1C3F86;
    display: inline-block;
    animation: cnecapacitor-bounce 1.2s infinite ease-in-out both;
}

.cnecapacitor-dots i:nth-child(1) {
    animation-delay: -0.24s;
}

.cnecapacitor-dots i:nth-child(2) {
    animation-delay: -0.12s;
}

@keyframes cnecapacitor-bounce {
    0%, 80%, 100% {
        transform: scale(0.5);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.cnecapacitor-msg-error {
    width: auto;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 14px;
    padding: 10px 14px;
    color: #D3112A;
}

.cnecapacitor-reintentar {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 5px 12px;
    border: 1px solid #1C3F86;
    background: #ffffff;
    color: #1C3F86;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.cnecapacitor-reintentar:hover {
    background: #295CA6;
    color: #ffffff;
}

.cnecapacitor-revelando::after {
    content: '\258B';
    color: #1C3F86;
    margin-left: 1px;
    animation: cnecapacitor-cursor 1s steps(2) infinite;
}

@keyframes cnecapacitor-cursor {
    50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .cnecapacitor-revelando::after { display: none; animation: none; }
}

.cnecapacitor-header-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    background: #EDF1F9;
    box-shadow: 0 0 0 2px #DCE4F3;
    margin-right: 10px;
    flex: 0 0 auto;
}

.cnecapacitor-bubble.cnecapacitor-left {
    right: auto;
    left: 26px;
}
.cnecapacitor-bubble.cnecapacitor-left::after {
    right: auto;
    left: -6px;
}
.cnecapacitor-panel.cnecapacitor-left {
    right: auto;
    left: 26px;
}
.cnecapacitor-panel.cnecapacitor-full.cnecapacitor-left {
    left: 0;
    right: 0;
}
.cnecapacitor-saludo {
    position: fixed;
    right: 26px;
    bottom: 98px;
    max-width: 300px;
    background: #ffffff;
    color: #14324a;
    padding: 14px 38px 14px 16px;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    font-size: 14px;
    line-height: 1.45;
    z-index: 99997;
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: none;
    cursor: pointer;
}
.cnecapacitor-saludo.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    animation: cnecapacitor-saludo-bounce 2.4s ease-in-out 0.4s 2;
}
.cnecapacitor-saludo::after {
    content: '';
    position: absolute;
    right: 32px;
    bottom: -8px;
    width: 16px;
    height: 16px;
    background: #ffffff;
    transform: rotate(45deg);
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.05);
}
.cnecapacitor-saludo.cnecapacitor-saludo-left {
    right: auto;
    left: 26px;
}
.cnecapacitor-saludo.cnecapacitor-saludo-left::after {
    right: auto;
    left: 32px;
}
.cnecapacitor-saludo-txt {
    display: block;
}
.cnecapacitor-saludo-x {
    position: absolute;
    top: 8px;
    right: 10px;
    border: 0;
    background: transparent;
    color: #8199ab;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}
.cnecapacitor-saludo-x:hover {
    color: #14324a;
}
@keyframes cnecapacitor-saludo-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-5px) scale(1); }
}

.cnecapacitor-nota {
    margin-top: 6px;
    font-size: 11.5px;
    color: #94a3b0;
    font-variant-numeric: tabular-nums;
}

.cnecapacitor-estudiando {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cnecapacitor-estudiando-icono {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border: 3px solid #d8e2f1;
    border-top-color: #1c3f86;
    border-right-color: #ffd100;
    border-radius: 50%;
    animation: cnecapacitor-leer 1s linear infinite;
}

.cnecapacitor-estudiando-cuerpo {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    flex: 1;
}

.cnecapacitor-estudiando-txt {
    font-size: 13px;
    color: #4b5563;
    font-weight: 500;
}

.cnecapacitor-estudiando-tiempo { font-size: 12px; color: #5b6b7a; font-variant-numeric: tabular-nums; }
.cnecapacitor-reintentar-estudio { display: block; margin-top: 10px; min-height: 40px; padding: 8px 14px; border: 1px solid #1c3f86; border-radius: 8px; background: #fff; color: #1c3f86; cursor: pointer; }
.cnecapacitor-reintentar-estudio:focus-visible { outline: 3px solid #1c3f86; outline-offset: 3px; }
.cnecapacitor-reintentar-estudio:disabled { opacity: .5; cursor: default; }

.cnecapacitor-estudiando-barra {
    display: block;
    height: 8px;
    border-radius: 6px;
    background: #e5e7eb;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .08);
}

.cnecapacitor-estudiando-barra i {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 45%;
    border-radius: 6px;
    background: #1C3F86;
    box-shadow: 0 0 8px rgba(28, 63, 134, .5);
    animation: cnecapacitor-escaneo 1.2s ease-in-out infinite;
}

.cnecapacitor-estudiando-barra-real i {
    animation: none;
    left: 0;
    width: 0;
    transition: width .6s ease;
}

@keyframes cnecapacitor-leer {
    to { transform: rotate(360deg); }
}

@keyframes cnecapacitor-escaneo {
    0% { left: -40%; }
    100% { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .cnecapacitor-estudiando-icono,
    .cnecapacitor-estudiando-barra i {
        animation: none;
    }
}

.cnecapacitor-skeleton { display: flex; flex-direction: column; gap: 7px; padding: 2px 0; width: 100%; }

.cnecapacitor-msg-bot[aria-busy="true"] {
    width: 100%;
    max-width: 100%;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 6px 2px;
}
.cnecapacitor-sk-linea,
.cnecapacitor-sk-tarjeta,
.cnecapacitor-sk-burbuja {
    display: block;
    background: linear-gradient(90deg,
        rgba(28, 63, 134, .08) 20%, rgba(28, 63, 134, .20) 40%, rgba(28, 63, 134, .08) 60%);
    background-size: 200% 100%;
    animation: cnecapacitor-sk-shimmer 1.25s linear infinite;
}

.cnecapacitor-sk-linea:nth-child(2),
.cnecapacitor-sk-burbuja:nth-child(2) { animation-delay: .1s; }
.cnecapacitor-sk-linea:nth-child(3),
.cnecapacitor-sk-burbuja:nth-child(3) { animation-delay: .2s; }
.cnecapacitor-sk-linea:nth-child(4) { animation-delay: .3s; }
.cnecapacitor-sk-linea:nth-child(5) { animation-delay: .4s; }
.cnecapacitor-sk-linea { height: 10px; border-radius: 6px; }
.cnecapacitor-sk-linea:last-child { margin-bottom: 2px; }
.cnecapacitor-sk-tarjeta { height: 44px; border-radius: 14px; }
.cnecapacitor-sk-burbuja { height: 58px; border-radius: 18px; width: 88%; }
.cnecapacitor-sk-burbuja.cnecapacitor-sk-propia { align-self: flex-end; height: 40px; width: 62%; }
.cnecapacitor-sk-burbuja.cnecapacitor-sk-corta { height: 40px; width: 70%; }
.cnecapacitor-sk-hilo {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
@keyframes cnecapacitor-sk-shimmer {
    0% { background-position: 150% 0; }
    100% { background-position: -50% 0; }
}
@media (prefers-color-scheme: dark) {
    .cnecapacitor-sk-linea,
    .cnecapacitor-sk-tarjeta,
    .cnecapacitor-sk-burbuja {
        background: linear-gradient(90deg,
            rgba(167, 193, 235, .12) 20%, rgba(167, 193, 235, .26) 40%, rgba(167, 193, 235, .12) 60%);
        background-size: 200% 100%;
    }
}
@media (prefers-reduced-motion: reduce) {
    .cnecapacitor-sk-linea,
    .cnecapacitor-sk-tarjeta,
    .cnecapacitor-sk-burbuja { animation: none; background: #eceff3; }
}

.cnecapacitor-portada {
    width: 100%;
    max-width: 100%;
    padding: 2px 0 4px;
    margin: 0;
    box-sizing: border-box;
}

.cnecapacitor-portada-cabecera {
    background: #1C3F86;
    border-top: 4px solid #FFD100;
    border-radius: 14px;
    padding: 20px;
    color: #ffffff;
}

.cnecapacitor-portada-titulo {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.025em;
    color: #ffffff;
    margin-bottom: 9px;
    overflow-wrap: anywhere;
}

.cnecapacitor-portada-txt {
    font-size: 13px;
    line-height: 1.65;
    color: #e6edf9;
    overflow-wrap: anywhere;
}

.cnecapacitor-portada-alcance {
    margin: 14px 2px 0;
    padding: 0 0 0 12px;
    border-left: 3px solid #FFD100;
    color: #53647c;
    font-size: 12px;
    line-height: 1.6;
}

.cnecapacitor-portada-etiqueta {
    margin: 22px 2px 11px;
    color: #1C3F86;
    font-size: 13px;
    font-weight: 700;
}

.cnecapacitor-portada-acciones {
    margin: 0;
    gap: 8px;
}

.cnecapacitor-portada-acciones .cnecapacitor-chip-inline {
    min-height: 49px;
    padding: 13px 46px 13px 14px;
    background: #ffffff;
    border: 1px solid #d9e2f1;
    border-radius: 10px;
    color: #1C3F86;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.5;
    overflow-wrap: anywhere;
    box-sizing: border-box;
}

.cnecapacitor-portada-acciones .cnecapacitor-chip-inline::after {
    content: '\2192';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    right: 11px;
    background: #fff6cc;
    border-radius: 7px;
    color: #1C3F86;
    font-size: 15px;
}

.cnecapacitor-portada-acciones .cnecapacitor-chip-inline:hover {
    background: #f3f6fc;
    border-color: #1C3F86;
}

.cnecapacitor-portada-acciones .cnecapacitor-chip-inline:hover::after {
    background: #FFD100;
}

.cnecapacitor-portada-pista {
    font-size: 11px;
    line-height: 1.5;
    color: #5b6b7a;
    text-align: center;
    margin: 16px 4px 2px;
}

@media (max-width: 380px) {
    .cnecapacitor-portada-cabecera { padding: 17px; }
    .cnecapacitor-portada-titulo { font-size: 22px; }
}

.cnecapacitor-send.cnecapacitor-stop {
    background: #a03a30;
    color: #fff;
}

.cnecapacitor-quiz {
    background: #ffffff;
    border: 1px solid #e6ecf2;
    border-radius: 14px;
    padding: 12px 14px;
    margin: 8px 0;
}

.cnecapacitor-quiz-pregunta { margin-bottom: 10px; }

.cnecapacitor-quiz-pregunta p {
    font-weight: 700;
    margin: 0 0 6px;
}

.cnecapacitor-quiz-pregunta label {
    display: block;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
}

.cnecapacitor-quiz-pregunta label:hover { background: #f4f7fa; }

.cnecapacitor-quiz-ok { background: #e2f3e9; font-weight: 700; }

.cnecapacitor-quiz-mal { background: #f7e6e2; text-decoration: line-through; }

.cnecapacitor-quiz-enviar {
    background: #1C3F86;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 700;
    cursor: pointer;
}

.cnecapacitor-quiz-enviar:disabled { opacity: .6; cursor: default; }

.cnecapacitor-repasar { font-size: 1.05rem; }

.cnecapacitor-fc {
    background: #ffffff;
    border: 1px solid #e6ecf2;
    border-radius: 14px;
    padding: 14px;
    margin: 8px 0;
}

.cnecapacitor-fc-prog {
    font-size: .72rem;
    color: #6b7a88;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 0 0 8px;
}

.cnecapacitor-fc-carta {
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: 10px;
}

.cnecapacitor-fc-dorso {
    background: #f4f7fa;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.cnecapacitor-fc-acciones { display: flex; gap: 8px; }

.cnecapacitor-fc-btn {
    background: #1C3F86;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    font-weight: 700;
    cursor: pointer;
}

.cnecapacitor-fc-ok { background: #1a7f4b; }

.cnecapacitor-fc-mal { background: #9a6700; }

.cnecapacitor-escaladas {
    background: #fdf3e2;
    border-left: 4px solid #c77b12;
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 10px;
}

.cnecapacitor-escaladas ul { margin: 6px 0 0; padding-left: 18px; }

.cnecapacitor-msg-humano {
    align-self: flex-start;
    background: #eef6f0;
    color: #14324a;
    border: 1px solid #cfe3d5;
    border-bottom-left-radius: 5px;
}

.cnecapacitor-msg-humano::before {
    content: attr(data-operador);
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #2e7d4f;
    margin-bottom: 3px;
    letter-spacing: .02em;
}

.cnecapacitor-msg-sistema {
    align-self: center;
    background: transparent;
    color: #5b6b7a;
    font-size: 12px;
    padding: 2px 10px;
    max-width: 100%;
    text-align: center;
}

.cnecapacitor-atencion {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #16324f;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.35;
}

.cnecapacitor-atencion.activa {
    display: flex;
}

.cnecapacitor-atencion-txt {
    flex: 1 1 auto;
}

.cnecapacitor-atencion-punto {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #FFD100;
    flex: 0 0 auto;
}

.cnecapacitor-atencion.humano .cnecapacitor-atencion-punto {
    background: #6fcf97;
}
.cnecapacitor-atencion.esperando .cnecapacitor-atencion-punto {
    width: 14px;
    height: 14px;
    box-sizing: border-box;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #FFD100;
    animation: cnecapacitor-esperando .85s linear infinite;
}
@keyframes cnecapacitor-esperando {
    to { transform: rotate(360deg); }
}
.cnecapacitor-atencion.humano.escribiendo .cnecapacitor-atencion-punto {
    animation: cnecapacitor-escribiendo 1s ease-in-out infinite;
}
@keyframes cnecapacitor-escribiendo {
    0%, 100% { opacity: .4; transform: scale(.8); }
    50% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .cnecapacitor-atencion.esperando .cnecapacitor-atencion-punto,
    .cnecapacitor-atencion.humano.escribiendo .cnecapacitor-atencion-punto { animation: none; }
}

.cnecapacitor-atencion button {
    border: 0;
    background: #ffffff;
    color: #16324f;
    font-weight: 600;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    flex: 0 0 auto;
}

.cnecapacitor-bloqueado .cnecapacitor-chip-inline,
.cnecapacitor-bloqueado .cnecapacitor-chips button,
.cnecapacitor-bloqueado .cnecapacitor-reintentar {
    opacity: .5;
    pointer-events: none;
}

.cnecapacitor-panel { max-height: calc(100dvh - 120px); }
.cnecapacitor-msgs { min-height: 0; overscroll-behavior: contain; overflow-wrap: anywhere; }
.cnecapacitor-input textarea { min-width: 0; font-size: 16px; }
.cnecapacitor-panel.cnecapacitor-full { max-height: 88dvh; }
.cnecapacitor-panel button:focus-visible { outline: 3px solid #295CA6; outline-offset: 2px; }
@media (max-width: 575.98px) {
    .cnecapacitor-panel, .cnecapacitor-panel.cnecapacitor-left, .cnecapacitor-panel.cnecapacitor-full {
        top: auto; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom));
        width: auto; max-width: none; height: calc(100dvh - 24px); max-height: calc(100dvh - 24px);
        margin: 0; border-radius: 16px;
    }
    .cnecapacitor-header button { min-width: 44px; min-height: 44px; }
    .cnecapacitor-input { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}

/* Referencias secundarias: enlaces discretos, sin apariencia de botón. */
.cnecapacitor-msg .cnecapacitor-fuentes { margin-top: 12px; padding-top: 8px; border-top: 1px solid #e3e8ee; color: #667085; font-size: 12px; line-height: 1.45; }
.cnecapacitor-msg .cnecapacitor-fuentes summary { cursor: pointer; font-weight: 400; color: #667085; }
.cnecapacitor-msg .cnecapacitor-fuentes ul { list-style: none; margin: 6px 0 0; padding: 0; }
.cnecapacitor-msg .cnecapacitor-fuentes li { margin: 5px 0; padding: 0; }
.cnecapacitor-msg .cnecapacitor-fuentes a { display: inline; background: none; border: 0; padding: 0; color: #596b83; font-size: inherit; font-weight: 400; text-decoration: none; overflow-wrap: anywhere; }
.cnecapacitor-msg .cnecapacitor-fuentes a:hover { color: #1c3f86; text-decoration: underline; }
.cnecapacitor-msg .cnecapacitor-fuentes a:focus-visible { outline: 2px solid #1c3f86; outline-offset: 2px; }
.cnecapacitor-bloqueado .cnecapacitor-portada-acciones,
.cnecapacitor-bloqueado .cnecapacitor-portada-etiqueta,
.cnecapacitor-bloqueado .cnecapacitor-portada-pista { display: none; }
