/**
 * Next.js Editor WordPress Admin Styles
 */
:root {
  --nje-primary: #191B1E;
  --nje-primary-hover: #0F1012;
  --nje-accent: #E23A1E;
  --nje-bg: #FBFBFA;
  --nje-card: #FFFFFF;
  --nje-border: #E4E6E9;
  --nje-text: #191B1E;
  --nje-muted: #6C727A;
  --nje-success: #10B981;
}

.nje-wrap {
  max-width: 1100px;
  margin: 20px 20px 40px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color: var(--nje-text);
}

.nje-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #191B1E;
  border: 1px solid #2A2D32;
  color: #FFFFFF;
  padding: 22px 28px;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.nje-header-bar h1 {
  color: #FFFFFF;
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.02em;
}

.nje-header-bar p {
  margin: 0;
  color: #A0A5AD;
  font-size: 13px;
}

.nje-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nje-btn-save {
  background: #FFFFFF !important;
  color: #191B1E !important;
  font-weight: 700 !important;
  border: none !important;
  padding: 10px 22px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
  transition: all 0.2s ease !important;
}

.nje-btn-save:hover {
  background: #F4F5F7 !important;
  transform: translateY(-1px);
}

.nje-btn-purge {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  padding: 10px 18px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  font-weight: 600 !important;
}

.nje-btn-purge:hover {
  background: rgba(255, 255, 255, 0.25) !important;
}

/* Tabs Navigation */
.nje-tabs-nav {
  display: flex;
  gap: 10px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 28px;
  padding-bottom: 0;
  flex-wrap: wrap;
}

.nje-tab-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-bottom: 2px solid #e2e8f0;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  margin-bottom: -2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.nje-tab-btn svg {
  color: #6C727A;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.nje-tab-btn:hover:not(.active) {
  color: #191B1E;
  background: #F8FAFC;
  border-color: #CBD5E1;
}

.nje-tab-btn:hover:not(.active) svg {
  color: #191B1E;
  transform: translateY(-1px);
}

.nje-tab-btn.active {
  color: #191B1E;
  border: 1.5px solid #CBD5E1;
  border-bottom: 3px solid #E23A1E !important;
  background: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.nje-tab-btn.active svg {
  color: #E23A1E;
}

/* Tab Panels */
.nje-tab-panel {
  display: none;
}

.nje-tab-panel.active {
  display: block;
}

/* Move & Reorder Controls */
.nje-move-btn-group {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  height: 34px;
}

.nje-card-drag-handle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 100%;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  cursor: grab;
  user-select: none;
  background: #f8fafc;
  border-left: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  transition: all 0.15s ease;
}

.nje-card-drag-handle svg {
  color: #64748b;
  flex-shrink: 0;
}

.nje-card-drag-handle:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.nje-card-drag-handle:active {
  cursor: grabbing;
  background: #cbd5e1;
}

