﻿/* =====================================================
   NATURE FURNITURE - Design System & Global Styles
   ===================================================== */

/* ---------- Google Font ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand Colors */
  --nf-primary: #0B5ED7;
  --nf-primary-light: #3d7fe6;
  --nf-primary-dark: #0747a6;
  --nf-secondary: #198754;
  --nf-secondary-light: #28a976;
  --nf-secondary-dark: #0f6b3f;

  /* Status Colors */
  --nf-status-sold: #198754;
  --nf-status-generated: #ffc107;
  --nf-status-instock: #0B5ED7;

  /* Neutrals */
  --nf-bg: #f4f6fb;
  --nf-surface: #ffffff;
  --nf-surface-hover: #f8f9fc;
  --nf-border: #e2e6ee;
  --nf-text: #1a1d26;
  --nf-text-muted: #6b7280;
  --nf-text-light: #9ca3af;

  /* Danger / Warning */
  --nf-danger: #dc3545;
  --nf-warning: #ffc107;
  --nf-info: #0dcaf0;

  /* Shadows */
  --nf-shadow-sm: 0 1px 3px rgba(11,94,215,0.06);
  --nf-shadow: 0 4px 16px rgba(11,94,215,0.08);
  --nf-shadow-lg: 0 8px 32px rgba(11,94,215,0.12);
  --nf-shadow-xl: 0 16px 48px rgba(11,94,215,0.16);

  /* Radius */
  --nf-radius-sm: 8px;
  --nf-radius: 12px;
  --nf-radius-lg: 16px;
  --nf-radius-xl: 20px;
  --nf-radius-full: 50%;

  /* Transitions */
  --nf-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --nf-transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);

  /* Sidebar */
  --nf-sidebar-width: 230px;
  --nf-sidebar-collapsed: 72px;

  /* Font */
  --nf-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- Dark Mode ---------- */
[data-theme="dark"] {
  --nf-bg: #0f1117;
  --nf-surface: #1a1d2e;
  --nf-surface-hover: #242840;
  --nf-border: #2d3148;
  --nf-text: #e8eaed;
  --nf-text-muted: #9aa0b2;
  --nf-text-light: #6b7185;
  --nf-shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --nf-shadow: 0 4px 16px rgba(0,0,0,0.4);
  --nf-shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --nf-shadow-xl: 0 16px 48px rgba(0,0,0,0.6);
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--nf-font);
  background: var(--nf-bg);
  color: var(--nf-text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--nf-primary); text-decoration: none; transition: var(--nf-transition-fast); }
a:hover { color: var(--nf-primary-dark); }

img { max-width: 100%; height: auto; }
button,
input,
select,
textarea {
  font-family: var(--nf-font);
}

/* ---------- Utility Classes ---------- */
.nf-container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.nf-text-center { text-align: center; }
.nf-text-muted { color: var(--nf-text-muted) !important; }
.nf-mt-1 { margin-top: 8px; }
.nf-mt-2 { margin-top: 16px; }
.nf-mt-3 { margin-top: 24px; }
.nf-mt-4 { margin-top: 32px; }
.nf-mb-1 { margin-bottom: 8px; }
.nf-mb-2 { margin-bottom: 16px; }
.nf-mb-3 { margin-bottom: 24px; }
.nf-mb-4 { margin-bottom: 32px; }
.nf-gap-1 { gap: 8px; }
.nf-gap-2 { gap: 16px; }
.nf-gap-3 { gap: 24px; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--nf-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--nf-text-muted); }

/* ===========================================
   LAYOUT - Sidebar + Main Content
   =========================================== */

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

/* ---------- Sidebar ---------- */
.nf-sidebar {
  width: var(--nf-sidebar-width);
  background: var(--nf-surface);
  border-right: 1px solid var(--nf-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  transition: var(--nf-transition);
  overflow-y: auto;
  overflow-x: hidden;
}

.nf-sidebar-brand {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-bottom: 1px solid var(--nf-border);
  flex-shrink: 0;
}

.nf-sidebar-brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--nf-primary), var(--nf-secondary));
  border-radius: var(--nf-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}

.nf-sidebar-brand-text h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--nf-text);
  line-height: 1.2;
}

.nf-sidebar-brand-text span {
  font-size: 11px;
  color: var(--nf-text-muted);
  font-weight: 500;
}

.nf-sidebar-nav {
  padding: 16px 12px;
  flex: 1;
  list-style: none;
}

.nf-sidebar-nav-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--nf-text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 12px 6px;
}

.nf-sidebar-nav-item {
  margin-bottom: 2px;
}

.nf-sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--nf-radius-sm);
  color: var(--nf-text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: var(--nf-transition-fast);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nf-nav-text {
  flex: 1;
  min-width: 0;
}

.nf-nav-notification,
.nf-order-notification {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--nf-surface-hover);
  color: var(--nf-text-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.nf-nav-notification[hidden],
.nf-order-notification[hidden] {
  display: none;
}

.nf-nav-notification.has-pending {
  background: rgba(220,53,69,0.14);
  color: var(--nf-danger);
}

.nf-nav-notification i,
.nf-order-notification i {
  width: auto;
  font-size: 13px;
}

.nf-order-notification {
  min-height: 32px;
  padding: 6px 10px;
}

.nf-order-notification.has-pending {
  background: rgba(255,193,7,0.18);
  color: #946200;
}

.nf-sidebar-nav-link i {
  font-size: 18px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.nf-sidebar-nav-link .nf-nav-notification i {
  width: auto;
  font-size: 13px;
}

.nf-sidebar-subitem .nf-nav-text {
  flex: 1;
  min-width: 0;
}

.nf-sidebar-subitem .nf-nav-notification {
  margin-left: auto;
  min-height: 20px;
  padding: 2px 7px;
  font-size: 11px;
}

.nf-sidebar-subitem .nf-nav-notification i {
  width: auto;
  font-size: 11px;
}

.nf-sidebar-nav-link:hover {
  background: var(--nf-surface-hover);
  color: var(--nf-primary);
}

.nf-sidebar-nav-link.active {
  background: linear-gradient(135deg, rgba(11,94,215,0.1), rgba(25,135,84,0.06));
  color: var(--nf-primary);
  font-weight: 600;
}

.nf-sidebar-dropdown.open > .nf-sidebar-dropdown-toggle,
.nf-sidebar-dropdown.has-active > .nf-sidebar-dropdown-toggle {
  background: var(--nf-surface-hover);
  color: var(--nf-primary);
  font-weight: 600;
}

.nf-sidebar-caret {
  margin-left: auto;
  width: auto !important;
  font-size: 12px !important;
  transition: transform .18s ease;
}

.nf-sidebar-dropdown.open .nf-sidebar-caret {
  transform: rotate(180deg);
}

.nf-sidebar-submenu {
  display: none;
  margin: 2px 0 8px 34px;
  padding-left: 10px;
  border-left: 1px solid var(--nf-border);
}

.nf-sidebar-dropdown.open .nf-sidebar-submenu,
.nf-sidebar-dropdown.has-active .nf-sidebar-submenu {
  display: grid;
  gap: 2px;
}

.nf-sidebar-subitem {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-radius: var(--nf-radius-sm);
  background: transparent;
  color: var(--nf-text-muted);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.nf-sidebar-subitem i {
  width: 16px;
  text-align: center;
  font-size: 14px;
  flex: 0 0 auto;
}

.nf-sidebar-subitem:hover,
.nf-sidebar-subitem.active {
  background: rgba(11,94,215,0.1);
  color: var(--nf-primary);
}

.nf-sidebar-subitem-disabled,
.nf-sidebar-subitem-disabled:hover {
  cursor: not-allowed;
  opacity: .55;
  color: var(--nf-text-light);
  background: transparent;
}

.nf-mapping-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.nf-mapping-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
}

.nf-mapping-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-radius);
  background: var(--nf-card);
}

.nf-mapping-item strong {
  display: block;
  color: var(--nf-text);
}

.nf-mapping-item small {
  display: block;
  color: var(--nf-text-muted);
  margin-top: 2px;
}

.nf-mapping-item .nf-btn {
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .nf-mapping-grid {
    grid-template-columns: 1fr;
  }
}

.nf-sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--nf-border);
  flex-shrink: 0;
}

/* ---------- Main Content Area ---------- */
.nf-main {
  flex: 1;
  margin-left: var(--nf-sidebar-width);
  width: calc(100% - var(--nf-sidebar-width));
  max-width: calc(100% - var(--nf-sidebar-width));
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--nf-transition);
}

/* ---------- Top Header Bar ---------- */
.nf-topbar {
  height: 64px;
  background: var(--nf-surface);
  border-bottom: 1px solid var(--nf-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.nf-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nf-topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--nf-text);
}

.nf-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nf-hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--nf-text);
  cursor: pointer;
  padding: 4px;
}

/* ---------- Page Content ---------- */
.nf-content {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 28px;
}

/* ---------- Section ---------- */
.nf-section {
  display: none;
}
.nf-section.active {
  display: block;
  min-width: 0;
  animation: nfFadeIn 0.3s ease;
}

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

/* ===========================================
   COMPONENTS
   =========================================== */

/* ---------- Cards ---------- */
.nf-card {
  background: var(--nf-surface);
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-radius);
  box-shadow: var(--nf-shadow-sm);
  transition: var(--nf-transition);
  overflow: hidden;
}

.nf-card:hover {
  box-shadow: var(--nf-shadow);
}

.nf-card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--nf-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nf-card-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--nf-text);
}

.nf-card-body {
  padding: 22px;
}

.nf-card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--nf-border);
  background: var(--nf-surface-hover);
}

/* ---------- Stat Cards ---------- */
.nf-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.nf-stat-card {
  background: var(--nf-surface);
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-radius);
  padding: 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--nf-transition);
  position: relative;
  overflow: hidden;
}

.nf-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
}

.nf-stat-card.primary::before { background: var(--nf-primary); }
.nf-stat-card.success::before { background: var(--nf-secondary); }
.nf-stat-card.warning::before { background: var(--nf-warning); }
.nf-stat-card.info::before { background: var(--nf-info); }
.nf-stat-card.danger::before { background: var(--nf-danger); }

.nf-stat-card:hover {
  box-shadow: var(--nf-shadow);
  transform: translateY(-2px);
}

.nf-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--nf-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.nf-stat-icon.primary { background: rgba(11,94,215,0.1); color: var(--nf-primary); }
.nf-stat-icon.success { background: rgba(25,135,84,0.1); color: var(--nf-secondary); }
.nf-stat-icon.warning { background: rgba(255,193,7,0.12); color: #ff2b2b; }
.nf-stat-icon.info { background: rgba(13,202,240,0.1); color: var(--nf-info); }
.nf-stat-icon.danger { background: rgba(220,53,69,0.1); color: var(--nf-danger); }

.nf-stat-info h4 {
  font-size: 13px;
  font-weight: 500;
  color: var(--nf-text-muted);
  margin-bottom: 4px;
}

.nf-stat-info .nf-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--nf-text);
  line-height: 1.1;
}

.nf-stat-info .nf-stat-sub {
  font-size: 12px;
  color: var(--nf-text-light);
  margin-top: 4px;
}

#dashboardStats {
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 10px;
}

#dashboardStats .nf-stat-card {
  min-width: 0;
  padding: 14px 12px;
  gap: 10px;
  align-items: center;
  cursor: pointer;
}

#dashboardStats .nf-stat-icon {
  width: 38px;
  height: 38px;
  font-size: 18px;
}

#dashboardStats .nf-stat-info h4 {
  margin-bottom: 5px;
  font-size: 11px;
  line-height: 1.2;
}

#dashboardStats .nf-stat-info .nf-stat-value {
  font-size: 24px;
  white-space: nowrap;
}

.nf-qr-map-layout {
  display: grid;
  grid-template-columns: minmax(420px, 640px) minmax(300px, 486px);
  gap: 24px;
  align-items: start;
}

.nf-qr-map-left,
.nf-qr-map-right {
  min-width: 0;
}

.nf-qr-map-serial-row {
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 12px;
}

.nf-qr-map-verify-cell {
  align-self: end;
}

.nf-qr-map-right .nf-form-row {
  grid-template-columns: 1fr;
}

#partnerFormCard {
  max-width: 1080px;
}

#partnerFormCard .nf-card-body {
  max-width: 980px;
}

#partnerFormCard .nf-form-row {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 16px 20px;
}

#partnerFormCard .nf-form-group:has(#dealerAddress),
#partnerFormCard .nf-form-row:has(#dealerLoginUsername) {
  max-width: 100%;
}

#partnerFormCard .nf-form-row:has(#dealerCity) {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

#partnerFormCard .nf-form-row:has(#dealerLoginUsername) {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

#sectionCompanySale > .nf-card:first-child {
  max-width: 1120px;
}

#companySaleForm {
  max-width: 1000px;
}

#companySaleForm .nf-form-row {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 16px 20px;
}

#companySaleForm .nf-form-row:has(#companySaleSerial) {
  grid-template-columns: minmax(300px, 520px) auto;
  align-items: end;
}

#companySaleForm .nf-form-row:has(#companyCustCity) {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

#companySaleForm .nf-form-group:has(#companyCustAddress) {
  max-width: 720px;
}

#companySaleForm .nf-form-group:has(#companySaleDate) {
  max-width: 360px;
}

/* ---------- Admin Professional Polish ---------- */
html[data-theme="dark"] .nf-admin-app,
.nf-admin-app[data-theme="dark"] {
  --nf-bg: #070b13;
  --nf-surface: rgba(24, 28, 47, 0.92);
  --nf-surface-hover: rgba(35, 42, 69, 0.92);
  --nf-border: rgba(122, 143, 198, 0.22);
  --nf-text: #f4f8ff;
  --nf-text-muted: #aeb9d7;
  --nf-text-light: #7080a6;
  --nf-shadow-sm: 0 10px 28px rgba(0, 0, 0, 0.24);
  --nf-shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
  --nf-shadow-lg: 0 20px 55px rgba(0, 0, 0, 0.42);
}

