/*
 * RentalCore - Unique Design System
 * Custom-built interface that stands out from typical web apps
 */

/* Custom Properties */
:root {
    /* Core Brand Colors - WarehouseCore Style */
    --primary-900: #111111;  /* Dark background */
    --primary-800: #161616;
    --primary-700: #1F1F1F;
    --primary-600: #2A2A2A;
    --primary-500: #4A4A4A;
    --primary-400: #888888;
    --primary-300: #AAAAAA;
    --primary-200: #CCCCCC;
    --primary-100: #EAEAEA;

    /* Accent Colors - WarehouseCore Red */
    --accent-red: #D0021B;          /* WarehouseCore red for important actions */
    --accent-red-hover: #A00115;    /* Darker red for hover states */

    /* Extended Grayscale for UI elements */
    --gray-50: #F5F5F5;
    --gray-100: #EAEAEA;
    --gray-200: #CCCCCC;
    --gray-300: #AAAAAA;
    --gray-400: #888888;
    --gray-500: #666666;
    --gray-600: #4A4A4A;
    --gray-700: #2A2A2A;
    --gray-800: #1F1F1F;
    --gray-900: #111111;

    /* White for text on dark backgrounds */
    --white: #FFFFFF;

    /* Semantic Colors - WarehouseCore Style (Green, Yellow, Blue, Red) */
    --success: #22c55e;      /* Green for success/available */
    --warning: #eab308;      /* Yellow for warnings/defective */
    --error: var(--accent-red);
    --info: #60a5fa;         /* Blue for info/repair */

    /* Surface Colors - WarehouseCore Dark Grays */
    --surface-0: #0B0B0B;    /* WarehouseCore dark background */
    --surface-1: #111111;    /* Dark gray */
    --surface-2: #161616;    /* Medium-dark gray */
    --surface-3: #1F1F1F;    /* Medium gray */
    --surface-4: #2A2A2A;    /* Lighter medium gray */

    /* Text Colors - Pure White (RentalCore: Rot=Accent, Weiß=Text) */
    --text-primary: #FFFFFF;    /* Pure white for primary text */
    --text-secondary: #FFFFFF;  /* Pure white for secondary text */
    --text-muted: #FFFFFF;      /* Pure white for muted text (was gray, now white) */
    --text-inverse: #111111;    /* Dark gray for inverse text */
    --text-label: #CCCCCC;      /* Light gray for very small labels only */
    
    /* RentalCore theme aliases */
    --rc-text-primary: var(--text-primary);
    --rc-text-secondary: var(--text-secondary);
    --rc-primary: #c0552c;
    --rc-primary-50: #f7ebe2;
    --rc-primary-100: #f0d4c3;
    --rc-primary-200: #e1b293;
    --rc-primary-500: #c0552c;
    --rc-primary-600: #9d4522;
    --rc-primary-700: #7a351b;
    --rc-success: var(--success);
    --rc-success-200: #86efac;
    --rc-warning-200: #fde68a;
    --rc-info-200: #d9d4c6;
    --rc-danger-200: #f3b0a6;
    --rc-accent-200: #f4c7aa;
    --rc-surface-50: #151312;
    --rc-surface-100: #1b1917;
    --rc-surface-200: #221f1c;
    --rc-bg-card: rgba(16, 14, 12, 0.95);
    --rc-card-bg: rgba(24, 20, 17, 0.9);
    --rc-border: rgba(255, 255, 255, 0.08);
    --rc-shadow-sm: 0 12px 28px rgba(0, 0, 0, 0.45);
    --rc-shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.6);
    --rc-shadow-2xl: 0 48px 120px rgba(0, 0, 0, 0.65);
    --rc-radius: var(--radius-md);
    --rc-radius-sm: var(--radius-sm);
    --rc-radius-lg: var(--radius-lg);
    --rc-radius-full: 999px;
    
    /* Design System Spacing Scale (4, 8, 12, 16, 20, 24, 32, 40, 48) */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */

    /* Legacy aliases for backward compatibility */
    --space-xs: var(--space-2);   /* 8px */
    --space-sm: var(--space-3);   /* 12px */
    --space-md: var(--space-4);   /* 16px */
    --space-lg: var(--space-6);   /* 24px */
    --space-xl: var(--space-8);   /* 32px */
    --space-2xl: var(--space-10); /* 40px */
    --space-3xl: var(--space-12); /* 48px */

    /* Responsive Breakpoints */
    --breakpoint-xs: 20rem;    /* 320px */
    --breakpoint-sm: 30rem;    /* 480px */
    --breakpoint-md: 40rem;    /* 640px */
    --breakpoint-lg: 48rem;    /* 768px */
    --breakpoint-xl: 64rem;    /* 1024px */
    --breakpoint-2xl: 80rem;   /* 1280px */
    --breakpoint-3xl: 96rem;   /* 1536px */

    /* Container Sizes - Following design system */
    --container-xs: 100%;
    --container-sm: 40rem;     /* 640px */
    --container-md: 48rem;     /* 768px */
    --container-lg: 64rem;     /* 1024px */
    --container-xl: 80rem;     /* 1280px */
    --container-2xl: 90rem;    /* 1440px max content width */
    
    /* Border Radius - Design system values */
    --radius-sm: 0.375rem;   /* 6px */
    --radius-md: 0.625rem;   /* 10px */
    --radius-lg: 1rem;       /* 16px */
    --radius-xl: 1.25rem;    /* 20px */
    --radius-2xl: 1.5rem;    /* 24px */
    
    /* Shadows - Pure Grayscale */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(255, 255, 255, 0.15);  /* White glow instead of blue */

    /* Gradient Definitions - Beautiful Grayscale Gradients */
    --gradient-surface: linear-gradient(135deg, #111111 0%, #1F1F1F 100%);
    --gradient-card: linear-gradient(135deg, #161616 0%, #111111 100%);
    --gradient-button: linear-gradient(135deg, #2A2A2A 0%, #1F1F1F 100%);
    --gradient-header: linear-gradient(180deg, #0B0B0B 0%, #111111 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    
    /* Typography */
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --font-sans: 'Inter', system-ui, sans-serif;

    /* Typography Scale - Fluid with better hierarchy */
    --text-xs: clamp(0.75rem, 0.9vw, 0.875rem);    /* 12-14px - Label/Meta */
    --text-sm: clamp(0.875rem, 1.0vw, 1rem);       /* 14-16px - Body */
    --text-base: clamp(1rem, 1.0vw, 1rem);         /* 16px - Body baseline */
    --text-lg: clamp(1.125rem, 1.4vw, 1.25rem);    /* 18-20px */
    --text-xl: clamp(1.125rem, 1.4vw, 1.375rem);   /* 18-22px - H3 */
    --text-2xl: clamp(1.375rem, 1.8vw, 1.75rem);   /* 22-28px - H2 */
    --text-3xl: clamp(1.75rem, 2.4vw, 2.25rem);    /* 28-36px - H1 */
    --text-4xl: clamp(2.25rem, 3vw, 3rem);         /* 36-48px - Display */

    /* Line Heights */
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.75;
    
    /* Animations */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Override */
[data-theme="light"] {
    /* Surface Colors - Light Mode (WarehouseCore Style) */
    --surface-0: #FFFFFF;
    --surface-1: #F5F5F5;
    --surface-2: #EAEAEA;
    --surface-3: #CCCCCC;
    --surface-4: #AAAAAA;

    /* Text Colors - Light Mode */
    --text-primary: #111111;
    --text-secondary: #4A4A4A;
    --text-muted: #888888;
    --text-inverse: #FFFFFF;

    /* Accent Colors - Light Mode (WarehouseCore Red) */
    --accent-red: #D0021B;          /* WarehouseCore red */
    --accent-red-hover: #A00115;    /* Darker red for hover states */

    /* Light mode grayscale adjustments */
    --gray-50: #F5F5F5;
    --gray-100: #EAEAEA;
    --gray-200: #CCCCCC;
    --gray-300: #AAAAAA;
    --gray-400: #888888;
    --gray-500: #666666;
    --gray-600: #4A4A4A;
    --gray-700: #2A2A2A;
    --gray-800: #1F1F1F;
    --gray-900: #111111;

    /* Semantic Colors - Light Mode (WarehouseCore Style) */
    --success: #22c55e;      /* Green for success/available */
    --warning: #eab308;      /* Yellow for warnings/defective */
    --error: var(--accent-red);
    --info: #60a5fa;         /* Blue for info/repair */
    --warning-20: rgba(234, 179, 8, 0.1);
    
    /* Adjust shadows for light mode */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(0, 0, 0, 0.1);  /* Gray glow instead of blue */
}

/* Light theme body background */
[data-theme="light"] body {
    background: var(--surface-0);
}

/* Light Mode Button Fixes */
[data-theme="light"] .rc-btn-outline {
    border-color: var(--surface-3);
    color: var(--text-primary);
}

[data-theme="light"] .rc-btn-outline:hover {
    background: var(--surface-2);
    border-color: var(--accent-red);
    color: var(--text-label);  /* Light gray for labels */
}

[data-theme="light"] .rc-btn-outline.active {
    background: var(--gray-600);
    border-color: var(--accent-red);
    color: white;
}

/* Light Mode Spinner */
[data-theme="light"] .rc-spinner {
    border-color: var(--surface-3);
    border-top-color: var(--gray-400);
}

/* Light Mode Modal Overlays */
[data-theme="light"] .rc-modal-overlay {
    background: rgba(17, 17, 17, 0.5);  /* Pure gray instead of blue */
}

/* Light Mode Input Fields */
[data-theme="light"] .rc-input {
    background: var(--surface-0);
    border-color: var(--surface-3);
    color: var(--text-primary);
}

[data-theme="light"] .rc-input:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(136, 136, 136, 0.1);  /* Gray focus instead of cyan */
}

/* Light Mode Badges */
[data-theme="light"] .rc-badge-info {
    background: var(--gray-600);
    color: white;
}

/* Light Mode Tree View Elements */
[data-theme="light"] .tree-device.unavailable {
    opacity: 0.6;
    background: var(--surface-2);
}

[data-theme="light"] .tree-device.selected {
    background: #f0f0f0;
    border-color: #dc3545;
    opacity: 0.7;
    color: var(--text-inverse);  /* Dark text for light mode */
}

[data-theme="dark"] .tree-device.selected {
    background: #2a2a2a;
    border-color: #dc3545;
    opacity: 0.8;
    color: var(--text-primary);  /* White text instead of gray */
}

/* Light Mode Device Status Badges in Tree */
[data-theme="light"] .device-status-free {
    background: var(--success);
    color: white;
}

[data-theme="light"] .device-status-rented,
[data-theme="light"] .device-status-assigned {
    background: var(--warning);
    color: white;
}

[data-theme="light"] .device-status-maintenance {
    background: var(--error);
    color: white;
}

[data-theme="light"] .case-info {
    background: var(--warning-20);
    color: var(--warning);
}

/* Light Mode Navigation */
[data-theme="light"] .rc-navbar {
    background: var(--surface-0);
    border-bottom-color: var(--surface-3);
}

/* Light Mode Card Improvements */
[data-theme="light"] .rc-card {
    background: var(--surface-0);
    border-color: var(--surface-3);
}

[data-theme="light"] .rc-card-header {
    background: var(--surface-1);
    border-bottom-color: var(--surface-3);
}

/* Light Mode Table Improvements */
[data-theme="light"] .rc-table th {
    background: var(--surface-1);
    color: var(--text-primary);
}

[data-theme="light"] .rc-table td {
    border-bottom-color: var(--surface-3);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--surface-0);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== GLOBAL SCROLLBAR STYLING ===== */
/* WebKit Browsers (Chrome, Safari, Edge) */
*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

*::-webkit-scrollbar-thumb {
    background: rgba(136, 136, 136, 0.5);
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(136, 136, 136, 0.7);
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:active {
    background: rgba(136, 136, 136, 0.9);
    background-clip: padding-box;
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(136, 136, 136, 0.5) rgba(0, 0, 0, 0.2);
}

/* Thin scrollbar variant for specific elements */
.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

/* ===== SELECT DROPDOWN OPTION STYLING ===== */
select option {
    background-color: #1a1a1a;
    color: #FFFFFF;
    padding: 8px 12px;
}

select option:hover,
select option:focus,
select option:checked {
    background-color: #2a2a2a;
    color: #00f5ff;
}

select option:disabled {
    color: #666666;
    background-color: #1a1a1a;
}

/* ===== SELECT ELEMENT ENHANCEMENT ===== */
select {
    background-color: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

select:focus {
    background-color: rgba(255, 255, 255, 0.08);
}

/* Responsive Container System */
.rc-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--space-4);

    /* Content shell max-width 1280-1440px centered */
    max-width: var(--container-xl);
}

/* App shell with proper centering */
.rc-app-shell {
    max-width: var(--container-2xl);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.rc-container-sm { max-width: var(--container-sm); }
.rc-container-md { max-width: var(--container-md); }
.rc-container-lg { max-width: var(--container-lg); }
.rc-container-xl { max-width: var(--container-xl); }
.rc-container-2xl { max-width: var(--container-2xl); }
.rc-container-fluid { max-width: none; }

/* Responsive padding adjustments */
@media (max-width: 480px) {
    .rc-container,
    .rc-app-shell {
        padding: 0 var(--space-4);
    }
}

@media (min-width: 768px) {
    .rc-container,
    .rc-app-shell {
        padding: 0 var(--space-6);
    }
}

@media (min-width: 1200px) {
    .rc-container,
    .rc-app-shell {
        padding: 0 var(--space-8);
    }
}

/* Enhanced Responsive Grid System */
.rc-grid {
    display: grid;
    gap: var(--space-6);
}

/* Responsive gap adjustments */
@media (min-width: 768px) {
    .rc-grid {
        gap: var(--space-6);
    }
}

@media (min-width: 1024px) {
    .rc-grid {
        gap: var(--space-8);
    }
}

/* Auto-fit grids with minmax to prevent tiny cards */
.rc-grid-auto {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.rc-grid-auto-sm {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.rc-grid-auto-lg {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* Fixed grids with proper minmax */
.rc-grid-1 {
    grid-template-columns: 1fr;
}

.rc-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.rc-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.rc-grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Desktop-only larger grids for spacious layouts */
@media (min-width: 1024px) {
    .rc-grid-2 {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }

    .rc-grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }

    .rc-grid-4 {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

.rc-flex {
    display: flex;
    gap: var(--space-md);
}

.rc-flex-between { justify-content: space-between; }
.rc-flex-center { justify-content: center; align-items: center; }
.rc-flex-wrap { flex-wrap: wrap; }
.rc-flex-col { flex-direction: column; }

/* Flexbox gap utilities */
.rc-flex-gap-xs { gap: var(--space-xs); }
.rc-flex-gap-sm { gap: var(--space-sm); }

/* Layout Primitives */
.rc-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.rc-stack-sm { gap: var(--space-sm); }
.rc-stack-lg { gap: var(--space-lg); }
.rc-stack-xl { gap: var(--space-xl); }

.rc-inline {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
}

.rc-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: flex-start;
    align-items: center;
}

.rc-sidebar-layout {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.rc-sidebar-layout > :first-child {
    flex-basis: 20rem;
    flex-grow: 1;
}

.rc-sidebar-layout > :last-child {
    flex-basis: 0;
    flex-grow: 999;
    min-width: calc(50% - var(--space-lg));
}

/* Content width constraints */
.rc-prose {
    max-width: 72ch;
}

.rc-prose-wide {
    max-width: 96ch;
}

/* Touch targets for mobile */
.rc-touch-target {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Typography */
.rc-heading-1 {
    font-size: var(--text-4xl);
    font-weight: 800;
    line-height: var(--leading-tight);
    color: var(--text-primary);  /* Pure white instead of gray gradient */
    margin-bottom: var(--space-lg);
}

.rc-heading-2 {
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.rc-heading-3 {
    font-size: var(--text-2xl);
    font-weight: 600;
    line-height: var(--leading-tight);
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.rc-heading-4 {
    font-size: var(--text-xl);
    font-weight: 600;
    line-height: var(--leading-normal);
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.rc-text {
    color: var(--text-secondary);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
}

.rc-text-xs {
    font-size: var(--text-xs);
    line-height: var(--leading-normal);
}

.rc-text-sm {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    color: var(--text-muted);
}

.rc-text-lg {
    font-size: var(--text-lg);
    line-height: var(--leading-normal);
}

.rc-text-xl {
    font-size: var(--text-xl);
    line-height: var(--leading-normal);
}

.rc-text-mono {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}

/* Navigation System */
.rc-navbar {
    background: var(--gradient-surface);  /* Use grayscale gradient */
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--surface-3);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--space-md) 0;
    transition: all var(--transition-normal) ease;
}

.rc-navbar-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: var(--space-8); /* Better spacing between brand and nav */
}

.rc-navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-label);  /* Light gray for labels */
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: var(--transition-fast);
}

.rc-navbar-brand:hover {
    color: var(--accent-red);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);  /* White glow instead of blue */
    transform: scale(1.02);
}

.rc-navbar-nav {
    display: flex;
    gap: var(--space-1); /* Tighter spacing between nav items */
    list-style: none;
    align-items: center;
    margin-left: auto; /* Push nav items to the right */
}

.rc-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-weight: 500;
    font-family: var(--font-sans);
    transition: all var(--transition-normal) ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    border: 1px solid transparent;
    background: transparent;
    overflow: hidden;
}

.rc-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(136, 136, 136, 0.05), rgba(136, 136, 136, 0.15));
    transition: width var(--transition-normal) ease;
    border-radius: var(--radius-md);
    z-index: -1;
}

.rc-nav-link:hover::before {
    width: 100%;
}

.rc-nav-link:hover {
    color: var(--text-label);  /* Light gray for labels */
    border-color: rgba(136, 136, 136, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(136, 136, 136, 0.15);
}

.rc-nav-link.active {
    color: white !important;
    background: var(--accent-red) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(208, 2, 27, 0.4) !important;
}

/* Active dropdown styles */
.rc-dropdown-toggle.active {
    color: white !important;
    background: var(--accent-red) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(208, 2, 27, 0.4) !important;
}

.rc-dropdown-menu .rc-dropdown-item.active {
    color: white !important;
    background: var(--accent-red) !important;
    border-radius: var(--radius-md) !important;
}

.rc-dropdown-menu .rc-dropdown-item.active:hover,
.rc-dropdown-menu .rc-dropdown-item.active:focus {
    color: white !important;
    background: var(--primary) !important;
    border: 2px solid var(--gray-400) !important;
    border-radius: var(--radius-md) !important;
}

.rc-dropdown-menu .rc-dropdown-item.active::before,
.rc-dropdown-menu .rc-dropdown-item.active:hover::before,
.rc-dropdown-menu .rc-dropdown-item.active:focus::before {
    display: none !important;
}

.rc-dropdown-menu .rc-dropdown-item.active i,
.rc-dropdown-menu .rc-dropdown-item.active:hover i,
.rc-dropdown-menu .rc-dropdown-item.active:focus i {
    color: white !important;
}

/* Dropdown System */
.rc-dropdown {
    position: relative;
    display: inline-block;
}

.rc-dropdown-toggle {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.rc-dropdown-toggle::after {
    content: '';
    display: inline-block;
    margin-left: var(--space-xs);
    vertical-align: middle;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    transition: transform var(--transition-normal) ease;
}

.rc-dropdown.show .rc-dropdown-toggle::after {
    transform: rotate(180deg);
}

.rc-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background: var(--gradient-card);  /* Gradient background */
    border: 2px solid var(--surface-3);  /* Thicker border */
    border-radius: var(--radius-lg);  /* Larger radius */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 255, 255, 0.08);  /* Enhanced shadow with white glow */
    backdrop-filter: blur(20px);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(0.92);  /* Enhanced entry animation */
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);  /* Enhanced bounce */
    margin-top: var(--space-sm);
    padding: var(--space-sm) 0;
    pointer-events: none;
}

.rc-dropdown.show .rc-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.rc-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-primary);  /* Pure white text */
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;  /* Smoother transition */
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    position: relative;
    border-radius: var(--radius-md);  /* Add border radius */
    margin: 0 var(--space-xs);  /* Add horizontal margin */
    width: calc(100% - var(--space-sm));  /* Adjust width for margin */
}

