/* ===== ACCE Global CRM - Static CSS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

/* ===== LUCIDE ICONS ===== */
[data-lucide] {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  display: inline-block;
  vertical-align: middle;
}

.sidebar-item-icon [data-lucide],
.sidebar-item-icon svg {
  width: 18px;
  height: 18px;
}


:root {
  --background: #f8fafc;
  --foreground: #0f172a;
  --card: #ffffff;
  --card-foreground: #0f172a;
  --border: #e2e8f0;
  --ring: #3b82f6;
  --sidebar-width: 260px;
  --font-sans: 'Inter', Arial, Helvetica, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  line-height: 1.5;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  background: var(--background);
  color: var(--foreground);
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: radial-gradient(circle at top right, rgba(59, 130, 246, 0.04) 0%, transparent 60%),
    radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.03) 0%, transparent 50%);
  background-attachment: fixed;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input,
select,
textarea {
  font-family: inherit;
}

.user-search-select {
  position: relative;
  width: 100%;
}

.user-search-select.open {
  z-index: 1000;
}

.user-search-select-native {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.user-search-select-trigger {
  width: 100%;
  min-height: 44px;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #0f172a;
  font-size: 14px;
  text-align: left;
}

.user-search-select-trigger.is-placeholder {
  color: #94a3b8;
}

.user-search-select-trigger-chevron {
  flex-shrink: 0;
  color: #64748b;
  font-size: 12px;
  transition: transform 0.18s ease;
}

.user-search-select.open .user-search-select-trigger-chevron {
  transform: rotate(180deg);
}

.user-search-select-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
  padding: 10px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 50;
}

.user-search-select.open .user-search-select-dropdown {
  display: flex;
}

.user-search-select.opens-up .user-search-select-dropdown {
  top: auto;
  bottom: calc(100% + 8px);
}

.user-search-select-input {
  width: 100%;
  border: 1px solid #dbe3f1;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
  margin-bottom: 8px;
}

