@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

/* Hover color variations for Edit and Delete buttons in product details page */
.btn-danger:hover, .btn-danger:focus {
  background-color: #b52a37 !important;
  border-color: #a71d2a !important;
  color: #fff !important;
}

.btn-warning:hover, .btn-warning:focus {
  background-color: #686868 !important;
  border-color: #696969 !important;
  color: #fff !important;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(circle at top left, rgba(108, 98, 201, 0.16), transparent 26%),
    radial-gradient(circle at top right, rgba(11, 10, 15, 0.06), transparent 18%),
    linear-gradient(180deg, #f8f4ee 0%, #f3ecdf 48%, #ede2d2 100%);
  background-size: cover;
  background-attachment: fixed;
  position: relative;
  width: 100%;
  min-height: 100vh;
}

button,
a,
input,
select,
textarea,
label,
[role="button"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body.mobile-nav-open {
  overflow: hidden;
}

:root {
  --primary-color: #0a0a45;
  --primary-dark: #080818;
  --primary-light: #1b1b2b;
  --secondary-color: #c9a962;
  --accent-gold: #e7d7aa;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --success-color: #28a745;
  --text-primary: #1f2433;
  --text-secondary: #57575d;
  --text-light: #8a8378;
  --border-color: #d9cfbf;
  --bg-white: #ffffff;
  --bg-light: #f8f3ea;
  --bg-grey: #eee5d7;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 200px;
  background:
    linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  z-index: 1000;
}

.sidebar.minimized {
  width: 70px;
}

.sidebar.minimized .sidebar-logo {
  display: none;
}

.sidebar.minimized .nav-text {
  display: none;
}

.sidebar.minimized .nav-item {
  justify-content: center;
  padding: 0.875rem;
}

.sidebar-header {
  border-bottom: 1px solid rgba(172, 170, 231, 0.14);
  display: flex;
  justify-content: left;
  align-items: center;
  gap: 0.4rem;
  background: rgb(3, 7, 62);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.sidebar-logo .logo-img {
  height: 60px;
  width: 200px;
  max-width: 200px;
  object-fit: inherit;
}

.sidebar-nav {
  padding: 0.5rem 0;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: rgb(255, 255, 255) important;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.sidebar-toggle:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
}


.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
  font-size: 0.9rem;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: white;
}

.nav-item.active {
  background-color: rgba(105, 98, 201, 0.15);
  color: #c9a962;
  border-left-color: #c9a962;
}

.nav-icon {
  font-size: 1.1rem;
}

.main-content {
  flex: 1;
  margin-left: 200px;
  background: transparent;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sidebar-backdrop {
  opacity: 0;
  pointer-events: none;
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.main-content.expanded {
  margin-left: 70px;
}

.header {
  background:
    linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border-bottom: 1px solid rgba(103, 98, 201, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
}

.header h1 {
  color: #c9a962;
  font-size: 1.125rem;
  background: linear-gradient(135deg, #c9a962 0%, #e8d5a3 50%, #c9a962 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color:currentColor;
  background-clip: text;
  font-weight: 700;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
}

.user-dropdown {
  position: relative;
}

.user-menu-btn {
  background: rgba(98, 103, 201, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.8);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.user-menu-btn:hover {
  background: rgba(98, 98, 201, 0.15);
  color: white;
}

.user-menu-btn i:first-child {
  font-size: 1.25rem;
}

.user-menu-btn i:last-child {
  font-size: 0.7rem;
}

.user-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  z-index: 1000;
  overflow: hidden;
}

.user-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu-header {
  padding: 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.user-menu-header strong {
  color: #1e293b;
  font-size: 0.9rem;
}

.user-role {
  color: #64748b;
  font-size: 0.75rem;
  text-transform: capitalize;
  background: #e2e8f0;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  width: fit-content;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #374151;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.user-menu-item:hover {
  background: #f3f4f6;
  color: #dc2626;
}

.user-menu-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.content {
  padding: 5px;
  flex: 1;
}

.page-header {
  margin-bottom: 1rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
}

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

.page-header h1 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.card {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.btn {
  padding: 0.45rem 1rem;
  border-radius: 5px;
  border: none;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
  border: 1px solid rgba(98, 117, 201, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
  box-shadow: 0 4px 12px rgba(13, 13, 18, 0.28);
}

.btn-secondary {
  background-color: #4a4a5a;
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #3a3a4a;
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover:not(:disabled) {
  background-color: #f0f0f0;
}

.form-group {
  margin-bottom: 0.75rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.8rem;
}

.form-control {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.8rem;
  transition: all 0.2s;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(98, 103, 201, 0.14);
}

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

.weight-unit-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5rem;
  gap: 0.4rem;
}

.weight-unit-control select.form-control {
  padding-left: 0.5rem;
  padding-right: 1.6rem;
}

textarea.form-control {
  resize: vertical;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333333' d='M0 3l6 6 6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  padding-right: 2rem;
  background-color: white;
  cursor: pointer;
}

select.form-control:hover {
  border-color: var(--primary-color);
}

select.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(100, 98, 201, 0.14);
}

.table-container {
  overflow-x: auto;
}

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

.table thead {
  background-color: #f9fafb;
  border-bottom: 2px solid var(--border-color);
}

.table th,
.table td {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.875rem;
}

.table th {
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s;
}

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

.softpal-kendo-grid {
  width: 100%;
}

.softpal-kendo-grid.k-grid,
.softpal-kendo-grid .k-grid {
  border-color: var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  font-family: inherit;
}

.softpal-kendo-grid .k-grid-header,
.softpal-kendo-grid .k-grid-header-wrap,
.softpal-kendo-grid .k-grid .k-table-th {
  background: #f9fafb;
}

.softpal-kendo-grid .k-grid .k-table-th,
.softpal-kendo-grid .k-table-th {
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.softpal-kendo-grid .k-grid td,
.softpal-kendo-grid td {
  font-size: 0.875rem;
  vertical-align: middle;
  border-color: var(--border-color);
}

.softpal-kendo-grid .k-grid tr.k-table-row:hover,
.softpal-kendo-grid tr.k-table-row:hover {
  background: #f9fafb;
}

.softpal-kendo-grid .k-grid-pager,
.softpal-kendo-grid .k-pager {
  border-color: var(--border-color);
  background: #fff;
}

.softpal-kendo-grid .k-pager-numbers .k-selected {
  background: #0a0a45;
  border-color: #0a0a45;
  color: #fff;
}

.softpal-kendo-grid .k-button-solid-primary {
  background-color: #0a0a45;
  border-color: #0a0a45;
}

.softpal-kendo-grid .k-toolbar,
.softpal-kendo-grid.k-grid .k-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  background: #fffdf9;
  border-color: var(--border-color);
  flex-wrap: wrap;
}

.softpal-kendo-grid .k-toolbar .k-spacer {
  flex: 1 1 auto;
}

.softpal-kendo-grid .k-grid-search {
  width: min(100%, 22rem);
  margin-left: auto;
}

.softpal-kendo-grid .k-grid-search .k-input-inner {
  font-size: 0.78rem;
}

.softpal-kendo-grid .k-grid-excel {
  background: #4a4a5a;
  border-color: #4a4a5a;
  color: #fff;
  font-size: 0.78rem;
}

.softpal-kendo-grid .k-grid-excel:hover,
.softpal-kendo-grid .k-grid-excel:focus {
  background: #3a3a4a;
  border-color: #3a3a4a;
  color: #fff;
}

.grid-filter-bar {
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.grid-filter-bar .form-control {
  flex: 0 1 14rem;
}

.users-page,
.categories-page,
.logs-page,
.products-page,
.product-list-page {
  margin-top: -0.35rem;
}

.users-page .page-header,
.categories-page .page-header,
.logs-page .page-header,
.products-page .page-header,
.product-list-page .page-header {
  margin-bottom: 0px;
  padding: 10px;
  min-height: auto;
  align-items: center;
}

.users-page .card,
.categories-page .card,
.logs-page .card,
.products-page .card,
.product-list-page .card {
  padding: 0.85rem 1rem;
}

.management-table-page {
  margin-top: -1.05rem;
}

.management-table-page .page-header {
  margin-bottom: 0.35rem;
  min-height: 0;
  justify-content: flex-end;
  align-items: flex-start;
}

.management-table-page .page-header .btn {
  margin-top: 0;
}

.management-table-page .card {
  padding-top: 0.7rem;
}

.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 99999 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: auto !important;
  right: auto !important;
  bottom: auto !important;
}

.modal {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  height: auto;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 10000;
  animation: slideIn 0.3s ease-out;
  border: none;
  margin: auto;
}

/* Scrollbar styling */
.modal::-webkit-scrollbar {
  width: 6px;
}

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

.modal::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e5e7eb;
  gap: 1rem;
}

.modal-header h2 {
  font-size: 1.35rem;
  color: var(--primary-color);
  margin: 0;
  flex: 1;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.modal-header .icon-button {
  flex-shrink: 0;
  padding: 0.4rem 0.6rem;
  font-size: 1.5rem;
  color: #6b7280;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  background: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  margin-left: auto;
}

.modal-header .icon-button:hover {
  background-color: #f0f0f0;
  color: #1f2937;
  transform: rotate(90deg);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid #e5e7eb;
}

.modal-footer .btn {
  padding: 0.65rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 100px;
  text-align: center;
}

.modal-footer .btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
  box-shadow: 0 2px 8px rgba(18, 15, 13, 0.22);
}

.modal-footer .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(18, 15, 13, 0.3);
}

.modal-footer .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(18, 15, 13, 0.22);
}

.modal-footer .btn-outline {
  background: #f9fafb;
  color: #374151;
  border: 1.5px solid #d1d5db;
}

.modal-footer .btn-outline:hover {
  background: #f3f4f6;
  border-color: #9ca3b8;
  transform: translateY(-1px);
}

#userForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#userForm .form-group {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#userForm .form-group label {
  margin-bottom: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  display: block;
}

#userForm .form-group label small {
  font-weight: 400;
  color: #6b7280;
  display: block;
  margin-top: 0.15rem;
  font-style: normal;
  font-size: 0.8rem;
}

#userForm .form-control {
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: inherit;
  transition: all 0.2s ease;
}

#userForm .form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.14);
}

#userForm input[type="hidden"] {
  display: none;
}

