/* =========================================================
   Home Services Marketplace
   Clean SaaS-style UI with Auto Light/Dark Theme
   ========================================================= */

/* ---------------------------------------------------------
   THEME TOKENS
   --------------------------------------------------------- */
:root {
  --hsm-bg: #f3f4f6;
  --hsm-surface: #ffffff;
  --hsm-surface-muted: #f9fafb;
  --hsm-border: #e5e7eb;
  --hsm-border-muted: #d1d5db;
  --hsm-text: #111827;
  --hsm-text-muted: #6b7280;
  --hsm-primary: #2563eb;
  --hsm-primary-soft: #dbeafe;
  --hsm-primary-dark: #1d4ed8;
  --hsm-danger: #dc2626;
  --hsm-success: #16a34a;
  --hsm-radius-lg: 16px;
  --hsm-radius-md: 10px;
  --hsm-radius-pill: 999px;
  --hsm-shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
  --hsm-shadow-elevated: 0 16px 40px rgba(15, 23, 42, 0.16);
  --hsm-transition-fast: 0.16s ease-out;
  --hsm-transition: 0.22s ease-out;
  --hsm-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Auto dark mode overrides */
@media (prefers-color-scheme: dark) {
  :root {
    --hsm-bg: #020617;
    --hsm-surface: #020617;
    --hsm-surface-muted: #020617;
    --hsm-border: #1f2937;
    --hsm-border-muted: #374151;
    --hsm-text: #e5e7eb;
    --hsm-text-muted: #9ca3af;
    --hsm-primary: #3b82f6;
    --hsm-primary-soft: rgba(59, 130, 246, 0.18);
    --hsm-primary-dark: #2563eb;
    --hsm-shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.65);
    --hsm-shadow-elevated: 0 24px 60px rgba(0, 0, 0, 0.85);
  }
}

/* =========================================================
   GLOBAL WRAPPERS
   ========================================================= */

.hsm-dashboard,
.hsm-booking-wrapper {
  font-family: var(--hsm-font);
  color: var(--hsm-text);
  background: var(--hsm-bg);
  padding: 24px;
  border-radius: var(--hsm-radius-lg);
  box-shadow: var(--hsm-shadow-soft);
  box-sizing: border-box;
}

/* Constrain width for central app-like layout */
.hsm-dashboard {
  max-width: 1100px;
  margin: 32px auto;
}
.hsm-booking-wrapper {
  max-width: 900px;
  margin: 32px auto;
}

/* Inner dashboard containers */
.hsm-dashboard-customer,
.hsm-dashboard-vendor,
.hsm-dashboard-pm,
.hsm-dashboard-employee {
  background: var(--hsm-surface);
  border-radius: var(--hsm-radius-lg);
  padding: 24px 22px;
  border: 1px solid var(--hsm-border);
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */

.hsm-dashboard h1,
.hsm-dashboard h2,
.hsm-dashboard h3,
.hsm-dashboard h4,
.hsm-booking-wrapper h1,
.hsm-booking-wrapper h2,
.hsm-booking-wrapper h3,
.hsm-booking-wrapper h4 {
  color: var(--hsm-text);
  margin-top: 0;
}

.hsm-dashboard h1,
.hsm-booking-wrapper h1 {
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

.hsm-dashboard h2,
.hsm-booking-wrapper h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.hsm-dashboard h3,
.hsm-booking-wrapper h3 {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.hsm-dashboard p,
.hsm-booking-wrapper p {
  color: var(--hsm-text-muted);
  line-height: 1.6;
  margin-top: 0.25rem;
  margin-bottom: 0.6rem;
}

.hsm-text-muted {
  color: var(--hsm-text-muted);
}

/* Section spacing */
#hsm-customer-bookings,
#hsm-customer-messages,
#hsm-vendor-profile,
#hsm-vendor-jobs,
#hsm-vendor-messages,
#hsm-pm-properties,
#hsm-pm-bookings,
#hsm-employee-jobs {
  margin-top: 18px;
}

/* =========================================================
   CARDS & STATS
   ========================================================= */

.hsm-card {
  background: var(--hsm-surface);
  border-radius: var(--hsm-radius-md);
  border: 1px solid var(--hsm-border);
  padding: 14px 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  transition:
    box-shadow var(--hsm-transition),
    transform var(--hsm-transition-fast),
    border-color var(--hsm-transition-fast),
    background-color var(--hsm-transition-fast);
}

.hsm-card strong {
  color: var(--hsm-text);
}

.hsm-card span {
  display: block;
  font-size: 0.9rem;
  color: var(--hsm-text-muted);
}

.hsm-card:hover {
  border-color: var(--hsm-primary-soft);
  box-shadow: var(--hsm-shadow-soft);
  transform: translateY(-1px);
}

/* Property manager notes block */
.hsm-pm-notes {
  margin-top: 4px;
  padding: 6px 8px;
  background: var(--hsm-surface-muted);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--hsm-text-muted);
}

.hsm-pm-prop-list {
  margin-bottom: 10px;
}

/* Stats row */
.hsm-header {
  margin-bottom: 18px;
}

.hsm-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.hsm-stat-card {
  border-radius: var(--hsm-radius-md);
  border: 1px solid var(--hsm-border);
  background: var(--hsm-surface-muted);
  padding: 10px 12px;
  font-size: 0.85rem;
}

.hsm-stat-card strong {
  font-size: 1.25rem;
  display: block;
  margin-bottom: 2px;
  color: var(--hsm-text);
}

/* Dark mode card tweaks */
@media (prefers-color-scheme: dark) {
  .hsm-card {
    background: #020617;
    border-color: var(--hsm-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  }
  .hsm-pm-notes {
    background: #020617;
    border: 1px solid var(--hsm-border-muted);
  }
  .hsm-stat-card {
    background: #020617;
  }
}

/* Generic pill */
.hsm-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--hsm-radius-pill);
  background: #eff6ff;
  color: #1d4ed8;
}

