@import "tailwindcss";

/* ════════════════════════════════════════════════════════════
   CLINERA — DESIGN SYSTEM
   Single source of truth for every token, component, animation
   ════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─────────────────────────────────────── */
:root {
  /* Palette */
  --primary-50:  #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c7d2fe;
  --primary-300: #a5b4fc;
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary-700: #4338ca;
  --primary-800: #3730a3;

  --accent-400: #c084fc;
  --accent-500: #a855f7;
  --accent-600: #9333ea;

  --warm-400: #fb923c;

  /* Semantic */
  --color-dark:       #0f172a;
  --color-muted:      #94a3b8;
  --color-bg:         #f8fafc;
  --color-surface:    #ffffff;
  --color-border:     #e2e8f0;

  /* Sidebar */
  --sidebar-bg:       #0d0d1f;
  --sidebar-border:   rgba(255,255,255,0.06);

  /* Card */
  --card-radius:      1rem;
  --card-shadow:      0 1px 2px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.06);
  --card-shadow-md:   0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --card-shadow-lg:   0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);

  /* Input */
  --input-radius:     0.625rem;
  --input-border:     #e2e8f0;
  --input-bg:         #ffffff;
  --input-focus:      var(--primary-500);
}

@theme inline {
  --font-sans: var(--font-geist-sans);
  --font-mono: var(--font-geist-mono);
}

/* ─── Base Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; }

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  font-family: var(--font-geist-sans, "Inter", system-ui, sans-serif);
  background: var(--color-bg);
  color: var(--color-dark);
  font-size: 14px;
  line-height: 1.5;
}

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* ════════════════════════════════════════════════════════════
   TYPOGRAPHY TOKENS
   ════════════════════════════════════════════════════════════ */
.text-dark  { color: var(--color-dark); }
.text-muted { color: var(--color-muted); }
.gradient-text {
  background: linear-gradient(135deg, var(--primary-400), var(--accent-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ════════════════════════════════════════════════════════════
   COLOR UTILITY TOKENS  (bg-primary-*, text-primary-*, etc.)
   ════════════════════════════════════════════════════════════ */
.bg-primary-50  { background-color: var(--primary-50);  }
.bg-primary-100 { background-color: var(--primary-100); }
.bg-primary-400 { background-color: var(--primary-400); }
.bg-primary-500 { background-color: var(--primary-500); }
.bg-primary-600 { background-color: var(--primary-600); }
.text-primary-300 { color: var(--primary-300); }
.text-primary-400 { color: var(--primary-400); }
.text-primary-500 { color: var(--primary-500); }
.text-primary-600 { color: var(--primary-600); }
.text-primary-700 { color: var(--primary-700); }
.border-primary-100 { border-color: var(--primary-100); }
.border-primary-200 { border-color: var(--primary-200); }
.border-primary-300 { border-color: var(--primary-300); }
.border-primary-400 { border-color: var(--primary-400); }
.bg-accent-500 { background-color: var(--accent-500); }
.text-accent-500 { color: var(--accent-500); }
.text-warm-400 { color: var(--warm-400); }

/* Opacity variants used by sidebar */
.bg-primary-600\/20  { background-color: color-mix(in srgb, var(--primary-600) 20%, transparent);  }
.bg-primary-500\/10  { background-color: color-mix(in srgb, var(--primary-500) 10%, transparent);  }
.bg-primary-500\/20  { background-color: color-mix(in srgb, var(--primary-500) 20%, transparent);  }
.bg-primary-500\/30  { background-color: color-mix(in srgb, var(--primary-500) 30%, transparent);  }
.bg-primary-400\/05  { background-color: color-mix(in srgb, var(--primary-400)  5%, transparent);  }
.bg-accent-500\/20   { background-color: color-mix(in srgb, var(--accent-500)  20%, transparent);  }
.bg-primary-600\/\[0\.07\] { background-color: color-mix(in srgb, var(--primary-600) 7%, transparent); }
.bg-accent-500\/\[0\.05\]  { background-color: color-mix(in srgb, var(--accent-500)  5%, transparent); }
.text-primary-400\/30 { color: color-mix(in srgb, var(--primary-400) 30%, transparent); }
.text-primary-400\/60 { color: color-mix(in srgb, var(--primary-400) 60%, transparent); }
.border-primary-600\/20 { border-color: color-mix(in srgb, var(--primary-600) 20%, transparent); }
.shadow-primary-500\/20 { --tw-shadow-color: color-mix(in srgb, var(--primary-500) 20%, transparent); }
.shadow-primary-500\/30 { --tw-shadow-color: color-mix(in srgb, var(--primary-500) 30%, transparent); }
.shadow-primary-500\/50 { --tw-shadow-color: color-mix(in srgb, var(--primary-500) 50%, transparent); }

/* ════════════════════════════════════════════════════════════
   CARD
   ════════════════════════════════════════════════════════════ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}
.card-flat {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}

/* ════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1.125rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  user-select: none;
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  color: #fff;
  box-shadow: 0 1px 3px rgba(99,102,241,0.25), 0 2px 8px rgba(99,102,241,0.2);
  transition: all 0.15s cubic-bezier(0.4,0,0.2,1);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-500) 100%);
  box-shadow: 0 2px 8px rgba(99,102,241,0.35), 0 4px 16px rgba(99,102,241,0.2);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) { transform: translateY(0) scale(0.97); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1.125rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border-radius: 0.75rem;
  border: 1px solid var(--color-border);
  cursor: pointer;
  user-select: none;
  background: #fff;
  color: #374151;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: all 0.15s cubic-bezier(0.4,0,0.2,1);
}
.btn-secondary:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}
.btn-secondary:active:not(:disabled) { transform: translateY(0) scale(0.97); }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-sm {
  padding: 0.375rem 0.875rem !important;
  font-size: 0.75rem !important;
  border-radius: 0.625rem !important;
}

.btn-xs {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.12s ease;
}

/* ════════════════════════════════════════════════════════════
   INPUT / FORM
   ════════════════════════════════════════════════════════════ */
.input {
  width: 100%;
  padding: 0.5625rem 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--color-dark);
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--input-radius);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}
.input::placeholder { color: #94a3b8; }
.input:focus {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-500) 12%, transparent);
}
textarea.input { resize: vertical; min-height: 4.5rem; }
select.input { appearance: none; cursor: pointer; }

