.quick-stats-card .stats-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--fg-neutral-800);
  }
  
  /* ============================
     MODALS
     ============================ */
  .modal-content {
    border-radius: var(--fg-border-radius);
    border: none;
    box-shadow: var(--fg-box-shadow-lg);
  }
  
  .modal-header {
    border-bottom: 1px solid var(--fg-neutral-200);
    padding: var(--fg-spacing-md);
  }
  
  .modal-body {
    padding: var(--fg-spacing-md);
  }
  
  .modal-footer {
    border-top: 1px solid var(--fg-neutral-200);
    padding: var(--fg-spacing-md);
  }
  
  /* ============================
     PAGINATION
     ============================ */
  .pagination {
    margin-bottom: var(--fg-spacing-md);
  }
  
  .page-link {
    color: var(--fg-primary);
    border: 1px solid var(--fg-neutral-300);
    padding: var(--fg-spacing-sm) var(--fg-spacing-md);
  }
  
  .page-item.active .page-link {
    background-color: var(--fg-primary);
    border-color: var(--fg-primary);
  }
  
  /* ============================
     ORDER FORM STYLING
     ============================ */
  .order-form-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--fg-spacing-lg);
  }
  
  .order-form-main {
    flex: 1 1 700px;
    min-width: 0;
  }
  
  .section-header {
    display: flex;
    align-items: center;
    background-color: var(--fg-neutral-50);
    padding: var(--fg-spacing-md) var(--fg-spacing-lg);
    border-bottom: 1px solid var(--fg-neutral-200);
    border-top-left-radius: var(--fg-border-radius);
    border-top-right-radius: var(--fg-border-radius);
  }
  
  .section-header h2 {
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: var(--fg-font-weight-medium);
  }
  
  .section-header i {
    margin-right: var(--fg-spacing-sm);
    color: var(--fg-primary);
  }
  
  /* Create Order Form */
  .create-order-form .card {
    margin-bottom: var(--fg-spacing-sm);
  }
  
  .create-order-form .card-header {
    padding: var(--fg-spacing-sm) var(--fg-spacing-md);
  }
  
  .create-order-form .card-body {
    padding: var(--fg-spacing-sm);
  }
  
  .create-order-form .form-group {
    margin-bottom: var(--fg-spacing-xs);
  }
  
  .create-order-form .form-label {
    margin-bottom: 0.125rem;
    font-size: var(--fg-font-size-sm);
  }
  
  .create-order-form .form-control,
  .create-order-form .form-select {
    font-size: var(--fg-font-size-sm);
    padding: 0.25rem 0.5rem;
    height: calc(1.5em + 0.5rem + 2px);
  }
  
  /* ============================
     EMPTY STATES
     ============================ */
  .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--fg-spacing-xl);
    text-align: center;
    color: var(--fg-neutral-500);
    background-color: var(--fg-white);
    border: 1px dashed var(--fg-neutral-300);
    border-radius: var(--fg-border-radius);
  }
  
  .empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: var(--fg-spacing-md);
    opacity: 0.7;
  }
  
  .empty-state-text {
    font-size: 1rem;
    font-weight: var(--fg-font-weight-medium);
  }
  
  /* ============================
     UTILITY CLASSES
     ============================ */
  /* Text utilities */
  .text-primary { color: var(--fg-primary) !important; }
  .text-secondary { color: var(--fg-secondary) !important; }
  .text-danger { color: var(--fg-danger) !important; }
  .text-warning { color: var(--fg-warning) !important; }
  .text-info { color: var(--fg-info) !important; }
  .text-muted { color: var(--fg-neutral-600) !important; }
  
  .text-center { text-align: center !important; }
  .text-right { text-align: right !important; }
  .text-left { text-align: left !important; }
  
  /* Font weight utilities */
  .fw-normal { font-weight: var(--fg-font-weight-normal) !important; }
  .fw-medium { font-weight: var(--fg-font-weight-medium) !important; }
  .fw-semibold { font-weight: var(--fg-font-weight-semibold) !important; }
  .fw-bold { font-weight: var(--fg-font-weight-bold) !important; }
  
  /* Background utilities */
  .bg-primary { background-color: var(--fg-primary) !important; }
  .bg-secondary { background-color: var(--fg-secondary) !important; }
  .bg-danger { background-color: var(--fg-danger) !important; }
  .bg-warning { background-color: var(--fg-warning) !important; }
  .bg-info { background-color: var(--fg-info) !important; }
  .bg-dark { background-color: var(--fg-dark) !important; }
  .bg-light { background-color: var(--fg-light) !important; }
  
  /* Spacing utilities */
  .m-0 { margin: 0 !important; }
  .mt-0 { margin-top: 0 !important; }
  .mb-0 { margin-bottom: 0 !important; }
  .me-0 { margin-right: 0 !important; }
  .ms-0 { margin-left: 0 !important; }
  
  .m-1 { margin: var(--fg-spacing-xs) !important; }
  .mt-1 { margin-top: var(--fg-spacing-xs) !important; }
  .mb-1 { margin-bottom: var(--fg-spacing-xs) !important; }
  .me-1 { margin-right: var(--fg-spacing-xs) !important; }
  .ms-1 { margin-left: var(--fg-spacing-xs) !important; }
  
  .m-2 { margin: var(--fg-spacing-sm) !important; }
  .mt-2 { margin-top: var(--fg-spacing-sm) !important; }
  .mb-2 { margin-bottom: var(--fg-spacing-sm) !important; }
  .me-2 { margin-right: var(--fg-spacing-sm) !important; }
  .ms-2 { margin-left: var(--fg-spacing-sm) !important; }
  
  .m-3 { margin: var(--fg-spacing-md) !important; }
  .mt-3 { margin-top: var(--fg-spacing-md) !important; }
  .mb-3 { margin-bottom: var(--fg-spacing-md) !important; }
  .me-3 { margin-right: var(--fg-spacing-md) !important; }
  .ms-3 { margin-left: var(--fg-spacing-md) !important; }
  
  .m-4 { margin: var(--fg-spacing-lg) !important; }
  .mt-4 { margin-top: var(--fg-spacing-lg) !important; }
  .mb-4 { margin-bottom: var(--fg-spacing-lg) !important; }
  .me-4 { margin-right: var(--fg-spacing-lg) !important; }
  .ms-4 { margin-left: var(--fg-spacing-lg) !important; }
  
  .m-5 { margin: var(--fg-spacing-xl) !important; }
  .mt-5 { margin-top: var(--fg-spacing-xl) !important; }
  .mb-5 { margin-bottom: var(--fg-spacing-xl) !important; }
  .me-5 { margin-right: var(--fg-spacing-xl) !important; }
  .ms-5 { margin-left: var(--fg-spacing-xl) !important; }
  
  .p-0 { padding: 0 !important; }
  .pt-0 { padding-top: 0 !important; }
  .pb-0 { padding-bottom: 0 !important; }
  .pe-0 { padding-right: 0 !important; }
  .ps-0 { padding-left: 0 !important; }
  
  .p-1 { padding: var(--fg-spacing-xs) !important; }
  .pt-1 { padding-top: var(--fg-spacing-xs) !important; }
  .pb-1 { padding-bottom: var(--fg-spacing-xs) !important; }
  .pe-1 { padding-right: var(--fg-spacing-xs) !important; }
  .ps-1 { padding-left: var(--fg-spacing-xs) !important; }
  
  .p-2 { padding: var(--fg-spacing-sm) !important; }
  .pt-2 { padding-top: var(--fg-spacing-sm) !important; }
  .pb-2 { padding-bottom: var(--fg-spacing-sm) !important; }
  .pe-2 { padding-right: var(--fg-spacing-sm) !important; }
  .ps-2 { padding-left: var(--fg-spacing-sm) !important; }
  
  .p-3 { padding: var(--fg-spacing-md) !important; }
  .pt-3 { padding-top: var(--fg-spacing-md) !important; }
  .pb-3 { padding-bottom: var(--fg-spacing-md) !important; }
  .pe-3 { padding-right: var(--fg-spacing-md) !important; }
  .ps-3 { padding-left: var(--fg-spacing-md) !important; }
  
  .p-4 { padding: var(--fg-spacing-lg) !important; }
  .pt-4 { padding-top: var(--fg-spacing-lg) !important; }
  .pb-4 { padding-bottom: var(--fg-spacing-lg) !important; }
  .pe-4 { padding-right: var(--fg-spacing-lg) !important; }
  .ps-4 { padding-left: var(--fg-spacing-lg) !important; }
  
  .p-5 { padding: var(--fg-spacing-xl) !important; }
  .pt-5 { padding-top: var(--fg-spacing-xl) !important; }
  .pb-5 { padding-bottom: var(--fg-spacing-xl) !important; }
  .pe-5 { padding-right: var(--fg-spacing-xl) !important; }
  .ps-5 { padding-left: var(--fg-spacing-xl) !important; }
  
  /* Border utilities */
  .border-0 { border: 0 !important; }
  .border-top-0 { border-top: 0 !important; }
  .border-bottom-0 { border-bottom: 0 !important; }
  .border-start-0 { border-left: 0 !important; }
  .border-end-0 { border-right: 0 !important; }
  
  .border { border: 1px solid var(--fg-neutral-200) !important; }
  .border-primary { border-color: var(--fg-primary) !important; }
  .border-secondary { border-color: var(--fg-secondary) !important; }
  .border-danger { border-color: var(--fg-danger) !important; }
  .border-warning { border-color: var(--fg-warning) !important; }
  
  /* Shadow utilities */
  .shadow-none { box-shadow: none !important; }
  .shadow-sm { box-shadow: var(--fg-box-shadow-sm) !important; }
  .shadow { box-shadow: var(--fg-box-shadow) !important; }
  .shadow-lg { box-shadow: var(--fg-box-shadow-lg) !important; }
  
  /* Other utilities */
  .rounded { border-radius: var(--fg-border-radius) !important; }
  .rounded-sm { border-radius: var(--fg-border-radius-sm) !important; }
  .rounded-lg { border-radius: var(--fg-border-radius-lg) !important; }
  .rounded-circle { border-radius: 50% !important; }
  .rounded-0 { border-radius: 0 !important; }
  
  .d-none { display: none !important; }
  .d-inline { display: inline !important; }
  .d-inline-block { display: inline-block !important; }
  .d-block { display: block !important; }
  .d-flex { display: flex !important; }
  .d-inline-flex { display: inline-flex !important; }
  .d-grid { display: grid !important; }
  
  .flex-row { flex-direction: row !important; }
  .flex-column { flex-direction: column !important; }
  .flex-wrap { flex-wrap: wrap !important; }
  .flex-nowrap { flex-wrap: nowrap !important; }
  .flex-grow-1 { flex-grow: 1 !important; }
  .flex-shrink-0 { flex-shrink: 0 !important; }
  
  .justify-content-start { justify-content: flex-start !important; }
  .justify-content-end { justify-content: flex-end !important; }
  .justify-content-center { justify-content: center !important; }
  .justify-content-between { justify-content: space-between !important; }
  .justify-content-around { justify-content: space-around !important; }
  
  .align-items-start { align-items: flex-start !important; }
  .align-items-end { align-items: flex-end !important; }
  .align-items-center { align-items: center !important; }
  .align-items-baseline { align-items: baseline !important; }
  .align-items-stretch { align-items: stretch !important; }
  
  .w-100 { width: 100% !important; }
  .h-100 { height: 100% !important; }
  
  .overflow-auto { overflow: auto !important; }
  .overflow-hidden { overflow: hidden !important; }
  .overflow-visible { overflow: visible !important; }
  
  /* ============================
     MEDIA QUERIES & RESPONSIVE DESIGN
     ============================ */
  @media (max-width: 1199.98px) { /* Large devices (less than 1200px) */
    .dashboard-header {
      flex-direction: column;
      align-items: flex-start;
      gap: var(--fg-spacing-md);
    }
  }
  
  @media (max-width: 991.98px) { /* Medium devices (less than 992px) */
    :root {
      --fg-spacing-lg: 1.25rem; /* Slightly reduce spacing on medium screens */
      --fg-spacing-xl: 2rem;
    }
    
    .dept-grid {
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .dept-count {
      font-size: 2rem;
    }
    
    .metrics-value {
      font-size: 1.5rem;
    }
    
    .card-body, .card-header, .card-footer {
      padding: var(--fg-spacing-md);
    }
  }
  
  @media (max-width: 767.98px) { /* Small devices (less than 768px) */
    :root {
      --fg-font-size-base: 15px; /* Slightly smaller base font on small screens */
      --fg-spacing-lg: 1rem;     /* Further reduce spacing on small screens */
    }
    
    h1 {
      font-size: 1.5rem;
    }
    
    .dept-grid {
      grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .dept-count {
      font-size: 1.75rem;
    }
    
    .dept-title {
      font-size: 0.75rem;
    }
    
    .metrics-value {
      font-size: 1.25rem;
    }
    
    .dashboard-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 1rem;
    }
  }
  
  @media (max-width: 575.98px) { /* Extra small devices (less than 576px) */
    .table-responsive {
      border-radius: 0; /* Remove border radius on very small screens */
    }
    
    .dept-grid {
      grid-template-columns: repeat(2, 1fr); /* Just 2 columns on very small screens */
    }
    
    .create-order-form .form-control,
    .create-order-form .form-select {
      font-size: var(--fg-font-size-base-rem); /* Increase form control size for better touch targets */
    }
  }
  
  /* ============================
     PRINT STYLES
     ============================ */
  @media print {
    .navbar, 
    .sidebar,
    .footer, 
    .no-print {
      display: none !important;
    }
    
    body {
      background-color: white;
    }
    
    .main-content-wrapper {
      padding-left: 0 !important;
    }
    
    .card {
      box-shadow: none;
      border: 1px solid #dee2e6;
    }
    
    a {
      text-decoration: none !important;
      color: black !important;
    }
    
    /* Ensure table content fits on page */
    .table {
      width: 100% !important;
      border-collapse: collapse !important;
    }
    
    .table th,
    .table td {
      background-color: white !important;
      border: 1px solid #dee2e6 !important;
    }
    
    /* Add page breaks appropriately */
    .page-break-before {
      page-break-before: always !important;
    }
    
    .page-break-after {
      page-break-after: always !important;
    }
    
    .avoid-break {
      page-break-inside: avoid !important;
    }
  }/* 
   * forgitrak.css
   * Consolidated, professional styling for the Forgitrak application
   * Created: May 6, 2025
   */
  
  /* ============================
     VARIABLES & FOUNDATIONS
     ============================ */
  :root {
    /* Color Palette - Aligned with style.css and using its primary color */
    --fg-primary: #2c5bdc;         /* Updated from style.css - Primary brand color */
    --fg-primary-hover: #1e429f;   /* Hover state for primary from style.css */
    --fg-primary-light: #e8eefb;   /* Light variant of primary for backgrounds */
    --fg-secondary: #06a97a;       /* Updated from style.css - Success/secondary */
    --fg-secondary-hover: #05956b; /* Hover state for secondary from style.css */
    --fg-dark: #15192a;            /* Darkest color for nav backgrounds from style.css */
    --fg-light: #f8fafc;           /* Lightest color for page backgrounds from style.css */
    --fg-danger: #e53e51;          /* Error states from style.css */
    --fg-warning: #f46140;         /* Warning states from style.css */
    --fg-info: #17a2b8;            /* Information states */
    
    /* Neutral Color Scale from style.css */
    --fg-neutral-900: #15192a;     /* Darkest neutral - Text black */
    --fg-neutral-800: #1e293b;     /* Headings */
    --fg-neutral-700: #334155;     /* Body text */
    --fg-neutral-600: #475569;     /* Secondary text */
    --fg-neutral-500: #64748b;     /* Disabled text */
    --fg-neutral-400: #94a3b8;     /* Borders */
    --fg-neutral-300: #cbd5e1;     /* Dividers */
    --fg-neutral-200: #e2e8f0;     /* Background */
    --fg-neutral-100: #f1f5f9;     /* Card background */
    --fg-neutral-50: #f8fafc;      /* Page background */
    --fg-white: #ffffff;
    
    /* Typography */
    --fg-font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --fg-font-size-base: 15px;     /* Base font size */
    --fg-font-size-sm: 0.875rem;   /* Small text */
    --fg-font-size-base-rem: 1rem; /* Base body text in rem */
    --fg-font-size-lg: 1.25rem;    /* Large text */
    --fg-font-size-xl: 1.5rem;     /* Extra large - small headings */
    --fg-font-size-xxl: 1.875rem;  /* Heading size from style.css */
    
    /* Font Weights */
    --fg-font-weight-normal: 400;
    --fg-font-weight-medium: 500;
    --fg-font-weight-semibold: 600;
    --fg-font-weight-bold: 700;
    
    /* Spacing */
    --fg-spacing-xs: 0.25rem;      /* Extra small spacing (4px) */
    --fg-spacing-sm: 0.5rem;       /* Small spacing (8px) */
    --fg-spacing-md: 1rem;         /* Medium spacing (16px) */
    --fg-spacing-lg: 1.5rem;       /* Large spacing (24px) */
    --fg-spacing-xl: 2rem;         /* Extra large spacing (32px) */
    --fg-spacing-2xl: 3rem;        /* 2x extra large spacing (48px) */
    
    /* Effects */
    --fg-border-radius-sm: 2px;    /* Small border radius */
    --fg-border-radius: 4px;       /* Default border radius from style.css */
    --fg-border-radius-lg: 8px;    /* Larger border radius from style.css */
    --fg-box-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);       /* Subtle shadow from style.css */
    --fg-box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);          /* Standard shadow from style.css */
    --fg-box-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.05);     /* Prominent shadow from style.css */
    
    /* Transitions */
    --fg-transition-fast: 150ms ease;   /* Fast transitions from style.css */
    --fg-transition: 250ms ease;        /* Standard transition from style.css */
  }
  
  /* ============================
     GLOBAL STYLES
     ============================ */
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  html {
    font-size: var(--fg-font-size-base);
  }
  
  body {
    font-family: var(--fg-font-family);
    color: var(--fg-neutral-700);
    background-color: var(--fg-neutral-50);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: var(--fg-neutral-800);
    font-weight: var(--fg-font-weight-semibold);
    margin-bottom: var(--fg-spacing-md);
    line-height: 1.3;
  }
  
  h1 {
    font-size: var(--fg-font-size-xxl);
    margin-bottom: var(--fg-spacing-lg);
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  h4 {
    font-size: 1.125rem;
    font-weight: var(--fg-font-weight-medium);
  }
  
  h5, h6 {
    font-size: 1rem;
    font-weight: var(--fg-font-weight-medium);
  }
  
  p {
    margin-bottom: var(--fg-spacing-md);
  }
  
  a {
    color: var(--fg-primary);
    text-decoration: none;
    transition: color var(--fg-transition-fast);
  }
  
  a:hover {
    color: var(--fg-primary-hover);
    text-decoration: none;
  }
  
  /* ============================
     LAYOUT COMPONENTS
     ============================ */
  .container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--fg-spacing-md);
  }
  
  .section {
    margin-bottom: var(--fg-spacing-2xl);
  }
  
  /* Card Components */
  .card {
    background-color: var(--fg-white);
    border-radius: var(--fg-border-radius);
    box-shadow: var(--fg-box-shadow-sm);
    border: 1px solid var(--fg-neutral-200);
    margin-bottom: var(--fg-spacing-lg);
    transition: box-shadow var(--fg-transition);
  }
  
  .card:hover {
    box-shadow: var(--fg-box-shadow);
  }
  
  .card-header {
    padding: var(--fg-spacing-md) var(--fg-spacing-lg);
    border-bottom: 1px solid var(--fg-neutral-200);
    background-color: var(--fg-neutral-50);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top-left-radius: var(--fg-border-radius);
    border-top-right-radius: var(--fg-border-radius);
  }
  
  .card-title {
    margin-bottom: 0;
    font-weight: var(--fg-font-weight-medium);
    font-size: 1.125rem;
  }
  
  .card-body {
    padding: var(--fg-spacing-lg);
  }
  
  .card-footer {
    padding: var(--fg-spacing-md) var(--fg-spacing-lg);
    border-top: 1px solid var(--fg-neutral-200);
    background-color: var(--fg-neutral-50);
    border-bottom-left-radius: var(--fg-border-radius);
    border-bottom-right-radius: var(--fg-border-radius);
  }
  
  /* Special Card Stylings */
  .card.border-danger {
    border-color: var(--fg-danger);
  }
  
  .card .card-header.bg-danger {
    background-color: var(--fg-danger);
    color: var(--fg-white);
  }
  
  .card .card-header.bg-dark {
    background-color: var(--fg-dark);
    color: var(--fg-white);
  }
  
  .card .card-header.bg-warning {
    background-color: var(--fg-warning);
    color: var(--fg-neutral-900);
  }
  
  /* ============================
     NAVBAR & NAVIGATION
     ============================ */
  .navbar {
    padding: var(--fg-spacing-sm) 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  
  .navbar-dark {
    background-color: var(--fg-neutral-800);
  }
  
  .navbar-brand {
    font-size: 1.25rem;
    font-weight: var(--fg-font-weight-bold);
    letter-spacing: -0.5px;
  }
  
  .navbar-brand span {
    color: var(--fg-primary);
  }
  
  .navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.75);
    font-weight: var(--fg-font-weight-medium);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: var(--fg-border-radius);
  }
  
  .navbar-dark .navbar-nav .nav-link:hover,
  .navbar-dark .navbar-nav .nav-link:focus,
  .navbar-dark .navbar-nav .nav-link.active {
    color: var(--fg-white);
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  /* Dropdown Menu */
  .dropdown-menu {
    border: 1px solid var(--fg-neutral-200);
    box-shadow: var(--fg-box-shadow);
    padding: var(--fg-spacing-sm) 0;
    border-radius: var(--fg-border-radius);
  }
  
  .dropdown-item {
    padding: var(--fg-spacing-sm) var(--fg-spacing-lg);
    font-size: 0.9rem;
  }
  
  .dropdown-item:hover, .dropdown-item:focus {
    background-color: var(--fg-primary-light);
    color: var(--fg-primary);
  }
  
  .dropdown-item.active, .dropdown-item:active {
    background-color: var(--fg-primary);
    color: var(--fg-white);
  }
  
  .dropdown-header {
    color: var(--fg-neutral-500);
    font-size: 0.8rem;
    font-weight: var(--fg-font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: var(--fg-spacing-sm) var(--fg-spacing-lg);
  }
  
  /* Sidebar Navigation - From base.html */
  .sidebar {
    width: 280px;
    min-width: 280px;
    background-color: var(--fg-neutral-900);
    color: var(--fg-neutral-100);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1030;
    overflow-y: auto;
    transition: transform 0.3s ease-in-out;
  }
  
  .sidebar-brand {
    display: block;
    text-align: center;
    margin-bottom: 2rem;
  }
  
  .sidebar-brand img {
    max-height: 75px;
    margin-bottom: 0.5rem;
  }
  
  .sidebar-brand-text {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--fg-white);
    text-decoration: none;
  }
  
  .sidebar-brand-text span {
    color: var(--fg-primary);
  }
  
  .sidebar .nav-link {
    color: var(--fg-neutral-300);
    padding: 0.75rem 1rem;
    border-radius: var(--fg-border-radius);
    margin-bottom: 0.25rem;
    font-weight: 500;
    display: flex;
    align-items: center;
  }
  
  .sidebar .nav-link .bi {
    margin-right: 0.75rem;
    font-size: 1.1rem;
  }
  
  .sidebar .nav-link:hover,
  .sidebar .nav-link:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--fg-white);
  }
  
  .sidebar .nav-link.active {
    background-color: var(--fg-primary);
    color: var(--fg-white);
    font-weight: 600;
  }
  
  .sidebar .dropdown-menu {
    background-color: var(--fg-neutral-700);
    border: none;
  }
  
  .sidebar .dropdown-item {
    color: var(--fg-neutral-300);
    padding: 0.5rem 1rem 0.5rem 2.5rem;
  }
  
  .sidebar .dropdown-item:hover,
  .sidebar .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--fg-white);
  }
  
  .sidebar .dropdown-item.active {
    background-color: var(--fg-primary);
    color: var(--fg-white);
  }
  
  .sidebar .dropdown-header {
    color: var(--fg-neutral-500);
    padding: 0.5rem 1rem 0.5rem 2.5rem;
  }
  
  .sidebar-create-order-btn {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .sidebar-create-order-btn .btn {
    width: 100%;
    font-weight: 600;
  }
  
  .sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--fg-neutral-700);
  }
  
  .sidebar-footer .nav-link {
    padding: 0.5rem 1rem;
  }
  
  .main-content-wrapper {
    flex-grow: 1;
    padding-left: 280px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: padding-left 0.3s ease-in-out;
  }
  
  .main-content-wrapper > .container {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    width: 100%;
  }
  
  .main-content-wrapper > .page-footer {
    margin-top: auto;
    background-color: var(--fg-neutral-100);
    border-top: 1px solid var(--fg-neutral-300);
    padding: 1rem 0;
    text-align: center;
  }
  
  .main-content-wrapper > .page-footer .text-muted {
    color: var(--fg-neutral-600) !important;
  }
  
  /* Sidebar Toggler (mobile) */
  .sidebar-toggler {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1031;
    display: none;
    background-color: var(--fg-neutral-700);
    color: var(--fg-white);
    border: 1px solid var(--fg-neutral-600);
  }
  
  /* Responsive Nav */
  @media (max-width: 991.98px) {
    .sidebar {
      transform: translateX(-100%);
    }
    .sidebar.show {
      transform: translateX(0);
    }
    .main-content-wrapper {
      padding-left: 0;
    }
    .sidebar-toggler {
      display: block;
    }
  }
  
  /* ============================
     BUTTONS
     ============================ */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    font-weight: var(--fg-font-weight-medium);
    border-radius: var(--fg-border-radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--fg-transition-fast);
    letter-spacing: 0.01em;
  }
  
  .btn i, .btn .bi {
    margin-right: 0.6rem;
  }
  
  .btn .bi:only-child {
    margin-right: 0;
  }
  
  .btn-primary {
    background-color: var(--fg-primary);
    color: var(--fg-white);
    border-color: var(--fg-primary);
  }
  
  .btn-primary:hover {
    background-color: var(--fg-primary-hover);
    border-color: var(--fg-primary-hover);
    color: var(--fg-white);
  }
  
  .btn-secondary {
    background-color: var(--fg-neutral-200);
    color: var(--fg-neutral-700);
    border-color: var(--fg-neutral-300);
  }
  
  .btn-secondary:hover {
    background-color: var(--fg-neutral-300);
    color: var(--fg-neutral-900);
    border-color: var(--fg-neutral-400);
  }
  
  .btn-success {
    background-color: var(--fg-secondary);
    color: var(--fg-white);
    border-color: var(--fg-secondary);
  }
  
  .btn-success:hover {
    background-color: var(--fg-secondary-hover);
    border-color: var(--fg-secondary-hover);
    color: var(--fg-white);
  }
  
  .btn-danger {
    background-color: var(--fg-danger);
    color: var(--fg-white);
    border-color: var(--fg-danger);
  }
  
  .btn-danger:hover {
    background-color: #d02e40;
    border-color: #d02e40;
    color: var(--fg-white);
  }
  
  .btn-warning {
    background-color: var(--fg-warning);
    color: var(--fg-neutral-900);
    border-color: var(--fg-warning);
  }
  
  .btn-warning:hover {
    background-color: #e48a29;
    border-color: #e48a29;
    color: var(--fg-neutral-900);
  }
  
  .btn-info {
    background-color: var(--fg-info);
    color: var(--fg-white);
    border-color: var(--fg-info);
  }
  
  .btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
    color: var(--fg-white);
  }
  
  .btn-outline-primary {
    color: var(--fg-primary);
    background-color: transparent;
    border-color: var(--fg-primary);
  }
  
  .btn-outline-primary:hover {
    color: var(--fg-white);
    background-color: var(--fg-primary);
    border-color: var(--fg-primary);
  }
  
  .btn-outline-secondary {
    color: var(--fg-neutral-600);
    background-color: transparent;
    border-color: var(--fg-neutral-400);
  }
  
  .btn-outline-secondary:hover {
    color: var(--fg-neutral-800);
    background-color: var(--fg-neutral-200);
    border-color: var(--fg-neutral-500);
  }
  
  /* Button Sizes */
  .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: var(--fg-border-radius-sm);
  }
  
  .btn-lg {
    padding: 0.675rem 1.25rem;
    font-size: 1rem;
    border-radius: var(--fg-border-radius-lg);
  }
  
  /* ============================
     FORMS
     ============================ */
  .form-label {
    display: block;
    margin-bottom: var(--fg-spacing-sm);
    font-weight: var(--fg-font-weight-medium);
    color: var(--fg-neutral-700);
    font-size: 0.9rem;
  }
  
  .form-control,
  .form-select {
    padding: 0.625rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--fg-neutral-700);
    background-color: var(--fg-white);
    border: 1px solid var(--fg-neutral-300);
    border-radius: var(--fg-border-radius);
    transition: border-color var(--fg-transition-fast), box-shadow var(--fg-transition-fast);
  }
  
  .form-control:focus,
  .form-select:focus {
    border-color: var(--fg-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(44, 91, 220, 0.15);
  }
  
  .form-control-sm,
  .form-select-sm {
    padding: var(--fg-spacing-xs) var(--fg-spacing-sm);
    font-size: var(--fg-font-size-sm);
  }
  
  .form-text {
    color: var(--fg-neutral-500);
    font-size: 0.875rem;
    margin-top: var(--fg-spacing-xs);
  }
  
  .required::after {
    content: '*';
    color: var(--fg-danger);
    margin-left: var(--fg-spacing-xs);
  }
  
  .form-group {
    margin-bottom: var(--fg-spacing-lg);
  }
  
  .form-compact .form-group {
    margin-bottom: var(--fg-spacing-sm);
  }
  
  .form-compact .form-label {
    margin-bottom: var(--fg-spacing-xs);
  }
  
  .form-compact .form-control,
  .form-compact .form-select {
    padding: var(--fg-spacing-xs) var(--fg-spacing-sm);
  }
  
  /* Form Validation */
  .invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 80%;
    color: var(--fg-danger);
  }
  
  /* ============================
     TABLES
     ============================ */
  .table {
    width: 100%;
    margin-bottom: var(--fg-spacing-lg);
    color: var(--fg-neutral-700);
    border-collapse: collapse;
  }
  
  .table th,
  .table td {
    padding: var(--fg-spacing-md);
    border-bottom: 1px solid var(--fg-neutral-200);
    text-align: left;
    vertical-align: middle;
  }
  
  .table thead th {
    background-color: var(--fg-neutral-100);
    color: var(--fg-neutral-600);
    font-weight: var(--fg-font-weight-semibold);
    font-size: 0.875rem;
    border-bottom: 2px solid var(--fg-neutral-300);
    white-space: nowrap;
  }
  
  .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: var(--fg-neutral-50);
  }
  
  .table-hover > tbody > tr:hover > * {
    background-color: var(--fg-primary-light);
    color: var(--fg-primary);
  }
  
  .table-sm th,
  .table-sm td {
    padding: var(--fg-spacing-sm);
  }
  
  .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--fg-border-radius);
    border: 1px solid var(--fg-neutral-200);
  }
  
  /* Clickable Rows */
  .clickable-row {
    cursor: pointer;
  }
  
  .table-hover > tbody > tr.clickable-row:hover > * {
    background-color: var(--fg-primary-light) !important;
    color: var(--fg-primary) !important;
  }
  
  /* Table with problem rows */
  .table-hover > tbody > tr.clickable-row.table-danger:hover > * {
    background-color: #f1b0b7 !important;
    color: #60111a !important;
  }
  
  /* ============================
     STATUS BADGES
     ============================ */
  .badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: var(--fg-font-weight-bold);
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--fg-border-radius);
  }
  
  /* Standard badge colors */
  .badge.bg-primary {
    background-color: var(--fg-primary) !important;
    color: var(--fg-white);
  }
  
  .badge.bg-secondary {
    background-color: var(--fg-neutral-500) !important;
    color: var(--fg-white);
  }
  
  .badge.bg-success {
    background-color: var(--fg-secondary) !important;
    color: var(--fg-white);
  }
  
  .badge.bg-danger {
    background-color: var(--fg-danger) !important;
    color: var(--fg-white);
  }
  
  .badge.bg-warning {
    background-color: var(--fg-warning) !important;
    color: var(--fg-neutral-900);
  }
  
  .badge.bg-info {
    background-color: var(--fg-info) !important;
    color: var(--fg-white);
  }
  
  /* Order status badges */
  .badge.bg-new {
    background-color: var(--fg-primary) !important;
    color: var(--fg-white);
  }
  
  .badge.bg-confirmed {
    background-color: var(--fg-info) !important;
    color: var(--fg-white);
  }
  
  .badge.bg-cnc,
  .badge.bg-shipping,
  .badge.bg-shipped {
    background-color: var(--fg-secondary) !important;
    color: var(--fg-white);
  }
  
  .badge.bg-polish {
    background-color: #6f42c1 !important;
    color: var(--fg-white);
  }
  
  .badge.bg-wash {
    background-color: #20c997 !important;
    color: var(--fg-white);
  }
  
  .badge.bg-paint {
    background-color: #fd7e14 !important;
    color: var(--fg-white);
  }
  
  .badge.bg-buff {
    background-color: #e83e8c !important;
    color: var(--fg-white);
  }
  
  .badge.bg-assembly {
    background-color: #6610f2 !important;
    color: var(--fg-white);
  }
  
  .badge.bg-hold {
    background-color: var(--fg-warning) !important;
    color: var(--fg-neutral-900);
  }
  
  .badge.bg-cancel {
    background-color: var(--fg-danger) !important;
    color: var(--fg-white);
  }
  
  /* Department-specific badges */
  .badge.bg-sales { background-color: var(--fg-primary) !important; color: var(--fg-white); }
  .badge.bg-awaiting_deposit { background-color: var(--fg-warning) !important; color: var(--fg-neutral-900) !important; }
  .badge.bg-engineering { background-color: #6366f1 !important; color: var(--fg-white); }
  .badge.bg-powdercoat { background-color: #f97316 !important; color: var(--fg-white); }
  .badge.bg-chrome { background-color: #84cc16 !important; color: var(--fg-neutral-900); }
  
  /* ============================
     STEPPER COMPONENT
     ============================ */
  .stepper-wrapper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
    overflow-x: auto;
    padding-bottom: 15px;
  }
  
  .stepper-wrapper::before {
    content: "";
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    height: 2px;
    background-color: var(--fg-neutral-300);
    z-index: 1;
  }
  
  .stepper-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    z-index: 2;
    text-align: center;
  }
  
  .step-counter {
    height: 30px;
    width: 30px;
    border-radius: 50%;
    background-color: var(--fg-neutral-300);
    border: 3px solid var(--fg-neutral-300);
    margin-bottom: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    color: var(--fg-white);
    transition: background-color 0.3s ease, border-color 0.3s ease;
  }
  
  .step-name {
    font-size: 0.75rem;
    color: var(--fg-neutral-600);
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
  }
  
  /* Completed Steps */
  .stepper-item.completed .step-counter {
    background-color: var(--fg-secondary);
    border-color: var(--fg-secondary);
    color: var(--fg-white);
  }
  
  .stepper-item.completed .step-name {
    color: var(--fg-neutral-700);
    font-weight: normal;
  }
  
  .stepper-item.completed .step-counter .bi-check-lg {
    color: var(--fg-white);
  }
  
  /* Active Step */
  .stepper-item.active .step-counter {
    background-color: var(--fg-white);
    border-color: var(--fg-primary);
    color: var(--fg-primary);
  }
  
  .stepper-item.active .step-counter::after {
    content: '';
    width: 16px;
    height: 16px;
    background-color: var(--fg-primary);
    border-radius: 50%;
    position: absolute;
  }
  
  .stepper-item.active .step-name {
    color: var(--fg-primary);
    font-weight: bold;
  }
  
  /* ============================
     ALERTS
     ============================ */
  .alert {
    padding: var(--fg-spacing-md) var(--fg-spacing-lg);
    margin-bottom: var(--fg-spacing-lg);
    border: 1px solid transparent;
    border-radius: var(--fg-border-radius);
  }
  
  .alert-dismissible .btn-close {
    padding: var(--fg-spacing-md) var(--fg-spacing-lg);
  }
  
  .alert-success {
    background-color: #e6f7f1;
    color: #045d43;
    border-color: #c2e8de;
  }
  
  .alert-danger {
    background-color: #fbeaee;
    color: #a01c2c;
    border-color: #f8d4da;
  }
  
  .alert-warning {
    background-color: #fef3e6;
    color: #aa5c0b;
    border-color: #fde3c8;
  }
  
  .alert-info {
    background-color: #e3eefa;
    color: #104693;
    border-color: #c7ddf6;
  }
  
  /* ============================
     DASHBOARD COMPONENTS
     ============================ */
  /* Dashboard Container */
  .dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 0;
  }
  
  /* Dashboard Header */
  .dashboard-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .dashboard-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: var(--fg-neutral-800);
  }
  
  .dashboard-title span, 
  .dashboard-header .card-title span.quote-mark {
    color: var(--fg-primary);
  }
  
  /* Department Grid */
  .dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
  }
  
  .dept-card {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    text-align: center;
    background-color: var(--fg-white);
    border-radius: var(--fg-border-radius);
    border: 1px solid var(--fg-neutral-200);
    box-shadow: var(--fg-box-shadow-sm);
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    color: var(--fg-neutral-700);
  }
  
  .dept-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--fg-box-shadow);
    color: var(--fg-primary);
  }
  
  /* Top border accent */
  .dept-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--fg-neutral-300);
    border-radius: var(--fg-border-radius) var(--fg-border-radius) 0 0;
  }
  
  .dept-card:hover::before {
    background-color: var(--fg-primary);
  }
  
  /* Department card content */
  .dept-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--fg-neutral-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
  }
  
  .dept-count {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--fg-neutral-800);
    line-height: 1.1;
    margin-bottom: 0.5rem;
  }
  
  .dept-status {
    font-size: 0.75rem;
    color: var(--fg-neutral-500);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
  }
  
  .dept-status i {
    font-size: 0.875rem;
  }
  
  /* Status indicators colors */
  .dept-status .bi-arrow-up-right {
    color: var(--fg-secondary);
  }
  
  .dept-status .bi-arrow-down-right {
    color: var(--fg-danger);
  }
  
  .dept-status .bi-dash {
    color: var(--fg-neutral-400);
  }
  
  /* Metrics Cards */
  .metrics-row {
    margin-bottom: 2rem;
  }
  
  .metrics-card {
    height: 100%;
    padding: 1.25rem;
    background-color: var(--fg-white);
    border-radius: var(--fg-border-radius);
    border: 1px solid var(--fg-neutral-200);
    box-shadow: var(--fg-box-shadow-sm);
    transition: box-shadow 0.2s ease-in-out;
  }
  
  .metrics-card:hover {
    box-shadow: var(--fg-box-shadow);
  }
  
  .metrics-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--fg-neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
  }
  
  .metrics-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--fg-neutral-800);
  }
  
  .metrics-card .metrics-value.text-danger {
    color: var(--fg-danger) !important;
  }
  
  /* Problem List */
  .problem-list-card {
    height: 100%;
  }
  
  .problem-list-card .card-header {
    background-color: var(--fg-warning);
    color: rgba(0, 0, 0, 0.7);
    font-weight: 600;
  }
  
  .problem-list-group {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
    margin: 0;
    list-style: none;
  }
  
  .problem-item {
    display: block;
    padding: 1rem;
    border-bottom: 1px solid var(--fg-neutral-200);
    transition: background-color 0.2s ease;
    text-decoration: none;
  }
  
  .problem-item:last-child {
    border-bottom: none;
  }
  
  .problem-item:hover {
    background-color: var(--fg-neutral-50);
  }
  
  .problem-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
  }
  
  .problem-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
    color: var(--fg-neutral-700);
  }
  
  .problem-dept {
    font-size: 0.6875rem;
    padding: 0.125rem 0.375rem;
    border-radius: var(--fg-border-radius-sm);
    background-color: var(--fg-primary);
    color: white;
    font-weight: 500;
    text-transform: capitalize;
  }
  
  .problem-desc {
    font-size: 0.8125rem;
    color: var(--fg-neutral-600);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .problem-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--fg-neutral-500);
  }
  
  .view-all-btn {
    display: block;
    padding: 0.75rem;
    text-align: center;
    background-color: var(--fg-neutral-50);
    color: var(--fg-primary);
    font-weight: 500;
    font-size: 0.8125rem;
    border-top: 1px solid var(--fg-neutral-200);
    transition: background-color 0.2s ease;
    text-decoration: none;
  }
  
  .view-all-btn:hover {
    background-color: var(--fg-neutral-100);
    text-decoration: none;
  }
  
  /* Empty state for problem list */
  .problem-list-card .empty-state {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--fg-neutral-500);
    background-color: transparent;
  }
  
  .problem-list-card .empty-state-icon {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    color: var(--fg-secondary);
  }
  
  .problem-list-card .empty-state-text {
    font-size: 0.9375rem;
    font-weight: 500;
  }
  
  /* Quick stats card */
  .quick-stats-card .card-body {
    padding: 1.25rem;
  }
  
  .quick-stats-card .stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--fg-neutral-100);
  }
  
  .quick-stats-card .stats-item:last-child {
    border-bottom: none;
  }
  
  .quick-stats-card .stats-label {
    font-size: 0.8125rem;
    color: var(--fg-neutral-600);
  }
  
  .quick-stats-card .stats-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--fg-neutral-800);
  }

  /* ============================
   CREATE ORDER PAGE STYLES
   ============================ */
