* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: #f4f6fb;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* QR BAR */
.qr-bar {
  padding: 12px 20px;
  background: linear-gradient(135deg, #ffffff, #f9f9fc);
  border-bottom: 1px solid #eee;
  display: flex;
  gap: 12px;
}

/* LAYOUT */
.container {
  flex: 1;
  display: flex;
}

.cart-panel {
  width: 30%;
  background: #fff;
  border-right: 1px solid #eee;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px); /* subtract topbar height */
}

.product-panel {
  width: 70%;
  padding: 20px;
  overflow-y: auto;
}

/* CART */
.cart-header {
  padding: 15px;
  font-weight: 600;
  border-bottom: 1px solid #eee;
}

.cart-items {
  flex: 1; /* takes available space */
  overflow-y: auto; /* enables scrollbar */
  padding: 10px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid #f1f1f1;
}

.cart-footer {
  padding: 15px;
  border-top: 1px solid #eee;

  position: sticky;
  bottom: 0;
  background: #fff;

  z-index: 2;
}

.btn-checkout {
  width: 100%;
  margin-top: 10px;

  padding: 12px 14px;
  border: none;
  border-radius: 12px;

  font-size: 15px;
  font-weight: 700;
  color: #fff;

  background: linear-gradient(135deg, #7b2cbf, #9d4edd);

  box-shadow:
    0 6px 0 #7b2cbf,
    0 10px 20px rgba(0, 0, 0, 0.25);

  cursor: pointer;

  transition: all 0.15s ease-in-out;
  transform: translateY(0);
}

/* Hover effect */
.btn-checkout:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 0 #531f7d,
    0 14px 24px rgba(0, 0, 0, 0.3);
}

/* Click (3D press effect) */
.btn-checkout:active {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 #3a0466,
    0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Disabled state */
.btn-checkout:disabled {
  background: #9ca3af;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* PRODUCTS */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
}

.product-card {
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

/* SCANNER MODAL */
.scanner-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
}

.scanner-box {
  width: 350px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.scanner-header {
  padding: 12px;
  background: linear-gradient(135deg, #7b2cbf, #9d4edd);
  color: #fff;
  display: flex;
  justify-content: space-between;
}

.search-bar {
  margin-bottom: 15px;
}

.search-bar input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #ddd;
  outline: none;
  font-size: 14px;
  transition: 0.3s;
}

.search-bar input:focus {
  border-color: #7b2cbf;
  box-shadow: 0 0 0 3px rgba(123, 44, 191, 0.1);
}

#floatingScanner {
  position: fixed;
  bottom: 20px;
  right: 20px; /* ✅ move to right side */
  width: 280px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 9999;
}

#floatingScanner .scanner-header {
  padding: 10px;
  background: linear-gradient(135deg, #7b2cbf, #9d4edd);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#floatingScanner button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

#reader {
  width: 100%;
  height: 200px;
}

/* ================= COMBINED TOP BAR ================= */
.top-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  /* background: linear-gradient(135deg, #f4f6fb, #ffffff); */
  border-bottom: 1px solid #eee;
  gap: 20px;
}

.top-controls {
  position: sticky;
  top: 64px; /* same height as .topbar */
  z-index: 999;

  background: #fff; /* important so it doesn't become transparent */
}

.topbar {
  height: 64px;
  position: sticky;
  top: 0;
}

.container,
.product-panel,
.cart-panel {
  margin-top: 10px; /* optional tweak */
}
.top-controls {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* ================= QR BAR ================= */
.qr-bar {
  display: flex;
  gap: 10px;
}

/* ================= NAV BAR ================= */
.top-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* HOVER EFFECT (PRESS DOWN) */
.top-nav a:hover {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #5a189a,
    0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ACTIVE STATE */
.top-nav a.active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #3c096c,
    0 4px 10px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #5a189a, #7b2cbf);
}

/* USER BADGE */
.top-nav .user {
  margin-left: 10px;
  padding: 8px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, #111827, #1f2937);
  color: #fff;
  font-size: 12px;
}

/* ================= PREMIUM BUTTON BASE ================= */
.btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s ease;
}

/* ================= SCAN BUTTON (3D PURPLE) ================= */
.btn-scan {
  color: #fff;
  background: linear-gradient(135deg, #7b2cbf, #9d4edd);
  box-shadow:
    0 4px 0 #5a189a,
    0 6px 12px rgba(0, 0, 0, 0.15);
}

/* hover */
.btn-scan:hover {
  transform: translateY(-1px);
}

/* click (pressed effect) */
.btn-scan:active {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 #5a189a,
    0 3px 6px rgba(0, 0, 0, 0.15);
}

/* ================= STOP BUTTON (LIGHT 3D) ================= */
.btn-stop {
  color: #333;
  background: linear-gradient(135deg, #ffffff, #f1f1f1);
  border: 1px solid #ddd;
  box-shadow:
    0 4px 0 #ccc,
    0 6px 10px rgba(0, 0, 0, 0.08);
}

/* hover */
.btn-stop:hover {
  transform: translateY(-1px);
}

/* click */
.btn-stop:active {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 #ccc,
    0 3px 6px rgba(0, 0, 0, 0.08);
}

/* =========================
   PREMIUM POS TOPBAR
========================= */
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;

  /* premium dark gradient */
  background: linear-gradient(135deg, #0f172a, #1e293b);

  /* glass + depth */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  /* subtle luxury border */
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);

  /* soft elevation */
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);

  color: #e2e8f0;

  position: sticky;
  top: 0;
  z-index: 1000;
}

.topbar .logo {
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 15px;

  background: linear-gradient(90deg, #22c55e, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Right section */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Logout button */
.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
  transition: 0.2s;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.swal-small {
  border-radius: 12px !important;
  font-family: "Poppins", sans-serif;
}

/* Title smaller */
.swal-title-small {
  font-size: 18px !important;
  font-weight: 600;
}

/* Text smaller */
.swal-text-small {
  font-size: 13px !important;
  color: #555 !important;
}

/* Base button style */
.swal-btn {
  border: none !important;
  border-radius: 8px !important;
  padding: 8px 14px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  transition: 0.2s ease;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
}

/* Confirm button (purple) */
.swal-confirm {
  background: linear-gradient(135deg, #7b2cbf, #9d4edd) !important;
  color: #fff !important;
}

.swal-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.swal-confirm:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

/* Cancel button (light) */
.swal-cancel {
  background: #f1f1f1 !important;
  color: #333 !important;
}

.swal-cancel:hover {
  background: #e5e5e5 !important;
  transform: translateY(-1px);
}

.swal-cancel:active {
  transform: translateY(2px);
}

.swal2-actions {
  display: flex !important;
  gap: 10px !important; /* ✅ space between buttons */
  margin-top: 10px !important;
}

/* Optional: ensure buttons don't stick */
.swal2-actions button {
  min-width: 90px;
}

.checkout-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.checkout-box {
  width: min(1100px, 98%);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.checkout-header {
  padding: 12px;
  background: linear-gradient(135deg, #7b2cbf, #9d4edd);
  color: #fff;
  display: flex;
  justify-content: space-between;
}

.checkout-body {
  padding: 15px;
}

.checkout-body input {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.btn-process {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #7b2cbf, #9d4edd);
  color: #fff;
  cursor: pointer;
}

/* TITLE */
.page-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #ffffff;
  background: linear-gradient(90deg, #7b2cbf, #9d4edd);
  padding: 6px 14px;
  border-radius: 6px;
  display: inline-block;
}

/* ACTION BAR */
.action-bar {
  margin-top: 10px;
}

/* BUTTON GROUP */
.action-buttons {
  display: flex;
  gap: 10px;
}

/* BASE BUTTON STYLE */
.action-buttons button {
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.2s ease;
}

/* PRIMARY BUTTON */
.btn-primary {
  background: linear-gradient(135deg, #7b2cbf, #5a189a);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(123, 44, 191, 0.3);
}

/* SECONDARY BUTTON */
.btn-secondary {
  background: #2b2b2b;
  color: #fff;
}

.btn-secondary:hover {
  background: #3a3a3a;
  transform: translateY(-2px);
}

/* ICONS */
.action-buttons i {
  font-size: 12px;
}

/* STOCK BADGES */
.stock-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
}

.stock-ok {
  background: #e6f9f0;
  color: #16a34a;
}

.stock-low {
  background: #ffecec;
  color: #e74c3c;
}

/* 🔴 Critical stock */
.stock-critical {
  background: #ffe4e6;
  color: #b91c1c;
  font-weight: 600;
}

/* ================= PRODUCT TABLE ================= */
.product-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

/* HEADER */
.product-table thead {
  background: linear-gradient(135deg, #7b2cbf, #9d4edd);
  color: #fff;
}

.product-table th {
  padding: 14px;
  font-size: 13px;
  text-align: left;
}

/* BODY */
.product-table td {
  padding: 12px 14px;
  font-size: 13px;
  border-bottom: 1px solid #f1f1f1;
}

/* ROW HOVER */
.product-table tbody tr:hover {
  background: #f9f9fc;
}

/* ACTION BUTTONS */
.btn-edit,
.btn-delete {
  border: none;
  padding: 6px 10px;
  margin-right: 5px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.btn-edit {
  background: #e0f2fe;
  color: #0284c7;
}

.btn-delete {
  background: #fee2e2;
  color: #dc2626;
}

/* EMPTY STATE */
.product-table td[colspan] {
  color: #888;
}

/* ================= DATATABLE WRAPPER ================= */
.dataTables_wrapper {
  width: 100%;
  padding: 15px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Top controls (Show entries + Search) */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  display: inline-block;
  margin-bottom: 15px;
}

.dataTables_wrapper .dataTables_length {
  float: left;
}

.dataTables_wrapper .dataTables_filter {
  float: right;
  text-align: right;
}

/* Clear floats */
.dataTables_wrapper::after {
  content: "";
  display: block;
  clear: both;
}

/* Table spacing */
table.dataTable {
  width: 100% !important;
  border-collapse: collapse;
}

/* Pagination styling */
.dataTables_wrapper .dataTables_paginate {
  margin-top: 15px;
  text-align: right;
}

/* Show entries dropdown */
.dataTables_length select {
  padding: 5px;
  border-radius: 6px;
}

/* Search input */
.dataTables_filter input {
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;

  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding: 10px 6px;
}

/* ================= PRODUCT CARD ================= */
.product-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff, #f9fafc);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;

  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);

  transition: all 0.25s ease;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

/* ================= PRODUCT NAME ================= */
.product-name {
  font-size: 14.5px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 6px;
  line-height: 1.4;
  letter-spacing: 0.2px;
}

/* ================= STOCK TEXT ================= */
.product-stock {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
  opacity: 0.9;
}

/* LOW STOCK WARNING */
.product-card.low-stock .product-stock {
  color: #f59e0b;
  font-weight: 600;
}

/* ================= PRICE ================= */
.product-price {
  font-size: 15.5px;
  font-weight: 700;
  color: #2563eb;
  letter-spacing: 0.3px;
}

/* ================= PRODUCT CARD ================= */
.product-card {
  position: relative;
  border-radius: 14px;
  padding: 14px;

  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid rgba(0, 0, 0, 0.05);

  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  transition: all 0.25s ease;

  cursor: pointer;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}
/* ================= SOLD OUT OVERLAY (ENHANCED) ================= */
.sold-out {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-10deg) scale(0.95);

  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #ffffff;

  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;

  padding: 10px 22px;
  border-radius: 10px;

  z-index: 2;

  display: flex;
  align-items: center;
  gap: 6px;

  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);

  animation: soldPop 0.35s ease;
  transition: all 0.25s ease;
}

/* ❌ icon */
.sold-out::before {
  content: "✖";
  font-size: 12px;
  font-weight: bold;
}

/* subtle hover animation */
.product-card:hover .sold-out {
  transform: translate(-50%, -50%) rotate(-10deg) scale(1);
}

/* ================= ANIMATION ================= */
@keyframes soldPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -60%) rotate(-10deg) scale(0.7);
  }
  60% {
    transform: translate(-50%, -48%) rotate(-10deg) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-10deg) scale(0.95);
  }
}

/* ================= DIM SOLD OUT CARD ================= */
.product-card:has(.sold-out) {
  opacity: 0.65;
  filter: grayscale(0.35) contrast(0.95);
  transition: 0.3s ease;
}

/* optional: slight dark overlay for depth */
.product-card:has(.sold-out)::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.05);
  z-index: 1;
}

