:root {
  /* Core Palette */
  --primary: #FF8800;
  --primary-hover: #e65a24;
  --warm-neutral: #F7F4ED;
  --earth-contrast: #2D2A32;
  --secondary-coral: #FF9F6B;
  --modern-metal: #5C6B73;
  
  /* Accent Extensions */
  --golden-highlight: #FFC15E;
  --deep-spice: #D6542B;
  --fresh-complement: #4AB8B0;
  
  /* Bootstrap Overrides */
  --bs-primary: var(--primary);
  --bs-primary-rgb: 255, 107, 53;
  --bs-secondary: var(--modern-metal);
  --bs-secondary-rgb: 92, 107, 115;
  --bs-success: var(--fresh-complement);
  --bs-success-rgb: 74, 184, 176;
  --bs-info: var(--golden-highlight);
  --bs-info-rgb: 255, 193, 94;
  --bs-warning: #FFC15E;
  --bs-warning-rgb: 255, 193, 94;
  --bs-danger: var(--deep-spice);
  --bs-danger-rgb: 214, 84, 43;
  --bs-light: var(--warm-neutral);
  --bs-light-rgb: 247, 244, 237;
  --bs-dark: var(--earth-contrast);
  --bs-dark-rgb: 45, 42, 50;
  
  /* Text Colors */
  --text-primary: var(--earth-contrast);
  --text-secondary: var(--modern-metal);
  --text-muted: rgba(92, 107, 115, 0.8);
  
  /* Background Colors */
  --bg-body: var(--warm-neutral);
  --bg-card: #ffffff;
  --bg-light: #f7f7f7;
  
  /* Border Colors */
  --border-color: #e5e2d9;
}

/* Bootstrap Class Overrides */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

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

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
  background-color: var(--primary);
  border-color: var(--primary);
}

.text-primary {
  color: var(--primary) !important;
}

.bg-primary {
  background-color: var(--primary) !important;
  background-color: rgba(var(--bs-primary-rgb),var(--vz-bg-opacity)) !important;
  /* background-color: var(--primary) !important; */
}

.bg-light {
  background-color: var(--warm-neutral) !important;
}

.text-secondary {
  color: var(--modern-metal) !important;
}

.border-primary {
  border-color: var(--primary) !important;
}
.badge.bg-primary {
  background-color: var(--primary) !important;
}

.badge.bg-secondary {
  background-color: var(--modern-metal) !important;
}

/* 

.badge.bg-success {
  background-color: var(--fresh-complement) !important;
}

.badge.bg-info {
  background-color: var(--golden-highlight) !important;
  color: var(--earth-contrast);
}

.badge.bg-warning {
  background-color: var(--golden-highlight) !important;
  color: var(--earth-contrast);
}

.badge.bg-danger {
  background-color: var(--deep-spice) !important;
} */

/* Custom Color Utilities */
.bg-warm-neutral {
  background-color: var(--warm-neutral);
}

.text-earth {
  color: var(--earth-contrast);
}

.bg-coral {
  background-color: var(--secondary-coral);
}

.text-metal {
  color: var(--modern-metal);
}

.border-spice {
  border-color: var(--deep-spice) !important;
}

.bg-complement {
  background-color: var(--fresh-complement);
}

/* Custom Button Styles */
.btn-coral {
  background-color: var(--secondary-coral);
  border-color: var(--secondary-coral);
  color: white;
}

.btn-coral:hover {
  background-color: #f78f5b;
  border-color: #f78f5b;
}

/* Gradient Backgrounds */
.bg-orange-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary-coral) 100%);
}

.bg-warm-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--golden-highlight) 100%);
}

/* Card Styling */
.card {
  border-color: var(--border-color);
  background-color: var(--bg-card);
}

/* Form Controls */
.form-control:focus {
  border-color: var(--secondary-coral);
  box-shadow: 0 0 0 0.25rem rgba(255, 107, 53, 0.25);
}

/* Progress Bars */
.progress-bar {
  background-color: var(--primary);
}

/* Alert Customization */
/* .alert-primary {
  background-color: rgba(255, 107, 53, 0.15);
  border-color: rgba(255, 107, 53, 0.4);
  color: var(--primary-hover);
}

.alert-info {
  background-color: rgba(255, 193, 94, 0.15);
  border-color: rgba(255, 193, 94, 0.4);
  color: #8a6a33;
}

.alert-success {
  background-color: rgba(74, 184, 176, 0.15);
  border-color: rgba(74, 184, 176, 0.4);
  color: #2a6a65;
} */

body {
  background-color: var(--bg-body);
  color: var(--text-primary);
}