.rc-dropdown-item::before {
    display: none;
}

/* Note: Removed overly aggressive CSS rules that prevented hover effects on first dropdown items.
   The auto-highlighting issue was actually caused by JavaScript, not CSS.
   Now all dropdown items have proper hover effects while preventing unwanted auto-focus. */

.rc-dropdown-item:hover:not(.active)::before {
    width: 100%;
}

.rc-dropdown-item:hover:not(.active) {
    background: var(--surface-2);
    color: var(--text-primary);  /* Pure white on hover */
    transform: translateX(6px);  /* Enhanced slide effect */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);  /* Add subtle shadow */
}

.rc-dropdown-item:focus:not(.active) {
    outline: none;
    background: var(--surface-2);
    color: var(--text-primary);  /* Pure white on focus */
    transform: translateX(6px);  /* Enhanced slide effect */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);  /* Add subtle shadow */
}

.rc-dropdown-item i {
    transition: all 0.3s ease;  /* Smoother transition */
}

.rc-dropdown-item:hover:not(.active) i {
    color: var(--accent-red);  /* Red accent for icon on hover */
    transform: scale(1.1);  /* Slightly enlarge icon */
}

.rc-dropdown-header {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.rc-dropdown-divider {
    height: 1px;
    background: var(--surface-3);
    margin: var(--space-xs) 0;
    border: none;
}

/* Mobile Navigation */
.rc-navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.rc-navbar-toggle:hover {
    color: var(--text-label);  /* Light gray for labels */
    background: rgba(136, 136, 136, 0.1);
}

.rc-navbar-nav li {
    position: relative;
}

/* Enhanced Responsive Navigation */

/* Mobile Navigation (up to 768px) */
@media (max-width: 768px) {
    .rc-navbar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
    }

    .rc-navbar-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(300px, 80vw);
        height: 100vh;
        background: var(--surface-1);
        border-left: 1px solid var(--surface-3);
        flex-direction: column;
        padding: var(--space-lg) var(--space-md);
        z-index: 1050;
        overflow-y: auto;
        transition: right var(--transition-normal) ease;
        box-shadow: var(--shadow-xl);
    }

    .rc-navbar-nav.show {
        right: 0;
    }

    /* Mobile nav backdrop */
    .rc-navbar-nav.show::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 300px;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: -1;
        backdrop-filter: blur(4px);
    }

    /* Mobile nav header */
    .rc-navbar-nav::before {
        content: '';
        display: block;
        margin-bottom: var(--space-lg);
    }

    .rc-navbar-nav > li {
        width: 100%;
        margin-bottom: var(--space-xs);
    }

    .rc-nav-link {
        width: 100%;
        padding: var(--space-md);
        border-radius: var(--radius-md);
        justify-content: flex-start;
    }

    /* Mobile dropdown behavior */
    .rc-dropdown-menu {
        position: static;
        opacity: 0;
        visibility: hidden;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--surface-2);
        margin: 0 0 0 var(--space-md);
        border-radius: var(--radius-md);
        max-height: 0;
        overflow: hidden;
        transition: all var(--transition-normal) ease;
    }

    .rc-dropdown.show .rc-dropdown-menu {
        opacity: 1;
        visibility: visible;
        margin-top: var(--space-sm);
        max-height: 300px;
    }
}

