/* ==========================================================================
   WaveConnect Professional Enterprise CRM Design System
   Architecture: Directly inspired by Numberwale Admin (Tailwind + Shadcn UI)
   Theme: Subtle Warm Orange Canvas (Eye-Friendly, Zero Glare, High Contrast)
   ========================================================================== */

/* ─── 1. CORE CSS CUSTOM PROPERTIES (WARM EYE-FRIENDLY TOKENS) ─── */
:root {
  /* Numberwale Signature Brand Colors */
  --primary: 20.5 90.2% 48.2%;            /* #EA580C - Numberwale Orange */
  --primary-hover: #c2410c;
  --primary-light: #fff7ed;
  --primary-border: #fed7aa;
  
  --color-woot: #ea580c !important;
  --w-500: #ea580c !important;
  --b-500: #ea580c !important;
  --brand-color: #ea580c !important;
  --color-primary: #ea580c !important;

  /* Subtle Warm Eye-Friendly Canvas (Aankho me bilkul na chubhe) */
  --bg-warm-canvas: #faf6f0;               /* Soothing warm linen */
  --bg-warm-chat: #faf5ed;                 /* Warm relaxing messaging canvas */
  --bg-warm-card: #ffffff;                 /* Pure crisp white for cards & bubbles */
  --border-warm: #ede4d8;                  /* Gentle warm divider */
  --border-warm-subtle: #f5efe6;

  /* Surfaces & Clean Slate Tokens */
  --background: #faf6f0 !important;
  --foreground: #0f172a !important;
  --card: #ffffff !important;
  --border: #ede4d8 !important;
  --input: #e5ddd1 !important;
  --muted: #f4ede3 !important;
  --muted-foreground: #64748b !important;

  /* Chatwoot / Radix Slate Scale */
  --slate-1: 255 255 255 !important;
  --slate-2: 250 246 240 !important;     /* #faf6f0 */
  --slate-3: 244 237 227 !important;     /* #f4ede3 */
  --slate-4: 237 228 216 !important;     /* #ede4d8 */
  --slate-5: 203 213 225 !important;
  --slate-6: 148 163 184 !important;     /* #94a3b8 */
  --slate-7: 100 116 139 !important;     /* #64748b */
  --slate-8: 71 85 105 !important;       /* #475569 */
  --slate-9: 51 65 85 !important;        /* #334155 */
  --slate-10: 30 41 59 !important;       /* #1e293b */
  --slate-11: 15 23 42 !important;       /* #0f172a */
  --slate-12: 2 6 23 !important;         /* #020617 */

  /* Chatwoot / Radix Brand Scale -> Soft Warm Orange Scale */
  --blue-1: 255 247 237 !important;      /* #fff7ed */
  --blue-2: 254 237 213 !important;      /* #ffedd5 */
  --blue-3: 253 216 168 !important;
  --blue-4: 251 180 108 !important;
  --blue-5: 249 146 60 !important;
  --blue-6: 245 110 24 !important;
  --blue-7: 234 88 12 !important;
  --blue-8: 194 65 12 !important;
  --blue-9: 234 88 12 !important;        /* Main #EA580C */
  --blue-10: 194 65 12 !important;       /* Hover #C2410C */
  --blue-11: 154 52 18 !important;
  --blue-12: 124 45 18 !important;

  /* Surfaces */
  --surface-1: 255 255 255 !important;
  --surface-2: 250 246 240 !important;
  --solid-1: 255 255 255 !important;
  --solid-2: 250 246 240 !important;
  --solid-3: 244 237 227 !important;
  --solid-blue: 255 247 237 !important;
  --solid-blue-2: 254 237 213 !important;
}

/* ─── 2. GLOBAL RESET & TYPOGRAPHY ─── */
body, button, input, textarea, select, table, th, td {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  letter-spacing: -0.01em !important;
}

body {
  background-color: #faf6f0 !important; /* Gentle warm background */
  color: #0f172a !important;
}

/* ─── 3. PRIMARY ACTION BUTTONS (SUBMIT, SEND, NEW CHAT) ─── */
/* Target only actual action buttons, NEVER filter tabs or list items */
button.bg-n-brand:not([role="tab"]):not([class*="tab"]):not([class*="filter"]),
[data-testid="send-button"],
button[type="submit"] {
  background: #ea580c !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  border: 1px solid #ea580c !important;
  box-shadow: 0 1px 3px 0 rgba(234, 88, 12, 0.25) !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  transition: all 0.15s ease !important;
}

button.bg-n-brand:not([role="tab"]):not([class*="tab"]):not([class*="filter"]):hover,
[data-testid="send-button"]:hover,
button[type="submit"]:hover {
  background: #c2410c !important;
  border-color: #c2410c !important;
  box-shadow: 0 2px 6px 0 rgba(194, 65, 12, 0.35) !important;
  transform: translateY(-0.5px) !important;
}

