/* ==========================================================
   MAIN.CSS - SHARED WEBPAGE & ADMIN STYLES (PURE NATIVE CSS)
   Không phụ thuộc thư viện, tương thích 100% mọi trình duyệt
   ========================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-dark: #1e40af;
  --secondary: #0f172a;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ================= HEADER ================= */
.header {
  background: #ffffff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: -0.02em;
}

.logo-badge {
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: #fff;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
}

.search-box {
  flex: 1;
  max-width: 540px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.6rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-xl);
  font-size: 0.95rem;
  background-color: var(--gray-100);
  transition: var(--transition);
  outline: none;
}

.search-input:focus {
  background-color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.search-icon {
  position: absolute;
  left: 0.95rem;
  color: var(--gray-400);
  font-size: 1rem;
  pointer-events: none;
}

.search-camera-btn {
  position: absolute;
  right: 0.65rem;
  background: none;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-sm);
  color: var(--gray-500);
  transition: var(--transition);
}

.search-camera-btn:hover {
  color: var(--primary);
  background: var(--gray-200);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-outline {
  background-color: #fff;
  border-color: var(--gray-300);
  color: var(--gray-700);
}
.btn-outline:hover {
  background-color: var(--gray-100);
  border-color: var(--gray-400);
}

.btn-success {
  background-color: var(--success);
  color: #fff;
}
.btn-success:hover {
  filter: brightness(0.9);
}

.btn-danger {
  background-color: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  filter: brightness(0.9);
}

.cart-btn {
  position: relative;
  background: #fff;
  border: 1.5px solid var(--gray-200);
  color: var(--gray-800);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.9rem;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.cart-count {
  background-color: var(--danger);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  min-width: 1.25rem;
  text-align: center;
}

/* ================= BANNER ================= */
.promo-banner {
  background: linear-gradient(135deg, #1e3a8a, #2563eb, #38bdf8);
  color: #fff;
  padding: 1.75rem 1.25rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.promo-content h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.promo-content p {
  color: #e0f2fe;
  font-size: 0.95rem;
  max-width: 600px;
}

.promo-tags {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.promo-tag {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ================= MAIN LAYOUT ================= */
.main-wrapper {
  max-width: 1280px;
  margin: 1.5rem auto;
  padding: 0 1.25rem;
  width: 100%;
  flex: 1;
}

.shop-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 1.75rem;
  align-items: start;
}

/* ================= ASIDE SIDEBAR ================= */
.sidebar {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 5rem;
}

.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.category-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  color: var(--gray-700);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.category-item:hover {
  background-color: var(--gray-100);
  color: var(--primary);
}

.category-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  border-color: rgba(37, 99, 235, 0.2);
}

.cat-info {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.cat-count {
  font-size: 0.75rem;
  background: var(--gray-100);
  color: var(--gray-600);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
}

.category-item.active .cat-count {
  background: #fff;
  color: var(--primary);
}

/* Filter controls */
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--gray-700);
  cursor: pointer;
}

.filter-select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  background-color: #fff;
  color: var(--gray-800);
  outline: none;
}

/* ================= PRODUCT GRID & CARDS ================= */
.products-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.products-count {
  font-size: 0.95rem;
  color: var(--gray-600);
}

.products-count strong {
  color: var(--gray-900);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.35rem;
}

.product-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gray-300);
}

.product-image-wrap {
  position: relative;
  width: 100%;
  padding-top: 75%; /* Tỉ lệ 4:3 */
  background-color: var(--gray-100);
  overflow: hidden;
}

.product-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-img {
  transform: scale(1.05);
}