/* =========================================================
   TABS
   ========================================================= */

.hsm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.hsm-tab-button {
  background: transparent;
  border-radius: var(--hsm-radius-pill);
  border: 1px solid var(--hsm-border);
  padding: 6px 12px;
  font-size: 0.9rem;
  color: var(--hsm-text-muted);
  cursor: pointer;
  transition:
    background-color var(--hsm-transition-fast),
    border-color var(--hsm-transition-fast),
    color var(--hsm-transition-fast),
    transform var(--hsm-transition-fast);
}

.hsm-tab-button:hover {
  background: #e5e7eb;
}

.hsm-tab-button.hsm-tab-active {
  background: var(--hsm-primary-soft);
  border-color: var(--hsm-primary);
  color: var(--hsm-primary-dark);
}

.hsm-tab-panel {
  display: none;
}

.hsm-tab-panel.hsm-tab-panel-active {
  display: block;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.hsm-button,
.hsm-button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: var(--hsm-radius-pill);
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color var(--hsm-transition),
    border-color var(--hsm-transition),
    color var(--hsm-transition),
    box-shadow var(--hsm-transition),
    transform var(--hsm-transition-fast);
  text-decoration: none;
  outline: none;
}

.hsm-button {
  background: var(--hsm-surface);
  color: var(--hsm-text);
  border-color: var(--hsm-border);
}

.hsm-button:hover {
  background: #f3f4f6;
  border-color: var(--hsm-border-muted);
}

.hsm-button-primary {
  background: var(--hsm-primary);
  color: #ffffff;
  border-color: var(--hsm-primary);
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.2);
}

.hsm-button-primary:hover {
  background: var(--hsm-primary-dark);
  border-color: var(--hsm-primary-dark);
  transform: translateY(-0.5px);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.3);
}

/* Context buttons inside cards */
.hsm-card .hsm-button,
.hsm-card .hsm-button-primary {
  margin-top: 8px;
}

/* Message buttons (JS uses .hsm-msg-btn) */
.hsm-msg-btn {
  margin-top: 8px;
}

/* Dark mode button tweak */
@media (prefers-color-scheme: dark) {
  .hsm-button {
    background: #020617;
    border-color: var(--hsm-border-muted);
    color: var(--hsm-text);
  }
  .hsm-button:hover {
    background: #0f172a;
  }
  .hsm-button-primary {
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.5);
  }
}

/* =========================================================
   FORMS (DASHBOARD + BOOKING)
   ========================================================= */