.nje-btn-move-up,
.nje-btn-move-down {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 100%;
  border: none;
  background: #ffffff;
  color: #64748b;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.nje-btn-move-up:hover,
.nje-btn-move-down:hover {
  background: #F1F3F5;
  color: var(--nje-primary);
}

.nje-btn-move-up:active,
.nje-btn-move-down:active {
  background: #E4E6E9;
}

.nje-card-sort-placeholder {
  border: 2px dashed #191B1E !important;
  background: #F8FAFC !important;
  border-radius: 12px !important;
  margin-bottom: 24px !important;
  visibility: visible !important;
}

/* Cards & Sections */
.nje-card {
  background: #ffffff;
  border: 1px solid var(--nje-border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nje-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--nje-border);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.nje-card-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  color: var(--nje-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nje-card-desc {
  font-size: 13.5px;
  color: var(--nje-muted);
  margin: 4px 0 0 0;
}

/* Grid & Fields */
.nje-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.nje-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.nje-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.nje-form-group {
  margin-bottom: 18px;
}

.nje-form-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.nje-input,
.nje-select,
.nje-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  color: #1e293b;
  background: #ffffff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.nje-input:focus,
.nje-select:focus,
.nje-textarea:focus {
  border-color: var(--nje-primary);
  box-shadow: 0 0 0 3px rgba(133, 37, 85, 0.15);
  outline: none;
}

/* Image Upload Picker Box */
.nje-image-picker {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nje-img-preview {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  object-fit: contain;
  padding: 4px;
}

.nje-img-inputs {
  flex: 1;
}

.nje-btn-upload {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 6px;
}

.nje-btn-upload:hover {
  background: #e2e8f0;
}

/* Section Toggle Pill with SVG Eye */
.nje-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  user-select: none;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.nje-toggle-pill input[type="checkbox"] {
  display: none;
}

.nje-toggle-pill.active {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.nje-toggle-pill.inactive {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.nje-toggle-icon {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
}

/* Section Order Sequence Badge */
.nje-order-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--nje-muted);
}

.nje-order-input {
  width: 55px !important;
  text-align: center;
  padding: 4px 6px !important;
  font-weight: 700;
  border-radius: 6px !important;
}

/* Dynamic Product Section Box */
.nje-product-section-card {
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--nje-primary);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 18px;
  background: #fdfcfd;
}

.nje-btn-add-section {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border: 2px dashed #cbd5e1;
  color: #475569;
  font-weight: 700;
  font-size: 14px;
  padding: 14px 24px;
  width: 100%;
  justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nje-btn-add-section:hover {
  background: #f8fafc;
  border-color: var(--nje-primary);
  color: var(--nje-primary);
}

.nje-btn-remove-section {
  background: #fee2e2;
  color: #dc2626;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.nje-btn-remove-section:hover {
  background: #fca5a5;
}

/* Notice Bar */
.nje-notice {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 12px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

/* Drag & Drop Reordering for Homepage Section Cards */
#nje-homepage-sections-container {
  min-height: 100px;
}

.nje-card-sort-placeholder {
  background: #eff6ff !important;
  border: 2px dashed #3b82f6 !important;
  border-radius: 12px !important;
  margin-bottom: 24px !important;
  visibility: visible !important;
  min-height: 80px;
}

.nje-card.ui-sortable-helper {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.1) !important;
  background: #ffffff !important;
  border: 2px solid #3b82f6 !important;
  cursor: grabbing !important;
}

.nje-card-drag-handle {
  cursor: grab;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  user-select: none;
  transition: all 0.2s ease;
}

.nje-card-drag-handle:hover {
  background: #e2e8f0;
  color: #1e293b;
  border-color: #94a3b8;
}

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

/* Hide 1,2,3 order input badges while preserving input logic */
.nje-order-badge {
  display: none !important;
}

/* Routine Step styling */
.nje-step-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--nje-primary);
  color: #ffffff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.nje-routine-item-row {
  transition: all 0.2s ease;
}

.nje-routine-item-row:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   NEXT.JS PRODUCTS EDITOR STYLES (v7.0.0)
   ========================================================================== */

/* Sample files download bar */
.nje-sample-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  flex-wrap: wrap;
}

.nje-sample-label {
  color: var(--nje-muted);
  font-weight: 600;
}

