/* Lipslay Chat — Tier-1 Enterprise Luxury SaaS Messenger (WhatsApp/Telegram Web 2026 standard) */
:root {
  --wa-brand: #E11D48;
  --wa-brand-hover: #BE123C;
  --wa-brand-light: #FFF1F2;
  --wa-brand-border: #FECDD3;
  --wa-teal: #E11D48;
  --wa-green: #10B981;
  --wa-fab: #E11D48;
  --wa-sent: linear-gradient(135deg, #E11D48 0%, #BE123C 100%);
  --wa-recv: #FFFFFF;
  --wa-panel: #FFFFFF;
  --wa-panel-2: #F8FAFC;
  --wa-bg: #F1F5F9;
  --wa-ink: #0F172A;
  --wa-ink-secondary: #334155;
  --wa-muted: #64748B;
  --wa-border: #E2E8F0;
  --wa-border-light: #F1F5F9;
  --wa-read: #38BDF8;
  --wa-active: #FFF1F2;
  --wa-icon: #64748B;
  --wa-radius-sm: 8px;
  --wa-radius-md: 12px;
  --wa-radius-lg: 16px;
  --wa-radius-full: 9999px;
  --wa-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --wa-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --wa-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

/* Universal SVG Containment & Defense-in-depth */
svg {
  max-width: 100%;
}
.wa-wrap svg,
.wa-list svg,
.wa-main svg,
.wa-status svg,
.wa-file-btn svg,
.wa-search-box svg,
.wa-ico svg,
.wa-back svg,
.wa-composer .wa-icon svg,
.wa-send svg,
.wa-fab svg,
.wa-icon svg {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  flex-shrink: 0;
}
.wa-add-status {
  display: none !important;
}

/* Full-viewport chat — hide Lipslay site chrome */
body.wa-page {
  background: #0B141A !important;
  overflow: hidden !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}
body.wa-page .ls-header,
body.wa-page .ls-footer,
body.wa-page .ls-install,
body.wa-page .ls-gl-float,
body.wa-page .ls-acc-nav-toggle {
  display: none !important;
}

.wa-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: #0B141A;
  padding: 0;
}
.wa-shell::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 127px;
  background: linear-gradient(135deg, #E11D48 0%, #9F1239 100%);
  z-index: 0;
}
.wa-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  max-width: 1680px;
  height: 100%;
  margin: 0 auto;
  overflow: hidden;
  background: var(--wa-bg);
}

/* --- Left Roster Sidebar --- */
.wa-list {
  width: 32%;
  min-width: 350px;
  max-width: 440px;
  background: var(--wa-panel);
  border-right: 1px solid var(--wa-border);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.02);
}
.wa-list-head,
.wa-thread-head {
  background: #FFFFFF;
  color: var(--wa-ink);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  border-bottom: 1px solid var(--wa-border);
}
.wa-list-head strong,
.wa-thread-head strong {
  font-size: 17px;
  font-weight: 700;
  color: var(--wa-ink);
  letter-spacing: -0.01em;
}
.wa-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.wa-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Dashboard Action Pill */
.wa-dashboard-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--wa-ink-secondary);
  background: #FFFFFF;
  border: 1px solid var(--wa-border);
  border-radius: var(--wa-radius-full);
  text-decoration: none;
  box-shadow: var(--wa-shadow-sm);
  transition: all 0.15s ease;
}
.wa-dashboard-btn:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: var(--wa-brand);
  text-decoration: none;
  transform: translateY(-1px);
}
.wa-dashboard-btn i {
  color: var(--wa-brand);
  font-size: 12px;
}