.user-search-select-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.user-search-select-results {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.user-search-select-option,
.user-search-select-empty {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  text-align: left;
}

.user-search-select-option {
  color: #0f172a;
}

.user-search-select-option:hover {
  background: #eff6ff;
}

.user-search-select-option.selected {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 600;
}

.user-search-select-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.user-search-select-empty {
  color: #94a3b8;
}

table {
  border-collapse: collapse;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ===== GLASS EFFECTS ===== */
.glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
}

.glass-panel {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

/* ===== GLOW EFFECTS ===== */
.glow-primary {
  box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}

.glow-accent {
  box-shadow: 0 4px 14px 0 rgba(6, 182, 212, 0.39);
}

.glow-danger {
  box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.39);
}

.glow-success {
  box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes pulse-slow {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

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

  to {
    transform: rotate(360deg);
  }
}

@keyframes ping {

  75%,
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

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

@keyframes slideDown {
  from {
    height: 0;
    opacity: 0;
  }

  to {
    height: var(--target-height);
    opacity: 1;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-pulse-slow {
  animation: pulse-slow 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.animate-ping {
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.animate-fadeInUp {
  animation: fadeInUp 0.5s ease-out forwards;
}

.animate-fadeInLeft {
  animation: fadeInLeft 0.5s ease-out forwards;
}

/* Stagger children */
.stagger-children>*:nth-child(1) {
  animation-delay: 0ms;
}

.stagger-children>*:nth-child(2) {
  animation-delay: 100ms;
}

.stagger-children>*:nth-child(3) {
  animation-delay: 200ms;
}

.stagger-children>*:nth-child(4) {
  animation-delay: 300ms;
}

.stagger-children>*:nth-child(5) {
  animation-delay: 400ms;
}

.stagger-children>*:nth-child(6) {
  animation-delay: 500ms;
}

.stagger-children>*:nth-child(7) {
  animation-delay: 600ms;
}

.stagger-children>*:nth-child(8) {
  animation-delay: 700ms;
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  z-index: 50;
  background: #fff;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(241, 245, 249, 0.8);
  box-shadow: 10px 0 40px rgba(30, 58, 138, 0.03);
  overflow: visible;
  width: var(--sidebar-width);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar.collapsed {
  --sidebar-width: 80px;
  width: 80px;
}

.sidebar.collapsed .sidebar-text,
.sidebar.collapsed .sidebar-group-label,
.sidebar.collapsed .sidebar-chevron,
.sidebar.collapsed .sidebar-brand-text {
  display: none;
}

.sidebar.collapsed .sidebar-footer-profile {
  justify-content: center;
  background: none;
  border: none;
  box-shadow: none;
}

.sidebar-brand {
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  flex-shrink: 0;
  background: linear-gradient(to top right, #2563eb, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 18px;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.sidebar-brand-text {
  margin-left: 16px;
  font-weight: 700;
  font-size: 20px;
  white-space: nowrap;
  letter-spacing: -0.025em;
  color: #1e293b;
}

.sidebar-brand-text span {
  color: #2563eb;
  font-weight: 500;
  margin-left: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 24px 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding-inline: 16px;
  gap: 32px;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
}

.sidebar-group-label {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(148, 163, 184, 0.8);
  padding: 0 12px;
  margin-bottom: 12px;
}

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

.sidebar-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  transition: all 0.3s;
  outline: none;
  font-size: 14px;
  color: #64748b;
}

.sidebar-item:hover {
  color: #0f172a;
  background: rgba(248, 250, 252, 0.8);
}

.sidebar-item.active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2);
}

.sidebar-item.parent-active {
  background: #f8fafc;
  color: #0f172a;
}

.sidebar-item-left {
  display: flex;
  align-items: center;
}

.sidebar-item-icon {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  transition: all 0.3s;
}

.sidebar-item:not(.active) .sidebar-item-icon.has-bg {
  background: transparent;
}

.sidebar-item:not(.active):hover .sidebar-item-icon.has-bg {
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  outline: 1px solid #e2e8f0;
}

.sidebar-item.parent-active .sidebar-item-icon.has-bg {
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  outline: 1px solid #e2e8f0;
}

.sidebar-item-icon i {
  font-size: 16px;
}

.sidebar-item:not(.active) .sidebar-item-icon i {
  color: #94a3b8;
}

.sidebar-item:not(.active):hover .sidebar-item-icon i {
  color: #475569;
}

.sidebar-item.parent-active .sidebar-item-icon i {
  color: #2563eb;
}

.sidebar-item.active .sidebar-item-icon i {
  color: #fff;
}

.sidebar-item-text {
  margin-left: 14px;
  transition: all 0.3s;
  font-weight: 500;
}

.sidebar-item.parent-active .sidebar-item-text,
.sidebar-item.active .sidebar-item-text {
  font-weight: 600;
  letter-spacing: -0.025em;
}

.sidebar-chevron {
  transition: all 0.4s;
  color: #cbd5e1;
}

.sidebar-item:hover .sidebar-chevron {
  color: #64748b;
}

.sidebar-chevron.open {
  transform: rotate(180deg);
  color: #2563eb;
}

.sidebar-alert-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulse 2s infinite;
  outline: 2px solid #fff;
}

/* Sub-menu */
.sidebar-submenu {
  margin-left: 24px;
  padding-left: 20px;
  border-left: 1px solid #f1f5f9;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
}

.sidebar-submenu.open {
  max-height: 500px;
  opacity: 1;
}

.sidebar-subitem {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.2s;
  color: #64748b;
  font-weight: 500;
}

.sidebar-subitem:hover {
  color: #0f172a;
  background: #f8fafc;
}

.sidebar-subitem.active {
  color: #2563eb;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.05);
}

.sidebar-subitem.active::before {
  content: '';
  position: absolute;
  left: -21px;
  width: 3px;
  height: 12px;
  background: #2563eb;
  border-radius: 9999px;
}

/* Sidebar Footer */
.sidebar-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: rgba(248, 250, 252, 0.4);
  border-top: 1px solid #f1f5f9;
}

.sidebar-footer-profile {
  display: flex;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  transition: all 0.3s;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
}

.sidebar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 12px;
  position: relative;
  overflow: hidden;
}

.sidebar-avatar-hover {
  position: absolute;
  inset: 0;
  background: #2563eb;
  transform: translateY(100%);
  transition: transform 0.3s;
}

.sidebar-avatar:hover .sidebar-avatar-hover {
  transform: translateY(0);
}

.sidebar-avatar span {
  position: relative;
  z-index: 10;
}

.sidebar-user-info {
  margin-left: 12px;
  flex: 1;
  overflow: hidden;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
}

.sidebar-user-role {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
}

.sidebar-collapse-btn {
  padding: 4px;
  color: #cbd5e1;
  transition: color 0.2s;
}

.sidebar-collapse-btn:hover {
  color: #0f172a;
}

.sidebar-expand-btn {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
  margin-inline: auto;
  border-radius: 8px;
  color: #94a3b8;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sidebar-expand-btn:hover {
  color: #0f172a;
  background: #fff;
}

/* ===== TOPBAR ===== */
.topbar {
  height: 80px;
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  position: fixed;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-right: 32px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02);
  padding-left: calc(var(--sidebar-width) + 32px);
  transition: padding-left 0.3s ease-in-out;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  flex-shrink: 0;
}

.topbar-menu-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.topbar-menu-btn i,
.topbar-menu-btn svg {
  width: 20px;
  height: 20px;
}

.sidebar-overlay {
  display: none;
}

body.sidebar-mobile-open {
  overflow: hidden;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 2px;
}

.topbar-breadcrumb .active {
  color: #2563eb;
  font-weight: 600;
}

.topbar-breadcrumb .sep {
  color: #cbd5e1;
}

.topbar-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #1e293b;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.topbar-search {
  position: relative;
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  width: 288px;
  transition: all 0.3s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.topbar-search:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
  background: #fff;
}

.topbar-search i {
  color: #94a3b8;
  margin-right: 8px;
  font-size: 16px;
}

.topbar-search input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  color: #334155;
  width: 100%;
}