.hsm-dashboard input[type="text"],
.hsm-dashboard input[type="email"],
.hsm-dashboard input[type="tel"],
.hsm-dashboard input[type="number"],
.hsm-dashboard input[type="datetime-local"],
.hsm-dashboard textarea,
.hsm-dashboard select,
.hsm-booking-wrapper input[type="text"],
.hsm-booking-wrapper input[type="email"],
.hsm-booking-wrapper input[type="tel"],
.hsm-booking-wrapper input[type="number"],
.hsm-booking-wrapper input[type="datetime-local"],
.hsm-booking-wrapper textarea,
.hsm-booking-wrapper select {
  width: 100%;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--hsm-border);
  padding: 8px 10px;
  font-size: 0.95rem;
  font-family: var(--hsm-font);
  color: var(--hsm-text);
  background: var(--hsm-surface-muted);
  transition:
    border-color var(--hsm-transition-fast),
    box-shadow var(--hsm-transition-fast),
    background-color var(--hsm-transition-fast),
    transform var(--hsm-transition-fast);
  box-sizing: border-box;
}

.hsm-dashboard input:focus,
.hsm-dashboard textarea:focus,
.hsm-dashboard select:focus,
.hsm-booking-wrapper input:focus,
.hsm-booking-wrapper textarea:focus,
.hsm-booking-wrapper select:focus {
  outline: none;
  border-color: var(--hsm-primary);
  box-shadow: 0 0 0 1px var(--hsm-primary-soft);
  background: #ffffff;
}

@media (prefers-color-scheme: dark) {
  .hsm-dashboard input[type="text"],
  .hsm-dashboard input[type="email"],
  .hsm-dashboard input[type="tel"],
  .hsm-dashboard input[type="number"],
  .hsm-dashboard input[type="datetime-local"],
  .hsm-dashboard textarea,
  .hsm-dashboard select,
  .hsm-booking-wrapper input[type="text"],
  .hsm-booking-wrapper input[type="email"],
  .hsm-booking-wrapper input[type="tel"],
  .hsm-booking-wrapper input[type="number"],
  .hsm-booking-wrapper input[type="datetime-local"],
  .hsm-booking-wrapper textarea,
  .hsm-booking-wrapper select {
    background: #020617;
    border-color: var(--hsm-border-muted);
    color: var(--hsm-text);
  }
  .hsm-dashboard input:focus,
  .hsm-dashboard textarea:focus,
  .hsm-dashboard select:focus,
  .hsm-booking-wrapper input:focus,
  .hsm-booking-wrapper textarea:focus,
  .hsm-booking-wrapper select:focus {
    background: #020617;
  }
}

.hsm-dashboard label,
.hsm-booking-wrapper label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--hsm-text);
}

.hsm-dashboard label + input,
.hsm-dashboard label + textarea,
.hsm-dashboard label + select,
.hsm-booking-wrapper label + input,
.hsm-booking-wrapper label + textarea,
.hsm-booking-wrapper label + select {
  margin-bottom: 10px;
}

/* Checkboxes */
.hsm-dashboard input[type="checkbox"],
.hsm-booking-wrapper input[type="checkbox"] {
  width: auto;
  margin-right: 4px;
}

/* Vendor payment checkbox helper */
.v-pay {
  margin-right: 6px;
}

/* Booking helpers */
.hsm-booking-wrapper h2 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.hsm-booking-wrapper .hsm-card {
  margin-top: 12px;
}

/* =========================================================
   AUTH FORMS (SIGNUP, LOGIN, FORGOT, RESET)
   ========================================================= */

.hsm-auth-wrapper {
  max-width: 420px;
  margin: 40px auto;
  padding: 30px;
  background: var(--hsm-surface);
  border-radius: 12px;
  box-shadow: var(--hsm-shadow-soft);
  box-sizing: border-box;
}

.hsm-auth-wrapper h2 {
  text-align: center;
  margin-bottom: 20px;
}

.hsm-auth-wrapper label {
  display: block;
  margin-top: 15px;
  font-weight: 600;
  color: var(--hsm-text);
}

.hsm-auth-wrapper input,
.hsm-auth-wrapper select,
.hsm-auth-wrapper textarea {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--hsm-border-muted);
  margin-top: 6px;
  font-family: var(--hsm-font);
  box-sizing: border-box;
}

.hsm-auth-wrapper input:focus,
.hsm-auth-wrapper select:focus,
.hsm-auth-wrapper textarea:focus {
  outline: none;
  border-color: var(--hsm-primary);
  box-shadow: 0 0 0 1px var(--hsm-primary-soft);
  background: #ffffff;
}