/* Category Form Styles - Same as User Form */
#categoryForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#categoryForm .form-group {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#categoryForm .form-group label {
  margin-bottom: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  display: block;
}

#categoryForm .form-group label small {
  font-weight: 400;
  color: #6b7280;
  display: block;
  margin-top: 0.15rem;
  font-style: normal;
  font-size: 0.8rem;
}

#categoryForm .form-control {
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: inherit;
  transition: all 0.2s ease;
}

#categoryForm .form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.14);
}

#categoryForm input[type="hidden"] {
  display: none;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-success {
  background-color: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-info {
  background-color: #f7f0e2;
  color: #8b6a28;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

.error-message {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  border-left: 4px solid var(--danger-color);
}

.success-message {
  background-color: #d1fae5;
  color: #065f46;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  border-left: 4px solid var(--secondary-color);
}

.search-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-bar input {
  flex: 1;
}

.multi-code-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  width: 100%;
}

.code-chips-wrap {
  flex: 1 1 28rem;
  min-width: min(100%, 18rem);
  min-height: 42px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  cursor: text;
}

.code-chips-wrap:focus-within {
  border-color: #0a1f5c;
  box-shadow: 0 0 0 3px rgba(10, 31, 92, 0.12);
}

.code-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.22rem 0.62rem 0.22rem 0.72rem;
  background: #0a1f5c;
  color: #fff;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  margin-left: 0.05rem;
  padding: 0;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.chip-remove:hover {
  color: #fff;
}

.code-input {
  flex: 1 1 16rem;
  min-width: min(100%, 14rem);
  padding: 0.2rem 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.88rem;
}

.code-input::placeholder {
  color: #7b8190;
}

.actions {
  display: flex;
  gap: 0.5rem;
}

.icon-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  color: var(--text-secondary);
  transition: all 0.2s;
  font-size: 1rem;
}

.icon-button:hover {
  background-color: #f3f4f6;
  color: var(--text-primary);
}

.icon-button-danger {
  color: var(--danger-color);
}

.icon-button-danger:hover {
  background-color: #fee2e2;
  color: #dc2626;
}

.empty-state {
  text-align: center !important;
  padding: 3rem;
  color: var(--text-secondary);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  min-width: auto;
}

.btn-sm i {
  font-size: 0.875rem;
}

/* Product View Details */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.detail-item {
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 6px;
  border-left: 3px solid var(--primary-color);
}

.detail-item label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.detail-item .value {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
}

.detail-image {
  grid-column: 1 / -1;
  padding: 1.5rem;
  background-color: #f9fafb;
  border-radius: 6px;
  border-left: 3px solid var(--primary-color);
}

.detail-image label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.detail-image img {
  max-width: 500px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.2s;
}

.detail-image img:hover {
  transform: scale(1.02);
}

/* Header Actions */
.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Tooltips - Native browser tooltips using title attribute */
[title] {
  cursor: help;
  position: relative;
}

button[title], a[title] {
  cursor: pointer;
}


/* Product Code Form Styles */
.product-code-page .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
}

.form-card {
  max-width: 1180px;
  margin: 0 auto;
}

.product-code-page .form-card {
  padding: 1rem;
}

.product-form-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}

.product-code-page #productForm {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem 0.85rem;
}

.product-code-page #productForm > .form-row {
  display: contents;
}

.product-code-page #productForm > .form-group,
.product-code-page #productForm > .form-row > .form-group {
  grid-column: span 1;
  margin-bottom: 0;
}

.product-code-page #productForm > .form-group:has(#itemButtonGroup),
.product-code-page #productForm > .form-group:has(#karigarButtonGroup),
.product-code-page #productForm > .custom-fields-section,
.product-code-page #productForm > .form-actions,
.product-code-page #productForm > #errorMessage,
.product-code-page #productForm > #successMessage,
.product-code-page #productForm > input[type="hidden"] {
  grid-column: 1 / -1;
}

.product-code-page #productForm > .form-group:has(.image-upload-area) {
  grid-column: span 2;
}

.product-code-page .button-group-container {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.product-code-page .button-group {
  flex-wrap: wrap;
  gap: 0.4rem;
}

.product-code-page .custom-fields-section {
  margin: 0.1rem 0 0.35rem;
}

@media (max-width: 1100px) {
  .product-code-page #productForm {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .product-code-page #productForm {
    grid-template-columns: 1fr;
  }

  .product-code-page #productForm > .form-group,
  .product-code-page #productForm > .form-row > .form-group,
  .product-code-page #productForm > .form-group:has(.image-upload-area) {
    grid-column: 1 / -1;
  }
}

.required {
  color: var(--danger-color);
  font-size: 0.7rem;
}

.button-group {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.button-group-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.button-group-container .button-group {
  margin-bottom: 0;
}

.btn-pill {
  padding: 0.35rem 0.75rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background-color: white;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.btn-pill:hover {
  border-color: var(--primary-color);
  background-color: rgba(201, 169, 98, 0.08);
}

.btn-pill.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
  border-color: var(--primary-color);
}

.custom-fields-section {
  margin: 0.25rem 0 1rem;
  padding: 0.85rem;
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  background: #fffdf9;
}

.custom-fields-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.custom-fields-header label {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
}

.custom-fields-tools,
.custom-ref-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.custom-ref-control .form-control {
  min-width: 12rem;
}

.field-requirements-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: #fffaf1;
}

.field-requirements-panel > label {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
}

.field-requirements-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.field-requirements-controls .form-control {
  min-width: 12rem;
}

.toggle-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.toggle-checkbox input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary-color);
}

.toggle-checkbox input:disabled,
.toggle-checkbox input:disabled + span {
  cursor: not-allowed;
  opacity: 0.6;
}

.mandatory-fields-modal {
  max-width: 520px;
}

.mandatory-fields-modal .modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mandatory-fields-modal .modal-header h3 {
  margin: 0;
  color: var(--primary-color);
  font-size: 1rem;
}

.mandatory-fields-list {
  display: flex;
  flex-direction: column;
  max-height: 58vh;
  overflow-y: auto;
  padding: 0.75rem 1.25rem;
}

.mandatory-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

.mandatory-field-row:last-child {
  border-bottom: 0;
}

.mandatory-field-name {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
}

.mandatory-field-toggle {
  flex-shrink: 0;
}

.mandatory-field-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-shrink: 0;
}

.mandatory-field-delete {
  width: 2rem;
  height: 2rem;
}

.mandatory-field-delete:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.mandatory-fields-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
}

.field-delete-confirm {
  max-width: 420px;
}

.field-delete-confirm .modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.field-delete-confirm .modal-header h3 {
  margin: 0;
  color: var(--primary-color);
  font-size: 1rem;
}

.field-delete-confirm-body {
  padding: 1.25rem;
  color: var(--text-primary);
  line-height: 1.45;
}

.custom-fields-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.custom-field-row {
  display: grid;
  grid-template-columns: minmax(12rem, 1.15fr) minmax(10rem, 0.85fr) 9.5rem;
  gap: 0.75rem;
  align-items: end;
}

.custom-field-row .form-group {
  margin-bottom: 0;
}

.custom-field-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  min-height: 2.1rem;
  min-width: 0;
}

.custom-field-required-control {
  flex: 0 0 auto;
}

.custom-field-remove {
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.image-upload-area {
  position: relative;
  width: 100%;
}

.upload-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-start;
  padding: 0;
}

.btn-upload {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--primary-color);
  background-color: var(--primary-color);
  color: white;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.75rem;
  font-weight: 500;
}

.btn-upload:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-upload i {
  font-size: 0.875rem;
}

/* Upload Modal Styles */
.upload-modal {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  margin: 2rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.upload-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
}

.upload-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-close-modal {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s;
}

.btn-close-modal:hover {
  color: white;
}

.upload-modal-body {
  padding: 1.5rem;
}

.drop-zone {
  display: block;
  position: relative;
  overflow: hidden;
  border: 2px dashed var(--primary-color);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fbf7ef;
}

.drop-zone-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.drop-zone-content {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--primary-light);
  background: rgba(201, 169, 98, 0.1);
  border-style: solid;
}

.drop-zone .drop-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: block;
}

.drop-zone p,
.drop-zone-text {
  color: #4a4a5a;
  margin: 0;
  font-size: 1rem;
}

.drop-zone a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.drop-zone .upload-link {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.drop-zone a:hover {
  text-decoration: underline;
}

.drop-zone .upload-link:hover {
  text-decoration: underline;
}

.upload-preview {
  border: 1px solid #d0d0d0;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #f8fafc;
}

.upload-preview img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d0d0d0;
}

.upload-preview-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.upload-preview-info span {
  font-size: 0.9rem;
  color: #1a1a2e;
  word-break: break-all;
}

.btn-remove-preview {
  background: none;
  border: none;
  color: #dc3545;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  width: fit-content;
}

.btn-remove-preview:hover {
  text-decoration: underline;
}

.upload-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: #f5f5f5;
  border-top: 1px solid #e0e0e0;
}

.import-drop-zone {
  padding: 2.75rem 2rem;
}

.import-drop-zone.dragover {
  border-color: var(--primary-light);
  background: rgba(201, 169, 98, 0.1);
  border-style: solid;
}

.import-help-text {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #64748b;
}

.import-filename {
  min-height: 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}

.import-progress {
  width: 100%;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  height: 18px;
  margin-top: 0.75rem;
}

.import-progress-bar {
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  width: 0%;
  transition: width 0.2s ease;
}

.import-progress-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  pointer-events: none;
}