/* ================= GRID CONTAINER ================= */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;

  width: 100%;
  max-width: 100%;

  overflow-y: auto;
  padding: 10px 8px;

  max-height: calc(100vh - 180px);
}

/* ================= SCROLLBAR (MODERN LOOK) ================= */
.products::-webkit-scrollbar {
  width: 6px;
}

.products::-webkit-scrollbar-track {
  background: transparent;
}

.products::-webkit-scrollbar-thumb {
  background: #c7d2fe;
  border-radius: 10px;
  transition: background 0.3s;
}

.products::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.swal-toast-premium {
  font-family: inherit;
  backdrop-filter: blur(6px);
}

.swal2-toast {
  align-items: center !important;
}

.swal-toast-tight {
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

/* Title spacing */
.swal-title-tight {
  font-size: 14px !important;
  font-weight: 600 !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}

/* Message spacing */
.swal-text-tight {
  font-size: 12.5px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}

/* Reduce internal spacing */
.swal2-toast .swal2-title {
  margin: 0 !important;
}

.swal2-toast .swal2-html-container {
  margin: 0 !important;
}

.swal-toast-green {
  border-radius: 10px;
  border: 1px solid #10b981;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.15);
}

.btn-stock-premium {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 12px;
  border-radius: 8px;

  font-size: 13px;
  font-weight: 600;

  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #059669);

  border: none;
  cursor: pointer;

  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
  transition: all 0.2s ease;
}

.btn-stock-premium:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.35);
}

.btn-stock-premium:active {
  transform: scale(0.98);
}

.btn-stock-premium .icon {
  font-size: 14px;
  line-height: 1;
}

.btn-stock-out {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 12px;
  border-radius: 8px;

  font-size: 13px;
  font-weight: 600;

  color: #ffffff;

  /* 🔥 red variant (danger / transfer out) */
  background: linear-gradient(135deg, #ef4444, #dc2626);

  border: none;
  cursor: pointer;

  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.25);

  transition: all 0.2s ease;
}

.btn-stock-out:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 14px rgba(239, 68, 68, 0.35);
}

.btn-stock-out:active {
  transform: scale(0.98);
}

.btn-stock-out .icon {
  font-size: 14px;
  line-height: 1;
}

.btn-history-premium {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 12px;
  border-radius: 8px;

  font-size: 13px;
  font-weight: 600;

  color: #ffffff;

  /* 🟣 purple/indigo history theme */
  background: linear-gradient(135deg, #6366f1, #4f46e5);

  border: none;
  cursor: pointer;

  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25);

  transition: all 0.2s ease;
}

.btn-history-premium:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 14px rgba(99, 102, 241, 0.35);
}

.btn-history-premium:active {
  transform: scale(0.98);
}

.btn-history-premium .icon {
  font-size: 14px;
  line-height: 1;
}