/* Tablet Navigation (769px to 1023px) */
@media (min-width: 769px) and (max-width: 1023px) {
    .rc-navbar {
        padding: var(--space-sm) 0;
    }

    .rc-navbar-nav {
        gap: var(--space-xs);
    }

    .rc-nav-link {
        padding: var(--space-sm);
        flex-direction: column;
        font-size: var(--text-xs);
        min-width: 60px;
        text-align: center;
    }

    .rc-nav-link i {
        font-size: 1.25rem;
        margin-bottom: var(--space-xs);
    }

    /* Hide text in dropdown toggles on tablet */
    .rc-dropdown-toggle {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .rc-dropdown-toggle::after {
        display: none;
    }
}

/* Desktop Navigation (1024px+) */
@media (min-width: 1024px) {
    .rc-navbar-nav {
        gap: var(--space-sm);
    }

    .rc-nav-link {
        padding: var(--space-sm) var(--space-md);
    }
}

/* WarehouseCore-style glass table */
.rc-table-wc-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.25));
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.rc-table-wc-scroll {
    overflow-x: auto;
}

.rc-table-wc {
    width: 100%;
    border-collapse: collapse;
    color: #d1d5db;
    min-width: 720px;
    font-size: 0.95rem;
}

.rc-table-wc thead {
    background: rgba(255, 255, 255, 0.04);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: var(--text-xs);
    color: #9ca3af;
}

.rc-table-wc th {
    padding: var(--space-2) var(--space-3);
    text-align: left;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.rc-table-wc td {
    padding: var(--space-3) var(--space-3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: top;
    color: #e5e7eb;
}

.rc-table-wc tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.rc-table-wc-meta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: #9ca3af;
}

.rc-table-wc-title {
    font-weight: 700;
    color: #fff;
    font-size: var(--text-sm);
}

.rc-table-wc-sub {
    font-size: 0.8rem;
    color: #9ca3af;
}

.rc-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
    transition: var(--transition-fast);
    cursor: pointer;
    text-decoration: none;
}

.rc-icon-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.rc-icon-btn-danger {
    background: rgba(208, 2, 27, 0.9);
    border-color: rgba(208, 2, 27, 0.9);
    color: #fff;
}

.rc-icon-btn-danger:hover {
    background: rgba(208, 2, 27, 1);
}

/* Card System */
.rc-card {
    background: var(--gradient-card);  /* Beautiful grayscale gradient */
    border: 1px solid var(--surface-3);
    border-radius: var(--radius-lg);
    padding: var(--space-6);  /* 24px consistent padding */
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    min-width: 0; /* Prevent flex overflow */
}

