  :root {
    --chatia-azul: #3861fb;
    --chatia-azul-oscuro: rgb(35, 67, 156);
    --chatia-gris-fondo: #f3f5fb;
    --chatia-texto: #333;
  }
  
  #chat-toggle {
    position: fixed;
    bottom: 22px;
    right: 22px;
    background: var(--chatia-azul);
    color: white;
    border: none;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 9999;
  }
  #chat-toggle:hover {
    background: var(--chatia-azul-oscuro);
    transform: scale(1.05);
  }

  /* 🧾 Ventana del chat */
  .chat-box {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 370px;
    height: 460px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
  }

  #chatBox{
    opacity: 0;
    transform: translateY(40px);
    transition: all .60s ease;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* 🧑 Header */
  .chat-header {
    background: var(--chatia-azul);
    color: white;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

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

  .chat-header img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    object-fit: contain;
  }

  .chat-header strong {
    font-size: 15px;
  }

  .chat-header button {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
  }

  /* 💬 Mensajes */
  .chat-messages {
    flex: 1;
    padding: 12px;
    background: var(--chatia-gris-fondo);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }

  .message {
    margin: 8px 0;
    padding: 10px 14px;
    border-radius: 10px;
    max-width: 80%;
    line-height: 1.4em;
    font-size: 14px;
  }

  .message.user {
    background: var(--chatia-azul);
    color: white;
    align-self: flex-end;
  }

  .message.bot {
    background: #e7e9f5;
    color: var(--chatia-texto);
    align-self: flex-start;
  }

  .typing {
    font-style: italic;
    color: #666;
    font-size: 13px;
    margin-top: 4px;
  }

  /* 🖊 Input */
  .chat-input {
    display: flex;
    border-top: 1px solid #ddd;
    background: white;
  }

  .chat-input input {
    flex: 1;
    border: none;
    padding: 12px;
    font-size: 14px;
    outline: none;
    font-weight: normal;
  }

  .chat-input button {
    background: var(--chatia-azul);
    color: white;
    border: none;
    padding: 12px 18px;
    cursor: pointer;
    transition: all 0.2s;
  }

  .chat-input button:hover {
    background: var(--chatia-azul-oscuro);
  }