.swal2-container {
  z-index: 999999 !important;
}

.swal-receipt {
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.btn-view-premium {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 12px;
  border-radius: 8px;

  font-size: 13px;
  font-weight: 600;

  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #059669);

  border: none;
  cursor: pointer;

  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
  transition: all 0.2s ease;
}

.btn-view-premium:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.35);
}

.btn-view-premium:active {
  transform: scale(0.96);
}

.btn-view-premium .icon {
  font-size: 14px;
}

.notif-wrapper {
  position: relative;
  cursor: pointer;
  margin-right: 15px;
}

.notif-icon {
  font-size: 18px;
  color: #374151;
}

.notif-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: red;
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 50%;
  font-weight: bold;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.card {
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.card h3 {
  font-size: 14px;
  color: #6b7280;
}

.card p {
  font-size: 22px;
  font-weight: bold;
  margin-top: 5px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.panel {
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.full-width {
  margin-top: 20px;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
  padding: 10px;
  border-bottom: 1px solid #eee;
}

/* ✅ DASHBOARD LAYOUT FIX */

.container.dashboard-page {
  display: block !important;
  flex-direction: column;
}

.container.dashboard-page {
  display: block !important;
  padding: 20px;
}

.dashboard-cards {
  margin-top: 10px;
}

.dashboard-table td:nth-child(2),
.dashboard-table th:nth-child(2) {
  text-align: right;
}

.dashboard-page .dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.dashboard-page .card {
  position: relative;
  padding: 18px;
  border-radius: 14px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.25s ease;
}

.dashboard-page .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.dashboard-page .card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.dashboard-page .card-header h3 {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.9;
}

.dashboard-page .card-icon {
  font-size: 18px;
}

.dashboard-page .card p {
  font-size: 26px;
  font-weight: 700;
}

/* Base card stays the same */
.dashboard-page .card {
  position: relative;
  padding: 18px;
  border-radius: 14px;
  color: #111827;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease;
}

.dashboard-page .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.1);
}

/* Header */
.dashboard-page .card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.dashboard-page .card-header h3 {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
}

.dashboard-page .card-icon {
  font-size: 18px;
  opacity: 0.8;
}

/* Value */
.dashboard-page .card p {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

/* ================= SOFT GRADIENT ACCENTS ================= */

/* Sales */
.dashboard-page .card-sales {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border-left: 4px solid #a78bfa;
}

/* Transactions */
.dashboard-page .card-transactions {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-left: 4px solid #60a5fa;
}

/* Products */
.dashboard-page .card-products {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-left: 4px solid #34d399;
}

/* Low Stock */
.dashboard-page .card-lowstock {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border-left: 4px solid #f87171;
}

.form-group {
  margin-top: 10px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
}

.form-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 14px;
  transition: all 0.2s ease;
  outline: none;
}

.form-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* optional: nicer arrow */
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg fill='%236b7280' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 7l4.5 5 4.5-5H5.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}