html[data-theme="dark"] .nf-admin-app,
.nf-admin-app[data-theme="dark"] {
  background:
    radial-gradient(circle at 18% 0%, rgba(0, 210, 215, 0.22), transparent 30%),
    radial-gradient(circle at 78% 20%, rgba(0, 135, 156, 0.24), transparent 36%),
    linear-gradient(135deg, #02141a 0%, #04131d 42%, #08111e 100%);
}

html[data-theme="dark"] .nf-admin-app .nf-main,
.nf-admin-app[data-theme="dark"] .nf-main {
  background:
    radial-gradient(circle at 20% 5%, rgba(0, 210, 215, 0.16), transparent 34%),
    radial-gradient(circle at 78% 0%, rgba(11, 94, 215, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(0, 78, 91, 0.26), rgba(5, 11, 23, 0.4));
  background-size: auto;
}

html[data-theme="dark"] .nf-admin-app .nf-sidebar,
html[data-theme="dark"] .nf-admin-app .nf-topbar,
.nf-admin-app[data-theme="dark"] .nf-sidebar,
.nf-admin-app[data-theme="dark"] .nf-topbar {
  background: rgba(9, 18, 31, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .nf-admin-app .nf-sidebar,
.nf-admin-app[data-theme="dark"] .nf-sidebar {
  border-right-color: rgba(0, 205, 214, 0.15);
}

html[data-theme="dark"] .nf-admin-app .nf-topbar,
.nf-admin-app[data-theme="dark"] .nf-topbar {
  border-bottom-color: rgba(122, 143, 198, 0.18);
}

html[data-theme="dark"] .nf-admin-app .nf-content,
.nf-admin-app[data-theme="dark"] .nf-content {
  background:
    linear-gradient(180deg, rgba(0, 210, 215, 0.11), transparent 210px),
    radial-gradient(circle at 100% 0%, rgba(0, 205, 214, 0.12), transparent 24%),
    radial-gradient(circle at 0% 45%, rgba(25, 135, 84, 0.08), transparent 22%);
  padding-top: 26px;
}

html[data-theme="dark"] .nf-admin-app .nf-card,
html[data-theme="dark"] .nf-admin-app .nf-stat-card,
.nf-admin-app[data-theme="dark"] .nf-card,
.nf-admin-app[data-theme="dark"] .nf-stat-card {
  position: relative;
  background:
    linear-gradient(145deg, rgba(11, 63, 76, 0.76), rgba(13, 24, 45, 0.92));
  border-color: rgba(0, 217, 224, 0.42);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28), 0 0 18px rgba(0, 205, 214, 0.12);
}

html[data-theme="dark"] .nf-admin-app .nf-card:hover,
.nf-admin-app[data-theme="dark"] .nf-card:hover {
  border-color: rgba(0, 205, 214, 0.34);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(0, 205, 214, 0.05);
}

html[data-theme="dark"] .nf-admin-app #dashboardStats .nf-stat-card,
.nf-admin-app[data-theme="dark"] #dashboardStats .nf-stat-card {
  overflow: hidden;
}

html[data-theme="dark"] .nf-admin-app #dashboardStats .nf-stat-card::after,
.nf-admin-app[data-theme="dark"] #dashboardStats .nf-stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.08) 35%, transparent 68%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
  pointer-events: none;
}

html[data-theme="dark"] .nf-admin-app #dashboardStats .nf-stat-card:hover,
.nf-admin-app[data-theme="dark"] #dashboardStats .nf-stat-card:hover {
  transform: translateY(-4px) scale(1.015);
  border-color: rgba(0, 238, 245, 0.78);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34), 0 0 26px rgba(0, 205, 214, 0.26);
}

html[data-theme="dark"] .nf-admin-app #dashboardStats .nf-stat-card:hover::after,
.nf-admin-app[data-theme="dark"] #dashboardStats .nf-stat-card:hover::after {
  transform: translateX(120%);
}

html[data-theme="dark"] .nf-admin-app .nf-stat-icon,
.nf-admin-app[data-theme="dark"] .nf-stat-icon {
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 22px rgba(0,0,0,0.22);
}

html[data-theme="dark"] .nf-admin-app .nf-sidebar-nav-link.active,
html[data-theme="dark"] .nf-admin-app .nf-sidebar-subitem.active,
.nf-admin-app[data-theme="dark"] .nf-sidebar-nav-link.active,
.nf-admin-app[data-theme="dark"] .nf-sidebar-subitem.active {
  background: linear-gradient(135deg, rgba(0, 205, 214, 0.18), rgba(11, 94, 215, 0.18));
  color: #32e5ff;
  box-shadow: inset 3px 0 0 #00cdd6, 0 10px 26px rgba(0, 205, 214, 0.08);
}

html[data-theme="dark"] .nf-admin-app .nf-table-wrapper,
.nf-admin-app[data-theme="dark"] .nf-table-wrapper {
  border-color: rgba(128, 151, 209, 0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}

html[data-theme="dark"] .nf-admin-app .nf-table thead,
.nf-admin-app[data-theme="dark"] .nf-table thead {
  background: rgba(7, 67, 82, 0.52);
}

html[data-theme="dark"] .nf-admin-app .nf-table tbody tr:hover,
.nf-admin-app[data-theme="dark"] .nf-table tbody tr:hover {
  background: rgba(0, 205, 214, 0.12);
}

html[data-theme="dark"] .nf-admin-app .nf-badge-sold,
.nf-admin-app[data-theme="dark"] .nf-badge-sold {
  box-shadow: 0 0 18px rgba(25, 135, 84, 0.22);
}

html[data-theme="dark"] .nf-admin-app .nf-topbar,
.nf-admin-app[data-theme="dark"] .nf-topbar {
  height: 58px;
}

html[data-theme="dark"] .nf-admin-app .nf-sidebar-brand,
.nf-admin-app[data-theme="dark"] .nf-sidebar-brand {
  padding: 18px 16px;
}

html[data-theme="dark"] .nf-admin-app .nf-sidebar-nav,
.nf-admin-app[data-theme="dark"] .nf-sidebar-nav {
  padding: 12px 10px;
}

html[data-theme="dark"] .nf-admin-app .nf-sidebar-nav-link,
html[data-theme="dark"] .nf-admin-app .nf-sidebar-subitem,
.nf-admin-app[data-theme="dark"] .nf-sidebar-nav-link,
.nf-admin-app[data-theme="dark"] .nf-sidebar-subitem {
  min-height: 34px;
  padding-top: 8px;
  padding-bottom: 8px;
}

html[data-theme="dark"] .nf-admin-app #dashboardStats,
.nf-admin-app[data-theme="dark"] #dashboardStats {
  gap: 12px;
}

html[data-theme="dark"] .nf-admin-app #dashboardStats .nf-stat-card,
.nf-admin-app[data-theme="dark"] #dashboardStats .nf-stat-card {
  min-height: 78px;
  padding: 12px 11px;
  gap: 9px;
}

html[data-theme="dark"] .nf-admin-app #dashboardStats .nf-stat-icon,
.nf-admin-app[data-theme="dark"] #dashboardStats .nf-stat-icon {
  width: 36px;
  height: 36px;
  font-size: 17px;
}

html[data-theme="dark"] .nf-admin-app #dashboardStats .nf-stat-info h4,
.nf-admin-app[data-theme="dark"] #dashboardStats .nf-stat-info h4 {
  font-size: 10px;
  line-height: 1.15;
  margin-bottom: 4px;
}

html[data-theme="dark"] .nf-admin-app #dashboardStats .nf-stat-info .nf-stat-value,
.nf-admin-app[data-theme="dark"] #dashboardStats .nf-stat-info .nf-stat-value {
  font-size: 23px;
  line-height: 1;
}

html[data-theme="dark"] .nf-admin-app .nf-card-header,
.nf-admin-app[data-theme="dark"] .nf-card-header {
  padding: 15px 18px;
}

html[data-theme="dark"] .nf-admin-app .nf-card-body,
.nf-admin-app[data-theme="dark"] .nf-card-body {
  padding: 18px;
}

html[data-theme="dark"] .nf-admin-app .nf-table,
.nf-admin-app[data-theme="dark"] .nf-table {
  font-size: 13px;
}

html[data-theme="dark"] .nf-admin-app .nf-table th,
.nf-admin-app[data-theme="dark"] .nf-table th {
  padding: 10px 14px;
  font-size: 10px;
}

html[data-theme="dark"] .nf-admin-app .nf-table td,
.nf-admin-app[data-theme="dark"] .nf-table td {
  padding: 10px 14px;
}

/* ---------- Buttons ---------- */
.nf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--nf-font);
  border: none;
  border-radius: var(--nf-radius-sm);
  cursor: pointer;
  transition: var(--nf-transition);
  white-space: nowrap;
  line-height: 1.4;
}

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

.nf-btn-primary {
  background: linear-gradient(135deg, var(--nf-primary), var(--nf-primary-light));
  color: #fff;
  box-shadow: 0 2px 8px rgba(11,94,215,0.3);
}
.nf-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--nf-primary-dark), var(--nf-primary));
  box-shadow: 0 4px 16px rgba(11,94,215,0.4);
  transform: translateY(-1px);
}

.nf-btn-success {
  background: linear-gradient(135deg, var(--nf-secondary), var(--nf-secondary-light));
  color: #fff;
  box-shadow: 0 2px 8px rgba(25,135,84,0.3);
}
.nf-btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--nf-secondary-dark), var(--nf-secondary));
  box-shadow: 0 4px 16px rgba(25,135,84,0.4);
  transform: translateY(-1px);
}

.nf-btn-danger {
  background: linear-gradient(135deg, var(--nf-danger), #e85d6b);
  color: #fff;
}
.nf-btn-danger:hover:not(:disabled) { transform: translateY(-1px); }

.nf-btn-outline {
  background: transparent;
  border: 1.5px solid var(--nf-border);
  color: var(--nf-text);
}
.nf-btn-outline:hover:not(:disabled) {
  border-color: var(--nf-primary);
  color: var(--nf-primary);
  background: rgba(11,94,215,0.04);
}

.nf-btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,211,102,0.3);
}
.nf-btn-whatsapp:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
}

.nf-btn-sm { padding: 6px 14px; font-size: 13px; }
.nf-btn-lg { padding: 14px 28px; font-size: 16px; }
.nf-btn-icon { padding: 8px; width: 36px; height: 36px; }

/* ---------- Forms ---------- */
.nf-form-group {
  margin-bottom: 18px;
}

.nf-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--nf-text);
  margin-bottom: 6px;
}

.nf-form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--nf-font);
  color: var(--nf-text);
  background: var(--nf-surface);
  border: 1.5px solid var(--nf-border);
  border-radius: var(--nf-radius-sm);
  transition: var(--nf-transition-fast);
  outline: none;
}

.nf-form-control:focus {
  border-color: var(--nf-primary);
  box-shadow: 0 0 0 3px rgba(11,94,215,0.12);
}

.nf-form-control::placeholder {
  color: var(--nf-text-light);
}

.nf-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

#qrGenerateModeRow,
#standardQROwnerRow,
#billToShipToPanel .nf-form-row {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
}

#qrGenerateModeRow .nf-form-group,
#standardQROwnerRow .nf-form-group,
#billToShipToPanel .nf-form-group {
  flex: 0 0 auto;
}

#qrGenerateMode {
  width: 220px;
}

#qrOwnerType {
  width: 220px;
}

#qrOwnerId {
  width: 320px;
  max-width: min(520px, calc(100vw - 48px));
}

#billToDistributorId,
#shipToDealerId {
  width: 360px;
  max-width: min(520px, calc(100vw - 48px));
}

#qrModelName {
  width: 300px;
  max-width: min(380px, calc(100vw - 48px));
}

#qrColor {
  width: 240px;
  max-width: min(360px, calc(100vw - 48px));
}

#qrMirrorStatus {
  width: 170px;
}

.nf-qr-generator-form > .nf-form-row {
  display: flex;
  align-items: start;
  flex-wrap: wrap;
  gap: 18px 24px;
}

.nf-qr-generator-form > .nf-form-row > .nf-form-group {
  flex: 0 0 auto;
}

.nf-qr-generator-form > .nf-form-row > .nf-form-group:has(#qrNotes),
.nf-qr-generator-form > .nf-form-group:has(#qrNotes) {
  flex: 1 1 100%;
  width: 100%;
}

.nf-qr-generator-form input[readonly][value="Nature Furniture"] {
  width: 280px;
}

#qrMfgDate {
  width: 220px;
}

#qrMRP {
  width: 220px;
}

#qrProductSize {
  width: 300px;
}

#qrQuantity {
  width: 170px;
}

.nf-qr-generator-form input[readonly][value="1800 88 97030"] {
  width: 220px;
}

#modelPresetStatus {
  align-self: center;
  max-width: 520px;
}

.nf-form-help {
  font-size: 12px;
  color: var(--nf-text-light);
  margin-top: 4px;
}

/* ---------- Tables ---------- */
.nf-table-wrapper {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border-radius: var(--nf-radius);
  border: 1px solid var(--nf-border);
}

.nf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.nf-table thead {
  background: var(--nf-surface-hover);
}

.nf-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nf-text-muted);
  border-bottom: 1px solid var(--nf-border);
  white-space: nowrap;
}

.nf-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--nf-border);
  color: var(--nf-text);
  vertical-align: middle;
}

.nf-table tbody tr {
  transition: var(--nf-transition-fast);
}

.nf-table tbody tr:hover {
  background: var(--nf-surface-hover);
}

.nf-table tbody tr:last-child td {
  border-bottom: none;
}

.nf-qr-list-table {
  table-layout: fixed;
  min-width: 1120px;
}

.nf-qr-list-table th:nth-child(1),
.nf-qr-list-table td:nth-child(1) { width: 260px; }
.nf-qr-list-table th:nth-child(2),
.nf-qr-list-table td:nth-child(2) { width: 240px; }
.nf-qr-list-table th:nth-child(3),
.nf-qr-list-table td:nth-child(3) { width: 140px; }
.nf-qr-list-table th:nth-child(4),
.nf-qr-list-table td:nth-child(4) { width: 110px; }
.nf-qr-list-table th:nth-child(5),
.nf-qr-list-table td:nth-child(5) { width: 130px; }
.nf-qr-list-table th:nth-child(6),
.nf-qr-list-table td:nth-child(6) { width: 140px; }
.nf-qr-list-table th:nth-child(7),
.nf-qr-list-table td:nth-child(7) { width: 120px; }

.nf-qr-list-table td {
  overflow-wrap: anywhere;
}

.nf-qr-list-table td:nth-child(7) {
  overflow-wrap: normal;
}

.nf-recent-sales-table {
  table-layout: fixed;
  min-width: 1040px;
}

.nf-recent-sales-table th:nth-child(1),
.nf-recent-sales-table td:nth-child(1) { width: 260px; }
.nf-recent-sales-table th:nth-child(2),
.nf-recent-sales-table td:nth-child(2) { width: 210px; }
.nf-recent-sales-table th:nth-child(3),
.nf-recent-sales-table td:nth-child(3) { width: 220px; }
.nf-recent-sales-table th:nth-child(4),
.nf-recent-sales-table td:nth-child(4) { width: 220px; }
.nf-recent-sales-table th:nth-child(5),
.nf-recent-sales-table td:nth-child(5) { width: 130px; }
.nf-recent-sales-table th:nth-child(6),
.nf-recent-sales-table td:nth-child(6) { width: 120px; }

.nf-recent-sales-table td {
  overflow-wrap: anywhere;
}

.nf-generated-products-table {
  table-layout: fixed;
  min-width: 1120px;
}

