/* ============================================
   GESTOCK - Feuille de style complète (standalone)
   Même rendu que le projet Pro / React
   ============================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: #fff; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.5; color: #111827; -webkit-font-smoothing: antialiased; }

/* Variables */
:root {
  --teal-50: #f0fdfa;   --teal-100: #ccfbf1;  --teal-200: #99f6e4;  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;   --teal-600: #0d9488;  --teal-700: #0f766e;
  --blue-50: #eff6ff;    --blue-100: #dbeafe;  --blue-200: #bfdbfe;  --blue-500: #3b82f6;  --blue-600: #2563eb;  --blue-700: #1d4ed8;
  --orange-50: #fff7ed;  --orange-100: #ffedd5;  --orange-200: #fed7aa;  --orange-500: #f97316;  --orange-600: #ea580c;  --orange-700: #c2410c;
  --purple-50: #faf5ff;  --purple-100: #f3e8ff;  --purple-200: #e9d5ff;  --purple-500: #a855f7;  --purple-600: #9333ea;  --purple-700: #7e22ce;
  --gray-50: #f9fafb;    --gray-100: #f3f4f6;   --gray-200: #e5e7eb;   --gray-300: #d1d5db;
  --gray-400: #9ca3af;   --gray-500: #6b7280;   --gray-600: #4b5563;   --gray-700: #374151;  --gray-900: #111827;
  --red-50: #fef2f2;     --red-500: #ef4444;    --red-600: #dc2626;
  --indigo-50: #eef2ff;  --indigo-100: #e0e7ff;  --indigo-200: #c7d2fe;  --indigo-500: #6366f1;
  --amber-100: #fef3c7;  --amber-700: #b45309;
}

a, button, [type="button"], [type="submit"] { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.6; }
img { max-width: 100%; height: auto; display: block; }

/* ========== LAYOUT FLEX / GRID ========== */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.block { display: block; }
.hidden { display: none !important; }

.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Gap */
.gap-1 { gap: 0.25rem; }   .gap-2 { gap: 0.5rem; }   .gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }      .gap-6 { gap: 1.5rem; }  .gap-8 { gap: 2rem; }

