 * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }


    /* --- SIDEBAR (LATERAL) --- */
    .sidebar {
      width: 260px;
      background-color: #F5F8FB;
      border-right: 1px solid #F0F3F7;
      display: flex;
      flex-direction: column;
      padding: 1.5rem 1rem;
      transition: transform 0.3s ease;
    }

    .new-chat-btn {
      background-color: #FFFFFF;
      border: 1px solid #eef2f6;
      border-radius: 12px;
      padding: 0.8rem;
      display: flex;
      align-items: center;
      gap: 10px;
      cursor: pointer;
      font-weight: 500;
      font-size: 0.9rem;
      margin-bottom: 2rem;
      color: #1d2b3f;
    }

    .sidebar-title {
      font-size: 0.7rem;
      text-transform: uppercase;
      color: #9fb3c9;
      margin-bottom: 0.8rem;
      padding-left: 0.5rem;
    }

    .chat-item {
      padding: 0.7rem 0.5rem;
      border-radius: 10px;
      cursor: pointer;
      font-size: 0.85rem;
      color: #3e5670;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .chat-item.active {
      background-color: #E0E9F2;
      color: #102a3c;
    }

    /* --- ÁREA DO CHAT (CARD 100%) --- */
    .main-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      background-color: #FFFFFF;
      height: 100%;
      overflow: hidden;
    }

    .chat-header {
      padding: 1.8rem 2rem 1rem 2rem;
      background-color: #FFFFFF;
      border-bottom: 1px solid #F0F3F7;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    /* Botão hambúrguer - visível apenas em mobile */
    .menu-toggle {
      display: none;
      background: transparent;
      border: none;
      width: 40px;
      height: 40px;
      border-radius: 12px;
      cursor: pointer;
      color: #2e3b4e;
      flex-shrink: 0;
      align-items: center;
      justify-content: center;
    }

    .menu-toggle:hover {
      background-color: #F6F8FB;
    }

    .logo-row {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      flex: 1;
    }

    .logo-icon {
      background-color: #F6F8FB;
      width: 42px;
      height: 42px;
      border-radius: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.7rem;
      color: #2e3b4e;
    }

    .logo-row h1 {
      font-weight: 600;
      font-size: 1.5rem;
      color: #1d2b3f;
    }

    .subhead {
      margin-top: 0.25rem;
      color: #6b7a8f;
      font-size: 0.9rem;
      padding-left: 3.6rem;
    }

    .chat-messages {
      flex: 1;
      overflow-y: auto;
      padding: 1.8rem 2rem;
      display: flex;
      flex-direction: column;
      gap: 1.2rem;
      background-color: #FFFFFF;
      scroll-behavior: smooth;
    }

    .message {
      display: flex;
      gap: 12px;
      max-width: 80%;
    }

    .message.user-message {
      align-self: flex-end;
      flex-direction: row-reverse;
    }

    .avatar {
      flex-shrink: 0;
      width: 34px;
      height: 34px;
      border-radius: 12px;
      background: #F6F8FB;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .avatar svg {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.8;
    }

    .message-bubble {
      background-color: #F6F8FB;
      padding: 12px 18px;
      border-radius: 22px;
      border-bottom-left-radius: 4px;
      font-size: 0.95rem;
      color: #1d2b3f;
      box-shadow: 0 1px 3px rgba(0,0,0,0.02);
      word-break: break-word;
    }

    .user-message .message-bubble {
      background-color: #E0E9F2;
      border-bottom-right-radius: 4px;
      border-bottom-left-radius: 22px;
      color: #102a3c;
    }

    .message-time {
      font-size: 0.65rem;
      color: #a0b3c9;
      margin-top: 4px;
      margin-left: 8px;
    }

    .suggestions-panel {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 16px;
    }

    .suggestion-chip {
      background-color: #F5F8FB;
      border: 1px solid #e9eef3;
      border-radius: 40px;
      padding: 8px 16px;
      font-size: 0.9rem;
      color: #2f3f57;
      cursor: pointer;
      transition: background 0.2s;
      white-space: nowrap;
    }

    .suggestion-chip:active {
      background-color: #e0e9f2;
    }

    .input-footer {
      padding: 1.2rem 2rem 2rem 2rem;
      border-top: 1px solid #F0F3F7;
      background: white;
    }

    .input-pill {
      background-color: #F6F8FB;
      border: 1px solid #eef2f6;
      border-radius: 60px;
      display: flex;
      align-items: center;
      padding: 0.4rem 0.4rem 0.4rem 1.5rem;
    }

    #messageInput {
      flex: 1;
      border: none;
      background: transparent;
      font-size: 0.95rem;
      padding: 12px 0;
      outline: none;
    }

    .send-btn {
      background-color: #FFFFFF;
      border: 1px solid #dae3ec;
      border-radius: 40px;
      width: 44px;
      height: 44px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }

    /* --- LOADING DOTS (estilo suave) --- */
    .loading-dots {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      padding: 4px 0;
    }

    .loading-dots div {
      width: 6px;
      height: 6px;
      background-color: #8f9fb1;
      border-radius: 50%;
      animation: pulse 1.4s infinite ease-in-out;
    }

    .loading-dots div:nth-child(2) {
      animation-delay: 0.2s;
    }

    .loading-dots div:nth-child(3) {
      animation-delay: 0.4s;
    }

    @keyframes pulse {
      0%, 80%, 100% { opacity: 0.4; transform: scale(0.8); }
      40% { opacity: 1; transform: scale(1); }
    }

    /* Overlay para mobile quando sidebar estiver aberta */
    .sidebar-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0,0,0,0.3);
      z-index: 99;
      opacity: 0;
      transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
      display: block;
      opacity: 1;
    }

    /* --- RESPONSIVIDADE PARA MOBILE --- */
    @media (max-width: 768px) {
      body.sidebar-open {
        overflow: hidden;
      }

      .menu-toggle {
        display: flex;
      }

      .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 100;
        transform: translateX(-100%);
        box-shadow: 2px 0 10px rgba(0,0,0,0.05);
      }

      body.sidebar-open .sidebar {
        transform: translateX(0);
      }

      .chat-header {
        padding: 1.2rem 1rem 0.8rem 1rem;
      }

      .logo-row h1 {
        font-size: 1.3rem;
      }

      .subhead {
        padding-left: 0;
        margin-left: 0;
        font-size: 0.8rem;
      }

      .chat-messages {
        padding: 1.2rem 1rem;
      }

      .message {
        max-width: 90%;
      }

      .suggestions-panel {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
      }

      .suggestions-panel::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
      }

      .suggestion-chip {
        flex: 0 0 auto;
      }

      .input-footer {
        padding: 0.8rem 1rem 1.2rem 1rem;
      }

      .input-pill {
        padding-left: 1rem;
      }

      #messageInput {
        font-size: 1rem;
        padding: 10px 0;
      }

      .send-btn {
        width: 48px;
        height: 48px;
      }

      .message-time {
        font-size: 0.6rem;
      }
    }

    /* Ajuste para telas muito pequenas (ex: 380px) */
    @media (max-width: 480px) {
      .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 1.4rem;
      }

      .logo-row h1 {
        font-size: 1.2rem;
      }

      .message-bubble {
        padding: 10px 14px;
        font-size: 0.9rem;
      }

      .avatar {
        width: 30px;
        height: 30px;
      }

      .avatar svg {
        width: 16px;
        height: 16px;
      }
    }