.role-badge {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.role-admin {
  background: #fee2e2;
  color: #991b1b;
}

.role-cashier {
  background: #dbeafe;
  color: #1e40af;
}

.password-group {
  position: relative;
  margin-top: 10px;
}

.password-group input {
  width: 100%;
  padding: 10px 40px 10px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  outline: none;
  transition: 0.2s;
}

.password-group input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.toggle-pass {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 14px;
  color: #6b7280;
  user-select: none;
}

.toggle-pass:hover {
  color: #111827;
}

/* =========================
   RESPONSIVE DESIGN
========================= */

/* 📱 TABLET (≤ 1024px) */
@media (max-width: 1024px) {
  .container {
    flex-direction: column;
  }

  .cart-panel,
  .product-panel {
    width: 100%;
    height: auto;
  }

  .cart-panel {
    border-right: none;
    border-bottom: 1px solid #eee;
  }

  .products {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .top-controls {
    flex-wrap: wrap;
    gap: 10px;
  }

  .top-nav {
    flex-wrap: wrap;
  }
}

/* 📱 MOBILE (≤ 768px) */
@media (max-width: 768px) {
  /* STACK EVERYTHING */
  .container {
    flex-direction: column;
  }

  /* PANELS FULL WIDTH */
  .cart-panel,
  .product-panel {
    width: 100%;
  }

  /* MAKE CART COLLAPSIBLE STYLE */
  .cart-panel {
    max-height: 40vh;
    overflow-y: auto;
  }

  /* PRODUCTS GRID SMALLER */
  .products {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* PRODUCT CARD COMPACT */
  .product-card {
    padding: 10px;
  }

  .product-name {
    font-size: 13px;
  }

  .product-price {
    font-size: 14px;
  }

  /* TOP BAR STACK */
  .top-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  /* NAV BUTTONS WRAP */
  .top-nav {
    flex-wrap: wrap;
    width: 100%;
  }

  .top-nav a {
    flex: 1;
    text-align: center;
    font-size: 12px;
    padding: 8px;
  }

  /* QR BAR STACK */
  .qr-bar {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  /* SEARCH FULL WIDTH */
  .search-bar input {
    font-size: 13px;
    padding: 10px;
  }

  /* TABLE SCROLL */
  .product-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  /* FLOATING SCANNER SMALLER */
  #floatingScanner {
    width: 90%;
    right: 5%;
    bottom: 10px;
  }
}

/* 📱 SMALL MOBILE (≤ 480px) */
@media (max-width: 480px) {
  .products {
    grid-template-columns: 1fr;
  }

  .product-card {
    padding: 12px;
  }

  .page-title {
    font-size: 14px;
  }

  .btn {
    font-size: 12px;
    padding: 8px;
  }

  .cart-footer {
    padding: 10px;
  }

  .btn-checkout {
    font-size: 13px;
    padding: 10px;
  }
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  padding: 8px 12px;
  border-radius: 10px;

  color: #fff;
  background: linear-gradient(135deg, #ef4444, #dc2626);

  font-size: 16px;

  box-shadow:
    0 4px 10px rgba(220, 38, 38, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);

  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

/* Hover effect */
.logout-btn:hover {
  transform: translateY(-2px) scale(1.03);
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow:
    0 6px 18px rgba(220, 38, 38, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Click (press) effect */
.logout-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}

/* Optional subtle shine effect */
.logout-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
}

.logout-btn:hover::after {
  animation: shine 0.6s ease;
}

@keyframes shine {
  0% {
    left: -75%;
  }
  100% {
    left: 125%;
  }
}

.checkout-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.checkout-box {
  width: 900px;
  max-width: 95%;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  font-family: "Poppins", sans-serif;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.checkout-header {
  background: #111827;
  color: #fff;
  padding: 15px 20px;
  font-size: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.checkout-body {
  display: flex;
}

/* LEFT SIDE */
.checkout-left {
  width: 60%;
  padding: 16px;
  border-right: 1px solid #eee;
}

#checkoutItems {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 15px;
}

.checkout-total {
  font-size: 24px;
  font-weight: bold;
  text-align: right;
  color: #16a34a;
}

/* RIGHT SIDE */
.checkout-right {
  padding: 20px;
  background: #ffffff;

  /* 🔥 FIX: full height + flexible layout */
  display: flex;
  flex-direction: column;
  height: 100%;
}

.checkout-right input {
  padding: 12px;
  font-size: 18px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.change-box {
  font-size: 20px;
  font-weight: bold;
  color: #2563eb;
}

.btn-process {
  margin-top: auto;
  padding: 14px;
  font-size: 16px;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.btn-process:hover {
  background: #15803d;
}

.key-hint {
  margin-left: 8px;
  padding: 2px 6px;
  font-size: 11px;
  background: #111827;
  color: #fff;
  border-radius: 4px;
  font-weight: 500;
}

.btn-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.btn-close:hover {
  color: #f87171;
}

.checkout-header i,
.checkout-left i,
.checkout-right i,
.btn-process i {
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: middle;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkout-left h3 {
  display: flex;
  align-items: center;
  gap: 6px;
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.change-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-process {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 12px;
  margin-bottom: 10px;

  background: #fff;
  border-radius: 10px;

  border: 1px solid #eee;
  transition: 0.2s;
}

.cart-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* LEFT SIDE */
.item-info {
  display: flex;
  flex-direction: column;
}

.item-name {
  font-weight: 600;
  font-size: 14px;
  color: #111827;
}

.item-price {
  font-size: 12px;
  color: #6b7280;
}

/* RIGHT CONTROLS */
.item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* QTY BUTTONS */
.qty-btn {
  width: 28px;
  height: 28px;

  border: none;
  border-radius: 6px;

  font-size: 18px;
  font-weight: bold;

  cursor: pointer;
}

.qty-btn.minus {
  background: #fee2e2;
  color: #b91c1c;
}

.qty-btn.plus {
  background: #dcfce7;
  color: #166534;
}

.qty-btn:hover {
  filter: brightness(0.95);
}

/* QTY BADGE */
.qty-badge {
  min-width: 28px;
  text-align: center;
  font-weight: bold;
}

/* REMOVE BUTTON */
.remove-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #ef4444;
  padding: 4px;
}

.remove-btn:hover {
  transform: scale(1.1);
}

/* EMPTY CART */
.empty-cart {
  text-align: center;
  color: #9ca3af;
  padding: 20px;
}

.checkout-header-row,
.checkout-item-row {
  display: grid;
  grid-template-columns: 1fr 60px 120px;
  align-items: center;
  gap: 10px;
}

.checkout-header-row {
  font-weight: 700;
  font-size: 13px;
  color: #6b7280;
  padding: 8px 0;
  border-bottom: 2px solid #e5e7eb;
}

.checkout-item-row {
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px dashed #e5e7eb;
}

.col-item {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-qty {
  text-align: center;
  font-weight: 600;
}

.col-amount {
  text-align: right;
  font-weight: 600;
  color: #111827;
}

.checkout-divider {
  margin: 5px 0;
}

.btn-close {
  display: flex;
  align-items: center;
  gap: 6px;

  background: transparent;
  border: none;
  color: #fff;

  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
}

.btn-close i {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* KEYCAP FIX */
.btn-close .keycap {
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 4px;

  background: rgba(255, 255, 255, 0.15);
  color: #fff;

  display: flex;
  align-items: center;
  justify-content: center;

  line-height: 1;
}

/* OPTIONAL: hover effect like POS */
.btn-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.checkout-right label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #374151;
}

.checkout-right input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  outline: none;
  font-size: 14px;
}

.top-nav a {
  display: flex;
  align-items: center;
  gap: 8px;

  padding: 10px 14px;
  border-radius: 8px;

  text-decoration: none;
  color: #374151;

  position: relative;
  transition: 0.2s;
}

.top-nav a i {
  width: 18px;
  height: 18px;
}

/* KEYCAP STYLE */
.top-nav .keycap {
  margin-left: auto;

  font-size: 10px;
  padding: 3px 6px;

  background: #111827;
  color: #fff;

  border-radius: 4px;

  opacity: 0.7;
}

/* ACTIVE STATE */
.top-nav a.active {
  background: #111827;
  color: #fff;
}

.top-nav a.active .keycap {
  background: #fff;
  color: #111827;
}

.top-nav {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

/* NAV BUTTON */
.top-nav a {
  display: flex;
  align-items: center;
  gap: 6px;

  padding: 6px 10px; /* 🔥 smaller */
  font-size: 12px; /* 🔥 smaller text */

  border-radius: 6px;
  text-decoration: none;

  color: #374151;
  transition: 0.2s;
}

/* ICON */
.top-nav a i {
  width: 14px; /* 🔥 smaller icon */
  height: 14px;
}

/* KEYCAP (SHORTCUT) */
.top-nav .keycap {
  margin-left: auto;

  font-size: 9px; /* 🔥 smaller text */
  padding: 2px 5px; /* 🔥 tighter */

  border-radius: 4px;
  background: #111827;
  color: #fff;

  opacity: 0.75;
}

/* ACTIVE STATE */
.top-nav a.active {
  background: #111827;
  color: #fff;
}

.top-nav a.active .keycap {
  background: #fff;
  color: #111827;
}

/* .swal-pos-mini {
  border-radius: 10px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.swal-title-mini {
  padding-bottom: 4px !important;
}

.swal-text-mini {
  margin-top: 0 !important;
} */

.swal-btn {
  font-size: 12px !important;
  padding: 6px 14px !important;
  border-radius: 6px !important;
}

.swal-btn-danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;

  font-size: 12px;
  font-weight: 600;

  padding: 7px 16px;
  border-radius: 8px;

  border: none;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.3);

  transition: 0.2s ease;
}

.swal-btn-danger:hover {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(185, 28, 28, 0.4);
}

.swal-btn-danger:active {
  transform: scale(0.98);
}

.swal-btn-warning {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #fff;

  font-size: 12px;
  font-weight: 600;

  padding: 7px 16px;
  border-radius: 8px;

  border: none;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);

  transition: 0.2s ease;
}

.swal-btn-warning:hover {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  transform: translateY(-1px);
}

.swal-btn-warning:active {
  transform: scale(0.98);
}

.product-card {
  position: relative;
  background: #fff;

  padding: 10px 12px;
  border-radius: 10px;

  border: 1px solid #e5e7eb;

  cursor: pointer;

  transition: 0.2s ease;

  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* NAME */
.product-name {
  font-size: 13px;
  font-weight: 600;
  color: #111827;

  /* ✅ WRAP TEXT INSTEAD OF CUTTING */
  white-space: normal;
  overflow: visible;
  text-overflow: unset;

  line-height: 1.3;

  /* keeps layout clean */
  word-break: break-word;
}

/* BOTTOM ROW */
.product-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* PRICE */
.product-price {
  font-size: 13px;
  font-weight: 700;
  color: #16a34a;
}

/* STOCK */
.product-stock {
  font-size: 11px;
  color: #6b7280;
}

.product-stock.out {
  color: #ef4444;
}

/* SOLD OUT BADGE */
.sold-out-badge {
  position: absolute;
  top: 8px;
  right: 8px;

  font-size: 10px;
  font-weight: 700;

  padding: 3px 6px;
  border-radius: 6px;

  background: #ef4444;
  color: #fff;
}

/* TOAST MINI */
.swal-toast-mini {
  font-size: 12px !important;
  border-radius: 10px !important;
}

.pos-sidebar {
  position: fixed;
  top: 20px;
  right: 20px;

  display: flex;
  flex-direction: column;
  gap: 10px;

  z-index: 99999;
}

/* NOTIFICATION CARD */
.pos-alert {
  min-width: 240px;
  max-width: 280px;

  padding: 10px 12px;
  border-radius: 10px;

  font-family: "Poppins", sans-serif;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);

  animation: slideIn 0.3s ease;
  display: flex;
  gap: 10px;
}

/* ERROR STYLE */
.pos-alert.error {
  background: #fff1f2;
  border-left: 4px solid #ef4444;
  color: #991b1b;
}

/* 🟡 WARNING */
.pos-alert.warning {
  background: #fffbeb;
  border-left: 5px solid #f59e0b;
  color: #92400e;
}

/* ICON AREA */
.pos-alert .icon {
  font-size: 18px;
}

/* TEXT */
.pos-alert .content {
  display: flex;
  flex-direction: column;
}

.pos-alert .title {
  font-size: 13px;
  font-weight: 600;
}

.pos-alert .message {
  font-size: 12px;
  opacity: 0.9;
}

/* ANIMATION */
@keyframes slideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.empty-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 30px 15px;
  margin-top: 20px;

  text-align: center;
  color: #6b7280;
}

.empty-icon {
  font-size: 34px;
  margin-bottom: 10px;

  opacity: 0.8;
}

.empty-title {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
}

.empty-subtitle {
  font-size: 12px;
  color: #9ca3af;
}

/* CARD */
.product-card {
  color: #111827;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
  padding: 10px;
  border-radius: 10px;
}

/* NAME */
.product-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

/* WHOLESALE (BIG) */
.product-wholesale {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
}

/* BOTTOM ROW (RETAIL + STOCK) */
.product-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

/* RETAIL */
.product-retail {
  font-size: 12px;
  font-weight: 500;
  color: rgba(17, 24, 39, 0.75);
}

/* STOCK */
.product-stock {
  font-size: 11px;
  color: rgba(17, 24, 39, 0.75);
}

.product-stock.out {
  color: #dc2626;
  font-weight: 600;
}

/* SOLD OUT */
.sold-out-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(220, 38, 38, 0.9);
  color: #fff;
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 4px;
}

.swal-pos-mini {
  border-radius: 12px !important;
  font-family: "Poppins", sans-serif;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
  padding: 18px !important;
}

.swal-title-mini {
  font-size: 18px !important;
  font-weight: 600 !important;
}

.swal-text-mini {
  font-size: 13px !important;
  color: #6b7280 !important;
}

.swal-toast-mini {
  padding: 10px 12px !important;
}

/* TITLE */
.swal-title-mini {
  font-size: 13px !important;
  font-weight: 600 !important;
  margin: 0 !important;
}

/* TEXT */
.swal-text-mini {
  font-size: 12px !important;
  margin: 0 !important;
  opacity: 0.8;
}

/* LEFT BORDER THEMES */
.swal-success-border {
  border-left: 5px solid #10b981 !important;
}
.swal-error-border {
  border-left: 5px solid #ef4444 !important;
}
.swal-warning-border {
  border-left: 5px solid #f59e0b !important;
}
.swal-info-border {
  border-left: 5px solid #3b82f6 !important;
}
.swal-loading-border {
  border-left: 5px solid #7b2cbf !important;
}

.swal-btn-success {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.swal-btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(22, 163, 74, 0.25);
}

.swal-btn-success:active {
  transform: scale(0.97);
}

/* =========================
   PREMIUM CHECKOUT BUTTON
========================= */
.btn-checkout {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 12px 16px;
  border-radius: 12px;

  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;

  color: #ffffff;

  /* premium green gradient */
  background: linear-gradient(135deg, #16a34a, #22c55e);

  border: 1px solid rgba(255, 255, 255, 0.08);

  cursor: pointer;

  box-shadow:
    0 10px 20px rgba(22, 163, 74, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);

  transition: all 0.25s ease;

  overflow: hidden;
}

/* hover premium lift */
.btn-checkout:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 28px rgba(22, 163, 74, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* active press */
.btn-checkout:active {
  transform: translateY(0px) scale(0.98);
}

/* icon */
.btn-checkout .btn-icon {
  font-size: 16px;
}

/* FORM LABELS */
.checkout-left label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-top: 10px;
  display: block;
}

/* BETTER INPUT LOOK */
.checkout-left input {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  transition: 0.2s;
}

.checkout-left input:focus {
  border-color: #7b2cbf;
  box-shadow: 0 0 0 2px rgba(123, 44, 191, 0.1);
}

/* RIGHT SIDE BOX STYLE */
.checkout-right h3 {
  margin-bottom: 10px;
}

.change-box {
  background: #f9fafb;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
}

#productContainer {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px; /* reduce spacing between cards */
  padding: 8px;
}

.product-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  min-height: 95px; /* smaller height */
  padding: 8px; /* reduced padding */
  color: #111827;
}

/* PRODUCT NAME (COMPACT) */
.product-name {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.2;
}

/* WHOLESALE (LESS SPACE) */
.product-wholesale {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
}

/* BOTTOM ROW */
.product-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

/* RETAIL */
.product-retail {
  font-size: 11px;
  font-weight: 500;
  color: rgba(17, 24, 39, 0.75);
}

/* STOCK */
.product-stock {
  font-size: 10px;
  color: rgba(17, 24, 39, 0.7);
}

/* SOLD OUT BADGE (SMALLER) */
.sold-out-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(220, 38, 38, 0.9);
  color: #fff;
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 3px;
}

@media (max-width: 1400px) {
  #productContainer {
    /* grid-template-columns: repeat(4, 1fr); */
  }
}

@media (max-width: 1100px) {
  #productContainer {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  #productContainer {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  #productContainer {
    grid-template-columns: repeat(1, 1fr);
  }
}

.notif-icon {
  color: #ffffff !important;
}

.dashboard-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 10px;
}