/* ─── 4. PRIMARY NAVIGATION SIDEBAR (LEFTMOST BAR) ─── */
aside.bg-n-background,
aside[class*="w-\[200px\]"],
aside[class*="md:relative"],
.app-sidebar {
  background: #fbf8f4 !important; /* Soft warm linen sidebar */
  border-right: 1px solid #ede4d8 !important;
}

/* Sidebar Top Workspace Header */
aside .logo,
aside .sidebar-brand,
aside .app-sidebar-logo {
  border-bottom: 1px solid #ede4d8 !important;
  padding: 14px 16px !important;
  display: flex !important;
  align-items: center !important;
}

/* Section Header Labels (INBOX, CHANNELS, etc.) */
aside [class*="group-label"],
aside h3,
aside h4 {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  padding: 8px 14px 4px !important;
}

/* Sidebar Menu Items */
aside a,
aside button {
  border-radius: 8px !important;
  color: #475569 !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  transition: all 0.15s ease !important;
  margin: 2px 8px !important;
  padding: 7px 11px !important;
  border: 1px solid transparent !important;
}

aside a:hover,
aside button:hover {
  background: #f4eee5 !important;
  color: #0f172a !important;
}

/* Active Sidebar Item - Soft Warm Pill (Clean Numberwale Style, NO harsh thick outline) */
aside a.router-link-active,
aside a[class*="active"],
aside button[class*="active"] {
  background: #fff7ed !important;
  color: #ea580c !important;
  font-weight: 600 !important;
  border: 1px solid #fed7aa !important;
  box-shadow: 0 1px 2px rgba(234, 88, 12, 0.06) !important;
}

aside a.router-link-active::before,
aside a[class*="active"]::before {
  display: none !important; /* Remove harsh block before pseudo-element */
}

/* Sidebar Icons */
aside a svg,
aside button svg {
  color: inherit !important;
  opacity: 0.9 !important;
}

/* ─── 5. CONVERSATION LIST (SECOND COLUMN) ─── */
.conversation--list,
div[class*="conversation-list"],
aside[class*="w-full"][class*="md:w-80"],
div[class*="w-full"][class*="md:w-auto"] {
  background: #f7f2eb !important; /* Subtle warm linen canvas for conversation cards */
  border-right: 1px solid #ede4d8 !important;
}

/* Conversation List Header & Search Area */
.conversation--list header,
div[class*="conversation-list"] header {
  background: #fbf8f4 !important;
  border-bottom: 1px solid #ede4d8 !important;
  padding: 12px 14px !important;
}

/* Search Input */
input[placeholder*="Search" i],
.search-input {
  background: #ffffff !important;
  border: 1px solid #e5ddd1 !important;
  border-radius: 8px !important;
  color: #0f172a !important;
  font-size: 13px !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02) !important;
  padding: 7px 12px !important;
  transition: all 0.15s ease !important;
}

input[placeholder*="Search" i]:focus {
  border-color: #ea580c !important;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12) !important;
  outline: none !important;
}

/* ─── FILTER TABS (MINE, UNASSIGNED, ALL) - CLEAN SHADCN SEGMENTED CONTROL ─── */
/* COMPLETELY REMOVES THE ORANGE DABBA */
[class*="tab--container"],
div[role="tablist"],
.conversation--filter-tabs {
  background: #eee7dc !important; /* Soft warm neutral pill track */
  border-radius: 9px !important;
  padding: 3px !important;
  border: 1px solid #e3dad0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
}