/* ════════════════════════════════════════════════════════════
   BADGES
   ════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 99px;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.badge-new       { background: #dbeafe; color: #1d4ed8; }
.badge-scheduled { background: #fef3c7; color: #92400e; }
.badge-booked    { background: #ede9fe; color: #5b21b6; }
.badge-confirmed { background: #d1fae5; color: #065f46; }
.badge-arrived   { background: #a7f3d0; color: #064e3b; }
.badge-completed { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-no-show   { background: #fee2e2; color: #991b1b; }
.badge-cancelled { background: #f1f5f9; color: #64748b; }

/* ════════════════════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════════════════════ */
.sidebar-bg {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
}
.sidebar-indicator {
  transition: top 0.35s cubic-bezier(0.34,1.56,0.64,1), height 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s ease;
}

/* ════════════════════════════════════════════════════════════
   MODAL
   ════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  animation: overlayIn 0.2s ease both;
}
@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ════════════════════════════════════════════════════════════
   TOASTS
   ════════════════════════════════════════════════════════════ */
.success-toast {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.125rem;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 0.875rem;
  box-shadow: 0 8px 24px rgba(16,185,129,0.3), 0 2px 8px rgba(0,0,0,0.1);
  animation: toastIn 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}
.clinera-toast {
  animation: toastIn 0.4s cubic-bezier(0.34,1.56,0.64,1) both !important;
}
.toast-check {
  width: 1.25rem;
  height: 1.25rem;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px) scale(0.9); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(24px) scale(0.9); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* ════════════════════════════════════════════════════════════
   LEADS — TABLE ROWS & DRAWER
   ════════════════════════════════════════════════════════════ */
.lead-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.12s ease;
  position: relative;
}
.lead-card:last-child { border-bottom: none; }
.lead-card:hover { background: #fafbff; }
.lead-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--primary-400), var(--accent-500));
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.lead-card:hover::before { opacity: 1; }

.table-row { cursor: pointer; }
.lead-card-actions { display: none; }
.lead-card:hover .lead-card-actions { display: flex; }

.action-btn-micro {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.12s ease;
  text-decoration: none;
}

.search-highlight {
  background: #fef08a;
  color: #854d0e;
  border-radius: 2px;
  padding: 0 1px;
}

.drawer-section {
  padding-bottom: 1.125rem;
  border-bottom: 1px solid #f1f5f9;
}
.drawer-section:last-child { border-bottom: none; padding-bottom: 0; }

.status-bar-segment { height: 100%; transition: width 0.8s cubic-bezier(0.34,1.56,0.64,1); }
.status-bar-animate { animation: barGrow 0.8s cubic-bezier(0.34,1.56,0.64,1) both; }
@keyframes barGrow {
  from { width: 0 !important; }
}