/* BUTTON GROUP */
.filter-buttons {
  display: flex;
  gap: 8px;
}

.filter-btn {
  padding: 6px 12px;
  border: none;
  background: #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.filter-btn.active {
  background: #111827;
  color: #fff;
}

/* DATE RANGE */
.filter-range {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-range input {
  padding: 5px;
  font-size: 12px;
}

.btn-apply {
  padding: 6px 10px;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#dateRange {
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.qty-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.qty-box {
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 280px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.qty-box input {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
}

.qty-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.qty-box {
  max-width: 420px;
  width: 100%;
  padding: 0px;
}

/* add breathing space inside modal body */
#qtyModal .checkout-body {
  padding: 20px;
}

/* make left section less cramped */
#qtyModal .checkout-left {
  padding: 10px 5px;
}

/* nicer input spacing */
#qtyModal input {
  margin-top: 8px;
  margin-bottom: 15px;
  padding: 12px;
  font-size: 15px;
}

/* header spacing fix */
#qtyModal .checkout-header {
  padding: 15px 18px;
}

/* footer button spacing */
#qtyModal .btn-process {
  margin-right: 15px;
}

.active-cart-item {
  border: 2px solid #13a909;
  background: #0c890421;
  border-radius: 10px;
}

.cart-items {
  max-height: 60vh; /* or your preferred height */
  overflow-y: auto;
}

/* ================= COMPACT DASHBOARD TABLE ================= */
.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

/* HEADER */
.dashboard-table thead {
  background: #111827;
  color: #fff;
}

.dashboard-table thead th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.3px;
}

/* ROWS */
.dashboard-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: 0.2s ease;
}

.dashboard-table tbody tr:hover {
  background: #f9fafb;
}

/* CELLS */
.dashboard-table tbody td {
  padding: 8px 12px;
  vertical-align: middle;
  font-size: 13px;
  color: #374151;
}

/* PRODUCT NAME (compact strong look) */
.dashboard-table tbody td strong {
  font-weight: 600;
  color: #111827;
}

/* SOLD BADGE */
.dashboard-table tbody td span {
  display: inline-block;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
}

/* PROGRESS BAR WRAPPER */
.dashboard-table .progress {
  background: #e5e7eb;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
}

/* PROGRESS BAR */
.dashboard-table .progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  border-radius: 999px;
}

