.weight-cell{display:flex;flex-direction:column;gap:3px;min-width:92px}.weight-cell strong{color:#183b2b;font-size:13px}.weight-cell input{width:72px;border:1px solid #d9e3dc;border-radius:6px;padding:4px 6px;font-size:12px}.weight-cell small,.product-total-stock{display:block;color:#718078;font-size:10px}.weight-empty{color:#a3ada6}.inventory-report-grid{display:grid;grid-template-columns:150px 1fr 1.6fr;gap:24px;align-items:center}.inventory-donut{width:126px;height:126px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;background:conic-gradient(#3f8f62 0 60%,#e6a23c 60% 82%,#e5e9e6 82%);box-shadow:inset 0 0 0 18px #fff;color:#183b2b;font-size:23px;font-weight:800}.inventory-donut small{font-size:11px;font-weight:600;color:#718078}.inventory-legend{display:grid;gap:12px;color:#52645a;font-size:13px}.inventory-legend div{display:flex;align-items:center;gap:8px}.inventory-legend strong{margin-left:auto;color:#183b2b}.legend-dot{width:9px;height:9px;border-radius:50%;display:inline-block}.legend-dot.healthy{background:#3f8f62}.legend-dot.low{background:#e6a23c}.legend-dot.out{background:#b9c3bd}.inventory-bars{display:grid;gap:14px}.inventory-bar-row{display:grid;grid-template-columns:60px 1fr 35px;gap:10px;align-items:center;font-size:12px;color:#52645a}.inventory-bar-row div{height:9px;background:#edf1ed;border-radius:8px;overflow:hidden}.inventory-bar-row b{display:block;height:100%;border-radius:8px;background:#3f8f62}.inventory-bar-row strong{text-align:right;color:#183b2b}@media(max-width:768px){.inventory-report-grid{grid-template-columns:1fr 1fr}.inventory-bars{grid-column:1/-1}.inventory-donut{width:105px;height:105px}.data-table{min-width:900px}}
.reports-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.report-card{min-height:260px}.report-wide{grid-column:1/-1}.report-caption{color:#819087;font-size:12px}.report-donut-wrap{display:flex;align-items:center;justify-content:center;gap:26px;min-height:190px}.report-donut{width:150px;height:150px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;flex:none;box-shadow:inset 0 0 0 20px #fff;color:#183b2b;font-weight:800}.report-donut span{font-size:18px}.report-donut small{color:#819087;font-size:11px;font-weight:600}.report-legend{display:grid;gap:10px;min-width:150px}.report-legend div{display:grid;grid-template-columns:10px 1fr auto;gap:7px;align-items:center;font-size:12px;color:#52645a}.report-legend i{width:9px;height:9px;border-radius:50%}.report-legend strong{color:#183b2b}.report-bars{display:grid;gap:12px;padding-top:8px}.report-bar-row{display:grid;grid-template-columns:minmax(90px,1fr) 2fr 80px;gap:12px;align-items:center;font-size:12px}.report-bar-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#52645a}.report-bar-row strong{text-align:right;color:#183b2b}.report-bar-track{height:10px;border-radius:8px;background:#edf1ed;overflow:hidden}.report-bar-track b{display:block;height:100%;border-radius:8px;background:linear-gradient(90deg,#167548,#55ad7d)}.report-empty{width:100%;padding:50px 0;color:#819087;text-align:center}@media(max-width:768px){.reports-grid{grid-template-columns:1fr}.report-wide{grid-column:auto}.report-donut-wrap{gap:12px}.report-donut{width:120px;height:120px}.report-bar-row{grid-template-columns:80px 1fr 65px}}
.report-loading,.report-error{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:150px;color:#819087;text-align:center}.report-loading i{color:#167548;font-size:20px}.report-error strong{color:#183b2b}.report-error span{font-size:12px}
/* Login */
#loginOverlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #0f3d2e 0%, #136f4a 52%, #d7eee1 150%);
}

.login-card {
  width: min(100%, 430px);
  padding: 42px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 30px 80px rgba(8, 45, 31, .28);
}

.login-brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 24px;
  place-items: center;
  border-radius: 16px;
  background: #e5f5eb;
  color: #167548;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
}

.login-heading { margin-bottom: 30px; }
.login-eyebrow { margin: 0 0 8px; color: #167548; font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.login-heading h1 { margin: 0; color: #102a20; font-size: 30px; line-height: 1.15; }
.login-heading p:last-child { margin: 10px 0 0; color: #6b7c74; font-size: 14px; }
.login-form { display: grid; gap: 19px; }
.login-field label { display: block; margin-bottom: 8px; color: #284338; font-size: 13px; font-weight: 700; }
.login-input-wrap { position: relative; }
.login-input-wrap > i { position: absolute; top: 50%; left: 15px; color: #7d988a; transform: translateY(-50%); }
.login-input-wrap input { width: 100%; box-sizing: border-box; padding: 14px 44px 14px 43px; border: 1px solid #dce8e0; border-radius: 12px; outline: none; background: #fbfdfb; color: #173329; font: inherit; transition: border-color .2s, box-shadow .2s, background .2s; }
.login-input-wrap input:focus { border-color: #299465; background: #fff; box-shadow: 0 0 0 4px rgba(41, 148, 101, .12); }
.password-toggle { position: absolute; top: 50%; right: 8px; width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: #7d988a; cursor: pointer; transform: translateY(-50%); }
.password-toggle:hover { background: #eaf6ee; color: #167548; }
.login-submit { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 5px; padding: 14px 18px; border: 0; border-radius: 12px; background: #167548; color: #fff; font-size: 15px; font-weight: 800; cursor: pointer; box-shadow: 0 10px 22px rgba(22, 117, 72, .2); transition: background .2s, transform .2s, box-shadow .2s; }
.login-submit:hover:not(:disabled) { background: #105d39; box-shadow: 0 13px 26px rgba(22, 117, 72, .28); transform: translateY(-1px); }
.login-submit:disabled { cursor: wait; opacity: .7; }
.login-footer { margin: 24px 0 0; color: #93a39a; font-size: 11px; text-align: center; }

@media (max-width: 480px) {
  .login-card { padding: 30px 22px; border-radius: 20px; }
  .login-heading h1 { font-size: 27px; }
}
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-light: #ccfbf1;
  --primary-gradient: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  --accent-gradient: linear-gradient(135deg, #14b8a6 0%, #0d9488 50%, #0f766e 100%);
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --white: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 40px -4px rgba(0,0,0,0.1), 0 8px 16px -4px rgba(0,0,0,0.06);
  --shadow-glow: 0 0 20px rgba(15, 118, 110, 0.15), 0 4px 12px rgba(15, 118, 110, 0.1);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 72px;
  --header-height: 68px;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(ellipse at 10% 10%, rgba(15,118,110,0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 90% 90%, rgba(20,184,166,0.04) 0%, transparent 60%);
}
.admin-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: width var(--transition-slow), transform var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.sidebar::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(15,118,110,0.02) 0%, transparent 40%);
}
.sidebar.collapsed { width: var(--sidebar-collapsed-width); }
.sidebar.collapsed .logo span,
.sidebar.collapsed .nav-item span { opacity: 0; width: 0; overflow: hidden; }
.sidebar.collapsed .sidebar-header { justify-content: center; padding: 20px 0; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 14px; }
.sidebar.collapsed .sidebar-nav { padding: 12px 0; }
.sidebar.collapsed .logo { gap: 0; }
.sidebar.collapsed .logo i { font-size: 26px; }

.sidebar-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  position: relative;
}
.sidebar-header::before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15,118,110,0.2), transparent);
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  transition: all var(--transition);
}
.logo i {
  font-size: 22px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(15, 118, 110, 0.2));
  animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(15, 118, 110, 0.2)); }
  50% { filter: drop-shadow(0 0 14px rgba(15, 118, 110, 0.35)); }
}
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.sidebar-toggle:hover { background: var(--bg); color: var(--primary); }

.sidebar-nav { flex: 1; padding: 12px; overflow-y: auto; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all var(--transition-fast);
  position: relative;
  cursor: pointer;
  border-radius: var(--radius);
  margin-bottom: 2px;
  overflow: hidden;
}
.nav-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity var(--transition-fast);
  border-radius: inherit;
}
.nav-item:hover {
  color: var(--primary);
  background: var(--bg-alt);
  transform: translateX(2px);
}
.nav-item.active {
  color: white;
  background: var(--primary-gradient);
  font-weight: 600;
  box-shadow: var(--shadow-glow);
  border: none;
}
.nav-item.active::before { opacity: 1; }
.nav-item.active i { color: white; }
.nav-item i {
  width: 20px;
  text-align: center;
  font-size: 15px;
  transition: transform var(--transition-fast);
  position: relative;
  z-index: 1;
}
.nav-item span { position: relative; z-index: 1; }
.nav-item:hover i { transform: scale(1.1); }
.badge {
  margin-left: auto;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 20px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
  animation: pulse-badge 2s infinite;
  position: relative;
  z-index: 1;
}
@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3); }
   50% { box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5); }
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.sidebar-footer .logout-btn {
  width: 100%;
  justify-content: flex-start;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fee2e2;
}
.sidebar-footer .logout-btn:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
  transform: translateX(2px);
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition-slow);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(15,118,110,0.03) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(20,184,166,0.03) 0%, transparent 60%),
    var(--bg);
}