.rc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-4) 50%, var(--surface-3) 100%);  /* Subtle gradient top border */
    opacity: 0.8;
}

.rc-card:hover {
    transform: translateY(-8px);  /* Enhanced lift effect like profile settings */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 255, 255, 0.1);  /* Enhanced shadow with subtle glow */
    border-color: var(--accent-red);
}

.rc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-5); /* 20px */
    padding-bottom: var(--space-4); /* 16px */
    border-bottom: 1px solid var(--surface-3);
}

.rc-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.rc-card-body {
    color: var(--text-secondary);
}

/* Button System */
.rc-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-3) var(--space-6); /* Consistent with design tokens */
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--text-sm);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    font-family: inherit;
    min-height: 44px; /* Touch target compliance */
    justify-content: center;
}

/* Fix for form submission buttons */
.rc-btn[type="submit"] {
    border: 1px solid transparent;
    background: transparent;
}

.rc-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-normal);
}

.rc-btn:hover::before {
    left: 100%;
}

.rc-btn-primary {
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-hover));  /* Gradient for depth */
    color: white;
    box-shadow: 0 4px 20px rgba(208, 2, 27, 0.4);  /* Enhanced shadow */
    border: none;
    position: relative;
    overflow: hidden;
}

/* Fix for primary submit buttons */
.rc-btn-primary[type="submit"] {
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-hover));
    color: white;
    border: none;
}

.rc-btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-red-hover), var(--accent-red));  /* Reverse gradient on hover */
    transform: translateY(-3px);  /* Enhanced lift */
    box-shadow: 0 8px 30px rgba(208, 2, 27, 0.5), 0 0 20px rgba(255, 255, 255, 0.1);  /* Enhanced shadow with glow */
}

.rc-btn-primary:active {
    transform: translateY(-1px);  /* Less lift when pressed */
}

.rc-btn-secondary {
    background: var(--gradient-button);  /* Grayscale gradient for depth */
    color: var(--text-primary);
    border: 2px solid var(--surface-4);  /* Thicker border */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);  /* Initial shadow */
}

.rc-btn-secondary:hover {
    background: linear-gradient(135deg, #2A2A2A 0%, #4A4A4A 100%);  /* Lighter gradient on hover */
    border-color: var(--accent-red);
    transform: translateY(-3px);  /* Enhanced lift */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 255, 255, 0.08);  /* Enhanced shadow with white glow */
}

.rc-btn-ghost {
    background: transparent;
    color: var(--text-primary);  /* Pure white text */
    border: 2px solid var(--surface-3);  /* Thicker border */
    transition: all 0.3s ease;  /* Smoother transition */
}

.rc-btn-ghost:hover {
    background: var(--surface-2);
    color: var(--text-primary);
    border-color: var(--accent-red);
    transform: translateY(-3px);  /* Enhanced lift */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 255, 255, 0.08);  /* Enhanced shadow with white glow */
}

.rc-btn-outline {
    background: transparent;
    color: var(--text-primary);  /* Pure white text */
    border: 2px solid var(--surface-4);  /* Thicker border */
    transition: all 0.3s ease;  /* Smoother transition */
}

.rc-btn-outline:hover {
    background: var(--surface-3);
    color: var(--text-primary);  /* Pure white on hover */
    border-color: var(--accent-red);
    transform: translateY(-3px);  /* Enhanced lift */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 255, 255, 0.08);  /* Enhanced shadow with white glow */
}

.rc-btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.75rem;
    min-width: 2rem;
    height: 2rem;
}

/* Quick Action Button Enhancements */
.rc-btn-sm.rc-btn-outline {
    border-width: 1.5px;
    background: rgba(17, 17, 17, 0.8);  /* Pure gray instead of blue */
    backdrop-filter: blur(5px);
}

.rc-btn-sm.rc-btn-outline:hover {
    background: rgba(136, 136, 136, 0.1);
    border-color: var(--accent-red);
    color: var(--text-label);  /* Light gray for labels */
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 6px 20px rgba(136, 136, 136, 0.25);
}

.rc-btn-sm.rc-btn-ghost {
    border-width: 1.5px;
    background: rgba(17, 17, 17, 0.6);  /* Pure gray instead of blue */
    backdrop-filter: blur(5px);
}

.rc-btn-sm.rc-btn-ghost:hover {
    background: rgba(136, 136, 136, 0.1);
    border-color: var(--accent-red);
    color: var(--text-label);  /* Light gray for labels */
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 6px 20px rgba(136, 136, 136, 0.25);
}

/* Delete Button Styling */
.rc-btn-sm.rc-btn-outline[onclick*="delete"],
.rc-btn-sm.rc-btn-ghost[onclick*="delete"] {
    color: var(--error);
    border-color: var(--error);
}

.rc-btn-sm.rc-btn-outline[onclick*="delete"]:hover,
.rc-btn-sm.rc-btn-ghost[onclick*="delete"]:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.25);
}

/* Icon enhancement for action buttons */
.rc-btn-sm i {
    font-size: 0.875rem;
    transition: all var(--transition-fast) ease;
}

.rc-btn-sm:hover i {
    transform: scale(1.1);
}

.rc-btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
}

/* Responsive Form System */
.rc-form {
    display: grid;
    gap: var(--space-md);
}

.rc-form-group {
    margin-bottom: var(--space-lg);
}

.rc-form-grid {
    display: grid;
    gap: var(--space-5); /* 20px consistent gap */
    grid-template-columns: 1fr;
}

/* Responsive form grid - mobile-first */
@media (min-width: 768px) {
    .rc-form-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .rc-form-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .rc-form-grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Form field spans */
.rc-form-span-2 {
    grid-column: span 1;
}

@media (min-width: 640px) {
    .rc-form-span-2 {
        grid-column: span 2;
    }
}

@media (min-width: 1024px) {
    .rc-form-span-3 {
        grid-column: span 3;
    }

    .rc-form-span-4 {
        grid-column: span 4;
    }
}

.rc-label {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: var(--space-xs);
    font-size: var(--text-sm);
}

.rc-input {
    width: 100%;
    padding: var(--space-4) var(--space-4); /* 16px for touch-friendly targets */
    background: var(--surface-2);
    border: 2px solid var(--surface-3);  /* Thicker border for better definition */
    border-radius: var(--radius-lg);  /* Larger radius like profile settings */
    color: var(--text-primary);
    font-size: var(--text-base);
    transition: all 0.3s ease;  /* Smoother transition */
    font-family: inherit;
    min-height: 44px; /* Ensure 44px touch target */
}

.rc-input:focus {
    outline: none;
    border-color: var(--accent-red);
    background: var(--surface-1);
    box-shadow: 0 0 0 4px rgba(208, 2, 27, 0.15);  /* Red glow on focus like profile settings */
    transform: translateY(-1px);  /* Subtle lift on focus */
}

.rc-input::placeholder {
    color: var(--text-muted);
}

.rc-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.rc-textarea {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--surface-1);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all var(--transition-fast);
    resize: vertical;
    min-height: 120px;
}

.rc-textarea:focus {
    outline: none;
    border-color: var(--accent-red);
    background: var(--surface-1);
    box-shadow: 0 0 0 3px rgba(136, 136, 136, 0.1);
}

.rc-textarea::placeholder {
    color: var(--text-muted);
}

.rc-form-group {
    margin-bottom: var(--space-md);
}

.rc-label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.rc-alert {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 500;
}

