/* Main Page Styles */
body {
  display: flex;
  margin: 0;
  height: 100vh;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f5f5f5;
}

.sidebar {
  width: 240px;
  background: #212529;
  color: #fff;
  height: 100vh;
  position: fixed;
  overflow-y: auto;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  padding: 0;
}

.sidebar .brand {
  font-size: 1.5rem;
  font-weight: bold;
  padding: 1rem 1.5rem;
  color: #0d6efd;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 0.5rem;
}

.sidebar .section-title {
  cursor: pointer;
  padding: 0.75rem 1.5rem;
  font-size: 0.75rem;
  color: #adb5bd;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.sidebar .section-title:hover {
  color: #0d6efd;
  background-color: rgba(13, 110, 253, 0.1);
}

.sidebar .section-title::after {
  content: '▼';
  font-size: 0.6rem;
  transition: transform 0.3s ease;
  margin-left: auto;
}

.sidebar .section-title.collapsed::after {
  transform: rotate(-90deg);
}

.sidebar .section-menu {
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0;
}

.sidebar .section-menu.collapsed {
  max-height: 0;
  padding: 0;
}

/* Additional compact spacing for sidebar */
.sidebar .nav-link {
  padding: 0.5rem 1.5rem !important;
  margin: 0 !important;
}

.sidebar .section-title {
  margin: 0 !important;
}

.sidebar h5 {
  margin: 0 !important;
  padding: 0.5rem 1.5rem;
}

.sidebar h5 {
  padding: 0.5rem 1.5rem;
  font-size: 0.75rem;
  color: #adb5bd;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.sidebar .nav-link {
  color: #dee2e6;
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  transition: background 0.3s, color 0.3s;
  cursor: pointer;
}

.sidebar .nav-link i {
  margin-right: 10px;
  font-size: 1rem;
}

.sidebar .nav-link:hover {
  background-color: #0d6efd;
  color: #fff;
}

.sidebar .nav-link.active {
  background-color: #0d6efd;
  color: #fff !important;
  font-weight: bold;
  border-left: 4px solid #0a58ca;
}

.sidebar .nav-link.active i {
  color: #fff !important;
}

/* Dropdown Toggle Button */
.dropdown-toggle {
  cursor: pointer;
  color: #dee2e6;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  transition: all 0.3s ease;
  font-weight: 500;
}