.import-result {
  min-height: 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.import-result.is-error {
  color: #b91c1c;
}

.import-result.is-success {
  color: #15803d;
}

.import-modal-footer .btn {
  min-width: 140px;
  justify-content: center;
}

.import-modal-footer .btn:disabled {
  background: #cbd5e1;
  border-color: #cbd5e1;
  color: white;
  box-shadow: none;
  transform: none;
}

.upload-placeholder {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-placeholder:hover {
  border-color: var(--primary-color);
  background-color: #f9fafb;
}

.upload-placeholder i {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.upload-placeholder p {
  color: var(--text-secondary);
  margin: 0;
}

.image-preview {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.image-preview img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: var(--shadow-md);
}

.btn-remove {
  position: absolute;
  top: -10px;
  right: -10px;
  background-color: var(--danger-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.2s;
}

.btn-remove:hover {
  background-color: #dc2626;
  transform: scale(1.1);
}

.camera-modal {
  background: white;
  border-radius: 12px;
  max-width: 800px;
  width: 100%;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.camera-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.camera-modal .modal-header h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 0;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s;
}

.btn-close:hover {
  color: var(--danger-color);
}

.camera-container {
  position: relative;
  width: 100%;
  background-color: #000;
  border-radius: 8px;
  overflow: hidden;
  margin: 1rem 0;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-loading {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: white;
  z-index: 10;
}

.camera-loading i {
  color: var(--primary-color);
}

.camera-loading p {
  margin: 0;
  font-size: 0.875rem;
}

#cameraVideo {
  width: 100%;
  height: auto;
  max-height: 70vh;
  display: none;
  object-fit: contain;
  background-color: #000;
}

#cameraCanvas {
  display: none;
}

.btn-flip-camera {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--primary-color);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.2s;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.btn-flip-camera:hover {
  background-color: white;
  transform: scale(1.1) rotate(180deg);
}

.camera-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding: 1rem 0;
}

.camera-controls .btn {
  min-width: 120px;
}

.form-actions {
  margin-top: 1rem;
  text-align: center;
}

.btn-lg {
  padding: 0.6rem 2rem;
  font-size: 0.875rem;
}

/* Product List Styles */
.product-list-page .table tbody tr {
  cursor: pointer;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

/* Product Detail View */
.detail-card {
  max-width: 900px;
  margin: 0 auto;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.detail-item {
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 8px;
  border-left: 3px solid var(--primary-color);
}

.detail-item label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.detail-item .value {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
}

.detail-image {
  grid-column: 1 / -1;
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 8px;
  border-left: 3px solid var(--primary-color);
}

.detail-image img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  object-fit: cover;
}

.detail-image img:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.detail-image label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Tooltip styles */
[title] {
  position: relative;
}

/* Better button styling */
.btn-secondary {
  background-color: #6b7280;
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #4b5563;
}

/* ============================================
   CATALOG PAGE STYLES (Flipkart-like Grid)
   ============================================ */

.catalog-page {
  padding: 0;
  width: 100%;
}

/* Search Bar */
.catalog-search-bar {
  width: 100%;
  margin-bottom: 0.9rem;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid rgba(10, 31, 92, 0.1);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.catalog-toolbar-search,
.catalog-toolbar-controls {
  width: 100%;
}

.catalog-toolbar-search .search-bar {
  margin-bottom: 0;
}

.catalog-toolbar-search .multi-code-bar {
  padding: 0;
}

.catalog-toolbar-search .multi-code-bar > .btn {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0.5rem 0.75rem;
  white-space: nowrap;
}

.catalog-toolbar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.catalog-toolbar-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  min-width: 0;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  max-width: 300px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.catalog-search-input {
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 2.25rem;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.85rem;
  transition: all 0.2s;
  background-color: white;
}

.catalog-search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.14);
}

.catalog-search-input::placeholder {
  color: #9ca3af;
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.2s;
}

.search-clear-btn:hover {
  background-color: #f3f4f6;
  color: var(--text-primary);
}

/* Filter Info */
.catalog-filter-info {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.75rem;
  background: #f8fafc;
  border: 1px solid rgba(10, 31, 92, 0.08);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Catalog Grid */
.catalog-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding-right: 0.5rem;
  width: 100%;
}

.catalog-grid::-webkit-scrollbar {
  width: 6px;
}

.catalog-grid::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.catalog-grid::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.catalog-grid::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

.catalog-loading, .catalog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
  font-size: 1rem;
}

.catalog-empty i {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
  color: #d1d5db;
}

/* Catalog Card */
.catalog-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  cursor: pointer;
}

.catalog-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

/* Card Image */
.catalog-card-image {
  position: relative;
  width: 100%;
  height: 90px;
  background-color: #f9fafb;
  overflow: hidden;
}

.catalog-checkbox-wrapper {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid #c3d1de;
  border-radius: 4px;
  z-index: 2;
}

.catalog-checkbox-wrapper input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.catalog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.catalog-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  background-color: #f3f4f6;
}

.catalog-no-image i {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.catalog-no-image span {
  font-size: 0.6rem;
}

/* Badge (Karigar) */
.catalog-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Card Content */
.catalog-card-content {
  padding: 0.5rem;
}

.catalog-item-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Details */
.catalog-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.35rem;
}

.catalog-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
}

.detail-label {
  color: var(--text-secondary);
}

.detail-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* Card Footer */
.catalog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border-color);
}

.catalog-id {
  font-size: 0.6rem;
  color: var(--text-secondary);
}

.catalog-view-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.55rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.catalog-view-btn:hover {
  background: var(--primary-dark);
}

/* Responsive */
@media (max-width: 1200px) {
  .catalog-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .catalog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .catalog-card-image {
    height: 100px;
  }
  
  .catalog-search-input {
    font-size: 0.8rem;
  }
}

@media (max-width: 600px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .catalog-search-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .search-input-wrapper {
    max-width: 100%;
  }
}

/* ============================================
   FOOTER STYLES
   ============================================ */

.app-footer {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border-top: 1px solid rgba(201, 169, 98, 0.2);
  padding: 0.5rem 1.5rem;
  margin-top: auto;
  position: sticky;
  bottom: 0;
  z-index: 99;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-copyright {
  color: rgba(201, 169, 98, 0.8);
  font-size: 0.7rem;
  font-weight: 500;
}

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

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(201, 169, 98, 0.2);
  color: rgba(201, 169, 98, 0.9);
  font-size: 0.7rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.footer-social a:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

/* Social media brand colors on hover */
.footer-social a[title="Facebook"]:hover {
  background: #1877f2;
  color: white;
}

.footer-social a[title="X (Twitter)"]:hover {
  background: #000000;
  color: white;
}

.footer-social a[title="LinkedIn"]:hover {
  background: #0a66c2;
  color: white;
}

.footer-social a[title="Pinterest"]:hover {
  background: #e60023;
  color: white;
}

.footer-social a[title="Dribbble"]:hover {
  background: #ea4c89;
  color: white;
}

.footer-social a[title="Instagram"]:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: white;
}

.footer-social a[title="YouTube"]:hover {
  background: #ff0000;
  color: white;
}

@media (max-width: 600px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-copyright {
    order: 2;
  }
  
  .footer-social {
    order: 1;
  }
}

/* ==================== CUSTOMER SUPPORT STYLES ==================== */

