/* Custom breakpoint for 1380px */
@media (min-width: 1380px) {
    .xl\:fixed { position: fixed; }
    .xl\:inset-y-0 { top: 0; bottom: 0; }
    .xl\:left-0 { left: 0; }
    .xl\:z-50 { z-index: 50; }
    .xl\:flex { display: flex; }
    .xl\:w-72 { width: 18rem; }
    .xl\:flex-col { flex-direction: column; }
    .xl\:hidden { display: none; }
    .xl\:pl-72 { padding-left: 18rem; }
}

/* Simplified animations and effects */
@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Navigation item styles - simplified */
.nav-item {
    position: relative;
    outline: none;
}

/* Focus states for accessibility */
.nav-item:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 0.75rem;
}

/* Form validation styles */
.field-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.field-error:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
    outline: none !important;
}

.field-error-message {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    line-height: 1.25;
}

/* Simplified hover effects - removed transform and shimmer */


/* Animation classes - reduced durations */
.sidebar-enter {
    animation: slideIn 0.2s ease-out;
}

.menu-item-enter {
    animation: fadeIn 0.15s ease-out;
}

.nav-item-enter {
    animation: fadeIn 0.15s ease-out;
}

/* Glass effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Active state - elegant but without pulsing */


/* Mobile menu styles */
/* Legacy mobile drawer styles removed (using desktop sidebar as drawer now) */

/* Simplified mobile menu item animations */
.menu-item-enter {
    opacity: 0;
    animation: fadeIn 0.15s ease-out forwards;
}

/* Removed staggered animation delays for cleaner experience */
.menu-item-enter:nth-child(1) { animation-delay: 0s; }
.menu-item-enter:nth-child(2) { animation-delay: 0s; }
.menu-item-enter:nth-child(3) { animation-delay: 0s; }
.menu-item-enter:nth-child(4) { animation-delay: 0s; }
.menu-item-enter:nth-child(5) { animation-delay: 0s; }
.menu-item-enter:nth-child(6) { animation-delay: 0s; }
.menu-item-enter:nth-child(7) { animation-delay: 0s; }
.menu-item-enter:nth-child(8) { animation-delay: 0s; }

/* Task step collapsed state */
.task-steps.collapsed {
    display: none;
}

/* Task expand button rotation */
.task-expand-btn.rotated i {
    transform: rotate(180deg);
    transition: transform 0.2s ease-in-out;
}

/* Learning nav section chevron - points right when collapsed, down when expanded */
.learning-section-chevron {
    transition: transform 0.2s ease-in-out;
    transform: rotate(0deg);
}
.learning-section-chevron.rotate-90 {
    transform: rotate(90deg);
}