/* Base Tab Buttons (Default / Inactive) */
[class*="tab--container"] [role="tab"],
[class*="tab--container"] button,
div[role="tablist"] [role="tab"],
div[role="tablist"] button,
button[class*="tab-button"],
.conversation--filter-tabs button {
  background: transparent !important;
  color: #64748b !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 6px !important;
  padding: 5px 12px !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  transition: all 0.15s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

[class*="tab--container"] button:hover,
div[role="tablist"] button:hover {
  color: #0f172a !important;
  background: rgba(255, 255, 255, 0.6) !important;
}

/* Active Tab - Pure White Elevated Card with Crisp Dark Text (NO ORANGE DABBA!) */
[class*="tab--container"] [role="tab"][aria-selected="true"],
[class*="tab--container"] [role="tab"][class*="active"],
[class*="tab--container"] button[class*="active"],
[class*="tab--container"] button[class*="bg-n-brand"],
div[role="tablist"] [role="tab"][aria-selected="true"],
div[role="tablist"] [role="tab"][class*="active"],
div[role="tablist"] button[class*="active"],
div[role="tablist"] button[class*="bg-n-brand"] {
  background: #ffffff !important;
  color: #0f172a !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  border-radius: 6px !important;
}

/* Count Badge inside Active Tab (e.g. '5' in 'All 5') - Soft Peach Pill */
[class*="tab--container"] [class*="active"] [class*="badge"],
[class*="tab--container"] [aria-selected="true"] [class*="badge"],
[class*="tab--container"] button[class*="active"] span:last-child,
div[role="tablist"] button[class*="active"] span:last-child {
  background: #ffedd5 !important;
  color: #c2410c !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  padding: 1px 6px !important;
  border-radius: 9999px !important;
  border: 1px solid #fed7aa !important;
  margin-left: 6px !important;
}

/* Count Badge inside Inactive Tabs (e.g. '1', '4') - Soft Warm Gray */
[class*="tab--container"] button:not([class*="active"]) [class*="badge"],
[class*="tab--container"] button:not([class*="active"]) span:last-child,
div[role="tablist"] button:not([class*="active"]) span:last-child {
  background: #e2dcd4 !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 1px 6px !important;
  border-radius: 9999px !important;
  margin-left: 6px !important;
}

/* ─── CONVERSATION CARDS IN INBOX LIST ─── */
/* Inactive Cards */
.conversation,
[class*="conversation-item"],
[data-testid="conversation-item"] {
  background: #ffffff !important;
  border: 1px solid #ede4d8 !important;
  border-radius: 12px !important;
  margin: 6px 10px !important;
  padding: 12px 14px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
}

.conversation:hover,
[class*="conversation-item"]:hover {
  background: #fffdfa !important;
  border-color: #fbd9b3 !important;
  box-shadow: 0 3px 8px -1px rgba(0, 0, 0, 0.05) !important;
  transform: translateY(-1px) !important;
}

/* SELECTED CONVERSATION CARD - PROFESSIONAL, CLEAN, NO UGLY HEAVY BORDER */
.conversation.active,
[class*="conversation-item"][class*="active"],
[class*="conversation-item"][class*="bg-n-alpha-2"],
[class*="conversation-item"][class*="selected"],
[class*="conversation-item"][aria-selected="true"] {
  background: #ffffff !important;
  border: 1.5px solid #ea580c !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 14px -2px rgba(234, 88, 12, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.04) !important;
  transform: translateY(-1px) !important;
}

/* Elegant left accent indicator inside selected card */
.conversation.active::before,
[class*="conversation-item"][class*="active"]::before,
[class*="conversation-item"][class*="selected"]::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  top: 15% !important;
  height: 70% !important;
  width: 4px !important;
  background: #ea580c !important;
  border-radius: 0 4px 4px 0 !important;
}

/* Contact Name inside Card */
.conversation .title,
[class*="conversation-item"] [class*="name"] {
  font-weight: 600 !important;
  color: #0f172a !important;
  font-size: 13.5px !important;
}

/* Message Snippet */
.conversation .preview,
[class*="conversation-item"] [class*="message"] {
  color: #64748b !important;
  font-size: 12.5px !important;
  margin-top: 2px !important;
}

/* Unread Badge Count */
.unread,
[class*="unread-count"],
[class*="badge-count"] {
  background: #ea580c !important;
  color: #ffffff !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  padding: 1px 7px !important;
  min-width: 18px !important;
  text-align: center !important;
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.3) !important;
}

/* ─── 6. CHAT PANEL & MESSAGES (THIRD COLUMN) ─── */
/* Warm, relaxing messaging background (Aankho me bilkul na chubhe) */
.conversation-panel,
div[class*="conversation-panel"],
main[class*="bg-n-surface-1"],
div[class*="messages-wrap"],
[data-testid="conversation-panel"] {
  background: #faf5ed !important; /* Gentle soothing linen canvas */
}

/* Chat Header */
.conversation-panel header,
div[class*="conversation-panel"] header,
[data-testid="conversation-header"] {
  background: #fbf8f4 !important;
  border-bottom: 1px solid #ede4d8 !important;
  padding: 11px 18px !important;
}

/* Contact Name Title in Header */
.conversation-panel header h1,
.conversation-panel header h2,
.conversation-panel header [class*="user-name"] {
  font-weight: 700 !important;
  color: #0f172a !important;
  font-size: 16px !important;
}

/* Header Action Buttons (Resolve, etc.) */
.conversation-panel header button,
[data-testid="resolve-button"] {
  background: #ffffff !important;
  border: 1px solid #e5ddd1 !important;
  border-radius: 8px !important;
  color: #0f172a !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02) !important;
  transition: all 0.15s ease !important;
  padding: 6px 12px !important;
}

.conversation-panel header button:hover,
[data-testid="resolve-button"]:hover {
  background: #f7f2eb !important;
  border-color: #d8cec0 !important;
}

/* Warning & Banner Alerts */
[class*="banner"],
[class*="alert"],
.bg-amber-50 {
  background: #fffbeb !important;
  border: 1px solid #fde68a !important;
  color: #92400e !important;
  border-radius: 12px !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  margin: 10px 16px !important;
  padding: 10px 14px !important;
}