.nf-generated-products-table th:nth-child(1),
.nf-generated-products-table td:nth-child(1) { width: 280px; }
.nf-generated-products-table th:nth-child(2),
.nf-generated-products-table td:nth-child(2) { width: 220px; }
.nf-generated-products-table th:nth-child(3),
.nf-generated-products-table td:nth-child(3) { width: 150px; }
.nf-generated-products-table th:nth-child(4),
.nf-generated-products-table td:nth-child(4) { width: 110px; }
.nf-generated-products-table th:nth-child(5),
.nf-generated-products-table td:nth-child(5) { width: 130px; }
.nf-generated-products-table th:nth-child(6),
.nf-generated-products-table td:nth-child(6) { width: 140px; }
.nf-generated-products-table th:nth-child(7),
.nf-generated-products-table td:nth-child(7) { width: 120px; }

.nf-generated-products-table td {
  overflow-wrap: anywhere;
}

.nf-generated-products-table td:nth-child(7) {
  overflow-wrap: normal;
}

/* ---------- Badges / Status ---------- */
.nf-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  white-space: nowrap;
}

.nf-badge-sold {
  background: rgba(25,135,84,0.12);
  color: var(--nf-status-sold);
}

.nf-badge-generated {
  background: rgba(255,193,7,0.15);
  color: #b38600;
}

.nf-badge-warning {
  background: rgba(255,193,7,0.18);
  color: #ff1c1c;
}

.nf-badge-instock {
  background: rgba(11,94,215,0.1);
  color: var(--nf-status-instock);
}

.nf-badge-active {
  background: rgba(25,135,84,0.12);
  color: var(--nf-secondary);
}

.nf-badge-inactive {
  background: rgba(220,53,69,0.1);
  color: var(--nf-danger);
}

.nf-badge-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.nf-badge-sold.nf-badge-dot::before { background: var(--nf-status-sold); }
.nf-badge-generated.nf-badge-dot::before { background: var(--nf-status-generated); }
.nf-badge-instock.nf-badge-dot::before { background: var(--nf-status-instock); }
.nf-badge-active.nf-badge-dot::before { background: var(--nf-secondary); }
.nf-badge-inactive.nf-badge-dot::before { background: var(--nf-danger); }

/* ---------- Modals ---------- */
.nf-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1060;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: nfFadeIn 0.2s ease;
}
.nf-modal-overlay.show { display: flex; }

.nf-modal {
  background: var(--nf-surface);
  border-radius: var(--nf-radius-lg);
  box-shadow: var(--nf-shadow-xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  animation: nfSlideUp 0.3s ease;
}

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

.nf-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--nf-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nf-modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.nf-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--nf-text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.nf-modal-body { padding: 24px; }
.nf-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--nf-border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Full landscape QR preview: fit the complete sticker inside the viewport. */
.nf-qr-preview-modal {
  width: min(940px, calc(100vw - 32px));
  max-width: 940px;
  max-height: calc(100vh - 24px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.nf-qr-preview-modal .nf-modal-header,
.nf-qr-preview-modal .nf-modal-footer { flex: 0 0 auto; }
.nf-qr-preview-body {
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden;
}
.nf-qr-preview-holder {
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-radius-sm);
  padding: 12px;
  overflow: hidden;
}

/* Keep printer instructions above the QR preview. Only its settings area
   scrolls; the Open Print Dialog action remains visible at all times. */
#tvsPrintInstructionsModal { z-index: 1090; }
#tvsPrintInstructionsModal > .nf-modal {
  width: min(520px, calc(100vw - 32px));
  max-width: 520px !important;
  max-height: calc(100vh - 24px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#tvsPrintInstructionsModal .nf-modal-header,
#tvsPrintInstructionsModal .nf-modal-footer { flex: 0 0 auto; }
#tvsPrintInstructionsModal .nf-modal-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
#tvsPrintInstructionsModal .nf-modal-footer {
  position: relative;
  z-index: 1;
  background: var(--nf-surface);
  box-shadow: 0 -8px 18px rgba(0,0,0,.08);
}

/* ---------- Alerts / Toasts ---------- */
.nf-alert {
  padding: 14px 18px;
  border-radius: var(--nf-radius-sm);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.nf-alert-success { background: rgba(25,135,84,0.1); color: var(--nf-secondary); border: 1px solid rgba(25,135,84,0.2); }
.nf-alert-danger { background: rgba(220,53,69,0.1); color: var(--nf-danger); border: 1px solid rgba(220,53,69,0.2); }
.nf-alert-warning { background: rgba(255,193,7,0.12); color: #8a6d00; border: 1px solid rgba(255,193,7,0.3); }
.nf-alert-info { background: rgba(11,94,215,0.08); color: var(--nf-primary); border: 1px solid rgba(11,94,215,0.15); }

.nf-alert {
  min-width: 0;
  overflow-wrap: anywhere;
}

.nf-alert > span,
.nf-alert > div {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.nf-alert code {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
}

#saleProductInfo.nf-alert {
  display: block;
  line-height: 1.55;
}

#saleProductInfo.nf-alert > i {
  margin-right: 8px;
}

.nf-product-alert {
  align-items: flex-start;
}

.nf-product-alert > i {
  flex: 0 0 auto;
  margin-top: 2px;
}

.nf-order-status-cell {
  min-width: 130px;
  line-height: 1.45;
}

.nf-order-status-cell .nf-text-muted {
  margin-top: 6px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

/* ---------- Toast Notifications ---------- */
.nf-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nf-toast {
  background: var(--nf-surface);
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-radius-sm);
  box-shadow: var(--nf-shadow-lg);
  padding: 14px 18px;
  min-width: 300px;
  max-width: 420px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: nfSlideInRight 0.3s ease;
}

@keyframes nfSlideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

.nf-toast.removing {
  animation: nfSlideOutRight 0.3s ease forwards;
}

@keyframes nfSlideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

/* ---------- Spinners ---------- */
.nf-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--nf-border);
  border-top-color: var(--nf-primary);
  border-radius: 50%;
  animation: nfSpin 0.7s linear infinite;
  display: inline-block;
}

@keyframes nfSpin {
  to { transform: rotate(360deg); }
}

.nf-spinner-lg { width: 40px; height: 40px; border-width: 4px; }

/* ---------- Loading Overlay ---------- */
.nf-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 2000;
}

[data-theme="dark"] .nf-loading-overlay {
  background: rgba(15,17,23,0.85);
}

/* ---------- Empty State ---------- */
.nf-empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--nf-text-muted);
}

.nf-empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  color: var(--nf-text-light);
}

.nf-empty-state h4 { margin-bottom: 8px; font-weight: 600; }

/* ---------- Search / Filter Bar ---------- */
.nf-search-bar {
  position: relative;
}

.nf-search-bar i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--nf-text-light);
}

.nf-search-bar input {
  padding-left: 40px;
}

/* ---------- Tabs ---------- */
.nf-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--nf-border);
  margin-bottom: 24px;
  overflow-x: auto;
}

.nf-tab {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--nf-text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--nf-transition-fast);
  font-family: var(--nf-font);
}

.nf-tab:hover { color: var(--nf-primary); }

.nf-tab.active {
  color: var(--nf-primary);
  border-bottom-color: var(--nf-primary);
  font-weight: 600;
}

/* ===========================================
   PAGE-SPECIFIC STYLES
   =========================================== */

/* ---------- Login Page ---------- */
.nf-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f5e9 100%);
}

[data-theme="dark"] .nf-login-page {
  background: linear-gradient(135deg, #0f1117 0%, #111827 100%);
}

.nf-login-card {
  background: var(--nf-surface);
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-radius-xl);
  box-shadow: var(--nf-shadow-xl);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
}

.nf-login-header {
  background: linear-gradient(135deg, var(--nf-primary), var(--nf-secondary));
  padding: 32px 28px;
  text-align: center;
  color: #fff;
}

.nf-login-header h1 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}

.nf-login-header p {
  font-size: 13px;
  opacity: 0.85;
}

.nf-login-body {
  padding: 32px 28px;
}

.nf-login-tabs {
  display: flex;
  margin-bottom: 24px;
  background: var(--nf-bg);
  border-radius: var(--nf-radius-sm);
  padding: 4px;
}

.nf-login-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  border: none;
  background: none;
  color: var(--nf-text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--nf-transition-fast);
  font-family: var(--nf-font);
}

.nf-login-tab.active {
  background: var(--nf-surface);
  color: var(--nf-primary);
  box-shadow: var(--nf-shadow-sm);
}

/* ---------- Landing / Hero ---------- */
.nf-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #f0f4ff 0%, #ffffff 40%, #e8f5e9 100%);
}

[data-theme="dark"] .nf-hero {
  background: linear-gradient(160deg, #0f1117 0%, #141722 40%, #111827 100%);
}

.nf-hero-nav {
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nf-hero-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: var(--nf-text);
}

.nf-hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  max-width: 700px;
  margin: 0 auto;
}

.nf-hero-content h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--nf-primary), var(--nf-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nf-hero-content p {
  font-size: 18px;
  color: var(--nf-text-muted);
  margin-bottom: 32px;
  max-width: 520px;
}

.nf-hero-search {
  width: 100%;
  max-width: 480px;
  position: relative;
  margin-bottom: 24px;
}

.nf-hero-search input {
  width: 100%;
  padding: 16px 60px 16px 20px;
  font-size: 16px;
  border: 2px solid var(--nf-border);
  border-radius: var(--nf-radius-lg);
  background: var(--nf-surface);
  font-family: var(--nf-font);
  color: var(--nf-text);
  box-shadow: var(--nf-shadow);
  outline: none;
  transition: var(--nf-transition);
}

.nf-hero-search input:focus {
  border-color: var(--nf-primary);
  box-shadow: var(--nf-shadow-lg), 0 0 0 3px rgba(11,94,215,0.1);
}

.nf-hero-search button {
  position: absolute;
  right: 6px;
  top: 6px;
  bottom: 6px;
  width: 48px;
  background: linear-gradient(135deg, var(--nf-primary), var(--nf-primary-light));
  border: none;
  border-radius: var(--nf-radius-sm);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: var(--nf-transition);
}

.nf-hero-search button:hover {
  background: linear-gradient(135deg, var(--nf-primary-dark), var(--nf-primary));
}

.nf-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.nf-hero-footer {
  padding: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--nf-text-light);
}

/* ---------- Verification Page ---------- */
.nf-verify-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, #f0f4ff 0%, #ffffff 50%, #e8f5e9 100%);
}

[data-theme="dark"] .nf-verify-page {
  background: linear-gradient(160deg, #0f1117 0%, #141722 50%, #111827 100%);
}

.nf-verify-card {
  background: var(--nf-surface);
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-radius-xl);
  box-shadow: var(--nf-shadow-xl);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
}

.nf-verify-header {
  background: linear-gradient(135deg, var(--nf-primary), var(--nf-secondary));
  padding: 28px;
  text-align: center;
  color: #fff;
}

.nf-verify-body { padding: 28px; }

.nf-verify-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--nf-border);
  font-size: 14px;
}

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

.nf-verify-label {
  font-weight: 600;
  color: var(--nf-text-muted);
}

.nf-verify-value {
  font-weight: 600;
  color: var(--nf-text);
  text-align: right;
}

/* ---------- Thank You Page ---------- */
.nf-thankyou-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, #e8f5e9 0%, #ffffff 50%, #f0f4ff 100%);
}

[data-theme="dark"] .nf-thankyou-page {
  background: linear-gradient(160deg, #111827 0%, #141722 50%, #0f1117 100%);
}

.nf-thankyou-card {
  background: var(--nf-surface);
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-radius-xl);
  box-shadow: var(--nf-shadow-xl);
  width: 100%;
  max-width: 520px;
  text-align: center;
  padding: 40px 32px;
}

.nf-thankyou-icon {
  width: 80px;
  height: 80px;
  background: rgba(25,135,84,0.1);
  color: var(--nf-secondary);
  border-radius: var(--nf-radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 20px;
  animation: nfPulse 2s infinite;
}

@keyframes nfPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(25,135,84,0.3); }
  50% { box-shadow: 0 0 0 12px rgba(25,135,84,0); }
}

/* ---------- QR Code Display ---------- */
.nf-qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 16px;
}

.nf-qr-item {
  background: var(--nf-surface);
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-radius);
  padding: 16px;
  text-align: center;
  transition: var(--nf-transition);
}

.nf-qr-item:hover {
  box-shadow: var(--nf-shadow);
}

.nf-qr-item canvas,
.nf-qr-item img {
  margin-bottom: 10px;
}

.nf-qr-item .nf-qr-serial {
  font-size: 12px;
  font-weight: 600;
  color: var(--nf-text-muted);
  word-break: break-all;
}

.nf-qr-card-preview {
  width: min(100%, 70mm);
  height: 100mm;
  min-width: min(100%, 70mm);
  max-width: 70mm;
  min-height: 100mm;
  max-height: 100mm;
  margin: 0 auto;
  padding: 3.5mm;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  color: #111827;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.nf-qr-card-preview .qr-brand {
  font-size: 12px;
  line-height: 1.1;
  font-weight: 700;
  text-align: center;
  margin: 0 0 3px;
}

.nf-qr-card-preview .qr-type-heading {
  width: 100%;
  padding: 4px 3px;
  margin: 4px 0;
  border: 1.5px solid #167c3b;
  color: #167c3b;
  font-size: 13px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 1px;
  text-align: center;
}

.nf-qr-card-preview .qr-type-heading.qr-type-distributor {
  border-color: #0b5ed7;
  color: #0b5ed7;
}