/* Task status badges */
.task-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.task-status-badge.open { background-color: #dbeafe; color: #1e40af; }
.task-status-badge.in_progress { background-color: #fef3c7; color: #d97706; }
.task-status-badge.on_hold { background-color: #fecaca; color: #dc2626; }
.task-status-badge.done { background-color: #d1fae5; color: #059669; }
.task-status-badge.skipped { background-color: #f3f4f6; color: #6b7280; }

/* Inventory Request Status badges */
.inventory-request-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.inventory-request-status-badge.submitted {
    background-color: #dbeafe; /* blue-100 */
    color: #1e40af; /* blue-800 */
}

.inventory-request-status-badge.partially_issued {
    background-color: #fef3c7; /* yellow-100 */
    color: #d97706; /* yellow-700 */
}

.inventory-request-status-badge.issued {
    background-color: #d1fae5; /* green-100 */
    color: #059669; /* green-700 */
}

.inventory-request-status-badge.rejected {
    background-color: #fee2e2; /* red-100 */
    color: #dc2626; /* red-600 */
}

.inventory-request-status-badge.cancelled {
    background-color: #f3f4f6; /* gray-100 */
    color: #6b7280; /* gray-500 */
}

/* Input type badges */
.input-type-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.input-type-badge.checkbox { background-color: #dbeafe; color: #1e40af; }
.input-type-badge.text { background-color: #e0e7ff; color: #3730a3; }
.input-type-badge.number { background-color: #fef3c7; color: #d97706; }
.input-type-badge.amount { background-color: #d1fae5; color: #059669; }
.input-type-badge.multiple-choice { background-color: #fce7f3; color: #be185d; }
.input-type-badge.inspection { background-color: #fef3c7; color: #d97706; }
.input-type-badge.yes-no-na { background-color: #e0e7ff; color: #3730a3; }
.input-type-badge.upload { background-color: #fce7f3; color: #be185d; }
.input-type-badge.signature { background-color: #d1fae5; color: #059669; }
.input-type-badge.date { background-color: #fef3c7; color: #d97706; }
.input-type-badge.meter { background-color: #e0e7ff; color: #3730a3; }
.input-type-badge.safety { background-color: #fecaca; color: #dc2626; }

/* Required indicator */
.required-indicator {
    background-color: #fecaca;
    color: #dc2626;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Step image */
.step-image {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
}

/* Tooltip enhancements */
.tippy-box {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.tippy-arrow {
    color: rgba(0, 0, 0, 0.9);
}

/* Responsive improvements */
@media (max-width: 640px) {
    .nav-item:focus-visible {
        outline-offset: 1px;
    }
}

/* Print styles */
@media print {
    .nav-item,
    .mobile-menu-overlay,
    .mobile-menu-slide,
    #mobile-sidebar-overlay {
        display: none !important;
    }
}

/* Maintenance Action Collapsible Styles */
.maintenance-action-item {
    transition: all 0.2s ease-in-out;
}

.maintenance-action-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.maintenance-action-content-0,
.maintenance-action-content-1,
.maintenance-action-content-2,
.maintenance-action-content-3,
.maintenance-action-content-4,
.maintenance-action-content-5,
.maintenance-action-content-6,
.maintenance-action-content-7,
.maintenance-action-content-8,
.maintenance-action-content-9 {
    transition: all 0.2s ease-in-out;
}

.maintenance-action-chevron-0,
.maintenance-action-chevron-1,
.maintenance-action-chevron-2,
.maintenance-action-chevron-3,
.maintenance-action-chevron-4,
.maintenance-action-chevron-5,
.maintenance-action-chevron-6,
.maintenance-action-chevron-7,
.maintenance-action-chevron-8,
.maintenance-action-chevron-9 {
    transition: transform 0.2s ease-in-out;
}

.maintenance-action-indicators-0,
.maintenance-action-indicators-1,
.maintenance-action-indicators-2,
.maintenance-action-indicators-3,
.maintenance-action-indicators-4,
.maintenance-action-indicators-5,
.maintenance-action-indicators-6,
.maintenance-action-indicators-7,
.maintenance-action-indicators-8,
.maintenance-action-indicators-9 {
    transition: opacity 0.2s ease-in-out;
}

/* Organization Settings Tab Content Fix */
/* Override global .tab-content styles that are hiding the organization settings tabs */
.organization-settings .tab-content {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure individual tab content divs are properly controlled by JavaScript */
.organization-settings [id^="tab-content-"] {
  display: none;
}

.organization-settings [id^="tab-content-"]:not(.hidden) {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Fix table display issues caused by JavaScript */
.organization-settings table {
  display: table !important;
}

.organization-settings thead {
  display: table-header-group !important;
}

.organization-settings tbody {
  display: table-row-group !important;
}

.organization-settings tr {
  display: table-row !important;
}

.organization-settings th,
.organization-settings td {
  display: table-cell !important;
}

/* Ensure proper flex behavior */
.organization-settings .flex {
  display: flex !important;
}

.organization-settings .inline-flex {
  display: inline-flex !important;
}

/* Ensure search filter is visible */
.organization-settings .px-4.py-3.border-b.border-gray-200.bg-gray-50 {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure search input is visible */
.organization-settings input[type="text"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* ===================== */
/* Dark mode overrides   */
/* ===================== */

/* Page-level dark root tweaks */
html.dark { color-scheme: dark; }

html.dark body {
  background: linear-gradient(to bottom right, #0b1020, #0b132b, #0e1726) fixed !important;
  min-height: 100vh;
}

/* Ensure the root element doesn't leak light gradient on long pages */
html.dark html { background-color: #0b1220 !important; }
html.dark .min-h-full { background-color: transparent !important; }
html.dark main,
html.dark .flex-1 { background-color: transparent !important; }

html.dark .glass-effect {
  background: rgba(17, 24, 39, 0.6);
  border-color: rgba(255,255,255,0.06);
}

html.dark .mobile-menu-overlay { background: rgba(0,0,0,0.7); }
html.dark #mobile-sidebar-overlay { background: rgba(0,0,0,0.7); }

/* Text colors */
html.dark .text-gray-800 { color: #e5e7eb !important; }
html.dark .text-gray-700 { color: #e5e7eb !important; }
html.dark .text-gray-600 { color: #cbd5e1 !important; }
html.dark .text-gray-500 { color: #94a3b8 !important; }
html.dark .text-gray-400 { color: #94a3b8 !important; }
html.dark .text-gray-900 { color: #f1f5f9 !important; }

/* Borders and dividers */
html.dark .border-gray-200 { border-color: rgba(255,255,255,0.08) !important; }
html.dark .bg-gray-50 { background-color: rgba(255,255,255,0.04) !important; }
html.dark .bg-white { background-color: #0b1220 !important; }
html.dark .bg-gray-100 { background-color: rgba(255,255,255,0.08) !important; }
html.dark .border-gray-100 { border-color: rgba(255,255,255,0.06) !important; }

/* Tab badges - dark mode friendly */
html.dark .js-tab-badge {
  background-color: rgba(75,85,99,0.8) !important;
  color: #e5e7eb !important;
}

/* Notification badges - improved visibility */
#notification-badge-desktop,
#notification-badge-mobile {
  font-weight: 600 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
}

html.dark #notification-badge-desktop,
html.dark #notification-badge-mobile {
  background-color: #ef4444 !important; /* red-500 with better contrast */
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

/* Inputs and textarea */
html.dark .border-gray-300 { border-color: rgba(255,255,255,0.12) !important; }
html.dark .focus\:ring-blue-500 { --tw-ring-color: #60a5fa; }

/* Nav states */
html.dark .nav-item:not(.active-glow) {
  color: #cbd5e1 !important;
}
html.dark .nav-item .bg-gray-100 { background-color: rgba(255,255,255,0.06) !important; }
html.dark .nav-item .group-hover\:bg-blue-100:hover { background-color: rgba(59,130,246,0.15) !important; }
html.dark .bg-blue-100 { background-color: rgba(59,130,246,0.15) !important; }
html.dark .border-blue-300 { border-color: rgba(59,130,246,0.4) !important; }
html.dark .border-blue-200 { border-color: rgba(59,130,246,0.35) !important; }

/* Trial CTA buttons – ensure light text in dark mode */
html.dark #nav-trial-cta:not(.trial-cta-button) {
  background-color: rgba(67, 56, 202, 0.6) !important;
  color: #e0e7ff !important;
}
html.dark #nav-trial-cta:not(.trial-cta-button):hover {
  background-color: rgba(67, 56, 202, 0.8) !important;
}
html.dark #nav-trial-cta.trial-cta-button {
  border-color: #818cf8 !important;
  color: #c7d2fe !important;
}
html.dark #nav-trial-cta.trial-cta-button:hover {
  border-color: #a5b4fc !important;
  color: #e0e7ff !important;
}

/* Active navigation item (selected) */
html.dark .nav-item.active-glow,
html.dark .nav-item[aria-current="page"] {
  color: #e5e7eb !important;
  background: linear-gradient(to right, rgba(59,130,246,0.14), rgba(147,51,234,0.14)) !important;
  border-color: #3b82f6 !important; /* keep left accent visible */
}
html.dark .nav-item.active-glow .w-8.h-8,
html.dark .nav-item[aria-current="page"] .w-8.h-8 {
  background-color: #3b82f6 !important;
  color: #ffffff !important;
}

/* Toasts */
html.dark .toast { background: #0b1220 !important; border-color: rgba(255,255,255,0.08) !important; }
html.dark .toast p { color: #e5e7eb !important; }

/* AI widget */
html.dark #ai-chat-widget { background-color: #0b1220 !important; border-color: rgba(255,255,255,0.08) !important; }
html.dark #ai-chat-context { background-color: rgba(59,130,246,0.08) !important; border-color: rgba(255,255,255,0.08) !important; }
html.dark #ai-chat-messages { background-color: #0b1220 !important; }
html.dark #ai-chat-input { background-color: #0f172a !important; color: #e5e7eb !important; border-color: rgba(255,255,255,0.1) !important; }

/* Auth pages (login/signup) */
html.dark .auth-page { background: linear-gradient(to bottom right, #0b1020, #0b132b, #0e1726) !important; }
html.dark .auth-page .bg-white\/80 { background-color: rgba(11, 18, 32, 0.8) !important; border-color: rgba(255,255,255,0.06) !important; }
html.dark .auth-page .bg-white\/50 { background-color: rgba(11, 18, 32, 0.5) !important; }
html.dark .auth-page .text-gray-700 { color: #e5e7eb !important; }
html.dark .auth-page .text-gray-600 { color: #cbd5e1 !important; }
html.dark .auth-page .text-gray-500 { color: #94a3b8 !important; }
html.dark .auth-page .text-gray-400 { color: #94a3b8 !important; }
html.dark .auth-page .border-gray-300 { border-color: rgba(255,255,255,0.12) !important; }
html.dark .auth-page .border-white\/20 { border-color: rgba(255,255,255,0.06) !important; }
html.dark .auth-page .hover\:bg-gray-50:hover { background-color: rgba(255,255,255,0.06) !important; }
html.dark .auth-page input::placeholder { color: #64748b !important; }

/* Tenant dropdown */
html.dark #tenant-dropdown-desktop,
html.dark #tenant-dropdown-mobile { background-color: #0b1220 !important; border-color: rgba(255,255,255,0.08) !important; }
html.dark #tenant-dropdown-desktop .text-gray-700,
html.dark #tenant-dropdown-mobile .text-gray-700 { color: #e5e7eb !important; }
html.dark #tenant-dropdown-desktop .text-gray-500,
html.dark #tenant-dropdown-mobile .text-gray-500 { color: #94a3b8 !important; }
/* Account settings page gradient wrapper */
html.dark .bg-gradient-to-br.from-gray-50.via-blue-50.to-indigo-100 { 
  background: linear-gradient(to bottom right, #0b1020, #0b132b, #0e1726) !important; 
}

/* Settings page cards */
html.dark .glass-card { 
  background: rgba(17,24,39,0.7) !important; 
  border-color: rgba(255,255,255,0.08) !important; 
}
html.dark .gradient-border > div { background: #0b1220 !important; }

/* Tables (work orders and elsewhere) */
html.dark table {
  background-color: transparent !important;
  color: #e5e7eb;
  border-color: rgba(255,255,255,0.08) !important;
}
html.dark table thead {
  background-color: rgba(255,255,255,0.04) !important;
  color: #cbd5e1 !important;
}
html.dark table th,
html.dark table td {
  border-color: rgba(255,255,255,0.08) !important;
}
html.dark table tbody tr:hover {
  background-color: rgba(59,130,246,0.08) !important;
}
/* If rows use zebra striping via bg-gray-50 */
html.dark .bg-gray-50 { background-color: rgba(255,255,255,0.04) !important; }

/* Divider utilities */
html.dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
  --tw-divide-opacity: 1;
  border-color: rgba(255,255,255,0.08) !important;
}

/* Form elements */
html.dark input:not([type="checkbox"]):not([type="radio"]),
html.dark select,
html.dark textarea {
  background-color: #0f172a !important;
  color: #e5e7eb !important;
  border-color: rgba(255,255,255,0.12) !important;
}
html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #64748b !important;
}
html.dark select option { color: #e5e7eb; background-color: #0f172a; }
html.dark .focus\:ring-blue-500 { --tw-ring-color: #60a5fa; }
html.dark .focus\:ring-blue-100 { --tw-ring-color: rgba(96,165,250,0.25); }

/* Hover utility overrides commonly used in UI */
html.dark .hover\:bg-blue-50:hover { background-color: rgba(59,130,246,0.12) !important; }
html.dark .hover\:bg-purple-50:hover { background-color: rgba(147,51,234,0.12) !important; }
html.dark .hover\:bg-red-50:hover { background-color: rgba(239,68,68,0.12) !important; }
html.dark .hover\:bg-green-50:hover { background-color: rgba(34,197,94,0.12) !important; }
html.dark .hover\:bg-gray-50:hover { background-color: rgba(255,255,255,0.06) !important; }

/* Common light text utility colors tuned for dark */
html.dark .text-blue-700 { color: #93c5fd !important; }
html.dark .text-blue-600 { color: #60a5fa !important; }
html.dark .text-red-600 { color: #f87171 !important; }
html.dark .text-blue-800 { color: #bfdbfe !important; }
html.dark .text-blue-900 { color: #dbeafe !important; }
html.dark .text-green-800 { color: #bbf7d0 !important; }
html.dark .text-green-900 { color: #dcfce7 !important; }
html.dark .text-red-800 { color: #fca5a5 !important; }
html.dark .text-red-900 { color: #fecaca !important; }

/* Status badge dark mode overrides */
html.dark .bg-green-100 { background-color: rgba(34, 197, 94, 0.2) !important; }
html.dark .bg-red-100 { background-color: rgba(239, 68, 68, 0.2) !important; }
html.dark .text-green-300 { color: #86efac !important; }
html.dark .text-red-300 { color: #fca5a5 !important; }
html.dark .text-purple-800 { color: #d8b4fe !important; }
html.dark .text-purple-900 { color: #ede9fe !important; }

/* Work Order Detail Modal (dark mode) */
html.dark #workOrderDetailModal .modal-content { background-color: #0b1220 !important; }
html.dark #workOrderDetailModal .bg-gray-50 { background-color: rgba(255,255,255,0.04) !important; }
html.dark #workOrderDetailModal .border-gray-200 { border-color: rgba(255,255,255,0.08) !important; }
html.dark #workOrderDetailModal .text-gray-900 { color: #f1f5f9 !important; }
html.dark #workOrderDetailModal .text-gray-700 { color: #cbd5e1 !important; }
html.dark #workOrderDetailModal .text-gray-600 { color: #9ca3af !important; }
html.dark #workOrderDetailModal .text-gray-500 { color: #94a3b8 !important; }
/* Task header strip */
html.dark #workOrderDetailModal .task-header { background: rgba(255,255,255,0.06) !important; }
/* Step card hover */
html.dark #workOrderDetailModal .step-card:hover { background-color: rgba(255,255,255,0.06) !important; }
/* Light hover utilities inside modal */
html.dark #workOrderDetailModal .hover\:bg-gray-50:hover { background-color: rgba(255,255,255,0.06) !important; }
html.dark #workOrderDetailModal .hover\:bg-gray-100:hover { background-color: rgba(255,255,255,0.08) !important; }
html.dark #workOrderDetailModal .hover\:bg-blue-50:hover { background-color: rgba(59,130,246,0.12) !important; }
/* Buttons that use white/gray backgrounds */
html.dark #workOrderDetailModal button.bg-white,
html.dark #workOrderDetailModal .bg-white button,
html.dark #workOrderDetailModal .px-2.py-1.border.border-gray-300.text-xs.font-medium.rounded.bg-white,
html.dark #workOrderDetailModal .px-1.py-1.border.border-gray-300.text-xs.rounded.bg-white {
  background-color: #151b29 !important;
  color: #e5e7eb !important;
  border-color: rgba(255,255,255,0.12) !important;
}
html.dark #workOrderDetailModal select { 
  background-color: #6276a5 !important; 
  color: #e5e7eb !important; 
  border-color: rgba(255,255,255,0.12) !important; 
}
/* Tabs in work order modal */
html.dark #workOrderDetailModal .tab-button { color: #94a3b8 !important; }
html.dark #workOrderDetailModal .tab-button { 
  background-color: rgba(255,255,255,0.02) !important;
  border-bottom-color: transparent !important;
  border-bottom-width: 0 !important;
}
html.dark #workOrderDetailModal .tab-button.active { 
  color: #93c5fd !important; 
  background-color: transparent !important;
  border-bottom-color: rgba(59,130,246,0.8) !important; 
  border-bottom-width: 2px !important;
}
html.dark #workOrderDetailModal .tab-button:hover:not(.active) { 
  color: #e5e7eb !important; 
  background-color: rgba(255,255,255,0.06) !important; 
}
html.dark .border-blue-500 { border-color: rgba(59,130,246,0.6) !important; }

/* Theme toggle icons visibility baseline (JS flips display) */
.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: inline-block; }
html.dark .theme-toggle .icon-moon { display: inline-block; }
html.dark .theme-toggle .icon-sun { display: none; }

/* Generic dropdowns and menus (filters, selectors, etc.) */
html.dark [role="menu"],
html.dark [role="listbox"],
html.dark .multi-select-dropdown,
html.dark .dropdown-menu,
html.dark .dropdown-panel,
html.dark #tagsDropdown,
html.dark #assetGroupsDropdown,
html.dark #devicesDropdown,
html.dark #modalLocationDropdown {
  background-color: #0b1220 !important;
  color: #e5e7eb !important;
  border-color: rgba(255,255,255,0.08) !important;
}
html.dark [role="menu"] *,
html.dark [role="listbox"] *,
html.dark .multi-select-dropdown *,
html.dark .dropdown-menu *,
html.dark .dropdown-panel * {
  color: inherit;
}
/* Any menu matching *DropdownMenu id */
html.dark [id$="DropdownMenu"] {
  background-color: #0b1220 !important;
  color: #e5e7eb !important;
  border-color: rgba(255,255,255,0.08) !important;
}
html.dark [id$="DropdownMenu"] * { color: inherit; }
html.dark [id$="DropdownMenu"] .hover\:bg-blue-50:hover { background-color: rgba(59,130,246,0.12) !important; }
html.dark [id$="DropdownMenu"] .hover\:bg-gray-100:hover { background-color: rgba(255,255,255,0.08) !important; }
html.dark [id$="DropdownMenu"] .hover\:bg-yellow-50:hover { background-color: rgba(250,204,21,0.12) !important; }
html.dark [id$="DropdownMenu"] .hover\:bg-green-50:hover { background-color: rgba(34,197,94,0.12) !important; }
html.dark [id$="DropdownMenu"] .hover\:bg-red-50:hover { background-color: rgba(239,68,68,0.12) !important; }
html.dark [id$="DropdownMenu"] .hover\:bg-purple-50:hover { background-color: rgba(147,51,234,0.12) !important; }

/* Add Procedure to Work Order: asset dropdown (dark mode) */
html.dark #procedureAssetSelect {
  background-color: #0b1220 !important;
  color: #e5e7eb !important;
  border-color: rgba(255,255,255,0.12) !important;
}
html.dark #procedureAssetDropdown {
  background-color: #0b1220 !important;
  color: #e5e7eb !important;
  border-color: rgba(255,255,255,0.08) !important;
}
html.dark #procedureAssetDropdown * { color: inherit; }
html.dark #procedureAssetDropdown .asset-option:hover {
  background-color: rgba(255,255,255,0.06) !important;
}
html.dark [role="menu"] a:hover,
html.dark [role="menu"] button:hover,
html.dark [role="listbox"] [role="option"]:hover,
html.dark .dropdown-menu a:hover,
html.dark .dropdown-menu button:hover,
html.dark .multi-select-dropdown div:hover {
  background-color: rgba(255,255,255,0.06) !important;
}
/* Filter dropdown menus in Work Orders */
html.dark .filter-dropdown-menu,
html.dark #priorityDropdownMenu,
html.dark #workTypeDropdownMenu,
html.dark #siteDropdownMenu {
  background-color: #0b1220 !important;
  color: #e5e7eb !important;
  border-color: rgba(255,255,255,0.08) !important;
}
html.dark .filter-dropdown-menu *,
html.dark #priorityDropdownMenu *,
html.dark #workTypeDropdownMenu *,
html.dark #siteDropdownMenu * { color: inherit; }
/* Hover backgrounds within filter dropdowns */
html.dark .filter-dropdown-menu .hover\:bg-blue-50:hover { background-color: rgba(59,130,246,0.12) !important; }
html.dark .filter-dropdown-menu .hover\:bg-red-50:hover { background-color: rgba(239,68,68,0.12) !important; }
html.dark .filter-dropdown-menu .hover\:bg-yellow-50:hover { background-color: rgba(250,204,21,0.12) !important; }
html.dark .filter-dropdown-menu .hover\:bg-green-50:hover { background-color: rgba(34,197,94,0.12) !important; }
html.dark .filter-dropdown-menu .hover\:bg-gray-100:hover { background-color: rgba(255,255,255,0.08) !important; }

/* Work Orders: Status dropdown badge colors (dark mode only) */
html.dark #statusDropdownMenu .status-badge { 
  background: rgba(255,255,255,0.06) !important; 
  color: #e5e7eb !important; 
  border-left: 2px solid rgba(255,255,255,0.18) !important;
}
html.dark #statusDropdownMenu .status-badge.requested { 
  background: rgba(148,163,184,0.15) !important; /* slate */
  color: #cbd5e1 !important; 
  border-left: 2px solid rgba(148,163,184,0.45) !important; 
}
html.dark #statusDropdownMenu .status-badge.approved { 
  background: rgba(59,130,246,0.15) !important; 
  color: #93c5fd !important; 
  border-left: 2px solid rgba(59,130,246,0.45) !important; 
}
html.dark #statusDropdownMenu .status-badge.in_progress { 
  background: rgba(250,204,21,0.15) !important; 
  color: #fde68a !important; 
  border-left: 2px solid rgba(250,204,21,0.45) !important; 
}
html.dark #statusDropdownMenu .status-badge.completed { 
  background: rgba(16,185,129,0.15) !important; 
  color: #86efac !important; 
  border-left: 2px solid rgba(16,185,129,0.45) !important; 
}
html.dark #statusDropdownMenu .status-badge.closed { 
  background: rgba(34,197,94,0.15) !important; 
  color: #86efac !important; 
  border: 1px solid rgba(34,197,94,0.45) !important; 
}
html.dark #statusDropdownMenu .status-badge.cancelled { 
  background: rgba(239,68,68,0.15) !important; 
  color: #fca5a5 !important; 
  border: 1px solid rgba(239,68,68,0.45) !important; 
}

/* Table view: Status column badge colors (dark mode) */
html.dark body.table-view td[data-column="status"] .status-badge {
  background: rgba(255,255,255,0.06) !important;
  color: #e5e7eb !important;
  border-left: 2px solid rgba(255,255,255,0.18) !important;
}
html.dark body.table-view td[data-column="status"] .status-badge.requested {
  background: rgba(148,163,184,0.15) !important;
  color: #cbd5e1 !important;
  border-left: 2px solid rgba(148,163,184,0.45) !important;
}
html.dark body.table-view td[data-column="status"] .status-badge.approved {
  background: rgba(59,130,246,0.15) !important;
  color: #93c5fd !important;
  border-left: 2px solid rgba(59,130,246,0.45) !important;
}
html.dark body.table-view td[data-column="status"] .status-badge.in_progress {
  background: rgba(250,204,21,0.15) !important;
  color: #fde68a !important;
  border-left: 2px solid rgba(250,204,21,0.45) !important;
}
html.dark body.table-view td[data-column="status"] .status-badge.completed {
  background: rgba(16,185,129,0.15) !important;
  color: #86efac !important;
  border-left: 2px solid rgba(16,185,129,0.45) !important;
}
html.dark body.table-view td[data-column="status"] .status-badge.closed {
  background: rgba(34,197,94,0.15) !important;
  color: #86efac !important;
  border: 1px solid rgba(34,197,94,0.45) !important;
}
html.dark body.table-view td[data-column="status"] .status-badge.cancelled {
  background: rgba(239,68,68,0.15) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239,68,68,0.45) !important;
}

/* Assets: Status dropdown and table badges (dark mode) */
/* Dropdown badges */
html.dark #statusDropdownMenu .status-badge.operational {
  background: rgba(16,185,129,0.15) !important;
  color: #86efac !important;
  border-left: 2px solid rgba(16,185,129,0.45) !important;
}
html.dark #statusDropdownMenu .status-badge.maintenance {
  background: rgba(250,204,21,0.15) !important;
  color: #fde68a !important;
  border-left: 2px solid rgba(250,204,21,0.45) !important;
}
html.dark #statusDropdownMenu .status-badge.out_of_service {
  background: rgba(239,68,68,0.15) !important;
  color: #fca5a5 !important;
  border-left: 2px solid rgba(239,68,68,0.45) !important;
}
html.dark #statusDropdownMenu .status-badge.retired {
  background: rgba(148,163,184,0.15) !important;
  color: #cbd5e1 !important;
  border-left: 2px solid rgba(148,163,184,0.45) !important;
}
/* Table cells */
html.dark td[data-column="status"] .status-badge.operational {
  background: rgba(16,185,129,0.15) !important;
  color: #86efac !important;
  border-left: 2px solid rgba(16,185,129,0.45) !important;
}
html.dark td[data-column="status"] .status-badge.maintenance {
  background: rgba(250,204,21,0.15) !important;
  color: #fde68a !important;
  border-left: 2px solid rgba(250,204,21,0.45) !important;
}
html.dark td[data-column="status"] .status-badge.out_of_service {
  background: rgba(239,68,68,0.15) !important;
  color: #fca5a5 !important;
  border-left: 2px solid rgba(239,68,68,0.45) !important;
}
html.dark td[data-column="status"] .status-badge.retired {
  background: rgba(148,163,184,0.15) !important;
  color: #cbd5e1 !important;
  border-left: 2px solid rgba(148,163,184,0.45) !important;
}

/* Inventory Request Status badges (dark mode) */
html.dark .inventory-request-status-badge.submitted {
  background: rgba(59,130,246,0.15) !important; /* blue */
  color: #93c5fd !important; /* blue-300 */
}

html.dark .inventory-request-status-badge.partially_issued {
  background: rgba(250,204,21,0.15) !important; /* yellow */
  color: #fde68a !important; /* yellow-200 */
}

html.dark .inventory-request-status-badge.issued {
  background: rgba(16,185,129,0.15) !important; /* green */
  color: #86efac !important; /* green-300 */
}

html.dark .inventory-request-status-badge.rejected {
  background: rgba(239,68,68,0.15) !important; /* red */
  color: #fca5a5 !important; /* red-300 */
}

html.dark .inventory-request-status-badge.cancelled {
  background: rgba(148,163,184,0.15) !important; /* gray */
  color: #cbd5e1 !important; /* gray-300 */
}

/* Search input overrides */
html.dark .search-input {
  background: #0f172a !important;
  color: #e5e7eb !important;
  border-color: rgba(255,255,255,0.12) !important;
}
html.dark .search-input::placeholder { color: #64748b !important; }
html.dark .search-input:focus {
  background: #0f172a !important;
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 2px rgba(96,165,250,0.25) !important;
}
/* Apply same styling to common search ids across pages */
html.dark input[type="text"]#search,
html.dark input[type="search"]#search,
html.dark input[type="text"][id^="search-"],
html.dark input[type="search"][id^="search-"],
html.dark input[type="text"][id$="SearchInput"],
html.dark input[type="search"][id$="SearchInput"],
html.dark input[type="text"][id*="searchInput"],
html.dark input[type="search"][id*="searchInput"],
html.dark input[type="text"][id*="location-search"],
html.dark input[type="search"][id*="location-search"],
html.dark input[type="text"]#modalLocationSearchInput,
html.dark input[type="text"]#woModalLocationSearchInput,
html.dark input[type="text"]#location-search-input {
  background: #0f172a !important;
  color: #e5e7eb !important;
  border-color: rgba(255,255,255,0.12) !important;
}
html.dark input[type="text"]#search::placeholder,
html.dark input[type="search"]#search::placeholder,
html.dark input[type="text"][id^="search-"]::placeholder,
html.dark input[type="search"][id^="search-"]::placeholder,
html.dark input[type="text"][id$="SearchInput"]::placeholder,
html.dark input[type="search"][id$="SearchInput"]::placeholder,
html.dark input[type="text"][id*="searchInput"]::placeholder,
html.dark input[type="search"][id*="searchInput"]::placeholder,
html.dark input[type="text"][id*="location-search"]::placeholder,
html.dark input[type="search"][id*="location-search"]::placeholder,
html.dark input[type="text"]#modalLocationSearchInput::placeholder,
html.dark input[type="text"]#woModalLocationSearchInput::placeholder,
html.dark input[type="text"]#location-search-input::placeholder {
  color: #64748b !important;
}
html.dark input[type="text"]#search:focus,
html.dark input[type="search"]#search:focus,
html.dark input[type="text"][id^="search-"]:focus,
html.dark input[type="search"][id^="search-"]:focus,
html.dark input[type="text"][id$="SearchInput"]:focus,
html.dark input[type="search"][id$="SearchInput"]:focus,
html.dark input[type="text"][id*="searchInput"]:focus,
html.dark input[type="search"][id*="searchInput"]:focus,
html.dark input[type="text"][id*="location-search"]:focus,
html.dark input[type="search"][id*="location-search"]:focus,
html.dark input[type="text"]#modalLocationSearchInput:focus,
html.dark input[type="text"]#woModalLocationSearchInput:focus,
html.dark input[type="text"]#location-search-input:focus {
  background: #0f172a !important;
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 2px rgba(96,165,250,0.25) !important;
}

/* Kanban board container gradient overrides */
html.dark .bg-gradient-to-br.from-slate-50.to-blue-50 { 
  background: linear-gradient(to bottom right, #0b1020, #0b132b, #0e1726) !important;
}

/* Kanban column container glass override */
html.dark .bg-gradient-to-r.from-gray-50.to-white { 
  background: linear-gradient(to right, rgba(255,255,255,0.06), rgba(255,255,255,0.02)) !important;
}

/* Kanban workorder card */
html.dark .workorder-card { 
  background-color: #0b1220 !important; 
  border-color: rgba(255,255,255,0.08) !important; 
}

/* Kanban column scrollbars */
html.dark .kanban-column { scrollbar-color: #6366f1 #0b1220; }
html.dark .kanban-column::-webkit-scrollbar-track { background: #0b1220; }
html.dark .kanban-column::-webkit-scrollbar-thumb { background: linear-gradient(135deg, #6366f1, #8b5cf6); }

/* View toggle buttons (kanban/table/calendar) */
html.dark .view-toggle-btn { color: #cbd5e1; }
html.dark .view-toggle-btn.border { border-color: rgba(255,255,255,0.12) !important; }

/* FullCalendar dark theme */
html.dark .fc-theme-standard .fc-scrollgrid,
html.dark .fc-theme-standard td,
html.dark .fc-theme-standard th { border-color: rgba(255,255,255,0.08) !important; }
html.dark .fc { color: #e5e7eb; }
html.dark .fc .fc-toolbar-title { color: #e5e7eb; }
html.dark .fc .fc-button { 
  background: transparent; 
  border: 1px solid rgba(255,255,255,0.12); 
  color: #cbd5e1; 
}
html.dark .fc .fc-button:hover { background: rgba(255,255,255,0.06); }
html.dark .fc .fc-button-primary:not(:disabled).fc-button-active,
html.dark .fc .fc-button:active { background: rgba(59,130,246,0.15); border-color: rgba(59,130,246,0.4); color: #93c5fd; }
html.dark .fc .fc-col-header { background-color: rgba(255,255,255,0.04); }
html.dark .fc .fc-daygrid-day,
html.dark .fc .fc-timegrid-slot { background-color: transparent; }
html.dark .fc .fc-daygrid-day-number { color: #cbd5e1; }
html.dark .fc .fc-daygrid-day.fc-day-today { background: rgba(59,130,246,0.12); }
html.dark .fc .fc-daygrid-event, 
html.dark .fc .fc-timegrid-event { 
  background-color: rgba(59,130,246,0.18); 
  border-color: rgba(59,130,246,0.35); 
  color: #e5e7eb; 
}
html.dark .fc .fc-popover { background: #0b1220; border-color: rgba(255,255,255,0.08); }
html.dark .fc .fc-popover .fc-popover-header { background: rgba(255,255,255,0.04); color: #e5e7eb; }
html.dark .fc a { color: #93c5fd; }
/* Calendar root container and scrollgrid backgrounds/borders */
html.dark #calendar { background-color: transparent !important; border-color: rgba(255,255,255,0.08) !important; }
html.dark .fc .fc-scrollgrid { background-color: transparent !important; }
html.dark .fc .fc-col-header-cell-cushion { color: #e5e7eb !important; }
html.dark .fc .fc-daygrid-day-frame { background-color: transparent !important; }
html.dark .fc .fc-daygrid-day-bg .fc-bg-event { opacity: 0.15; }
/* Selection/drag highlight */
html.dark .fc .fc-highlight { background: rgba(147,197,253,0.2) !important; }
/* Timegrid specifics */
html.dark .fc .fc-timegrid-axis { background: rgba(255,255,255,0.03); color: #94a3b8; }
html.dark .fc .fc-timegrid-slots td { border-color: rgba(255,255,255,0.06) !important; }
html.dark .fc .fc-timegrid-slot-label { color: #94a3b8; }
/* List view (if used) */
html.dark .fc .fc-list, 
html.dark .fc .fc-list-table { background: transparent; }
html.dark .fc .fc-list-day-cushion { background: rgba(255,255,255,0.04); color: #e5e7eb; }
html.dark .fc .fc-list-event { border-color: rgba(255,255,255,0.08); }

/* Status column color blocks (assets status view) */
html.dark .bg-red-50 { background-color: rgba(239,68,68,0.12) !important; }
html.dark .border-red-200 { border-color: rgba(239,68,68,0.35) !important; }
html.dark .bg-green-50 { background-color: rgba(34,197,94,0.12) !important; }
html.dark .border-green-200 { border-color: rgba(34,197,94,0.35) !important; }
html.dark .bg-yellow-50 { background-color: rgba(250,204,21,0.12) !important; }
html.dark .border-yellow-200 { border-color: rgba(250,204,21,0.35) !important; }
html.dark .bg-blue-50 { background-color: rgba(59,130,246,0.12) !important; }
html.dark .border-blue-200 { border-color: rgba(59,130,246,0.35) !important; }
html.dark .bg-orange-50 { background-color: rgba(249,115,22,0.12) !important; }
html.dark .border-orange-200 { border-color: rgba(249,115,22,0.35) !important; }
html.dark .bg-purple-50 { background-color: rgba(147,51,234,0.12) !important; }
html.dark .border-purple-200 { border-color: rgba(147,51,234,0.35) !important; }
html.dark .bg-indigo-50 { background-color: rgba(99,102,241,0.12) !important; }
html.dark .border-indigo-200 { border-color: rgba(99,102,241,0.35) !important; }
html.dark .bg-pink-50 { background-color: rgba(236,72,153,0.12) !important; }
html.dark .border-pink-200 { border-color: rgba(236,72,153,0.35) !important; }

 
/* Required badge – light/dark mode friendly */
.required-indicator {
  display: inline-flex !important;
  align-items: center !important;
  padding: 2px 8px !important;
  border-radius: 9999px !important;
  font-size: 0.75rem !important; /* 12px */
  line-height: 1rem !important;  /* 16px */
  font-weight: 600 !important;
  background-color: #FEE2E2 !important; /* red-100 */
  color: #991B1B !important;           /* red-800 */
  border: 1px solid #FCA5A5 !important; /* red-300 */
}
@media (prefers-color-scheme: dark) {
  .required-indicator {
    background-color: rgba(153, 27, 27, 0.25) !important; /* red-900 at low opacity */
    color: #FCA5A5 !important; /* red-300 */
    border-color: rgba(252, 165, 165, 0.35) !important; /* red-300 translucent */
  }
}

/* Optional badge – light/dark mode friendly */
.optional-indicator {
  display: inline-flex !important;
  align-items: center !important;
  padding: 2px 8px !important;
  border-radius: 9999px !important;
  font-size: 0.75rem !important;
  line-height: 1rem !important;
  font-weight: 600 !important;
  background-color: #E5E7EB !important; /* gray-200 */
  color: #374151 !important;            /* gray-700 */
  border: 1px solid #D1D5DB !important; /* gray-300 */
}
@media (prefers-color-scheme: dark) {
  .optional-indicator {
    background-color: rgba(31, 41, 55, 0.35) !important; /* gray-800 translucent */
    color: #D1D5DB !important; /* gray-300 */
    border-color: rgba(156, 163, 175, 0.4) !important; /* gray-400 translucent */
  }
}

/* Increase contrast for required badge text */
.required-indicator {
  color: #7F1D1D !important; /* darker red-900-ish for light mode */
}
@media (prefers-color-scheme: dark) {
  .required-indicator {
    color: #FCA5A5 !important; /* keep high-contrast in dark */
    background-color: rgba(127, 29, 29, 0.35) !important; /* darker base */
    border-color: rgba(252, 165, 165, 0.45) !important;
  }
}

 
/* Inspection check buttons – improve dark-mode contrast */
.inspection-execution-input {
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
@media (prefers-color-scheme: dark) {
  /* Unselected state in dark mode */
  .inspection-execution-input:not([data-selected="true"]) {
    background-color: #374151 !important; /* gray-700 */
    border-color: #4B5563 !important;     /* gray-600 */
    color: #E5E7EB !important;            /* gray-200 */
  }
  .inspection-execution-input:not([data-selected="true"]):hover {
    background-color: #4B5563 !important; /* gray-600 */
  }
  /* Selected states */
  .inspection-execution-input[data-selected="true"][data-option="Pass"] {
    background-color: #16A34A !important; /* green-600 */
    border-color: #22C55E !important;     /* green-500 */
    color: #FFFFFF !important;
  }
  .inspection-execution-input[data-selected="true"][data-option="Fail"] {
    background-color: #DC2626 !important; /* red-600 */
    border-color: #EF4444 !important;     /* red-500 */
    color: #FFFFFF !important;
  }
  .inspection-execution-input[data-selected="true"][data-option="Flag"] {
    background-color: #D97706 !important; /* amber-600 */
    border-color: #F59E0B !important;     /* amber-500 */
    color: #1F2937 !important;            /* gray-800 for contrast on amber */
  }
}

/* Class-based dark mode (.dark) support for inspection buttons */
.dark .inspection-execution-input:not([data-selected="true"]) {
  background-color: #374151 !important; /* gray-700 */
  border-color: #4B5563 !important;     /* gray-600 */
  color: #E5E7EB !important;            /* gray-200 */
}
.dark .inspection-execution-input:not([data-selected="true"]):hover {
  background-color: #4B5563 !important; /* gray-600 */
}
.dark .inspection-execution-input[data-selected="true"][data-option="Pass"] {
  background-color: #16A34A !important; /* green-600 */
  border-color: #22C55E !important;     /* green-500 */
  color: #FFFFFF !important;
}
.dark .inspection-execution-input[data-selected="true"][data-option="Fail"] {
  background-color: #DC2626 !important; /* red-600 */
  border-color: #EF4444 !important;     /* red-500 */
  color: #FFFFFF !important;
}
.dark .inspection-execution-input[data-selected="true"][data-option="Flag"] {
  background-color: #D97706 !important; /* amber-600 */
  border-color: #F59E0B !important;     /* amber-500 */
  color: #1F2937 !important;            /* gray-800 */
}

 