.dropdown-toggle i {
  margin-right: 10px;
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.dropdown-toggle:hover {
  background-color: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
}

.dropdown-toggle::after {
  content: '▼';
  margin-left: auto;
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

.dropdown-toggle.collapsed::after {
  transform: rotate(-90deg);
}

.dropdown-toggle:not(.collapsed)::after {
  transform: rotate(0deg);
}

/* Dropdown submenu styles */
.dropdown-menu-items {
  max-height: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.dropdown-menu-items.show {
  max-height: 500px;
  padding: 0.5rem 0;
}

.dropdown-menu-items .nav-link {
  padding-left: 3rem !important;
  font-size: 0.9rem;
  color: #adb5bd;
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
}

.dropdown-menu-items .nav-link:hover {
  background-color: rgba(13, 110, 253, 0.15);
  color: #0d6efd;
  border-left-color: #0d6efd;
  padding-left: 3.2rem !important;
}

.dropdown-menu-items .nav-link.active {
  background-color: rgba(13, 110, 253, 0.2);
  color: #0d6efd;
  border-left-color: #0d6efd;
  font-weight: 600;
}

/* Sidebar Profile Footer */
.sidebar-footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.2);
}

.profile-icon-btn {
  width: 100%;
  padding: 0.75rem;
  background: #0d6efd;
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 1rem;
  transition: background 0.3s ease;
  text-decoration: none;
}

.profile-icon-btn:hover {
  background: #0a58ca;
  color: white;
}

.profile-icon-btn i {
  font-size: 1.25rem;
}

.content {
  margin-left: 240px;
  padding: 2rem;
  width: 100%;
  overflow-y: auto;
  background-color: #f5f5f5;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #212529;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.section-title i {
  margin-right: 10px;
  color: #0d6efd;
}

/* Metric Card Styles */
.metric-card {
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

/* Unique background colors for each metric card */
.metric-card:nth-child(1) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.metric-card:nth-child(2) {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #fff;
}

.metric-card:nth-child(3) {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: #fff;
}

.metric-card:nth-child(4) {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: #fff;
}

.metric-card:nth-child(5) {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  color: #fff;
}

.metric-card:nth-child(6) {
  background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
  color: #fff;
}

.metric-card:nth-child(7) {
  background: linear-gradient(135deg, #a8edea 0%, #fed6f1 100%);
  color: #333;
}

.metric-card:nth-child(8) {
  background: linear-gradient(135deg, #ff9a56 0%, #ff6a88 100%);
  color: #fff;
}

.metric-card:nth-child(9) {
  background: linear-gradient(135deg, #2e2e78 0%, #667eea 100%);
  color: #fff;
}

/* Product Details Section Colors */
.product-details-section .metric-card:nth-child(1) {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.product-details-section .metric-card:nth-child(2) {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.product-details-section .metric-card:nth-child(3) {
  background: linear-gradient(135deg, #8b5cf6 0%, #c084fc 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.product-details-section .metric-card:nth-child(4) {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.metric-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transform: translateY(-5px);
}

.metric-header {
  margin-bottom: 1rem;
}

.metric-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin: 0;
  text-transform: none;
}

.metric-description {
  font-size: 0.85rem;
  margin-bottom: 1rem;
  line-height: 1.4;
  opacity: 0.95;
}

.metric-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.metric-count {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.logout-users-card .metric-count {
  color: #ffffff;
}

.logout-users-card .metric-title {
  color: #ffffff;
}

.metric-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.metric-arrow:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateX(4px);
}

/* Grid Layout */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 1400px) {
  .metrics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .content {
    margin-left: 0;
    width: 100%;
    padding: 1rem;
  }

  .sidebar {
    width: 200px;
  }

  .page-title {
    font-size: 1.5rem;
  }
}

/* Divider */
.section-divider {
  border: none;
  border-top: 2px solid #e9ecef;
  margin: 2rem 0;
}

/* Location Based Popup Styles */
.location-based-card {
  cursor: pointer;
  transition: transform 0.2s;
}

.location-based-card:hover {
  transform: translateY(-5px);
}

/* Location Stats in Modal Header */
.location-stats {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-left: auto;
}

.stat-item {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  color: white;
  min-width: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: bold;
}

.location-popup-container {
  display: flex;
  gap: 2rem;
  height: 600px;
}

.location-left-panel {
  flex: 0 0 30%;
  border-right: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
}

.location-right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.location-search {
  margin-bottom: 1rem;
}

.location-search input {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.95rem;
}

.location-search input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  outline: none;
}

.pincode-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.pincode-item {
  padding: 1rem;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #fff;
}

.pincode-item:hover {
  background: #f8f9fa;
  border-color: #0d6efd;
  box-shadow: 0 2px 4px rgba(13, 110, 253, 0.15);
}

.pincode-item.active {
  background: #e7f1ff;
  border-color: #0d6efd;
}

.pincode-info {
  display: flex;
  flex-direction: column;
}

.pincode-number {
  font-weight: 600;
  font-size: 1rem;
  color: #212529;
}

.pincode-orders-count {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

.pincode-arrow {
  color: #0d6efd;
  font-size: 1.25rem;
  transition: transform 0.3s;
}

.pincode-item:hover .pincode-arrow {
  transform: translateX(5px);
}

/* Order Details Styles */
.order-details-container {
  padding: 1rem;
}

.order-item {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: all 0.3s;
}

.order-item:hover {
  border-color: #0d6efd;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.order-id-badge {
  font-weight: 600;
  color: #0d6efd;
  font-size: 1rem;
}

.order-toggle-icon {
  color: #6c757d;
  transition: transform 0.3s;
  font-size: 1.25rem;
}

.order-item.expanded .order-toggle-icon {
  transform: rotate(180deg);
}

.order-details {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #dee2e6;
  display: none;
}

.order-item.expanded .order-details {
  display: block;
}

.order-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.95rem;
}

.order-detail-label {
  font-weight: 500;
  color: #6c757d;
}

.order-detail-value {
  color: #212529;
  font-weight: 500;
}

.product-list {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #dee2e6;
}

.product-list-title {
  font-weight: 600;
  color: #212529;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.product-item {
  padding: 0.5rem 0;
  font-size: 0.85rem;
  color: #495057;
  padding-left: 1rem;
}

.product-item:before {
  content: "◦ ";
  color: #0d6efd;
  font-weight: bold;
}

/* COD Orders Styles */
.cod-orders-card {
  cursor: pointer;
  transition: transform 0.2s;
}

.cod-orders-card:hover {
  transform: translateY(-5px);
}

.cod-stats {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-left: auto;
}

.cod-popup-container {
  display: flex;
  gap: 2rem;
  height: 600px;
}

.cod-left-panel {
  flex: 0 0 30%;
  border-right: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
}

.cod-right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.cod-search {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
}

.cod-search input {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.95rem;
  flex: 1;
}

.cod-search input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  outline: none;
}

.order-id-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.order-id-item {
  padding: 1rem;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #fff;
}

.order-id-item:hover {
  background: #f8f9fa;
  border-color: #0d6efd;
  box-shadow: 0 2px 4px rgba(13, 110, 253, 0.15);
}

.order-id-item.active {
  background: #e7f1ff;
  border-color: #0d6efd;
}

.order-id-info {
  display: flex;
  flex-direction: column;
}

.order-id-number {
  font-weight: 600;
  font-size: 1rem;
  color: #212529;
}

.order-id-status {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

.order-id-arrow {
  color: #0d6efd;
  font-size: 1.25rem;
  transition: transform 0.3s;
}

.order-id-item:hover .order-id-arrow {
  transform: translateX(5px);
}

/* Prepaid Orders Styles */
.prepaid-orders-card {
  cursor: pointer;
  transition: transform 0.2s;
}

.prepaid-orders-card:hover {
  transform: translateY(-5px);
}

.prepaid-stats {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-left: auto;
}

.prepaid-popup-container {
  display: flex;
  gap: 2rem;
  height: 600px;
}

.prepaid-left-panel {
  flex: 0 0 30%;
  border-right: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
}

.prepaid-right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.prepaid-search {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
}

.prepaid-search input {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.95rem;
  flex: 1;
}

.prepaid-search input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  outline: none;
}

.prepaid-order-id-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* Multiple Orders Styles */
.multiple-orders-card {
  cursor: pointer;
  transition: transform 0.2s;
}

.multiple-orders-card:hover {
  transform: translateY(-5px);
}

.multiple-stats {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-left: auto;
}

.multiple-popup-container {
  display: flex;
  gap: 2rem;
  height: 600px;
}

.multiple-left-panel {
  flex: 0 0 30%;
  border-right: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
}

.multiple-right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.multiple-search {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
}

.multiple-search input {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.95rem;
  flex: 1;
}

.multiple-search input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  outline: none;
}

.multiple-order-search {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
}

.multiple-order-search input {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.95rem;
  flex: 1;
}

.multiple-order-search input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  outline: none;
}

.multiple-user-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.multiple-user-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  transition: background-color 0.2s;
}

.multiple-user-item:hover {
  background-color: #f8f9fa;
}

.multiple-user-item.active {
  background-color: #e7f1ff;
  border-left: 3px solid #0d6efd;
}

.multiple-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.user-mobile {
  font-weight: 600;
  color: #212529;
}

.user-order-count {
  font-size: 0.85rem;
  color: #6c757d;
}

.multiple-user-arrow {
  color: #0d6efd;
  font-weight: bold;
  transition: transform 0.2s;
}

.multiple-user-item.active .multiple-user-arrow {
  transform: rotate(90deg);
}

.user-orders-header {
  padding: 1rem;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  border-radius: 0.25rem;
  margin-bottom: 1rem;
}

.user-orders-header div {
  padding: 0.25rem 0;
  font-size: 0.95rem;
}

.user-orders-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.order-item {
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.order-item:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.order-header {
  padding: 0.75rem 1rem;
  background-color: #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.order-header:hover {
  background-color: #e9ecef;
}

.order-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.order-amount {
  font-weight: bold;
  color: #198754;
}

.order-status {
  margin-left: auto;
}

.order-body {
  padding: 1rem;
  background-color: #fff;
}

.order-detail-item {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.order-detail-item strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #212529;
}

.order-images {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .cod-popup-container {
    flex-direction: column;
    height: auto;
  }

  .cod-left-panel {
    flex: 0 0 auto;
    border-right: none;
    border-bottom: 1px solid #e9ecef;
    max-height: 300px;
  }
}

/* Viewed Products Modal Styles */
.viewed-products-card {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.viewed-products-card:hover {
  transform: translateY(-5px);
}

.viewed-popup-container {
  display: flex;
  gap: 2rem;
  height: 600px;
}
#viewedProductsModal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

#viewedProductsModal .modal-title {
  margin-bottom: 0;
}

#wishlistModal .modal-header,
#cartProductsModal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

#wishlistModal .modal-title,
#cartProductsModal .modal-title {
  margin-bottom: 0;
}

#activeUsersModal .modal-header,
#loginUsersModal .modal-header,
#logoutUsersModal .modal-header,
#ordersPlacedModal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

#activeUsersModal .modal-title,
#loginUsersModal .modal-title,
#logoutUsersModal .modal-title,
#ordersPlacedModal .modal-title {
  margin-bottom: 0;
}

