/* Professional Enterprise Design System */
:root {
  /* Primary Colors - Professional Blue Palette */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;
  
  /* Neutral Colors - Enterprise Gray Scale */
  --neutral-50: #f9fafb;
  --neutral-100: #f3f4f6;
  --neutral-200: #e5e7eb;
  --neutral-300: #d1d5db;
  --neutral-400: #9ca3af;
  --neutral-500: #6b7280;
  --neutral-600: #4b5563;
  --neutral-700: #374151;
  --neutral-800: #1f2937;
  --neutral-900: #111827;
  
  /* Semantic Colors */
  --success-50: #f0fdf4;
  --success-500: #22c55e;
  --success-600: #16a34a;
  --warning-50: #fffbeb;
  --warning-500: #f59e0b;
  --warning-600: #d97706;
  --error-50: #fef2f2;
  --error-500: #ef4444;
  --error-600: #dc2626;
  
  /* Legacy Variables for Compatibility */
  --bg: var(--neutral-50);
  --fg: var(--neutral-900);
  --muted: var(--neutral-500);
  --brand: var(--primary-600);
  --surface: var(--neutral-50);
  --sidebar: var(--neutral-100);
  --border: var(--neutral-200);
  --danger: var(--error-500);
  
  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  
  /* Border Radius Scale */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Shadow Scale */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Typography Scale */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  
  /* Animation Timing */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
}

/* Enhanced Global Styles */
* { 
  box-sizing: border-box; 
}