.topbar-search input::placeholder {
  color: #94a3b8;
}

.topbar-search-kbd {
  margin-left: auto;
  font-size: 10px;
  font-weight: 500;
  font-family: var(--font-mono);
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  color: #94a3b8;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

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

.topbar-icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.2s;
}

.topbar-icon-btn:hover {
  color: #1e293b;
  background: #f1f5f9;
}

.topbar-icon-btn i {
  font-size: 18px;
  transition: transform 0.2s;
}

.topbar-icon-btn:hover i {
  transform: scale(1.1);
}

.topbar-notif-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid #fff;
}

.topbar-divider {
  height: 24px;
  width: 1px;
  background: #e2e8f0;
  margin: 0 8px;
}

.topbar-quick-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #2563eb;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13px;
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
  margin-left: 4px;
}

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

.topbar-quick-btn:focus {
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  padding-left: var(--sidebar-width);
  padding-top: 80px;
  width: 100%;
  height: 100vh;
  position: relative;
  overflow-y: auto;
  z-index: 10;
  scroll-behavior: smooth;
  transition: padding-left 0.3s ease-in-out;
}

.main-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.03) 0%, transparent 100%);
  pointer-events: none;
}

.page-container {
  padding: 32px;
  width: 100%;
  position: relative;
  z-index: 20;
}

.page-container-narrow {
  padding: 32px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 20;
}

/* ===== PAGE HEADER ===== */
.page-header {
  margin-bottom: 32px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.page-header-icon-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.page-header-icon-row i {
  color: #2563eb;
  font-size: 28px;
}

.page-header h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #0f172a;
}

.page-header p {
  color: #64748b;
  font-weight: 500;
  margin-top: 4px;
}

.page-header-actions {
  display: flex;
  gap: 12px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  border-radius: 12px;
  transition: all 0.2s;
  font-size: 13px;
  padding: 8px 16px;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2);
}

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

.btn-info {
  background: #0ea5e9;
  color: #fff;
  box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.2);
}

.btn-info:hover {
  background: #0284c7;
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
  background: #f8fafc;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 14px;
  border-radius: 16px;
}

.btn-dark {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1);
}

.btn-dark:hover {
  background: #000;
}

.btn-emerald {
  background: #059669;
  color: #fff;
  box-shadow: 0 10px 15px -3px rgba(5, 150, 105, 0.1);
}

.btn-emerald:hover {
  background: #047857;
}

.btn-indigo {
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.1);
}

.btn-indigo:hover {
  background: #4338ca;
}

.btn-icon {
  padding: 8px;
}

.btn:active {
  transform: scale(0.95);
}

/* ===== KPI CARDS ===== */
.kpi-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 32px;
  width: 100%;
  transition: all 0.3s;
}

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

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

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