.sticky-card {
    position: sticky;
    top: 20px;
}

#order-summary-card {
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#order-summary-card.is-sticky {
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

#live-total-price, #live-deposit-required {
    transition: all 0.2s ease;
}

.price-updated {
    animation: highlight-price 1.5s ease;
}

@keyframes highlight-price {
    0% { color: var(--fg-primary); }
    50% { color: var(--fg-secondary); }
    100% { color: var(--fg-primary); }
}

.customer-price-tier {
    font-size: 0.875em;
    color: var(--fg-neutral-600);
    margin-top: 0.25rem;
    display: block;
}

.field-hidden {
    display: none !important;
}

/* ============================
   COMPACT CREATE ORDER FORM
   ============================ */
/* Apply these styles to the order form container */
.create-order-form .card {
    margin-bottom: 0.75rem;
  }
  
  .create-order-form .card-header {
    padding: 0.5rem 0.75rem;
  }
  
  .create-order-form .card-body {
    padding: 0.75rem;
  }
  
  /* Reduce spacing between form groups */
  .create-order-form .form-group,
  .create-order-form .mb-3 {
    margin-bottom: 0.5rem;
  }
  
  /* Make form controls more compact */
  .create-order-form .form-control,
  .create-order-form .form-select {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    min-height: 32px;
    height: calc(1.5em + 0.5rem + 2px);
  }
  
  /* Smaller labels */
  .create-order-form .form-label {
    margin-bottom: 0.125rem;
    font-size: 0.8125rem;
    font-weight: 500;
  }
  
  /* Adjust row gutters to be tighter */
  .create-order-form .row.g-3 {
    --bs-gutter-y: 0.5rem;
  }
  
  /* Compact select dropdowns */
  .create-order-form select.form-select {
    padding-right: 1.75rem;
    background-position: right 0.25rem center;
  }
  
  /* Make helper text smaller */
  .create-order-form .form-text {
    margin-top: 0.125rem;
    font-size: 0.75rem;
  }
  
  /* Reduce spacing in input groups */
  .create-order-form .input-group {
    min-height: 32px;
  }
  
  /* Make buttons more compact */
  .create-order-form .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
  }
  
  /* Adjust order summary card */
  #order-summary-card .card-body {
    padding: 0.75rem;
  }
  
  /* Reduce some margins at the top and bottom of sections */
  .create-order-form h5 {
    margin-bottom: 0;
    font-size: 0.9375rem;
  }
  
  /* Make spinners smaller in number inputs */
  .create-order-form input[type="number"] {
    padding-right: 0.25rem;
  }
  
  /* More compact invalid feedback */
  .create-order-form .invalid-feedback {
    margin-top: 0.125rem;
    font-size: 0.75rem;
  }
  
  /* Add .compact class to your form to enable these styles */
  form.compact .mb-3,
  form.compact .mb-4 {
    margin-bottom: 0.5rem !important;
  }
  
  /* Optional: Make sticky card more compact */
  .sticky-card {
    top: 10px;
  }
  
  /* Optional: Adjust the debug button to be less intrusive */
  #debug-btn {
    bottom: 5px;
    right: 5px;
    padding: 0.15rem 0.35rem;
    font-size: 0.75rem;
    opacity: 0.6;
  }
  #debug-btn:hover {
    opacity: 1;
  }