.nje-sample-chip {
  background: #ffffff;
  border: 1px solid var(--nje-border);
  padding: 4px 12px;
  border-radius: 6px;
  color: var(--nje-primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 12px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nje-sample-chip:hover {
  background: #fdf2f8;
  border-color: var(--nje-primary);
  color: var(--nje-primary-hover);
}

/* Toolbar: Search and Filter Chips */
.nje-products-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.nje-search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 440px;
  display: flex;
  align-items: center;
}

.nje-search-box input {
  padding-left: 36px;
  padding-right: 32px;
  width: 100%;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  height: 40px;
  font-size: 13.5px;
  background: #ffffff;
  transition: border-color 0.15s;
}

.nje-search-box input:focus {
  border-color: var(--nje-primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(133, 37, 85, 0.15);
}

.nje-search-box svg {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  pointer-events: none;
}

#nje-products-search-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 13px;
  padding: 4px 6px;
}

.nje-filter-chips {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.nje-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.nje-chip:hover {
  border-color: var(--nje-primary);
  color: var(--nje-primary);
}

.nje-chip.active {
  background: var(--nje-primary);
  border-color: var(--nje-primary);
  color: #ffffff;
}

/* Products Table */
.nje-table-container {
  background: #ffffff;
  border: 1px solid var(--nje-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.nje-products-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.nje-products-table th {
  background: #f8fafc;
  color: #64748b;
  font-size: 11.5px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.nje-products-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  font-size: 13.5px;
  color: #1e293b;
}

.nje-products-table tr:hover td {
  background: #fdf2f8;
}

.nje-prod-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  display: block;
}

.nje-prod-title-link {
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s;
}

.nje-prod-title-link:hover {
  color: var(--nje-primary);
}

.nje-price-reg {
  font-weight: 600;
  color: #0f172a;
}

.nje-price-del {
  text-decoration: line-through;
  color: #94a3b8;
  font-size: 12px;
  margin-left: 5px;
}

.nje-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  line-height: 1.4;
}

.nje-status-pill.template {
  background: #fdf2f8;
  color: var(--nje-primary);
  border: 1px solid #fbcfe8;
}

.nje-status-pill.default {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.nje-btn-edit-row {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--nje-primary);
  cursor: pointer;
  transition: all 0.15s;
}

.nje-btn-edit-row:hover {
  background: var(--nje-primary);
  color: #ffffff;
  border-color: var(--nje-primary);
}

.nje-btn-trash-row {
  background: #ffffff;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #ef4444;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.15s;
}

.nje-btn-trash-row:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #f87171;
}

/* Pagination */
.nje-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px 0;
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.nje-page-info {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.nje-page-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nje-pg-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.nje-pg-btn:hover:not(:disabled) {
  border-color: var(--nje-primary);
  color: var(--nje-primary);
  background: #fdf2f8;
}

.nje-pg-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #94a3b8;
}

.nje-pg-indicator {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  padding: 0 8px;
}

/* State Boxes (Loading & Empty) */
.nje-state-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 12px;
  color: #64748b;
  font-size: 14px;
}

.nje-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--nje-primary);
  border-radius: 50%;
  animation: nje-spin 0.8s linear infinite;
}

@keyframes nje-spin {
  to { transform: rotate(360deg); }
}

/* Modals Scrim & Card */
.nje-modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(3px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.nje-modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.nje-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.nje-modal-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nje-modal-head-left h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

.nje-modal-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
}

.nje-modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}

.nje-modal-close:hover {
  background: #fee2e2;
  color: #ef4444;
}

.nje-modal-tabs {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 0 24px;
  gap: 6px;
}

.nje-modal-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
}

.nje-modal-tab-btn:hover {
  color: var(--nje-primary);
}

.nje-modal-tab-btn.active {
  border-bottom-color: var(--nje-primary);
  color: var(--nje-primary);
}

.nje-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  background: #ffffff;
}

.nje-modal-panel {
  display: none;
}

.nje-modal-panel.active {
  display: block;
}

