/**
 * BuyLocal Market Technologies — Paystack & Monnify Style Merchant Dashboard CSS
 * Primary Brand Color: BuyLocal Deep Forest Green (#006838)
 * High-end, high-contrast, scalable enterprise dashboard layout.
 */

:root {
  /* Brand Palette */
  --color-primary: #006838;
  --color-primary-dark: #004d2a;
  --color-primary-light: #059669;
  --color-primary-subtle: #ecfdf5;
  --color-primary-border: #a7f3d0;

  --color-accent-yellow: #facc15;
  --color-amber: #d97706;
  --color-amber-light: #fffbeb;
  --color-amber-border: #fde68a;
  --color-blue: #0284c7;
  --color-blue-light: #f0f9ff;
  --color-blue-border: #bae6fd;
  --color-purple: #7c3aed;
  --color-purple-light: #f5f3ff;
  --color-purple-border: #ddd6fe;
  --color-red: #dc2626;
  --color-red-light: #fef2f2;
  --color-red-border: #fecaca;

  /* Surfaces & Backgrounds */
  --bg-page: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #f8fafc;

  /* Borders & Dividers */
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-focus: #006838;

  /* Typography */
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Dimensions & Spacing */
  --sidebar-width: 275px;
  --topbar-height: 64px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08), 0 3px 6px rgba(0, 0, 0, 0.04);
  --shadow-primary: 0 4px 12px rgba(0, 104, 56, 0.22);

  --radius-xs: 2px;
  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-full: 4px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.merchant-body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================================
   PAYSTACK / MONNIFY 2-COLUMN DASHBOARD LAYOUT
   ============================================================================ */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ============================================================================
   SIDEBAR (Monnify / Paystack Vertical Left Navigation)
   ============================================================================ */
.dashboard-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 200;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.jiji-brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-2d-icon {
  display: block;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.4px;
}

.brand-accent {
  color: var(--color-primary);
}

.brand-portal-tag {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--color-primary);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  margin-left: 4px;
  letter-spacing: 0.5px;
}

.sidebar-close-btn {
  display: none;
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
}

