:root {
  --admin-primary: #0f766e;
  --admin-primary-hover: #0d5c56;
  --admin-primary-light: #f0fdf4;
  --admin-primary-glow: rgba(15, 118, 110, 0.22);
  --admin-sidebar-bg: #ffffff;
  --admin-sidebar-hover: #f1f5f9;
  --admin-sidebar-text: #334155;
  --admin-dark: #0f172a;
  --admin-bg: #f8fafc;
  --admin-card-bg: #ffffff;
  --admin-border: #e2e8f0;
  --admin-border-subtle: #f1f5f9;
  --admin-text-main: #0f172a;
  --admin-text-muted: #64748b;
  --admin-success: #10b981;
  --admin-warning: #f59e0b;
  --admin-danger: #ef4444;
  --admin-info: #0284c7;
  --admin-radius-xs: 4px;
  --admin-radius-sm: 6px;
  --admin-radius: 8px;
  --admin-radius-lg: 10px;
  --admin-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --admin-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --admin-shadow-hover: 0 6px 16px -2px rgba(15, 23, 42, 0.07), 0 1px 4px -1px rgba(15, 23, 42, 0.03);
  --admin-shadow-modal: 0 20px 40px -10px rgba(15, 23, 42, 0.22);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Hind Siliguri', 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--admin-bg);
  color: var(--admin-text-main);
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 0.88rem;
}

/* Global Custom Modern Slim Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Admin Form Elements Polish (Scoped to Admin Views Only) */
.admin-wrapper input[type="text"],
.admin-wrapper input[type="password"],
.admin-wrapper input[type="email"],
.admin-wrapper input[type="number"],
.admin-wrapper input[type="search"],
.admin-wrapper input[type="tel"],
.admin-wrapper input[type="date"],
.admin-wrapper select,
.admin-wrapper textarea,
.admin-modal-overlay input,
.admin-modal-overlay select,
.admin-modal-overlay textarea,
.admin-modal-box input,
.admin-modal-box select,
.admin-modal-box textarea {
  font-family: inherit;
  color: var(--admin-text-main);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-sm);
  background-color: #ffffff;
  padding: 6px 10px;
  font-size: 0.81rem;
  transition: all 0.15s ease;
}

.admin-wrapper input:focus,
.admin-wrapper select:focus,
.admin-wrapper textarea:focus,
.admin-modal-overlay input:focus,
.admin-modal-overlay select:focus,
.admin-modal-overlay textarea:focus,
.admin-modal-box input:focus,
.admin-modal-box select:focus,
.admin-modal-box textarea:focus {
  outline: none;
  border-color: var(--admin-primary) !important;
  box-shadow: 0 0 0 2px var(--admin-primary-glow) !important;
}

/* Layout */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar - Modern Luxury Light & Fresh Mint 236px */
.admin-sidebar {
  width: 236px;
  background: var(--admin-sidebar-bg, #ffffff);
  color: var(--admin-sidebar-text, #334155);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease !important;
  color-scheme: light;
  border-right: 1.5px solid #e2e8f0;
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.04);
}

.sidebar-header {
  padding: 12px 14px;
  border-bottom: 1.5px solid #f1f5f9;
  background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 100%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--admin-primary) 0%, #10b981 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 3px 10px rgba(15, 118, 110, 0.3);
  flex-shrink: 0;
}

.sidebar-title h2 {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.sidebar-title span {
  font-size: 0.68rem;
  color: #0f766e;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: block;
}

.sidebar-collapse-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.sidebar-collapse-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

.sidebar-nav {
  padding: 10px 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 6px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
.sidebar-nav::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.nav-heading {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748b;
  padding: 10px 8px 4px;
  font-weight: 800;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #334155;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.83rem;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.sidebar-link i {
  font-size: 1rem;
  transition: transform 0.15s;
}

.sidebar-link:hover {
  background: #f1f5f9;
  color: #0f766e;
  transform: translateX(2px);
}

.sidebar-link:hover i {
  transform: scale(1.08);
}

.sidebar-link.active {
  background: linear-gradient(135deg, var(--admin-primary) 0%, #0d9488 100%) !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.3) !important;
  transform: none;
}
.sidebar-link.active i,
.sidebar-link.active span {
  color: #ffffff !important;
}

.sidebar-footer {
  padding: 10px 12px;
  border-top: 1.5px solid #f1f5f9;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Main Content Area */
.admin-main {
  margin-left: 236px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Top Navbar - Unified Emerald-Mint & Ice-Blue SaaS Glass Header */
.admin-topbar {
  background: linear-gradient(90deg, #ecfdf5 0%, #f0fdfa 45%, #eff6ff 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1.5px solid #99f6e4;
  box-shadow: 0 2px 10px rgba(15, 118, 110, 0.08);
  padding: 7px 18px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-toggle-btn {
  background: #ffffff;
  border: 1.5px solid #99f6e4;
  color: #0f766e;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.88rem;
  transition: all 0.15s ease;
}

.sidebar-toggle-btn:hover {
  background: #ccfbf1;
  border-color: #14b8a6;
  color: #0d9488;
}

.page-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--admin-dark);
  letter-spacing: -0.2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-view-store {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--admin-primary-light);
  color: var(--admin-primary);
  font-weight: 700;
  font-size: 0.78rem;
  text-decoration: none;
  border: 1px solid #a7f3d0;
  transition: all 0.15s;
}

.btn-view-store:hover {
  background: #d1fae5;
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.15);
}

.admin-profile-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 2px 2px;
  border-radius: 20px;
  border: 1px solid #fde68a;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.15s ease;
  font-size: 0.78rem;
  font-weight: 600;
}

.admin-profile-pill:hover {
  border-color: #facc15;
  box-shadow: 0 2px 5px rgba(202, 138, 4, 0.1);
}

.admin-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--admin-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  box-shadow: 0 1px 3px rgba(15, 118, 110, 0.2);
}

/* Topbar Quick Action Buttons */
.topbar-quick-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 6px;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.15s ease;
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
}

.topbar-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  filter: brightness(1.05);
}

.topbar-action-btn:active {
  transform: translateY(0);
}