/* Typography */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--earth-contrast);
}

.text-muted {
  color: rgba(92, 107, 115, 0.9) !important;
}

/* Links */
a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-hover);
}

/* Modern Sidebar Styling with white text/icons */
.modern-sidebar {
  background-color: var(--earth-contrast);
  border-right: 1px solid var(--earth-contrast);
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modern-sidebar .navbar-brand-box {
  background:#FFFFFF;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.2rem 1.2rem 0.8rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  min-height: 120px;
  flex-shrink: 0;
}

.modern-sidebar .brand-logo {
  height: 36px;
  max-width: 180px;
  transition: all 0.3s ease;
  filter: brightness(1.1);
}

.modern-sidebar .brand-logo-sm {
  height: 30px;
  max-width: 30px;
  filter: brightness(1.1);
}

/* App name styling */
.app-name-container {
  padding: 0.5rem 0 0.2rem;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.app-name {
  color: #D6542B;
  font-size: 19px;
  font-weight: 900;
  margin: 0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sidebar-toggle-icon {
  color: white;
}

.sidebar-scroll-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 0;
  position: relative;
  min-height: 0;
}

.sidebar-menu-container {
  padding: 0 0.75rem;
  height: 100%;
}

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

.sidebar-item {
  margin-bottom: 0.25rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.2s ease;
  cursor: pointer;
  font-weight: 500;
}

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

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.9), rgba(255, 159, 107, 0.8));
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.sidebar-icon {
  margin-right: 0.75rem;
  font-size: 1.2rem;
  min-width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
}

.sidebar-link.active .sidebar-icon,
.sidebar-link:hover .sidebar-icon {
  color: white;
}

.sidebar-text {
  flex: 1;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  color: inherit;
}

.sidebar-section {
  padding: 1.25rem 1rem 0.5rem;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 700;
}

.submenu-arrow {
  transition: transform 0.3s ease;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.25rem;
}

.submenu-arrow.rotated {
  transform: rotate(90deg);
  color: white;
}

.sidebar-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
  padding: 0 0.5rem;
}

.sidebar-submenu.expanded {
  max-height: none;
}

.sidebar-submenu ul {
  list-style: none;
  padding: 0.25rem 0 0.5rem 1.5rem;
  margin: 0;
  border-left: 1.5px dashed rgb(255 254 254);
  max-height: none;
  overflow: visible;
}

.sidebar-submenu-item {
  margin-bottom: 0.15rem;
}

.sidebar-submenu-link {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.75);
  transition: all 0.2s ease;
  font-size: 13px;
  font-weight: 400;
}

.sidebar-submenu-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  font-weight: 500;
}

.sidebar-submenu-link.active {
  background-color: rgba(255, 107, 53, 0.6);
  color: white;
  font-weight: 600;
}

.submenu-icon {
  font-size: 1rem;
  margin-right: 0.5rem;
  min-width: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.75);
}

.sidebar-submenu-link.active .submenu-icon,
.sidebar-submenu-link:hover .submenu-icon {
  color: white;
}

.has-submenu.open .sidebar-link {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Add focus states for accessibility */
.sidebar-link:focus,
.sidebar-submenu-link:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: -2px;
}

/* Responsive adjustments */
/* @media (max-width: 991.98px) {
  .app-menu {
    left: -250px;
  }
  
  .vertical-sidebar-enable .app-menu {
    left: 0;
  }
} */

:is([data-layout=vertical],[data-layout=semibox])[data-sidebar-size=sm] h6.app-name {
  display: none;
}

/* Additional fixes for sidebar scrolling */
:is([data-layout=vertical],[data-layout=semibox])[data-sidebar-size=sm] .sidebar-scroll-container {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

:is([data-layout=vertical],[data-layout=semibox])[data-sidebar-size=lg] .sidebar-scroll-container {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* Ensure smooth scrolling */
.sidebar-scroll-container {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* WebKit browsers scrollbar styling */
.sidebar-scroll-container::-webkit-scrollbar {
  width: 6px;
}

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

.sidebar-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.sidebar-scroll-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Additional layout fixes for sidebar */
.app-menu {
  height: 100vh !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Ensure the navbar-menu (which is the sidebar) has proper height */
.navbar-menu {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Fix for layout wrapper to not interfere with sidebar height */
#layout-wrapper {
  overflow-x: hidden;
}

/* Ensure main content doesn't interfere with sidebar scrolling */
.main-content {
  overflow-x: hidden;
}

/* Additional fix for submenu overflow */
.sidebar-submenu ul {
  max-height: none;
  overflow: visible;
}