:root {
    /* Enhanced Contrast Palette */
    --primary: #6200ee;
    --primary-variant: #3700b3;
    --secondary: #03dac6;
    --background: #f0f2f5;
    --surface: #ffffff;
    --surface-variant: #f8f9fa;
    --on-background: #1a1a1a;
    --on-surface: #1a1a1a;
    --text-muted: #65676b;
    --border-color: rgba(0, 0, 0, 0.12);
    
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --header-height: 64px;
    --border-radius: 12px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
}

[data-theme="dark"] {
    --background: #0a0a0a;
    --surface: #161616;
    --surface-variant: #242424;
    --primary: #bb86fc;
    --on-background: #ffffff;
    --on-surface: #ffffff;
    --text-muted: #a0a0a0;
    --border-color: rgba(255, 255, 255, 0.15);
}

/* ... existing skip-link and focus styles ... */

.nav-link {
    color: var(--on-background) !important;
    padding: 12px 20px;
    margin: 4px 12px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link i { 
    width: 24px; 
    margin-right: 12px; 
    font-size: 1.1rem; 
    opacity: 0.6; 
}

.nav-link:hover { 
    background: rgba(98, 0, 238, 0.08); 
    color: var(--primary) !important; 
}

.nav-link.active { 
    background: var(--on-background) !important; /* Deep black/white background */
    color: var(--surface) !important; /* Contrasting text */
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.nav-link.active i { 
    opacity: 1; 
    color: inherit !important; 
}

/* =====================================================
   ACCESSIBILITY STYLES
   ===================================================== */

/* Skip to content link - visible only on focus */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 0 0 8px 8px;
    z-index: 9999;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    outline: none;
}

/* Enhanced focus styles for keyboard navigation */
*:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast focus for form elements */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: var(--focus-ring);
}

/* Reduce motion for users who prefer it */
@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;
    }
    
    .skip-link {
        transition: none;
    }
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
    :root {
        --border-color: rgba(0, 0, 0, 0.3);
    }
    
    [data-theme="dark"] {
        --border-color: rgba(255, 255, 255, 0.3);
    }
    
    .card {
        border: 2px solid var(--on-background) !important;
    }
    
    .btn {
        border: 2px solid currentColor !important;
    }
}

/* Screen reader only text */
.sr-only,
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus trap indicator for modals */
.modal.show [aria-modal="true"] {
    outline: none;
}

/* Keyboard navigation indicators */
.keyboard-nav-active *:focus {
    outline: 2px dashed var(--primary);
    outline-offset: 4px;
}

/* Improved link focus */
a:focus-visible {
    background-color: rgba(98, 0, 238, 0.1);
    border-radius: 4px;
}

/* Form validation accessibility */
.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
}

.is-valid:focus {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
}

/* Tooltip/title accessibility */
[title] {
    position: relative;
}

/* Live region for announcements */
.aria-live-region {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

body {
    background-color: var(--background);
    color: var(--on-background);
    font-family: 'Inter', sans-serif;
    margin: 0;
    transition: background-color 0.2s, color 0.2s;
    overflow-x: hidden;
}

/* Sidebar with internal scroll */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--surface);
    border-right: 1px solid var(--border-color);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden; /* Hide overflow when collapsing */
}

/* Collapsed Sidebar State */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .nav-link span,
.sidebar.collapsed .nav-heading,
.sidebar.collapsed .sidebar-header-text {
    display: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 12px 0;
    margin: 4px 12px;
}

.sidebar.collapsed .nav-link i {
    margin-right: 0;
    font-size: 1.25rem;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 1.5rem 0;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 0;
}

/* Custom scrollbar for sidebar */
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 10px; }

/* =====================================================
   Real-time Connection Status Indicator
   ===================================================== */