.customer-support-page {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.support-tabs {
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.tab-buttons {
  display: flex;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  padding: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tab-btn:hover {
  background: rgba(201, 169, 98, 0.08);
  color: var(--primary-color);
}

.tab-btn.active {
  background: var(--primary-color);
  color: white;
  border-bottom: 3px solid var(--secondary-color);
}

.tab-btn i {
  font-size: 1.1rem;
}

.tab-content {
  display: none;
  padding: 2rem;
}

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

.card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-header h3 i {
  color: var(--secondary-color);
}

.card-header p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(201, 169, 98, 0.14);
}

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

.form-actions {
  margin-top: 2rem;
  text-align: right;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border: none;
  border-radius: 4px;
  font-size: 0.880rem;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

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

.alert {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Hidden modal - override flex display */
.hidden {
  display: none !important;
}

#cameraModal.hidden {
  display: none !important;
  visibility: hidden !important;
}

.alert i {
  font-size: 1.1rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .customer-support-page {
    padding: 1rem;
  }
  
  .tab-content {
    padding: 1rem;
  }
  
  .tab-buttons {
    flex-direction: column;
  }
  
  .tab-btn {
    padding: 0.75rem;
  }
  
  .form-actions {
    text-align: center;
  }
}

/* ==================== CUSTOMER ISSUES STYLES ==================== */

.customer-issues-page {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.issues-tabs {
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.tab-count {
  background: var(--secondary-color);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: bold;
  margin-left: 0.5rem;
}

.issues-list {
  padding: 2rem;
  min-height: 200px;
}

.loading {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem;
  font-style: italic;
}

.no-issues {
  text-align: center;
  color: var(--text-secondary);
  padding: 3rem 2rem;
}

.no-issues i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.issue-card {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

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

.issue-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.issue-user {
  font-weight: 500;
  color: var(--primary-color);
}

.issue-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.issue-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-in_progress {
  background: #cce5ff;
  color: #004085;
}

.status-resolved {
  background: #d4edda;
  color: #155724;
}

.status-closed {
  background: #f8d7da;
  color: #721c24;
}

.issue-subject {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.issue-preview {
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.issue-responded {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--secondary-color);
}

.issue-responded i {
  margin-right: 0.25rem;
}

/* Modal Styles - Customer Issues */
#issueModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.modal-content {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

#issueModal .modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#issueModal .modal-header h3 {
  margin: 0;
  color: var(--primary-color);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--bg-light);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
}

.issue-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.detail-section {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1rem;
}

.detail-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-section h4 {
  margin: 0 0 0.5rem 0;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-section h4 i {
  color: var(--secondary-color);
}

.detail-section p {
  margin: 0;
  color: var(--text-primary);
}

.detail-email {
  color: var(--text-secondary) !important;
  font-size: 0.9rem;
}

.detail-subject {
  font-weight: 600;
  font-size: 1.1rem;
}

.detail-message,
.detail-response {
  background: var(--bg-light);
  padding: 1rem;
  border-radius: 4px;
  border-left: 4px solid var(--primary-color);
  line-height: 1.6;
}

.response-section {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.response-date {
  margin-top: 0.5rem !important;
  font-size: 0.85rem !important;
  color: var(--text-secondary) !important;
  font-style: italic;
}

/* Responsive design for issues */
@media (max-width: 768px) {
  .customer-issues-page {
    padding: 1rem;
  }
  
  .issues-list {
    padding: 1rem;
  }
  
  .issue-card {
    padding: 1rem;
  }
  
  .issue-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .modal-content {
    width: 95%;
    margin: 1rem;
  }
  
  .modal-header,
  .modal-body {
    padding: 1rem;
  }
}

/* ============================================================
   MOBILE RESPONSIVE OVERHAUL  (≤ 768 px)
   ============================================================ */

/* ── Sidebar: slide-in drawer on mobile ── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 240px;
    z-index: 2000;
    transition: transform 0.3s ease;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  /* dark overlay behind open drawer */
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    transition: opacity 0.2s ease;
  }
  .sidebar-backdrop.active { display: block; }

  .main-content {
    margin-left: 0 !important;
  }

  /* ── Header ── */
  .header {
    position: sticky;
    top: 0;
    z-index: 1500;
  }
  .header-content {
    padding: 0.6rem 1rem;
    gap: 0.5rem;
  }
  .header-content h1 {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* hamburger visible on mobile */
  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #c9a962;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    flex-shrink: 0;
  }

  /* ── Content padding ── */
  .multi-code-bar {
    align-items: stretch;
  }

  .code-chips-wrap {
    flex: 1 1 100%;
    min-width: 0 !important;
  }

  .selection-toolbar {
    flex-wrap: wrap;
    align-items: flex-start !important;
  }

  .selection-toolbar .btn,
  .multi-code-bar > .btn,
  .catalog-actions .btn {
    flex: 1 1 10rem;
  }

  .form-control,
  .catalog-search-input,
  .code-input {
    font-size: 16px;
  }

  .content { padding: 12px; }
  .page-header { flex-direction: column; gap: 10px; }
  .header-actions { flex-wrap: wrap; gap: 6px; }
  .header-actions .btn { font-size: 0.8rem; padding: 6px 10px; }

  /* ── Card & form fields ── */
  .card { border-radius: 10px; }
  .form-row, .enq-form-row { flex-direction: column; gap: 0; }

  /* ── Product list: horizontal scroll table ── */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table { min-width: 700px; }
  .table th, .table td { font-size: 0.78rem; padding: 8px 6px; white-space: nowrap; }
  .pl-img-cell { width: 44px; }
  .pl-thumb, .pl-no-img { width: 40px; height: 40px; }

  /* ── Catalog grid: 2 cols ── */
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }
  .catalog-card-image { height: 110px; }
  .catalog-item-name { font-size: 0.82rem; }
  .catalog-details { font-size: 0.75rem; }
  .detail-label, .detail-value { font-size: 0.73rem; }
  .catalog-view-btn { font-size: 0.75rem; padding: 5px 8px; }

  /* ── Dashboard / stat cards ── */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .import-drop-zone {
    padding: 2rem 1rem;
  }

  .import-modal-footer {
    flex-direction: column-reverse;
  }

  .import-modal-footer .btn {
    width: 100%;
  }



  /* ── Product form ── */
  .form-grid {
    grid-template-columns: 1fr !important;
  }

  /* ── Enquiry page ── */
  .enquiry-page { padding: 12px; }
  .enquiry-hero { padding: 14px 14px; }
  .enquiry-tabs { gap: 5px; }
  .etab-btn { padding: 8px 12px; font-size: 0.8rem; }
  .enquiry-card-header { padding: 14px 16px; }
  form { padding: 14px; }
  .enq-submit-btn { width: 100%; justify-content: center; }

  /* ── Customer issues ── */
  .ci-page { padding: 12px; }
  .ci-header { padding: 14px 16px; flex-direction: column; gap: 10px; }
  .ci-modal-box { max-height: 95vh; }

  /* ── Barcode printer page ── */
  .printer-layout { flex-direction: column !important; }

  /* ── Modals ── */
  .edit-modal-box, .ci-modal-box { max-width: 100% !important; margin: 0; border-radius: 12px 12px 0 0; }
  .ci-modal-overlay, .edit-modal-overlay { align-items: flex-end; }

  /* ── Buttons ── */
  .action-buttons { gap: 4px; }
  .action-buttons .btn { padding: 5px 7px; font-size: 0.78rem; }

  /* ── Bottom padding so content isn't under mobile nav ── */
  .content { padding-bottom: 70px; }
}

/* ── Extra small phones ── */
@media (max-width: 400px) {
  .catalog-grid { grid-template-columns: 1fr !important; }
  .stats-grid   { grid-template-columns: 1fr !important; }
  .header-content h1 { font-size: 0.8rem; }
}

/* ── Mobile bottom navigation bar ── */
.mobile-bottom-nav {
  display: none !important;
}
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-top: 1px solid rgba(201,169,98,0.25);
    z-index: 1800;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
  }
  .mbn-item {
    display: flex;
    flex-direction: column;

    
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.6rem;
    padding: 6px 8px;
    border-radius: 8px;
    transition: all 0.2s;
    flex: 1;
    min-width: 0;
  }
  /* push footer above the mobile bottom nav */
  .app-footer {
    padding-bottom: calc(0.5rem + 56px);
    position: static;
  }
  .mbn-item i { font-size: 1.1rem; }
  .mbn-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; text-align: center; }
  .mbn-item.active, .mbn-item:hover { color: #c9a962; background: rgba(201,169,98,0.12); }
  /* hide desktop sidebar toggle on mobile */
  .sidebar-header .sidebar-toggle { display: none; }
}

/* ══════════════════════════════════════════════════════════════════════
   COMPREHENSIVE MOBILE RESPONSIVE DESIGN - All Screen Sizes
   ══════════════════════════════════════════════════════════════════════ */

/* ── Ultra-large screens (1441px+) ── */
@media (min-width: 1441px) {
  .container { max-width: 1400px; }
  .page-header { padding: 2rem; }
}

/* ── Large tablets (1025px - 1200px) ── */
@media (max-width: 1200px) and (min-width: 1025px) {
  .page-header { padding: 1.5rem 1.2rem; }
  .header-actions { gap: 0.7rem; flex-wrap: wrap; }
  .btn { padding: 0.65rem 1rem; font-size: 0.85rem; }
  .product-table { font-size: 0.9rem; }
  table thead th, table tbody td { padding: 0.8rem 0.6rem; }
}

/* ── Tablets and iPad (769px - 1024px) ── */
@media (max-width: 1024px) and (min-width: 769px) {
  .page-header { padding: 1.2rem 1rem; flex-direction: column; gap: 1rem; }
  .header-actions { gap: 0.6rem; }
  .btn { padding: 5px; font-size: 10px; min-height: 38px; }
  .product-table { font-size: 0.85rem; }
  table thead th, table tbody td { padding: 0.7rem 0.5rem; }
  .search-bar { width: 100%; }
  .chip { padding: 0.4rem 0.6rem; font-size: 0.75rem; }
  #codeInput { font-size: 16px; padding: 0.6rem 0.8rem; }
}

/* ── Large mobile phones (641px - 768px) ── */
@media (max-width: 768px) and (min-width: 641px) {
  .sidebar { width: 70%; }
  .main-content { margin-left: 70px; }
  .header { padding: 1rem; }
  .header-content h1 { font-size: 1.1rem; }
  .page-header { padding: 1rem; flex-direction: column; gap: 0.8rem; }
  .header-actions { gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
  .btn {
    padding: 0.55rem 0.8rem;
    font-size: 0.75rem;
    min-height: 40px;
    flex: 1;
    min-width: 100px;
  }
  .product-table { font-size: 0.8rem; }
  table thead th, table tbody td { padding: 0.6rem 0.4rem; }
  .search-bar { width: 100%; margin-bottom: 1rem; }
  #codeInput {
    font-size: 16px;
    padding: 0.55rem 0.75rem;
    width: 100%;
  }
  .chip { padding: 0.35rem 0.55rem; font-size: 0.7rem; }
  .selection-toolbar { margin: 0.8rem 0; padding: 0.8rem; }
}

/* ── Standard mobile (481px - 640px) ── */
@media (max-width: 640px) and (min-width: 481px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: fixed; left: -100%; z-index: 1900; }
  .sidebar.active { left: 0; }
  .main-content { margin-left: 0; width: 100%; }
  .page-header { padding: 0.8rem; flex-direction: column; gap: 0.6rem; }
  .header-actions {
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .btn {
    padding: 0.5rem 0.7rem;
    font-size: 0.7rem;
    min-height: 38px;
    flex: 1;
    min-width: 90px;
  }
  .product-table { font-size: 0.75rem; }
  table thead th, table tbody td { padding: 0.5rem 0.3rem; }
  table thead th { font-size: 0.65rem; }
  table tbody td { font-size: 0.7rem; }
  .search-bar { width: 100%; margin-bottom: 0.8rem; }
  #codeInput {
    font-size: 16px;
    padding: 0.5rem 0.7rem;
    width: 100%;
  }
  .chip { padding: 0.3rem 0.5rem; font-size: 0.65rem; }
  .chip-remove { margin-left: 0.3rem; }
  #codeChips { gap: 0.4rem; }
  .selection-toolbar {
    margin: 0.6rem 0;
    padding: 0.6rem;
    font-size: 0.8rem;
    flex-wrap: wrap;
  }
  .modal-overlay { padding: 1rem; }
  .upload-modal { width: 95%; max-width: 95%; }
  .drop-zone { min-height: 120px; }
}

/* ── Small phones (321px - 480px) ── */
@media (max-width: 480px) {
  * { font-size: 14px; }
  .sidebar { width: 100%; position: fixed; left: -100%; top: 0; height: 100vh; z-index: 1900; }
  .sidebar.active { left: 0; }
  .sidebar-backdrop {
    display: none !important;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1850;
    opacity: 0;
    pointer-events: none;
  }
  .sidebar-backdrop.active {
    display: block !important;
    opacity: 1;
    pointer-events: auto;
  }
  .main-content { margin-left: 0; width: 100%; padding-bottom: 70px; }
  .header { padding: 0.8rem; }
  .mobile-menu-btn { display: block !important; background: none; border: none; color: #fff; font-size: 1.3rem; cursor: pointer; }
  .sidebar-toggle { display: none !important; }
  .header-content h1 { font-size: 0.95rem; margin: 0; }
  .user-info { font-size: 0.75rem; }
  .user-info span { display: none; }
  .user-menu-btn { padding: 0.4rem; font-size: 1.1rem; }
  .page-header { padding: 0.6rem; gap: 0.4rem; }
  .header-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    width: 100%;
  }
  .btn {
    padding: 0.45rem 0.6rem;
    font-size: 0.65rem;
    min-height: 36px;
    border-radius: 6px;
  }
  .btn i { font-size: 0.8rem; }
  .product-table { font-size: 0.7rem; }
  table thead th, table tbody td { padding: 0.4rem 0.25rem; }
  table thead th { font-size: 0.6rem; font-weight: 700; }
  table tbody td { font-size: 0.65rem; }
  table { overflow-x: auto; display: block; }
  .search-bar { width: 100%; margin-bottom: 0.6rem; }
  .page-header .header-actions,
  .selection-toolbar,
  .catalog-actions,
  .catalog-share-actions {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }
  .page-header .header-actions .btn,
  .selection-toolbar .btn,
  .catalog-actions .btn,
  .catalog-share-actions .btn {
    flex: 1 1 100%;
  }
  #codeInput {
    font-size: 16px;
    padding: 0.45rem 0.6rem;
    width: 100%;
    border-radius: 6px;
  }
  .chip {
    padding: 0.25rem 0.4rem;
    font-size: 0.6rem;
    border-radius: 12px;
  }
  #codeChips { gap: 0.3rem; flex-wrap: wrap; }
  .selection-toolbar {
    margin: 0.5rem 0;
    padding: 0.5rem;
    font-size: 0.75rem;
    gap: 0.4rem;
  }
  .selection-toolbar .btn { padding: 0.4rem 0.5rem; }
  .modal-overlay { padding: 0.5rem; }
  .upload-modal { width: 98%; }
  .upload-modal-header h3 { font-size: 0.9rem; }
  .drop-zone { min-height: 100px; padding: 1rem 0.5rem; }
  .drop-icon { font-size: 1.8rem; }
  .import-help-text { font-size: 0.7rem; }
  .modal-body { padding: 0.8rem; }
  .modal-footer { gap: 0.5rem; }
}