.nf-qr-card-preview .qr-image-zone {
  width: 42mm;
  height: 42mm;
  min-height: 42mm;
  padding: 4mm;
  margin: 1.5mm 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.nf-qr-card-preview .qr-image {
  width: 34mm;
  height: 34mm;
  min-width: 34mm;
  min-height: 34mm;
  max-width: 34mm;
  max-height: 34mm;
  margin: 0;
  object-fit: contain;
  image-rendering: crisp-edges;
}

.nf-qr-card-preview .qr-details {
  width: 100%;
  font-size: 7px;
  line-height: 1.1;
  text-align: left;
  overflow-wrap: anywhere;
}

.nf-qr-card-preview .qr-details > div { margin-bottom: 2px; }
.nf-qr-card-preview .qr-details strong { font-weight: 800; }
.nf-qr-card-preview .qr-firm-name { font-size: 8.5px; font-weight: 700; }
.nf-qr-card-preview .qr-serial-value { font-family: monospace; font-weight: 700; }

/* Nature Furniture landscape label preview - reference-matched printable proportions */
.nf-qr-grid:has(.nf-label-preview-shell) { grid-template-columns:minmax(0,1fr); }
.nf-label-preview-shell { width:min(100%,840px); min-width:0; margin:0 auto; padding:0; background:#fff; color:#000; border:0; border-radius:0; box-shadow:none; overflow:hidden; container-type:inline-size; }
.nf-label-preview-shell:hover { box-shadow:none; }
.nf-label-preview-shell .qr-label { width:100%; min-width:0; aspect-ratio:10 / 7; padding:2.4% 5.7%; overflow:hidden; background:#fff; color:#000; box-sizing:border-box; border:0; border-radius:0; box-shadow:none; font-family:Arial,Helvetica,sans-serif; font-size:clamp(7px,1.9cqw,16px); font-weight:700; line-height:1.08; }
.nf-label-preview-shell .qr-label * { box-sizing:border-box; }
.nf-label-preview-shell .qr-label-header { height:25%; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; padding-top:.7%; font-size:clamp(18px,7.1cqw,60px); line-height:.98; font-weight:900; text-align:center; }
.nf-label-preview-shell .qr-label-header span { display:inline-block; padding:0 1.2% .35%; border-bottom:3px solid #000; }
.nf-label-preview-shell .label-tagline { margin-top:1.3%; font-size:clamp(10px,3.05cqw,26px); line-height:1; font-weight:900; }
.nf-label-preview-shell .qr-label-body { display:grid; grid-template-columns:66.4% 33.6%; width:100%; height:75%; border:2px solid #000; }
.nf-label-preview-shell .label-left-column,.nf-label-preview-shell .label-right-column { min-width:0; display:flex; flex-direction:column; }
.nf-label-preview-shell .label-left-column { justify-content:flex-start; }
.nf-label-preview-shell .label-right-column { border-left:2px solid #000; }
.nf-label-preview-shell .product-info { height:37.5%; flex:0 0 37.5%; padding:5.8% 3.8% 1.4%; border-bottom:2px solid #000; overflow:hidden; }
.nf-label-preview-shell .label-model { font-size:clamp(13px,4.8cqw,40px); font-weight:900; line-height:1.02; }
.nf-label-preview-shell .label-mrp { margin-top:1%; font-size:clamp(10px,3.35cqw,28px); font-weight:900; }
.nf-label-preview-shell .label-serial { margin-top:1%; font-size:clamp(8px,2.75cqw,23px); font-weight:800; overflow-wrap:anywhere; }
.nf-label-preview-shell .manufacturer-info { flex:1; min-height:0; height:auto; padding:3.4% 3.8% 0; border-bottom:0; font-size:clamp(9px,2.7cqw,23px); font-weight:700; line-height:1.2; }
.nf-label-preview-shell .manufacturer-info:last-child { flex:1; height:auto; }
.nf-label-preview-shell .label-section-title { display:inline-block; margin-bottom:1.4%; border-bottom:3px solid #000; font-size:clamp(13px,4.2cqw,36px); font-weight:900; line-height:1; outline:0; box-shadow:none; }
.nf-label-preview-shell .manufacturer-name { margin-bottom:.8%; font-size:clamp(10px,3.2cqw,27px); font-weight:900; }
.nf-label-preview-shell .manufacturer-email { margin-top:1.6%; font-size:clamp(8px,2.45cqw,20px); white-space:nowrap; }
.nf-label-preview-shell .label-website { height:15%; flex:none; display:flex; align-items:flex-start; max-width:100%; padding:0 3.8%; font-size:clamp(10px,3.25cqw,27px); font-weight:900; line-height:1; white-space:nowrap; overflow:hidden; }
.nf-label-preview-shell .dealer-info { flex:1; padding:2.3% 3.2% 1%; font-size:clamp(9px,2.65cqw,23px); font-weight:800; line-height:1.15; text-transform:uppercase; }
.nf-label-preview-shell .dealer-info .label-section-title { font-size:clamp(12px,4.1cqw,35px); }
.nf-label-preview-shell .label-firm { margin:.7% 0; font-size:clamp(10px,3cqw,26px); font-weight:900; overflow-wrap:anywhere; }
.nf-label-preview-shell .dealer-info>div { margin-bottom:.6%; }
.nf-label-preview-shell .bill-ship-grid { display:grid; grid-template-columns:1fr 1fr; gap:4%; height:100%; align-items:start; }
.nf-label-preview-shell .bill-ship-party { min-width:0; }
.nf-label-preview-shell .bill-ship-name { font-size:clamp(8px,2.35cqw,20px); font-weight:900; line-height:1.12; overflow-wrap:anywhere; }
.nf-label-preview-shell .bill-ship-address { margin-top:1.6%; font-size:clamp(8px,2.25cqw,19px); font-weight:900; line-height:1.12; overflow-wrap:anywhere; }
.nf-label-preview-shell .qr-section { height:55.5%; display:flex; align-items:center; justify-content:center; padding:.5%; border-bottom:2px solid #000; overflow:hidden; }
.nf-label-preview-shell .label-qr-container { box-sizing:border-box; width:auto; height:98%; max-width:98%; aspect-ratio:1; flex:0 0 auto; padding:.5%; background:#fff; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.nf-label-preview-shell .label-qr-image,.nf-label-preview-shell .label-qr-slot canvas { box-sizing:border-box; display:block; width:100%; height:100%; min-width:0; min-height:0; max-width:100%; max-height:100%; flex:none; object-fit:contain; object-position:center; clip-path:none; image-rendering:pixelated; image-rendering:crisp-edges; background:#fff; margin:0; padding:0; border:0; overflow:visible; }
.nf-label-preview-shell .specifications { height:25.5%; padding:3% 3.5%; border-bottom:2px solid #000; font-size:clamp(8px,2.55cqw,21px); font-weight:900; line-height:1.12; text-transform:uppercase; overflow:hidden; overflow-wrap:anywhere; }
.nf-label-preview-shell .specifications>div { margin-bottom:2%; }
.nf-label-preview-shell .toll-free-section { height:19%; flex:none; display:flex; flex-direction:column; justify-content:center; align-items:flex-start; padding-left:5%; text-align:left; font-size:clamp(9px,2.8cqw,23px); font-weight:900; line-height:1.02; overflow:hidden; }
.nf-label-preview-shell .toll-free-section strong { margin-top:2%; font-size:clamp(10px,3.25cqw,28px); white-space:nowrap; }

@media print {
  .nf-label-preview-shell { border:0!important; border-radius:0!important; box-shadow:none!important; overflow:visible; }
  .nf-label-preview-shell .qr-label { break-inside:avoid; page-break-inside:avoid; border:0!important; border-radius:0!important; box-shadow:none!important; color:#000; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  .nf-label-preview-shell .qr-section,.nf-label-preview-shell .label-qr-container { overflow:visible!important; }
  .nf-label-preview-shell .label-qr-image,.nf-label-preview-shell .label-qr-slot canvas { object-fit:contain!important; object-position:center!important; clip-path:none!important; image-rendering:pixelated; image-rendering:crisp-edges; }
}

/* ---------- Product Model Master ---------- */
.nf-model-master-header { align-items:flex-start; gap:16px; }
.nf-model-master-header h3 { margin-bottom:4px; }
.nf-model-master-header p { margin:0; font-size:13px; }
.nf-model-master-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.nf-model-filter-grid { display:grid; grid-template-columns:minmax(220px,2fr) repeat(2,minmax(150px,1fr)) minmax(220px,1.25fr); gap:14px; align-items:end; }
.nf-range-inputs { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.nf-model-master-table { width:100%; min-width:900px; table-layout:auto; }
.nf-model-master-table th,.nf-model-master-table td { padding-left:10px; padding-right:10px; }
.nf-model-master-table td { vertical-align:middle; }
.nf-model-thumb,.nf-model-thumb-placeholder { width:48px; height:48px; border-radius:8px; border:1px solid var(--nf-border); background:var(--nf-bg); object-fit:cover; display:flex; align-items:center; justify-content:center; color:var(--nf-text-muted); }
.nf-model-subtext { display:block; margin-top:3px; color:var(--nf-text-muted); font-size:11px; }
.nf-color-chip { display:inline-flex; padding:3px 7px; margin:2px 2px 2px 0; border:1px solid var(--nf-border); border-radius:999px; background:var(--nf-bg); color:var(--nf-text); font-size:11px; white-space:nowrap; }
.nf-color-chip-primary { border-color:rgba(255,193,7,.5); background:rgba(255,193,7,.14); color:var(--nf-text); font-weight:700; }
.nf-table-actions { display:flex; gap:6px; white-space:nowrap; }
.nf-model-options-panel { margin-bottom:18px; padding:16px; border:1px solid var(--nf-border); border-radius:8px; background:linear-gradient(180deg, rgba(11,94,215,.08), rgba(25,135,84,.05)); }
.nf-model-options-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px; }
.nf-model-options-head h4 { margin:0 0 3px; font-size:15px; color:var(--nf-text); }
.nf-model-options-head p { margin:0; font-size:12px; color:var(--nf-text-muted); }
.nf-model-options-grid { display:grid; grid-template-columns:minmax(260px,.75fr) minmax(360px,1.25fr); gap:14px; }
.nf-option-card { border:1px solid var(--nf-border); border-radius:8px; background:var(--nf-surface); padding:12px; }
.nf-option-card-title { display:flex; align-items:center; gap:8px; margin-bottom:10px; font-size:13px; font-weight:800; color:var(--nf-text); text-transform:uppercase; letter-spacing:.03em; }
.nf-option-card-title-row { justify-content:space-between; gap:12px; }
.nf-option-card-title-row span { display:inline-flex; align-items:center; gap:8px; min-width:0; }
.nf-option-card-title-row .nf-btn { text-transform:none; letter-spacing:0; white-space:nowrap; }
.nf-option-card-title i { color:var(--nf-primary); }
.nf-addon-list { display:grid; gap:8px; }
.nf-addon-item { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; border:1px solid var(--nf-border); border-radius:7px; background:var(--nf-bg); }
.nf-addon-item span { font-size:12px; font-weight:700; color:var(--nf-text); }
.nf-addon-item strong { flex:0 0 auto; color:var(--nf-warning); font-size:13px; }
.nf-color-option-cloud { display:flex; flex-wrap:wrap; gap:8px; }
.nf-color-option-cloud > span { display:inline-flex; align-items:center; min-height:28px; padding:5px 9px; border:1px solid rgba(11,94,215,.25); border-radius:999px; background:rgba(11,94,215,.08); color:var(--nf-text); font-size:11px; font-weight:700; white-space:nowrap; }
.nf-color-option-cloud .nf-color-option-chip { gap:7px; padding:4px 5px 4px 9px; }
.nf-color-option-chip.active { border-color:rgba(25,135,84,.35); background:rgba(25,135,84,.12); }
.nf-color-option-chip.inactive { border-color:rgba(148,163,184,.25); background:rgba(148,163,184,.08); color:var(--nf-text-muted); }
.nf-color-option-name { line-height:1; }
.nf-color-option-toggle { border:0; border-radius:999px; padding:4px 8px; background:rgba(11,94,215,.16); color:var(--nf-primary); font:inherit; font-size:10px; font-weight:800; cursor:pointer; }
.nf-color-option-chip.inactive .nf-color-option-toggle { background:rgba(25,135,84,.18); color:var(--nf-secondary); }
.nf-color-option-toggle:hover { filter:brightness(1.12); }
.nf-direct-order-actions { display:flex; align-items:center; gap:8px; min-width:190px; }
.nf-order-action-select { min-width:140px; height:34px; padding-top:4px; padding-bottom:4px; font-size:12px; }
.nf-model-modal { max-width:820px; }
.nf-model-image-preview { min-height:92px; border:1px dashed var(--nf-border); border-radius:var(--nf-radius-sm); background:var(--nf-bg); color:var(--nf-text-muted); display:flex; align-items:center; justify-content:center; padding:10px; overflow:hidden; }
.nf-model-image-preview img { display:block; width:auto; max-width:180px; height:auto; max-height:120px; object-fit:contain; margin:0; border-radius:6px; }
.nf-import-option { display:flex; gap:10px; align-items:flex-start; padding:11px 12px; margin-top:8px; border:1px solid var(--nf-border); border-radius:var(--nf-radius-sm); cursor:pointer; background:var(--nf-surface); }
.nf-import-option input { margin-top:3px; accent-color:var(--nf-primary); }
.nf-import-option span { display:flex; flex-direction:column; gap:2px; }
.nf-import-option small { color:var(--nf-text-muted); }
.nf-import-summary-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; margin-top:12px; }
.nf-import-summary-grid>div { padding:12px 8px; text-align:center; border:1px solid var(--nf-border); border-radius:var(--nf-radius-sm); background:var(--nf-bg); }
.nf-import-summary-grid strong { display:block; color:var(--nf-primary); font-size:20px; }
.nf-import-summary-grid span { display:block; margin-top:3px; color:var(--nf-text-muted); font-size:11px; }

@media (max-width:900px) {
  .nf-model-filter-grid { grid-template-columns:1fr 1fr; }
  .nf-model-master-header { flex-direction:column; }
  .nf-model-master-actions { width:100%; justify-content:flex-start; }
}

@media (max-width:991px) {
  .nf-main { width:100%; max-width:100%; }
}

@media (max-width:700px) {
  .nf-modal-overlay { padding:8px; }
  .nf-qr-preview-modal { width:calc(100vw - 16px); max-height:calc(100vh - 16px); margin:0; }
  .nf-qr-preview-modal .nf-modal-header { padding:14px 16px; }
  .nf-qr-preview-body { padding:8px; }
  .nf-qr-preview-holder { padding:4px; }
  .nf-qr-preview-modal .nf-modal-footer { padding:10px 12px; flex-wrap:wrap; }
  #tvsPrintInstructionsModal > .nf-modal { width:calc(100vw - 16px); max-height:calc(100vh - 16px); margin:0; }
  #tvsPrintInstructionsModal .nf-modal-header { padding:14px 16px; }
  #tvsPrintInstructionsModal .nf-modal-body { padding:14px 16px; }
  #tvsPrintInstructionsModal .nf-modal-footer { padding:10px 12px; }
  #tvsPrintInstructionsModal .nf-modal-footer .nf-btn { flex:1; white-space:nowrap; }
}

@media (max-width:560px) {
  .nf-model-filter-grid { grid-template-columns:1fr; }
  .nf-import-summary-grid { grid-template-columns:repeat(2,1fr); }
  .nf-model-master-actions .nf-btn { flex:1; }
}

/* ---------- Toggle Switch ---------- */
.nf-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.nf-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.nf-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--nf-border);
  border-radius: 24px;
  transition: var(--nf-transition-fast);
}

.nf-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--nf-transition-fast);
}

.nf-toggle input:checked + .nf-toggle-slider { background: var(--nf-secondary); }
.nf-toggle input:checked + .nf-toggle-slider::before { transform: translateX(20px); }

/* ---------- Avatar ---------- */
.nf-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--nf-radius-full);
  background: linear-gradient(135deg, var(--nf-primary), var(--nf-secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

/* ---------- Dropdown ---------- */
.nf-dropdown {
  position: relative;
  display: inline-block;
}

.nf-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--nf-surface);
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-radius-sm);
  box-shadow: var(--nf-shadow-lg);
  min-width: 180px;
  z-index: 1050;
  display: none;
  animation: nfFadeIn 0.15s ease;
}

.nf-dropdown-menu.show { display: block; }

.nf-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--nf-text);
  cursor: pointer;
  transition: var(--nf-transition-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--nf-font);
}

.nf-dropdown-item:hover {
  background: var(--nf-surface-hover);
  color: var(--nf-primary);
}

.nf-dropdown-divider {
  height: 1px;
  background: var(--nf-border);
  margin: 4px 0;
}

/* ---------- Pagination ---------- */
.nf-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  margin-top: 20px;
}

.nf-page-btn {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  background: var(--nf-surface);
  border: 1px solid var(--nf-border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--nf-text);
  transition: var(--nf-transition-fast);
  font-family: var(--nf-font);
}

.nf-page-btn:hover { border-color: var(--nf-primary); color: var(--nf-primary); }
.nf-page-btn.active { background: var(--nf-primary); color: #fff; border-color: var(--nf-primary); }
.nf-page-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===========================================
   PRINT STYLES - A4 QR Sheet
   =========================================== */
@media print {
  body { background: #fff !important; }
  .nf-sidebar, .nf-topbar, .nf-toast-container, .no-print { display: none !important; }
  .nf-main { margin-left: 0 !important; }
  
  .nf-print-sheet {
    width: 210mm;
    min-height: 297mm;
    padding: 10mm;
    margin: 0;
  }
  
  .nf-print-qr-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8mm;
  }
  
  .nf-print-qr-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6mm;
    text-align: center;
    page-break-inside: avoid;
  }
  
  .nf-print-qr-item img,
  .nf-print-qr-item canvas { width: 30mm; height: 30mm; }
  
  .nf-print-qr-item p {
    font-size: 8pt;
    margin: 2mm 0 0;
    color: #333;
  }
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 991px) {
  .nf-sidebar {
    transform: translateX(-100%);
  }
  .nf-sidebar.show {
    transform: translateX(0);
  }
  .nf-main {
    margin-left: 0;
  }
  .nf-hamburger {
    display: block;
  }
  .nf-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1035;
    display: none;
  }
  .nf-sidebar-overlay.show { display: block; }
}

@media (max-width: 768px) {
  .nf-qr-map-layout,
  .nf-qr-map-serial-row {
    grid-template-columns: 1fr;
  }

  .nf-qr-map-verify-cell {
    align-self: stretch;
  }

  .nf-qr-map-verify-cell .nf-btn {
    width: 100%;
  }

  #partnerFormCard,
  #partnerFormCard .nf-card-body {
    max-width: none;
  }

  #partnerFormCard .nf-form-row,
  #partnerFormCard .nf-form-row:has(#dealerCity),
  #partnerFormCard .nf-form-row:has(#dealerLoginUsername) {
    grid-template-columns: 1fr;
  }

  #sectionCompanySale > .nf-card:first-child,
  #companySaleForm,
  #companySaleForm .nf-form-group:has(#companyCustAddress),
  #companySaleForm .nf-form-group:has(#companySaleDate) {
    max-width: none;
  }

  #companySaleForm .nf-form-row,
  #companySaleForm .nf-form-row:has(#companySaleSerial),
  #companySaleForm .nf-form-row:has(#companyCustCity) {
    grid-template-columns: 1fr;
  }

  .nf-management-filters { grid-template-columns: 1fr !important; }
  .nf-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
  }
  .nf-stat-card { padding: 16px; }
  .nf-stat-info .nf-stat-value { font-size: 22px; }
  .nf-content { padding: 16px; }
  .nf-topbar { padding: 0 16px; }
  .nf-hero-content h1 { font-size: 28px; }
  .nf-hero-content p { font-size: 15px; }
  .nf-form-row { grid-template-columns: 1fr; }
  .nf-modal { margin: 16px; }
}