.avatar-bounce { animation: avatarBounce 0.5s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes avatarBounce {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ════════════════════════════════════════════════════════════
   APPOINTMENT STATUS EFFECTS
   ════════════════════════════════════════════════════════════ */
.status-glow-green {
  animation: statusGlow 1.5s ease both;
}
@keyframes statusGlow {
  0%,100% { box-shadow: var(--card-shadow); }
  25%      { box-shadow: 0 0 0 3px #a7f3d0, 0 4px 24px rgba(16,185,129,0.3); }
  75%      { box-shadow: 0 0 0 3px #a7f3d0, 0 4px 24px rgba(16,185,129,0.3); }
}

.status-shake {
  animation: statusShake 0.5s cubic-bezier(0.36,0.07,0.19,0.97) both;
}
@keyframes statusShake {
  10%,90% { transform: translateX(-2px); }
  20%,80% { transform: translateX(3px); }
  30%,50%,70% { transform: translateX(-4px); }
  40%,60% { transform: translateX(4px); }
}

/* ════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
   ════════════════════════════════════════════════════════════ */
.dash-content {
  width: 100%;
}

/* Mobile safe areas */
.safe-area-top    { padding-top: env(safe-area-inset-top, 0); }
.safe-area-bottom { padding-bottom: env(safe-area-inset-bottom, 0.5rem); }

/* ════════════════════════════════════════════════════════════
   ANIMATIONS — PAGE & COMPONENTS
   ════════════════════════════════════════════════════════════ */

/* Page */
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-enter { animation: pageEnter 0.3s cubic-bezier(0.22,1,0.36,1) both; }

/* Fade */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.animate-fade-in { animation: fadeIn 0.3s ease both; }

/* Scale in (modal) */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.93) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.animate-scale-in { animation: scaleIn 0.25s cubic-bezier(0.34,1.56,0.64,1) both; }

/* Float */
@keyframes float {
  0%,100% { transform: translateY(0);    }
  50%      { transform: translateY(-6px); }
}
.animate-float { animation: float 3s ease-in-out infinite; }

/* Slide up (undo toast) */
@keyframes slideUp {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.animate-slide-up { animation: slideUp 0.3s cubic-bezier(0.34,1.56,0.64,1) both; }

/* Slide right (mobile drawer) */
@keyframes slideRight {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.animate-slide-right { animation: slideRight 0.3s cubic-bezier(0.22,1,0.36,1) both; }

/* Drawer morph */
@keyframes drawerMorphEnter {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
.drawer-morph-enter { animation: drawerMorphEnter 0.3s cubic-bezier(0.22,1,0.36,1) both; }

/* Overlay */
@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.overlay-in { animation: overlayFadeIn 0.2s ease both; }

/* Shake */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60%  { transform: translateX(-6px); }
  40%,80%  { transform: translateX(6px); }
}
.animate-shake { animation: shake 0.45s ease both; }

/* Pulse soft */
@keyframes pulseSoft {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.5; }
}
.animate-pulse-soft { animation: pulseSoft 2.5s ease-in-out infinite; }

/* Alert slide in */
@keyframes alertSlideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.alert-slide-in { animation: alertSlideIn 0.3s cubic-bezier(0.22,1,0.36,1) both; }

/* Pipeline stage */
@keyframes pipelineEnter {
  from { opacity: 0; transform: scale(0.88) translateY(4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.pipeline-stage-enter { animation: pipelineEnter 0.35s cubic-bezier(0.34,1.56,0.64,1) both; }

/* Apt row */
@keyframes aptRowEnter {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}
.apt-row-enter { animation: aptRowEnter 0.28s cubic-bezier(0.22,1,0.36,1) both; }

/* Feed item */
@keyframes feedItemEnter {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.feed-item-enter { animation: feedItemEnter 0.3s cubic-bezier(0.34,1.56,0.64,1) both; }

/* Insight card */
@keyframes insightEnter {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.insight-card { animation: insightEnter 0.35s cubic-bezier(0.22,1,0.36,1) both; }

/* Cal cell */
@keyframes calCellEnter {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}
.cal-cell { animation: calCellEnter 0.28s cubic-bezier(0.34,1.56,0.64,1) both; }

/* Cal tooltip */
@keyframes calTooltipEnter {
  from { opacity: 0; transform: translateX(-50%) scale(0.8); }
  to   { opacity: 1; transform: translateX(-50%) scale(1); }
}
.cal-tooltip-enter { animation: calTooltipEnter 0.15s ease both; }

/* Treatment bar */
@keyframes treatmentBarGrow { from { width: 0 !important; } }
.treatment-bar { animation: treatmentBarGrow 0.9s cubic-bezier(0.34,1.56,0.64,1) both; }

/* Loader ring */
@keyframes loaderRing {
  0%,100% { transform: scale(1);    opacity: 0.5; }
  50%      { transform: scale(1.5); opacity: 0.08; }
}
.loader-ring { animation: loaderRing 1.4s ease-in-out infinite; }

/* Orb ring */
@keyframes orbRing {
  0%,100% { transform: scale(1);     opacity: 0.35; }
  50%      { transform: scale(1.18); opacity: 0.08; }
}
.orb-ring { animation: orbRing 2.5s ease-in-out infinite; }

/* Orb blob */
@keyframes orbBlob {
  0%,100% { border-radius: 50%; }
  33%      { border-radius: 42% 58% 55% 45%/48% 52% 48% 52%; }
  66%      { border-radius: 55% 45% 42% 58%/52% 48% 52% 48%; }
}
.orb-blob { animation: orbBlob 5s ease-in-out infinite; }

/* Radar ring */
@keyframes radarRing {
  0%,100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 0.2; transform: scale(1.04); }
}
.radar-ring { animation: radarRing 2s ease-in-out infinite; }

/* Radar fill */
@keyframes radarFillIn { from { opacity: 0; } to { opacity: 1; } }
.radar-fill { animation: radarFillIn 1s ease both; }

/* Radar sweep */
@keyframes radarSweep {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.radar-sweep { animation: radarSweep 3s linear infinite; transform-origin: center; }

/* Status dot live */
@keyframes statusDotLive {
  0%,100% { box-shadow: 0 0 0 0   rgba(52,211,153,0.7); }
  50%      { box-shadow: 0 0 0 6px rgba(52,211,153,0);   }
}
.status-dot-live { animation: statusDotLive 1.5s ease-in-out infinite; }

/* Wave hand */
@keyframes waveHand {
  0%,100%   { transform: rotate(0deg); transform-origin: 70% 70%; }
  10%        { transform: rotate(14deg); }
  20%        { transform: rotate(-8deg); }
  30%        { transform: rotate(14deg); }
  40%        { transform: rotate(-4deg); }
  50%        { transform: rotate(10deg); }
  60%        { transform: rotate(0deg);  }
}
.wave-hand { display: inline-block; animation: waveHand 2.2s ease-in-out infinite; }

/* Command palette */
@keyframes cmdEnter {
  from { opacity: 0; transform: scale(0.93) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.cmd-enter { animation: cmdEnter 0.2s cubic-bezier(0.34,1.56,0.64,1) both; }
.cmd-item  { transition: background 0.1s ease, color 0.1s ease; }

/* Generic fade-in (used inline via style) */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Login page gradient text */
.gradient-text {
  background: linear-gradient(135deg, #818cf8, #a78bfa, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ════════════════════════════════════════════════════════════
   CHATBOT CANVAS — missing CSS classes
   ════════════════════════════════════════════════════════════ */

/* Panel enter animations */
@keyframes panelLeftEnter {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}
.panel-left-enter { animation: panelLeftEnter 0.3s cubic-bezier(0.22,1,0.36,1) both; }

@keyframes panelRightEnter {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
.panel-right-enter { animation: panelRightEnter 0.3s cubic-bezier(0.22,1,0.36,1) both; }

/* Canvas fade in */
@keyframes canvasReady {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.canvas-ready { animation: canvasReady 0.4s ease both; }

/* Palette buttons */
.palette-btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.palette-btn:hover {
  transform: translateX(3px) scale(1.01);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  filter: brightness(0.97);
}
.palette-btn:active {
  transform: scale(0.97);
}

/* Modal enter (dropdown/popup) */
@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.95) translateY(-6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-enter { animation: modalEnter 0.2s cubic-bezier(0.34,1.56,0.64,1) both; }

/* Toast enter */
@keyframes toastEnter {
  from { opacity: 0; transform: translateX(-50%) translateY(12px) scale(0.95); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.toast-enter { animation: toastEnter 0.3s cubic-bezier(0.34,1.56,0.64,1) both; }

/* Chat message enter */
@keyframes msgEnter {
  from { opacity: 0; transform: translateY(6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.msg-enter { animation: msgEnter 0.2s cubic-bezier(0.22,1,0.36,1) both; }

/* Edge delete button — hidden until hover */
.edge-delete-btn { opacity: 0; transition: opacity 0.15s ease; }
.react-flow__edge:hover .edge-delete-btn { opacity: 1; }

/* Typing bounce dots */
@keyframes typingBounce {
  0%, 100% { transform: translateY(0);    opacity: 0.5; }
  50%       { transform: translateY(-5px); opacity: 1;   }
}
.typing-dot { animation: typingBounce 1.1s ease-in-out infinite; }

/* WhatsApp preview phone entrance */
@keyframes phoneEnter {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.phone-enter { animation: phoneEnter 0.4s cubic-bezier(0.34,1.2,0.64,1) both; }

/* Simulator overlay entrance */
@keyframes overlayBlurIn {
  from { opacity: 0; backdrop-filter: blur(0px); }
  to   { opacity: 1; backdrop-filter: blur(12px); }
}
.overlay-blur-in { animation: overlayBlurIn 0.25s ease both; }