.nje-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.nje-modal-foot-left,
.nje-modal-foot-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Modal Form Controls */
.nje-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.nje-fgroup {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.nje-fgroup label {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.nje-textarea {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  background: #ffffff;
}

.nje-textarea:focus {
  border-color: var(--nje-primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(133, 37, 85, 0.15);
}

.nje-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  max-height: 140px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.nje-checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #334155;
}

/* Drag & Drop File Zone */
.nje-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nje-dropzone.dragover {
  border-color: var(--nje-primary);
  background: #fdf2f8;
}

.nje-btn-upload-file {
  display: inline-block;
  background: var(--nje-primary);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s;
}

.nje-btn-upload-file:hover {
  background: var(--nje-primary-hover);
}

/* Repeater Lists */
.nje-section-card {
  border: 1px solid var(--nje-border);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 18px;
  background: #ffffff;
}

.nje-section-head {
  margin: 0 0 14px 0;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 8px;
}

.nje-repeater-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.nje-repeater-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nje-btn-del-row {
  background: #fee2e2;
  color: #ef4444;
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  flex-shrink: 0;
  transition: background 0.15s;
}

.nje-btn-del-row:hover {
  background: #fecaca;
}

.nje-btn-add-row {
  background: #f1f5f9;
  border: 1px dashed #94a3b8;
  color: #475569;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  transition: all 0.15s;
}

.nje-btn-add-row:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* Buttons */
.nje-btn-primary {
  background: var(--nje-primary);
  color: #ffffff;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}

.nje-btn-primary:hover {
  background: var(--nje-primary-hover);
}

.nje-btn-secondary {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.nje-btn-secondary:hover {
  background: #f1f5f9;
}

.nje-btn-danger {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.nje-btn-danger:hover {
  background: #fecaca;
}

/* Helper Banner */
.nje-helper-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: #1e40af;
}

.nje-btn-chip-action {
  background: #1d4ed8;
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 11.5px;
  cursor: pointer;
}

/* Alert Boxes in Modal */
.nje-alert-box {
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12.5px;
  margin-bottom: 10px;
}

.nje-alert-box.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.nje-alert-box.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
}

.nje-alert-box.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

/* Live Preview Frame */
.nje-preview-frame {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  background: #ffffff;
}

.nje-preview-lead {
  font-size: 14.5px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 14px;
}

.nje-preview-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nje-preview-benefit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #1e293b;
}

.nje-preview-acc-item {
  border-bottom: 1px solid #e2e8f0;
}

.nje-preview-summary {
  padding: 13px 0;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  color: #0f172a;
}

.nje-preview-body {
  padding-bottom: 14px;
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
}

/* Responsive Table for Mobile (<= 782px) - Clean Horizontal Scroll */
@media (max-width: 782px) {
  .nje-table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    position: relative !important;
    max-width: 100% !important;
    width: 100% !important;
    margin-bottom: 16px !important;
    border-radius: 10px !important;
    background: #ffffff !important;
  }
  .nje-products-table {
    display: table !important;
    width: 100% !important;
    min-width: 820px !important;
    border-collapse: collapse !important;
    table-layout: auto !important;
  }
  .nje-products-table thead {
    display: table-header-group !important;
  }
  .nje-products-table tbody {
    display: table-row-group !important;
  }
  .nje-products-table tr {
    display: table-row !important;
    padding: 0 !important;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    background: transparent !important;
  }
  .nje-products-table th,
  .nje-products-table td {
    display: table-cell !important;
    padding: 10px 14px !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    box-sizing: border-box !important;
  }
  .nje-form-grid-2 {
    grid-template-columns: 1fr;
  }
  .nje-modal-card {
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }
  .nje-modal-scrim {
    padding: 0;
  }
}

/* ==========================================================================
   Quiz Editor Module
   ========================================================================== */
.nqz-wrap {
  max-width: 1100px;
  margin: 20px 20px 40px 0;
  color: #191B1E;
}

.nqz-header-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.nqz-header-status.on {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.nqz-header-status.off {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.nqz-tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #E2E8F0;
  margin-bottom: 24px;
  padding-bottom: 0;
  flex-wrap: wrap;
}

.nqz-tabs-nav .nje-tab-btn {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-bottom: 2px solid #E2E8F0;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #64748B;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  margin-bottom: -2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.nqz-tabs-nav .nje-tab-btn:hover:not(.active) {
  color: #191B1E;
  background: #F8FAFC;
  border-color: #CBD5E1;
}

.nqz-tabs-nav .nje-tab-btn.active {
  color: #191B1E;
  border: 1.5px solid #CBD5E1;
  border-bottom: 3px solid #E23A1E !important;
  background: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.nqz-tabs-nav .nje-tab-btn.active svg {
  color: #E23A1E;
}

.nqz-panel {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 24px;
}

.nqz-panel[hidden] {
  display: none !important;
}

.nqz-note {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-left: 4px solid #E23A1E;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  color: #334155;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.nqz-note svg {
  flex-shrink: 0;
  color: #E23A1E;
}

.nqz-note a {
  color: #191B1E;
  font-weight: 700;
  text-decoration: underline;
}

.nqz-note.warn {
  background: #FFFBEB;
  border-color: #FDE68A;
  border-left-color: #D97706;
  color: #92400E;
}

.nqz-note.warn svg {
  color: #D97706;
}

.nqz-note.ok {
  background: #ECFDF5;
  border-color: #A7F3D0;
  border-left-color: #059669;
  color: #065F46;
}

.nqz-note.ok svg {
  color: #059669;
}

.nqz-note.err {
  background: #FEF2F2;
  border-color: #FECACA;
  border-left-color: #DC2626;
  color: #991B1B;
}

.nqz-note.err svg {
  color: #DC2626;
}

.nqz-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid #F1F5F9;
  align-items: start;
}

.nqz-row:last-child {
  border-bottom: none;
}

.nqz-row > label {
  font-size: 14px;
  font-weight: 700;
  color: #191B1E;
  line-height: 1.4;
}

.nqz-row small {
  display: block;
  color: #64748B;
  font-weight: 400;
  font-size: 12.5px;
  margin-top: 4px;
  line-height: 1.4;
}

.nqz input[type="text"],
.nqz input[type="number"],
.nqz input[type="search"],
.nqz select,
.nqz textarea {
  width: 100%;
  max-width: 540px;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13.5px;
  background: #FFFFFF;
  color: #191B1E;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
  font-family: inherit;
}

.nqz input:focus,
.nqz select:focus,
.nqz textarea:focus {
  border-color: #191B1E;
  outline: none;
  box-shadow: 0 0 0 3px rgba(25, 27, 30, 0.08);
}

/* Category & Quiz Tags Chips */
.nqz-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.nqz-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1.5px solid #E2E8F0;
  background: #FFFFFF;
  color: #475569;
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  line-height: 1.2;
}

.nqz-chip:hover {
  border-color: #191B1E;
  color: #191B1E;
  background: #F8FAFC;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.nqz-chip.on {
  background: #191B1E !important;
  border-color: #191B1E !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(25, 27, 30, 0.18);
}

.nqz-chip.cat.on {
  background: #191B1E !important;
  border-color: #191B1E !important;
  color: #FFFFFF !important;
}

.nqz-chip .nqz-cnt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #F1F5F9;
  color: #64748B;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nqz-chip:hover .nqz-cnt {
  background: #E2E8F0;
  color: #191B1E;
}