@media (max-width: 1024px) {
  .kpi-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

@media (max-width: 640px) {

  .kpi-grid-4,
  .kpi-grid-6,
  .kpi-grid-3 {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  position: relative;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.5s ease-out forwards;
  opacity: 0;
}

.kpi-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.kpi-card-glow {
  position: absolute;
  top: -96px;
  right: -96px;
  width: 192px;
  height: 192px;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0;
  transition: opacity 0.7s;
  pointer-events: none;
}

.kpi-card:hover .kpi-card-glow {
  opacity: 0.08;
}

.kpi-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  position: relative;
  z-index: 10;
}

.kpi-card-title {
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.kpi-card-value {
  font-size: 30px;
  font-weight: 700;
  color: #1e293b;
  font-family: var(--font-mono);
  letter-spacing: -0.025em;
}

.kpi-card-icon {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
}

.kpi-card:hover .kpi-card-icon {
  transform: scale(1.1);
}

.kpi-card-trend {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  position: relative;
  z-index: 10;
}

.kpi-card-trend-up {
  color: #059669;
  font-size: 12px;
  font-weight: 600;
}

.kpi-card-trend-down {
  color: #e11d48;
  font-size: 12px;
  font-weight: 600;
}

.kpi-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

/* Live indicator */
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse-slow 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

/* ===== KPI SIMPLE (used in many pages) ===== */
.kpi-simple {
  padding: 20px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  animation: fadeInUp 0.5s ease-out forwards;
  opacity: 0;
}

.kpi-simple:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.kpi-simple-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.kpi-simple-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.kpi-simple-value {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: -0.025em;
  color: #0f172a;
}

.kpi-simple-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
  font-weight: 500;
}

.kpi-simple.border-left-blue:hover {
  border-left: 4px solid #3b82f6;
}

.kpi-simple.border-left-emerald:hover {
  border-left: 4px solid #10b981;
}

.kpi-simple.border-left-indigo:hover {
  border-left: 4px solid #6366f1;
}

.kpi-simple.with-left-border {
  border-left: 4px solid transparent;
}

.kpi-simple.with-left-border:hover {
  border-left-color: #3b82f6;
}

.kpi-simple.alert-left {
  border-left: 4px solid #f43f5e;
}

/* ===== FILTER BAR ===== */
.filter-bar {
  background: #fff;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.filter-search {
  position: relative;
  flex: 1 1 240px;
  min-width: 0;
}

.filter-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 16px;
}

.filter-search input {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 10px 16px 10px 40px;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: all 0.2s;
  color: #334155;
}

.filter-search input:focus {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.4);
}

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

.filter-select {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: all 0.2s;
  min-width: 140px;
  color: #475569;
}

.filter-select:focus {
  background: #fff;
}

/* ===== TABLES ===== */
.data-table-wrap {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 400px;
  width: 100%;
}

.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.table-responsive > .data-table {
  min-width: 720px;
}

.data-table,
table.dataTable {
  width: 100% !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  margin: 0 !important;
}

/* ===== DATATABLES LAYOUT OVERRIDES ===== */
.dataTables_wrapper {
  width: 100% !important;
}

.dataTables_wrapper .row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin: 0 !important;
  width: 100% !important;
  gap: 16px;
}

.dataTables_wrapper .row > [class*="col-"] {
  flex: 0 0 auto !important;
  max-width: none !important;
  width: auto !important;
  padding: 0 !important;
}

/* The col containing the table itself */
.dataTables_wrapper .row > .col-sm-12:not(.col-md-6):not(.col-md-5):not(.col-md-7) {
  flex: 1 1 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  display: block !important;
}

.dataTables_wrapper .row:first-child {
  margin-bottom: 16px !important;
  gap: 16px;
}

.dataTables_wrapper .row:last-child {
  margin-top: 16px !important;
  gap: 16px;
}

.dataTables_filter,
.dataTables_length,
.dataTables_info,
.dataTables_paginate {
  margin: 0 !important;
  padding: 0 !important;
}

.dataTables_paginate .pagination {
  margin: 0 !important;
}

.data-table thead tr,
table.dataTable thead tr {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.data-table th,
table.dataTable thead th {
  padding: 16px 20px !important;
  font-size: 11px;
  font-weight: 800;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.5 !important;
  text-align: left !important;
  vertical-align: middle !important;
  position: relative !important;
}

.data-table tbody tr,
table.dataTable tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.15s;
}

.data-table tbody tr:hover,
table.dataTable tbody tr:hover {
  background: rgba(59, 130, 246, 0.02);
}

.data-table td,
table.dataTable tbody td {
  padding: 16px 20px !important;
  vertical-align: middle !important;
  color: #475569;
  font-size: 13px !important;
  text-align: left !important;
  line-height: 1.5 !important;
}

.emi-transfer-log-table {
  min-width: 1032px !important;
  table-layout: fixed;
}

.emi-transfer-log-table th,
.emi-transfer-log-table td {
  padding: 14px 12px !important;
}

.emi-transfer-log-table th:nth-child(1),
.emi-transfer-log-table td:nth-child(1) {
  width: 56px;
}

.emi-transfer-log-table th:nth-child(2),
.emi-transfer-log-table td:nth-child(2),
.emi-transfer-log-table th:nth-child(3),
.emi-transfer-log-table td:nth-child(3) {
  width: 138px;
}