.product-badge-cat {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  color: var(--gray-800);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.product-badge-sale {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  background-color: var(--danger);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.product-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.35rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7em;
}

.product-card:hover .product-title {
  color: var(--primary);
}

.product-desc {
  font-size: 0.84rem;
  color: var(--gray-500);
  margin-bottom: 0.85rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.product-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
}

.product-original-price {
  font-size: 0.85rem;
  color: var(--gray-400);
  text-decoration: line-through;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  margin-top: auto;
}

.btn-add-cart {
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.btn-add-cart:hover {
  background-color: var(--primary);
  color: #fff;
}

.btn-quick-view {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.btn-quick-view:hover {
  background: var(--gray-200);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--gray-300);
  grid-column: 1 / -1;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

/* ================= MODAL & DRAWER ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-content,
.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  position: relative;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-overlay.open .modal-content,
.modal-overlay.open .modal-box {
  transform: scale(1);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  background: #fff;
  color: var(--gray-700);
}

.modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  font-size: 1.25rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  transition: var(--transition);
  z-index: 50;
}

.modal-close:hover {
  background: var(--gray-200);
  color: var(--danger);
  transform: scale(1.05);
}

/* Product Detail Modal View */
.product-detail-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  padding: 1.75rem;
}

.product-detail-img-wrap {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--gray-100);
  position: relative;
  aspect-ratio: 1;
}

.modal-img-badge-sale {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background-color: var(--danger);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  z-index: 5;
}

.product-detail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info {
  display: flex;
  flex-direction: column;
}

.detail-category {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.detail-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.3;
  margin-bottom: 0.65rem;
}

.detail-price-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  position: relative;
}

.detail-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.detail-original-price {
  font-size: 0.95rem;
  color: var(--gray-400);
  text-decoration: line-through;
}

.detail-save-badge {
  display: inline-flex;
  align-items: center;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-left: auto;
}

.detail-stock {
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.detail-stock.out {
  color: var(--danger);
}

.detail-desc-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.35rem;
}

.detail-desc {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.qty-btn {
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--gray-300);
  background: #fff;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.qty-btn:hover {
  background: var(--gray-100);
}

.qty-input {
  width: 3.5rem;
  height: 2.2rem;
  text-align: center;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-weight: 700;
  outline: none;
}

/* ================= CART DRAWER ================= */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: #fff;
  box-shadow: var(--shadow-xl);
  z-index: 101;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-overlay.open .cart-drawer {
  transform: translateX(0);
}

.drawer-header {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-100);
}

.cart-item-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
}

.cart-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item-price {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.btn-remove-item {
  color: var(--danger);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0.25rem;
}

.drawer-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  color: var(--gray-600);
}

.cart-summary-total {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gray-900);
}

.cart-summary-total span {
  color: var(--primary);
}

/* Form Styles */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.35rem;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

/* ================= ADMIN DASHBOARD LAYOUT ================= */
.admin-body {
  --admin-header-height: 65px;
  background-color: #f8fafc;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--admin-header-height);
  box-sizing: border-box;
  background: #ffffff;
  border-bottom: 1px solid var(--gray-200);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-layout {
  display: flex;
  min-height: calc(100vh - 65px);
  position: relative;
  overflow-x: hidden;
}

.admin-sidebar {
  width: 260px;
  min-width: 260px;
  background: #fff;
  border-right: 1px solid var(--gray-200);
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1), transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
}

/* Desktop Collapse: Thu gọn sidebar về mép trái màn hình */
.admin-sidebar.collapsed {
  margin-left: -260px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.admin-nav-item:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.admin-nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
}

.admin-main {
  flex: 1;
  min-width: 0;
  padding: 1.75rem 2rem;
  overflow-x: auto;
  transition: all 0.28s ease;
}

.admin-tab {
  display: none;
}

.admin-tab.active {
  display: block;
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-300);
  background: #fff;
  cursor: pointer;
  color: var(--gray-700);
  transition: var(--transition);
}

.sidebar-toggle-btn:hover {
  background: var(--gray-100);
  color: var(--primary);
  border-color: var(--primary);
}

/* Mobile Sidebar Drawer & Backdrop Overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 900px) {
  .sidebar-overlay {
    /* Extend under the sticky header so there is no uncovered seam. */
    top: 0;
  }

  .admin-sidebar {
    position: fixed;
    top: var(--admin-header-height);
    bottom: 0;
    height: auto;
    box-sizing: border-box;
    left: 0;
    width: 275px;
    z-index: 999;
    box-shadow: var(--shadow-xl);
    transform: translateX(-100%);
    margin-left: 0 !important;
  }

  .admin-sidebar.mobile-open {
    transform: translateX(0);
  }

  .admin-main {
    padding: 1.25rem 1rem;
  }

  .hide-mobile {
    display: none !important;
  }
}

/* ================= ADMIN CARDS GRID LAYOUT ================= */
.admin-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .admin-cards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.admin-card {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.admin-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
  transform: translateY(-2px);
}