.topbar-action-btn.topbar-btn-sell {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.topbar-action-btn.topbar-btn-add {
  background: linear-gradient(135deg, #0f766e 0%, #1e293b 100%);
}

.topbar-action-btn i {
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .topbar-quick-actions {
    gap: 4px;
  }
  .topbar-action-btn {
    padding: 4px 8px;
    font-size: 0.74rem;
  }
  .topbar-action-btn span {
    display: none;
  }
}

/* Page Content */
.admin-content {
  padding: 16px 18px;
  flex: 1;
}

/* Stats Cards Grid - Slim & Compact */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: #ffffff;
  border-radius: var(--admin-radius);
  padding: 12px 14px;
  border: 1px solid var(--admin-border);
  box-shadow: var(--admin-shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--admin-shadow-hover);
  border-color: #cbd5e1;
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.stat-icon.green { background: #d1fae5; color: #047857; }
.stat-icon.blue { background: #e0f2fe; color: #0284c7; }
.stat-icon.amber { background: #fef3c7; color: #b45309; }
.stat-icon.purple { background: #ede9fe; color: #6d28d9; }

.stat-info h4 {
  font-size: 0.72rem;
  color: var(--admin-text-muted);
  font-weight: 700;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-info .stat-value {
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--admin-dark);
  letter-spacing: -0.4px;
  line-height: 1.2;
}

/* Data Cards & Tables */
.admin-card {
  background: #ffffff;
  border-radius: var(--admin-radius);
  border: 1px solid var(--admin-border);
  box-shadow: var(--admin-shadow);
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.card-header {
  padding: 9px 14px;
  border-bottom: 1px solid var(--admin-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  background: #ffffff;
}

.card-header h3 {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--admin-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-body {
  padding: 12px 14px;
}

/* Spacious, balanced card padding for AI & API Integration Hub panels */
.ai-subview-panel .admin-card {
  padding: 20px 24px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

#pane-settings .admin-card > .card-body {
  padding: 18px 22px;
}

.ai-subview-panel .admin-card > .card-header {
  padding: 0 0 14px 0 !important;
  margin-bottom: 18px !important;
  background: transparent;
}

.ai-subview-panel label {
  margin-bottom: 6px;
}

@media (max-width: 900px) {
  .ai-subview-panel > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

/* Dedicated 2-Section Split Layout: Left Main Content + Right Docked AI Setup Assistant */
.admin-workspace-split {
  display: block;
  width: 100%;
}

.admin-workspace-split.has-ai-dock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 345px;
  gap: 18px;
  align-items: start;
}

.admin-workspace-main {
  min-width: 0;
}

.ai-setup-docked-aside {
  position: sticky;
  top: 76px;
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 96px);
  max-height: 760px;
}

.admin-workspace-split.has-ai-dock .ai-subview-panel > div[style*="grid-template-columns"] {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)) !important;
}

@media (max-width: 1120px) {
  .admin-workspace-split.has-ai-dock {
    grid-template-columns: minmax(0, 1fr);
  }
  .ai-setup-docked-aside {
    position: static;
    height: auto;
    max-height: 540px;
  }
}

/* Tables - High Density Enterprise */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.81rem;
}

.admin-table th {
  background: #f8fafc;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.72rem;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--admin-border-subtle);
  vertical-align: middle;
  color: #334155;
  transition: background-color 0.15s ease;
}

/* Subtle, Elegant Zebra Striping for all Admin Tables */
.admin-table tbody tr:nth-child(odd) td,
.admin-table tbody tr.odd td {
  background-color: #ffffff;
}

.admin-table tbody tr:nth-child(even) td,
.admin-table tbody tr.even td {
  background-color: #f8fafc;
}

.admin-table tbody tr:hover td {
  background-color: #f1f5f9 !important;
}

/* Badges - Slim Crisp Tags */
.badge {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge-pending { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.badge-processing { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.badge-shipped { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.badge-delivered { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.badge-cancelled { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

/* Status Select Dropdown */
.status-select {
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid var(--admin-border);
  font-size: 0.74rem;
  font-weight: 600;
  outline: none;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.status-select:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 2px var(--admin-primary-glow);
}

/* Action Buttons - Slim */
.btn-action {
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--admin-text-main);
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.btn-action:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-action.btn-danger {
  color: #ef4444;
  border-color: #fecaca;
  background: #fff;
}
.btn-action.btn-danger:hover {
  background: #fef2f2;
  border-color: #f87171;
  color: #b91c1c;
}

.btn-primary-admin {
  background: linear-gradient(135deg, var(--admin-primary) 0%, #0d9488 100%);
  color: #fff;
  border: none;
  padding: 6px 13px;
  border-radius: 5px;
  font-weight: 700;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 4px rgba(15, 118, 110, 0.2);
}

.btn-primary-admin:hover {
  filter: brightness(1.08);
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.3);
  transform: translateY(-1px);
}

.btn-primary-admin:active {
  transform: translateY(0);
}

/* Modals */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.2s ease;
}

.admin-modal-overlay.active,
.admin-modal-overlay[style*="display: flex"],
.admin-modal-overlay[style*="display: block"] {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.admin-modal-box {
  background: #ffffff;
  width: 100%;
  max-width: 560px;
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow-modal);
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--admin-border);
}

.admin-modal-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--admin-border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-modal-body {
  padding: 16px 18px;
}

/* Printable Invoice */
@media print {
  body * {
    visibility: hidden;
  }
  #printableInvoice, #printableInvoice * {
    visibility: visible;
  }
  #printableInvoice {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
  }
  .no-print {
    display: none !important;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0 !important;
  }
}

/* Firebase Cloud Status & Settings */
.firebase-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.firebase-status-pill.online {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.firebase-status-pill.online:hover {
  background: #d1fae5;
  transform: translateY(-1px);
}

.firebase-status-pill.offline {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.firebase-status-pill.offline:hover {
  background: #fef3c7;
  transform: translateY(-1px);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.pulse-dot.green {
  background: #10b981;
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
  animation: pulse-green 2s infinite;
}

.pulse-dot.yellow {
  background: #f59e0b;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.cloud-sync-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
}

/* Profit & Cost Tags */
.profit-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  background: #dcfce7;
  color: #15803d;
}

.cost-tag {
  font-size: 0.72rem;
  color: #64748b;
  display: block;
  margin-top: 2px;
}

/* Fraud Check Badges */
.badge-fraud-safe {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-fraud-moderate {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-fraud-risky {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Courier Badges */
.courier-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.courier-badge.unbooked {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* Low Stock Alert Box */
.low-stock-banner {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 10px 14px;
  border-radius: var(--admin-radius);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Date Preset Buttons */
.date-preset-btn {
  padding: 4px 10px;
  font-size: 0.74rem;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.date-preset-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}
.date-preset-btn.active {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
  box-shadow: 0 1px 4px rgba(15, 118, 110, 0.25);
}

/* Toast Container highest priority */
.toast-container {
  z-index: 999999 !important;
}

/* New Order & Order Acceptance UI */
.badge-new-order {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.71rem;
  font-weight: 700;
  width: fit-content;
}

@keyframes pulseDotAnim {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

.btn-order-accept {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border: none;
  border-radius: 5px;
  padding: 4px 9px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.2);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-order-accept:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

.btn-order-reject {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 5px;
  padding: 4px 7px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-order-reject:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #b91c1c;
}

/* Expense Category Badges */
.badge-expense-ads { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.badge-expense-packaging { background: #ffedd5; color: #ea580c; border: 1px solid #fed7aa; }
.badge-expense-courier { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.badge-expense-rent { background: #ede9fe; color: #7c3aed; border: 1px solid #ddd6fe; }
.badge-expense-bills { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }
.badge-expense-salary { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-expense-misc { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* Floating Action Buttons (FAB - Slim & Crisp) */
.admin-fab-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  z-index: 9999;
}

.admin-fab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 24px;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  user-select: none;
}

.admin-fab-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.admin-fab-btn.fab-sell {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.admin-fab-btn.fab-add {
  background: linear-gradient(135deg, #0f766e 0%, #1e293b 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.admin-fab-btn i {
  font-size: 0.95rem;
}

/* Shipping Labels & Thermal POS Print Styles */
.shipping-label-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.shipping-label-card {
  border: 1.5px dashed #0f172a;
  border-radius: 6px;
  padding: 12px;
  background: #fff;
  font-family: 'Inter', sans-serif;
  color: #0f172a;
  page-break-inside: avoid;
}

.shipping-label-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1.5px solid #0f172a;
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.shipping-barcode-box {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 6px;
  text-align: center;
  font-family: monospace;
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.shipping-cod-badge {
  background: #0f172a;
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-weight: 800;
  font-size: 1rem;
  text-align: center;
  margin-top: 6px;
}

/* POS Thermal Receipt Slip */
.pos-receipt-box {
  width: 270px;
  margin: 0 auto;
  padding: 12px;
  background: #fff;
  font-family: monospace;
  font-size: 11px;
  line-height: 1.35;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* Return & Exchange Badges */
.badge-return-pending { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.badge-return-transit { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.badge-return-restocked { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-return-damage { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }

/* Best Seller & Dead Stock Badges */
.rank-badge-1 { background: #fef08a; color: #854d0e; padding: 1px 6px; border-radius: 3px; font-weight: 800; font-size: 0.7rem; }
.rank-badge-2 { background: #e2e8f0; color: #334155; padding: 1px 6px; border-radius: 3px; font-weight: 800; font-size: 0.7rem; }
.rank-badge-3 { background: #fed7aa; color: #9a3412; padding: 1px 6px; border-radius: 3px; font-weight: 800; font-size: 0.7rem; }
.badge-dead-stock { background: #fee2e2; color: #dc2626; font-size: 0.7rem; padding: 1px 6px; border-radius: 4px; font-weight: 700; border: 1px solid #fecaca; }

/* ===================================================
   ALL-IN-ONE SETTINGS HUB & PERMISSION MATRIX
   =================================================== */
.settings-hub-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--admin-radius);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.1);
  border: 1px solid #334155;
}

.settings-hub-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f766e 0%, #10b981 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
  flex-shrink: 0;
}

.settings-role-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  padding: 5px 11px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.76rem;
}

.settings-subnav-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 4px;
  margin-bottom: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--admin-radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.settings-subnav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 5px;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.settings-subnav-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.settings-subnav-btn.active {
  background: #0f766e;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(15, 118, 110, 0.2);
}

.settings-subpane {
  animation: fadeInPane 0.2s ease;
}

/* Safety isolation: Ensure settings subpanes can NEVER leak into other tabs */
body:not([data-active-tab="settings"]) .settings-subpane {
  display: none !important;
}
body:not([data-active-tab="stock_management"]) .stock-subview-panel {
  display: none !important;
}
body:not([data-active-tab="ai_inbox"]) .ai-subview-panel {
  display: none !important;
}


@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Business Operating Mode Selector Cards */
.biz-mode-card {
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 12px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.biz-mode-card:hover {
  border-color: #0f766e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.1);
}

.biz-mode-card.active {
  border-color: #0f766e;
  background: #f0fdfa;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}

.biz-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  width: fit-content;
}

.biz-mode-features {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
}

@media (max-width: 680px) {
  .biz-mode-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Permission Toolbar & Presets */
.perm-toolbar {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--admin-radius);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  box-shadow: var(--admin-shadow);
}

.perm-preset-btn {
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.perm-preset-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

.perm-preset-btn.btn-save-perm {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  color: #fff;
  border-color: #0f766e;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.2);
}

.perm-preset-btn.btn-save-perm:hover {
  background: #0f766e;
  transform: translateY(-1px);
}

/* Permission Matrix Grid */
.perm-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.perm-category-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--admin-radius);
  overflow: hidden;
  box-shadow: var(--admin-shadow);
  display: flex;
  flex-direction: column;
}

.perm-card-header {
  padding: 9px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.perm-card-header h4 {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.perm-items-list {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.perm-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.perm-row:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.perm-row.checked {
  background: #f0fdf4;
  border-color: #86efac;
}

.perm-checkbox-custom {
  position: relative;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #0f766e;
  flex-shrink: 0;
  transform: scale(1.05);
}

.perm-text-box {
  flex-grow: 1;
}

.perm-text-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.perm-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b;
}

.perm-desc {
  font-size: 0.71rem;
  color: #64748b;
  line-height: 1.3;
}

.perm-status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.perm-status-badge.allowed {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.perm-status-badge.locked {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Sidebar Lock Indication */
.sidebar-link.locked-role {
  opacity: 0.55;
  filter: grayscale(40%);
  position: relative;
}

.sidebar-link.locked-role:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.sidebar-link .lock-indicator-badge {
  margin-left: auto;
  font-size: 0.68rem;
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  padding: 1px 5px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Role alert banners */
.manager-role-alert-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  color: #1e40af;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Sidebar Toggle Button Visibility: Hidden by default on Desktop when sidebar is open */
#sidebarToggleBtn {
  display: none !important;
}

body.sidebar-collapsed #sidebarToggleBtn {
  display: inline-flex !important;
}

@media (max-width: 900px) {
  #sidebarToggleBtn {
    display: inline-flex !important;
  }
}

/* Desktop Collapsed State */
body.sidebar-collapsed .admin-sidebar {
  transform: translateX(-100%) !important;
  box-shadow: none !important;
}

body.sidebar-collapsed .admin-main {
  margin-left: 0 !important;
}

/* Mobile Sidebar Backdrop Overlay */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  z-index: 95;
  transition: opacity 0.25s ease;
}

@media (max-width: 900px) {
  .sidebar-backdrop.active {
    display: block;
  }
}

/* WYSIWYG Rich Text Visual Editor - Slim */
.wysiwyg-visual-box {
  min-height: 160px;
  max-height: 400px;
  overflow-y: auto;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-top: none;
  border-radius: 0 0 6px 6px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #1e293b;
  background: #ffffff;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.wysiwyg-visual-box:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
}
.wysiwyg-visual-box:empty:before {
  content: attr(data-placeholder);
  color: #94a3b8;
  font-style: italic;
  font-size: 0.82rem;
  pointer-events: none;
  display: block;
}
.wysiwyg-visual-box h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f766e;
  margin: 10px 0 4px 0;
}
.wysiwyg-visual-box ul {
  list-style-type: disc;
  padding-left: 20px;
  margin: 6px 0;
}
.wysiwyg-visual-box ol {
  list-style-type: decimal;
  padding-left: 20px;
  margin: 6px 0;
}
.wysiwyg-visual-box li {
  margin-bottom: 3px;
}
.wysiwyg-visual-box mark {
  background: #fef08a;
  padding: 1px 5px;
  border-radius: 3px;
  color: #854d0e;
}
.wysiwyg-visual-box p {
  margin-bottom: 6px;
}
.wysiwyg-toolbar-btn {
  padding: 3px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #334155;
}
.wysiwyg-toolbar-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
}
.wysiwyg-toolbar-btn:active {
  background: #cbd5e1;
  transform: translateY(1px);
}

/* Product Table Name Hover & Quick Popover */
.product-name-hoverable {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.35;
  color: #0f172a;
  transition: all 0.15s ease;
  padding: 1px 0;
}
.product-name-hoverable:hover {
  color: var(--admin-primary) !important;
}
.product-name-hoverable:hover .product-info-icon {
  color: var(--admin-primary) !important;
  transform: scale(1.1);
}
.product-info-icon {
  font-size: 0.76rem;
  color: #94a3b8;
  transition: all 0.15s ease;
}

#productQuickPopover {
  position: fixed;
  display: none;
  z-index: 99999;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.18), 0 0 1px 1px rgba(15, 23, 42, 0.06);
  border: 1px solid #e2e8f0;
  padding: 12px 14px;
  width: 320px;
  max-width: 90vw;
  pointer-events: auto;
  font-family: 'Hind Siliguri', sans-serif;
  animation: popoverFadeIn 0.12s ease-out;
}

@keyframes popoverFadeIn {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================================
   AI OMNICHANNEL LIVE INBOX - SLIM ENTERPRISE STYLES
   =================================================== */
.ai-subview-panel {
  animation: fadeInPane 0.2s ease;
}

.ai-channel-btn {
  padding: 3px 8px !important;
  font-size: 0.7rem !important;
  border-radius: 5px !important;
  border: none !important;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  transition: all 0.15s ease;
}

.ai-channel-btn:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.ai-channel-btn.active {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* ===================================================
   UNIVERSAL POS TERMINAL & MULTI-PRODUCT SALES STYLES
   =================================================== */
.pos-terminal-container {
  background: #f8fafc;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.pos-terminal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 1fr);
  gap: 16px;
  padding: 16px;
  min-height: 720px;
}

@media (max-width: 1024px) {
  .pos-terminal-layout {
    grid-template-columns: 1fr;
  }
}

/* Left: Catalog Panel */
.pos-catalog-panel {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  gap: 12px;
}

.pos-search-header {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pos-scanner-box {
  position: relative;
  flex: 1;
}

.pos-scanner-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: #0f766e;
}

.pos-scanner-box input {
  width: 100%;
  padding: 10px 36px 10px 42px;
  border-radius: 8px;
  border: 1.5px solid #0f766e;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  background: #f0fdfa;
  transition: all 0.2s ease;
}

.pos-scanner-box input:focus {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.pos-scanner-box .btn-clear-search {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 6px;
}

.pos-scan-feedback {
  font-size: 0.76rem;
  font-weight: 700;
  color: #0f766e;
  background: #ccfbf1;
  border: 1px solid #99f6e4;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

/* Category Filter Chips */
.pos-cat-filter-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.pos-cat-filter-bar::-webkit-scrollbar {
  height: 4px;
}

.pos-cat-filter-bar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.pos-cat-chip {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.pos-cat-chip:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.pos-cat-chip.active {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
  box-shadow: 0 1px 3px rgba(15, 118, 110, 0.25);
}

/* Catalog Sub-bar */
.pos-catalog-subbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 2px;
  border-bottom: 1px solid #f1f5f9;
}

.pos-catalog-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pos-price-mode-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  padding: 2px 4px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
}

.pos-price-mode-switch button {
  border: none;
  background: transparent;
  color: #64748b;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pos-price-mode-switch button.active {
  background: #0f766e;
  color: #ffffff;
}

/* Product Grid - Fixed Proportional Cards & No Squishing */
.pos-product-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)) !important;
  grid-auto-rows: minmax(195px, auto) !important;
  gap: 10px !important;
  max-height: calc(100vh - 225px) !important;
  min-height: 380px !important;
  overflow-y: auto !important;
  padding: 4px 6px 16px 2px !important;
}

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

.pos-product-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.pos-product-card {
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  cursor: pointer !important;
  position: relative !important;
  transition: all 0.18s ease !important;
  min-height: 195px !important;
  height: 100% !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}

.pos-product-card:hover {
  border-color: #0f766e !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.14) !important;
}

.pos-product-card.out-of-stock {
  opacity: 0.65;
  filter: grayscale(0.5);
}

.pos-card-thumb {
  width: 100% !important;
  height: 110px !important;
  min-height: 110px !important;
  max-height: 110px !important;
  object-fit: cover !important;
  object-position: center !important;
  background: #ffffff !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  border-bottom: 1px solid #f1f5f9 !important;
  transition: transform 0.2s ease !important;
}

.pos-product-card:hover .pos-card-thumb {
  transform: scale(1.04) !important;
}

.pos-card-badge {
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;
  font-size: 0.66rem !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  font-weight: 800 !important;
  z-index: 2 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.pos-badge-stock-in { background: #dcfce7 !important; color: #15803d !important; border: 1px solid #bbf7d0 !important; }
.pos-badge-stock-low { background: #fef3c7 !important; color: #b45309 !important; border: 1px solid #fde68a !important; }
.pos-badge-stock-out { background: #fee2e2 !important; color: #dc2626 !important; border: 1px solid #fecaca !important; }

.pos-card-body {
  padding: 6px 8px 6px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 80px !important;
  background: #ffffff !important;
  position: relative !important;
}

.pos-card-sku {
  font-size: 0.66rem !important;
  font-family: monospace !important;
  font-weight: 700 !important;
  color: #0284c7 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.2 !important;
  margin-bottom: 2px !important;
}

.pos-card-title {
  font-size: 0.77rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.28 !important;
  margin: 0 0 4px 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  word-break: break-word !important;
  min-height: 28px !important;
  height: auto !important;
}

.pos-card-footer {
  position: sticky !important;
  bottom: 0 !important;
  background: #ffffff !important;
  z-index: 5 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-top: auto !important;
  padding-top: 5px !important;
  padding-bottom: 2px !important;
  border-top: 1px dashed #f1f5f9 !important;
}

.pos-card-price {
  font-size: 0.92rem !important;
  font-weight: 900 !important;
  color: #0f766e !important;
}

.pos-card-add-icon {
  width: 25px !important;
  height: 25px !important;
  border-radius: 50% !important;
  background: #f0fdf4 !important;
  color: #16a34a !important;
  border: 1px solid #bbf7d0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.9rem !important;
  font-weight: 800 !important;
  transition: all 0.15s ease !important;
}

.pos-product-card:hover .pos-card-add-icon {
  background: #16a34a !important;
  color: #ffffff !important;
  transform: scale(1.1) !important;
}

/* Right: Bill Ticket Panel */
.pos-ticket-panel {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  gap: 10px;
}

/* Customer Section */
.pos-customer-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
}

.pos-customer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.pos-box-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 5px;
}

.pos-cust-mode-tabs {
  display: flex;
  gap: 3px;
  background: #e2e8f0;
  padding: 2px;
  border-radius: 6px;
}

.pos-cust-mode-tabs button {
  border: none;
  background: transparent;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  border-radius: 4px;
  cursor: pointer;
}

.pos-cust-mode-tabs button.active {
  background: #0f766e;
  color: #ffffff;
}

.pos-cust-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 6px;
}

.pos-input {
  padding: 6px 9px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  font-size: 0.82rem;
  outline: none;
  background: #ffffff;
}

.pos-input:focus {
  border-color: #0f766e;
}

/* Cart Table Header */
.pos-cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
  padding: 2px 2px;
}

.pos-btn-clear-cart {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.pos-btn-clear-cart:hover {
  background: #fee2e2;
}

/* Cart Table Wrapper */
.pos-cart-table-wrapper {
  max-height: 220px;
  min-height: 120px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
}

.pos-cart-table-wrapper::-webkit-scrollbar {
  width: 4px;
}

.pos-cart-table-wrapper::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.pos-cart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.pos-cart-table thead {
  position: sticky;
  top: 0;
  background: #f1f5f9;
  z-index: 2;
}

.pos-cart-table th {
  padding: 6px 8px;
  text-align: left;
  font-weight: 800;
  color: #334155;
  border-bottom: 1px solid #cbd5e1;
  font-size: 0.74rem;
}

.pos-cart-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.pos-cart-table tbody tr:nth-child(odd) td {
  background-color: #ffffff;
}

.pos-cart-table tbody tr:nth-child(even) td {
  background-color: #f8fafc;
}

.pos-cart-table tr:hover td {
  background-color: #f1f5f9 !important;
}

.pos-item-name {
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.pos-item-meta {
  font-size: 0.68rem;
  color: #64748b;
  font-family: monospace;
  margin-top: 2px;
}

.pos-serial-select {
  font-size: 0.68rem;
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  color: #0369a1;
  font-family: monospace;
  margin-top: 3px;
  max-width: 100%;
}

.pos-qty-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.pos-qty-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-weight: 900;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pos-qty-btn:hover {
  background: #e2e8f0;
}

.pos-qty-input {
  width: 34px;
  text-align: center;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 2px;
  outline: none;
}

.pos-price-input {
  width: 58px;
  text-align: right;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 2px 4px;
  outline: none;
  color: #0f766e;
}

.pos-item-trash {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 0.85rem;
}

.pos-cart-empty {
  padding: 30px 10px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.8rem;
}

.pos-cart-empty i {
  font-size: 2rem;
  color: #cbd5e1;
  display: block;
  margin-bottom: 6px;
}

/* Discount & VAT Row */
.pos-discount-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 8px;
  font-size: 0.76rem;
}

.pos-disc-col label {
  display: block;
  font-weight: 700;
  color: #475569;
  margin-bottom: 2px;
}

.pos-disc-input-group {
  display: flex;
  gap: 3px;
}

.pos-disc-input-group input {
  width: 65%;
  padding: 5px 8px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  font-size: 0.8rem;
  font-weight: 700;
}

.pos-disc-input-group select {
  width: 35%;
  padding: 5px 4px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  font-size: 0.76rem;
  font-weight: 700;
}

/* Bill Summary */
.pos-bill-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.8rem;
}

.pos-sum-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
  color: #475569;
}

.pos-total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  border-top: 1.5px solid #0f172a;
  font-size: 1.12rem;
  font-weight: 900;
  color: #0f172a;
}

.pos-total-line strong {
  color: #0f766e;
  font-size: 1.25rem;
}

/* Payment Mode Section */
.pos-payment-section {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px;
}

.pos-pay-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 6px;
}

.pos-pay-mode-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 8px;
}

.pos-pay-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  border-radius: 6px;
  padding: 6px 2px;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pos-pay-btn i {
  font-size: 1rem;
}

.pos-pay-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.pos-pay-btn.active#posPayModeCash {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

.pos-pay-btn.active#posPayModePartial {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #92400e;
}

.pos-pay-btn.active#posPayModeDue {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

.pos-pay-btn.active#posPayModeDigital {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1e40af;
}

/* Quick Cash Presets */
.pos-quick-cash {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pos-quick-cash button {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.pos-quick-cash button:hover {
  background: #f1f5f9;
  border-color: #0f766e;
  color: #0f766e;
}

/* Payment Inputs & Return/Due Box */
.pos-payment-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pos-pay-input-box label {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  color: #0f766e;
  margin-bottom: 2px;
}

.pos-paid-input {
  width: 100%;
  padding: 6px 10px;
  border-radius: 6px;
  border: 2px solid #0f766e;
  font-size: 1.15rem;
  font-weight: 900;
  color: #0f766e;
  outline: none;
  background: #ffffff;
}

.pos-status-box {
  border-radius: 6px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
}

.pos-status-label {
  font-size: 0.72rem;
  font-weight: 800;
  display: block;
}

.pos-status-amount {
  font-size: 1.25rem;
  font-weight: 900;
  display: block;
  line-height: 1.1;
}

/* Checkout Action Buttons */
.pos-action-buttons {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px;
  margin-top: 4px;
}

.pos-btn-hold {
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.pos-btn-hold:hover {
  background: #f1f5f9;
}

.pos-btn-checkout {
  border: none;
  background: #0f766e;
  color: #ffffff;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 900;
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.25);
  transition: all 0.15s ease;
}

.pos-btn-checkout:hover {
  background: #0d9488;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.35);
}

.pos-btn-checkout:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ===================================================
   NEW SALES MEMO & LIVE PREVIEW WORKSPACE (AS SKETCHED)
   =================================================== */
.pos-memo-wrapper {
  background: #f8fafc;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  padding: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  height: calc(100vh - 84px);
  max-height: calc(100vh - 84px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pos-memo-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.memo-tabs-group {
  display: flex;
  gap: 8px;
}

.memo-tab-btn {
  padding: 8px 22px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.memo-tab-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.memo-tab-btn.active {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.25);
}

.memo-topbar-preview-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot-pulse {
  font-size: 0.7rem;
  font-weight: 900;
  color: #dc2626;
  background: #fee2e2;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid #fecaca;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
}

/* Two-column layout: Left Form/Catalog, Right Memo Preview (Independent Scrollviews) */
.pos-memo-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(380px, 1fr);
  gap: 16px;
  height: 100%;
  min-height: 0;
  flex: 1;
  align-items: stretch;
}

@media (max-width: 1140px) {
  .pos-memo-wrapper {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .pos-memo-main-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .pos-memo-left-panel,
  .sales-view-pane {
    height: auto !important;
    overflow: visible !important;
  }
}

/* Left Panel: Fixed frame with inner scroll body + permanent sticky bottom dock */
.pos-memo-left-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding-right: 4px;
  position: relative;
}

/* Right Panel: Independent Vertical Scroll View */
.pos-memo-right-panel {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
}

/* Custom Sleek Scrollbars for Left and Right Panels */
.pos-memo-left-panel::-webkit-scrollbar,
.pos-memo-right-panel::-webkit-scrollbar {
  width: 6px;
}

.pos-memo-left-panel::-webkit-scrollbar-track,
.pos-memo-right-panel::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.pos-memo-left-panel::-webkit-scrollbar-thumb,
.pos-memo-right-panel::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.pos-memo-left-panel::-webkit-scrollbar-thumb:hover,
.pos-memo-right-panel::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.sales-view-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  flex: 1;
}

/* Animated Floating Notch Inputs (Space-Saving & Clean) */
.pos-memo-header-compact {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px 10px 10px 10px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.pos-compact-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}

.pos-compact-row:last-child {
  margin-bottom: 0;
}

.pos-float-box {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
}

.pos-float-input {
  width: 100%;
  height: 35px;
  padding: 0 9px;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.pos-float-input:hover {
  border-color: #94a3b8;
}

.pos-float-input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.15);
  background: #ffffff;
}

select.pos-float-input {
  cursor: pointer;
}

/* Hide all number spin buttons / up-down arrows globally across the entire admin panel */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button,
#pane-sell_product input[type="number"]::-webkit-outer-spin-button,
#pane-sell_product input[type="number"]::-webkit-inner-spin-button,
.pos-memo-wrapper input[type="number"]::-webkit-outer-spin-button,
.pos-memo-wrapper input[type="number"]::-webkit-inner-spin-button,
.pos-float-input[type="number"]::-webkit-outer-spin-button,
.pos-float-input[type="number"]::-webkit-inner-spin-button,
.memo-price-input::-webkit-outer-spin-button,
.memo-price-input::-webkit-inner-spin-button,
.memo-disc-input::-webkit-outer-spin-button,
.memo-disc-input::-webkit-inner-spin-button,
.memo-qty-input::-webkit-outer-spin-button,
.memo-qty-input::-webkit-inner-spin-button,
.pos-paid-input::-webkit-outer-spin-button,
.pos-paid-input::-webkit-inner-spin-button,
#posDeliveryCharge::-webkit-outer-spin-button,
#posDeliveryCharge::-webkit-inner-spin-button,
#posDiscountVal::-webkit-outer-spin-button,
#posDiscountVal::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

input[type="number"],
#pane-sell_product input[type="number"],
.pos-memo-wrapper input[type="number"],
.pos-float-input[type="number"],
.memo-price-input,
.memo-disc-input,
.memo-qty-input,
.pos-paid-input,
#posDeliveryCharge,
#posDiscountVal {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

/* Floating Label - initially centered or resting inside */
.pos-float-label {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: #ffffff;
  padding: 0 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  pointer-events: none;
  transition: all 0.16s ease-out;
  line-height: 1;
  z-index: 2;
  white-space: nowrap;
}

/* Float Up to Notch State (When Focused or Filled with Value) */
.pos-float-input:focus ~ .pos-float-label,
.pos-float-input:not(:placeholder-shown) ~ .pos-float-label,
select.pos-float-input ~ .pos-float-label,
input[type="date"].pos-float-input ~ .pos-float-label {
  top: -6px;
  transform: translateY(0);
  font-size: 0.67rem;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.2px;
}

.pos-float-input:focus ~ .pos-float-label {
  color: #0f766e;
  font-weight: 800;
}

@media (max-width: 680px) {
  .pos-compact-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .pos-float-box {
    flex: 1 1 calc(50% - 6px) !important;
  }
}

/* Fallback / Legacy Support */
.memo-header-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.memo-card-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.memo-card-field label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #334155;
  min-width: 108px;
  margin: 0;
  flex-shrink: 0;
}

.memo-select-pill {
  width: 100%;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1.5px solid #0f766e;
  background: #f0fdfa;
  color: #0f766e;
  font-weight: 800;
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
}

.memo-text-input,
.memo-select-input {
  flex: 1;
  padding: 6px 9px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  background: #ffffff;
  transition: all 0.15s ease;
  min-width: 0;
}

.memo-text-input:focus,
.memo-select-input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.15);
}

.btn-memo-regen {
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: #475569;
  border-radius: 6px;
  padding: 0 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-memo-regen:hover {
  background: #e2e8f0;
  color: #0f766e;
}

/* Full Width Search Bar with Dropdown - Sticky on Scroll */
.memo-search-section {
  position: sticky;
  top: 0;
  z-index: 25;
  background: #ffffff;
  padding: 4px 0 8px 0;
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.memo-search-box {
  position: relative;
  flex: 1;
}

.memo-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.15rem;
  color: #0f766e;
  z-index: 5;
  pointer-events: none;
  line-height: 1;
  display: flex;
  align-items: center;
}

.memo-search-input {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 44px !important;
  border-radius: 8px;
  border: 2px solid #0f766e;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.08);
  box-sizing: border-box;
}

.memo-search-input:focus {
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.22);
}

.memo-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 2px;
  z-index: 5;
  line-height: 1;
  display: flex;
  align-items: center;
}

.memo-search-clear:hover {
  color: #dc2626;
}

/* Instant Search Dropdown */
.memo-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1.5px solid #0f766e;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 280px;
  overflow-y: auto;
  margin-top: 4px;
}

.memo-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.15s ease;
}

.memo-dropdown-item:hover {
  background: #f0fdfa;
}

.memo-dropdown-thumb {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.memo-dropdown-info {
  flex: 1;
}

.memo-dropdown-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.memo-dropdown-meta {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
}

.memo-dropdown-price {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f766e;
}

/* Products Cart Table - Sized for 5 Visible Items at a glance */
.memo-table-container {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
  min-height: 290px;
  max-height: 335px;
  overflow-y: auto;
}

.memo-products-table {
  width: 100%;
  border-collapse: collapse;
}

.memo-products-table thead {
  position: sticky;
  top: 0;
  background: #f1f5f9;
  z-index: 2;
}

.memo-products-table th {
  padding: 5px 8px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #1e293b;
  border-bottom: 1.5px solid #cbd5e1;
  letter-spacing: 0.2px;
}

.memo-products-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
  font-size: 0.80rem;
}

.memo-products-table tbody tr:nth-child(odd) td {
  background-color: #ffffff;
}

.memo-products-table tbody tr:nth-child(even) td {
  background-color: #f8fafc;
}

.memo-products-table tr:hover td {
  background-color: #f1f5f9 !important;
}

.memo-item-title {
  font-weight: 800;
  color: #0f172a;
  font-size: 0.83rem;
  line-height: 1.22;
}

.memo-item-subline {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}

.memo-subline-inputs {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  margin-top: 3px;
}

.memo-item-warranty,
.memo-item-sn {
  display: flex;
  width: 100%;
}

.memo-inline-input {
  padding: 2px 6px;
  font-size: 0.74rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  min-width: 110px;
}

.memo-inline-input:focus {
  border-color: #0f766e;
}

.memo-sn-select {
  padding: 2px 4px;
  font-size: 0.72rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #f0fdfa;
  color: #0f766e;
  font-weight: 700;
  outline: none;
}

.memo-warranty-select,
.memo-warranty-input {
  padding: 2px 7px;
  font-size: 0.73rem;
  height: 22px;
  border: 1.5px solid #86efac;
  border-radius: 4px;
  background: #ffffff;
  color: #166534;
  font-weight: 700;
  outline: none;
  width: 100%;
  max-width: 250px;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.memo-warranty-select:focus,
.memo-warranty-input:focus {
  border-color: #16a34a;
  background: #f0fdf4;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.memo-sn-input {
  padding: 3px 7px;
  font-size: 0.73rem;
  line-height: 1.3;
  height: 24px;
  min-height: 24px;
  border: 1.5px solid #93c5fd;
  border-radius: 4px;
  background: #ffffff;
  color: #0369a1;
  font-weight: 700;
  outline: none;
  width: 100%;
  max-width: 260px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  box-sizing: border-box;
  resize: vertical !important;
  overflow-y: auto;
  font-family: inherit;
}

.memo-sn-input:focus {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.memo-sn-input::-webkit-calendar-picker-indicator,
.memo-sn-input::-webkit-list-button,
.memo-warranty-input::-webkit-calendar-picker-indicator {
  display: none !important;
  -webkit-appearance: none !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

/* Stepper & Price in Table */
.memo-qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1.5px solid #94a3b8;
  border-radius: 6px;
  background: #ffffff;
  padding: 2px 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.memo-qty-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 1.1rem;
  font-weight: 900;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  user-select: none;
}

.memo-qty-btn:hover {
  background: #0f766e;
  color: #ffffff;
}

.memo-qty-input {
  width: 44px;
  height: 26px;
  text-align: center;
  border: none;
  outline: none;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  background: transparent;
  padding: 0;
  margin: 0;
  -moz-appearance: textfield;
}

.memo-qty-input::-webkit-outer-spin-button,
.memo-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.memo-price-input {
  width: 75px;
  text-align: right;
  padding: 4px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 800;
  outline: none;
}

.memo-price-input:focus {
  border-color: #0f766e;
}

.memo-row-delete-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 4px;
}

.memo-row-delete-btn:hover {
  color: #b91c1c;
}

/* Totals Box */
.memo-totals-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.memo-totals-box {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 14px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.memo-tot-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  color: #334155;
  font-weight: 700;
}

.memo-disc-inline {
  display: flex;
  gap: 4px;
  align-items: center;
}

.memo-disc-input {
  width: 70px;
  padding: 3px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.82rem;
  text-align: right;
  font-weight: 700;
}

.memo-disc-type-select {
  padding: 2px 4px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.78rem;
  background: #f8fafc;
  font-weight: 700;
}

.memo-tot-line.net-total-highlight {
  border-top: 1.5px dashed #cbd5e1;
  padding-top: 6px;
  margin-top: 2px;
  font-size: 1rem;
  color: #0f766e;
  font-weight: 900;
}

/* Action Buttons Bar: Cancel, Draft, Invoice, Order, Payment */
.memo-actions-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  background: #ffffff;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
}

/* Bottom Four Actions: Quotation, Partial, Due, Cash (Sticky to Bottom) */
.memo-bottom-four-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) 1.25fr;
  gap: 7px;
  background: #ffffff;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  margin-top: auto;
  position: sticky;
  bottom: 0;
  z-index: 30;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.09);
}

.btn-memo-act {
  padding: 6px 5px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-memo-suspend {
  background: #fffbeb;
  color: #b45309;
  border: 1.5px solid #fcd34d;
}
.btn-memo-suspend:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.btn-memo-quotation {
  background: #f0f9ff;
  color: #0284c7;
  border: 1.5px solid #bae6fd;
}
.btn-memo-quotation:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}

.btn-memo-partial {
  background: #fffbeb;
  color: #b45309;
  border: 1.5px solid #fde68a;
}
.btn-memo-partial:hover {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.btn-memo-due {
  background: #fef2f2;
  color: #dc2626;
  border: 1.5px solid #fecaca;
}
.btn-memo-due:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.btn-memo-cash {
  background: #16a34a;
  color: #ffffff;
  border: 1.5px solid #15803d;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}
.btn-memo-cash:hover {
  background: #15803d;
  border-color: #166534;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .memo-bottom-four-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .memo-bottom-four-actions {
    grid-template-columns: 1fr 1fr;
  }
}

.btn-memo-cancel {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.btn-memo-cancel:hover {
  background: #fecaca;
}

.btn-memo-draft {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.btn-memo-draft:hover {
  background: #fde68a;
}

.btn-memo-invoice {
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.btn-memo-invoice:hover {
  background: #bae6fd;
}

.btn-memo-order {
  background: #0f766e;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.25);
}

.btn-memo-order:hover {
  background: #0d9488;
  transform: translateY(-1px);
}

.btn-memo-payment {
  background: #15803d;
  color: #ffffff;
  margin-left: auto;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(21, 128, 61, 0.25);
}

.btn-memo-payment:hover {
  background: #166534;
}

/* Right Section: Memo Preview Wrapper */
.memo-preview-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.memo-preview-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}

.preview-badge {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f766e;
  display: flex;
  align-items: center;
  gap: 6px;
}

.preview-actions {
  display: flex;
  gap: 6px;
}

.btn-prev-act {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-prev-act:hover {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
}

/* Authentic Paper Sheet for Memo */
.memo-paper-sheet {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  color: #0f172a;
  font-family: 'Hind Siliguri', 'Inter', -apple-system, sans-serif;
  min-height: 580px;
}

.paper-memo-header {
  text-align: center;
  border-bottom: 2px solid #0f766e;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.paper-memo-brand {
  font-size: 1.5rem;
  font-weight: 900;
  color: #0f766e;
  letter-spacing: 0.5px;
  margin: 0;
}

.paper-memo-tagline {
  font-size: 0.76rem;
  color: #64748b;
  margin: 2px 0 6px 0;
}

.paper-memo-badge {
  display: inline-block;
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
  padding: 2px 14px;
  border-radius: 12px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.paper-meta-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 14px;
  font-size: 0.76rem;
}

.paper-meta-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.paper-meta-row {
  display: flex;
  gap: 4px;
}

.paper-meta-lbl {
  font-weight: 800;
  color: #475569;
  min-width: 75px;
}

.paper-meta-val {
  font-weight: 700;
  color: #0f172a;
  word-break: break-word;
}

.paper-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  margin-bottom: 12px;
}

.paper-items-table th {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 6px 8px;
  font-weight: 800;
  color: #1e293b;
}

.paper-items-table td {
  border: 1px solid #e2e8f0;
  padding: 6px 8px;
  vertical-align: top;
}

.paper-totals-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-left: auto;
  max-width: 250px;
  margin-bottom: 16px;
}

.paper-totals-table td {
  padding: 3px 6px;
}

.paper-totals-table tr.paper-grand-total {
  font-weight: 900;
  color: #0f766e;
  font-size: 0.92rem;
  border-top: 1.5px solid #0f766e;
  border-bottom: 1.5px solid #0f766e;
}

.paper-signatures {
  display: flex;
  justify-content: space-between;
  margin-top: 36px;
  padding-top: 8px;
}

.paper-sign-col {
  text-align: center;
  font-size: 0.74rem;
  color: #475569;
  font-weight: 700;
  border-top: 1px dashed #94a3b8;
  min-width: 130px;
  padding-top: 4px;
}

/* AI Omnichannel Sub-Navigation Sticky Bar */
.ai-inbox-top-subnav {
  position: sticky !important;
  top: 48px !important;
  z-index: 85 !important;
  background: linear-gradient(180deg, #fffdf0 0%, #fefce8 100%) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  box-shadow: 0 2px 8px rgba(202, 138, 4, 0.12) !important;
}

/* ==========================================================================
   HOMEPAGE HERO BANNER & PROMO CARDS CONTROL - MODERN PRO SAAS REDESIGN
   ========================================================================== */

.hero-admin-card-pro {
  margin-bottom: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.hero-pro-header {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-header-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-header-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.15);
}

.hero-header-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-header-pill {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hero-header-sub {
  margin: 3px 0 0 0;
  font-size: 0.83rem;
  color: #64748b;
}

.hero-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-action-outline-btn {
  padding: 8px 16px;
  font-size: 0.84rem;
  font-weight: 700;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  color: #334155;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.hero-action-outline-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.hero-action-save-btn {
  padding: 8px 20px;
  font-size: 0.86rem;
  font-weight: 700;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: none;
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  transition: all 0.2s ease;
}

.hero-action-save-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

/* Modern Segmented Control for 3 Banners */
.hero-segmented-tabs-wrapper {
  padding: 18px 24px 0 24px;
  background: #ffffff;
}

.hero-segmented-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #f1f5f9;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.hero-banner-tab {
  border: 1.5px solid transparent;
  background: #ffffff;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  font-family: inherit;
}

.hero-banner-tab:hover:not(.active) {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.hero-banner-tab.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.hero-banner-tab.active .tab-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.hero-banner-tab.active .tab-dim {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.tab-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #e2e8f0;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  transition: all 0.2s;
}

.tab-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.tab-title {
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.2;
}

.tab-dim {
  font-size: 0.73rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #64748b;
  display: inline-block;
  align-self: flex-start;
  margin-top: 2px;
}

/* Two-column layout: Form (58%) & Storefront Mockup (42%) */
.hero-editor-body {
  padding: 20px 24px 24px 24px;
}

.hero-editor-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 992px) {
  .hero-editor-grid {
    grid-template-columns: 1fr;
  }
  .hero-segmented-tabs {
    grid-template-columns: 1fr;
  }
}

.hero-form-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-section-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  transition: border-color 0.2s ease;
}

.hero-section-card:hover {
  border-color: #cbd5e1;
}

.hero-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.hero-section-title {
  font-size: 0.87rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.hero-section-title i {
  color: #0284c7;
}

.hero-badge-dim {
  font-size: 0.74rem;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid #bae6fd;
}

/* Mode Selection Pills */
.hero-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .hero-mode-grid {
    grid-template-columns: 1fr;
  }
}

.hero-mode-pill {
  position: relative;
  display: block;
  cursor: pointer;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  transition: all 0.2s ease;
}

.hero-mode-pill input[type="radio"] {
  position: absolute;
  top: 14px;
  right: 14px;
  accent-color: #0284c7;
  cursor: pointer;
}

.hero-mode-pill:hover {
  border-color: #cbd5e1;
  background: #fcfcfc;
}

.hero-mode-pill:has(input:checked) {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 0 0 1px #0284c7;
}

.mode-pill-body {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-right: 20px;
}

.mode-pill-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.hero-mode-pill:has(input:checked) .mode-pill-icon {
  background: #e0f2fe;
}

.mode-pill-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.mode-pill-sub {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 3px;
  line-height: 1.3;
}

/* Upload & URL Group */
.hero-upload-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-upload-btn {
  padding: 8px 14px;
  font-size: 0.83rem;
  font-weight: 700;
  background: #0f766e;
  color: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.hero-upload-btn:hover {
  background: #115e59;
}

.hero-url-input-wrap {
  flex: 1;
  min-width: 190px;
  position: relative;
  display: flex;
  align-items: center;
}

.hero-url-input-wrap i {
  position: absolute;
  left: 10px;
  color: #94a3b8;
  font-size: 1.05rem;
}

.hero-url-input-wrap input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.83rem;
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.hero-url-input-wrap input:focus {
  border-color: #0284c7;
}

.hero-remove-btn {
  padding: 8px 12px;
  color: #ef4444;
  border: 1.5px solid #fecaca;
  background: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.hero-remove-btn:hover {
  background: #fef2f2;
  border-color: #f87171;
}

.hero-img-status {
  font-size: 0.77rem;
  color: #64748b;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Text Fields */
.hero-text-fields-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-inputs-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-label i {
  color: #0284c7;
}

.hero-input {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.84rem;
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.hero-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.hero-input-lg {
  font-weight: 700;
  font-size: 0.88rem;
  color: #0f172a;
}

.hero-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.83rem;
  outline: none;
  background: #ffffff;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.hero-textarea:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.hero-two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Styling Controls (Color & Opacity) */
.hero-styling-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: center;
}

@media (max-width: 640px) {
  .hero-styling-grid {
    grid-template-columns: 1fr;
  }
}

.hero-sublabel {
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  display: block;
  margin-bottom: 6px;
}

.hero-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.hero-color-swatch-input {
  width: 32px;
  height: 30px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  background: none;
}

.hero-preset-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}

.hero-preset-dots button {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.15s ease;
  padding: 0;
}

.hero-preset-dots button:hover {
  transform: scale(1.18);
}

.hero-slider-group {
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.hero-slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-opacity-val {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0284c7;
  background: #e0f2fe;
  padding: 2px 7px;
  border-radius: 6px;
}

.hero-range-slider {
  width: 100%;
  cursor: pointer;
  accent-color: #0284c7;
  margin: 6px 0 2px 0;
}

.hero-range-hints {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #94a3b8;
}

/* Form Footer */
.hero-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.hero-reset-btn {
  font-size: 0.82rem;
  font-weight: 700;
  color: #dc2626;
  border: 1.5px solid #fecaca;
  background: #ffffff;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.hero-reset-btn:hover {
  background: #fef2f2;
  border-color: #f87171;
}

.hero-save-btn-bottom {
  padding: 9px 22px;
  font-size: 0.88rem;
  font-weight: 700;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: none;
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  transition: all 0.2s ease;
}

.hero-save-btn-bottom:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

/* ==========================================================================
   RIGHT: STOREFRONT MOCKUP FRAME & LIVE PREVIEW
   ========================================================================== */
.hero-mockup-frame {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  position: sticky;
  top: 60px;
}

.hero-mockup-header {
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mockup-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.mockup-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.mockup-address-bar {
  flex: 1;
  max-width: 240px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.74rem;
  color: #475569;
  font-family: monospace;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mockup-live-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f766e;
  background: #ccfbf1;
  padding: 2px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.live-pulse {
  width: 7px;
  height: 7px;
  background: #0f766e;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.25);
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(15, 118, 110, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(15, 118, 110, 0); }
}

.hero-mockup-canvas-wrapper {
  padding: 16px;
  background: radial-gradient(circle at 50% 50%, #f8fafc 0%, #edf2f7 100%);
}

.hero-live-preview-canvas {
  min-height: 250px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  color: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.hero-preview-content {
  position: relative;
  z-index: 2;
  max-width: 95%;
}

.hero-preview-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

.hero-preview-title {
  font-size: 1.32rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 8px 0;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.hero-preview-desc {
  font-size: 0.81rem;
  line-height: 1.45;
  opacity: 0.95;
  margin: 0 0 14px 0;
  color: #f1f5f9;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.hero-preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.81rem;
  padding: 7px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease;
}

.hero-mockup-footer {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-link-chip {
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  font-family: monospace;
}

/* ==========================================================================
   👥 STAFF PROFILES & HR MANAGEMENT DOSSIER STYLES
   ========================================================================== */

.staff-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.staff-kpi-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.staff-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.staff-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.staff-kpi-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.staff-kpi-lbl {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 3px;
}

.staff-avatar-thumb {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #0f766e, #10b981);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  flex-shrink: 0;
}

.staff-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
}

.staff-role-admin {
  background: #fdf2f8;
  color: #be185d;
  border: 1px solid #fbcfe8;
}

.staff-role-manager {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.staff-role-staff {
  background: #fefce8;
  color: #a16207;
  border: 1px solid #fef08a;
}

.staff-role-inventory {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.staff-role-delivery {
  background: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
}

.staff-role-accountant {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.staff-role-rider {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.staff-role-packer {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.staff-role-driver {
  background: #f5f3ff;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}

.staff-role-support {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.staff-no-login-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 8px;
  border-radius: 6px;
}

/* Slim Staff Modal Sections */
.staff-slim-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.staff-slim-sec-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.staff-slim-label {
  font-size: 0.77rem;
  font-weight: 600;
  color: #475569;
  display: block;
  margin-bottom: 4px;
}

.staff-slim-input {
  width: 100%;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  font-size: 0.84rem;
  color: #0f172a;
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease;
}

.staff-slim-input:focus {
  border-color: #4f46e5;
}

.staff-slim-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  user-select: none;
}

.staff-slim-toggle input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #4f46e5;
  cursor: pointer;
}

.staff-contract-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.staff-contract-ok {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.staff-contract-warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.staff-contract-expired {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* Dossier Modal Box */
.staff-dossier-box {
  background: #ffffff;
  width: 100%;
  max-width: 760px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  max-height: 92vh;
}

.staff-dossier-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0f766e 100%);
  color: #ffffff;
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
}

.staff-dossier-photo {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 3.5px solid rgba(255,255,255,0.85);
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  background: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.staff-dossier-body {
  padding: 22px 28px;
  overflow-y: auto;
  flex: 1;
  background: #f8fafc;
}

.staff-dossier-section {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.staff-dossier-sec-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 8px;
}

.staff-dossier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px 20px;
}

.staff-dossier-item {
  display: flex;
  flex-direction: column;
}

.staff-dossier-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 3px;
}

.staff-dossier-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  word-break: break-word;
}

.staff-cv-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 8px;
  color: #15803d;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.staff-cv-download-btn:hover {
  background: #dcfce7;
  border-color: #4ade80;
}

/* ==========================================================================
   🤖 1. AUTOMATED COURIER TRACKING BOT STYLES
   ========================================================================== */

.courier-bot-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0369a1 100%);
  color: #ffffff;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 22px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.bot-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}

.bot-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 1.6s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.bot-sync-btn {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
  transition: all 0.2s ease;
}

.bot-sync-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.45);
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
}

/* ==========================================================================
   📦 2. BARCODE RETURN SCANNER STYLES
   ========================================================================== */

.return-scanner-box {
  background: #ffffff;
  border: 2px dashed #0284c7;
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 22px;
  background-color: #f0f9ff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.06);
}

.scanner-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.scanner-barcode-input {
  flex: 1;
  min-width: 260px;
  padding: 12px 16px;
  border: 2px solid #38bdf8;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: monospace;
}

.scanner-barcode-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

/* Inspection Result Card */
.return-inspect-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

/* ==========================================================================
   💬 3. WHATSAPP NOTIFICATION PREVIEW STYLES
   ========================================================================== */

.whatsapp-bubble-preview {
  background: #e7fed8;
  border: 1px solid #c1f3ab;
  border-radius: 12px 12px 2px 12px;
  padding: 14px 18px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #111b21;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  position: relative;
  font-family: system-ui, -apple-system, sans-serif;
  white-space: pre-wrap;
}

/* ==========================================================================
   🏆 4. STAFF COMMISSION LEADERBOARD STYLES
   ========================================================================== */

.commission-report-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.commission-kpi-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}




/* Sidebar Submenu for Settings */
.sidebar-menu-dropdown {
  width: 100%;
}

.sidebar-dropdown-toggle {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
}

.submenu-caret {
  transition: transform 0.25s ease;
  color: #94a3b8;
}

.submenu-caret.open {
  transform: rotate(180deg);
  color: #c084fc;
}

.sidebar-submenu-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: slideDownSubmenu 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownSubmenu {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sidebar-sublink {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
  text-decoration: none;
}

.sidebar-sublink:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(3px);
}

.sidebar-sublink.active {
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
  font-weight: 700;
  border-left: 3px solid #a855f7;
}

.sidebar-sublink i {
  font-size: 0.88rem;
  flex-shrink: 0;
}

/* ==========================================================================
   ENTERPRISE GROUPED ACCORDION SIDEBAR STYLING
   ========================================================================== */
.sidebar-group {
  width: 100%;
  margin-bottom: 2px;
}

.sidebar-group-toggle {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 8px 10px !important;
  font-weight: 600 !important;
  font-size: 0.83rem !important;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: #334155;
  background: transparent;
  border: none;
  text-align: left;
}

.sidebar-group-toggle:hover {
  background: #f1f5f9 !important;
  color: #0f766e !important;
  transform: translateX(2px);
}

.sidebar-group.open .sidebar-group-toggle {
  background: #f0fdfa !important;
  color: #0f766e !important;
  font-weight: 700 !important;
}

.sidebar-group-toggle.active-parent {
  color: #0f766e !important;
  font-weight: 700 !important;
}

.group-caret {
  font-size: 0.72rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: #94a3b8;
  flex-shrink: 0;
}

.sidebar-group.open .group-caret {
  transform: rotate(180deg);
  color: #0f766e;
}

.sidebar-group-sublist {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding-left: 10px;
  margin: 3px 0 6px 14px;
  border-left: 2px solid #ccfbf1;
  animation: slideDownAccordion 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-group.open .sidebar-group-sublist {
  display: flex;
}

.sidebar-sublink {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  color: #475569;
  font-size: 0.79rem;
  font-weight: 600;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
  text-decoration: none;
}

.sidebar-sublink:hover {
  background: #f0fdfa;
  color: #0f766e;
  transform: translateX(3px);
}

.sidebar-sublink.active {
  background: linear-gradient(90deg, #ecfdf5 0%, #f0fdfa 100%) !important;
  color: #0f766e !important;
  font-weight: 800 !important;
  border-left: 3px solid #0f766e !important;
  padding-left: 8px !important;
}

.sidebar-sublink i {
  font-size: 0.85rem;
  flex-shrink: 0;
}

.sidebar-nested-sublist {
  display: none;
  flex-direction: column;
  gap: 2px;
  margin: 2px 0 4px 16px;
  padding-left: 10px;
  border-left: 1.5px solid rgba(148, 163, 184, 0.25);
}

.sidebar-nested-sublist.open {
  display: flex;
}

.sidebar-nested-sublink {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 5px 9px;
  border: none;
  background: transparent;
  border-radius: 5px;
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sidebar-nested-sublink:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  transform: translateX(2px);
}

.sidebar-nested-sublink.active {
  background: rgba(20, 184, 166, 0.22);
  color: #5eead4;
  font-weight: 700;
}

.sidebar-nested-sublink i {
  font-size: 0.78rem;
  flex-shrink: 0;
}

/* ==========================================================================
   DRAG & DROP REORDERABLE SIDEBAR MENU GROUPS
   ========================================================================== */
.sidebar-draggable-groups {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-group,
.sidebar-sublink {
  position: relative;
  border-radius: 7px;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.sidebar-group.sidebar-dragging,
.sidebar-sublink.sidebar-dragging {
  opacity: 0.42;
}

.sidebar-group.drag-over-top::before,
.sidebar-group.drag-over-bottom::after,
.sidebar-sublink.drag-over-top::before,
.sidebar-sublink.drag-over-bottom::after {
  content: '';
  position: absolute;
  left: 6px;
  right: 6px;
  height: 3px;
  background: linear-gradient(90deg, #14b8a6 0%, #38bdf8 100%);
  border-radius: 99px;
  box-shadow: 0 0 8px rgba(20, 184, 166, 0.65);
  pointer-events: none;
  z-index: 5;
}

.sidebar-group.drag-over-top::before,
.sidebar-sublink.drag-over-top::before {
  top: -2px;
}

.sidebar-group.drag-over-bottom::after,
.sidebar-sublink.drag-over-bottom::after {
  bottom: -2px;
}

/* API & Integration Hub Submenu Setup Progress Bars */
.sidebar-sublink.has-api-progress {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 4px !important;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

.api-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.api-sub-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.api-sub-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-sub-pct {
  font-size: 0.63rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 99px;
  line-height: 1.35;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}

.api-sub-pct.api-pct-none {
  background: rgba(148, 163, 184, 0.16);
  color: #94a3b8;
}

.api-sub-pct.api-pct-mid {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.api-sub-pct.api-pct-full {
  background: rgba(16, 185, 129, 0.22);
  color: #34d399;
}

.api-sub-bar-track {
  display: block;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
}

.api-sub-bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 99px;
  transition: width 0.25s ease, background 0.25s ease;
}

.api-sub-bar-fill.api-pct-none {
  background: #64748b;
}

.api-sub-bar-fill.api-pct-mid {
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.api-sub-bar-fill.api-pct-full {
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

body.sidebar-collapsed .api-sub-pct,
body.sidebar-collapsed .api-sub-bar-track {
  display: none !important;
}

/* POS Customer Auto-Suggestion Dropdown */
.pos-cust-suggest-box {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 245px;
  max-width: 340px;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  z-index: 1250;
}

.pos-cust-suggest-item {
  padding: 7px 10px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  transition: background 0.12s ease;
}

.pos-cust-suggest-item:last-child {
  border-bottom: none;
}

.pos-cust-suggest-item:hover,
.pos-cust-suggest-item.active {
  background: #f0fdf4;
}

/* Hero Multi-Slide Manager Strip */
.hero-slides-manager-bar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.hero-slides-bar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.hero-slides-bar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.92rem;
  color: #0f172a;
}
.hero-slide-count-pill {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
}
.hero-slides-bar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.hero-slide-speed-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.78rem;
  color: #334155;
}
.hero-slide-speed-wrap select {
  border: none;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  cursor: pointer;
}
.hero-slide-act-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
}
.hero-slide-act-btn.add {
  background: #0284c7;
  border-color: #0284c7;
  color: #fff;
}
.hero-slide-act-btn.add:hover {
  background: #0369a1;
}
.hero-slide-act-btn.multi {
  background: #ecfdf5;
  border-color: #86efac;
  color: #047857;
}
.hero-slide-act-btn.multi:hover {
  background: #dcfce7;
}
.hero-slide-act-btn.del {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}
.hero-slide-pills-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.hero-slide-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  min-width: 155px;
  max-width: 215px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  flex-shrink: 0;
}
.hero-slide-pill.active {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.16);
}
.hero-slide-pill-thumb {
  width: 34px;
  height: 26px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.hero-slide-pill-meta {
  min-width: 0;
}
.hero-slide-pill-num {
  font-size: 0.72rem;
  font-weight: 800;
  color: #0284c7;
}
.hero-slide-pill-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-live-preview-canvas {
  position: relative;
}
.hero-preview-slider-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-prev-ctrl-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: #0f172a;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.hero-prev-ctrl-arrow.left { left: 8px; }
.hero-prev-ctrl-arrow.right { right: 8px; }
.hero-prev-ctrl-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  pointer-events: auto;
}
.hero-prev-ctrl-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  border: none;
  padding: 0;
}
.hero-prev-ctrl-dot.active {
  width: 18px;
  background: #10b981;
  box-shadow: 0 0 0 1px #fff;
}
@media (max-width: 768px) {
  .slim-add-grid-row1,
  .slim-add-grid-row2,
  .slim-add-grid-row3 {
    grid-template-columns: 1fr !important;
  }
}
/* === GLOBAL UNIFIED SLIM & SIMPLE ADMIN THEME LAYER === */
.admin-content {
  padding: 14px 18px;
}

.admin-tab-pane:not(#pane-sell_product) .admin-card {
  background: #ffffff;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03) !important;
  margin-bottom: 12px !important;
}

.admin-tab-pane:not(#pane-sell_product) .card-header {
  padding: 9px 15px !important;
  background: #fafbfc !important;
  border-bottom: 1px solid #f1f5f9 !important;
  gap: 8px;
  min-height: 0;
}

.admin-tab-pane:not(#pane-sell_product) .card-header h3,
.admin-tab-pane:not(#pane-sell_product) .card-header h4 {
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  color: #0f172a;
  margin: 0;
}

.admin-tab-pane:not(#pane-sell_product) .card-body {
  padding: 13px 15px !important;
}

.admin-tab-pane:not(#pane-sell_product) .card-body[style*="padding: 0"],
.admin-tab-pane:not(#pane-sell_product) .card-body[style*="padding:0"] {
  padding: 0 !important;
}

/* Slim Uniform KPI Stats Row */
.admin-tab-pane:not(#pane-sell_product) .stats-grid {
  gap: 10px !important;
  margin-bottom: 12px !important;
}

.admin-tab-pane:not(#pane-sell_product) .stat-card {
  padding: 9px 12px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 9px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.025) !important;
  gap: 10px !important;
}

.admin-tab-pane:not(#pane-sell_product) .stat-icon {
  width: 34px !important;
  height: 34px !important;
  font-size: 1rem !important;
  border-radius: 8px !important;
}

.admin-tab-pane:not(#pane-sell_product) .stat-info .stat-value {
  font-size: 1.16rem !important;
  line-height: 1.2 !important;
}

.admin-tab-pane:not(#pane-sell_product) .stat-info h4,
.admin-tab-pane:not(#pane-sell_product) .stat-info .stat-label {
  font-size: 0.72rem !important;
  margin-bottom: 1px !important;
}

.admin-tab-pane:not(#pane-sell_product) .stat-trend {
  font-size: 0.68rem !important;
  margin-top: 1px;
}

/* Clean Unified Inputs, Selects & Textareas */
.admin-tab-pane:not(#pane-sell_product) input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]):not([type="file"]):not([style*="border: none"]),
.admin-tab-pane:not(#pane-sell_product) select:not([style*="border: none"]),
.admin-tab-pane:not(#pane-sell_product) textarea {
  padding: 7px 10px;
  border-radius: 7px !important;
  border: 1px solid #cbd5e1 !important;
  font-size: 0.84rem !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Priority Override for Search Inputs with Icons */
.admin-tab-pane:not(#pane-sell_product) div:has(> .bi-search) input,
.admin-tab-pane:not(#pane-sell_product) div:has(> i.bi-search) input,
.admin-tab-pane:not(#pane-sell_product) input[style*="padding-left"],
.admin-tab-pane:not(#pane-sell_product) input[style*="38px"],
.admin-tab-pane:not(#pane-sell_product) input[style*="40px"],
.admin-tab-pane:not(#pane-sell_product) input[style*="36px"],
.admin-tab-pane:not(#pane-sell_product) input[style*="34px"],
.admin-tab-pane:not(#pane-sell_product) #stockAdjProductListSearch,
.admin-tab-pane:not(#pane-sell_product) #stockAddSearchQuick,
.admin-tab-pane:not(#pane-sell_product) #actSearchInput,
.admin-tab-pane:not(#pane-sell_product) #aiChatSearchInput,
.admin-tab-pane:not(#pane-sell_product) #kbMemorySearchInput,
.admin-tab-pane:not(#pane-sell_product) #staffSearchInput,
.admin-tab-pane:not(#pane-sell_product) #smsHubSearchInput,
.admin-tab-pane:not(#pane-sell_product) #publishSearchInput,
.admin-tab-pane:not(#pane-sell_product) #posTxSearchInput,
.admin-tab-pane:not(#pane-sell_product) #savedQuotationSearchInput,
.admin-tab-pane:not(#pane-sell_product) #customerWarrantyInput,
.admin-tab-pane:not(#pane-sell_product) #modalWarrantySearchInput {
  padding-left: 40px !important;
}

.admin-tab-pane:not(#pane-sell_product) input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]):focus,
.admin-tab-pane:not(#pane-sell_product) select:focus,
.admin-tab-pane:not(#pane-sell_product) textarea:focus {
  border-color: #0f766e !important;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.1) !important;
  outline: none;
}

.admin-tab-pane:not(#pane-sell_product) .form-group label {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #334155;
  margin-bottom: 4px !important;
}

/* Slim Consistent Buttons & Tables */
.admin-tab-pane:not(#pane-sell_product) .btn-primary-admin,
.admin-tab-pane:not(#pane-sell_product) .btn-action,
.hero-action-save-btn,
.hero-action-outline-btn {
  padding: 7px 13px !important;
  border-radius: 7px !important;
  font-size: 0.8rem !important;
}

.admin-tab-pane:not(#pane-sell_product) .admin-table th {
  padding: 7px 10px !important;
  font-size: 0.72rem !important;
}

.admin-tab-pane:not(#pane-sell_product) .admin-table td {
  padding: 7px 10px !important;
  font-size: 0.79rem !important;
}

/* Slim Hero & Top Announcement Marketing Cards */
.hero-pro-header {
  padding: 11px 16px !important;
  gap: 10px !important;
}

.hero-header-icon-box {
  width: 36px !important;
  height: 36px !important;
  border-radius: 9px !important;
  font-size: 1.05rem !important;
}

.hero-header-title {
  font-size: 0.96rem !important;
}

.hero-header-sub {
  font-size: 0.77rem !important;
  margin-top: 1px !important;
}

.hero-segmented-tabs-wrapper {
  padding: 10px 16px !important;
}

.hero-banner-tab {
  padding: 8px 11px !important;
}

.hero-editor-body {
  padding: 13px 16px 16px !important;
}

.hero-section-card {
  padding: 11px 13px !important;
  border-radius: 9px !important;
}

/* Slim AI & Settings Cards */
.ai-subview-panel .admin-card,
#pane-settings .admin-card > .card-body {
  padding: 13px 16px !important;
}

.ai-subview-panel .admin-card > .card-header {
  padding: 0 0 10px 0 !important;
  margin-bottom: 12px !important;
}

/* =========================================================
   ROLE / INTERFACE SWITCH LOTTIE TRANSITION OVERLAY
   ========================================================= */
.role-switch-lottie-overlay {
  --role-accent: #0f766e;
  --role-accent-soft: #ccfbf1;
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.role-switch-lottie-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.role-switch-lottie-card {
  width: 310px;
  max-width: calc(100vw - 32px);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  padding: 20px 22px 18px;
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.28);
  text-align: center;
  transform: scale(0.92) translateY(8px);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.role-switch-lottie-overlay.active .role-switch-lottie-card {
  transform: scale(1) translateY(0);
}

.role-switch-lottie-stage {
  width: 112px;
  height: 112px;
  margin: 0 auto 10px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#roleSwitchLottieCanvas {
  width: 112px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.role-switch-lottie-center-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  pointer-events: none;
  animation: roleSwitchIconPop 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.role-switch-lottie-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--role-accent-soft);
  color: var(--role-accent);
  margin-bottom: 8px;
}

.role-switch-lottie-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

.role-switch-lottie-sub {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
  margin-top: 3px;
}

.role-switch-lottie-bar {
  height: 4px;
  width: 100%;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 14px;
}

.role-switch-lottie-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: var(--role-accent);
}

.role-switch-lottie-overlay.active .role-switch-lottie-bar-fill {
  animation: roleSwitchBarProgress 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.lottie-fallback-svg {
  width: 112px;
  height: 112px;
}

.lottie-fallback-ring-outer {
  transform-origin: 50% 50%;
  animation: roleSwitchSpin 1.15s linear infinite;
}

.lottie-fallback-ring-inner {
  transform-origin: 50% 50%;
  animation: roleSwitchSpinRev 1.45s linear infinite;
}

@keyframes roleSwitchSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes roleSwitchSpinRev {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes roleSwitchIconPop {
  0% { transform: scale(0.65); opacity: 0.3; }
  65% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes roleSwitchBarProgress {
  0% { width: 8%; }
  100% { width: 100%; }
}

/* =========================================================
   OWNER HEADER ROLE + NAMED STAFF SWITCHER MENU
   ========================================================= */
.owner-role-switcher-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
}

.owner-role-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: #f1f5f9;
  font-weight: 700;
  font-size: 0.8rem;
  color: #1e293b;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 9px;
  border-radius: 7px;
  transition: background 0.15s ease;
  max-width: 175px;
}

.owner-role-switcher-btn:hover {
  background: #e2e8f0;
}

#ownerRoleSwitcherLabel {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.owner-role-switcher-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 265px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.15);
  z-index: 1250;
  overflow: hidden;
  padding: 6px;
}

.ors-role-group {
  border-radius: 8px;
  margin-bottom: 2px;
}

.ors-role-row {
  width: 100%;
  border: none;
  background: transparent;
  padding: 7px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  text-align: left;
  transition: background 0.14s ease;
}

.ors-role-row:hover {
  background: #f1f5f9;
}

.ors-role-row.active {
  background: #ecfdf5;
  color: #0f766e;
}

.ors-role-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
}

.ors-count-pill {
  background: #e2e8f0;
  color: #334155;
  padding: 1px 6px;
  border-radius: 99px;
  font-size: 0.68rem;
}

.ors-role-row.active .ors-count-pill {
  background: #ccfbf1;
  color: #0f766e;
}

.ors-staff-sublist {
  display: none;
  margin: 2px 0 4px 12px;
  padding-left: 8px;
  border-left: 2px solid #e2e8f0;
}

.ors-role-group.open .ors-staff-sublist {
  display: block;
}

.ors-role-group.open .ors-caret {
  transform: rotate(180deg);
}

.ors-caret {
  font-size: 0.7rem;
  color: #64748b;
  transition: transform 0.16s ease;
}

.ors-staff-item {
  width: 100%;
  border: none;
  background: transparent;
  padding: 6px 8px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.14s ease;
}

.ors-staff-item:hover {
  background: #eff6ff;
}

.ors-staff-item.active {
  background: #dbeafe;
}

.ors-staff-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 800;
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ors-staff-name {
  font-size: 0.79rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ors-staff-sub {
  font-size: 0.67rem;
  color: #64748b;
}

.ors-generic-item {
  width: 100%;
  border: none;
  background: transparent;
  padding: 5px 8px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.73rem;
  font-weight: 600;
  color: #475569;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ors-generic-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Topbar POS Lock Toggle Switch */
.pos-lock-toggle-btn {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  outline: none;
}

.pos-lock-toggle-btn:focus-visible .pos-lock-toggle-track {
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.14);
}

.pos-lock-toggle-track {
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: #e2e8f0;
  border: 1.5px solid #cbd5e1;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  pointer-events: none;
  transition: background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.2s ease;
}

.pos-lock-toggle-btn:hover .pos-lock-toggle-track {
  border-color: #94a3b8;
  background: #f1f5f9;
}

.pos-lock-toggle-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  color: #0f766e;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  transform: translateX(0);
  transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease, background-color 0.2s ease;
}

.pos-lock-toggle-btn.locked .pos-lock-toggle-track {
  background: #fee2e2;
  border-color: #ef4444;
}

.pos-lock-toggle-btn.locked .pos-lock-toggle-thumb {
  transform: translateX(22px);
  background: #dc2626;
  color: #ffffff;
}

.admin-content.pos-screen-blurred,
.pos-screen-blurred {
  filter: blur(11px);
  opacity: 0.72;
  pointer-events: none;
  user-select: none;
  transition: filter 0.22s ease, opacity 0.22s ease;
}

/* Privacy Screen Floating Card over Blurred Workspace */
.pos-privacy-islamic-overlay {
  position: sticky;
  top: 86px;
  height: 0;
  overflow: visible;
  z-index: 85;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 22px 18px 0;
  pointer-events: none;
}

.pos-islamic-card {
  pointer-events: auto;
  align-self: flex-start;
  flex-shrink: 0;
  width: 100%;
  max-width: 540px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2), 0 4px 18px rgba(15, 118, 110, 0.08);
  overflow: hidden;
  text-align: center;
}

.pos-islamic-topband {
  background: linear-gradient(135deg, #0f172a 0%, #0f766e 100%);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.pos-islamic-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.pos-privacy-theme-select {
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  border: none;
  border-radius: 8px;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.pos-islamic-body {
  padding: 22px 24px 20px;
  background: radial-gradient(circle at top right, rgba(204, 251, 241, 0.35), transparent 55%), #ffffff;
}

.pos-islamic-bismillah {
  font-family: 'Noorehuda', 'Al Qalam Quran Majeed', 'Amiri Quran', 'Scheherazade New', serif;
  font-size: 1.05rem;
  font-weight: 400;
  color: #b45309;
  direction: rtl;
  margin-bottom: 6px;
}

.pos-islamic-arabic {
  font-family: 'Noorehuda', 'Al Qalam Quran Majeed', 'Amiri Quran', 'Scheherazade New', serif;
  font-size: 1.72rem;
  line-height: 2.1;
  font-weight: 400;
  color: #0f172a;
  margin: 4px 0 10px;
  direction: rtl;
  letter-spacing: 0;
}

.pos-islamic-arabic.is-non-arabic {
  font-family: 'Kalpurush', 'Hind Siliguri', 'Inter', sans-serif;
  font-size: 1.2rem;
  line-height: 1.7;
  font-weight: 700;
  direction: ltr;
  color: #0f172a;
  margin: 6px 0 10px;
}

.pos-islamic-pronounce {
  font-family: 'Kalpurush', 'Hind Siliguri', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  -webkit-text-stroke: 0.35px currentColor;
  letter-spacing: 0.1px;
  color: #0f766e;
  margin-bottom: 6px;
}

.pos-islamic-meaning {
  font-family: 'Kalpurush', 'Hind Siliguri', sans-serif;
  font-size: 0.94rem;
  font-weight: 400;
  color: #334155;
  line-height: 1.65;
  margin-bottom: 12px;
}

.pos-islamic-virtue {
  font-family: 'Kalpurush', 'Hind Siliguri', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 9px 12px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.pos-islamic-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.pos-islamic-tasbih-btn {
  border: none;
  background: linear-gradient(135deg, #0f766e 0%, #059669 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
  transition: transform 0.14s ease;
}

.pos-islamic-tasbih-btn:active {
  transform: scale(0.96);
}

.pos-islamic-next-btn {
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pos-islamic-next-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.pos-islamic-hint {
  font-size: 0.73rem;
  font-weight: 700;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
  width: 100%;
  justify-content: center;
}

/* Stock Adjustment Right-Side Product List */
.stock-adj-list-item {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  border-radius: 9px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.stock-adj-list-item:hover {
  border-color: #f59e0b;
  background: #fffbeb;
}

.stock-adj-list-item.active {
  border-color: #f59e0b;
  background: #fef3c7;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.16);
}

@media (max-width: 992px) {
  .stock-adj-split-layout {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
   FORM TOGGLE SWITCH COMPONENT
   ========================================================= */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.toggle-slider {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  background-color: #cbd5e1;
  border-radius: 30px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #10b981;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(24px);
}

.toggle-switch input:focus + .toggle-slider {
  outline: 2px solid #8b5cf6;
  outline-offset: 2px;
}

.toggle-status-badge {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
  min-width: 72px;
  text-align: center;
  display: inline-block;
}

/* ========================================================
   🎯 ORDER MANAGEMENT - ROUND FLOATING ACTION DOCK
   ======================================================== */
.order-status-dock-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  position: relative;
}

.order-dock-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.order-dock-container.is-open {
  z-index: 1100;
}

.order-dock-trigger {
  position: relative;
  z-index: 1060;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 0.84rem;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.order-dock-trigger:hover {
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
  transform: scale(1.12);
  box-shadow: 0 3px 10px rgba(15, 118, 110, 0.4);
}

.order-dock-trigger.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  transform: rotate(45deg);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.45);
}

/* Circular Radial Speed Dial Container */
.order-action-dock {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 102px;
  height: 102px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1050;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.order-action-dock.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Frosted glass circular disc backdrop */
.order-action-dock::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.15);
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  border: 1.5px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.25), 0 4px 12px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(8px);
  pointer-events: none;
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  z-index: 1040;
}

.order-action-dock.active::before {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Outer subtle pulse dashed ring */
.order-action-dock::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.15);
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 1px dashed rgba(15, 118, 110, 0.35);
  pointer-events: none;
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  z-index: 1039;
}

.order-action-dock.active::after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Individual dock buttons positioned radially around the center plus button */
.order-dock-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 0.84rem;
  line-height: 1;
  z-index: 1055;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.16);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease, box-shadow 0.2s ease;
}

.order-action-dock.active .order-dock-btn {
  opacity: 1;
  pointer-events: auto;
}

/* 4 Radial Positions around the central button */
/* 1. Call & Verify: Top-Left */
.order-action-dock.active .btn-dock-call {
  transform: translate(calc(-50% - 27px), calc(-50% - 27px)) scale(1);
  transition-delay: 0.02s;
}

/* 2. Accept Order: Top-Right */
.order-action-dock.active .btn-dock-accept {
  transform: translate(calc(-50% + 27px), calc(-50% - 27px)) scale(1);
  transition-delay: 0.06s;
}

/* 3. Reject Order: Bottom-Left */
.order-action-dock.active .btn-dock-reject {
  transform: translate(calc(-50% - 27px), calc(-50% + 27px)) scale(1);
  transition-delay: 0.1s;
}

/* 4. Edit Status: Bottom-Right */
.order-action-dock.active .btn-dock-edit {
  transform: translate(calc(-50% + 27px), calc(-50% + 27px)) scale(1);
  transition-delay: 0.14s;
}

/* Hover effects when active */
.order-action-dock.active .btn-dock-call:hover {
  transform: translate(calc(-50% - 27px), calc(-50% - 27px)) scale(1.18);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.55);
}
.order-action-dock.active .btn-dock-accept:hover {
  transform: translate(calc(-50% + 27px), calc(-50% - 27px)) scale(1.18);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.55);
}
.order-action-dock.active .btn-dock-reject:hover {
  transform: translate(calc(-50% - 27px), calc(-50% + 27px)) scale(1.18);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.55);
}
.order-action-dock.active .btn-dock-edit:hover {
  transform: translate(calc(-50% + 27px), calc(-50% + 27px)) scale(1.18);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.55);
}

.order-dock-btn:active {
  transform: scale(0.92) !important;
}

/* Vibrant Button Gradients */
.btn-dock-call {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  color: #ffffff;
}

.btn-dock-accept {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
}

.btn-dock-reject {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
}

.btn-dock-edit {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #ffffff;
}

/* Floating Tooltips */
.order-dock-btn .dock-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #0f172a;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.35);
  z-index: 1300;
}

.order-dock-btn .dock-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #0f172a;
}

.order-dock-btn:hover .dock-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Bottom buttons have tooltips below */
.btn-dock-reject .dock-tooltip,
.btn-dock-edit .dock-tooltip {
  bottom: auto;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-4px);
}

.btn-dock-reject .dock-tooltip::after,
.btn-dock-edit .dock-tooltip::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: #0f172a;
}

.btn-dock-reject:hover .dock-tooltip,
.btn-dock-edit:hover .dock-tooltip {
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   GLOBAL SEARCH INPUT WITH EMBEDDED ICON POLISH (PREVENT TEXT OVERLAP)
   ========================================================================== */
div:has(> .bi-search) > input[type="text"],
div:has(> .bi-search) > input[type="search"],
div:has(> i.bi-search) > input,
div:has(> .bi-search) input,
.search-wrapper input,
.search-input-wrap input,
#stockAdjProductListSearch,
#stockAddSearchQuick,
#actSearchInput,
#aiChatSearchInput,
#kbMemorySearchInput,
#staffSearchInput,
#smsHubSearchInput,
#publishSearchInput,
#posTxSearchInput,
#savedQuotationSearchInput,
#customerWarrantyInput,
#modalWarrantySearchInput {
  padding-left: 40px !important;
  box-sizing: border-box !important;
}

div:has(> input) > .bi-search,
div:has(> input) > i.bi-search,
.search-wrapper .bi-search,
.search-input-wrap .bi-search {
  position: absolute !important;
  left: 13px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  pointer-events: none !important;
  color: #94a3b8 !important;
  font-size: 0.88rem !important;
  z-index: 2 !important;
}


/* ==========================================================================
   OPTIONAL SIDEBAR THEMES (SWITCHABLE VIA CLASS ON #adminSidebar)
   ========================================================================== */
/* Royal Deep Emerald Theme */
.admin-sidebar.theme-emerald {
  background: linear-gradient(180deg, #042f2e 0%, #064e3b 50%, #022c22 100%) !important;
  border-right: 1.5px solid #065f46 !important;
  color: #e2e8f0 !important;
  box-shadow: 4px 0 24px rgba(4, 47, 46, 0.25) !important;
}
.admin-sidebar.theme-emerald .sidebar-header {
  background: rgba(255, 255, 255, 0.05) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.admin-sidebar.theme-emerald .sidebar-title h2 { color: #ffffff !important; }
.admin-sidebar.theme-emerald .sidebar-title span { color: #34d399 !important; }
.admin-sidebar.theme-emerald .sidebar-collapse-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #a7f3d0 !important;
}
.admin-sidebar.theme-emerald .nav-heading { color: #6ee7b7 !important; }
.admin-sidebar.theme-emerald .sidebar-link,
.admin-sidebar.theme-emerald .sidebar-group-toggle {
  color: #ccfbf1 !important;
}
.admin-sidebar.theme-emerald .sidebar-link:hover,
.admin-sidebar.theme-emerald .sidebar-group-toggle:hover {
  background: rgba(255, 255, 255, 0.09) !important;
  color: #ffffff !important;
}
.admin-sidebar.theme-emerald .sidebar-group.open .sidebar-group-toggle {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}
.admin-sidebar.theme-emerald .sidebar-group-sublist {
  border-left-color: rgba(52, 211, 153, 0.4) !important;
}
.admin-sidebar.theme-emerald .sidebar-sublink { color: #a7f3d0 !important; }
.admin-sidebar.theme-emerald .sidebar-sublink:hover {
  background: rgba(255, 255, 255, 0.09) !important;
  color: #ffffff !important;
}
.admin-sidebar.theme-emerald .sidebar-sublink.active {
  background: rgba(16, 185, 129, 0.3) !important;
  color: #6ee7b7 !important;
  border-left-color: #34d399 !important;
}
.admin-sidebar.theme-emerald .sidebar-footer {
  background: rgba(0, 0, 0, 0.15) !important;
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* Classic Dark Theme */
.admin-sidebar.theme-dark {
  background: #090d16 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: #fff !important;
}
.admin-sidebar.theme-dark .sidebar-header {
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.admin-sidebar.theme-dark .sidebar-title h2 { color: #fff !important; }
.admin-sidebar.theme-dark .sidebar-title span { color: #34d399 !important; }
.admin-sidebar.theme-dark .sidebar-link,
.admin-sidebar.theme-dark .sidebar-group-toggle {
  color: #94a3b8 !important;
}
.admin-sidebar.theme-dark .sidebar-link:hover,
.admin-sidebar.theme-dark .sidebar-group-toggle:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}
.admin-sidebar.theme-dark .sidebar-sublink { color: #94a3b8 !important; }
.admin-sidebar.theme-dark .sidebar-footer {
  background: transparent !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}