.emi-transfer-log-table th:nth-child(4),
.emi-transfer-log-table td:nth-child(4) {
  width: 100px;
}

.emi-transfer-log-table th:nth-child(5),
.emi-transfer-log-table td:nth-child(5) {
  width: 96px;
}

.emi-transfer-log-table th:nth-child(6),
.emi-transfer-log-table td:nth-child(6),
.emi-transfer-log-table th:nth-child(8),
.emi-transfer-log-table td:nth-child(8) {
  width: 124px;
}

.emi-transfer-log-table th:nth-child(7),
.emi-transfer-log-table td:nth-child(7) {
  width: 108px;
}

.emi-transfer-log-table th:nth-child(9),
.emi-transfer-log-table td:nth-child(9) {
  width: 148px;
}

.emi-transfer-log-table td:nth-child(2) div,
.emi-transfer-log-table td:nth-child(3) div,
.emi-transfer-log-table td:nth-child(4) div {
  overflow-wrap: anywhere;
}

.emi-transfer-log-table td:nth-child(6) > div:first-child,
.emi-transfer-log-table td:nth-child(7) div,
.emi-transfer-log-table td:nth-child(8) div,
.emi-transfer-log-table td:nth-child(9) div {
  white-space: nowrap;
}

.emi-transfer-layout {
  display: grid;
  align-items: flex-start;
  gap: 24px;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
}

.emi-transfer-form-card {
  min-width: 300px;
  max-width: none;
}

.emi-transfer-log-card {
  min-width: 0;
}

@media (max-width: 1200px) {
  .emi-transfer-layout {
    grid-template-columns: 1fr;
  }
}

/* Explicit text overrides for common classes */
.text-right,
.dt-right {
  text-align: right !important;
}

.text-center,
.dt-center {
  text-align: center !important;
}

.text-left,
.dt-left {
  text-align: left !important;
}

/* Override DataTables internal spacing that breaks alignment */
table.dataTable thead th,
table.dataTable thead td,
table.dataTable tbody th,
table.dataTable tbody td,
table.dataTable tfoot th,
table.dataTable tfoot td {
  box-sizing: border-box !important;
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  border-radius: 9999px;
  border: 1px solid;
  padding: 2px 8px;
}

.badge-sm {
  font-size: 10px;
  padding: 2px 8px;
}

.badge-xs {
  font-size: 9px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: -0.025em;
}

.badge-green {
  background: #ecfdf5;
  color: #059669;
  border-color: #d1fae5;
}

.badge-amber {
  background: #fffbeb;
  color: #d97706;
  border-color: #fef3c7;
}

.badge-red {
  background: #fff1f2;
  color: #f43f5e;
  border-color: #ffe4e6;
}

.badge-rose {
  background: #fff1f2;
  color: #f43f5e;
  border-color: #ffe4e6;
}

.badge-orange {
  background: #fff7ed;
  color: #ea580c;
  border-color: #ffedd5;
}

.badge-blue {
  background: #eff6ff;
  color: #2563eb;
  border-color: #dbeafe;
}

.badge-indigo {
  background: #eef2ff;
  color: #4f46e5;
  border-color: #e0e7ff;
}

.badge-slate {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
}

/* Action buttons in table rows */
.row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: all 0.2s;
}

tr:hover .row-actions {
  opacity: 1;
}

