@import 'tailwindcss';

@plugin 'tailwindcss-animate';

@source '../views';
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';

@custom-variant dark (&:is(.dark *));

@theme {
    --font-sans: 'Winky Sans', ui-sans-serif, system-ui, sans-serif;
    --font-inter: 'Inter', ui-sans-serif, system-ui, sans-serif;
    --font-poppins: 'Poppins', ui-sans-serif, system-ui, sans-serif;
    --font-roboto: 'Roboto', ui-sans-serif, system-ui, sans-serif;
    --font-figtree: 'Figtree', ui-sans-serif, system-ui, sans-serif;

    --radius-lg: var(--radius);
    --radius-md: calc(var(--radius) - 2px);
    --radius-sm: calc(var(--radius) - 4px);

    --color-background: var(--background);
    --color-foreground: var(--foreground);

    --color-card: var(--card);
    --color-card-foreground: var(--card-foreground);

    --color-popover: var(--popover);
    --color-popover-foreground: var(--popover-foreground);

    --color-primary: var(--primary);
    --color-primary-foreground: var(--primary-foreground);

    --color-secondary: var(--secondary);
    --color-secondary-foreground: var(--secondary-foreground);

    --color-muted: var(--muted);
    --color-muted-foreground: var(--muted-foreground);

    --color-accent: var(--accent);
    --color-accent-foreground: var(--accent-foreground);

    --color-destructive: var(--destructive);
    --color-destructive-foreground: var(--destructive-foreground);

    --color-warning: var(--warning);
    --color-warning-foreground: var(--warning-foreground);

    --color-info: var(--info);
    --color-info-foreground: var(--info-foreground);


    --color-border: var(--border);
    --color-input: var(--input);
    --color-ring: var(--ring);

    --color-chart-1: var(--chart-1);
    --color-chart-2: var(--chart-2);
    --color-chart-3: var(--chart-3);
    --color-chart-4: var(--chart-4);
    --color-chart-5: var(--chart-5);

    --color-sidebar: var(--sidebar);
    --color-sidebar-foreground: var(--sidebar-foreground);
    --color-sidebar-primary: var(--sidebar-primary);
    --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
    --color-sidebar-accent: var(--sidebar-accent);
    --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
    --color-sidebar-border: var(--sidebar-border);
    --color-sidebar-ring: var(--sidebar-ring);
}

/*
  The default border color has changed to `currentColor` in Tailwind CSS v4,
  so we've added these compatibility styles to make sure everything still
  looks the same as it did with Tailwind CSS v3.

  If we ever want to remove these styles, we need to add an explicit border
  color utility to any element that depends on these defaults.
*/
@layer base {
    *,
    ::after,
    ::before,
    ::backdrop,
    ::file-selector-button {
        border-color: var(--color-gray-200, currentColor);
    }
}

:root {
    --background: #f6f8fb;
    --foreground: #0f1724;
    --card: #ffffff;
    --card-foreground: #0f1724;
    --popover: #ffffff;
    --popover-foreground: #0f1724;
    --primary: #2563eb;
    --primary-foreground: #ffffff;
    --secondary: #e3e8f8;
    --secondary-foreground: #0f1724;
    --muted: #f1f5f9;
    --muted-foreground: #475569;
    --accent: #e8f0ff;
    --accent-foreground: #0f1724;
    --destructive: #ef4444;
    --destructive-foreground: #ffffff;
    --warning: #f59e0b;
    --warning-foreground: #ffffff;
    --info: #06b6d4;
    --info-foreground: #ffffff;
    --border: #e2e8f0;
    --input: #e2e8f0;
    --ring: rgba(37,99,235,0.15);
    --chart-1: #3b82f6;
    --chart-2: #34d399;
    --chart-3: #f59e0b;
    --chart-4: #c013fa;
    --chart-5: #38bdf8;
    --radius: 0.625rem;
    --sidebar: #ffffff;
    --sidebar-foreground: #0f1724;
    --sidebar-primary: #2563eb;
    --sidebar-primary-foreground: #ffffff;
    --sidebar-accent: #e8f0ff;
    --sidebar-accent-foreground: #0f1724;
    --sidebar-border: #e2e8f0;
    --sidebar-ring: rgba(37,99,235,0.15);
}