.nqz-chip.on .nqz-cnt {
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
}

/* Axis Groups */
.nqz-axis {
  margin-bottom: 14px;
}

.nqz-axis-lbl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: #475569;
  margin: 4px 0 8px;
  background: #F8FAFC;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
}

.nqz-axis-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: #94A3B8;
}

.nqz-axis-occasion .nqz-axis-dot {
  background: #E23A1E;
}

.nqz-axis-season .nqz-axis-dot {
  background: #2563EB;
}

.nqz-axis-look .nqz-axis-dot {
  background: #D97706;
}

.nqz-axis-use .nqz-axis-dot {
  background: #059669;
}

.nqz-chip-mini {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: #191B1E;
  color: #FFFFFF;
  margin: 2px 3px 2px 0;
}

/* Questions UI */
.nqz-q {
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  margin-bottom: 18px;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s;
  overflow: hidden;
}

.nqz-q:hover {
  border-color: #CBD5E1;
}

.nqz-qh {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  border-radius: 10px 10px 0 0;
  flex-wrap: wrap;
}

.nqz-qh .drag {
  cursor: grab;
  color: #94A3B8;
  font-size: 20px;
  font-weight: bold;
  line-height: 1;
  padding: 0 4px;
}

.nqz-qh .drag:hover {
  color: #191B1E;
}

.nqz-qh .num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #191B1E;
  color: #FFFFFF;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12.5px;
}