.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.connection-status.connected {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.connection-status.disconnected {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.connection-status.connecting {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.connection-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.connection-status.connected .status-dot {
    animation: pulse-green 2s infinite;
}

.connection-status.connecting .status-dot {
    animation: pulse-yellow 1s infinite;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 4px rgba(40, 167, 69, 0); }
}

@keyframes pulse-yellow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Notification badge with animation */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #dc3545;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: badge-pop 0.3s ease;
}

@keyframes badge-pop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Toast notification enhancements */
.toast-container.realtime-toasts {
    z-index: 1090;
}

.toast.realtime-notification {
    border-left: 4px solid var(--primary);
}

.toast.realtime-notification.task-assigned {
    border-left-color: #ffc107;
}

.toast.realtime-notification.workflow-complete {
    border-left-color: #28a745;
}

.toast.realtime-notification.error {
    border-left-color: #dc3545;
}

/* =====================================================
   TABS & NAVIGATION (Fixed Visibility)
   ===================================================== */
.nav-tabs, .nav-pills, .nav-underline {
    border-bottom: 1px solid var(--border-color);
    gap: 8px;
    padding: 0 16px;
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none !important;
    background: transparent !important;
    padding: 12px 20px;
}

.nav-link:hover {
    color: var(--primary) !important;
    background: rgba(98, 0, 238, 0.05) !important;
}

.nav-link.active {
    color: var(--primary) !important;
    /*background: transparent !important;*/
    position: relative;
}

/* Underline effect for active tab */
.nav-underline .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

/* Pills styling */
.nav-pills .nav-link.active {
    background: var(--primary) !important;
    color: white !important;
    border-radius: 10px;
}

[data-theme="dark"] .nav-link {
    color: #939094 !important;
}

[data-theme="dark"] .nav-link.active {
    color: var(--primary) !important;
}

[data-theme="dark"] .nav-pills .nav-link.active {
    color: #1c1b1f !important; /* Dark text on light primary in dark mode */
}

.top-app-bar {
    height: var(--header-height);
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    z-index: 1040;
    display: flex;
    align-items: center;
    padding: 0 24px;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed ~ .main-content .top-app-bar { /* Adjusted selector if markup allows, otherwise rely on JS toggling class on body/main */
    left: var(--sidebar-collapsed-width);
}

/* Better approach: Class on body or direct sibling selector if structure permits. 
   Assuming structure: sidebar + main > top-app-bar. 
   Actually top-app-bar is inside main-content in index.html? No, let's check index.html again.
   In index.html: sidebar is sibling to main. top-app-bar is inside main.
   So we need to target .main-content based on sidebar state? CSS can't select previous sibling's state to affect next sibling easily without :has (which is new).
   We will add a class 'sidebar-collapsed' to the BODY or MAIN container via JS.
*/

body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .top-app-bar {
    left: var(--sidebar-collapsed-width);
}

.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--header-height);
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-container {
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    color: var(--on-surface);
}

.nav-link {
    color: var(--on-background);
    padding: 12px 24px;
    margin: 4px 12px; /* Increased vertical margin */
    border-radius: 12px;
    font-size: 0.95rem; /* Slightly larger text */
    font-weight: 500;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap; /* Prevent text wrapping */
}

.nav-link i { width: 24px; margin-right: 16px; font-size: 1.15rem; opacity: 0.7; text-align: center; }
.nav-link:hover { background: var(--surface-variant); color: var(--primary); }
.nav-link.active { background: var(--primary); color: white !important; }
.nav-link.active i { opacity: 1; color: white !important; }

.nav-heading {
    padding: 24px 24px 8px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    white-space: nowrap;
}

/* Mobile Adjustments */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); width: var(--sidebar-width) !important; } /* Force width on mobile */
    .sidebar.open { transform: translateX(0); box-shadow: 20px 0 50px rgba(0,0,0,0.3); }
    .top-app-bar { left: 0 !important; }
    .main-content { margin-left: 0 !important; }
    .page-container { padding: 16px; }
    
    body.sidebar-collapsed .sidebar { transform: translateX(-100%); width: var(--sidebar-width); } /* Reset collapsed state on mobile */
}

.iframe-container {
    width: 100%;
    height: calc(100vh - var(--header-height) - 48px); /* Adjusted calc */
    border: none;
    border-radius: var(--border-radius);
}

.btn-light {
    background: var(--surface-variant);
    border: none;
    color: var(--on-background);
}

/* Larger Inputs and Controls */
.form-control, .form-select, .btn {
    padding: 0.6rem 1rem; /* Comfy padding */
    font-size: 0.95rem;
}
.form-control-sm, .form-select-sm, .btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.dropdown-menu {
    background: var(--surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.dropdown-item { color: var(--on-surface); padding: 0.5rem 1.5rem; }
.dropdown-item:hover { background: var(--surface-variant); }

/* Remove white glows in dark mode */
[data-theme="dark"] .bg-light { background-color: var(--surface-variant) !important; }
[data-theme="dark"] .list-group-item { background-color: var(--surface); color: var(--on-surface); border-color: var(--border-color); }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea {
    background-color: var(--surface-variant) !important;
    color: var(--on-surface) !important;
    border-color: var(--border-color) !important;
}
[data-theme="dark"] .dropdown-menu { background-color: var(--surface); border-color: var(--border-color); }
[data-theme="dark"] .bg-white { background-color: var(--surface) !important; }
[data-theme="dark"] .text-dark { color: var(--on-surface) !important; }
[data-theme="dark"] .table { color: var(--on-surface); }
[data-theme="dark"] .table-hover tbody tr:hover { background-color: var(--surface-variant); }
[data-theme="dark"] .card-header { border-bottom-color: var(--border-color); }
[data-theme="dark"] .card-footer { border-top-color: var(--border-color); }

/* Improved Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--background); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.card {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
}
.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    letter-spacing: 0.25px;
    border-radius: 10px; /* Slightly more rounded */
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    box-shadow: 0 4px 12px rgba(98, 0, 238, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(98, 0, 238, 0.3);
    transform: translateY(-1px);
}

/* Glassmorphism for floating headers or specific panels */
.glass-panel {
    background: rgba(var(--surface-rgb, 255, 255, 255), 0.7) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--on-surface-rgb, 0, 0, 0), 0.1);
}

[data-theme="dark"] .glass-panel {
    background: rgba(30, 30, 30, 0.7) !important;
}

/* Better Tables */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background-color: var(--surface-variant) !important;
    border-bottom: 2px solid var(--border-color) !important;
}