/* PANEL COMPACT */
.panel {
  padding: 12px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

/* PANEL TITLE */
.panel h3 {
  font-size: 14px;
  margin-bottom: 10px;
  font-weight: 600;
  color: #111827;
}

.swal-pos-mini {
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* SUCCESS BORDER */
.swal-border-success {
  border: 2px solid #22c55e;
}

/* ERROR BORDER */
.swal-border-error {
  border: 2px solid #ef4444;
}

/* WARNING BORDER */
.swal-border-warning {
  border: 2px solid #f59e0b;
}

/* INFO BORDER */
.swal-border-info {
  border: 2px solid #3b82f6;
}

.swal-btn-with-hint {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-weight: 600;
}

.swal-btn-with-hint .key-hint {
  font-size: 10px;
  opacity: 0.7;
  font-weight: 500;
}

.top-sold-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.top-bar-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-bar-name {
  width: 130px;
  font-size: 12px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-bar-track {
  flex: 1;
  height: 26px;
  background: #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.top-bar-fill {
  height: 100%;
  width: 0%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;

  font-size: 11px;
  font-weight: 700;
  color: white;

  background: linear-gradient(90deg, #22c55e, #16a34a);
  border-radius: 8px;

  transition: width 1s ease-in-out;
}

.checkout-table {
  width: 100%;
  font-size: 13px;
}

.checkout-row {
  display: grid;
  grid-template-columns: 2fr 0.7fr 1fr 1fr 1.2fr;
  padding: 6px 4px;
  align-items: center;
}

.checkout-row.header {
  font-weight: 600;
  font-size: 12px;
  color: #6b7280;
  border-bottom: 1px dashed #d1d5db;
  padding-bottom: 8px;
  margin-bottom: 6px;
}

.checkout-row:not(.header) {
  border-bottom: 1px dashed #f1f5f9;
}

/* ALIGN EACH COLUMN (5 COLUMNS) */
.checkout-row span:nth-child(2),
.checkout-row span:nth-child(3),
.checkout-row span:nth-child(4),
.checkout-row span:nth-child(5) {
  text-align: right;
}

/* OPTIONAL: keep Qty centered instead (better UX) */
.checkout-row span:nth-child(2) {
  text-align: center;
}
.col-item {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-item {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: #111827;
}

.col-qty {
  text-align: center;
}

.col-price,
.col-subtotal {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.col-subtotal {
  font-weight: 600;
  color: #111827;
}

.swal-pos-toast {
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.swal-border-success {
  border-left: 4px solid #22c55e;
}

/* MAIN TOAST */
.swal-pos-toast {
  border-radius: 12px;
  padding: 10px 12px;
  background: #ecfdf5;
  color: #065f46;

  /* 🔥 BORDER */
  border: 1px solid #bbf7d0;
  border-left: 5px solid #22c55e;

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* HEADER */
.toast-header {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
}

/* BODY */
.toast-body {
  font-size: 12px;
  color: #047857;
}

.img-preview-modal {
  position: fixed;
  z-index: 9999;
  pointer-events: none;

  width: 220px;
  height: 220px;

  display: none;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.75);
  border-radius: 10px;
  padding: 8px;

  backdrop-filter: blur(4px);
}

#imgPreview {
  max-width: 100%;
  max-height: 100%;

  width: auto;
  height: auto;

  object-fit: contain; /* 🔥 IMPORTANT */
  border-radius: 6px;
}

.img-preview-modal img {
  max-width: 100%;
  max-height: 100%;

  width: auto;
  height: auto;

  object-fit: contain; /* keep full image */
  border-radius: 10px;
  border: 2px solid #fff;
}

.image-preview-box {
  width: 100%;
  height: 220px;
  margin-bottom: 15px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #f9fafb;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* ✅ AUTO SHRINK + FIT ANY IMAGE */
.image-preview-box img {
  max-width: 100%;
  max-height: 100%;

  width: auto;
  height: auto;

  object-fit: contain; /* key fix */

  transition: transform 0.3s ease;
  cursor: zoom-in;
}

/* hover zoom (safe now) */
.image-preview-box:hover img {
  transform: scale(1.08);
}

.product-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 14px;
  color: #111;
}

/* image styling */
.product-image {
  width: 100%;
  height: 110px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}

.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
  border-radius: 12px;
}

/* optional: soft overlay so text stays readable */
.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.scan-highlight {
  outline: 3px solid #22c55e;
  transform: scale(1.03);
  transition: all 0.2s ease;
}

/* ================= COMPACT MODAL ================= */
.compact-modal .checkout-box {
  max-width: 750px; /* slightly smaller */
}

.compact-modal .checkout-body {
  padding: 12px 14px; /* reduce big padding */
  gap: 12px; /* tighter columns */
}

/* LEFT SIDE */
.compact-modal .checkout-left,
.compact-modal .checkout-right {
  padding: 10px 12px; /* reduce inner spacing */
}

/* HEADINGS */
.compact-modal h3 {
  font-size: 13px;
  margin-bottom: 8px;
}

/* LABELS */
.compact-modal label {
  font-size: 12px;
  margin-top: 6px;
  margin-bottom: 3px;
  display: block;
}

/* INPUTS */
.compact-modal input {
  height: 34px; /* tighter height */
  padding: 6px 10px; /* less padding */
  font-size: 13px;
  margin-bottom: 8px; /* reduce spacing between fields */
}

/* IMAGE PREVIEW */
.compact-modal .image-preview-box {
  margin-bottom: 10px;
}

.compact-modal .image-preview-box img {
  height: 120px; /* smaller preview */
  object-fit: cover;
}

/* INFO ROWS */
.compact-modal .change-box {
  padding: 6px 8px;
  font-size: 12px;
  margin-bottom: 6px;
}

/* BUTTON */
.compact-modal .btn-process {
  padding: 10px;
  font-size: 13px;
  margin-top: 10px;
}

.swal-rgb-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  z-index: 9999;

  background: linear-gradient(
    90deg,
    red,
    yellow,
    lime,
    cyan,
    blue,
    magenta,
    red
  );

  background-size: 400% 100%;
  animation: swalRgbMove 1.1s linear infinite;
}

@keyframes swalRgbMove {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 400% 50%;
  }
}

.swal-error-bg {
  border-left: 4px solid #ef4444 !important;
  border-radius: 10px !important;
}

.btn-refund {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.btn-refund:hover {
  opacity: 0.9;
}

.col-product {
  text-align: left;
  padding: 8px 10px;
}

/* wrapper */
.refund-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

/* hide default checkbox */
.refund-item input {
  display: none;
}

/* custom checkbox */
.checkmark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 2px solid #d1d5db;
  background: #fff;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

/* checked */
.refund-item input:checked + .checkmark {
  background: #2563eb;
  border-color: #2563eb;
}

/* check icon */
.checkmark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s ease;
}

.refund-item input:checked + .checkmark::after {
  transform: rotate(45deg) scale(1);
}

/* product text */
.product-name {
  font-weight: 500;
  color: #111827;
}

/* hover effect */
.refund-item:hover .checkmark {
  border-color: #2563eb;
}

.refund-selected {
  background: #eff6ff !important;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f3f4f6;
  padding: 4px 8px;
  border-radius: 10px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: #e5e7eb;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: 0.2s;
}

.qty-btn:hover {
  background: #2563eb;
  color: #fff;
}

.qty-value {
  min-width: 22px;
  text-align: center;
  font-weight: 600;
}

.refund-qty-box {
  transition: all 0.2s ease;
}

.qty-input-edit {
  border: 1px solid #6366f1;
  border-radius: 6px;
  outline: none;
}

.qty-value {
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.qty-value:hover {
  background: #eef2ff;
}
/* ================= DASHBOARD GRID ================= */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

/* ================= PREMIUM CARD BASE ================= */
.dashboard-cards .card.premium-card {
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  padding: 16px 16px 14px;

  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);

  overflow: hidden;
  transition: all 0.25s ease;
}

/* hover effect */
.dashboard-cards .card.premium-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

/* ================= TOP ACCENT BAR ================= */
.dashboard-cards .card.premium-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
  opacity: 0.95;
}

/* ================= HEADER ================= */
.dashboard-cards .card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

/* ================= ICON ================= */
.dashboard-cards .icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 14px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 18px;
  color: #fff;

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* ================= TITLE ================= */
.dashboard-cards .card-header h3 {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin: 0;
}

/* ================= VALUE ================= */
.dashboard-cards .premium-card p {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  color: #0f172a;
  letter-spacing: 0.2px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
  .dashboard-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .dashboard-cards {
    grid-template-columns: 1fr;
  }
}

.percent-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}

/* UP */
.percent-badge.up {
  background: #dcfce7;
  color: #16a34a;
}

/* DOWN */
.percent-badge.down {
  background: #fee2e2;
  color: #dc2626;
}

.product-card {
  position: relative;
  overflow: hidden;
}

/* Wrapper to contain overlay */
.product-overlay-wrapper {
  position: relative;
  height: 100%;
}

/* BIG CIRCLE SOLD OUT */
.sold-out-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-20deg);

  width: 120px;
  height: 120px;

  background: rgba(220, 38, 38, 0.75);
  color: #fff;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;

  border-radius: 50%;
  text-align: center;

  z-index: 5;

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Optional: dim the whole card slightly */
.product-card:has(.sold-out-overlay) {
  filter: grayscale(0.4) brightness(0.9);
}