/* ─── MESSAGE BUBBLES - PROFESSIONAL WHATSAPP CRM LAYOUT ─── */
/* 1. Incoming Customer Message (Left) */
.left-bubble,
.left-bubble.bg-n-slate-4,
.message[class*="incoming"] .message-wrap,
div[data-message-type="incoming"],
div[class*="incoming"] > div[class*="bubble"] {
  background: #ffffff !important;
  color: #0f172a !important;
  border-radius: 16px 16px 16px 4px !important;
  border: 1px solid #ede4d8 !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04) !important;
  padding: 12px 16px !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  max-width: 74% !important;
  font-style: normal !important;
}

.left-bubble p,
.message[class*="incoming"] p,
div[data-message-type="incoming"] p {
  color: #0f172a !important;
  font-style: normal !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
}

/* 2. Outgoing Agent / WhatsApp Message (Right - Soft WhatsApp Green) */
/* Replaces the ugly dark black monolith with clean, universally loved WhatsApp bubble */
.right-bubble,
.bg-n-solid-blue,
.message[class*="outgoing"] .message-wrap,
div[data-message-type="outgoing"],
div[class*="outgoing"] > div[class*="bubble"] {
  background: #e7fedc !important; /* Authentic, soft WhatsApp outgoing green */
  color: #111b21 !important;
  border-radius: 16px 16px 4px 16px !important;
  border: 1px solid #c7efb4 !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04) !important;
  padding: 12px 16px !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  max-width: 74% !important;
  font-style: normal !important;
}

.right-bubble p,
.message[class*="outgoing"] p,
div[data-message-type="outgoing"] p {
  color: #111b21 !important;
  font-style: normal !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
}

/* Double-check status ticks & time */
.right-bubble .time,
.message[class*="outgoing"] .time,
.right-bubble [class*="timestamp"],
.message .status,
.message [class*="status-icon"] {
  color: #53bdeb !important; /* WhatsApp blue ticks */
  font-size: 11px !important;
  font-weight: 500 !important;
}

.left-bubble .time,
.message[class*="incoming"] .time,
.left-bubble [class*="timestamp"] {
  color: #94a3b8 !important;
  font-size: 11px !important;
}

/* 3. System Activity Badge ("Assigned to Software Leads...") */
.message[class*="activity"] .message-wrap,
[class*="system-message"],
div[data-message-type="activity"] {
  background: #ffffff !important;
  border: 1px solid #ede4d8 !important;
  color: #64748b !important;
  border-radius: 20px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  padding: 5px 14px !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03) !important;
  display: inline-block !important;
}

/* 4. Internal Private Notes */
.bg-n-solid-amber,
[class*="private-note"] {
  background: #fffbeb !important;
  border: 1px solid #fde68a !important;
  border-radius: 12px !important;
  color: #92400e !important;
  padding: 12px 16px !important;
  font-size: 13.5px !important;
}

/* ─── DOCKED MESSAGE COMPOSER (BOTTOM AREA) ─── */
div[class*="reply-box"],
div[class*="message-editor"],
.input-wrap,
[data-testid="message-input-area"] {
  background: #ffffff !important;
  border: 1px solid #ede4d8 !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.05) !important;
  margin: 12px 18px !important;
}

/* Composer Textarea */
div[class*="reply-box"] textarea,
div[class*="message-editor"] textarea,
.ProseMirror {
  background: #ffffff !important;
  color: #0f172a !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  padding: 12px 14px !important;
}

/* Composer Tabs (Reply vs Private Note) */
div[class*="reply-box"] button[class*="tab"],
div[class*="message-editor"] [role="tab"] {
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #64748b !important;
  border-radius: 6px !important;
  padding: 5px 12px !important;
  transition: all 0.15s ease !important;
}

div[class*="reply-box"] button[class*="tab"][class*="active"],
div[class*="message-editor"] [role="tab"][aria-selected="true"] {
  background: #f4eee5 !important;
  color: #0f172a !important;
  font-weight: 600 !important;
}

/* Send Button */
button[class*="send-button"],
button[data-testid="send-button"],
div[class*="reply-box"] button.bg-n-brand {
  background: #ea580c !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  border: none !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 8px 18px !important;
  box-shadow: 0 1px 3px 0 rgba(234, 88, 12, 0.3) !important;
  transition: all 0.15s ease !important;
}

button[class*="send-button"]:hover,
button[data-testid="send-button"]:hover,
div[class*="reply-box"] button.bg-n-brand:hover {
  background: #c2410c !important;
  box-shadow: 0 2px 6px 0 rgba(194, 65, 12, 0.4) !important;
  transform: translateY(-0.5px) !important;
}

