/* =====================================================
   🌐 GLOBAL / RESET
===================================================== */
body.bg-light {
    background-color: #f8f9fa;
    margin: 0;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #333;
}

* {
    box-sizing: border-box;
}

/* Updated Color Scheme Variables */
:root {
  /* Primary gradient - white background with blue text */
  --primary-gradient-bg: #ffffff;
  --primary-gradient-border: #0972d3;
  --primary-gradient-text: #0972d3;
  
  /* Secondary gradient - black text with orange background */
  --secondary-gradient-bg: #ff9900;
  --secondary-gradient-border: #ff9900;
  --secondary-gradient-text: #000000;
  
  /* Accent colors */
  --accent-color: #0972d3;
  --accent-secondary: #ff9900;
  --header-height: 44px;
}

/* Dark theme overrides */
body.dark {
  --primary-gradient-bg: #16191f;
  --primary-gradient-border: #0972d3;
  --primary-gradient-text: #0972d3;
  
  --secondary-gradient-bg: #ff9900;
  --secondary-gradient-border: #ff9900;
  --secondary-gradient-text: #000000;
  --header-height: 44px;
}

/* =====================================================
   🏗️ GLOBAL CARDS
===================================================== */
.global-card {
    background: var(--bg-color, #ffffff);
    border: 1px solid var(--border-color, #e1e5e9);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.global-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-gradient-border);
    background: var(--primary-gradient-bg);
}

/* Dark theme for global cards */
body.dark .global-card {
    background: var(--dark-bg-color, #1a1a1a);
    border-color: var(--dark-border-color, rgba(9, 114, 211, 0.2));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark .global-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-gradient-border);
    background: var(--primary-gradient-bg);
}

/* =====================================================
   🔁 WRAPPER LAYOUT (sticky footer)
===================================================== */
.layout-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 24px;  /* ✅ reduced space for smaller footer */
}

main {
    flex: 1;
}

/* =====================================================
   🍞 GLOBAL BREADCRUMB NAVIGATION
===================================================== */
.global-breadcrumb {
    background: var(--header-bg, #ffffff);
    border-bottom: var(--header-border, 1px solid #e1e5e9);
    /* box-shadow: var(--header-shadow, 0 1px 4px rgba(0, 0, 0, 0.04)); */
    position: sticky;
    top: 44px;
    z-index: 999;
    height: 48px;
    min-height: 48px;
    transition: all 0.3s ease;
}

.breadcrumb-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.25rem;
    height: 100%;
    display: flex;
    align-items: center;
}

.breadcrumb-nav {
    width: 100%;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

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

.breadcrumb-link {
    display: flex;
    align-items: center;
    color: #000000;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
}

.breadcrumb-link:hover {
    color: #000000;
    text-decoration: underline;
}

.breadcrumb-link i {
    display: none;
}

.breadcrumb-separator {
    color: #000000;
    margin: 0 0.25rem;
    font-size: 0.875rem;
}

.breadcrumb-current {
    color: #006ce0;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

/* =====================================================
   🍔 BREADCRUMB MENU ICON & VERTICAL MENU
===================================================== */

/* Page Loading Overlay */
.page-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.page-loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.page-loading-overlay.removed {
    display: none;
}

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

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

.loading-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    letter-spacing: 0.025em;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.breadcrumb-menu-toggle {
    margin-right: 1rem;
    display: flex;
    align-items: center;
}

.menu-toggle-btn {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #ffffff;
    padding: 0.375rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.menu-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.menu-toggle-btn i {
    font-size: 0.875rem;
}

/* Ensure no borders on menu buttons */
.menu-toggle-btn,
.menu-hide-btn {
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

/* Vertical Menu */
.breadcrumb-vertical-menu {
    position: fixed;
    top: 92px; /* Start below header only (no gap to breadcrumb) */
    left: -200px;
    width: 200px; /* Reduced from 240px */
    height: calc(100vh - 92px); /* Full height minus header only */
    background: #f8f9fa; /* Light gray background like AWS */
    border-right: 1px solid #d1d5db; /* Darker border like AWS */
    z-index: 99999;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Smooth easing like AWS */
    overflow-y: auto;
    overflow-x: hidden;
    /* box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1); */
    -webkit-overflow-scrolling: touch;
    font-family: 'Amazon Ember', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Custom scrollbar styling like AWS Cloud Console */
.breadcrumb-vertical-menu::-webkit-scrollbar {
    width: 8px;
}

.breadcrumb-vertical-menu::-webkit-scrollbar-track {
    background: transparent;
}

.breadcrumb-vertical-menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.breadcrumb-vertical-menu::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
    background-clip: content-box;
}

/* Dark theme scrollbar */
body.dark .breadcrumb-vertical-menu::-webkit-scrollbar-thumb {
    background: #4b5563;
}

body.dark .breadcrumb-vertical-menu::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

.breadcrumb-vertical-menu.active {
    left: 0;
}

/* Default transitions for smooth animations */
.body-sidebar, .sidebar, .main-content, .body-normal {
    transition: all 0.3s ease;
}

/* Resize body content when menu is open */
body.menu-open .body-sidebar {
    margin-left: 200px; /* Reduced from 240px */
    width: calc(100% - 200px); /* Reduced from 240px */
}

body.menu-open .sidebar {
    margin-left: 0; /* No extra margin - sits right next to menu */
    width: 240px; /* Keep sidebar width fixed */
    flex-shrink: 0; /* Prevent sidebar from shrinking */
}

body.menu-open .main-content {
    margin-left: 0; /* Don't add extra margin to main content */
    width: calc(100% - 240px); /* Full width minus sidebar only */
    flex: 1; /* Take remaining space */
}

/* Resize body-normal content when menu is open */
body.menu-open .body-normal {
    margin-left: 200px; /* Reduced from 240px */
    width: calc(100% - 200px); /* Reduced from 240px */
}

.vertical-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem; /* Increased padding like AWS */
    border-bottom: 1px solid #d1d5db; /* Darker border like AWS */
    background: #ffffff; /* White header background like AWS */
    /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);  */
}

.vertical-menu-header h3 {
    color: #16191f; /* Dark gray text like AWS */
    margin: 0;
    font-size: 0.875rem; /* Smaller font size like AWS */
    font-weight: 600; /* Medium font weight like AWS */
    letter-spacing: -0.025em; /* Tighter letter spacing like AWS */
}

.menu-hide-btn {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #374151; /* Dark gray text like AWS */
    cursor: pointer;
    padding: 0.25rem 0.375rem;
    border-radius: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    font-weight: 500;
}

.menu-hide-btn:hover {
    background: #f3f4f6; /* Light gray hover like AWS */
    color: #1f2937; /* Darker text on hover like AWS */
    transform: translateY(-1px); /* Subtle lift effect like AWS */
}

.menu-hide-btn i {
    font-size: 0.7rem;
}

.menu-close-btn {
    background: transparent;
    border: none;
    color: #000000; /* Black text for light mode */
    cursor: pointer;
    padding: 0.25rem 0.5rem; /* Reduced padding */
    border-radius: 4px;
    transition: background 0.2s ease;
    font-size: 0.875rem; /* Smaller font size */
}

.menu-close-btn:hover {
    background: rgba(0, 0, 0, 0.1); /* Dark hover for light mode */
}

.menu-close-btn i {
    font-size: 0.875rem; /* Smaller icon size */
}

.vertical-menu-content {
    padding: 0.75rem 0;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 200px); /* Ensure footer stays at bottom */
    position: relative; /* Container for absolutely positioned footer */
    padding-bottom: 80px; /* Space for the footer */
}

/* Primary Dashboard Item */
.menu-item-primary {
    margin-bottom: 1rem;
}

.menu-link-primary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #006ce0;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.menu-link-primary:hover {
    background: rgba(0, 108, 224, 0.1);
    color: #006ce0;
}

.menu-link-primary i {
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

/* Menu Sections */
.menu-section {
    margin-bottom: 0.25rem; /* Reduced margin like AWS */
    border-bottom: 1px solid transparent; /* Transparent border for spacing */
}

.menu-section:last-child {
    border-bottom: none; /* Remove border from last section */
}

.menu-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    color: #16191f; /* Dark gray text like AWS */
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    border-radius: 0; /* No border radius like AWS */
    min-height: 40px; /* Reduced height like AWS */
}

.menu-section-header:hover {
    background: #e3f2fd; /* Light blue hover like AWS */
    color: #1976d2; /* Blue text on hover like AWS */
}

/* Menu Section Text */
.menu-section-text {
    flex: 1;
    font-weight: 600;
    transition: color 0.2s ease;
}

/* Section text color changes on hover */
.menu-section-header:hover .menu-section-text {
    color: #1976d2; /* Blue text on hover like AWS */
}

.section-caret {
    font-size: 0.7rem;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 10px;
    text-align: center;
    color: #6b7280; /* Gray caret color like AWS */
    flex-shrink: 0; /* Prevent caret from shrinking */
}

/* Caret color changes on hover */
.menu-section-header:hover .section-caret {
    color: #4b5563; /* Darker caret color on hover like AWS */
}

.menu-section.collapsed .section-caret {
    transform: rotate(-90deg);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-section.collapsed .menu-items {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-section:not(.collapsed) .menu-items {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-items {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #ffffff; /* White background for sub-items like AWS */
}

.menu-items li {
    margin: 0;
}

.menu-items a {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.25rem; /* Reduced padding since no icons */
    color: #374151; /* Darker text color like AWS */
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent; /* Left border for active state */
    position: relative; /* For hover effects */
    line-height: 1.4; /* Better line height for readability */
    word-wrap: break-word; /* Handle long text gracefully */
    min-height: 36px; /* Reduced height like AWS */
    white-space: nowrap; /* Prevent text wrapping like AWS */
    overflow: hidden; /* Hide overflow text */
    text-overflow: ellipsis; /* Show ellipsis for long text */
}

.menu-items a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: background-color 0.2s ease;
}

.menu-items a:hover {
    background: #f3f4f6; /* Light gray hover like AWS */
    color: #1f2937; /* Darker text on hover like AWS */
}

.menu-items a:hover::before {
    background: #3b82f6; /* Blue left border on hover like AWS */
}

.menu-items a.active {
    background: #eff6ff; /* Light blue background for active state like AWS */
    color: #374151; /* Keep original text color, don't change to blue */
    font-weight: 600; /* Bold text for active state like AWS */
}

.menu-items a.active::before {
    background: #3b82f6; /* Blue left border for active state like AWS */
}

/* Menu item focus states for accessibility */
.menu-items a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
    background: #f3f4f6;
}

/* Menu item text styling */
.menu-items a span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: inherit; /* Inherit color from parent */
    transition: color 0.2s ease;
    display: block; /* Ensure proper block display */
    line-height: 1.3; /* Reduced line height for smaller text */
    padding: 0; /* Remove any default padding */
    margin: 0; /* Remove any default margin */
    text-decoration: none; /* Remove any text decoration */
    cursor: pointer; /* Show pointer cursor */
    font-size: 0.8rem; /* Smaller font size for menu items */
}

/* Smooth transitions for all interactive elements */
.menu-section-header,
.menu-items a,
.menu-hide-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Menu item icons removed - icons no longer used */

/* Menu section icon styling removed - icons no longer used */

.menu-badge {
    font-size: 0.65rem;
    background: #007bff;
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    margin-left: 0.5rem;
    font-weight: 500;
}

/* Menu Footer */
.menu-footer {
    margin-top: auto; /* Push to bottom like AWS */
    padding: 1.25rem 1.25rem;
    border-top: 1px solid #d1d5db; /* Darker border like AWS */
    background: #f1f5f9; /* Slightly different background like AWS */
    flex-shrink: 0; /* Prevent footer from shrinking */
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999; /* Much higher than the main footer */
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1); /* Subtle shadow above footer */
}

/* Menu footer content styling */
.menu-footer-content {
    text-align: center;
}

.menu-version {
    font-size: 0.7rem;
    color: #6b7280; /* Gray text like AWS */
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.menu-copyright {
    font-size: 0.65rem;
    color: #9ca3af; /* Lighter gray text like AWS */
    font-weight: 400;
}



/* Dark theme adjustments */
body.dark .breadcrumb-vertical-menu {
    background: #1a1a1a; /* Darker background like AWS dark mode */
    border-right-color: #374151; /* Darker border like AWS dark mode */
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3); /* Stronger shadow for dark mode */
}

body.dark .vertical-menu-header {
    background: #151d26; /* Darker header background like AWS dark mode */
    border-bottom-color: #374151; /* Darker border like AWS dark mode */
}

body.dark .vertical-menu-header h3 {
    color: #f9fafb; /* Light text for dark mode like AWS */
}

body.dark .menu-section-header {
    color: #f9fafb; /* Light text for dark mode like AWS */
}

body.dark .menu-section-header:hover {
    background: #1e3a8a; /* Darker blue hover for dark mode like AWS */
    color: #93c5fd; /* Lighter blue text on hover for dark mode like AWS */
}

/* Menu section icon dark mode styling removed */

body.dark .section-caret {
    color: #9ca3af; /* Lighter gray caret color for dark mode like AWS */
}

body.dark .menu-items {
    background: #1a1a1a; /* Darker background for sub-items like AWS */
}

body.dark .menu-items a {
    color: #d1d5db; /* Lighter text color for dark mode like AWS */
}

body.dark .menu-items a:hover {
    background: #374151; /* Darker gray hover for dark mode like AWS */
    color: #f9fafb; /* Light text on hover for dark mode like AWS */
}

body.dark .menu-items a.active {
    background: #1e3a8a; /* Darker blue background for active state like AWS */
    color: #d1d5db; /* Keep original text color for dark mode, don't change to blue */
}

/* Menu item icon dark mode styling removed */

body.dark .menu-footer {
    background: #111827; /* Darker footer background like AWS */
    border-top-color: #374151; /* Darker border like AWS */
}

body.dark .menu-hide-btn {
    color: #ffffff;
}

body.dark .menu-hide-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #60a5fa;
}

