/* Custom Scrollbars */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Sidebar navigation buttons */
.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
  transition: all 0.15s ease-in-out;
  text-align: right;
}
.nav-btn:hover {
  background-color: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}
.nav-btn.active {
  background-color: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.35);
}
.nav-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

/* Stat Cards */
.stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.07);
}

/* Clean Data Table */
.data-table-container {
  background: #ffffff;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.825rem;
}
.data-table th {
  background-color: #f8fafc;
  padding: 0.75rem 1rem;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}
.data-table tr:hover td {
  background-color: #f8fafc;
}

/* POS Screen specific styling */
.pos-product-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  padding: 0.75rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.pos-product-card:hover {
  border-color: #059669;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
  transform: translateY(-2px);
}
.pos-product-card:active {
  transform: scale(0.97);
}

/* Code block preview */
pre.code-viewer {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  line-height: 1.6;
  direction: ltr;
  text-align: left;
  overflow-x: auto;
}

/* PRINT STYLES (A4 and Thermal 80mm) */
@media print {
  body * {
    visibility: hidden;
  }
  #print-zone, #print-zone * {
    visibility: visible;
  }
  #print-zone {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    display: block !important;
    background: #ffffff;
    color: #000000;
    font-family: 'Cairo', sans-serif !important;
    direction: rtl;
  }

  /* Thermal 80mm Receipt Mode */
  .receipt-thermal {
    width: 78mm !important;
    max-width: 78mm !important;
    margin: 0 auto !important;
    padding: 2mm !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
  }
  .receipt-thermal table th, .receipt-thermal table td {
    padding: 3px 1px !important;
    font-size: 10px !important;
  }

  /* Standard A4 Mode */
  .receipt-a4 {
    width: 100% !important;
    max-width: 210mm !important;
    margin: 0 auto !important;
    padding: 12mm !important;
    font-size: 13px !important;
  }
}