/* Fresh & Modern Startup Light-Mode Design System */
:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --border-subtle: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f8fafc;
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(14, 165, 233, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.03) 0px, transparent 50%);
  background-attachment: fixed;
  color: #0f172a;
  min-height: 100vh;
}

/* Seamless Glassmorphism Panels */
.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
}

.glass-panel-elevated {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
}

.glass-panel-light {
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.7);
}

/* Subtle modern 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;
}

/* Animated scanner line for light mode */
@keyframes scanMove {
  0% { top: 6%; opacity: 0.7; }
  50% { top: 92%; opacity: 1; }
  100% { top: 6%; opacity: 0.7; }
}

.scanner-laser {
  position: absolute;
  left: 6%;
  right: 6%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #10b981, #34d399, transparent);
  box-shadow: 0 0 14px #10b981, 0 0 24px #34d399;
  animation: scanMove 2.2s infinite ease-in-out;
  pointer-events: none;
  z-index: 10;
}

/* Sticker Display Styles */
.barcode-sticker {
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  user-select: none;
  margin: 0 auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.barcode-sticker:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -6px rgba(15, 23, 42, 0.12);
}

/* Preset sticker sizes */
.size-50x30 {
  width: 280px;
  min-height: 180px;
  padding: 10px;
}

.size-70x40 {
  width: 360px;
  min-height: 220px;
  padding: 12px;
}

.size-100x50 {
  width: 440px;
  min-height: 260px;
  padding: 16px;
}

.barcode-svg-container svg {
  width: 100% !important;
  height: auto !important;
  max-height: 58px;
}

/* PRINT MEDIA QUERIES FOR THERMAL STICKER PRINTERS & REGULAR PRINTERS */
@media print {
  body {
    background: #ffffff !important;
    background-image: none !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Hide entire application shell during printing */
  #app-header,
  #navigation-tabs,
  #main-content,
  #toast-container,
  .no-print {
    display: none !important;
  }

  /* Make sure print container is visible */
  #print-sticker-container,
  #print-sticker-container * {
    visibility: visible !important;
  }

  #print-sticker-container {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    display: block !important;
  }

  .barcode-sticker {
    box-shadow: none !important;
    border: 1px solid #000 !important;
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: 5mm !important;
  }

  /* Thermal label presets */
  .thermal-50-30 {
    width: 50mm !important;
    height: 30mm !important;
    max-width: 50mm !important;
    max-height: 30mm !important;
    padding: 1.5mm !important;
    border: none !important;
    page-break-after: always;
  }

  .thermal-70-40 {
    width: 70mm !important;
    height: 40mm !important;
    max-width: 70mm !important;
    max-height: 40mm !important;
    padding: 2mm !important;
    border: none !important;
    page-break-after: always;
  }

  @page {
    margin: 0;
    size: auto;
  }
}

/* Mobile Safe Area & Small Screen Polish */
#mobile-drawer {
  padding-bottom: env(safe-area-inset-bottom, 20px);
}

.shadow-2xs {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

@media (max-width: 640px) {
  .barcode-sticker {
    max-width: 100% !important;
  }
}
