.ruby-toggle {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    z-index: 10000;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(29, 78, 216, 0.35);
  }
  
  .ruby-panel {
    position: fixed;
    right: 1.5rem;
    bottom: 5.8rem;
    width: 360px;
    max-width: calc(100vw - 1rem);
    height: 520px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 14px 50px rgba(2, 6, 23, 0.25);
    z-index: 10000;
    display: none;
    overflow: hidden;
    border: 1px solid #e2e8f0;
  }
  
  .ruby-panel.active { display: flex; flex-direction: column; }
  
  .ruby-head {
    background: #0f172a;
    color: #fff;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .ruby-close {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
  }
  
  .ruby-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: #f8fafc;
  }
  
  .ruby-msg {
    margin-bottom: 10px;
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 12px;
    line-height: 1.45;
    font-size: 13px;
    white-space: pre-wrap;
  }
  
  .ruby-msg.user {
    margin-left: auto;
    background: #2563eb;
    color: #fff;
  }
  
  .ruby-msg.bot {
    margin-right: auto;
    background: #fff;
    color: #0f172a;
    border: 1px solid #dbeafe;
  }
  
  .ruby-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
  }
  
  .ruby-quick button {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    border-radius: 999px;
    font-size: 12px;
    padding: 6px 10px;
    cursor: pointer;
  }
  
  .ruby-input-wrap {
    display: flex;
    gap: 8px;
    border-top: 1px solid #e2e8f0;
    padding: 10px;
    background: #fff;
  }
  
  .ruby-input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    background: #ffffff !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    caret-color: #0f172a !important;
  }
  
  .ruby-input::placeholder {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
  }
  
  .ruby-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
    background: #ffffff !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
  }
  
  .ruby-send {
    border: 0;
    border-radius: 10px;
    background: #1d4ed8;
    color: #fff;
    padding: 0 14px;
    font-size: 13px;
    cursor: pointer;
  }
  
  @media (max-width: 768px) {
    .ruby-panel {
      right: 0.5rem;
      left: 0.5rem;
      width: auto;
      bottom: 5.3rem;
      height: 62vh;
    }
    .ruby-toggle {
      right: 1rem;
      bottom: 1rem;
    }
  }
  
  