*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html, body { 
  height: 100%; 
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body { 
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; 
  color: var(--fg); 
  background: linear-gradient(135deg, var(--neutral-50) 0%, var(--neutral-100) 100%);
  line-height: 1.6;
  font-size: var(--font-size-base);
  overflow-x: hidden;
  width: 100%;
}
/* Enhanced Link Styles */
a { 
  color: var(--brand); 
  text-decoration: none; 
  transition: color var(--transition-fast);
}
a:hover { 
  color: var(--primary-700); 
  text-decoration: none; 
}

/* Professional Container System - Full Width */
.container { 
  margin: 0; 
  padding: 0 var(--space-6); 
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* Enhanced Header Styles */
header { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  margin-bottom: var(--space-6); 
  padding: var(--space-4) 0;
}
header h1, header h2 { 
  margin: 0; 
  font-weight: 700;
  color: var(--neutral-900);
}
.topbar { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: var(--space-4);
}

/* Professional Breadcrumb Navigation */
.crumbs { 
  font-size: var(--font-size-sm); 
  color: var(--muted); 
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.crumbs a { 
  color: var(--muted); 
  transition: color var(--transition-fast);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}
.crumbs a:hover { 
  color: var(--fg); 
  background: var(--neutral-100);
  text-decoration: none;
}

/* Enhanced Card System */
.card {
  background: var(--surface); 
  border: none;
  border-radius: var(--radius-xl); 
  padding: var(--space-6); 
  transition: all var(--transition-normal);
  position: relative;
  overflow: visible;
}

/* Surfaces: unify common card-like blocks */
.card, .price-card, .integration-card, .feature-card, .showcase-card, .industry-card, .calendar-cell {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

/* Pills/badges: unify base shape */
.chip, .kb-title-pill, .badge-current, .live-chip, .escalation-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
}

/* Enhanced List Styles */
.list { 
  list-style: none; 
  padding: 0; 
  margin: 0; 
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.list li { 
  padding: var(--space-4) var(--space-5); 
  border-bottom: 1px solid var(--border); 
  transition: background-color var(--transition-fast);
  position: relative;
}
.list li:last-child { 
  border-bottom: 0; 
}
.list li:hover {
  background: var(--neutral-50);
}

/* Professional Sidebar Layout - Full Viewport Height */
.layout { 
  display: flex; 
  height: calc(100vh - 80px); 
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Enhanced Sidebar Design */
.sidebar { 
  width: 280px; 
  height: 100%; 
  background: var(--surface); 
  border-right: 1px solid var(--border); 
  padding: var(--space-6); 
  display: flex; 
  flex-direction: column; 
  position: relative; 
  overflow-y: auto; 
  border-radius: 0; 
}

.sidebar .brand { 
  font-weight: 800; 
  margin-bottom: var(--space-8); 
  font-size: var(--font-size-xl);
  color: var(--neutral-900);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) 0;
}

/* Simple loading styles */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.3s ease-out;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-overlay[style*="display: none"] {
  display: none !important;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 40px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid #f3f4f6;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-logo {
  width: 40px;
  height: 40px;
  animation: pulse 2s ease-in-out infinite;
}

.loading-text {
  font-size: 16px;
  font-weight: 500;
  color: #374151;
  text-align: center;
  animation: fadeInOut 2s ease-in-out infinite;
}

.loading-progress {
  width: 200px;
  height: 4px;
  background: #f3f4f6;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}

.loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  border-radius: 2px;
  width: 0%;
  animation: progress 2s ease-in-out infinite;
}

.loading-dots {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.loading-dot {
  width: 8px;
  height: 8px;
  background: #3b82f6;
  border-radius: 50%;
  animation: dotPulse 1.4s ease-in-out infinite both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dot:nth-child(3) { animation-delay: 0s; }

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes progress {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Dark mode loading styles */
[data-theme="dark"] .loading-overlay {
  background: rgba(15, 23, 42, 0.95);
}

[data-theme="dark"] .loading-container {
  background: #1e293b;
}

[data-theme="dark"] .loading-text {
  color: #f1f5f9;
}

[data-theme="dark"] .loading-spinner {
  border-color: #334155;
  border-top-color: #3b82f6;
}

[data-theme="dark"] .loading-progress {
  background: #334155;
}

/* Page transition effects */
.page-transition {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.page-transition.loaded {
  opacity: 1;
  transform: translateY(0);
}

.sidebar .nav { 
  list-style: none; 
  padding: 0; 
  margin: 0; 
  flex: 1;
}

.sidebar .nav li { 
  margin-bottom: var(--space-2); 
}

.sidebar .nav a { 
  display: flex; 
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5); 
  background: transparent; 
  color: var(--neutral-700); 
  font-size: var(--font-size-sm);
  font-weight: 500;
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.sidebar .nav a:hover { 
  background: var(--primary-50); 
  color: var(--primary-700);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.sidebar .nav a.active { 
  background: var(--primary-100); 
  color: var(--primary-700);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.sidebar .nav a.active::before {
  transform: scaleY(1);
}

.sidebar .spacer { 
  flex: 1; 
}

.sidebar .logout { 
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4); 
  text-align: center; 
  border-radius: var(--radius-lg); 
  background: var(--error-50); 
  color: var(--error-600); 
  border: 1px solid var(--error-200);
  font-weight: 500;
  transition: all var(--transition-normal);
  margin-top: var(--space-4);
}

.sidebar .logout:hover {
  background: var(--error-100);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Notifications */
.notification-bell {
  position: relative;
  cursor: pointer;
  padding: 8px;
  border-radius: 100%;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notification-bell:hover {
  background: var(--bg);
}
.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #ef4444;
  color: white;
  border-radius: 10px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  padding: 0 5px;
}
.usage-limit-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef2f2; /* error-50 */
  color: #b91c1c; /* error-700 */
  border: 1px solid #fecaca; /* error-200 */
  border-radius: 9999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}
.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  width: 380px;
  max-height: 480px;
  display: flex;
  flex-direction: column;
  z-index: 10001;
}
.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.notification-header .mark-all-read {
  background: none;
  border: none;
  color: var(--brand);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
}
.notification-header .mark-all-read:hover {
  background: var(--bg);
}
.notification-list {
  overflow-y: auto;
  max-height: 420px;
}
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}
.notification-item:last-child {
  border-bottom: none;
}
.notification-item:hover {
  background: var(--bg);
}
.notification-unread {
  background: #eff6ff;
}
.notification-content {
  flex: 1;
  min-width: 0;
}
.notification-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--fg);
}
.notification-message {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}
.notification-time {
  font-size: 12px;
  color: var(--muted);
}
.notification-dot {
  width: 8px;
  height: 8px;
  background: #3b82f6;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}
.notification-empty,
.notification-loading,
.notification-error {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.notification-error {
  color: var(--danger);
}
/* Enhanced Main Content Area - Scrollable Content Only */
.main { 
  flex: 1; 
  display: flex; 
  flex-direction: column; 
  height: 100%;
  overflow: hidden;
  background: var(--neutral-50);
  border-radius: var(--radius-xl);
  border: none;
  box-shadow: none;
  position: relative;
  width: 100%;
  max-width: none;
}

/* Professional Scrollbar Styling */
.main::-webkit-scrollbar,
.main-content::-webkit-scrollbar,
.sidebar::-webkit-scrollbar,
.chat-box::-webkit-scrollbar,
.chat-thread::-webkit-scrollbar,
.notification-list::-webkit-scrollbar {
  width: 8px;
}

.main::-webkit-scrollbar-track,
.main-content::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track,
.chat-box::-webkit-scrollbar-track,
.chat-thread::-webkit-scrollbar-track,
.notification-list::-webkit-scrollbar-track {
  background: var(--neutral-100);
  border-radius: var(--radius-sm);
}

.main::-webkit-scrollbar-thumb,
.main-content::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb,
.chat-box::-webkit-scrollbar-thumb,
.chat-thread::-webkit-scrollbar-thumb,
.notification-list::-webkit-scrollbar-thumb {
  background: var(--neutral-300);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.main::-webkit-scrollbar-thumb:hover,
.main-content::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover,
.chat-box::-webkit-scrollbar-thumb:hover,
.chat-thread::-webkit-scrollbar-thumb:hover,
.notification-list::-webkit-scrollbar-thumb:hover {
  background: var(--neutral-400);
}

/* Smooth Scrolling Enhancement */
.main,
.main-content,
.sidebar,
.chat-box,
.chat-thread,
.notification-list {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--neutral-300) var(--neutral-100);
}

/* Content Area Styling - Scrollable Content */
.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-4);
  background: linear-gradient(135deg, var(--neutral-50) 0%, var(--neutral-100) 100%);
  height: 100%;
  max-height: 100%;
}
/* Enhanced Form Elements */
.settings-field {
  width: 100%;
  height: 40px;
  padding: 0 var(--space-4);
  background: #ffffff;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  color: var(--neutral-900);
  font-size: var(--font-size-sm);
  font-weight: 500;
  outline: none;
  transition: all var(--transition-normal);
  position: relative;
}

.settings-field:hover {
  border-color: var(--neutral-300);
  box-shadow: var(--shadow-sm);
}

.settings-field:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100);
}

.settings-field[disabled] {
  background: var(--neutral-100);
  color: var(--neutral-400);
  cursor: not-allowed;
  border-color: var(--neutral-200);
}

.settings-field[disabled]:hover {
  box-shadow: none;
}

.settings-field::placeholder { 
  color: var(--neutral-400);
  font-weight: 400;
}

/* Enhanced Label Styles */
label { 
  display: block; 
  margin-bottom: var(--space-3); 
  font-size: var(--font-size-sm); 
  color: var(--neutral-700); 
  font-weight: 600;
  letter-spacing: 0.025em;
}

/* Enhanced Heading Styles */
h3 { 
  margin: 0 0 var(--space-5) 0; 
  font-size: var(--font-size-lg); 
  color: var(--neutral-900);
  font-weight: 700;
  line-height: 1.3;
}

/* (Buttons are unified later; element-level button effects removed) */

/* Enhanced Chat Interface */
.chat-box { 
  flex: 1; 
  min-height: 0; 
  max-height: 85vh; 
  overflow-y: auto;
  padding: var(--space-4);
  background: linear-gradient(135deg, var(--neutral-50) 0%, var(--neutral-100) 100%);
}

.chat-box-settings { 
  flex: 1; 
  min-height: 0; 
  overflow-y: auto; 
  padding: var(--space-4);
}

.chat { 
  display: flex; 
  flex-direction: column; 
  gap: var(--space-4);
  padding: var(--space-4) 0;
}

.row { 
  display: flex;
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.row.user { 
  justify-content: flex-end; 
}

.row.ai { 
  justify-content: flex-start; 
}

.bubble { 
  max-width: 70%; 
  padding: var(--space-4) var(--space-5); 
  border-radius: var(--radius-2xl); 
  border: 1px solid var(--border);
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.bubble:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* (chat image sizing unified in .msg .bubble img below) */

.bubble.user { 
  background: linear-gradient(135deg, var(--primary-100) 0%, var(--primary-50) 100%); 
  border-color: var(--primary-200);
  border-bottom-right-radius: var(--radius-md);
}

.bubble.ai { 
  background: var(--surface);
  border-bottom-left-radius: var(--radius-md);
}

.empty_chat { 
  display: flex; 
  flex-direction: column;
  align-items: center; 
  justify-content: center; 
  text-align: center; 
  width: 100%; 
  min-height: 50vh; 
  color: var(--neutral-500); 
  font-size: var(--font-size-xl); 
  font-weight: 600;
  opacity: 0.8;
  gap: var(--space-4);
}

.empty_chat::before {
  content: '💬';
  font-size: 4rem;
  opacity: 0.5;
}

.spacer { height: 8px; flex: 0; }


/* .msg .bubble merged below in later canonical block */

/* removed duplicate early definitions; the canonical versions are defined later */

/* Reactions below bubble */
/* (Consolidated below in Message Reactions section) */

/* Header layout tweaks */
.wa-chat-header {display: flex; align-items:center; gap:10px; padding: 8px 12px; border-bottom: 1px solid #eef0f3; position: sticky; top: 0; background: blur(50px); z-index: 5; }
.wa-chat-header .wa-avatar { width: 36px; height: 36px; }

/* Composer pinned with better spacing */
/* composer styles consolidated later */

/* Images in bubbles */
.msg .bubble img { max-width: 360px; height: auto; border-radius: 10px; display: block; }

/* Small screens */
@media (max-width: 720px) {
  .chat-thread { padding: 12px; }
  .msg .bubble { max-width: 85vw; }
}

.chat-thread::before {
  display: none; /* Remove shadow effect */
}

.chat-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: var(--space-3);
}

.chat-view .chat-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  height: auto;
  max-height: none;
}
.msg { 
  display: flex; 
  width: 100%; 
  animation: messageSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.msg-in { 
  justify-content: flex-start; 
}

.msg-out { 
  justify-content: flex-end; 
}

.msg .bubble {
  max-width: 70%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-2xl);
  line-height: 1.4;
  font-size: var(--font-size-sm);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: all var(--transition-normal);
  word-wrap: break-word;
  overflow-wrap: break-word;
  backdrop-filter: saturate(120%);
}

.msg .bubble:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.msg-in .bubble {
  background: var(--surface);
  border-top-left-radius: var(--radius-sm);
  border: 1px solid var(--neutral-200);
}

.msg-out .bubble {
  background: linear-gradient(135deg, #dcf8c6 0%, #c8f0a0 100%);
  border-top-right-radius: var(--radius-sm);
  border: 1px solid #b8e6a0;
}
.msg-in .bubble:after {
  content: "";
  position: absolute;
  left: -6px;
  top: 0;
  width: 0; height: 0;
  border-right: 6px solid #ffffff;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.msg-out .bubble:after {
  content: "";
  position: absolute;
  right: -6px;
  top: 0;
  width: 0; height: 0;
  border-left: 6px solid #dcf8c6;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.msg .meta {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
  text-align: right;
}

/* Image button styling */
.image-button {
  background: #dcf8c6;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}
.image-button:hover {
  background: #c8f0a0;
}
.image-button:disabled {
  background: #e5e7eb;
  cursor: not-allowed;
}
.image-button svg {
  color: #25d366;
}


form input[type="text"], form input[type="password"], form input[type="url"], form textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
form input[type="text"]:focus, form input[type="password"]:focus, form input[type="url"]:focus, form textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99,102,241,0.15);
}
form input::placeholder, form textarea::placeholder { color: var(--muted); }
button:hover { filter: brightness(0.95); }
.send { margin-left: 8px; }

.small { font-size: 13px; color: var(--muted); }
.section {background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px; box-shadow: 0 1px 2px rgba(0,0,0,0.03);  margin: 16px 0; }

/* Settings helpers */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.btn-ghost img { width:20px;height:20px;vertical-align:middle; border:none; }
.dropdown-icon { display:flex; align-items:center; gap:8px; }

.chat-msg { margin: 8px 0; }
.chat-msg b { color: var(--brand); }
/* WhatsApp-like list */
.wa-row { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; }
.wa-avatar { width: 40px; height: 40px; border-radius: 50%; background: #dedede; color: #111; display:flex; align-items:center; justify-content:center; font-weight: 700; }
.wa-col { display:flex; flex-direction: column; gap: 2px; }
.wa-top { display:flex; justify-content: space-between; gap:8px; }
.wa-name { font-weight: 700; color: #111; }
.badge-dot { display:inline-block; width:8px; height:8px; background:#ef4444; border-radius:999px; margin-left:6px; vertical-align:middle; }

.live-chip {
  display: inline-block;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 8px;
  margin-left: 6px;
  line-height: 1;
  vertical-align: middle;
}

.escalation-chip {
  display: inline-block;
  background: #ff9500;
  color: white;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 8px;
  margin-left: 6px;
  line-height: 1;
  vertical-align: middle;
}

/* Toast/notice banners */
.toast { margin:8px 0; padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:#f9fafb; }
.toast.info { border-color:#c7d2fe; background:#eef2ff; color:#3730a3; }
.toast.success { border-color:#bbf7d0; background:#ecfdf5; color:#065f46; }
.toast.error { border-color:#fecaca; background:#fef2f2; color:#991b1b; }
/* WhatsApp-style composer */
.wa-composer {
  background: #f0f2f5;
  padding: 8px 12px;
  border-top: 1px solid #e5e7eb;
  position: sticky;
  bottom: 0;
}

.wa-composer textarea { 
  resize: none; 
  border: none; 
  border-radius: 21px; 
  padding: 10px 16px; 
  background: white;
  font-size: 15px;
  line-height: 20px;
  min-height: 20px;
  max-height: 100px;
  width: 100%;
  outline: none;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.wa-composer textarea:focus {
  box-shadow: 0 1px 2px rgba(0,0,0,0.1), 0 0 0 1px #25d366;
}

.wa-composer textarea::placeholder {
  color: #667781;
}

.wa-input-container {
  display: flex;
  position: sticky;
  bottom: 0;
  align-items: center; /* keep controls on one line */
  gap: 8px;
  flex-wrap: nowrap; /* prevent wrapping to next line */
  background: white;
  border-radius: 21px;
  padding: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.wa-input-container:focus-within {
  box-shadow: 0 1px 2px rgba(0,0,0,0.1), 0 0 0 1px #25d366;
}

/* Attachment Menu */
.wa-attach-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 8px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 1000;
  min-width: 150px;
}

.wa-attach-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: #111b21;
  font-size: 14px;
  font-weight: 400;
  width: 100%;
  text-align: left;
}

.wa-attach-option:hover {
  background: #f5f5f5;
}

.wa-attach-option svg {
  color: #8696a0;
  flex-shrink: 0;
}

.wa-attach-option span {
  flex: 1;
}

/* Document Preview */
.document-preview {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 16px;
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.document-icon {
  width: 48px;
  height: 48px;
  background: #25d366;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: bold;
  flex-shrink: 0;
}

.document-info {
  flex: 1;
  min-width: 0;
}

.document-name {
  font-weight: 500;
  color: #111b21;
  font-size: 14px;
  margin-bottom: 4px;
  word-break: break-word;
}

.document-size {
  font-size: 12px;
  color: #667781;
}

.document-remove {
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}

.document-remove:hover {
  background: #e63939;
}

/* Search Interface */
.search-container {
  position: relative;
  margin-bottom: 20px;
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-form {
  display: flex;
  gap: 12px;
  align-items: center; /* keep controls vertically centered */
}

.search-input-group {
  width: 100%;
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1 1 auto; /* allow group to grow */
}

.search-input {
  flex: 1 1 auto;
  padding: 10px 14px;
  height: 44px; /* consistent height with buttons */
  border: transparent;
  font-size: 14px;
  line-height: 22px;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #25d366;
}

/* search button now uses .btn .btn-primary */

.search-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label {
  font-size: 12px;
  font-weight: 500;
  color: #667781;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-select,
.filter-date {
  padding: 8px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  transition: border-color 0.2s ease;
}

.filter-select:focus,
.filter-date:focus {
  outline: none;
  border-color: #25d366;
}

.filter-date {
  width: 100%;
}

.filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  grid-column: 1 / -1;
  padding-top: 8px;
  border-top: 1px solid #e5e5e5;
}

/* filter toggle uses .btn .btn-ghost */

.search-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.search-actions .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 44px; /* uniform height */
  background: #25d366;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

/* Responsive: stack nicely on narrow screens */
@media (max-width: 768px) {
  .search-form { flex-direction: column; align-items: stretch; }
  .search-input-group { width: 100%; }
  .search-actions { justify-content: stretch; }
  .search-actions .btn-primary, .search-actions .btn { width: 100%; }
}

.search-actions .btn-primary:hover {
  background: #20b858;
}

/* (Unified in Unified Button System below) */

/* Search Results Highlighting */
.search-highlight {
  background: #fff3cd;
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 500;
}

.search-result-count {
  font-size: 12px;
  color: #667781;
  margin-top: 8px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
}

/* Search Results Page */
.search-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.search-result-item {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease;
}

.search-result-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.search-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.search-result-contact {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: #111b21;
}

.direction-icon {
  font-size: 16px;
  color: #25d366;
}

.contact-name {
  font-size: 14px;
}

.message-type {
  font-size: 16px;
}

.search-result-time {
  font-size: 12px;
  color: #667781;
}

.search-result-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.search-result-text {
  flex: 1;
  font-size: 14px;
  color: #111b21;
  line-height: 1.4;
  word-break: break-word;
}

.search-result-actions {
  flex-shrink: 0;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 16px;
}

.pagination-info {
  font-size: 14px;
  color: #667781;
  font-weight: 500;
}

.pagination a {
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pagination a.btn-ghost {
  background: #f0f0f0;
  color: #667781;
  border: 1px solid #e5e5e5;
}

.pagination a.btn-ghost:hover {
  background: #e5e5e5;
  color: #111b21;
}

/* Search Suggestions */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  margin-top: 4px;
}

.suggestions-header {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #667781;
  background: #f8f9fa;
  border-bottom: 1px solid #e5e5e5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.suggestion-item {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  color: #111b21;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.suggestion-item:hover {
  background: #f8f9fa;
}

.suggestion-item:last-child {
  border-bottom: none;
}

/* Modern Toast Notification System */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  pointer-events: none;
}

.toast-notification {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  border-left: 4px solid #25d366;
  min-width: 300px;
}

.toast-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-content {
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 12px;
  position: relative;
}
 
.toast-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 16px 12px 16px;
}

.toast-action {
  background: #f0f0f0;
  color: #111b21;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.toast-action:hover {
  background: #e9e9e9;
}

.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  font-size: 14px;
  color: #111b21;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #667781;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  background: #f0f0f0;
  color: #111b21;
}

.toast-progress {
  height: 3px;
  background: #25d366;
  width: 100%;
  transform-origin: left;
  animation: toast-progress 4000ms linear;
}

/* Toast Types */
.toast-success {
  border-left-color: #25d366;
}

.toast-success .toast-icon {
  background: #25d366;
  color: white;
}

.toast-success .toast-progress {
  background: #25d366;
}

.toast-error {
  border-left-color: #ff4444;
}

.toast-error .toast-icon {
  background: #ff4444;
  color: white;
}

.toast-error .toast-progress {
  background: #ff4444;
}

.toast-warning {
  border-left-color: #ffa500;
}

.toast-warning .toast-icon {
  background: #ffa500;
  color: white;
}

.toast-warning .toast-progress {
  background: #ffa500;
}

.toast-info {
  border-left-color: #007bff;
}

.toast-info .toast-icon {
  background: #007bff;
  color: white;
}

.toast-info .toast-progress {
  background: #007bff;
}

/* Progress Bar Animation */
@keyframes toast-progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .toast-container {
    bottom: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .toast-notification {
    min-width: auto;
  }
}

.wa-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 42px;
  min-width: 0; /* allow textarea to shrink instead of pushing buttons */
}

.wa-input-wrapper textarea {
  border: none;
  border-radius: 0;
  padding: 10px 12px;
  background: transparent;
  box-shadow: none;
  flex: 1;
  min-height: 20px;
  max-height: 100px;
}

.wa-input-wrapper textarea:focus {
  box-shadow: none;
}

.wa-attach-btn {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  color: #54656f;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  margin-right: 4px;
}

.wa-attach-btn:hover {
  background-color: #f5f6f6;
}

.wa-attach-btn:active {
  background-color: #e9edef;
}

.wa-attach-btn svg {
  width: 24px;
  height: 24px;
}

.wa-send-btn {
  background: #25d366;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  margin-left: 4px;
}

.wa-send-btn:hover:not(:disabled) {
  background: #22c55e;
}

.wa-send-btn:active:not(:disabled) {
  background: #16a34a;
}

.wa-send-btn svg {
  width: 20px;
  height: 20px;
  color: white;
  margin-left: 2px;
}

.wa-send-btn:disabled {
  background: #e5e7eb; /* light gray for better contrast */
  border: 1px solid #cbd5e1;
  cursor: not-allowed;
  opacity: 1; /* keep icon fully visible */
}

.wa-send-btn:disabled svg {
  color: #374151; /* dark slate for high contrast */
}

.wa-emoji-btn, .wa-camera-btn, .wa-mic-btn {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  color: #54656f;
  display: inline-flex; /* ensure inline control sizing */
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  margin-left: 4px;
  flex: 0 0 auto; /* never wrap or shrink */
}

.wa-emoji-btn:hover, .wa-camera-btn:hover, .wa-mic-btn:hover {
  background-color: #f5f6f6;
}

.wa-emoji-btn:active, .wa-camera-btn:active, .wa-mic-btn:active {
  background-color: #e9edef;
}

.wa-emoji-btn svg, .wa-camera-btn svg, .wa-mic-btn svg {
  width: 24px;
  height: 24px;
}

.wa-emoji-btn:disabled, .wa-camera-btn:disabled, .wa-mic-btn:disabled {
  color: #b3b3b3;
  cursor: not-allowed;
}

.wa-emoji-picker {
  position: absolute;
  bottom: 60px;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  padding: 12px;
  width: 280px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.wa-emoji-picker.show {
  display: block;
}

.wa-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  padding: 4px;
}

.wa-emoji-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 20px;
  transition: background-color 0.2s;
  user-select: none;
}

.wa-emoji-item:hover {
  background-color: #f5f6f6;
}

.wa-emoji-item:active {
  background-color: #e9edef;
}

.wa-emoji-categories {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.wa-emoji-category {
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
  background: none;
  border: none;
  color: #54656f;
}

.wa-emoji-category:hover {
  background-color: #f5f6f6;
}

.wa-emoji-category.active {
  background-color: #e9edef;
  color: #111b21;
}

/* Quick Replies Styles */
.quick-replies-container {
  background: #f0f2f5;
  border-top: 1px solid #e5e7eb;
  padding: 8px 12px;
  transition: all 0.3s ease;
}

.quick-replies-container.collapsed {
  padding: 4px 12px;
}

.quick-replies-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.quick-replies-title {
  font-size: 12px;
  font-weight: 600;
  color: #54656f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quick-replies-toggle {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  border-radius: 4px;
  color: #54656f;
  transition: all 0.2s ease;
}

.quick-replies-toggle:hover {
  background-color: #e9edef;
  color: #111b21;
}

.quick-replies-toggle svg {
  transition: transform 0.2s ease;
}

.quick-replies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 6px;
  max-height: 120px;
  overflow-y: auto;
}

.quick-reply-btn {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.quick-reply-btn:hover {
  background: #f8f9fa;
  border-color: #25d366;
  box-shadow: 0 2px 4px rgba(37, 211, 102, 0.1);
  transform: translateY(-1px);
}

.quick-reply-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.quick-reply-text {
  display: block;
  font-size: 14px;
  color: #111b21;
  line-height: 1.3;
  margin-bottom: 2px;
  word-wrap: break-word;
  max-height: 2.6em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.quick-reply-category {
  display: block;
  font-size: 10px;
  color: #25d366;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Responsive design for quick replies */
@media (max-width: 768px) {
  .quick-replies-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  
  .quick-reply-btn {
    padding: 6px 10px;
  }
  
  .quick-reply-text {
    font-size: 13px;
  }
}

/* Message Status Indicators */
.msg-status {
  margin-left: 6px;
  font-size: 12px;
  font-weight: normal;
  display: inline-block;
  vertical-align: middle;
}

.msg-status.sent {
  color: #8696a0;
}

.msg-status.delivered {
  color: #8696a0;
}

.msg-status.read {
  color: #53bdeb;
}

.msg-status.failed {
  color: #f15c6d;
}

/* WhatsApp-style double checkmarks for read status */
.msg-status.read::after {
  content: '✓';
  margin-left: -3px;
  color: #53bdeb;
}

/* Meta container adjustments */
.msg-out .meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.msg-in .meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* Typing indicator */
/* (Consolidated later in enhanced typing styles) */

@keyframes typingAnimation {
  0%, 60%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  30% {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Message Reactions */
.message-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  max-width: 200px;
}

.reaction {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reaction:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.05);
}

.reaction.user-reaction {
  background: rgba(0, 123, 255, 0.1);
  border-color: rgba(0, 123, 255, 0.3);
}

.reaction.customer-reaction {
  background: rgba(40, 167, 69, 0.1);
  border-color: rgba(40, 167, 69, 0.3);
  opacity: 0.8;
}

.reaction.customer-reaction:hover {
  background: rgba(40, 167, 69, 0.1);
  transform: none;
  cursor: default !important;
}

.reaction-count {
  font-size: 11px;
  font-weight: 600;
  color: #666;
  min-width: 16px;
  text-align: center;
}

/* Old reaction button styles removed - now using .action-btn .reaction-btn */

/* Reaction Picker */
.reaction-picker {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border: 1px solid #e0e0e0;
  z-index: 1000;
  max-width: 300px;
  width: 90%;
}

.reaction-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
}

.reaction-picker-title {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.reaction-picker-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #666;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.reaction-picker-close:hover {
  background: #f0f0f0;
}

.reaction-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 16px;
}

.reaction-option {
  width: 40px;
  height: 40px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.reaction-option:hover {
  background: #f8f9fa;
  border-color: #007bff;
  transform: scale(1.1);
}

/* Message positioning adjustments for reactions */
.msg {
  position: relative;
  margin-bottom: 8px;
}

/* Reply functionality - True WhatsApp Style */
.reply-preview {
  background: rgba(0, 0, 0, 0.05);
  border-left: 4px solid #25d366;
  padding: 6px 8px 6px 12px;
  margin-bottom: 4px;
  border-radius: 0 7px 7px 0;
  cursor: pointer;
  transition: background-color 0.2s ease;
  position: relative;
  font-size: 12px;
  max-width: 85%;
  word-wrap: break-word;
}

.reply-preview:hover {
  background: rgba(0, 0, 0, 0.08);
}

.reply-preview-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.reply-preview-text {
  font-weight: 400;
  color: #111b21;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.reply-preview-author {
  font-size: 11px;
  color: #25d366;
  font-weight: 500;
  margin-bottom: 1px;
}

.reply-preview::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #25d366;
  border-radius: 0 2px 2px 0;
}

.message-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.message-container:hover .message-actions {
  opacity: 1;
}

.action-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: rgba(255, 255, 255, 0.9);
  color: #666;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
  background: rgba(255, 255, 255, 1);
  border-color: #999;
  transform: scale(1.1);
}

.reply-btn {
  font-size: 12px;
}

.reply-indicator {
  background: #f0f0f0;
  border-left: 4px solid #25d366;
  border-radius: 0 8px 8px 0;
  padding: 8px 12px;
  margin-bottom: 8px;
  position: relative;
  font-size: 12px;
  max-width: 90%;
}

.reply-indicator-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.reply-indicator-text {
  font-size: 12px;
  color: #25d366;
  font-weight: 500;
  flex: 1;
  line-height: 1.3;
}

.reply-indicator-close {
  background: none;
  border: none;
  color: #8696a0;
  font-size: 18px;
  cursor: pointer;
  padding: 2px;
  border-radius: 50%;
  transition: background-color 0.2s ease;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.reply-indicator-close:hover {
  background: rgba(134, 150, 160, 0.1);
  color: #667781;
}

.replying-to {
  background: rgba(37, 211, 102, 0.1) !important;
  border-radius: 8px;
  border: 2px solid #25d366;
}

.highlighted {
  background: rgba(255, 193, 7, 0.2) !important;
  border-radius: 8px;
  animation: highlightPulse 2s ease-in-out;
}

@keyframes highlightPulse {
  0% { background: rgba(255, 193, 7, 0.4) !important; }
  50% { background: rgba(255, 193, 7, 0.2) !important; }
  100% { background: rgba(255, 193, 7, 0.2) !important; }
}
/* Inbox list */
.inbox-item a { display: block; padding: 10px 12px; }
.inbox-item .item-row { display: flex; justify-content: space-between; gap: 8px; }
.inbox-item .item-contact { font-weight: 600; color: #0f172a; }
.inbox-item .item-preview { color: #6b7280; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Toolbar + composer */
.toolbar { display: flex; align-items: center; justify-content: space-between; }
.composer { position: sticky; bottom: 0; }


.kb-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
  font-size: 15px;
  background: #f9fafb;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.kb-item:focus, .kb-item:hover {
  border-color: var(--brand);
  background: #eef6ff;
  box-shadow: 0 2px 6px rgba(80,150,255,0.08);
  outline: none;
}

.kb-content {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  background: #fff;
  margin-top: 4px;
  margin-bottom: 10px;
  min-height: 36px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.kb-content:focus, .kb-content:hover {
  border-color: var(--brand);
  background: #f0f7ff;
  box-shadow: 0 2px 6px rgba(80,150,255,0.07);
  outline: none;
}

/* KB UI modernized list */
.kb-list { padding: 0; }
.kb-row {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  transition: background .15s ease, box-shadow .15s ease, border-color .15s ease;
  border-radius: 10px;
}
/* Real-time messaging styles */
.connection-status {
  display: none; /* Hide connection status chip */
  position: fixed;
  top: 10px;
  right: 10px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 20px;
  font-size: 12px;
  z-index: 1000;
  transition: all 0.3s ease;
}

/* Conversation Status Styles */
.status-chip {
  display: inline-block;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

/* WhatsApp-style Message Status Ticks */
.message-status-ticks {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  font-size: 12px;
}

/* Pending (queued) - render like single tick (not delivered) */
.message-status-pending .message-tick:first-child {
  margin-left: 0;
}
.message-status-pending .message-tick:first-child::before {
  border-color: #bbb;
}
.message-status-pending .message-tick:nth-child(2) {
  display: none;
}

.message-tick {
  width: 12px;
  height: 12px;
  margin-left: -6px; /* Much closer spacing - almost overlapping */
  position: relative;
  display: inline-block;
}

/* Create checkmark using CSS */
.message-tick::before {
  content: '';
  position: absolute;
  width: 10px;
  height: 4px; /* Increased height from 3px to 4px */
  border-left: 2px solid #999;
  border-bottom: 2px solid #999;
  transform: rotate(-45deg);
  top: 2px; /* Adjusted top position for taller tick */
  left: 3px;
}

/* Single tick (sent) - show only first tick */
.message-status-sent .message-tick:first-child {
  margin-left: 0; /* Reset margin for first tick */
}

.message-status-sent .message-tick:first-child::before {
  border-color: #999;
}

.message-status-sent .message-tick:nth-child(2) {
  display: none;
}

/* Double tick (delivered) - show both ticks */
.message-status-delivered .message-tick:first-child {
  margin-left: 0; /* Reset margin for first tick */
}

.message-status-delivered .message-tick::before {
  border-color: #999;
}

/* Double blue tick (read) - show both ticks in blue */
.message-status-read .message-tick:first-child {
  margin-left: 0; /* Reset margin for first tick */
}

.message-status-read .message-tick::before {
  border-color: #4fc3f7;
}

/* Failed message indicator */
.message-status-failed {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  font-size: 12px;
}

.message-failed-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 2px 6px;
}

.failed-icon {
  color: #dc2626;
  font-weight: bold;
  font-size: 14px;
  line-height: 1;
}

/* retry-button styles removed (use .btn .btn-danger) */

/* spin animation defined earlier */

.status-dropdown button:hover {
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
}

.status-dropdown .btn-ghost {
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.status-option:hover {
  background: rgba(0, 0, 0, 0.05) !important;
}

.status-option.active {
  background: #f0f9ff !important;
  color: #0369a1 !important;
  font-weight: 500;
}

/* Ensure status dropdown text is visible */
.status-dropdown-menu {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.status-option {
  color: #333 !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}

.status-option span {
  display: inline-block !important;
}

.connection-status.connected {
  background: rgba(34, 197, 94, 0.9);
}

.user-status {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.user-status.online {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

/* live-mode button now uses .btn .btn-primary */

/* Enhanced handoff toggle button */
.handoff-toggle-btn {
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 4px;
}

.handoff-toggle-btn:hover {
  background: rgba(59, 130, 246, 0.1) !important;
  transform: scale(1.05);
}

.handoff-toggle-btn[data-is-human="true"] {
  background: rgba(34, 197, 94, 0.1) !important;
  animation: pulse 2s infinite;
}

.handoff-toggle-btn[data-is-human="true"]:hover {
  background: rgba(34, 197, 94, 0.2) !important;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.typing-indicator {
  animation: fadeInUp 0.3s ease-out;
}

.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 8px 0;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: var(--neutral-400);
  border-radius: 50%;
  animation: typingDot 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingDot {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* (Message slide-in animation defined earlier) */

/* Live mode indicator in chat header */
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: white;
  border-bottom: 1px solid var(--border);
}

.chat-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Real-time status indicators */
.realtime-indicators {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 12px;
  background: var(--neutral-100);
  color: var(--neutral-600);
}

.indicator.active {
  background: var(--success-100);
  color: var(--success-600);
}

.indicator.warning {
  background: var(--warning-100);
  color: var(--warning-600);
}

.indicator.error {
  background: var(--error-100);
  color: var(--error-600);
}

/* Responsive design for mobile */
@media (max-width: 768px) {
  .connection-status {
    top: 5px;
    right: 5px;
    padding: 6px 10px;
    font-size: 11px;
  }
  
  .live-mode-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .chat-header {
    padding: 8px 12px;
  }
  
  .realtime-indicators {
    font-size: 11px;
  }
}
.kb-row:last-child { border-bottom: none; }
.kb-title-pill { display:inline-block; background:#eef2ff; color:#3730a3; padding:4px 10px; border-radius:999px; font-weight:600; border:1px solid #c7d2fe; white-space: nowrap; }
.kb-time { color:#6b7280; white-space: nowrap; }
/* Tighter, clamped preview text just for the KB list */
.kb-list .kb-content { border: 0; padding: 0; background: transparent; margin: 0; color: #374151; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Toolbar */
.kb-toolbar { position: sticky; top: 0; z-index: 5; backdrop-filter: saturate(180%) blur(8px); background: rgba(255,255,255,0.85); border: 1px solid var(--border); }
.kb-toolbar input { width: 100%; max-width: 520px; }
/* Professional Responsive Design - Full Width */
@media (max-width: 1200px) {
  .container {
    padding: 0 var(--space-4);
  }
  
  .layout {
    padding: var(--space-3) var(--space-4);
  }
  
  .sidebar {
    width: 260px;
  }
}

@media (max-width: 900px) {
  .layout {
    flex-direction: column;
    gap: var(--space-3);
    height: auto;
    min-height: calc(100vh - 80px);
    padding: var(--space-3);
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    order: 2;
  }
  
  .main {
    order: 1;
    min-height: 70vh;
    width: 100%;
  }
  
  .kb-row { 
    grid-template-columns: 1fr; 
    align-items: flex-start; 
    gap: var(--space-3); 
  }
  .kb-title-pill { order: 1; }
  .kb-list .kb-content { order: 2; }
  
  .bubble {
    max-width: 85%;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-3);
    margin: 0;
  }
  
  .layout {
    padding: var(--space-2);
  }
  
  .card {
    padding: var(--space-4);
  }
  
  .topbar {
    padding: var(--space-3);
    flex-direction: column;
    gap: var(--space-3);
    align-items: stretch;
  }
  
  .sidebar .nav a {
    padding: var(--space-3) var(--space-4);
  }
  
  .bubble {
    max-width: 90%;
    padding: var(--space-2) var(--space-3);
  }
  
  .msg .bubble {
    font-size: var(--font-size-xs);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-2);
    margin: 0;
  }
  
  .layout {
    padding: var(--space-1);
  }
  
  .card {
    padding: var(--space-3);
    border-radius: var(--radius-lg);
  }
  
  .sidebar {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
  }
  
  .bubble {
    max-width: 95%;
  }
  
  .empty_chat {
    font-size: var(--font-size-lg);
  }
  
  .empty_chat::before {
    font-size: 3rem;
  }
}

.separator { height: 1px; width: 100%; background: var(--border); margin: 12px 0 12px 0; }

#nameModal .card { box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
#nameModal .settings-field { height: 38px; }
#nameModal textarea.settings-field { height: auto; min-height: 80px; }

/* Guide (Help Center) */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.guide-card { display: flex; flex-direction: column; text-decoration: none; border: 1px solid var(--border); border-radius: 16px; padding: 18px; background: #fff; transition: box-shadow .25s, transform .25s, border-color .25s; position: relative; overflow: hidden; }
.guide-card:hover { box-shadow: 0 10px 24px rgba(0,0,0,.10); transform: translateY(-3px); border-color: #dfe3ea; }
.guide-card::after { content:""; position:absolute; inset:0; background: radial-gradient(1200px 200px at -10% 110%, rgba(99,102,241,0.08), transparent 60%); pointer-events:none; }
.guide-card-date { position:absolute; top:8px; left:8px; font-size: 11px; color:#6b7280; background:#f3f4f6; border:1px solid #e5e7eb; border-radius:6px; padding:2px 6px; font-weight:600; }
.guide-card-header { font-weight: 800; color: #111827; margin: 18px 0 8px 0; font-size: 22px; letter-spacing: -0.01em; }
.guide-card-body { font-size: 14px; color: #374151; min-height: 48px; }
.guide-card-cta { margin-top: 14px; font-size: 14px; color: #111827; font-weight:600; }
/* deduped: use later .article and .back definitions */
.toc{background:#f9fafb;border:1px solid #e5e7eb;border-radius:10px;padding:12px;margin:12px 0}

/* Colorful variants using nth-child for variety */
.guide-grid .guide-card:nth-child(6n+1) { background: linear-gradient(180deg, rgba(255,237,213,0.6), #fff 40%); border-color: #fed7aa; }
.guide-grid .guide-card:nth-child(6n+2) { background: linear-gradient(180deg, rgba(219,234,254,0.6), #fff 40%); border-color: #bfdbfe; }
.guide-grid .guide-card:nth-child(6n+3) { background: linear-gradient(180deg, rgba(221,214,254,0.6), #fff 40%); border-color: #c4b5fd; }
.guide-grid .guide-card:nth-child(6n+4) { background: linear-gradient(180deg, rgba(254,226,226,0.6), #fff 40%); border-color: #fecaca; }
.guide-grid .guide-card:nth-child(6n+5) { background: linear-gradient(180deg, rgba(204,251,241,0.6), #fff 40%); border-color: #99f6e4; }
.guide-grid .guide-card:nth-child(6n+6) { background: linear-gradient(180deg, rgba(254,249,195,0.6), #fff 40%); border-color: #fde68a; }

/* Subtle floating animation on hover */
@keyframes floaty {
  0% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}
.guide-card:hover .guide-card-header { animation: floaty 1.6s ease-in-out infinite; }

.prose { max-width: 760px; line-height: 1.6; }
.prose h1 { font-size: 28px; margin: 0 0 12px 0; }
.prose h2 { font-size: 20px; margin: 18px 0 8px 0; }
.prose p { margin: 10px 0; }
.prose ul { margin: 8px 0 12px 20px; }

.hero { display: flex; justify-content: space-between; align-items: center; }
.hero h1 { margin: 0; }
.hero .desc { color: #6b7280; }

.article { max-width: 820px; margin: 0 auto; }
.article .meta { color: #6b7280; font-size: 12px; margin-bottom: 8px; }
.article .title { font-size: 28px; font-weight: 700; margin: 0 0 8px 0; }
.article .prose { color: #111827; }

.back { display: inline-flex; align-items: center; gap: 6px; color: #374151; text-decoration: none; margin-bottom: 12px; }
.back:hover { text-decoration: underline; }

.toc { background: #f9fafb; border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin: 12px 0; }

/* Guide extras below grid */
.guide-extra { display:grid; grid-template-columns: 2fr 1fr; gap:16px; }
.tip-list { margin: 8px 0 0 18px; color:#4b5563; }
.guide-cta { text-align:left; background: linear-gradient(135deg, #eef2ff, #ecfeff); border: 1px solid #dbeafe; }
.guide-cta .cta-title { font-weight: 700; color:#111827; margin-bottom:6px; }
.guide-cta .cta-sub { color:#374151; margin-bottom:10px; }
/* btn-cta removed; use .btn .btn-primary */

@media (max-width: 900px) {
  .guide-extra { grid-template-columns: 1fr; }
}

/* Enquiry form styles */
.enquiry-form {
  margin-top: 24px;
}

.enquiry-form h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.enquiry-form .desc {
  color: #6b7280;
  margin-bottom: 20px;
  font-size: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  background: #ffffff;
  color: #111827;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* (Unified in Unified Button System below) */

/* Alert messages */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Calendar styles */
.calendar-card { padding: 0; }
.calendar-toolbar { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-bottom:1px solid var(--border); }
.calendar-toolbar .btn-ghost { padding:6px 10px; }
.calendar-title { font-weight:700; }
.calendar { padding: 12px; }
.calendar-grid { display:grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.calendar-dow { font-size:12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 6px 2px; }
.calendar-cell { min-height: 100px; padding: 8px; display:flex; flex-direction:column; gap:6px; }
.calendar-cell.other-month { background: #fafafa; color: #9ca3af; }
.calendar-cell .day { font-size: 12px; color:#6b7280; align-self:flex-end; }
.calendar-events { display:flex; flex-direction:column; gap:4px; overflow: hidden; }
.cal-event { font-size: 12px; padding: 4px 6px; border-radius: 6px; background:#eef2ff; color:#3730a3; border:1px solid #c7d2fe; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event.green { background:#ecfdf5; color:#065f46; border-color:#bbf7d0; }
.cal-event.gray { background:#f3f4f6; color:#374151; border-color:#e5e7eb; }
.calendar-legend { display:flex; gap:8px; align-items:center; font-size:12px; color:#6b7280; }
.calendar-legend .swatch { width:10px; height:10px; border-radius:3px; display:inline-block; }
.swatch-blue { background:#c7d2fe; border:1px solid #a5b4fc; }
.swatch-green { background:#bbf7d0; border:1px solid #86efac; }

@media (max-width: 900px) {
  .calendar-cell { min-height: 80px; }
  .calendar-grid { gap: 6px; }
}

/* Enhanced Modal Styles */
.day-modal { 
  position: fixed; 
  inset: 0; 
  z-index: 1000; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  padding: var(--space-5);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.day-modal.show {
  opacity: 1;
  visibility: visible;
}

.day-modal-overlay { 
  position: absolute; 
  inset: 0; 
  background: rgba(0,0,0,0.6); 
  backdrop-filter: blur(8px);
  transition: all var(--transition-normal);
}

.day-modal-content { 
  position: relative; 
  background: var(--surface); 
  border-radius: var(--radius-2xl); 
  box-shadow: var(--shadow-xl); 
  max-width: 520px; 
  width: 100%; 
  max-height: 80vh; 
  overflow: hidden; 
  display: flex; 
  flex-direction: column;
  transform: scale(0.9) translateY(20px);
  transition: all var(--transition-normal);
}

.day-modal.show .day-modal-content {
  transform: scale(1) translateY(0);
}

.day-modal-header { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: var(--space-5) var(--space-6); 
  border-bottom: 1px solid var(--border);
  background: var(--neutral-50);
}

.day-modal-header h3 { 
  margin: 0; 
  font-size: var(--font-size-lg); 
  font-weight: 700; 
  color: var(--neutral-900); 
}

.day-modal-close { 
  background: none; 
  border: none; 
  font-size: 24px; 
  color: var(--neutral-500); 
  cursor: pointer; 
  padding: var(--space-2); 
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.day-modal-close:hover { 
  background: var(--neutral-200); 
  color: var(--neutral-700);
  transform: rotate(90deg);
}

.day-modal-body { 
  padding: var(--space-6); 
  overflow-y: auto; 
  flex: 1; 
}

.day-modal-empty { 
  text-align: center; 
  color: var(--muted); 
  font-style: italic; 
  margin: var(--space-8) 0;
  font-size: var(--font-size-sm);
}

.day-modal-list { 
  display: flex; 
  flex-direction: column; 
  gap: var(--space-4); 
}

.day-modal-item { 
  background: var(--neutral-50); 
  border: 1px solid var(--border); 
  border-radius: var(--radius-lg); 
  padding: var(--space-4);
  transition: all var(--transition-normal);
}

.day-modal-item:hover {
  background: var(--neutral-100);
  border-color: var(--primary-200);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.day-modal-time { 
  font-weight: 600; 
  color: var(--primary-600); 
  font-size: var(--font-size-xs); 
  margin-bottom: var(--space-2); 
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.day-modal-name { 
  font-weight: 700; 
  color: var(--neutral-900); 
  font-size: var(--font-size-sm); 
  margin-bottom: var(--space-1); 
}

.day-modal-phone, .day-modal-staff { 
  color: var(--muted); 
  font-size: var(--font-size-xs); 
  margin-bottom: var(--space-1); 
}

.day-modal-notes { 
  color: var(--neutral-800); 
  font-size: var(--font-size-xs); 
  line-height: 1.5; 
  background: var(--surface); 
  padding: var(--space-3); 
  border-radius: var(--radius-md); 
  border-left: 3px solid var(--primary-500);
  margin-top: var(--space-2);
}

/* Booking settings UI polish */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
}
@media (max-width: 900px) { .settings-grid { grid-template-columns: 1fr; } }
.settings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .settings-row { grid-template-columns: 1fr; } }
.settings-label { font-weight: 600; color: var(--neutral-700); font-size: 14px; }
.input-inline { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  color: var(--neutral-800);
  font-size: 13px;
  cursor: pointer;
}
.chip:hover { background: var(--neutral-200); }
.chip-danger { background: var(--error-50); border-color: var(--error-200); color: var(--error-700); }
.settings-help { color: var(--muted); font-size: 12px; }

/* Professional Focus States */
*:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* Enhanced Selection Styling */
::selection {
  background: var(--primary-100);
  color: var(--primary-900);
}

::-moz-selection {
  background: var(--primary-100);
  color: var(--primary-900);
}

/* Professional Loading States */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary-200);
  border-top-color: var(--primary-600);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Professional Error States */
.error-state {
  background: var(--error-50);
  border: 1px solid var(--error-200);
  color: var(--error-700);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  margin: var(--space-4) 0;
}

.success-state {
  background: var(--success-50);
  border: 1px solid var(--success-200);
  color: var(--success-700);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  margin: var(--space-4) 0;
}

/* Professional Empty States */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-8);
  color: var(--neutral-500);
}

.empty-state::before {
  content: '📭';
  font-size: 4rem;
  display: block;
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.empty-state h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--neutral-700);
}

.empty-state p {
  font-size: var(--font-size-sm);
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Enhanced Authentication Pages Styles */
.auth-body {
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--neutral-50) 50%, var(--primary-100) 100%);
  height: 100vh; /* fallback */
  min-height: 100svh; /* better on mobile */
  display: grid; /* robust centering */
  place-items: center;
  padding: var(--space-4);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  position: relative;
  overflow: hidden;
  margin: 0;
}

.auth-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-2xl);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  padding: var(--space-10);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-10);
  position: relative;
}

.auth-logo {
  width: 56px;
  height: 69px;
  box-shadow: 
    0 8px 25px -8px rgba(59, 130, 246, 0.3),
    0 0 0 1px rgba(59, 130, 246, 0.1);
  transition: all var(--transition-normal);
}

.auth-logo:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 35px -8px rgba(59, 130, 246, 0.4),
    0 0 0 1px rgba(59, 130, 246, 0.2);
}

.auth-title {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  background: linear-gradient(135deg, var(--neutral-900) 0%, var(--primary-700) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 var(--space-3) 0;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.auth-subtitle {
  font-size: var(--font-size-base);
  color: var(--neutral-600);
  margin: 0;
  line-height: 1.5;
  font-weight: 400;
}

.auth-divider {
  position: relative;
  text-align: center;
  margin: var(--space-8) 0;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.auth-divider span {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 0 var(--space-4);
  color: var(--neutral-500);
  font-size: var(--font-size-sm);
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

.auth-switch {
  font-size: var(--font-size-sm);
  color: var(--neutral-600);
  margin: 0;
  line-height: 1.5;
}

.auth-link {
  color: var(--primary-600);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-fast);
  position: relative;
}

.auth-link:hover {
  color: var(--primary-700);
  text-decoration: underline;
}

.auth-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-500), var(--primary-600));
  transition: width var(--transition-fast);
}

.auth-link:hover::after {
  width: 100%;
}

/* New creative auth layout */
.auth-aurora {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: var(--space-6);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(59,130,246,.28), transparent 60%),
              radial-gradient(1000px 600px at 110% 110%, rgba(59,130,246,.22), transparent 60%),
              linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
  position: relative;
  overflow: hidden;
}

.auth-aurora::before,
.auth-aurora::after {
  content: '';
  position: absolute;
  inset: 0;
  background: conic-gradient(from 200deg at 50% 40%, rgba(59,130,246,.22), transparent 40%, rgba(59,130,246,.18));
  filter: blur(60px);
  animation: aurora-move 18s ease-in-out infinite alternate;
  pointer-events: none;
}

.auth-aurora::after { animation-duration: 26s; opacity: .9; }

@keyframes aurora-move {
  0% { transform: translate3d(-2%, -2%, 0) scale(1.02); }
  100% { transform: translate3d(2%, 3%, 0) scale(1.05); }
}

.auth-shell {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-8);
  position: relative;
  z-index: 1;
}

.brand-pane {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.65));
  border: 1px solid rgba(59,130,246,.15);
  border-radius: var(--radius-2xl);
  backdrop-filter: blur(22px);
  overflow: hidden;
}

.brand-pane::before {
  content: '';
  position: absolute;
  inset: -20% -20% auto auto;
  background: radial-gradient( circle at 30% 30%, rgba(59,130,246,.25), transparent 60%),
              radial-gradient( circle at 70% 70%, rgba(59,130,246,.18), transparent 60%);
  width: 420px; height: 420px;
  filter: blur(40px);
  opacity: .6;
}

.brand-inner { padding: clamp(24px, 4vw, 48px); }
.brand-logo { width: 64px; height: 64px; border-radius: 14px; box-shadow: 0 10px 30px rgba(59,130,246,.25); }
.brand-title { margin: 16px 0 8px 0; font-size: clamp(28px, 3.2vw, 40px); font-weight: 900; letter-spacing: -.025em; }
.brand-title span { 
  background: linear-gradient(135deg, var(--neutral-900) 0%, var(--primary-700) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.brand-tagline { color: var(--neutral-600); max-width: 44ch; line-height: 1.6; }
.brand-list { margin: var(--space-6) 0 0 0; padding: 0; list-style: none; display: grid; gap: var(--space-3); }
.brand-list li { position: relative; padding-left: 1.5rem; color: var(--neutral-700); }
.brand-list li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--primary-600); font-weight: 800; }

.form-pane { display: grid; place-items: center; }
.form-card {
  width: 100%;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(59,130,246,.12);
  border-radius: var(--radius-2xl);
  padding: clamp(24px, 4vw, 48px);
  box-shadow: 0 25px 60px -20px rgba(59,130,246,.25), 0 8px 18px rgba(0,0,0,.06);
  backdrop-filter: blur(20px);
}

/* Button sheen */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 -60%;
  width: 60%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg);
  transition: transform var(--transition-fast);
}
.btn-primary:hover::before { transform: translateX(220%) skewX(-20deg); }

/* Mobile */
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .brand-pane { order: 2; }
  .form-pane { order: 1; }
}

/* Simplify to single centered card by default (brand pane optional) */
.auth-shell { max-width: 520px; grid-template-columns: 1fr; }
.brand-pane { display: none; }
.form-pane { display: block; }

/* Defensive clamp if brand pane is re-enabled */
.brand-logo { width: 56px !important; height: 56px !important; object-fit: contain; display: block; }

/* Modern base form and button styles for Clerk mappings */
.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--neutral-700);
  margin-bottom: var(--space-2);
}

.form-input {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-base);
  background: #fff;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100), 0 4px 12px rgba(59, 130, 246, 0.15);
  outline: none;
}

.form-text {
  font-size: var(--font-size-sm);
  color: var(--neutral-500);
}

.form-error {
  color: var(--error-600);
  font-size: var(--font-size-sm);
  margin-top: var(--space-2);
}

.form-success {
  color: var(--success-700);
  font-size: var(--font-size-sm);
  margin-top: var(--space-2);
}

/* (Unified in Unified Button System below) */

.btn-full { width: 100%; }

/* Enhanced Clerk Component Styling */
.clerk-signin-root,
.clerk-signup-root {
  width: 100%;
}

.clerk-signin-card,
.clerk-signup-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: var(--space-6) !important; /* inner padding around Clerk fields */
  margin: 0 !important;
}

.clerk-signin-title,
.clerk-signup-title {
  display: none !important;
}

.clerk-signin-subtitle,
.clerk-signup-subtitle {
  display: none !important;
}

/* Hide Clerk dev badge/secured ribbon */
[data-localization-key^="badge__secured_by_clerk"],
.cl-badge, .cl-footer, .clerk-badge { display: none !important; }

.clerk-social-button {
  width: 100% !important;
  padding: var(--space-4) var(--space-5) !important;
  border: 2px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  background: white !important;
  color: var(--neutral-700) !important;
  font-size: var(--font-size-sm) !important;
  font-weight: 600 !important;
  transition: all var(--transition-fast) !important;
  margin-bottom: var(--space-4) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
  position: relative !important;
  overflow: hidden !important;
}

.clerk-social-button:hover {
  border-color: var(--primary-500) !important;
  background: var(--primary-50) !important;
  color: var(--primary-700) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15) !important;
}

.clerk-social-button:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.clerk-formFieldInput {
  padding: var(--space-4) var(--space-5) !important;
  border: 2px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  font-size: var(--font-size-base) !important;
  background: white !important;
  transition: all var(--transition-fast) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.clerk-formFieldInput:focus {
  border-color: var(--primary-500) !important;
  box-shadow: 0 0 0 3px var(--primary-100), 0 4px 12px rgba(59, 130, 246, 0.15) !important;
  outline: none !important;
}

.clerk-formButtonPrimary {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%) !important;
  border: none !important;
  border-radius: var(--radius-lg) !important;
  padding: var(--space-4) var(--space-6) !important;
  font-size: var(--font-size-base) !important;
  font-weight: 600 !important;
  color: white !important;
  transition: all var(--transition-fast) !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
  position: relative !important;
  overflow: hidden !important;
}

.clerk-formButtonPrimary:hover {
  background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4) !important;
}

.clerk-formButtonPrimary:active {
  transform: translateY(0) !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.clerk-formFieldLabel {
  font-size: var(--font-size-sm) !important;
  font-weight: 600 !important;
  color: var(--neutral-700) !important;
  margin-bottom: var(--space-2) !important;
}

.clerk-footerActionLink {
  color: var(--primary-600) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  transition: color var(--transition-fast) !important;
}

.clerk-footerActionLink:hover {
  color: var(--primary-700) !important;
  text-decoration: underline !important;
}

.clerk-formFieldErrorText {
  color: var(--error-600) !important;
  font-size: var(--font-size-sm) !important;
  margin-top: var(--space-2) !important;
}

.clerk-alertText {
  color: var(--error-600) !important;
  font-size: var(--font-size-sm) !important;
  background: var(--error-50) !important;
  border: 1px solid var(--error-200) !important;
  border-radius: var(--radius-md) !important;
  padding: var(--space-3) var(--space-4) !important;
  margin-bottom: var(--space-4) !important;
}

/* Enhanced Responsive Design */
@media (max-width: 480px) {
  .auth-body {
    padding: var(--space-3);
  }
  
  .auth-container {
    max-width: 100%;
  }
  
  .auth-card {
    padding: var(--space-8);
    border-radius: var(--radius-xl);
  }
  
  .auth-title {
    font-size: var(--font-size-2xl);
  }
  
  .auth-logo {
    width: 48px;
    height: 48px;
  }
  
  .clerk-social-button {
    padding: var(--space-3) var(--space-4) !important;
    font-size: var(--font-size-sm) !important;
  }
  
  .clerk-formFieldInput {
    padding: var(--space-3) var(--space-4) !important;
    font-size: var(--font-size-sm) !important;
  }
  
  .clerk-formButtonPrimary {
    padding: var(--space-3) var(--space-5) !important;
    font-size: var(--font-size-sm) !important;
  }
}

@media (max-width: 360px) {
  .auth-card {
    padding: var(--space-6);
    margin: var(--space-2);
  }
  
  .auth-title {
    font-size: var(--font-size-xl);
  }
  
  .auth-subtitle {
    font-size: var(--font-size-sm);
  }
}

.dropdown { position: relative; }
.dropdown-menu { z-index: 9999 !important; }
.status-dropdown { position: relative; }
.status-dropdown-menu { z-index: 9999 !important; }
.inbox-item { overflow: visible !important; }

/* --- Dark Variant for Auth Pages ------------------------------------------- */
.auth-aurora.auth-dark {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: var(--space-6);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(59,130,246,.22), transparent 60%),
    radial-gradient(900px 600px at 110% 110%, rgba(99,102,241,.18), transparent 60%),
    linear-gradient(180deg, #0b0d12 0%, #0f1220 100%);
  position: relative;
  overflow: hidden;
}
.auth-aurora.auth-dark::before,
.auth-aurora.auth-dark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: conic-gradient(from 200deg at 50% 40%, rgba(59,130,246,.18), transparent 40%, rgba(99,102,241,.14));
  filter: blur(80px);
  animation: aurora-move 22s ease-in-out infinite alternate;
  pointer-events: none;
}
.auth-aurora.auth-dark::after { animation-duration: 30s; opacity: .9; }

.auth-aurora.auth-dark .form-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(59,130,246,.25);
  box-shadow:
    0 25px 60px -20px rgba(0,0,0,.55),
    0 8px 18px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.04);
}
.auth-aurora.auth-dark .auth-title {
  background: linear-gradient(135deg, #e5e7eb 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-aurora.auth-dark .auth-subtitle { color: #cbd5e1; }

.auth-aurora.auth-dark .clerk-social-button {
  background: rgba(15,23,42,.6) !important;
  color: #e2e8f0 !important;
  border-color: rgba(59,130,246,.25) !important;
}
.auth-aurora.auth-dark .clerk-social-button:hover {
  background: rgba(17,24,39,.8) !important;
  border-color: #60a5fa !important;
  color: #fff !important;
}

.auth-aurora.auth-dark .form-input,
.auth-aurora.auth-dark .clerk-formFieldInput {
  background: rgba(2,6,23,.6) !important;
  color: #e5e7eb !important;
  border-color: rgba(59,130,246,.25) !important;
}
.auth-aurora.auth-dark .clerk-formFieldInput:focus {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,.25) !important;
}
.auth-aurora.auth-dark .form-label { color: #cbd5e1; }
.auth-aurora.auth-dark .form-text { color: #9fb0c5; }
.auth-aurora.auth-dark .form-error { color: #fecaca; }

.auth-aurora.auth-dark .clerk-formButtonPrimary {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
  box-shadow: 0 8px 22px rgba(59,130,246,.35) !important;
}
.auth-aurora.auth-dark .clerk-formButtonPrimary:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%) !important;
}

/* Clerk + inputs: white placeholders on dark auth */
.auth-aurora.auth-dark input::placeholder,
.auth-aurora.auth-dark textarea::placeholder,
.auth-aurora.auth-dark .clerk-formFieldInput::placeholder {
  color: #e5e7eb !important;
  opacity: .85;
}

/* --- Home (Marketing) - clean theme (scoped to home route) ------------------- */
html.home-clean-html{
  /* global CSS sets html/body overflow:hidden; re-enable scrolling for home */
  overflow-y: auto;
  overflow-x: hidden;
}
.home-clean{
  --bg:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --muted2:#64748b;
  --border:#e5e7eb;
  --card:#ffffff;
  --accent:#2563eb;
  --accent2:#1d4ed8;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(15,23,42,.06);

  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  line-height: 1.5;

  /* override app-shell global overflow hidden */
  overflow-y: auto;
  overflow-x: hidden;
}
.home-clean *, .home-clean *::before, .home-clean *::after{ box-sizing:border-box; }
.home-clean a{ color:inherit; text-decoration:none; }
.home-clean a:hover{ color:var(--accent); }

.home-clean .wrap{ max-width:1120px; margin:0 auto; padding: 20px 24px; }
.home-clean.home-landing .wrap{
  width: 100%;
  max-width: 1240px; /* Zendesk-like centered container */
  margin: 0 auto;
  padding-left: 48px;
  padding-right: 48px;
}

/* -------------------------------------------------------------------------- */
/* Premium landing look (scoped to .home-landing)                              */
/* -------------------------------------------------------------------------- */
.home-clean.home-landing{
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  /* Our brand (Indigo) */
  --brand: #4f46e5;
  --brand-2: #4338ca;
  --brand-3: #3730a3;
  --ink: #0b1020;
  --slate: #2f3650;
  --slate2: #5a637a;
  --border: rgba(11,16,32,.12);
  --accent: var(--brand);
  --accent2: var(--brand-2);
  --text: var(--ink);
  --muted: var(--slate);
  --muted2: var(--slate2);

  /* Signature background: warm + indigo aura */
  background:
    radial-gradient(980px 620px at 18% -10%, rgba(79,70,229,.18), transparent 60%),
    radial-gradient(980px 620px at 92% 10%, rgba(99,102,241,.14), transparent 62%),
    linear-gradient(180deg, #fbfbf9 0%, #f7f7ff 58%, #fbfbf9 100%);

  /* landing rhythm */
  --section-gap: 74px;
  --section-gap-sm: 40px;
  --anchor-offset: 96px;
}

/* Make anchor jumps land nicely below sticky header */
.home-clean.home-landing section[id]{
  scroll-margin-top: var(--anchor-offset);
}

/* Global vertical spacing so the page feels readable */
.home-clean.home-landing main.wrap > section{
  margin-top: var(--section-gap);
}
.home-clean.home-landing main.wrap > section:first-child{
  margin-top: 0;
}

/* Smaller helper bands */
.home-clean.home-landing main.wrap > section.trust-bar{
  margin-top: var(--section-gap-sm);
}

/* Keep the AI globe section below the initial hero viewport */
.home-clean.home-landing main.wrap > section.ai-globe{
  margin-top: 135px;
}

/* Full-bleed ROI band handles its own padding; keep spacing but not excessive */
.home-clean.home-landing main.wrap > section.roi{
  margin-top: calc(var(--section-gap) + 10px);
}

/* Header: more expensive glass */
.home-clean.home-landing .m-header{
  background: rgba(251,251,249,.78);
  border-bottom-color: rgba(15,23,42,.10);
  box-shadow: none;
}
.home-clean.home-landing .m-nav a{
  color: #334155;
}
.home-clean.home-landing .m-nav a:hover{
  color: #0f172a;
}
.home-clean.home-landing .m-nav a.btn-primary{
  color: #ffffff;
}
.home-clean.home-landing .m-nav a.btn-primary:hover{
  color: #ffffff;
}

/* More comfortable padding inside cards on landing */
.home-clean.home-landing .card{
  padding: 22px;
}

/* Buttons: richer primary */
.home-clean.home-landing .btn-primary{
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 55%, var(--brand-3) 100%);
  color: #ffffff;
  border-color: rgba(0,0,0,.12);
  box-shadow: 0 14px 28px rgba(79,70,229,.22);
}
.home-clean.home-landing .btn-primary:hover{
  background: linear-gradient(135deg, var(--brand-2) 0%, var(--brand-3) 55%, #312e81 100%);
  box-shadow: 0 18px 34px rgba(79,70,229,.28);
}
.home-clean.home-landing .btn-ghost{
  background: rgba(255,255,255,.7);
  border-color: rgba(226,232,240,.85);
  color: var(--text);
}
.home-clean.home-landing .btn-ghost:hover{
  background: rgba(248,250,252,.95);
  border-color: rgba(203,213,225,.95);
}

/* Hero: more hierarchy and spacing */
.home-clean.home-landing .hero{
  padding: 74px 0 44px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}
.home-clean.home-landing .hero h1{
  font-size: clamp(48px, 5.3vw, 78px);
  line-height: .92;
  letter-spacing: -0.07em;
}
.home-clean.home-landing .hero p{
  font-size: 17px;
  line-height: 1.75;
  color: #2f3a46;
  /* Ensure the paragraph block itself is centered (not left-shifted by max-width rules) */
  margin-left: auto;
  margin-right: auto;
}

.home-clean.home-landing .headline-accent{
  position: relative;
  display: inline-block;
  padding: 0 6px;
}
.home-clean.home-landing .headline-accent::before{
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8%;
  height: 42%;
  background: rgba(99,102,241,.26);
  border-radius: 999px;
  z-index: -1;
  transform: rotate(-1.2deg);
}
.home-clean.home-landing .hero-microcopy{
  margin-top: 10px;
  font-size: 13px;
  color: rgba(47,58,70,.78);
  font-weight: 600;
}

.home-clean.home-landing .hero-center{
  text-align: center;
  max-width: 980px;
  margin: 0 auto;
}
.home-clean.home-landing .hero-form{
  justify-content: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.home-clean.home-landing .hero-actions-secondary{
  justify-content: center;
}

.home-clean.home-landing .hero-form input{
  height: 46px;
  border-radius: 14px;
  border-color: rgba(226,232,240,.95);
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
}
.home-clean.home-landing .hero-form input:focus{
  box-shadow: 0 0 0 4px rgba(79,70,229,.18), 0 14px 34px rgba(15,23,42,.08);
}
.home-clean.home-landing .hero-kpis .kpi{
  background: rgba(255,255,255,.75);
  border-color: rgba(226,232,240,.95);
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
}

/* Hero art: premium frame */
/* Eyebrows: subtle accent */
.home-clean.home-landing .eyebrow{
  color: #334155;
  letter-spacing: .18em;
}
.home-clean.home-landing .eyebrow::before{
  content: '';
  display: inline-block;
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #a5b4fc, #4f46e5);
  margin-right: 10px;
  vertical-align: middle;
  transform: translateY(-1px);
}

/* Alternating “band” sections (some with gaps, some without) */
.home-clean.home-landing .trust-bar{
  padding: 16px 0 10px;
  margin-top: 10px;
}
.home-clean.home-landing .trust-title{
  text-align: center;
}
.home-clean.home-landing .trust-logos{
  justify-content: center;
}
.home-clean.home-landing .trust-logos span{
  background: transparent;
  border-color: rgba(15,23,42,.10);
  color: #2f3a46;
}

/* ElevenLabs-like globe section (adapted to our brand) */
.home-clean.home-landing .ai-globe{
  padding: 70px 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: center;
}
.home-clean.home-landing .ai-left h2{
  margin: 0 0 12px 0;
  font-size: 44px;
  line-height: 1.02;
  letter-spacing: -0.05em;
}
.home-clean.home-landing .ai-left .lead{
  margin: 0 0 18px 0;
  color: rgba(47,54,80,.86);
  max-width: 60ch;
}
.home-clean.home-landing .ai-points{
  margin-top: 18px;
  display: grid;
  gap: 12px;
  max-width: 520px;
}
.home-clean.home-landing .ai-point{
  padding: 10px 0;
  opacity: .42;
  border-left: 3px solid transparent;
  padding-left: 14px;
}
.home-clean.home-landing .ai-point.is-active{
  opacity: 1;
  border-left-color: rgba(79,70,229,.55);
}
.home-clean.home-landing .ai-point-title{
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.home-clean.home-landing .ai-point-copy{
  color: rgba(47,54,80,.78);
  font-size: 14px;
  line-height: 1.6;
}

.home-clean.home-landing .ai-right{
  display: grid;
  place-items: center;
}
.home-clean.home-landing .globe-stage{
  position: relative;
  width: min(560px, 100%);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}
.home-clean.home-landing .globe-svg{
  width: min(520px, 100%);
  height: auto;
  opacity: .9;
}

/* Globe motion: drift longitudes to mimic rotation (less “wheel-like”) */
.home-clean.home-landing .globe-drift{
  transform-origin: 50% 50%;
  transform-box: view-box;
  will-change: transform;
  /* Constrained (clipped) drift reads like rotation instead of “sliding lines” */
  animation: globeDriftIllusion 4.6s linear infinite;
}
@keyframes globeDriftIllusion{
  0%   { transform: translateX(-14px) scaleX(0.92); opacity: .82; }
  50%  { transform: translateX(14px)  scaleX(0.92); opacity: .82; }
  100% { transform: translateX(-14px) scaleX(0.92); opacity: .82; }
}
@media (prefers-reduced-motion: reduce){
  .home-clean.home-landing .globe-drift{ animation: none; }
}
.home-clean.home-landing .lang-chip{
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(11,16,32,.10);
  box-shadow: 0 20px 50px -40px rgba(11,16,32,.35);
  backdrop-filter: blur(10px);
  font-weight: 700;
  color: rgba(11,16,32,.88);
  font-size: 13px;
}
.home-clean.home-landing .lang-chip .flag{ font-size: 16px; line-height: 1; }
.home-clean.home-landing .chip-fr{ left: 60px; top: 120px; }
.home-clean.home-landing .chip-es{ right: 64px; top: 150px; }
.home-clean.home-landing .chip-pt{ right: 120px; bottom: 150px; }

.home-clean.home-landing .lang-panel{
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 220px;
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(11,16,32,.10);
  box-shadow: 0 26px 70px -52px rgba(11,16,32,.35);
  overflow: hidden;
}
.home-clean.home-landing .lang-row{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid rgba(11,16,32,.06);
  font-weight: 650;
  color: rgba(11,16,32,.86);
  font-size: 13px;
}
.home-clean.home-landing .lang-row:first-child{ border-top: 0; }
.home-clean.home-landing .lang-more{
  justify-content: center;
  font-weight: 800;
  color: rgba(47,54,80,.84);
  background: rgba(99,102,241,.10);
}

@media (max-width: 980px){
  .home-clean.home-landing .ai-globe{ grid-template-columns: 1fr; padding: 54px 0 24px; }
  .home-clean.home-landing .ai-left h2{ font-size: 34px; }
  .home-clean.home-landing .lang-panel{ position: static; width: min(320px, 100%); margin-top: 14px; }
}
.home-clean.home-landing .proof-strip{
  margin: 28px auto 0;
  padding: 52px 34px;
  border: 0;
  border-radius: 32px;
  background: #ffffff;
  box-shadow: 0 22px 70px -54px rgba(15,23,42,.28);
}

/* Use cases section (our differentiator) */
.home-clean.home-landing .use-cases{
  margin-top: 28px;
  padding: 64px 0 44px;
}
.home-clean.home-landing .use-head{
  max-width: 860px;
}
.home-clean.home-landing .use-grid{
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.home-clean.home-landing .use-card{
  border-radius: 22px;
  background:
    radial-gradient(700px 240px at 20% 0%, rgba(99,102,241,.14), transparent 60%),
    #ffffff;
  border: 1px solid rgba(11,16,32,.10);
  box-shadow: 0 22px 60px -52px rgba(11,16,32,.22);
  padding: 22px;
}
.home-clean.home-landing .use-icon{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(99,102,241,.14);
  border: 1px solid rgba(99,102,241,.28);
  margin-bottom: 10px;
  color: rgba(79,70,229,.92);
}
.home-clean.home-landing .use-icon svg{
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.home-clean.home-landing .use-card h3{
  margin: 0 0 8px 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.home-clean.home-landing .use-card p{
  margin: 0 0 12px 0;
  color: rgba(47,54,80,.84);
  line-height: 1.65;
}
.home-clean.home-landing .use-card ul{
  margin: 0;
  padding-left: 18px;
  color: rgba(47,54,80,.80);
  font-size: 14px;
}
.home-clean.home-landing .use-card li{ margin: 6px 0; }
.home-clean.home-landing .badge-card{
  border-color: rgba(226,232,240,.95);
  box-shadow: 0 14px 34px rgba(15,23,42,.06);
  padding: 18px;
}

/* Features: full-width soft background */
.home-clean.home-landing #features.section{
  border-top: 0;
  background: transparent;
  margin-top: 30px;
  padding: 84px 0 70px;
}
.home-clean.home-landing #features.section .feature-card{
  border-color: rgba(226,232,240,.95);
  box-shadow: 0 24px 64px -46px rgba(15,23,42,.22);
}

/* Story: punchier, with contrast */
.home-clean.home-landing .story{
  border-top: 0;
  margin: 0;
  padding: 76px 0;
  background:
    radial-gradient(900px 420px at 10% 30%, rgba(79,70,229,.12), transparent 60%),
    linear-gradient(180deg, #ffffff, #fbfbff);
}
.home-clean.home-landing .story-quote blockquote{
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}
.home-clean.home-landing .story-photo{
  box-shadow: 0 30px 80px -45px rgba(15,23,42,.30);
}

/* Customer story: show real image instead of placeholder gradient */
.home-clean.home-landing .story-photo{
  background: rgba(255,255,255,.75);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-clean.home-landing .story-photo-img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* How / Integrations: tighter and cleaner (no heavy borders) */
.home-clean.home-landing .section{
  /* remove the global ".section" card frame on landing */
  border: 0;
  border-top: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  background: transparent;
}
.home-clean.home-landing #integrations.section{
  background: transparent;
}

/* ROI: darker “expensive” band */
.home-clean.home-landing .roi{
  border-top: 0;
  padding: 82px 0 64px;
  background: #0b0d12;
  color: #e5e7eb;
  /* full-bleed band */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-radius: 0;
}
.home-clean.home-landing .roi-inner{
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 48px;
  padding-right: 48px;
}
.home-clean.home-landing .roi .eyebrow,
.home-clean.home-landing .roi h2{
  color: #ffffff;
}
.home-clean.home-landing .roi .lead{
  color: rgba(226,232,240,.78);
}
.home-clean.home-landing .roi-bullets li{
  border-top-color: rgba(148,163,184,.22);
}
.home-clean.home-landing .roi-bullets span{
  color: rgba(226,232,240,.75);
}
.home-clean.home-landing .roi-stats{
  margin-top: 34px;
}
.home-clean.home-landing .roi-stat{
  border-top-color: rgba(148,163,184,.22);
}
.home-clean.home-landing .roi-number{
  color: #ffffff;
}
.home-clean.home-landing .roi-label{
  color: rgba(226,232,240,.72);
}
.home-clean.home-landing .roi .btn-primary{
  box-shadow: 0 18px 44px rgba(37,99,235,.25);
}

/* Pricing: framed section so it feels intentional */
.home-clean.home-landing #pricing.section{
  border-top: 0;
  padding: 76px 0;
  background: transparent;
}
.home-clean.home-landing #pricing .card{
  border-color: rgba(226,232,240,.95);
  box-shadow: 0 28px 70px -50px rgba(15,23,42,.25);
}

/* CTA band: richer background */
.home-clean.home-landing .cta-band-inner{
  background:
    radial-gradient(900px 320px at 20% 0%, rgba(37,99,235,.10), transparent 60%),
    linear-gradient(135deg, #ffffff, #f8fafc);
  border-color: rgba(226,232,240,.95);
}

/* screen-reader utility */
.home-clean .sr-only{
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Buttons */
.home-clean .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background:#fff;
  color:var(--text);
  font-weight:600;
  cursor:pointer;
  transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease;
}
.home-clean .btn:hover{ border-color:#cbd5e1; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.home-clean .btn:active{ transform: translateY(1px); }
.home-clean .btn-primary{
  background: var(--accent);
  border-color: var(--accent);
  color:#fff;
}
.home-clean .btn-primary:hover{ background: var(--accent2); border-color: var(--accent2); }
.home-clean .btn-ghost{
  background: #fff;
  border-color: transparent;
  color: var(--accent);
}
.home-clean .btn-ghost:hover{ background:#f8fafc; border-color: var(--border); }

/* Shared footer nav (Home + Landing) */
.home-clean .footer-nav{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

/* Landing-only: hide/show mobile CTA */
.home-clean #mobile-cta{ display:none; }
@media (max-width: 980px){
  .home-clean #mobile-cta{ display:inline-flex; }
}

/* Signed-in Home (app) helpers to avoid inline styles */
.home-clean.home-app .home-app-title{ margin: 0 0 6px 0; }
.home-clean.home-app .home-app-subtitle{ margin: 0 0 16px 0; color: #475569; }
.home-clean.home-app .home-app-recap{ display:flex; gap:14px; align-items:flex-start; }
.home-clean.home-app .home-app-recap-icon{
  flex-shrink:0;
  width:42px;
  height:42px;
  border-radius:14px;
  background:#eff6ff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
}
.home-clean.home-app .home-app-recap-body{
  flex:1;
  max-height:320px;
  overflow-y:auto;
  padding-right:4px;
}
.home-clean.home-app .home-app-recap-title{
  font-weight:900;
  font-size:16px;
  margin-bottom:6px;
}
.home-clean.home-app .home-app-recap-meta{
  font-size:13px;
  color:#64748b;
  margin-bottom:10px;
}
.home-clean.home-app .home-app-recap-insights{
  font-size:14px;
  line-height:1.65;
  color:#0f172a;
}
.home-clean.home-app .home-app-shortcuts{ margin-top:16px; }
.home-clean.home-app .home-app-shortcut{ text-align:left; }
.home-clean.home-app .home-app-shortcut-title{ font-weight:900; margin-bottom:6px; }
.home-clean.home-app .home-app-shortcut-link{ margin-top:10px; }

/* Landing helpers (replace inline styles) */
.home-clean .story-cta{ margin-top: 14px; }
.home-clean .roi-cta{ margin-top: 12px; }
.home-clean .price-strike{ text-decoration: line-through; margin-left: 6px; }
.home-clean .price-card .btn{ margin-top: auto; }

/* Cards */
.home-clean .card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

/* Marketing Header */
.home-clean .m-header{
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}
.home-clean .m-header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
}
.home-clean .m-header .brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  letter-spacing:-0.02em;
}
.home-clean .m-header .brand-badge{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #eff6ff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 18px;
}
.home-clean .m-nav{
  display:flex;
  align-items:center;
  gap: 14px;
  color: var(--muted);
  font-weight:600;
}
.home-clean .m-nav a{ color: var(--muted); }
.home-clean .m-nav a:hover{ color: var(--text); }

/* Hero */
.home-clean .hero{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 34px;
  align-items:center;
  padding: 56px 0 26px;
}
.home-clean .hero h1{
  margin:0 0 10px 0;
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.home-clean .hero p{
  margin: 0 0 18px 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 56ch;
}
.home-clean .hero-actions{ display:flex; gap: 10px; flex-wrap:wrap; }
.home-clean .hero-kpis{
  display:flex;
  gap: 14px;
  flex-wrap:wrap;
  margin-top: 18px;
  color: var(--muted2);
  font-weight:600;
  font-size: 13px;
}
.home-clean .kpi{
  display:flex;
  align-items:center;
  gap:8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
}
.home-clean .hero-art{
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #f8fafc;
  box-shadow: var(--shadow);
  overflow:hidden;
}
.home-clean .hero-art img{
  display:block;
  width:100%;
  height:auto;
}

.home-clean .hero-form{
  display:flex;
  gap: 10px;
  align-items:center;
  margin-top: 16px;
  flex-wrap: wrap;
}
.home-clean .hero-form input{
  flex: 1 1 260px;
  min-width: 240px;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  outline: none;
  font-size: 14px;
  background: #fff;
  color: var(--text);
}
.home-clean .hero-form input:focus{
  border-color: #bfdbfe;
  box-shadow: 0 0 0 4px #eff6ff;
}
.home-clean .hero-actions-secondary{ margin-top: 10px; }

/* Trust bar */
.home-clean .trust-bar{
  padding: 18px 0 8px;
  margin-top: 6px;
}
.home-clean .trust-title{
  font-size: 12px;
  color: var(--muted2);
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.home-clean .trust-logos{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}
.home-clean .trust-logos span{
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
}

/* Proof strip (Zendesk-like rhythm) */
.home-clean .proof-strip{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 26px;
  align-items: start;
  padding: 34px 0 18px;
}
.home-clean .proof-badges{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.home-clean .badge-card{
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 14px 14px;
}
.home-clean .badge-top{
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted2);
  font-weight: 900;
  margin-bottom: 6px;
}
.home-clean .badge-title{
  font-weight: 950;
  font-size: 16px;
  margin-bottom: 4px;
}
.home-clean .badge-sub{
  color: var(--muted);
  font-size: 13px;
}

/* Sections */
.home-clean .section{ padding: 56px 0; border-top: 1px solid var(--border); }
.home-clean .section-head{ max-width: 780px; margin-bottom: 18px; }
.home-clean .eyebrow{
  color: var(--muted2);
  font-weight:800;
  letter-spacing:.12em;
  font-size: 12px;
  text-transform:uppercase;
  margin-bottom: 10px;
}
.home-clean .section h2{
  margin: 0 0 8px 0;
  font-size: 28px;
  letter-spacing: -0.02em;
}
.home-clean .section .lead{ margin:0; color: var(--muted); }

.home-clean .grid-3{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.home-clean .grid-4{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.home-clean .feat-title{ margin:0 0 6px 0; font-size: 16px; }
.home-clean .feat-copy{ margin:0 0 10px 0; color: var(--muted); font-size: 14px; }
.home-clean .ticks{ margin:0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.home-clean .ticks li{ margin: 6px 0; }

/* Feature layout (less card-heavy) */
.home-clean .feature-layout{
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 28px;
  align-items: start;
}
.home-clean .feature-paragraph{
  margin: 0 0 12px 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  max-width: 70ch;
}
.home-clean .feature-card .feat-title{ margin:0 0 6px 0; }
.home-clean .checklist{
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
  display: grid;
  gap: 10px;
}
.home-clean .checklist li{
  position: relative;
  padding-left: 22px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}
.home-clean .checklist li::before{
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #16a34a;
  font-weight: 900;
}

/* Steps (replaces 3 extra cards) */
.home-clean .steps{
  margin: 18px 0 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  max-width: 860px;
}

/* How-it-works: steps + workflow image */
.home-clean.home-landing .how-layout{
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 22px;
  align-items: center;
}
.home-clean.home-landing .how-visual{
  border-radius: 22px;
  border: 1px solid rgba(226,232,240,.95);
  background: rgba(255,255,255,.72);
  box-shadow: 0 22px 60px -52px rgba(11,16,32,.22);
  overflow: hidden;
}
.home-clean.home-landing .how-visual-img{
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
@media (max-width: 980px){
  .home-clean.home-landing .how-layout{ grid-template-columns: 1fr; }
}
.home-clean .steps li{
  position: relative;
  padding: 10px 0 10px 44px;
  border-top: 1px solid var(--border);
}
.home-clean .steps li:first-child{ border-top: 0; }
.home-clean .steps li::before{
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 10px;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #eff6ff;
  color: var(--accent);
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
}
.home-clean .step-title{
  font-weight: 900;
  margin-bottom: 4px;
}
.home-clean .step-copy{
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

/* Integrations (text-first, no cards) */
.home-clean .integrations-list{
  list-style: none;
  padding: 0;
  margin: 14px 0 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 22px;
  max-width: 920px;
}
.home-clean .integrations-list li{
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.home-clean .integrations-list li:nth-child(-n + 2){ border-top: 0; }
.home-clean .integration-name{
  font-weight: 900;
  margin-bottom: 4px;
}
.home-clean .integration-copy{
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Story / quote */
.home-clean .story{
  display:grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 26px;
  align-items: center;
  padding: 46px 0;
  border-top: 1px solid var(--border);
}
.home-clean .story-photo{
  width: 100%;
  height: 340px;
  border-radius: 22px;
  background:
    radial-gradient(700px 260px at 20% 20%, rgba(37,99,235,.18), transparent 60%),
    linear-gradient(135deg, #f8fafc, #eef2ff);
  border: 1px solid #e2e8f0;
}
.home-clean .story-quote blockquote{
  margin: 10px 0 12px 0;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 900;
}
.home-clean .story-byline{
  display:flex;
  flex-direction: column;
  gap: 2px;
  color: var(--muted);
  font-size: 14px;
}
.home-clean .story-byline strong{ color: var(--text); }

/* ROI */
.home-clean .roi{
  padding: 56px 0;
  border-top: 1px solid var(--border);
}
.home-clean .roi-top{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 26px;
  align-items: start;
}
.home-clean .roi-bullets{
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
  display:grid;
  gap: 14px;
}
.home-clean .roi-bullets li{
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.home-clean .roi-bullets li:first-child{ border-top: 0; padding-top: 0; }
.home-clean .roi-bullets strong{ display:block; font-weight: 950; margin-bottom: 4px; }
.home-clean .roi-bullets span{ color: var(--muted); font-size: 14px; line-height: 1.65; display:block; }
.home-clean .roi-stats{
  margin-top: 28px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.home-clean .roi-stat{
  border-top: 1px solid var(--border);
  padding-top: 18px;
  text-align: center;
}
.home-clean .roi-number{
  font-size: 56px;
  font-weight: 950;
  letter-spacing: -0.06em;
}
.home-clean .roi-label{
  color: var(--muted);
  font-weight: 800;
  margin-top: 6px;
}

/* CTA band */
.home-clean .cta-band{
  padding: 30px 0 64px;
}
.home-clean .cta-band-inner{
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: 26px;
  padding: 26px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow);
}
.home-clean .cta-copy h3{
  margin: 0 0 6px 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.home-clean .cta-copy p{
  margin: 0;
  color: var(--muted);
}
.home-clean .cta-actions{ display:flex; gap: 10px; flex-wrap: wrap; }

/* Pricing */
.home-clean .billing-toggle{
  display:flex;
  justify-content:center;
  margin: 18px 0 22px;
}
.home-clean .billing-group{
  display:inline-flex;
  border:1px solid var(--border);
  background:#fff;
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}
.home-clean .billing-btn{
  border: none;
  background: transparent;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  color: var(--muted);
  cursor:pointer;
}
.home-clean .billing-btn.is-active{
  background: #eff6ff;
  color: var(--accent);
}
.home-clean .pill{
  margin-left: 8px;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-weight: 900;
}

.home-clean .pricing-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 10px;
}
.home-clean .price-card{
  display:flex;
  flex-direction:column;
  min-height: 440px;
}
.home-clean .price-card.is-featured{
  border-color: #bfdbfe;
  box-shadow: var(--shadow);
}
.home-clean .price-top{ display:flex; align-items:flex-start; justify-content:space-between; gap: 12px; }
.home-clean .price-top h3{ margin:0; font-size: 18px; }
.home-clean .price{
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.home-clean .price small{ font-size: 14px; color: var(--muted2); font-weight: 800; }
.home-clean .price-features{ margin: 14px 0 0 0; padding-left: 18px; color: var(--muted); }
.home-clean .price-features li{ margin: 8px 0; }
.home-clean .fineprint{ color: var(--muted2); font-size: 12px; margin-top: 10px; }

/* Footer */
.home-clean .m-footer{
  border-top:1px solid var(--border);
  margin-top: 40px;
  padding: 22px 0 30px;
  color: var(--muted2);
}
.home-clean .m-footer-inner{
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
  align-items:center;
  justify-content:space-between;
}
.home-clean .m-footer a{ color: var(--muted2); font-weight:700; }
.home-clean .m-footer a:hover{ color: var(--text); }

/* Responsive */
@media (max-width: 980px){
  .home-clean .hero{ grid-template-columns: 1fr; padding: 38px 0 18px; }
  .home-clean .hero h1{ font-size: 36px; }
  .home-clean .feature-layout{ grid-template-columns: 1fr; }
  .home-clean .grid-3{ grid-template-columns: 1fr; }
  .home-clean .grid-4{ grid-template-columns: 1fr 1fr; }
  .home-clean .pricing-grid{ grid-template-columns: 1fr; }
  .home-clean .m-nav{ display:none; }
  .home-clean .integrations-list{ grid-template-columns: 1fr; }
  .home-clean .proof-strip{ grid-template-columns: 1fr; padding-top: 22px; }
  .home-clean .story{ grid-template-columns: 1fr; padding: 34px 0; }
  .home-clean .story-photo{ height: 240px; }
  .home-clean .roi-top{ grid-template-columns: 1fr; }
  .home-clean .roi-stats{ grid-template-columns: 1fr; }
  .home-clean .cta-band-inner{ flex-direction: column; align-items: flex-start; }
  .home-clean.home-landing .wrap{ padding-left: 24px; padding-right: 24px; }
  .home-clean.home-landing .use-grid{ grid-template-columns: 1fr; }
  .home-clean.home-landing .roi-inner{ padding-left: 24px; padding-right: 24px; }
  .home-clean.home-landing main.wrap > section.ai-globe{ margin-top: 70px; }
}

/* --- Landing (Marketing) Hero ------------------------------------------------ */
.landing-body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(59,130,246,.08), transparent 60%),
    radial-gradient(900px 600px at 110% 110%, rgba(99,102,241,.06), transparent 60%),
    #ffffff;
  color: #0f172a;
  min-height: 100vh;
  display: block; /* stack sections vertically */
  overflow-y: auto; /* allow page scroll on landing */
  padding: 0 24px;
  overflow-x: hidden; /* keep horizontal overflow clipped only */
}

.landing-hero {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  margin: 56px auto 72px auto; /* extra space below hero */
}

.landing-title {
  margin: 0 0 16px 0;
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: .95;
  font-size: clamp(36px, 7vw, 80px);
}

.landing-line {
  display: block;
  color: #0f172a;
}

.landing-title .landing-line {
  opacity: 0;
  transform: translateY(12px);
  animation: heroRise 700ms ease-out forwards;
}
.landing-title .landing-line:nth-child(1) { animation-delay: 60ms; }
.landing-title .landing-line:nth-child(2) { animation-delay: 180ms; }
.landing-title .landing-line:nth-child(3) { animation-delay: 300ms; }
@keyframes heroRise {
  to { opacity: 1; transform: translateY(0); }
}

.landing-accent {
  background: linear-gradient(90deg, #7c3aed, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 8px 28px rgba(124, 58, 237, .25));
}

.landing-dots {
  color: #475569;
  position: relative;
}
.landing-dots::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(currentColor 1.2px, transparent 1.2px);
  background-size: 6px 6px;
  -webkit-mask-image: linear-gradient(#000, #000);
  mask-image: linear-gradient(#000, #000);
  opacity: .35;
  mix-blend-mode: plus-lighter;
  pointer-events: none;
}

.landing-subtitle {
  color: #475569;
  font-size: clamp(16px, 2.2vw, 18px);
  max-width: 56ch;
  line-height: 1.7;
  margin: 18px 0 24px 0;
}

.landing-actions .btn-ghost {
  border-color: var(--neutral-300);
  color: #0f172a;
  background: transparent;
}
.landing-actions .btn-ghost:hover {
  background: var(--neutral-100);
  border-color: var(--neutral-400);
  color: #0f172a;
}

.landing-art { width: 100%; }
.landing-visual {
  position: relative;
  height: clamp(240px, 42vw, 420px);
  background: #ffffff; /* thinner, neutral frame so blue doesn’t show */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.landing-visual::before {
  content: '';
  position: absolute;
  inset: -20% -40% auto -40%;
  height: 180px;
  background: radial-gradient(closest-side, rgba(99,102,241,.35), transparent 65%);
  filter: blur(40px);
  opacity: .6;
}
.landing-visual img {
  width:100%;
  height: 100%;
  object-fit: contain; /* keep full image visible inside the frame */
  display: block;
}
.landing-logo {
  width: clamp(72px, 12vw, 120px);
  height: auto;
  filter: drop-shadow(0 10px 28px rgba(59,130,246,.45));
  opacity: .95;
}
@keyframes floaty {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

@media (max-width: 900px) {
  .landing-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 0;
  }
  .landing-art { order: -1; }
}
/* Unified Button System - minimal and consistent */
/* Base shape applied to all common button classes (anchors or buttons) */
.btn, .btn-primary, .btn-ghost, .btn-danger, .pagination a.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-lg);
  padding: var(--space-2) var(--space-4);
  font-weight: 600;
  font-size: var(--font-size-xs);
  line-height: 1.2;
  border: 1px solid transparent;
  transition: background-color var(--transition-normal), border-color var(--transition-normal), color var(--transition-normal), transform 120ms ease;
  text-decoration: none;
  box-shadow: none;
}

.btn:hover, .btn-primary:hover, .btn-ghost:hover, .btn-danger:hover, .pagination a.btn-ghost:hover {
  transform: translateY(-1px);
}

.btn:active, .btn-primary:active, .btn-ghost:active, .btn-danger:active, .pagination a.btn-ghost:active {
  transform: translateY(0);
}
.plan-card-shell { padding: 16px; }
.plan-stats-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.plan-stat { text-align:center; background: var(--surface); }
.plan-stat-label { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.plan-stat-value { font-size: 18px; font-weight: 700; color: var(--neutral-900); }
.plan-progress { width: 100%; height: 8px; background: var(--neutral-200); border-radius: 6px; margin-top: 8px; overflow: hidden; }
.plan-progress-bar { height: 100%; background: var(--success-500); }
.plan-progress-bar.success { background: var(--success-500); }
.plan-progress-bar.warning { background: var(--warning-500); }
.plan-progress-bar.danger { background: var(--error-500); }

.plan-breakdown-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.plan-breakdown { text-align:center; background: var(--neutral-50); }
.plan-breakdown-label { font-size: 12px; color: var(--muted); }
.plan-breakdown-value { font-size: 22px; font-weight: 800; color: var(--neutral-900); }
.plan-breakdown-desc { font-size: 12px; color: var(--muted); }

.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table thead th { text-align:left; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); padding: 10px 8px; background: var(--neutral-50); }
.table tbody td { padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--neutral-900); }
.table tbody tr:hover { background: var(--neutral-50); }
.table-empty { padding: 16px; text-align: center; color: var(--muted); }

.plans-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.plan-option { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; transition: box-shadow .2s, transform .2s, border-color .2s; }
.plan-option:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--neutral-300); }
.plan-option.current { border: 2px solid var(--primary-500); background: var(--primary-50); }
.plan-option-head { display:flex; align-items:center; justify-content: space-between; margin-bottom: 8px; }
.badge-current { background: var(--primary-600); color:#fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.plan-price { font-size: 24px; font-weight: 800; color: var(--neutral-900); }
.plan-price-period { font-size: 12px; color: var(--muted); margin-left: 4px; font-weight: 500; }
.plan-features { list-style:none; padding:0; margin: 12px 0; }
.plan-features li { padding: 4px 0; color: var(--neutral-800); font-size: 14px; }
.cta-row { margin-top: 8px; }

/* Alerts */
.alert-warning { background: var(--warning-50); border: 1px solid #fde68a; color: var(--warning-600); padding: 10px 12px; border-radius: 10px; }

/* Accessible focus ring */
.btn:focus-visible,
.btn-primary:focus-visible,
.btn-ghost:focus-visible,
.toast-action:focus-visible,
.pagination a.btn-ghost:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--primary-100), var(--shadow-md);
}

/* Disabled state */
.btn:disabled,
.btn-primary:disabled,
.btn-ghost:disabled,
.pagination a.btn-ghost:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Variants (grouped, minimal) */
.btn-primary {
  background: var(--primary-600);
  color: #fff;
  border-color: var(--primary-600);
}
.btn-primary:hover { background: var(--primary-700); }

.btn-ghost, .pagination a.btn-ghost {
  background: transparent;
  color: var(--neutral-700);
  border-color: var(--neutral-300);
  text-decoration: none;
}
.btn-ghost:hover, .pagination a.btn-ghost:hover {
  background: var(--neutral-100);
  color: var(--neutral-900);
  border-color: var(--neutral-400);
}

.btn-danger {
  background: var(--error-600);
  color: #fff;
  border-color: var(--error-600);
}
.btn-danger:hover { background: var(--error-700); }

/* Size utilities if needed */
.btn-sm,
.pagination a.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-xs);
}
.btn-lg {
  padding: var(--space-4) var(--space-6);
  font-size: var(--font-size-base);
}

/* Destructive variant */
.btn-danger {
  background: var(--error-600);
  color: #fff;
  border-color: var(--error-600);
}
.btn-danger:hover {
  background: var(--error-700);
}

/* --- Landing Features Section ------------------------------------------------ */
.landing-section {
  padding: 72px 0 96px 0;
  width: 100%;
  display: grid;
  place-items: center;
  margin: 56px 0; /* extra outer spacing between sections */
}
.features-header { text-align: center; margin-bottom: 28px; }
.features-title {
  margin: 0 0 8px 0;
  font-weight: 600;
  letter-spacing: -.01em;
  color: #0f172a;
  font-size: 40px;
}
.features-subtitle {
  margin: 0;
  color: #94a3b8;
  font-size: 15px;
}
.features-grid {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.feature-card { padding: 20px; }
.feature-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(99,102,241,.18);
  border: 1px solid rgba(99,102,241,.22);
  margin-bottom: 10px;
  font-size: 20px;
}
.feature-title {
  margin: 0 0 6px 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
}
.feature-text {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
}
@media (max-width: 900px) {
  .features-grid { grid-template-columns: 1fr; }
}

/* --- Feature Showcase (with image placeholders) ------------------------------ */
.feature-showcase {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.showcase-card { gap: 24px; padding: 22px; }
.showcase-copy h3 { margin: 0 0 8px 0; font-size: 22px; color:#0f172a; }
.showcase-copy p { margin: 0 0 10px 0; color:#475569; line-height:1.7; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ticks li { position: relative; padding-left: 22px; color:#0f172a; font-size:14px; }
.ticks li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 0; color: #16a34a; font-weight: 800;
}
.showcase-media { width: 100%; display: flex; align-items: center; justify-content: center; }
.img-ph {
  width: 100%; height: 240px; border-radius: 16px;
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
  border: 2px dashed #c7d2fe;
  position: relative; overflow: hidden;
}
.img-ph::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,.08), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.8s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
@media (max-width: 900px) {
  .showcase-card { grid-template-columns: 1fr; }
}

/* Clamp utilities for cleaner, shorter copy */
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* --- Pricing --------------------------------------------------------------- */
.pricing-section {
  padding: 24px 0 72px 0;
  width: 100%;
  display: grid;
  place-items: center;
  margin: 56px 0; /* outer spacing before and after pricing */
}
.pricing-grid {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}
.price-card { padding: 20px; display: flex; flex-direction: column; }
.price-card.highlighted {
  border-color: #6366f1;
  background: #eef2ff !important; /* indigo-100 */
  box-shadow: 0 22px 44px -18px rgba(99,102,241,.28);
  animation: none !important;
}
.price-card-head { display:flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.price-card-head h3 { margin: 0; font-size: 18px; color:#0f172a; }
.price { font-size: 28px; font-weight: 800; color:#0f172a; }
.price span { font-size: 12px; color:#64748b; margin-left: 4px; font-weight: 500; }
.price-features { list-style:none; padding:0; margin:12px 0 16px 0; display:grid; gap:6px; }
.price-features li { padding-left: 18px; position: relative; color:#0f172a; font-size:14px; }
.price-features li::before { content: '•'; position:absolute; left:0; color:#6366f1; }
/* price-cta removed; use .btn .btn-primary */
@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* --- How it works ---------------------------------------------------------- */
.how-section {
  width: 100%;
  max-width: 1120px;
  margin: 72px auto 104px auto; /* increased spacing around how section */
  padding: 0 0;
}
.how-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
}
.how-steps { width: 100%; }
.how-title { margin: 0 0 6px 0; font-size: 32px; color:#0f172a; letter-spacing: -.01em; }
.how-subtitle { margin: 0 0 18px 0; color:#64748b; }
.how-step { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; margin: 12px 0; }
.how-icon { width: 36px; height: 36px; border-radius: 10px; display:flex; align-items:center; justify-content:center; background:#eef2ff; color:#1e40af; font-size:18px; }
.how-copy h3 { margin: 0 0 4px 0; font-size:16px; color:#0f172a; }
.how-copy p { margin: 0; color:#475569; font-size:14px; }
.how-ctas { margin-top: 18px; }
.how-media { position: relative; }
.card-ph.calendar {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 18px 42px -20px rgba(2,6,23,.16);
  overflow: hidden;
}
.calendar-head { padding: 14px; border-bottom: 1px solid #e2e8f0; }
.cal-title { font-weight: 700; color:#0f172a; }
.meta { font-size:12px; color:#64748b; }
.calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; padding: 14px;
}
.calendar-grid .dot {
  width: 100%; aspect-ratio: 1/1; border-radius: 10px; background: #f1f5f9; border: 1px dashed #d1d5db;
}
.photo-ph {
  position: absolute; right: -12px; bottom: -12px;
  width: clamp(180px, 36vw, 320px); height: clamp(140px, 24vw, 220px);
  background: linear-gradient(135deg, #fde68a, #fca5a5);
  border-radius: 16px;
  box-shadow: 0 16px 34px -16px rgba(2,6,23,.18);
  border: 6px solid #fff;
}
@media (max-width: 900px) {
  .how-grid { grid-template-columns: 1fr; }
  .photo-ph { position: static; width: 100%; height: 160px; margin-top: 10px; }
}

/* --- Integrations ----------------------------------------------------------- */
.integrations-section {
  padding: 24px 0 64px 0;
  width: 100%;
  display: grid;
  place-items: center;
  margin: 56px 0; /* extra spacing around integrations */
}
.integrations-grid {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}
.integration-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.integration-card:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -18px rgba(2,6,23,.16); }
.integration-logo {
  width: 56px; height: 56px; border-radius: 12px; display:flex; align-items:center; justify-content:center;
  background: #f1f5f9; border: 1px solid #e2e8f0;
}
.integration-logo.stripe { background: #eef2ff; border-color: #c7d2fe; }
.integration-logo.google { background: #eaf1ff; border-color: #bfdbfe; }
.integration-copy h3 { margin: 0 0 4px 0; font-size: 16px; color:#0f172a; }
.integration-copy p { margin: 0; color:#475569; font-size: 14px; }
@media (max-width: 900px) {
  .integrations-grid { grid-template-columns: 1fr; }
}

/* --- Split Sections with Parallax ------------------------------------------ */
.split-section {
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: end;
}
.split-section.reverse { grid-template-columns: 1fr 1.1fr; }
.split-section.reverse .split-copy { order: 2; }
.split-section.reverse .split-media { order: 1; }
.eyebrow {
  display: inline-block;
  color: #2563eb;
  letter-spacing: .2em;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 10px;
  position: relative;
}
.eyebrow::before {
  content: '';
  position: absolute;
  left: -18px; top: 50%;
  width: 8px; height: 2px;
  background: #60a5fa;
  transform: translateY(-50%);
  box-shadow: 0 0 18px rgba(96,165,250,.8);
}
.giant-heading { margin: 0 0 12px 0; }
.split-text {
  color: #475569;
  font-size: 15px;
  line-height: 1.8;
  max-width: 60ch;
}
.split-media { width: 100%; }
.parallax-card {
  position: relative;
  height: clamp(220px, 42vw, 420px);
  border-radius: 28px;
  border: 1px solid rgba(148,163,184,.18);
  background: radial-gradient(120% 80% at 30% 20%, rgba(59,130,246,.25), transparent 60%), linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
  box-shadow: 0 30px 70px -35px rgba(17,24,39,.6), inset 0 1px 0 rgba(255,255,255,.04);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  will-change: transform;
}
.parallax-card.glow::after {
  content: '';
  position: absolute; inset: -30% -30% auto auto;
  height: 160px;
  background: radial-gradient(closest-side, rgba(99,102,241,.35), transparent 60%);
  filter: blur(30px);
  opacity: .6;
}
.split-image { width: 100%; border-radius: 16px; height: auto; opacity: .95; filter: drop-shadow(0 10px 28px rgba(59,130,246,.45)); }


.wa-payment-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.wa-payment-btn svg {
  width: 22px;
  height: 22px;
}

.wa-payment-btn:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f172a;
}

.wa-payment-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.payment-requests-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.payment-request-row {
  padding: 6px 0;
  border-top: 1px solid #e2e8f0;
}

.payment-request-row:first-child {
  border-top: none;
}

.payment-request-meta {
  color: #64748b;
  font-size: 12px;
  margin-top: 2px;
}

/* --- Industries (business types) ------------------------------------------- */
.industries-section {
  padding: 12px 0 12px 0;
  width: 100%;
  display: grid;
  place-items: center;
}
.industries-header { text-align: center; margin-bottom: 18px; }
.industries-grid {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
}
.industry-card { padding: 16px; display: flex; flex-direction: column; }
.industry-accent {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #6366f1, #60a5fa);
  border-radius: 999px;
  margin-bottom: 10px;
}
.industry-title { margin: 0 0 6px 0; font-size: 18px; color:#0f172a; }
.industry-copy { margin: 0 0 10px 0; color:#475569; font-size: 14px; }
.learn-more { color:#4f46e5; font-weight:600; text-decoration:none; font-size: 13px; }
.learn-more:hover { text-decoration: underline; }
.logo-row { margin-top: auto; display: flex; gap: 12px; align-items: center; color:#64748b; font-size: 12px; }
@media (max-width: 900px) {
  .industries-grid { grid-template-columns: 1fr; }
}

/* ===== SHOPIFY INTEGRATION STYLES ===== */

/* Shopify Brand Colors */
:root {
  --shopify-green: #96BF48;
  --shopify-dark-green: #7AB55C;
  --shopify-light-green: #B8D685;
}

/* Shopify Connection Status */
.shopify-status-connected {
  background: linear-gradient(135deg, var(--shopify-green), var(--shopify-dark-green));
  color: white;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
}

.shopify-status-disconnected {
  background: var(--neutral-100);
  border: 2px dashed var(--neutral-300);
  color: var(--neutral-600);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
  text-align: center;
}

/* Shopify Product Cards */
.shopify-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.shopify-product-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.shopify-product-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.shopify-product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--neutral-100);
}

.shopify-product-info {
  padding: var(--space-4);
}

.shopify-product-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--neutral-900);
  margin: 0 0 var(--space-2) 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shopify-product-price {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--shopify-green);
  margin: 0 0 var(--space-2) 0;
}

.shopify-product-description {
  color: var(--neutral-600);
  font-size: var(--font-size-sm);
  margin: 0 0 var(--space-3) 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shopify-product-actions {
  display: flex;
  gap: var(--space-2);
}

/* Shopify Order Cards */
.shopify-orders-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.shopify-order-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.shopify-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
}

.shopify-order-number {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--neutral-900);
}

.shopify-order-status {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-transform: uppercase;
}

.shopify-order-status.paid { background: var(--success-50); color: var(--success-600); }
.shopify-order-status.pending { background: var(--warning-50); color: var(--warning-600); }
.shopify-order-status.cancelled { background: var(--error-50); color: var(--error-600); }

.shopify-order-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}

.shopify-order-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.shopify-order-info-label {
  font-size: var(--font-size-xs);
  color: var(--neutral-500);
  text-transform: uppercase;
  font-weight: 500;
}

.shopify-order-info-value {
  font-size: var(--font-size-sm);
  color: var(--neutral-900);
  font-weight: 500;
}

/* Shopify Settings */
.shopify-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.shopify-setting-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.shopify-setting-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--neutral-900);
  margin: 0 0 var(--space-2) 0;
}

.shopify-setting-description {
  color: var(--neutral-600);
  font-size: var(--font-size-sm);
  margin: 0 0 var(--space-4) 0;
}

/* Shopify Commerce Features */
.shopify-commerce-features {
  background: linear-gradient(135deg, var(--shopify-green), var(--shopify-dark-green));
  color: white;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  margin: var(--space-6) 0;
}

.shopify-commerce-features h3 {
  color: white;
  margin: 0 0 var(--space-4) 0;
  font-size: var(--font-size-xl);
}

.shopify-commerce-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-3);
}

.shopify-commerce-features li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
}

.shopify-commerce-features li::before {
  content: "✓";
  background: white;
  color: var(--shopify-green);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

/* Responsive Design for Shopify Components */
@media (max-width: 768px) {
  .shopify-products-grid {
    grid-template-columns: 1fr;
  }

  .shopify-order-details {
    grid-template-columns: 1fr;
  }

  .shopify-settings-grid {
    grid-template-columns: 1fr;
  }

  .shopify-commerce-features ul {
    grid-template-columns: 1fr;
  }
}