/* Style for the department dollar value display */
.dept-value {
  font-size: 0.9rem;
  color: #06a97a; /* Using your --fg-secondary variable color */
  font-weight: 600;
  margin-top: 0.2rem;
  margin-bottom: 0;
}

/* Add powdercoat and chrome badges */
.badge.bg-powdercoat { 
  background-color: #f97316 !important; 
  color: var(--fg-white); 
}

.badge.bg-chrome { 
  background-color: #84cc16 !important; 
  color: var(--fg-neutral-900); 
}

/* Ensure mobile responsiveness for the additional department value text */
@media (max-width: 767.98px) {
  .dept-value {
    font-size: 0.8rem;
  }
}
/* ============================
   RUSH ORDER INDICATORS
   ============================ */

/* Base rush badge styles */
.rush-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4em 0.7em;
  border-radius: var(--fg-border-radius);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  animation: rush-pulse 2s infinite;
}

/* Standard RUSH badge */
.rush-badge-standard {
  background-color: var(--fg-warning) !important;
  color: var(--fg-neutral-900) !important;
  border: 1px solid #e6a820;
}

/* SUPER RUSH badge */
.super-rush-badge {
  background-color: var(--fg-danger) !important;
  color: var(--fg-white) !important;
  border: 1px solid #c53030;
  animation: super-rush-pulse 1.5s infinite;
}