.dark {
    --background: #0f172a;
    --foreground: #f8fafc;
    --card: #1e293b;
    --card-foreground: #f8fafc;
    --popover: #1e293b;
    --popover-foreground: #f8fafc;
    --primary: #3b82f6;
    --primary-foreground: #ffffff;
    --secondary: #1e293b;
    --secondary-foreground: #e2e8f0;
    --muted: #334155;
    --muted-foreground: #cbd5e1;
    --accent: #1e3a8a;
    --accent-foreground: #f1f5f9;
    --destructive: #ef4444;
    --destructive-foreground: #ffffff;
    --warning: #f59e0b;
    --warning-foreground: #000000;
    --info: #06b6d4;
    --info-foreground: #ffffff;
    --border: #334155;
    --input: #334155;
    --ring: rgba(59,130,246,0.25);
    --chart-1: oklch(0.488 0.243 264.376);
    --chart-2: oklch(0.696 0.17 162.48);
    --chart-3: oklch(0.769 0.188 70.08);
    --chart-4: oklch(0.627 0.265 303.9);
    --chart-5: oklch(0.645 0.246 16.439);
    --sidebar: #1e293b;
    --sidebar-foreground: #f8fafc;
    --sidebar-primary: #3b82f6;
    --sidebar-primary-foreground: #ffffff;
    --sidebar-accent: #1e3a8a;
    --sidebar-accent-foreground: #f8fafc;
    --sidebar-border: #334155;
    --sidebar-ring: rgba(59,130,246,0.25);
}

.blue {
    --background: #f5f9ff;
    --foreground: #0f172a;
    --card: #ffffff;
    --card-foreground: #0f172a;
    --popover: #ffffff;
    --popover-foreground: #0f172a;
    --primary: #004298;
    --primary-foreground: #ffffff;
    --secondary: #e7f0fb;
    --secondary-foreground: #0f172a;
    --muted: #eef5ff;
    --muted-foreground: #475569;
    --accent: #d5e8ff;
    --accent-foreground: #004298;
    --destructive: #ef4444;
    --destructive-foreground: #ffffff;
    --warning: #f59e0b;
    --warning-foreground: #000000;
    --info: #0284c7;
    --info-foreground: #ffffff;
    --border: #c7ddf8;
    --input: #d8e8fb;
    --ring: rgba(0,66,152,.18);
    --chart-1: #004298;
    --chart-2: #06b6d4;
    --chart-3: #22c55e;
    --chart-4: #f97316;
    --chart-5: #a855f7;
    --sidebar: #004298;
    --radius: 0.625rem;
    --sidebar-foreground: #ffffff;
    --sidebar-primary: #ffffff;
    --sidebar-primary-foreground: #004298;
    --sidebar-accent: #0054bf;
    --sidebar-accent-foreground: #ffffff;
    --sidebar-border: rgba(255,255,255,.08);
    --sidebar-ring: rgba(255,255,255,.18);
}

@layer base {
    * {
        @apply border-border;
    }

    body {
        @apply bg-background text-foreground;
    }
}

/* Hide scrollbar but keep scroll functionality
*/
.hide-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .hide-scrollbar::-webkit-scrollbar {
    display: none;
  }

.barcode-paper {
    /* background: #ffffff; */
}

.barcode-grid {
    display: grid;
}

.barcode-label {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.barcode-name {
  font-weight: 600;
  font-size: 9px;
  line-height: 1;
  text-align: center;

  white-space: nowrap;        /* 1 baris */
  overflow: hidden;           /* potong */
  text-overflow: ellipsis;    /* ... */

  width: 100%;
}


.barcode-label.preview {
    border: 1px dashed #cbd5e1;
}

@media print {
  @page {
    margin: 0;
  }

  html,
  body {
    margin: 0;
    background: #fff !important;
  }

  header,
  nav,
  aside,
  footer,
  .no-print {
    display: none !important;
  }

  .barcode-grid {
    display: block !important;
  }

  .barcode-label {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    break-after: page;
  }

  .first-label {
    margin-top: -6px !important; /* sesuaikan 4–8px */
  }

  .barcode-label:last-child {
    break-after: auto;
  }
  
}