@import "tailwindcss";

@theme {
  /* ---------- Typography (KeluargaMart family: IBM Plex) ---------- */
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  /* ---------- Surfaces / background ---------- */
  --color-canvas: #f5f8ff;
  --color-surface: #ffffff;
  --color-surface-subtle: #f7f8fc;
  --color-surface-well: #eef3fa;
  --color-overlay: rgba(20, 33, 61, 0.45);

  /* ---------- Borders ---------- */
  --color-line: #d9e2f0;
  --color-line-strong: #bccbe4;

  /* ---------- Text / ink ---------- */
  --color-ink: #14213d;        /* primary text, AAA on every family surface */
  --color-ink-2: #475569;      /* muted, 7.0:1 on every family surface */
  --color-ink-3: #64748b;      /* subtle, #FFFFFF only (4.76:1) */
  --color-ink-disabled: #94a3b8; /* disabled / non-text only, never body copy */

  /* ---------- Primary (navy KeluargaMart) ---------- */
  --color-primary: #142b80;
  --color-primary-deep: #102268;
  --color-primary-soft: #dce7fc;
  --color-primary-line: #c4d4f5;
  --color-on-primary: #ffffff;

  /* ---------- Brand scale ---------- */
  --color-brand-50: #f0f5ff;
  --color-brand-100: #dce7fc;
  --color-brand-200: #c4d4f5;
  --color-brand-300: #9db8ea;
  --color-brand-400: #28459a;
  --color-brand-500: #142b80;
  --color-brand-600: #102268;
  --color-brand-700: #071f68;

  /* ---------- Status tones (all AA on white and on own soft bg) ---------- */
  --color-success: #15803d;
  --color-success-soft: #ecfaf0;
  --color-warning: #b45309;
  --color-warning-soft: #fff8eb;
  --color-danger: #c0372c;
  --color-danger-soft: #fbe7e4;
  /* info: the light decorative cyan is intentionally NOT used anywhere in this
     build, so the info tone resolves to the accessible deep cyan. Any lingering
     bg-info/text-info therefore still clears AA on light surfaces. */
  --color-info: #0e7490;
  --color-info-deep: #0e7490;
  --color-info-soft: #ecfeff;

  /* ---------- Radius (control / card end) ---------- */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* ---------- Shadows (ink tinted) ---------- */
  --shadow-soft: 0 1px 2px rgba(20, 33, 61, 0.05), 0 3px 10px rgba(20, 33, 61, 0.06);
  --shadow-lifted: 0 2px 4px rgba(20, 33, 61, 0.06), 0 14px 32px rgba(20, 33, 61, 0.14);
  --shadow-dialog: 0 24px 64px -12px rgba(20, 33, 61, 0.3);
}

@layer base {
  html {
    font-size: 16px;
  }

  body {
    @apply bg-canvas text-ink font-sans antialiased;
    /* Family body token: 15px de-facto size with a defined 1.5 line-height so
       the ~120 `text-[15px]` call sites inherit a real leading instead of 1.6. */
    font-size: 0.9375rem;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
  }

  h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    line-height: 1.25;
    letter-spacing: -0.01em;
  }

  ::selection {
    background-color: var(--color-primary-soft);
    color: var(--color-primary-deep);
  }

  button {
    cursor: pointer;
  }
}

@layer utilities {
  /* Numeric columns: codes + currency + totals align and read as tabular.
     Backed by IBM Plex Mono (the family has a real mono face now). */
  .num {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
  }
}

/* ---------- Hide scrollbar utility ---------- */
.no-scrollbar {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}
.no-scrollbar::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera, Edge Chromium */
}

/* ---------- OverlayScrollbars (POS) ---------- */
.os-host,
.os-content {
  height: 100%;
}
.os-scrollbar-handle {
  background-color: var(--color-line-strong) !important;
  transition: background-color 0.15s ease;
}
.os-scrollbar-handle:hover {
  background-color: var(--color-primary-line) !important;
}
.os-scrollbar-handle.active {
  background-color: var(--color-primary-line) !important;
}
.os-scrollbar-track {
  background-color: transparent !important;
}
.os-scrollbar {
  --os-size: 10px;
  --os-hover-size: 12px;
}

/* ---------- Print: hanya struk yang dicetak ---------- */
@media print {
  @page {
    margin: 4mm;
    size: auto;
  }
  html,
  body {
    background: #fff !important;
    overflow: visible !important;
    height: auto !important;
  }
  body * {
    visibility: hidden !important;
  }
  .receipt-print-area,
  .receipt-print-area *,
  #pickup-receipt,
  #pickup-receipt * {
    visibility: visible !important;
  }
  .receipt-print-area,
  #pickup-receipt {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    margin: 0 !important;
    width: 80mm !important;
    max-width: 100% !important;
    padding: 10px !important;
    border: 1px dashed #777 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #000 !important;
    display: block !important;
  }
  .dialog-panel {
    position: static !important;
    overflow: visible !important;
    max-height: none !important;
    border: none !important;
    box-shadow: none !important;
  }
  .dialog-body {
    overflow: visible !important;
    max-height: none !important;
    padding: 0 !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important;}
}