.hsm-auth-wrapper button {
  width: 100%;
  margin-top: 20px;
  background: var(--hsm-primary);
  color: white;
  padding: 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition:
    background-color var(--hsm-transition-fast),
    box-shadow var(--hsm-transition-fast),
    transform var(--hsm-transition-fast);
}

.hsm-auth-wrapper button:hover {
  background: var(--hsm-primary-dark);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

.hsm-error {
  color: var(--hsm-danger);
  margin-bottom: 10px;
}

.hsm-success {
  color: var(--hsm-success);
  margin-bottom: 10px;
}

/* =========================================================
   VENDOR ONBOARDING WIZARD
   ========================================================= */

.hsm-onboarding-wrapper {
  max-width: 760px;
  margin: 40px auto;
  padding: 30px;
  background: var(--hsm-surface);
  border-radius: 12px;
  box-shadow: var(--hsm-shadow-soft);
  box-sizing: border-box;
}

.hsm-onboarding-wrapper h2 {
  margin-bottom: 12px;
}

.hsm-onboarding-steps {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.hsm-step {
  flex: 1 1 120px;
  padding: 8px 10px;
  border-radius: var(--hsm-radius-pill);
  border: 1px solid var(--hsm-border);
  font-size: 13px;
  text-align: center;
  background: var(--hsm-surface-muted);
  color: var(--hsm-text-muted);
}

.hsm-step.active {
  background: var(--hsm-primary);
  color: #fff;
  border-color: var(--hsm-primary);
}

.hsm-onboarding-form label {
  display: block;
  margin-top: 15px;
  font-weight: 600;
  color: var(--hsm-text);
}

.hsm-onboarding-form input,
.hsm-onboarding-form textarea {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--hsm-border-muted);
  margin-top: 6px;
  font-family: var(--hsm-font);
  box-sizing: border-box;
}

.hsm-onboarding-form input:focus,
.hsm-onboarding-form textarea:focus {
  outline: none;
  border-color: var(--hsm-primary);
  box-shadow: 0 0 0 1px var(--hsm-primary-soft);
}

.hsm-onboarding-form button {
  margin-top: 20px;
  background: var(--hsm-primary);
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition:
    background-color var(--hsm-transition-fast),
    box-shadow var(--hsm-transition-fast),
    transform var(--hsm-transition-fast);
}

.hsm-onboarding-form button:hover {
  background: var(--hsm-primary-dark);
  box-shadow: var(--hsm-shadow-elevated);
  transform: translateY(-1px);
}

.hsm-service-list {
  margin: 10px 0 15px;
  max-height: 200px;
  overflow-y: auto;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--hsm-border);
  background: var(--hsm-surface-muted);
}

.hsm-service-checkbox {
  display: block;
  margin-bottom: 5px;
}

.hsm-legal-checkbox {
  margin-top: 15px;
  font-size: 0.9rem;
}

/* =========================================================
   CHAT / MESSAGING
   ========================================================= */

.hsm-chat-window {
  margin-top: 12px;
  border-radius: var(--hsm-radius-md);
  border: 1px solid var(--hsm-border);
  background: var(--hsm-surface-muted);
  display: flex;
  flex-direction: column;
  height: 320px;
  max-height: 55vh;
}

/* Header */
.hsm-chat-header {
  padding: 8px 10px 6px;
  border-bottom: 1px solid var(--hsm-border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hsm-chat-header-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--hsm-text);
}

.hsm-chat-header-subtitle {
  font-size: 0.8rem;
  color: var(--hsm-text-muted);
}

/* Messages list */
.hsm-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

/* Bubbles */
.hsm-chat-bubble {
  background: var(--hsm-surface);
  border-radius: 14px;
  padding: 8px 10px;
  margin-bottom: 8px;
  border: 1px solid var(--hsm-border);
  font-size: 0.9rem;
  position: relative;
}

.hsm-chat-bubble strong {
  font-size: 0.8rem;
  color: var(--hsm-text-muted);
}

.hsm-chat-time {
  font-size: 0.7rem;
  color: var(--hsm-text-muted);
  margin-top: 4px;
}

/* Typing indicator */
.hsm-chat-typing-indicator {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 6px;
  font-size: 0.78rem;
  color: var(--hsm-text-muted);
}

.hsm-typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--hsm-primary);
  opacity: 0.3;
  animation: hsmTypingBounce 1.1s infinite ease-in-out;
}

.hsm-typing-dot:nth-child(1) {
  animation-delay: 0s;
}
.hsm-typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}
.hsm-typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

