@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Brand Theme: Warm Culinary Velocity */
  --surface: #f8f9ff;
  --surface-dim: #d6dae4;
  --surface-bright: #f8f9ff;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f0f4fd;
  --surface-container: #eaeef8;
  --surface-container-high: #e4e8f2;
  --surface-container-highest: #dee2ec;
  
  --on-surface: #171c23;
  --on-surface-variant: #59413a;
  --inverse-surface: #2c3138;
  --inverse-on-surface: #edf1fb;
  
  --outline: #8d7168;
  --outline-variant: #e1bfb5;
  --surface-tint: #ab3504;
  
  --primary: #a83301;
  --primary-rgb: 168, 51, 1;
  --on-primary: #ffffff;
  --primary-container: #ca4a1c;
  --on-primary-container: #fffbff;
  --inverse-primary: #ffb59d;
  
  --secondary: #006c47;
  --secondary-rgb: 0, 108, 71;
  --on-secondary: #ffffff;
  --secondary-container: #8af5be;
  --on-secondary-container: #00714b;
  
  --tertiary: #8b4c11;
  --on-tertiary: #ffffff;
  --tertiary-container: #a96428;
  --on-tertiary-container: #fffbff;
  
  --error: #ba1a1a;
  --on-error: #ffffff;
  --error-container: #ffdad6;
  --on-error-container: #93000a;
  
  --background: #f8f9ff;
  --on-background: #171c23;
  --surface-variant: #dee2ec;

  --shadow-ambient: 0px 2px 10px rgba(30, 35, 42, 0.04), 0px 1px 2px rgba(224, 90, 43, 0.03);
  --shadow-floating: 0px 8px 24px rgba(30, 35, 42, 0.08), 0px 2px 6px rgba(224, 90, 43, 0.06);
  --shadow-elevated: 0px 12px 32px rgba(30, 35, 42, 0.12);
}

body {
  font-family: var(--font-family);
  background-color: var(--background);
  color: var(--on-surface);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* Custom Utilities for Theme Warm Culinary Velocity */
.bg-primary-terracotta { background-color: var(--primary); }
.text-primary-terracotta { color: var(--primary); }
.border-primary-terracotta { border-color: var(--primary); }

.bg-emerald-fresh { background-color: var(--secondary); }
.text-emerald-fresh { color: var(--secondary); }
.bg-emerald-container { background-color: var(--secondary-container); color: var(--on-secondary-container); }

.bg-apricot-warm { background-color: var(--tertiary-container); color: var(--on-tertiary-container); }
.text-apricot-warm { color: var(--tertiary); }

.card-warm {
  background-color: var(--surface-container-lowest);
  border: 1px solid rgba(141, 113, 104, 0.15);
  box-shadow: var(--shadow-ambient);
  border-radius: 1rem;
}

.card-warm-hover {
  transition: all 0.25s ease-in-out;
}
.card-warm-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-floating);
}

/* Custom Scrollbar for Chat Inbox */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: var(--surface-container-low);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--outline-variant);
  border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--outline);
}

/* Button tactile press effect */
.btn-tactile {
  transition: transform 0.1s ease, filter 0.2s ease;
}
.btn-tactile:active {
  transform: scale(0.98);
  filter: brightness(0.92);
}

/* Pulse animation for active AI badge */
@keyframes warm-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.08); }
}
.animate-warm-pulse {
  animation: warm-pulse 2s infinite ease-in-out;
}

/* Sidebar Toggle System */
#app-sidebar {
  width: 16rem;
  min-width: 16rem;
  max-width: 16rem;
  box-sizing: border-box;
  overflow-x: hidden;
}

#app-sidebar.sidebar-ready {
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease,
              border-color 0.25s ease;
}

@media (min-width: 768px) {
  html.sidebar-is-collapsed #app-sidebar,
  #app-sidebar.collapsed {
    margin-left: -16rem !important;
    border-right-color: transparent !important;
    border-right-width: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

@media (max-width: 767px) {
  #app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    width: 16rem;
    max-width: 85vw;
    height: 100vh;
    transform: translateX(-100%);
    box-shadow: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.25s ease,
                box-shadow 0.3s ease;
  }
  #app-sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.05);
  }
}