.row-action-btn {
  padding: 8px;
  color: #94a3b8;
  border-radius: 8px;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.row-action-btn:hover {
  color: #2563eb;
  background: #fff;
}

.row-action-btn.danger:hover {
  color: #ef4444;
  background: #fff;
}

/* User Avatar */
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  transition: all 0.2s;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

tr:hover .user-avatar {
  background: #2563eb;
  color: #fff;
}

/* ===== SECTION CARDS ===== */
.section-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.user-form-main-card {
  position: relative;
  overflow: visible;
  z-index: 2;
}

.user-form-main-card .user-search-select-dropdown {
  z-index: 1000;
}

.section-card-header {
  background: rgba(248, 250, 252, 0.5);
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-card-body {
  padding: 16px;
}

.chart-label {
  font-size: 12px;
  color: #64748b;
  margin-top: 8px;
}

/* ===== CHARTIST OVERRIDES ===== */
.ct-chart {
  position: relative;
}

.ct-label {
  fill: #64748b;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-sans);
}

.ct-grid {
  stroke: rgba(226, 232, 240, 0.8);
  stroke-width: 1px;
  stroke-dasharray: 2px;
}

.ct-series-a .ct-line {
  stroke: #3b82f6;
  stroke-width: 3px;
}

.ct-series-a .ct-point {
  stroke: #3b82f6;
  stroke-width: 8px;
  stroke-linecap: round;
}

.ct-series-a .ct-area {
  fill: #3b82f6;
  fill-opacity: 0.1;
}

.ct-point:hover {
  stroke-width: 12px;
  cursor: pointer;
}

.ct-label.ct-horizontal.ct-end {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  transform: translate(-50%, 0);
}

.ct-label.ct-vertical.ct-start {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
}

/* ===== GRID LAYOUTS ===== */
.grid-1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 32px;
}

.col-span-1 {
  grid-column: span 1;
}

.col-span-2 {
  grid-column: span 2;
}

.col-span-3 {
  grid-column: span 3;
}

.col-span-4 {
  grid-column: span 4;
}

.col-span-5 {
  grid-column: span 5;
}

.col-span-6 {
  grid-column: span 6;
}

.col-span-7 {
  grid-column: span 7;
}

.col-span-8 {
  grid-column: span 8;
}

.col-span-9 {
  grid-column: span 9;
}

.col-span-10 {
  grid-column: span 10;
}

.col-span-11 {
  grid-column: span 11;
}

.col-span-12 {
  grid-column: span 12;
}

.grid-1-3 {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
}

/* ===== MAP / RADAR SECTION ===== */
.radar-map {
  position: relative;
  width: 100%;
  height: 200px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
  transition: border-color 0.3s;
}

.radar-map:hover {
  border-color: #06b6d4;
}

.radar-sweep {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  animation: spin 4s linear infinite;
  pointer-events: none;
  background: conic-gradient(from 0deg, transparent 70%, rgba(6, 182, 212, 0.1) 100%);
  border: 1px solid rgba(6, 182, 212, 0.1);
}

.radar-point {
  position: absolute;
  border-radius: 50%;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.1em;
}

.form-input {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  outline: none;
  transition: all 0.2s;
}

.form-input:focus {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.5);
}

.form-select {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  outline: none;
  transition: all 0.2s;
  appearance: auto;
}

.form-textarea {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  outline: none;
  resize: none;
  transition: all 0.2s;
}

/* ===== TAB SYSTEM ===== */
.tab-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e2e8f0;
}

.tab-items {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tab-item {
  position: relative;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
}

.tab-item:hover {
  color: #1e293b;
}

.tab-item.active {
  color: #2563eb;
}

.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  background: #2563eb;
  border-radius: 9999px;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
}

/* ===== DARK PANEL (checkout summary, etc) ===== */
.dark-panel {
  background: #0f172a;
  border-radius: 24px;
  padding: 32px;
  color: #fff;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.2);
  position: relative;
  overflow: hidden;
}

.dark-panel-glow {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 256px;
  height: 256px;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
}

/* ===== INVENTORY TAB SYSTEM ===== */
.toggle-group {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.toggle-btn {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  transition: all 0.2s;
  color: #64748b;
}

.toggle-btn:hover {
  color: #1e293b;
}

.toggle-btn.active {
  background: #fff;
  color: #2563eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
}

/* ===== PRODUCT LIST CARDS ===== */
.product-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s;
  overflow: hidden;
}

.product-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.product-card.expanded {
  border-color: #60a5fa;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07);
  outline: 1px solid #dbeafe;
}

.product-card.low-stock:not(.expanded) {
  outline: 1px solid #fecaca;
  border-color: #fca5a5;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.05);
}

.product-card-main {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.product-thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: background 0.2s;
}

.product-card:hover .product-thumb {
  background: #eff6ff;
}

.stock-bar {
  width: 100%;
  height: 6px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
}

.stock-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.5s;
}

.stock-bar-fill.green {
  background: #10b981;
}

.stock-bar-fill.red {
  background: #ef4444;
}

/* Product card expanded section */
.product-expanded {
  border-top: 1px solid #f1f5f9;
  padding: 24px;
  background: rgba(248, 250, 252, 0.5);
  display: none;
}

.product-card.expanded .product-expanded {
  display: block;
}

/* Hover action layer */
.product-hover-actions {
  position: absolute;
  right: 64px;
  top: 50%;
  transform: translateY(-50%) translateX(16px);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: all 0.3s;
  z-index: 10;
}

.product-card:hover .product-hover-actions {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.hover-action-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  padding: 6px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07);
}