/* Lightning bolt icons in rush badges */
.rush-badge .bi-lightning-fill,
.rush-badge .bi-lightning-charge-fill {
  font-size: 0.9em;
}

/* Pulse animations for attention */
@keyframes rush-pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes super-rush-pulse {
  0% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(229, 62, 81, 0.3);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
}

/* Hover effects for rush badges */
.rush-badge:hover {
  animation-play-state: paused;
  transform: scale(1.05);
}

/* Make sure rush badges stand out in table rows */
.table tbody tr:hover .rush-badge {
  opacity: 1;
}

/* Priority column styling */
.table th:nth-child(7),
.table td:nth-child(7) {
  text-align: center;
  width: 120px;
  vertical-align: middle;
}

/* Responsive adjustments for mobile */
@media (max-width: 767.98px) {
  .rush-badge {
    font-size: 0.6rem;
    padding: 0.3em 0.5em;
  }
  
  .rush-badge .bi-lightning-fill,
  .rush-badge .bi-lightning-charge-fill {
    font-size: 0.8em;
  }
  
  /* Stack badge content vertically on very small screens */
  @media (max-width: 575.98px) {
    .rush-badge {
      display: inline-block;
      padding: 0.2em 0.4em;
      font-size: 0.55rem;
    }
  }
}