.top-header {
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow-sm);
}
.header-left { display: flex; align-items: center; gap: 16px; }
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.mobile-menu-toggle:hover { background: var(--bg-alt); color: var(--primary); }
#pageTitle {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.header-right { display: flex; align-items: center; gap: 16px; }
.user-info { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: var(--radius); transition: all var(--transition-fast); cursor: pointer; background: transparent; }
.user-info:hover { background: var(--bg-alt); }
.user-avatar {
  width: 38px; height: 38px;
  background: var(--primary-gradient);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.25);
  transition: all var(--transition-fast);
}
.user-info:hover .user-avatar {
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.4);
  transform: translateY(-1px);
}
.user-name { font-weight: 600; font-size: 14px; color: var(--text-secondary); }

.page-content { flex: 1; padding: 28px; animation: fadeIn 0.3s ease-in; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.4s ease-out; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-bottom: 28px; }
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity var(--transition);
}
.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,118,110,0.02) 0%, transparent 60%);
  pointer-events: none;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.stat-card:hover::before { opacity: 1; }
.stat-icon {
  width: 50px; height: 50px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  position: relative;
  overflow: hidden;
}
.stat-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  opacity: 0.15;
  border-radius: inherit;
}
.stat-icon.green { background: #dcfce7; color: #16a34a; }
.stat-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-icon.orange { background: #ffedd5; color: #f97316; }
.stat-icon.purple { background: #f3e8ff; color: #9333ea; }
.stat-icon.red { background: #fee2e2; color: #dc2626; }
.stat-icon.teal { background: #ccfbf1; color: #0d9488; }
.stat-info h3 { font-size: 26px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; line-height: 1.2; }
.stat-info p { font-size: 13px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.inventory-stats-grid { grid-template-columns: repeat(4, minmax(180px, 1fr)); margin-top: 4px; }
.inventory-stat-low { border-color: #fecaca; }
.inventory-stat-medium { border-color: #fed7aa; }

.dashboard-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.section-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.section-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity var(--transition);
}
.section-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.section-card:hover::before { opacity: 1; }

.delivery-notice-editor .section-header {
  align-items: center;
}

.delivery-notice-editor .inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding-top: 4px;
}

.delivery-notice-editor .inline-form .btn {
  min-height: 42px;
  white-space: nowrap;
}

.saved-highlight-list {
  display: grid;
  gap: 12px;
}

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

.saved-highlight-content {
  flex: 1;
  min-width: 0;
}

.saved-highlight-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.saved-highlight-gallery img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
}

.saved-highlight-empty {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .delivery-notice-editor .inline-form {
    grid-template-columns: 1fr;
  }

  .delivery-notice-editor .inline-form .btn {
    width: 100%;
  }
}
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.section-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-header h3 i { color: var(--primary); font-size: 14px; }
.btn-view-all {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.btn-view-all:hover { background: var(--primary-light); }

.filter-bar { display: flex; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; align-items: center; }
.search-input {
  flex: 1;
  min-width: 220px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  background: var(--white);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}
.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}
.filter-select {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  background: var(--white);
  min-width: 160px;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}
.filter-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.35);
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.btn-secondary {
  background: var(--white);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-assigned {
  background: #dc2626;
  color: #fff;
  border: 1px solid #dc2626;
}
.btn-assigned:hover { background: #b91c1c; border-color: #b91c1c; }
.btn-secondary:hover { background: var(--bg-alt); border-color: var(--text-muted); }
.btn-danger {
  background: #ef4444;
  color: white;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2);
}
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }
.btn-sm { padding: 7px 13px; font-size: 13px; }

.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--white); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: linear-gradient(180deg, #fafafa 0%, #f5f7fa 100%);
  padding: 16px 18px;
  text-align: left;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.data-table td { padding: 16px 18px; border-bottom: 1px solid var(--border-light); font-size: 14px; vertical-align: middle; }
.data-table tbody tr { transition: all var(--transition-fast); }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table tbody tr:hover td { border-bottom-color: #e2e8f0; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:last-child:hover td { border-bottom-color: transparent; }
.status-badge {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.status-pending { background: #fff7ed; color: #c2410c; border: 1px solid #ffedd5; }
.status-confirmed { background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; }
.status-processing { background: #f5f3ff; color: #4338ca; border: 1px solid #ede9fe; }
.status-packed { background: #fffbeb; color: #92400e; border: 1px solid #fef3c7; }
.status-out_for_delivery { background: #f0f9ff; color: #0369a1; border: 1px solid #e0f2fe; }
.status-delivered { background: #f0fdf4; color: #15803d; border: 1px solid #dcfce7; }
.status-cancelled { background: #fef2f2; color: #dc2626; border: 1px solid #fee2e2; }

.product-table-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #f8fafc;
  display: block;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}
.data-table tbody tr:hover .product-table-img {
  transform: scale(1.08);
  box-shadow: var(--shadow-md);
.stock-value { display: inline-flex; min-width: 42px; justify-content: center; padding: 3px 9px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.stock-low { color: #b91c1c; background: #fee2e2; }
.stock-reorder { color: #a16207; background: #fef3c7; }
.stock-medium { color: #c2410c; background: #ffedd5; }
.stock-healthy { color: #047857; background: #d1fae5; }
  border-color: var(--primary-light);
}

.products-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.products-page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.products-page-title i {
  color: var(--primary);
  font-size: 18px;
}
.products-count {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  background: var(--bg-alt);
  padding: 4px 12px;
  border-radius: 20px;
  margin-left: 8px;
}
.empty-row td {
  padding: 60px 20px !important;
  border-bottom: none !important;
}
.empty-state {
  text-align: center;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
  opacity: 0.4;
  color: var(--text-muted);
}
.empty-state p {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}
.data-table .action-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}
.data-table .action-buttons .btn {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.data-table .action-buttons .btn i {
  font-size: 11px;
}
.banner-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}
.banner-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.banner-card-img { width: 100%; height: 200px; object-fit: cover; }
.banner-card-body { padding: 18px; }
.banner-card-title { font-weight: 600; font-size: 15px; color: var(--text); }
.banner-card-meta { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.banner-card-actions {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.banners-grid { display: grid; gap: 18px; }
.ctas-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.line-sections-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.best-sellers-grid { grid-template-columns: 1fr; }
.best-seller-card .banner-card-body { padding-bottom: 8px; }
.best-seller-table-wrap { overflow-x: auto; margin-top: 14px; border: 1px solid var(--border-light); border-radius: var(--radius); }
.best-seller-table { min-width: 520px; }
.best-seller-table th, .best-seller-table td { padding: 10px 12px; }
.product-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 260px; overflow-y: auto; padding: 10px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); }
.product-picker-item { display: flex; align-items: center; gap: 9px; padding: 10px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.product-picker-item:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.product-picker-item.disabled { opacity: 0.55; cursor: not-allowed; }
.product-picker-item input { accent-color: var(--primary); }
.product-picker-item small { display: block; color: var(--text-muted); }
.product-picker-item em { font-style: normal; color: var(--primary); font-size: 12px; font-weight: 600; }
.form-hint { display: block; color: var(--text-muted); font-size: 12px; margin-top: 6px; }

.delivery-boys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.delivery-boy-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}
.delivery-boy-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.delivery-boy-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.delivery-boy-avatar {
  width: 50px; height: 50px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  border: 2px solid var(--primary);
}
.delivery-boy-name { font-weight: 600; font-size: 15px; color: var(--text); }
.delivery-boy-email { font-size: 13px; color: var(--text-muted); }
.delivery-boy-details { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.delivery-boy-detail { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-secondary); }
.delivery-boy-detail i { color: var(--primary); font-size: 12px; width: 14px; text-align: center; }

.top-products-list { display: flex; flex-direction: column; gap: 6px; }
.top-product-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: var(--radius);
  transition: all var(--transition-fast);
}
.top-product-item:hover { background: #f8fafc; }
.top-product-rank {
  width: 30px; height: 30px;
  background: var(--primary-gradient);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(15, 118, 110, 0.2);
}
.top-product-info { flex: 1; }
.top-product-name { font-weight: 500; font-size: 14px; color: var(--text); }
.top-product-sold { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.top-product-revenue { font-weight: 700; color: var(--primary); font-size: 14px; }

.pagination { display: flex; gap: 8px; margin-top: 24px; justify-content: center; align-items: center; }
.page-btn {
  padding: 7px 14px;
  border: 1px solid var(--border);
  background: white;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition-fast);
}
.page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.page-btn.active {
  background: var(--primary-gradient);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.25);
}
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1000; align-items: center; justify-content: center; }
.modal.active { display: flex; animation: fadeIn 0.2s ease-out; }
.modal-overlay { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); }
.modal-content {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  z-index: 1;
  animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal-content.large { max-width: 850px; }
.modal.route-page-modal {
  position: fixed;
  top: var(--header-height);
  left: var(--sidebar-width);
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-start;
  justify-content: stretch;
  background: var(--bg);
  overflow-y: auto;
}
.modal.route-page-modal .modal-content {
  width: 100%;
  max-width: none;
  max-height: none;
  min-height: 100%;
  border-radius: 0;
  box-shadow: none;
}
.modal.route-page-modal .modal-overlay { display: none; }
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-header h3 { font-size: 18px; font-weight: 700; color: var(--text); }
.modal-close {
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--text-muted);
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
}
.modal-close:hover { background: #fee2e2; color: #dc2626; }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #fafafa;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; position: relative; }
.form-group label { font-weight: 600; font-size: 13px; color: var(--text-secondary); }
.form-group input, .form-group select, .form-group textarea {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  background: var(--white);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}
.form-group select { width: 100%; min-height: 42px; position: relative; z-index: 2; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}
.delivery-boy-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}
.delivery-boy-form-grid {
  padding: 24px;
  gap: 18px;
}
.delivery-boy-form .modal-footer {
  margin-top: 0;
  padding: 16px 24px 24px;
}
.checkbox-group { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.checkbox-label { display: flex; align-items: center; gap: 7px; font-weight: 500 !important; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

.order-detail-section { margin-bottom: 22px; }

.thermal-receipt {
  width: 302px;
  max-width: 100%;
  margin: 0 auto 22px;
  padding: 18px 16px 16px;
  box-sizing: border-box;
  background: #fffefb;
  border: 1px solid #e2e8e2;
  border-radius: 6px;
  color: #1e293b;
  font-family: monospace;
  font-size: 10px;
}

.thermal-receipt__center { text-align: center; }
.thermal-receipt__logo { display: flex; justify-content: center; margin-bottom: 4px; }
.thermal-receipt__logo img { width: 58px; height: 58px; object-fit: contain; }
.thermal-receipt__title { font-family: inherit; font-size: 15px; font-weight: 900; }
.thermal-receipt__muted { color: #64748b; font-size: 9px; line-height: 1.35; }
.thermal-receipt__rule { height: 1px; margin: 8px 0; background: #dce5dc; }
.thermal-receipt__meta,
.thermal-receipt__row { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.thermal-receipt__meta span:first-child { color: #64748b; font-weight: 700; }
.thermal-receipt__meta span:last-child { text-align: right; font-weight: 800; overflow-wrap: anywhere; }
.thermal-receipt__section-title { color: #15803d; font-size: 10px; font-weight: 900; }
.thermal-receipt__items-header {
  display: flex;
  align-items: center;
  margin: 5px 0 0;
  padding: 5px 0;
  background: #eff6ee;
  border-top: 1px solid #dce5dc;
  border-bottom: 1px solid #dce5dc;
  font-size: 8px;
  font-weight: 900;
}
.thermal-receipt__item-name { flex: 5; min-width: 0; }
.thermal-receipt__item-qty { width: 24px; text-align: center; }
.thermal-receipt__item-rate { width: 42px; text-align: right; }
.thermal-receipt__item-total { width: 48px; text-align: right; }
.thermal-receipt__item { padding: 6px 0; }
.thermal-receipt__item-row { display: flex; align-items: flex-start; gap: 0; }
.thermal-receipt__weight { margin-top: 2px; color: #64748b; font-size: 8px; }
.thermal-receipt__row-total { font-size: 12px; font-weight: 800; }

@media print {
  body * { visibility: hidden !important; }
  #orderDetailModal,
  #orderDetailModal .thermal-receipt,
  #orderDetailModal .thermal-receipt * { visibility: visible !important; }
  #orderDetailModal { position: static !important; display: block !important; background: transparent !important; }
  #orderDetailModal .modal-content { position: static !important; width: 302px !important; max-width: 302px !important; margin: 0 !important; padding: 0 !important; box-shadow: none !important; border: 0 !important; }
  #orderDetailModal .modal-header,
  #orderDetailModal .modal-overlay,
  #orderDetailModal .order-detail-section { display: none !important; }
  #orderDetailModal .modal-body { padding: 0 !important; }
  .thermal-receipt { margin: 0 !important; border: 0 !important; box-shadow: none !important; }
  @page { size: 80mm auto; margin: 0; }
}
.order-detail-section h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  color: var(--text);
}
.order-items-table { width: 100%; border-collapse: collapse; }
.order-items-table th { background: #fafafa; padding: 10px 14px; text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; color: var(--text-muted); }
.order-items-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-light); font-size: 14px; }
.order-info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.order-info-item { display: flex; flex-direction: column; gap: 3px; padding: 10px; background: var(--bg); border-radius: var(--radius-sm); }
.order-info-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; font-weight: 600; letter-spacing: 0.04em; }
.order-info-value { font-weight: 600; font-size: 14px; color: var(--text); }
.tracking-timeline { display: flex; flex-direction: column; gap: 10px; }
.timeline-item { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--border-light); }
.timeline-item.active { background: var(--primary-light); border-color: var(--primary); }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
.timeline-item.active .timeline-dot { background: var(--primary); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2); }
.timeline-text { font-size: 13px; color: var(--text); }
.timeline-time { font-size: 11px; color: var(--text-muted); }

.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }

.products-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.products-page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.products-page-title i {
  color: var(--primary);
  font-size: 18px;
}
.products-count {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  background: var(--bg-alt);
  padding: 4px 12px;
  border-radius: 20px;
  margin-left: 8px;
}

@media (max-width: 1024px) {
  .dashboard-sections { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-width); }
  .sidebar.open { transform: translateX(0); }
  .sidebar.collapsed { width: var(--sidebar-width); }
  .sidebar.collapsed .logo span,
  .sidebar.collapsed .nav-item span { opacity: 1; width: auto; overflow: visible; }
  .sidebar.collapsed .sidebar-header { justify-content: space-between; padding: 18px 20px; }
  .sidebar.collapsed .nav-item { justify-content: flex-start; padding: 11px 14px; }
  .main-content { margin-left: 0; }
  .mobile-menu-toggle { display: block; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .page-content { padding: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full-width { grid-column: 1; }
  .banners-grid, .ctas-grid, .line-sections-grid { grid-template-columns: 1fr; }
  .product-picker { grid-template-columns: 1fr; }
  .delivery-boys-grid { grid-template-columns: 1fr; }
  .user-name { display: none; }
  .top-header { padding: 0 18px; }
  .modal.route-page-modal { left: 0; }
}
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  padding: 14px 20px;
  border-radius: var(--radius);
  color: white;
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 400px;
}
.toast.success { background: #16a34a; }
.toast.error { background: #dc2626; }
.toast.info { background: #2563eb; }
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
.toast.hiding { animation: fadeOut 0.3s ease-out forwards; }

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .search-input,
  .filter-bar .filter-select,
  .filter-bar .btn { width: 100%; }
}