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

:root {
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Artisan Coffee Palette */
  --coffee-950: #261307;
  --coffee-900: #451a03;
  --coffee-800: #78350f;
  --coffee-700: #92400e;
  --coffee-600: #b45309;
  --coffee-500: #d97706;
  --coffee-400: #f59e0b;
  --coffee-100: #fef3c7;
  --coffee-50: #fffbeb;

  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;

  --emerald-600: #059669;
  --emerald-50: #ecfdf5;
  --rose-600: #e11d48;
  --rose-50: #fff1f2;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: #f8fafc;
  color: #1e293b;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Animations for Aesthetic Experience */
@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(2deg);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.08);
  }
}

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

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.hover-lift {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
}

.hover-glow:hover {
  box-shadow: 0 10px 25px -5px rgba(217, 119, 6, 0.35);
}

/* Print-Only Elements Hidden on Screen */
.print-only {
  display: none !important;
}

/* =============================================================
   UNIVERSAL PRINT STYLES (LAPORAN PENJUALAN PDF & STRUK KASIR)
   ============================================================= */
@media print {
  /* 1. Global Reset for Accurate Print Engine Rendering */
  *,
  *::before,
  *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html,
  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 11pt;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  /* Unconstrain SPA container divs so multi-page content flows naturally */
  #root,
  #root > div,
  main {
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    position: static !important;
    display: block !important;
    background: #ffffff !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* 2. Hide interactive UI elements */
  .no-print,
  header,
  aside,
  nav,
  button,
  select,
  input,
  textarea,
  .hover-lift,
  .hover-glow {
    display: none !important;
  }

  /* 3. Reveal Official Print Headers & Signatures */
  .print-only {
    display: block !important;
  }

  /* 4. Page Break & Flow Handling */
  .page-break-avoid,
  .kpi-card,
  table,
  tr {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  /* Unconstrain scrollable lists for complete printing */
  .top-products-container {
    max-height: none !important;
    overflow: visible !important;
  }

  .report-print-container {
    padding: 8mm !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    background: #ffffff !important;
  }

  /* 5. Handle Modal Backdrop if user triggers browser print directly from modal */
  .receipt-modal-backdrop {
    position: static !important;
    background: transparent !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    display: block !important;
    inset: auto !important;
  }

  .receipt-modal-card {
    box-shadow: none !important;
    border: none !important;
    max-width: 58mm !important;
    width: 58mm !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
  }

  /* 6. Thermal receipt print styling (58mm) */
  #printable-receipt {
    width: 58mm !important;
    max-width: 58mm !important;
    margin: 0 auto !important;
    padding: 3mm 2mm !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    color: #000000 !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }
}