.admin-card-header {
  padding: 1rem 1.15rem 0.65rem 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.admin-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.admin-card-body {
  padding: 0 1.15rem 1rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.admin-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.35;
}

.admin-card-meta {
  font-size: 0.85rem;
  color: var(--gray-600);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-card-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-card-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.admin-card-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

.admin-card-orig-price {
  font-size: 0.85rem;
  color: var(--gray-400);
  text-decoration: line-through;
}

.admin-card-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--gray-100);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-card-footer {
  padding: 0.85rem 1.15rem;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-card-footer .btn {
  padding: 0.38rem 0.75rem;
  font-size: 0.82rem;
}

/* Order specific card styles */
.order-card-items-list {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.84rem;
  color: var(--gray-700);
  max-height: 130px;
  overflow-y: auto;
  line-height: 1.45;
}

/* Log specific card styles */
.log-card-delta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}

.log-card-delta.checkin {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.log-card-delta.checkout {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

/* Category specific card styles */
.cat-card-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

/* Pages Settings Components */
.banner-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
}

.banner-tag-chip-remove {
  cursor: pointer;
  background: none;
  border: none;
  color: var(--gray-500);
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.2rem;
  border-radius: 999px;
  transition: var(--transition);
}

.banner-tag-chip-remove:hover {
  color: var(--danger);
  transform: scale(1.2);
}

.dynamic-item-row {
  display: grid;
  grid-template-columns: 180px 1fr 40px;
  gap: 0.65rem;
  align-items: center;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
}

@media (max-width: 600px) {
  .dynamic-item-row {
    grid-template-columns: 1fr 40px;
  }
  .dynamic-item-row input:first-child {
    grid-column: 1 / -1;
  }
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-500);
}

/* Tables */
.data-table-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-header-bar {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.table-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.table-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.table th {
  background: var(--gray-50);
  color: var(--gray-600);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: middle;
}

.table tr:hover td {
  background-color: var(--gray-50);
}

/* Upload zone for R2 */
.upload-dropzone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  background: var(--gray-50);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 0.75rem;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-dropzone-icon {
  font-size: 2rem;
  margin-bottom: 0.35rem;
}

.image-preview-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  margin-top: 0.5rem;
}

.image-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-info { background: #e0f2fe; color: #0369a1; }
.badge-gray { background: #f1f5f9; color: #475569; }

/* ================= TOAST NOTIFICATION ================= */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--gray-900);
  color: #fff;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: slideInToast 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 380px;
}

.toast.success { background: #065f46; border-left: 4px solid var(--success); }
.toast.error { background: #881337; border-left: 4px solid var(--danger); }
.toast.info { background: #1e3a8a; border-left: 4px solid var(--primary); }

@keyframes slideInToast {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= FOOTER ================= */
.footer {
  background: #ffffff;
  border-top: 1px solid var(--gray-200);
  padding: 2.75rem 1.25rem 2.25rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2.5rem;
  font-size: 0.88rem;
  color: var(--gray-600);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-desc {
  max-width: 520px;
  line-height: 1.6;
  color: var(--gray-600);
  margin-top: 0.25rem;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--gray-400);
  margin-top: 0.5rem;
}

.footer-info-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.footer-dynamic-items {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-dynamic-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.88rem;
}

.footer-item-label {
  font-weight: 700;
  color: var(--gray-800);
  white-space: nowrap;
}

.footer-item-val {
  color: var(--gray-600);
  word-break: break-word;
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    /* Keep admin navigation as a vertical drawer on mobile. */
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 1px solid var(--gray-200);
    border-bottom: none;
  }

  .product-detail-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-container {
    flex-wrap: wrap;
  }

  .search-box {
    order: 3;
    max-width: 100%;
    width: 100%;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 400px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* ================= WAREHOUSE / INVENTORY TERMINAL (CHECK-IN & CHECK-OUT) ================= */
.inventory-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.inventory-terminal-card {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.terminal-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.terminal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  text-transform: uppercase;
}

.terminal-badge.checkin {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid rgba(22, 163, 74, 0.3);
}

.terminal-badge.checkout {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid rgba(124, 58, 237, 0.3);
}

/* Transaction Type Selection Pills */
.trans-type-pills {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.trans-pill {
  flex: 1;
  min-width: 220px;
  padding: 0.85rem 1.15rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: #ffffff;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  user-select: none;
}

.trans-pill:hover {
  border-color: var(--gray-400);
  background: var(--gray-50);
}

.trans-pill.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary);
}

.trans-pill.checkin-active {
  border-color: #16a34a;
  background: #f0fdf4;
  box-shadow: 0 0 0 1px #16a34a;
}

.trans-pill.checkout-active {
  border-color: #7c3aed;
  background: #f5f3ff;
  box-shadow: 0 0 0 1px #7c3aed;
}

.trans-pill-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.trans-pill-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gray-900);
}

.trans-pill-desc {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-top: 0.1rem;
}

/* Scanner Input Wrap */
.scanner-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.scanner-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.scanner-icon {
  position: absolute;
  left: 1.15rem;
  font-size: 1.35rem;
  color: var(--gray-500);
  pointer-events: none;
}

.scanner-input {
  flex: 1;
  padding: 0.85rem 1rem 0.85rem 3.4rem;
  font-size: 1.15rem;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  background: #ffffff;
  outline: none;
  transition: var(--transition);
}

.scanner-input:focus {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.scanner-hints {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: var(--gray-500);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.scanner-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--gray-200);
  color: var(--gray-700);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: monospace;
  font-weight: 700;
}

/* Product Recognition Card */
.scanned-product-card {
  border: 2px solid #bbf7d0;
  background: #f0fdf4;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  animation: fadeInQuick 0.25s ease;
}

.scanned-product-card.checkout-theme {
  border-color: #ddd6fe;
  background: #f5f3ff;
}

.scanned-product-grid {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 1.25rem;
  align-items: center;
}

.scanned-product-img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--gray-200);
}

.scanned-product-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 0.35rem;
}

