    /* --- Floating Toggle Button --- */
    #chat-toggle {
      position: fixed;
      bottom: 65px;
      right: 20px;
      width: 60px;
      height: 60px;
      border-radius: 50%;
      background: #25d366;
      color: white;
      border: none;
      cursor: pointer;
      box-shadow: 0 4px 15px rgba(0, 168, 132, 0.4);
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: transform 0.3s ease, background 0.3s;
    }
    #chat-toggle:hover { transform: scale(1.1); background: #008f70; }

    /* --- Chat Container --- */
    .chat-container {
      position: fixed;
      bottom: 62px;
      right: 18px;
      width: 520px;
      max-width: 90vw;
      height: 580px;
      background: #fff;
      border-radius: 8px;
      box-shadow: 0 10px 30px rgba(0,0,0,0.15);
      display: flex;
      flex-direction: column;
      z-index: 9999;
      overflow: hidden;
      transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      transform: translateY(20px);
      opacity: 0;
      pointer-events: none;
    }

    .chat-container.active {
      transform: translateY(0);
      opacity: 1;
      pointer-events: auto;
    }

    /* --- Header --- */
    .chat-header {
      background-color: #00a884;
      color: white;
      padding: 18px 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-weight: 800;
      font-size: 20px;
    }

    .status-dot {
      height: 8px;
      width: 8px;
      background-color: #00a884;
      border-radius: 50%;
      display: inline-block;
      margin-right: 8px;
      box-shadow: 0 0 5px #00a884;
    }

    .close-btn { cursor: pointer; font-size: 24px; line-height: 1; }

    /* --- Messages Area --- */
    .chat-messages {
      flex: 1;
      padding: 20px;
      overflow-y: auto;
      background: #fff;
      display: flex;
      flex-direction: column;
      gap: 15px;
    }

    .msg {
      padding: 12px 16px;
      font-size: 16px;
      line-height: 1.5;
      max-width: 80%;
      word-wrap: break-word;
      position: relative;
    }

    .user-msg {
      align-self: flex-end;
      background: #00a884;
      color: white;
      border-radius: 15px 15px 2px 15px;
    }

    .bot-msg {
      align-self: flex-start;
      background: #f0f0f0;
      color: #333333;
      border-radius: 15px 15px 15px 2px;
      border: 1px solid #e5e5e5;
    }

    /* --- Typing Animation --- */
    .typing { display: flex; gap: 4px; padding: 5px 0; }
    .typing span { width: 6px; height: 6px; background: #aaa; border-radius: 50%; animation: bounce 1.3s infinite; }
    .typing span:nth-child(2) { animation-delay: 0.2s; }
    .typing span:nth-child(3) { animation-delay: 0.4s; }
    @keyframes bounce { 
      0%, 60%, 100% { transform: translateY(0); } 
      30% { transform: translateY(-6px); background: #00a884; } 
    }

    /* --- Input Area --- */
    .chat-input {
      display: flex;
      padding: 15px;
      border-top: 1px solid #eee;
      background: #fff;
      gap: 10px;
    }

    .chat-input input {
      flex: 1;
      border: 1px solid #ddd;
      border-radius: 4px;
      padding: 10px 15px;
      outline: none;
      height: 40px;
      transition: border 0.3s;
      font-size: 16px;
    }

    .chat-input input:focus { border-color: #00a884; }

    .chat-input button {
      background: #00a884;
      color: white;
      border: none;
      border-radius: 8px;
      padding: 0 15px;
      height: 40px; 
      cursor: pointer;
      font-size: 15px;
      transition: background 0.3s, opacity 0.3s;
    }

    .chat-input button:disabled {
      background: #ccc;
      cursor: not-allowed;
    }

    .msg {
      white-space: pre-wrap;       /* Crucial for line breaks */
      word-wrap: break-word;       /* Prevents long text from breaking layout */
      display: block;              /* Ensures markdown blocks (like lists) stack */
    }

    /* Ensure the bubble respects line breaks and markdown spacing */
    .bot-msg {
      white-space: normal; /* marked.parse handles the spacing now */
    }

    .bot-msg p {
      margin-bottom: 10px;
    }

    .bot-msg p:last-child {
      margin-bottom: 0;
    }

    .bot-msg ul, .bot-msg ol {
      margin: 5px 0 10px 20px;
      padding: 0;
    }

    .bot-msg li {
      margin-bottom: 5px;
    }


/* ===================================================== */
/* ========= SaaS LOGIN UI (NEW ADDITIONS) ============== */
/* ===================================================== */

.login-card, .otp-card {
  
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 10px;
  padding: 28px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  border: 1px solid #eee;
  display:flex;
  flex-direction:column;
  gap:10px
}

.login-card h3,
.otp-card h3 {
  font-size: 18px;
  margin-bottom: 5px;
}

.login-card p,
.otp-card p {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.login-card input {
  width: 100%;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-size: 14px;
}

.login-card input:focus {
  border-color: #00a884;
}

.login-card button {
  width: 100%;
  padding: 5px;
  background: #00a884;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.login-card button:hover {
  background: #008f70;
}

/* OTP INPUT BOXES */

.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 15px 0;
}

.otp-inputs input {
  width: 40px;
  height: 45px;
  text-align: center;
  font-size: 18px;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
}

.otp-inputs input:focus {
  border-color: #00a884;
}

.otp-card button {
  width: 100%;
  padding: 5px;
  background: #00a884;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.otp-card button:hover {
  background: #008f70;
}

.achat-body{
  flex:1;
  display:flex;
  justify-content:center;
  align-items:center;
}

.email-status{
  font-size:13px;
  margin-top:8px;
  color:#666;
  height:18px;
}

.email-status.sending{
  color:#00a884;
}

.email-status.error{
  color:#e53935;
}


.chat{ 
  height: 90vh;
  overflow-y: auto;
  padding-top: 40%;

}
#chat{
  display:none;    
}

#otpCard{
  display:none;
}

/* --- Chat Container --- */
#chat{
}