/* Action Icon Buttons */
.wa-ico,
.wa-back {
  width: 36px;
  height: 36px;
  border: 0;
  background: #F8FAFC;
  border-radius: var(--wa-radius-full);
  color: var(--wa-icon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  flex-shrink: 0;
  transition: all 0.15s ease;
  border: 1px solid var(--wa-border-light);
}
.wa-ico:hover,
.wa-back:hover {
  background: #F1F5F9;
  color: var(--wa-ink);
  text-decoration: none;
  transform: scale(1.04);
}
.wa-ico svg,
.wa-back svg,
.wa-composer .wa-icon svg,
.wa-send svg,
.wa-fab svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.wa-ico form {
  display: inline;
  margin: 0;
}
.wa-ico.btn {
  background: transparent !important;
  border: 0 !important;
  color: var(--wa-icon) !important;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--wa-radius-full);
}
.wa-ico.btn:hover {
  background: #F1F5F9 !important;
  color: var(--wa-brand) !important;
}

/* Segmented Kind Tabs */
.wa-kind-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--wa-border);
}
.wa-kind-tabs a {
  flex: 1;
  text-align: center;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--wa-muted);
  text-decoration: none;
  border-radius: var(--wa-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.wa-kind-tabs a:hover {
  color: var(--wa-ink);
  background: #FFFFFF;
}
.wa-kind-tabs a.on {
  color: var(--wa-brand);
  background: #FFFFFF;
  box-shadow: var(--wa-shadow-sm);
}
.wa-kind-tabs .badge {
  background: var(--wa-brand) !important;
  color: #FFFFFF !important;
  border-radius: var(--wa-radius-full);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
}

/* Search Bar */
.wa-search {
  padding: 10px 14px 6px;
  background: var(--wa-panel);
}
.wa-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F1F5F9;
  border-radius: var(--wa-radius-full);
  padding: 0 14px;
  height: 38px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.wa-search-box:focus-within {
  background: #FFFFFF;
  border-color: var(--wa-brand-border);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}
.wa-search-box svg {
  width: 17px;
  height: 17px;
  fill: var(--wa-muted);
  flex-shrink: 0;
}
.wa-search input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: 0;
  font-size: 13.5px;
  color: var(--wa-ink);
}
.wa-search-clear {
  border: 0;
  background: transparent;
  color: var(--wa-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* Filter Pills Ribbon */
.wa-filters {
  display: flex;
  gap: 6px;
  padding: 6px 14px 10px;
  background: var(--wa-panel);
  border-bottom: 1px solid var(--wa-border-light);
  overflow-x: auto;
  scrollbar-width: none;
}
.wa-filters::-webkit-scrollbar {
  display: none;
}
.wa-filters button {
  border: 1px solid var(--wa-border);
  background: #FFFFFF;
  color: var(--wa-muted);
  border-radius: var(--wa-radius-full);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.wa-filters button:hover {
  background: #F8FAFC;
  color: var(--wa-ink);
  border-color: #CBD5E1;
}
.wa-filters button.on {
  background: var(--wa-brand-light);
  color: var(--wa-brand);
  border-color: var(--wa-brand-border);
}

/* Conversation Rows (Roster) */
.wa-rows {
  overflow-y: auto;
  flex: 1;
}
.wa-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--wa-border-light);
  color: var(--wa-ink);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s ease;
  position: relative;
}
.wa-row:hover {
  background: #F8FAFC;
  text-decoration: none;
}
.wa-row.active {
  background: #EFF6FF;
}
.wa-row.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3.5px;
  background: #2563EB;
  border-radius: 0 4px 4px 0;
}