.rc-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.rc-alert-success {
    background: rgba(136, 136, 136, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.rc-alert-warning {
    background: rgba(170, 170, 170, 0.1);
    border-color: var(--warning);
    color: var(--warning);
}

.rc-alert-info {
    background: rgba(136, 136, 136, 0.1);
    border-color: var(--info);
    color: var(--info);
}

/* Responsive Table System */
.rc-table-container {
    background: var(--surface-1);
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-3);
    position: relative;
    overflow: hidden;
}

.rc-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.rc-table {
    width: 100%;
    border-collapse: collapse;
    min-width: max-content;
}

.rc-table th {
    background: var(--surface-2);
    color: var(--text-primary);
    font-weight: 600;
    padding: var(--space-4) var(--space-6); /* 16px vertical, 24px horizontal */
    text-align: left;
    border-bottom: 1px solid var(--surface-3);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
    height: 56px; /* Stable header height */
}

.rc-table td {
    padding: var(--space-4) var(--space-6); /* 16px vertical, 24px horizontal */
    border-bottom: 1px solid var(--surface-3);
    color: var(--text-secondary);
    white-space: nowrap;
    vertical-align: middle;
}

.rc-table tr:hover {
    background: var(--surface-2);
}

.rc-table tr:last-child td {
    border-bottom: none;
}

/* Responsive table behavior */
@media (max-width: 768px) {
    /* Option 1: Horizontal scroll with sticky first column */
    .rc-table-scroll {
        overflow-x: auto;
        border-radius: var(--radius-lg);
    }

    .rc-table-scroll .rc-table th:first-child,
    .rc-table-scroll .rc-table td:first-child {
        position: sticky;
        left: 0;
        background: var(--surface-2);
        z-index: 2;
        box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
    }

    .rc-table-scroll .rc-table th:first-child {
        z-index: 3;
    }

    /* Option 2: Card layout for mobile */
    .rc-table-cards {
        display: none;
    }

    .rc-table-cards .rc-table-card {
        background: var(--surface-2);
        border-radius: var(--radius-md);
        padding: var(--space-md);
        margin-bottom: var(--space-md);
        border: 1px solid var(--surface-3);
    }

    .rc-table-cards .rc-table-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: var(--space-sm);
        padding-bottom: var(--space-sm);
        border-bottom: 1px solid var(--surface-3);
    }

    .rc-table-cards .rc-table-card-title {
        font-weight: 600;
        color: var(--text-primary);
    }

    .rc-table-cards .rc-table-card-content {
        display: grid;
        gap: var(--space-sm);
    }

    .rc-table-cards .rc-table-card-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: var(--space-xs) 0;
    }

    .rc-table-cards .rc-table-card-label {
        font-size: var(--text-sm);
        color: var(--text-muted);
        font-weight: 500;
    }

    .rc-table-cards .rc-table-card-value {
        color: var(--text-primary);
        font-weight: 500;
        text-align: right;
    }

    /* Hide table, show cards on mobile when using card mode */
    .rc-table-container.rc-mobile-cards .rc-table-responsive {
        display: none;
    }

    .rc-table-container.rc-mobile-cards .rc-table-cards {
        display: block;
    }
}

/* Compact table for tablets */
@media (min-width: 769px) and (max-width: 1023px) {
    .rc-table th,
    .rc-table td {
        padding: var(--space-3) var(--space-4); /* 12px vertical, 16px horizontal */
        font-size: var(--text-sm);
    }

    .rc-table th {
        height: 48px; /* Slightly smaller on tablet */
    }
}

/* Enhanced mobile table strategy */
@media (max-width: 768px) {
    .rc-table th,
    .rc-table td {
        padding: var(--space-2) var(--space-3); /* 8px vertical, 12px horizontal */
        font-size: var(--text-sm);
    }

    .rc-table th {
        height: 44px; /* Touch-friendly on mobile */
    }
}

/* Badge System */
.rc-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rc-badge-primary {
    background: rgba(136, 136, 136, 0.2);
    color: var(--text-label);  /* Light gray for labels */
    border: 1px solid rgba(136, 136, 136, 0.3);
}

.rc-badge-success {
    background: rgba(136, 136, 136, 0.2);
    color: var(--success);
    border: 1px solid rgba(136, 136, 136, 0.3);
}

.rc-badge-warning {
    background: rgba(170, 170, 170, 0.2);
    color: var(--warning);
    border: 1px solid rgba(170, 170, 170, 0.3);
}

.rc-badge-error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Alert System */
.rc-alert {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.rc-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.rc-alert-success {
    background: rgba(136, 136, 136, 0.1);
    border: 1px solid rgba(136, 136, 136, 0.2);
    color: var(--success);
}

.rc-alert-info {
    background: rgba(136, 136, 136, 0.1);
    border: 1px solid rgba(136, 136, 136, 0.2);
    color: var(--text-label);  /* Light gray for labels */
}

/* Layout Utilities */
.rc-mt-sm { margin-top: var(--space-sm); }
.rc-mt-md { margin-top: var(--space-md); }
.rc-mt-lg { margin-top: var(--space-lg); }
.rc-mt-xl { margin-top: var(--space-xl); }

.rc-mb-sm { margin-bottom: var(--space-sm); }
.rc-mb-md { margin-bottom: var(--space-md); }
.rc-mb-lg { margin-bottom: var(--space-lg); }
.rc-mb-xl { margin-bottom: var(--space-xl); }

.rc-p-sm { padding: var(--space-sm); }
.rc-p-md { padding: var(--space-md); }
.rc-p-lg { padding: var(--space-lg); }
.rc-p-xl { padding: var(--space-xl); }

.rc-text-center { text-align: center; }
.rc-text-right { text-align: right; }

.rc-hidden { display: none; }
.rc-visible { display: block; }

/* Responsive Visibility Utilities */
.rc-hide-xs { display: none; }
.rc-hide-sm,
.rc-hide-md,
.rc-hide-lg,
.rc-hide-xl { display: block; }

@media (min-width: 480px) {
    .rc-hide-xs { display: block; }
    .rc-hide-sm { display: none; }
}

@media (min-width: 640px) {
    .rc-hide-sm { display: block; }
    .rc-hide-md { display: none; }
}

@media (min-width: 768px) {
    .rc-hide-md { display: block; }
    .rc-hide-lg { display: none; }
}

@media (min-width: 1024px) {
    .rc-hide-lg { display: block; }
    .rc-hide-xl { display: none; }
}

@media (min-width: 1280px) {
    .rc-hide-xl { display: block; }
}

/* Show only on specific breakpoints */
.rc-show-xs,
.rc-show-sm,
.rc-show-md,
.rc-show-lg,
.rc-show-xl { display: none; }

.rc-show-xs { display: block; }

@media (min-width: 480px) {
    .rc-show-xs { display: none; }
    .rc-show-sm { display: block; }
}

@media (min-width: 640px) {
    .rc-show-sm { display: none; }
    .rc-show-md { display: block; }
}

@media (min-width: 768px) {
    .rc-show-md { display: none; }
    .rc-show-lg { display: block; }
}

@media (min-width: 1024px) {
    .rc-show-lg { display: none; }
    .rc-show-xl { display: block; }
}

/* Responsive Image Utilities */
.rc-img-responsive {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

.rc-img-contain {
    object-fit: contain;
}

.rc-img-cover {
    object-fit: cover;
}

.rc-aspect-square {
    aspect-ratio: 1;
}

.rc-aspect-video {
    aspect-ratio: 16 / 9;
}

.rc-aspect-photo {
    aspect-ratio: 4 / 3;
}

/* Animations - Reduced and Subtle */
/* Removed aggressive slide-in and glow animations */
/* Fade-in kept only for modals/toasts, reduced from 0.6s to 0.2s */

@keyframes rc-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.rc-animate-fade-in {
    animation: rc-fade-in 0.2s ease-out;
}

/* Removed .rc-animate-slide-in - too aggressive */
/* Removed .rc-animate-glow - unnecessary distraction */

/* Toast notifications */
.rc-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: #fff;
    font-weight: 500;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-lg);
    animation: rc-fade-in 0.2s ease-out;
}

