:root {
    --gold: #e5ab54;
    --gold-dark: #b8832e;
    --dark: #0A0F1E;
    --green: #2db87a;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body { font-family: 'Rajdhani', sans-serif; background: #f6f7fb; min-height: 100vh; }

  /* ══════════ CHAT BUBBLE ══════════ */
  .chat-bubble {
    position: fixed;
    bottom: 28px; right: 28px;
    width: 60px; height: 60px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(229,171,84,0.4);
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s;
  }
  .chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 32px rgba(229,171,84,0.5);
  }
  .chat-bubble svg { width: 26px; height: 26px; color: var(--dark); transition: all 0.3s; }
  .chat-bubble.open svg.icon-chat { display: none; }
  .chat-bubble.open svg.icon-close { display: block !important; }

  /* Pulse ring */
  .chat-bubble::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(229,171,84,0.3);
    animation: bubble-pulse 2.5s ease-in-out infinite;
  }
  @keyframes bubble-pulse {
    0%,100% { transform: scale(1); opacity: 0.6; }
    50%      { transform: scale(1.15); opacity: 0; }
  }

  /* Online dot */
  .chat-bubble-dot {
    position: absolute;
    top: 2px; right: 2px;
    width: 14px; height: 14px;
    background: var(--green);
    border-radius: 50%;
    border: 2px solid #f6f7fb;
  }

  /* ══════════ CHAT WINDOW ══════════ */
  .chat-window {
    position: fixed;
    bottom: 104px; right: 28px;
    width: 360px;
    max-height: 520px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(10,15,30,0.15), 0 2px 8px rgba(10,15,30,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 999;
    transform: scale(0.85) translateY(20px);
    transform-origin: bottom right;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  }
  .chat-window.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  /* Header */
  .chat-head {
    background: linear-gradient(135deg, var(--dark), #152040);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    flex-shrink: 0;
  }
  .chat-head::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1.5px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), transparent);
  }
  .chat-head-avatar {
    width: 40px; height: 40px;
    background: rgba(229,171,84,0.15);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    position: relative;
  }
  .chat-head-avatar svg { width: 20px; height: 20px; color: var(--gold); }
  .chat-head-avatar::after {
    content: '';
    position: absolute;
    bottom: 1px; right: 1px;
    width: 10px; height: 10px;
    background: var(--green);
    border-radius: 50%;
    border: 2px solid var(--dark);
  }
  .chat-head-info { flex: 1; }
  .chat-head-name {
    font-family: 'Oswald', sans-serif;
    font-size: 14px; font-weight: 700;
    color: #fff; letter-spacing: 0.3px;
  }
  .chat-head-status {
    font-size: 11px; font-weight: 500;
    color: var(--green);
    display: flex; align-items: center; gap: 5px;
    margin-top: 1px;
  }
  .chat-head-status::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: bubble-pulse 2s ease-in-out infinite;
  }
  .chat-head-close {
    width: 28px; height: 28px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
  }
  .chat-head-close:hover { background: rgba(255,255,255,0.15); }
  .chat-head-close svg { width: 13px; height: 13px; color: rgba(255,255,255,0.6); }

  /* Messages area */
  .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 320px;
    scroll-behavior: smooth;
  }
  .chat-messages::-webkit-scrollbar { width: 4px; }
  .chat-messages::-webkit-scrollbar-track { background: transparent; }
  .chat-messages::-webkit-scrollbar-thumb { background: rgba(10,15,30,0.1); border-radius: 4px; }

  /* Message bubbles */
  .chat-msg {
    display: flex;
    flex-direction: column;
    gap: 3px;
    animation: msg-in 0.3s ease;
  }
  @keyframes msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .chat-msg-bot { align-items: flex-start; }
  .chat-msg-user { align-items: flex-end; }

  .chat-bubble-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13.5px; font-weight: 500;
    line-height: 1.6;
  }
  .chat-msg-bot .chat-bubble-msg {
    background: #f3f4f8;
    color: var(--dark);
    border-bottom-left-radius: 4px;
  }
  .chat-msg-user .chat-bubble-msg {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--dark);
    font-weight: 600;
    border-bottom-right-radius: 4px;
  }
  .chat-msg-time {
    font-size: 10px; font-weight: 600;
    color: rgba(10,15,30,0.25);
    padding: 0 4px;
  }

  /* Typing indicator */
  .chat-typing {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    animation: msg-in 0.3s ease;
  }
  .chat-typing-dots {
    background: #f3f4f8;
    border-radius: 14px;
    border-bottom-left-radius: 4px;
    padding: 12px 16px;
    display: flex; gap: 4px; align-items: center;
  }
  .chat-typing-dots span {
    width: 6px; height: 6px;
    background: rgba(10,15,30,0.25);
    border-radius: 50%;
    animation: typing-dot 1.4s ease-in-out 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-dot {
    0%,80%,100% { transform: scale(1); opacity: 0.4; }
    40%          { transform: scale(1.3); opacity: 1; }
  }

  /* Quick replies */
  .chat-quick {
    padding: 8px 16px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex-shrink: 0;
    border-top: 1px solid rgba(10,15,30,0.05);
  }
  .chat-quick-btn {
    padding: 6px 12px;
    background: rgba(229,171,84,0.08);
    border: 1px solid rgba(229,171,84,0.25);
    border-radius: 20px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px; font-weight: 600;
    color: var(--gold-dark);
    cursor: pointer;
    transition: all 0.2s;
  }
  .chat-quick-btn:hover {
    background: rgba(229,171,84,0.15);
    border-color: var(--gold);
  }

  /* Input area */
  .chat-input-wrap {
    padding: 12px 16px;
    border-top: 1px solid rgba(10,15,30,0.07);
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
    background: #fff;
  }
  .chat-input {
    flex: 1;
    border: 1.5px solid rgba(10,15,30,0.1);
    border-radius: 22px;
    padding: 9px 16px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13.5px; font-weight: 500;
    color: var(--dark);
    background: #f8f9fb;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
  }
  .chat-input:focus { border-color: var(--gold); background: #fff; }
  .chat-input::placeholder { color: rgba(10,15,30,0.3); }

  .chat-send {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    border-radius: 50%;
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s;
    box-shadow: 0 3px 10px rgba(229,171,84,0.3);
  }
  .chat-send:hover { transform: scale(1.08); box-shadow: 0 5px 16px rgba(229,171,84,0.4); }
  .chat-send svg { width: 15px; height: 15px; color: var(--dark); }

  /* Mobile */
  @media (max-width: 440px) {
    .chat-window { width: calc(100vw - 32px); right: 16px; bottom: 96px; }
    .chat-bubble { right: 16px; bottom: 20px; }
  }