/* Luxury Avatar & Gradients */
.wa-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.wa-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 17px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: var(--wa-shadow-sm);
  background: #64748B;
  transition: transform 0.15s ease;
}
.wa-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wa-avatar.support {
  background: linear-gradient(135deg, #10B981, #059669);
}

/* Deterministic Gradients */
.wa-grad-0 { background: linear-gradient(135deg, #F43F5E, #E11D48); }
.wa-grad-1 { background: linear-gradient(135deg, #8B5CF6, #6D28D9); }
.wa-grad-2 { background: linear-gradient(135deg, #06B6D4, #0284C7); }
.wa-grad-3 { background: linear-gradient(135deg, #10B981, #059669); }
.wa-grad-4 { background: linear-gradient(135deg, #F59E0B, #D97706); }
.wa-grad-5 { background: linear-gradient(135deg, #EC4899, #DB2777); }
.wa-grad-6 { background: linear-gradient(135deg, #6366F1, #4F46E5); }

/* Live Online Status Dot */
.wa-online-dot {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 11px;
  height: 11px;
  background: #10B981;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
}

.wa-row-body {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.wa-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  margin-bottom: 3px;
}
.wa-row strong {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--wa-ink);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.wa-row.has-unread strong {
  font-weight: 700;
  color: #0F172A;
}
.wa-row .preview-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}
.wa-row .preview {
  color: var(--wa-muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  flex: 1;
  min-width: 0;
}
.wa-row.has-unread .preview {
  color: #1E293B;
  font-weight: 500;
}
.wa-row .wa-unread {
  background: var(--wa-brand);
  color: #FFFFFF;
  border-radius: var(--wa-radius-full);
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 7px;
  min-width: 1.35rem;
  text-align: center;
  line-height: 1.4;
  box-shadow: 0 1px 3px rgba(225, 29, 72, 0.35);
  flex-shrink: 0;
}
.wa-row .wa-time {
  font-size: 11.5px;
  color: var(--wa-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.wa-row.has-unread .wa-time {
  color: var(--wa-brand);
  font-weight: 600;
}
.wa-row .wa-type {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--wa-brand);
  background: var(--wa-brand-light);
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Status Story Rings */
.wa-status {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 10px 14px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--wa-border);
  scrollbar-width: none;
}
.wa-status::-webkit-scrollbar {
  display: none;
}
.wa-status .ring {
  min-width: 58px;
  max-width: 68px;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--wa-ink-secondary);
  cursor: pointer;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.wa-status .ring:hover {
  transform: translateY(-1px);
}
.wa-status .ring span {
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.wa-status .dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2.5px solid var(--wa-brand);
  margin: 0 auto;
  overflow: hidden;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #54656F;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  flex-shrink: 0;
}
.wa-status .dot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.wa-status .dot.mine {
  border-color: #CBD5E1;
  position: relative;
}
.wa-status .dot.mine::after {
  content: "+";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--wa-brand);
  color: #FFFFFF;
  font-size: 14px;
  line-height: 16px;
  border: 2px solid #FFFFFF;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Right Active Chat Thread --- */
.wa-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: #F8FAFC;
}

/* Empty State / Welcome Screen */
/* Minimalist WhatsApp Web Style Empty State */
.wa-empty {
  margin: auto;
  text-align: center;
  color: var(--wa-muted);
  padding: 40px 24px;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.wa-empty-watermark {
  width: 92px;
  height: 92px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.08) 0%, rgba(225, 29, 72, 0.02) 100%);
  border: 1px solid rgba(225, 29, 72, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
  box-shadow: 0 10px 28px -4px rgba(225, 29, 72, 0.07);
}
.wa-watermark-icon svg,
.wa-empty-watermark svg {
  width: 44px !important;
  height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  fill: var(--wa-brand);
  opacity: 0.85;
}
.wa-empty h3,
.wa-empty-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--wa-ink);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.wa-empty p,
.wa-empty-subtitle {
  font-size: 14px;
  line-height: 1.5;
  color: var(--wa-muted);
  margin: 0 auto 28px;
  max-width: 380px;
}
.wa-empty .wa-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #94A3B8;
  padding: 6px 14px;
  background: #FFFFFF;
  border-radius: 999px;
  border: 1px solid var(--wa-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.wa-empty .wa-lock svg {
  width: 13px !important;
  height: 13px !important;
  fill: currentColor;
}

/* Active Thread Header */
.wa-thread-head {
  position: sticky;
  top: 0;
  z-index: 15;
}
.wa-thread-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.wa-thread-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: var(--wa-shadow-sm);
}
.wa-thread-head .wa-sub {
  font-size: 12.5px;
  color: var(--wa-muted);
  margin-top: 1px;
}
.wa-typing {
  color: var(--wa-brand) !important;
  font-weight: 600;
}

/* Chat Bubbles Stream */
.wa-bubbles {
  flex: 1;
  overflow-y: auto;
  padding: 18px 8% 12px;
}
.wa-day {
  text-align: center;
  margin: 16px 0;
  font-size: 12px;
}
.wa-day span {
  display: inline-block;
  background: #FFFFFF;
  border: 1px solid var(--wa-border);
  padding: 4px 14px;
  border-radius: var(--wa-radius-full);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  font-weight: 600;
  font-size: 11.5px;
  color: var(--wa-muted);
}
.wa-b {
  margin: 3px 0 8px;
  display: flex;
  animation: waFadeIn 0.15s ease-out;
}
@keyframes waFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.wa-b.mine {
  justify-content: flex-end;
}
.wa-b .bubble {
  position: relative;
  max-width: 68%;
  padding: 9px 13px 9px;
  border-radius: 16px 16px 16px 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  background: var(--wa-recv);
  font-size: 14px;
  line-height: 1.48;
  color: var(--wa-ink);
  word-break: break-word;
  border: 1px solid var(--wa-border);
}
.wa-b.mine .bubble {
  background: var(--wa-sent);
  color: #FFFFFF;
  border-color: transparent;
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.22);
}
.wa-b.mine .bubble .meta {
  color: rgba(255, 255, 255, 0.85);
}
.wa-b.mine .bubble .tick.read {
  color: var(--wa-read);
}
.wa-b .meta {
  float: right;
  margin: -2px 0 -2px 10px;
  font-size: 11px;
  color: var(--wa-muted);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  position: relative;
  top: 4px;
}
.wa-b .meta .tick {
  font-size: 14px;
  line-height: 1;
}
.wa-b .meta .tick.read {
  color: var(--wa-read);
}
.wa-pending svg {
  animation: waSpin 1.2s linear infinite;
}
@keyframes waSpin {
  100% { transform: rotate(360deg); }
}

/* Bubble Media Elements */
.wa-media {
  max-width: 100%;
  border-radius: 10px;
  display: block;
  margin-bottom: 6px;
}
.wa-scard {
  display: block;
  color: inherit;
  text-decoration: none;
  min-width: 240px;
  background: #FFFFFF;
  border: 1px solid var(--wa-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--wa-shadow-sm);
}
.wa-scard strong {
  display: block;
  padding: 10px 12px 0;
  font-size: 14px;
  color: var(--wa-ink);
}
.wa-scard-price {
  display: block;
  padding: 2px 12px 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--wa-brand);
}
.wa-scard-book {
  display: inline-block;
  margin: 10px 12px 12px;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  background: var(--wa-brand);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.3);
}
.wa-scard-book:hover {
  background: var(--wa-brand-hover);
  color: #FFFFFF;
  text-decoration: none;
}

/* Audio Player */
.wa-b .bubble audio {
  max-width: 100%;
  height: 36px;
  display: block;
  outline: 0;
}

/* Composer Capsule Dock */
.wa-composer {
  background: #FFFFFF;
  border-top: 1px solid var(--wa-border);
  padding: 10px 16px 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  position: sticky;
  bottom: 0;
  z-index: 15;
}
.wa-composer .wa-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #FFFFFF;
  border-radius: var(--wa-radius-full);
  padding: 5px 14px;
  min-height: 48px;
  border: 1px solid var(--wa-border);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  transition: border-color 0.2s ease;
}
.wa-composer .wa-input-wrap:focus-within {
  border-color: var(--wa-brand-border);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.08);
}
.wa-composer input[name=body],
.wa-composer #waBody {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 14.5px;
  background: transparent;
  padding: 8px 6px;
  color: var(--wa-ink);
}
.wa-composer button.wa-icon {
  background: transparent;
  color: var(--wa-icon);
  min-width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.wa-composer button.wa-icon:hover {
  background: #F1F5F9;
  color: var(--wa-brand);
}
.wa-composer button.wa-icon.rec {
  color: #FFFFFF;
  background: #EA4335;
  animation: waPulse 1.2s infinite;
}
@keyframes waPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.wa-composer .wa-send {
  background: var(--wa-brand);
  color: #FFFFFF;
  border: 0;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(225, 29, 72, 0.35);
  transition: all 0.15s ease;
}
.wa-composer .wa-send:hover {
  background: var(--wa-brand-hover);
  transform: scale(1.04);
}
.wa-composer .wa-send.hidden,
.wa-composer #waMic.hidden {
  display: none;
}

/* Modals & Menus */
.wa-status-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #FFFFFF;
  text-align: center;
}
.wa-status-modal.open {
  display: flex;
  flex-direction: column;
}
.wa-status-modal img,
.wa-status-modal video {
  max-width: min(540px, 92vw);
  max-height: 72vh;
  border-radius: var(--wa-radius-md);
  box-shadow: var(--wa-shadow-lg);
}
.wa-st-close {
  position: absolute;
  top: 24px;
  right: 28px;
  font-size: 32px;
  background: transparent;
  border: 0;
  color: #FFFFFF;
  cursor: pointer;
  line-height: 1;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}
.wa-st-close:hover {
  opacity: 1;
}
.wa-st-body {
  margin-top: 16px;
  font-size: 15px;
  font-weight: 500;
  color: #F8FAFC;
  max-width: 500px;
}

/* Bubble Context Menu */
.wa-bubble-menu {
  position: fixed;
  z-index: 4000;
  background: #FFFFFF;
  border: 1px solid var(--wa-border);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
  padding: 6px;
  min-width: 140px;
}
.wa-bubble-menu.hidden {
  display: none;
}
.wa-bubble-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--wa-ink);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.12s ease;
}
.wa-bubble-menu button:hover {
  background: #FFF1F2;
  color: var(--wa-brand);
}

/* Forward Modal */
.wa-forward-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 5000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.wa-forward-modal:not(.hidden) {
  display: flex;
}
.wa-fwd-panel {
  background: #FFFFFF;
  border-radius: 16px;
  width: min(400px, 92vw);
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}
.wa-fwd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--wa-border);
  font-weight: 700;
  color: var(--wa-ink);
}
.wa-fwd-close {
  border: 0;
  background: transparent;
  font-size: 24px;
  color: var(--wa-muted);
  cursor: pointer;
  line-height: 1;
}
.wa-fwd-close:hover {
  color: var(--wa-ink);
}
.wa-fwd-list {
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wa-fwd-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--wa-ink);
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.12s ease;
}
.wa-fwd-item:hover {
  background: #FFF1F2;
  color: var(--wa-brand);
}

/* Status Upload Dropzone */
.wa-status-dropzone {
  border: 2px dashed #CBD5E1;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  background: #F8FAFC;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}
.wa-status-dropzone:hover {
  border-color: var(--wa-brand);
  background: #FFF1F2;
}

.wa-reply-strip {
  background: #FFFFFF;
  border-top: 1px solid var(--wa-border);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-left: 4px solid var(--wa-brand);
}
.wa-reply-strip.hidden {
  display: none;
}
.wa-reply-body {
  flex: 1;
  min-width: 0;
}
.wa-reply-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--wa-brand);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.wa-reply-quote {
  font-size: 13px;
  color: var(--wa-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-reply-close {
  border: 0;
  background: transparent;
  font-size: 20px;
  color: var(--wa-muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

/* Responsive Mobile Layout */
@media (max-width: 900px) {
  .wa-shell::before { display: none; }
  .wa-wrap { max-width: 100%; }
  .wa-list { min-width: 0; max-width: 100%; width: 100%; }
  .wa-wrap.has-thread .wa-list { display: none; }
  .wa-wrap.no-thread .wa-thread { display: none; }
  .wa-bubbles { padding: 12px 4%; }
  .wa-b .bubble { max-width: 86%; }
  .wa-empty h3, .wa-empty-title { font-size: 20px; }
}

/* Shimmering Skeletons */
@keyframes lsShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.ls-skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
  background-size: 400% 100%;
  animation: lsShimmer 1.5s ease infinite;
  border-radius: 8px;
}
.ls-skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}
.ls-skeleton-line {
  height: 14px;
  margin-bottom: 8px;
  border-radius: 4px;
}

/* Phase 122: Role-Segregated Chat & Telemetry UI */
.ls-channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.ls-chip-expert {
  background: #FFF1F2;
  color: #E11D48;
  border: 1px solid #FECDD3;
}
.ls-chip-driver {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}
.ls-chip-group {
  background: #FAF5FF;
  color: #7E22CE;
  border: 1px solid #E9D5FF;
}
.ls-chip-support {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}
.ls-chip-personal {
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #E2E8F0;
}
.ls-chip-order {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.ls-header-role-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #F8FAFC;
  color: #475569;
  border: 1px solid #E2E8F0;
  letter-spacing: 0.2px;
}

.wa-telemetry-banner {
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  padding: 10px 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  z-index: 5;
  position: relative;
}
.wa-telemetry-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.wa-telemetry-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.wa-telemetry-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.wa-telemetry-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748B;
  letter-spacing: 0.5px;
}
.wa-telemetry-status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1.3;
}
.status-pending { background: #FEF3C7; color: #B45309; border: 1px solid #FDE68A; }
.status-accepted { background: #DBEAFE; color: #1D4ED8; border: 1px solid #BFDBFE; }
.status-on_the_way { background: #E0E7FF; color: #4338CA; border: 1px solid #C7D2FE; }
.status-arrived { background: #FEF08A; color: #854D0E; border: 1px solid #FDE047; }
.status-in_progress, .status-processing { background: #CFFAFE; color: #0E7490; border: 1px solid #A5F3FC; }
.status-complete, .status-completed { background: #DCFCE7; color: #15803D; border: 1px solid #BBF7D0; }
.status-canceled, .status-cancelled { background: #FEE2E2; color: #B91C1C; border: 1px solid #FECACA; }

.wa-telemetry-body {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #334155;
  flex-wrap: wrap;
}
.wa-telemetry-sep {
  color: #94A3B8;
  font-size: 10px;
}
.wa-telemetry-track-btn {
  background: #E11D48 !important;
  color: #FFFFFF !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  padding: 6px 14px !important;
  border: 0 !important;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.25) !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  transition: all 0.2s ease !important;
}
.wa-telemetry-track-btn:hover {
  background: #BE123C !important;
  color: #FFFFFF !important;
  transform: translateY(-1px);
}

/* LOCK-55: Adaptive Dark Mode Sync for Customer & Partner /messages */
html[data-theme="dark"],
body[data-theme="dark"],
body.dark-mode,
body.ls-dark-theme {
  --wa-recv: #1E293B;
  --wa-panel: #0F172A;
  --wa-panel-2: #1E293B;
  --wa-bg: #0B141A;
  --wa-ink: #F8FAFC;
  --wa-ink-secondary: #E2E8F0;
  --wa-muted: #94A3B8;
  --wa-border: #334155;
  --wa-border-light: #1E293B;
  --wa-active: rgba(225, 29, 72, 0.16);
  --wa-icon: #94A3B8;
}
html[data-theme="dark"] .wa-list-head,
html[data-theme="dark"] .wa-thread-head,
html[data-theme="dark"] .wa-telemetry-banner,
body[data-theme="dark"] .wa-list-head,
body[data-theme="dark"] .wa-thread-head,
body[data-theme="dark"] .wa-telemetry-banner,
body.dark-mode .wa-list-head,
body.dark-mode .wa-thread-head,
body.dark-mode .wa-telemetry-banner {
  background: #0F172A !important;
  color: #F8FAFC !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .wa-composer,
body[data-theme="dark"] .wa-composer,
body.dark-mode .wa-composer {
  background: #0F172A !important;
  border-top-color: #334155 !important;
}
html[data-theme="dark"] .wa-composer textarea,
html[data-theme="dark"] .wa-search-box input,
body[data-theme="dark"] .wa-composer textarea,
body[data-theme="dark"] .wa-search-box input,
body.dark-mode .wa-composer textarea,
body.dark-mode .wa-search-box input {
  background: #1E293B !important;
  color: #F8FAFC !important;
  border-color: #475569 !important;
}


