body {
  background: linear-gradient(180deg, #f8fafc 0%, #e8eef4 100%);
  font-family: "Inter", sans-serif;
}

.login-card {
  max-width: 480px;
  width: 100%;
  background: #fff;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.modal-content {
  border-radius: 12px;
}
.modal-header {
  border-bottom: none;
}
.modal-footer {
  border-top: none;
}

/* Sidebar base styles */
#sidebar {
  min-width: 250px;
  max-width: 250px;
  background: #fff;
  transition: all 0.3s ease;
}
#sidebar .nav-link {
  font-weight: 500;
  padding: 10px 15px;
  color: #333;
  border-radius: 6px;
}
#sidebar .nav-link:hover,
#sidebar .nav-link.active {
  background-color: #f0f4ff;
  color: #3b3597;
}

/* Mobile: sidebar hidden by default */
@media (max-width: 768px) {
  #sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    height: 100%;
    z-index: 1050;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  }
  #sidebar.active {
    left: 0;
  }
  #overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 1040;
    display: none;
  }
  #overlay.active {
    display: block;
  }
}

/* ---- Primary Color Override ---- */

/* Buttons - PRIMARY */
.btn-primary {
  background-color: #3b3597 !important;
  border-color: #3b3597 !important;
  color: #fff !important;
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: #322e84 !important;
  border-color: #322e84 !important;
}

/* ✅ Buttons - SUCCESS (FIX) */
.btn-success {
  color: #fff !important;
}
.btn-success:hover,
.btn-success:focus {
  color: #fff !important;
}

/* Links */
/* Links */
.text-primary,
a:not(.btn),
a.text-primary:not(.btn),
a.text-decoration-none:not(.btn),
.nav-link {
  color: #3b3597 !important;
}

a:not(.btn):hover,
.nav-link:hover {
  color: #2f2a79 !important;
}

a.btn.btn-primary:hover,
a.btn.btn-primary:focus {
  color: #fff !important;
  text-decoration: none;
}

/* Alerts / badges / active items */
.bg-primary,
.badge.bg-primary,
.active > .nav-link {
  background-color: #3b3597 !important;
  border-color: #3b3597 !important;
}

/* Form focus borders */
.form-control:focus {
  border-color: #3b3597 !important;
  box-shadow: 0 0 0 0.2rem rgba(59, 53, 151, 0.25) !important;
}

/* Account & Billing - Card layout optimization */
.card.text-center .card-body h6 {
  font-size: 1.05rem;
  letter-spacing: 0.3px;
}
.card.text-center .card-body h5 {
  font-size: 1.2rem;
}
.card.text-center .btn {
  font-size: 0.9rem;
  border-width: 1.5px;
}
.card.text-center {
  transition: all 0.2s ease-in-out;
}
.card.text-center:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}


/* =========================
   Conversation Chat UI
   ========================= */

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 72vh;
  overflow-y: auto;
  padding: 8px 4px;
}

.chat-row {
  display: flex;
  width: 100%;
}

.chat-row-user {
  justify-content: flex-end;
}

.chat-row-assistant {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: 78%;
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.chat-bubble-user {
  background: #4f46e5;
  color: #fff;
  border-top-right-radius: 6px;
}

.chat-bubble-assistant {
  background: #ffffff;
  color: #111827;
  border-top-left-radius: 6px;
}

.chat-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  opacity: 0.85;
  margin-bottom: 6px;
}

.chat-role {
  font-weight: 600;
}

.chat-time {
  white-space: nowrap;
}

.chat-text {
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 768px) {
  .chat-bubble {
    max-width: 92%;
  }
}