.hsm-typing-label {
  margin-left: 2px;
}

@keyframes hsmTypingBounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.3;
  }
  40% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

/* Input row (A1 layout) */
.hsm-chat-input-row {
  border-top: 1px solid var(--hsm-border);
  padding: 6px 8px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.hsm-chat-input {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid var(--hsm-border);
  padding: 8px 10px;
  font-family: var(--hsm-font);
  font-size: 0.95rem;
  background: var(--hsm-surface);
  color: var(--hsm-text);
  box-sizing: border-box;
}

.hsm-chat-input:focus {
  outline: none;
  border-color: var(--hsm-primary);
  box-shadow: 0 0 0 1px var(--hsm-primary-soft);
}

.hsm-chat-send {
  padding: 8px 14px;
  border-radius: var(--hsm-radius-pill);
  border: 1px solid var(--hsm-primary);
  background: var(--hsm-primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.25);
  transition:
    background-color var(--hsm-transition-fast),
    box-shadow var(--hsm-transition-fast),
    transform var(--hsm-transition-fast);
}

.hsm-chat-send:hover {
  background: var(--hsm-primary-dark);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

/* Dark mode chat tweaks */
@media (prefers-color-scheme: dark) {
  .hsm-chat-window {
    background: #020617;
    border-color: var(--hsm-border);
  }
  .hsm-chat-bubble {
    background: #020617;
    border-color: var(--hsm-border-muted);
  }
  .hsm-chat-input {
    background: #020617;
    border-color: var(--hsm-border-muted);
    color: var(--hsm-text);
  }
  /* =========================================================
   ADD THIS TO THE BOTTOM OF YOUR STYLE.CSS
   This fixes the "Sidebar stacking on top of Chat" issue
   ========================================================= */

.hsm-chat-layout {
  display: flex;              /* Places Sidebar next to Main Window */
  height: 500px;              /* Fixed height so scrolling works */
  max-height: 70vh;
  border: 1px solid var(--hsm-border);
  border-radius: var(--hsm-radius-lg);
  background: var(--hsm-surface);
  overflow: hidden;           /* Keeps everything inside the rounded corners */
}

/* 1. THE SIDEBAR (Left Side) */
.hsm-chat-sidebar {
  width: 300px;               /* Fixed width */
  border-right: 1px solid var(--hsm-border);
  background: var(--hsm-surface-muted);
  display: flex;
  flex-direction: column;
}

.hsm-chat-thread-list-scroll {
  flex: 1;
  overflow-y: auto;           /* Allows sidebar to scroll independently */
}

.hsm-chat-thread-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hsm-chat-thread-item {
  border-bottom: 1px solid var(--hsm-border-muted);
}

.hsm-chat-thread-button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 12px 14px;
  cursor: pointer;
}

.hsm-chat-thread-button:hover {
  background: rgba(0,0,0,0.03);
}

/* Highlight the active chat in the sidebar */
.hsm-chat-thread-item.is-active .hsm-chat-thread-button {
  background: #ffffff;
  border-left: 4px solid var(--hsm-primary);
}

/* 2. THE MAIN CHAT AREA (Right Side) */
.hsm-chat-main {
  flex: 1;                    /* Takes up remaining space */
  display: flex;
  flex-direction: column;
  background: var(--hsm-surface);
}

.hsm-chat-main-header {
  padding: 10px 16px;
  border-bottom: 1px solid var(--hsm-border);
  background: var(--hsm-surface);
}

.hsm-chat-main-body {
  flex: 1;
  overflow: hidden;
  background: var(--hsm-surface-muted);
  display: flex;
  flex-direction: column;
}

/* Ensure the composer stays at the bottom */
.hsm-chat-composer {
  padding: 12px;
  background: var(--hsm-surface);
  border-top: 1px solid var(--hsm-border);
}

.hsm-chat-composer-inner {
  display: flex;
  gap: 10px;
}

/* 3. MOBILE RESPONSIVE FIX */
@media (max-width: 768px) {
  .hsm-chat-layout {
    flex-direction: column;   /* Stack them on mobile */
    height: auto;
  }
  .hsm-chat-sidebar {
    width: 100%;
    height: 180px;            /* Short scrollable list on mobile */
    border-right: none;
    border-bottom: 1px solid var(--hsm-border);
  }
  .hsm-chat-main {
    height: 400px;
  }
}
}