@media (max-width: 480px) {
  .nf-stats-grid { grid-template-columns: 1fr; }
  .nf-hero-content h1 { font-size: 24px; }
  .nf-qr-grid { grid-template-columns: 1fr 1fr; }
}

/* ===========================================
   PARTNER PWA MOBILE APP SHELL
   =========================================== */
.nf-mobile-app-head,
.nf-mobile-hero,
.nf-mobile-dashboard-actions,
.nf-mobile-section-head,
.nf-mobile-activity-list,
.nf-mobile-coin-panel {
  display: none;
}

.nf-exit-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 20, 16, 0.46);
}

.nf-exit-dialog {
  width: min(320px, 100%);
  padding: 20px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 54px rgba(9, 30, 20, 0.28);
}

.nf-exit-dialog h3 {
  margin: 0 0 6px;
  color: #17211c;
  font-size: 20px;
}

.nf-exit-dialog p {
  margin: 0 0 18px;
  color: #68756f;
  font-size: 14px;
}

.nf-exit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

  .nf-partner-app {
    --nf-primary: #0b7a4b;
    --nf-primary-light: #11a36a;
    --nf-primary-dark: #075f3a;
    --nf-bg: #f3f6f4;
    --nf-surface: #ffffff;
    --nf-surface-hover: #f7faf8;
    --nf-border: #e3e9e5;
    --nf-text: #17211c;
    --nf-text-muted: #68756f;
    background: var(--nf-bg);
  }

  .nf-partner-app .nf-app-layout,
  .nf-partner-app .nf-dashboard-layout {
    display: block;
    min-height: 100vh;
    background: var(--nf-bg);
  }

  .nf-partner-app .nf-main {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    padding-bottom: 82px;
  }

  .nf-partner-app .nf-topbar {
    display: block;
    position: relative;
    z-index: 1;
    min-height: 168px;
    height: auto;
    padding: max(18px, env(safe-area-inset-top)) 18px 28px;
    border: 0;
    border-radius: 0 0 30px 30px;
    background: linear-gradient(150deg, #102d25, #0b6b47 72%, #149a68);
    color: #fff;
    box-shadow: 0 14px 30px rgba(11, 122, 75, 0.16);
    transition: max-height 0.25s ease, min-height 0.25s ease, padding 0.25s ease, opacity 0.2s ease, transform 0.25s ease;
  }

  .nf-dealer-app.nf-work-mode .nf-topbar,
  .nf-distributor-app.nf-work-mode .nf-topbar {
    min-height: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    transform: translateY(-100%);
    overflow: hidden;
    pointer-events: none;
  }

  .nf-dealer-app.nf-work-mode .nf-mobile-app-head,
  .nf-dealer-app.nf-work-mode .nf-mobile-hero,
  .nf-distributor-app.nf-work-mode .nf-mobile-app-head,
  .nf-distributor-app.nf-work-mode .nf-mobile-hero {
    display: none;
  }

  .nf-partner-app .nf-topbar-title {
    display: none;
    color: #fff;
    font-size: 28px;
    line-height: 1.15;
  }

  .nf-partner-app .nf-topbar-left {
    display: none;
  }

  .nf-partner-app .nf-topbar-right,
  .nf-partner-app .nf-topbar-actions {
    display: none;
  }

  .nf-mobile-app-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }

  .nf-mobile-logout {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    cursor: pointer;
  }

  .nf-mobile-logout:active {
    transform: scale(0.96);
  }

  .nf-mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .nf-mobile-brand img {
    width: 50px;
    height: 50px;
    object-fit: contain;
  }

  .nf-mobile-brand small {
    display: block;
    color: #c7ddd4;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .nf-mobile-brand strong {
    display: block;
    color: #fff;
    font-size: 15px;
    line-height: 1.15;
  }

  .nf-mobile-bell {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 18px;
  }

  .nf-mobile-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-top: 24px;
  }

  .nf-mobile-hero p {
    margin: 0 0 6px;
    color: #c7ddd4;
    font-size: 12px;
  }

  .nf-mobile-hero h1 {
    margin: 0;
    color: #fff;
    font-size: 30px;
    line-height: 1.08;
  }

  .nf-mobile-user {
    display: none;
    align-items: center;
    gap: 10px;
    min-width: 132px;
    max-width: 48%;
  }

  .nf-mobile-avatar {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.17);
    color: #fff;
    font-size: 20px;
    font-weight: 800;
  }

  .nf-mobile-user strong,
  .nf-mobile-user span {
    display: block;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nf-mobile-user strong {
    font-size: 13px;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .nf-mobile-user span {
    margin-top: 3px;
    color: #c7ddd4;
    font-size: 11px;
  }

  .nf-partner-app .nf-topbar .nf-text-muted,
  .nf-partner-app .nf-topbar [style*="--nf-text-muted"] {
    color: rgba(255, 255, 255, 0.72) !important;
  }

  .nf-partner-app .nf-hamburger {
    display: none;
  }

  .nf-partner-app .nf-topbar .nf-btn-icon {
    width: 40px;
    height: 40px;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }

  .nf-partner-app .nf-avatar {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
  }

  .nf-partner-app .nf-content {
    position: relative;
    z-index: 2;
    padding: max(16px, env(safe-area-inset-top)) 18px 100px;
    transform: none;
    transition: padding 0.2s ease;
  }

  .nf-dealer-app.nf-work-mode .nf-content,
  .nf-distributor-app.nf-work-mode .nf-content {
    padding-top: 14px;
  }

  .nf-partner-app .nf-section.active > .nf-stats-grid:first-child {
    margin-top: 0;
  }

  .nf-dealer-app #sectionDealerDash,
  .nf-distributor-app #distDashboard {
    display: flex;
    flex-direction: column;
  }

  .nf-dealer-app #sectionDealerDash:not(.active),
  .nf-distributor-app #distDashboard:not(.active) {
    display: none !important;
  }

  .nf-mobile-dashboard-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
    position: relative;
    z-index: 3;
  }

  .nf-mobile-scan-card,
  .nf-mobile-serial-card,
  .nf-mobile-offer-card {
    min-width: 0;
    min-height: 88px;
    border-radius: 18px;
    padding: 12px 10px;
    text-align: left;
    border: 1px solid var(--nf-border);
    box-shadow: 0 16px 38px rgba(22, 39, 30, 0.12);
    cursor: pointer;
    touch-action: manipulation;
  }

  .nf-mobile-scan-card {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #0b7a4b, #11a36a);
  }

  .nf-mobile-serial-card,
  .nf-mobile-offer-card {
    color: #17211c;
    background: #fff;
  }

  .nf-mobile-offer-card {
    border-color: #f1d78a;
    background: linear-gradient(135deg, #fff8df, #ffffff);
  }

  .nf-mobile-scan-card i,
  .nf-mobile-serial-card i,
  .nf-mobile-offer-card i {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 9px;
    border-radius: 12px;
    font-size: 19px;
  }

  .nf-mobile-scan-card i {
    background: rgba(255, 255, 255, 0.18);
  }

  .nf-mobile-serial-card i,
  .nf-mobile-offer-card i {
    color: #0b7a4b;
    background: #eaf7f0;
  }

  .nf-mobile-offer-card i {
    color: #b77900;
    background: #fff1bf;
  }

  .nf-mobile-scan-card strong,
  .nf-mobile-serial-card strong,
  .nf-mobile-offer-card strong {
    display: block;
    font-size: 15px;
    line-height: 1.15;
  }

  .nf-mobile-scan-card span,
  .nf-mobile-serial-card span,
  .nf-mobile-offer-card span {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    opacity: 0.8;
  }

  .nf-mobile-offer-panel {
    display: grid;
    gap: 10px;
    margin: -2px 0 14px;
  }

  .nf-mobile-offer-item {
    padding: 12px 14px;
    border: 1px solid #f1d78a;
    border-radius: 16px;
    background: linear-gradient(135deg, #fffaf0, #ffffff);
    box-shadow: 0 10px 24px rgba(113, 79, 8, 0.1);
  }

  .nf-mobile-offer-item strong {
    display: block;
    color: #7a4f00;
    font-size: 14px;
  }

  .nf-mobile-offer-item p {
    margin: 5px 0 0;
    color: #17211c;
    font-size: 12px;
    line-height: 1.35;
  }

  .nf-mobile-offer-image {
    display: block;
    width: 100%;
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid #efd487;
    object-fit: contain;
    background: #fff8df;
  }

  .nf-mobile-offer-item small {
    display: block;
    margin-top: 7px;
    color: #7b6a3a;
    font-size: 11px;
  }

  .nf-mobile-coin-panel {
    display: block;
    width: 100%;
    padding: 14px;
    margin: 0 0 18px;
    border: 1px solid #cfe7d9;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff, #eef9f2);
    box-shadow: 0 12px 28px rgba(22, 39, 30, 0.1);
    color: #17211c;
    cursor: pointer;
  }

  .nf-mobile-coin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
  }

  .nf-mobile-coin-head span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0b7a4b;
    font-size: 14px;
    font-weight: 900;
  }

  .nf-mobile-coin-head button {
    border: 0;
    border-radius: 999px;
    padding: 7px 12px;
    background: #0b7a4b;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
  }

  .nf-mobile-coin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .nf-mobile-coin-grid div {
    min-width: 0;
    min-height: 72px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid #dfece4;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .nf-mobile-coin-grid small {
    display: block;
    min-height: 0;
    color: #68756f;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.12;
    text-transform: uppercase;
    overflow-wrap: anywhere;
  }

  .nf-mobile-coin-grid strong {
    display: block;
    margin-top: 7px;
    color: #0b7a4b;
    font-size: 24px;
    line-height: 1;
  }

  .nf-mobile-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 2px 12px;
  }

  .nf-mobile-section-head h2 {
    margin: 0;
    font-size: 16px;
    color: #0f1f18;
  }

  .nf-mobile-section-head span,
  .nf-mobile-section-head button {
    border: 0;
    background: transparent;
    color: #0b7a4b;
    font-size: 11px;
    font-weight: 900;
  }

  .nf-partner-app .nf-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
  }

  .nf-partner-app .nf-stat-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    min-width: 0;
    min-height: 118px;
    align-items: flex-start;
    padding: 14px 13px;
    border-radius: 18px;
    border: 1px solid var(--nf-border);
    background: #fff;
    box-shadow: 0 8px 22px rgba(22, 39, 30, 0.08);
  }

  .nf-partner-app .nf-stat-card::before {
    height: 4px;
  }

  .nf-partner-app .nf-stat-card:hover,
  .nf-partner-app .nf-card:hover {
    transform: none;
    box-shadow: var(--nf-shadow);
  }

  .nf-partner-app .nf-stat-info h4 {
    max-width: 100%;
    min-height: 28px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.25;
    color: #68756f;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 5px;
  }

  .nf-partner-app .nf-stat-info .nf-stat-value,
  .nf-partner-app .nf-stat-value {
    color: #17211c;
    font-size: 28px;
    line-height: 1.05;
  }

  .nf-partner-app .nf-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 16px;
  }

  .nf-dealer-app #sectionDealerDash .nf-stats-grid,
  .nf-distributor-app #distDashboard .nf-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nf-dealer-app #sectionDealerDash .nf-stat-card,
  .nf-distributor-app #distDashboard .nf-stat-card {
    min-height: 84px;
    padding: 9px;
    gap: 5px;
    border-radius: 14px;
  }

  .nf-dealer-app #sectionDealerDash .nf-stat-info h4,
  .nf-distributor-app #distDashboard .nf-stat-info h4 {
    min-height: 22px;
    font-size: 8.5px;
  }

  .nf-dealer-app #sectionDealerDash .nf-stat-info .nf-stat-value,
  .nf-distributor-app #distDashboard .nf-stat-info .nf-stat-value {
    font-size: 21px;
  }

  .nf-dealer-app #sectionDealerDash .nf-stat-icon,
  .nf-distributor-app #distDashboard .nf-stat-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    font-size: 13px;
  }

  .nf-mobile-activity-list {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
  }

  .nf-mobile-activity-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--nf-border);
    border-radius: 16px;
    background: #fff;
    text-align: left;
  }

  .nf-mobile-activity-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #0b7a4b;
    background: #edf8f2;
    font-size: 18px;
  }

  .nf-mobile-activity-main {
    flex: 1;
    min-width: 0;
  }

  .nf-mobile-activity-main strong {
    display: block;
    color: #0f1f18;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nf-mobile-activity-main small {
    display: block;
    margin-top: 2px;
    color: #68756f;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nf-mobile-activity-status {
    color: #0b7a4b;
    font-size: 12px;
    font-weight: 900;
    text-align: right;
  }

  .nf-mobile-activity-status small {
    display: block;
    margin-top: 2px;
    color: #68756f;
    font-size: 8px;
    text-transform: uppercase;
  }

  .nf-partner-app .nf-card {
    border-radius: 18px;
    border: 1px solid var(--nf-border);
    background: #fff;
    box-shadow: 0 8px 22px rgba(22, 39, 30, 0.08);
    margin-bottom: 14px;
  }

  .nf-partner-app .nf-card-header {
    padding: 14px;
  }

  .nf-partner-app .nf-card-header h3 {
    font-size: 15px;
  }

  .nf-partner-app .nf-card-body {
    padding: 14px;
  }

  .nf-partner-app .nf-card-body[style*="display:flex"] {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  .nf-dealer-app #sectionDealerDash > .nf-desktop-quick-actions,
  .nf-distributor-app #distDashboard > .nf-card:first-of-type {
    display: none;
  }

  .nf-dealer-app #sectionDealerDash > .nf-card:first-of-type .nf-card-header,
  .nf-distributor-app #distDashboard > .nf-card:first-of-type .nf-card-header {
    display: none;
  }

  .nf-dealer-app #sectionDealerDash > .nf-card:first-of-type .nf-card-body,
  .nf-distributor-app #distDashboard > .nf-card:first-of-type .nf-card-body {
    display: grid !important;
    grid-template-columns: 1.35fr 1fr;
    gap: 12px;
    padding: 0;
  }

  .nf-dealer-app #sectionDealerDash > .nf-card:first-of-type .nf-btn,
  .nf-distributor-app #distDashboard > .nf-card:first-of-type .nf-btn {
    min-height: 96px;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    text-align: left;
    white-space: normal;
  }

  .nf-dealer-app #sectionDealerDash > .nf-card:first-of-type .nf-btn:first-child,
  .nf-distributor-app #distDashboard > .nf-card:first-of-type .nf-btn:first-child {
    grid-row: span 2;
    color: #fff;
    box-shadow: 0 14px 30px rgba(11, 122, 75, 0.22);
  }

  .nf-dealer-app #sectionDealerDash > .nf-card:first-of-type .nf-btn i,
  .nf-distributor-app #distDashboard > .nf-card:first-of-type .nf-btn i {
    margin-right: 0;
    font-size: 22px;
  }

  .nf-partner-app .nf-btn-lg,
  .nf-partner-app .nf-btn {
    min-height: 44px;
    border-radius: 12px;
  }

  .nf-partner-app .nf-btn-primary,
  .nf-partner-app .nf-btn-success {
    background: linear-gradient(135deg, #0b7a4b, #11a36a);
    border-color: transparent;
  }

  .nf-partner-app .nf-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .nf-partner-app .nf-form-control {
    min-height: 44px;
    border-radius: 12px;
  }

  .nf-partner-app .nf-table-wrapper {
    border-radius: 14px;
  }

  .nf-partner-app .nf-sidebar {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    width: 100%;
    height: auto;
    transform: none;
    overflow: visible;
    border-top: 1px solid var(--nf-border);
    border-right: 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -10px 26px rgba(21, 34, 28, 0.08);
  }

  .nf-partner-app .nf-sidebar-brand,
  .nf-partner-app .nf-sidebar-footer,
  .nf-partner-app .nf-sidebar-nav-label,
  .nf-partner-app .nf-sidebar-overlay {
    display: none !important;
  }

  .nf-partner-app .nf-sidebar-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 8px 8px max(8px, env(safe-area-inset-bottom));
    margin: 0;
  }

  .nf-partner-app .nf-sidebar-nav ul {
    display: contents;
  }

  .nf-partner-app .nf-sidebar-nav-item,
  .nf-partner-app .nf-sidebar-nav li {
    margin: 0;
    min-width: 0;
    list-style: none;
  }

  .nf-partner-app .nf-sidebar-nav-link {
    width: 100%;
    min-height: 55px;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    padding: 8px 4px;
    border-radius: 14px;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
    color: #7d8a84;
  }

  .nf-partner-app .nf-sidebar-nav-link i {
    width: auto;
    margin: 0;
    font-size: 19px;
  }

  .nf-partner-app .nf-sidebar-nav-link.active {
    background: #eaf8f0;
    color: #0b7a4b;
  }

  .nf-partner-app .nf-sidebar-nav li:nth-of-type(n+7) {
    display: none;
  }

  .nf-distributor-app .nf-sidebar-nav li:nth-of-type(n+6) {
    display: none;
  }

  .nf-partner-app .nf-modal {
    max-height: calc(100vh - 24px);
    border-radius: 20px;
  }
}

