/* Custom styles for Data Quality Management Dashboard */
/* Reset and Base Styles */
:root {
  --primary-color: #2f719e;
  --secondary-color: #88b740;
  --gradient-color: linear-gradient(60deg, #88b740 0%, #31729f 100%);
  --success-color: #00d4aa;
  --warning-color: #ffa500;
  --danger-color: #ff4757;
  --dark: #2c3e50;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --modal-primary: #6786b6;
  --modal-secondary: #fb4a1a;
  --modal-success: #00d4aa;
  --modal-warning: #ffa500;
  --modal-danger: #ff4757;
  --modal-dark: #2c3e50;
  --modal-light: #f8f9fa;
  --modal-border: #e9ecef;
  --modal-shadow: 0 9px 36px rgba(0, 0, 0, 0.1);
  --modal-radius: 14.4px;
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
}

.roboto {
  font-family: "Roboto", "Inter", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

/* Global scrollbar style for Chrome, Edge, Safari */
::-webkit-scrollbar {
  width: 5.4px;
  height: 5.4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(100, 100, 100, 0.5);
  border-radius: 2.7px;
}

/* Global scrollbar style for Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 100, 100, 0.5) transparent;
}

.fs-7 {
  font-size: 0.743rem !important;
}

/* Layout Wrapper */
.layout-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Header Styles */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 63px;
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  box-shadow: 0 1.8px 3.6px rgba(0, 0, 0, 0.08);
  padding: 0 21.6px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14.4px;
}

.sidebar-toggle {
  background: none;
  border: none;
  font-size: 18px;
  color: #6c757d;
  cursor: pointer;
  padding: 7.2px;
  border-radius: 5.4px;
  transition: all 0.2s ease;
}

.sidebar-toggle:hover {
  background-color: #f8f9fa;
  color: #495057;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10.8px;
}

.logo-img {
  height: 28.8px;
  width: auto;
}

.logo-text {
  font-size: 21.6px;
  font-weight: 700;
  color: #6f42c1;
  letter-spacing: -0.45px;
}

.header-right {
  display: flex;
  align-items: center;
}

/* User Dropdown */
.user-dropdown {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 7.2px;
  background: none;
  border: none;
  padding: 7.2px 10.8px;
  border-radius: 7.2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-btn:hover {
  background-color: #f8f9fa;
}

.user-avatar {
  width: 32.4px;
  height: 32.4px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.8px solid #e9ecef;
}

.user-name {
  font-weight: 500;
  color: #495057;
  font-size: 12.6px;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 7.2px;
  box-shadow: 0 3.6px 10.8px rgba(0, 0, 0, 0.15);
  min-width: 162px;
  padding: 7.2px 0;
  margin-top: 3.6px;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: all 0.2s ease;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 7.2px;
  padding: 7.2px 14.4px;
  color: #495057;
  text-decoration: none;
  font-size: 12.6px;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
  color: #6f42c1;
}

.dropdown-divider {
  height: 1px;
  background-color: #e9ecef;
  margin: 7.2px 0;
}

/* Sticky Header Wrapper */
.sticky-header-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
  /* Add these properties */
  margin-left: 0;
  margin-right: 0;
}

.sticky-header-wrapper.is-sticky {
  box-shadow: 0 3.6px 10.8px rgba(0, 0, 0, 0.08);
  /* Add these properties for full width */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100vw;
  margin-left: 0;
  margin-right: 0;
}

.combined-header {
  background: #fff;
  box-shadow: 0 0.9px 2.7px rgba(0, 0, 0, 0.05);
  border-radius: 10.8px;
  /* background: linear-gradient(180deg, #f8fafb 0%, #ffffff 100%); */
  transition: all 0.3s ease;
  padding: 0.675rem;
}

.sticky-header-wrapper.is-sticky .combined-header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  /* Add padding when sticky */
  padding-left: 0.9rem;
  padding-right: 0.9rem;
}

/* Update floating-header when sticky */
.sticky-header-wrapper.is-sticky .floating-header {
  margin-bottom: 0;
  border-radius: 0;
  box-shadow: none;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Update smart-filter-bar when sticky */
.sticky-header-wrapper.is-sticky .smart-filter-bar {
  margin-bottom: 0;
  border-radius: 0;
  box-shadow: none;
  border: none;
  border-top: none;
}

/* Smooth transition for all elements */
.floating-header,
.smart-filter-bar {
  transition: all 0.3s ease;
}

/* Add margin-top to compensate for fixed positioning */
.sticky-header-wrapper.is-sticky + .kpi-section {
  margin-top: 126px;
  /* Adjust this value based on your header height */
  transition: margin-top 0.3s ease;
}

/* Responsive adjustments for sidebar */
@media (min-width: 768px) {
  .main-content:not(.sidebar-collapsed) .sticky-header-wrapper.is-sticky {
    left: 252px;
    /* Sidebar width when expanded */
    width: calc(100vw - 252px);
  }

  .main-content.sidebar-collapsed .sticky-header-wrapper.is-sticky {
    left: 63px;
    /* Sidebar width when collapsed */
    width: calc(100vw - 63px);
  }

  .main-content:not(.sidebar-collapsed)
    .sticky-header-wrapper.is-sticky
    .combined-header {
    padding-left: 1.35rem;
    padding-right: 1.35rem;
  }
}
/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(3.6px);
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10.8px;
}