.nqz-qh input {
  flex: 1;
  min-width: 220px;
  max-width: none !important;
  font-weight: 600;
}

.nqz-type {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #E2E8F0;
}

.nqz-qsub {
  padding: 12px 18px 0;
}

.nqz-qsub input {
  max-width: none !important;
  font-size: 13px;
  color: #64748B;
}

.nqz-opts {
  padding: 14px 18px 18px;
  display: grid;
  gap: 12px;
}

.nqz-opt {
  display: grid;
  grid-template-columns: 80px 1fr 1.8fr 34px;
  gap: 16px;
  border: 1.5px dashed #E2E8F0;
  border-radius: 10px;
  padding: 14px;
  align-items: start;
  background: #FAFBFD;
  transition: background 0.15s;
}

.nqz-opt:hover {
  background: #FFFFFF;
  border-color: #CBD5E1;
}

.nqz-img {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  background: #F1F5F9 center/cover no-repeat;
  border: 1.5px solid #E2E8F0;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  text-align: center;
  transition: border-color 0.2s;
}

.nqz-img:hover {
  border-color: #191B1E;
  color: #191B1E;
}

.nqz-imgx {
  display: inline-block;
  font-size: 11.5px;
  color: #DC2626;
  margin-top: 6px;
  text-decoration: none;
  font-weight: 600;
}

.nqz-imgx:hover {
  text-decoration: underline;
}

.nqz-opt input {
  margin-bottom: 8px;
  max-width: 100% !important;
}

.nqz-x {
  border: none;
  background: none;
  color: #EF4444;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 6px;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nqz-x:hover {
  color: #B91C1C;
  background: #FEE2E2;
}

.nqz-count {
  font-size: 12.5px;
  color: #64748B;
  margin-top: 8px;
  font-weight: 500;
}

.nqz-count.zero {
  color: #DC2626;
  font-weight: 600;
}

.nqz-btn-action {
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  color: #191B1E;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  transition: all 0.15s ease;
}

.nqz-btn-action:hover {
  background: #F8FAFC;
  border-color: #191B1E;
}

/* Product Tags Table */
.nqz-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
  background: #F8FAFC;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
}

.nqz-tools input,
.nqz-tools select {
  width: auto !important;
}

.nqz table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
  background: #FFFFFF;
}

.nqz th {
  background: #F8FAFC;
  padding: 12px 14px;
  font-weight: 700;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1.5px solid #E2E8F0;
  text-align: left;
}

.nqz td {
  padding: 12px 14px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
  font-size: 13.5px;
  color: #191B1E;
}

.nqz tr:last-child td {
  border-bottom: none;
}

.nqz tr:hover td {
  background: #FAFBFD;
}

.nqz-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
}

.nqz-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #F1F5F9;
  color: #475569;
  display: inline-block;
}

.nqz-badge.out {
  background: #FEE2E2;
  color: #991B1B;
}

.nqz-badge.warn {
  background: #FFEDD5;
  color: #9A3412;
}

.nqz-editor {
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px;
  margin-top: 10px;
}

/* Preview & Health */
.nqz-pv {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
}

.nqz-pv .card {
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 18px;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.nqz-pv label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  color: #191B1E;
  margin: 12px 0 6px;
}

.nqz-score {
  font-weight: 700;
  color: #E23A1E;
  font-size: 15px;
}

.nqz-why {
  color: #64748B;
  font-size: 12.5px;
}

/* ==========================================================================
   QUIZ PRODUCT TAGS: HORIZONTAL RESPONSIVE TABLE & MODAL
   ========================================================================== */

/* Responsive Table Wrapper */
.nqz-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  margin-bottom: 20px;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
}

/* Custom Scrollbar for sleek horizontal scrolling */
.nqz-table-responsive::-webkit-scrollbar {
  height: 8px;
}
.nqz-table-responsive::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-radius: 4px;
}
.nqz-table-responsive::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
.nqz-table-responsive::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Mobile/Tablet scroll hint */
.nqz-table-scroll-hint {
  display: none;
  padding: 8px 14px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748B;
  text-align: right;
  letter-spacing: 0.02em;
}