/* Offer / Scheme image manager */
.nf-offer-image-preview, .nf-offer-table-thumb { margin-top: 10px; }
.nf-offer-image-preview img { display: block; width: 100%; max-height: 360px; object-fit: contain; border: 1px solid var(--nf-border); border-radius: 8px; background: rgba(255,255,255,0.06); }
.nf-offer-table-thumb img { display: block; width: 120px; max-height: 90px; object-fit: contain; border: 1px solid var(--nf-border); border-radius: 6px; background: rgba(255,255,255,0.06); }


/* Admin login/loading screen */
.nf-admin-loading {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 28% 18%, rgba(0, 205, 214, 0.22), transparent 32%),
    radial-gradient(circle at 74% 16%, rgba(11, 94, 215, 0.2), transparent 34%),
    linear-gradient(135deg, #07111f 0%, #071827 48%, #05261e 100%);
  transition: opacity .28s ease, visibility .28s ease;
}

.nf-admin-loading.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.nf-admin-loading-card {
  width: min(360px, calc(100vw - 40px));
  padding: 30px 28px;
  text-align: center;
  border: 1px solid rgba(0, 205, 214, .26);
  border-radius: 18px;
  background: rgba(8, 20, 36, .78);
  box-shadow: 0 28px 90px rgba(0,0,0,.42), 0 0 34px rgba(0,205,214,.16);
  backdrop-filter: blur(18px);
}

.nf-admin-loading-card img {
  width: 118px;
  height: auto;
  margin: 0 auto 14px;
  display: block;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,.35));
}

.nf-admin-loading-card strong,
.nf-admin-loading-card span {
  display: block;
}

.nf-admin-loading-card strong {
  color: #fff;
  font-size: 24px;
  line-height: 1.1;
}

.nf-admin-loading-card span {
  margin-top: 8px;
  color: #b7c8e8;
  font-size: 14px;
}

.nf-admin-loading-bar {
  height: 5px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
}

.nf-admin-loading-bar i {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0b6bff, #22e0df, #20d47a);
  animation: nf-admin-loading-slide 1.15s ease-in-out infinite;
}

@keyframes nf-admin-loading-slide {
  0% { transform: translateX(-115%); }
  100% { transform: translateX(245%); }
}

/* Instant action feedback for admin buttons */
.nf-admin-app button,
.nf-admin-app .nf-btn {
  position: relative;
}

.nf-admin-app button.nf-action-pending,
.nf-admin-app .nf-btn.nf-action-pending {
  box-shadow: 0 0 0 1px rgba(34, 224, 223, .35), 0 0 22px rgba(34, 224, 223, .18);
  filter: brightness(1.08);
}

.nf-admin-app button.nf-action-pending::after,
.nf-admin-app .nf-btn.nf-action-pending::after {
  content: "...";
  position: absolute;
  top: 50%;
  right: 10px;
  min-width: 18px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-align: left;
  transform: translateY(-58%);
  animation: nf-action-dots .9s steps(3, end) infinite;
  pointer-events: none;
}

@keyframes nf-action-dots {
  0% { content: "."; }
  34% { content: ".."; }
  67%, 100% { content: "..."; }
}


/* Maintenance notice */
.nf-maintenance-admin-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.nf-maintenance-admin-preview > div {
  padding: 14px;
  border: 1px solid var(--nf-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.nf-maintenance-admin-preview > div.wide {
  grid-column: 1 / -1;
}

.nf-maintenance-admin-preview span {
  display: block;
  margin-bottom: 6px;
  color: var(--nf-text-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nf-maintenance-admin-preview strong {
  color: var(--nf-text);
  font-size: 15px;
}

.nf-partner-app .nf-mobile-hero {
  position: relative;
}

.nf-maintenance-notice-host:empty {
  display: none;
}

.nf-maintenance-notice-host {
  width: 100%;
  margin: 0 0 14px;
}

.nf-maintenance-notice-wrap {
  display: none;
  pointer-events: auto;
}

.nf-maintenance-notice-wrap.show {
  display: block;
}

.nf-maintenance-notice-wrap {
  position: relative;
  z-index: 5;
  width: 100%;
}

.nf-maintenance-notice-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid rgba(227, 170, 22, 0.78);
  border-radius: 14px;
  color: #1f2519;
  background: linear-gradient(135deg, rgba(255, 250, 222, 0.96), rgba(255, 255, 255, 0.96) 62%, rgba(236, 255, 241, 0.96));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.11), 0 0 14px rgba(247, 201, 72, 0.16);
}

.nf-maintenance-notice-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: #8a5b00;
  background: #fff0b9;
  font-size: 18px;
}

.nf-maintenance-notice-content {
  min-width: 0;
}

.nf-maintenance-notice-content strong {
  display: block;
  color: #755000;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 900;
  white-space: normal;
  overflow-wrap: anywhere;
}

.nf-maintenance-notice-content p {
  display: block;
  margin: 5px 0 8px;
  color: #29352c;
  font-size: 13px;
  line-height: 1.38;
  font-weight: 700;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.nf-maintenance-notice-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid rgba(138, 91, 0, 0.2);
  border-radius: 999px;
  color: #5e4300;
  background: rgba(255, 245, 198, 0.78);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 900;
}

.nf-maintenance-notice-time span {
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (min-width: 820px) {
  .nf-maintenance-notice-host {
    max-width: 920px;
  }
}

@media (max-width: 640px) {
  .nf-maintenance-admin-preview { grid-template-columns: 1fr; }
  .nf-maintenance-notice-host { margin-bottom: 12px; }
  .nf-maintenance-notice-card { border-radius: 12px; padding: 10px 11px; }
  .nf-maintenance-notice-content strong { font-size: 13px; }
  .nf-maintenance-notice-content p { font-size: 12px; }
}
/* Admin style and section repair - 20260711 */
.nf-admin-app,
.nf-admin-app :where(button, input, select, textarea, table, th, td, h1, h2, h3, h4, h5, h6, p, span, div, label, strong, small, code, a) {
  font-family: Arial, Helvetica, 'Segoe UI', sans-serif !important;
  letter-spacing: 0 !important;
}

.nf-admin-app .bi,
.nf-admin-app .bi::before,
.nf-admin-app .bi::after {
  font-family: "bootstrap-icons" !important;
}

.nf-admin-app {
  background: #06101c !important;
  color: #f8fbff !important;
}

.nf-admin-app .nf-app-layout,
.nf-admin-app .nf-main {
  min-height: 100vh;
  background: linear-gradient(135deg, #07111f 0%, #06202a 46%, #06101c 100%) !important;
}

.nf-admin-app .nf-sidebar,
.nf-admin-app .nf-topbar {
  background: rgba(8, 18, 32, 0.96) !important;
  border-color: rgba(90, 113, 158, 0.22) !important;
  box-shadow: none !important;
}

.nf-admin-app .nf-content {
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 213, 219, 0.16), transparent 26%),
    radial-gradient(circle at 90% 3%, rgba(11, 94, 215, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(0, 190, 198, 0.08), transparent 230px) !important;
}

.nf-admin-app .nf-section {
  display: none !important;
}

.nf-admin-app .nf-section.active {
  display: block !important;
  min-width: 0 !important;
}

.nf-admin-app .nf-card,
.nf-admin-app .nf-stat-card {
  color: #f8fbff !important;
  background: linear-gradient(145deg, rgba(11, 42, 58, 0.82), rgba(12, 22, 42, 0.95)) !important;
  border: 1px solid rgba(0, 213, 219, 0.34) !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24) !important;
}

.nf-admin-app #dashboardStats {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(112px, 1fr)) !important;
  gap: 10px !important;
  align-items: stretch !important;
}

.nf-admin-app #dashboardStats .nf-stat-card {
  min-height: 78px !important;
  padding: 12px 11px !important;
  align-items: center !important;
  gap: 9px !important;
}

.nf-admin-app .nf-stat-info h4,
.nf-admin-app .nf-card-header h3,
.nf-admin-app .nf-form-label,
.nf-admin-app .nf-table th {
  color: #b8c8ea !important;
}

.nf-admin-app .nf-stat-info .nf-stat-value,
.nf-admin-app .nf-table td,
.nf-admin-app .nf-topbar-title,
.nf-admin-app .nf-card-header h3 strong {
  color: #ffffff !important;
}

.nf-admin-app .nf-sidebar-brand-text span {
  color: #0b7cff !important;
  font-weight: 800 !important;
}

.nf-admin-app .nf-sidebar-nav-link,
.nf-admin-app .nf-sidebar-subitem {
  color: #b8c8ea !important;
  border-radius: 8px !important;
}

.nf-admin-app .nf-sidebar-nav-link.active,
.nf-admin-app .nf-sidebar-subitem.active {
  color: #35f1ff !important;
  background: linear-gradient(135deg, rgba(0, 213, 219, 0.18), rgba(11, 94, 215, 0.2)) !important;
  box-shadow: inset 3px 0 0 #22e0df !important;
}

.nf-admin-app .nf-form-control,
.nf-admin-app input,
.nf-admin-app select,
.nf-admin-app textarea {
  color: #ffffff !important;
  background: #171c2f !important;
  border-color: rgba(116, 135, 185, 0.38) !important;
}

.nf-admin-app .nf-table-wrapper {
  border-color: rgba(0, 213, 219, 0.28) !important;
  border-radius: 10px !important;
}

.nf-admin-app .nf-table thead {
  background: rgba(7, 67, 82, 0.72) !important;
}

.nf-admin-app .nf-table tbody tr {
  background: transparent !important;
}

.nf-admin-app .nf-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.018) !important;
}

.nf-admin-app .nf-table tbody tr:hover {
  background: rgba(0, 213, 219, 0.11) !important;
}

