/* ── WhatsBot: ShapeHouse Brand —─────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Noise texture overlay ────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ── Base ─────────────────────────────────────────── */
body {
  background-color: #F5F3EE !important;
  color: #1A1A1A;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ───────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.text-2xl, .text-3xl, .text-lg.font-semibold,
.text-xl, .font-bold {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  line-height: 0.95 !important;
}

.text-sm, .text-xs, .text-base,
p, span, label, input, select, textarea, button {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── ShapeHouse Brand Colors ────────────────────────── */
:root {
  --sh-green: #2D5C48;
  --sh-green-dark: #1E3D2F;
  --sh-green-light: #3A7A5E;
  --sh-gold: #C49B3E;
  --sh-bg: #F5F3EE;
  --sh-surface: #FFFFFF;
  --sh-text: #1A1A1A;
  --sh-text-secondary: #6B7280;
  --sh-border: #E5E0D5;
  --sh-danger: #C72A09;
}

.bg-wa-teal, .bg-wa-accent, [class*="bg-wa-teal"], [class*="bg-wa-accent"] {
  background-color: var(--sh-green) !important;
}
.bg-wa-accentDark, .hover\:bg-wa-accentDark:hover {
  background-color: var(--sh-green-dark) !important;
}
.text-wa-teal, .text-wa-accent, [class*="text-wa-teal"], [class*="text-wa-accent"] {
  color: var(--sh-green) !important;
}
.hover\:bg-wa-teal:hover, .hover\:text-wa-teal:hover {
  background-color: var(--sh-green) !important;
  color: white !important;
}

.border-wa-teal, [class*="border-wa-teal"] {
  border-color: var(--sh-green) !important;
}

/* Focus ring with brand green */
button:hover, 
input:focus, select:focus, textarea:focus,
[class*="hover:bg-wa-hover"]:hover {
  outline: none;
  box-shadow: 0 0 0 2px var(--sh-green-light) !important;
  transition: box-shadow 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* ── Icons ────────────────────────────────────────── */
.text-wa-iconActive, [class*="text-wa-iconActive"] {
  color: var(--sh-green) !important;
}
.text-wa-icon {
  color: #9CA3AF !important;
}

/* ── Cards & Panels ──────────────────────────────── */
.rounded-2xl, .rounded-3xl, .rounded-\[24px\], .rounded-\[28px\] {
  border-radius: 12px !important;
}

.bg-white, [class*="bg-white"], [class*="bg-wa-panel"] {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(8px);
  border: 1px solid var(--sh-border);
}

.bg-wa-bg {
  background-color: var(--sh-bg) !important;
}

.bg-wa-hover {
  background-color: rgba(45, 92, 72, 0.06) !important;
}

.bg-wa-inputBg {
  background-color: #FFFFFF !important;
  border-color: var(--sh-border) !important;
}

.text-wa-text {
  color: var(--sh-text) !important;
}

.text-wa-secondary {
  color: var(--sh-text-secondary) !important;
}

.border-wa-border {
  border-color: var(--sh-border) !important;
}

/* WhatsApp outgoing bubble — brand green tint */
.bg-wa-outgoing {
  background-color: #E8F5E9 !important;
}

/* WhatsApp incoming bubble */
.bg-wa-incoming {
  background-color: #FFFFFF !important;
}

/* ── Smooth transitions ──────────────────────────── */
.status-dot { transition: background-color 0.3s ease; }
.qr-image { image-rendering: pixelated; }

@keyframes pulse-slow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.animate-pulse-slow {
  animation: pulse-slow 2s ease-in-out infinite;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
  animation: fade-in 0.3s ease-out;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── Image hover effect ──────────────────────────── */
img {
  transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}
img:hover {
  transform: scale(1.05);
}

/* ── WhatsApp replica ────────────────────────────── */
.msg-tail-in { position: relative; }
.msg-tail-in::before {
  content: '';
  position: absolute;
  top: 0; left: -8px;
  width: 0; height: 0;
  border-top: 8px solid #ffffff;
  border-left: 8px solid transparent;
}
.msg-tail-out { position: relative; }
.msg-tail-out::before {
  content: '';
  position: absolute;
  top: 0; right: -8px;
  width: 0; height: 0;
  border-top: 8px solid #E8F5E9;
  border-right: 8px solid transparent;
}

/* Thin scrollbar */
.wa-scrollbar::-webkit-scrollbar { width: 6px; }
.wa-scrollbar::-webkit-scrollbar-track { background: transparent; }
.wa-scrollbar::-webkit-scrollbar-thumb {
  background: var(--sh-border);
  border-radius: 3px;
}
.wa-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--sh-text-secondary);
}

.wa-contact-row { transition: all 0.15s ease; }
.wa-contact-row:hover { background-color: rgba(45, 92, 72, 0.04); }

.wa-chat-pattern {
  background-color: #F0EDE6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300' viewBox='0 0 300 300'%3E%3Cg fill='%23c8c3ba' fill-opacity='0.2'%3E%3Cpath d='M20 15a5 5 0 110 10 5 5 0 010-10zm0 2a3 3 0 100 6 3 3 0 000-6z'/%3E%3Cpath d='M80 45l-4 8h8l-4-8zm0 2l2.5 5h-5l2.5-5z'/%3E%3Crect x='140' y='15' width='8' height='10' rx='1' fill='none' stroke='%23c8c3ba' stroke-opacity='0.2'/%3E%3Ccircle cx='200' cy='20' r='4' fill='none' stroke='%23c8c3ba' stroke-opacity='0.2'/%3E%3Cpath d='M258 15l6 5-6 5V15zm1 1.8v6.4l4.3-3.2-4.3-3.2z'/%3E%3Cpath d='M20 75a6 6 0 014 2l-1 1a4.8 4.8 0 00-7 0l-1-1a6 6 0 014-2z'/%3E%3Cpath d='M78 80h4v1h-4v3h-1v-3h-4v-1h4v-4h1v4z'/%3E%3Cpath d='M135 75h10v1h-10v-1zm0 4h7v1h-7v-1z'/%3E%3Ccircle cx='200' cy='80' r='5' fill='none' stroke='%23c8c3ba' stroke-opacity='0.2'/%3E%3Cpath d='M195 78l3 2 3-2v5l-3 2-3-2v-5z' fill='none' stroke='%23c8c3ba' stroke-opacity='0.15'/%3E%3Cpath d='M260 75c2 0 4 2 4 4s-2 4-4 4-4-2-4-4 2-4 4-4zm0 1.5c-1.4 0-2.5 1.1-2.5 2.5s1.1 2.5 2.5 2.5 2.5-1.1 2.5-2.5-1.1-2.5-2.5-2.5z'/%3E%3Cpath d='M17 135h6l-3 6-3-6zm3 1.5l-1.8 3.5h3.6l-1.8-3.5z'/%3E%3Cpath d='M80 135a4 4 0 110 8 4 4 0 010-8zm0 1.5a2.5 2.5 0 100 5 2.5 2.5 0 000-5z'/%3E%3Cpath d='M140 138h3v-3h1v3h3v1h-3v3h-1v-3h-3v-1z'/%3E%3Cpath d='M195 135h10v8h-10v-8zm1 1v6h8v-6h-8z'/%3E%3Ccircle cx='260' cy='140' r='3'/%3E%3Cpath d='M20 200l4-3v6l-4-3zm1 0l2 1.5v-3l-2 1.5z'/%3E%3Cpath d='M75 195h10v1h-10v-1zm2 3h6v1h-6v-1z'/%3E%3Cpath d='M140 197a3 3 0 110 6 3 3 0 010-6z'/%3E%3Cpath d='M197 195l3 5 3-5h-6zm3 1.5l1.8 3h-3.6l1.8-3z'/%3E%3Cpath d='M258 197c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3z' fill='none' stroke='%23c8c3ba' stroke-opacity='0.2'/%3E%3Cpath d='M18 260h4v4h-4v-4zm.8.8v2.4h2.4v-2.4h-2.4z'/%3E%3Ccircle cx='80' cy='262' r='3.5' fill='none' stroke='%23c8c3ba' stroke-opacity='0.2'/%3E%3Cpath d='M138 258l4 4 4-4' fill='none' stroke='%23c8c3ba' stroke-opacity='0.2' stroke-width='1.2'/%3E%3Cpath d='M198 260a2 2 0 012 2c0 1.1-....
}

.wa-bubble {
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
  overflow-wrap: break-word;
  word-break: break-word;
}
.wa-empty-bg {
  background-color: #F0EDE6;
  border-left: 1px solid var(--sh-border);
}

@keyframes slide-in-right {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.animate-slide-in-right {
  animation: slide-in-right 0.25s ease-out;
}

/* ── Loading Skeleton ────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #E8E5DE 25%, #DDD9D0 50%, #E8E5DE 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
}

/* ── Monospace for data ──────────────────────────── */
code, pre, .font-mono, [class*="text-mono"],
[class*="phone"], [class*="timestamp"] {
  font-family: 'JetBrains Mono', 'Courier New', monospace !important;
  font-size: 0.9em;
}

/* ── Kanban Stage Colors ──────────────────────────── */
.kanban-stage-green {
  background-color: #2D5C48 !important;
  color: white !important;
}
.kanban-stage-gold {
  background-color: #C49B3E !important;
  color: white !important;
}
.kanban-stage-red {
  background-color: #C72A09 !important;
  color: white !important;
}