@media (max-width: 900px) {
  .nqz-table-scroll-hint {
    display: block;
  }
}

.nqz-table-responsive table {
  min-width: 840px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  border: none;
}

.nqz-table-responsive th {
  background: #F8FAFC;
  padding: 12px 16px;
  font-weight: 700;
  color: #475569;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1.5px solid #E2E8F0;
  text-align: left;
  white-space: nowrap;
}

.nqz-table-responsive td {
  padding: 12px 16px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
  font-size: 13.5px;
  color: #1E293B;
}

.nqz-table-responsive tr:last-child td {
  border-bottom: none;
}

.nqz-table-responsive tr:hover td {
  background: #FAFBFD;
}

/* Edit Tags Button */
.nqz-btn-edit-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  color: #1E293B;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.nqz-btn-edit-tags:hover {
  background: #0F172A;
  border-color: #0F172A;
  color: #FFFFFF;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.16);
  transform: translateY(-1px);
}

.nqz-btn-edit-tags svg {
  flex-shrink: 0;
  stroke: currentColor;
}

/* Modal Scrim and Container */
#nqz-tag-modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.nqz-modal-card {
  width: 100%;
  max-width: 660px;
  max-height: 90vh;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: nqzModalIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes nqzModalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.nqz-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid #E2E8F0;
  background: #F8FAFC;
  gap: 14px;
}

.nqz-modal-head-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.nqz-modal-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: #F1F5F9;
  border: 1.5px solid #E2E8F0;
  flex-shrink: 0;
}

.nqz-modal-title {
  margin: 0 0 4px;
  font-size: 15.5px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nqz-modal-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #64748B;
}

.nqz-modal-pill-cat {
  background: #EEF2F6;
  color: #334155;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 500;
}

.nqz-modal-pill-price {
  background: #EFF6FF;
  color: #2563EB;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.nqz-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  color: #64748B;
  font-size: 16px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.nqz-modal-close:hover {
  background: #FEE2E2;
  border-color: #FECACA;
  color: #DC2626;
  transform: rotate(90deg);
}

.nqz-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  max-height: calc(90vh - 150px);
}

.nqz-modal-instructions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #E2E8F0;
}

.nqz-modal-inst-text {
  font-size: 13px;
  color: #64748B;
  font-weight: 500;
}

.nqz-modal-inst-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}

.nqz-modal-axes {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nqz-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid #E2E8F0;
  background: #F8FAFC;
  flex-shrink: 0;
  gap: 12px;
}

.nqz-modal-flash {
  font-size: 13px;
  font-weight: 700;
  color: #059669;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
}

.nqz-modal-done-btn {
  padding: 7px 24px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25) !important;
  cursor: pointer;
}

#nqz-msg {
  color: #34D399;
  font-weight: 700;
  font-size: 13px;
}

.nqz-tools-count {
  color: #64748B;
  font-size: 13px;
  font-weight: 600;
  margin-left: auto;
}

@media (max-width: 960px) {
  .nqz-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .nqz-opt {
    grid-template-columns: 1fr;
  }
  .nqz-pv {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nqz-tools {
    gap: 8px;
    padding: 10px 12px;
  }
  .nqz-tools input,
  .nqz-tools select {
    flex: 1 1 140px;
  }
  .nqz-tools-count {
    margin-left: 0;
    width: 100%;
    text-align: right;
  }
}

@media (max-width: 640px) {
  #nqz-tag-modal-scrim {
    padding: 10px;
  }
  .nqz-modal-card {
    max-height: 94vh;
    border-radius: 14px;
  }
  .nqz-modal-head {
    padding: 14px 16px;
  }
  .nqz-modal-body {
    padding: 16px;
  }
  .nqz-modal-footer {
    padding: 12px 16px;
  }
  .nqz-modal-thumb {
    width: 44px;
    height: 44px;
  }
  .nqz-modal-title {
    font-size: 14px;
  }
}