/* ========================================================
   Admin Panel Light Theme Styling
   ======================================================== */
html.theme-light body {
  background-color: #f8f9ff !important;
  color: #1f2937 !important;
}

html.theme-light aside {
  background-color: #ffffff !important;
  border-color: #e5e7eb !important;
}

html.theme-light aside .text-white {
  color: #111827 !important;
}

html.theme-light aside .text-gray-400 {
  color: #6b7280 !important;
}

html.theme-light aside .border-gray-800 {
  border-color: #e5e7eb !important;
}

html.theme-light aside .bg-gray-900\/60 {
  background-color: #f9fafb !important;
}

html.theme-light aside nav a:not(.bg-brand-primary) {
  color: #4b5563 !important;
}

html.theme-light aside nav a:not(.bg-brand-primary):hover {
  background-color: #f3f4f6 !important;
  color: #111827 !important;
}

html.theme-light main {
  background-color: #f8f9ff !important;
}

html.theme-light main header {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-color: #e5e7eb !important;
}

html.theme-light main header h1 {
  color: #111827 !important;
}

html.theme-light .theme-toggle-container {
  background-color: #f3f4f6 !important;
  border-color: #d1d5db !important;
}

html.theme-light .bg-gray-950,
html.theme-light .bg-gray-950\/70,
html.theme-light .bg-gray-950\/80,
html.theme-light .bg-gray-900,
html.theme-light .bg-gray-900\/50,
html.theme-light .bg-gray-900\/60 {
  background-color: #ffffff !important;
  border-color: #e5e7eb !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

html.theme-light .bg-gray-800,
html.theme-light .bg-gray-850 {
  background-color: #f3f4f6 !important;
  border-color: #e5e7eb !important;
  color: #111827 !important;
}

html.theme-light .text-white {
  color: #111827 !important;
}

html.theme-light .text-gray-100,
html.theme-light .text-gray-200,
html.theme-light .text-gray-300 {
  color: #374151 !important;
}

html.theme-light .text-gray-400 {
  color: #6b7280 !important;
}

html.theme-light .text-gray-500 {
  color: #9ca3af !important;
}

html.theme-light .border-gray-800,
html.theme-light .border-gray-700 {
  border-color: #e5e7eb !important;
}

html.theme-light .divide-gray-800 > :not([hidden]) ~ :not([hidden]) {
  border-color: #f3f4f6 !important;
}

html.theme-light input,
html.theme-light select,
html.theme-light textarea {
  background-color: #ffffff !important;
  color: #111827 !important;
  border-color: #d1d5db !important;
}

html.theme-light input:focus,
html.theme-light select:focus,
html.theme-light textarea:focus {
  background-color: #ffffff !important;
  border-color: #a83301 !important;
}

html.theme-light thead.bg-gray-900 {
  background-color: #f9fafb !important;
  color: #4b5563 !important;
}

html.theme-light tr:hover {
  background-color: #f9fafb !important;
}

html.theme-light .hover\:bg-gray-900:hover,
html.theme-light .hover\:bg-gray-900\/50:hover,
html.theme-light .hover\:bg-gray-800:hover {
  background-color: #f3f4f6 !important;
}

/* Modal in Light Theme */
html.theme-light #modal-wa-tenant > div {
  background-color: #ffffff !important;
  color: #111827 !important;
  border-color: #e5e7eb !important;
}

html.theme-light #modal-wa-tenant .bg-gray-950 {
  background-color: #f9fafb !important;
  border-color: #e5e7eb !important;
}

html.theme-light #modal-wa-tenant label {
  color: #374151 !important;
}

html.theme-light #modal-wa-tenant input,
html.theme-light #modal-wa-tenant textarea {
  background-color: #ffffff !important;
  color: #111827 !important;
  border-color: #d1d5db !important;
}


