      #chat-widget-root {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
        --chat-primary: #7373e8;
        --chat-secondary: #3C3CE8;
        --chat-bg: #ffffff;
        --chat-text: #333333;
        --chat-border: #e0e0e0;
        --chat-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
      }

      /* Botão Flutuante */
      .chat-widget-button {
        position: fixed;
        bottom: 20px; 
        right: 20px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--chat-primary) 0%, var(--chat-secondary) 100%) !important;
        color: white;
        border: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        z-index: 9998;
        padding: 0;
      }

      .chat-widget-button:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
      }

      .chat-widget-button:active {
        transform: scale(0.95);
      }

      /* Badge de mensagens não lidas */
      .chat-unread-badge {
        position: absolute;
        top: -4px;
        right: -4px;
        background: #ff6b6b;
        color: white;
        border-radius: 50%;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: 700;
        border: 2px solid white;
      }

      /* Janela do Chat */
      .chat-widget-window {
        position: fixed;
        bottom: 90px;
        right: 20px;
        width: 380px;
        height: 550px;
        background: var(--chat-bg);
        border-radius: 12px;
        box-shadow: var(--chat-shadow);
        display: flex;
        flex-direction: column;
        z-index: 9999;
        animation: slideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
      }

      @keyframes slideIn {
        from {
          transform: translateY(30px) translateX(30px);
          opacity: 0;
        }

        to {
          transform: translateY(0) translateX(0);
          opacity: 1;
        }
      }

      /* Header */
      .chat-widget-header {
        padding: 16px;
        background: linear-gradient(135deg, var(--chat-primary) 0%, var(--chat-secondary) 100%);
        color: white;
        border-radius: 12px 12px 0 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        flex-shrink: 0;
      }

      .chat-widget-title h4 {
        margin: 0 0 4px 0;
        font-size: 15px;
        font-weight: 600;
        color: #FFF !important;
      }

      .chat-widget-status {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        opacity: 0.9;
      }

      .chat-status-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #4caf50;
      }

      .chat-status-dot.disconnected {
        background: #ff9800;
      }

      .chat-widget-close {
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: white;
        cursor: pointer;
        padding: 6px;
        border-radius: 6px;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .chat-widget-close:hover {
        background: rgba(255, 255, 255, 0.3);
      }

      /* Mensagens */
      .chat-widget-messages {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
        background: #f9f9f9;
        display: flex;
        flex-direction: column;
        gap: 12px;
      }

      .chat-widget-messages::-webkit-scrollbar {
        width: 6px;
      }

      .chat-widget-messages::-webkit-scrollbar-track {
        background: transparent;
      }

      .chat-widget-messages::-webkit-scrollbar-thumb {
        background: #ddd;
        border-radius: 3px;
      }

      .chat-widget-welcome {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        text-align: center;
        color: #999;
      }

      .chat-widget-welcome h5 {
        margin: 0 0 8px 0;
        font-size: 16px;
        color: var(--chat-text);
      }

      .chat-widget-welcome p {
        margin: 0;
        font-size: 13px;
      }

      /* Mensagens individuais */
      .chat-widget-message {
        display: flex;
        flex-direction: column;
        margin-bottom: 4px;
        animation: fadeIn 0.3s ease-in;
        word-wrap: break-word;
      }

      .chat-widget-message.sent {
        align-items: flex-end;
      }

      .chat-widget-message.received {
        align-items: flex-start;
      }

      .chat-widget-message-content {
        max-width: 80%;
        padding: 10px 14px;
        border-radius: 10px;
        word-wrap: break-word;
        font-size: 13px;
        line-height: 1.5;
      }

      .chat-widget-message.sent .chat-widget-message-content {
        background: linear-gradient(135deg, var(--chat-primary) 0%, var(--chat-secondary) 100%);
        color: white;
        border-bottom-right-radius: 3px;
      }

      .chat-widget-message.received .chat-widget-message-content {
        background: white;
        color: var(--chat-text);
        border: 1px solid var(--chat-border);
        border-bottom-left-radius: 3px;
      }

      .chat-widget-message-time {
        font-size: 11px;
        color: #999;
        margin-top: 6px;
        padding: 0 4px;
      }

      /* Indicador de digitação */
      .chat-widget-message.typing-indicator {
        margin: 8px 0 !important;
      }

      .chat-typing-dots {
        display: flex;
        gap: 4px;
        padding: 10px 14px;
        background: white;
        border: 1px solid var(--chat-border);
        border-radius: 10px;
        border-bottom-left-radius: 3px;
      }

      .chat-typing-dots span {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #999;
        animation: typing 1.4s infinite;
      }

      .chat-typing-dots span:nth-child(2) {
        animation-delay: 0.2s;
      }

      .chat-typing-dots span:nth-child(3) {
        animation-delay: 0.4s;
      }

      @keyframes typing {

        0%,
        60%,
        100% {
          opacity: 0.5;
          transform: translateY(0);
        }

        30% {
          opacity: 1;
          transform: translateY(-10px);
        }
      }

      @keyframes fadeIn {
        from {
          opacity: 0;
          transform: translateY(4px);
        }

        to {
          opacity: 1;
          transform: translateY(0);
        }
      }

      /* Input Area */
      .chat-widget-input-area {
        padding: 12px 16px 16px 16px;
        background: var(--chat-bg);
        border-top: 1px solid var(--chat-border);
        display: flex;
        gap: 8px;
        flex-shrink: 0;
      }

      .chat-widget-input {
        background: #f5f5f5 !important;
        color: #222;
        flex: 1;
        padding: 10px 14px;
        border: 1px solid var(--chat-border);
        border-radius: 24px;
        font-size: 13px;
        outline: none;
        background: white;
        font-family: inherit;
        transition: all 0.2s;
      }

      .chat-widget-input:focus {
        border-color: var(--chat-primary);
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
      }

      .chat-widget-input:disabled {
        background: #f5f5f5;
        color: #999;
        cursor: not-allowed;
      }

      .chat-widget-send {
        background: var(--chat-primary);
        color: white;
        border: none;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        min-width: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s;
        flex-shrink: 0;
      }

      .chat-widget-send:hover:not(:disabled) {
        background: var(--chat-secondary);
        transform: scale(1.05);
      }

      .chat-widget-send:disabled {
        background: #ccc;
        cursor: not-allowed;
        opacity: 0.6;
      }

      /* Responsivo */
      @media (max-width: 768px) {
        .chat-widget-window {
          width: calc(100% - 20px);
          max-width: 380px;
          height: 60vh;
          max-height: 500px;
          right: 10px !important;
          left: auto !important;
        }
      }