.nf-admin-app .nf-badge-sold,
.nf-admin-app .nf-status-sold {
  color: #10b981 !important;
}

@media (max-width: 1500px) {
  .nf-admin-app #dashboardStats {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
  }
}
/* Global font, encoding display, and overflow repair - 20260711 */
html,
body,
body :where(button, input, select, textarea, table, th, td, h1, h2, h3, h4, h5, h6, p, span, div, label, strong, small, code, a, li) {
  font-family: Arial, Helvetica, "Segoe UI", sans-serif !important;
  letter-spacing: 0 !important;
}

.bi,
.bi::before,
.bi::after,
body .bi,
body .bi::before,
body .bi::after {
  font-family: "bootstrap-icons" !important;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
}

.nf-hero,
.nf-login-page,
.nf-saas-login-shell,
.nf-admin-app,
.nf-admin-app .nf-app-layout,
.nf-admin-app .nf-main,
.nf-admin-app .nf-content,
.nf-admin-app .nf-section {
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

.nf-admin-app .nf-main {
  margin-left: var(--nf-sidebar-width) !important;
  width: calc(100vw - var(--nf-sidebar-width)) !important;
  max-width: calc(100vw - var(--nf-sidebar-width)) !important;
  min-width: 0 !important;
}

.nf-admin-app .nf-content,
.nf-admin-app .nf-section,
.nf-admin-app .nf-card,
.nf-admin-app .nf-card-body,
.nf-admin-app .nf-form-row,
.nf-admin-app .nf-form-group,
.nf-admin-app .nf-form-control,
.nf-admin-app .nf-qr-generator-grid,
.nf-admin-app .nf-model-options-grid,
.nf-admin-app .nf-model-filter-grid,
.nf-admin-app .nf-management-filters {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.nf-admin-app .nf-card {
  width: 100% !important;
}

.nf-admin-app .nf-card-body {
  overflow-x: hidden !important;
}

.nf-admin-app .nf-table-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
}

.nf-admin-app .nf-section.active {
  display: block !important;
}

@media (max-width: 991px) {
  .nf-admin-app .nf-main {
    margin-left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
  }
}



/* Layout hardening repair - 20260711-layoutclean4 */
html, body {
  min-width: 0 !important;
  overflow-x: hidden !important;
}

body,
body :where(button, input, select, textarea, table, th, td, h1, h2, h3, h4, h5, h6, p, span, div, label, strong, small, code, a, li) {
  font-family: Arial, Helvetica, "Segoe UI", sans-serif !important;
}

.nf-admin-app .nf-app-layout {
  width: 100vw !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

.nf-admin-app .nf-sidebar {
  width: var(--nf-sidebar-width) !important;
  max-width: var(--nf-sidebar-width) !important;
}

.nf-admin-app .nf-main {
  flex: 0 0 calc(100vw - var(--nf-sidebar-width)) !important;
  width: calc(100vw - var(--nf-sidebar-width)) !important;
  max-width: calc(100vw - var(--nf-sidebar-width)) !important;
  margin-left: var(--nf-sidebar-width) !important;
  overflow-x: hidden !important;
}

.nf-admin-app .nf-content {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  padding-left: 28px !important;
  padding-right: 28px !important;
}

.nf-admin-app .nf-section,
.nf-admin-app .nf-card,
.nf-admin-app .nf-card-body,
.nf-admin-app form,
.nf-admin-app .nf-form-row,
.nf-admin-app .nf-form-group,
.nf-admin-app .nf-management-grid,
.nf-admin-app .nf-management-filters,
.nf-admin-app .nf-model-options-grid,
.nf-admin-app .nf-model-filter-grid,
.nf-admin-app .nf-qr-generator-grid,
.nf-admin-app .nf-qr-map-layout,
.nf-admin-app .nf-qr-map-assignee-wrap,
.nf-admin-app #dashboardStats {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.nf-admin-app .nf-form-row,
.nf-admin-app .nf-management-grid,
.nf-admin-app .nf-model-options-grid,
.nf-admin-app .nf-model-filter-grid,
.nf-admin-app .nf-qr-generator-grid,
.nf-admin-app .nf-qr-map-layout {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
}

.nf-admin-app .nf-form-control,
.nf-admin-app input,
.nf-admin-app select,
.nf-admin-app textarea {
  width: 100% !important;
  max-width: 100% !important;
}

.nf-admin-app .nf-table-wrapper {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

.nf-admin-app .nf-table {
  width: 100% !important;
}

.nf-admin-app .nf-topbar-right,
.nf-admin-app .nf-user-menu {
  min-width: 0 !important;
}

@media (max-width: 1500px) {
  .nf-admin-app #dashboardStats {
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)) !important;
  }
}

@media (max-width: 991px) {
  .nf-admin-app .nf-main {
    flex-basis: 100vw !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
  }

  .nf-admin-app .nf-content {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* Admin light/dark toggle repair - 20260711-themefix1 */
html:not([data-theme="dark"]) .nf-admin-app {
  --nf-bg: #f4f7fb;
  --nf-surface: #ffffff;
  --nf-surface-hover: #eef4fb;
  --nf-border: #d9e2ef;
  --nf-text: #172033;
  --nf-text-muted: #52627a;
  --nf-text-light: #7c8aa3;
  background: #f4f7fb !important;
  color: #172033 !important;
}

html:not([data-theme="dark"]) .nf-admin-app .nf-app-layout,
html:not([data-theme="dark"]) .nf-admin-app .nf-main {
  background: linear-gradient(135deg, #f8fbff 0%, #edf6f8 48%, #f5f8fd 100%) !important;
}

html:not([data-theme="dark"]) .nf-admin-app .nf-sidebar,
html:not([data-theme="dark"]) .nf-admin-app .nf-topbar {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: #dce5f1 !important;
  box-shadow: 0 12px 28px rgba(16, 36, 70, 0.08) !important;
}

html:not([data-theme="dark"]) .nf-admin-app .nf-content {
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 188, 198, 0.10), transparent 26%),
    radial-gradient(circle at 90% 3%, rgba(11, 94, 215, 0.07), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), transparent 230px) !important;
}

html:not([data-theme="dark"]) .nf-admin-app .nf-card,
html:not([data-theme="dark"]) .nf-admin-app .nf-stat-card {
  color: #172033 !important;
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid #dce5f1 !important;
  box-shadow: 0 12px 28px rgba(16, 36, 70, 0.09) !important;
}

html:not([data-theme="dark"]) .nf-admin-app .nf-stat-info h4,
html:not([data-theme="dark"]) .nf-admin-app .nf-card-header h3,
html:not([data-theme="dark"]) .nf-admin-app .nf-form-label,
html:not([data-theme="dark"]) .nf-admin-app .nf-table th {
  color: #52627a !important;
}

html:not([data-theme="dark"]) .nf-admin-app .nf-stat-info .nf-stat-value,
html:not([data-theme="dark"]) .nf-admin-app .nf-table td,
html:not([data-theme="dark"]) .nf-admin-app .nf-topbar-title,
html:not([data-theme="dark"]) .nf-admin-app .nf-card-header h3 strong {
  color: #172033 !important;
}

html:not([data-theme="dark"]) .nf-admin-app .nf-sidebar-brand-text span {
  color: #0b5ed7 !important;
}

html:not([data-theme="dark"]) .nf-admin-app .nf-sidebar-nav-link,
html:not([data-theme="dark"]) .nf-admin-app .nf-sidebar-subitem {
  color: #52627a !important;
}

html:not([data-theme="dark"]) .nf-admin-app .nf-sidebar-nav-link:hover,
html:not([data-theme="dark"]) .nf-admin-app .nf-sidebar-subitem:hover,
html:not([data-theme="dark"]) .nf-admin-app .nf-sidebar-nav-link.active,
html:not([data-theme="dark"]) .nf-admin-app .nf-sidebar-subitem.active {
  color: #0b5ed7 !important;
  background: linear-gradient(135deg, rgba(11, 94, 215, 0.10), rgba(0, 188, 198, 0.08)) !important;
  box-shadow: inset 3px 0 0 #0b5ed7 !important;
}

html:not([data-theme="dark"]) .nf-admin-app .nf-form-control,
html:not([data-theme="dark"]) .nf-admin-app input,
html:not([data-theme="dark"]) .nf-admin-app select,
html:not([data-theme="dark"]) .nf-admin-app textarea {
  color: #172033 !important;
  background: #ffffff !important;
  border-color: #cfd9e8 !important;
}

html:not([data-theme="dark"]) .nf-admin-app .nf-form-control::placeholder,
html:not([data-theme="dark"]) .nf-admin-app input::placeholder,
html:not([data-theme="dark"]) .nf-admin-app textarea::placeholder {
  color: #7c8aa3 !important;
}

html:not([data-theme="dark"]) .nf-admin-app .nf-table-wrapper {
  border-color: #dce5f1 !important;
}

html:not([data-theme="dark"]) .nf-admin-app .nf-table thead {
  background: #eef6fb !important;
}

html:not([data-theme="dark"]) .nf-admin-app .nf-table tbody tr {
  background: rgba(255, 255, 255, 0.72) !important;
}

html:not([data-theme="dark"]) .nf-admin-app .nf-table tbody tr:nth-child(even) {
  background: rgba(239, 246, 252, 0.72) !important;
}

html:not([data-theme="dark"]) .nf-admin-app .nf-table tbody tr:hover {
  background: rgba(0, 188, 198, 0.10) !important;
}

html:not([data-theme="dark"]) .nf-admin-app .nf-btn-outline {
  color: #172033 !important;
  background: #ffffff !important;
  border-color: #cfd9e8 !important;
}

html:not([data-theme="dark"]) .nf-admin-app .nf-text-muted,
html:not([data-theme="dark"]) .nf-admin-app small {
  color: #52627a !important;
}