.scanned-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.4rem;
}

.code-badge {
  background: #1e293b;
  color: #ffffff;
  font-family: monospace;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.barcode-badge {
  background: #ffffff;
  color: #334155;
  border: 1px solid var(--gray-300);
  font-family: monospace;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.stock-indicator {
  text-align: right;
  padding-left: 1rem;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.stock-indicator-val {
  font-size: 1.75rem;
  font-weight: 900;
  color: #15803d;
  line-height: 1;
}

.scanned-product-card.checkout-theme .stock-indicator-val {
  color: #6d28d9;
}

.stock-indicator-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  margin-top: 0.25rem;
}

/* Fast-Entry Action Bar */
.fast-entry-bar {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  flex-wrap: wrap;
}

.qty-entry-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.qty-entry-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.qty-entry-input {
  width: 140px;
  height: 52px;
  font-size: 1.75rem;
  font-weight: 900;
  text-align: center;
  color: var(--gray-900);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: #ffffff;
  outline: none;
  transition: var(--transition);
}

.qty-entry-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.note-entry-input {
  flex: 1;
  min-width: 200px;
  height: 52px;
  padding: 0 1rem;
  font-size: 0.95rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: #ffffff;
  outline: none;
}

.note-entry-input:focus {
  border-color: var(--primary);
}

.btn-submit-entry {
  height: 52px;
  padding: 0 1.75rem;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  border: none;
}

.btn-submit-checkin {
  background: #16a34a;
  color: #ffffff;
}
.btn-submit-checkin:hover {
  background: #15803d;
}

.btn-submit-checkout {
  background: #7c3aed;
  color: #ffffff;
}
.btn-submit-checkout:hover {
  background: #6d28d9;
}

/* New Product Registration Inline Box */
.new-product-box {
  background: #fffbeb;
  border: 2px dashed #f59e0b;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  animation: fadeInQuick 0.25s ease;
}

.new-product-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.new-product-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #92400e;
}

/* Live Feed / Recent Transactions */
.live-feed-card {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.live-feed-header {
  padding: 1rem 1.25rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.live-feed-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* History Badges */
.badge-import { background: #dcfce7; color: #15803d; border: 1px solid rgba(22, 163, 74, 0.2); }
.badge-return { background: #fef3c7; color: #b45309; border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-sale { background: #ede9fe; color: #6d28d9; border: 1px solid rgba(124, 58, 237, 0.2); }
.badge-transfer { background: #e0f2fe; color: #0284c7; border: 1px solid rgba(2, 132, 199, 0.2); }

.delta-plus {
  color: #16a34a;
  font-weight: 800;
  font-size: 1rem;
}

.delta-minus {
  color: #dc2626;
  font-weight: 800;
  font-size: 1rem;
}

@keyframes fadeInQuick {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rowFlash {
  0% { background-color: #fef08a; }
  100% { background-color: transparent; }
}

.row-flash {
  animation: rowFlash 1.5s ease-out;
}

/* ================= EXTERNAL MARKETPLACE STYLES ================= */
.detail-external-link-wrap {
  margin: 0.85rem 0 1.25rem 0;
}

.btn-marketplace {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.btn-marketplace:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-marketplace .ext-arrow {
  margin-left: auto;
  font-size: 1.1rem;
}

/* Shopee Style */
.btn-marketplace-shopee, .btn-shopee {
  background: linear-gradient(135deg, #ee4d2d, #ff5722);
  color: #ffffff !important;
  border: 1px solid #e03f1f;
  box-shadow: 0 3px 10px rgba(238, 77, 45, 0.28);
}
.btn-marketplace-shopee:hover, .btn-shopee:hover {
  background: linear-gradient(135deg, #d73211, #f44336);
  box-shadow: 0 4px 14px rgba(238, 77, 45, 0.42);
}

/* Lazada Style */
.btn-marketplace-lazada {
  background: linear-gradient(135deg, #0f146d, #002f6c);
  color: #ffffff !important;
  border: 1px solid #0a0e50;
  box-shadow: 0 3px 10px rgba(15, 20, 109, 0.28);
}
.btn-marketplace-lazada:hover {
  background: linear-gradient(135deg, #090c44, #00204a);
  box-shadow: 0 4px 14px rgba(15, 20, 109, 0.42);
}

/* TikTok Shop Style */
.btn-marketplace-tiktok {
  background: #111111;
  color: #ffffff !important;
  border: 1px solid #282828;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}
.btn-marketplace-tiktok:hover {
  background: #000000;
  border-color: #fe2c55;
  box-shadow: 0 4px 14px rgba(254, 44, 85, 0.35);
}

/* Other / Sàn TMĐT Style */
.btn-marketplace-other {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #ffffff !important;
  border: 1px solid #0369a1;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.28);
}
.btn-marketplace-other:hover {
  background: linear-gradient(135deg, #0369a1, #0284c7);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.42);
}

.badge-marketplace {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #fff1ee;
  color: #ee4d2d;
  border: 1px solid #ffccb8;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
  margin-top: 0.25rem;
}

.badge-marketplace:hover {
  background: #ee4d2d;
  color: #fff;
}

/* ================= THERMAL BARCODE PRINTING (50x30mm) ================= */
#thermalPrintArea {
  display: none;
}

.label-preview-modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.label-preview-card {
  width: 50mm;
  height: 30mm;
  border: 1px dashed var(--gray-400);
  background: #ffffff;
  padding: 1.5mm 2.5mm;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  border-radius: 2px;
  overflow: hidden;
  user-select: none;
  position: relative;
}

.label-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 7pt;
  font-weight: 800;
  text-transform: uppercase;
  color: #000;
  line-height: 1;
}

.label-product-name {
  font-size: 7.5pt;
  font-weight: 700;
  color: #000;
  line-height: 1.15;
  max-height: 2.3em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0.5mm 0;
  word-break: break-word;
}

.label-barcode-svg-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.label-barcode-svg-wrap svg {
  width: 100% !important;
  max-width: 44mm;
  height: 10mm !important;
  display: block;
}

.label-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 7.5pt;
  line-height: 1;
  border-top: 0.5px solid #000;
  padding-top: 0.8mm;
}

.label-code {
  font-family: monospace;
  font-weight: 800;
  font-size: 8pt;
  color: #000;
}

.label-price {
  font-size: 9.5pt;
  font-weight: 900;
  color: #000;
}

/* In nhiệt khổ 50x30mm */
@media print {
  @page {
    size: 50mm 30mm;
    margin: 0mm;
  }

  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    width: 50mm !important;
    height: 30mm !important;
  }

  body * {
    visibility: hidden !important;
  }

  #thermalPrintArea,
  #thermalPrintArea * {
    visibility: visible !important;
  }

  #thermalPrintArea {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 50mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .thermal-label-page {
    width: 50mm !important;
    height: 30mm !important;
    padding: 1.5mm 2.5mm !important;
    box-sizing: border-box !important;
    page-break-after: always !important;
    break-after: page !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow: hidden !important;
    background: #fff !important;
    color: #000 !important;
  }
}

/* ================= USER MENU DROPDOWN (ADMIN HEADER) ================= */
.user-menu-container {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1px solid var(--gray-300);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.88rem;
  color: var(--gray-800);
}

.user-menu-trigger:hover {
  background: var(--gray-50);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.user-avatar-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.user-dropdown-arrow {
  font-size: 0.75rem;
  color: var(--gray-500);
  transition: transform 0.2s ease;
}

.user-menu-container.open .user-dropdown-arrow {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  min-width: 230px;
  z-index: 1000;
  padding: 0.45rem 0;
  display: none;
}

.user-dropdown-menu.open {
  display: block;
  animation: dropdownAnim 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownAnim {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-dropdown-info {
  padding: 0.65rem 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 0.35rem 0;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  color: var(--gray-700);
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.user-dropdown-item:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.user-dropdown-item.danger {
  color: var(--danger);
}

.user-dropdown-item.danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

/* ================= PRODUCT VIEW MODE TOGGLE ================= */
.view-mode-toggle {
  display: inline-flex;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
}

.view-toggle-btn {
  border: none;
  background: #ffffff;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.view-toggle-btn:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.view-toggle-btn.active {
  background: var(--primary);
  color: #ffffff;
}

/* ================= CATEGORY DRAG AND DROP ================= */
.category-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.category-card.draggable {
  cursor: default;
}

.category-card.is-dragging {
  opacity: 0.35;
  border: 2px dashed var(--primary) !important;
  transform: scale(0.97);
}

.category-card.drag-over {
  border: 2px solid var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25) !important;
  transform: translateY(-2px);
}

.drag-handle {
  cursor: grab;
  color: var(--gray-400);
  padding: 0.3rem 0.45rem;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.drag-handle:active {
  cursor: grabbing;
}

.drag-handle:hover {
  color: var(--primary);
  background: var(--primary-light);
}

/* ================= ICON IMAGES (R2 & SVG) ================= */
.cat-icon-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
  flex-shrink: 0;
}

.cat-icon-img-lg {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  padding: 4px;
}

.cat-icon-text {
  font-size: 1.15rem;
  line-height: 1;
  display: inline-block;
  flex-shrink: 0;
}

.store-logo-img {
  max-height: 28px;
  max-width: 140px;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
}

/* ================= WAREHOUSE LOCATION MANAGEMENT ================= */
.warehouse-shelves-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.warehouse-rack {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

.warehouse-rack:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.warehouse-shelf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(to right, var(--gray-50), #ffffff);
  border-bottom: 1px solid var(--gray-200);
}

.shelf-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.shelf-badge-code {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: monospace;
}

.shelf-levels-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem;
  background: #f8fafc;
}

.shelf-level-lane {
  background: #ffffff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1rem;
  position: relative;
}

.shelf-level-top {
  border-top: 4px solid #0284c7;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 40px);
}

.shelf-level-bottom {
  border-bottom: 4px solid #6366f1;
  background: linear-gradient(0deg, #f5f3ff 0%, #ffffff 40px);
}

.shelf-level-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--gray-200);
}

.shelf-level-title {
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shelf-level-top .shelf-level-title {
  color: #0369a1;
}

.shelf-level-bottom .shelf-level-title {
  color: #4338ca;
}

.compartment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.compartment-box {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: var(--transition);
}

.compartment-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.compartment-box.odd {
  border-left: 4px solid #0ea5e9;
}

.compartment-box.even {
  border-left: 4px solid #8b5cf6;
}

.compartment-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.compartment-num {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.compartment-count-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-600);
}

.compartment-products-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
  flex-grow: 1;
}

.compartment-prod-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.55rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.compartment-prod-info {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex-grow: 1;
}

.compartment-prod-img {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--gray-200);
  flex-shrink: 0;
}

.compartment-prod-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--gray-800);
}

.compartment-prod-stock {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.compartment-empty-msg {
  font-size: 0.78rem;
  color: var(--gray-400);
  text-align: center;
  padding: 1.25rem 0.5rem;
  font-style: italic;
}

.btn-add-to-compartment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
}

.btn-add-to-compartment:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ================= DASHBOARD QUICK SEARCH ================= */
.dash-search-container {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.75rem;
}

.dash-search-bar-wrap {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.75rem;
}

.dash-search-input-group {
  position: relative;
  flex-grow: 1;
  display: flex;
  align-items: center;
}

.dash-search-input-group input {
  padding-left: 2.75rem;
  padding-right: 5rem;
  height: 48px;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
}

.dash-search-icon-left {
  position: absolute;
  left: 0.95rem;
  color: var(--gray-400);
  font-size: 1.2rem;
  pointer-events: none;
}

.dash-search-actions-inside {
  position: absolute;
  right: 0.5rem;
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.btn-dash-camera {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
  border-radius: var(--radius-sm);
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 1.05rem;
  transition: var(--transition);
}

.btn-dash-camera:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.dash-product-result-wrap {
  margin-top: 1.25rem;
  display: none;
}

.dash-product-card {
  background: linear-gradient(to right, #f8fafc, #ffffff);
  border: 1.5px solid var(--primary-light);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 1.25rem;
  align-items: center;
}

@media (max-width: 768px) {
  .dash-product-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.dash-product-thumb {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: #ffffff;
  border: 1px solid var(--gray-200);
  margin: 0 auto;
}

.dash-product-details {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dash-product-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
}

.dash-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0.35rem 0;
}

.dash-location-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1.5px solid #93c5fd;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.88rem;
}

.dash-location-badge.top-level {
  background: #f0fdf4;
  color: #15803d;
  border-color: #86efac;
}

.dash-location-badge.bottom-level {
  background: #faf5ff;
  color: #6b21a8;
  border-color: #d8b4fe;
}

.dash-location-badge.unassigned {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fdba74;
}

.dash-product-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
}

@media (max-width: 768px) {
  .dash-product-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ================= CAMERA SCANNER MODAL ================= */
.camera-scanner-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.camera-scanner-modal.active {
  display: flex;
}

.camera-scanner-box {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.camera-scanner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #1e293b;
  color: #ffffff;
}

.camera-scanner-header h3 {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.camera-viewfinder-wrap {
  position: relative;
  width: 100%;
  height: 320px;
  background: #000000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-reticle {
  position: absolute;
  width: 220px;
  height: 220px;
  border: 2px dashed rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  overflow: hidden;
}

/* Góc ngắm camera neon */
.camera-reticle::before,
.camera-reticle::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: #22c55e;
  border-style: solid;
  pointer-events: none;
}

.camera-reticle::before {
  top: 0;
  left: 0;
  border-width: 4px 0 0 4px;
  border-top-left-radius: 8px;
}

.camera-reticle::after {
  bottom: 0;
  right: 0;
  border-width: 0 4px 4px 0;
  border-bottom-right-radius: 8px;
}

.laser-scan-line {
  position: absolute;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ef4444, #22c55e, #ef4444, transparent);
  box-shadow: 0 0 12px #22c55e, 0 0 4px #ef4444;
  top: 0;
  animation: laserSweep 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes laserSweep {
  0% {
    top: 5%;
    opacity: 0.7;
  }
  50% {
    top: 90%;
    opacity: 1;
  }
  100% {
    top: 5%;
    opacity: 0.7;
  }
}

.camera-scanner-footer {
  padding: 1rem 1.25rem;
  background: #0f172a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  border-top: 1px solid #1e293b;
}

.camera-scanner-hint {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0;
}

.camera-toolbar-btns {
  display: flex;
  gap: 0.5rem;
}

.camera-tool-btn {
  background: #1e293b;
  border: 1px solid #334155;
  color: #f1f5f9;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.camera-tool-btn:hover {
  background: #334155;
  color: #ffffff;
}

.camera-tool-btn.active {
  background: var(--primary);
  border-color: var(--primary);
}

/* ================= QR THERMAL LABEL (50x30mm) ================= */
.label-body-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2mm;
  flex-grow: 1;
  margin: 0.5mm 0;
  overflow: hidden;
}

.label-qr-wrap {
  width: 14mm;
  height: 14mm;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #ffffff;
}

.label-qr-wrap svg {
  width: 14mm !important;
  height: 14mm !important;
  display: block;
}

.label-meta-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  flex-grow: 1;
  min-width: 0;
  text-align: right;
  line-height: 1.15;
}

.label-subcode {
  font-family: monospace;
  font-size: 6.5pt;
  color: #444;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.label-location-badge {
  font-size: 6.5pt;
  font-weight: 800;
  background: #000;
  color: #fff !important;
  padding: 0.2mm 1mm;
  border-radius: 1mm;
  letter-spacing: 0.2px;
}