/* Paystack-style Workspace / Store Switcher Box */
.sidebar-store-card {
  margin: 12px 14px;
  padding: 12px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.store-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.store-avatar {
  background: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.store-meta {
  flex: 1;
  min-width: 0;
}

.store-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.store-display-name {
  display: block;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-terminal-id {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  margin-top: 1px;
}

.store-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

.badge-verified {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #ffffff;
  background: #006838;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 104, 56, 0.25);
  border: 1px solid #004d2a;
  text-transform: uppercase;
  flex-shrink: 0;
}

.verified-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  stroke: #ffffff;
  stroke-width: 3.2;
}

.badge-town {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  text-align: right;
  letter-spacing: 0.2px;
}

/* Sidebar Navigation Items */
.sidebar-nav {
  flex: 1;
  padding: 6px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.8px;
  padding: 14px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  white-space: nowrap !important;
}

.nav-item:hover {
  background: #f1f5f9;
  color: var(--color-primary);
}

.nav-item.active {
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  font-weight: 800;
  border-left: 3px solid var(--color-primary);
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-icon svg {
  width: 17px;
  height: 17px;
}

.nav-title {
  flex: 1;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.nav-sub-tag {
  font-size: 9px;
  font-weight: 800;
  background: #fef08a;
  color: #854d0e;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.nav-arrow {
  font-size: 12px;
  color: var(--text-dim);
}

/* Sidebar Footer (Status Toggle) */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-light);
  background: #ffffff;
}

.store-status-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.status-info {
  display: flex;
  flex-direction: column;
}

.status-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.status-val {
  font-size: 12px;
  font-weight: 800;
}

.toggle-switch-btn {
  width: 44px;
  height: 24px;
  background: #cbd5e1;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  position: relative;
  transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 3px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  flex-shrink: 0;
}

.toggle-switch-btn.active {
  background: #006838;
}

.switch-knob {
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  display: block;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.toggle-switch-btn.active .switch-knob {
  transform: translateX(20px);
}

/* ============================================================================
   MAIN CONTENT WRAPPER
   ============================================================================ */
.dashboard-main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

/* ============================================================================
   TOPBAR (Monnify Clean White Bar)
   ============================================================================ */
.dashboard-topbar {
  height: var(--topbar-height);
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hamburger-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.hamburger-btn span {
  width: 20px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
}

.topbar-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.topbar-breadcrumb {
  font-size: 11px;
  color: var(--text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.town-indicator-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.btn-demo-order {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.btn-demo-order:hover {
  background: #fef3c7;
  border-color: #f59e0b;
}

/* Staff Table & Role Badges */
.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.role-pill.role-manager {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.role-pill.role-cashier {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

.role-pill.role-inventory {
  background: #fefce8;
  color: #854d0e;
  border: 1px solid #fef08a;
}

.status-badge-active {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  background: #ecfdf5;
  color: #047857;
  font-size: 11px;
  font-weight: 700;
}

.status-badge-suspended {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 700;
}

.btn-staff-action {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  margin-left: 4px;
  transition: all 0.15s ease;
}

.btn-staff-action:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.btn-staff-action.btn-danger {
  color: #dc2626;
  border-color: #fecaca;
}

.btn-staff-action.btn-danger:hover {
  background: #fef2f2;
  border-color: #f87171;
}

.staff-avatar-initials {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: #006838;
  flex-shrink: 0;
}

.topbar-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.topbar-status-badge.status-open {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.topbar-status-badge.status-closed {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.status-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: currentColor;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

.btn-view-store {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  color: var(--color-primary);
  border: 1px solid var(--color-primary-border);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-view-store:hover {
  background: var(--color-primary-subtle);
}

/* ============================================================================
   DASHBOARD CONTENT
   ============================================================================ */
.dashboard-content {
  flex: 1;
  padding: 24px 28px;
}

/* ============================================================================
   PAYSTACK / MONNIFY METRICS GRID (4-Card Ribbon)
   ============================================================================ */
.monnify-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1180px) {
  .monnify-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width: 640px) {
  .monnify-metrics-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.stat-card {
  background: #ffffff;
  border: 1px solid #e9edf5;
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: 0 1px 3px 0 rgba(16, 24, 40, 0.04), 0 1px 2px -1px rgba(16, 24, 40, 0.02);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: opacity 0.2s ease;
}

.stat-card.card-revenue::before { background: linear-gradient(90deg, #006838, #10b981); }
.stat-card.card-escrow::before  { background: linear-gradient(90deg, #4f46e5, #818cf8); }
.stat-card.card-pending::before { background: linear-gradient(90deg, #d97706, #fbbf24); }
.stat-card.card-ready::before   { background: linear-gradient(90deg, #0284c7, #38bdf8); }

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
  border-color: #cbd5e1;
}

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.stat-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.stat-card:hover .stat-icon-wrapper {
  transform: scale(1.05);
}

.stat-icon-wrapper svg {
  width: 18px;
  height: 18px;
}

.bg-revenue-light { background: #ecfdf5; border: 1px solid #a7f3d0; color: #006838; }
.bg-escrow-light  { background: #eef2ff; border: 1px solid #c7d2fe; color: #4f46e5; }
.bg-pending-light { background: #fffbeb; border: 1px solid #fde68a; color: #d97706; }
.bg-ready-light   { background: #f0f9ff; border: 1px solid #bae6fd; color: #0284c7; }

/* Backward compatibility */
.bg-emerald-light { background: #ecfdf5; border: 1px solid #a7f3d0; color: #006838; }
.bg-blue-light    { background: #f0f9ff; border: 1px solid #bae6fd; color: #0284c7; }
.bg-green-light   { background: #ecfdf5; border: 1px solid #a7f3d0; color: #006838; }
.bg-purple-light  { background: #eef2ff; border: 1px solid #c7d2fe; color: #4f46e5; }

.stat-val-row {
  display: block;
  margin-bottom: 4px;
  min-width: 0;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.3px;
  line-height: 1.25;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
}

.stat-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.pill-revenue { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.pill-escrow  { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
.pill-pending { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.pill-ready   { background: #f0f9ff; color: #0284c7; border: 1px solid #bae6fd; }

/* Backward compatibility for pills */
.pill-amber   { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.pill-blue    { background: #f0f9ff; color: #0284c7; border: 1px solid #bae6fd; }
.pill-green   { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.pill-purple  { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }

.stat-subtext {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 500;
  line-height: 1.35;
}

.text-emerald { color: #006838; }
.text-indigo  { color: #4f46e5; }
.text-amber   { color: #d97706; }
.text-sky     { color: #0284c7; }
.text-blue    { color: #0284c7; }
.text-purple  { color: #4f46e5; }

/* ============================================================================
   PANEL CARD (Monnify White Card Container)
   ============================================================================ */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
  margin-bottom: 24px;
}

.panel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.section-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Status Filter Tabs (Monnify Sub-Tabs) */
.order-status-tabs {
  display: flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 3px;
}

.status-tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.status-tab-btn.active {
  background: #ffffff;
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.btn-secondary-action {
  background: #ffffff;
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary-action:hover {
  background: var(--bg-subtle);
  color: var(--color-primary);
}

.btn-primary-action {
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary-action:hover {
  background: var(--color-primary-dark);
}

.btn-secondary-action {
  background: #ffffff;
  color: #1e293b;
  border: 1.5px solid var(--border-medium);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-secondary-action:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.barcode-input-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.barcode-input-row .form-control {
  flex: 1;
}

.btn-lookup {
  background: #f1f5f9;
  border: 1.5px solid var(--border-medium);
  color: #1e293b;
  font-size: 12px;
  font-weight: 700;
  padding: 0 14px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-lookup:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #006838;
}

.barcode-verified-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #006838;
  margin-top: 6px;
}

/* ============================================================================
   TAB 1: LIVE ORDERS CARDS
   ============================================================================ */
.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 18px;
}

.orders-empty-banner,
.col-span-full {
  grid-column: 1 / -1;
  width: 100%;
  padding: 16px 0;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.order-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--color-primary);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.order-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.order-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.order-ref {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
}

.order-time {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.order-status-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  display: inline-block;
}

/* Date & Time vertical rhythm in tables */
.table-datetime {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.datetime-day {
  font-weight: 700;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.2;
}

.datetime-time {
  font-size: 11px;
  color: #64748b;
  font-family: var(--font-mono);
  font-weight: 500;
  line-height: 1.2;
}

/* Payout status badge - strictly single horizontal line */
.payout-status-badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  line-height: 1;
}

.status-placed {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.status-ready {
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.status-delivered {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.order-customer-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.customer-name {
  color: var(--text-main);
  font-weight: 700;
}

.customer-dest {
  color: var(--text-muted);
}

.order-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.order-items-table td {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-light);
}

.order-item-qty {
  color: var(--color-primary);
  font-weight: 800;
  width: 32px;
}

.order-item-price {
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-main);
}

.order-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  flex-wrap: nowrap;
}

.order-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap !important;
}

.order-total-amount {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap !important;
}

.btn-mark-ready {
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-primary);
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  word-break: keep-all !important;
  line-height: 1.2;
}

.btn-mark-ready:hover {
  background: var(--color-primary-dark);
}

.order-ready-badge {
  font-size: 11px;
  font-weight: 700;
  color: #0284c7;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

/* ============================================================================
   TAB 2: SHELF INVENTORY (Monnify Table Style)
   ============================================================================ */
.table-search-box {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0 10px;
}

.table-search-box:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(0, 104, 56, 0.15);
}

.search-icon {
  font-size: 13px;
  margin-right: 6px;
}

.search-input {
  border: none;
  outline: none;
  font-size: 12px;
  padding: 8px 0;
  min-width: 220px;
  color: var(--text-main);
}

.select-filter {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 12px;
  outline: none;
  color: var(--text-secondary);
}

.table-container {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.monnify-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.monnify-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
}

.monnify-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.monnify-table tr:hover {
  background: #f8fafc;
}

/* Table alignment utilities */
.monnify-table th.text-center,
.monnify-table td.text-center {
  text-align: center !important;
}

.monnify-table th.text-right,
.monnify-table td.text-right {
  text-align: right !important;
}

.monnify-table th.col-tight,
.monnify-table td.col-tight {
  width: 1%;
  white-space: nowrap !important;
}

/* Guarantee single-line display for all currency amounts & shelf prices */
.monnify-table td strong.font-mono,
.stat-value,
.order-total-amount,
.order-item-price,
.price-value,
.nowrap-price {
  white-space: nowrap !important;
  display: inline-block;
}

.table-product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.table-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.table-prod-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.table-prod-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.table-prod-barcode {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  letter-spacing: 0.3px;
  line-height: 1;
}

/* Table Category Pill Styling */
.table-category-pill {
  display: inline-flex;
  align-items: center;
  gap: 5.5px;
  padding: 3.5px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1px;
  white-space: nowrap;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  line-height: 1.25;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.15s ease;
}

.table-category-pill svg {
  flex-shrink: 0;
  width: 11.5px;
  height: 11.5px;
  opacity: 0.75;
}

/* Category-specific color accents for quick visual scanning */
.table-category-pill[data-cat="drinks"] {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #bae6fd;
}
.table-category-pill[data-cat="drinks"] svg {
  stroke: #0284c7;
}

.table-category-pill[data-cat="food"] {
  background: #fefce8;
  color: #854d0e;
  border-color: #fef08a;
}
.table-category-pill[data-cat="food"] svg {
  stroke: #a16207;
}

.table-category-pill[data-cat="oils"] {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}
.table-category-pill[data-cat="oils"] svg {
  stroke: #ea580c;
}

.table-category-pill[data-cat="breakfast"] {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}
.table-category-pill[data-cat="breakfast"] svg {
  stroke: #b45309;
}

.table-category-pill[data-cat="health"] {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.table-category-pill[data-cat="health"] svg {
  stroke: #059669;
}

.table-category-pill[data-cat="snacks"] {
  background: #fdf2f8;
  color: #be185d;
  border-color: #fbcfe8;
}
.table-category-pill[data-cat="snacks"] svg {
  stroke: #db2777;
}

.table-category-pill[data-cat="baby"] {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}
.table-category-pill[data-cat="baby"] svg {
  stroke: #7c3aed;
}

.table-category-pill[data-cat="household"] {
  background: #f0fdfa;
  color: #0f766e;
  border-color: #99f6e4;
}
.table-category-pill[data-cat="household"] svg {
  stroke: #0d9488;
}

.table-category-pill[data-cat="beauty"] {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}
.table-category-pill[data-cat="beauty"] svg {
  stroke: #e11d48;
}

.table-category-pill[data-cat="tech"] {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}
.table-category-pill[data-cat="tech"] svg {
  stroke: #4f46e5;
}

/* Availability Status in Table */
.table-availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.table-availability-badge.status-active {
  color: #047857;
}

.table-availability-badge.status-hidden {
  color: #dc2626;
}

.table-availability-badge .status-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.table-availability-badge.status-active .status-dot {
  background: #10b981;
  box-shadow: 0 0 0 2px #d1fae5;
}

.table-availability-badge.status-hidden .status-dot {
  background: #ef4444;
  box-shadow: 0 0 0 2px #fee2e2;
}

/* Stock Toggle Switchboard Button */
.btn-toggle-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-toggle-stock.stock-in {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.btn-toggle-stock.stock-in:hover {
  background: #d1fae5;
}

.btn-toggle-stock.stock-out {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.btn-toggle-stock.stock-out:hover {
  background: #fee2e2;
}

.btn-edit-item {
  background: #ffffff;
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-edit-item:hover {
  background: var(--bg-subtle);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* ============================================================================
   TAB 3: SCAN & PRICE
   ============================================================================ */
.scan-grid-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .scan-grid-layout {
    grid-template-columns: 1fr;
  }
}

.badge-fmcg {
  font-size: 10px;
  font-weight: 800;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.scan-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.label-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.barcode-input-row {
  display: flex;
  gap: 8px;
}

.form-control {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  transition: all 0.15s ease;
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 104, 56, 0.15);
}

.form-control.font-mono,
.font-mono,
.font-heading {
  font-family: var(--font-sans);
  letter-spacing: normal;
}

.btn-lookup {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.product-preview-card {
  background: #f0fdf4;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #e2e8f0;
}

.preview-title {
  display: block;
  font-size: 13px;
  color: #064e3b;
}

.preview-meta {
  font-size: 11px;
  color: #047857;
  display: block;
  margin: 2px 0 4px;
}

.verified-tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--color-primary);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}


.form-helper {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-publish {
  padding: 12px;
  font-size: 13px;
  justify-content: center;
}

/* Presets */
.presets-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preset-item {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-item:hover {
  border-color: var(--color-primary);
  background: #f0fdf4;
  transform: translateX(3px);
}

.preset-icon {
  font-size: 20px;
}

.preset-info {
  flex: 1;
}

.preset-info strong {
  display: block;
  font-size: 13px;
  color: var(--text-main);
}

.preset-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.preset-arrow {
  color: var(--color-primary);
  font-weight: bold;
}

/* ============================================================================
   TAB 4 & 5: ESCROW & PROFILE
   ============================================================================ */
.escrow-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 800px) {
  .escrow-grid-layout {
    grid-template-columns: 1fr;
  }
}

.escrow-steps-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-card {
  display: flex;
  gap: 12px;
}

.step-digit {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ecfdf5;
  color: var(--color-primary);
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid #a7f3d0;
}

.step-title {
  color: #0f172a;
  font-size: 13px;
  display: block;
  margin-bottom: 2px;
}

.step-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 11px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 13px;
}

.info-label {
  color: var(--text-muted);
}

.info-value {
  color: #0f172a;
}

.badge-verified-pill {
  font-size: 11px;
  font-weight: 800;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}

/* ============================================================================
   MODALS & TOASTS
   ============================================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  overflow-y: auto;
}

@media (max-height: 820px) {
  .modal-backdrop {
    align-items: flex-start;
    padding-top: 24px;
    padding-bottom: 30px;
  }
}

.modal-dialog {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 20px; /* Smooth, rounded form edges */
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(0, 0, 0, 0.06);
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
  overflow: hidden; /* Clips header background cleanly to the rounded corners */
}

.modal-dialog-md {
  max-width: 580px;
}

.modal-dialog-lg {
  max-width: 680px;
  border-radius: 22px; /* Generous, premium curved corners */
  overflow: hidden;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  background: #ffffff;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  flex-shrink: 0;
}

.modal-dialog-lg .modal-header {
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}

.btn-close-modal {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.btn-close-modal:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  scrollbar-width: thin;
}

/* ============================================================================
   CUSTOM SEARCHABLE CATEGORY SELECTOR (Never cut off by viewport or taskbar)
   ============================================================================ */
.custom-select-wrapper {
  position: relative;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.custom-select-trigger {
  width: 100%;
  height: 42px;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: #1e293b;
  background: #ffffff;
  border: 1.5px solid var(--border-medium);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  box-sizing: border-box;
  user-select: none;
}

.custom-select-trigger:hover {
  border-color: #94a3b8;
}

.custom-select-trigger.active,
.custom-select-trigger:focus {
  border-color: #006838;
  box-shadow: 0 0 0 3px rgba(0, 104, 56, 0.12);
  outline: none;
}

.custom-select-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: #1e293b;
  flex: 1;
}

.custom-select-label.is-placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.custom-select-chevron {
  color: #64748b;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 8px;
}

.custom-select-trigger.active .custom-select-chevron {
  transform: rotate(180deg);
  color: #006838;
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22), 0 4px 10px rgba(0, 0, 0, 0.08);
  z-index: 1050;
  overflow: hidden;
  animation: dropdownFadeIn 0.15s ease-out;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.custom-select-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.custom-select-search-field {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 13px;
  color: #1e293b;
  outline: none;
  font-family: var(--font-sans);
}

.custom-select-search-field::placeholder {
  color: #94a3b8;
  font-size: 12.5px;
}

.custom-select-scroll-area {
  max-height: 220px;
  overflow-y: auto;
  padding: 6px 0 20px; /* Generous bottom padding ensuring last category is never clipped! */
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
}

.custom-select-scroll-area::-webkit-scrollbar {
  width: 6px;
}

.custom-select-scroll-area::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.custom-select-optgroup {
  padding: 10px 14px 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #006838;
}

.custom-select-option {
  padding: 9px 14px 9px 24px;
  font-size: 13px;
  color: #1e293b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.12s ease;
}

.custom-select-option:hover {
  background: #f0fdf4;
  color: #006838;
  font-weight: 600;
}

.custom-select-option.is-selected {
  background: #e6f4ea;
  color: #006838;
  font-weight: 700;
}

.custom-select-option.is-hidden,
.custom-select-optgroup.is-hidden {
  display: none !important;
}

.custom-select-no-results {
  padding: 16px;
  text-align: center;
  font-size: 12.5px;
  color: #94a3b8;
}

/* Form Groups & Field Spacing */
.form-group {
  margin-bottom: 20px; /* Healthy breathing space between fields */
  display: flex;
  flex-direction: column;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px; /* Space between row and next field */
}

.form-row-2 .form-group {
  margin-bottom: 0;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: flex-start !important;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px; /* Space between label and input */
  line-height: 1.2;
}

.form-control {
  width: 100%;
  height: 42px;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-main);
  background: #ffffff;
  border: 1.5px solid var(--border-medium);
  border-radius: 10px; /* Rounded input corners */
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 104, 56, 0.12);
  background: #ffffff;
}

.form-control::placeholder {
  color: #94a3b8;
  font-size: 13px;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* Price Input with ₦ Symbol - Zero duplicate border or padding */
.price-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.price-input-wrapper .currency-symbol {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  font-weight: 700;
  color: #006838;
  pointer-events: none;
  z-index: 2;
  line-height: 1;
  user-select: none;
}

.price-input-wrapper .price-control {
  width: 100%;
  height: 42px;
  padding-left: 34px !important;
  padding-right: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  background: #ffffff;
  border: 1.5px solid var(--border-medium);
  border-radius: 10px;
  box-sizing: border-box;
}

.price-input-wrapper .price-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 104, 56, 0.12);
  outline: none;
}

.modal-product-summary {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px; /* Space above action buttons */
  padding-top: 4px;
}

.btn-cancel {
  background: #f1f5f9;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: 10px; /* Rounded cancel button */
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cancel:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.modal-actions .btn-primary-action {
  border-radius: 10px; /* Rounded publish button */
  padding: 9px 22px;
  font-size: 13px;
  font-weight: 800;
}

/* Toast */
.merchant-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #006838;
  border: 1px solid #a7f3d0;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  display: none;
  animation: toastSlide 0.2s ease-out;
}

.merchant-toast.show {
  display: block;
}

@keyframes toastSlide {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.spinner {
  width: 26px;
  height: 26px;
  border: 3px solid rgba(0, 104, 56, 0.15);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}


.label-required {
  color: #dc2626 !important;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  margin-left: 2px;
  display: inline !important;
}

.badge-optional {
  font-size: 10px;
  font-weight: 600;
  background: #f1f5f9;
  color: #64748b;
  padding: 2px 7px;
  border-radius: 9999px;
  margin-left: auto;
  border: 1px solid var(--border-light);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* Inventory Helper Notice Banner */
.inventory-tip-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #065f46;
  line-height: 1.4;
}

.inventory-tip-banner .tip-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.inventory-tip-banner .tip-content strong {
  color: #047857;
  font-weight: 700;
  margin-right: 4px;
}

/* Scan & Price Alternative Quick Switch Banner */
.scan-mode-toggle-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.scan-mode-toggle-banner .mode-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scan-mode-toggle-banner .mode-emoji {
  font-size: 22px;
  flex-shrink: 0;
}

.scan-mode-toggle-banner .mode-info strong {
  font-size: 13px;
  color: #0f172a;
}

.btn-secondary-action {
  background: #ffffff;
  color: #006838;
  border: 1.5px solid #006838;
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-secondary-action:hover {
  background: #f0fdf4;
}

/* Product Image Options (Upload, Take Photo) */
.image-mode-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.image-action-btn,
.image-mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
  background: #ffffff;
  border: 1.5px solid var(--border-medium);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  box-sizing: border-box;
}

.image-action-btn svg,
.image-mode-btn svg {
  flex-shrink: 0;
  stroke: #64748b;
  transition: stroke 0.2s ease;
}

.image-action-btn:hover,
.image-mode-btn:hover {
  background: #f8fafc;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.image-action-btn:hover svg,
.image-mode-btn:hover svg {
  stroke: var(--color-primary);
}

.image-action-btn:active,
.image-mode-btn:active {
  transform: translateY(1px);
}

.image-hint-text {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.4;
}

.image-preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1.5px dashed var(--border-medium);
  border-radius: 10px;
}

.image-preview-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-light);
  background: #ffffff;
}

.image-preview-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.image-preview-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-preview-status {
  font-size: 11px;
  color: #006838;
  font-weight: 600;
}

.btn-clear-preview {
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.btn-clear-preview:hover {
  background: #fee2e2;
}

.hidden {
  display: none !important;
}

/* ============================================================================
   RESPONSIVE (MOBILE & TABLET COLLAPSIBLE SIDEBAR)
   ============================================================================ */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 150;
}

@media (max-width: 1024px) {
  .dashboard-sidebar {
    transform: translateX(-100%);
  }

  .dashboard-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop.open {
    display: block;
  }

  .sidebar-close-btn {
    display: block;
  }

  .dashboard-main-wrapper {
    margin-left: 0;
  }

  .hamburger-btn {
    display: flex;
  }

  .dashboard-topbar {
    padding: 0 16px;
  }

  .dashboard-content {
    padding: 18px 16px;
  }

  .town-indicator-pill {
    display: none;
  }
}

/* ============================================================================
   CAMERA VIEWFINDER WITH SNAP FRAME-GUIDE
   ============================================================================ */
.camera-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.camera-container {
  width: 100%;
  max-width: 480px;
  background: #0f172a;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
}

.camera-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #1e293b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.camera-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.2px;
}

.btn-camera-close {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.btn-camera-close:hover {
  color: #ffffff;
}

.camera-viewport-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #020617;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-viewport-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Snap Frame-Guide Overlay with Vignette Cutout */
.camera-frame-guide {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 78%;
  height: 78%;
  border: 1.5px dashed rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 12px;
}

/* 4 Corner Bracket Guides */
.guide-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: #10b981;
  border-style: solid;
  border-width: 0;
}

.guide-corner.top-left {
  top: -2px;
  left: -2px;
  border-top-width: 3.5px;
  border-left-width: 3.5px;
  border-top-left-radius: 8px;
}

.guide-corner.top-right {
  top: -2px;
  right: -2px;
  border-top-width: 3.5px;
  border-right-width: 3.5px;
  border-top-right-radius: 8px;
}

.guide-corner.bottom-left {
  bottom: -2px;
  left: -2px;
  border-bottom-width: 3.5px;
  border-left-width: 3.5px;
  border-bottom-left-radius: 8px;
}

.guide-corner.bottom-right {
  bottom: -2px;
  right: -2px;
  border-bottom-width: 3.5px;
  border-right-width: 3.5px;
  border-bottom-right-radius: 8px;
}

.guide-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.guide-crosshair::before,
.guide-crosshair::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.4);
}

.guide-crosshair::before {
  top: 9px;
  left: 0;
  width: 20px;
  height: 2px;
}

.guide-crosshair::after {
  top: 0;
  left: 9px;
  width: 2px;
  height: 20px;
}

.guide-instruction {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.65);
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.camera-loading-overlay {
  position: absolute;
  inset: 0;
  background: #020617;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  z-index: 5;
}

.camera-loading-overlay.hidden {
  display: none !important;
}

.camera-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #10b981;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.camera-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #0f172a;
}

.btn-camera-cancel {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-camera-cancel:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.btn-camera-shutter {
  position: relative;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: transparent;
  border: 4px solid #ffffff;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.btn-camera-shutter:hover {
  transform: scale(1.06);
}

.btn-camera-shutter:active {
  transform: scale(0.92);
}

.shutter-inner-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #10b981;
  transition: background 0.15s ease;
}

.btn-camera-shutter:hover .shutter-inner-circle {
  background: #059669;
}

/* ============================================================================
   FEATURE 1: TOWN DISPATCH & MERCHANT SUPPORT HOTLINE
   ============================================================================ */
.btn-support-link {
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  position: relative;
}

.support-live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
  margin-left: auto;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.btn-topbar-support {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-topbar-support:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.support-status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

#modal-dispatch-support .modal-dialog {
  max-width: 620px;
  width: 94%;
}

#modal-dispatch-support .modal-body {
  padding-bottom: 24px;
}

@media (min-width: 768px) {
  #modal-dispatch-support .modal-dialog {
    max-width: 640px;
  }
}

.dispatch-support-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.support-banner-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.support-town-badge {
  font-size: 11px;
  font-weight: 700;
  color: #006838;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.support-hours {
  font-size: 11px;
  color: #15803d;
  font-weight: 500;
}

.support-banner-text {
  font-size: 13px;
  color: #166534;
  line-height: 1.45;
}

.support-action-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.support-channel-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.support-channel-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.channel-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bg-whatsapp {
  background: #25d366;
  color: #ffffff;
}

.bg-phone {
  background: #006838;
  color: #ffffff;
}

.channel-info {
  flex: 1;
}

.channel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.channel-title {
  font-size: 14px;
  color: #0f172a;
  font-family: var(--font-heading);
}

.channel-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  background: #ecfdf5;
  color: #059669;
}

.phone-badge {
  font-family: var(--font-mono);
  background: #f1f5f9;
  color: #475569;
}

.channel-desc {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}

.channel-link-text {
  font-size: 12px;
  font-weight: 700;
  color: #25d366;
}

.channel-link-text.text-forest {
  color: #006838;
}

.support-faq-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 14px;
}

.faq-heading {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  color: #475569;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.faq-list {
  list-style: none;
  font-size: 12px;
  color: #334155;
  line-height: 1.5;
  padding-left: 0;
}

.faq-list li {
  margin-bottom: 6px;
  padding-left: 14px;
  position: relative;
}

.faq-list li::before {
  content: '•';
  position: absolute;
  left: 2px;
  color: #006838;
  font-weight: bold;
}

/* ============================================================================
   FEATURE 2 & PRINT: ORDER PACKING SLIPS
   ============================================================================ */
.btn-print-slip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  word-break: keep-all !important;
  line-height: 1.2;
}

.btn-print-slip:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.slip-modal-subtitle {
  font-size: 11px !important;
  color: #64748b !important;
  font-weight: 500 !important;
  margin: 3px 0 0 0 !important;
  line-height: 1.35 !important;
}

#modal-print-packing-slip .modal-actions,
.modal-actions.modal-actions-center {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 16px !important;
  padding: 16px 24px 20px !important;
  margin-top: 0 !important;
  border-top: 1px solid var(--border-light) !important;
  background: #ffffff !important;
}

.slip-paper-preview {
  background: #ffffff;
  border: 1px dashed #94a3b8;
  border-radius: 4px;
  padding: 18px 16px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  line-height: 1.45;
  color: #000000;
  max-width: 380px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.print-slip-thermal-container {
  display: none;
}

/* Thermal receipt content structure */
.slip-header {
  text-align: center;
  margin-bottom: 8px;
}

.slip-brand {
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 0.08em;
}

.slip-town {
  font-size: 11px;
  font-weight: bold;
}

.slip-store {
  font-size: 13px;
  font-weight: bold;
  margin-top: 4px;
}

.slip-terminal {
  font-size: 11px;
}

.slip-divider {
  overflow: hidden;
  text-align: center;
  margin: 6px 0;
  letter-spacing: 0.1em;
  font-size: 11px;
}

/* Prominent Package Bag Attachment Tag (For Poly-Bag Identification) */
.slip-package-tag {
  border: 2px solid #000000;
  padding: 8px 10px;
  margin: 8px 0;
  text-align: center;
  background: #f8fafc;
}

.slip-tag-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #000;
  margin-bottom: 4px;
}

.slip-tag-customer {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin-bottom: 4px;
  color: #000;
}

.slip-tag-dest {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 4px;
  color: #000;
}

.slip-tag-ref {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #000;
}

.slip-tag-sub {
  font-size: 9px;
  font-weight: 700;
  color: #333333;
  margin-top: 5px;
  border-top: 1px dashed #666;
  padding-top: 4px;
  letter-spacing: 0.04em;
}

.slip-meta {
  margin-bottom: 6px;
}

.slip-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
  font-size: 12px;
}

.slip-items-title {
  font-weight: bold;
  margin: 6px 0 4px 0;
  font-size: 12px;
}

.slip-item-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 12px;
}

.slip-total-row {
  font-weight: bold;
  font-size: 14px;
  margin-top: 4px;
}

.slip-otp-box {
  border: 2px dashed #000;
  padding: 8px;
  text-align: center;
  margin: 8px 0;
}

.slip-otp-label {
  font-size: 11px;
  font-weight: bold;
}

.slip-otp-val {
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 0.2em;
  margin: 4px 0;
}

.slip-otp-sub {
  font-size: 10px;
}

.slip-footer {
  text-align: center;
  font-size: 11px;
  margin-top: 8px;
  color: #333;
}

/* Print CSS */
@media print {
  body * {
    visibility: hidden !important;
  }
  #print-slip-thermal-container,
  #print-slip-thermal-container * {
    visibility: visible !important;
  }
  #print-slip-thermal-container {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 80mm !important;
    margin: 0 !important;
    padding: 6mm 4mm !important;
    background: #fff !important;
    color: #000 !important;
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 12px !important;
  }
  @page {
    size: auto;
    margin: 2mm;
  }
}

/* ============================================================================
   FEATURE 3: DAILY SALES SUMMARY & RECONCILIATION
   ============================================================================ */
.daily-reconcile-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 18px;
}

.reconcile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dcfce7;
}

.reconcile-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #006838;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.reconcile-heading {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  font-family: var(--font-heading);
}

.reconcile-sub {
  font-size: 11px;
  color: #64748b;
}

.btn-subtle-reconcile {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid #86efac;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #006838;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-subtle-reconcile:hover {
  background: #006838;
  color: #ffffff;
  border-color: #006838;
}

.reconcile-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.reconcile-metric-item {
  display: flex;
  flex-direction: column;
}

.reconcile-metric-item .metric-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.reconcile-metric-item .metric-value {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.reconcile-metric-item .text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .reconcile-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* ============================================================================
   FEATURE 4: STAFF / CASHIER PIN LOCK
   ============================================================================ */
.payouts-lock-card {
  max-width: 360px;
  margin: 40px auto;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.lock-shield-badge {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px auto;
  border-radius: 50%;
  background: #ecfdf5;
  border: 2px solid #a7f3d0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lock-title {
  font-size: 18px;
  font-family: var(--font-heading);
  color: var(--text-main);
  margin-bottom: 6px;
}

.lock-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 20px;
}

.pin-display {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  transition: all 0.15s ease;
}

.pin-dot.filled {
  background: #006838;
  border-color: #006838;
  transform: scale(1.15);
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 260px;
  margin: 0 auto 16px auto;
}

.pin-key {
  height: 48px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 18px;
  font-weight: 600;
  font-family: var(--font-heading);
  color: #0f172a;
  cursor: pointer;
  transition: all 0.1s ease;
}

.pin-key:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.pin-key:active {
  transform: scale(0.94);
  background: #e2e8f0;
}

.pin-key-action {
  font-size: 13px;
  color: #64748b;
}

.lock-helper {
  margin-top: 10px;
}

.payouts-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
}

.badge-manager-unlocked {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #006838;
}

.btn-relock-action {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-relock-action:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* ============================================================================
   DEDICATED MODERN MERCHANT AUTHENTICATION VIEW
   ============================================================================ */
/* Zero-Flicker State Lock for Initial Load & Hot Reload */
html.is-unauthenticated #merchant-auth-view {
  display: flex !important;
}
html.is-unauthenticated #dashboard-layout {
  display: none !important;
}

html.is-authenticated #merchant-auth-view {
  display: none !important;
}
html.is-authenticated #dashboard-layout {
  display: flex !important;
}

.merchant-auth-view {
  min-height: 100vh;
  width: 100%;
  background: radial-gradient(circle at 50% 0%, #ecfdf5 0%, #f8fafc 50%, #f1f5f9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  z-index: 50;
}

.auth-card-wrapper {
  max-width: 440px;
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 20px 45px -15px rgba(15, 23, 42, 0.08), 0 0 1px 1px rgba(15, 23, 42, 0.04);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
}

.auth-header {
  margin-bottom: 26px;
  text-align: center;
}

.auth-logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.auth-brand .brand-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.6px;
  line-height: 1;
}

.auth-brand .brand-accent {
  color: var(--color-primary);
  font-weight: 900;
}

.auth-brand .brand-2d-icon {
  width: 46px;
  height: 34px;
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin-bottom: 0;
  line-height: 1.25;
  text-align: center !important;
  width: 100%;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.auth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-label {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.1px;
}

.auth-label-helper {
  font-size: 11px;
  color: #64748b;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: #0f172a;
  background: #ffffff;
  transition: all 0.15s ease;
}

.auth-input-wrapper .auth-input-icon + .auth-input {
  padding-left: 42px;
}

.auth-input:focus {
  outline: none;
  border-color: #006838;
  box-shadow: 0 0 0 3px rgba(0, 104, 56, 0.12);
}

.auth-input.font-mono {
  font-family: var(--font-sans);
  letter-spacing: normal;
  font-size: 14px;
}

.auth-eye-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.auth-eye-btn:hover {
  color: #334155;
}

.auth-submit-btn {
  background: linear-gradient(135deg, #006838 0%, #004d2a 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 13px 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap !important;
  box-shadow: 0 4px 14px rgba(0, 104, 56, 0.25);
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  margin-top: 6px;
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 104, 56, 0.32);
}

.auth-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.auth-footer-box {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-footer-text {
  font-size: 12px;
  color: #64748b;
}

.auth-register-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: #006838;
  text-decoration: none;
  white-space: nowrap !important;
  transition: all 0.15s ease;
}

.auth-register-btn:hover {
  background: #f1f5f9;
  border-color: #006838;
}

.auth-trust-row {
  margin-top: 20px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

