:root {
  --admin-primary: #007bff;
  --admin-primary-dark: #0056b3;
  --admin-sidebar-bg: #343a40;
  --admin-sidebar-hover: rgba(255, 255, 255, 0.1);
  --admin-bg: #f4f6f9;
  --admin-card: #ffffff;
  --admin-text: #212529;
  --admin-text-muted: #6c757d;
  --admin-border: #dee2e6;
  
  --info: #17a2b8;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --purple: #6f42c1;
  --secondary: #6c757d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Hind Siliguri', 'Outfit', sans-serif;
  background-color: var(--admin-bg);
  color: var(--admin-text);
  line-height: 1.5;
  overflow-x: hidden;
}

/* ==========================================================================
   ADMINLTE 3 MAIN WRAPPER & LAYOUT
   ========================================================================== */
.admin-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  background-color: #f4f6f9;
}

/* AdminLTE Main Sidebar */
.main-sidebar, .admin-sidebar {
  width: 250px;
  background-color: #343a40;
  color: #c2c7d0;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1038;
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease-in-out;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 14px 28px rgba(0,0,0,.25), 0 10px 10px rgba(0,0,0,.22);
  border-right: none;
}

/* Brand Link */
.brand-link {
  height: 57px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #4b545c;
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.brand-link .brand-image {
  width: 33px;
  height: 33px;
  object-fit: contain;
  border-radius: 50%;
  background: #ffffff;
  padding: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.brand-link .brand-text {
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* User Panel */
.user-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #4f5962;
  white-space: nowrap;
}

.user-panel .image-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #4b545c;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 15px;
}

.user-panel .info {
  line-height: 1.2;
}

.user-panel .info .user-name {
  color: #d0d4db;
  font-size: 13.5px;
  font-weight: 700;
}

.user-panel .info .user-status {
  font-size: 11px;
  color: #28a745;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.user-panel .info .user-status .dot {
  width: 7px;
  height: 7px;
  background: #28a745;
  border-radius: 50%;
  display: inline-block;
}

/* Sidebar Search */
.sidebar-search-box {
  padding: 10px 12px;
}

.sidebar-search-input {
  width: 100%;
  background: #3f474e;
  border: 1px solid #4f5962;
  border-radius: 4px;
  color: #ffffff;
  padding: 6px 12px;
  font-size: 12.5px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.sidebar-search-input:focus {
  border-color: #007bff;
}

/* Sidebar Menu */
.sidebar-menu {
  list-style: none;
  padding: 6px 0;
  flex: 1;
}

.nav-header {
  padding: 12px 16px 4px 16px;
  font-size: 10.5px;
  text-transform: uppercase;
  color: #6c757d;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.sidebar-item {
  margin: 2px 8px;
}

.sidebar-link, .nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  color: #c2c7d0;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}

.sidebar-link .link-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-link:hover, .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sidebar-item.active .sidebar-link, .sidebar-item.active .nav-link {
  background-color: #007bff;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.sidebar-badge {
  background: #dc3545;
  color: #ffffff;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid #4f5962;
  font-size: 12px;
  white-space: nowrap;
}

/* ==========================================================================
   ADMIN MAIN CONTENT WRAPPER
   ========================================================================== */
.admin-main {
  margin-left: 250px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #f4f6f9;
  transition: margin-left 0.3s ease-in-out;
}

/* AdminLTE Navbar */
.main-header, .admin-header {
  height: 57px;
  background: #ffffff;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.1);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item .nav-link-btn {
  background: transparent;
  border: none;
  color: #495057;
  padding: 7px 11px;
  border-radius: 4px;
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  font-family: inherit;
}

.nav-item .nav-link-btn:hover {
  background-color: #e9ecef;
  color: #212529;
}

.btn-hamburger {
  background: transparent;
  border: none;
  font-size: 18px;
  color: #495057;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 4px;
  transition: background-color 0.15s ease;
}

.btn-hamburger:hover {
  background-color: #e9ecef;
}

.navbar-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 10px;
  background: #ffc107;
  color: #1f2d3d;
}

.navbar-profile-pill {
  font-size: 12.5px;
  font-weight: 700;
  color: #495057;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.navbar-profile-pill .online-dot {
  width: 8px;
  height: 8px;
  background: #28a745;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}

.btn-logout-lte {
  background: #ffffff;
  color: #dc3545;
  border: 1px solid #f5c6cb;
  padding: 5px 11px;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-logout-lte:hover {
  background: #dc3545;
  color: #ffffff;
  border-color: #dc3545;
}

/* ==========================================================================
   SIDEBAR COLLAPSED MODE (ADMINLTE TOGGLE)
   ========================================================================== */
.admin-layout.sidebar-collapse .main-sidebar,
.admin-layout.sidebar-collapse .admin-sidebar {
  width: 68px;
}

.admin-layout.sidebar-collapse .admin-main {
  margin-left: 68px;
}

.admin-layout.sidebar-collapse .brand-text,
.admin-layout.sidebar-collapse .user-panel .info,
.admin-layout.sidebar-collapse .sidebar-search-box,
.admin-layout.sidebar-collapse .nav-header,
.admin-layout.sidebar-collapse .sidebar-footer,
.admin-layout.sidebar-collapse .sidebar-link p,
.admin-layout.sidebar-collapse .sidebar-link .sidebar-badge {
  display: none !important;
}

.admin-layout.sidebar-collapse .sidebar-link {
  justify-content: center;
  padding: 10px 0;
  text-align: center;
}

.admin-layout.sidebar-collapse .brand-link {
  justify-content: center;
  padding: 10px 0;
}

.admin-layout.sidebar-collapse .user-panel {
  justify-content: center;
  padding: 10px 0;
}

/* Mobile Responsive Sidebar (AdminLTE Pattern) */
@media (max-width: 992px) {
  .main-sidebar, .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1045;
  }
  .admin-layout.sidebar-open .main-sidebar,
  .admin-layout.sidebar-open .admin-sidebar {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0 !important;
  }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    backdrop-filter: blur(2px);
  }
  .admin-layout.sidebar-open .sidebar-backdrop {
    display: block;
  }
}

/* ==========================================================================
   ADMINLTE CONTENT HEADER & BREADCRUMBS
   ========================================================================== */
.content-header {
  padding: 16px 20px 8px 20px;
}

.content-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.page-title-lte {
  font-size: 22px;
  font-weight: 700;
  color: #212529;
  margin: 0;
}

.breadcrumb-lte {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  font-size: 13px;
  color: #6c757d;
  margin: 0;
  padding: 0;
}

.breadcrumb-lte a {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb-lte a:hover {
  text-decoration: underline;
}

.breadcrumb-lte .active {
  color: #6c757d;
  font-weight: 600;
}

/* Content Area */
.admin-content {
  padding: 12px 20px 24px 20px;
  flex: 1;
}

/* ==========================================================================
   ADMINLTE ICONIC SMALL BOXES (KPI WIDGETS)
   ========================================================================== */
.row-small-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.small-box {
  border-radius: 4px;
  position: relative;
  display: block;
  margin-bottom: 0;
  box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
  overflow: hidden;
  color: #ffffff;
}

.small-box .inner {
  padding: 14px 16px;
  position: relative;
  z-index: 2;
}

.small-box .inner h3 {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 4px 0;
  white-space: nowrap;
  font-family: 'Outfit', sans-serif;
  color: inherit;
}

.small-box .inner p {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  opacity: 0.95;
  color: inherit;
}

.small-box .icon {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 1;
  font-size: 54px;
  opacity: 0.22;
  transition: transform 0.3s ease;
  pointer-events: none;
}

.small-box:hover .icon {
  transform: scale(1.12);
}

.small-box-footer {
  display: block;
  padding: 6px 0;
  text-align: center;
  background: rgba(0, 0, 0, 0.12);
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  transition: background 0.15s ease;
  position: relative;
  z-index: 3;
}

.small-box-footer:hover {
  background: rgba(0, 0, 0, 0.22);
  color: #ffffff;
}

.small-box.bg-info { background-color: #17a2b8 !important; color: #ffffff !important; }
.small-box.bg-success { background-color: #28a745 !important; color: #ffffff !important; }
.small-box.bg-warning { background-color: #ffc107 !important; color: #1f2d3d !important; }
.small-box.bg-warning .small-box-footer { color: #1f2d3d !important; }
.small-box.bg-danger { background-color: #dc3545 !important; color: #ffffff !important; }

/* AdminLTE Secondary Info Boxes */
.row-info-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.info-box-lte {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 16px;
}

.info-box-lte .icon-box {
  width: 52px;
  height: 52px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #ffffff;
}

.info-box-lte .icon-box.blue { background-color: #007bff; }
.info-box-lte .icon-box.purple { background-color: #6f42c1; }

.info-box-lte .content-box {
  line-height: 1.2;
}

.info-box-lte .content-box .label {
  font-size: 12px;
  color: #6c757d;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.info-box-lte .content-box .value {
  font-size: 24px;
  font-weight: 800;
  color: #212529;
  font-family: 'Outfit', sans-serif;
  margin-top: 2px;
}

/* ==========================================================================
   ADMINLTE CARDS (CARD-PRIMARY CARD-OUTLINE)
   ========================================================================== */
.card, .data-card {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
  margin-bottom: 20px;
  overflow: hidden;
  border-top: 3px solid #007bff;
}

.card-header {
  padding: 10px 16px;
  background: transparent;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: #212529;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* AdminLTE Main Footer */
.main-footer {
  background-color: #ffffff;
  border-top: 1px solid #dee2e6;
  color: #869099;
  padding: 12px 20px;
  font-size: 13px;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}


.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.admin-table th {
  background: #f8fafc;
  padding: 12px 18px;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid var(--admin-border);
}

.admin-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--admin-border);
  vertical-align: middle;
}

.admin-table tr:hover {
  background: #f8fafc;
}

/* Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.pending { background: #fef3c7; color: #b45309; }
.status-pill.processing { background: #e0f2fe; color: #0369a1; }
.status-pill.shipped { background: #ede9fe; color: #6d28d9; }
.status-pill.delivered { background: #dcfce7; color: #15803d; }
.status-pill.cancelled { background: #fee2e2; color: #b91c1c; }

/* Action Buttons */
.btn-action {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--admin-border);
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-action:hover {
  background: #f1f5f9;
}

.btn-action.primary {
  background: var(--admin-primary);
  color: white;
  border-color: var(--admin-primary);
}

.btn-action.primary:hover {
  background: var(--admin-primary-dark);
}

.btn-action.danger {
  color: #ef4444;
  border-color: #fecaca;
}

.btn-action.danger:hover {
  background: #fee2e2;
}

/* Forms */
.admin-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  font-size: 14px;
}

.admin-input:focus {
  border-color: var(--admin-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Print Invoice Styling (A4 Format) */
@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;
  }
}

.invoice-container {
  background: white;
  max-width: 750px;
  margin: 0 auto;
  padding: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 14px;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.invoice-header .logo h2 {
  font-size: 26px;
  font-weight: 800;
  color: #ff4757;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.invoice-table th {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 10px;
  text-align: left;
}

.invoice-table td {
  border: 1px solid #cbd5e1;
  padding: 10px;
}

.invoice-total-section {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.invoice-total-box {
  width: 280px;
}

.invoice-total-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed #cbd5e1;
}

.invoice-total-row.grand {
  border-top: 2px solid #0f172a;
  border-bottom: 2px solid #0f172a;
  font-weight: 800;
  font-size: 16px;
  color: #ff4757;
  padding: 10px 0;
}

/* Category Management Cards */
.category-admin-card {
  background: white;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.2s;
}

.category-admin-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.category-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.category-info-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cat-emoji-badge {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.cat-titles h4 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.cat-titles span {
  font-size: 12.5px;
  color: #64748b;
}

.cat-slug-pill {
  display: inline-block;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-family: monospace;
  margin-left: 6px;
}

.cat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.subcategories-container {
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px 16px;
}

.subcategories-title {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.subcategories-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.subcat-chip {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.subcat-chip .chip-name {
  font-weight: 600;
  color: #1e293b;
}

.subcat-chip .chip-slug {
  font-size: 11px;
  color: #94a3b8;
  font-family: monospace;
}

.subcat-chip .chip-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 12px;
  color: #64748b;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.subcat-chip .chip-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

.subcat-chip .chip-btn.edit:hover {
  background: #dbeafe;
  color: #2563eb;
}

/* Banner Admin Styles */
.banner-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.banner-card-box {
  background: white;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
}

.banner-card-box h5 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   ENHANCED CATEGORY & SUBCATEGORY STYLES
============================================================ */
.category-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.cat-stat-card {
  background: white;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.cat-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: #f1f5f9;
}

.cat-stat-info h5 {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.cat-stat-info .stat-num {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.category-filter-bar {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  background: white;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--admin-border);
}

.cat-search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.cat-search-box input {
  padding-left: 36px;
  width: 100%;
}

.cat-search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
}

.cat-prod-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
}

.subcat-chip-add {
  background: #f8fafc;
  border: 1px dashed #94a3b8;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.subcat-chip-add:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
}

/* Emoji Palette in Modal */
.emoji-palette-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
  margin-top: 6px;
  max-height: 120px;
  overflow-y: auto;
}

.emoji-palette-item {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border-radius: 6px;
  cursor: pointer;
  background: white;
  border: 1px solid #cbd5e1;
  transition: transform 0.15s, background-color 0.15s;
}

.emoji-palette-item:hover {
  transform: scale(1.15);
  background: #fef08a;
  border-color: #eab308;
}

/* Floating Toast Notification */
.admin-toast-box {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.admin-toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
  background: #0f172a;
  color: white;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 600;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.3s, transform 0.3s;
}

.admin-toast.success {
  background: #065f46;
  border-left: 5px solid #34d399;
}

.admin-toast.error {
  background: #991b1b;
  border-left: 5px solid #f87171;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============================================================
   ULTRA-CLEAN & MINIMAL SAAS ORDER TABLE STYLES
============================================================ */
.orders-filter-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
}

.status-segmented-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 9px;
  flex-wrap: wrap;
}

.status-seg-btn {
  background: transparent;
  border: none;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.status-seg-btn:hover {
  color: #0f172a;
}

.status-seg-btn.active {
  background: white;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.seg-count {
  font-size: 11px;
  background: #e2e8f0;
  color: #475569;
  padding: 1px 6px;
  border-radius: 9999px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

.status-seg-btn.active .seg-count {
  background: #eff6ff;
  color: #2563eb;
}

.btn-export-csv {
  background: white;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-export-csv:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

/* Order Table Cells */
.order-id-badge {
  font-family: 'Outfit', monospace, sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  letter-spacing: 0.3px;
}

.order-time {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 3px;
  font-weight: 500;
}

.customer-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.customer-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 13.5px;
}

.customer-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  font-family: 'Outfit', sans-serif;
}

.fraud-pill {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 1px 7px;
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: inherit;
}

.fraud-pill:hover {
  background: #0f172a;
  color: white;
  border-color: #0f172a;
}

.customer-addr {
  font-size: 11px;
  color: #94a3b8;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.items-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.items-summary {
  font-size: 12.5px;
  color: #1e293b;
  font-weight: 500;
  line-height: 1.35;
  max-width: 220px;
}

.zone-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  width: fit-content;
}

.zone-badge.inside {
  background: #ecfdf5;
  color: #065f46;
}

.zone-badge.outside {
  background: #eff6ff;
  color: #1e40af;
}

.price-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.pay-badge {
  display: inline-flex;
  align-items: center;
/* ==========================================================================
   ULTRA-CLEAN MINIMAL ORDERS & TABLES DESIGN SYSTEM (MODERN SAAS)
   ========================================================================== */

/* Orders Toolbar (Segmented Controls + Search + CSV) */
.orders-toolbar {
  padding: 16px 20px;
  background: #ffffff;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.status-segmented-tabs {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  gap: 3px;
  overflow-x: auto;
  max-width: 100%;
}

.status-seg-btn {
  background: transparent;
  border: none;
  outline: none;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
  white-space: nowrap;
  font-family: inherit;
}

.status-seg-btn:hover {
  color: #1e293b;
  background: rgba(255, 255, 255, 0.5);
}

.status-seg-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  font-weight: 700;
}

.status-seg-btn .seg-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  background: #e2e8f0;
  color: #475569;
  transition: all 0.18s ease;
}

.status-seg-btn.active .seg-count {
  background: #3b82f6;
  color: #ffffff;
}

/* Toolbar Right: Search + Export */
.orders-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.table-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 12px;
  transition: all 0.2s;
  min-width: 250px;
}

.table-search-box:focus-within {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.table-search-box svg {
  color: #94a3b8;
  flex-shrink: 0;
}

.table-search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: #1e293b;
  width: 100%;
  font-family: inherit;
}

.btn-export-csv {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

.btn-export-csv:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

/* Modern Minimal Admin Table */
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 13px;
}

.admin-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  background: #ffffff;
  transition: background-color 0.15s ease;
}

.admin-table tbody tr:hover td {
  background-color: #f8fafc;
}

/* Cell 1: Order ID & Date */
.cell-order-id {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.badge-order-id {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  cursor: pointer;
  transition: all 0.15s ease;
}

.badge-order-id:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

.text-order-date {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

/* Cell 2: Customer Info */
.cell-customer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 220px;
}

.cust-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cust-phone-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cust-phone {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  color: #475569;
  font-weight: 600;
}

.btn-micro-fraud {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-micro-fraud:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #cbd5e1;
}

.cust-address {
  font-size: 11.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* Cell 3: Items & Zone */
.cell-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 240px;
}

.item-chip {
  font-size: 12.5px;
  color: #334155;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-qty-tag {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 3px;
}

.zone-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  width: fit-content;
}

.zone-chip.inside {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.zone-chip.outside {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Cell 4: Price & Payment */
.cell-price {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.price-main {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.pay-badge-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.pill-pay-method {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
}

.pill-pay-method.bkash {
  background: #fdf2f8;
  color: #be185d;
  border: 1px solid #fbcfe8;
}

.pill-pay-method.nagad {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.pill-pay-method.cod {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.pill-trx-id {
  font-family: 'Outfit', monospace;
  font-size: 10px;
  color: #64748b;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px dashed #cbd5e1;
  cursor: pointer;
}

.pill-trx-id:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Cell 5: Courier */
.btn-courier-mini {
  background: #ffffff;
  color: #15803d;
  border: 1px solid #86efac;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: inherit;
}

.btn-courier-mini:hover {
  background: #16a34a;
  color: #ffffff;
  border-color: #16a34a;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.2);
}

.courier-booked-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 7px;
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
}

.courier-booked-name {
  font-size: 10px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.courier-booked-code {
  font-family: 'Outfit', monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: #2563eb;
  cursor: pointer;
}

.courier-booked-code:hover {
  text-decoration: underline;
}

/* Cell 6: Modern Status Select Dropdown */
.status-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.status-dropdown-wrap select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 11px;
  padding: 5px 22px 5px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 9999px;
  cursor: pointer;
  outline: none;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: inherit;
}

.status-dropdown-wrap select.pending {
  background-color: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.status-dropdown-wrap select.processing {
  background-color: #f0f9ff;
  color: #0284c7;
  border-color: #bae6fd;
}

.status-dropdown-wrap select.shipped {
  background-color: #f5f3ff;
  color: #7c3aed;
  border-color: #ddd6fe;
}

.status-dropdown-wrap select.delivered {
  background-color: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

.status-dropdown-wrap select.cancelled {
  background-color: #fff1f2;
  color: #e11d48;
  border-color: #fecdd3;
}

/* Cell 7: Inline Horizontal Action Icons */
.order-action-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.btn-icon-action {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13px;
  text-decoration: none;
  padding: 0;
}

.btn-icon-action:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-icon-action.whatsapp {
  color: #16a34a;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.btn-icon-action.whatsapp:hover {
  background: #16a34a;
  color: #ffffff;
  border-color: #16a34a;
}

.btn-icon-action.invoice {
  color: #2563eb;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.btn-icon-action.invoice:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}