/* ─── 7. CONTACT PANEL & CUSTOMER DOSSIER (FOURTH COLUMN) ─── */
.contact--panel,
div[class*="contact-panel"],
div[class*="conversation--sidebar"],
aside[class*="contact"] {
  background: #fbf8f4 !important;
  border-left: 1px solid #ede4d8 !important;
}

/* Sidebar Top Header ("Customer Profile [x]") */
.contact--panel > div > header,
[class*="SidebarActionsHeader"],
div[class*="contact-panel"] > div > header {
  background: #fbf8f4 !important;
  border-bottom: 1px solid #ede4d8 !important;
  padding: 11px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 25 !important;
}

.contact--panel > div > header h2,
[class*="SidebarActionsHeader"] h2,
[class*="SidebarActionsHeader"] span,
[class*="SidebarActionsHeader"] [class*="text-base"] {
  font-size: 14.5px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.015em !important;
  white-space: nowrap !important;
  overflow: visible !important;
  padding-left: 2px !important;
}

[class*="SidebarActionsHeader"] button,
.contact--panel > div > header button {
  border-radius: 6px !important;
  padding: 4px !important;
  color: #64748b !important;
  transition: all 0.15s ease !important;
}

[class*="SidebarActionsHeader"] button:hover,
.contact--panel > div > header button:hover {
  background: #eee7dc !important;
  color: #0f172a !important;
}

