:root {
  --primary:    #1E293B;
  --accent:     #6366F1;
  --success:    #10B981;
  --warning:    #F59E0B;
  --danger:     #EF4444;
  --surface:    #F1F5F9;
  --card:       #FFFFFF;
  --border:     #E2E8F0;
  --text:       #0F172A;
  --muted:      #64748B;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Tabular numbers for prices and stock */
.tabular-nums,
td.price,
td.stock,
.price,
.stock-qty {
  font-variant-numeric: tabular-nums;
}

/* Scrollbar slim */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* Print styles — ticket 80mm */
@media print {
  body * { visibility: hidden; }
  #print-receipt, #print-receipt * { visibility: visible; }
  #print-receipt {
    position: fixed;
    top: 0;
    left: 0;
    width: 80mm;
    max-width: 80mm;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    line-height: 1.4;
    color: #000;
    background: #fff;
    padding: 4mm;
  }
  #print-receipt .tabular-nums { font-variant-numeric: tabular-nums; }
}

/* Hide scrollbar utility */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* Sidebar transition */
#sidebar {
  transition: transform 0.3s ease-in-out;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  max-width: 360px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* Badge stock colors */
.badge-stock-ok      { background-color: #D1FAE5; color: #065F46; }
.badge-stock-low     { background-color: #FEF3C7; color: #92400E; }
.badge-stock-warning { background-color: #FEF3C7; color: #92400E; }
.badge-stock-out     { background-color: #FEE2E2; color: #991B1B; }
.badge-stock-danger  { background-color: #FEE2E2; color: #991B1B; }

/* Floating pending badge */
#pending-badge {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 9998;
  animation: slideIn 0.3s ease-out;
}

/* POS grid responsive */
@media (max-width: 640px) {
  .pos-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Focus ring visible for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #6366F1;
  outline-offset: 2px;
}