.swal-admin-popup {
  border-radius: 14px;
  padding: 20px;
  width: 360px !important;
}

.swal-admin-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.swal-admin-input {
  border-radius: 10px !important;
  padding: 10px !important;
  font-size: 14px !important;
}

.swal-btn-confirm {
  background: #7b2cbf !important;
  color: #fff !important;
  border: none !important;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-right: 6px;
}

.swal-btn-cancel {
  background: #e5e7eb !important;
  color: #111827 !important;
  border: none !important;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
}

.loc-btn {
  background: rgba(255, 255, 255, 0.75);
  border: none;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

/* 🔥 THIS is the important part */
.loc-btn i {
  width: 18px;
  height: 18px;
}

.loc-btn:hover {
  background: #ffffff;
  transform: scale(1.08);
}

.reason-chip {
  padding: 8px;
  border-radius: 8px;
  background: #f3f4f6;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
  border: 1px solid transparent;
}

.reason-chip:hover {
  background: #e5e7eb;
}

.reason-chip.active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

/* ================= MODAL OVERLAY ================= */
.checkout-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

/* ================= MODAL BOX ================= */
.checkout-box {
  width: min(900px, 95%);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: popIn 0.2s ease;
}

@keyframes popIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ================= HEADER ================= */

.header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.btn-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

/* ================= BODY LAYOUT ================= */
.checkout-body.export-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 420px;
}

/* ================= LEFT PANEL ================= */
.checkout-left {
  padding: 20px;
  border-right: 1px solid #eef2ff;
  background: #f8fafc;
}

.checkout-left h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 5px;
  color: #1e293b;
}

.sub-text {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 15px;
}

/* ================= CATEGORY LIST ================= */
.export-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-right: 5px;
}

.export-list {
  max-height: 380px;
  width: 100%;
}

/* prettier checkbox card */
.export-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.export-item:hover {
  border-color: #6366f1;
  background: #eef2ff;
  transform: translateY(-1px);
}

.export-item input {
  width: 16px;
  height: 16px;
  accent-color: #6366f1;
  cursor: pointer;
}

.export-item span {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}

/* ================= RIGHT PANEL ================= */
.checkout-right {
  padding: 20px;
  background: #ffffff;
}

.change-box {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #eef2ff;
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 13px;
}

.badge-count {
  background: #6366f1;
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

/* ================= PREVIEW AREA ================= */
.preview-box {
  margin-top: 15px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed #c7d2fe;
  background: #f9fafb;

  /* 🔥 KEY FIX */
  flex: 1;
  display: flex;
  flex-direction: column;
}

.preview-title {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #4b5563;
}

.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #e0e7ff;
  color: #3730a3;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* empty state */
.muted {
  font-size: 12px;
  color: #94a3b8;
}

/* ================= BUTTON ================= */
.btn-process {
  width: 100%;
  margin-top: auto;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.btn-process:hover {
  transform: translateY(-2px);
}

.comma {
  color: #94a3b8;
  margin: 0 2px;
}

.status-badge {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

/* 🟢 ACTIVE */
.status-active {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #22c55e;
}

/* 🔴 INACTIVE */
.status-inactive {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

/* ================= CATEGORY MODAL ================= */

.category-modal {
  width: 420px;
  max-width: 92%;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  animation: popIn 0.2s ease;
}

/* smooth pop animation */
@keyframes popIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* compact form */
.category-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 0;
}

/* inputs refinement */
.category-form input,
.category-form textarea,
.category-form select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 13px;
  outline: none;
  transition: 0.2s;
}

.category-form input:focus,
.category-form textarea:focus,
.category-form select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* label spacing */
.category-form label {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-top: 6px;
}

/* button spacing */
.category-form .btn-process {
  width: 100%;
  margin-top: 10px;
  border-radius: 10px;
}

#status.status-active {
  color: #16a34a; /* green */
  font-weight: 600;
}

#status.status-inactive {
  color: #dc2626; /* red */
  font-weight: 600;
}

.status-select {
  font-weight: 600;
}

.status-select.active {
  color: #16a34a; /* green */
}

.status-select.inactive {
  color: #dc2626; /* red */
}

/* ================= DISCOUNT TOGGLE ================= */
.btn-toggle {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #374151;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-toggle:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
}

.btn-toggle.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 15px rgba(37, 99, 235, 0.25);
}

/* wrapper makes it feel like a switch group */
.discount-toggle {
  display: flex;
  gap: 8px;
  background: #f3f4f6;
  padding: 6px;
  border-radius: 12px;
}

.col-discount {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  color: #f59e0b;
  font-weight: 600;
}

/* ================= LOW STOCK MODAL ================= */

.stock-alert-popup {
  border-radius: 24px !important;
  overflow: hidden !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.18) !important;
}

.stock-alert-modal {
  background: #ffffff;
  border-radius: 24px;
}

/* HEADER */
.stock-alert-header {
  background: linear-gradient(135deg, #7b2cbf, #9d4edd);
  color: #fff;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stock-alert-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
}

.stock-alert-close {
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 8px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: 0.25s ease;
}

.stock-alert-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* BODY */
.stock-alert-body {
  padding: 24px;
}

.stock-alert-content h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #5a189a;
  margin-bottom: 14px;
  font-size: 18px;
}

/* STOCK LIST */
.stock-alert-list {
  background: #faf7ff;
  border: 1px solid #ece0ff;
  border-radius: 16px;
  padding: 16px;
  font-size: 15px;
  color: #444;
  line-height: 1.7;
  max-height: 320px;
  overflow-y: auto;
}

/* BUTTON */
.stock-alert-btn {
  width: 100%;
  margin-top: 18px;
  border: none;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #7b2cbf, #9d4edd);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: 0.25s ease;
}

.stock-alert-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(123, 44, 191, 0.25);
}

/* KEYCAPS */
.stock-alert-keycap,
.stock-alert-keyhint {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 8px;
  border-radius: 8px;
}