/* ─── DEDICATED CUSTOMER IDENTITY DOSSIER CARD ─── */
.contact--panel > div > div.p-4,
[class*="ContactInfo"],
div[class*="contact-info"] {
  background: #ffffff !important;
  border: 1px solid #ede4d8 !important;
  border-radius: 14px !important;
  margin: 12px 14px !important;
  padding: 16px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

/* Customer Avatar ("KP") - Numberwale Signature Gradient Badge */
.contact--panel [class*="avatar"],
div[class*="contact-panel"] [class*="avatar"],
[class*="ContactInfo"] [class*="avatar"],
[class*="ContactInfo"] .user-thumbnail-box {
  width: 52px !important;
  height: 52px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%) !important;
  color: #ea580c !important;
  font-weight: 800 !important;
  font-size: 18px !important;
  border: 1.5px solid #fed7aa !important;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.12) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Customer Name ("Kartik Parmar") */
[class*="ContactInfo"] h3,
.contact--panel [class*="user-name"],
.contact--panel h3 {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.015em !important;
  margin-top: 4px !important;
}

/* Contact Info Rows (Phone, Email, Company) */
[class*="ContactInfoRow"],
.contact--panel [class*="info-row"] {
  margin: 3px 0 !important;
}

/* Phone Number Badge - Prominent WhatsApp Verified Look */
[class*="ContactInfoRow"]:has(a[href^="tel:"]),
[class*="ContactInfoRow"]:has(span:contains("+")) {
  background: #fbf8f4 !important;
  border: 1px solid #ede4d8 !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
}

/* Muted Look for Unavailable Details */
[class*="ContactInfoRow"] [class*="text-slate-11"]:empty,
[class*="ContactInfoRow"]:has(span:empty) {
  opacity: 0.6 !important;
}

/* Contact Quick Action Toolbar ([💬] [✏️] [🔀] [🗑️]) */
[class*="ContactInfo"] .flex.items-center.w-full.mt-0\.5,
.contact--panel div[class*="actions-wrapper"] {
  display: flex !important;
  gap: 8px !important;
  margin-top: 12px !important;
  padding-top: 12px !important;
  border-top: 1px solid #f4ede3 !important;
  width: 100% !important;
}

[class*="ContactInfo"] .flex.items-center.w-full.mt-0\.5 button,
[class*="ContactInfo"] button[class*="faded"] {
  background: #faf6f0 !important;
  border: 1px solid #ede4d8 !important;
  border-radius: 8px !important;
  color: #475569 !important;
  padding: 7px 11px !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

[class*="ContactInfo"] .flex.items-center.w-full.mt-0\.5 button:hover,
[class*="ContactInfo"] button[class*="faded"]:hover {
  background: #ffffff !important;
  border-color: #d8cec0 !important;
  color: #0f172a !important;
  transform: translateY(-0.5px) !important;
}

/* Delete Button (Soft Rose) */
[class*="ContactInfo"] .flex.items-center.w-full.mt-0\.5 button:last-child {
  color: #e11d48 !important;
  background: #fff1f2 !important;
  border-color: #fecdd3 !important;
}

[class*="ContactInfo"] .flex.items-center.w-full.mt-0\.5 button:last-child:hover {
  background: #ffe4e6 !important;
  color: #be123c !important;
}

/* ─── ACCORDION LIST ITEMS (CHAT ACTIONS, MACROS, CHAT DETAILS, ETC.) ─── */
.contact--panel .list-group,
div.list-group {
  padding: 0 14px 24px !important;
}

.contact--panel .list-group > div,
div.list-group > div,
[class*="conversation--actions"] {
  margin-bottom: 7px !important;
}

/* Accordion Header Buttons - Crisp Shadcn Card Look */
button.drag-handle,
.contact--panel button[class*="drag-handle"],
div.list-group button[class*="select-none"] {
  background: #ffffff !important;
  border: 1px solid #ede4d8 !important;
  outline: none !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

button.drag-handle:hover,
.contact--panel button[class*="drag-handle"]:hover,
div.list-group button[class*="select-none"]:hover {
  background: #faf6f0 !important;
  border-color: #d8cec0 !important;
  transform: translateY(-0.5px) !important;
}

/* When open: square off bottom border cleanly */
button.drag-handle[class*="rounded-bl-none"],
button.drag-handle.rounded-bl-none {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-bottom: 1px solid #f1ede4 !important;
  background: #faf6f0 !important;
}

/* Accordion Header Text */
button.drag-handle h5,
button.drag-handle [class*="text-sm"] {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  letter-spacing: -0.01em !important;
}

/* Accordion Expand/Collapse Indicator (+ / -) */
button.drag-handle .text-n-blue-11,
button.drag-handle fluent-icon,
button.drag-handle svg {
  color: #ea580c !important; /* Subtle warm orange icon */
}

/* Accordion Body Panel */
div.list-group div[class*="outline-n-weak"]:not(button) {
  background: #ffffff !important;
  border: 1px solid #ede4d8 !important;
  border-top: none !important;
  border-bottom-left-radius: 10px !important;
  border-bottom-right-radius: 10px !important;
  padding: 12px 14px !important;
  outline: none !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
}

/* FLOATING SIDEPANEL SWITCH - Elegantly tucked when sidebar is closed */
.conversation-box > div > div.absolute.top-36,
.conversation-box > div > div.absolute.xl\:top-24,
div[class*="absolute"][class*="top-36"][class*="rounded-full"],
div[class*="absolute"][class*="xl:top-24"][class*="rounded-full"] {
  display: none !important; /* Managed via permanent header Contact button */
}

/* ─── 8. LOGIN SCREEN TRANSFORMATION (/app/login) ─── */
main.bg-n-brand\/5,
main[class*="bg-n-brand"],
main[class*="min-h-screen"] {
  background: linear-gradient(135deg, #faf6f0 0%, #f4ede3 50%, #ede4d8 100%) !important;
}

section[class*="dark:bg-n-solid-2"],
section[class*="sm:max-w-lg"],
.login-box {
  background: #ffffff !important;
  border: 1px solid #ede4d8 !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
  padding: 40px !important;
}

/* Login Inputs */
input[type="email"],
input[type="password"],
input[type="text"] {
  background: #ffffff !important;
  border: 1px solid #e5ddd1 !important;
  border-radius: 8px !important;
  color: #0f172a !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  transition: all 0.15s ease !important;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
  border-color: #ea580c !important;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15) !important;
  background: #ffffff !important;
  outline: none !important;
}

/* ─── 9. DIALOGS, MODALS & DROPDOWNS ─── */
[role="dialog"],
[data-popover-content],
.dropdown-pane,
[role="menu"] {
  background: #ffffff !important;
  border: 1px solid #ede4d8 !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04) !important;
  color: #0f172a !important;
}

[role="menuitem"],
.dropdown-pane li {
  color: #334155 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
}

[role="menuitem"]:hover,
.dropdown-pane li:hover {
  background: #f4eee5 !important;
  color: #0f172a !important;
}

/* ─── 10. SCROLLBARS ─── */
::-webkit-scrollbar {
  width: 6px !important;
  height: 6px !important;
}
::-webkit-scrollbar-track {
  background: transparent !important;
}
::-webkit-scrollbar-thumb {
  background: #d8cec0 !important;
  border-radius: 9999px !important;
}
::-webkit-scrollbar-thumb:hover {
  background: #baad9c !important;
}

/* ─── 11. REMOVE ANY CHATWOOT LOGOS & WATERMARKS ─── */
[data-testid="powered-by-chatwoot"],
.powered-by-chatwoot,
a[href*="chatwoot.com/help"],
.chatwoot-version-badge,
[class*="chatwoot-badge"],
[id*="chatwoot-badge"] {
  display: none !important;
}

/* ==========================================================================
   12. HORIZONTAL CONVERSATION LIST RESIZER & CONTROLS
   ========================================================================== */
.conversations-list-wrap {
  position: relative !important;
  transition: none !important;
}

.wc-conv-resizer {
  position: absolute !important;
  top: 0 !important;
  right: -4px !important;
  bottom: 0 !important;
  width: 9px !important;
  height: 100% !important;
  cursor: col-resize !important;
  z-index: 45 !important;
  user-select: none !important;
  touch-action: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  transition: background 0.15s ease !important;
}

.wc-conv-resizer:hover,
.wc-conv-resizer.is-active {
  background: rgba(234, 88, 12, 0.14) !important;
}

.wc-conv-resizer-line {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  right: 4px !important;
  width: 1px !important;
  background: #ede4d8 !important;
  transition: background 0.15s ease !important;
}

.wc-conv-resizer:hover .wc-conv-resizer-line,
.wc-conv-resizer.is-active .wc-conv-resizer-line {
  background: #ea580c !important;
  width: 2px !important;
}

.wc-conv-resizer-pill {
  width: 3px !important;
  height: 32px !important;
  border-radius: 9999px !important;
  background: #cbd5e1 !important;
  opacity: 0 !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  z-index: 2 !important;
}

.wc-conv-resizer:hover .wc-conv-resizer-pill {
  opacity: 1 !important;
  height: 44px !important;
  background: #ea580c !important;
  box-shadow: 0 0 6px rgba(234, 88, 12, 0.4) !important;
}

.wc-conv-resizer.is-active .wc-conv-resizer-pill {
  opacity: 1 !important;
  height: 64px !important;
  background: #c2410c !important;
  box-shadow: 0 0 10px rgba(234, 88, 12, 0.6) !important;
}

/* While active dragging across document */
body.wc-is-resizing {
  cursor: col-resize !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}
body.wc-is-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}
body.wc-is-resizing iframe {
  pointer-events: none !important;
}

/* Floating Width Pill Badge */
.wc-resizer-badge {
  display: none;
  position: fixed;
  z-index: 9999999;
  pointer-events: none;
  background: #1e293b;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.14);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Header Quick Preset Button */
.wc-width-preset-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  height: 24px !important;
  padding: 0 7px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  user-select: none !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  margin-right: 2px !important;
}

.wc-width-preset-btn:hover {
  background: #fff7ed !important;
  color: #ea580c !important;
  border-color: #fdba74 !important;
  box-shadow: 0 2px 4px rgba(234, 88, 12, 0.1) !important;
}

.wc-width-preset-btn:active {
  transform: scale(0.97) !important;
  background: #ffedd5 !important;
}

.wc-width-preset-btn svg {
  width: 12px !important;
  height: 12px !important;
  color: inherit !important;
  stroke-width: 2.2 !important;
}

/* Customer Profile Header Action Button - Prominent Numberwale Style */
.wc-customer-profile-toggle-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 32px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #ea580c !important;
  background: #fff7ed !important;
  border: 1px solid #fdba74 !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  user-select: none !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 2px rgba(234, 88, 12, 0.08) !important;
  margin-right: 4px !important;
}

.wc-customer-profile-toggle-btn:hover {
  background: #ffedd5 !important;
  color: #c2410c !important;
  border-color: #ea580c !important;
  box-shadow: 0 2px 5px rgba(234, 88, 12, 0.18) !important;
  transform: translateY(-0.5px) !important;
}

.wc-customer-profile-toggle-btn.is-active {
  background: #ea580c !important;
  color: #ffffff !important;
  border-color: #ea580c !important;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.25) !important;
}

.wc-customer-profile-toggle-btn svg {
  width: 14px !important;
  height: 14px !important;
  color: inherit !important;
  stroke-width: 2.2 !important;
}

/* ─── CUSTOMER PROFILE RESIZER & HEADER ENHANCEMENTS (WaveConnect Custom Width Feature) ─── */
.wc-profile-header,
[class*="SidebarActionsHeader"],
.contact--panel > div > header,
div[class*="contact-panel"] > div > header {
  background: #fbf8f4 !important;
  border-bottom: 1px solid #ede4d8 !important;
  padding: 10px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 25 !important;
  min-height: 48px !important;
  box-sizing: border-box !important;
}

.wc-profile-header span,
.wc-profile-header h2,
[class*="SidebarActionsHeader"] h2,
[class*="SidebarActionsHeader"] span,
[class*="SidebarActionsHeader"] [class*="text-base"] {
  font-size: 14.5px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.015em !important;
  white-space: nowrap !important;
  overflow: visible !important;
  padding-left: 2px !important;
}

.wc-profile-sidebar {
  position: relative !important;
  overflow: visible !important;
}

.wc-profile-resizer {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 0px !important;
  width: 9px !important;
  cursor: col-resize !important;
  z-index: 50 !important;
  user-select: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background-color 0.15s ease !important;
}

.wc-profile-resizer:hover,
.wc-profile-resizer.is-active {
  background: rgba(234, 88, 12, 0.08) !important;
}

.wc-profile-resizer-line {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 0px !important;
  width: 3px !important;
  background: transparent !important;
  transition: background 0.15s ease !important;
}

.wc-profile-resizer:hover .wc-profile-resizer-line,
.wc-profile-resizer.is-active .wc-profile-resizer-line {
  background: #ea580c !important;
}

.wc-profile-resizer-pill {
  position: absolute !important;
  top: 50% !important;
  left: -5px !important;
  transform: translateY(-50%) !important;
  width: 14px !important;
  height: 32px !important;
  background: #ffffff !important;
  border: 1.5px solid #ea580c !important;
  border-radius: 9999px !important;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.25) !important;
  opacity: 0 !important;
  transition: opacity 0.15s ease, transform 0.1s ease !important;
  pointer-events: none !important;
}

.wc-profile-resizer:hover .wc-profile-resizer-pill {
  opacity: 1 !important;
}

.wc-profile-resizer.is-active .wc-profile-resizer-pill {
  opacity: 1 !important;
  background: #ea580c !important;
  transform: translateY(-50%) scale(1.08) !important;
}

/* Quick Profile Width Preset Button (Header) */
.wc-profile-width-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  height: 26px !important;
  padding: 0 9px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #ea580c !important;
  background: #fff7ed !important;
  border: 1px solid #fdba74 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  user-select: none !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 2px rgba(234, 88, 12, 0.08) !important;
  margin-right: 6px !important;
}