.active-users-stats,
.login-users-stats,
.logout-users-stats,
.orders-placed-stats {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.viewed-left-panel {
  flex: 0 0 30%;
  border-right: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
}

.viewed-right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.viewed-search {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
}

.viewed-search input {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.95rem;
  flex: 1;
}

.viewed-search input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  outline: none;
}

.viewed-product-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.viewed-product-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  transition: background-color 0.2s;
}

.viewed-product-item:hover {
  background-color: #f8f9fa;
}

.viewed-product-item.active {
  background-color: #e7f1ff;
  border-left: 3px solid #0d6efd;
}

/* Viewed Brand Items Styles */
.viewed-brand-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  transition: background-color 0.2s;
}

.viewed-brand-item:hover {
  background-color: #f8f9fa;
}

.viewed-brand-item.active {
  background-color: #e7f1ff;
  border-left: 3px solid #0d6efd;
}

.viewed-brand-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.brand-name {
  font-weight: 600;
  color: #212529;
  font-size: 0.9rem;
  line-height: 1.2;
}

.brand-meta {
  font-size: 0.8rem;
  color: #6c757d;
}

.viewed-brand-arrow {
  color: #0d6efd;
  font-weight: bold;
  margin-left: 0.5rem;
}

.viewed-brand-item.active .viewed-brand-arrow {
  transform: rotate(90deg);
}