/* ===== STICKY SIDEBAR FORMS ===== */
.sticky-form {
  position: sticky;
  top: 100px;
  align-self: start;
}

/* ===== INFO CARD ===== */
.info-card {
  padding: 20px;
  background: #eff6ff;
  border-radius: 16px;
  border: 1px solid #dbeafe;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.info-card p {
  font-size: 12px;
  font-weight: 600;
  color: rgba(30, 64, 175, 0.7);
  line-height: 1.6;
}

/* ===== FLOATING ACTION BAR ===== */
.floating-bar {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  background: #0f172a;
  color: #fff;
  border-radius: 16px;
  padding: 20px 32px;
  gap: 40px;
  min-width: 700px;
  box-shadow: 0 20px 50px rgba(30, 41, 59, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
}

/* ===== NOTIFICATION TOGGLE ===== */
.toggle-switch {
  width: 44px;
  height: 24px;
  border-radius: 9999px;
  transition: all 0.3s;
  position: relative;
  border: 2px solid;
}

.toggle-switch.on {
  background: #2563eb;
  border-color: #2563eb;
}

.toggle-switch.off {
  background: #e5e7eb;
  border-color: #e5e7eb;
}

.toggle-knob {
  position: absolute;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: all 0.3s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.toggle-switch.on .toggle-knob {
  left: 22px;
}

.toggle-switch.off .toggle-knob {
  left: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .kpi-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-12 {
    grid-template-columns: 1fr;
  }

  .col-span-2,
  .col-span-3,
  .col-span-4,
  .col-span-5,
  .col-span-7,
  .col-span-8,
  .col-span-12 {
    grid-column: span 1;
  }

  .grid-1-3 {
    grid-template-columns: 1fr;
  }

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

  .filter-search {
    flex: 1 1 auto;
  }

  .filter-search input {
    width: 100%;
  }

  .filter-controls {
    flex-wrap: wrap;
  }

  .topbar-search {
    display: none;
  }
}

@media (max-width: 768px) {

  .kpi-grid-4,
  .kpi-grid-6,
  .kpi-grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .topbar-menu-btn {
    display: inline-flex;
  }

  .sidebar-overlay.visible {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 110;
  }

  .sidebar {
    display: flex;
    width: min(280px, 86vw);
    transform: translateX(-100%);
    transition: transform 0.3s ease, width 0.3s ease;
    z-index: 120;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar.collapsed {
    width: min(280px, 86vw);
  }

  .sidebar-collapse-btn {
    display: none;
  }

  .topbar {
    padding-left: 16px;
  }

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

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .page-container {
    padding: 20px 16px 72px;
  }
}

/* ===== UTILITY CLASSES ===== */
.text-blue {
  color: #2563eb;
}

.text-emerald {
  color: #059669;
}

.text-rose {
  color: #f43f5e;
}

.text-amber {
  color: #d97706;
}

.text-indigo {
  color: #4f46e5;
}

.text-cyan {
  color: #06b6d4;
}

.text-slate-300 {
  color: #cbd5e1;
}

.text-slate-400 {
  color: #94a3b8;
}

.text-slate-500 {
  color: #64748b;
}

.text-slate-600 {
  color: #475569;
}

.text-slate-700 {
  color: #334155;
}

.text-slate-800 {
  color: #1e293b;
}

.text-slate-900 {
  color: #0f172a;
}

.text-white {
  color: #fff;
}

.font-mono {
  font-family: var(--font-mono);
}

.font-bold {
  font-weight: 700;
}

.font-black {
  font-weight: 900;
}

.text-xs {
  font-size: 12px;
}

.text-sm {
  font-size: 14px;
}

.text-lg {
  font-size: 18px;
}

.text-xl {
  font-size: 20px;
}

.text-2xl {
  font-size: 24px;
}

.text-3xl {
  font-size: 30px;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.uppercase {
  text-transform: uppercase;
}

.tracking-wide {
  letter-spacing: 0.1em;
}

.tracking-tight {
  letter-spacing: -0.025em;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

.gap-6 {
  gap: 24px;
}

.gap-8 {
  gap: 32px;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-4 {
  margin-bottom: 16px;
}

.mb-6 {
  margin-bottom: 24px;
}

.mb-8 {
  margin-bottom: 32px;
}

.mb-10 {
  margin-bottom: 40px;
}

.mt-2 {
  margin-top: 8px;
}

.mt-4 {
  margin-top: 16px;
}

.mt-6 {
  margin-top: 24px;
}

.mt-8 {
  margin-top: 32px;
}

.p-4 {
  padding: 16px;
}

.p-5 {
  padding: 20px;
}

.p-6 {
  padding: 24px;
}

.p-8 {
  padding: 32px;
}

.pb-20 {
  padding-bottom: 80px;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

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

.justify-center {
  justify-content: center;
}

.justify-end {
  justify-content: flex-end;
}

.flex-1 {
  flex: 1;
}

.shrink-0 {
  flex-shrink: 0;
}

.w-full {
  width: 100%;
}

.min-h-screen {
  min-height: 100vh;
}

.relative {
  position: relative;
}

.overflow-hidden {
  overflow: hidden;
}

.overflow-x-auto {
  overflow-x: auto;
}

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

.rounded-2xl {
  border-radius: 16px;
}

.rounded-full {
  border-radius: 9999px;
}

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

.shadow-xl {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.border {
  border: 1px solid #e2e8f0;
}

.border-b {
  border-bottom: 1px solid #e2e8f0;
}

.border-t {
  border-top: 1px solid #e2e8f0;
}

.pointer-events-none {
  pointer-events: none;
}

.cursor-pointer {
  cursor: pointer;
}

.select-all {
  user-select: all;
}

.hidden {
  display: none;
}

/* ===== DATATABLES MODERNIZATION ===== */
.dataTables_wrapper {
  padding: 16px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dataTables_wrapper .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 -15px;
}

.dataTables_wrapper .row:first-child {
  padding: 0 10px 16px 10px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 16px;
}

.dataTables_wrapper .row:last-child {
  padding: 16px 10px 24px 10px;
  border-top: 1px solid #f1f5f9;
  margin-top: 16px;
}

/* Length & Filter Alignment */
.dataTables_length {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.dataTables_length select {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 8px;
  margin: 0 8px;
  outline: none;
  cursor: pointer;
  color: #1e293b;
  font-weight: 600;
}

.dataTables_filter {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  display: flex;
  justify-content: flex-end;
}

.dataTables_filter label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

.dataTables_filter input {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 14px;
  outline: none;
  transition: all 0.2s;
  width: 240px;
  color: #1e293b;
  font-weight: 500;
}

.dataTables_filter input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: #fff;
}

/* Info & Pagination Alignment */
.dataTables_info {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  padding-top: 8px;
}

.dataTables_paginate {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.dataTables_paginate .pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.dataTables_paginate .page-item {
  margin: 0;
}

.dataTables_paginate .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  text-decoration: none;
}

.dataTables_paginate .page-item.active .page-link {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.dataTables_paginate .page-item.disabled .page-link {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f8fafc;
}

.dataTables_paginate .page-link:hover:not(.active):not(.disabled) {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}

/* Handle sorting icons */
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
  cursor: pointer;
  position: relative;
  padding-right: 30px !important;
}

/* Handle sorting icons without shifting text */
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
  cursor: pointer;
  position: relative;
  padding-right: 32px !important;
}

table.dataTable thead .sorting:before,
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:before,
table.dataTable thead .sorting_desc:after {
  position: absolute !important;
  bottom: auto !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: block !important;
  opacity: 0.15 !important;
  font-size: 11px !important;
  font-family: serif !important;
}

table.dataTable thead .sorting:after {
  content: "↕" !important;
  right: 10px !important;
}

table.dataTable thead .sorting_asc:after {
  content: "↑" !important;
  right: 10px !important;
  opacity: 1 !important;
  color: #2563eb !important;
  font-weight: 900 !important;
}

table.dataTable thead .sorting_desc:after {
  content: "↓" !important;
  right: 10px !important;
  opacity: 1 !important;
  color: #2563eb !important;
  font-weight: 900 !important;
}

table.dataTable thead .sorting:before,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_desc:before {
  content: "" !important;
}

table.dataTable thead .sorting:before,
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:before,
table.dataTable thead .sorting_desc:after {
  position: absolute !important;
  bottom: auto !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: block !important;
  opacity: 0.15 !important;
  font-size: 11px !important;
  font-family: serif !important;
}

table.dataTable thead .sorting:after {
  content: "↕" !important;
  right: 10px !important;
}

table.dataTable thead .sorting_asc:after {
  content: "↑" !important;
  right: 10px !important;
  opacity: 1 !important;
  color: #2563eb !important;
  font-weight: 900 !important;
}

table.dataTable thead .sorting_desc:after {
  content: "↓" !important;
  right: 10px !important;
  opacity: 1 !important;
  color: #2563eb !important;
  font-weight: 900 !important;
}

table.dataTable thead .sorting:before,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_desc:before {
  content: "" !important;
}