.wc-profile-width-btn:hover {
  background: #ffedd5 !important;
  color: #c2410c !important;
  border-color: #ea580c !important;
  box-shadow: 0 2px 4px rgba(234, 88, 12, 0.15) !important;
}

.wc-profile-width-btn:active {
  transform: scale(0.97) !important;
  background: #fed7aa !important;
}

.wc-profile-width-btn svg {
  width: 12px !important;
  height: 12px !important;
  color: inherit !important;
  stroke-width: 2.2 !important;
}

/* ─── EMPTY PROFILE ACCORDION STYLING & WHATSAPP CHAT DETAILS ─── */
.wc-chat-details-empty-note {
  padding: 10px 12px !important;
  background: #fff7ed !important;
  border: 1px solid #fed7aa !important;
  border-radius: 8px !important;
  margin: 6px 0 !important;
}

.wc-chat-meta-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #c2410c !important;
}

.wc-chat-meta-badge svg {
  color: #ea580c !important;
}

.wc-chat-meta-desc {
  font-size: 11px !important;
  color: #9a3412 !important;
  margin-top: 4px !important;
  line-height: 1.4 !important;
}

.wc-empty-accordion-placeholder {
  font-size: 12px !important;
  color: #94a3b8 !important;
  text-align: center !important;
  padding: 10px 12px !important;
  font-style: italic !important;
}