.rc-toast-success {
    background: var(--success, #10b981);
}

.rc-toast-error {
    background: var(--error, #ef4444);
}

.rc-toast-info {
    background: var(--info, #2563eb);
}

/* Accordion Styles */
.accordion-category, .accordion-subcategory {
    background: var(--surface-2);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    overflow: hidden;
}

.accordion-header {
    background: var(--surface-3);
    padding: var(--space-md);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color var(--transition-fast);
}

.accordion-header:hover {
    background: var(--surface-4);
}

.accordion-header.active {
    background: var(--primary-600);
}

.accordion-header h3, .accordion-header h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
}

.accordion-content {
    padding: var(--space-md);
    display: none;
    background: var(--surface-1);
}

.accordion-icon {
    font-size: 1.2rem;
    color: var(--text-label);  /* Light gray for labels */
    transition: transform var(--transition-normal);
}

.accordion-header.active .accordion-icon {
    transform: rotate(45deg);
}

/* Theme Toggle Button */
[data-theme-toggle] {
    transition: all var(--transition-normal) ease;
    position: relative;
    overflow: hidden;
}

[data-theme-toggle]:hover {
    transform: rotate(15deg) scale(1.1);
    box-shadow: 0 0 15px rgba(136, 136, 136, 0.3);
}

[data-theme-toggle] i {
    transition: all var(--transition-normal) ease;
}

[data-theme-toggle]:hover i {
    color: var(--text-label);  /* Light gray for labels */
    filter: drop-shadow(0 0 8px currentColor);
}

/* Enhanced Responsive Layout Adjustments */
@media (max-width: 480px) {
    .rc-card {
        padding: var(--space-4); /* 16px on mobile */
    }

    .rc-flex {
        flex-direction: column;
    }

    .rc-flex-between {
        align-items: stretch;
        gap: var(--space-sm);
    }

    /* Stack action buttons vertically on tiny screens */
    .rc-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .rc-inline .rc-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .rc-card {
        padding: var(--space-5); /* 20px on tablet */
    }

    /* Allow some horizontal layout on larger phones */
    .rc-flex-between {
        flex-direction: column;
        gap: var(--space-sm);
    }

    @media (orientation: landscape) {
        .rc-flex-between {
            flex-direction: row;
        }
    }
}

/* Content flow improvements */
@media (max-width: 768px) {
    /* Page headers should be more compact */
    .rc-page-header {
        text-align: center;
        margin-bottom: var(--space-lg);
    }

    .rc-page-header .rc-heading-1,
    .rc-page-header .rc-heading-2 {
        margin-bottom: var(--space-sm);
    }

    /* Button groups should stack */
    .rc-cluster {
        flex-direction: column;
        align-items: stretch;
    }

    .rc-cluster .rc-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Dark Mode Specific Adjustments */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }
}

/* Enhanced Focus Styles for Accessibility */
.rc-btn:focus-visible,
.rc-input:focus-visible,
.rc-nav-link:focus-visible,
.rc-dropdown-toggle:focus-visible,
.rc-dropdown-item:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--gray-400);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Remove default focus styles to prevent double outlines */
.rc-btn:focus,
.rc-input:focus,
.rc-nav-link:focus,
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Enhanced touch targets */
@media (pointer: coarse) {
    .rc-btn,
    .rc-nav-link,
    .rc-dropdown-toggle,
    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Bootstrap Button Enhancements for Action Buttons */
.btn-group .btn,
.btn-group-sm .btn {
    border-width: 1.5px;
    background: rgba(17, 17, 17, 0.8);  /* Pure gray instead of blue */
    backdrop-filter: blur(5px);
    transition: all var(--transition-fast) ease;
    min-width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-group .btn:hover,
.btn-group-sm .btn:hover {
    background: rgba(136, 136, 136, 0.1);
    border-color: var(--accent-red);
    color: var(--gray-400) !important;
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 6px 20px rgba(136, 136, 136, 0.25);
}

.btn-outline-danger:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: var(--error) !important;
    color: var(--error) !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.25) !important;
}

.btn-outline-warning:hover {
    background: rgba(170, 170, 170, 0.1) !important;
    border-color: var(--warning) !important;
    color: var(--warning) !important;
    box-shadow: 0 6px 20px rgba(170, 170, 170, 0.25) !important;
}

.btn-outline-success:hover {
    background: rgba(136, 136, 136, 0.1) !important;
    border-color: var(--success) !important;
    color: var(--success) !important;
    box-shadow: 0 6px 20px rgba(136, 136, 136, 0.25) !important;
}

.btn-outline-info:hover {
    background: rgba(136, 136, 136, 0.1) !important;
    border-color: var(--info) !important;
    color: var(--info) !important;
    box-shadow: 0 6px 20px rgba(136, 136, 136, 0.25) !important;
}

.btn-outline-primary:hover {
    background: rgba(136, 136, 136, 0.1) !important;
    border-color: var(--gray-400) !important;
    color: var(--gray-400) !important;
    box-shadow: 0 6px 20px rgba(136, 136, 136, 0.25) !important;
}

.btn-outline-secondary:hover {
    background: var(--surface-3) !important;
    border-color: var(--gray-400) !important;
    color: var(--gray-400) !important;
    box-shadow: 0 6px 20px rgba(136, 136, 136, 0.25) !important;
}

/* Enhanced button icons */
.btn i {
    font-size: 0.875rem;
    transition: all var(--transition-fast) ease;
}

.btn:hover i {
    transform: scale(1.1);
}

/* Dropdown action buttons */
.dropdown-toggle {
    background: rgba(15, 23, 42, 0.8) !important;
    border-color: var(--surface-4) !important;
    backdrop-filter: blur(5px);
}

.dropdown-toggle:hover {
    background: rgba(136, 136, 136, 0.1) !important;
    border-color: var(--gray-400) !important;
    color: var(--gray-400) !important;
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 6px 20px rgba(136, 136, 136, 0.25);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --surface-1: #000000;
        --surface-2: #1a1a1a;
        --text-primary: #ffffff;
        --gray-400: #9ca3af;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.modal-content {
    background: var(--surface-1);
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    border: 1px solid rgba(136, 136, 136, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(136, 136, 136, 0.1);
}

.modal-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.loading-spinner i {
    margin-right: 8px;
    font-size: 1.2rem;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Device Info Section */
.device-info-section {
    margin-bottom: 28px;
}

.device-info-section h3 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 2px solid var(--gray-400);
    padding-bottom: 8px;
}

/* Clean Info Display - Compact Design */
.info-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.info-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(136, 136, 136, 0.3);
}

.info-item label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    min-width: 120px;
}

.info-item span {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    text-align: right;
}

.info-item span.rc-text-accent {
    color: var(--text-label);  /* Light gray for labels */
    font-weight: 700;
}

/* Device Stats Section */
.device-stats-section h3 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 2px solid var(--gray-400);
    padding-bottom: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.stat-card {
    background: rgba(136, 136, 136, 0.1);
    border: 1px solid rgba(136, 136, 136, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(136, 136, 136, 0.15);
    border-color: var(--accent-red);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gray-600), var(--gray-500));
}

.stat-icon {
    font-size: 2rem;
    color: var(--text-label);  /* Light gray for labels */
    margin-bottom: 12px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}

/* Job Details Specific Styles */
.rc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rc-breadcrumb-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.rc-breadcrumb-item:hover {
    color: var(--text-primary);
}

.rc-breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

.rc-breadcrumb-separator {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Equipment Groups */
.equipment-groups {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.equipment-group {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.equipment-header {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.equipment-header:hover {
    background: rgba(255, 255, 255, 0.05);  /* White tint instead of cyan */
}

.equipment-info h4 {
    margin: 0;
    font-weight: 600;
}

.equipment-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-icon {
    transition: transform 0.2s ease;
    font-size: 1.2rem;
}

.equipment-devices {
    padding: 0 16px 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.equipment-device {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.equipment-device:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(136, 136, 136, 0.2);
}

.device-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

@media (max-width: 640px) {
    .equipment-group {
        border-radius: 10px;
    }

    .equipment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .equipment-actions {
        width: 100%;
        justify-content: space-between;
    }

    .equipment-device {
        margin-top: 8px;
    }

    .equipment-device.rc-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .device-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Grid Layout for Job Details */
.rc-grid-span-2 {
    grid-column: span 2;
}

/* Badge Variants */
.rc-badge-info {
    background: var(--gradient-subtle);  /* Use grayscale gradient instead of blue */
    color: var(--text-primary);  /* White text instead of gray */
    border: 1px solid rgba(136, 136, 136, 0.3);
}

.rc-badge-warning {
    background: rgba(170, 170, 170, 0.2);
    color: var(--warning);
    border: 1px solid rgba(170, 170, 170, 0.3);
}

.rc-badge-success {
    background: rgba(136, 136, 136, 0.2);
    color: var(--success);
    border: 1px solid rgba(136, 136, 136, 0.3);
}

/* Text Color Utilities */
.rc-text-accent {
    color: var(--text-label);  /* Light gray for labels */
}

.rc-text-lg {
    font-size: 1.125rem;
}

/* Form Elements - RentalCore Style */
.rc-form-group {
    margin-bottom: var(--space-md);
}

.rc-form-label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.rc-form-input,
.rc-form-select,
.rc-form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-normal);
    font-family: inherit;
}

.rc-form-input:focus,
.rc-form-select:focus,
.rc-form-textarea:focus {
    outline: none;
    border-color: var(--accent-red);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 2px rgba(136, 136, 136, 0.2);
}

.rc-form-input::placeholder,
.rc-form-textarea::placeholder {
    color: var(--text-muted);
}

/* Select Dropdown Styling */
.rc-form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2300f5ff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.rc-form-select:hover {
    border-color: rgba(136, 136, 136, 0.3);
    background-color: rgba(255, 255, 255, 0.07);
}

/* Form validation states */
.rc-form-input.error,
.rc-form-select.error,
.rc-form-textarea.error {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.rc-form-input.success,
.rc-form-select.success,
.rc-form-textarea.success {
    border-color: var(--success);
    background: rgba(136, 136, 136, 0.1);
}

/* Generic form selectors for existing forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="tel"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-normal);
    font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-red);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 2px rgba(136, 136, 136, 0.2);
}

select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2300f5ff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

select:hover {
    border-color: rgba(136, 136, 136, 0.3);
    background-color: rgba(255, 255, 255, 0.07);
}

/* Form Labels */
label,
.rc-label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* RentalCore specific form classes */
.rc-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-normal);
    font-family: inherit;
}

.rc-input:focus {
    outline: none;
    border-color: var(--accent-red);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 2px rgba(136, 136, 136, 0.2);
}

.rc-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-normal);
    font-family: inherit;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2300f5ff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.rc-select:focus {
    outline: none;
    border-color: var(--accent-red);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 2px rgba(136, 136, 136, 0.2);
}

.rc-select:hover {
    border-color: rgba(136, 136, 136, 0.3);
    background-color: rgba(255, 255, 255, 0.07);
}

.rc-textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-normal);
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
}

