/* ==========================================================================
   Modern Data Workspace & Catalog Sidebar UI
   Pixel-faithful replication of Databricks / Data Cloud workspace sidebar
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-app: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-main: #f8fafc;
  --border-subtle: #eaedf1;
  --border-strong: #d0d7de;

  /* Global Dynamic Primary Theme System */
  --app-primary: #ea580c;
  --app-primary-light: #fb923c;
  --app-primary-dark: #c2410c;
  --app-primary-bg: #fff7ed;
  --app-primary-border: #fed7aa;
  --app-primary-glow: rgba(234, 88, 12, 0.28);
  --primary-gradient: linear-gradient(135deg, var(--app-primary-light, #fb923c) 0%, var(--app-primary, #ea580c) 100%);
  --border-focus: var(--app-primary-light, #f97316);

  /* Accent Colors (Modern Warm Orange Theme - Dynamic) */
  --color-primary-orange: var(--app-primary, #ea580c);
  --color-primary-orange-light: var(--app-primary-light, #f97316);
  --color-primary-orange-dark: var(--app-primary-dark, #c2410c);
  --color-primary-orange-bg: var(--app-primary-bg, #fff7ed);
  --color-primary-orange-border: var(--app-primary-border, #fed7aa);

  /* Aliases to maintain full system compatibility */
  --color-primary-green: var(--app-primary, #ea580c);
  --color-primary-green-light: var(--app-primary-light, #f97316);
  --color-primary-green-dark: var(--app-primary-dark, #c2410c);
  --color-primary-green-bg: var(--app-primary-bg, #fff7ed);
  --color-primary-green-border: var(--app-primary-border, #fed7aa);
  --color-primary-red: #ea4335;
  --color-primary-blue: #3b82f6;

  /* Text Colors */
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  /* Interactive States */
  --item-hover: #f1f5f9;
  --item-active: #e2e8f0;
  --item-selected-bg: var(--app-primary-bg, #fff7ed);
  --item-selected-text: var(--app-primary, #ea580c);

  /* Sizing */
  --rail-width: 68px;
  --explorer-width: 255px;

  /* Typography */
  --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-family-mono: 'JetBrains Mono', SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

/* Base Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  width: 100%;
  font-family: var(--font-family-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

/* Master App Layout Grid/Flex */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  background-color: var(--bg-app);
  overflow: hidden;
}

/* ==========================================================================
   1. PRIMARY LEFT ICON RAIL
   ========================================================================== */
.primary-rail {
  width: var(--rail-width);
  min-width: var(--rail-width);
  height: 100%;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 16px 0;
  z-index: 20;
  user-select: none;
  flex: 0 0 auto;
  flex-shrink: 0;
}

/* Brand Logo in Primary Rail (Orange 3D Cube - 64px Header Level) */
.rail-logo-container {
  width: 100%;
  height: 64px;
  min-height: 64px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.rail-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.rail-logo-box {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: #ffffff;
  border: 1px solid var(--border-subtle, #e2e8f0);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  box-shadow: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode .rail-logo-box,
html.dark .rail-logo-box,
.dark-mode .rail-logo-box {
  background: #1e293b !important;
  border-color: #334155 !important;
}

.rail-logo-box:hover {
  transform: translateY(-1.5px) scale(1.05);
  box-shadow: none;
}

.brand-logo-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Vertical Icon Stack */
.rail-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  flex: 1;
}

.rail-btn {
  width: 58px;
  min-height: 48px;
  height: auto;
  padding: 6px 6px 5px;
  border-radius: 9px;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  color: #475569;
  text-decoration: none;
  transition: all 0.15s ease;
  position: relative;
  box-sizing: border-box;
}

a.rail-btn,
a.rail-btn:hover,
a.rail-btn:focus,
a.rail-btn:active {
  text-decoration: none;
}

.rail-btn .rail-icon {
  width: 19px;
  height: 19px;
  stroke-width: 1.8;
  transition: transform 0.15s ease;
}

.rail-btn .rail-label {
  font-size: 8.5px;
  font-weight: 500;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  letter-spacing: -0.01em;
  color: inherit;
  transition: color 0.15s ease;
  padding: 0 4px;
  box-sizing: border-box;
}

.rail-btn:hover {
  background-color: var(--app-primary-bg, #f1f5f9);
  color: var(--app-primary, #0f172a);
}

.rail-btn:hover .rail-icon {
  transform: scale(1.06);
  color: var(--app-primary, #0f172a);
  stroke: var(--app-primary, #0f172a);
}

.rail-btn:hover .rail-label {
  color: var(--app-primary, #0f172a);
}

/* Selected state (Home active in vibrant orange) */
.rail-btn.active {
  background-color: var(--app-primary-bg, #fff7ed);
  color: var(--app-primary, #ea580c);
  padding: 6px 6px 5px;
}

.rail-btn.active .rail-icon {
  color: var(--app-primary, #ea580c);
  stroke: var(--app-primary, #ea580c);
  stroke-width: 2;
}

.rail-btn.active .rail-label {
  color: var(--app-primary, #ea580c);
  font-weight: 600;
  padding: 0 4px;
}

.rail-btn.avatar-btn {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  flex-direction: row;
}

/* Rail Footer */
.rail-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-gradient, linear-gradient(135deg, #fb923c, #ea580c));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}

/* Sidebar Brand Header (Height: 64px matching rail logo, no bottom border) */
.sidebar-brand-header {
  height: 64px;
  min-height: 64px;
  box-sizing: border-box;
  padding: 0 16px;
  display: flex;
  align-items: center;
}

.sidebar-brand-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 100%;
}

.sidebar-brand-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.015em;
  margin: 0;
  line-height: 1.2;
}

.sidebar-brand-subtitle {
  font-size: 12.5px;
  font-weight: 500;
  color: #64748b;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.sidebar-brand-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--app-primary, #ea580c);
  background-color: var(--app-primary-bg, #fff7ed);
  border: 1px solid var(--app-primary-glow, #fed7aa);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: auto;
}

/* ==========================================================================
   2. EXPLORER SIDEBAR (Secondary Pane)
   ========================================================================== */
.explorer-sidebar {
  width: var(--explorer-width, 240px);
  min-width: 0;
  max-width: 520px;
  height: 100%;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: relative;
  user-select: none;
  overflow: hidden;
  flex: 0 0 auto;
  flex-shrink: 0;
  transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1),
    border-color 0.25s ease;
  will-change: width;
}

/* Stable width for inner elements to prevent squishing during slide */
.sidebar-brand-header,
.explorer-header,
.tree-container {
  min-width: 200px;
}

/* Collapsed state: smoothly slides to 0 width (small menu mode) */
.explorer-sidebar.collapsed {
  width: 0 !important;
  border-right-color: transparent !important;
  pointer-events: none !important;
}

.explorer-sidebar.collapsed .sidebar-resizer {
  display: none !important;
}

/* Header with Search and Filter (Filter icon inside search bar) */
.explorer-header {
  padding: 12px 10px 8px 10px;
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.search-box-wrapper {
  flex: 1;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 10px;
  width: 15px;
  height: 15px;
  color: #64748b;
  pointer-events: none;
  z-index: 1;
}

.search-input {
  width: 100%;
  height: 36px;
  background-color: #ffffff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 0 54px 0 32px;
  font-family: var(--font-family-sans);
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  transition: all 0.15s ease;
}

.search-input::placeholder {
  color: #70757a;
  font-weight: 400;
}

.search-input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.16);
}

.clear-search-btn {
  position: absolute;
  right: 32px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #70757a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.clear-search-btn:hover {
  background-color: #f1f3f4;
  color: #202124;
}

.clear-search-btn svg {
  width: 13px;
  height: 13px;
}

/* Filter Button: Positioned inside the search bar on the right */
.filter-btn {
  position: absolute;
  right: 5px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  transition: all 0.15s ease;
  padding: 0;
  z-index: 2;
  flex-shrink: 0;
}

.filter-btn:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.filter-btn:active,
.filter-btn.active {
  background-color: var(--app-primary-bg, #fff7ed);
  color: var(--app-primary, #ea580c);
}

.filter-btn svg {
  width: 15px;
  height: 15px;
}

/* Filter Dropdown Menu */
.search-filter-menu {
  position: absolute;
  top: calc(100% + 2px);
  right: 10px;
  left: 10px;
  background: #ffffff;
  border: 1px solid #dadce0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  z-index: 100;
  padding: 6px;
  animation: fadeInFilterMenu 0.15s ease-out;
}

@keyframes fadeInFilterMenu {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

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

.filter-menu-header {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.05em;
  padding: 6px 10px 4px 10px;
}

.filter-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: #334155;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.12s ease;
  font-family: var(--font-family-sans);
}

.filter-menu-item:hover {
  background-color: #f8fafc;
  color: #0f172a;
}

.filter-menu-item.active {
  background-color: var(--app-primary-bg, #fff7ed);
  color: var(--app-primary, #ea580c);
  font-weight: 600;
}

.filter-menu-item .filter-check {
  width: 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--app-primary, #ea580c);
  display: inline-block;
}

/* ==========================================================================
   3. TREE NAVIGATION COMPONENT
   ========================================================================== */
.tree-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 6px 24px 6px;
}

/* Custom subtle scrollbar */
.tree-container::-webkit-scrollbar {
  width: 6px;
}

.tree-container::-webkit-scrollbar-track {
  background: transparent;
}

.tree-container::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.12);
  border-radius: 10px;
}

.tree-container::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.22);
}

/* Section Header ("My organization", "Shared") */
.tree-section {
  margin-bottom: 16px;
}

.tree-section-header {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--app-primary, #ea580c) !important;
  padding: 12px 10px 6px 10px;
  letter-spacing: -0.01em;
}

/* Tree Nodes */
.tree-node {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 5px 0;
}

.node-row {
  display: flex;
  align-items: center;
  min-height: 42px;
  height: 42px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  outline: none;
  padding-left: 14px !important;
  padding-right: 14px !important;
  gap: 10px;
  text-decoration: none;
  color: #334155;
  box-sizing: border-box;
}

.node-row:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.node-row:hover .item-icon {
  color: var(--app-primary, #ea580c);
}

.node-row:focus-visible {
  outline: 2px solid var(--app-primary, #ea580c);
  outline-offset: -1px;
}

/* Active Highlight Pill (Matching Screenshot) */
.tree-node.selected>.node-row {
  background-color: var(--app-primary-bg, #fff7ed);
  border-radius: 8px;
}

.tree-node.selected>.node-row .node-label {
  font-weight: 600;
  color: var(--app-primary, #ea580c);
}

.tree-node.selected>.node-row .item-icon {
  color: var(--app-primary, #ea580c);
}

.tree-node.selected>.node-row .item-icon svg {
  stroke: var(--app-primary, #ea580c);
}

.tree-node.selected>.node-row .chevron-toggle {
  color: var(--app-primary, #0f172a);
}

/* Chevron Expand/Collapse Arrow */
.chevron-toggle {
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #5f6368;
  transition: transform 0.15s ease;
  margin-right: 4px;
}

.chevron-toggle:hover {
  color: #202124;
}

.chevron-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}

.chevron-spacer {
  width: 22px;
  min-width: 22px;
  height: 22px;
  margin-right: 4px;
}

.tree-node.collapsed>.node-children {
  display: none !important;
}

.tree-node.expanded>.node-children {
  display: block;
}

/* Rotate Chevron on collapse/expand:
   SVG points down. -90deg rotation points right > */
.tree-node.collapsed>.node-row .chevron-toggle svg {
  transform: rotate(-90deg);
}

.tree-node.expanded>.node-row .chevron-toggle svg {
  transform: rotate(0deg);
}

/* Node Icons: Hidden for Submenus per UX requirement */
.explorer-sidebar .item-icon,
.tree-container .item-icon,
.node-row .item-icon {
  display: none !important;
}

.item-icon {
  display: none !important;
}

/* Node Label */
.node-label {
  font-size: 14px;
  color: #202124;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  letter-spacing: -0.01em;
}

/* Indentation structure matching screenshot exactly */
/* Level 0: workspace, system, samples */
.tree-section>.tree-node>.node-row {
  margin-left: 0;
  padding-left: 8px !important;
}

/* Level 1: dataset, default, information_schema */
.tree-section>.tree-node>.node-children>.tree-node>.node-row {
  margin-left: 6px;
  padding-left: 8px !important;
}

/* Level 2: Sub-sub-menus */
.tree-section>.tree-node>.node-children>.tree-node>.node-children>.tree-node>.node-row {
  margin-left: 12px;
  padding-left: 8px !important;
}

/* Level 3: Deep nested menus if any */
.tree-section>.tree-node>.node-children>.tree-node>.node-children>.tree-node>.node-children>.tree-node>.node-row {
  margin-left: 18px;
  padding-left: 8px !important;
}

.tree-node.leaf .chevron-spacer {
  display: none !important;
}

/* No results search UI */
.no-results-msg {
  padding: 30px 16px;
  text-align: center;
  color: #80868b;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.no-results-msg svg {
  width: 28px;
  height: 28px;
  opacity: 0.6;
}

.no-results-msg p {
  font-size: 13px;
}

/* Resizer Divider Bar between Sidebar & Content */
.sidebar-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 10;
  transition: background-color 0.15s ease;
}

.sidebar-resizer:hover,
.sidebar-resizer.resizing {
  background-color: var(--app-primary, #ea580c);
}

/* ==========================================================================
   4. MAIN WORKSPACE CONTENT PANE
   ========================================================================== */
.main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #f8fafc;
  /* Crisp modern dashboard canvas */
  padding: 0 8px 24px 8px;
  /* Pinned flush at top 0 */
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
}

/* App Header: Fixed at top: 0 */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  min-height: 64px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  margin: 0 -8px 16px -8px;
  /* Flush width, with space between header and dashboard */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: background-color 0.2s ease, border-color 0.25s ease;
}

/* Table Content Card: Distinct card with set space below the fixed header */
.table-content-card {
  background-color: #ffffff;
  border-radius: 8px !important;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.04), 0 1px 3px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Left Header Group: Toggle Button + Search Pill */
.header-left-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Hamburger Menu Toggle Button (Clean Normal Admin Style) */
.header-menu-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background-color: transparent;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555e6d;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  flex-shrink: 0;
}

.header-menu-toggle-btn:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
  transform: translateY(-1px);
}

.header-menu-toggle-btn:active {
  background-color: #e2e8f0;
  transform: translateY(0);
}

.header-menu-toggle-btn svg {
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Icon State Switching (Open = Left Arrow Icon, Closed = 3-Line Menu Icon) */
.header-menu-toggle-btn .toggle-icon-open {
  display: block;
}

.header-menu-toggle-btn .toggle-icon-closed {
  display: none;
}

.header-menu-toggle-btn.menu-closed .toggle-icon-open {
  display: none;
}

.header-menu-toggle-btn.menu-closed .toggle-icon-closed {
  display: block;
}

/* Mobile Header Brand & Mobile Menu Button on Desktop */
.mobile-header-brand {
  display: none;
}

.mobile-menu-toggle-btn {
  display: none !important;
}

/* Top Global Search Bar in Header */
.header-search-bar {
  position: relative;
  display: flex;
  align-items: center;
  width: 340px;
}

.header-search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
}

.header-search-input {
  width: 100%;
  height: 38px;
  padding: 0 58px 0 36px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #ffffff;
  font-size: 12.5px;
  color: #0f172a;
  outline: none;
  transition: all 0.15s ease;
}

.header-search-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.header-search-input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.14);
}

.header-search-shortcut {
  position: absolute;
  right: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  padding: 2px 6px;
  pointer-events: none;
  font-family: inherit;
}

/* Sleek Stacked Date & Time Pill (Matching Screenshot) */
.header-datetime-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 4px 12px;
  height: 38px;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.15s ease;
  cursor: default;
}

.header-datetime-pill:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.datetime-icon-mini {
  width: 17px;
  height: 17px;
  color: var(--app-primary, #ea580c);
  flex-shrink: 0;
}

.datetime-horizontal-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  white-space: nowrap;
  line-height: 1.15;
}

.datetime-date-text {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: -0.01em;
}

.time-digits {
  font-family: var(--font-family-mono, ui-monospace, SFMono-Regular, monospace);
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

/* Header Plan Expiry Status Pill */
.header-plan-pill {
  height: 38px;
  padding: 4px 12px;
  border-radius: 9px;
  gap: 8px;
}

.header-plan-pill.plan-pill-healthy {
  background: var(--app-primary-bg, #f0fdf4);
  border: 1px solid var(--app-primary-border, #a7f3d0);
}

.header-plan-pill.plan-pill-healthy svg {
  stroke: var(--app-primary, #16a34a);
}

.header-plan-pill.plan-pill-healthy .plan-days-text {
  color: var(--app-primary, #16a34a);
}

.header-plan-pill.plan-pill-healthy .plan-exp-text {
  color: #64748b;
}

.header-plan-pill.plan-pill-critical {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.header-plan-pill.plan-pill-critical svg {
  stroke: #dc2626;
}

.header-plan-pill.plan-pill-critical .plan-days-text {
  color: #dc2626;
}

.header-plan-pill.plan-pill-critical .plan-exp-text {
  color: #64748b;
}

/* Right Actions & Profile */
.header-right-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #f6f3fc;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.header-icon-circle:hover {
  background-color: #eee8f8;
  color: #111827;
  transform: translateY(-1px);
}

.header-icon-circle svg {
  width: 19px;
  height: 19px;
}

.notification-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 6.5px;
  height: 6.5px;
  background-color: #ef4444;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
}

/* ==========================================================================
   Square Theme Toggle Button (With Colorful Sun & Moon Icons)
   ========================================================================== */
.theme-toggle-btn-square {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--app-primary-bg, #fffbeb) 0%, #ffffff 100%);
  border: 1px solid var(--app-primary-border, #fef3c7);
  box-shadow: 0 1px 3px var(--app-primary-glow, rgba(245, 158, 11, 0.12));
  cursor: pointer;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 0;
  margin: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle-btn-square:hover {
  background: linear-gradient(135deg, var(--app-primary-border, #fef3c7) 0%, var(--app-primary-bg, #fffbeb) 100%);
  border-color: var(--app-primary-light, #fde68a);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px var(--app-primary-glow, rgba(245, 158, 11, 0.22));
}

.theme-toggle-btn-square:active {
  transform: translateY(0);
}

.theme-toggle-btn-square:focus-visible {
  outline: 2px solid var(--app-primary, #ea580c);
  outline-offset: 2px;
}

body.dark-mode .theme-toggle-btn-square {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  border-color: #312e81;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

body.dark-mode .theme-toggle-btn-square:hover {
  background: linear-gradient(135deg, #312e81 0%, #1e1b4b 100%);
  border-color: #4338ca;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

/* Icon Switching & Animations */
.theme-toggle-btn-square .theme-mode-icon {
  width: 22px;
  height: 22px;
  position: absolute;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.35s cubic-bezier(0.34, 1.3, 0.64, 1);
}

/* Light Mode: Colorful Sun is active and visible */
.theme-toggle-btn-square .icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  filter: drop-shadow(0 2px 5px var(--app-primary-glow, rgba(245, 158, 11, 0.45)));
}

.theme-toggle-btn-square .icon-moon {
  opacity: 0;
  transform: scale(0.45) rotate(-45deg);
  filter: drop-shadow(0 2px 6px rgba(96, 165, 250, 0.5));
}

/* Dark Mode: Colorful Moon is active and visible */
body.dark-mode .theme-toggle-btn-square .icon-sun {
  opacity: 0;
  transform: scale(0.45) rotate(45deg);
}

body.dark-mode .theme-toggle-btn-square .icon-moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* ==========================================================================
   PWA Install / Download App Button (Clean Normal Header Button)
   ========================================================================== */
.header-pwa-install-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 10px;
  background-color: #ffffff;
  border: 1px solid var(--border-subtle, #e2e8f0);
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.header-pwa-install-btn:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.header-pwa-install-btn:active {
  transform: translateY(0);
}

.header-pwa-install-btn:focus-visible {
  outline: 2px solid var(--app-primary, #ea580c);
  outline-offset: 2px;
}

.header-pwa-install-btn .pwa-install-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  transition: transform 0.2s ease;
}

.header-pwa-install-btn:hover .pwa-install-icon {
  transform: translateY(1px);
}

body.dark-mode .header-pwa-install-btn {
  background-color: #1e293b;
  border-color: #334155;
  color: #94a3b8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

body.dark-mode .header-pwa-install-btn:hover {
  background-color: #273549;
  border-color: #475569;
  color: #f8fafc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

/* Legacy Support Alias */
.theme-switch-btn {
  /* Inherits from .theme-toggle-btn-square */
}

/* User Profile in Header */
.user-profile-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 5px;
  border-radius: 24px;
  cursor: pointer;
  background-color: #f8fafc;
  border: 1px solid var(--border-subtle, #e2e8f0);
  transition: all 0.15s ease;
  margin-left: 6px;
  user-select: none;
}

.user-profile-header:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.header-avatar-img,
.header-avatar-badge {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-gradient, linear-gradient(135deg, #fb923c, #ea580c));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  user-select: none;
}

.header-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.header-user-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #1f2937;
  letter-spacing: -0.01em;
}

.header-user-role {
  font-size: 11px;
  font-weight: 400;
  color: #9ca3af;
}

.header-user-chevron {
  width: 14px;
  height: 14px;
  color: #6b7280;
  margin-left: 2px;
  transition: transform 0.15s ease;
}

.user-profile-header:hover .header-user-chevron {
  transform: translateY(1px);
}

/* User Profile Wrapper & Dropdown Menu */
.user-profile-wrapper {
  position: relative;
}

.user-profile-wrapper.open .header-user-chevron {
  transform: rotate(180deg) !important;
}

.user-profile-wrapper.open .user-profile-header {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: #ffffff;
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(124, 58, 237, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  padding: 8px 0;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.user-profile-wrapper.open .profile-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Dropdown Header Info Card */
.profile-dropdown-menu .dropdown-header,
.dropdown-header {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 16px 12px 16px !important;
  box-sizing: border-box !important;
}

.profile-dropdown-menu .dropdown-avatar-img,
.profile-dropdown-menu .dropdown-avatar-badge,
.dropdown-avatar-img,
.dropdown-avatar-badge {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  background: var(--primary-gradient, linear-gradient(135deg, #fb923c, #ea580c)) !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
  flex-shrink: 0 !important;
  user-select: none !important;
}

.profile-dropdown-menu .dropdown-user-details,
.dropdown-user-details {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  overflow: hidden !important;
  line-height: 1.3 !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.profile-dropdown-menu .dropdown-user-name,
.dropdown-user-name {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #111827 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.profile-dropdown-menu .dropdown-user-email,
.dropdown-user-email {
  font-size: 11.5px !important;
  color: #6b7280 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin-bottom: 4px !important;
}

.profile-dropdown-menu .dropdown-badge-row,
.dropdown-badge-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.profile-dropdown-menu .dropdown-role-badge,
.dropdown-role-badge {
  display: inline-flex !important;
  align-items: center !important;
  padding: 1px 7px !important;
  background-color: rgba(234, 88, 12, 0.12) !important;
  color: #ea580c !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  border-radius: 4px !important;
  letter-spacing: 0.02em !important;
}

.profile-dropdown-menu .dropdown-status-dot,
.dropdown-status-dot {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background-color: #10b981 !important;
  display: inline-block !important;
}

.profile-dropdown-menu .dropdown-status-text,
.dropdown-status-text {
  font-size: 11px !important;
  color: #10b981 !important;
  font-weight: 500 !important;
}

.profile-dropdown-menu .dropdown-divider,
.dropdown-divider {
  height: 1px !important;
  min-height: 1px !important;
  background-color: #f1f3f7 !important;
  border: none !important;
  margin: 6px 0 !important;
  padding: 0 !important;
  width: 100% !important;
  display: block !important;
}

.profile-dropdown-menu .dropdown-section,
.dropdown-section {
  padding: 4px 6px !important;
  box-sizing: border-box !important;
}

.profile-dropdown-menu .dropdown-section-title,
.dropdown-section-title {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  color: #9ca3af !important;
  letter-spacing: 0.05em !important;
  padding: 6px 12px 4px 12px !important;
  margin: 0 !important;
}

.profile-dropdown-menu .dropdown-item,
.dropdown-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #374151 !important;
  text-decoration: none !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  text-align: left !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  transition: all 0.12s ease !important;
  font-family: var(--font-family-sans) !important;
  line-height: 1.4 !important;
}

.profile-dropdown-menu .dropdown-item:hover,
.profile-dropdown-menu .dropdown-item:focus,
.dropdown-item:hover,
.dropdown-item:focus {
  background-color: #fff7ed !important;
  color: #ea580c !important;
  outline: none !important;
}

.profile-dropdown-menu .dropdown-item:hover .dropdown-item-icon,
.profile-dropdown-menu .dropdown-item:focus .dropdown-item-icon,
.dropdown-item:hover .dropdown-item-icon {
  color: #ea580c !important;
}

.profile-dropdown-menu .dropdown-item-icon,
.dropdown-item-icon {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  color: #6b7280 !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: color 0.12s ease !important;
  vertical-align: middle !important;
}

.profile-dropdown-menu .dropdown-logout-btn,
.dropdown-logout-btn {
  color: #ef4444 !important;
}

.profile-dropdown-menu .dropdown-logout-btn .dropdown-item-icon,
.dropdown-logout-btn .dropdown-item-icon {
  color: #ef4444 !important;
}

.profile-dropdown-menu .dropdown-logout-btn:hover,
.profile-dropdown-menu .dropdown-logout-btn:focus,
.dropdown-logout-btn:hover,
.dropdown-logout-btn:focus {
  background-color: #fef2f2 !important;
  color: #dc2626 !important;
}

.profile-dropdown-menu .dropdown-logout-btn:hover .dropdown-item-icon,
.profile-dropdown-menu .dropdown-logout-btn:focus .dropdown-item-icon,
.dropdown-logout-btn:hover .dropdown-item-icon {
  color: #dc2626 !important;
}

/* ==========================================================================
   5. SALES & ANALYTICS DASHBOARD (MATCHING USER SCREENSHOT)
   ========================================================================== */
.sales-dashboard-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  animation: fadeInDashboard 0.25s ease-out;
  transform: none !important;
}

@keyframes fadeInDashboard {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* 1. Dashboard Greeting Bar */
.dashboard-greeting-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
  flex-wrap: wrap;
  gap: 12px;
}

.greeting-text-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.greeting-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sparkle-icon {
  font-size: 18px;
}

.greeting-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  font-weight: 400;
}

.greeting-actions-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-action-btn {
  height: 38px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.15s ease;
}

.dashboard-action-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
  transform: translateY(-0.5px);
}

.dashboard-action-btn svg {
  width: 15px;
  height: 15px;
  color: #64748b;
}

.dashboard-action-btn .date-calendar-icon {
  width: 15px;
  height: 15px;
  color: var(--app-primary, #ea580c);
}

.dashboard-action-btn .chevron-icon {
  width: 13px;
  height: 13px;
  color: #94a3b8;
}

/* Solid Orange Export Buttons (Matching Orange Theme) */
.export-main-btn,
.inventory-export-btn {
  height: 38px;
  background: var(--primary-gradient, linear-gradient(135deg, var(--app-primary-light, #fb923c) 0%, var(--app-primary, #ea580c) 100%));
  color: #ffffff;
  border: none;
  border-radius: 9px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--app-primary-glow, rgba(234, 88, 12, 0.28));
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.export-main-btn svg,
.inventory-export-btn svg {
  width: 15px;
  height: 15px;
  stroke: #ffffff;
}

.export-main-btn:hover,
.inventory-export-btn:hover {
  filter: brightness(0.92);
  color: #ffffff;
  transform: translateY(-0.5px);
  box-shadow: 0 4px 12px var(--app-primary-glow, rgba(234, 88, 12, 0.4));
}

/* 2. Top KPI Cards Grid (4 Cards with Smooth Wave Curves) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.kpi-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.kpi-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.kpi-card-body {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 0;
}

.kpi-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
}

.kpi-icon-box svg {
  width: 22px;
  height: 22px;
}

.kpi-icon-green {
  background: linear-gradient(135deg, #34d399, #059669);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.32);
}

.kpi-icon-blue {
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.32);
}

.kpi-icon-purple {
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.32);
}

.kpi-icon-orange {
  background: var(--primary-gradient, linear-gradient(135deg, var(--app-primary-light, #fb923c), var(--app-primary, #ea580c)));
  box-shadow: 0 4px 10px var(--app-primary-glow, rgba(234, 88, 12, 0.32));
}

.kpi-icon-coral {
  background: linear-gradient(135deg, #fb7185, #e11d48);
  box-shadow: 0 4px 10px rgba(225, 29, 72, 0.32);
}

.kpi-stat-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.kpi-title {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 3px;
}

.kpi-value-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.kpi-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

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

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

.kpi-badge-purple {
  background: #f5f3ff;
  color: #7c3aed;
}

.kpi-badge-orange {
  background: var(--app-primary-bg, #fff7ed);
  color: var(--app-primary, #ea580c);
}

.kpi-badge-coral {
  background: #fff1f2;
  color: #e11d48;
}

.kpi-subtext {
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 400;
}

.kpi-sparkline-wrap {
  width: calc(100% + 40px);
  margin-left: -20px;
  margin-right: -20px;
  height: 38px;
  overflow: hidden;
  line-height: 0;
}

.kpi-sparkline {
  width: 100%;
  height: 100%;
  display: block;
}

/* 3. Middle Analytics Widgets Grid (3 Cards) */
.analytics-widgets-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1.35fr;
  gap: 16px;
}

.analytics-card {
  background: #ffffff;
  border-radius: 8px !important;
  border: 1px solid #e2e8f0;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.analytics-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.analytics-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.widget-header-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-header-icon {
  width: 18px;
  height: 18px;
}

.widget-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}

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

.pill-select-btn {
  height: 30px;
  padding: 0 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-select-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.pill-select-btn .chevron-icon {
  width: 12px;
  height: 12px;
  color: #94a3b8;
}

.widget-menu-btn {
  background: transparent;
  border: none;
  font-size: 14px;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: all 0.15s ease;
}

.widget-menu-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

/* Widget 1: Sales Performance Bar Chart */
.bar-chart-container {
  display: flex;
  gap: 10px;
  height: 175px;
  align-items: flex-end;
  padding-bottom: 4px;
}

.chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 135px;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  margin-bottom: 22px;
  min-width: 32px;
}

.chart-bars-wrap {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.chart-grid-lines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 135px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.grid-line {
  width: 100%;
  height: 1px;
  background: #f1f5f9;
}

.bars-flex {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 135px;
  z-index: 1;
  padding: 0 4px;
}

.bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  width: 26px;
  cursor: pointer;
  position: relative;
}

.bar-fill {
  width: 22px;
  background: var(--app-primary-light, #fb923c);
  opacity: 0.45;
  border-radius: 4px 4px 0 0;
  transition: all 0.25s ease;
}

.bar-col:hover .bar-fill {
  background: var(--app-primary-light, #fb923c);
  opacity: 0.8;
}

/* Single Color Set: All inactive bars follow dynamic primary light */
.bar-fill.bar-blue,
.bar-fill.bar-indigo,
.bar-fill.bar-purple,
.bar-fill.bar-rose,
.bar-fill.bar-amber,
.bar-fill.bar-teal,
.bar-fill.bar-sky,
.bar-fill.mint-fill {
  background: var(--app-primary-light, #fb923c);
  opacity: 0.45;
}

.bar-col:hover .bar-fill.bar-blue,
.bar-col:hover .bar-fill.bar-indigo,
.bar-col:hover .bar-fill.bar-purple,
.bar-col:hover .bar-fill.bar-rose,
.bar-col:hover .bar-fill.bar-amber,
.bar-col:hover .bar-fill.bar-teal,
.bar-col:hover .bar-fill.bar-sky,
.bar-col:hover .bar-fill.mint-fill {
  background: var(--app-primary-light, #fb923c);
  opacity: 0.8;
}

.bar-col.active-green-bar .bar-fill,
.bar-col.active-orange-bar .bar-fill,
.bar-fill.green-fill,
.bar-fill.orange-fill,
.bar-fill.bar-highlight {
  background: linear-gradient(180deg, var(--app-primary-light, #fb923c) 0%, var(--app-primary, #ea580c) 100%) !important;
  box-shadow: 0 4px 12px var(--app-primary-glow, rgba(234, 88, 12, 0.45));
  opacity: 1 !important;
}

.floating-bar-badge {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--app-primary, #ea580c);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 2;
  box-shadow: 0 2px 6px var(--app-primary-glow, rgba(154, 52, 18, 0.35));
}

.floating-bar-badge .badge-arrow {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--app-primary, #ea580c);
}

.bar-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 8px;
}

.bar-label.active-label {
  color: var(--app-primary, #ea580c);
  font-weight: 700;
}

/* Widget 2: Sales Analytics (Speedometer Gauge) */
.gauge-chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.gauge-svg-wrap {
  position: relative;
  width: 100%;
  max-width: 185px;
  margin: 0 auto;
  text-align: center;
}

.gauge-svg {
  width: 100%;
  height: auto;
  display: block;
}

.gauge-center-content {
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  text-align: center;
}

.gauge-percentage {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.gauge-subtitle {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 2px;
}

.gauge-breakdown {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding-top: 12px;
  border-top: 1px solid #f8fafc;
  margin-top: 8px;
}

.breakdown-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.breakdown-label {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 500;
}

.breakdown-val-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.breakdown-val {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

/* Widget 3: Product Stock (Smooth Emerald Green Progress Bars) */
.stock-summary-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.stock-main-pct {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stock-main-desc {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 400;
}

.stock-categories-grid {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 13px;
}

.stock-cat-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cat-name {
  color: #334155;
  font-weight: 500;
  font-size: 12.5px;
  width: 82px;
  min-width: 82px;
  flex-shrink: 0;
}

.smooth-progress-track {
  flex: 1;
  height: 9px;
  background: #f1f5f9;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}

.smooth-progress-fill {
  height: 100%;
  background: var(--primary-gradient, linear-gradient(90deg, var(--app-primary-light, #fb923c), var(--app-primary, #ea580c)));
  box-shadow: 0 2px 6px var(--app-primary-glow, rgba(234, 88, 12, 0.28));
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Single Color Set for Product Stock Bars (Dynamic Theme) */
.smooth-progress-fill.bar-purple,
.smooth-progress-fill.bar-blue,
.smooth-progress-fill.bar-rose,
.smooth-progress-fill.bar-amber,
.smooth-progress-fill.bar-emerald,
.smooth-progress-fill.bar-teal {
  background: var(--primary-gradient, linear-gradient(90deg, var(--app-primary-light, #fb923c), var(--app-primary, #ea580c)));
  box-shadow: 0 2px 6px var(--app-primary-glow, rgba(234, 88, 12, 0.28));
}

.cat-pct {
  color: #0f172a;
  font-weight: 600;
  font-size: 12px;
  width: 34px;
  text-align: right;
  flex-shrink: 0;
}

/* 4. Product Inventory Table Card */
.inventory-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.inventory-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.inventory-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

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

.inventory-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
}

.inventory-icon-box svg {
  width: 17px;
  height: 17px;
}

.inventory-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}

.inventory-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.inventory-search-wrap {
  position: relative;
  width: 180px;
}

.inventory-search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: #94a3b8;
  pointer-events: none;
}

.inventory-search-wrap input {
  width: 100%;
  height: 34px;
  padding: 0 10px 0 32px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12.5px;
  outline: none;
  background: #ffffff;
  color: #0f172a;
  transition: border-color 0.15s ease;
}

.inventory-search-wrap input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.15);
}

.inventory-select-btn {
  height: 34px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12.5px;
  background: #ffffff;
  color: #334155;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.inventory-select-btn:hover {
  border-color: #cbd5e1;
}

.inventory-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.inventory-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.inventory-table thead th {
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}

.th-num,
.td-num {
  width: 36px;
  text-align: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.th-sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.12s ease;
}

.th-sortable:hover {
  color: #0f172a;
}

.sort-glyph {
  font-size: 11px;
  color: #94a3b8;
  margin-left: 3px;
}

.inventory-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #f8fafc;
  vertical-align: middle;
}

.inventory-table tbody tr:hover td {
  background-color: #fbfcfe;
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-thumb {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #475569;
}

.product-thumb svg {
  width: 20px;
  height: 20px;
}

.thumb-jacket {
  background: #fdf2f8;
  color: #db2777;
  border: 1px solid #fce7f3;
}

.thumb-shoes {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #dbeafe;
}

.thumb-bottle {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fef3c7;
}

.thumb-bag {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ede9fe;
}

.thumb-gadget {
  background: #ecfeff;
  color: #0891b2;
  border: 1px solid #cffafe;
}

.thumb-food {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #d1fae5;
}

.product-info-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.product-subcat {
  font-size: 12px;
  color: #94a3b8;
}

/* Category & Status Badges (Mixed Harmonious Colors) */
.cat-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.cat-pill.cat-fashion {
  background: #fdf2f8;
  color: #db2777;
  border: 1px solid #fbcfe8;
}

.cat-pill.cat-footwear {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.cat-pill.cat-accessories {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.cat-pill.cat-travel {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

.cat-pill.cat-gadget {
  background: #ecfeff;
  color: #0891b2;
  border: 1px solid #a5f3fc;
}

.cat-pill.cat-food {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.cat-pill.cat-decoration {
  background: #fdf4ff;
  color: #c026d3;
  border: 1px solid #f0abfc;
}

.cat-pill.cat-green {
  background: #ecfdf5;
  color: #059669;
}

.cat-pill.cat-amber {
  background: #fef3c7;
  color: #d97706;
}

.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill.status-instock {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.status-pill.status-lowstock {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.status-pill.status-outstock {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
}

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

.metric-main-num {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

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

.order-pending-text {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.order-succes-text {
  font-size: 11.5px;
  color: #94a3b8;
}

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

.conversion-main-pct {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.stock-item-count {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.price-text {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  font-family: var(--font-family-mono);
}

.action-cell {
  text-align: right;
  width: 48px;
}

.row-edit-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.row-edit-btn svg {
  width: 14px;
  height: 14px;
}

.row-edit-btn:hover {
  background: var(--app-primary-bg, #fff7ed);
  color: var(--app-primary, #ea580c);
  border-color: var(--app-primary-glow, #fed7aa);
}

.entity-icon-badge svg {
  width: 22px;
  height: 22px;
}

.entity-title-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.entity-title {
  font-size: 22px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: -0.02em;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
}

.badge-delta {
  background-color: #e8f0fe;
  color: #1967d2;
  border: 1px solid #d2e3fc;
}

.badge-managed {
  background-color: #e6f4ea;
  color: #137333;
  border: 1px solid #ceead6;
}

.entity-description {
  font-size: 13.5px;
  color: #5f6368;
  max-width: 720px;
  line-height: 1.45;
}

/* Stats Ribbon Cards */
.stats-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  max-width: 820px;
}

.stat-card {
  background: #f8f9fa;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 11.5px;
  color: #5f6368;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.stat-value {
  font-size: 15px;
  font-weight: 600;
  color: #202124;
}

/* Tab Navigation */
.tab-navigation {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 28px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
}

.tab-item {
  height: 44px;
  border: none;
  background: transparent;
  font-family: var(--font-family-sans);
  font-size: 13.5px;
  font-weight: 500;
  color: #5f6368;
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease;
}

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

.tab-item.active {
  color: #1a73e8;
  font-weight: 600;
}

.tab-item.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2.5px;
  background-color: #1a73e8;
  border-radius: 3px 3px 0 0;
}

/* Tab Content Panes */
.tab-pane {
  display: none;
  padding: 24px 28px;
}

.tab-pane.active {
  display: block;
}

/* Table Toolbar */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.table-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 260px;
}

.table-search svg {
  position: absolute;
  left: 10px;
  width: 15px;
  height: 15px;
  color: #80868b;
}

.table-search input {
  width: 100%;
  height: 32px;
  padding: 0 12px 0 32px;
  border-radius: 8px;
  border: 1px solid #dadce0;
  font-size: 13px;
  font-family: var(--font-family-sans);
  outline: none;
}

.table-search input:focus {
  border-color: #1a73e8;
}

.row-counter {
  font-size: 12.5px;
  color: #5f6368;
}

/* Modern Data Table */
.data-table-container {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

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

.modern-data-table thead th {
  background-color: #f8f9fa;
  padding: 10px 14px;
  font-weight: 600;
  color: #3c4043;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.modern-data-table thead th .col-type {
  font-size: 10.5px;
  font-weight: 400;
  color: #80868b;
  margin-left: 4px;
  font-family: var(--font-family-mono);
}

.modern-data-table tbody tr {
  border-bottom: 1px solid #f1f3f4;
  transition: background-color 0.1s ease;
}

.modern-data-table tbody tr:hover {
  background-color: #f8fafd;
}

.modern-data-table tbody td {
  padding: 10px 14px;
  color: #202124;
  white-space: nowrap;
}

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

.font-medium {
  font-weight: 500;
}

.text-muted {
  color: #5f6368;
}

/* Status Badges */
.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 500;
}

.status-success {
  background-color: #e6f4ea;
  color: #137333;
}

.status-pending {
  background-color: #fef7e0;
  color: #b06000;
}

.status-refund {
  background-color: #fce8e6;
  color: #c5221f;
}

/* Lineage Graph Mockup */
.lineage-graph-container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 30px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow-x: auto;
}

.lineage-node {
  background: #f8f9fa;
  border: 1px solid #dadce0;
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 170px;
}

.lineage-node.current-table {
  background: #e8f0fe;
  border-color: #1a73e8;
}

.lineage-node .badge {
  align-self: flex-start;
  margin-bottom: 4px;
}

.lineage-arrow {
  color: #80868b;
  font-size: 18px;
}

/* Details Grid */
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 12px;
  color: #5f6368;
}

.detail-item code {
  font-family: var(--font-family-mono);
  font-size: 12px;
  background: #f1f3f4;
  padding: 4px 6px;
  border-radius: 6px;
  word-break: break-all;
}

/* Sortable Headers */
.sortable-th {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.1s ease;
}

.sortable-th:hover {
  background-color: #f1f3f4;
  color: #1a73e8;
}

.sort-icon {
  font-size: 11px;
  color: #80868b;
  margin-left: 4px;
}

/* Primary Key Badge */
.badge-pk {
  background-color: #fef7e0;
  color: #b06000;
  border: 1px solid #fce8b2;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 5px;
}

/* Section Subheading */
.section-subheading {
  font-size: 15px;
  font-weight: 600;
  color: #202124;
  margin: 20px 0 12px 0;
}

/* ==========================================================================
   SQL EDITOR STYLES
   ========================================================================== */
.sql-editor-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sql-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

.sql-preset-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #5f6368;
}

.sql-preset-select {
  height: 32px;
  border-radius: 6px;
  border: 1px solid #dadce0;
  padding: 0 10px;
  font-size: 12.5px;
  font-family: var(--font-family-mono);
  color: #202124;
  background: #ffffff;
  max-width: 480px;
  outline: none;
}

.sql-preset-select:focus {
  border-color: #1a73e8;
}

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

.sql-run-btn {
  background-color: #1a73e8;
  height: 34px;
}

.sql-run-btn kbd {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10.5px;
  font-family: var(--font-family-mono);
  margin-left: 4px;
}

.sql-code-area {
  display: flex;
  background: #1e1e1e;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sql-line-numbers {
  padding: 14px 10px;
  background: #181818;
  color: #6e7681;
  font-family: var(--font-family-mono);
  font-size: 13px;
  line-height: 1.6;
  text-align: right;
  user-select: none;
  min-width: 38px;
  border-right: 1px solid #2d333b;
}

.sql-textarea {
  flex: 1;
  background: transparent;
  color: #e6edf3;
  font-family: var(--font-family-mono);
  font-size: 13.5px;
  line-height: 1.6;
  padding: 14px 16px;
  border: none;
  outline: none;
  resize: vertical;
  min-height: 100px;
  white-space: pre;
}

.sql-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #5f6368;
  padding: 4px 6px;
}

.sql-status-bar .status-indicator {
  color: #34a853;
  font-size: 12px;
}

.sql-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.sql-results-header h4 {
  font-size: 15px;
  font-weight: 600;
  color: #202124;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-badge {
  font-size: 11.5px;
  font-weight: 500;
  background: #e8f0fe;
  color: #1a73e8;
  padding: 2px 8px;
  border-radius: 12px;
}

.btn-sm {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

/* ==========================================================================
   DATA QUALITY & HEALTH STYLES
   ========================================================================== */
.quality-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.quality-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.health-score-card {
  border-left: 4px solid #34a853;
}

.quality-metric-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #5f6368;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.score-display {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.score-number {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
}

.score-number.font-normal {
  font-size: 22px;
  font-weight: 600;
}

.quality-subtext {
  font-size: 12px;
  color: #5f6368;
  line-height: 1.4;
}

/* Toast Message */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #202124;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Mobile-only elements hidden on desktop */
.mobile-drawer-header {
  display: none;
}

.mobile-scroll-hint {
  display: none;
}

/* ==========================================================================
   6. RESPONSIVE DESIGN & MOBILE OPTIMIZATIONS
   ========================================================================== */

/* Mobile & Tablet Sidebar Backdrop Overlay (<= 1024px) */
.sidebar-backdrop {
  display: none !important;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

@media (max-width: 1024px) {

  .sidebar-backdrop.active,
  body.sidebar-mobile-open .sidebar-backdrop {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

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

/* Tablet & Smaller Desktops (<= 1200px) */
@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .analytics-widgets-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .inventory-card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .inventory-header-right {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Tablets (<= 992px) */
@media (max-width: 992px) {
  .main-content {
    padding: 0 16px 20px 16px;
  }

  .app-header {
    margin: 0 -16px 18px -16px;
    padding: 0 20px;
  }

  .stock-categories-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile & Tablet Screens (<= 1024px) */
@media (max-width: 1024px) {

  /* 1. Primary Left Icon Rail on Mobile/Tablet: Slides in as the left column of the mobile/tablet navigation */
  .primary-rail {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 58px !important;
    min-width: 58px !important;
    height: 100% !important;
    z-index: 230;
    background-color: #ffffff;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex !important;
    flex-direction: column;
    align-items: center;
    padding: 0 0 16px 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
    visibility: hidden;
  }

  .primary-rail.mobile-open,
  body.sidebar-mobile-open .primary-rail {
    transform: translateX(0) !important;
    pointer-events: auto !important;
    visibility: visible !important;
  }

  .primary-rail .rail-logo-container {
    height: 64px;
    min-height: 64px;
    margin-bottom: 8px;
  }

  .primary-rail .rail-logo-box {
    width: 38px;
    height: 38px;
  }

  .primary-rail .rail-btn {
    width: 52px;
    min-height: 48px;
    height: auto;
    gap: 4px;
    padding: 5px 4px 4px;
  }

  /* 2. Secondary Explorer Sidebar on Mobile: Sits directly adjacent to the Primary Rail */
  .explorer-sidebar {
    position: fixed;
    top: 0;
    left: 58px;
    /* Offset by primary rail width */
    bottom: 0;
    width: 250px !important;
    max-width: calc(100vw - 70px);
    z-index: 220;
    background-color: #ffffff;
    box-shadow: 6px 0 28px rgba(15, 23, 42, 0.22);
    transform: translateX(calc(-100% - 58px)) !important;
    transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
    visibility: hidden;
    border-right: 1px solid var(--border-subtle);
  }

  .explorer-sidebar.mobile-open,
  body.sidebar-mobile-open .explorer-sidebar {
    transform: translateX(0) !important;
    pointer-events: auto !important;
    visibility: visible !important;
  }

  /* Hide redundant desktop brand header on mobile to prevent duplicate titles */
  .sidebar-brand-header {
    display: none !important;
  }

  /* Mobile Drawer Brand Header with Close Button: Clean 64px height aligned with rail logo */
  .mobile-drawer-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    min-height: 64px;
    padding: 0 14px;
    background: #ffffff;
    border-bottom: 1px solid #f1f3f4;
    flex-shrink: 0;
    box-sizing: border-box;
  }

  .mobile-drawer-header .sidebar-brand-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .mobile-drawer-header .sidebar-brand-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    margin: 0;
    letter-spacing: -0.01em;
  }

  .mobile-drawer-header .sidebar-brand-subtitle {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 500;
    line-height: 1.2;
  }

  .mobile-drawer-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
    flex-shrink: 0;
  }

  .mobile-drawer-close-btn svg {
    width: 18px !important;
    height: 18px !important;
  }

  .mobile-drawer-close-btn:hover,
  .mobile-drawer-close-btn:active {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
  }

  .sidebar-resizer {
    display: none !important;
  }

  /* Main Workspace occupies full screen with generous bottom empty space on mobile */
  .main-content {
    padding: 0 12px calc(80px + env(safe-area-inset-bottom)) 12px;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .app-header {
    height: auto;
    min-height: 68px;
    padding: 14px 14px;
    margin: 0 -12px 14px -12px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle, #e2e8f0) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
  }

  /* Header Controls on Mobile */
  .header-left-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .desktop-menu-toggle-btn {
    display: none !important;
  }

  /* Mobile Brand Logo on Header Left Side */
  .mobile-header-brand {
    display: flex !important;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    color: inherit;
    min-width: 0;
    flex-shrink: 0;
  }

  .mobile-brand-logo-box {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid var(--border-subtle, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .mobile-brand-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  .mobile-brand-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.01em;
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.dark-mode .mobile-brand-logo-box,
  html.dark .mobile-brand-logo-box,
  .dark-mode .mobile-brand-logo-box {
    background: #1e293b !important;
    border-color: #334155 !important;
  }

  body.dark-mode .mobile-brand-title {
    color: #f8fafc;
  }

  .header-menu-toggle-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  /* Mobile Menu Toggle Button (Visible on Mobile Right Side) */
  .mobile-menu-toggle-btn {
    display: flex !important;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 9px;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 1px solid var(--border-subtle, #e2e8f0);
    color: #555e6d;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
  }

  body.dark-mode .mobile-menu-toggle-btn {
    border-color: #334155;
    color: #cbd5e1;
  }

  .header-datetime-pill {
    display: flex;
  }

  @media (max-width: 640px) {
    .header-datetime-pill {
      display: none !important;
    }
  }

  .datetime-date-text {
    font-size: 10px;
    letter-spacing: -0.01em;
  }

  .time-digits {
    font-size: 11px;
  }

  .time-period {
    font-size: 8.5px;
    padding: 0.5px 3.5px;
  }

  .header-right-actions {
    gap: 6px;
  }

  /* Hide messages button on mobile/tablet to save header space */
  .header-icon-circle[title="Messages"] {
    display: none;
  }

  .header-icon-circle {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }

  /* User profile in header: compact avatar visible on tablet, hide text */
  .user-profile-wrapper {
    display: flex !important;
  }

  @media (max-width: 480px) {
    .user-profile-wrapper {
      display: none !important;
    }
  }

  /* Compact profile header */
  .user-profile-header {
    padding: 2px 6px 2px 2px;
    gap: 6px;
  }

  .header-user-info {
    display: none !important;
    /* Hide name/role text, avatar + chevron remain crisp */
  }

  .header-avatar-img,
  .header-avatar-badge {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    font-size: 13px !important;
  }

  .profile-dropdown-menu {
    right: 0;
    width: 270px;
    max-width: calc(100vw - 24px);
  }

  /* Greeting Bar on Mobile */
  .dashboard-greeting-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .greeting-title {
    font-size: 19px;
  }

  .greeting-subtitle {
    font-size: 12px;
  }

  .greeting-actions-block {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 8px;
  }

  .date-range-btn {
    flex: 1;
    justify-content: space-between;
    font-size: 12px;
    padding: 0 10px;
    height: 38px;
  }

  .export-main-btn {
    flex-shrink: 0;
    font-size: 12px;
    padding: 0 14px;
    height: 38px;
  }

  /* KPI Grid on Mobile: 2 Columns */
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .kpi-card {
    padding: 13px;
    border-radius: 12px;
  }

  .kpi-card-top {
    gap: 10px;
    margin-bottom: 8px;
  }

  .kpi-icon-box {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 9px;
  }

  .kpi-icon-box svg {
    width: 18px;
    height: 18px;
  }

  .kpi-value {
    font-size: 19px;
  }

  .kpi-subtext {
    font-size: 10.5px;
  }

  .kpi-title {
    font-size: 12px;
  }

  /* Analytics Widgets */
  .analytics-card {
    padding: 15px;
    border-radius: 12px;
  }

  .bar-chart-container {
    height: 160px;
  }

  .chart-y-axis {
    height: 120px;
    font-size: 10px;
    min-width: 28px;
    margin-bottom: 20px;
  }

  .chart-grid-lines {
    height: 120px;
  }

  .bars-flex {
    height: 120px;
    padding: 0 2px;
  }

  .bar-col {
    width: 20px;
  }

  .bar-fill {
    width: 18px;
  }

  .bar-label {
    font-size: 10px;
    margin-top: 6px;
  }

  /* Mobile Horizontal Scroll Indicator */
  .mobile-scroll-hint {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 500;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 7px 11px;
    margin-bottom: 12px;
    user-select: none;
  }

  .mobile-scroll-hint svg {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px;
    stroke: #2563eb;
    flex-shrink: 0;
    animation: swipeHintPulse 1.8s infinite ease-in-out;
  }

  @keyframes swipeHintPulse {

    0%,
    100% {
      transform: translateX(0);
    }

    50% {
      transform: translateX(4px);
    }
  }

  /* Inventory Table Card on Mobile */
  .inventory-card {
    padding: 14px;
    border-radius: 12px;
  }

  .inventory-header-right {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .inventory-search-wrap {
    width: 100%;
  }

  .inventory-select-btn {
    width: 100%;
    height: 38px;
  }

  .inventory-export-btn {
    width: 100%;
    height: 38px;
    justify-content: center;
  }

  .inventory-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    border-radius: 8px;
    border: 1px solid #f1f3f4;
  }

  /* Mobile Inventory Table: Clean normal horizontal scroll */
  .inventory-table {
    min-width: 800px;
    border-collapse: collapse;
    width: 100%;
  }

  .inventory-table th:first-child,
  .inventory-table td:first-child {
    position: static !important;
    box-shadow: none !important;
    min-width: 36px;
    max-width: none;
    width: 36px;
    text-align: center;
  }
}

/* Small Mobile Phones (<= 480px) */
@media (max-width: 480px) {
  .main-content {
    padding: 0 10px calc(85px + env(safe-area-inset-bottom)) 10px;
  }

  .app-header {
    margin: 0 -10px 12px -10px;
    padding: 12px 12px;
    height: auto;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
  }

  .header-left-group {
    gap: 6px;
  }

  .header-datetime-pill {
    display: none !important;
  }

  .datetime-date-text {
    font-size: 9.5px;
  }

  .time-digits {
    font-size: 10.5px;
  }

  .time-period {
    font-size: 8px;
    padding: 0.5px 3px;
  }

  .greeting-title {
    font-size: 18px;
  }

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

  .kpi-card {
    padding: 11px;
  }

  .kpi-value {
    font-size: 17.5px;
  }

  .stock-categories-grid {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  .gauge-svg-wrap {
    max-width: 160px;
  }

  .toast,
  #toastMessage {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

@media (max-width: 768px) {

  .toast,
  #toastMessage {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

/* Extra Narrow Phones (<= 390px) */
@media (max-width: 390px) {

  .header-datetime-pill .datetime-date-text,
  .header-datetime-pill .date-row {
    display: none !important;
  }

  .header-datetime-pill {
    padding: 2px 6px !important;
  }

  .header-left-group {
    gap: 6px !important;
  }

  .header-right-actions {
    gap: 4px !important;
  }
}

@media (max-width: 360px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Mobile Full Width Form Buttons (All Blades)
   ========================================================================== */
@media (max-width: 640px) {

  /* Action button containers: stack vertically full width */
  .form-actions-bar,
  .profile-form-actions,
  .modal-actions-bar,
  form .flex.items-center.justify-end,
  form .flex.justify-end,
  form .d-flex.justify-content-end,
  form .d-flex.align-items-center.justify-content-end,
  .profile-content-card form div[class*="justify-end"] {
    display: flex !important;
    flex-direction: column-reverse !important;
    width: 100% !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  /* Full width button elements inside form actions */
  .form-actions-bar>*,
  .profile-form-actions>*,
  .modal-actions-bar>*,
  form .flex.items-center.justify-end>button,
  form .flex.items-center.justify-end>a,
  form .flex.justify-end>button,
  form .flex.justify-end>a,
  form .d-flex.justify-content-end>button,
  form .d-flex.justify-content-end>a,
  .profile-content-card form button[type="submit"],
  .profile-content-card form a.btn,
  .profile-content-card form a[class*="rounded-lg"],
  .theme-primary-btn,
  button.theme-primary-btn {
    width: 100% !important;
    min-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }
}

/* ==========================================================================
   7. DARK MODE THEME PALETTE & COMPONENT STYLES
   ========================================================================== */
html.dark,
html.dark-mode,
body.dark-mode,
.dark-mode {
  color-scheme: dark;
  --bs-body-bg: #0b0f17;
  --bs-body-color: #f8fafc;
  --bs-heading-color: #f8fafc;
  --bs-secondary-bg: #141e30;
  --bs-secondary-color: #cbd5e1;
  --bs-tertiary-bg: #1e293b;
  --bs-border-color: #334155;
  --bs-card-bg: #0f172a;
  --bs-card-cap-bg: #1e293b;
  --bs-card-color: #f8fafc;
  --bs-card-border-color: #1e293b;
  --bs-table-bg: #0f172a;
  --bs-table-color: #e2e8f0;
  --bs-table-striped-bg: #141e30;
  --bs-table-striped-color: #e2e8f0;
  --bs-table-hover-bg: #1e293b;
  --bs-table-hover-color: #f8fafc;
  --bs-table-border-color: #334155;
  --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

body.dark-mode {
  --bg-app: #0b0f17;
  --bg-sidebar: #0f172a;
  --bg-main: #0b0f17;
  --border-subtle: #1e293b;
  --border-strong: #334155;
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #94a3b8;
  --item-hover: #1e293b;
  --item-active: #334155;
  --item-selected-bg: rgba(234, 88, 12, 0.18);
  --item-selected-text: #fb923c;
  --app-primary-bg: rgba(234, 88, 12, 0.16);
  --app-primary-border: rgba(234, 88, 12, 0.35);
  --color-primary-orange-bg: rgba(234, 88, 12, 0.16);
  --color-primary-orange-border: rgba(234, 88, 12, 0.35);
  --color-primary-green-bg: rgba(234, 88, 12, 0.16);
  --color-primary-green-border: rgba(234, 88, 12, 0.35);
  background-color: #0b0f17;
  color: #f8fafc;
}

/* Application Layout Canvas */
body.dark-mode .app-layout {
  background-color: #0b0f17;
}

body.dark-mode .main-content {
  background-color: #0b0f17;
  color: #f8fafc;
}

body.dark-mode .sales-dashboard-wrapper {
  background-color: transparent;
}

/* Primary Rail in Dark Mode */
body.dark-mode .primary-rail {
  background-color: #0f172a;
  border-right-color: #1e293b;
}

body.dark-mode .rail-btn {
  color: #94a3b8;
}

body.dark-mode .rail-btn:hover {
  background-color: #1e293b;
  color: #f8fafc;
}

body.dark-mode .rail-btn:hover .rail-label {
  color: #f8fafc;
}

body.dark-mode .rail-btn.active {
  background-color: rgba(234, 88, 12, 0.18);
  color: #ea580c;
}

body.dark-mode .rail-btn.active .rail-label {
  color: #fb923c;
}

/* Explorer Sidebar in Dark Mode */
body.dark-mode .explorer-sidebar {
  background-color: #0f172a;
  border-right-color: #1e293b;
}

body.dark-mode .sidebar-brand-title {
  color: #f8fafc;
}

body.dark-mode .sidebar-brand-subtitle {
  color: #94a3b8;
}

body.dark-mode .search-input {
  background-color: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

body.dark-mode .search-input::placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  opacity: 1 !important;
}

body.dark-mode .search-icon {
  color: #94a3b8;
}

body.dark-mode .clear-search-btn {
  color: #94a3b8;
}

body.dark-mode .clear-search-btn:hover {
  background-color: #334155;
  color: #f8fafc;
}

body.dark-mode .filter-btn {
  color: #94a3b8;
}

body.dark-mode .filter-btn:hover {
  background-color: #334155;
  color: #f8fafc;
}

body.dark-mode .search-filter-menu {
  background-color: #0f172a;
  border-color: #334155;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
}

body.dark-mode .filter-menu-header {
  color: #64748b;
}

body.dark-mode .filter-menu-item {
  color: #cbd5e1;
}

body.dark-mode .filter-menu-item:hover {
  background-color: #1e293b;
  color: #f8fafc;
}

body.dark-mode .filter-menu-item.active {
  background-color: rgba(234, 88, 12, 0.16);
  color: #fb923c;
}

/* Tree Section Headers & Nodes in Dark Mode */
body.dark-mode .tree-section-header,
html.dark .tree-section-header,
.dark-mode .tree-section-header {
  color: var(--app-primary-light, var(--app-primary, #fb923c)) !important;
}

body.dark-mode .node-row {
  color: #cbd5e1;
}

body.dark-mode .node-row:hover {
  background-color: #1e293b;
}

body.dark-mode .node-label {
  color: #cbd5e1;
}

body.dark-mode .node-row:hover .node-label {
  color: #ffffff;
}

body.dark-mode .item-icon {
  color: #94a3b8;
}

body.dark-mode .node-row:hover .item-icon {
  color: var(--app-primary, #ea580c);
}

body.dark-mode .chevron-toggle {
  color: #94a3b8;
}

body.dark-mode .chevron-toggle:hover {
  color: #ffffff;
}

/* Selected Active Node (retail_sales) - Harmonious Dark Accent */
body.dark-mode .tree-node.selected>.node-row {
  background-color: var(--app-primary-glow, rgba(234, 88, 12, 0.16));
  border: 1px solid var(--app-primary, rgba(234, 88, 12, 0.35));
}

body.dark-mode .tree-node.selected>.node-row .node-label {
  color: var(--app-primary-light, #fb923c);
  font-weight: 600;
}

body.dark-mode .tree-node.selected>.node-row .item-icon {
  color: var(--app-primary, #ea580c);
}

body.dark-mode .tree-node.selected>.node-row .chevron-toggle {
  color: var(--app-primary-light, #fb923c);
}

/* Header in Dark Mode */
body.dark-mode .app-header,
html.dark .app-header,
.dark-mode .app-header {
  background: #0f172a !important;
  border-bottom: 1px solid var(--border-subtle, #1e293b) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

body.dark-mode .header-menu-toggle-btn {
  background-color: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-mode .header-menu-toggle-btn:hover {
  background-color: #334155;
  border-color: #475569;
  color: #ffffff;
}

body.dark-mode .header-datetime-pill {
  background-color: #1e293b;
  border-color: #334155;
}

body.dark-mode .datetime-icon-mini {
  color: #94a3b8;
}

body.dark-mode .datetime-date-text {
  color: #94a3b8;
}

body.dark-mode .time-digits {
  color: #f8fafc;
}

/* Dark Mode Plan Expiry Status Pill */
body.dark-mode .header-plan-pill.plan-pill-healthy {
  background: var(--app-primary-glow, rgba(234, 88, 12, 0.14)) !important;
  border-color: var(--app-primary-border, rgba(234, 88, 12, 0.35)) !important;
}

body.dark-mode .header-plan-pill.plan-pill-healthy svg {
  stroke: var(--app-primary-light, #34d399) !important;
}

body.dark-mode .header-plan-pill.plan-pill-healthy .plan-days-text {
  color: var(--app-primary-light, #34d399) !important;
}

body.dark-mode .header-plan-pill.plan-pill-healthy .plan-exp-text {
  color: #94a3b8 !important;
}

body.dark-mode .header-plan-pill.plan-pill-critical {
  background: rgba(239, 68, 68, 0.16) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}

body.dark-mode .header-plan-pill.plan-pill-critical svg {
  stroke: #f87171 !important;
}

body.dark-mode .header-plan-pill.plan-pill-critical .plan-days-text {
  color: #f87171 !important;
}

body.dark-mode .header-plan-pill.plan-pill-critical .plan-exp-text {
  color: #94a3b8 !important;
}

body.dark-mode .header-icon-circle {
  background-color: #1e293b;
  border: 1px solid #334155;
  color: #cbd5e1;
}

body.dark-mode .header-icon-circle:hover {
  background-color: #334155;
  border-color: #475569;
  color: #ffffff;
}

body.dark-mode .notification-dot {
  border-color: #1e293b;
}

body.dark-mode .user-profile-header {
  background-color: #1e293b;
  border-color: #334155;
}

body.dark-mode .user-profile-header:hover,
body.dark-mode .user-profile-wrapper.open .user-profile-header {
  background-color: #334155;
  border-color: #475569;
}

body.dark-mode .header-user-name {
  color: #f8fafc;
}

body.dark-mode .header-user-role {
  color: #94a3b8;
}

body.dark-mode .header-user-chevron {
  color: #94a3b8;
}

body.dark-mode .profile-dropdown-menu {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.75) !important;
}

body.dark-mode .profile-dropdown-menu .dropdown-user-name,
body.dark-mode .dropdown-user-name {
  color: #f8fafc !important;
}

body.dark-mode .profile-dropdown-menu .dropdown-user-email,
body.dark-mode .dropdown-user-email {
  color: #94a3b8 !important;
}

body.dark-mode .profile-dropdown-menu .dropdown-role-badge,
body.dark-mode .dropdown-role-badge {
  background-color: rgba(234, 88, 12, 0.2) !important;
  color: #fb923c !important;
}

body.dark-mode .profile-dropdown-menu .dropdown-section-title,
body.dark-mode .dropdown-section-title {
  color: #64748b !important;
}

body.dark-mode .profile-dropdown-menu .dropdown-item,
body.dark-mode .dropdown-item {
  color: #cbd5e1 !important;
}

body.dark-mode .profile-dropdown-menu .dropdown-item-icon,
body.dark-mode .dropdown-item-icon {
  color: #94a3b8 !important;
}

body.dark-mode .profile-dropdown-menu .dropdown-item:hover,
body.dark-mode .profile-dropdown-menu .dropdown-item:focus,
body.dark-mode .dropdown-item:hover,
body.dark-mode .dropdown-item:focus {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-mode .profile-dropdown-menu .dropdown-item:hover .dropdown-item-icon,
body.dark-mode .profile-dropdown-menu .dropdown-item:focus .dropdown-item-icon,
body.dark-mode .dropdown-item:hover .dropdown-item-icon {
  color: #fb923c !important;
}

body.dark-mode .profile-dropdown-menu .dropdown-logout-btn,
body.dark-mode .dropdown-logout-btn {
  color: #f87171 !important;
}

body.dark-mode .profile-dropdown-menu .dropdown-logout-btn .dropdown-item-icon,
body.dark-mode .dropdown-logout-btn .dropdown-item-icon {
  color: #f87171 !important;
}

body.dark-mode .profile-dropdown-menu .dropdown-logout-btn:hover,
body.dark-mode .profile-dropdown-menu .dropdown-logout-btn:focus,
body.dark-mode .dropdown-logout-btn:hover,
body.dark-mode .dropdown-logout-btn:focus {
  background-color: rgba(239, 68, 68, 0.15) !important;
  color: #fca5a5 !important;
}

body.dark-mode .profile-dropdown-menu .dropdown-logout-btn:hover .dropdown-item-icon,
body.dark-mode .profile-dropdown-menu .dropdown-logout-btn:focus .dropdown-item-icon,
body.dark-mode .dropdown-logout-btn:hover .dropdown-item-icon {
  color: #fca5a5 !important;
}

body.dark-mode .profile-dropdown-menu .dropdown-divider,
body.dark-mode .dropdown-divider {
  background-color: #1e293b !important;
  border: none !important;
}

/* Greeting Section in Dark Mode */
body.dark-mode .greeting-title {
  color: #f8fafc;
}

body.dark-mode .greeting-subtitle {
  color: #94a3b8;
}

body.dark-mode .dashboard-action-btn,
body.dark-mode .date-range-btn {
  background-color: #1e293b;
  border-color: #334155;
  color: #f8fafc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-mode .dashboard-action-btn:hover,
body.dark-mode .date-range-btn:hover {
  background-color: #334155;
  border-color: #475569;
  color: #ffffff;
}

body.dark-mode .date-calendar-icon,
body.dark-mode .dashboard-action-btn svg {
  color: #94a3b8;
}

/* KPI Cards in Dark Mode */
body.dark-mode .kpi-card {
  background: #0f172a;
  border-color: #1e293b;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

body.dark-mode .kpi-card:hover {
  border-color: #334155;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

body.dark-mode .kpi-title {
  color: #94a3b8;
}

body.dark-mode .kpi-value {
  color: #f8fafc;
}

body.dark-mode .kpi-subtext {
  color: #64748b;
}

body.dark-mode .kpi-badge-green {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}

body.dark-mode .kpi-badge-blue {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
}

body.dark-mode .kpi-badge-purple {
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
}

body.dark-mode .kpi-badge-orange {
  background: var(--app-primary-glow, rgba(234, 88, 12, 0.18));
  color: var(--app-primary-light, #fb923c);
}

/* Middle Analytics Cards in Dark Mode */
body.dark-mode .analytics-card,
body.dark-mode .profile-content-card,
body.dark-mode .profile-menu-card,
body.dark-mode .settings-tab-card,
body.dark-mode .users-card,
html.dark .analytics-card,
html.dark .profile-content-card,
html.dark .settings-tab-card,
html.dark .users-card {
  background: #0f172a !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  color: #f8fafc;
}

body.dark-mode .analytics-card:hover,
body.dark-mode .profile-content-card:hover,
body.dark-mode .settings-tab-card:hover,
body.dark-mode .users-card:hover,
html.dark .settings-tab-card:hover,
html.dark .users-card:hover {
  border-color: #334155 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

body.dark-mode .profile-content-card label {
  color: #f8fafc !important;
}

body.dark-mode .profile-card-title {
  color: #f8fafc !important;
}

body.dark-mode .profile-card-subtitle {
  color: #94a3b8 !important;
}

body.dark-mode .profile-content-card div[class*="bg-[#f8fafc]"],
body.dark-mode .profile-content-card div[class*="bg-[#f1f5f9]"],
body.dark-mode .profile-content-card div[class*="bg-white"],
body.dark-mode .profile-content-card a[class*="bg-white"],
html.dark .profile-content-card div[class*="bg-[#f8fafc]"],
html.dark .profile-content-card div[class*="bg-[#f1f5f9]"],
html.dark .profile-content-card div[class*="bg-white"],
html.dark .profile-content-card a[class*="bg-white"] {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .widget-title {
  color: #f8fafc;
}

body.dark-mode .pill-select-btn,
body.dark-mode .widget-menu-btn {
  background-color: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-mode .pill-select-btn:hover,
body.dark-mode .widget-menu-btn:hover {
  background-color: #334155;
  color: #ffffff;
}

/* Sales Performance Bar Chart */
body.dark-mode .chart-y-axis span {
  color: #64748b;
}

body.dark-mode .bar-label {
  color: #94a3b8;
}

body.dark-mode .chart-grid-lines .grid-line {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

body.dark-mode .bar-fill {
  background: var(--app-primary-light, #fb923c);
  opacity: 0.25;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark-mode .bar-col:hover .bar-fill {
  opacity: 0.5;
}

body.dark-mode .bar-col.active-orange-bar .bar-fill,
body.dark-mode .bar-col.active-green-bar .bar-fill {
  background: linear-gradient(180deg, var(--app-primary-light, #fb923c) 0%, var(--app-primary, #ea580c) 100%) !important;
  border: none;
  box-shadow: 0 0 14px var(--app-primary-glow, rgba(234, 88, 12, 0.55));
  opacity: 1 !important;
}

body.dark-mode .floating-bar-badge {
  background: var(--app-primary, #ea580c);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--app-primary-glow, rgba(0, 0, 0, 0.6));
}

body.dark-mode .badge-arrow {
  border-top-color: #ea580c;
}

/* Sales Analytics Gauge */
body.dark-mode .gauge-svg path:first-of-type,
body.dark-mode .gauge-track-bg {
  stroke: #1e293b;
}

body.dark-mode .gauge-percentage,
body.dark-mode .gauge-center-pct {
  color: #f8fafc;
}

body.dark-mode .gauge-subtitle,
body.dark-mode .gauge-center-title {
  color: #94a3b8;
}

body.dark-mode .breakdown-label,
body.dark-mode .channel-label {
  color: #94a3b8;
}

body.dark-mode .breakdown-val,
body.dark-mode .channel-val {
  color: #f8fafc;
}

/* Product Stock Bars */
body.dark-mode .stock-main-pct {
  color: #f8fafc;
}

body.dark-mode .stock-main-desc,
body.dark-mode .product-stock-subtext {
  color: #94a3b8;
}

body.dark-mode .cat-name {
  color: #cbd5e1;
}

body.dark-mode .cat-pct {
  color: #f8fafc;
}

body.dark-mode .smooth-progress-track {
  background-color: #1e293b;
}

/* Product Inventory Table Card in Dark Mode */
body.dark-mode .inventory-card {
  background: #0f172a;
  border-color: #1e293b;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

body.dark-mode .inventory-card:hover {
  border-color: #334155;
}

body.dark-mode .inventory-title {
  color: #f8fafc;
}

body.dark-mode .inventory-icon-box {
  background: rgba(249, 115, 22, 0.16);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.25);
}

/* Search input */
body.dark-mode .inventory-search-wrap input {
  background-color: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

body.dark-mode .inventory-search-wrap input::placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  opacity: 1 !important;
}

body.dark-mode .inventory-search-wrap input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.25);
}

body.dark-mode .inventory-search-wrap svg {
  color: #94a3b8;
}

/* Dropdown Filters */
body.dark-mode .inventory-select-btn {
  background-color: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-mode .inventory-select-btn:hover {
  border-color: #475569;
  color: #f8fafc;
}

body.dark-mode .inventory-select-btn option {
  background-color: #0f172a;
  color: #f8fafc;
}

/* Table container & Headers */
body.dark-mode .inventory-table-container {
  border-color: #1e293b;
}

body.dark-mode .inventory-table thead th {
  background-color: #141d33;
  color: #94a3b8;
  border-bottom-color: #1e293b;
}

body.dark-mode .th-sortable:hover {
  color: #f8fafc;
}

body.dark-mode .sort-glyph {
  color: #64748b;
}

body.dark-mode .th-num,
body.dark-mode .td-num {
  color: #64748b;
}

/* Rows & Cells */
body.dark-mode .inventory-table tbody td {
  border-bottom-color: #1e293b;
  color: #cbd5e1;
}

body.dark-mode .inventory-table tbody tr:hover td {
  background-color: #162032;
}

body.dark-mode .product-thumb {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .thumb-jacket {
  background: rgba(219, 39, 119, 0.16);
  color: #f472b6;
  border-color: rgba(219, 39, 119, 0.3);
}

body.dark-mode .thumb-shoes {
  background: rgba(37, 99, 235, 0.16);
  color: #60a5fa;
  border-color: rgba(37, 99, 235, 0.3);
}

body.dark-mode .thumb-bottle {
  background: rgba(217, 119, 6, 0.16);
  color: #fbbf24;
  border-color: rgba(217, 119, 6, 0.3);
}

body.dark-mode .thumb-bag {
  background: rgba(124, 58, 237, 0.16);
  color: #c084fc;
  border-color: rgba(124, 58, 237, 0.3);
}

body.dark-mode .thumb-gadget {
  background: rgba(8, 145, 178, 0.16);
  color: #38bdf8;
  border-color: rgba(8, 145, 178, 0.3);
}

body.dark-mode .thumb-food {
  background: rgba(5, 150, 105, 0.16);
  color: #34d399;
  border-color: rgba(5, 150, 105, 0.3);
}

body.dark-mode .product-title {
  color: #f8fafc;
}

body.dark-mode .product-subcat {
  color: #94a3b8;
}

body.dark-mode .metric-main-num,
body.dark-mode .order-pending-text,
body.dark-mode .conversion-main-pct,
body.dark-mode .stock-item-count,
body.dark-mode .price-text {
  color: #f8fafc;
}

body.dark-mode .order-succes-text {
  color: #94a3b8;
}

/* Category Pills */
body.dark-mode .cat-pill.cat-fashion {
  background: rgba(219, 39, 119, 0.18);
  color: #f472b6;
  border-color: rgba(219, 39, 119, 0.35);
}

body.dark-mode .cat-pill.cat-footwear {
  background: rgba(37, 99, 235, 0.18);
  color: #60a5fa;
  border-color: rgba(37, 99, 235, 0.35);
}

body.dark-mode .cat-pill.cat-accessories {
  background: rgba(217, 119, 6, 0.18);
  color: #fbbf24;
  border-color: rgba(217, 119, 6, 0.35);
}

body.dark-mode .cat-pill.cat-travel {
  background: rgba(124, 58, 237, 0.18);
  color: #c084fc;
  border-color: rgba(124, 58, 237, 0.35);
}

body.dark-mode .cat-pill.cat-gadget {
  background: rgba(8, 145, 178, 0.18);
  color: #38bdf8;
  border-color: rgba(8, 145, 178, 0.35);
}

body.dark-mode .cat-pill.cat-food {
  background: rgba(5, 150, 105, 0.18);
  color: #34d399;
  border-color: rgba(5, 150, 105, 0.35);
}

body.dark-mode .cat-pill.cat-decoration {
  background: rgba(192, 38, 211, 0.18);
  color: #e879f9;
  border-color: rgba(192, 38, 211, 0.35);
}

/* Status Pills */
body.dark-mode .status-pill.status-instock {
  background: rgba(5, 150, 105, 0.18);
  color: #34d399;
  border-color: rgba(5, 150, 105, 0.35);
}

body.dark-mode .status-pill.status-lowstock {
  background: rgba(217, 119, 6, 0.18);
  color: #fbbf24;
  border-color: rgba(217, 119, 6, 0.35);
}

body.dark-mode .status-pill.status-outstock {
  background: rgba(225, 29, 72, 0.18);
  color: #fb7185;
  border-color: rgba(225, 29, 72, 0.35);
}

/* Row Action Buttons */
body.dark-mode .row-edit-btn {
  background-color: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-mode .row-edit-btn:hover {
  background-color: #334155;
  border-color: #475569;
  color: #ffffff;
}

body.dark-mode .mobile-scroll-hint {
  background-color: #1e293b;
  color: #94a3b8;
}

/* Mobile Drawer in Dark Mode */
body.dark-mode .mobile-drawer-header {
  background: #0f172a;
  border-bottom-color: #1e293b;
}

body.dark-mode .mobile-drawer-close-btn {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

body.dark-mode .mobile-drawer-close-btn:hover {
  background: #334155;
  color: #f8fafc;
}

/* Toast Notification in Dark Mode */
body.dark-mode .toast {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #334155;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
}

/* Custom Scrollbars in Dark Mode */
body.dark-mode ::-webkit-scrollbar-thumb {
  background-color: #334155;
  border-radius: 999px;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
  background-color: #475569;
}

body.dark-mode ::-webkit-scrollbar-track {
  background-color: #0b0f17;
}

body.dark-mode * {
  scrollbar-color: #334155 #0b0f17;
}

/* Table Content Card & Additional Cards in Dark Mode */
body.dark-mode .table-content-card {
  background-color: #0f172a !important;
  border: 1px solid #1e293b;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

body.dark-mode .stat-card {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .stat-label {
  color: #94a3b8;
}

body.dark-mode .stat-value {
  color: #f8fafc;
}

body.dark-mode .tab-navigation {
  background: #0f172a;
  border-bottom-color: #1e293b;
}

body.dark-mode .tab-item {
  color: #94a3b8;
}

body.dark-mode .tab-item:hover,
body.dark-mode .tab-item.active {
  color: #f8fafc;
}

body.dark-mode .quality-card {
  background: #0f172a;
  border-color: #1e293b;
}

body.dark-mode .quality-metric-title {
  color: #94a3b8;
}

body.dark-mode .score-number {
  color: #f8fafc;
}

body.dark-mode .quality-subtext {
  color: #94a3b8;
}

/* ==========================================================================
   FORM INPUTS & PROFILE CENTERED STYLING
   ========================================================================== */
.theme-form-input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #d0d7de !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  font-size: 14px;
  font-family: var(--font-family-sans);
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.theme-form-input::placeholder {
  color: #94a3b8;
}

.theme-form-input:focus {
  border-color: var(--app-primary, #ea580c) !important;
  box-shadow: 0 0 0 3px var(--app-primary-glow, rgba(234, 88, 12, 0.18)) !important;
}

/* Dark Mode Input State (Activated only when body has .dark-mode) */
body.dark-mode .theme-form-input {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .theme-form-input::placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  opacity: 1 !important;
}

body.dark-mode .theme-form-input option {
  background-color: #0f172a;
  color: #f8fafc;
}

.theme-form-input:disabled {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  cursor: not-allowed !important;
  opacity: 0.9 !important;
}

body.dark-mode .theme-form-input:focus,
html.dark .theme-form-input:focus,
.dark-mode .theme-form-input:focus {
  border-color: #f97316 !important;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.28) !important;
}

body.dark-mode .theme-form-input:disabled,
html.dark .theme-form-input:disabled,
html.dark-mode .theme-form-input:disabled,
.dark-mode .theme-form-input:disabled {
  background-color: #141e30 !important;
  border-color: #2c3b52 !important;
  color: #cbd5e1 !important;
  -webkit-text-fill-color: #cbd5e1 !important;
  cursor: not-allowed !important;
  opacity: 0.92 !important;
}

/* Global Dark Mode Input & Placeholder Text Visibility Fix */
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder,
body.dark-mode .form-control::placeholder,
body.dark-mode select::placeholder,
body.dark-mode .dataTables_wrapper .dataTables_filter input::placeholder,
html.dark input::placeholder,
html.dark textarea::placeholder,
html.dark .form-control::placeholder,
html.dark select::placeholder,
html.dark .dataTables_wrapper .dataTables_filter input::placeholder,
html.dark-mode input::placeholder,
html.dark-mode textarea::placeholder,
html.dark-mode .form-control::placeholder,
.dark-mode input::placeholder,
.dark-mode textarea::placeholder,
.dark-mode .form-control::placeholder,
.dark-mode .dataTables_wrapper .dataTables_filter input::placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  opacity: 1 !important;
}

/* Centered layout container helper */
.content-center-container {
  max-width: 860px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   PROFILE SETTINGS 2-COLUMN LEFT MENU LAYOUT
   ========================================================================== */
.profile-settings-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  width: 100%;
  max-width: 1050px;
  margin: 0 auto;
  align-items: stretch;
}

.profile-menu-card {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  align-self: start;
  height: fit-content;
  z-index: 20;
}

.profile-menu-card.analytics-card:hover {
  transform: none;
}

.profile-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 13.5px;
  font-weight: 500;
  font-family: var(--font-family-sans);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

@media (max-width: 860px) {
  .profile-settings-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .profile-menu-card {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative !important;
    top: auto !important;
    z-index: 10;
    gap: 8px;
    padding: 8px;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
  }

  .profile-menu-card::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
  }

  .profile-menu-item {
    width: auto;
    flex-shrink: 0;
    white-space: nowrap;
    padding: 9px 15px;
    font-size: 13px;
    gap: 8px;
    border-radius: 8px;
  }

  .profile-content-card {
    padding: 20px 16px;
  }

  /* Real-Time Preview Components: Full Width on Mobile */
  .preview-components-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .preview-components-row .theme-preview-primary-btn,
  .preview-components-row .theme-preview-active-item,
  .preview-components-row .theme-preview-input-wrap,
  .preview-components-row .theme-preview-input-wrap input {
    width: 100% !important;
    min-width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  .preview-components-row .theme-preview-primary-btn {
    min-height: 42px !important;
    padding: 10px 16px !important;
  }

  .preview-components-row .theme-preview-active-item {
    min-height: 40px !important;
    padding: 10px 16px !important;
  }

  .preview-components-row .theme-preview-input-wrap input {
    height: 42px !important;
    text-align: center !important;
  }
}

.profile-menu-item:hover {
  background-color: var(--app-primary-bg, #f1f5f9);
  color: var(--app-primary, #0f172a);
}

.profile-menu-item.active {
  background-color: var(--app-primary-bg, #fff7ed);
  color: var(--app-primary, #ea580c);
  font-weight: 600;
}

.profile-menu-item.active .profile-menu-icon {
  color: var(--app-primary, #ea580c);
  stroke: var(--app-primary, #ea580c);
}

.profile-menu-item.danger-item:hover {
  background-color: #fef2f2;
  color: #ef4444;
}

.profile-menu-item.danger-item.active {
  background-color: #fef2f2;
  color: #ef4444;
  font-weight: 600;
}

.profile-menu-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}

.profile-menu-item:hover .profile-menu-icon {
  color: var(--app-primary, #0f172a);
  stroke: var(--app-primary, #0f172a);
  transform: scale(1.08);
}

/* Dark Mode Profile Menu */
body.dark-mode .profile-menu-item {
  color: #94a3b8;
}

body.dark-mode .profile-menu-item:hover {
  background-color: var(--app-primary-glow, #1e293b);
  color: var(--app-primary-light, #f8fafc);
}

body.dark-mode .profile-menu-item:hover .profile-menu-icon {
  color: var(--app-primary-light, #f8fafc);
  stroke: var(--app-primary-light, #f8fafc);
}

body.dark-mode .profile-menu-item.active {
  background-color: var(--app-primary-glow, rgba(234, 88, 12, 0.16));
  color: var(--app-primary-light, #fb923c);
}

body.dark-mode .profile-menu-item.active .profile-menu-icon {
  color: var(--app-primary-light, #fb923c);
  stroke: var(--app-primary-light, #fb923c);
}

body.dark-mode .profile-menu-item.danger-item:hover {
  background-color: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

body.dark-mode .profile-menu-item.danger-item.active {
  background-color: rgba(239, 68, 68, 0.18);
  color: #f87171;
}

.profile-content-card {
  padding: 28px 32px;
  min-height: 380px;
}

.profile-card-header {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle, #eaedf1);
}

.profile-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main, #0f172a);
  margin: 0 0 4px 0;
}

.profile-card-subtitle {
  font-size: 13px;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}

body.dark-mode .profile-card-title {
  color: #f8fafc;
}

body.dark-mode .profile-card-subtitle {
  color: #94a3b8;
}

body.dark-mode .profile-card-header {
  border-bottom-color: #1e293b;
}

/* ==========================================================================
   THEME ACCENT COLOR CUSTOMIZER
   ========================================================================== */
.theme-customizer-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.theme-color-inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.theme-color-card {
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle, #eaedf1);
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

body.dark-mode .theme-color-card {
  background-color: #1e293b;
  border-color: #334155;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.theme-color-card:hover {
  border-color: #cbd5e1;
}

body.dark-mode .theme-color-card:hover {
  border-color: #475569;
}

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

.theme-color-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main, #0f172a);
}

body.dark-mode .theme-color-title {
  color: #f8fafc;
}

.theme-color-badge {
  font-size: 11px;
  font-family: var(--font-family-mono, monospace);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #64748b;
}

body.dark-mode .theme-color-badge {
  background: #0f172a;
  color: #94a3b8;
}

.theme-color-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-swatch-picker {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 44px;
  height: 42px;
  padding: 0;
  border: 2px solid #ffffff;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  background: transparent;
  flex-shrink: 0;
}

body.dark-mode .color-swatch-picker {
  border-color: #334155;
}

.color-swatch-picker::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 6px;
}

.color-swatch-picker::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.color-hex-input {
  font-family: var(--font-family-mono, 'JetBrains Mono', monospace);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Preset Palettes Grid */
.presets-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

body.dark-mode .presets-section-title {
  color: #94a3b8;
}

.preset-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.preset-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, #e2e8f0);
  background-color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.preset-button:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.preset-button.active-preset {
  border-color: var(--app-primary, #ea580c);
  background-color: var(--app-primary-bg, #fff7ed);
  box-shadow: 0 0 0 1.5px var(--app-primary, #ea580c);
}

body.dark-mode .preset-button {
  background-color: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-mode .preset-button:hover {
  background-color: #273549;
  border-color: #475569;
}

body.dark-mode .preset-button.active-preset {
  background-color: rgba(234, 88, 12, 0.16);
  border-color: var(--app-primary-light, #fb923c);
  box-shadow: 0 0 0 1.5px var(--app-primary-light, #fb923c);
  color: #ffffff;
}

.preset-swatch-dual {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.preset-swatch-half {
  flex: 1;
  height: 100%;
}

.preset-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main, #334155);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dark-mode .preset-name {
  color: #e2e8f0;
}

/* Live Preview Card */
.theme-preview-card {
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px dashed var(--border-strong, #cbd5e1);
  background-color: var(--bg-app, #f8fafc);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body.dark-mode .theme-preview-card {
  background-color: #0b1120;
  border-color: #334155;
}

.preview-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.dark-mode .preview-header {
  color: #94a3b8;
}

.preview-components-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

/* ==========================================================================
   COLOR SHADES & TINTS FINDER (ArtyClick Style)
   ========================================================================== */
.arty-shades-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle, #eaedf1);
  border-radius: 8px !important;
  padding: 22px 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

body.dark-mode .arty-shades-card {
  background: #0f172a;
  border-color: #1e293b;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.arty-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle, #f1f5f9);
  padding-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

body.dark-mode .arty-card-title-row {
  border-bottom-color: #1e293b;
}

.arty-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main, #0f172a);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

body.dark-mode .arty-card-title {
  color: #f8fafc;
}

.arty-main-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 800px) {
  .arty-main-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Col 1: Big Swatch */
.arty-swatch-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.arty-hex-badge {
  font-family: var(--font-family-mono, monospace);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-main, #0f172a);
  padding: 4px 10px;
  border-radius: 8px;
  background: #f1f5f9;
}

body.dark-mode .arty-hex-badge {
  color: #f8fafc;
  background: #1e293b;
}

.arty-big-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

body.dark-mode .arty-big-circle {
  border-color: #1e293b;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.arty-big-circle:hover {
  transform: scale(1.05);
}

.arty-picker-input-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Active Theme Pair Box */
.active-theme-pair-card {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.active-theme-pair-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.active-theme-pair-label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.active-theme-pair-hex {
  font-family: var(--font-family-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
}

body.dark-mode .active-theme-pair-card,
html.dark .active-theme-pair-card,
.dark-mode .active-theme-pair-card {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

body.dark-mode .active-theme-pair-title,
html.dark .active-theme-pair-title,
.dark-mode .active-theme-pair-title {
  color: #94a3b8 !important;
}

body.dark-mode .active-theme-pair-label,
html.dark .active-theme-pair-label,
.dark-mode .active-theme-pair-label {
  color: #cbd5e1 !important;
}

body.dark-mode .active-theme-pair-hex,
html.dark .active-theme-pair-hex,
.dark-mode .active-theme-pair-hex {
  color: #f8fafc !important;
}

/* Col 2: Adjust Color Sliders */
.arty-adjust-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 4px;
}

.arty-adjust-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main, #334155);
  text-align: center;
  margin: 0;
}

body.dark-mode .arty-adjust-title {
  color: #e2e8f0;
}

.arty-slider-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.arty-slider-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main, #334155);
  text-align: center;
}

body.dark-mode .arty-slider-header {
  color: #e2e8f0;
}

.arty-slider-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted, #64748b);
}

body.dark-mode .arty-slider-label-row {
  color: #94a3b8;
}

.arty-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: #e2e8f0;
  outline: none;
  cursor: pointer;
}

body.dark-mode .arty-slider {
  background: #334155;
}

.arty-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--app-primary, #ea580c);
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.arty-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--app-primary, #ea580c);
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

/* Col 3: Two Columns of Tints and Shades */
.arty-spectrum-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 650px) {
  .arty-spectrum-cols {
    grid-template-columns: 1fr;
  }
}

.arty-spectrum-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.arty-spectrum-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main, #1e293b);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2px;
}

body.dark-mode .arty-spectrum-header {
  color: #f1f5f9;
}

.arty-swatch-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.arty-swatch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.arty-swatch-row:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.dark-mode .arty-swatch-row:hover {
  background: #1e293b;
  border-color: #334155;
}

.arty-swatch-hex {
  font-family: var(--font-family-mono, monospace);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted, #475569);
  width: 68px;
  padding: 2px 4px;
  border-radius: 5px;
  text-align: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

body.dark-mode .arty-swatch-hex {
  color: #94a3b8;
}

/* Highlighted like Image 2 */
.arty-swatch-row.active-primary .arty-swatch-hex {
  background-color: var(--app-primary, #ea580c);
  color: #ffffff;
  font-weight: 700;
}

.arty-swatch-row.active-primary-light .arty-swatch-hex {
  background-color: var(--app-primary-light, #fb923c);
  color: #ffffff;
  font-weight: 700;
}

.arty-swatch-bar {
  flex: 1;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease;
  position: relative;
}

.arty-swatch-row:hover .arty-swatch-bar {
  transform: scaleY(1.08);
}

.arty-badge-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge-tag-primary {
  background: var(--app-primary, #ea580c);
  color: #ffffff;
}

.badge-tag-light {
  background: var(--app-primary-light, #fb923c);
  color: #ffffff;
}

/* ==========================================================================
   GLOBAL MODERN DATATABLES & TABLE STYLING
   ========================================================================== */
.dataTables_wrapper {
  padding-top: 4px;
  position: relative;
}

.dataTables_wrapper::after {
  content: "";
  display: table;
  clear: both;
}

.dataTables_wrapper .dataTables_filter {
  float: right;
  text-align: right;
  margin-bottom: 16px;
}

.dataTables_wrapper .dataTables_filter label {
  margin: 0;
  position: relative;
  display: inline-block;
  font-weight: 500;
}

.dataTables_wrapper .dataTables_filter input {
  height: 42px;
  min-width: 250px;
  padding: 0 16px 0 38px !important;
  border-radius: 10px;
  border: 1px solid #e2e8f0 !important;
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 12px center !important;
  background-size: 16px 16px !important;
  color: #0f172a !important;
  outline: none;
  font-size: 13.5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dataTables_wrapper .dataTables_filter input:hover {
  border-color: #94a3b8 !important;
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--app-primary, #ea580c) !important;
  box-shadow: 0 0 0 3.5px rgba(234, 88, 12, 0.15) !important;
}

body.dark-mode .dataTables_wrapper .dataTables_filter input,
html.dark .dataTables_wrapper .dataTables_filter input,
.dark-mode .dataTables_wrapper .dataTables_filter input {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3E%3C/path%3E%3C/svg%3E") !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

body.dark-mode .dataTables_wrapper .dataTables_filter input::placeholder,
html.dark .dataTables_wrapper .dataTables_filter input::placeholder,
.dark-mode .dataTables_wrapper .dataTables_filter input::placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  opacity: 1 !important;
}

body.dark-mode .dataTables_wrapper .dataTables_filter input:hover,
html.dark .dataTables_wrapper .dataTables_filter input:hover {
  border-color: #475569 !important;
}

body.dark-mode .dataTables_wrapper .dataTables_filter input:focus,
html.dark .dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--app-primary, #ea580c) !important;
  box-shadow: 0 0 0 3.5px rgba(234, 88, 12, 0.25) !important;
}

/* DataTables Modern Frame & Scroller - Matching loans table UI */
.dataTables_scroll {
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background: #ffffff !important;
  box-shadow: none !important;
  margin-bottom: 14px !important;
}

body.dark-mode .dataTables_scroll,
html.dark .dataTables_scroll,
.dark-mode .dataTables_scroll {
  border-color: #334155 !important;
  background: #0f172a !important;
  box-shadow: none !important;
}

.dataTables_scrollHead {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  overflow: hidden !important;
}

body.dark-mode .dataTables_scrollHead,
html.dark .dataTables_scrollHead {
  background: #1e293b !important;
  border-bottom: 1px solid #334155 !important;
}

.dataTables_scrollBody,
div.dataTables_scrollBody {
  border: none !important;
  border-bottom: none !important;
}

table.dataTable.no-footer {
  border-bottom: none !important;
}

.table-responsive {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Completely neutralize cloned sizing thead in scrollBody (Prevent extra empty border row) */
.dataTables_scrollBody thead,
.dataTables_scrollBody thead th,
.dataTables_scrollBody thead td,
.dataTables_scrollBody thead tr {
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  border: none !important;
  outline: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  visibility: collapse !important;
  background: transparent !important;
}

/* Neutralize empty scrollbar spacer th in scrollHead */
.dataTables_scrollHeadInner th:empty,
.dataTables_scrollHead .dataTable thead th:empty {
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  background: transparent !important;
}

table.dataTable,
table.custom-datatable,
table.table-bordered {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  margin: 0 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background-color: #ffffff;
  color: #1e293b;
}

body.dark-mode table.dataTable,
body.dark-mode table.custom-datatable,
body.dark-mode table.table-bordered,
html.dark table.dataTable,
html.dark table.custom-datatable,
html.dark table.table-bordered,
html.dark-mode table.dataTable,
html.dark-mode table.custom-datatable,
html.dark-mode table.table-bordered,
.dark-mode table.dataTable,
.dark-mode table.custom-datatable,
.dark-mode table.table-bordered {
  background-color: #0f172a !important;
  color: #f1f5f9 !important;
  border: 1px solid #1e293b !important;
}

/* Table Header (thead th) - Clean Muted Uppercase with Soft Grid */
table.dataTable thead th,
.dataTables_scrollHead th,
table.table-bordered thead th {
  background: #f0f4f9 !important;
  color: #203a5c !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  padding: 13px 18px !important;
  border-top: none !important;
  border-left: none !important;
  border-right: 1px solid #e2e8f0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

table.dataTable thead th:last-child,
.dataTables_scrollHead th:last-child,
table.table-bordered thead th:last-child {
  border-right: none !important;
}

body.dark-mode table.dataTable thead th,
body.dark-mode .dataTables_scrollHead th,
body.dark-mode table.table-bordered thead th,
body.dark-mode .custom-datatable thead th,
html.dark table.dataTable thead th,
html.dark .dataTables_scrollHead th,
html.dark table.table-bordered thead th,
html.dark .custom-datatable thead th,
html.dark-mode table.dataTable thead th,
html.dark-mode .dataTables_scrollHead th,
html.dark-mode table.table-bordered thead th,
html.dark-mode .custom-datatable thead th,
.dark-mode table.dataTable thead th,
.dark-mode .dataTables_scrollHead th,
.dark-mode table.table-bordered thead th,
.dark-mode .custom-datatable thead th {
  background: #141f33 !important;
  color: #f8fafc !important;
  border-right: 1px solid #1e293b !important;
  border-bottom: 1px solid #1e293b !important;
}

/* Table Body Cells & Rows (tbody td) - Airy Padding with Subtle Dividing Lines */
table.dataTable tbody td,
.dataTables_scrollBody td,
table.table-bordered tbody td {
  padding: 14px 18px !important;
  font-size: 13px !important;
  font-weight: 500;
  color: #334155 !important;
  border-top: none !important;
  border-left: none !important;
  border-right: 1px solid #e2e8f0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  background-color: transparent !important;
  vertical-align: middle !important;
}

table.dataTable tbody td:last-child,
.dataTables_scrollBody td:last-child,
table.table-bordered tbody td:last-child {
  border-right: none !important;
}

table.dataTable tbody tr:last-child td,
.dataTables_scrollBody tr:last-child td {
  border-bottom: none !important;
}

body.dark-mode table.dataTable tbody td,
body.dark-mode .dataTables_scrollBody td,
body.dark-mode table.table-bordered tbody td,
html.dark table.dataTable tbody td,
html.dark .dataTables_scrollBody td,
html.dark table.table-bordered tbody td,
html.dark-mode table.dataTable tbody td,
html.dark-mode .dataTables_scrollBody td,
html.dark-mode table.table-bordered tbody td,
.dark-mode table.dataTable tbody td,
.dark-mode .dataTables_scrollBody td,
.dark-mode table.table-bordered tbody td {
  color: #cbd5e1 !important;
  border-right: 1px solid #334155 !important;
  border-bottom: 1px solid #334155 !important;
}

/* Table Row Hover Effect Removed */
table.dataTable tbody tr,
.dataTables_scrollBody tbody tr,
table.table-bordered tbody tr,
.table-hover tbody tr {
  background-color: #ffffff !important;
  transition: none !important;
}

table.dataTable tbody tr:hover,
table.dataTable tbody tr:hover td,
.dataTables_scrollBody tr:hover,
.dataTables_scrollBody tr:hover td,
table.table-bordered tbody tr:hover,
table.table-bordered tbody tr:hover td,
.table-hover tbody tr:hover,
.table-hover tbody tr:hover td,
.table-hover>tbody>tr:hover>* {
  background-color: #ffffff !important;
  color: inherit !important;
}

body.dark-mode table.dataTable tbody tr,
body.dark-mode .dataTables_scrollBody tbody tr,
body.dark-mode table.table-bordered tbody tr,
body.dark-mode .table-hover tbody tr,
html.dark table.dataTable tbody tr,
html.dark .dataTables_scrollBody tbody tr,
html.dark table.table-bordered tbody tr,
html.dark .table-hover tbody tr,
html.dark-mode table.dataTable tbody tr,
html.dark-mode .dataTables_scrollBody tbody tr,
html.dark-mode table.table-bordered tbody tr,
html.dark-mode .table-hover tbody tr,
.dark-mode table.dataTable tbody tr,
.dark-mode .dataTables_scrollBody tbody tr,
.dark-mode table.table-bordered tbody tr,
.dark-mode .table-hover tbody tr {
  background-color: #0f172a !important;
  transition: none !important;
}

body.dark-mode table.dataTable tbody tr:hover,
body.dark-mode table.dataTable tbody tr:hover td,
body.dark-mode .dataTables_scrollBody tr:hover,
body.dark-mode .dataTables_scrollBody tr:hover td,
body.dark-mode table.table-bordered tbody tr:hover,
body.dark-mode table.table-bordered tbody tr:hover td,
body.dark-mode .table-hover tbody tr:hover,
body.dark-mode .table-hover tbody tr:hover td,
body.dark-mode .table-hover>tbody>tr:hover>*,
html.dark table.dataTable tbody tr:hover,
html.dark table.dataTable tbody tr:hover td,
html.dark .dataTables_scrollBody tr:hover,
html.dark .dataTables_scrollBody tr:hover td,
html.dark table.table-bordered tbody tr:hover,
html.dark table.table-bordered tbody tr:hover td,
html.dark .table-hover tbody tr:hover,
html.dark .table-hover tbody tr:hover td,
html.dark .table-hover>tbody>tr:hover>*,
html.dark-mode table.dataTable tbody tr:hover,
html.dark-mode table.dataTable tbody tr:hover td,
html.dark-mode .dataTables_scrollBody tr:hover,
html.dark-mode .dataTables_scrollBody tr:hover td,
html.dark-mode table.table-bordered tbody tr:hover,
html.dark-mode table.table-bordered tbody tr:hover td,
html.dark-mode .table-hover tbody tr:hover,
html.dark-mode .table-hover tbody tr:hover td,
html.dark-mode .table-hover>tbody>tr:hover>*,
.dark-mode table.dataTable tbody tr:hover,
.dark-mode table.dataTable tbody tr:hover td,
.dark-mode .dataTables_scrollBody tr:hover,
.dark-mode .dataTables_scrollBody tr:hover td,
.dark-mode table.table-bordered tbody tr:hover,
.dark-mode table.table-bordered tbody tr:hover td,
.dark-mode .table-hover tbody tr:hover,
.dark-mode .table-hover tbody tr:hover td,
.dark-mode .table-hover>tbody>tr:hover>* {
  background-color: #0f172a !important;
  color: #cbd5e1 !important;
}

/* Action Micro-Buttons (View, Edit & Delete) - Pastel Rounded Squares matching Reference */
.view-icon,
.edit-icon,
.delete-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 3px !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
  border-width: 1px !important;
  border-style: solid !important;
  text-decoration: none !important;
}

/* View Icon (Pastel Soft Blue) */
.view-icon {
  background-color: #eff6ff !important;
  border-color: rgba(59, 130, 246, 0.18) !important;
  color: #3b82f6 !important;
}

.view-icon:hover {
  background-color: #dbeafe !important;
  border-color: #3b82f6 !important;
  color: #1d4ed8 !important;
  transform: translateY(-1.5px) !important;
  box-shadow: 0 3px 8px rgba(59, 130, 246, 0.2) !important;
}

/* Edit Icon (Pastel Soft Violet/Purple matching Loans table reference) */
.edit-icon {
  background-color: #f5f3ff !important;
  border-color: rgba(139, 92, 246, 0.18) !important;
  color: #8b5cf6 !important;
}

.edit-icon:hover {
  background-color: #ede9fe !important;
  border-color: #8b5cf6 !important;
  color: #6d28d9 !important;
  transform: translateY(-1.5px) !important;
  box-shadow: 0 3px 8px rgba(139, 92, 246, 0.25) !important;
}

/* Delete Icon (Pastel Soft Rose/Red matching Loans table reference) */
.delete-icon {
  background-color: #fef2f2 !important;
  border-color: rgba(239, 68, 68, 0.18) !important;
  color: #ef4444 !important;
}

.delete-icon:hover {
  background-color: #fee2e2 !important;
  border-color: #ef4444 !important;
  color: #b91c1c !important;
  transform: translateY(-1.5px) !important;
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.25) !important;
}

body.dark-mode .view-icon,
html.dark .view-icon,
.dark-mode .view-icon {
  background-color: rgba(59, 130, 246, 0.16) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
  color: #60a5fa !important;
}

body.dark-mode .view-icon:hover,
html.dark .view-icon:hover,
.dark-mode .view-icon:hover {
  background-color: rgba(59, 130, 246, 0.3) !important;
  border-color: #60a5fa !important;
  color: #93c5fd !important;
}

body.dark-mode .edit-icon,
html.dark .edit-icon,
.dark-mode .edit-icon {
  background-color: rgba(139, 92, 246, 0.16) !important;
  border-color: rgba(139, 92, 246, 0.3) !important;
  color: #c084fc !important;
}

body.dark-mode .edit-icon:hover,
html.dark .edit-icon:hover,
.dark-mode .edit-icon:hover {
  background-color: rgba(139, 92, 246, 0.3) !important;
  border-color: #c084fc !important;
  color: #e9d5ff !important;
}

body.dark-mode .delete-icon,
html.dark .delete-icon,
.dark-mode .delete-icon {
  background-color: rgba(239, 68, 68, 0.16) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #f87171 !important;
}

body.dark-mode .delete-icon:hover,
html.dark .delete-icon:hover,
.dark-mode .delete-icon:hover {
  background-color: rgba(239, 68, 68, 0.3) !important;
  border-color: #f87171 !important;
  color: #fca5a5 !important;
}

/* Pagination (Light & Dark Mode) - Matching Loans Table UI */
.dataTables_wrapper .dataTables_paginate {
  float: right;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-top: 14px !important;
  padding-top: 2px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 34px !important;
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border: 1px solid var(--border-subtle, #cbd5e1) !important;
  background: #ffffff !important;
  color: #475569 !important;
  cursor: pointer !important;
  user-select: none;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
  margin: 0 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #f8fafc !important;
  border-color: var(--app-primary, #ea580c) !important;
  color: var(--app-primary, #ea580c) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--app-primary, #ea580c) !important;
  border-color: var(--app-primary, #ea580c) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px var(--app-primary-glow, rgba(234, 88, 12, 0.35)) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  background: #f8fafc !important;
  border: 1px solid var(--border-subtle, #e2e8f0) !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
  transform: none !important;
}

body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button,
html.dark .dataTables_wrapper .dataTables_paginate .paginate_button,
.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #cbd5e1 !important;
}

body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button:hover,
html.dark .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #334155 !important;
  border-color: var(--app-primary-light, var(--app-primary, #fb923c)) !important;
  color: var(--app-primary-light, var(--app-primary, #fb923c)) !important;
}

body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button.current,
body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
html.dark .dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--app-primary, #ea580c) !important;
  border-color: var(--app-primary, #ea580c) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--app-primary-glow, rgba(234, 88, 12, 0.4)) !important;
}

body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
html.dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  background: #0f172a !important;
  border: 1px solid #1e293b !important;
  color: #475569 !important;
  opacity: 0.5 !important;
}

/* Table Info Footer */
.dataTables_wrapper .dataTables_info {
  float: left;
  padding-top: 14px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #64748b !important;
}

body.dark-mode .dataTables_wrapper .dataTables_info,
html.dark .dataTables_wrapper .dataTables_info,
.dark-mode .dataTables_wrapper .dataTables_info {
  color: #94a3b8 !important;
}

/* DataTables Export Buttons */
.dt-buttons {
  margin-bottom: 12px;
}

.dt-buttons .dt-button {
  background: #ffffff !important;
  color: #334155 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 7px 14px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}

.dt-buttons .dt-button:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

body.dark-mode .dt-buttons .dt-button,
html.dark .dt-buttons .dt-button {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border: 1px solid #334155 !important;
}

body.dark-mode .dt-buttons .dt-button:hover,
html.dark .dt-buttons .dt-button:hover {
  background: #334155 !important;
  color: #ffffff !important;
}

/* ========================================================
   SweetAlert2 Modern Standard UI Styling
   Pixel-faithful replication with Dynamic Theme Integration
   ======================================================== */
.swal2-container {
  z-index: 100000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.swal2-container.swal2-backdrop-show,
.swal2-container.swal2-noanimation {
  background: rgba(15, 23, 42, 0.45) !important;
  backdrop-filter: blur(4px) !important;
}

.swal2-popup {
  border-radius: 18px !important;
  padding: 30px 26px 28px !important;
  font-family: inherit !important;
  text-align: center !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 10px 10px -5px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.85) !important;
  max-width: 440px !important;
  box-sizing: border-box !important;
}

.swal2-icon {
  margin: 4px auto 16px auto !important;
  border-radius: 50% !important;
  transform: scale(0.95) !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

.swal2-icon.swal2-warning {
  border-color: #f59e0b !important;
  color: #f59e0b !important;
}

.swal2-icon.swal2-success {
  border-color: #10b981 !important;
  color: #10b981 !important;
}

.swal2-icon.swal2-error {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
}

.swal2-icon.swal2-info {
  border-color: #3b82f6 !important;
  color: #3b82f6 !important;
}

.swal2-icon.swal2-question {
  border-color: #8b5cf6 !important;
  color: #8b5cf6 !important;
}

.swal2-title {
  font-size: 19px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  padding: 0 10px !important;
  margin: 0 0 10px 0 !important;
  text-align: center !important;
  line-height: 1.35 !important;
  letter-spacing: -0.01em !important;
}

.swal2-html-container {
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #64748b !important;
  margin: 0 auto 22px auto !important;
  padding: 0 12px !important;
  line-height: 1.55 !important;
  text-align: center !important;
}

.swal2-actions {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 10px auto 0 auto !important;
  gap: 12px !important;
  width: 100% !important;
}

/* Positive / Confirm Button: Dynamic Theme Color & Matching Radius */
.swal2-styled.swal2-confirm,
.swal2-confirm {
  background-color: var(--app-primary, var(--color-primary-orange, #ea580c)) !important;
  background-image: none !important;
  color: #ffffff !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  padding: 10px 24px !important;
  min-width: 105px !important;
  box-shadow: 0 2px 8px var(--app-primary-glow, rgba(234, 88, 12, 0.35)) !important;
  border: none !important;
  outline: none !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}

.swal2-styled.swal2-confirm:hover,
.swal2-confirm:hover {
  background-color: var(--app-primary, var(--color-primary-orange, #ea580c)) !important;
  filter: brightness(0.92) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px var(--app-primary-glow, rgba(234, 88, 12, 0.45)) !important;
}

.swal2-styled.swal2-confirm:active,
.swal2-confirm:active {
  transform: translateY(0) !important;
  filter: brightness(0.85) !important;
}

/* Explicit Destructive / Danger Confirm Buttons */
.swal2-styled.swal2-confirm.btn-danger,
.swal2-styled.swal2-confirm.swal2-danger {
  background-color: #ef4444 !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35) !important;
}

.swal2-styled.swal2-confirm.btn-danger:hover,
.swal2-styled.swal2-confirm.swal2-danger:hover {
  background-color: #dc2626 !important;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.45) !important;
}

/* Cancel Button: Slate/Charcoal Gray with Matching Radius */
.swal2-styled.swal2-cancel,
.swal2-cancel {
  background-color: #606f7b !important;
  background-image: none !important;
  color: #ffffff !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  padding: 10px 24px !important;
  min-width: 105px !important;
  border: none !important;
  outline: none !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(96, 111, 123, 0.25) !important;
  transition: all 0.15s ease !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}

.swal2-styled.swal2-cancel:hover,
.swal2-cancel:hover {
  background-color: #4b545c !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(96, 111, 123, 0.35) !important;
}

.swal2-styled.swal2-cancel:active,
.swal2-cancel:active {
  transform: translateY(0) !important;
}

/* Deny Button: Matching Radius */
.swal2-styled.swal2-deny,
.swal2-deny {
  background-color: #ef4444 !important;
  background-image: none !important;
  color: #ffffff !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  padding: 10px 24px !important;
  min-width: 105px !important;
  border: none !important;
  outline: none !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3) !important;
  transition: all 0.15s ease !important;
  margin: 0 !important;
}

.swal2-styled.swal2-deny:hover,
.swal2-deny:hover {
  background-color: #dc2626 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4) !important;
}

/* Form Inputs within SweetAlert */
.swal2-input,
.swal2-file,
.swal2-textarea,
.swal2-select,
.swal2-radio,
.swal2-checkbox {
  border-radius: 10px !important;
  border: 1px solid #cbd5e1 !important;
  font-size: 14px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.swal2-input:focus,
.swal2-textarea:focus,
.swal2-select:focus {
  border-color: var(--app-primary, #ea580c) !important;
  box-shadow: 0 0 0 3px var(--app-primary-glow, rgba(234, 88, 12, 0.25)) !important;
  outline: none !important;
}

.swal2-close {
  border-radius: 8px !important;
  color: #94a3b8 !important;
  transition: color 0.15s ease !important;
}

.swal2-close:hover {
  color: #0f172a !important;
}

.swal2-toast {
  border-radius: 12px !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

/* SweetAlert2 Dark Mode */
body.dark-mode .swal2-popup,
html.dark .swal2-popup,
.dark-mode .swal2-popup {
  background: #1e293b !important;
  color: #f8fafc !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6) !important;
}

body.dark-mode .swal2-title,
html.dark .swal2-title,
.dark-mode .swal2-title {
  color: #f8fafc !important;
}

body.dark-mode .swal2-html-container,
html.dark .swal2-html-container,
.dark-mode .swal2-html-container {
  color: #94a3b8 !important;
}

body.dark-mode .swal2-styled.swal2-cancel,
html.dark .swal2-styled.swal2-cancel,
.dark-mode .swal2-styled.swal2-cancel {
  background-color: #475569 !important;
  color: #f1f5f9 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .swal2-styled.swal2-cancel:hover,
html.dark .swal2-styled.swal2-cancel:hover,
.dark-mode .swal2-styled.swal2-cancel:hover {
  background-color: #334155 !important;
  color: #ffffff !important;
}

body.dark-mode .swal2-input,
body.dark-mode .swal2-textarea,
body.dark-mode .swal2-select {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

/* Settings Tab Section Titles: Crisp Black, Compact Font Size */
.settings-tab h5,
.settings-tab h5.text-primary,
.settings-tab .text-primary,
.settings-section-title,
h5.text-primary {
  color: #0f172a !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  line-height: 1.4 !important;
  margin-top: 4px;
  margin-bottom: 12px;
}

/* Content Card Radius Harmonization */
.settings-tab-card,
.users-card,
.table-content-card,
.profile-content-card,
.analytics-card {
  border-radius: 8px !important;
}

/* ========================================================
   Action Column Center Alignment & Layout
   ======================================================== */
.action-cell-wrapper {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin: 0 auto !important;
  text-align: center !important;
}

.action-btn-group {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

.center-items,
th.center-items,
td.center-items,
td:has(.edit-icon),
td:has(.delete-icon),
td:has(.view-icon),
td:has(.toggle-status),
td .text-center {
  text-align: center !important;
  vertical-align: middle !important;
}

td .text-center {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  margin: 0 auto !important;
}

/* ========================================================
   Modern iOS / Tailwind Toggle Switch
   ======================================================== */
.action-toggle-wrapper,
.checkbox-wrapper-34 {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  vertical-align: middle !important;
  margin: 0 4px !important;
}

.tgl {
  display: none !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
  pointer-events: none !important;
}

.tgl+.tgl-btn {
  outline: 0 !important;
  display: inline-block !important;
  width: 44px !important;
  height: 24px !important;
  position: relative !important;
  cursor: pointer !important;
  user-select: none !important;
  background: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 9999px !important;
  padding: 2px !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  margin: 0 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}

.tgl+.tgl-btn:after {
  position: absolute !important;
  content: "" !important;
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  top: 2px !important;
  left: 2px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.tgl:checked+.tgl-btn {
  background: var(--app-primary, #ea580c) !important;
  border-color: var(--app-primary, #ea580c) !important;
  box-shadow: 0 0 10px rgba(234, 88, 12, 0.3) !important;
}

.tgl:checked+.tgl-btn:after {
  left: 22px !important;
  background: #ffffff !important;
}

.tgl+.tgl-btn:hover {
  border-color: #94a3b8 !important;
}

.tgl:checked+.tgl-btn:hover {
  filter: brightness(1.06) !important;
}

/* Dark Mode Toggle Switch */
body.dark-mode .tgl+.tgl-btn,
html.dark .tgl+.tgl-btn,
.dark-mode .tgl+.tgl-btn {
  background: #334155 !important;
  border-color: #475569 !important;
}

body.dark-mode .tgl+.tgl-btn:after,
html.dark .tgl+.tgl-btn:after,
.dark-mode .tgl+.tgl-btn:after {
  background: #f8fafc !important;
}

body.dark-mode .tgl:checked+.tgl-btn,
html.dark .tgl:checked+.tgl-btn,
.dark-mode .tgl:checked+.tgl-btn {
  background: var(--app-primary, #ea580c) !important;
  border-color: var(--app-primary, #ea580c) !important;
}

/* All Tables Full Width & Crisp Borders Guarantee */
.settings-tab table,
.settings-tab .table,
.settings-tab .tg,
.tg,
table.tg {
  width: 100% !important;
  min-width: 100% !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  border: 1px solid #cbd5e1 !important;
  box-sizing: border-box !important;
  background-color: #ffffff !important;
}

.tg th {
  background-color: #f8fafc !important;
  color: #334155 !important;
  font-weight: 700 !important;
  padding: 10px 12px !important;
  border: 1px solid #cbd5e1 !important;
  font-size: 13px !important;
}

.tg td {
  padding: 8px 10px !important;
  border: 1px solid #cbd5e1 !important;
  vertical-align: middle !important;
  background-color: #ffffff !important;
}

.tg tr>th:first-child,
.tg tr>td:first-child {
  border-left: 1px solid #cbd5e1 !important;
}

.tg tr>th:last-child,
.tg tr>td:last-child {
  border-right: 1px solid #cbd5e1 !important;
}

.tg .row_title,
.tg td.row_title,
.tg td#row_title {
  font-weight: 600 !important;
  color: #1e293b !important;
  background-color: #f8fafc !important;
}

.tg td input.form-control,
.tg td input {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

body.dark-mode .tg,
body.dark-mode table.tg,
body.dark-mode .settings-tab table,
body.dark-mode .settings-tab .table,
html.dark .tg,
html.dark table.tg,
html.dark .settings-tab table,
html.dark .settings-tab .table,
.dark-mode .tg,
.dark-mode table.tg {
  border-color: #334155 !important;
  background-color: #0f172a !important;
}

body.dark-mode .tg th,
html.dark .tg th,
.dark-mode .tg th {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border: 1px solid #334155 !important;
}

body.dark-mode .tg td,
html.dark .tg td,
.dark-mode .tg td {
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
  background-color: #0f172a !important;
}

body.dark-mode .tg tr>th:first-child,
body.dark-mode .tg tr>td:first-child,
html.dark .tg tr>th:first-child,
html.dark .tg tr>td:first-child {
  border-left: 1px solid #334155 !important;
}

body.dark-mode .tg tr>th:last-child,
body.dark-mode .tg tr>td:last-child,
html.dark .tg tr>th:last-child,
html.dark .tg tr>td:last-child {
  border-right: 1px solid #334155 !important;
}

body.dark-mode .tg .row_title,
body.dark-mode .tg td.row_title,
body.dark-mode .tg td#row_title,
html.dark .tg .row_title,
html.dark .tg td.row_title {
  color: #f8fafc !important;
  background-color: #1e293b !important;
}

body.dark-mode .settings-tab h5,
body.dark-mode .settings-tab h5.text-primary,
body.dark-mode .settings-tab .text-primary,
body.dark-mode .settings-section-title,
body.dark-mode h5.text-primary,
html.dark .settings-tab h5,
html.dark .settings-tab h5.text-primary,
html.dark .settings-tab .text-primary,
html.dark .settings-section-title,
html.dark h5.text-primary {
  color: #f8fafc !important;
}

/* ========================================================
   Bootstrap Modal Layering, Solid Background & Modern Styling
   ======================================================== */
.modal-backdrop {
  z-index: 1040 !important;
  background-color: rgba(15, 23, 42, 0.55) !important;
  backdrop-filter: blur(3px) !important;
  opacity: 1 !important;
}

.modal {
  z-index: 1050 !important;
}

.modal-dialog {
  z-index: 1055 !important;
  margin: 2rem auto !important;
  max-width: 540px !important;
}

.modal-content {
  background-color: #ffffff !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 10px 15px -3px rgba(0, 0, 0, 0.08) !important;
  overflow: hidden !important;
  color: #1e293b !important;
  opacity: 1 !important;
}

.modal-header {
  background-color: #ffffff !important;
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 18px 24px !important;
  border-top-left-radius: 16px !important;
  border-top-right-radius: 16px !important;
}

.modal-title {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.01em !important;
}

.modal-body {
  background-color: #ffffff !important;
  padding: 24px !important;
  color: #334155 !important;
}

.modal-footer {
  background-color: #f8fafc !important;
  border-top: 1px solid #f1f5f9 !important;
  padding: 14px 24px !important;
  border-bottom-left-radius: 16px !important;
  border-bottom-right-radius: 16px !important;
}

/* Modal Form Inputs & Labels */
.modal-content label {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  margin-bottom: 6px !important;
}

.modal-content .form-control,
.modal-content .form-select,
.modal-content select {
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  color: #0f172a !important;
  font-size: 13.5px !important;
  padding: 9px 14px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  transition: all 0.15s ease !important;
}

.modal-content .form-control:focus,
.modal-content .form-select:focus,
.modal-content select:focus {
  border-color: var(--app-primary, #ea580c) !important;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15) !important;
  outline: none !important;
}

/* Modal Action Buttons */
.modal-content .btn-primary,
.modal-content input[type="submit"] {
  background-color: var(--app-primary, #ea580c) !important;
  border-color: var(--app-primary, #ea580c) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  border-radius: 8px !important;
  padding: 9px 20px !important;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.3) !important;
  transition: all 0.15s ease !important;
}

.modal-content .btn-primary:hover,
.modal-content input[type="submit"]:hover {
  filter: brightness(0.92) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.4) !important;
}

.modal-content .btn-secondary,
.modal-content .btn-success {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #475569 !important;
  font-weight: 500 !important;
  font-size: 13.5px !important;
  border-radius: 8px !important;
  padding: 8px 18px !important;
  transition: all 0.15s ease !important;
}

.modal-content .btn-secondary:hover,
.modal-content .btn-success:hover {
  background-color: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

/* Dark Mode Modals */
body.dark-mode .modal-content,
html.dark .modal-content,
.dark-mode .modal-content {
  background-color: #1e293b !important;
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75) !important;
}

body.dark-mode .modal-header,
html.dark .modal-header,
.dark-mode .modal-header {
  background-color: #1e293b !important;
  border-bottom: 1px solid #334155 !important;
}

body.dark-mode .modal-title,
html.dark .modal-title,
.dark-mode .modal-title {
  color: #f8fafc !important;
}

body.dark-mode .modal-body,
html.dark .modal-body,
.dark-mode .modal-body {
  background-color: #1e293b !important;
  color: #cbd5e1 !important;
}

body.dark-mode .modal-footer,
html.dark .modal-footer,
.dark-mode .modal-footer {
  background-color: #0f172a !important;
  border-top: 1px solid #334155 !important;
}

body.dark-mode .modal-content label,
html.dark .modal-content label {
  color: #94a3b8 !important;
}

body.dark-mode .modal-content .form-control,
body.dark-mode .modal-content .form-select,
body.dark-mode .modal-content select {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .modal-content .btn-secondary,
body.dark-mode .modal-content .btn-success {
  background-color: #334155 !important;
  border-color: #475569 !important;
  color: #cbd5e1 !important;
}

body.dark-mode .modal-content .btn-secondary:hover,
body.dark-mode .modal-content .btn-success:hover {
  background-color: #475569 !important;
  color: #ffffff !important;
}

body.dark-mode .btn-close,
html.dark .btn-close,
.dark-mode .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* ==========================================================================
   Sidebar Bottom Footer: Logout Action & Button
   ========================================================================== */
.sidebar-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--border-subtle, #eaedf1);
  background-color: var(--bg-sidebar, #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}

.explorer-sidebar.collapsed .sidebar-footer {
  display: none !important;
}

body.dark-mode .sidebar-footer,
html.dark .sidebar-footer {
  border-top-color: #1e293b !important;
  background-color: #0b1120 !important;
}

.sidebar-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 38px;
  padding: 0 14px;
  background-color: #fef2f2;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  color: #ef4444;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}

.sidebar-logout-btn:hover {
  background-color: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.sidebar-logout-btn .logout-icon {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  flex-shrink: 0;
}

body.dark-mode .sidebar-logout-btn,
html.dark .sidebar-logout-btn {
  background-color: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

body.dark-mode .sidebar-logout-btn:hover,
html.dark .sidebar-logout-btn:hover {
  background-color: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   Submit Buttons: Compact Size, Desktop Right Align, Mobile Full Width
   ========================================================================== */
.form-actions-row {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.submit-btn-compact,
.theme-primary-btn,
button.theme-primary-btn,
.settings-tab .submit-btn-compact,
.profile-content-card button[type="submit"] {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 16px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: normal !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.theme-secondary-btn {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 14px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: normal !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
}

@media (min-width: 769px) {
  .form-actions-row {
    justify-content: flex-end !important;
  }

  .form-actions-row .theme-primary-btn,
  .form-actions-row .submit-btn-compact {
    margin-left: auto;
  }
}

@media (max-width: 768px) {
  .form-actions-row {
    flex-direction: column-reverse !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .form-actions-row .theme-primary-btn,
  .form-actions-row .theme-secondary-btn,
  .form-actions-row .submit-btn-compact,
  .form-actions-row button[type="submit"],
  .form-actions-row input[type="submit"],
  .form-actions-row .btn {
    width: 100% !important;
    min-width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    text-align: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .form-actions-row .status-msg {
    width: 100% !important;
    justify-content: center !important;
    margin-right: 0 !important;
    text-align: center !important;
    margin-bottom: 4px !important;
  }

  .settings-tab .form-control:not([type="submit"]),
  .settings-tab select.form-control,
  .settings-tab input[type="text"],
  .settings-tab input[type="number"],
  .settings-tab input[type="password"],
  .settings-tab input[type="email"],
  .settings-tab select {
    margin-bottom: 14px !important;
  }

  .settings-tab .btn,
  .settings-tab input[type="submit"],
  .settings-tab button[type="submit"],
  .settings-tab .btn-primary,
  .settings-tab .col-md-3 input[type="submit"],
  .settings-tab .col-md-3 .btn,
  .settings-tab .col-md-3 button {
    width: 100% !important;
    margin-top: 14px !important;
    margin-bottom: 16px !important;
  }

  /* Mobile DataTables Search Bar: Full Width */
  .dataTables_wrapper .dataTables_filter {
    float: none !important;
    text-align: left !important;
    width: 100% !important;
    margin-bottom: 14px !important;
    display: block !important;
  }

  .dataTables_wrapper .dataTables_filter label {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .dataTables_wrapper .dataTables_filter input {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }

  .sales-dashboard-wrapper.content-center-container,
  .content-center-container,
  .sales-dashboard-wrapper {
    padding-left: 6px !important;
    padding-right: 6px !important;
    padding-bottom: calc(85px + env(safe-area-inset-bottom)) !important;
    margin-bottom: 30px !important;
  }
}



/* ==========================================================================
   GLOBAL REPORT & BOOTSTRAP MODERN INTEGRATION STYLES (SIDNI AUDIT)
   ========================================================================== */

/* Protect global navigation & layout from Bootstrap CSS overrides */
.explorer-sidebar a,
.primary-rail a,
.top-header a,
.node-row,
.rail-btn,
.sidebar-nav a,
.app-layout a {
  text-decoration: none !important;
}

/* Container & Filter Section Card */
.container-fluid {
  width: 100% !important;
  max-width: 100% !important;
  padding-right: 6px !important;
  padding-left: 6px !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  box-sizing: border-box !important;
}

.container-fluid>.row:first-of-type,
.card-report-filter {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-top: 16px;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

body.dark-mode .container-fluid>.row:first-of-type,
html.dark .container-fluid>.row:first-of-type,
html.dark-mode .container-fluid>.row:first-of-type,
.dark-mode .container-fluid>.row:first-of-type {
  background: #0f172a !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

.container-fluid h5 {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  border-left: 4px solid var(--app-primary, #ea580c);
  padding-left: 10px;
  margin-top: 12px;
  margin-bottom: 20px !important;
}

body.dark-mode .container-fluid h5,
html.dark .container-fluid h5,
html.dark-mode .container-fluid h5,
.dark-mode .container-fluid h5 {
  color: #f8fafc !important;
}

/* Form Labels & Required Indicators */
.form-label,
label.form-label,
.row label {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #334155;
  margin-bottom: 6px;
  display: inline-block;
}

body.dark-mode .form-label,
html.dark .form-label,
html.dark-mode .form-label,
.dark-mode .form-label,
body.dark-mode .row label,
html.dark .row label,
html.dark-mode .row label,
.dark-mode .row label {
  color: #cbd5e1 !important;
}

.required-input {
  color: #dc2626 !important;
  font-weight: 700;
  margin-left: 2px;
}

.hidden-input {
  visibility: hidden !important;
  display: block !important;
  height: 19px !important;
  line-height: 19px !important;
  margin-bottom: 6px !important;
  overflow: hidden;
}

/* Modern Rounded Selects & Inputs */
.form-control,
.form-select,
select.form-control,
input.form-control {
  height: 42px !important;
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  font-size: 13.5px !important;
  padding: 8px 12px !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

body.dark-mode .form-control,
html.dark .form-control,
html.dark-mode .form-control,
.dark-mode .form-control,
body.dark-mode .form-select,
html.dark .form-select,
html.dark-mode .form-select,
.dark-mode .form-select,
body.dark-mode select.form-control,
html.dark select.form-control,
html.dark-mode select.form-control,
.dark-mode select.form-control,
body.dark-mode input.form-control,
html.dark input.form-control,
html.dark-mode input.form-control,
.dark-mode input.form-control {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
  color-scheme: dark;
}

body.dark-mode .form-select option,
html.dark .form-select option,
html.dark-mode .form-select option,
.dark-mode .form-select option,
body.dark-mode select.form-control option,
html.dark select.form-control option,
html.dark-mode select.form-control option,
.dark-mode select.form-control option {
  background-color: #1e293b;
  color: #f8fafc;
}

.form-control:focus,
select.form-control:focus,
input.form-control:focus {
  border-color: var(--app-primary, #ea580c) !important;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.2) !important;
  outline: none !important;
}

.form-control:disabled:not(.automation-input):not(.automation-input-color):not(.color-pink):not(.glow-updated-input):not(.searchable-center-select-input),
select.form-control:disabled,
input.form-control:disabled:not(.automation-input):not(.automation-input-color):not(.color-pink):not(.glow-updated-input):not(.searchable-center-select-input),
.form-select:disabled,
.form-control[readonly]:not(.table-date-control):not(#filterMonth):not(.searchable-center-select-input),
input.form-control[readonly]:not(.table-date-control):not(#filterMonth):not(.searchable-center-select-input) {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  cursor: not-allowed !important;
  opacity: 0.9 !important;
}

body.dark-mode .form-control:disabled:not(.automation-input):not(.automation-input-color):not(.color-pink):not(.glow-updated-input):not(.searchable-center-select-input),
html.dark .form-control:disabled:not(.automation-input):not(.automation-input-color):not(.color-pink):not(.glow-updated-input):not(.searchable-center-select-input),
html.dark-mode .form-control:disabled:not(.automation-input):not(.automation-input-color):not(.color-pink):not(.glow-updated-input):not(.searchable-center-select-input),
.dark-mode .form-control:disabled:not(.automation-input):not(.automation-input-color):not(.color-pink):not(.glow-updated-input):not(.searchable-center-select-input),
body.dark-mode select.form-control:disabled,
html.dark select.form-control:disabled,
html.dark-mode select.form-control:disabled,
.dark-mode select.form-control:disabled,
body.dark-mode input.form-control:disabled:not(.automation-input):not(.automation-input-color):not(.color-pink):not(.glow-updated-input):not(.searchable-center-select-input),
html.dark input.form-control:disabled:not(.automation-input):not(.automation-input-color):not(.color-pink):not(.glow-updated-input):not(.searchable-center-select-input),
html.dark-mode input.form-control:disabled:not(.automation-input):not(.automation-input-color):not(.color-pink):not(.glow-updated-input):not(.searchable-center-select-input),
.dark-mode input.form-control:disabled:not(.automation-input):not(.automation-input-color):not(.color-pink):not(.glow-updated-input):not(.searchable-center-select-input),
body.dark-mode .form-select:disabled,
html.dark .form-select:disabled,
html.dark-mode .form-select:disabled,
.dark-mode .form-select:disabled,
body.dark-mode .form-control[readonly]:not(.table-date-control):not(#filterMonth):not(.searchable-center-select-input),
html.dark .form-control[readonly]:not(.table-date-control):not(#filterMonth):not(.searchable-center-select-input),
.dark-mode .form-control[readonly]:not(.table-date-control):not(#filterMonth):not(.searchable-center-select-input),
body.dark-mode input.form-control[readonly]:not(.table-date-control):not(#filterMonth):not(.searchable-center-select-input),
html.dark input.form-control[readonly]:not(.table-date-control):not(#filterMonth):not(.searchable-center-select-input),
.dark-mode input.form-control[readonly]:not(.table-date-control):not(#filterMonth):not(.searchable-center-select-input) {
  background-color: #141e30 !important;
  border-color: #2c3b52 !important;
  color: #cbd5e1 !important;
  -webkit-text-fill-color: #cbd5e1 !important;
  cursor: not-allowed !important;
  opacity: 0.92 !important;
}

/* Primary, Success, Danger Buttons */
.btn {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13.5px;
  border-radius: 8px;
  padding: 8px 18px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary,
button#filterBtn {
  height: 42px;
  background: var(--app-primary, #ea580c) !important;
  border: 1px solid var(--app-primary, #ea580c) !important;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 13.5px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(234, 88, 12, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-primary:hover,
button#filterBtn:hover {
  background: var(--app-primary-hover, #c2410c) !important;
  border-color: var(--app-primary-hover, #c2410c) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(234, 88, 12, 0.35);
}

.btn-success {
  background: #10b981 !important;
  border: 1px solid #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.btn-danger {
  background: #ef4444 !important;
  border: 1px solid #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* Report Table Container & Content Tables */
.report_content_tables {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 6px;
  margin-top: 20px;
  margin-bottom: 24px;
  overflow-x: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.report_content_tables:empty,
.report_content_tables:not(:has(*)),
.report_content_tables:not(:has(table, .alert, div, p, h4)) {
  display: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

body.dark-mode .report_content_tables,
html.dark .report_content_tables,
html.dark-mode .report_content_tables,
.dark-mode .report_content_tables {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #e2e8f0 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
  scrollbar-width: thin;
  scrollbar-color: #475569 #0f172a;
}

body.dark-mode .report_content_tables::-webkit-scrollbar,
html.dark .report_content_tables::-webkit-scrollbar,
html.dark-mode .report_content_tables::-webkit-scrollbar,
.dark-mode .report_content_tables::-webkit-scrollbar {
  height: 8px;
}

body.dark-mode .report_content_tables::-webkit-scrollbar-track,
html.dark .report_content_tables::-webkit-scrollbar-track,
html.dark-mode .report_content_tables::-webkit-scrollbar-track,
.dark-mode .report_content_tables::-webkit-scrollbar-track {
  background: #0f172a;
  border-radius: 4px;
}

body.dark-mode .report_content_tables::-webkit-scrollbar-thumb,
html.dark .report_content_tables::-webkit-scrollbar-thumb,
html.dark-mode .report_content_tables::-webkit-scrollbar-thumb,
.dark-mode .report_content_tables::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 4px;
}

.report_content_tables table,
.report_content_tables table.tg,
.report_content_tables .tg {
  width: 100% !important;
  border-collapse: collapse !important;
  border: 1px solid #cbd5e1 !important;
  margin-bottom: 20px !important;
  font-size: 12.5px;
}

.report_content_tables table th,
.report_content_tables table td,
.report_content_tables .tg th,
.report_content_tables .tg td {
  padding: 8px 10px !important;
  border: 1px solid #cbd5e1 !important;
  vertical-align: middle;
}

.report_content_tables table tr>th:first-child,
.report_content_tables table tr>td:first-child,
.report_content_tables .tg tr>th:first-child,
.report_content_tables .tg tr>td:first-child {
  border-left: 1px solid #cbd5e1 !important;
}

.report_content_tables table tr>th:last-child,
.report_content_tables table tr>td:last-child,
.report_content_tables .tg tr>th:last-child,
.report_content_tables .tg tr>td:last-child {
  border-right: 1px solid #cbd5e1 !important;
}

.report_content_tables table.no-border,
.report_content_tables table.no-border tr,
.report_content_tables table.no-border th,
.report_content_tables table.no-border td,
.report_content_tables table.no-border tr>th:first-child,
.report_content_tables table.no-border tr>td:first-child,
.report_content_tables table.no-border tr>th:last-child,
.report_content_tables table.no-border tr>td:last-child {
  border: none !important;
  background-color: transparent !important;
}

body.dark-mode .report_content_tables table,
body.dark-mode .report_content_tables table.tg,
body.dark-mode .report_content_tables .tg,
body.dark-mode #overall_content table,
body.dark-mode #overall_content .tg,
html.dark .report_content_tables table,
html.dark .report_content_tables table.tg,
html.dark .report_content_tables .tg,
html.dark #overall_content table,
html.dark #overall_content .tg,
html.dark-mode .report_content_tables table,
html.dark-mode .report_content_tables table.tg,
html.dark-mode .report_content_tables .tg,
html.dark-mode #overall_content table,
html.dark-mode #overall_content .tg,
.dark-mode .report_content_tables table,
.dark-mode .report_content_tables table.tg,
.dark-mode .report_content_tables .tg,
.dark-mode #overall_content table,
.dark-mode #overall_content .tg {
  background-color: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

body.dark-mode .report_content_tables table th,
body.dark-mode .report_content_tables table td,
body.dark-mode .report_content_tables .tg th,
body.dark-mode .report_content_tables .tg td,
body.dark-mode #overall_content table th,
body.dark-mode #overall_content table td,
html.dark .report_content_tables table th,
html.dark .report_content_tables table td,
html.dark .report_content_tables .tg th,
html.dark .report_content_tables .tg td,
html.dark #overall_content table th,
html.dark #overall_content table td,
html.dark-mode .report_content_tables table th,
html.dark-mode .report_content_tables table td,
html.dark-mode .report_content_tables .tg th,
html.dark-mode .report_content_tables .tg td,
html.dark-mode #overall_content table th,
html.dark-mode #overall_content table td,
.dark-mode .report_content_tables table th,
.dark-mode .report_content_tables table td,
.dark-mode .report_content_tables .tg th,
.dark-mode .report_content_tables .tg td,
.dark-mode #overall_content table th,
.dark-mode #overall_content table td {
  border-color: #334155 !important;
}

body.dark-mode .report_content_tables table tr>th:first-child,
body.dark-mode .report_content_tables table tr>td:first-child,
body.dark-mode .report_content_tables .tg tr>th:first-child,
body.dark-mode .report_content_tables .tg tr>td:first-child,
html.dark .report_content_tables table tr>th:first-child,
html.dark .report_content_tables table tr>td:first-child,
html.dark .report_content_tables .tg tr>th:first-child,
html.dark .report_content_tables .tg tr>td:first-child,
html.dark-mode .report_content_tables table tr>th:first-child,
html.dark-mode .report_content_tables table tr>td:first-child,
html.dark-mode .report_content_tables .tg tr>th:first-child,
html.dark-mode .report_content_tables .tg tr>td:first-child,
.dark-mode .report_content_tables table tr>th:first-child,
.dark-mode .report_content_tables table tr>td:first-child,
.dark-mode .report_content_tables .tg tr>th:first-child,
.dark-mode .report_content_tables .tg tr>td:first-child {
  border-left-color: #334155 !important;
}

body.dark-mode .report_content_tables table tr>th:last-child,
body.dark-mode .report_content_tables table tr>td:last-child,
body.dark-mode .report_content_tables .tg tr>th:last-child,
body.dark-mode .report_content_tables .tg tr>td:last-child,
html.dark .report_content_tables table tr>th:last-child,
html.dark .report_content_tables table tr>td:last-child,
html.dark .report_content_tables .tg tr>th:last-child,
html.dark .report_content_tables .tg tr>td:last-child,
html.dark-mode .report_content_tables table tr>th:last-child,
html.dark-mode .report_content_tables table tr>td:last-child,
html.dark-mode .report_content_tables .tg tr>th:last-child,
html.dark-mode .report_content_tables .tg tr>td:last-child,
.dark-mode .report_content_tables table tr>th:last-child,
.dark-mode .report_content_tables table tr>td:last-child,
.dark-mode .report_content_tables .tg tr>th:last-child,
.dark-mode .report_content_tables .tg tr>td:last-child {
  border-right-color: #334155 !important;
}

.report_content_tables table th,
.report_content_tables .tg th {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
  font-weight: 700;
}

body.dark-mode .report_content_tables table th,
body.dark-mode .report_content_tables .tg th,
body.dark-mode #overall_content table th,
body.dark-mode #overall_content .tg th,
html.dark .report_content_tables table th,
html.dark .report_content_tables .tg th,
html.dark #overall_content table th,
html.dark #overall_content .tg th,
html.dark-mode .report_content_tables table th,
html.dark-mode .report_content_tables .tg th,
html.dark-mode #overall_content table th,
html.dark-mode #overall_content .tg th,
.dark-mode .report_content_tables table th,
.dark-mode .report_content_tables .tg th,
.dark-mode #overall_content table th,
.dark-mode #overall_content .tg th {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-mode .report_content_tables table tbody tr,
body.dark-mode .report_content_tables table td,
body.dark-mode .report_content_tables .tg td,
body.dark-mode #overall_content table tbody tr,
body.dark-mode #overall_content table td,
body.dark-mode #overall_content .tg td,
html.dark .report_content_tables table tbody tr,
html.dark .report_content_tables table td,
html.dark .report_content_tables .tg td,
html.dark #overall_content table tbody tr,
html.dark #overall_content table td,
html.dark #overall_content .tg td,
html.dark-mode .report_content_tables table tbody tr,
html.dark-mode .report_content_tables table td,
html.dark-mode .report_content_tables .tg td,
html.dark-mode #overall_content table tbody tr,
html.dark-mode #overall_content table td,
html.dark-mode #overall_content .tg td,
.dark-mode .report_content_tables table tbody tr,
.dark-mode .report_content_tables table td,
.dark-mode .report_content_tables .tg td,
.dark-mode #overall_content table tbody tr,
.dark-mode #overall_content table td,
.dark-mode #overall_content .tg td {
  background-color: #0f172a !important;
  color: #e2e8f0 !important;
}

body.dark-mode .report_content_tables table td.th-bg,
body.dark-mode #overall_content table td.th-bg,
html.dark .report_content_tables table td.th-bg,
html.dark #overall_content table td.th-bg,
html.dark-mode .report_content_tables table td.th-bg,
html.dark-mode #overall_content table td.th-bg,
.dark-mode .report_content_tables table td.th-bg,
.dark-mode #overall_content table td.th-bg {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-mode .report_content_tables table tr.table-secondary td,
body.dark-mode .report_content_tables table tfoot td,
body.dark-mode .report_content_tables table tfoot th,
body.dark-mode .report_content_tables .tg .row_title,
body.dark-mode .report_content_tables .tg td.row_title,
body.dark-mode .report_content_tables .tg td#row_title,
html.dark .report_content_tables table tr.table-secondary td,
html.dark .report_content_tables table tfoot td,
html.dark .report_content_tables table tfoot th,
html.dark .report_content_tables .tg .row_title,
html.dark .report_content_tables .tg td.row_title,
html.dark .report_content_tables .tg td#row_title,
html.dark-mode .report_content_tables table tr.table-secondary td,
html.dark-mode .report_content_tables table tfoot td,
html.dark-mode .report_content_tables table tfoot th,
html.dark-mode .report_content_tables .tg .row_title,
html.dark-mode .report_content_tables .tg td.row_title,
html.dark-mode .report_content_tables .tg td#row_title,
.dark-mode .report_content_tables table tr.table-secondary td,
.dark-mode .report_content_tables table tfoot td,
.dark-mode .report_content_tables table tfoot th,
.dark-mode .report_content_tables .tg .row_title,
.dark-mode .report_content_tables .tg td.row_title,
.dark-mode .report_content_tables .tg td#row_title {
  background-color: #162032 !important;
  color: #f8fafc !important;
}

body.dark-mode .report_content_tables table.table-striped>tbody>tr:nth-of-type(odd)>*,
body.dark-mode #overall_content table.table-striped>tbody>tr:nth-of-type(odd)>*,
html.dark .report_content_tables table.table-striped>tbody>tr:nth-of-type(odd)>*,
html.dark #overall_content table.table-striped>tbody>tr:nth-of-type(odd)>*,
html.dark-mode .report_content_tables table.table-striped>tbody>tr:nth-of-type(odd)>*,
html.dark-mode #overall_content table.table-striped>tbody>tr:nth-of-type(odd)>*,
.dark-mode .report_content_tables table.table-striped>tbody>tr:nth-of-type(odd)>*,
.dark-mode #overall_content table.table-striped>tbody>tr:nth-of-type(odd)>* {
  --bs-table-accent-bg: #141e30;
  background-color: #141e30 !important;
  color: #e2e8f0 !important;
}

body.dark-mode .report_content_tables thead.table-primary th,
body.dark-mode .report_content_tables tr.table-primary th,
body.dark-mode .report_content_tables tr.table-primary td,
html.dark .report_content_tables thead.table-primary th,
html.dark .report_content_tables tr.table-primary th,
html.dark .report_content_tables tr.table-primary td,
html.dark-mode .report_content_tables thead.table-primary th,
html.dark-mode .report_content_tables tr.table-primary th,
html.dark-mode .report_content_tables tr.table-primary td,
.dark-mode .report_content_tables thead.table-primary th,
.dark-mode .report_content_tables tr.table-primary th,
.dark-mode .report_content_tables tr.table-primary td {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

body.dark-mode .report_content_tables table.no-border,
body.dark-mode .report_content_tables table.no-border tbody tr,
body.dark-mode .report_content_tables table.no-border th,
body.dark-mode .report_content_tables table.no-border td,
html.dark .report_content_tables table.no-border,
html.dark .report_content_tables table.no-border tbody tr,
html.dark .report_content_tables table.no-border th,
html.dark .report_content_tables table.no-border td,
html.dark-mode .report_content_tables table.no-border,
html.dark-mode .report_content_tables table.no-border tbody tr,
html.dark-mode .report_content_tables table.no-border th,
html.dark-mode .report_content_tables table.no-border td,
.dark-mode .report_content_tables table.no-border,
.dark-mode .report_content_tables table.no-border tbody tr,
.dark-mode .report_content_tables table.no-border th,
.dark-mode .report_content_tables table.no-border td {
  border: none !important;
  background-color: transparent !important;
  color: #e2e8f0 !important;
}

body.dark-mode .report_content_tables h1,
body.dark-mode .report_content_tables h2,
body.dark-mode .report_content_tables h3,
body.dark-mode .report_content_tables h4,
body.dark-mode .report_content_tables h5,
body.dark-mode .report_content_tables h6,
body.dark-mode .report_content_tables p,
body.dark-mode .report_content_tables li,
body.dark-mode .report_content_tables strong,
body.dark-mode .report_content_tables .infos,
body.dark-mode .report_content_tables .infos *,
body.dark-mode .report_content_tables .heading_text,
body.dark-mode .report_content_tables .center_no_title,
body.dark-mode .report_content_tables .table-topic,
body.dark-mode #overall_content h1,
body.dark-mode #overall_content h2,
body.dark-mode #overall_content h3,
body.dark-mode #overall_content h4,
body.dark-mode #overall_content h5,
body.dark-mode #overall_content h6,
body.dark-mode #overall_content p,
body.dark-mode #overall_content li,
body.dark-mode #overall_content strong,
body.dark-mode #overall_content .infos,
body.dark-mode #overall_content .infos *,
body.dark-mode #overall_content .heading_text,
body.dark-mode #overall_content .center_no_title,
body.dark-mode #overall_content .table-topic,
html.dark .report_content_tables h1,
html.dark .report_content_tables h2,
html.dark .report_content_tables h3,
html.dark .report_content_tables h4,
html.dark .report_content_tables h5,
html.dark .report_content_tables h6,
html.dark .report_content_tables p,
html.dark .report_content_tables li,
html.dark .report_content_tables strong,
html.dark .report_content_tables .infos,
html.dark .report_content_tables .infos *,
html.dark .report_content_tables .heading_text,
html.dark .report_content_tables .center_no_title,
html.dark .report_content_tables .table-topic,
html.dark-mode .report_content_tables h1,
html.dark-mode .report_content_tables h2,
html.dark-mode .report_content_tables h3,
html.dark-mode .report_content_tables h4,
html.dark-mode .report_content_tables h5,
html.dark-mode .report_content_tables h6,
html.dark-mode .report_content_tables p,
html.dark-mode .report_content_tables li,
html.dark-mode .report_content_tables strong,
html.dark-mode .report_content_tables .infos,
html.dark-mode .report_content_tables .infos *,
html.dark-mode .report_content_tables .heading_text,
html.dark-mode .report_content_tables .center_no_title,
html.dark-mode .report_content_tables .table-topic,
.dark-mode .report_content_tables h1,
.dark-mode .report_content_tables h2,
.dark-mode .report_content_tables h3,
.dark-mode .report_content_tables h4,
.dark-mode .report_content_tables h5,
.dark-mode .report_content_tables h6,
.dark-mode .report_content_tables p,
.dark-mode .report_content_tables li,
.dark-mode .report_content_tables strong,
.dark-mode .report_content_tables .infos,
.dark-mode .report_content_tables .infos *,
.dark-mode .report_content_tables .heading_text,
.dark-mode .report_content_tables .center_no_title,
.dark-mode .report_content_tables .table-topic {
  color: #f1f5f9 !important;
}

body.dark-mode .report_content_tables hr,
body.dark-mode #overall_content hr,
html.dark .report_content_tables hr,
html.dark-mode .report_content_tables hr,
.dark-mode .report_content_tables hr {
  border-color: #334155 !important;
  opacity: 1;
}

body.dark-mode .report_content_tables span[style*="#0070c0" i],
html.dark .report_content_tables span[style*="#0070c0" i],
html.dark-mode .report_content_tables span[style*="#0070c0" i],
.dark-mode .report_content_tables span[style*="#0070c0" i] {
  color: #60a5fa !important;
}

body.dark-mode .report_content_tables span[style*="#ff0000" i],
html.dark .report_content_tables span[style*="#ff0000" i],
html.dark-mode .report_content_tables span[style*="#ff0000" i],
.dark-mode .report_content_tables span[style*="#ff0000" i] {
  color: #f87171 !important;
}

body.dark-mode #paymentStatusTable select.payment-status-select,
html.dark #paymentStatusTable select.payment-status-select,
html.dark-mode #paymentStatusTable select.payment-status-select,
.dark-mode #paymentStatusTable select.payment-status-select {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

.report-payment-notice {
  font-size: 16px;
  font-weight: bold;
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
  padding: 10px;
}

body.dark-mode .report-payment-notice,
html.dark .report-payment-notice,
html.dark-mode .report-payment-notice,
.dark-mode .report-payment-notice {
  background-color: #451a03 !important;
  border-color: #b45309 !important;
  color: #fcd34d !important;
}

body.dark-mode .report_content_tables .alert-info,
html.dark .report_content_tables .alert-info,
html.dark-mode .report_content_tables .alert-info,
.dark-mode .report_content_tables .alert-info {
  background-color: #0c4a6e !important;
  border-color: #0284c7 !important;
  color: #e0f2fe !important;
}

body.dark-mode .report-empty-row,
html.dark .report-empty-row,
html.dark-mode .report-empty-row,
.dark-mode .report-empty-row {
  color: #94a3b8 !important;
}

/* Product Checkboxes in Center Report */
.checked_product {
  width: 18px;
  height: 18px;
  accent-color: var(--app-primary, #ea580c);
  cursor: pointer;
  vertical-align: middle;
  margin-left: 6px;
}

/* ==========================================================================
   REPORT MODULE - COMPREHENSIVE MODERN SIDNI STYLES
   ========================================================================== */

/* Report Page Container & Blade View Global Widths */
.report-page-wrapper,
.audit-list-wrapper,
.blank-form-wrapper,
.daily-audit-wrapper,
.sales-dashboard-wrapper,
.content-center-container,
.report-container,
.container-fluid {
  padding-left: 6px !important;
  padding-right: 6px !important;
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

/* Breadcrumbs & Header Actions Bar */
.report-header-bar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  margin-bottom: 16px !important;
}

.report-breadcrumbs {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 13.5px !important;
  color: #64748b !important;
  font-weight: 500 !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.report-breadcrumbs a {
  color: #64748b !important;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

.report-breadcrumbs a:hover {
  color: var(--app-primary, #ea580c) !important;
}

.report-breadcrumbs .separator {
  color: #cbd5e1 !important;
}

.report-breadcrumbs .current {
  color: var(--app-primary, #ea580c) !important;
  font-weight: 600 !important;
}

/* Action Buttons (Print, Excel, Refresh) - Removed across all report blades */
.report-action-btn,
#topPrintBtn,
#topExcelBtn,
#topRefreshBtn {
  display: none !important;
}

/* Hide raw purple legacy h5 headings */
.container-fluid>h5[style*="indigo"],
.container-fluid>h5.mb-5 {
  display: none !important;
}

/* Report Filter Card & Row Normalization */
.card-report-filter {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  margin-top: 8px !important;
  margin-bottom: 20px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  display: block !important;
  width: 100% !important;
  padding: 0 !important;
}

.card-report-filter>.card-body {
  width: 100% !important;
  padding: 18px 20px !important;
  display: block !important;
  box-sizing: border-box !important;
}

.container-fluid>.row:first-of-type {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 18px 20px !important;
  margin-top: 8px !important;
  margin-bottom: 20px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  align-items: flex-end !important;
  gap: 0 !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.dark-mode .card-report-filter,
html.dark .card-report-filter,
html.dark-mode .card-report-filter,
.dark-mode .card-report-filter,
body.dark-mode .container-fluid>.row:first-of-type,
html.dark .container-fluid>.row:first-of-type,
html.dark-mode .container-fluid>.row:first-of-type,
.dark-mode .container-fluid>.row:first-of-type {
  background: #0f172a !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

body.dark-mode .card-report-filter .border-top,
body.dark-mode .card-report-filter .border-bottom,
html.dark .card-report-filter .border-top,
html.dark .card-report-filter .border-bottom,
html.dark-mode .card-report-filter .border-top,
html.dark-mode .card-report-filter .border-bottom,
.dark-mode .card-report-filter .border-top,
.dark-mode .card-report-filter .border-bottom {
  border-color: #1e293b !important;
}

body.dark-mode .report-header-bar .breadcrumb-item a,
body.dark-mode .report-breadcrumbs a,
html.dark .report-header-bar .breadcrumb-item a,
html.dark .report-breadcrumbs a,
html.dark-mode .report-header-bar .breadcrumb-item a,
html.dark-mode .report-breadcrumbs a,
.dark-mode .report-header-bar .breadcrumb-item a,
.dark-mode .report-breadcrumbs a {
  color: #94a3b8 !important;
}

body.dark-mode .report-header-bar .breadcrumb-item a:hover,
body.dark-mode .report-breadcrumbs a:hover,
html.dark .report-header-bar .breadcrumb-item a:hover,
html.dark .report-breadcrumbs a:hover,
html.dark-mode .report-header-bar .breadcrumb-item a:hover,
html.dark-mode .report-breadcrumbs a:hover,
.dark-mode .report-header-bar .breadcrumb-item a:hover,
.dark-mode .report-breadcrumbs a:hover {
  color: var(--app-primary-light, #fb923c) !important;
}

/* 3-Column Grid for All Inputs & Buttons in Report Filter (4 per row on desktop) */
.card-report-filter .row {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  align-items: flex-end !important;
  width: 100% !important;
  margin-left: -8px !important;
  margin-right: -8px !important;
  gap: 0 !important;
}

.card-report-filter .col-md-3,
.container-fluid>.row:first-of-type>.col-md-3,
.card-report-filter [class*="col-md-3"],
.container-fluid>.row:first-of-type>[class*="col-md-3"] {
  padding-left: 8px !important;
  padding-right: 8px !important;
  margin-bottom: 14px !important;
  box-sizing: border-box !important;
}

.card-report-filter .ms-auto,
.container-fluid>.row:first-of-type .ms-auto {
  margin-left: auto !important;
}

@media (min-width: 1025px) {

  .card-report-filter .col-md-3,
  .container-fluid>.row:first-of-type>.col-md-3,
  .card-report-filter [class*="col-md-3"],
  .container-fluid>.row:first-of-type>[class*="col-md-3"] {
    flex: 0 0 25% !important;
    max-width: 25% !important;
    width: 25% !important;
  }

  .card-report-filter .col-md-6,
  .container-fluid>.row:first-of-type>.col-md-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
  }

  .card-report-filter .col-md-9,
  .container-fluid>.row:first-of-type>.col-md-9 {
    flex: 0 0 75% !important;
    max-width: 75% !important;
    width: 75% !important;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {

  .card-report-filter .col-md-3,
  .container-fluid>.row:first-of-type>.col-md-3,
  .card-report-filter [class*="col-md-3"],
  .container-fluid>.row:first-of-type>[class*="col-md-3"] {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
  }

  .card-report-filter .col-md-6,
  .container-fluid>.row:first-of-type>.col-md-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
  }
}

@media (max-width: 640px) {

  .card-report-filter .col-md-3,
  .container-fluid>.row:first-of-type>.col-md-3,
  .card-report-filter [class*="col-md-3"],
  .container-fluid>.row:first-of-type>[class*="col-md-3"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}

.card-report-filter .col-md-3 .btn,
.container-fluid>.row:first-of-type>.col-md-3 .btn,
.card-report-filter .col-md-3 #filterBtn,
.container-fluid>.row:first-of-type>.col-md-3 #filterBtn,
.card-report-filter .col-md-3 #centerFilterBtn,
.container-fluid>.row:first-of-type>.col-md-3 #centerFilterBtn {
  width: 100% !important;
  height: 42px !important;
}

/* Filter Labels */
.container-fluid>.row:first-of-type label,
.card-report-filter label {
  display: block !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  margin-bottom: 6px !important;
  white-space: nowrap !important;
}

body.dark-mode .container-fluid>.row:first-of-type label,
html.dark .container-fluid>.row:first-of-type label,
html.dark-mode .container-fluid>.row:first-of-type label,
.dark-mode .container-fluid>.row:first-of-type label,
body.dark-mode .card-report-filter label,
html.dark .card-report-filter label,
html.dark-mode .card-report-filter label,
.dark-mode .card-report-filter label {
  color: #cbd5e1 !important;
}

.required-input {
  color: #dc2626 !important;
  font-weight: 700;
  margin-left: 2px;
}

/* Suppress dummy dot label from legacy forms */
.hidden-input,
label.hidden-input {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

/* Modern Select & Input Styling */
.container-fluid>.row:first-of-type select.form-control,
.container-fluid>.row:first-of-type select.form-select,
.container-fluid>.row:first-of-type input.form-control,
.card-report-filter select.form-control,
.card-report-filter select.form-select,
.card-report-filter input.form-control {
  height: 42px !important;
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  padding: 0 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  outline: none !important;
  transition: all 0.15s ease !important;
}

.container-fluid>.row:first-of-type select.form-control:focus,
.container-fluid>.row:first-of-type select.form-select:focus,
.container-fluid>.row:first-of-type input.form-control:focus,
.card-report-filter select.form-control:focus,
.card-report-filter select.form-select:focus,
.card-report-filter input.form-control:focus {
  border-color: var(--app-primary, #ea580c) !important;
  box-shadow: 0 0 0 3px var(--app-primary-glow, rgba(234, 88, 12, 0.15)) !important;
}

body.dark-mode .container-fluid>.row:first-of-type select.form-control,
body.dark-mode .container-fluid>.row:first-of-type select.form-select,
body.dark-mode .container-fluid>.row:first-of-type input.form-control,
html.dark .container-fluid>.row:first-of-type select.form-control,
html.dark .container-fluid>.row:first-of-type select.form-select,
html.dark .container-fluid>.row:first-of-type input.form-control,
html.dark-mode .container-fluid>.row:first-of-type select.form-control,
html.dark-mode .container-fluid>.row:first-of-type select.form-select,
html.dark-mode .container-fluid>.row:first-of-type input.form-control,
.dark-mode .container-fluid>.row:first-of-type select.form-control,
.dark-mode .container-fluid>.row:first-of-type select.form-select,
.dark-mode .container-fluid>.row:first-of-type input.form-control,
body.dark-mode .card-report-filter select.form-control,
body.dark-mode .card-report-filter select.form-select,
body.dark-mode .card-report-filter input.form-control,
html.dark .card-report-filter select.form-control,
html.dark .card-report-filter select.form-select,
html.dark .card-report-filter input.form-control,
html.dark-mode .card-report-filter select.form-control,
html.dark-mode .card-report-filter select.form-select,
html.dark-mode .card-report-filter input.form-control,
.dark-mode .card-report-filter select.form-control,
.dark-mode .card-report-filter select.form-select,
.dark-mode .card-report-filter input.form-control {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
  color-scheme: dark;
}

.container-fluid>.row:first-of-type select.form-control:disabled,
.container-fluid>.row:first-of-type select.form-select:disabled,
.container-fluid>.row:first-of-type input.form-control:disabled,
.container-fluid>.row:first-of-type input.form-control[readonly]:not(.table-date-control):not(#filterMonth):not(.searchable-center-select-input),
.card-report-filter select.form-control:disabled,
.card-report-filter select.form-select:disabled,
.card-report-filter input.form-control:disabled,
.card-report-filter input.form-control[readonly]:not(.table-date-control):not(#filterMonth):not(.searchable-center-select-input) {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  cursor: not-allowed !important;
  opacity: 0.9 !important;
}

body.dark-mode .container-fluid>.row:first-of-type select.form-control:disabled,
body.dark-mode .container-fluid>.row:first-of-type select.form-select:disabled,
body.dark-mode .container-fluid>.row:first-of-type input.form-control:disabled,
body.dark-mode .container-fluid>.row:first-of-type input.form-control[readonly]:not(.table-date-control):not(#filterMonth):not(.searchable-center-select-input),
html.dark .container-fluid>.row:first-of-type select.form-control:disabled,
html.dark .container-fluid>.row:first-of-type select.form-select:disabled,
html.dark .container-fluid>.row:first-of-type input.form-control:disabled,
html.dark .container-fluid>.row:first-of-type input.form-control[readonly]:not(.table-date-control):not(#filterMonth):not(.searchable-center-select-input),
html.dark-mode .container-fluid>.row:first-of-type select.form-control:disabled,
html.dark-mode .container-fluid>.row:first-of-type select.form-select:disabled,
html.dark-mode .container-fluid>.row:first-of-type input.form-control:disabled,
html.dark-mode .container-fluid>.row:first-of-type input.form-control[readonly]:not(.table-date-control):not(#filterMonth):not(.searchable-center-select-input),
.dark-mode .container-fluid>.row:first-of-type select.form-control:disabled,
.dark-mode .container-fluid>.row:first-of-type select.form-select:disabled,
.dark-mode .container-fluid>.row:first-of-type input.form-control:disabled,
.dark-mode .container-fluid>.row:first-of-type input.form-control[readonly]:not(.table-date-control):not(#filterMonth):not(.searchable-center-select-input),
body.dark-mode .card-report-filter select.form-control:disabled,
body.dark-mode .card-report-filter select.form-select:disabled,
body.dark-mode .card-report-filter input.form-control:disabled,
body.dark-mode .card-report-filter input.form-control[readonly]:not(.table-date-control):not(#filterMonth):not(.searchable-center-select-input),
html.dark .card-report-filter select.form-control:disabled,
html.dark .card-report-filter select.form-select:disabled,
html.dark .card-report-filter input.form-control:disabled,
html.dark .card-report-filter input.form-control[readonly]:not(.table-date-control):not(#filterMonth):not(.searchable-center-select-input),
html.dark-mode .card-report-filter select.form-control:disabled,
html.dark-mode .card-report-filter select.form-select:disabled,
html.dark-mode .card-report-filter input.form-control:disabled,
html.dark-mode .card-report-filter input.form-control[readonly]:not(.table-date-control):not(#filterMonth):not(.searchable-center-select-input),
.dark-mode .card-report-filter select.form-control:disabled,
.dark-mode .card-report-filter select.form-select:disabled,
.dark-mode .card-report-filter input.form-control:disabled,
.dark-mode .card-report-filter input.form-control[readonly]:not(.table-date-control):not(#filterMonth):not(.searchable-center-select-input) {
  background-color: #141e30 !important;
  border-color: #2c3b52 !important;
  color: #cbd5e1 !important;
  -webkit-text-fill-color: #cbd5e1 !important;
  cursor: not-allowed !important;
  opacity: 0.92 !important;
}

/* Filter Generate / Search Button (Orange) */
#filterBtn,
.btn-generate-report {
  height: 42px !important;
  padding: 0 22px !important;
  border-radius: 8px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  background: var(--app-primary, #ea580c) !important;
  border: 1px solid var(--app-primary, #ea580c) !important;
  color: #ffffff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.25) !important;
  width: 100% !important;
}

#filterBtn:hover,
.btn-generate-report:hover {
  background: var(--app-primary-hover, #c2410c) !important;
  border-color: var(--app-primary-hover, #c2410c) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.35) !important;
}

/* Empty State Guidance Card */
.report-empty-state {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 48px 24px !important;
  text-align: center !important;
  margin: 20px 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
}

body.dark-mode .report-empty-state,
html.dark .report-empty-state,
html.dark-mode .report-empty-state,
.dark-mode .report-empty-state {
  background: #0f172a !important;
  border-color: #1e293b !important;
}

.report-empty-state .empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--app-primary-bg, #fff7ed);
  color: var(--app-primary, #ea580c);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 16px;
}

.report-empty-state h4 {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  margin-bottom: 8px !important;
}

body.dark-mode .report-empty-state h4,
html.dark .report-empty-state h4,
html.dark-mode .report-empty-state h4,
.dark-mode .report-empty-state h4 {
  color: #f8fafc !important;
}

.report-empty-state p {
  color: #64748b !important;
  font-size: 14px !important;
  max-width: 600px;
  margin: 0 auto 20px auto !important;
  line-height: 1.5;
}

body.dark-mode .report-empty-state p,
html.dark .report-empty-state p,
html.dark-mode .report-empty-state p,
.dark-mode .report-empty-state p {
  color: #94a3b8 !important;
}

.report-empty-state .steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #64748b;
  flex-wrap: wrap;
}

.report-empty-state .steps strong {
  color: #334155;
}

body.dark-mode .report-empty-state .steps strong,
html.dark .report-empty-state .steps strong,
html.dark-mode .report-empty-state .steps strong,
.dark-mode .report-empty-state .steps strong {
  color: #f1f5f9;
}

/* Secondary Action Rows (#downloadRow, #moreView, #reportResultToolbar) */
#downloadRow,
#moreView {
  margin-top: 16px !important;
  margin-bottom: 16px !important;
}

/* Report Result Header & Action Toolbar */
#reportResultToolbar {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

#reportResultToolbar .card-body {
  background: transparent !important;
}

#reportResultToolbar #reportHeaderMeta {
  color: #475569 !important;
}

#reportResultToolbar #reportHeaderMeta i {
  color: #64748b !important;
}

/* Dark Mode for Report Result Toolbar */
body.dark-mode #reportResultToolbar,
html.dark #reportResultToolbar,
html.dark-mode #reportResultToolbar,
.dark-mode #reportResultToolbar {
  background: #0f172a !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

body.dark-mode #reportResultToolbar .badge,
html.dark #reportResultToolbar .badge,
html.dark-mode #reportResultToolbar .badge,
.dark-mode #reportResultToolbar .badge {
  background: rgba(234, 88, 12, 0.18) !important;
  color: #fb923c !important;
  border: 1px solid rgba(234, 88, 12, 0.3) !important;
}

body.dark-mode #reportResultToolbar #reportHeaderMeta,
html.dark #reportResultToolbar #reportHeaderMeta,
html.dark-mode #reportResultToolbar #reportHeaderMeta,
.dark-mode #reportResultToolbar #reportHeaderMeta,
body.dark-mode #reportResultToolbar .text-muted,
html.dark #reportResultToolbar .text-muted,
html.dark-mode #reportResultToolbar .text-muted,
.dark-mode #reportResultToolbar .text-muted {
  color: #cbd5e1 !important;
}

body.dark-mode #reportResultToolbar #reportHeaderMeta i,
html.dark #reportResultToolbar #reportHeaderMeta i,
html.dark-mode #reportResultToolbar #reportHeaderMeta i,
.dark-mode #reportResultToolbar #reportHeaderMeta i,
body.dark-mode #reportResultToolbar .text-secondary,
html.dark #reportResultToolbar .text-secondary,
html.dark-mode #reportResultToolbar .text-secondary,
.dark-mode #reportResultToolbar .text-secondary {
  color: #94a3b8 !important;
}

#generatePDF {
  background: var(--app-primary, #ea580c) !important;
  border: 1px solid var(--app-primary, #ea580c) !important;
  color: #ffffff !important;
  height: 38px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
}

#rzp-button1 {
  background: #10b981 !important;
  border: 1px solid #10b981 !important;
  color: #ffffff !important;
  height: 38px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
}

#loadMoreTablesBtn {
  background: #3b82f6 !important;
  border: 1px solid #3b82f6 !important;
  color: #ffffff !important;
  height: 38px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
}

/* Print Optimization */
@media print {

  html,
  body,
  html.dark,
  html.dark-mode,
  body.dark-mode,
  .dark-mode,
  [data-bs-theme="dark"],
  [data-theme="dark"] {
    color-scheme: light !important;
    --bs-body-bg: #ffffff !important;
    --bs-body-color: #0f172a !important;
    --bs-secondary-bg: #f8fafc !important;
    --bs-secondary-color: #475569 !important;
    --bs-tertiary-bg: #f1f5f9 !important;
    --bs-border-color: #cbd5e1 !important;
    --bs-table-bg: #ffffff !important;
    --bs-table-color: #0f172a !important;
    --bg-app: #ffffff !important;
    --bg-main: #ffffff !important;
    --bg-sidebar: #ffffff !important;
    --border-subtle: #e2e8f0 !important;
    --border-strong: #cbd5e1 !important;
    --text-main: #0f172a !important;
    --text-secondary: #475569 !important;
    --text-muted: #64748b !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #000000 !important;
  }

  .app-primary-rail,
  .app-sidebar,
  .main-header,
  .report-header-bar,
  .card-report-filter,
  .container-fluid>.row:first-of-type,
  .report-empty-state,
  #reportResultToolbar,
  #downloadRow,
  #moreView,
  .btn,
  button {
    display: none !important;
  }

  .main-content,
  .container-fluid,
  .report_content_tables,
  #overall_content,
  .card,
  .card-body {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    width: 100% !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #000000 !important;
  }

  html.dark .report_content_tables table,
  html.dark-mode .report_content_tables table,
  body.dark-mode .report_content_tables table,
  .dark-mode .report_content_tables table,
  body.dark-mode .report_content_tables .tg,
  html.dark .report_content_tables .tg,
  html.dark-mode .report_content_tables .tg,
  .dark-mode .report_content_tables .tg,
  body.dark-mode #overall_content table,
  html.dark #overall_content table,
  html.dark-mode #overall_content table,
  .dark-mode #overall_content table,
  body.dark-mode .tg,
  html.dark .tg,
  html.dark-mode .tg,
  .dark-mode .tg,
  body.dark-mode table.dataTable,
  body.dark-mode table.table-bordered,
  html.dark table.dataTable,
  html.dark table.table-bordered,
  html.dark-mode table.dataTable,
  html.dark-mode table.table-bordered,
  .dark-mode table.dataTable,
  .dark-mode table.table-bordered {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
  }

  body.dark-mode .report_content_tables table th,
  body.dark-mode .report_content_tables .tg th,
  html.dark .report_content_tables table th,
  html.dark .report_content_tables .tg th,
  html.dark-mode .report_content_tables table th,
  html.dark-mode .report_content_tables .tg th,
  .dark-mode .report_content_tables table th,
  .dark-mode .report_content_tables .tg th,
  body.dark-mode #overall_content table th,
  html.dark #overall_content table th,
  html.dark-mode #overall_content table th,
  .dark-mode #overall_content table th,
  body.dark-mode .tg th,
  html.dark .tg th,
  html.dark-mode .tg th,
  .dark-mode .tg th,
  body.dark-mode .report_content_tables thead.table-primary th,
  html.dark .report_content_tables thead.table-primary th,
  html.dark-mode .report_content_tables thead.table-primary th,
  .dark-mode .report_content_tables thead.table-primary th,
  body.dark-mode .report_content_tables table td.th-bg,
  html.dark .report_content_tables table td.th-bg,
  html.dark-mode .report_content_tables table td.th-bg,
  .dark-mode .report_content_tables table td.th-bg {
    background-color: #f1f5f9 !important;
    color: #000000 !important;
    border-color: #000000 !important;
  }

  body.dark-mode .report_content_tables table tbody tr,
  html.dark .report_content_tables table tbody tr,
  html.dark-mode .report_content_tables table tbody tr,
  .dark-mode .report_content_tables table tbody tr,
  body.dark-mode .report_content_tables table td,
  body.dark-mode .report_content_tables .tg td,
  html.dark .report_content_tables table td,
  html.dark .report_content_tables .tg td,
  html.dark-mode .report_content_tables table td,
  html.dark-mode .report_content_tables .tg td,
  .dark-mode .report_content_tables table td,
  .dark-mode .report_content_tables .tg td,
  body.dark-mode #overall_content table td,
  html.dark #overall_content table td,
  html.dark-mode #overall_content table td,
  .dark-mode #overall_content table td,
  body.dark-mode .tg td,
  html.dark .tg td,
  html.dark-mode .tg td,
  .dark-mode .tg td,
  body.dark-mode .tg .row_title,
  body.dark-mode .tg td.row_title,
  body.dark-mode .tg td#row_title,
  html.dark .tg .row_title,
  html.dark .tg td.row_title,
  html.dark-mode .tg .row_title,
  html.dark-mode .tg td.row_title,
  .dark-mode .tg .row_title,
  .dark-mode .tg td.row_title,
  body.dark-mode .report_content_tables table.table-striped>tbody>tr:nth-of-type(odd)>*,
  html.dark .report_content_tables table.table-striped>tbody>tr:nth-of-type(odd)>*,
  html.dark-mode .report_content_tables table.table-striped>tbody>tr:nth-of-type(odd)>*,
  .dark-mode .report_content_tables table.table-striped>tbody>tr:nth-of-type(odd)>*,
  body.dark-mode table.table-bordered tbody tr,
  body.dark-mode table.table-bordered tbody td {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
  }

  .report_content_tables table.no-border,
  .report_content_tables table.no-border tr,
  .report_content_tables table.no-border th,
  .report_content_tables table.no-border td,
  body.dark-mode .report_content_tables table.no-border,
  body.dark-mode .report_content_tables table.no-border tbody tr,
  body.dark-mode .report_content_tables table.no-border th,
  body.dark-mode .report_content_tables table.no-border td,
  html.dark .report_content_tables table.no-border,
  html.dark .report_content_tables table.no-border tbody tr,
  html.dark .report_content_tables table.no-border th,
  html.dark .report_content_tables table.no-border td {
    border: none !important;
    background-color: transparent !important;
    color: #000000 !important;
  }

  body.dark-mode .report-payment-notice,
  html.dark .report-payment-notice,
  html.dark-mode .report-payment-notice,
  .dark-mode .report-payment-notice {
    background-color: #fff3cd !important;
    border-color: #ffeeba !important;
    color: #856404 !important;
  }

  body.dark-mode .report_content_tables h1,
  body.dark-mode .report_content_tables h2,
  body.dark-mode .report_content_tables h3,
  body.dark-mode .report_content_tables h4,
  body.dark-mode .report_content_tables h5,
  body.dark-mode .report_content_tables h6,
  body.dark-mode .report_content_tables p,
  body.dark-mode .report_content_tables li,
  body.dark-mode .report_content_tables strong,
  body.dark-mode .report_content_tables .infos,
  body.dark-mode .report_content_tables .infos p,
  body.dark-mode .report_content_tables .infos span,
  body.dark-mode .report_content_tables .heading_text,
  body.dark-mode .report_content_tables .center_no_title,
  body.dark-mode .report_content_tables .table-topic,
  body.dark-mode #overall_content h1,
  body.dark-mode #overall_content h2,
  body.dark-mode #overall_content h3,
  body.dark-mode #overall_content h4,
  body.dark-mode #overall_content h5,
  body.dark-mode #overall_content h6,
  body.dark-mode #overall_content p {
    color: #000000 !important;
  }
}

/* ==========================================================================
   Searchable Center Select UI Component (Replication of Image 2)
   ========================================================================== */
.searchable-center-select-wrapper {
  position: relative;
  width: 100%;
  display: block;
  font-family: inherit;
}

.searchable-center-select-wrapper.is-open {
  z-index: 1060;
}

.searchable-center-select-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.searchable-center-select-input {
  width: 100% !important;
  height: 38px !important;
  padding: 8px 38px 8px 12px !important;
  border: 1.5px solid #38bdf8 !important;
  /* Cyan border as in Image 2 */
  border-radius: 7px !important;
  background-color: #ffffff !important;
  color: #1e293b !important;
  font-size: 13.5px !important;
  line-height: 1.4 !important;
  outline: none !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.2) !important;
  box-sizing: border-box !important;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.audit-content .searchable-center-select-input {
  height: 42px !important;
  border-radius: 8px !important;
  padding: 0 54px 0 12px !important;
}

.searchable-center-select-input:focus,
.searchable-center-select-wrapper.is-open .searchable-center-select-input {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35) !important;
}

.searchable-center-select-input::placeholder {
  color: #94a3b8 !important;
  font-size: 13.5px !important;
  opacity: 1 !important;
}

.searchable-center-select-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  z-index: 2;
}

.searchable-center-select-wrapper.is-open .searchable-center-select-icon {
  color: #0284c7;
}

.searchable-center-select-clear {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #cbd5e1;
  color: #475569;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: background 0.15s, color 0.15s;
  z-index: 3;
}

.searchable-center-select-clear:hover {
  background: #94a3b8;
  color: #0f172a;
}

.searchable-center-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  max-height: 240px;
  overflow-y: auto;
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
  z-index: 1065;
  display: none;
  padding: 4px 0;
}

.searchable-center-select-dropdown::-webkit-scrollbar,
.searchable-center-select-list::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.searchable-center-select-list {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.searchable-center-select-wrapper.is-open .searchable-center-select-dropdown {
  display: block;
}

.searchable-center-select-option {
  padding: 8px 14px;
  font-size: 13.5px;
  color: #334155;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  user-select: none;
}

.searchable-center-select-option:hover,
.searchable-center-select-option.is-highlighted {
  background-color: #f0f9ff;
  color: #0284c7;
}

.searchable-center-select-option.is-selected {
  background-color: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
}

.searchable-center-select-option.searchable-center-select-custom-option {
  border-top: 1px dashed #cbd5e1;
  color: #0369a1;
  font-weight: 600;
}

.searchable-center-select-empty {
  padding: 12px 14px;
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
}

.searchable-center-select-input:disabled,
.searchable-center-select-wrapper.is-disabled .searchable-center-select-input {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  border-color: #cbd5e1 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 0.9 !important;
}

.searchable-center-select-wrapper.is-disabled .searchable-center-select-clear {
  display: none !important;
}

/* Dark mode overrides */
body.dark-mode .searchable-center-select-input,
html.dark .searchable-center-select-input,
html.dark-mode .searchable-center-select-input,
.dark-mode .searchable-center-select-input {
  background-color: #0f172a !important;
  color: #f1f5f9 !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25) !important;
}

body.dark-mode .searchable-center-select-input:focus,
body.dark-mode .searchable-center-select-wrapper.is-open .searchable-center-select-input,
html.dark .searchable-center-select-input:focus,
html.dark .searchable-center-select-wrapper.is-open .searchable-center-select-input {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.45) !important;
}

body.dark-mode .searchable-center-select-input::placeholder,
html.dark .searchable-center-select-input::placeholder {
  color: #64748b !important;
}

body.dark-mode .searchable-center-select-input:disabled,
body.dark-mode .searchable-center-select-wrapper.is-disabled .searchable-center-select-input,
html.dark .searchable-center-select-input:disabled,
html.dark .searchable-center-select-wrapper.is-disabled .searchable-center-select-input,
html.dark-mode .searchable-center-select-input:disabled,
html.dark-mode .searchable-center-select-wrapper.is-disabled .searchable-center-select-input,
.dark-mode .searchable-center-select-input:disabled,
.dark-mode .searchable-center-select-wrapper.is-disabled .searchable-center-select-input {
  background-color: #141e30 !important;
  color: #cbd5e1 !important;
  -webkit-text-fill-color: #cbd5e1 !important;
  border-color: #2c3b52 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 0.92 !important;
}

body.dark-mode .searchable-center-select-wrapper.is-disabled .searchable-center-select-icon,
html.dark .searchable-center-select-wrapper.is-disabled .searchable-center-select-icon,
html.dark-mode .searchable-center-select-wrapper.is-disabled .searchable-center-select-icon,
.dark-mode .searchable-center-select-wrapper.is-disabled .searchable-center-select-icon {
  color: #64748b !important;
}

body.dark-mode .searchable-center-select-dropdown,
html.dark .searchable-center-select-dropdown,
html.dark-mode .searchable-center-select-dropdown,
.dark-mode .searchable-center-select-dropdown {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

body.dark-mode .searchable-center-select-option,
html.dark .searchable-center-select-option,
html.dark-mode .searchable-center-select-option,
.dark-mode .searchable-center-select-option {
  color: #cbd5e1;
}

body.dark-mode .searchable-center-select-option:hover,
body.dark-mode .searchable-center-select-option.is-highlighted,
html.dark .searchable-center-select-option:hover,
html.dark .searchable-center-select-option.is-highlighted,
html.dark-mode .searchable-center-select-option:hover,
html.dark-mode .searchable-center-select-option.is-highlighted,
.dark-mode .searchable-center-select-option:hover,
.dark-mode .searchable-center-select-option.is-highlighted {
  background-color: #334155;
  color: #38bdf8;
}

body.dark-mode .searchable-center-select-option.is-selected,
html.dark .searchable-center-select-option.is-selected,
html.dark-mode .searchable-center-select-option.is-selected,
.dark-mode .searchable-center-select-option.is-selected {
  background-color: rgba(56, 189, 248, 0.22);
  color: #38bdf8;
  font-weight: 600;
}

body.dark-mode .searchable-center-select-option.searchable-center-select-custom-option,
html.dark .searchable-center-select-option.searchable-center-select-custom-option,
html.dark-mode .searchable-center-select-option.searchable-center-select-custom-option,
.dark-mode .searchable-center-select-option.searchable-center-select-custom-option {
  border-top: 1px dashed #334155;
  color: #38bdf8;
}

body.dark-mode .searchable-center-select-clear,
html.dark .searchable-center-select-clear,
html.dark-mode .searchable-center-select-clear,
.dark-mode .searchable-center-select-clear {
  background: #334155;
  color: #cbd5e1;
}

body.dark-mode .searchable-center-select-clear:hover,
html.dark .searchable-center-select-clear:hover,
html.dark-mode .searchable-center-select-clear:hover,
.dark-mode .searchable-center-select-clear:hover {
  background: #475569;
  color: #f8fafc;
}

/* ==========================================================================
   TABLET & MOBILE RESPONSIVE OPTIMIZATIONS (<= 1024px)
   ========================================================================== */
@media (max-width: 1024px) {

  .daily-filter-card .col-md-3,
  .audit-filter-card .col-md-3,
  #step1 .daily-filter-card .col-md-3,
  #step1 .daily-filter-card .row>.col-md-3,
  #step2 .col-md-3,
  #step3 .col-md-3 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
  }

  .daily-filter-card .form-group-custom,
  .audit-filter-card .form-group-custom {
    margin-bottom: 8px !important;
  }

  #wizardTabs {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    justify-content: flex-start !important;
    padding: 8px 6px 10px 6px !important;
    gap: 8px !important;
    width: 100% !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  #wizardTabs::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  #wizardTabs .nav-item {
    flex-shrink: 0 !important;
  }

  .auto-scroll-table,
  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
  }
}

@media (max-width: 640px) {

  .daily-filter-card .col-md-3,
  .audit-filter-card .col-md-3,
  #step1 .daily-filter-card .col-md-3,
  #step1 .daily-filter-card .row>.col-md-3,
  #step2 .col-md-3,
  #step3 .col-md-3 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}