/* ==========================================================================
   14. SIDEBAR BRAND HEADER & CUSTOMER PROFILE RESIZER
   ========================================================================== */
/* Sidebar Top Brand Header Logo (Enlarged prominent ~42px) */
aside section:first-of-type div.place-content-center,
aside section.grid:first-of-type div.place-content-center {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  min-height: 46px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

img.wc-top-brand-logo {
  width: 42px !important;
  height: 42px !important;
  max-width: 42px !important;
  max-height: 42px !important;
  object-fit: contain !important;
  border-radius: 10px !important;
  flex-shrink: 0 !important;
  display: block !important;
}

/* Nav Menu Icons (Team Chat & Billing - Sleek 18px gray icons, NO logo image) */
.wc-nav-icon {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  color: #64748b !important;
  flex-shrink: 0 !important;
  transition: color 0.15s ease !important;
}

#cwtg-sidebar-item:hover .wc-nav-icon,
#wc-billing-sidebar-item:hover .wc-nav-icon {
  color: #ea580c !important;
}

aside .w-px.h-3.bg-n-strong,
aside div[class*="w-px"][class*="h-3"] {
  display: none !important;
}

.wc-sidebar-brand-name {
  line-height: 1.15 !important;
  user-select: none !important;
}

/* Customer Profile Resizer Container & Presets */
.conversation--sidebar,
div[class*="ConversationSidebar"],
div:has(> div > .contact--panel),
div.bg-n-surface-2.h-full.overflow-hidden.flex.flex-col {
  position: relative !important;
  transition: none !important;
}

.wc-profile-width-preset-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  height: 24px !important;
  padding: 0 7px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  user-select: none !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  margin-right: 6px !important;
}

.wc-profile-width-preset-btn:hover {
  background: #fff7ed !important;
  color: #ea580c !important;
  border-color: #fdba74 !important;
  box-shadow: 0 2px 4px rgba(234, 88, 12, 0.1) !important;
}

.wc-profile-width-preset-btn:active {
  transform: scale(0.97) !important;
  background: #ffedd5 !important;
}

.wc-profile-width-preset-btn svg {
  width: 12px !important;
  height: 12px !important;
  color: inherit !important;
  stroke-width: 2.2 !important;
}