body.dark .menu-close-btn {
    color: #ffffff;
}

body.dark .menu-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.dark .menu-link-primary {
    color: #60a5fa;
}

body.dark .menu-link-primary:hover {
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
}

body.dark .menu-section-header {
    color: #60a5fa; /* Blue color for section titles in dark mode */
}

body.dark .menu-section-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

body.dark .menu-items a {
    color: #b0b0b0;
}

body.dark .menu-items a:hover {
    background: rgba(96, 165, 250, 0.1);
    color: #ffffff;
}

body.dark .menu-footer {
    border-top-color: rgba(96, 165, 250, 0.1);
    background: #151d26;
}

body.dark .menu-version {
    color: #9ca3af;
}

body.dark .menu-copyright {
    color: #6c757d;
}

/* Dark theme breadcrumb */
body.dark .global-breadcrumb {
    background: var(--header-bg, #151d26);
    border-bottom: var(--header-border, 1px solid rgba(96, 165, 250, 0.1));
    box-shadow: var(--header-shadow, 0 1px 4px rgba(0, 0, 0, 0.2));
}

body.dark .breadcrumb-link {
    color: #ffffff;
}

body.dark .breadcrumb-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

body.dark .breadcrumb-separator {
    color: #ffffff;
}

body.dark .breadcrumb-current {
    color: #60a5fa;
}

/* =====================================================
   🧱 PROFESSIONAL HEADER
===================================================== */
.header {
    background: #151d26;
    color: #fff;
    border-bottom: var(--header-border, 1px solid #e1e5e9);
    box-shadow: var(--header-shadow, 0 2px 8px rgba(0, 0, 0, 0.08));
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 44px !important;
    min-height: 44px !important;
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.25rem;
    height: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Header Left Section */
.header-left {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex: 1;
}

/* Brand/Logo */
.brand {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo-link:hover {
    transform: translateY(-1px);
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.05rem !important;
    color: var(--logo-color, #2c3e50);
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo-text {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: -0.5px;
}

.logo-accent {
    background: linear-gradient(135deg, #0972d3, #ff9900) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-weight: 800 !important;
}

.logo-icon {
    font-size: 1.25rem !important;
}

/* Header Search Container */
.header-search-container {
    flex: 1;
    max-width: 450px;
    margin: 0 2rem;
    position: relative;
    z-index: 1002;
}

.search-bar-wrapper {
    position: relative;
    width: 100%;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    height: 28px;
    transition: all 0.2s ease;
    overflow: visible;
}

.search-input-container:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.search-icon {
    position: absolute;
    left: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    z-index: 2;
}

/* Header Search Input - More specific to override filter.css */
.header-search-container .search-input,
.search-input-container .search-input {
    width: 100%;
    height: 100%;
    padding: 0 36px 0 32px;
    background: transparent !important;
    background-image: none !important;
    background-repeat: no-repeat !important;
    background-position: initial !important;
    background-size: initial !important;
    border: none;
    outline: none;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.header-search-container .search-input::placeholder,
.search-input-container .search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* Remove default search input styling */
.header-search-container .search-input::-webkit-search-decoration,
.header-search-container .search-input::-webkit-search-cancel-button,
.header-search-container .search-input::-webkit-search-results-button,
.header-search-container .search-input::-webkit-search-results-decoration,
.search-input-container .search-input::-webkit-search-decoration,
.search-input-container .search-input::-webkit-search-cancel-button,
.search-input-container .search-input::-webkit-search-results-button,
.search-input-container .search-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
}

/* Additional search input overrides */
.header-search-container input[type="search"].search-input,
.search-input-container input[type="search"].search-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent !important;
    background-image: none !important;
    border: none;
    outline: none;
    box-shadow: none;
}



/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    display: none;
    overflow: hidden;
    min-width: 900px;
    width: 900px;
    max-width: none !important;
    box-sizing: border-box;
    /* Ensure immediate display without transitions */
    transition: none !important;
    animation: none !important;
}

.search-results-dropdown.visible {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    /* Ensure immediate visibility */
    transition: none !important;
    animation: none !important;
}

/* Ensure search results are properly contained */
.search-bar-wrapper .search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    width: 900px !important;
    min-width: 900px !important;
    max-width: none !important;
    right: auto;
}

/* Override container width constraints for search results */
.header-search-container .search-results-dropdown {
    width: 900px !important;
    min-width: 900px !important;
    max-width: none !important;
    left: 0;
    right: auto;
}

/* Override the search-bar-wrapper rule */
.search-bar-wrapper .search-results-dropdown {
    width: 900px !important;
    min-width: 900px !important;
    max-width: none !important;
    left: 0;
    right: auto;
}

/* Final override to ensure dropdown width */
#search-results-dropdown {
    width: 900px !important;
    min-width: 900px !important;
    max-width: none !important;
    left: 0;
    right: auto;
}

/* Comprehensive override for all search result dropdowns */
.search-results-dropdown,
.header-search-container .search-results-dropdown,
.search-bar-wrapper .search-results-dropdown,
#search-results-dropdown {
    width: 900px !important;
    min-width: 900px !important;
    max-width: none !important;
    left: 0;
    right: auto;
}

/* Most specific override to ensure width is respected */
.header-search-container .search-bar-wrapper .search-results-dropdown,
.header-search-container .search-results-dropdown,
.header-search-container #search-results-dropdown {
    width: 900px !important;
    min-width: 900px !important;
    max-width: none !important;
    left: 0;
    right: auto;
}

/* Ensure dropdown doesn't inherit parent width constraints */
.search-results-dropdown {
    width: 900px !important;
    min-width: 900px !important;
    max-width: none !important;
    left: 0;
    right: auto;
    position: absolute !important;
}

/* Ensure dropdown is visible when loading */
.search-results-dropdown:has(#search-deep-loading),
.search-results-dropdown .search-deep-loading {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Fallback for browsers without :has() support */
.search-results-dropdown.loading {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Force dropdown to break out of parent width constraints */
.header-search-container {
    overflow: visible !important;
}

.search-bar-wrapper {
    overflow: visible !important;
}

.search-input-container {
    overflow: visible !important;
}

/* Force proper positioning context */
.search-bar-wrapper {
    position: relative !important;
}

.header-search-container {
    position: relative !important;
}

/* Hide any remaining search clear buttons - AGGRESSIVE */
.search-clear-btn,
#search-clear-btn,
button[class*="search-clear"],
button[id*="search-clear"],
[class*="search-clear"],
[id*="search-clear"],
button:has(i.fa-times),
button:has(.fa-times),
/* Allow our search button but hide other buttons */
.search-input-container button:not(.search-button),
.search-input-container button:not(.search-button):after,
.search-input-container button:not(.search-button):before {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

/* Search Button Styles */
.search-input-container .search-button {
    position: absolute !important;
    right: 6px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 22px !important;
    height: 22px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 4px !important;
    color: white !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    font-size: 10px !important;
    z-index: 10 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure button visibility with multiple selectors */
#header-search-button,
.header-search-container .search-button,
.search-input-container .search-button {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.search-input-container .search-button:hover {
    background: transparent !important;
    transform: translateY(-50%);
    box-shadow: none;
}

.search-input-container .search-button:active {
    transform: translateY(-50%);
}

.search-input-container .search-button:focus {
    outline: none;
}

/* Additional rule to hide any button inside search container except our search button */
.header-search-container button:not(.search-button) {
    display: none !important;
}

/* Responsive design for table layout */
@media (max-width: 1200px) {
    .search-results-dropdown {
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: calc(100vw - 2rem) !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-left: 0 !important;
    }
    
    .search-results-table-header-cell,
    .search-results-table-cell {
        min-width: 100px;
        max-width: 120px;
        font-size: 10px;
    }
    
    .search-results-table-item {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .search-table-item-title {
        font-size: 10px;
    }
    
    .search-table-item-subtitle {
        font-size: 9px;
    }
    
    .search-table-item-description {
        font-size: 8px;
    }
}

/* Mobile layout - switch back to vertical list */
@media (max-width: 768px) {
    .search-results-dropdown {
        left: 0;
        right: 0;
        width: 100vw;
        max-width: calc(100vw - 2rem);
        margin-left: -1rem;
        min-width: calc(100vw - 2rem);
    }
    
    /* Hide table layout on mobile */
    .search-results-table {
        display: none !important;
    }
    
    /* Ensure vertical layout is visible */
    .search-category-header,
    .search-result-item {
        display: block !important;
    }
}

/* Debug: Add border to see search container boundaries */
.header-search-container {
    border: 1px solid transparent;
}

.header-search-container:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.search-bar-wrapper {
    border: 1px solid transparent;
}

.search-bar-wrapper:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.search-results-header {
    padding: 10px 16px 6px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-results-title {
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-results-count {
    font-size: 11px;
    color: #6c757d;
}

.search-results-list {
    max-height: 500px;
    overflow-y: auto;
}

/* Table Layout for Search Results */
.search-results-table {
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.search-results-table-header {
    display: table-header-group;
    background: #f8f9fa;
    border-bottom: 2px solid #e1e5e9;
    position: sticky;
    top: 0;
    z-index: 20;
}

.search-results-table-header-row {
    display: table-row;
}

.search-results-table-header-cell {
    display: table-cell;
    padding: 12px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid #e1e5e9;
    vertical-align: middle;
    text-align: center;
    min-width: 120px;
}

.search-results-table-header-cell:last-child {
    border-right: none;
}

.search-results-table-header-cell i {
    margin-right: 6px;
    color: #6c757d;
}

.search-results-table-body {
    display: table-row-group;
}

.search-results-table-row {
    display: table-row;
    transition: background-color 0.15s ease;
}

.search-results-table-row:hover {
    background-color: #f8f9fa;
}

.search-results-table-cell {
    display: table-cell;
    padding: 8px;
    border-right: 1px solid #f1f3f4;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: top;
    min-width: 120px;
    max-width: 150px;
}

.search-results-table-cell:last-child {
    border-right: none;
}

.search-results-table-item {
    display: block;
    text-decoration: none;
    color: #495057;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
    transition: all 0.15s ease;
    font-size: 11px;
    line-height: 1.3;
}

.search-results-table-item:last-child {
    margin-bottom: 0;
}

.search-results-table-item:hover {
    background: #e3f2fd;
    color: #0972d3;
    text-decoration: none;
}

.search-results-table-item[data-source="database"] {
    border-left: 2px solid #28a745;
    padding-left: 6px;
}

.search-results-table-item[data-source="database"]:hover {
    border-left-color: #20c997;
}

.search-table-item-title {
    font-weight: 500;
    margin-bottom: 2px;
    display: block;
}

.search-table-item-subtitle {
    font-size: 10px;
    color: #6c757d;
    display: block;
    margin-bottom: 1px;
}

.search-table-item-description {
    font-size: 9px;
    color: #6c757d;
    line-height: 1.2;
    display: block;
}

.search-table-item-relationship {
    font-size: 8px;
    color: #007bff;
    font-weight: 500;
    font-style: italic;
    display: block;
    margin-top: 2px;
    padding: 1px 4px;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 3px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    color: #495057;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.15s ease;
    cursor: pointer;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.highlighted {
    background: #f8f9fa;
    color: #0972d3;
}

.search-result-item[data-source="database"] {
    border-left: 3px solid #28a745;
}

.search-result-item[data-source="database"]:hover {
    border-left-color: #20c997;
}

.search-result-item:hover .search-result-icon,
.search-result-item.highlighted .search-result-icon {
    color: #0972d3;
}

.search-result-icon {
    width: 14px;
    height: 14px;
    margin-right: 10px;
    color: #6c757d;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.search-result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.search-result-title {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 2px;
}

.search-result-category {
    font-size: 10px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.search-result-subtitle {
    font-size: 11px;
    color: #495057;
    margin-bottom: 2px;
    font-weight: 500;
}

.search-result-description {
    font-size: 9px;
    color: #6c757d;
    margin-top: 2px;
    line-height: 1.3;
}

/* Colored status indicators */
.search-result-description .status-pickup {
    color: #ffc107;
    font-weight: 600;
    background: rgba(255, 193, 7, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.search-result-description .status-in-transit {
    color: #17a2b8;
    font-weight: 600;
    background: rgba(23, 162, 184, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.search-result-description .status-delivered {
    color: #28a745;
    font-weight: 600;
    background: rgba(40, 167, 69, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

/* Relationship indicators */
.search-result-route-related,
.search-result-relationship {
    font-size: 9px;
    color: #007bff;
    margin-top: 2px;
    font-weight: 500;
    font-style: italic;
}

/* Category Headers */
.search-category-header {
    padding: 8px 16px 6px;
    background: #f1f3f4;
    border-bottom: 1px solid #e1e5e9;
    border-top: 1px solid #e1e5e9;
    margin: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-category-header:first-child {
    border-top: none;
}

.search-category-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-category-info i {
    width: 12px;
    height: 12px;
    font-size: 10px;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-category-name {
    flex: 1;
}

.search-category-count {
    font-size: 10px;
    color: #6c757d;
    font-weight: 400;
    font-style: normal;
    text-transform: none;
}

.search-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    text-align: center;
    color: #6c757d;
}

.search-no-results i {
    font-size: 24px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.search-no-results span {
    font-size: 12px;
}

.search-loading {
    padding: 16px;
    text-align: center;
    color: #6c757d;
}

.search-loading-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.search-loading i {
    font-size: 14px;
    color: #006ce0;
}

.search-loading span {
    font-size: 12px;
}

/* Deep Search Loading Styles */
.search-deep-loading {
    padding: 16px;
    text-align: center;
    color: #006ce0;
    background: linear-gradient(45deg, #f8f9fa, #ffffff);
    border-radius: 8px;
    margin: 8px;
    border: 1px solid rgba(0, 108, 224, 0.1);
    /* Ensure immediate display */
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.search-deep-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.search-deep-loading i {
    font-size: 18px;
    color: #006ce0;
    animation: searchPulse 2s ease-in-out infinite;
}

.search-deep-loading-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.search-deep-loading-title {
    font-size: 12px;
    font-weight: 600;
    color: #006ce0;
}

.search-deep-loading-subtitle {
    font-size: 10px;
    color: #6c757d;
    font-style: italic;
}

/* No Results Message Styles */
.search-no-results {
    padding: 16px;
    text-align: center;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 8px;
    border: 1px solid #e9ecef;
}

/* No Results in Results List Area */
.search-results-list .search-deep-loading.no-results {
    background: #f8f9fa;
    border-color: #e9ecef;
}

.search-results-list .search-deep-loading.no-results .search-deep-loading-title {
    color: #6c757d;
}

.search-results-list .search-deep-loading.no-results .search-deep-loading-subtitle {
    color: #adb5bd;
}

.search-results-list .search-deep-loading.no-results i {
    color: #6c757d;
}

.search-no-results-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.search-no-results i {
    font-size: 18px;
    color: #6c757d;
}

.search-no-results-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.search-no-results-title {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
}

.search-no-results-subtitle {
    font-size: 10px;
    color: #adb5bd;
    font-style: italic;
}

@keyframes searchPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

/* Dark Theme Styles */
body.dark .search-input-container {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark .search-input-container:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

body.dark .search-results-dropdown {
    background: #1a1a1a;
    border-color: #404040;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

body.dark .search-results-header {
    background: #252525;
    border-bottom-color: #404040;
}

body.dark .search-results-title {
    color: #e0e0e0;
}

body.dark .search-results-count {
    color: #a0a0a0;
}

body.dark .search-result-item {
    color: #e0e0e0;
    border-bottom-color: #333;
}

body.dark .search-result-item:hover,
body.dark .search-result-item.highlighted {
    background: #2a2a2a;
    color: #60a5fa;
}

body.dark .search-result-item[data-source="database"] {
    border-left-color: #20c997;
}

body.dark .search-result-item[data-source="database"]:hover {
    border-left-color: #38d9a9;
}

body.dark .search-result-item:hover .search-result-icon,
body.dark .search-result-item.highlighted .search-result-icon {
    color: #60a5fa;
}

body.dark .search-result-icon {
    color: #a0a0a0;
}

body.dark .search-result-category {
    color: #a0a0a0;
}

body.dark .search-result-subtitle {
    color: #e0e0e0;
}

body.dark .search-result-description {
    color: #a0a0a0;
}

/* Dark theme colored status indicators */
body.dark .search-result-description .status-pickup {
    color: #ffd54f;
    background: rgba(255, 213, 79, 0.15);
}

body.dark .search-result-description .status-in-transit {
    color: #4dd0e1;
    background: rgba(77, 208, 225, 0.15);
}

body.dark .search-result-description .status-delivered {
    color: #66bb6a;
    background: rgba(102, 187, 106, 0.15);
}

body.dark .search-result-route-related,
body.dark .search-result-relationship {
    color: #4dabf7;
}

/* Dark theme category headers */
body.dark .search-category-header {
    background: #2a2a2a;
    border-bottom-color: #404040;
    border-top-color: #404040;
}

body.dark .search-category-info {
    color: #e0e0e0;
}

body.dark .search-category-info i {
    color: #a0a0a0;
}

body.dark .search-category-count {
    color: #a0a0a0;
}

/* Dark theme table layout */
body.dark .search-results-table-header {
    background: #2a2a2a;
    border-bottom-color: #404040;
}

body.dark .search-results-table-header-cell {
    color: #e0e0e0;
    border-right-color: #404040;
}

body.dark .search-results-table-header-cell i {
    color: #a0a0a0;
}

body.dark .search-results-table-row:hover {
    background-color: #2a2a2a;
}

body.dark .search-results-table-cell {
    border-right-color: #333;
    border-bottom-color: #333;
}

body.dark .search-results-table-item {
    color: #e0e0e0;
}

body.dark .search-results-table-item:hover {
    background: #1a3a5c;
    color: #60a5fa;
}

body.dark .search-results-table-item[data-source="database"] {
    border-left-color: #20c997;
}

body.dark .search-results-table-item[data-source="database"]:hover {
    border-left-color: #38d9a9;
}

body.dark .search-table-item-subtitle,
body.dark .search-table-item-description {
    color: #a0a0a0;
}

body.dark .search-table-item-relationship {
    color: #4dabf7;
    background: rgba(77, 171, 247, 0.1);
}

body.dark .search-no-results {
    background: #2a2a2a;
    border-color: #404040;
    color: #a0a0a0;
}

body.dark .search-no-results i {
    color: #a0a0a0;
}

body.dark .search-no-results-title {
    color: #a0a0a0;
}

body.dark .search-no-results-subtitle {
    color: #6c757d;
}

/* Dark theme no results in results list */
body.dark .search-results-list .search-deep-loading.no-results {
    background: #2a2a2a;
    border-color: #404040;
}

body.dark .search-results-list .search-deep-loading.no-results .search-deep-loading-title {
    color: #a0a0a0;
}

body.dark .search-results-list .search-deep-loading.no-results .search-deep-loading-subtitle {
    color: #6c757d;
}

body.dark .search-results-list .search-deep-loading.no-results i {
    color: #a0a0a0;
}

body.dark .search-loading {
    color: #a0a0a0;
}

body.dark .search-loading i {
    color: #60a5fa;
}

/* Dark theme deep search loading */
body.dark .search-deep-loading {
    background: linear-gradient(45deg, #2a2a2a, #1a1a1a);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

body.dark .search-deep-loading-title {
    color: #ffffff;
}

body.dark .search-deep-loading i {
    color: #ffffff;
}

/* Ensure consistent sizing in dark theme */
body.dark .search-deep-loading {
    padding: 16px;
}

body.dark .search-deep-loading-content {
    gap: 8px;
}

body.dark .search-deep-loading i {
    font-size: 18px;
}

body.dark .search-deep-loading-title {
    font-size: 12px;
}

body.dark .search-deep-loading-subtitle {
    font-size: 10px;
}

/* Dark theme search button */
body.dark .search-input-container .search-button {
    background: transparent !important;
}

body.dark .search-input-container .search-button:hover {
    background: transparent !important;
    box-shadow: none;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem !important;
    /* color: var(--nav-link-color, #6c757d); */
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary-gradient-text);
    background: var(--primary-gradient-bg);
    border: 1px solid var(--primary-gradient-border);
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--primary-gradient-text);
    background: var(--primary-gradient-bg);
    border: 1px solid var(--primary-gradient-border);
}

.nav-link i {
    font-size: 1rem !important;
    width: 16px;
    text-align: center;
}
body.dark .nav-link i {
    color: #fff !important;
}
body.light .nav-link i {
    color: inherit !important;
}

/* Setup Dropdown Navigation */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem !important;
    /* color: var(--nav-link-color, #6c757d); */
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    height: 32px !important;
}

.nav-dropdown-toggle:hover {
    color: var(--primary-gradient-text);
    background: var(--primary-gradient-bg);
    border: 1px solid var(--primary-gradient-border);
    transform: translateY(-1px);
}

.nav-dropdown-toggle.active {
    color: var(--primary-gradient-text);
    background: var(--primary-gradient-bg);
    border: 1px solid var(--primary-gradient-border);
}

.nav-dropdown-toggle i {
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.nav-dropdown-toggle .dropdown-arrow {
    font-size: 0.8rem !important;
    transition: transform 0.3s ease;
}

.nav-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: var(--dropdown-bg, #ffffff);
    border: var(--dropdown-border, 1px solid #e1e5e9);
    border-radius: 12px;
    box-shadow: var(--dropdown-shadow, 0 10px 25px rgba(0, 0, 0, 0.15));
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.nav-dropdown.active .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--dropdown-item-color, #6c757d);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--dropdown-item-border, rgba(225, 229, 233, 0.5));
}

.nav-dropdown-menu .dropdown-item:last-child {
    border-bottom: none;
}

.nav-dropdown-menu .dropdown-item:hover {
    background: var(--primary-gradient-bg);
    color: var(--primary-gradient-text);
    border-left: 3px solid var(--primary-gradient-border);
}

.nav-dropdown-menu .dropdown-item i {
    width: 16px;
    text-align: center;
    font-size: 0.9rem;
    color: #60a5fa !important;
}

body.light .nav-dropdown-menu .dropdown-item i {
    color: var(--primary-gradient-text, #0972d3) !important;
}

/* Header Right Section */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.1rem;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--theme-toggle-bg, transparent);
    border: var(--theme-toggle-border, 1px solid #e1e5e9);
    color: var(--theme-toggle-color, #0972d3);
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    border-radius: 8px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: var(--primary-gradient-bg);
    border-color: var(--primary-gradient-border);
    color: var(--primary-gradient-text);
    transform: translateY(-1px);
}

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

.theme-toggle i {
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #0972d3;
}

/* New Language Selector */
.language-selector-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--theme-toggle-bg, transparent);
    border: var(--theme-toggle-border, 1px solid #e1e5e9);
    border-radius: 8px !important;
    transition: all 0.3s ease;
    height: 32px !important;
    min-height: 32px !important;
}

.language-selector-wrapper:hover {
    border-color: var(--primary-gradient-border);
    background: var(--primary-gradient-bg);
}

.language-icon {
    position: absolute;
    left: 12px;
    color: var(--theme-toggle-color, #6c757d);
    font-size: 1rem !important;
    pointer-events: none; /* Allows clicks to pass through to the select */
}

.language-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
    border: none;
    color: var(--theme-toggle-color, #6c757d);
    padding: 0.5rem 0.75rem 0.5rem 2rem !important;
    font-size: 0.85rem !important;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px !important;
    width: 100%;
    height: 32px !important;
}

.language-select:focus {
    outline: none;
    border-color: var(--primary-gradient-border);
    box-shadow: 0 0 0 2px rgba(9, 114, 211, 0.2);
}

/* Light theme - show moon icon */
body.light .theme-toggle .theme-icon-dark {
    opacity: 1;
    color: #0972d3;
}

/* Dark theme - show sun icon */
body.dark .theme-toggle .theme-icon-dark {
    opacity: 0;
    color: #0972d3;
}

body.dark .theme-toggle .theme-icon-light {
    opacity: 1;
    color: #0972d3;
}

/* Dark Mode Language Selector */
body.dark .language-selector-wrapper {
    background: var(--dark-theme-toggle-bg, transparent);
    border-color: var(--dark-theme-toggle-border, #444);
}

body.dark .language-selector-wrapper:hover {
    border-color: var(--primary-gradient-border);
    background: var(--primary-gradient-bg);
}

body.dark .language-icon {
    color: #0972d3;
}

body.dark .language-select {
    color: #0972d3;
}

body.dark .language-select option {
    background: #333;
    color: #fff;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none !important; /* Completely hide mobile menu toggle */
}

/* Remove mobile menu toggle from button exclusions */
button:not(.aws-btn):not(.close):not(.modal-close):not(.theme-toggle):not(.user-dropdown-toggle):not(.nav-dropdown-toggle):not(.aws-action-btn-compact) {
    /* Basic button styles will be handled by aws-buttons.css */
    margin-right: 10px;
}

/* Hide all mobile navigation elements */
.mobile-nav-overlay {
    display: none !important;
}

.mobile-nav {
    display: none !important;
}

.mobile-nav-header {
    display: none !important;
}

.mobile-nav-links {
    display: none !important;
}

.mobile-nav-section {
    display: none !important;
}

.mobile-user-section {
    display: none !important;
}

/* =====================================================
   📄 BODY TYPES
===================================================== */
.body-normal {
    width: calc(100% - 4rem); /* ✅ left & right padding: 2rem each */
    /* max-width: 1200px; */
    margin: 0 auto;
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}


.body-sidebar {
    display: flex;
    height: calc(100vh - 70px);
    padding: 0;  /* no padding to remove space */
    gap: 0;  /* no gap between sidebar and main content */
}

/* =====================================================
   📂 SIDEBAR
===================================================== */
.sidebar {
    width: 240px;  /* reduced from 280px */
    background-color: white;
    border-right: 1px solid #ddd;
    padding: 1.5rem;
    border-radius: 0;  /* no rounded corner on left side */
    flex-shrink: 0;  /* prevent sidebar from shrinking */
}

.sidebar h3 {
    margin-top: 0;
    font-size: 0.875rem; /* Match menu section headers */
    font-weight: 600; /* Match menu section headers */
    color: #006ce0; /* Match menu blue color */
}

.sidebar a {
    display: block;
    margin-bottom: 10px;
    color: #fff; /* Match menu item color */
    text-decoration: none;
    font-size: 0.8rem; /* Match menu item font size */
}

.sidebar select,
.sidebar input {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
    font-size: 0.75rem; /* Match menu item font size */
    color: #6c757d; /* Match menu item color */
}

.main-content {
    flex: 1;  /* take remaining space */
    padding: 2rem;
    background-color: white;
    border-radius: 0;  /* no rounded corner on right side */
    margin-left: 0;  /* no left margin */
}

/* =====================================================
   📦 CARD / FORM ELEMENTS
===================================================== */
.card {
    background-color: #ffffff;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.card h3 {
    margin-top: 0;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

input[type="text"],
select {
    padding: 10px;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    width: 100%;
    max-width: 300px;
}

label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.note {
    color: #777;
    font-size: 14px;
    margin-bottom: 1rem;
}

/* =====================================================
   🧩 BUTTONS - AWS COMPATIBLE
===================================================== */

/* Legacy button styles - now AWS compatible */
button:not(.aws-btn):not(.close):not(.modal-close):not(.theme-toggle):not(.user-dropdown-toggle):not(.nav-dropdown-toggle):not(.aws-action-btn-compact) {
    /* Basic button styles will be handled by aws-buttons.css */
    margin-right: 10px;
}

/* Specific overrides for existing buttons */
button.primary:not(.aws-btn) {
    /* Will be handled by aws-buttons.css */
}

/* =====================================================
   📥 FOOTER
===================================================== */
.footer {
    text-align: center;
    padding: 4px 0;        /* ✅ further reduced height */
    font-size: 10px;       /* ✅ even smaller font size */
    background-color: #151d26;  /* ✅ dark background for light mode */
    border-top: 1px solid #2a3441;
    margin-top: auto;
    color: #ffffff;        /* ✅ white text */
    position: fixed;       /* ✅ always visible */
    bottom: 0;             /* ✅ stick to bottom */
    left: 0;               /* ✅ full width */
    right: 0;              /* ✅ full width */
    z-index: 999;          /* ✅ below menu footer */
}

/* =====================================================
   📱 RESPONSIVE STYLES
===================================================== */
@media (max-width: 1024px) {
    .header {
        height: 44px !important;
    }
    .header-container {
        padding: 0 0.75rem;
    }
    
    .header-left {
        gap: 1rem;
    }
    
    .header-search-container {
        margin: 0 1rem;
        max-width: 350px;
    }
    
    .search-input-container {
        height: 28px;
    }
    
    .header-search-container .search-input,
    .search-input-container .search-input {
        font-size: 13px;
        padding: 0 32px 0 32px;
    }
    
    .search-input-container .search-button {
        width: 20px;
        height: 20px;
        right: 5px;
        font-size: 10px;
    }
    
    .search-icon {
        left: 10px;
        font-size: 13px;
    }
    
    .nav-menu {
        gap: 0.25rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .user-name {
        max-width: 100px;
    }
    
    .user-dropdown-menu {
        width: 260px;
    }
}

@media (max-width: 768px) {
    .header {
        height: 44px !important;
    }
    
    .header-container {
        padding: 0 1rem;
    }
    
    .header-left {
        gap: 0.5rem;
    }
    
    .header-search-container {
        margin: 0 0.5rem;
        max-width: 200px;
    }
    
    .search-input-container {
        height: 26px;
    }
    
    .header-search-container .search-input,
    .search-input-container .search-input {
        font-size: 12px;
        padding: 0 30px 0 28px;
    }
    
    .search-input-container .search-button {
        width: 18px;
        height: 18px;
        right: 4px;
        font-size: 9px;
    }
    
    .search-icon {
        left: 8px;
        font-size: 12px;
    }
    

    
    .nav-menu {
        display: none;
    }
    
    .logo {
        font-size: 0.9rem !important;
    }
    
    .logo-icon {
        font-size: 1.1rem !important;
    }
    
    .user-dropdown {
        margin-left: 0.5rem;
    }
    
    .user-dropdown-toggle {
        padding: 0.4rem 0.75rem;
        gap: 0.5rem;
    }
    
    .user-name {
        display: none;
    }
    
    .user-dropdown-menu {
        width: 240px;
        right: -0.5rem;
    }
    
    /* Breadcrumb mobile adjustments */
    .global-breadcrumb {
        height: 40px;
        min-height: 40px;
        top: 44px;
    }
    
    .breadcrumb-container {
        padding: 0 1rem;
    }
    
    .breadcrumb-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .breadcrumb-link span {
        display: inline;  /* Show text on mobile */
    }
    
    /* Mobile menu adjustments */
    .breadcrumb-vertical-menu {
        width: 100vw;
        left: -100vw;
        top: 114px; /* Below header + breadcrumb on mobile */
        height: calc(100vh - 114px);
    }
    
    .breadcrumb-vertical-menu.active {
        left: 0;
    }
    
    /* On mobile, don't resize or push content */
    body.menu-open .body-sidebar,
    body.menu-open .sidebar,
    body.menu-open .main-content,
    body.menu-open .body-normal {
        margin-left: 0;
        width: 100%; /* Reset width on mobile */
    }
    

    
    .body-normal {
        max-width: 95%;
        margin: 0 auto;
        padding: 1rem;
    }

    .body-sidebar {
        flex-direction: column;
        height: auto;
        padding: 0;
    }

    .sidebar, .main-content {
        width: 100%;
        padding: 1rem;
        border-radius: 10px;  /* restore rounded corners on mobile */
    }

    .responsive-table {
        overflow-x: auto;
    }
    
    .responsive-table table {
        min-width: 500px;
    }
    
    .responsive-table .actions-cell {
        min-width: 120px;
        gap: 0.25rem;
    }
    
    .responsive-table .actions-cell .btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .user-type-badge {
        margin: 0 0.01rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 0.5rem;
    }
    
    .header-search-container {
        margin: 0 0.25rem;
        max-width: 150px;
    }
    
    .header-search-container .search-input::placeholder,
    .search-input-container .search-input::placeholder {
        font-size: 11px;
    }
    
    .logo {
        font-size: 0.8rem !important;
    }
    
    .logo-icon {
        font-size: 1rem !important;
    }
    
    .user-dropdown-toggle {
        padding: 0.3rem 0.6rem;
    }
    
    .user-avatar {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.85rem !important;
    }
    
    .user-dropdown-menu {
        width: 220px;
        right: -0.75rem;
    }
    
    .user-dropdown-header {
        padding: 1rem;
    }
    
    .user-avatar-large {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .user-full-name {
        font-size: 0.9rem;
    }
    
    .user-email {
        font-size: 0.8rem;
    }
    
    .user-type {
        font-size: 0.75rem;
    }

    .responsive-table .actions-cell {
        min-width: 100px;
        gap: 0.2rem;
    }
    
    .responsive-table .actions-cell .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* =====================================================
    USER DROPDOWN MENU
===================================================== */

.user-dropdown {
    position: relative;
    margin-left: 1rem;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0 !important;
    padding-left: 0.7rem !important;
    padding-right: 0.7rem !important;
    background: var(--user-toggle-bg, transparent);
    border: var(--user-toggle-border, 1px solid #e1e5e9);
    color: var(--user-toggle-color, #6c757d);
    padding: 0.4rem 0.75rem !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem !important;
    font-weight: 500;
    height: 32px !important;
}

.user-dropdown-toggle:hover {
    background: var(--primary-gradient-bg);
    border-color: var(--primary-gradient-border);
    color: var(--primary-gradient-text);
    transform: translateY(-1px);
}

.user-avatar {
    width: 28px !important;
    height: 28px !important;
    background: var(--primary-gradient-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-gradient-text);
    font-size: 0.85rem !important;
}

.user-name {
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 0.8rem !important;
    transition: transform 0.3s ease;
}

.user-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 280px;
    background: #151d26;
    border: 1px solid #374151;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Header */
.user-dropdown-header {
    padding: 1.5rem;
    border-bottom: 1px solid #374151;
    background: #151d26;
}
body.dark .user-dropdown-header {
    background: #151d26;
    border-bottom: 1px solid #374151;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-gradient-text);
    font-size: 1.2rem;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-full-name {
    font-weight: 500;
    font-size: 0.8rem;
    color: #ffffff;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-email {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-type {
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dropdown Body */
.user-dropdown-body {
    padding: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #374151;
    color: #ffffff;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    font-size: 0.8rem;
    color: #9ca3af !important;
}

body.light .user-dropdown-menu .dropdown-item i {
    color: #9ca3af !important;
}

/* Dropdown Footer */
.user-dropdown-footer {
    padding: 0.5rem 0;
    border-top: 1px solid #374151;
    background: #151d26;
}

.dropdown-item-logout {
    color: #ef4444;
}

.dropdown-item-logout:hover {
    background: #374151;
    color: #ffffff;
}

/* Login Link */
.login-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--login-link-color, #6c757d);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-left: 1rem;
}

.login-link:hover {
    color: var(--primary-gradient-text);
    background: var(--primary-gradient-bg);
}

/* Mobile User Section */
.mobile-user-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--mobile-user-border, rgba(9, 114, 211, 0.1));
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
}

.mobile-user-avatar {
    width: 40px;
    height: 40px;
    background: var(--mobile-user-avatar-bg, rgba(9, 114, 211, 0.15));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mobile-user-avatar-color, #0972d3);
    font-size: 1rem;
}

.mobile-user-details {
    flex: 1;
}

.mobile-user-name {
    font-weight: 600;
    color: var(--mobile-user-name-color, #f0f0f0);
    margin-bottom: 0.25rem;
}

.mobile-user-type {
    font-size: 0.8rem;
    color: var(--mobile-user-type-color, #0972d3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-logout {
    color: var(--mobile-logout-color, #ff6b6b);
}

.mobile-logout:hover {
    background: var(--mobile-logout-hover-bg, rgba(255, 107, 107, 0.1));
    color: var(--mobile-logout-hover-color, #ff6b6b);
}

/* Shippers Section Header */
.shippers-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color, #e1e5e9);
}

.shippers-section-header h2 {
  margin: 0;
  color: var(--text-color, #2c3e50);
  font-size: 1.5rem;
  font-weight: 600;
}

.shippers-nav-dropdown select {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color, #e1e5e9);
  border-radius: 8px;
  /* background: var(--bg-color, #ffffff); */
  background: #151d26;
  color: var(--text-color, #2c3e50);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.shippers-nav-dropdown select:hover {
  border-image: linear-gradient(135deg, #283730, #547d63) 1;
}

.shippers-nav-dropdown select:focus {
  outline: none;
  border-image: linear-gradient(135deg, #283730, #547d63) 1;
  box-shadow: 0 0 0 2px rgba(40, 55, 48, 0.2);
}

/* Carriers Section Header */
.carriers-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color, #e1e5e9);
}

.carriers-section-header h2 {
  margin: 0;
  color: var(--text-color, #2c3e50);
  font-size: 1.5rem;
  font-weight: 600;
}

/* Routes Section Header */
.routes-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color, #e1e5e9);
}

.routes-section-header h2 {
  margin: 0;
  color: var(--text-color, #2c3e50);
  font-size: 1.5rem;
  font-weight: 600;
}

.carriers-nav-dropdown select {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color, #e1e5e9);
  border-radius: 8px;
  background: var(--bg-color, #ffffff);
  color: var(--text-color, #2c3e50);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.carriers-nav-dropdown select:hover {
  border-image: linear-gradient(135deg, #283730, #547d63) 1;
}

.carriers-nav-dropdown select:focus {
  outline: none;
  border-image: linear-gradient(135deg, #283730, #547d63) 1;
  box-shadow: 0 0 0 2px rgba(40, 55, 48, 0.2);
}

/* Dark theme for shippers section */
body.dark .shippers-section-header {
  border-bottom-color: var(--dark-border-color, rgba(96, 165, 250, 0.1));
}

body.dark .shippers-section-header h2 {
  color: var(--dark-text-color, #f0f0f0);
}

body.dark .shippers-nav-dropdown select {
  /* background: var(--dark-bg-color, #1a1a1a); */
  background: #151d26;
  color: var(--dark-text-color, #f0f0f0);
  border-color: var(--dark-border-color, rgba(96, 165, 250, 0.2));
}

body.dark .shippers-nav-dropdown select:hover {
  border-image: linear-gradient(135deg, #5f997d, #052b13) 1;
}

/* Dark theme for carriers section */
body.dark .carriers-section-header {
  border-bottom-color: var(--dark-border-color, rgba(96, 165, 250, 0.1));
}

body.dark .carriers-section-header h2 {
  color: var(--dark-text-color, #f0f0f0);
}

body.dark .carriers-nav-dropdown select {
  /* background: var(--dark-bg-color, #1a1a1a); */
  background: #151d26;
  color: var(--dark-text-color, #f0f0f0);
  border-color: var(--dark-border-color, rgba(96, 165, 250, 0.2));
}

body.dark .carriers-nav-dropdown select:hover {
  border-image: linear-gradient(135deg, #5f997d, #052b13) 1;
}

/* Dark theme for routes section */
body.dark .routes-section-header {
  border-bottom-color: var(--dark-border-color, rgba(96, 165, 250, 0.1));
}

body.dark .routes-section-header h2 {
  color: var(--dark-text-color, #f0f0f0);
}

/* Tabs Styling */
.tabs {
  margin-top: 1rem;
}

.tab-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  border-bottom: 1px solid var(--border-color, #e1e5e9);
}

.tab {
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  color: var(--text-muted, #6c757d);
  font-weight: 500;
}

.tab:hover {
  color: var(--text-color, #2c3e50);
  background: var(--primary-gradient-bg);
}

.tab.active {
  color: var(--primary-gradient-text);
  border-bottom-color: var(--primary-gradient-border);
  background: var(--primary-gradient-bg);
}

.tab-content {
  display: none;
  padding: 1rem 0;
}

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

/* Form row styling for inline forms */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row input,
.form-row select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color, #e1e5e9);
  border-radius: 6px;
  font-size: 0.9rem;
}

.form-row button {
  align-self: end;
  padding: 0.5rem 1rem;
  background: var(--primary-gradient-bg);
  color: var(--primary-gradient-text);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.form-row button:hover {
  background: var(--primary-gradient-bg);
  transform: translateY(-1px);
}

/* Dark theme for tabs */
body.dark .tab-list {
  border-bottom-color: var(--dark-border-color, rgba(96, 165, 250, 0.1));
}

body.dark .tab {
  color: var(--dark-text-muted, #a0a0a0);
}

body.dark .tab:hover {
  color: var(--dark-text-color, #f0f0f0);
  background: var(--primary-gradient-bg);
}

body.dark .tab.active {
  color: var(--primary-gradient-text);
  background: var(--primary-gradient-bg);
}

body.dark .form-row input,
body.dark .form-row select,
body.dark .form-row textarea {
  background: var(--dark-bg-color, #1a1a1a);
  color: var(--dark-text-color, #f0f0f0);
  border-color: var(--dark-border-color, rgba(96, 165, 250, 0.2));
}

/* Form styling for shippers */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color, #2c3e50);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color, #e1e5e9);
  border-radius: 8px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  background: var(--bg-color, #ffffff);
  color: var(--text-color, #2c3e50);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-gradient-border);
  box-shadow: 0 0 0 2px rgba(9, 114, 211, 0.2);
}

.form-group button {
  padding: 0.75rem 1.5rem;
  background: var(--primary-gradient-bg);
  color: var(--primary-gradient-text);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.form-group button:hover {
  background: var(--primary-gradient-bg);
  transform: translateY(-1px);
}

.form-group button.primary {
  background: var(--primary-gradient-bg);
  color: var(--primary-gradient-text);
}

/* Dark theme for forms */
body.dark .form-group label {
  color: var(--aws-dark-text-primary, #f0f0f0);
}

body.dark .form-group input,
body.dark .form-group textarea,
body.dark .form-group select {
  /* background-color: var(--aws-dark-input-bg, #2d2d2d); */
  
  color: var(--aws-dark-text-primary, #f0f0f0);
  border-color: var(--aws-dark-input-border, #555555);
}

body.dark .form-group input:focus,
body.dark .form-group textarea:focus,
body.dark .form-group select:focus {
  border-color: var(--aws-dark-input-focus-border, #0073bb);
  box-shadow: var(--aws-dark-input-focus-shadow, 0 0 0 2px rgba(0, 115, 187, 0.25));
}

/* AWS Button integration - these styles will be handled by aws-buttons.css */
body.dark .form-group button.primary {
  /* Handled by AWS button system */
}

body.dark .form-group button.primary:hover,
body.dark .form-group button[type="submit"]:hover {
  /* Colors handled by AWS button system */
}

/* Legacy button compatibility - now handled by AWS system */
.btn {
  /* Base styles now handled by aws-buttons.css */
}

.btn-secondary {
  /* Handled by AWS button system */
}

.btn-secondary:hover {
  /* Handled by AWS button system */
}

.btn-danger {
  /* Handled by AWS button system */
}

.btn-danger:hover {
  /* Handled by AWS button system */
}

/* Table action buttons styling */
.responsive-table .btn {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  margin: 0 0.2rem;
}

.responsive-table .btn-danger {
  /* Colors handled by AWS button system */
}

.responsive-table .btn-danger:hover {
  /* Colors handled by AWS button system */
}

/* Inline form styling improvements */
.responsive-table form {
  display: inline-block;
  margin: 0;
}

.responsive-table form button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
}

/* Table cell alignment for actions */
.responsive-table td:last-child {
  text-align: center;
  white-space: nowrap;
}

/* Dark theme for buttons - now handled by AWS system */
body.dark .btn-secondary {
  /* Handled by AWS dark mode system */
}

body.dark .btn-secondary:hover {
  /* Handled by AWS dark mode system */
}

body.dark .btn-danger {
  /* Handled by AWS dark mode system */
}

body.dark .btn-danger:hover {
  /* Handled by AWS dark mode system */
}

/* Messages styling */
.messages {
  margin-bottom: 2rem;
}

.message {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-weight: 500;
}

.message-success {
  background: var(--aws-dark-success-bg, rgba(29, 129, 2, 0.1));
  color: var(--aws-dark-success-text, #1d8102);
  border: 1px solid var(--aws-dark-success-border, rgba(29, 129, 2, 0.2));
}

.message-error {
  background: var(--aws-dark-error-bg, rgba(209, 50, 18, 0.1));
  color: var(--aws-dark-error-text, #dc3545);
  border: 1px solid var(--aws-dark-error-border, rgba(209, 50, 18, 0.2));
}

.message-info {
  background: var(--aws-dark-info-bg, rgba(0, 115, 187, 0.1));
  color: var(--aws-dark-info-text, #0073bb);
  border: 1px solid var(--aws-dark-info-border, rgba(0, 115, 187, 0.2));
}

/* Edit Profile Page Styles */
.edit-profile-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--aws-dark-border-light, #1c2c38);
}

.edit-profile-header h1 {
  margin: 0 0 0.5rem 0;
  color: var(--aws-dark-text-primary, #2c3e50);
  font-size: 2rem;
  font-weight: 600;
}

.edit-profile-header p {
  margin: 0;
  color: var(--aws-dark-text-muted, #6c757d);
  font-size: 1rem;
}

/* Dark theme for edit profile */
body.dark .edit-profile-header h1 {
  color: var(--aws-dark-text-primary, #f0f0f0);
}

body.dark .edit-profile-header p {
  color: var(--aws-dark-text-muted, #b0b0b0);
}

body.dark .edit-profile-header {
  border-bottom-color: var(--aws-dark-border-light, #1c2c38);
}

body.dark .message-success {
  background: var(--aws-dark-success-bg, rgba(29, 129, 2, 0.2));
  color: var(--aws-dark-success-text, #4ade80);
  border-color: var(--aws-dark-success-border, rgba(29, 129, 2, 0.4));
}

body.dark .message-error {
  background: var(--aws-dark-error-bg, rgba(209, 50, 18, 0.2));
  color: var(--aws-dark-error-text, #f87171);
  border-color: var(--aws-dark-error-border, rgba(209, 50, 18, 0.4));
}

body.dark .message-info {
  background: var(--aws-dark-info-bg, rgba(0, 115, 187, 0.2));
  color: var(--aws-dark-info-text, #60a5fa);
  border-color: var(--aws-dark-info-border, rgba(0, 115, 187, 0.4));
}

body.dark .form-error {
  color: var(--aws-dark-error-text, #f87171);
}

/* Route Status Icons */
.status-cell {
  text-align: center;
  width: 80px;
  min-width: 80px;
}

.status-text {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.status-active {
  background: var(--primary-gradient-bg);
  color: var(--primary-gradient-text);
  border: 1px solid var(--primary-gradient-border);
}

.status-inactive {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.2);
}

.status-text:hover {
  transform: scale(1.05);
}

/* Dark theme for status text */
body.dark .status-active {
  background: var(--primary-gradient-bg);
  color: var(--primary-gradient-text);
  border-color: var(--primary-gradient-border);
}

body.dark .status-inactive {
  background-color: rgba(255, 107, 107, 0.1);
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.2);
}

/* Route Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.active {
  background: var(--primary-gradient-bg);
  color: var(--primary-gradient-text);
  border: 1px solid var(--primary-gradient-border);
}

.status-badge.inactive {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.2);
}

.status-badge i {
  font-size: 0.75rem;
}

/* Dark theme for status badges */
body.dark .status-badge.active {
  background: var(--primary-gradient-bg);
  color: var(--primary-gradient-text);
  border-color: var(--primary-gradient-border);
}

body.dark .status-badge.inactive {
  background-color: rgba(255, 107, 107, 0.1);
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.2);
}

/* Form error styling */
.form-error {
  color: #dc3545;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  font-weight: 500;
}

body.dark .form-error {
  color: #ff6b6b;
}

/* =====================================================
   📋 EDIT USER MODAL STYLES
===================================================== */

/* Modal Overlay */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  opacity: 1;
}

/* Modal Content */
.modal-content {
  background-color: var(--aws-dark-surface-raised, #ffffff);
  margin: 5% auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  box-shadow: var(--aws-dark-shadow-xl, 0 15px 40px rgba(0, 0, 0, 0.25));
  position: relative;
  transform: translateY(-20px) scale(0.95);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--aws-dark-border-medium, transparent);
}

.modal.show .modal-content {
  transform: translateY(0) scale(1);
}

/* Modal Header - will use AWS button colors */
.modal-content h4 {
  margin: 0;
  padding: 1.5rem 2rem;
  background: var(--aws-btn-primary-bg, #0073bb);
  color: var(--aws-btn-primary-color, white);
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 12px 12px 0 0;
  position: relative;
}

/* Close Button */
.modal-content .close {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-content .close:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateY(-50%) scale(1.1);
}

/* Modal Form */
.modal-content form {
  padding: 2rem;
  flex: 1;
  overflow-y: auto;
}

.modal-content .form-group {
  margin-bottom: 1.5rem;
}

.modal-content .form-group:last-child {
  margin-bottom: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--aws-dark-border-light, #e1e5e9);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.modal-content label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--aws-dark-text-primary, #f0f0f0);
  font-weight: 500;
  font-size: 0.9rem;
}

.modal-content input,
.modal-content select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--aws-dark-input-border, #e1e5e9);
  border-radius: 8px;
  background: var(--aws-dark-input-bg, #ffffff);
  color: var(--aws-dark-text-primary, #f0f0f0);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.modal-content input:focus,
.modal-content select:focus {
  outline: none;
  border-color: var(--aws-dark-input-focus-border, #0073bb);
  box-shadow: var(--aws-dark-input-focus-shadow, 0 0 0 2px rgba(0, 115, 187, 0.25));
}

/* Modal Buttons - will be handled by AWS button system */
.modal-content button {
  /* Basic button styles handled by aws-buttons.css */
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  min-width: 100px;
}

.modal-content button.primary,
.modal-content button[type="submit"] {
  /* Colors handled by AWS button system */
}

.modal-content button.primary:hover,
.modal-content button[type="submit"]:hover {
  /* Colors handled by AWS button system */
}

.modal-content .btn-secondary {
  /* Colors handled by AWS button system */
}

.modal-content .btn-secondary:hover {
  /* Colors handled by AWS button system */
}

/* Dark Theme Support */
body.dark .modal-content {
  background-color: var(--aws-dark-surface-raised, #2d2d2d);
  border: 1px solid var(--aws-dark-border-medium, #555555);
  box-shadow: var(--aws-dark-shadow-xl, 0 15px 40px rgba(0, 0, 0, 0.6));
}

body.dark .modal-content h4 {
  background: var(--aws-btn-primary-bg, #0073bb);
  color: var(--aws-btn-primary-color, white);
}

body.dark .modal-content label {
  color: var(--aws-dark-text-primary, #f0f0f0);
}

body.dark .modal-content input,
body.dark .modal-content select {
  background-color: var(--aws-dark-input-bg, #2d2d2d);
  color: var(--aws-dark-text-primary, #f0f0f0);
  border-color: var(--aws-dark-input-border, #555555);
}

body.dark .modal-content input:focus,
body.dark .modal-content select:focus {
  border-color: var(--aws-dark-input-focus-border, #0073bb);
  box-shadow: var(--aws-dark-input-focus-shadow, 0 0 0 2px rgba(0, 115, 187, 0.25));
}

body.dark .modal-content .form-group:last-child {
  border-top-color: var(--aws-dark-border-light, #1c2c38);
}

body.dark .modal-content button.primary,
body.dark .modal-content button[type="submit"] {
  /* Colors handled by AWS button system */
}

body.dark .modal-content button.primary:hover,
body.dark .modal-content button[type="submit"]:hover {
  /* Colors handled by AWS button system */
}

/* Responsive Design */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 2% auto;
    max-height: 95vh;
  }
  
  .modal-content h4 {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
  }
  
  .modal-content .close {
    right: 1rem;
  }
  
  .modal-content form {
    padding: 1.5rem;
  }
  
  .modal-content .form-group:last-child {
    flex-direction: column;
  }
  
  .modal-content button {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .modal-content button:last-child {
    margin-bottom: 0;
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: 98%;
    margin: 1% auto;
  }
  
  .modal-content h4 {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
  
  .modal-content .close {
    right: 0.75rem;
    font-size: 20px;
  }
  
  .modal-content form {
    padding: 1rem;
  }
}

/* Updated submit button styling for important actions */
.form-group button[type="submit"],
input[type="submit"],
button[type="submit"] {
    background: #ff9900 !important;
    color: #000000 !important;
    border: 1px solid #ff9900 !important;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-group button[type="submit"]:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
    background: #e6850e !important;
    color: #000000 !important;
    border-color: #e6850e !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

.modal-content button[type="submit"] {
    background: #ff9900 !important;
    color: #000000 !important;
    border: 1px solid #ff9900 !important;
}

.modal-content button[type="submit"]:hover {
    background: #e6850e !important;
    color: #000000 !important;
    border-color: #e6850e !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

/* Dark theme submit button styling */
body.dark .form-group button[type="submit"],
body.dark input[type="submit"],
body.dark button[type="submit"] {
    background: #ff9900 !important;
    color: #000000 !important;
    border: 1px solid #ff9900 !important;
}

body.dark .form-group button[type="submit"]:hover,
body.dark input[type="submit"]:hover,
body.dark button[type="submit"]:hover {
    background: #ffad33 !important;
    color: #000000 !important;
    border-color: #ffad33 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

body.dark .modal-content button[type="submit"] {
    background: #ff9900 !important;
    color: #000000 !important;
    border: 1px solid #ff9900 !important;
}

body.dark .modal-content button[type="submit"]:hover {
    background: #ffad33 !important;
    color: #000000 !important;
    border-color: #ffad33 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

/* Important action buttons styling */
.btn-save,
.btn-create,
.btn-add,
.btn-confirm,
.save-btn,
.create-btn,
.add-btn,
.confirm-btn,
button.save,
button.create,
button.add,
button.confirm {
    background: #ff9900 !important;
    color: #000000 !important;
    border: 1px solid #ff9900 !important;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-save:hover,
.btn-create:hover,
.btn-add:hover,
.btn-confirm:hover,
.save-btn:hover,
.create-btn:hover,
.add-btn:hover,
.confirm-btn:hover,
button.save:hover,
button.create:hover,
button.add:hover,
button.confirm:hover {
    background: #e6850e !important;
    color: #000000 !important;
    border-color: #e6850e !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

/* Dark theme for important action buttons */
body.dark .btn-save,
body.dark .btn-create,
body.dark .btn-add,
body.dark .btn-confirm,
body.dark .save-btn,
body.dark .create-btn,
body.dark .add-btn,
body.dark .confirm-btn,
body.dark button.save,
body.dark button.create,
body.dark button.add,
body.dark button.confirm {
    background: #ff9900 !important;
    color: #000000 !important;
    border: 1px solid #ff9900 !important;
}

body.dark .btn-save:hover,
body.dark .btn-create:hover,
body.dark .btn-add:hover,
body.dark .btn-confirm:hover,
body.dark .save-btn:hover,
body.dark .create-btn:hover,
body.dark .add-btn:hover,
body.dark .confirm-btn:hover,
body.dark button.save:hover,
body.dark button.create:hover,
body.dark button.add:hover,
body.dark button.confirm:hover {
    background: #ffad33 !important;
    color: #000000 !important;
    border-color: #ffad33 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

/* =====================================================
   ⚙️ SETTINGS DROPDOWN
===================================================== */

.settings-dropdown {
    position: relative;
    margin-right: 0.1rem;
}

.settings-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0 !important;
    padding-left: 0.7rem !important;
    padding-right: 0.7rem !important;
    background: var(--theme-toggle-bg, transparent);
    border: var(--theme-toggle-border, 1px solid #e1e5e9);
    color: var(--theme-toggle-color, #6c757d);
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    border-radius: 8px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.settings-dropdown-toggle:hover {
    background: var(--primary-gradient-bg);
    border-color: var(--primary-gradient-border);
    color: var(--primary-gradient-text);
    transform: translateY(-1px);
}

.settings-dropdown-toggle i {
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

/* Settings Dropdown Menu */
.settings-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 320px;
    background: var(--dropdown-bg, #ffffff);
    border: var(--dropdown-border, 1px solid #e1e5e9);
    border-radius: 12px;
    box-shadow: var(--dropdown-shadow, 0 10px 25px rgba(0, 0, 0, 0.15));
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.settings-dropdown.active .settings-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Settings Header */
.settings-dropdown-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: var(--dropdown-header-border, 1px solid #e1e5e9);
    background: var(--dropdown-header-bg, #f8f9fa);
}

.settings-dropdown-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dropdown-item-color, #2c3e50);
}

/* Settings Body */
.settings-dropdown-body {
    padding: 1.5rem;
}

.setting-group {
    margin-bottom: 1.5rem;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dropdown-item-color, #2c3e50);
    margin-bottom: 0.75rem;
}

.setting-beta {
    font-style: italic;
    font-weight: 400;
    color: var(--dropdown-item-hover-color, #6c757d);
    font-size: 0.85rem;
}

/* Setting Control (Select) */
.setting-control {
    position: relative;
}

.setting-select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid var(--dropdown-border, #e1e5e9);
    border-radius: 8px;
    background: var(--dropdown-bg, #ffffff);
    color: var(--dropdown-item-color, #2c3e50);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.setting-select:focus {
    outline: none;
    border-color: var(--primary-gradient-border);
    box-shadow: 0 0 0 2px rgba(9, 114, 211, 0.2);
}

.setting-select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dropdown-item-color, #6c757d);
    font-size: 0.8rem;
    pointer-events: none;
}

/* Radio Button Group */
.setting-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.setting-radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.setting-radio-option:hover {
    background: var(--dropdown-item-hover-bg, rgba(9, 114, 211, 0.05));
}

.setting-radio-input {
    display: none;
}

.setting-radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--dropdown-border, #d1d5db);
    border-radius: 50%;
    background: var(--dropdown-bg, #ffffff);
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.setting-radio-input:checked + .setting-radio-custom {
    border-color: var(--primary-gradient-border);
    background: var(--primary-gradient-bg);
}

.setting-radio-input:checked + .setting-radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-gradient-text);
}

.setting-radio-label {
    font-size: 0.9rem;
    color: var(--dropdown-item-color, #2c3e50);
    font-weight: 500;
}

/* Settings Footer */
.settings-dropdown-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: var(--dropdown-footer-border, 1px solid #e1e5e9);
}

.settings-all-link {
    color: var(--primary-gradient-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.settings-all-link:hover {
    color: var(--primary-gradient-border);
    text-decoration: underline;
}

/* Dark Theme Support */
body.dark .settings-dropdown-toggle {
    background: var(--dark-theme-toggle-bg, transparent);
    border-color: var(--dark-theme-toggle-border, #444);
    color: var(--dark-theme-toggle-color, #f0f0f0);
}

body.dark .settings-dropdown-toggle:hover {
    border-color: var(--primary-gradient-border);
    background: var(--primary-gradient-bg);
    color: var(--primary-gradient-text);
}

body.dark .settings-dropdown-menu {
    background: var(#151d26, #2d2d2d);
    border-color: var(--dark-dropdown-border, #555);
    box-shadow: var(--dark-dropdown-shadow, 0 10px 25px rgba(0, 0, 0, 0.4));
}

body.dark .settings-dropdown-header {
    background: var(#151d26, #1e1e1e);
    border-bottom-color: var(--dark-dropdown-header-border, #555);
}

body.dark .settings-dropdown-header h4 {
    color: var(--dark-dropdown-item-color, #f0f0f0);
}

body.dark .setting-label {
    color: var(--dark-dropdown-item-color, #f0f0f0);
}

body.dark .setting-beta {
    color: var(--dark-dropdown-item-hover-color, #b0b0b0);
}

body.dark .setting-select {
    background: var(#151d26, #1e1e1e);
    border-color: var(--dark-dropdown-border, #555);
    color: var(--dark-dropdown-item-color, #f0f0f0);
}

body.dark .setting-select:focus {
    border-color: var(--primary-gradient-border);
    box-shadow: 0 0 0 2px rgba(9, 114, 211, 0.2);
}

body.dark .setting-select-arrow {
    color: var(--dark-dropdown-item-color, #b0b0b0);
}

body.dark .setting-radio-option:hover {
    background: var(--dark-dropdown-item-hover-bg, rgba(96, 165, 250, 0.1));
}

body.dark .setting-radio-custom {
    background: var(#151d26, #1e1e1e);
    border-color: var(--dark-dropdown-border, #555);
}

body.dark .setting-radio-input:checked + .setting-radio-custom {
    border-color: var(--primary-gradient-border);
    background: var(--primary-gradient-bg);
}

body.dark .setting-radio-input:checked + .setting-radio-custom::after {
    background: var(--primary-gradient-text);
}

body.dark .setting-radio-label {
    color: var(--dark-dropdown-item-color, #f0f0f0);
}

body.dark .settings-dropdown-footer {
    border-top-color: var(--dark-dropdown-footer-border, #555);
}

body.dark .settings-all-link {
    color: var(--primary-gradient-text);
}

body.dark .settings-all-link:hover {
    color: var(--primary-gradient-border);
}

/* Responsive Design */
@media (max-width: 768px) {
    .settings-dropdown-menu {
        width: 280px;
        right: -1rem;
    }
    
    .settings-dropdown-header {
        padding: 1rem 1.25rem 0.75rem 1.25rem;
    }
    
    .settings-dropdown-body {
        padding: 1.25rem;
    }
    
    .setting-group {
        margin-bottom: 1.25rem;
    }
}

@media (max-width: 480px) {
    .settings-dropdown-menu {
        width: 260px;
        right: -1.5rem;
    }
    
    .settings-dropdown-header {
        padding: 0.75rem 1rem 0.5rem 1rem;
    }
    
    .settings-dropdown-header h4 {
        font-size: 1rem;
    }
    
    .settings-dropdown-body {
        padding: 1rem;
    }
    
    .setting-group {
        margin-bottom: 1rem;
    }
}

/* =====================================================
   👤 USER TYPE BADGE
===================================================== */
.user-type-badge {
    display: flex;
    align-items: center;
    margin: 0 0.01rem;
}

.user-type-text {
    /* background: #ff9900; */
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.user-type-badge:hover .user-type-text {
    /* Hover effects removed */
}

/* Dark mode - keep same styling */
body.dark .user-type-text {
    /* background: #ff9900; */
    color: #ffffff;
}

body.dark .user-type-badge:hover .user-type-text {
    /* Dark mode hover effects removed */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-type-badge {
        margin: 0 0.01rem;
    }
    
    .user-type-text {
        padding: 0.2rem 0.6rem;
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .user-type-badge {
        display: none; /* Hide on very small screens to save space */
    }
}

.header-action-btn {
  background: transparent !important;
  color: #6c757d !important;
  border: none !important;
  box-shadow: none !important;
  transition: color 0.2s;
}
.header-action-btn i,
.header-action-btn .user-name {
  /* color: #6c757d !important; */
  color: #fff;
}
.header-action-btn:hover,
.header-action-btn:focus {
  color: #343a40 !important;
  background: transparent !important;
  text-decoration: underline;
}
.header-action-btn:hover i,
.header-action-btn:hover .user-name {
  color: #343a40 !important;
}

body.dark .header-action-btn,
body.dark .header-action-btn i,
body.dark .header-action-btn .user-name {
  color: #fff !important;
}
body.dark .header-action-btn:hover,
body.dark .header-action-btn:focus,
body.dark .header-action-btn:hover i,
body.dark .header-action-btn:hover .user-name {
  color: #e0e0e0 !important;
}

body.dark a:visited,
body.dark .btn:visited,
body.dark .nav-link:visited {
  color: #ffffff !important;
}

/* Compact Action Buttons - Override all other styles */
.aws-action-btn-compact {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif !important;
    font-weight: 500 !important;
    text-align: center !important;
    text-decoration: none !important;
    vertical-align: middle !important;
    cursor: pointer !important;
    user-select: none !important;
    border: 1px solid transparent !important;
    border-radius: 2px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    padding: 4px 8px !important;
    font-size: 11px !important;
    margin: 0 2px !important;
    background-color: var(--aws-btn-secondary-bg) !important;
    border-color: var(--aws-btn-secondary-border) !important;
    color: var(--aws-btn-secondary-color) !important;
    /* Remove min-height constraint */
    min-height: auto !important;
    height: auto !important;
}

.aws-action-btn-compact:hover {
    text-decoration: none !important;
    transform: translateY(-1px) !important;
}

.aws-action-btn-compact:focus {
    outline: none !important;
    z-index: 3 !important;
}

.aws-action-btn-compact.aws-action-btn-edit {
    background-color: var(--aws-btn-primary-bg) !important;
    border-color: var(--aws-btn-primary-border) !important;
    color: var(--aws-btn-primary-color) !important;
}

.aws-action-btn-compact.aws-action-btn-edit:hover {
    background-color: var(--aws-btn-primary-hover-bg) !important;
    border-color: var(--aws-btn-primary-hover-border) !important;
    color: var(--aws-btn-primary-color) !important;
    box-shadow: 0 2px 4px rgba(255, 153, 0, 0.3) !important;
}

.aws-action-btn-compact.aws-action-btn-delete {
    background-color: var(--aws-btn-danger-bg) !important;
    border-color: var(--aws-btn-danger-border) !important;
    color: var(--aws-btn-danger-color) !important;
}

.aws-action-btn-compact.aws-action-btn-delete:hover {
    background-color: var(--aws-btn-danger-hover-bg) !important;
    border-color: var(--aws-btn-danger-hover-border) !important;
    color: var(--aws-btn-danger-color) !important;
    box-shadow: 0 2px 4px rgba(217, 21, 21, 0.3) !important;
}

/* Dark theme for compact action buttons */
body.dark .aws-action-btn-compact {
    background-color: var(--aws-btn-secondary-bg) !important;
    border-color: var(--aws-btn-secondary-border) !important;
    color: var(--aws-btn-secondary-color) !important;
}

body.dark .aws-action-btn-compact.aws-action-btn-edit {
    background-color: var(--aws-btn-primary-bg) !important;
    border-color: var(--aws-btn-primary-border) !important;
    color: var(--aws-btn-primary-color) !important;
}

body.dark .aws-action-btn-compact.aws-action-btn-edit:hover {
    background-color: var(--aws-btn-primary-hover-bg) !important;
    border-color: var(--aws-btn-primary-hover-border) !important;
    color: var(--aws-btn-primary-color) !important;
}

body.dark .aws-action-btn-compact.aws-action-btn-delete {
    background-color: var(--aws-btn-danger-bg) !important;
    border-color: var(--aws-btn-danger-border) !important;
    color: var(--aws-btn-danger-color) !important;
}

body.dark .aws-action-btn-compact.aws-action-btn-delete:hover {
    background-color: var(--aws-btn-danger-hover-bg) !important;
    border-color: var(--aws-btn-danger-hover-border) !important;
    color: var(--aws-btn-danger-color) !important;
}

/* AWS Edit Page Header Styling */
.aws-page-header-title {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.aws-page-header-title .aws-edit-logo {
    flex-shrink: 0 !important;
}

.aws-page-header-title > div {
    flex: 1 !important;
}

/* Logo Image Styles */
.logo-image {
    transition: opacity 0.3s ease;
    max-width: 100%;
    height: auto;
}

.logo-image.dark-logo {
    display: none;
}

.logo-image.light-logo {
    display: block;
}

/* Dark theme - show dark logos */
body.dark .logo-image.dark-logo {
    display: block;
}

body.dark .logo-image.light-logo {
    display: none;
}

/* Light theme - show light logos */
body.light .logo-image.dark-logo {
    display: none;
}

body.light .logo-image.light-logo {
    display: block;
}

/* Auto theme - follow system preference */
@media (prefers-color-scheme: dark) {
    body[data-user-theme="auto"] .logo-image.dark-logo {
        display: block;
    }
    
    body[data-user-theme="auto"] .logo-image.light-logo {
        display: none;
    }
}

@media (prefers-color-scheme: light) {
    body[data-user-theme="auto"] .logo-image.dark-logo {
        display: none;
    }
    
    body[data-user-theme="auto"] .logo-image.light-logo {
        display: block;
    }
}