/* ================= CASH FLOW SECTION ================= */
.cash-section {
  margin-top: 22px;
  padding: 18px;
  border-radius: 18px;
  background: #f9fafb;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

/* ================= CARD BASE ================= */
.cash-section .card {
  border-radius: 16px;
  transition: all 0.2s ease;
}

.cash-section .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

/* ================= ICON SIZE UPGRADE ================= */
.cash-section .icon-circle {
  width: 52px;
  height: 52px;
  font-size: 22px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* ================= TOTAL CASH (SOLID GREEN) ================= */
.cash-section .card-cash::before {
  background: #10b981; /* solid emerald */
}

.cash-section .card-cash .icon-circle {
  background: #059669;
}

/* ================= QR CASH (SOLID INDIGO) ================= */
.cash-section .card-qr::before {
  background: #6366f1; /* solid indigo */
}

.cash-section .card-qr .icon-circle {
  background: #4f46e5;
}

/* ================= TEXT POLISH ================= */
.cash-section .card-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.cash-section .card p {
  font-size: 26px;
  font-weight: 800;
  color: #111827;
}

/* ================= GROSS SALES (BLUE) ================= */
.dashboard-cards .card-sales::before {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}
.dashboard-cards .card-sales .icon-circle {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

/* ================= NET SALES (GREEN) ================= */
.dashboard-cards .card-net::before {
  background: linear-gradient(90deg, #22c55e, #86efac);
}
.dashboard-cards .card-net .icon-circle {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

/* Alternative: DISCOUNTS (SOFT RED ORANGE) */
.dashboard-cards .card-discount::before {
  background: linear-gradient(90deg, #f97316, #fb7185);
}

.dashboard-cards .card-discount .icon-circle {
  background: linear-gradient(135deg, #f97316, #ef4444) !important;
}

/* ================= REFUNDS (RED) ================= */
.dashboard-cards .card-refund::before {
  background: linear-gradient(90deg, #ef4444, #fca5a5);
}
.dashboard-cards .card-refund .icon-circle {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* ================= PROFIT (PURPLE-GOLD PREMIUM) ================= */
.dashboard-cards .card-profit::before {
  background: linear-gradient(90deg, #a855f7, #f59e0b);
}
.dashboard-cards .card-profit .icon-circle {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
}

/* =====================================================
   💵 TOTAL CASH - FULL GRADIENT PREMIUM OVERRIDE
===================================================== */

.dashboard-cards .card.card-cash {
  background: linear-gradient(135deg, #059669, #10b981) !important;
  border: none !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 34px rgba(16, 185, 129, 0.28) !important;
  color: #ffffff !important;
  position: relative !important;
  overflow: hidden !important;
}

/* top shine */
.dashboard-cards .card.card-cash::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0.03) 35%,
    transparent 65%
  ) !important;
  z-index: 0 !important;
}

/* remove old border accent if any */
.dashboard-cards .card.card-cash::after {
  display: none !important;
}

/* content above overlay */
.dashboard-cards .card.card-cash > * {
  position: relative !important;
  z-index: 2 !important;
}

/* header title */
.dashboard-cards .card.card-cash h3 {
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
}

/* amount */
.dashboard-cards .card.card-cash p {
  color: #ffffff !important;
  font-size: 30px !important;
  font-weight: 800 !important;
  margin-top: 10px !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

/* icon premium */
.dashboard-cards .card.card-cash .icon-circle {
  width: 56px !important;
  height: 56px !important;
  font-size: 24px !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  backdrop-filter: blur(8px) !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14) !important;
}

/* badge */
.dashboard-cards .card.card-cash .percent-badge {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  font-weight: 600 !important;
}

/* hover */
.dashboard-cards .card.card-cash:hover {
  transform: translateY(-4px) scale(1.01) !important;
  box-shadow: 0 20px 44px rgba(16, 185, 129, 0.34) !important;
}

/* =====================================================
   📱 QR PH / PAYLORO - FULL GRADIENT PREMIUM OVERRIDE
===================================================== */

.dashboard-cards .card.card-qr {
  background: linear-gradient(135deg, #4338ca, #6366f1) !important;
  border: none !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 34px rgba(99, 102, 241, 0.28) !important;
  color: #ffffff !important;
  position: relative !important;
  overflow: hidden !important;
}

/* top shine overlay */
.dashboard-cards .card.card-qr::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0.03) 35%,
    transparent 65%
  ) !important;
  z-index: 0 !important;
}

/* remove old accent bars if existing */
.dashboard-cards .card.card-qr::after {
  display: none !important;
}

/* keep content above overlay */
.dashboard-cards .card.card-qr > * {
  position: relative !important;
  z-index: 2 !important;
}

/* title */
.dashboard-cards .card.card-qr h3 {
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
}

/* amount */
.dashboard-cards .card.card-qr p {
  color: #ffffff !important;
  font-size: 30px !important;
  font-weight: 800 !important;
  margin-top: 10px !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

/* icon */
.dashboard-cards .card.card-qr .icon-circle {
  width: 56px !important;
  height: 56px !important;
  font-size: 24px !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  backdrop-filter: blur(8px) !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14) !important;
}

/* badge */
.dashboard-cards .card.card-qr .percent-badge {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  font-weight: 600 !important;
}

/* hover */
.dashboard-cards .card.card-qr:hover {
  transform: translateY(-4px) scale(1.01) !important;
  box-shadow: 0 20px 44px rgba(99, 102, 241, 0.34) !important;
}

/* =====================================================
   % BADGE = WHITE BG + DYNAMIC TEXT COLORS
   Positive = Green
   Negative = Red
   Neutral/Today = Gray
===================================================== */

/* CASH BADGE */
.dashboard-cards .card.card-cash .percent-badge {
  background: #ffffff !important;
  color: #16a34a !important; /* default positive */
  border: none !important;
  font-weight: 700 !important;
  padding: 6px 12px !important;
  border-radius: 999px !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1) !important;
}

/* QR BADGE */
.dashboard-cards .card.card-qr .percent-badge {
  background: #ffffff !important;
  color: #16a34a !important; /* default positive */
  border: none !important;
  font-weight: 700 !important;
  padding: 6px 12px !important;
  border-radius: 999px !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1) !important;
}

/* negative values */
.dashboard-cards .card .percent-badge.negative {
  color: #dc2626 !important;
}

/* positive values */
.dashboard-cards .card .percent-badge.positive {
  color: #16a34a !important;
}

/* neutral / today */
.dashboard-cards .card .percent-badge.neutral {
  color: #6b7280 !important;
}

.profit-box {
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: #16a34a;
}

.profit-box.loss {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.profit-box.warning {
  background: #fff7ed;
  color: #ea580c;
  border-color: #fed7aa;
}

.col-profit {
  width: 90px;
  text-align: right;
}

#priceHistoryModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* MAIN MODAL BOX */
.price-history-box {
  width: min(650px, 95%);
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: phPopIn 0.25s ease;
}

/* HEADER */
.price-history-header {
  background: linear-gradient(135deg, #111827, #1f2937);
  color: #fff;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* BODY */
.price-history-body {
  max-height: 500px;
  overflow-y: auto;
  padding: 14px;
}

/* LIST */
#historyList {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* CARD */
.history-item {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #3b82f6;
  padding: 12px 14px;
  border-radius: 10px;
  transition: 0.2s ease;
}

.history-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

/* PRICE */
.history-price {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
}

/* META */
.history-meta {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* USER BADGE */
.history-user {
  display: inline-block;
  padding: 2px 8px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  border-radius: 999px;
  width: fit-content;
  margin-top: 6px;
}

/* ANIMATION */
@keyframes phPopIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.price-history-btn {
  margin-top: 12px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  font-weight: 600;
  font-size: 13px;

  background: linear-gradient(135deg, #1f2937, #111827);
  color: #ffffff;

  transition: all 0.2s ease;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.price-history-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  background: linear-gradient(135deg, #111827, #0f172a);
}

.price-history-btn:active {
  transform: scale(0.98);
}

.price-history-btn i {
  width: 16px;
  height: 16px;
}