/* ========== SPACING ========== */
.p-2 { padding: 0.5rem; }   .p-4 { padding: 1rem; }   .p-5 { padding: 1.25rem; }   .p-6 { padding: 1.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.pl-10 { padding-left: 2.5rem; }  .pl-12 { padding-left: 3rem; }
.pr-4 { padding-right: 1rem; }

.m-0 { margin: 0; }
.mb-1 { margin-bottom: 0.25rem; }  .mb-2 { margin-bottom: 0.5rem; }  .mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }     .mb-6 { margin-bottom: 1.5rem; }  .mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }     .mt-2 { margin-top: 0.5rem; }    .mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }      .mt-8 { margin-top: 2rem; }
.ml-2 { margin-left: 0.5rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ========== WIDTH / HEIGHT ========== */
.w-full { width: 100%; }
.w-7 { width: 1.75rem; }   .w-8 { width: 2rem; }   .w-9 { width: 2.25rem; }
.w-10 { width: 2.5rem; }   .w-12 { width: 3rem; }  .w-20 { width: 5rem; }
.w-48 { width: 12rem; }    .w-64 { width: 16rem; }
.min-w-0 { min-width: 0; }
.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-7xl { max-width: 80rem; }
.max-w-\[1600px\] { max-width: 1600px; }

.h-5 { height: 1.25rem; }   .h-6 { height: 1.5rem; }   .h-7 { height: 1.75rem; }
.h-8 { height: 2rem; }     .h-9 { height: 2.25rem; }  .h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.min-h-screen { min-height: 100vh; }
.min-h-\[60vh\] { min-height: 60vh; }
.max-h-\[90vh\] { max-height: 90vh; }
.max-h-\[60vh\] { max-height: 60vh; }
.aspect-square { aspect-ratio: 1 / 1; }

/* ========== TYPOGRAPHY ========== */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-6xl { font-size: 3.75rem; }
.text-9xl { font-size: 8rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: ui-monospace, monospace; }
.whitespace-nowrap { white-space: nowrap; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.leading-tight { line-height: 1.25; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.italic { font-style: italic; }

/* Text colors */
.text-white { color: #fff; }
.text-gray-400 { color: var(--gray-400); }
.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.text-gray-900 { color: var(--gray-900); }
.text-teal-400 { color: var(--teal-400); }
.text-teal-600 { color: var(--teal-600); }
.text-teal-700 { color: var(--teal-700); }
.text-orange-500 { color: var(--orange-500); }
.text-orange-600 { color: var(--orange-600); }
.text-blue-600 { color: var(--blue-600); }
.text-blue-700 { color: var(--blue-700); }
.text-purple-600 { color: var(--purple-600); }
.text-red-500 { color: var(--red-500); }
.text-indigo-600 { color: #4f46e5; }

/* Text opacity (nav) */
.text-white\/70 { color: rgba(255,255,255,0.7); }

/* ========== BACKGROUNDS ========== */
.bg-white { background-color: #fff; }
.bg-black { background-color: #000; }
.bg-gray-50 { background-color: var(--gray-50); }
.bg-gray-100 { background-color: var(--gray-100); }
.bg-gray-900 { background-color: var(--gray-900); }
.bg-teal-50 { background-color: var(--teal-50); }
.bg-teal-100 { background-color: var(--teal-100); }
.bg-teal-200 { background-color: var(--teal-200); }
.bg-teal-500 { background-color: var(--teal-500); }
.bg-teal-600 { background-color: var(--teal-600); }
.bg-blue-50 { background-color: var(--blue-50); }
.bg-blue-100 { background-color: var(--blue-100); }
.bg-blue-200 { background-color: var(--blue-200); }
.bg-blue-500 { background-color: var(--blue-500); }
.bg-orange-50 { background-color: var(--orange-50); }
.bg-orange-100 { background-color: var(--orange-100); }
.bg-orange-200 { background-color: var(--orange-200); }
.bg-orange-500 { background-color: var(--orange-500); }
.bg-purple-50 { background-color: var(--purple-50); }
.bg-purple-100 { background-color: var(--purple-100); }
.bg-purple-200 { background-color: var(--purple-200); }
.bg-purple-500 { background-color: var(--purple-500); }
.bg-indigo-50 { background-color: var(--indigo-50); }
.bg-indigo-100 { background-color: var(--indigo-100); }
.bg-indigo-200 { background-color: var(--indigo-200); }
.bg-indigo-500 { background-color: var(--indigo-500); }
.bg-amber-100 { background-color: var(--amber-100); }
.bg-red-50 { background-color: var(--red-50); }
.bg-red-100 { background-color: #fee2e2; }

.bg-white\/20 { background-color: rgba(255,255,255,0.2); }
.bg-white\/10:hover { background-color: rgba(255,255,255,0.1); }
.hover\:bg-white\/20:hover { background-color: rgba(255,255,255,0.2); }
.hover\:bg-gray-50:hover { background-color: var(--gray-50); }
.hover\:bg-gray-100:hover { background-color: var(--gray-100); }
.hover\:bg-gray-200:hover { background-color: var(--gray-200); }
.hover\:bg-teal-50:hover { background-color: var(--teal-50); }
.hover\:bg-teal-100:hover { background-color: var(--teal-100); }
.hover\:bg-teal-600:hover { background-color: var(--teal-600); }
.hover\:bg-teal-700:hover { background-color: var(--teal-700); }
.hover\:bg-gray-800:hover { background-color: #1f2937; }
.hover\:bg-orange-700:hover { background-color: var(--orange-700); }

/* Gradients (cartes dashboard, barres) */
.bg-gradient-to-br.from-teal-50.to-teal-100\/50 { background: linear-gradient(to bottom right, var(--teal-50), rgba(204,251,241,0.5)); }
.bg-gradient-to-br.from-blue-50.to-blue-100\/50 { background: linear-gradient(to bottom right, var(--blue-50), rgba(219,234,254,0.5)); }
.bg-gradient-to-br.from-orange-50.to-orange-100\/50 { background: linear-gradient(to bottom right, var(--orange-50), rgba(255,237,213,0.5)); }
.bg-gradient-to-br.from-purple-50.to-purple-100\/50 { background: linear-gradient(to bottom right, var(--purple-50), rgba(237,233,254,0.5)); }
.bg-gradient-to-r.from-teal-500.to-teal-600 { background: linear-gradient(to right, var(--teal-500), var(--teal-600)); }
.bg-gradient-to-r.from-orange-500.to-orange-600 { background: linear-gradient(to right, var(--orange-500), var(--orange-600)); }
.bg-gradient-to-r.from-blue-500.to-blue-600 { background: linear-gradient(to right, var(--blue-500), var(--blue-600)); }
.bg-gradient-to-r.from-teal-50.to-teal-100\/50 { background: linear-gradient(to right, var(--teal-50), rgba(204,251,241,0.5)); }
.bg-gradient-to-r.from-blue-50.to-blue-100\/50 { background: linear-gradient(to right, var(--blue-50), rgba(219,234,254,0.5)); }
.bg-gradient-to-r.from-orange-50.to-orange-100\/50 { background: linear-gradient(to right, var(--orange-50), rgba(255,237,213,0.5)); }
.bg-gradient-to-r.from-purple-50.to-purple-100\/50 { background: linear-gradient(to right, var(--purple-50), rgba(237,233,254,0.5)); }

/* ========== BORDERS ========== */
.border { border-width: 1px; border-style: solid; }
.border-2 { border-width: 2px; border-style: solid; }
.border-b { border-bottom-width: 1px; border-style: solid; }
.border-t { border-top-width: 1px; border-style: solid; }
.border-gray-200 { border-color: var(--gray-200); }
.border-gray-300 { border-color: var(--gray-300); }
.border-teal-200 { border-color: var(--teal-200); }
.border-blue-200 { border-color: var(--blue-200); }
.border-orange-200 { border-color: var(--orange-200); }
.border-purple-200 { border-color: var(--purple-200); }
.border-indigo-200 { border-color: var(--indigo-200); }
.border-dashed { border-style: dashed; }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* ========== POSITION / DISPLAY ========== */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { inset: 0; }
.top-0 { top: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }
.z-\[100\] { z-index: 100; }

.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* ========== GRID LAYOUT ========== */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lg\:col-span-2 { grid-column: span 2 / span 2; }
.lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.divide-y > * + * { border-top-width: 1px; border-color: var(--gray-200); }
.divide-gray-200 > * + * { border-color: var(--gray-200); }
.divide-gray-100 > * + * { border-color: var(--gray-100); }

/* ========== IMPRESSION REÇU POS ========== */
@media print {
  @page {
    /* Format type ticket / petite page, marge réduite */
    margin: 5mm;
  }

  /* Éviter les doubles pages inutiles */
  html, body {
    margin: 0;
    padding: 0;
    height: auto;
    min-height: auto;
  }

  /* Cacher tout par défaut */
  body * {
    visibility: hidden;
  }
  /* Afficher uniquement le contenu du reçu */
  #receiptModal,
  #receiptModal * {
    visibility: visible;
  }
  /* Centrer le modal sur la page imprimée */
  #receiptModal {
    position: static !important;
    inset: auto !important;
    background: #fff !important;
    box-shadow: none !important;
    width: 100% !important;
  }
  #receiptModal .modal-content {
    max-width: 80mm !important; /* largeur type ticket */
    max-height: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    margin: 0 auto !important;
  }

  /* Éviter les coupures étranges dans le reçu */
  #receiptContent {
    page-break-inside: avoid;
  }
  /* Masquer les boutons d'action à l'impression */
  #btnPrintReceipt,
  #btnShareWhatsApp,
  #btnNewSale,
  #closeReceipt {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:col-span-2 { grid-column: span 2 / span 2; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ========== TABLE ========== */
table { width: 100%; border-collapse: collapse; }
thead th { background-color: var(--gray-50); font-size: 0.75rem; font-weight: 600; color: var(--gray-600); text-transform: uppercase; letter-spacing: 0.05em; padding: 0.75rem 1.5rem; text-align: left; }
tbody td { padding: 1rem 1.5rem; font-size: 0.875rem; border-bottom: 1px solid var(--gray-200); }
tbody tr:hover { background-color: var(--gray-50); }

/* ========== FORM ========== */
input, select, textarea { font-size: inherit; font-family: inherit; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--gray-300); border-radius: 0.5rem;
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.3);
}
.relative input { position: relative; }
.absolute.left-4 { left: 1rem; }
.absolute.left-3\.5 { left: 0.875rem; }
.-translate-y-1\/2 { transform: translateY(-50%); }
.top-1\/2 { top: 50%; }

/* ========== HEADER / NAVBAR (comme gestock.readdy.co) ========== */
header {
  background: #000;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  display: block;
  width: 100%;
}
header .px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
header .py-4 { padding-top: 1rem; padding-bottom: 1rem; }
/* Nav principale : toujours visible (équivalent md:flex sur le site de ref) */
.nav-main {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: nowrap;
}
header nav a {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}
header nav a:hover { color: #fff; }
header nav a.text-teal-400 { color: var(--teal-400); }
header nav a.text-white { color: #fff; }
header .text-white\/70 { color: rgba(255, 255, 255, 0.7); }
header img { display: block; height: 2.5rem; width: auto; object-fit: contain; }
header button { color: inherit; background: transparent; border: none; }
header button:hover { background: rgba(255, 255, 255, 0.1); }

/* ========== BUTTONS / LINKS ========== */
a, button { transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
.hover\:text-white:hover { color: #fff; }
.hover\:text-teal-700:hover { color: var(--teal-700); }
.hover\:text-gray-700:hover { color: var(--gray-700); }
.hover\:text-gray-900:hover { color: var(--gray-900); }
.hover\:border-teal-500:hover { border-color: var(--teal-500); }
.hover\:border-gray-300:hover { border-color: var(--gray-300); }
.transition-colors { transition-property: color, background-color, border-color; transition-duration: 0.15s; }
.transition-all { transition-property: all; transition-duration: 0.15s; }

/* ========== MODALS ========== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center;
  z-index: 50; padding: 1rem; animation: fadeIn 0.2s ease-out;
}
.modal-backdrop.hidden { display: none !important; }
.modal-content {
  background: #fff; border-radius: 0.75rem; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); animation: modalSlideIn 0.3s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalSlideIn {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ========== TOGGLE SWITCH (Paramètres) ========== */
.toggle-switch {
  position: relative; display: inline-flex; align-items: center; width: 2.75rem; height: 1.5rem;
  flex-shrink: 0; border-radius: 9999px; background: var(--gray-300); transition: background 0.2s;
}
.toggle-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; height: 1.25rem; width: 1.25rem;
  border-radius: 9999px; background: #fff; border: 1px solid var(--gray-300); transition: transform 0.2s;
}
.toggle-switch.active { background: var(--teal-500); }
.toggle-switch.active::after { transform: translateX(1.25rem); border-color: #fff; }
input.toggle-input { position: absolute; width: 0; height: 0; opacity: 0; margin: 0; }
label.toggle-label { cursor: pointer; display: inline-flex; align-items: center; }

/* ========== BADGES / PILLS ========== */
.rounded-full.px-2.py-1 { border-radius: 9999px; }
.text-teal-700.bg-teal-200 { color: var(--teal-700); background: var(--teal-200); }
.text-blue-700.bg-blue-200 { color: var(--blue-700); background: var(--blue-200); }
.text-orange-700.bg-orange-200 { color: var(--orange-700); background: var(--orange-200); }
.text-purple-700.bg-purple-200 { color: var(--purple-700); background: var(--purple-200); }
.text-gray-600.bg-gray-100 { color: var(--gray-600); background: var(--gray-100); }
.text-teal-700.bg-teal-100 { color: var(--teal-700); background: var(--teal-100); }
.text-amber-700.bg-amber-100 { color: var(--amber-700); background: var(--amber-100); }
.text-indigo-700.bg-indigo-100 { color: #4338ca; background: var(--indigo-100); }
.text-red-700.bg-red-100 { color: #b91c1c; background: var(--red-50); }
.text-orange-700.bg-orange-100 { color: var(--orange-700); background: var(--orange-100); }

/* ========== SHADOWS ========== */
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); }

/* ========== OBJECT FIT ========== */
.object-contain { object-fit: contain; }
.object-cover { object-fit: cover; }

/* ========== SELECT NONE / POINTER EVENTS ========== */
.select-none { user-select: none; }
.pointer-events-none { pointer-events: none; }

/* ========== PRINT (Reçu) ========== */
/* Utilitaires supplémentaires */
.border-b-2 { border-bottom-width: 2px; border-style: solid; }
.border-t-2 { border-top-width: 2px; border-style: solid; }
.pt-2 { padding-top: 0.5rem; }  .pt-3 { padding-top: 0.75rem; }  .pt-4 { padding-top: 1rem; }
.pb-2 { padding-bottom: 0.5rem; }  .pb-3 { padding-bottom: 0.75rem; }  .pb-4 { padding-bottom: 1rem; }
.min-w-\[280px\] { min-width: 280px; }
.h-\[calc\(100vh-73px\)\] { height: calc(100vh - 73px); }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.disabled\:opacity-40:disabled { opacity: 0.4; }
.disabled\:cursor-not-allowed:disabled { cursor: not-allowed; }

/* ========== NOTIFICATIONS (Header) ========== */
.notif-trigger { position: relative; }
.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 9999px;
  border: 2px solid #000;
  line-height: 1;
}

.notif-panel { width: 320px; }
.notif-panel-inner {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.05);
  overflow: hidden;
}

.notif-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
  border-bottom: 1px solid #99f6e4;
}
.notif-header-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #14b8a6;
  color: #fff;
  border-radius: 12px;
  font-size: 1.25rem;
}
.notif-title { font-size: 1rem; font-weight: 600; color: #111827; margin: 0; }
.notif-subtitle { font-size: 0.8rem; color: #0d9488; margin: 2px 0 0 0; font-weight: 500; }

.notif-body { max-height: 380px; overflow-y: auto; overflow-x: hidden; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li {
  border-bottom: 1px solid #e5e7eb;
}
.notif-list li:last-child { border-bottom: none; }
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}
.notif-item:hover { background: #f0fdfa; }
.notif-item:active { background: #ccfbf1; }
.notif-item-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 1.15rem;
}
.notif-item-icon--warning { background: #fff7ed; color: #ea580c; }
.notif-item-icon--danger { background: #fef2f2; color: #dc2626; }
.notif-item-icon--success { background: #f0fdfa; color: #0d9488; }
.notif-item-icon--info { background: #eff6ff; color: #2563eb; }
.notif-item-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.notif-item-title { font-size: 0.9rem; font-weight: 600; color: #111827; display: block; line-height: 1.35; word-break: break-word; }
.notif-item-meta { font-size: 0.75rem; color: #6b7280; margin-top: 2px; }
.notif-item-meta .notif-item-action { color: #14b8a6; font-weight: 500; }

.notif-empty {
  padding: 24px 18px;
  text-align: center;
}
.notif-empty-text {
  font-size: 0.95rem;
  color: #6b7280;
  margin: 0;
  font-weight: 500;
}

.notif-footer {
  padding: 10px 14px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}
.notif-footer-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #0d9488;
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.15s ease, color 0.15s ease;
}
.notif-footer-link:hover { background: #f0fdfa; color: #0f766e; }

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 992px) {
  /* Header compact on mobile */
  header .px-6 { padding-left: 0.75rem; padding-right: 0.75rem; }
  header .py-4 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
  .nav-main { display: none; }
  header .gap-8 { gap: 0.75rem; }
  header .text-sm { font-size: 0.8rem; }

  /* General spacing */
  .p-6 { padding: 1rem; }
  .px-6 { padding-left: 1rem; padding-right: 1rem; }
  .py-4 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .text-2xl { font-size: 1.25rem; line-height: 1.7rem; }
  .text-3xl { font-size: 1.5rem; line-height: 2rem; }
  .text-4xl { font-size: 1.8rem; line-height: 2.2rem; }

  /* Tables and cards are scroll-safe */
  .overflow-x-auto { -webkit-overflow-scrolling: touch; }
  table { min-width: 680px; }

  /* POS: stack product list and cart */
  .h-\[calc\(100vh-73px\)\] {
    height: auto;
    min-height: calc(100vh - 56px);
  }
  .h-\[calc\(100vh-73px\)\].flex {
    flex-direction: column;
  }
  .w-\[400px\] {
    width: 100%;
    border-left: 0;
    border-top: 1px solid var(--gray-200);
  }
  #posProducts.grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  #cartFooter {
    position: sticky;
    bottom: 0;
    z-index: 10;
  }

  /* Notifications panel fits viewport */
  .notif-panel {
    width: min(92vw, 360px);
    right: 0;
  }
}

@media (max-width: 640px) {
  /* Small phones */
  .p-6 { padding: 0.75rem; }
  .px-5 { padding-left: 0.875rem; padding-right: 0.875rem; }
  .py-3 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
  .text-xl { font-size: 1.05rem; line-height: 1.5rem; }
  .text-lg { font-size: 1rem; line-height: 1.5rem; }
  .rounded-xl { border-radius: 0.625rem; }
  .rounded-2xl { border-radius: 0.875rem; }

  /* Reduce very large empty spaces on mobile pages */
  .min-h-\[60vh\] { min-height: 40vh; }

  /* Keep modals usable on narrow screens */
  .modal-backdrop { padding: 0.5rem; }
  .modal-content {
    width: 100%;
    max-width: 100%;
    border-radius: 0.75rem;
  }
}

@media print {
  body * { visibility: hidden; }
  .print-receipt, .print-receipt * { visibility: visible; }
  .print-receipt { position: absolute; left: 0; top: 0; width: 100%; max-width: 350px; margin: 0; padding: 20px; background: #fff; }
  header, .no-print, .modal-backdrop .modal-content button { display: none !important; }
}
