.chat-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  background: #f0f0f0;
  border-top: 1px solid #ccc;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;  /* <-- Importante: Faz o bloco ocupar toda a largura sem estourar */
  z-index: 10;
}

.input-wrapper {
  flex-grow: 1;
  background: white;
  border-radius: 20px;
  padding: 8px 12px;
  border: 1px solid #ccc;
}

.input-wrapper input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 15px;
  background: transparent;
}

.send-button {
  background-color: #128c7e;
  color: white;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.3s;
  flex-shrink: 0; /* <-- Não deixar o botão encolher em telas pequenas */
}

.send-button:hover {
  background-color: #0d6f61;
}

















 body, html {
      margin: 0;
      padding: 0;
      font-family: Arial, sans-serif;
      height: 100%;
      background: #f0f2f5;
    }
    .section {
      display: none;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      height: 100vh;
    }
    .section.active { display: flex; }
    .panel {
      background: #fff;
      padding: 20px;
      border-radius: 10px;
      width: 300px;
      box-shadow: 0 0 10px rgba(0,0,0,0.1);
    }
    input, button {
      display: block;
      width: 100%;
      margin-top: 10px;
      padding: 10px;
      border-radius: 5px;
      border: 1px solid #ccc;
    }
    button.link {
      background: none;
      color: blue;
      text-align: center;
      cursor: pointer;
      border: none;
    }

    /* Chat Layout */
    .app {
      display: none;
      height: 100vh;
      overflow: hidden;
      flex-direction: row;
    }
    .menu-toggle {
      display: none;
      position: absolute;
      top: 10px;
      left: 10px;
      font-size: 26px;
      background: none;
      border: none;
      z-index: 9999;
      color: #333;
    }
    .sidebar {
      width: 30%;
      min-width: 280px;
      background: #fff;
      border-right: 1px solid #ddd;
      display: flex;
      flex-direction: column;
    }
    .sidebar-header {
      padding: 16px;
      background: #ededed;
      border-bottom: 1px solid #ccc;
    }
    .chat-list { overflow-y: auto; flex-grow: 1; }
    .chat-item {
      display: flex;
      gap: 10px;
      padding: 12px;
      border-bottom: 1px solid #eee;
      cursor: pointer;
    }
    .chat-item:hover { background: #f5f5f5; }
    .chat-item img {
      width: 40px;
      height: 40px;
      border-radius: 50%;
    }
    .chat-info h4 { margin: 0; font-size: 16px; }
    .chat-info p { font-size: 13px; color: #555; }
    .chat-window {
      flex-grow: 1;
      display: flex;
      flex-direction: column;
      background: #ece5dd;
      position: relative;
      height: 100%;
    }
    .chat-header {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px;
      background: #f0f0f0;
      border-bottom: 1px solid #ccc;
    }
    .chat-header img {
      width: 40px;
      height: 40px;
      border-radius: 50%;
    }
    .back-button {
      display: none;
      background: none;
      border: none;
      font-size: 24px;
      color: #333;
      margin-right: 10px;
    }
    .chat-body {
      flex-grow: 1;
      overflow-y: auto;
      padding: 15px;
      padding-bottom: 80px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .message {
      max-width: 60%;
      padding: 10px 14px;
      border-radius: 10px;
      font-size: 14px;
      line-height: 1.4;
    }
    .message.sent { background: #dcf8c6; align-self: flex-end; }
    .message.received { background: #fff; align-self: flex-start; }
    .chat-input {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 15px;
      background: #f0f0f0;
      border-top: 1px solid #ccc;
      position: absolute;
      bottom: 0;
      width: 100%;
      z-index: 10;
    }
    .input-wrapper {
      flex-grow: 1;
      background: white;
      border-radius: 20px;
      padding: 8px 12px;
      border: 1px solid #ccc;
    }
    .input-wrapper input {
      width: 100%;
      border: none;
      outline: none;
      font-size: 15px;
      background: transparent;
    }
    .send-button {
      background-color: #128c7e;
      color: white;
      border: none;
      border-radius: 50%;
      width: 42px;
      height: 42px;
      font-size: 18px;
      cursor: pointer;
    }
    .send-button:hover { background-color: #0d6f61; }
    @media (max-width: 768px) {
      .sidebar { position: fixed; top: 0; left: -100%; height: 100%; width: 80%; transition: left 0.3s ease; z-index: 1000; }
      .sidebar.show { left: 0; }
      .chat-window { width: 100%; }
      .menu-toggle { display: block; }
      .back-button { display: block; }
    }