.viewed-product-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.product-title {
  font-weight: 600;
  color: #212529;
  font-size: 0.9rem;
  line-height: 1.2;
}

.product-meta {
  font-size: 0.8rem;
  color: #6c757d;
}

.viewed-product-arrow {
  color: #0d6efd;
  font-weight: bold;
  margin-left: 0.5rem;
}

.viewed-product-item.active .viewed-product-arrow {
  transform: rotate(90deg);
}

.product-details-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-header {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
}

.product-image-thumb {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 0.5rem;
  flex-shrink: 0;
}

.product-info-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.product-info-header h5 {
  margin: 0;
  font-size: 1rem;
  color: #212529;
}

.product-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.product-info-row strong {
  color: #212529;
}

.product-info-row span {
  color: #6c757d;
}

.view-history {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.view-history-title {
  font-weight: 600;
  color: #212529;
  font-size: 0.95rem;
  padding: 0;
}

.view-items-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
}

.view-history-item {
  padding: 0.75rem 1rem;
  background-color: #f8f9fa;
  border-radius: 0.25rem;
  font-size: 0.85rem;
  color: #6c757d;
  border-left: 3px solid transparent;
  transition: background-color 0.2s;
}

.view-history-item:hover {
  background-color: #e9ecef;
  border-left-color: #0d6efd;
}

/* Wishlist & Cart Products Modal Styles */
.wishlist-card,
.cart-products-card {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.wishlist-card:hover,
.cart-products-card:hover {
  transform: translateY(-5px);
}

.product-popup-container {
  display: flex;
  gap: 2rem;
  height: 600px;
}

.product-left-panel {
  flex: 0 0 30%;
  border-right: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
}

.product-right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.product-search {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
}

.product-search input {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.95rem;
  flex: 1;
}

.product-search input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  outline: none;
}

.product-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.product-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  transition: background-color 0.2s;
}

.product-item:hover {
  background-color: #f8f9fa;
}

.product-item.active {
  background-color: #e7f1ff;
  border-left: 3px solid #0d6efd;
}

.product-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.product-item-title {
  font-weight: 600;
  color: #212529;
  font-size: 0.9rem;
  line-height: 1.2;
}

.product-item-meta {
  font-size: 0.8rem;
  color: #6c757d;
}

.product-item-arrow {
  color: #0d6efd;
  font-weight: bold;
  margin-left: 0.5rem;
}

.product-item.active .product-item-arrow {
  transform: rotate(90deg);
}

.product-details-header {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
}

.product-details-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 0.5rem;
  flex-shrink: 0;
}

.product-details-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.product-details-info h5 {
  margin: 0;
  font-size: 1rem;
  color: #212529;
}

.product-details-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.product-details-row strong {
  color: #212529;
}

