@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --font-thai: 'Prompt', -apple-system, BlinkMacSystemFont, 'Thonburi', 'Sukhumvit Set', sans-serif;
  --font-sans: 'Inter', var(--font-thai);
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-thai);
  background-color: #f8fafc;
  color: var(--gray-800);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 9999px;
  border-width: 1px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
}

.badge-new {
  background-color: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.badge-new .badge-dot {
  background-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.badge-following {
  background-color: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}
.badge-following .badge-dot {
  background-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.badge-closed {
  background-color: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.badge-closed .badge-dot {
  background-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* Card hover & animations */
.customer-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.customer-card:active {
  transform: scale(0.99);
}

/* Tab active state */
.tab-btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.tab-btn.active {
  background-color: #ffffff;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  font-weight: 600;
}

/* Modal styles */
.modal-backdrop {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.open .modal-content {
  transform: scale(1) translateY(0);
}

/* Floating Action Button for Mobile */
.fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 40;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.5), 0 8px 10px -6px rgba(37, 99, 235, 0.4);
}

/* Toast */
#toast {
  transform: translateY(120%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
#toast.show {
  transform: translateY(0);
}

/* Phone Call Button */
.call-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  background-color: #10b981;
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.call-btn:hover {
  background-color: #059669;
}

/* Print Styles */
@media print {
  header, footer, .action-bar, .fab, .no-print {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
  .card-container {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}
