
    body {
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 0;
        color: #333;
    }

    /* Estado inicial: oculto + animación */
    .chat-button {
        opacity: 0;
        transform: scale(0.7);
        transition: opacity 0.6s ease, transform 0.6s ease;

        /* Estilos reales del botón */
        position: fixed;
        bottom: 20px;
        left: 20px;
        /* cambiado */
        width: 64px;
        height: 64px;
        background-color: #14c2be;
        color: white;
        border: none;
        border-radius: 50% !important;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 1000;
    }

    /* Cuando se muestre */
    .chat-button.show {
        opacity: 1;
        transform: scale(1);
    }

    .chat-container {
        position: fixed;
        bottom: 90px;
        right: 20px;
        width: 365px;
        height: 500px;
        background: white;
        border-radius: 8px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
        display: flex;
        flex-direction: column;
        z-index: 999;
        transition: all 0.3s ease-in-out;
        transform: scale(0);
        transform-origin: bottom right;
    }

    .chat-container.open {
        transform: scale(1);
    }

    .chat-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        background-color: #14C2BE;
        color: white;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }

    .chat-header-info {
        display: flex;
        align-items: center;
    }

    .chat-header-icon {
        width: 35px;
        height: 35px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        font-weight: bold;
        margin-right: 10px;
    }

    .chat-header-status {
        font-size: 12px;
        display: flex;
        align-items: center;
        margin-top: 2px;
    }

    .status-dot {
        height: 8px;
        width: 8px;
        background-color: #36e07dff;
        border-radius: 50%;
        display: inline-block;
        margin-right: 5px;
    }

    .chat-close {
        background: none;
        border: none;
        color: white;
        font-size: 20px;
        cursor: pointer;
    }


    .chat-body {
        flex-grow: 1;
        padding: 20px;
        background-color: #f7f9fb;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }


    .chat-message-initial {
        background-color: white;
        border-radius: 10px;
        padding: 10px 15px;
        margin-bottom: 15px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        max-width: 90%;
        align-self: flex-start;
    }


    .chat-input-area {
        border-top: 1px solid #eee;
        padding: 10px 15px;
        display: flex;
        align-items: flex-end;
        position: relative;
    }


    .chat-input-area textarea {
        flex-grow: 1;
        border: none;
        padding: 10px 0;
        outline: none;
        font-size: 14px;
        resize: none;
        min-height: 20px;
        max-height: 100px;
        overflow-y: auto;
        box-sizing: border-box;
        line-height: 1.4;
        margin: 0 5px;
    }


    .attachment-label {
        cursor: pointer;
        font-size: 20px;
        color: #555;
        padding: 5px;
        flex-shrink: 0;
    }


    .chat-input-area button {
        background: #14C2BE;
        color: white;
        border: none;
        padding: 10px 15px;
        border-radius: 20px;
        margin-left: 10px;
        cursor: pointer;
        font-weight: bold;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-shrink: 0;
        transition: background 0.2s;

        width: auto;
        height: auto;
    }

    .chat-input-area button:hover {
        background: #0db3b0;
    }


    .chat-input-area button span {
        display: block;
    }


    .chat-input-area button::before {
        content: none;
    }



    #file-input {
        display: none;
    }


    #file-preview-container {
        position: absolute;
        bottom: 55px;
        left: 0;
        right: 0;
        padding: 8px 15px;
        background: #fff;
        border-top: 1px solid #eee;
        box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
        display: none;
        z-index: 10;
    }


    .preview-remove-btn {
        background: #333;
        color: white;
        border: none;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        font-size: 12px;
        line-height: 1;
        cursor: pointer;
        position: absolute;
        top: -5px;
        right: -5px;
        display: flex;
        justify-content: center;
        align-items: center;
    }


    @media (max-width: 768px) {
        .chat-container {
            width: 90vw;
            height: 80vh;
            bottom: 85px;
            right: 5vw;
            left: 5vw;
            border-radius: 12px;
            transform-origin: bottom center;
        }

        .chat-button {
            bottom: 15px;
            left: 15px;
        }
    }

    /* ===============================
   CHAT SOLO EN CELULAR
================================ */

/* ocultar en desktop */
.chat-button,
.chat-container,
.n8n-salud-title,
.n8n-legal-title {
    display: none !important;
}

/* mostrar solo en celular */
@media (max-width: 768px) {

    .chat-button,
    .chat-container,
    .n8n-salud-title,
    .n8n-legal-title {
        display: flex !important;
    }

    .n8n-salud-title,
    .n8n-legal-title {
        display: block !important;
    }

}


    /* ===============================
   TEXTO CONSULTA SALUD
================================ */

.n8n-salud-title {
    position: fixed;
    bottom: 95px;
    left: 20px;
    background: #14C2BE;
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,.2);
    z-index: 999;
    animation: pulseChat 1.6s infinite;
    transition: opacity .3s ease, transform .3s ease;
}

/* oculto */
.n8n-salud-title.hide {
    opacity: 0;
    transform: scale(.8);
    pointer-events: none;
}

/* animación pulsante */
@keyframes pulseChat {

    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(20,194,190,.6);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(20,194,190,0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(20,194,190,0);
    }

}

/* responsive */
@media (max-width:768px){

    .n8n-salud-title{
        left:15px;
        bottom:90px;
        font-size:12px;
    }

}


/* boton login */

.chat-header-top{
    display:flex;
    align-items:center;
    gap:10px;
}

.doctor-name{
    font-weight:bold;
}

.btn-login{
    font-size:12px;
    padding:5px 10px;
    background:#2563eb;
    color:#fff;
    text-decoration:none;
    border-radius:6px;
    font-weight:500;
    transition:all .2s ease;
    margin-left:22px;
}

.btn-login:hover{
    background:#1d4ed8;
}