/* ApexPOS Pro - Modern POS Stylesheet */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --dark-bg: #0f172a;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Arabic", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #f1f5f9;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* RTL Support */
[dir="rtl"] {
  text-align: right;
}

/* Receipt Print Styling (80mm & 58mm) */
@media print {
  body * {
    visibility: hidden;
  }
  #printable-receipt, #printable-receipt * {
    visibility: visible;
  }
  #printable-receipt {
    position: absolute;
    left: 0;
    top: 0;
    width: 80mm;
    margin: 0;
    padding: 2mm;
    font-family: "Courier New", Courier, monospace;
    color: #000;
  }
  .no-print {
    display: none !important;
  }
}

.receipt-80mm {
  width: 320px;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 1px dashed #cbd5e1;
  color: #1e293b;
}

.receipt-58mm {
  width: 240px;
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 1px dashed #cbd5e1;
  color: #1e293b;
}

/* Pulse animation for active scanner */
@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 0.4; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.scanner-active-ring {
  animation: pulse-ring 2s infinite ease-in-out;
}

/* Glassmorphism modal */
.modal-backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

/* Barcode sticker grid for printing */
@media print {
  .barcode-sheet-print {
    visibility: visible !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
  .barcode-sheet-print * {
    visibility: visible !important;
  }
}