.rc-textarea:focus {
    outline: none;
    border-color: var(--accent-red);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 2px rgba(136, 136, 136, 0.2);
}

.rc-form-group {
    margin-bottom: var(--space-md);
}

/* Responsive Grid for Job Details */
@media (max-width: 1024px) {
    .rc-grid-cols-lg-3 {
        grid-template-columns: 1fr;
    }
    
    .rc-grid-span-2 {
        grid-column: span 1;
    }
}

/* ===== BRAND NEW MODAL SYSTEM ===== */
/* Simple, reliable, guaranteed centered modals */

/* Modal Container - Full screen overlay with perfect centering */
.rc-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;

    /* Perfect centering with flexbox */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Padding for breathing room */
    padding: 20px;

    /* Prevent body scroll when modal is open */
    overflow-y: auto;
}

/* Dark overlay background */
.rc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1;
}

/* Modal content box - sits on top of overlay */
.rc-modal-content {
    position: relative;
    z-index: 2;

    /* Styling */
    background: var(--surface-1, #1a1a1a);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    border: 1px solid var(--surface-3, #333);

    /* Size constraints - NO FIXED WIDTH! */
    max-width: 800px;
    width: 100%;
    max-height: calc(100vh - 40px);

    /* Flexbox layout for header/body/footer */
    display: flex;
    flex-direction: column;

    /* Animation */
    animation: modalFadeIn 0.2s ease-out;
}

/* Simple fade-in animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Modal header */
.rc-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--surface-3, #333);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

/* Modal title */
.rc-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Close button */
.rc-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary, #999);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.rc-modal-close:hover {
    background: var(--surface-2, #2a2a2a);
    color: var(--text-primary, #fff);
}

/* Modal body - scrollable content area */
.rc-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0; /* Important for flex scrolling */
}

/* Prevent body scroll when modal is open */
body.rc-modal-open {
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .rc-modal {
        padding: 0;
    }

    .rc-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        width: 100%;
        height: 100%;
    }
}

/* Large modal variant */
.rc-modal-content.rc-modal-large {
    max-width: 1200px;
}

/* Extra large modal variant */
.rc-modal-content.rc-modal-xl {
    max-width: 1400px;
}

/* Medium modal variant */
.rc-modal-content.rc-modal-medium {
    max-width: 600px;
}

/* Small modal variant */
.rc-modal-content.rc-modal-small {
    max-width: 400px;
}
/* Empty State Styles */
.rc-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    color: var(--text-secondary);
}

.rc-empty-state-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    opacity: 0.7;
}

.rc-empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.rc-empty-state-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 400px;
    line-height: 1.6;
}

.rc-empty-state-action {
    margin-top: var(--space-md);
}

/* Footer Styles */
.rc-footer {
    background: var(--surface-1);
    border-top: 1px solid var(--surface-3);
    margin-top: var(--space-3xl);
    padding: var(--space-2xl) 0;
}

.rc-footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    align-items: start;
}

.rc-footer-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.rc-footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-label);  /* Light gray for labels */
    margin-bottom: var(--space-sm);
}

.rc-footer-brand i {
    font-size: 1.5rem;
}

.rc-footer-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

.rc-footer-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.rc-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.rc-footer-links li {
    margin: 0;
}

.rc-footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition-fast) ease;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.rc-footer-links a:hover {
    color: var(--text-label);  /* Light gray for labels */
}

.rc-footer-links a i {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Footer Responsive */
@media (max-width: 768px) {
    .rc-footer {
        padding: var(--space-xl) 0;
    }
    
    .rc-footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
        text-align: center;
    }
    
    .rc-footer-brand {
        justify-content: center;
    }
}

/* Active Navigation Link */
.rc-nav-link-active {
    color: white !important;
    background: var(--accent-red) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(208, 2, 27, 0.4) !important;
}

.rc-nav-link-active::before {
    display: none !important;
}

.rc-nav-link-active i {
    color: white !important;
}

/* User Navigation */
.rc-nav-user {
    margin-left: auto;
}

.rc-nav-user .rc-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--surface-3);
    background: var(--surface-1);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast) ease;
    cursor: pointer;
}

.rc-nav-user .rc-dropdown-toggle:hover {
    background: var(--surface-2);
    border-color: var(--accent-red);
    color: var(--text-label);  /* Light gray for labels */
}

.rc-nav-user .rc-dropdown-toggle i:first-child {
    font-size: 1.25rem;
}

.rc-nav-user .rc-dropdown-toggle i:last-child {
    font-size: 0.75rem;
    transition: transform var(--transition-fast) ease;
}

.rc-nav-user .rc-dropdown.show .rc-dropdown-toggle i:last-child {
    transform: rotate(180deg);
}

/* Form Value Display */
.rc-form-value {
    background: var(--surface-2);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    color: var(--text-primary);
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    white-space: pre-wrap;
    font-family: var(--font-mono);
}

/* Device Item Display */
.rc-device-item {
    background: var(--surface-1);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
    margin-bottom: var(--space-xs);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.rc-device-item:last-child {
    margin-bottom: 0;
}

.rc-device-item strong {
    color: var(--text-primary);
    font-size: 0.875rem;
}

.rc-device-item span {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-right: var(--space-sm);
}

.rc-device-notes {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-style: italic;
    margin-top: var(--space-xs);
}

/* Loading Spinner */
.rc-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.rc-loading-spinner i {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert Styles */
.rc-alert {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    margin-bottom: var(--space-md);
}

.rc-alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.rc-alert-success {
    background: rgba(136, 136, 136, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.rc-alert-info {
    background: rgba(136, 136, 136, 0.1);
    border-color: var(--info);
    color: var(--info);
}

.rc-alert-warning {
    background: rgba(170, 170, 170, 0.1);
    border-color: var(--warning);
    color: var(--warning);
}
/* ========================================
   Accessibility: Reduced Motion Support
   ======================================== */

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Explicitly disable all custom animations */
    .rc-animate-fade-in,
    .rc-modal-content,
    .rc-spinner {
        animation: none !important;
    }
}

/* ============================================================================
   SIDEBAR NAVIGATION (WarehouseCore-Style)
   ============================================================================ */

/* Utility Classes */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }
}

/* Header */
.rc-header {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 50;
    background: var(--gradient-surface);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--surface-3);
    transition: all 0.3s ease;
}

/* Header adjusts based on sidebar state */
body:has(.rc-sidebar.open:not(.collapsed)) .rc-header {
    left: 16rem; /* 256px = w-64 */
}

body:has(.rc-sidebar.collapsed) .rc-header {
    left: 5rem; /* 80px = w-20 */
}

@media (max-width: 768px) {
    .rc-header {
        left: 0 !important;
    }
}

.rc-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
}

@media (max-width: 640px) {
    .rc-header-content {
        padding: 0.75rem;
    }
}

.rc-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rc-header-brand {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
}

@media (min-width: 640px) {
    .rc-header-brand {
        font-size: 1.5rem;
    }
}

.brand-rental {
    color: var(--accent-red);
}

.brand-core {
    color: white;
}

.rc-header-company {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.rc-sidebar-toggle {
    padding: 0.5rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rc-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.rc-sidebar-toggle i {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1.25rem;
}

@media (min-width: 640px) {
    .rc-sidebar-toggle i {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 1.5rem;
    }
}

/* Mobile Backdrop */
.rc-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    .rc-sidebar-backdrop.show {
        display: block;
        opacity: 1;
    }
}

/* Sidebar */
.rc-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 50;
    background: var(--gradient-surface);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--surface-3);
    transition: all 0.3s ease-in-out;
    width: 16rem; /* 256px = w-64 */
    transform: translateX(0);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Desktop collapsed state */
@media (min-width: 768px) {
    .rc-sidebar.collapsed {
        width: 5rem; /* 80px = w-20 */
    }

    .rc-sidebar.open {
        width: 16rem; /* 256px = w-64 */
    }
}

/* Mobile hidden state */
@media (max-width: 768px) {
    .rc-sidebar {
        transform: translateX(-100%);
        width: 16rem;
    }

    .rc-sidebar.open {
        transform: translateX(0);
    }
}

/* Sidebar Header (Mobile only) */
.rc-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--surface-3);
}

.rc-sidebar-brand {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
}

.rc-sidebar-close {
    padding: 0.5rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
}

.rc-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.rc-sidebar-close i {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1.25rem;
}