/* ── Extra small phones (Max 320px) ── */
@media (max-width: 320px) {
  .header-content h1 { font-size: 0.85rem; }
  .header-actions {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .btn {
    padding: 0.4rem 0.5rem;
    font-size: 0.6rem;
    min-height: 34px;
  }
  .product-table { font-size: 0.65rem; }
  table thead th, table tbody td { padding: 0.3rem 0.2rem; }
  #codeInput { font-size: 14px; padding: 0.4rem 0.5rem; }
  .chip { padding: 0.2rem 0.3rem; font-size: 0.55rem; }
  .search-bar { margin-bottom: 0.5rem; }
  .modal-overlay { padding: 0.3rem; }
  .upload-modal { width: 100%; }
}

/* ── Landscape mode (orientation: landscape) ── */
@media (orientation: landscape) and (max-height: 500px) {
  .header { padding: 0.5rem; }
  .page-header { padding: 0.5rem; }
  .btn { padding: 5px; font-size: 10px; min-height: 28px; }
  .modal-overlay { max-height: 90vh; overflow-y: auto; }
}

/* ── Touch device enhancements ── */
@media (hover: none) and (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn:active { transform: scale(0.98); }
  button, a, input[type="checkbox"] { -webkit-tap-highlight-color: transparent; }
}

/* ============================================
   SHARED RESPONSIVE POLISH
   ============================================ */

html,
body {
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

.content,
.card,
.page-header,
.header-content,
.user-info,
.catalog-card,
.catalog-card-content {
  min-width: 0;
}

.header-content {
  gap: 1rem;
  flex-wrap: wrap;
}

.header h1 {
  margin: 0;
  line-height: 1.25;
}

.header-content h1 {
  flex: 1 1 18rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.user-info {
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.user-info > span {
  max-width: min(32vw, 280px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-header {
  flex-wrap: wrap;
}

.page-header > div:first-child {
  flex: 1 1 16rem;
  min-width: 0;
}

.page-header .header-actions,
.button-group {
  flex-wrap: wrap;
}

.btn {
  justify-content: center;
  text-align: center;
  white-space: normal;
}

.catalog-search-bar {
  align-items: stretch;
}

.catalog-filter-info {
  flex: 0 0 auto;
}

.catalog-sort-controls {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: #0a1f5c;
  font-size: 0.86rem;
  font-weight: 600;
}

.catalog-sort-select {
  min-width: 210px;
  height: 40px;
  padding: 0 0.85rem;
  border: 1px solid rgba(10, 31, 92, 0.2);
  border-radius: 8px;
  background: #fff;
  color: #0a1f5c;
  font-size: 0.9rem;
  font-weight: 500;
}

.catalog-sort-select:focus {
  outline: none;
  border-color: #0a1f5c;
  box-shadow: 0 0 0 3px rgba(10, 31, 92, 0.12);
}

.catalog-scan-filter-bar {
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.55rem 0 0.35rem;
}

.catalog-scan-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(10, 31, 92, 0.22);
  border-radius: 999px;
  background: #f0f4ff;
  color: #0a1f5c;
  font-size: 0.82rem;
  line-height: 1.2;
}

.catalog-scan-chip span {
  color: #4b5563;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-scan-chip button {
  border: 0;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.1rem;
}

.catalog-scan-chip button:hover {
  color: #0a1f5c;
}

.catalog-actions {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  min-width: 0;
}

.catalog-actions .btn {
  min-height: 36px;
  padding: 0.46rem 0.72rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.catalog-visibility-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0px !important;
  cursor: pointer;
  color: #0a1f5c;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.catalog-visibility-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0 !important;
  cursor: pointer;
}

.catalog-selection-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.35rem;
}

.catalog-selection-summary {
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.75rem 1.25rem;
  background: #e3f2fd;
  border-right: 4px solid #0a1f5c;
  border-radius: 4px;
  color: #0a1f5c;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
  margin-left: auto;
}

.catalog-selection-summary span {
  white-space: nowrap;
}

.catalog-selection-separator {
  color: rgba(10, 31, 92, 0.45);
}

.catalog-share-fallback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(10, 31, 92, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
}

.catalog-share-input {
  flex: 1 1 24rem;
  min-width: 14rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  color: var(--text-primary);
}

.catalog-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.catalog-share-text-modal {
  max-width: 42rem;
}

.catalog-share-textarea {
  width: 100%;
  min-height: 14rem;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}

.catalog-share-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.14);
}

.btn-scanner {
  background: #fff;
  border: 1px solid #9ca3af;
  color: #374151;
}

.btn-scanner.scanner-active {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.catalog-scanner-modal {
  max-width: min(92vw, 34rem);
}

.scanner-choice-modal,
.product-list-scanner-choice-modal {
  max-width: 420px;
}

.scanner-choice-actions {
  display: grid;
  gap: 0.75rem;
}

.scanner-choice-btn {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.scanner-choice-btn i {
  color: #0a1f5c;
  font-size: 1.05rem;
  width: 1.25rem;
  text-align: center;
}

.scanner-choice-btn:hover,
.scanner-choice-btn:focus-visible {
  border-color: #0a1f5c;
  box-shadow: 0 0 0 3px rgba(10, 31, 92, 0.12);
  transform: translateY(-1px);
  outline: none;
}

.catalog-scanner-view {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: #050816;
}

.catalog-scanner-view video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.catalog-scanner-frame {
  position: absolute;
  inset: 20% 10%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.28);
}

.catalog-scanner-frame::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 2px;
  background: #16a34a;
  box-shadow: 0 0 12px rgba(22, 163, 74, 0.85);
}

.catalog-scanner-status {
  margin-top: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
}

.catalog-grid {
  align-items: stretch;
}

.catalog-card {
  display: flex;
  flex-direction: column;
}

.catalog-card-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.catalog-details {
  min-width: 0;
}

.catalog-detail-row {
  gap: 0.5rem;
  align-items: flex-start;
}

.detail-value {
  text-align: right;
  overflow-wrap: anywhere;
}

.catalog-card-footer {
  gap: 0.5rem;
}

.catalog-id {
  overflow-wrap: anywhere;
}

@media (max-width: 1024px) {
  .header-content h1 {
    flex-basis: 100%;
  }

  .user-info {
    width: 100%;
  }

  .page-header {
    align-items: flex-start;
  }

  .catalog-search-bar {
    align-items: stretch;
  }

  .catalog-toolbar-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-toolbar-meta {
    width: 100%;
  }

  .catalog-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .catalog-grid {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  .header-content {
    align-items: center;
  }

  .header-content h1 {
    order: 2;
    flex-basis: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
  }

  .user-info {
    width: auto;
    justify-content: flex-end;
  }

  .catalog-actions {
    gap: 0.6rem;
  }

  .catalog-actions .btn {
    flex: 1 1 10rem;
  }

  .catalog-visibility-toggle {
    width: 100%;
    margin-left: 0 !important;
    justify-content: flex-start;
  }

  .catalog-selection-row {
    justify-content: stretch;
  }

  .catalog-selection-summary {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    margin-left: 0;
  }

  .catalog-share-fallback {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-share-input {
    min-width: 0;
  }

  .catalog-share-actions .btn {
    flex: 1 1 10rem;
  }
}

@media (max-width: 480px) {
  .user-info {
    width: auto;
  }

  .catalog-actions .btn,
  .catalog-share-actions .btn {
    flex: 1 1 100%;
  }

  .catalog-selection-summary {
    padding: 0.7rem 0.85rem;
  }

  .catalog-selection-separator {
    display: none;
  }

  .catalog-card-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-view-btn {
    width: 100%;
  }
}

/* ============================================
   MOBILE STABILITY PATCH
   ============================================ */

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .layout,
  .main-content,
  .content {
    min-width: 0;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0 !important;
    width: min(86vw, 20rem) !important;
    max-width: 20rem;
    height: 100dvh;
    z-index: 2105 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.28s ease, box-shadow 0.28s ease !important;
    will-change: transform;
    overscroll-behavior: contain;
  }

  .sidebar.mobile-open {
    transform: translateX(0) !important;
    box-shadow: 0 24px 60px rgba(12, 10, 24, 0.32);
  }

  .sidebar-backdrop {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(12, 10, 24, 0.48);
    backdrop-filter: blur(1.5px);
    z-index: 2090;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  .sidebar-backdrop.active {
    display: block !important;
    opacity: 1;
    pointer-events: auto;
  }

  .main-content {
    width: 100%;
    margin-left: 0 !important;
  }

  .header {
    position: sticky;
    top: 0;
    z-index: 1500;
  }

  .header-content {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.9rem;
  }

  .mobile-menu-btn {
    display: inline-flex !important;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
  }

  #sidebarToggle {
    display: none !important;
  }

  .header-content h1 {
    min-width: 0;
    font-size: clamp(0.92rem, 3.8vw, 1.05rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .user-info {
    width: auto;
    min-width: 0;
    gap: 0.35rem;
    margin-left: 0;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  .user-info > span {
    display: none;
  }

  .user-menu {
    right: 0;
    left: auto;
    width: min(88vw, 17rem);
    min-width: 0;
  }

  .content {
    padding: 0.9rem;
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  }

  .page-header,
  .search-bar,
  .header-actions,
  .selection-toolbar,
  .catalog-actions,
  .catalog-share-actions,
  .form-actions,
  .modal-footer,
  .upload-modal-footer,
  .camera-controls,
  .action-buttons,
  .actions {
    flex-wrap: wrap;
  }

  .page-header {
    justify-content: flex-start;
    align-items: stretch;
    gap: 0.85rem;
  }

  .page-header .header-actions,
  .search-bar,
  .selection-toolbar {
    width: 100%;
  }

  .page-header .btn,
  .page-header .header-actions .btn,
  .header-actions .btn,
  .selection-toolbar .btn,
  .catalog-actions .btn,
  .catalog-share-actions .btn,
  .form-actions .btn,
  .upload-modal-footer .btn,
  .camera-controls .btn {
    flex: 1 1 10.5rem;
  }

  .card {
    padding: 1rem;
    border-radius: 12px;
  }

  .form-card {
    max-width: none;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .custom-fields-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .custom-fields-tools,
  .custom-ref-control {
    width: 100%;
  }

  .product-form-toolbar {
    justify-content: flex-start;
  }

  .mandatory-fields-modal {
    width: calc(100% - 1.5rem);
  }

  .mandatory-field-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .mandatory-field-actions {
    width: 100%;
    justify-content: space-between;
  }

  .mandatory-fields-footer {
    flex-wrap: wrap;
  }

  .field-requirements-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .field-requirements-controls {
    justify-content: flex-start;
    width: 100%;
  }

  .field-requirements-controls .form-control {
    flex: 1 1 12rem;
    min-width: 0;
  }

  .custom-ref-control .form-control {
    flex: 1 1 12rem;
    min-width: 0;
  }

  .custom-field-row {
    grid-template-columns: 1fr auto;
  }

  .custom-field-row .form-group {
    grid-column: 1 / -1;
  }

  .custom-field-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .upload-buttons,
  .camera-controls,
  .form-actions {
    display: flex;
    gap: 0.75rem;
  }

  .upload-buttons .btn-upload {
    flex: 1 1 0;
    justify-content: center;
  }

  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table {
    min-width: max(42rem, 100%);
  }

  .table th,
  .table td {
    white-space: nowrap;
  }

  .modal-overlay {
    padding: 1rem !important;
    align-items: flex-end !important;
  }

  .modal,
  .modal-content,
  .upload-modal,
  .camera-modal {
    width: min(100%, 38rem) !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .modal,
  .modal-content,
  .camera-modal {
    max-height: min(90dvh, 42rem);
  }

  .mobile-bottom-nav {
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding: 0 0.35rem env(safe-area-inset-bottom, 0px);
  }

  .mbn-item {
    min-height: 56px;
    padding: 0.45rem 0.4rem;
  }

  .app-footer {
    padding-bottom: calc(0.75rem + 60px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 480px) {
  .sidebar {
    width: min(88vw, 19rem) !important;
  }

  .content {
    padding: 0.75rem;
    padding-bottom: calc(4.9rem + env(safe-area-inset-bottom, 0px));
  }

  .card {
    padding: 0.9rem;
  }

  .page-header .btn,
  .page-header .header-actions .btn,
  .header-actions .btn,
  .selection-toolbar .btn,
  .catalog-actions .btn,
  .catalog-share-actions .btn,
  .form-actions .btn,
  .upload-modal-footer .btn,
  .camera-controls .btn,
  .upload-buttons .btn-upload {
    flex: 1 1 100%;
  }

  .search-bar {
    gap: 0.65rem;
  }

  .btn,
  .btn-upload,
  .btn-pill {
    min-height: 42px;
  }

  .upload-preview {
    flex-direction: column;
    align-items: flex-start;
  }

  .upload-preview img {
    width: 100%;
    height: auto;
    max-width: 220px;
  }
}

/* ============================================
   MOBILE DENSITY REFINEMENT
   ============================================ */

@media (max-width: 768px) {
  .btn,
  .btn-upload,
  .btn-pill {
    min-height: 2.45rem;
    padding: 0.5rem 0.78rem;
    font-size: 0.8rem;
    gap: 0.35rem;
    border-radius: 0.7rem;
  }

  .form-control,
  .catalog-search-input,
  .code-input,
  .enq-control,
  .ci-select,
  .ci-control,
  input[type="date"],
  input[type="datetime-local"],
  input[type="time"] {
    min-height: 2.65rem;
    font-size: 16px !important;
  }

  textarea.form-control,
  textarea.enq-control,
  textarea.ci-control {
    min-height: 6rem;
  }

  .page-header {
    align-items: flex-start;
    align-content: flex-start;
    gap: 0.55rem;
    margin-bottom: 0.55rem;
  }

  .page-header > .btn {
    flex: 0 1 auto;
    width: auto;
    min-width: clamp(8.5rem, 38vw, 10.5rem);
  }

  .page-header > div.header-actions:first-child {
    flex: 0 1 auto;
    width: 100%;
    min-width: 0;
    align-content: flex-start;
    justify-content: flex-start;
  }

  .page-header .header-actions,
  .catalog-actions,
  .catalog-share-actions,
  .selection-toolbar,
  .form-actions,
  .upload-modal-footer,
  .camera-controls,
  .upload-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    align-content: flex-start;
    justify-content: flex-start;
    gap: 0.65rem;
    width: 100%;
  }

  .page-header .btn,
  .page-header .header-actions .btn,
  .header-actions .btn,
  .selection-toolbar .btn,
  .catalog-actions .btn,
  .catalog-share-actions .btn,
  .form-actions .btn,
  .upload-modal-footer .btn,
  .camera-controls .btn {
    flex: 0 1 auto;
    width: auto;
    min-width: clamp(8.25rem, 37vw, 10rem);
  }

  .selection-toolbar > span:first-child {
    flex: 1 1 100%;
  }

  .catalog-actions .catalog-visibility-toggle {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .search-bar:not(.multi-code-bar) {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.65rem;
  }

  .search-bar:not(.multi-code-bar) > :first-child {
    flex: 1 1 100%;
    min-width: 0;
  }

  .search-bar:not(.multi-code-bar) select,
  .search-bar:not(.multi-code-bar) .form-control:not(:first-child) {
    flex: 1 1 11rem;
    min-width: 0;
  }

  .search-bar:not(.multi-code-bar) > .btn {
    flex: 0 1 auto;
    min-width: 7.25rem;
  }

  .multi-code-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: stretch;
  }

  .multi-code-bar .code-chips-wrap {
    flex: 1 1 100%;
    min-width: 0;
  }

  .multi-code-bar > .btn {
    flex: 1 1 calc(33.333% - 0.45rem);
    min-width: 0;
  }

  .catalog-search-bar {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    align-content: flex-start;
    gap: 0.75rem;
  }

  .catalog-toolbar-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-toolbar-meta {
    width: 100%;
  }

  .catalog-filter-info {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
  }

  .catalog-actions {
    order: 3;
    flex: 0 1 auto;
    width: 100%;
  }

  .modal-footer .btn,
  .upload-modal-footer .btn,
  .camera-controls .btn,
  .form-actions .btn,
  .upload-buttons .btn-upload {
    justify-content: center;
  }

  .import-modal-footer .btn {
    min-width: clamp(8.5rem, 38vw, 10rem);
  }

  .barcode-printer-page .page-header .btn {
    width: auto !important;
  }
}

@media (max-width: 480px) {
  .btn,
  .btn-upload,
  .btn-pill {
    min-height: 2.35rem;
    padding: 0.48rem 0.72rem;
    font-size: 0.76rem;
  }

  .page-header .btn,
  .page-header .header-actions .btn,
  .header-actions .btn,
  .selection-toolbar .btn,
  .catalog-actions .btn,
  .catalog-share-actions .btn,
  .form-actions .btn,
  .upload-modal-footer .btn,
  .camera-controls .btn {
    min-width: calc(50% - 0.35rem);
  }

  .multi-code-bar > .btn {
    flex: 1 1 calc(33.333% - 0.45rem);
  }

  .search-bar:not(.multi-code-bar) > .btn {
    min-width: calc(50% - 0.35rem);
  }

  .barcode-printer-page .page-header .btn {
    width: auto !important;
  }
}

/* ============================================
   MOBILE INLINE TOOLBARS
   ============================================ */

@media (max-width: 768px) {
  .product-list-page .page-header,
  .catalog-page .catalog-search-bar {
    gap: 0.6rem;
  }

  .product-list-page .page-header .header-actions,
  .product-list-page .selection-toolbar,
  .catalog-page .catalog-actions,
  .catalog-page .catalog-share-actions {
    display: flex;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.15rem;
  }

  .product-list-page .page-header .header-actions::-webkit-scrollbar,
  .product-list-page .selection-toolbar::-webkit-scrollbar,
  .catalog-page .catalog-actions::-webkit-scrollbar,
  .catalog-page .catalog-share-actions::-webkit-scrollbar {
    display: none;
  }

  .product-list-page .page-header .header-actions .btn,
  .product-list-page .selection-toolbar .btn,
  .catalog-page .catalog-actions .btn,
  .catalog-page .catalog-share-actions .btn {
    flex: 0 0 auto !important;
    min-width: auto !important;
    width: auto !important;
    min-height: 2.15rem;
    padding: 0.42rem 0.72rem;
    font-size: 11px;
    line-height: 1.15;
    white-space: nowrap;
    border-radius: 0.6rem;
  }

  .product-list-page .page-header .header-actions .btn i,
  .product-list-page .selection-toolbar .btn i,
  .catalog-page .catalog-actions .btn i,
  .catalog-page .catalog-share-actions .btn i {
    font-size: 11px;
  }

  .product-list-page .page-header .header-actions .btn,
  .catalog-page .catalog-actions .btn {
    background-clip: padding-box;
  }

  .product-list-page .selection-toolbar > span:first-child {
    flex: 0 0 auto;
    white-space: nowrap;
    padding-right: 0.2rem;
  }

  .catalog-page .catalog-actions {
    order: 3;
  }

  .catalog-page .catalog-filter-info {
    order: 0;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .catalog-page .catalog-visibility-toggle {
    flex: 0 0 auto !important;
    width: auto !important;
    margin-left: 0 !important;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .product-list-page .page-header .header-actions .btn,
  .product-list-page .selection-toolbar .btn,
  .catalog-page .catalog-actions .btn,
  .catalog-page .catalog-share-actions .btn {
    min-height: 2.05rem;
    padding: 0.38rem 0.62rem;
    font-size: 10.5px;
  }
}

/* ============================================
   CATALOG STOREFRONT POLISH
   ============================================ */

body:has(.catalog-page) {
  background: #fff !important;
}

body:has(.catalog-page) .main-content,
body:has(.catalog-page) .content {
  background: #fff !important;
}

.catalog-page {
  background: #fff;
  color: #55514d;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.catalog-storefront-header {
  display: none;
}

.catalog-card {
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: default;
}

.catalog-card:hover {
  box-shadow: none;
  transform: none;
}

.catalog-card-image {
  aspect-ratio: 1 / 1;
  height: auto;
  background: #f8f7f4;
}

.catalog-card-image img {
  object-fit: contain;
}

.catalog-card:hover .catalog-card-image img {
  transform: none;
}

.catalog-card-content {
  align-items: center;
  padding: 0.85rem 0.25rem 0;
  text-align: center;
}

.catalog-item-name {
  display: block;
  width: 100%;
  margin: 0 0 0.25rem;
  color: #6b6761;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.14rem;
  font-weight: 600;
  line-height: 1.22;
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
}

.catalog-code-link,
.pl-product-code-link {
  color: #0a1f5c;
  text-decoration: none;
}

.catalog-code-row {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  margin-bottom: 0.45rem;
}

.catalog-code-link {
  display: inline-flex;
  max-width: 100%;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.catalog-code-link:hover,
.pl-product-code-link:hover {
  color: #102f8a;
  text-decoration: underline;
}

.catalog-card-weights {
  display: grid;
  width: min(100%, 12rem);
  gap: 0.18rem;
  margin: 0.15rem auto 0.7rem;
  color: #4f4942;
}

.catalog-card-weight-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.55rem;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  line-height: 1.35;
}

.catalog-card-weight-row span {
  color: #7a746c;
  font-weight: 600;
  white-space: nowrap;
}

.catalog-card-weight-row strong {
  color: #241f1a;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-align: right;
}

.catalog-details {
  width: 100%;
}

.catalog-card-footer {
  justify-content: center;
  width: 100%;
  margin-top: auto;
  border-top: 0;
}

.catalog-view-btn {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  justify-content: center;
  padding: 0;
  background: transparent;
  color: #0a1f5c;
  border: 0;
  border-radius: 999px;
}

.catalog-view-btn i {
  font-size: 0.72rem;
}

.catalog-view-btn:hover {
  background: #f5f1eb;
  color: #102f8a;
}

@media (max-width: 768px) {
  body:has(.catalog-page) .header,
  body:has(.catalog-page) .app-footer,
  body:has(.catalog-page) .mobile-bottom-nav {
    display: none !important;
  }

  body:has(.catalog-page) .main-content {
    margin-left: 0 !important;
  }

  body:has(.catalog-page) .content {
    padding: 0 1.4rem 2.5rem !important;
  }

  .catalog-page {
    padding: 0;
  }

  .catalog-storefront-header {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.75rem;
    padding: 1.1rem 0 1rem;
    border-bottom: 1px solid #e9e6df;
  }

  .catalog-storefront-icon {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #4f4f4f;
    font-size: 1.45rem;
    cursor: pointer;
  }

  .catalog-storefront-brand {
    min-width: 0;
    text-align: center;
  }

  .catalog-storefront-logo {
    color: #a9c9cb;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(2.1rem, 11vw, 3.15rem);
    font-weight: 500;
    line-height: 0.85;
    letter-spacing: 0.06em;
  }

  .catalog-storefront-tagline {
    margin-top: 0.42rem;
    color: #5c5752;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(0.76rem, 3.5vw, 1.05rem);
    font-weight: 600;
    line-height: 1;
  }

  .catalog-storefront-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #6d6964;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1rem;
    white-space: nowrap;
  }

  .catalog-search-bar {
    margin-top: 0.85rem;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 2rem 2rem;
    margin-top: 2rem;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .catalog-card-content {
    padding-top: 0.9rem;
  }

  .catalog-checkbox-wrapper {
    top: 0.45rem;
    left: 0.45rem;
  }

  .catalog-details {
    display: none;
  }

  .catalog-card-weights {
    width: 100%;
    margin-bottom: 0.45rem;
  }

  .catalog-card-weight-row {
    gap: 0.35rem;
    font-size: 0.62rem;
  }

  .catalog-card-footer {
    padding-top: 0;
  }

  .catalog-view-btn {
    color: #6b6761;
  }

  .catalog-view-btn:hover {
    background: #f5f1eb;
    color: #0a1f5c;
  }
}

@media (max-width: 768px) {
  body:has(.catalog-page) .header {
    display: block !important;
  }

  body:has(.catalog-page) .app-footer {
    display: block !important;
  }

  body:has(.catalog-page) .mobile-bottom-nav {
    display: flex !important;
  }

  body:has(.catalog-page) .content {
    padding: 0.9rem !important;
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  .catalog-storefront-header {
    display: none !important;
  }

  .catalog-search-bar {
    margin-top: 0;
  }
}

@media (max-width: 420px) {
  body:has(.catalog-page) .content {
    padding-left: 1.05rem !important;
    padding-right: 1.05rem !important;
  }

  .catalog-grid {
    gap: 1.7rem 1.45rem;
  }

  .catalog-item-name {
    font-size: 1rem;
  }

}

/* Keep simple management grids close to the top toolbar. */
body:has(.management-table-page) .content {
  padding-top: 0.45rem !important;
}

.management-table-page {
  margin-top: 0 !important;
}

.management-table-page .page-header {
  padding: 0 !important;
  margin-bottom: 0.35rem !important;
  min-height: 0 !important;
  justify-content: flex-end !important;
  align-items: flex-start !important;
}

.management-table-page .card {
  padding-top: 0.65rem !important;
}

/* ============================================
   DESKTOP DENSITY PATCH
   Make the 100% browser view match the previous 75% zoom working area.
   ============================================ */

@media (min-width: 769px) {
  html {
    font-size: 90%;
  }

  .sidebar {
    width: 150px;
  }

  .sidebar.minimized {
    width: 50px;
  }

  .sidebar-logo .logo-img {
    width: 150px;
    max-width: 150px;
    height: 45px;
  }

  .sidebar-nav {
    padding: 0.35rem 0;
  }

  .nav-item {
    gap: 0.58rem;
    padding: 0.56rem 0.82rem;
    font-size: 0.78rem;
  }

  .nav-icon {
    font-size: 0.96rem;
  }

  .main-content {
    margin-left: 150px;
    flex: 0 0 calc(100% - 150px);
    width: calc(100% - 150px);
    max-width: calc(100% - 150px);
    min-width: 0;
  }

  .main-content.expanded {
    margin-left: 50px;
    flex-basis: calc(100% - 50px);
    width: calc(100% - 50px);
    max-width: calc(100% - 50px);
  }

  .header-content {
    padding: 0.48rem 1rem;
  }

  .header h1 {
    font-size: 0.98rem;
  }

  .sidebar-toggle {
    font-size: 0.95rem;
    padding: 0.22rem;
  }

  .user-info {
    gap: 0.55rem;
    font-size: 0.78rem;
  }

  .user-menu-btn {
    padding: 0.36rem 0.58rem;
  }

  .content {
    padding: 4px 6px 0;
  }

  .card,
  .form-card,
  .detail-card,
  .management-table-card {
    border-radius: 7px;
    padding: 0.68rem 0.82rem;
  }

  .page-header {
    gap: 0.45rem;
    margin-bottom: 0.45rem;
  }

  .page-header h1 {
    font-size: 1.08rem;
    margin-bottom: 0.2rem;
  }

  .page-header p {
    font-size: 0.75rem;
  }

  .btn {
    gap: 0.32rem;
    padding: 0.32rem 0.62rem;
    font-size: 0.72rem;
    line-height: 1.18;
  }

  .btn-sm {
    padding: 0.24rem 0.46rem;
    font-size: 0.7rem;
  }

  .btn-lg {
    padding: 0.42rem 0.82rem;
    font-size: 0.82rem;
  }

  .btn-pill {
    padding: 0.26rem 0.58rem;
    border-radius: 14px;
    font-size: 0.68rem;
  }

  .btn-upload {
    padding: 0.32rem 0.62rem;
    font-size: 0.7rem;
  }

  .btn-upload i {
    font-size: 0.78rem;
  }

  .page-header .header-actions {
    gap: 0.35rem;
  }

  .form-group {
    margin-bottom: 0.5rem;
  }

  .form-group label {
    margin-bottom: 0.22rem;
    font-size: 0.72rem;
  }

  .form-control,
  #userForm .form-control,
  #categoryForm .form-control,
  .catalog-search-input,
  .enq-control,
  .ci-control,
  .ci-select,
  input[type="date"],
  input[type="datetime-local"],
  input[type="time"] {
    min-height: 30px;
    padding: 0.32rem 0.52rem;
    border-radius: 4px;
    font-size: 0.74rem;
    line-height: 1.2;
  }

  select.form-control {
    padding-right: 1.7rem;
    background-position: right 0.5rem center;
  }

  textarea.form-control,
  textarea.enq-control,
  textarea.ci-control {
    min-height: 4.5rem;
  }

  .form-row {
    gap: 0.52rem;
  }

  .product-code-page .form-card {
    max-width: none;
    padding: 0.68rem 0.82rem;
  }

  .product-code-page #productForm {
    gap: 0.5rem 0.68rem;
  }

  .button-group,
  .button-group-container,
  .product-code-page .button-group,
  .product-code-page .button-group-container {
    gap: 0.32rem;
  }

  .custom-fields-section {
    margin: 0.1rem 0 0.3rem;
    padding: 0.58rem;
    border-radius: 5px;
  }

  .custom-fields-header {
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .custom-fields-header label {
    font-size: 0.74rem;
  }

  .custom-fields-tools,
  .custom-ref-control {
    gap: 0.35rem;
  }

  .custom-ref-control .form-control {
    min-width: 10rem;
  }

  .custom-fields-container {
    gap: 0.5rem;
  }

  .custom-field-row {
    grid-template-columns: minmax(10rem, 1.15fr) minmax(8rem, 0.85fr) 9rem;
    gap: 0.5rem;
  }

  .custom-field-actions {
    min-height: 1.85rem;
    justify-content: flex-end;
  }

  .custom-field-remove {
    width: 1.85rem;
    height: 1.85rem;
  }

  .table th,
  .table td,
  table thead th,
  table tbody td {
    padding: 0.42rem 0.55rem;
    font-size: 0.75rem;
    line-height: 1.2;
  }

  .table th,
  table thead th {
    font-size: 0.66rem;
  }

  .softpal-kendo-grid .k-grid .k-table-th,
  .softpal-kendo-grid .k-table-th {
    padding: 0.4rem 0.48rem;
    font-size: 0.68rem;
    line-height: 1.15;
  }

  .softpal-kendo-grid .k-grid td,
  .softpal-kendo-grid td,
  .softpal-kendo-grid .k-table-td {
    padding: 0.34rem 0.48rem;
    font-size: 0.76rem;
    line-height: 1.2;
  }

  .softpal-kendo-grid .k-grid-pager,
  .softpal-kendo-grid .k-pager {
    min-height: 34px;
    padding-block: 0.18rem;
    font-size: 0.72rem;
  }

  .badge {
    padding: 0.18rem 0.55rem;
    font-size: 0.66rem;
  }

  .action-buttons,
  .actions {
    gap: 0.32rem;
  }

  .modal {
    max-width: 440px;
    padding: 1.25rem;
    border-radius: 10px;
  }

  .modal-header {
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
  }

  .modal-header h2,
  .modal-header h3 {
    font-size: 1.05rem;
  }

  .modal-footer {
    gap: 0.65rem;
    margin-top: 1.2rem;
    padding-top: 0.9rem;
  }

  .modal-footer .btn {
    min-width: 82px;
    padding: 0.46rem 1rem;
    font-size: 0.76rem;
  }

  .upload-modal {
    max-width: 470px;
    border-radius: 10px;
  }

  .upload-modal-header {
    padding: 0.78rem 1.15rem;
  }

  .upload-modal-header h3 {
    font-size: 0.98rem;
  }

  .btn-close-modal {
    font-size: 1.1rem;
  }

  .upload-modal-body {
    padding: 1.1rem;
  }

  .drop-zone {
    padding: 2.15rem 1.5rem;
  }

  .drop-zone .drop-icon {
    margin-bottom: 0.7rem;
    font-size: 2.35rem;
  }

  .drop-zone p,
  .drop-zone-text {
    font-size: 0.86rem;
  }

  .upload-preview {
    padding: 0.8rem;
  }

  .upload-preview img {
    width: 86px;
    height: 86px;
  }

  .upload-modal-footer {
    gap: 0.6rem;
    padding: 0.75rem 1.1rem;
  }

  .camera-modal {
    max-width: 620px;
  }

  .camera-modal .modal-header {
    padding: 0.78rem 1rem;
  }

  .camera-container {
    min-height: 300px;
  }

  .camera-controls {
    gap: 0.65rem;
    padding: 0.85rem 1rem;
  }

  .detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
  }

  .detail-item,
  .detail-image {
    padding: 0.7rem;
  }

  .detail-item label,
  .detail-image label {
    margin-bottom: 0.35rem;
    font-size: 0.66rem;
  }

  .detail-item .value {
    font-size: 0.84rem;
  }

  .detail-image img {
    max-width: 380px;
  }

  .catalog-search-bar,
  .catalog-toolbar-controls,
  .catalog-actions,
  .catalog-share-actions {
    gap: 0.5rem;
  }

  .catalog-grid {
    gap: 0.9rem;
  }

  .catalog-card-content {
    padding: 0.55rem 0.2rem 0;
  }

  .catalog-item-name {
    font-size: 0.98rem;
  }

  .catalog-code-link {
    font-size: 0.64rem;
  }

  .catalog-details,
  .detail-label,
  .detail-value {
    font-size: 0.68rem;
  }

  .card-header {
    padding: 0.75rem 0.9rem;
  }

  .card-header h3 {
    font-size: 0.92rem;
  }

  .card-header p {
    font-size: 0.72rem;
  }

  .empty-state,
  .loading {
    padding: 1.35rem;
    font-size: 0.78rem;
  }

  .product-list-page {
    margin-top: -0.18rem;
  }

  .product-list-page .page-header {
    padding: 5px 8px;
  }

  .product-list-page .card {
    padding: 0.48rem 0.55rem;
  }

  .product-list-page .table-container {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .product-list-page #productsKendoGrid,
  .product-list-page #productsKendoGrid.k-grid {
    min-width: 1120px;
  }

  .product-list-page .search-bar {
    margin-bottom: 0.58rem;
  }

  .product-list-page .multi-code-bar {
    gap: 0.45rem !important;
    padding: 6px 8px !important;
  }

  .product-list-page .code-chips-wrap {
    min-height: 34px;
    padding: 0.22rem 0.5rem;
  }

  .product-list-page .chip {
    padding: 0.16rem 0.5rem 0.16rem 0.58rem;
    font-size: 0.68rem;
  }

  .product-list-page .code-input {
    font-size: 0.76rem;
  }

  .product-list-page .btn-scanner {
    padding: 0.31rem 0.6rem;
    font-size: 0.72rem;
  }

  .product-list-page .k-grid .k-table-th,
  .product-list-page .k-table-th {
    padding: 0.4rem 0.42rem;
    font-size: 0.68rem;
    line-height: 1.15;
  }

  .product-list-page .k-grid td,
  .product-list-page td.k-table-td,
  .product-list-page .k-table-td {
    padding: 0.34rem 0.42rem;
    font-size: 0.76rem;
    line-height: 1.2;
  }

  .product-list-page .k-grid-content {
    max-height: calc(100vh - 232px);
  }

  .product-list-page .k-pager,
  .product-list-page .k-grid-pager {
    min-height: 34px;
    padding-block: 0.18rem;
    font-size: 0.72rem;
  }

  .product-list-page .action-buttons {
    gap: 0.28rem;
    flex-wrap: nowrap;
  }

  .product-list-page .action-buttons .btn,
  .product-list-page .btn-sm {
    min-width: 0;
    padding: 0.24rem 0.46rem;
    font-size: 0.72rem;
  }

  .product-list-page .action-buttons .btn i,
  .product-list-page .btn-sm i {
    font-size: 0.72rem;
  }

  .product-list-page .pl-img-cell {
    width: 46px;
    padding: 4px 6px !important;
  }

  .product-list-page .pl-thumb,
  .product-list-page .pl-no-img {
    width: 38px;
    height: 38px;
  }

  .app-footer {
    padding: 0.25rem 1rem;
  }

  .footer-content {
    gap: 0.35rem;
  }

  .footer-copyright {
    font-size: 0.64rem;
  }

  .footer-social {
    gap: 0.35rem;
  }

  .footer-social a {
    width: 19px;
    height: 19px;
    font-size: 0.58rem;
  }
}