/* Ensure rush badges are visible in print */
@media print {
  .rush-badge {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    animation: none !important;
    border: 1px solid #000 !important;
  }
  
  .rush-badge-standard {
    background-color: #ffc107 !important;
    color: #000 !important;
  }
  
  .super-rush-badge {
    background-color: #dc3545 !important;
    color: #fff !important;
  }
}

/* ============================
   ENGINEERING MODAL SCROLLING FIX
   ============================ */

/* Fix for Engineering Specs Modal Scrolling */
#editEngSpecsModal .modal-dialog {
  max-height: 90vh;
  margin: 1.75rem auto;
}

#editEngSpecsModal .modal-content {
  max-height: calc(90vh - 3.5rem);
  display: flex;
  flex-direction: column;
}

#editEngSpecsModal .modal-body {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(90vh - 200px); /* Adjust for header and footer */
  padding: 1.5rem;
}

/* Ensure the modal header and footer don't scroll */
#editEngSpecsModal .modal-header,
#editEngSpecsModal .modal-footer {
  flex-shrink: 0;
}

/* For smaller screens */
@media (max-height: 768px) {
  #editEngSpecsModal .modal-dialog {
    max-height: 100vh;
    margin: 0.5rem auto;
  }
  
  #editEngSpecsModal .modal-content {
    max-height: calc(100vh - 1rem);
  }
  
  #editEngSpecsModal .modal-body {
    max-height: calc(100vh - 180px);
  }
}