/* Employee native SaaS module - 20260713 */
.nf-admin-app #sectionEmployees > .nf-card{max-width:1180px!important;margin-left:auto!important;margin-right:auto!important}
.nf-employee-tabs{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.nf-employee-tab{border:1px solid rgba(0,212,255,.28);background:rgba(7,18,36,.72);color:var(--nf-text-muted);border-radius:8px;padding:9px 12px;font-weight:800;display:inline-flex;align-items:center;gap:8px;cursor:pointer;transition:.18s ease;min-height:40px}
.nf-employee-tab:hover{color:var(--nf-text);border-color:rgba(0,212,255,.55);box-shadow:0 10px 24px rgba(0,212,255,.12);transform:translateY(-1px)}
.nf-employee-tab.active{background:linear-gradient(135deg,rgba(0,212,255,.18),rgba(0,119,255,.16));color:var(--nf-primary);border-color:rgba(0,212,255,.75);box-shadow:0 12px 30px rgba(0,212,255,.16)}
.nf-employee-panel{display:none}.nf-employee-panel.active{display:block}
.nf-employee-stats{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:10px;margin-bottom:16px;max-width:920px}
.nf-employee-stat{border:1px solid rgba(0,212,255,.28);background:linear-gradient(145deg,rgba(0,212,255,.10),rgba(3,13,28,.76));border-radius:10px;padding:12px 13px;min-height:78px;box-shadow:0 16px 36px rgba(0,0,0,.16)}
.nf-employee-stat span{display:block;color:var(--nf-text-muted);font-weight:800;font-size:12px;letter-spacing:.02em;text-transform:uppercase;margin-bottom:8px}.nf-employee-stat strong{display:block;color:var(--nf-text);font-size:30px;line-height:1}.nf-employee-stat.active{border-color:rgba(16,185,129,.38)}.nf-employee-stat.hold{border-color:rgba(245,158,11,.42)}.nf-employee-stat.resigned{border-color:rgba(239,68,68,.38)}
.nf-employee-panel[data-employee-panel="form"]{max-width:900px}
.nf-employee-panel[data-employee-panel="form"] .nf-form-row{grid-template-columns:repeat(2,minmax(220px,1fr))!important;gap:14px 18px}
.nf-employee-panel[data-employee-panel="form"] .nf-form-row:has(#employeeAadhar){grid-template-columns:repeat(3,minmax(160px,1fr))!important}
.nf-employee-panel[data-employee-panel="form"] .nf-form-row:has(#employeeStatus){grid-template-columns:230px minmax(260px,1fr)!important}
.nf-employee-panel[data-employee-panel="form"] .nf-form-group{margin-bottom:14px}
.nf-employee-form-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px;padding:12px 14px;border:1px solid rgba(0,212,255,.20);border-radius:10px;background:rgba(0,212,255,.06)}
.nf-employee-form-head h4{margin:0 0 4px;color:var(--nf-text);font-size:18px}.nf-employee-form-head p{margin:0;color:var(--nf-text-muted);font-size:13px}
.nf-employee-history-toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}.nf-employee-history-list{display:grid;gap:10px}.nf-employee-history-card{border:1px solid rgba(0,212,255,.22);border-radius:10px;background:rgba(7,18,36,.70);overflow:hidden}.nf-employee-history-head{width:100%;border:0;background:transparent;color:var(--nf-text);display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 14px;cursor:pointer;text-align:left}.nf-employee-history-body{display:none;border-top:1px solid rgba(0,212,255,.14);padding:12px 16px}.nf-employee-history-card.open .nf-employee-history-body{display:block}.nf-employee-history-card.open .bi-chevron-down{transform:rotate(180deg)}
.nf-employee-avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:rgba(0,212,255,.12);border:1px solid rgba(0,212,255,.30);color:var(--nf-primary);font-weight:900;flex:0 0 auto}.nf-employee-person{display:flex;align-items:center;gap:10px}.nf-employee-person strong{display:block;color:var(--nf-text)}.nf-employee-person small{display:block;color:var(--nf-text-muted);margin-top:2px}
.nf-employee-timeline{display:grid;gap:10px}.nf-employee-event{display:flex;gap:10px;color:var(--nf-text-muted);font-size:13px}.nf-employee-event-dot{width:10px;height:10px;border-radius:50%;background:var(--nf-primary);margin-top:5px;box-shadow:0 0 14px rgba(0,212,255,.35)}.nf-employee-event-dot.hold{background:#f59e0b}.nf-employee-event-dot.resigned{background:#ef4444}.nf-employee-event-dot.resume,.nf-employee-event-dot.active{background:#10b981}.nf-employee-event strong{color:var(--nf-text)}
.nf-employee-import-grid{display:grid;grid-template-columns:minmax(280px,420px) 1fr;gap:16px;align-items:start}.nf-employee-import-card,.nf-employee-import-preview{border:1px solid rgba(0,212,255,.24);border-radius:10px;background:rgba(7,18,36,.70);padding:16px}.nf-employee-import-card h4{margin:0 0 6px;color:var(--nf-text)}.nf-employee-import-card p{margin:0 0 14px;color:var(--nf-text-muted);font-size:13px}.nf-employee-import-zone{border:1.5px dashed rgba(0,212,255,.40);border-radius:10px;min-height:150px;display:grid;place-items:center;text-align:center;gap:6px;padding:18px;cursor:pointer;background:rgba(0,212,255,.06);color:var(--nf-text)}.nf-employee-import-zone i{font-size:34px;color:var(--nf-primary)}.nf-employee-import-zone span{font-size:12px;color:var(--nf-text-muted)}
.nf-employee-table-wrapper{overflow-x:auto}.nf-employee-table,.nf-employee-import-table{min-width:1180px;table-layout:auto}.nf-employee-table th,.nf-employee-table td,.nf-employee-import-table th,.nf-employee-import-table td{vertical-align:middle;white-space:nowrap}.nf-employee-table th:nth-child(2),.nf-employee-table td:nth-child(2),.nf-employee-table th:nth-child(3),.nf-employee-table td:nth-child(3),.nf-employee-import-table th:nth-child(2),.nf-employee-import-table td:nth-child(2),.nf-employee-import-table th:nth-child(3),.nf-employee-import-table td:nth-child(3){white-space:normal;min-width:160px}.nf-employee-table thead th,.nf-employee-import-table thead th{line-height:1.25}
.nf-employee-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(160px,1fr));gap:10px}.nf-employee-detail-item{border:1px solid rgba(0,212,255,.18);border-radius:8px;background:rgba(7,18,36,.55);padding:10px}.nf-employee-detail-item span{display:block;color:var(--nf-text-muted);font-size:11px;text-transform:uppercase;letter-spacing:.04em;margin-bottom:4px}.nf-employee-detail-item strong{display:block;color:var(--nf-text);word-break:break-word}.nf-employee-status-actions{display:flex;gap:8px;flex-wrap:wrap;border-top:1px solid rgba(0,212,255,.16);margin-top:14px;padding-top:14px}
@media(max-width:1100px){.nf-admin-app #sectionEmployees > .nf-card{max-width:100%!important}.nf-employee-stats{grid-template-columns:repeat(2,minmax(150px,1fr));max-width:100%}.nf-employee-import-grid{grid-template-columns:1fr}.nf-employee-detail-grid{grid-template-columns:1fr}}
@media(max-width:760px){.nf-employee-panel[data-employee-panel="form"],.nf-employee-panel[data-employee-panel="form"] .nf-form-row,.nf-employee-panel[data-employee-panel="form"] .nf-form-row:has(#employeeAadhar),.nf-employee-panel[data-employee-panel="form"] .nf-form-row:has(#employeeStatus){max-width:100%;grid-template-columns:1fr!important}}
@media(max-width:640px){.nf-employee-tabs{display:grid;grid-template-columns:1fr 1fr}.nf-employee-tab{justify-content:center;padding:10px 8px}.nf-employee-stats{grid-template-columns:1fr}.nf-employee-form-head{display:block}.nf-employee-form-head .nf-btn{margin-top:10px;width:100%}}
/* Admin professional sidebar hierarchy - 20260713-sidebar-pro1 BEGIN */
.nf-admin-app {
  --nf-sidebar-width: 264px;
}

.nf-admin-app .nf-sidebar {
  display: flex !important;
  flex-direction: column !important;
  width: 264px !important;
  max-width: 264px !important;
  height: 100vh !important;
  background: #071525 !important;
  border-right: 1px solid #20354D !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

.nf-admin-app .nf-sidebar-brand {
  flex: 0 0 auto !important;
  padding: 18px 20px 16px !important;
  background: #071525 !important;
  border-bottom: 1px solid #20354D !important;
}

.nf-admin-app .nf-sidebar-brand img {
  max-height: 88px !important;
  width: auto !important;
  object-fit: contain !important;
}

.nf-admin-app .nf-sidebar-brand-text span {
  color: #32E1ED !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: .7px !important;
  text-transform: uppercase !important;
}

.nf-admin-app .nf-sidebar-nav {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 12px 10px 14px !important;
  list-style: none !important;
  background: #071525 !important;
}

.nf-admin-app .nf-sidebar-footer {
  flex: 0 0 auto !important;
  padding: 10px !important;
  background: #071525 !important;
  border-top: 1px solid #20354D !important;
}

.nf-admin-app .nf-sidebar-nav-label {
  color: #7184A8 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase !important;
  padding: 13px 10px 7px !important;
  line-height: 1.1 !important;
}

.nf-admin-app .nf-sidebar-label-overview { color: #22D3EE !important; }
.nf-admin-app .nf-sidebar-label-sales { color: #F5B82E !important; }
.nf-admin-app .nf-sidebar-label-partners { color: #79DC59 !important; }
.nf-admin-app .nf-sidebar-label-team { color: #A679F5 !important; }
.nf-admin-app .nf-sidebar-label-reporting { color: #5FA7FF !important; }
.nf-admin-app .nf-sidebar-label-announcements { color: #FF4DA6 !important; }
.nf-admin-app .nf-sidebar-label-system { color: #48C2C8 !important; }

.nf-admin-app .nf-sidebar-announcement-link .nf-nav-text {
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  font-size: 13px !important;
}

.nf-admin-app .nf-sidebar-nav-item {
  margin: 0 0 4px !important;
  list-style: none !important;
}

.nf-admin-app .nf-sidebar-nav-link,
.nf-admin-app .nf-sidebar-subitem {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 46px !important;
  min-height: 46px !important;
  gap: 13px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-left: 3px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #C7D2E5 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-align: left !important;
  cursor: pointer !important;
  box-shadow: none !important;
  outline: none !important;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease !important;
}

.nf-admin-app .nf-sidebar-nav-link:focus,
.nf-admin-app .nf-sidebar-subitem:focus {
  outline: none !important;
  box-shadow: none !important;
}

.nf-admin-app .nf-sidebar-nav-link:focus-visible,
.nf-admin-app .nf-sidebar-subitem:focus-visible {
  box-shadow: 0 0 0 2px rgba(50, 225, 237, .22) !important;
}

.nf-admin-app .nf-sidebar-nav-link:hover,
.nf-admin-app .nf-sidebar-subitem:hover {
  background: #10273E !important;
  color: #C7D2E5 !important;
  transform: none !important;
}

.nf-admin-app .nf-sidebar-nav-link.active,
.nf-admin-app .nf-sidebar-subitem.active {
  background: #0B304C !important;
  color: #32E1ED !important;
  border-left-color: #32E1ED !important;
  box-shadow: none !important;
  font-weight: 700 !important;
}

.nf-admin-app .nf-sidebar-dropdown.open > .nf-sidebar-dropdown-toggle,
.nf-admin-app .nf-sidebar-dropdown.has-active > .nf-sidebar-dropdown-toggle {
  background: #10273E !important;
  color: #32E1ED !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.nf-admin-app .nf-sidebar-nav-link > i:first-child,
.nf-admin-app .nf-sidebar-subitem > i:first-child {
  flex: 0 0 22px !important;
  width: 22px !important;
  min-width: 22px !important;
  text-align: center !important;
  font-size: 18px !important;
  line-height: 1 !important;
  color: #AFC0DD !important;
}

.nf-admin-app .nf-sidebar-subitem > i:first-child {
  font-size: 15px !important;
}

.nf-admin-app .nf-sidebar-nav-link:hover > i:first-child,
.nf-admin-app .nf-sidebar-subitem:hover > i:first-child {
  color: #AFC0DD !important;
}

.nf-admin-app .nf-sidebar-nav-link.active > i:first-child,
.nf-admin-app .nf-sidebar-subitem.active > i:first-child,
.nf-admin-app .nf-sidebar-dropdown.has-active > .nf-sidebar-dropdown-toggle > i:first-child,
.nf-admin-app .nf-sidebar-dropdown.open > .nf-sidebar-dropdown-toggle > i:first-child {
  color: #32E1ED !important;
}

.nf-admin-app .nf-nav-text {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  color: inherit !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  text-align: left !important;
}

.nf-admin-app .nf-sidebar-caret {
  margin-left: auto !important;
  flex: 0 0 16px !important;
  width: 16px !important;
  min-width: 16px !important;
  font-size: 12px !important;
  color: #AFC0DD !important;
  text-align: center !important;
  transition: transform .18s ease, color .18s ease !important;
}

.nf-admin-app .nf-sidebar-dropdown.open .nf-sidebar-caret {
  transform: rotate(180deg) !important;
  color: #32E1ED !important;
}

.nf-admin-app .nf-nav-notification {
  margin-left: auto !important;
  flex: 0 0 auto !important;
  min-width: 22px !important;
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 7px !important;
  border-radius: 999px !important;
  background: #E43D5B !important;
  color: #FFFFFF !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 22px !important;
  text-align: center !important;
  box-shadow: none !important;
}

.nf-admin-app .nf-nav-notification i {
  display: none !important;
}

.nf-admin-app .nf-nav-notification.has-pending {
  background: #E43D5B !important;
  color: #FFFFFF !important;
}

.nf-admin-app .nf-sidebar-submenu {
  display: none !important;
  margin: 2px 0 8px 0 !important;
  padding: 0 0 0 14px !important;
  border-left: 1px solid #20354D !important;
  background: transparent !important;
}

.nf-admin-app .nf-sidebar-dropdown.open .nf-sidebar-submenu,
.nf-admin-app .nf-sidebar-dropdown.has-active .nf-sidebar-submenu {
  display: grid !important;
  gap: 3px !important;
}

.nf-admin-app .nf-sidebar-subitem {
  height: 40px !important;
  min-height: 40px !important;
  font-size: 13px !important;
  padding-right: 8px !important;
  color: #C7D2E5 !important;
}

.nf-admin-app .nf-sidebar-logout-link {
  color: #FF5C75 !important;
  font-weight: 800 !important;
}

.nf-admin-app .nf-sidebar-logout-link > i:first-child {
  color: #FF5C75 !important;
}

.nf-admin-app .nf-sidebar-logout-link:hover {
  background: #10273E !important;
  color: #FFFFFF !important;
}

@media (max-width: 991px) {
  .nf-admin-app .nf-sidebar {
    width: 264px !important;
    max-width: 264px !important;
  }

  .nf-admin-app .nf-sidebar-nav {
    padding-bottom: 14px !important;
  }
}
/* Admin professional sidebar hierarchy - 20260713-sidebar-pro1 END */

/* Compact dealer/distributor company order workspace */
.nf-order-view-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
  padding: 5px;
  border: 1px solid var(--nf-border);
  border-radius: 12px;
  background: var(--nf-surface);
}

.nf-order-view-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--nf-text-muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.nf-order-view-tab.active {
  background: var(--nf-primary);
  color: #fff;
  box-shadow: 0 5px 14px rgba(19, 120, 84, 0.22);
}

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

.nf-order-items-details summary {
  width: max-content;
  cursor: pointer;
  color: var(--nf-primary);
  font-weight: 800;
}

.nf-order-items-details > div {
  margin-top: 6px;
  color: var(--nf-text-muted);
  line-height: 1.45;
}

.nf-order-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 12px;
  border-top: 1px solid var(--nf-border);
  color: var(--nf-text-muted);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 640px) {
  #sectionCompanyOrder .nf-order-form-grid,
  #distCompanyOrder .nf-order-form-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(108px, .72fr) !important;
    gap: 9px !important;
  }

  #sectionCompanyOrder .nf-order-form-grid > .nf-form-group,
  #distCompanyOrder .nf-order-form-grid > .nf-form-group { min-width: 0; margin: 0; }
  #sectionCompanyOrder .nf-order-form-grid > .nf-form-group:first-child,
  #distCompanyOrder .nf-order-form-grid > .nf-form-group:first-child { grid-column: 1 / -1; }
  #sectionCompanyOrder .nf-order-form-grid > .nf-form-group:last-child .nf-btn,
  #distCompanyOrder .nf-order-form-grid > .nf-form-group:last-child .nf-btn { width: 100%; min-height: 44px; }

  .nf-company-orders-table th,
  .nf-company-orders-table td { padding: 9px 7px !important; vertical-align: top; }
  .nf-order-items-details > div { font-size: 11px; }
  .nf-order-pagination { position: sticky; bottom: 0; background: var(--nf-surface); }
}

/* Compact mobile Sales and QR histories */
.nf-mobile-history-details { display: none; }
.nf-history-color { display: block; margin-top: 3px; color: var(--nf-text-muted); font-size: 12px; }
.nf-history-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 12px;
  border-top: 1px solid var(--nf-border);
  color: var(--nf-text-muted);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 640px) {
  #sectionMySales .nf-table-wrapper,
  #sectionDealerQR .nf-table-wrapper,
  #distSales .nf-table-wrapper,
  #distQR .nf-table-wrapper {
    width: 100%;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  .nf-compact-history-table,
  .nf-compact-history-table tbody {
    display: block;
    width: 100%;
    min-width: 0 !important;
  }

  .nf-compact-history-table thead { display: none; }
  .nf-compact-history-table tbody { padding: 9px; }
  .nf-compact-history-table tbody tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 5px 10px;
    width: 100%;
    min-height: 76px;
    margin: 0 0 8px;
    padding: 11px 12px;
    border: 1px solid var(--nf-border) !important;
    border-radius: 12px;
    background: var(--nf-surface);
  }

  .nf-compact-history-table tbody tr:last-child { margin-bottom: 0; }
  .nf-compact-history-table tbody td {
    display: none;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    font-size: 12px;
  }

  .nf-compact-history-table tbody td[colspan] { display: block; grid-column: 1 / -1; }
  .nf-compact-history-table tbody td:first-child,
  .nf-compact-history-table tbody td:nth-child(2) { display: block; grid-column: 1; }
  .nf-compact-history-table tbody td:first-child { grid-row: 1; color: var(--nf-text-muted); }
  .nf-compact-history-table tbody td:nth-child(2) { grid-row: 2; }
  .nf-compact-history-table code { font-size: 11px !important; color: var(--nf-text); }
  .nf-compact-history-table tbody td:nth-child(2) > strong { display: block; margin-top: 2px; }

  #sectionMySales .nf-sales-history-table tbody td:nth-child(7),
  #sectionMySales .nf-sales-history-table tbody td:nth-child(8),
  #distSales .nf-sales-history-table tbody td:nth-child(5),
  #distSales .nf-sales-history-table tbody td:nth-child(7),
  .nf-qr-history-table tbody td:nth-child(5) { display: flex; grid-column: 2; justify-content: flex-end; }
  #sectionMySales .nf-sales-history-table tbody td:nth-child(7),
  #distSales .nf-sales-history-table tbody td:nth-child(5),
  .nf-qr-history-table tbody td:nth-child(5) { grid-row: 1; }
  #sectionMySales .nf-sales-history-table tbody td:nth-child(8),
  #distSales .nf-sales-history-table tbody td:nth-child(7) { grid-row: 2; }

  .nf-mobile-history-details { display: block; margin-top: 6px; }
  .nf-mobile-history-details summary {
    width: max-content;
    color: var(--nf-primary);
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
  }
  .nf-mobile-history-details > div {
    margin-top: 6px;
    color: var(--nf-text-muted);
    font-size: 11px;
    line-height: 1.5;
  }
  .nf-history-pagination { position: sticky; bottom: 74px; z-index: 3; background: var(--nf-surface); }
}