.product-details-row span {
  color: #6c757d;
}

@media (max-width: 768px) {
  .viewed-popup-container,
  .product-popup-container {
    flex-direction: column;
    height: auto;
  }

  .viewed-left-panel,
  .product-left-panel {
    flex: 0 0 auto;
    border-right: none;
    border-bottom: 1px solid #e9ecef;
    max-height: 300px;
  }
}

/* Active Users Popup Styles */
.active-users-popup-container {
  display: flex;
  gap: 1rem;
  height: 600px;
}

.active-users-left-panel {
  flex: 0 0 40%;
  border-right: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
}

.active-users-search {
  padding-bottom: 1rem;
}

.active-users-list {
  flex: 1;
  overflow-y: auto;
}

.active-users-item {
  padding: 0.75rem;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  flex-direction: column;
}

.active-users-item:hover {
  background-color: #f8f9fa;
}

.active-users-item.active {
  background-color: #e7f1ff;
  border-left: 3px solid #0d6efd;
}

.active-users-item-title {
  font-weight: 600;
  color: #212529;
  font-size: 0.9rem;
}

.active-users-item-meta {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

.active-users-right-panel {
  flex: 0 0 60%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.active-users-details-container {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.active-users-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.9rem;
}

.active-users-detail-row strong {
  color: #212529;
  font-weight: 600;
}

.active-users-detail-row span {
  color: #6c757d;
  word-break: break-all;
}

/* Login Users Popup Styles */
.login-users-popup-container {
  display: flex;
  gap: 1rem;
  height: 600px;
}

.login-users-left-panel {
  flex: 0 0 40%;
  border-right: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
}

.login-users-search {
  padding-bottom: 1rem;
}

.login-users-list {
  flex: 1;
  overflow-y: auto;
}

.login-users-item {
  padding: 0.75rem;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  flex-direction: column;
}

.login-users-item:hover {
  background-color: #f8f9fa;
}

.login-users-item.active {
  background-color: #e7f1ff;
  border-left: 3px solid #0d6efd;
}

.login-users-item-title {
  font-weight: 600;
  color: #212529;
  font-size: 0.9rem;
}

.login-users-item-meta {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 0.25rem;
  display: flex;
  gap: 0.5rem;
}

.login-users-status {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.login-users-status.active {
  background-color: #d1e7dd;
  color: #0f5132;
}

.login-users-status.inactive {
  background-color: #f8d7da;
  color: #842029;
}

.login-users-right-panel {
  flex: 0 0 60%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.login-users-details-container {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.login-users-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.9rem;
}

.login-users-detail-row strong {
  color: #212529;
  font-weight: 600;
}

.login-users-detail-row span {
  color: #6c757d;
  word-break: break-all;
}

/* Logout Users Popup Styles */
.logout-users-popup-container {
  display: flex;
  gap: 1rem;
  height: 600px;
}

.logout-users-left-panel {
  flex: 0 0 40%;
  border-right: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
}

.logout-users-search {
  padding-bottom: 1rem;
}

.logout-users-list {
  flex: 1;
  overflow-y: auto;
}

.logout-users-item {
  padding: 0.75rem;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  flex-direction: column;
}

.logout-users-item:hover {
  background-color: #f8f9fa;
}

.logout-users-item.active {
  background-color: #e7f1ff;
  border-left: 3px solid #0d6efd;
}

.logout-users-item-title {
  font-weight: 600;
  color: #212529;
  font-size: 0.9rem;
}

.logout-users-item-meta {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

.logout-users-right-panel {
  flex: 0 0 60%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.logout-users-details-container {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.logout-users-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.9rem;
}

.logout-users-detail-row strong {
  color: #212529;
  font-weight: 600;
}

.logout-users-detail-row span {
  color: #6c757d;
  word-break: break-all;
}

/* Orders Placed Popup Styles */
.orders-placed-popup-container {
  display: flex;
  gap: 1rem;
  height: 600px;
}

.orders-placed-left-panel {
  flex: 0 0 40%;
  border-right: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
}

.orders-placed-search {
  padding-bottom: 1rem;
}

.orders-placed-list {
  flex: 1;
  overflow-y: auto;
}

.orders-placed-item {
  padding: 0.75rem;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  flex-direction: column;
}

.orders-placed-item:hover {
  background-color: #f8f9fa;
}

.orders-placed-item.active {
  background-color: #e7f1ff;
  border-left: 3px solid #0d6efd;
}

.orders-placed-item-id {
  font-weight: 600;
  color: #212529;
  font-size: 0.9rem;
}

.orders-placed-item-info {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 0.25rem;
  display: flex;
  gap: 0.5rem;
}

.orders-placed-status {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #d1e7dd;
  color: #0f5132;
}

.orders-placed-right-panel {
  flex: 0 0 60%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.orders-placed-details-container {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.orders-placed-detail-header {
  display: flex;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 1rem;
}

.orders-placed-detail-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.orders-placed-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.9rem;
}

.orders-placed-detail-row strong {
  color: #212529;
  font-weight: 600;
}

.orders-placed-detail-row span {
  color: #6c757d;
  word-break: break-all;
}

.orders-placed-products {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

.orders-placed-products-title {
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.5rem;
}

.orders-placed-product-item {
  padding: 0.5rem 0;
  font-size: 0.85rem;
  color: #6c757d;
}

.orders-placed-images {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

.orders-placed-images-title {
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.75rem;
}

.orders-placed-images-gallery {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.orders-placed-image-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e9ecef;
  cursor: pointer;
  transition: transform 0.2s;
}

.orders-placed-image-thumb:hover {
  transform: scale(1.05);
}

/* Gender Breakdown Display */
.gender-breakdown {
  font-weight: 700;
  color: #ffffff;
  font-size: 1.9rem;
  line-height: 1.4;
  display: block;
  letter-spacing: 0.5px;
}

/* Gender Modal Styles */
.gender-stats-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.gender-stat-item {
  text-align: center;
  flex: 1;
}

.gender-stat-title {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  font-weight: 500;
}

.gender-stat-count {
  font-size: 2rem;
  font-weight: 700;
  color: #0d6efd;
}

.gender-stat-divider {
  font-size: 1.5rem;
  color: #dee2e6;
}

.gender-details-container {
  padding: 1rem 0;
}

.gender-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.9rem;
}

.gender-detail-row:last-child {
  border-bottom: none;
}

.gender-detail-label {
  color: #212529;
  font-weight: 500;
}

.gender-detail-value {
  color: #6c757d;
}

/* Gender Users List Styling */
.gender-tabs {
  border-bottom: 2px solid #e9ecef;
}

.gender-tabs .nav-link {
  color: #6c757d;
  font-weight: 500;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.3s ease;
}

.gender-tabs .nav-link:hover {
  color: #0d6efd;
  border-bottom-color: #0d6efd;
}

.gender-tabs .nav-link.active {
  color: #0d6efd;
  border-bottom-color: #0d6efd;
  background-color: transparent;
}

.gender-tab-content {
  padding-top: 1.5rem;
}

.gender-users-list {
  max-height: 400px;
  overflow-y: auto;
}

.gender-user-item {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
}

.gender-user-item:hover {
  background-color: #f1f3f5;
  border-color: #dee2e6;
}

.gender-user-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.gender-user-mobile {
  font-weight: 600;
  color: #212529;
  font-size: 0.95rem;
}

.gender-expand-icon {
  color: #0d6efd;
  transition: transform 0.3s ease;
  display: inline-block;
}

.gender-user-detail {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.85rem;
  color: #6c757d;
}

.gender-user-label {
  font-weight: 500;
}

.gender-user-value {
  color: #495057;
}

/* Image Preview Modal Blur Effect */
.modal-backdrop {
  backdrop-filter: blur(5px);
  background-color: rgba(0, 0, 0, 0.5);
}

/* Wishlist & Cart Brand Items Styles */
.wishlist-brand-item,
.cart-brand-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  transition: background-color 0.2s;
}

.wishlist-brand-item:hover,
.cart-brand-item:hover {
  background-color: #f8f9fa;
}

.wishlist-brand-item.active,
.cart-brand-item.active {
  background-color: #e7f1ff;
  border-left: 3px solid #0d6efd;
}

.wishlist-brand-info,
.cart-brand-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.wishlist-brand-arrow,
.cart-brand-arrow {
  color: #0d6efd;
  font-weight: bold;
  margin-left: 0.5rem;
}

.wishlist-brand-item.active .wishlist-brand-arrow,
.cart-brand-item.active .cart-brand-arrow {
  transform: rotate(90deg);
}

/* Image Preview Modal - Ensure it's on top */
#imagePreviewModal {
  z-index: 2000 !important;
}

#imagePreviewModal .modal-backdrop {
  z-index: 1999 !important;
}

#imagePreviewModal .modal-dialog {
  z-index: 2000 !important;
}