.table tbody td {
    vertical-align: middle;
    padding: 1rem 0.75rem;
}

/* Modern Input Styling */
.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: var(--surface);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: var(--focus-ring);
}

.loading-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

/* =====================================================
   RESPONSIVE / MOBILE ADAPTATIONS
   ===================================================== */

/* Tablets and smaller desktops */
@media (max-width: 1200px) {
    :root {
        --sidebar-width: 240px;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .page-header h2 {
        font-size: 1.5rem;
    }
}

/* Tablets */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px !important;
        box-shadow: 2px 0 8px rgba(0,0,0,0.15);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    /* Hide properties panel on modeler for mobile */
    .properties-panel-container {
        width: 280px;
    }
    
    /* Stack columns on dashboard */
    .row > [class*="col-lg-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .row > .col-lg-4,
    .row > .col-lg-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Mobile phones */
@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }
    
    .sidebar {
        width: 100% !important;
        max-width: 320px;
    }
    
    .top-app-bar {
        padding: 0.5rem 1rem !important;
    }
    
    .top-app-bar h4 {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 0.75rem;
    }
    
    /* Cards spacing */
    .card-body {
        padding: 1rem;
    }
    
    /* Tables */
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .table td, .table th {
        padding: 0.5rem;
    }
    
    /* Buttons */
    .btn-group {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .btn-group .btn {
        flex: 1 1 auto;
    }
    
    /* Forms */
    .form-control, .form-select {
        font-size: 16px; /* Prevents iOS zoom */
    }
    
    /* Modal full width on mobile */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-lg, .modal-xl {
        max-width: calc(100% - 1rem);
    }
    
    /* Page headers */
    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    
    .page-header > div:last-child {
        width: 100%;
    }
    
    .page-header .btn-group,
    .page-header .d-flex {
        width: 100%;
        flex-wrap: wrap;
    }
    
    /* Tabs */
    .nav-pills, .nav-tabs {
        flex-wrap: wrap;
    }
    
    .nav-pills .nav-link,
    .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Step wizard */
    .step-wizard {
        flex-direction: column;
    }
    
    .step-wizard .step-item {
        padding: 12px;
    }
    
    /* Hide less important columns on mobile */
    .d-mobile-none {
        display: none !important;
    }
    
    /* Knowledge base */
    .kb-sidebar {
        display: none !important;
    }
    
    .kb-content {
        padding: 0 1rem 2rem 1rem !important;
    }
    
    /* Toast positioning */
    .toast-container {
        bottom: 70px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
    }
}

/* Extra small phones */
@media (max-width: 480px) {
    .page-header h2 {
        font-size: 1.25rem;
    }
    
    .card-header h5,
    .card-header h6 {
        font-size: 1rem;
    }
    
    /* Statistics cards */
    .stats-card .value {
        font-size: 1.5rem;
    }
    
    /* Compact buttons */
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .btn-sm {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }
    
    /* Filter bars */
    .filter-bar {
        padding: 16px;
    }
    
    .filter-bar .row > div {
        margin-bottom: 8px;
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .btn, .nav-link, .dropdown-item, .list-group-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .table td, .table th {
        padding: 0.75rem 0.5rem;
    }
    
    .form-check {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .form-check-input {
        width: 20px;
        height: 20px;
    }
}

/* Print styles */
@media print {
    .sidebar, .top-app-bar, .btn, .pagination, .nav-pills {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 0 !important;
    }
    
    .card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}

/* =====================================================
   LAZY LOADING & VIRTUAL SCROLL STYLES
   ===================================================== */

/* Lazy loading placeholders */
.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-loaded {
    opacity: 1;
}

/* Skeleton loading animation */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--surface-variant) 25%,
        var(--surface) 50%,
        var(--surface-variant) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-image {
    width: 100%;
    height: 200px;
}

/* Virtual scroller */
.virtual-scroller {
    overflow-y: auto;
    position: relative;
}

.virtual-scroller-inner {
    will-change: transform;
}

.virtual-scroller-content {
    will-change: transform;
}

/* Infinite scroll loading indicator */
.infinite-scroll-loader {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}

.infinite-scroll-end {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

/* Fade-in animation for loaded items */
.fade-in-item {
    animation: fadeInItem 0.3s ease forwards;
    opacity: 0;
}

@keyframes fadeInItem {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation for lists */
.stagger-item {
    opacity: 0;
    animation: fadeInItem 0.3s ease forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }
.stagger-item:nth-child(6) { animation-delay: 0.3s; }
.stagger-item:nth-child(7) { animation-delay: 0.35s; }
.stagger-item:nth-child(8) { animation-delay: 0.4s; }
.stagger-item:nth-child(9) { animation-delay: 0.45s; }
.stagger-item:nth-child(10) { animation-delay: 0.5s; }


/* Shared with route-builder assignee editor and the entity_detail.html start wizard modal
   (previously lived in workflow_route.css, which is retired along with workflow_route.js) */
.route-pill-remove {
    opacity: 0.5;
    font-size: 0.7rem;
}

.route-pill-remove:hover {
    opacity: 1;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 1;
    position: relative;
}