/* Add smooth scrolling */
#editEngSpecsModal .modal-body {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; /* For iOS devices */
}

/* Style the scrollbar for better visibility */
#editEngSpecsModal .modal-body::-webkit-scrollbar {
  width: 8px;
}

#editEngSpecsModal .modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

#editEngSpecsModal .modal-body::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

#editEngSpecsModal .modal-body::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Fix for form controls inside modal to ensure they're not cut off */
#editEngSpecsModal .form-control,
#editEngSpecsModal .form-select {
  width: 100%;
}

/* Ensure cards inside modal body don't cause horizontal scroll */
#editEngSpecsModal .card {
  margin-bottom: 1rem;
}

/* ============================
   SALES TRACKER
   ============================ */
.sales-tracker-container {
  margin-bottom: 2rem;
}

.sales-tracker-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 20px;
  padding: 2rem;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.sales-tracker-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

.sales-tracker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.tracker-title {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tracker-title i {
  color: #10b981;
  font-size: 1.125rem;
}

.tracker-date {
  font-size: 0.875rem;
  color: #64748b;
}

.sales-amount-section {
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.sales-amount {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(to right, #10b981, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.sales-goal {
  font-size: 1rem;
  color: #64748b;
}

.progress-container {
  position: relative;
  z-index: 1;
}

.progress-bar-wrapper {
  position: relative;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.progress-bar-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
}

.progress-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #06b6d4 50%, #6366f1 100%);
  border-radius: 12px;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.progress-glow {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.8) 0%, transparent 70%);
  border-radius: 50%;
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { opacity: 0.5; transform: translateY(-50%) scale(0.8); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.2); }
}