.spinner {
  width: 32.4px;
  height: 32.4px;
  border: 2.7px solid #e5e7eb;
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-content span {
  font-size: 11.7px;
  color: #6b7280;
  font-weight: 500;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Floating Header */
.sticky-header-wrapper .floating-header {
  margin-bottom: 1rem;
  /* background: white; */
  /* padding: 0.75rem 1.25rem; */
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); */
}

.sticky-header-wrapper .header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sticky-header-wrapper .header-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.sticky-header-wrapper .brand-icon {
  width: 32.4px;
  height: 32.4px;
  background: linear-gradient(135deg, var(--primary-color), #4a6fa5);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.035rem;
}

.sticky-header-wrapper .header-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
  margin: 0;
}

.sticky-header-wrapper .header-subtitle {
  font-size: 0.585rem;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.sticky-header-wrapper .status-dot {
  width: 5.4px;
  height: 5.4px;
  background: var(--success-color);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.sticky-header-wrapper .header-right {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.sticky-header-wrapper .quick-stats {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.sticky-header-wrapper .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sticky-header-wrapper .stat-value {
  font-size: 0.855rem;
  font-weight: 600;
  color: var(--dark);
}

.sticky-header-wrapper .stat-label {
  font-size: 0.585rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.45px;
}

.sticky-header-wrapper .stat-divider {
  width: 1px;
  height: 21.6px;
  background: var(--gray-300);
}

.sticky-header-wrapper .header-actions {
  display: flex;
  gap: 0.45rem;
}

.sticky-header-wrapper .btn-icon {
  width: 28.8px;
  height: 28.8px;
  border-radius: 7.2px;
  border: 1px solid var(--gray-300);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  color: var(--gray-700);
}

.sticky-header-wrapper .btn-icon:hover {
  background: var(--gray-100);
  transform: translateY(-0.9px);
}

.sticky-header-wrapper .btn-primary-icon {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.sticky-header-wrapper .btn-primary-icon:hover {
  background: #5a75a0;
}

.sticky-header-wrapper .notification-badge {
  position: absolute;
  top: -3.6px;
  right: -3.6px;
  width: 14.4px;
  height: 14.4px;
  background: var(--secondary-color);
  color: white;
  border-radius: 50%;
  font-size: 0.54rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* Smart Filter Bar */
.sticky-header-wrapper .smart-filter-bar {
  /* background: white; */
  border-radius: 10.8px;
  padding: 0.45rem;
  /* margin-bottom: 1rem; */
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); */
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.sticky-header-wrapper .filter-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.9rem;
}

.sticky-header-wrapper .filter-pills {
  display: flex;
  gap: 0.45rem;
  flex: 1;
  overflow-x: auto;
}

.sticky-header-wrapper .filter-pills::-webkit-scrollbar {
  height: 3.6px;
}

.sticky-header-wrapper .filter-pills::-webkit-scrollbar-track {
  background: transparent;
}

.sticky-header-wrapper .filter-pills::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 1.8px;
}

.sticky-header-wrapper .filter-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.135rem 0.45rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 18px;
  min-width: fit-content;
  transition: all 0.2s;
}

.sticky-header-wrapper .filter-pill:hover {
  background: white;
  border-color: var(--primary-color);
}

.sticky-header-wrapper .filter-pill.active {
  background: linear-gradient(135deg, var(--primary-color), #5a75a0);
  border-color: var(--primary-color);
  color: white;
}

.sticky-header-wrapper .filter-pill i {
  font-size: 0.675rem;
  color: var(--gray-600);
}

.sticky-header-wrapper .filter-pill.active i {
  color: white;
}

/* .sticky-header-wrapper .filter-select {
  background: transparent;
  border: none;
  font-size: 0.65rem;
  color: var(--dark);
  cursor: pointer;
  outline: none;
  padding-right: 0.25rem;
} */

.sticky-header-wrapper .filter-pill.active .filter-select {
  color: white;
}

.sticky-header-wrapper .filter-actions {
  display: flex;
  gap: 0.45rem;
}

.sticky-header-wrapper .filter-btn {
  display: flex;
  align-items: center;
  gap: 0.36rem;
  padding: 0.225rem 0.675rem;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 7.2px;
  font-size: 0.675rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s;
}

.sticky-header-wrapper .filter-btn:hover {
  background: var(--gray-100);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.sticky-header-wrapper .filter-count {
  background: var(--secondary-color);
  color: white;
  padding: 1.26px 4.95px;
  border-radius: 9px;
  font-size: 0.45rem;
  font-weight: 600;
}

.sticky-header-wrapper .apply-btn {
  padding: 0.225rem 0.9rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 7.2px;
  font-size: 0.675rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.sticky-header-wrapper .apply-btn:hover {
  background: #5a75a0;
  transform: translateY(-0.9px);
}

/* Advanced Filters Panel */
.sticky-header-wrapper .advanced-filters-panel {
  margin-top: 0.675rem;
  padding: 0.9rem;
  background: var(--gray-100);
  border-radius: 7.2px;
  border: 1px solid var(--gray-200);
}

.sticky-header-wrapper .filter-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.225rem 0.675rem;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 7.2px;
}

.sticky-header-wrapper .filter-item i {
  color: var(--gray-600);
  font-size: 0.72rem;
}

.sticky-header-wrapper .filter-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.675rem;
  border-top: 1px solid var(--gray-300);
}

.sticky-header-wrapper .clear-btn {
  display: flex;
  align-items: center;
  gap: 0.36rem;
  padding: 0.315rem 0.675rem;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 5.4px;
  font-size: 0.675rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s;
}

.sticky-header-wrapper .clear-btn:hover {
  background: #fff5f5;
  border-color: var(--danger-color);
  color: var(--danger-color);
}

.sticky-header-wrapper .saved-filters {
  display: flex;
  gap: 0.45rem;
}

.sticky-header-wrapper .saved-filter-chip {
  padding: 0.315rem 0.675rem;
  background: white;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 14.4px;
  font-size: 0.63rem;
  cursor: pointer;
  transition: all 0.2s;
}

.sticky-header-wrapper .saved-filter-chip:hover {
  background: var(--primary-color);
  color: white;
}

/* Slide Down Animation */
.sticky-header-wrapper .slide-down-enter-active,
.sticky-header-wrapper .slide-down-leave-active {
  transition: all 0.3s ease;
}

.sticky-header-wrapper .slide-down-enter-from {
  transform: translateY(-10px);
  opacity: 0;
}

.sticky-header-wrapper .slide-down-leave-to {
  transform: translateY(-9px);
  opacity: 0;
}

/* Enhanced Sidebar Styles */
.sidebar {
  position: fixed;
  top: 63px;
  left: 0;
  height: calc(100vh - 63px);
  width: 252px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 1.8px 0 10.8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  overflow: visible;
  backdrop-filter: blur(9px);
}

.sidebar.collapsed {
  width: 63px;
}

/* Enhanced Sidebar Header with Co-branding */
.sidebar-header {
  padding: 0.585rem 0.9rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(
    135deg,
    rgba(103, 134, 182, 0.05),
    rgba(251, 74, 26, 0.02)
  );
  backdrop-filter: blur(9px);
  position: relative;
  overflow: hidden;
}

.sidebar-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.8px;
  background: var(--gradient-color);
}

.brand-section {
  display: flex;
  align-items: center;
  animation: fadeInScale 0.5s ease;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.675rem;
}

.dqm-icon {
  width: 32.4px;
  height: 32.4px;
  background: linear-gradient(135deg, #6786b6, #5a75a0);
  border-radius: 7.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.99rem;
  box-shadow: 0 1.8px 7.2px rgba(103, 134, 182, 0.3);
  position: relative;
}

.dqm-icon::after {
  content: "";
  position: absolute;
  top: 1.8px;
  right: 1.8px;
  width: 5.4px;
  height: 5.4px;
  background: #fb4a1a;
  border-radius: 50%;
  box-shadow: 0 0 3.6px rgba(251, 74, 26, 0.5);
}

.brand-text {
  flex: 1;
}

.sidebar-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #6786b6;
  margin: 0 0 0.135rem;
  line-height: 1.2;
  letter-spacing: 0.45px;
}

.brand-subtitle {
  font-size: 0.585rem;
  color: #fb4a1a;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.72px;
  opacity: 0.8;
}

/* Collapsed State Logo */
.brand-collapsed {
  display: flex;
  justify-content: center;
  animation: fadeInScale 0.5s ease;
}

.dqm-icon-small {
  width: 28.8px;
  height: 28.8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-nav {
  padding: 0.9rem 0;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  overflow: visible;
  margin-bottom: 0.225rem;
  padding: 0 0.675rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.45rem 0.45rem;
  color: #64748b;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border-radius: 9px;
  font-weight: 500;
  background: transparent;
  border: 1px solid transparent;
}

.nav-link:hover {
  background: linear-gradient(
    135deg,
    rgba(103, 134, 182, 0.08),
    rgba(103, 134, 182, 0.04)
  );
  color: #6786b6;
  transform: translateX(1.8px);
  border-color: rgba(103, 134, 182, 0.1);
  box-shadow: 0 1.8px 7.2px rgba(103, 134, 182, 0.08);
}

.nav-item.active .nav-link {
  background: linear-gradient(135deg, #6786b6, #5a75a0);
  color: #ffffff;
  position: relative;
  box-shadow: 0 3.6px 10.8px rgba(103, 134, 182, 0.25);
  border-color: transparent;
  transform: translateX(0);
}

.nav-item.active .nav-link::before {
  content: "";
  position: absolute;
  left: -0.675rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.7px;
  height: 21.6px;
  background: #fb4a1a;
  border-radius: 0 1.8px 1.8px 0;
  opacity: 1;
  transition: all 0.3s ease;
}

.nav-item.active .nav-link::after {
  content: "";
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  width: 3.6px;
  height: 3.6px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 0.6;
    transform: translateY(-50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
  }
}

.nav-icon {
  font-size: 0.9rem;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.788rem;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.nav-item.active .nav-icon {
  transform: scale(1.1);
}

.nav-text {
  font-size: 0.72rem;
  font-weight: 500;
  /* white-space: nowrap; */
  /* overflow: hidden; */
  /* text-overflow: ellipsis; */
  transition: all 0.3s ease;
  /* letter-spacing: 0.025em; */
}

.sidebar.collapsed .nav-link {
  justify-content: center;
  /* padding: 0.45rem; */
  margin: 0 0.55rem;
}

.sidebar.collapsed .nav-icon {
  margin-right: 0;
}

.sidebar.collapsed .nav-item.active .nav-link::before {
  left: -0.45rem;
  width: 1.8px;
  height: 18px;
}

.sidebar.collapsed .nav-item.active .nav-link::after {
  display: none;
}

.sidebar.collapsed .nav-item {
  padding: 0 0.45rem;
}

/* Tooltip Styles */
/* Simplified tooltip that works reliably */
.sidebar.collapsed .nav-link[data-tooltip]:not([data-tooltip=""]) {
  position: relative;
}

.sidebar.collapsed .nav-link[data-tooltip]:not([data-tooltip=""]):hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 15px;
  background: linear-gradient(135deg, #2d3748, #4a5568);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: tooltipFadeIn 0.2s ease;
  pointer-events: none;
  display: block;
}

.sidebar.collapsed
  .nav-link[data-tooltip]:not([data-tooltip=""]):hover::before {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 9px;
  /* border: 6px solid transparent;
  border-right-color: #2d3748; */
  z-index: 10000;
  pointer-events: none;
  display: block;
}

/* Active state tooltip styling */
.sidebar.collapsed
  .nav-item.active
  .nav-link[data-tooltip]:not([data-tooltip=""]):hover::after {
  background: linear-gradient(135deg, #3f5d86, #5a75a0);
  border-color: rgba(103, 134, 182, 0.25);
}

.sidebar.collapsed
  .nav-item.active
  .nav-link[data-tooltip]:not([data-tooltip=""]):hover::before {
  border-right-color: #5a75a0;
}

/* Show tooltip for active nav even without hover (collapsed state) */
.sidebar.collapsed
  .nav-item.active
  .nav-link[data-tooltip]:not([data-tooltip=""])::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 12px;
  background: linear-gradient(135deg, #2f3b50, #44566e);
  color: white;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 1200;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: tooltipFadeIn 0.2s ease;
  pointer-events: none;
}

.sidebar.collapsed
  .nav-item.active
  .nav-link[data-tooltip]:not([data-tooltip=""])::before {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 6px;
  border: 6px solid transparent;
  border-right-color: #44566e;
  z-index: 10000;
  pointer-events: none;
}

/* Suppress active accent bar and sheen in collapsed state */
.sidebar.collapsed .nav-item.active .nav-link::before,
.sidebar.collapsed .nav-item.active .nav-link::after {
  opacity: 0;
}

/* Hide nav accent bar and hover sheen while showing tooltip to avoid visual overlap */
.sidebar.collapsed .nav-item.active .nav-link:hover::before,
.sidebar.collapsed .nav-item.active .nav-link:hover::after {
  opacity: 0;
}

/* Disable nav-link hover sheen effect in collapsed state to keep tooltip clean */
.sidebar.collapsed .nav-link:hover::before {
  display: none;
}

/* Remove the old tooltip styles */
.nav-link[data-tooltip]:not([data-tooltip=""]):hover::after,
.nav-link[data-tooltip]:not([data-tooltip=""]):hover::before {
  /* Remove these - they're replaced by the above */
  display: none;
}

/* Ensure tooltip isn't clipped when sidebar is collapsed */
.sidebar.collapsed .nav-link {
  overflow: visible;
}

/* Tooltip Animation */
@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(-7.2px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

/* Disable tooltip for active nav in collapsed state */
.sidebar.collapsed .nav-item.active .nav-link[data-tooltip]::after,
.sidebar.collapsed .nav-item.active .nav-link[data-tooltip]::before,
.sidebar.collapsed .nav-item.active .nav-link[data-tooltip]:hover::after,
.sidebar.collapsed .nav-item.active .nav-link[data-tooltip]:hover::before {
  display: none !important;
}

/* Brand Animation */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Enhanced Scrollbar */
.sidebar::-webkit-scrollbar {
  width: 3.6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(103, 134, 182, 0.2);
  border-radius: 1.8px;
  transition: all 0.3s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(103, 134, 182, 0.4);
}

/* Enhanced Sidebar Footer with Tooltip */
.sidebar-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.675rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95),
    rgba(248, 250, 252, 0.95)
  );
  backdrop-filter: blur(9px);
}

.sidebar-footer .nav-link {
  margin-bottom: 0;
  opacity: 0.7;
  font-size: 0.72rem;
  padding: 0.45rem;
  border-radius: 5.4px;
  transition: all 0.3s ease;
}

.sidebar-footer .nav-link:hover {
  opacity: 1;
  background: rgba(103, 134, 182, 0.08);
  transform: translateY(-0.9px);
}

.sidebar.collapsed .sidebar-footer .nav-link {
  justify-content: center;
  padding: 0.45rem;
}

.sidebar.collapsed .sidebar-footer {
  padding: 0.675rem 0.45rem;
}

/* Main Content Updates */
.main-content {
  margin-left: 252px;
  margin-top: 63px;
  height: calc(100vh - 63px);
  overflow-y: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(180deg, #f8fafb 0%, #ffffff 100%);
}

.main-content.sidebar-collapsed {
  margin-left: 63px;
}

.content-wrapper {
  padding: 1.013rem;
  min-height: 100%;
}

/* Enhanced Responsive Design */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 3.6px 0 18px rgba(0, 0, 0, 0.1);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .main-content.sidebar-collapsed {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 0 14.4px;
  }

  .logo-text {
    display: none;
  }

  .user-name {
    display: none;
  }

  .sidebar {
    width: 234px;
  }

  .sidebar-header {
    padding: 1.125rem 0.9rem 0.788rem;
  }

  .nav-item {
    padding: 0 0.45rem;
  }

  .content-wrapper {
    padding: 0.9rem;
  }
}

@media (max-width: 480px) {
  .header {
    height: 54px;
    padding: 0 10.8px;
  }

  .sidebar {
    top: 54px;
    height: calc(100vh - 54px);
    width: 216px;
  }

  .main-content {
    margin-top: 54px;
    height: calc(100vh - 54px);
  }

  .content-wrapper {
    padding: 0.675rem;
  }

  .sidebar-header {
    padding: 0.9rem 0.675rem;
  }

  .dqm-icon {
    width: 28.8px;
    height: 28.8px;
    font-size: 0.9rem;
  }

  .sidebar-title {
    font-size: 0.675rem;
  }

  .brand-subtitle {
    font-size: 0.54rem;
  }

  .dqm-icon-small {
    width: 25.2px;
    height: 25.2px;
    font-size: 0.81rem;
  }
}

/* Loading Animation for Nav Items */
.nav-item {
  animation: slideInLeft 0.4s ease forwards;
  opacity: 0;
  transform: translateX(-18px);
}

.nav-item:nth-child(1) {
  animation-delay: 0.1s;
}
.nav-item:nth-child(2) {
  animation-delay: 0.15s;
}
.nav-item:nth-child(3) {
  animation-delay: 0.2s;
}
.nav-item:nth-child(4) {
  animation-delay: 0.25s;
}
.nav-item:nth-child(5) {
  animation-delay: 0.3s;
}
.nav-item:nth-child(6) {
  animation-delay: 0.35s;
}
.nav-item:nth-child(7) {
  animation-delay: 0.4s;
}

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Hover Effects for Better UX */
.nav-link {
  overflow: hidden;
}

.nav-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.nav-link:hover::before {
  left: 100%;
}

/* Accessibility Improvements */
.nav-link:focus-visible {
  outline: 2px solid #6786b6;
  outline-offset: 2px;
  border-radius: 6px;
}

.nav-link:focus:not(:focus-visible) {
  outline: none;
}

/* Prevent tooltip on touch devices */
@media (hover: none) {
  .nav-link[data-tooltip]:not([data-tooltip=""]):hover::after,
  .nav-link[data-tooltip]:not([data-tooltip=""]):hover::before {
    display: none;
  }
}

/* Animation Classes */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.2s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

/* Utility Classes */
.text-primary {
  color: #6f42c1 !important;
}

.bg-primary {
  background-color: #6f42c1 !important;
}

.border-primary {
  border-color: #6f42c1 !important;
}

.shadow-sm {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.shadow {
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

.rounded {
  border-radius: 8px;
}

.rounded-lg {
  border-radius: 12px;
}

/* ==================== LAYOUT STRUCTURE ==================== */
.dashboard-container {
  background: linear-gradient(180deg, #f8fafb 0%, #ffffff 100%);
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

/* ==================== STICKY HEADER ==================== */
.sticky-header-wrapper {
  position: sticky;
  top: 0;
  z-index: 998;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

.sticky-header-wrapper.is-sticky {
  box-shadow: 0 3.6px 10.8px rgba(0, 0, 0, 0.08);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100vw;
}

.combined-header {
  background: #fff;
  box-shadow: 0 0.9px 2.7px rgba(0, 0, 0, 0.05);
  border-radius: 10.8px;
  /* padding: 0.675rem 1.125rem; */
}

.sticky-header-wrapper.is-sticky .combined-header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(9px);
  padding-left: 0.9rem;
  padding-right: 0.9rem;
}

/* ==================== FLOATING HEADER ==================== */
.floating-header {
  margin-bottom: 0.675rem;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary-color), #4a6fa5);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.125rem;
}

.header-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
  margin: 0;
}

.header-subtitle {
  font-size: 0.63rem;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.status-dot {
  width: 5.4px;
  height: 5.4px;
  background: var(--success-color);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* ==================== QUICK STATS ==================== */
.quick-stats {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 0.855rem;
  font-weight: 600;
  color: var(--dark);
}

.stat-label {
  font-size: 0.585rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.45px;
}

.stat-divider {
  width: 1px;
  height: 21.6px;
  background: var(--gray-300);
}

/* ==================== HEADER ACTIONS ==================== */
.header-actions {
  display: flex;
  gap: 0.45rem;
}

.btn-icon {
  width: 28.8px;
  height: 28.8px;
  border-radius: 7.2px;
  border: 1px solid var(--gray-300);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  color: var(--gray-700);
}

.btn-icon:hover {
  background: var(--gray-100);
  transform: translateY(-0.9px);
}

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

.btn-primary-icon:hover {
  background: #5a75a0;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  background: var(--secondary-color);
  color: white;
  border-radius: 50%;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* ==================== SMART FILTER BAR ==================== */
/* Advanced Filters Panel */
.advanced-filters-panel {
  margin-top: 0.75rem;
  padding: 1rem;
  background: var(--gray-100);
  border-radius: 8px;
  border: 1px solid var(--gray-200);
}

.advanced-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  /* margin-bottom: 1rem; */
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
}

.filter-item i {
  color: var(--gray-600);
  font-size: 0.8rem;
}

.filter-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray-300);
}

.clear-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 0.7rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s;
}

.clear-btn:hover {
  background: #fff5f5;
  border-color: var(--danger-color);
  color: var(--danger-color);
}

.saved-filters {
  display: flex;
  gap: 0.5rem;
}

.saved-filter-chip {
  padding: 0.35rem 0.75rem;
  background: white;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 16px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s;
}

.saved-filter-chip:hover {
  background: var(--primary-color);
  color: white;
}
.filter-pill.active .filter-select {
  color: white;
}
.smart-filter-bar {
  border-radius: 12px;
  padding: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: visible;
}

.filter-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  overflow: visible;
}

.filter-pills {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  /* overflow-x: auto; */
}

.filter-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 20px;
  min-width: fit-content;
  transition: all 0.2s;
}

/* Filter animations */
.slide-down-enter-active,
.slide-down-leave-active {
  transition: all 0.3s ease;
}

.slide-down-enter-from {
  transform: translateY(-10px);
  opacity: 0;
}

.slide-down-leave-to {
  transform: translateY(-10px);
  opacity: 0;
}

/* Active filter pill styling */
.filter-pill.active {
  background: linear-gradient(135deg, var(--primary-color), #5a75a0);
  border-color: var(--primary-color);
  color: white;
}

.filter-pill.active .filter-select {
  color: white;
}

.filter-pill.active .filter-select option {
  color: var(--dark);
  background: white;
}

.filter-pill.active i {
  color: white;
}

.filter-pill i {
  font-size: 0.8rem;
  color: var(--gray-600);
}

.filter-select {
  background: transparent;
  border: none;
  font-size: 0.75rem;
  color: var(--dark);
  cursor: pointer;
  outline: none;
  padding-right: 0.25rem;
}

.filter-actions {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 0.75rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: var(--gray-100);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.filter-count {
  background: var(--secondary-color);
  color: white;
  padding: 0.1rem 0.3rem;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 600;
}

.apply-btn {
  padding: 0.25rem 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.apply-btn:hover {
  background: #5a75a0;
  transform: translateY(-1px);
}

/* ==================== KPI SECTION ==================== */
.kpi-section {
  margin-bottom: 1rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.kpi-card {
  background: white;
  border-radius: 8px;
  padding: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.kpi-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 1rem;
}

.kpi-trend {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

.trend-up {
  background: rgba(0, 212, 170, 0.1);
  color: #00d4aa;
}

.trend-down {
  background: rgba(251, 74, 26, 0.1);
  color: var(--secondary-color);
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1;
}

.kpi-unit {
  font-size: 0.875rem;
  font-weight: 400;
  color: #6c757d;
  margin-left: 2px;
}

.kpi-label {
  font-size: 0.75rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

.kpi-progress {
  height: 3px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* ==================== SECTION HEADERS ==================== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark);
  margin: 0;
}

/* ==================== CHARTS ==================== */
.period-btn.active {
  background: white;
  color: var(--primary-color);
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.period-btn {
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s;
}
.chart-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.chart-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chart-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark);
  margin: 0;
}

.chart-body {
  padding: 1rem;
}

/* ==================== PAGINATION ==================== */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

.pagination-info {
  font-size: 0.75rem;
  color: var(--gray-600);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.page-btn,
.page-number {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--gray-300);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.75rem;
  color: var(--gray-700);
}

.page-number.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* ==================== ICON CLASSES ==================== */
.icon-primary {
  background: rgba(103, 134, 182, 0.1);
  color: var(--primary-color);
}
.icon-danger {
  background: rgba(251, 74, 26, 0.1);
  color: var(--secondary-color);
}
.icon-success {
  background: rgba(0, 212, 170, 0.1);
  color: #00d4aa;
}
.icon-info {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}
.icon-warning {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
}
.icon-purple {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

/* ==================== PROGRESS CLASSES ==================== */
.progress-primary {
  background: var(--primary-color);
}
.progress-danger {
  background: var(--secondary-color);
}
.progress-success {
  background: #00d4aa;
}
.progress-info {
  background: #3b82f6;
}
.progress-warning {
  background: #fbbf24;
}
.progress-purple {
  background: #7c3aed;
}

/* ==================== ANIMATIONS ==================== */
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: spin 1s linear infinite;
}

@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ==================== TRANSITIONS ==================== */
.fade-slide-enter-active,
.fade-slide-leave-active {
  transition: all 0.3s ease;
}

.fade-slide-enter-from {
  opacity: 0;
  transform: translateY(10px);
}

.fade-slide-leave-to {
  opacity: 0;
  transform: translateY(-10px);
}

.slide-down-enter-active,
.slide-down-leave-active {
  transition: all 0.3s ease;
}

.slide-down-enter-from {
  transform: translateY(-10px);
  opacity: 0;
}

.slide-down-leave-to {
  transform: translateY(-10px);
  opacity: 0;
}

/* Common Tab Styles */
.tabs-container-main {
  background: white;
  /* border-radius: 12px; */
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); */
  /* border: 1px solid rgba(0, 0, 0, 0.06); */
  margin-bottom: 1rem;
  overflow: hidden;
}
.tabs-header {
  background: #f8f9fa;
  border-bottom: 1px solid #e0e6ed;
  padding: 0 1rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.tabs-wrapper {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}
.tab-button.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}
.tab-button {
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6c757d;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  position: relative;
}
.tab-button.active {
  color: var(--modal-primary);
  border-bottom-color: var(--modal-primary);
  border: 0;
}
.tab-button.active::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-color);
}
.tabs-content {
  padding: 1rem !important;
}

/** TABLES STYLES */
.tbl {
  border: none;
  background: white;
}

.tbl-tr {
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s ease;
}

.tbl-tr:hover {
  background: linear-gradient(90deg, #f8fafc 0%, white 100%);
}

.tbl thead th {
  border: none;
  padding: 12px 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  background: #f8fafc;
}

.tbl th .th-content {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tbl th .th-content i {
  font-size: 11px;
  opacity: 0.7;
}

.table.tbl td {
  padding: 16px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f3f4;
  font-size: 0.75rem;
}

.table.tbl td .action-btn-small {
  width: 28px;
  height: 28px;
  border: 1px solid #e5e7eb;
  background: white;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0 2px;
  color: #6b7280;
}

.tbl td .badge-1 {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  color: #6786b6;
  padding: 2px 6px;
  background: #eff6ff;
  border-radius: 4px;
  width: fit-content;
}

/* KPI Section (Version 1 Style) */
.kpi-section {
  margin-bottom: 1rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.kpi-card {
  background: white;
  border-radius: 8px;
  padding: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.kpi-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 1rem;
}

.icon-primary {
  background: rgba(103, 134, 182, 0.1);
  color: var(--primary-color);
}

.icon-danger {
  background: rgba(251, 74, 26, 0.1);
  color: var(--secondary-color);
}

.icon-success {
  background: rgba(0, 212, 170, 0.1);
  color: #00d4aa;
}

.icon-info {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.icon-warning {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
}

.icon-purple {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

.kpi-trend {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

.trend-up {
  background: rgba(0, 212, 170, 0.1);
  color: #00d4aa;
}

.trend-down {
  background: rgba(251, 74, 26, 0.1);
  color: var(--secondary-color);
}

.kpi-content {
  margin-bottom: 0.5rem;
}

.kpi-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1;
}

.kpi-unit {
  font-size: 0.8rem;
  font-weight: 400;
  color: #6c757d;
  margin-left: 2px;
}

.kpi-label {
  font-size: 0.75rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

.kpi-progress {
  height: 3px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-primary {
  background: var(--primary-color);
}

.progress-danger {
  background: var(--secondary-color);
}

.progress-success {
  background: #00d4aa;
}

.progress-info {
  background: #3b82f6;
}

.progress-warning {
  background: #fbbf24;
}

.progress-purple {
  background: #7c3aed;
}

/* Analytics Section */
.analytics-section {
  margin-bottom: 1rem;
}

.chart-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  /* margin-bottom: 1rem; */
  overflow: hidden;
}

.chart-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chart-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.chart-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark);
  margin: 0;
}

.chart-subtitle {
  font-size: 0.65rem;
  color: var(--gray-600);
}

.chart-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.period-selector {
  display: flex;
  background: var(--gray-100);
  border-radius: 6px;
  padding: 2px;
}

.period-btn {
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s;
}

.period-btn:hover {
  color: var(--dark);
}

.period-btn.active {
  background: white;
  color: var(--primary-color);
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Enhanced Heatmap Styles */
.heatmap-card.full-width {
  margin-top: 1rem;
}

.chart-container-heatmap-enhanced {
  height: 320px;
  width: 100%;
}

.chart-header .chart-controls {
  display: flex;
  gap: 0.5rem;
}

.chart-option-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--gray-300);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--gray-600);
  font-size: 0.875rem;
}

.chart-option-btn:hover {
  background: var(--gray-100);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .chart-container-heatmap-enhanced {
    height: 260px;
  }

  .chart-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .chart-title-group {
    width: 100%;
  }
}

.info-badge {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  background: var(--gray-100);
  border-radius: 4px;
  font-size: 0.65rem;
  color: var(--gray-600);
}

.chart-body {
  padding: 1rem;
}

.chart-container {
  height: 280px;
}

.chart-container-small {
  height: 280px;
}

.chart-container-heatmap {
  height: 180px;
}

.heatmap-legend {
  display: flex;
  gap: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: var(--gray-600);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* Issues Section (Compact Style) */
.widget-1-section {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark);
  margin: 0;
}

.issue-count {
  padding: 0.2rem 0.5rem;
  background: var(--gray-100);
  border-radius: 4px;
  font-size: 0.65rem;
  color: var(--gray-600);
  font-weight: 500;
}

.section-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.view-switcher {
  display: flex;
  background: var(--gray-100);
  border-radius: 6px;
  padding: 2px;
}

.view-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--gray-600);
}

.view-btn:hover {
  color: var(--dark);
}

.view-btn.active {
  background: white;
  color: var(--primary-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sort-dropdown {
  padding: 0.35rem 0.75rem;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--dark);
  cursor: pointer;
  outline: none;
}

/* Issue Cards Compact */
.widget-1-section-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.widget-1-section-body.full-width {
  grid-template-columns: auto;
}

.widget-1-card-compact {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0.75rem;
  transition: all 0.2s;
  position: relative;
}

.widget-1-card-compact:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  background: white;
}

.issue-indicator {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 6px 0 0 6px;
}

.severity-critical .issue-indicator {
  background: var(--secondary-color);
}

.severity-high .issue-indicator {
  background: #fbbf24;
}

.severity-medium .issue-indicator {
  background: var(--primary-color);
}

.severity-low .issue-indicator {
  background: #00d4aa;
}

.widget-1-card-body {
  padding-left: 0.5rem;
  margin-bottom: 0.5rem;
}

.widget-1-card-body > .body-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.issue-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-critical {
  background: rgba(251, 74, 26, 0.1);
  color: var(--secondary-color);
}

.badge-high {
  background: rgba(251, 191, 36, 0.1);
  color: #f59e0b;
}

.badge-medium {
  background: rgba(103, 134, 182, 0.1);
  color: var(--primary-color);
}

.badge-low {
  background: rgba(0, 212, 170, 0.1);
  color: #00d4aa;
}

.issue-id {
  font-size: 0.65rem;
  color: #9ca3af;
  font-family: "Monaco", "Courier New", monospace;
}

.issue-timestamp {
  margin-left: auto;
  font-size: 0.65rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.widget-1-card-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 0.25rem;
}

.widget-1-card-desc {
  font-size: 0.7rem;
  color: #6c757d;
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

.issue-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 0.5rem;
  background: white;
  border-radius: 4px;
}

.metric {
  text-align: center;
}

.metric-label {
  display: block;
  font-size: 0.6rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.15rem;
}

.metric-value {
  font-size: 0.65rem;
  font-weight: 600;
  color: #1a1a1a;
}

.status-in-progress {
  color: var(--primary-color);
}

.status-ai-suggested-fix {
  color: #7c3aed;
}

.status-open {
  color: var(--secondary-color);
}

.status-resolved {
  color: #00d4aa;
}

.issue-actions {
  display: flex;
  gap: 0.5rem;
  padding-left: 0.5rem;
}

.action-btn {
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  border: 1px solid var(--gray-300);
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--gray-700);
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.action-btn.primary:hover {
  background: #5a75a0;
}

.action-btn.ai {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  color: white;
}

.action-btn.secondary {
  background: white;
  border-color: var(--gray-300);
  color: var(--gray-700);
}

.action-btn.icon-only {
  width: 28px;
  padding: 0;
  justify-content: center;
  margin-left: auto;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

.pagination-info {
  font-size: 0.75rem;
  color: var(--gray-600);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.page-btn,
.page-number {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--gray-300);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.75rem;
  color: var(--gray-700);
}

.page-btn:hover,
.page-number:hover {
  background: var(--gray-100);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-number.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.page-dots {
  padding: 0 0.5rem;
  color: var(--gray-500);
  font-size: 0.75rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .widget-1-section-body {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .widget-1-section-body.full-width {
    grid-template-columns: auto;
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .filter-container {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-pills {
    width: 100%;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .issues-container {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .section-controls {
    width: 100%;
    justify-content: space-between;
  }

  .pagination-container {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Loading and Transitions */
@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.kpi-card,
.chart-card,
.widget-1-card-compact {
  animation: slideIn 0.5s ease;
}

.kpi-card:nth-child(1) {
  animation-delay: 0.05s;
}

.kpi-card:nth-child(2) {
  animation-delay: 0.1s;
}

.kpi-card:nth-child(3) {
  animation-delay: 0.15s;
}

.kpi-card:nth-child(4) {
  animation-delay: 0.2s;
}

.kpi-card:nth-child(5) {
  animation-delay: 0.25s;
}

.kpi-card:nth-child(6) {
  animation-delay: 0.3s;
}

/* Text Danger Utility */
.text-danger {
  color: var(--secondary-color) !important;
}

/* ==================== COMMON FILTER STYLES ==================== */
/* Shared filter UI components for Supplier, Macroeconomics, and other pages */

/* Filter Container Base */
.filter-container {
  padding: 0;
  position: relative;
}

.compact-filter-panel {
  background: white;
  border-radius: 10px;
  padding: 14px;
  margin-top: 0;
  border: 1px solid #e5e7eb;
  position: relative;
  z-index: 10;
}

.filter-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  position: relative;
}

/* Filter Group Section */
.filter-group-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.filter-group-section.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.filter-group-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 5;
}

.filter-group-label.clickable {
  cursor: pointer;
  padding: 0 18px;
  height: 46px;
  border-radius: 10px;
  transition: all 0.2s ease;
  background: white;
  border: 1px solid #dee2e6;
  width: 100%;
  align-items: center;
}

.filter-group-label.clickable:hover {
  background: #f8f9fa;
  border-color: var(--primary-color);
}

.filter-group-label.disabled {
  cursor: not-allowed;
  background: #f3f4f6;
  color: #9ca3af;
}

.filter-group-label.disabled:hover {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.filter-group-label i {
  font-size: 14px;
  color: #9ca3af;
}

/* Dropdown Container */
.dropdown-container {
  position: relative;
  min-width: 196px;
}

.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  height: 32px;
}

.dropdown-header:hover {
  border-color: #d1d5db;
}

.dropdown-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dropdown-label i {
  font-size: 12px;
  color: #9ca3af;
}

.dropdown-arrow {
  font-size: 10px;
  color: #6b7280;
  transition: transform 0.2s;
}

.dropdown-arrow.rotated {
  transform: rotate(180deg);
}

/* Dropdown Content */
.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  margin-top: 4px;
  overflow: hidden;
}

.dropdown-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid #f3f4f6;
}

.dropdown-search i {
  font-size: 12px;
  color: #9ca3af;
}

.dropdown-search input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 12px;
  color: #374151;
  background: transparent;
}

.dropdown-search input::placeholder {
  color: #9ca3af;
}

.dropdown-options {
  max-height: 200px;
  overflow-y: auto;
  padding: 4px 0;
}

.dropdown-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
}

.dropdown-option:hover {
  background-color: #f3f4f6;
}

.dropdown-option.selected {
  background-color: #eff6ff;
  color: #2563eb;
}

.dropdown-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-top: 1px solid #f3f4f6;
  background: #f9fafb;
}

.selected-count {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
}

.apply-btn {
  padding: 4px 12px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.apply-btn:hover {
  background: #1d4ed8;
}

/* Absolute Dropdown (flows outside panel) */
.absolute-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  margin-top: 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: white;
  max-height: 300px;
  overflow-y: auto;
}

.dropdown-options-list {
  max-height: 300px;
  overflow-y: auto;
  border-radius: 6px;
  padding: 8px;
  background: white;
}

.commodity-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 2px;
}

.commodity-option:hover {
  background: #f8f9fa;
}

.commodity-option.selected {
  background: #eff6ff;
}

.option-name {
  font-size: 13px;
  color: var(--gray-700);
  flex: 1;
}

.dropdown-loading,
.dropdown-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  font-size: 13px;
  color: var(--gray-600);
}

.dropdown-disabled-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.disabled-message {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 13px;
}

.disabled-message i {
  color: #f59e0b;
}

/* Checkbox Wrapper */
.checkbox-wrapper {
  position: relative;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.checkbox-wrapper input[type="checkbox"],
.checkbox-wrapper input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  margin: 0;
}

.option-checkbox,
.option-radio {
  display: none;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 16px;
  width: 16px;
  background-color: white;
  border: 1.5px solid #d1d5db;
  border-radius: 3px;
  transition: all 0.2s;
}

.checkbox-wrapper input[type="checkbox"]:checked ~ .checkmark,
.checkbox-wrapper input[type="radio"]:checked ~ .checkmark {
  background-color: #2563eb;
  border-color: #2563eb;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-wrapper input[type="checkbox"]:checked ~ .checkmark:after,
.checkbox-wrapper input[type="radio"]:checked ~ .checkmark:after {
  display: block;
}

.commodity-option i {
  font-size: 14px;
  color: var(--primary-color);
  flex-shrink: 0;
}

.commodity-option .bi-square,
.commodity-option .bi-circle {
  color: #d1d5db;
}

.commodity-option .bi-check-circle-fill,
.commodity-option .bi-check-square-fill {
  color: var(--primary-color);
}

.option-text {
  flex: 1;
}

/* Filter Actions Bar */
.filter-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  margin-top: 12px;
  position: relative;
  z-index: 5;
}

.filter-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6b7280;
}

.filter-info i {
  color: var(--primary-color);
}

.filter-info .divider {
  color: #d1d5db;
}

.filter-buttons {
  display: flex;
  gap: 8px;
}

.btn-filter-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-filter-action.clear {
  background: #f3f4f6;
  color: #6b7280;
  border-color: #e5e7eb;
}

.btn-filter-action.clear:hover {
  background: #e5e7eb;
  color: #374151;
}

/* Filter Toggle Button */
.filter-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  height: 46px;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  color: #495057;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-toggle-btn:hover {
  background: #f8f9fa;
  border-color: var(--primary-color);
}

.filter-toggle-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.filter-count {
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.chevron-icon {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.chevron-icon.ms-1 {
  margin-left: auto !important;
}

/* Search Controls */
.search-controls-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-box-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 220px;
  max-width: 320px;
  padding: 0 12px;
  height: 36px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s;
}

.search-box-main:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(47, 113, 158, 0.08);
}

.search-box-main i {
  color: #9ca3af;
  font-size: 13px;
}

.search-box-main input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 12px;
  outline: none;
  color: #374151;
}

.search-clear {
  width: 18px;
  height: 18px;
  border: none;
  background: #e5e7eb;
  border-radius: 50%;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: all 0.2s;
}

.search-clear:hover {
  background: #ef4444;
  color: white;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-select-wrapper {
  position: relative;
}

/* Risk Filter Group */
.risk-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-label {
  font-size: 11px;
  color: #6b7280;
  font-weight: 600;
}

.risk-chips {
  display: flex;
  gap: 4px;
}

.risk-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: white;
  border: 1.5px solid #e5e7eb;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 11px;
  font-weight: 500;
}

.risk-chip input {
  display: none;
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.risk-chip.low .chip-dot {
  background: #10b981;
}

.risk-chip.medium .chip-dot {
  background: #f59e0b;
}

.risk-chip.high .chip-dot {
  background: #ef4444;
}

.chip-text {
  color: #4b5563;
}

.chip-count {
  padding: 1px 5px;
  background: #f3f4f6;
  border-radius: 8px;
  font-size: 9px;
  color: #6b7280;
  font-weight: 600;
}

.risk-chip.active.low {
  background: rgba(16, 185, 129, 0.08);
  border-color: #10b981;
}

.risk-chip.active.low .chip-text {
  color: #065f46;
}

.risk-chip.active.low .chip-count {
  background: #d1fae5;
  color: #065f46;
}

.risk-chip.active.medium {
  background: rgba(245, 158, 11, 0.08);
  border-color: #f59e0b;
}

.risk-chip.active.medium .chip-text {
  color: #92400e;
}

.risk-chip.active.medium .chip-count {
  background: #fef3c7;
  color: #92400e;
}

.risk-chip.active.high {
  background: rgba(239, 68, 68, 0.08);
  border-color: #ef4444;
}

.risk-chip.active.high .chip-text {
  color: #991b1b;
}

.risk-chip.active.high .chip-count {
  background: #fee2e2;
  color: #991b1b;
}

.risk-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Active Filters Bar */
.active-filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  margin-top: 10px;
  border-top: 1px dashed #e5e7eb;
}

.filters-label {
  font-size: 11px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.filters-label i {
  color: var(--primary-color);
  font-size: 11px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px 3px 8px;
  background: #f8fafc;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 500;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.filter-chip i {
  font-size: 10px;
}

.filter-chip.search {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.2);
  color: #2563eb;
}

.filter-chip.region {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.2);
  color: #059669;
}

.filter-chip.category {
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(139, 92, 246, 0.2);
  color: #7c3aed;
}

.filter-chip.risk {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

.filter-chip.sort {
  background: rgba(107, 114, 128, 0.06);
  border-color: rgba(107, 114, 128, 0.2);
  color: #4b5563;
}

.filter-chip button {
  width: 14px;
  height: 14px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 9px;
}

.filter-chip button:hover {
  background: currentColor;
  color: white;
}

.clear-all-filters {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: transparent;
  border: 1px dashed #d1d5db;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
}

.clear-all-filters:hover {
  border-color: #ef4444;
  color: #ef4444;
}

/* Selected Tags Row */
.selected-tags-row {
  padding: 10px 7px 0px 7px;
  background: white;
  animation: slideDown 0.3s ease;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Animations & Transitions */
.filter-slide-enter-active,
.filter-slide-leave-active {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: top;
}

.filter-slide-enter-from,
.filter-slide-leave-to {
  opacity: 0;
  transform: translateY(-10px);
  max-height: 0;
}

.dropdown-expand-enter-active,
.dropdown-expand-leave-active {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: top;
}

.dropdown-expand-enter-from,
.dropdown-expand-leave-to {
  opacity: 0;
  transform: translateY(-10px) scaleY(0.8);
}

.tags-slide-enter-active,
.tags-slide-leave-active {
  transition: all 0.3s ease;
}

.tags-slide-enter-from,
.tags-slide-leave-to {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.list-slide-enter-active,
.list-slide-leave-active {
  transition: all 0.3s ease;
  max-height: 300px;
  overflow: hidden;
}

.list-slide-enter-from,
.list-slide-leave-to {
  opacity: 0;
  max-height: 0;
  transform: translateY(-10px);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Styles for Filters */
@media (max-width: 768px) {
  .filter-content {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .absolute-dropdown {
    position: fixed;
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-height: 60vh;
    z-index: 1001;
  }

  .filter-actions-bar {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .search-controls-wrapper {
    flex-direction: column;
  }

  .search-box-main {
    max-width: none;
  }

  .filter-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .risk-filter-group {
    width: 100%;
    justify-content: flex-start;
  }

  .risk-chips {
    flex-wrap: wrap;
  }

  .active-filters-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .filter-chips {
    width: 100%;
  }

  .risk-chips {
    justify-content: space-between;
  }

  .risk-chip {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .filter-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .dropdown-container {
    width: 100%;
  }

  .selected-indicator-tag {
    font-size: 11px;
    padding: 4px 6px 4px 10px;
  }
}

/* Z-index Stacking */
.sticky-header-wrapper {
  z-index: 100;
}

.compact-filter-panel {
  z-index: 101;
}

.absolute-dropdown {
  z-index: 102;
}