/* Sidebar Navigation */
.rc-sidebar-nav {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar for sidebar */
.rc-sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.rc-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.rc-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.rc-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .rc-sidebar-nav {
        padding-top: 4rem; /* Space for mobile header */
    }
}

@media (min-width: 768px) {
    .rc-sidebar-nav {
        padding-top: 5.5rem; /* Space for fixed header */
    }
}

/* Navigation Items */
.rc-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    position: relative;
    font-size: 1rem;
}

.rc-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.rc-nav-item.active {
    background: var(--accent-red);
    color: white;
    box-shadow: 0 4px 12px rgba(208, 2, 27, 0.4);
}

.rc-nav-item i {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rc-nav-label {
    font-weight: 500;
    white-space: nowrap;
    font-size: 1rem;
}

/* Cross-link special styling */
.rc-nav-crosslink {
    background: rgba(208, 2, 27, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(208, 2, 27, 0.2);
    box-shadow: 0 4px 12px rgba(208, 2, 27, 0.1);
}

.rc-nav-crosslink:hover {
    background: var(--accent-red);
    color: white;
}

/* Collapsed sidebar: center icons, hide labels */
@media (min-width: 768px) {
    .rc-sidebar.collapsed .rc-nav-item {
        justify-content: center;
        padding: 0.75rem;
    }

    .rc-sidebar.collapsed .rc-nav-label {
        display: none;
    }
}

/* Sidebar Footer */
.rc-sidebar-footer {
    flex-shrink: 0;
    padding: 1rem;
    border-top: 1px solid var(--surface-3);
    background: rgba(3, 7, 18, 0.9);
    backdrop-filter: blur(10px);
}

/* User Dropdown Container */
.rc-user-dropdown {
    position: relative;
}

/* User Profile Button (Dropdown Trigger) */
.rc-user-profile-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.rc-user-profile-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.rc-user-profile-btn i.bi-person-circle {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1.25rem;
    color: var(--accent-red);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rc-user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-label);
    flex: 1;
    text-align: left;
}

.rc-user-dropdown-icon {
    width: 1rem;
    height: 1rem;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* User Dropdown Menu */
.rc-user-dropdown-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    margin-bottom: 0.5rem;
    background: var(--surface-2);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
    z-index: 100;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.rc-user-dropdown-menu.open {
    display: flex;
    max-height: 400px;
    opacity: 1;
}

/* User Dropdown Items */
.rc-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.rc-user-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.rc-user-dropdown-item.active {
    background: rgba(208, 2, 27, 0.2);
    color: var(--accent-red);
}

.rc-user-dropdown-item i {
    width: 1rem;
    height: 1rem;
    font-size: 1rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Logout Item - Red accent */
.rc-user-dropdown-item.rc-logout-item:hover {
    background: rgba(239, 68, 68, 0.1);
    color: rgb(239, 68, 68);
}

/* Divider */
.rc-user-dropdown-divider {
    height: 1px;
    background: var(--surface-3);
    margin: 0.25rem 0;
}

/* Icon-only view (collapsed sidebar) */
.rc-user-icon-only {
    display: none;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rc-user-icon-only:hover {
    background: rgba(255, 255, 255, 0.1);
}

.rc-user-icon-only i {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1.25rem;
    color: var(--accent-red);
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .rc-sidebar.collapsed .rc-user-dropdown {
        display: none;
    }

    .rc-sidebar.collapsed .rc-user-icon-only {
        display: flex;
    }
}

/* Logout Button */
.rc-logout-btn,
.rc-login-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    width: 100%;
}

.rc-logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: rgb(239, 68, 68);
}

.rc-login-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.rc-logout-btn i,
.rc-login-btn i {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1.25rem;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .rc-sidebar.collapsed .rc-logout-btn,
    .rc-sidebar.collapsed .rc-login-btn {
        justify-content: center;
        padding: 0.75rem;
    }

    .rc-sidebar.collapsed .rc-logout-btn .rc-nav-label,
    .rc-sidebar.collapsed .rc-login-btn .rc-nav-label {
        display: none;
    }
}

/* Main Content Area - applies to all main tags and rc-main-content */
body {
    padding-top: 3.5rem; /* Space for fixed header */
    transition: margin-left 0.3s ease, padding-left 0.3s ease;
}

@media (min-width: 640px) {
    body {
        padding-top: 4rem;
    }
}

/* Body margin adjusts based on sidebar state (Desktop only) */
@media (min-width: 768px) {
    body.sidebar-open {
        padding-left: 16rem; /* 256px = w-64 sidebar width */
    }

    body.sidebar-collapsed {
        padding-left: 5rem; /* 80px = w-20 collapsed width */
    }
}

/* Mobile: no sidebar offset */
@media (max-width: 767px) {
    body {
        padding-left: 0;
    }
}

/* Main content wrapper (if used) */
.rc-main-content {
    min-height: calc(100vh - 3.5rem);
}

@media (min-width: 640px) {
    .rc-main-content {
        min-height: calc(100vh - 4rem);
    }
}

.rc-content-inner {
    padding: 0.75rem;
}

@media (min-width: 640px) {
    .rc-content-inner {
        padding: 1.5rem;
    }
}

/* Hide old navbar styles (if any remaining) */
.rc-navbar,
.rc-navbar-content,
.rc-navbar-brand:not(.rc-header-brand):not(.rc-sidebar-brand),
.rc-navbar-toggle:not(.rc-sidebar-toggle),
.rc-navbar-nav,
.rc-dropdown,
.rc-dropdown-menu,
.rc-dropdown-toggle,
.rc-dropdown-item {
    display: none !important;
}

/* Ensure all new sidebar navigation elements are visible */
.rc-sidebar,
.rc-header,
.rc-main-content {
    display: flex !important;
}

.rc-sidebar-nav,
.rc-sidebar-header,
.rc-sidebar-footer,
.rc-user-profile,
.rc-user-menu {
    display: flex !important;
    flex-direction: column !important;
}

.rc-nav-item,
.rc-user-menu-item,
.rc-logout-btn,
.rc-login-btn {
    display: flex !important;
    flex-direction: row !important;
}

.rc-header-content,
.rc-header-left,
.rc-user-info {
    display: flex !important;
    flex-direction: row !important;
}

.rc-sidebar-toggle,
.rc-sidebar-close {
    display: flex !important;
}

/* Ensure proper layout */
.rc-sidebar {
    flex-direction: column !important;
}

.rc-header {
    flex-direction: row !important;
}

/* Mobile-specific overrides */
@media (max-width: 768px) {
    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }

    .desktop-only {
        display: block !important;
    }

    .rc-sidebar-toggle.desktop-only {
        display: flex !important;
    }
}

/* ============================================================================
   SIDEBAR DROPDOWN NAVIGATION
   ============================================================================ */

/* Dropdown Container */
.rc-nav-dropdown {
    display: flex !important;
    flex-direction: column !important;
}

/* Dropdown Toggle Button */
.rc-nav-dropdown-toggle {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: none;
    background: none;
    color: var(--text-secondary);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    font-size: 1rem;
    font-family: inherit;
}

.rc-nav-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.rc-nav-dropdown-toggle.active {
    background: var(--accent-red);
    color: white;
}

.rc-nav-dropdown-toggle i.bi:first-child {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rc-dropdown-icon {
    width: 1rem !important;
    height: 1rem !important;
    font-size: 1rem !important;
    transition: transform 0.2s ease;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dropdown Menu */
.rc-nav-dropdown-menu {
    display: none !important;
    flex-direction: column !important;
    gap: 0.25rem;
    padding: 0.5rem 0 0.5rem 0;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

.rc-nav-dropdown-menu.open {
    display: flex !important;
    max-height: 500px;
    opacity: 1;
}

/* Dropdown Items */
.rc-nav-dropdown-item {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem 0.625rem 2.5rem; /* Indented */
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.rc-nav-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.rc-nav-dropdown-item.active {
    background: rgba(208, 2, 27, 0.2);
    color: var(--accent-red);
}

.rc-nav-dropdown-item i {
    width: 1rem;
    height: 1rem;
    font-size: 1rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Collapsed Sidebar: Hide Dropdowns completely */
@media (min-width: 768px) {
    .rc-sidebar.collapsed .rc-nav-dropdown {
        display: none !important;
    }
}

/* Ensure dropdown menus are visible */
.rc-nav-dropdown-menu,
.rc-nav-dropdown-menu.open {
    display: flex !important;
    flex-direction: column !important;
}

.rc-nav-dropdown-menu:not(.open) {
    max-height: 0 !important;
    opacity: 0 !important;
    padding: 0 !important;
}

/* Hide in footer when sidebar collapsed */
@media (min-width: 768px) {
    .rc-sidebar.collapsed .rc-sidebar-footer .rc-nav-dropdown {
        display: none !important;
    }
}