.progress-percentage {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  font-weight: 700;
  font-size: 0.875rem;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Goal Achieved Animation */
.goal-achieved {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 10;
  animation: celebrate 0.5s ease-out;
}

@keyframes celebrate {
  from {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.celebration-icon {
  font-size: 4rem;
  animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.achievement-text {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(45deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 0.5rem;
  letter-spacing: 2px;
}

.fireworks {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.firework {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #fbbf24;
  border-radius: 50%;
}

.firework:nth-child(1) {
  top: 50%;
  left: 50%;
  animation: firework1 1.5s ease-out infinite;
}

.firework:nth-child(2) {
  top: 50%;
  left: 50%;
  animation: firework2 1.5s ease-out infinite 0.2s;
}

.firework:nth-child(3) {
  top: 50%;
  left: 50%;
  animation: firework3 1.5s ease-out infinite 0.4s;
}

@keyframes firework1 {
  0% { transform: translate(0, 0) scale(0); opacity: 1; }
  100% { transform: translate(-100px, -100px) scale(20); opacity: 0; }
}

@keyframes firework2 {
  0% { transform: translate(0, 0) scale(0); opacity: 1; }
  100% { transform: translate(100px, -100px) scale(20); opacity: 0; }
}

@keyframes firework3 {
  0% { transform: translate(0, 0) scale(0); opacity: 1; }
  100% { transform: translate(0, -150px) scale(20); opacity: 0; }
}

/* Sales Tracker Responsive */
@media (max-width: 767.98px) {
  .sales-tracker-card {
    padding: 1.5rem;
  }
  
  .sales-amount {
    font-size: 2.5rem;
  }
  
  .achievement-text {
    font-size: 1.25rem;
  }
}

@media (max-width: 575.98px) {
  .sales-amount {
    font-size: 2rem;
  }
  
  .sales-tracker-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ============================
   ORDER IMAGE PRINT STYLES
   ============================ */

/* Hide print area in normal view */
#orderImagePrintArea {
    display: none !important;
}

/* Print button styling */
.btn-print-image {
    background-color: var(--fg-primary);
    color: white;
    border: none;
    transition: all 0.2s ease;
}

.btn-print-image:hover {
    background-color: var(--fg-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Order image display enhancement */
.order-image-display {
    border: 1px solid var(--fg-neutral-200);
    border-radius: var(--fg-border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.order-image-display:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Print-specific styles */
@media print {
    /* Hide everything except the print area */
    body * {
        visibility: hidden;
    }
    
    #orderImagePrintArea, 
    #orderImagePrintArea * {
        visibility: visible;
    }
    
    #orderImagePrintArea {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    
    /* Print header styling */
    .print-header {
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid #333;
    }
    
    .print-header h2 {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .print-header p {
        font-size: 14px;
        margin: 5px 0;
    }
    
    /* Print image styling */
    .print-image {
        max-width: 100%;
        max-height: 700px;
        display: block;
        margin: 0 auto;
        page-break-inside: avoid;
        border: 1px solid #ddd;
        padding: 10px;
    }
    
    /* Ensure good print quality */
    @page {
        size: letter;
        margin: 0.5in;
    }
    
    /* High quality image printing */
    img {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* ============================
   SALES TRACKER DATE PICKER
   ============================ */
.sales-date-input {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sales-date-input:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.sales-date-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.historical-note {
    font-size: 12px;
    color: #ffeb3b;
    margin-top: 5px;
    font-style: italic;
    animation: fadeIn 0.5s ease;
}

.sales-quick-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.sales-quick-stats .stat-item {
    text-align: center;
    transition: transform 0.2s ease;
}

.sales-quick-stats .stat-item:hover {
    transform: translateY(-2px);
}

.sales-quick-stats .stat-label {
    display: block;
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sales-quick-stats .stat-value {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #10b981;
}

/* Dark theme for date picker */
.sales-date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.sales-date-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .sales-quick-stats {
        padding-top: 15px;
        margin-top: 15px;
    }
    
    .sales-quick-stats .stat-value {
        font-size: 16px;
    }
    
    .sales-date-input {
        font-size: 12px;
        padding: 4px 8px;
    }
}

@media (max-width: 575.98px) {
    .sales-quick-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .sales-quick-stats .stat-item {
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .sales-quick-stats .stat-item:last-child {
        border-bottom: none;
    }
}