/* --- Meta (Facebook) Product Catalog Feed Card Styles --- */
.nje-feed-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
}
.nje-feed-copy-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}
.nje-feed-copy-btn.copied {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
  color: #16a34a !important;
}
.nje-feed-url-input:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15) !important;
  outline: none !important;
}

/* Coupon — scoped to the Coupon tab; existing admin styles stay unchanged. */
#tab-coupon .nje-card-title { display: flex; align-items: center; gap: 8px; }
#tab-coupon .nje-coupon-note { color: var(--nje-muted); font-size: 13px; line-height: 1.65; margin: 10px 0 16px; }
#tab-coupon .nje-coupon-fields { margin-bottom: 12px; }
#tab-coupon [role="status"] { display: inline-block; font-size: 13px; margin-left: 12px; }
#tab-coupon .nje-coupon-table-wrap { overflow-x: auto; }
#tab-coupon .nje-coupon-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
#tab-coupon .nje-coupon-table th { background: #f8fafc; color: var(--nje-muted); font-weight: 600; }
#tab-coupon .nje-coupon-table th, #tab-coupon .nje-coupon-table td { padding: 13px 12px; border-bottom: 1px solid var(--nje-border); white-space: nowrap; }
#tab-coupon .nje-coupon-badge { display: inline-block; padding: 4px 9px; border-radius: 999px; background: #f1f5f9; color: #64748b; font-size: 12px; }
#tab-coupon .nje-coupon-badge.active { background: #ecfdf5; color: #15803d; }
#tab-coupon .nje-coupon-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--nje-border); border-radius: 8px; color: var(--nje-text); background: #fff; cursor: pointer; }
#tab-coupon .nje-coupon-icon-btn:hover { border-color: var(--nje-accent); color: var(--nje-accent); background: #fff7f5; }
#tab-coupon .nje-coupon-icon-btn:focus-visible { outline: 2px solid var(--nje-accent); outline-offset: 2px; }
#tab-coupon .nje-coupon-actions { display: flex; gap: 7px; }
#tab-coupon .nje-coupon-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 16px; font-size: 12px; color: var(--nje-muted); }
#tab-coupon .nje-coupon-pagination button:disabled { opacity: .4; cursor: not-allowed; }
#tab-coupon .nje-coupon-modal { position: fixed; inset: 0; z-index: 100100; background: rgba(15,23,42,.5); display: flex; align-items: center; justify-content: center; padding: 24px; }
#tab-coupon .nje-coupon-modal[hidden] { display: none !important; }
#tab-coupon .nje-coupon-modal-card { width: min(880px, 100%); max-height: 85vh; overflow-y: auto; background: #fff; border: 1px solid var(--nje-border); padding: 24px; border-radius: 16px; box-shadow: 0 24px 80px rgba(0,0,0,.22); }
#tab-coupon .nje-coupon-modal-card h2 { margin: 0; font-size: 18px; }
@media (max-width: 600px) {
  #tab-coupon .nje-coupon-modal { padding: 12px; }
  #tab-coupon .nje-coupon-modal-card { padding: 16px; }
  #tab-coupon [role="status"] { display: block; margin: 10px 0 0; }
}
#tab-coupon .nje-input, #tab-coupon .nje-select { box-sizing: border-box; max-width: 100%; }

/* Coupon scheduling and safe Trash action. */
#tab-coupon .nje-coupon-badge.scheduled { background: #eff6ff; color: #1d4ed8; }
#tab-coupon .nje-coupon-badge.expired { background: #fff7ed; color: #c2410c; }
#tab-coupon .nje-coupon-delete:hover { border-color: #dc2626; color: #dc2626; background: #fef2f2; }
/* Coupon fields stay inside the card on narrow admin screens. */
#tab-coupon .nje-coupon-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#tab-coupon .nje-coupon-fields .nje-form-group { min-width: 0; }
@media (max-width: 600px) {
  #tab-coupon .nje-coupon-fields { grid-template-columns: minmax(0, 1fr); }
}
