/* =============================================================================
   FORENSICS MODERN REDESIGN
   Modern, enterprise-grade design for the forensics investigation module
   ============================================================================= */

/* -----------------------------------------------------------------------------
   CSS Variables - Global theme colors (available everywhere)
   ----------------------------------------------------------------------------- */
:root {
    /* Forensics-specific aliases to global theme variables */
    --fm-bg-primary: var(--theme-bg-primary, #11161d);
    --fm-bg-secondary: var(--theme-bg-secondary, #191f28);
    --fm-bg-card: var(--theme-bg-card, rgba(26, 32, 40, 0.82));
    --fm-bg-card-hover: var(--theme-bg-card-hover, rgba(34, 42, 52, 0.92));
    --fm-bg-glass: var(--theme-bg-glass, rgba(26, 32, 40, 0.62));

    --fm-border-color: var(--theme-border-color, rgba(48, 54, 61, 0.6));
    --fm-border-subtle: var(--theme-border-subtle, rgba(48, 54, 61, 0.35));
    --fm-border-accent: var(--theme-border-accent, rgba(54, 127, 211, 0.4));

    --fm-text-primary: var(--theme-text-primary, #e6edf3);
    --fm-text-secondary: var(--theme-text-secondary, #8b949e);
    --fm-text-muted: var(--theme-text-muted, #6e7681);

    --fm-accent-blue: var(--theme-accent-blue, #367fd3);
    --fm-accent-blue-glow: var(--theme-accent-blue-glow, rgba(54, 127, 211, 0.35));
    --fm-accent-green: var(--theme-success, #3fb950);
    --fm-accent-green-glow: var(--theme-success-glow, rgba(63, 185, 80, 0.35));
    --fm-accent-red: var(--theme-danger, #f85149);
    --fm-accent-red-glow: var(--theme-danger-glow, rgba(248, 81, 73, 0.35));
    --fm-accent-orange: #d29922;
    --fm-accent-orange-glow: rgba(210, 153, 34, 0.35);
    --fm-accent-purple: #a371f7;
    --fm-accent-purple-glow: rgba(163, 113, 247, 0.35);
    --fm-accent-cyan: #58a6ff;
    --fm-accent-cyan-glow: rgba(88, 166, 255, 0.35);

    --fm-radius-sm: 6px;
    --fm-radius-md: 10px;
    --fm-radius-lg: 16px;

    --fm-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --fm-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --fm-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.35);
    --fm-shadow-glow: 0 0 20px rgba(54, 127, 211, 0.15);

    --fm-scrollbar-bg: rgba(255, 255, 255, 0.06);
    --fm-scrollbar-thumb: rgba(255, 255, 255, 0.18);
    --fm-scrollbar-thumb-hover: rgba(255, 255, 255, 0.28);

    --fm-transition-fast: 0.15s ease;
    --fm-transition-normal: 0.25s ease;
    --fm-transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* -----------------------------------------------------------------------------
   Light Theme Overrides
   ----------------------------------------------------------------------------- */
[data-theme="light"],
html[data-theme="light"] {
    /* Base Backgrounds */
    --fm-bg-primary: #f1f5f9;
    --fm-bg-secondary: #ffffff;
    --fm-bg-card: rgba(255, 255, 255, 0.95);
    --fm-bg-card-hover: rgba(248, 250, 252, 1);
    --fm-bg-glass: rgba(255, 255, 255, 0.9);

    /* Borders */
    --fm-border-color: rgba(226, 232, 240, 0.8);
    --fm-border-subtle: rgba(226, 232, 240, 0.5);
    --fm-border-accent: rgba(59, 130, 246, 0.4);

    /* Text */
    --fm-text-primary: #1e293b;
    --fm-text-secondary: #64748b;
    --fm-text-muted: #94a3b8;

    /* Accents (Darker for visibility on light bg) */
    --fm-accent-blue: #3b82f6;
    --fm-accent-blue-glow: rgba(59, 130, 246, 0.2);
    --fm-accent-green: #22c55e;
    --fm-accent-green-glow: rgba(34, 197, 94, 0.2);
    --fm-accent-red: #ef4444;
    --fm-accent-red-glow: rgba(239, 68, 68, 0.2);
    --fm-accent-orange: #f59e0b;
    --fm-accent-orange-glow: rgba(245, 158, 11, 0.2);
    --fm-accent-purple: #8b5cf6;
    --fm-accent-purple-glow: rgba(139, 92, 246, 0.2);
    --fm-accent-cyan: #0ea5e9;
    --fm-accent-cyan-glow: rgba(14, 165, 233, 0.2);

    /* Shadows */
    --fm-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --fm-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --fm-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --fm-shadow-glow: 0 0 20px rgba(59, 130, 246, 0.1);

    /* Scrollbars */
    --fm-scrollbar-bg: rgba(0, 0, 0, 0.05);
    --fm-scrollbar-thumb: rgba(148, 163, 184, 0.5);
    --fm-scrollbar-thumb-hover: rgba(100, 116, 139, 0.7);
}

/* Light Theme Component Overrides */
[data-theme="light"] .fm-filter-tag.include {
    background: rgba(34, 197, 94, 0.15);
    /* Green tint */
    color: #15803d;
    /* Dark green text */
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Loading Overlay - Dark theme (default) */
.fm-page .db-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: rgba(22, 27, 34, 0.4) !important;
    z-index: 50;
}

/* Loading Overlay - Light theme */
[data-theme="light"] .fm-page .db-loading-overlay,
html[data-theme="light"] .fm-page .db-loading-overlay {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* =============================================================================
   FORENSICS TAB NAVBAR - Glass Morphism Style
   Enterprise-grade, modern navigation for forensics investigation module
   ============================================================================= */

/* Container */
.fm-tabs-container {
    position: relative;
    margin-bottom: 12px;
}

/* Navbar wrapper with glass effect */
.fm-tabs-navbar {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--fm-bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--fm-border-color);
    border-radius: 14px;
    padding: 6px;
    box-shadow:
        var(--fm-shadow-md),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

/* Scrollable track for tabs */
.fm-tabs-track {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2px;
    flex: 1;
    position: relative;
}

.fm-tabs-track::-webkit-scrollbar {
    display: none;
}

/* Individual Tab Items */
.fm-tab-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #b0b8c1;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
    outline: none;
    user-select: none;
    flex-shrink: 0;
}

.fm-tab-item:hover {
    color: #e6edf3;
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
}

.fm-tab-item:focus-visible {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

/* Active tab state */
.fm-tab-item.active {
    color: #ffffff;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.12) 100%);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow:
        0 0 16px rgba(59, 130, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.fm-tab-item.active::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 12px;
    right: 12px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--fm-accent-blue), transparent);
    border-radius: 2px;
}

/* Tab icon */
.fm-tab-icon {
    font-size: 14px;
    opacity: 0.75;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

/* Tab icon - image version */
.fm-tab-icon-img {
    width: 16px;
    height: 16px;
    opacity: 0.75;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.fm-tab-item:hover .fm-tab-icon,
.fm-tab-item:hover .fm-tab-icon-img {
    opacity: 0.95;
}

.fm-tab-item.active .fm-tab-icon {
    opacity: 1;
    color: #ffffff;
}

.fm-tab-item.active .fm-tab-icon-img {
    opacity: 1;
    filter: brightness(1.3) drop-shadow(0 0 4px rgba(88, 166, 255, 0.5));
}

/* Active tab label */
.fm-tab-item.active .fm-tab-label {
    color: #ffffff;
    font-weight: 600;
}

/* Tab label */
.fm-tab-label {
    font-size: 13px;
    letter-spacing: -0.01em;
}

/* Tab badge/counter */
.fm-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 600;
    color: var(--fm-text-primary);
    background: rgba(139, 148, 158, 0.25);
    border-radius: 9px;
    margin-left: 4px;
    transition: all 0.15s ease;
}

.fm-tab-item.active .fm-tab-badge {
    background: rgba(59, 130, 246, 0.35);
    color: #58a6ff;
}

/* Badge variants */
.fm-tab-badge.danger {
    background: rgba(248, 81, 73, 0.25);
    color: var(--fm-accent-red);
}

.fm-tab-badge.warning {
    background: rgba(210, 153, 34, 0.25);
    color: var(--fm-accent-orange);
}

.fm-tab-badge.success {
    background: rgba(63, 185, 80, 0.25);
    color: var(--fm-accent-green);
}

/* Tab Groups - Separator */
.fm-tab-separator {
    width: 1px;
    height: 24px;
    background: linear-gradient(180deg, transparent, var(--fm-border-color), transparent);
    margin: 0 8px;
    flex-shrink: 0;
}

/* Action buttons area */
.fm-tabs-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 12px;
    margin-left: 8px;
    border-left: 1px solid var(--fm-border-subtle);
    flex-shrink: 0;
}

.fm-tab-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--fm-text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--fm-border-subtle);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none;
}

.fm-tab-action-btn:hover {
    color: var(--fm-text-secondary);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(88, 166, 255, 0.3);
}

.fm-tab-action-btn.primary {
    color: #58a6ff;
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.fm-tab-action-btn.primary:hover {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */
@media (max-width: 1400px) {
    .fm-tab-item {
        padding: 8px 12px;
        gap: 5px;
    }

    .fm-tab-label {
        font-size: 12px;
    }

    .fm-tab-icon {
        font-size: 12px;
    }

    .fm-tab-icon-img {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 1200px) {
    .fm-tabs-navbar {
        padding: 4px;
    }

    .fm-tab-item {
        padding: 7px 10px;
        gap: 4px;
    }

    .fm-tab-label {
        font-size: 11px;
    }

    .fm-tab-icon {
        font-size: 11px;
    }

    .fm-tab-icon-img {
        width: 13px;
        height: 13px;
    }

    .fm-tab-badge {
        min-width: 14px;
        height: 14px;
        font-size: 9px;
        padding: 0 4px;
    }

    .fm-tab-separator {
        height: 20px;
        margin: 0 6px;
    }
}

@media (max-width: 992px) {
    .fm-tab-item {
        padding: 6px 8px;
        gap: 3px;
    }

    .fm-tab-label {
        font-size: 10px;
    }

    .fm-tabs-actions {
        padding-left: 6px;
        gap: 3px;
    }

    .fm-tab-action-btn {
        padding: 5px 8px;
        font-size: 10px;
    }
}

/* Icon-only mode for small screens */
@media (max-width: 768px) {
    .fm-tab-item {
        padding: 10px 12px;
    }

    .fm-tab-label {
        display: none;
    }

    .fm-tab-icon {
        font-size: 15px;
    }

    .fm-tab-icon-img {
        width: 18px;
        height: 18px;
    }

    .fm-tab-badge {
        position: absolute;
        top: 4px;
        right: 4px;
        min-width: 14px;
        height: 14px;
        font-size: 8px;
        padding: 0 3px;
        margin-left: 0;
    }

    .fm-tabs-actions {
        display: none;
    }

    .fm-tab-separator {
        display: none;
    }
}

/* Page title modernization - Scoped to forensics pages only */
/* Page Container - Dark background */
.fm-page {
    padding: 20px 0px;
    margin-top: 0;
    min-height: 100vh;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Override any parent container padding for forensics page.
   Include .forensics-details so templates that don't use the
   .fm-page wrapper (Summary, Processes) still flatten the legacy
   `.mobile .page-content { padding: 25px ... }` rule and don't shift
   25px relative to other tabs. */
.page-content:has(.fm-page),
.page-content:has(.forensics-details) {
    padding-top: 0 !important;
}

/* Ensure all direct children respect container bounds */
.fm-page>* {
    max-width: 100%;
    box-sizing: border-box;
}

/* Fix Bootstrap row negative margins */
.fm-page .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.fm-page .row>[class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.fm-page .page-bar {
    display: block !important;
}

.fm-page .page-bar::before,
.fm-page .page-bar::after {
    display: none !important;
    content: none !important;
}

.fm-page .page-bar .row.mytitle {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 15px !important;
    /* Offset Bootstrap's negative margins */
    margin-left: 0 !important;
    /* Override Bootstrap .row negative margin */
    margin-right: 0 !important;
    /* Override Bootstrap .row negative margin */
    width: 100%;
    gap: 16px;
}

.fm-page .page-bar .row.mytitle::before,
.fm-page .page-bar .row.mytitle::after {
    display: none !important;
    content: none !important;
}

.fm-page .page-bar .row.mytitle .pre-title {
    font-size: 13px;
    color: #8b949e;
    flex-shrink: 0;
}

.fm-page .page-bar .row.mytitle .pre-pre-title {
    color: #e6edf3;
    font-weight: 600;
}

/* -----------------------------------------------------------------------------
   HEADER ACTIONS TOOLBAR - Modern Action Buttons (scoped to forensics pages)
   ----------------------------------------------------------------------------- */
.fm-header-actions,
.fm-page .page-bar .fm-header-actions,
.fm-page .page-bar .row.mytitle .fm-header-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 12px !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 100 !important;
    float: none !important;
}

.fm-action-group,
.fm-page .page-bar .fm-action-group,
.fm-page .page-bar .row.mytitle .fm-header-actions .fm-action-group {
    position: relative !important;
    display: inline-flex !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    float: none !important;
}

.fm-action-btn,
button.fm-action-btn,
.fm-page .page-bar .fm-action-btn,
.fm-page .page-bar button.fm-action-btn,
.fm-page .page-bar .row.mytitle .fm-header-actions .fm-action-btn,
.fm-page .page-bar .row.mytitle .fm-header-actions button.fm-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    margin: 0 !important;
    font-weight: 500 !important;
    color: #c9d1d9 !important;
    background: rgba(30, 38, 48, 0.95) !important;
    border: 1px solid rgba(60, 68, 78, 0.8) !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.fm-action-btn:hover,
button.fm-action-btn:hover,
.fm-page .page-bar .fm-action-btn:hover,
.fm-page .page-bar button.fm-action-btn:hover {
    background: rgba(48, 54, 61, 0.95) !important;
    border-color: rgba(88, 166, 255, 0.4) !important;
    color: #e6edf3 !important;
}

.fm-action-btn:focus,
button.fm-action-btn:focus,
.fm-page .page-bar .fm-action-btn:focus,
.fm-page .page-bar button.fm-action-btn:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(54, 127, 211, 0.3) !important;
}

.fm-action-btn i,
button.fm-action-btn i,
.fm-page .page-bar .fm-action-btn i {
    font-size: 14px !important;
    opacity: 0.85 !important;
    color: inherit !important;
}

.fm-action-btn:hover i,
button.fm-action-btn:hover i,
.fm-page .page-bar .fm-action-btn:hover i {
    opacity: 1 !important;
}

.fm-action-label {
    font-size: 12px;
    letter-spacing: 0.2px;
}

.fm-action-chevron {
    font-size: 10px !important;
    opacity: 0.6;
    margin-left: 2px;
}

/* Primary action button (Rescan) */
.fm-action-btn.fm-action-primary {
    background: linear-gradient(145deg, rgba(54, 127, 211, 0.25) 0%, rgba(54, 127, 211, 0.15) 100%);
    border-color: rgba(54, 127, 211, 0.5);
    color: #58a6ff;
}

.fm-action-btn.fm-action-primary:hover {
    background: linear-gradient(145deg, rgba(54, 127, 211, 0.35) 0%, rgba(54, 127, 211, 0.2) 100%);
    border-color: rgba(88, 166, 255, 0.6);
    box-shadow: 0 0 16px rgba(54, 127, 211, 0.2);
}

.fm-action-btn.fm-action-primary i {
    color: #58a6ff;
}

/* Danger action button (Stop) */
.fm-action-btn.fm-action-danger {
    background: linear-gradient(145deg, rgba(248, 81, 73, 0.2) 0%, rgba(248, 81, 73, 0.1) 100%);
    border-color: rgba(248, 81, 73, 0.4);
    color: #f85149;
}

/* Ensure all buttons and groups in header have no extra margins - gap handles spacing */
.fm-header-actions>* {
    margin: 0 !important;
}

/* Page-bar specific header actions - extra separation */
.page-bar .row.mytitle .fm-header-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px !important;
    position: relative !important;
    float: none !important;
    margin-left: auto !important;
}

.page-bar .row.mytitle .fm-header-actions>.fm-action-group,
.page-bar .row.mytitle .fm-header-actions>.fm-action-btn,
.page-bar .row.mytitle .fm-header-actions>button.fm-action-btn {
    position: relative !important;
    float: none !important;
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

.page-bar .row.mytitle .fm-header-actions .fm-action-btn,
.page-bar .row.mytitle .fm-header-actions button.fm-action-btn {
    padding: 8px 14px !important;
    margin: 0 !important;
    background: rgba(30, 38, 48, 0.95) !important;
    border: 1px solid rgba(60, 68, 78, 0.9) !important;
    border-radius: 8px !important;
    position: relative !important;
    float: none !important;
    color: #c9d1d9 !important;
}

/* Responsive header actions - hide labels on smaller screens */
@media (max-width: 1200px) {
    .fm-header-actions .fm-action-label {
        display: none;
    }

    .fm-header-actions .fm-action-btn {
        padding: 8px 10px;
    }
}

@media (max-width: 768px) {
    .page-bar .row.mytitle {
        flex-wrap: wrap !important;
        gap: 10px;
    }

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

.fm-action-btn.fm-action-danger:hover {
    background: linear-gradient(145deg, rgba(248, 81, 73, 0.3) 0%, rgba(248, 81, 73, 0.15) 100%);
    border-color: rgba(248, 81, 73, 0.6);
    box-shadow: 0 0 16px rgba(248, 81, 73, 0.15);
}

.fm-action-btn.fm-action-danger i {
    color: #f85149;
}

/* Dropdown menu styling */
.fm-dropdown-menu {
    background: rgb(22, 27, 34);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(48, 54, 61, 0.6);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    min-width: 180px;
    margin-top: 4px;
    z-index: 1100;
    opacity: 1 !important;
}

.fm-dropdown-menu li {
    list-style: none;
}

.fm-dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: #c9d1d9;
    border-radius: 6px;
    transition: all 0.15s ease;
    cursor: pointer;
}

.fm-dropdown-menu li a:hover {
    background: rgba(54, 127, 211, 0.3) !important;
    color: #fff !important;
    text-decoration: none;
}

.fm-dropdown-menu li a:hover i {
    color: #fff !important;
    opacity: 1 !important;
}

.fm-dropdown-menu li.active a,
.fm-dropdown-menu li.active a:hover {
    background: #367fd3 !important;
    color: #fff !important;
}

.fm-dropdown-menu li a i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.fm-dropdown-menu li.active a i,
.fm-dropdown-menu li.active a:hover i {
    color: #fff !important;
    opacity: 1;
}

/* Responsive adjustments for header actions */
@media (max-width: 1200px) {
    .fm-action-label {
        display: none;
    }

    .fm-action-btn {
        padding: 8px 10px;
    }

    .fm-action-chevron {
        display: none;
    }
}

@media (max-width: 768px) {
    .fm-header-actions {
        gap: 4px;
    }

    .fm-action-btn {
        padding: 6px 8px;
    }

    .fm-action-btn i {
        font-size: 13px;
    }
}


/* -----------------------------------------------------------------------------
   CSS Variables - Theme-aware color system
   ----------------------------------------------------------------------------- */
.forensics-modern {
    --fm-bg-primary: #11161d;
    --fm-bg-secondary: #191f28;
    --fm-bg-card: rgba(26, 32, 40, 0.82);
    --fm-bg-card-hover: rgba(34, 42, 52, 0.92);
    --fm-bg-glass: rgba(26, 32, 40, 0.62);

    --fm-border-color: rgba(48, 54, 61, 0.6);
    --fm-border-subtle: rgba(48, 54, 61, 0.35);
    --fm-border-accent: rgba(54, 127, 211, 0.4);

    --fm-text-primary: #e6edf3;
    --fm-text-secondary: #8b949e;
    --fm-text-muted: #6e7681;

    --fm-accent-blue: #367fd3;
    --fm-accent-blue-glow: rgba(54, 127, 211, 0.35);
    --fm-accent-green: #3fb950;
    --fm-accent-green-glow: rgba(63, 185, 80, 0.35);
    --fm-accent-red: #f85149;
    --fm-accent-red-glow: rgba(248, 81, 73, 0.35);
    --fm-accent-orange: #d29922;
    --fm-accent-orange-glow: rgba(210, 153, 34, 0.35);
    --fm-accent-purple: #a371f7;
    --fm-accent-purple-glow: rgba(163, 113, 247, 0.35);
    --fm-accent-cyan: #58a6ff;
    --fm-accent-cyan-glow: rgba(88, 166, 255, 0.35);

    --fm-radius-sm: 6px;
    --fm-radius-md: 10px;
    --fm-radius-lg: 16px;

    --fm-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --fm-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --fm-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.35);
    --fm-shadow-glow: 0 0 20px rgba(54, 127, 211, 0.15);

    --fm-transition-fast: 0.15s ease;
    --fm-transition-normal: 0.25s ease;
    --fm-transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* -----------------------------------------------------------------------------
   Section Container
   ----------------------------------------------------------------------------- */
.fm-section {
    background: var(--fm-bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: var(--fm-shadow-md);
}

.fm-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--fm-border-subtle);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

.fm-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--fm-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fm-section-title-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--fm-radius-sm);
    font-size: 16px;
}

.fm-section-title-icon.red {
    background: linear-gradient(135deg, rgba(248, 81, 73, 0.2) 0%, rgba(248, 81, 73, 0.05) 100%);
    color: var(--fm-accent-red);
}

.fm-section-title-icon.green {
    background: linear-gradient(135deg, rgba(63, 185, 80, 0.2) 0%, rgba(63, 185, 80, 0.05) 100%);
    color: var(--fm-accent-green);
}

.fm-section-title-icon.orange {
    background: linear-gradient(135deg, rgba(210, 153, 34, 0.2) 0%, rgba(210, 153, 34, 0.05) 100%);
    color: var(--fm-accent-orange);
}

.fm-section-title-icon.blue {
    background: linear-gradient(135deg, rgba(54, 127, 211, 0.2) 0%, rgba(54, 127, 211, 0.05) 100%);
    color: var(--fm-accent-blue);
}

.fm-section-title-icon.purple {
    background: linear-gradient(135deg, rgba(163, 113, 247, 0.2) 0%, rgba(163, 113, 247, 0.05) 100%);
    color: var(--fm-accent-purple);
}

.fm-section-body {
    padding: 12px 16px;
}

.fm-section-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.fm-summary-endpoints-section .fm-section-header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}

.fm-summary-endpoints-section .fm-section-title {
    flex: 1 1 260px;
    min-width: 0;
}

.fm-summary-endpoints-actions {
    flex: 0 1 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
}

.fm-summary-endpoints-actions .fm-action-btn,
.fm-summary-endpoints-actions .fm-endpoints-nav-btn {
    width: auto !important;
    min-width: max-content;
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 0 14px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: visible;
    box-sizing: border-box;
}

.fm-summary-endpoints-actions .fm-action-btn span,
.fm-summary-endpoints-actions .fm-endpoints-nav-btn span {
    display: inline-flex;
    align-items: center;
    height: 100%;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fm-summary-endpoints-actions .fm-action-btn i,
.fm-summary-endpoints-actions .fm-endpoints-nav-btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    font-size: 13px !important;
    line-height: 1;
    flex: 0 0 14px;
}

.fm-summary-endpoints-actions .fm-action-danger i {
    color: var(--fm-accent-red) !important;
}

@media (max-width: 680px) {
    .fm-summary-endpoints-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }

    .fm-summary-endpoints-actions .fm-action-btn,
    .fm-summary-endpoints-actions .fm-endpoints-nav-btn {
        flex: 1 1 180px;
        min-width: 0;
        overflow: hidden;
    }
}

/* -----------------------------------------------------------------------------
   Statistics Cards Grid - Modern Glassmorphism Style
   ----------------------------------------------------------------------------- */
.fm-stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    padding: 12px 16px;
}

@media (max-width: 1600px) {
    .fm-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .fm-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .fm-stats-grid {
        grid-template-columns: 1fr;
    }
}

.fm-stat-card {
    position: relative;
    padding: 12px 14px;
    background: linear-gradient(145deg, rgba(34, 42, 54, 0.68) 0%, rgba(26, 32, 40, 0.82) 100%);
    border: 1px solid var(--fm-border-subtle);
    border-radius: var(--fm-radius-md);
    overflow: hidden;
    transition: all var(--fm-transition-normal);
    cursor: default;
}

.fm-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--stat-color, var(--fm-accent-blue)), transparent);
    opacity: 0.8;
}

.fm-stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle at top right, var(--stat-glow, var(--fm-accent-blue-glow)), transparent 70%);
    opacity: 0.3;
    pointer-events: none;
}

.fm-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--stat-color, var(--fm-accent-blue));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 30px var(--stat-glow, var(--fm-accent-blue-glow));
}

.fm-stat-card.endpoints {
    --stat-color: var(--fm-accent-green);
    --stat-glow: var(--fm-accent-green-glow);
}

.fm-stat-card.threats {
    --stat-color: var(--fm-accent-red);
    --stat-glow: var(--fm-accent-red-glow);
}

.fm-stat-card.network {
    --stat-color: var(--fm-accent-cyan);
    --stat-glow: var(--fm-accent-cyan-glow);
}

.fm-stat-card.processes {
    --stat-color: var(--fm-accent-purple);
    --stat-glow: var(--fm-accent-purple-glow);
}

.fm-stat-card.users {
    --stat-color: var(--fm-accent-blue);
    --stat-glow: var(--fm-accent-blue-glow);
}

.fm-stat-card.events {
    --stat-color: var(--fm-accent-orange);
    --stat-glow: var(--fm-accent-orange-glow);
}

.fm-stat-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--fm-radius-sm);
    font-size: 14px;
    color: var(--stat-color, var(--fm-text-muted));
    opacity: 0.6;
    z-index: 1;
}

.fm-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--stat-color, var(--fm-text-primary));
    line-height: 1.15;
    margin-bottom: 2px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.3px;
}

.fm-stat-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--fm-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* -----------------------------------------------------------------------------
   Endpoints Carousel - Arrow Navigation Layout
   ----------------------------------------------------------------------------- */
.fm-endpoints-carousel {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
}

.fm-carousel-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: rgba(48, 54, 61, 0.4);
    border: 1px solid rgba(48, 54, 61, 0.6);
    border-radius: 50%;
    color: #c9d1d9;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.fm-carousel-arrow:hover:not(:disabled) {
    background: rgba(54, 127, 211, 0.2);
    border-color: rgba(54, 127, 211, 0.5);
    color: #58a6ff;
    transform: scale(1.05);
}

.fm-carousel-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.fm-carousel-arrow-hidden {
    opacity: 0.15;
}

.fm-carousel-arrow i {
    font-size: 14px;
}

.fm-endpoints-carousel-container {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.fm-endpoints-indicator {
    display: flex;
    justify-content: center;
    padding: 4px 0 0;
}

.fm-endpoints-indicator .fm-endpoints-count {
    font-size: 11px;
    color: var(--fm-text-muted);
    background: rgba(48, 54, 61, 0.3);
    padding: 4px 12px;
    border-radius: 12px;
}

/* -----------------------------------------------------------------------------
   Endpoints Cards Grid - Single Row, Cards Expand to Fill Space
   ----------------------------------------------------------------------------- */
.fm-endpoints-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 2px;
}

.fm-endpoint-card {
    flex: 1 1 230px;
    min-width: 230px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    background: linear-gradient(145deg, rgba(34, 42, 54, 0.48) 0%, rgba(26, 32, 40, 0.68) 100%);
    border: 1px solid var(--fm-border-subtle);
    border-radius: var(--fm-radius-md);
    cursor: pointer;
}

.fm-endpoint-card:hover {
    border-color: var(--fm-accent-blue);
    background: var(--fm-bg-card-hover);
    box-shadow: var(--fm-shadow-md);
}

/* Endpoint card content - single line layout */
.fm-endpoint-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.fm-endpoint-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.fm-endpoint-status {
    flex-shrink: 0;
    white-space: nowrap;
}

.fm-endpoint-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.fm-endpoint-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}

.fm-endpoint-meta-item span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.fm-endpoint-meta-item.threats {
    margin-left: auto;
    flex-shrink: 0;
}

.fm-endpoint-card:hover {
    border-color: var(--fm-accent-blue);
    background: var(--fm-bg-card-hover);
    transform: translateY(-1px);
    box-shadow: var(--fm-shadow-md);
}

.fm-endpoint-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.fm-endpoint-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--fm-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.fm-endpoint-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    font-size: 9px;
    font-weight: 600;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.fm-endpoint-status.completed {
    background: rgba(63, 185, 80, 0.15);
    color: var(--fm-accent-green);
}

.fm-endpoint-status.scanning {
    background: rgba(54, 127, 211, 0.15);
    color: var(--fm-accent-blue);
    animation: pulse-status 2s ease-in-out infinite;
}

.fm-endpoint-status.offline {
    background: rgba(248, 81, 73, 0.15);
    color: var(--fm-accent-red);
}

@keyframes pulse-status {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.fm-endpoint-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    color: var(--fm-text-muted);
}

.fm-endpoint-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.fm-endpoint-meta-item i {
    font-size: 12px;
    opacity: 0.7;
}

.fm-endpoint-meta-item.threats {
    color: var(--fm-accent-red);
    font-weight: 600;
}

.fm-endpoint-meta-item.threats i {
    color: var(--fm-accent-red);
    opacity: 1;
}

/* Endpoints overflow indicator */
.fm-endpoints-overflow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: linear-gradient(145deg, rgba(54, 127, 211, 0.1) 0%, rgba(54, 127, 211, 0.02) 100%);
    border: 1px dashed var(--fm-border-accent);
    border-radius: var(--fm-radius-md);
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-endpoints-overflow:hover {
    background: linear-gradient(145deg, rgba(54, 127, 211, 0.15) 0%, rgba(54, 127, 211, 0.05) 100%);
    border-color: var(--fm-accent-blue);
}

.fm-endpoints-overflow-text {
    font-size: 12px;
    font-weight: 500;
    color: var(--fm-accent-blue);
}

/* Endpoints pagination bar */
.fm-endpoints-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 4px 4px;
    border-top: 1px solid var(--fm-border-subtle);
    margin-top: 12px;
}

.fm-endpoints-count {
    font-size: 12px;
    color: var(--fm-text-muted);
}

.fm-endpoints-nav {
    display: flex;
    gap: 8px;
}

.fm-endpoints-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 500;
    color: var(--fm-text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--fm-border-subtle);
    border-radius: var(--fm-radius-sm);
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-endpoints-nav-btn:hover:not(:disabled) {
    background: var(--fm-accent-blue);
    border-color: var(--fm-accent-blue);
    color: white;
}

.fm-endpoints-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* -----------------------------------------------------------------------------
   Activity Timeline - Modern Redesign
   ----------------------------------------------------------------------------- */
.fm-timeline-container {
    position: relative;
    padding: 0;
}

.fm-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 4px;
}

.fm-timeline-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-timeline-datepicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 12px;
    color: var(--fm-text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--fm-border-subtle);
    border-radius: var(--fm-radius-sm);
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-timeline-datepicker:hover {
    border-color: var(--fm-accent-blue);
    background: rgba(54, 127, 211, 0.1);
}

.fm-timeline-datepicker i {
    color: var(--fm-accent-blue);
}

/* Chart container - transparent background to match section */
.fm-timeline-chart {
    width: 100%;
    height: 200px;
    background: transparent !important;
    border-radius: var(--fm-radius-md);
}

/* Override amCharts dark theme background */
.fm-timeline-chart>div,
.fm-timeline-chart canvas,
.fm-timeline-chart svg,
.fm-timeline-chart [class*="amcharts"] {
    background: transparent !important;
    background-color: transparent !important;
}

/* Style amCharts cursor and selection */
.fm-timeline-chart .amcharts-Sprite-group {
    cursor: crosshair;
}

/* Make the chart area slightly more visible */
.fm-timeline-chart-wrapper {
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--fm-radius-md);
    padding: 8px;
}

/* -----------------------------------------------------------------------------
   Category Filter Chips - Replaces Chart Legend
   ----------------------------------------------------------------------------- */
.fm-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0;
    border-bottom: 1px solid var(--fm-border-subtle);
    margin-bottom: 8px;
}

.fm-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--fm-text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--fm-border-subtle);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.fm-filter-chip:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(88, 166, 255, 0.3);
    color: var(--fm-text-primary);
}

.fm-filter-chip.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: #58a6ff;
}

.fm-filter-chip.active:hover {
    background: rgba(59, 130, 246, 0.2);
}

/* Color indicator dot */
.fm-filter-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Filter chip count badge */
.fm-filter-chip-count {
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.fm-filter-chip.active .fm-filter-chip-count {
    background: rgba(59, 130, 246, 0.3);
}

/* Severity-based chip colors */
.fm-filter-chip[data-severity="critical"] .fm-filter-chip-dot {
    background: #ef4444;
}

.fm-filter-chip[data-severity="high"] .fm-filter-chip-dot {
    background: #f97316;
}

.fm-filter-chip[data-severity="medium"] .fm-filter-chip-dot {
    background: #eab308;
}

.fm-filter-chip[data-severity="low"] .fm-filter-chip-dot {
    background: #22c55e;
}

.fm-filter-chip[data-severity="info"] .fm-filter-chip-dot {
    background: #3b82f6;
}

/* Category colors matching the chart */
.fm-filter-chip[data-category="malicious-binary"] .fm-filter-chip-dot {
    background: #67B7DC;
}

.fm-filter-chip[data-category="suspicious-binary"] .fm-filter-chip-dot {
    background: #6895DB;
}

.fm-filter-chip[data-category="malicious-ip"] .fm-filter-chip-dot {
    background: #6772DC;
}

.fm-filter-chip[data-category="suspicious-ip"] .fm-filter-chip-dot {
    background: #8067DC;
}

.fm-filter-chip[data-category="phishing"] .fm-filter-chip-dot {
    background: #A267DB;
}

.fm-filter-chip[data-category="malicious-document"] .fm-filter-chip-dot {
    background: #C667DC;
}

.fm-filter-chip[data-category="defense-evasion"] .fm-filter-chip-dot {
    background: #DB67CE;
}

.fm-filter-chip[data-category="discovery"] .fm-filter-chip-dot {
    background: #DB67AB;
}

.fm-filter-chip[data-category="persistence"] .fm-filter-chip-dot {
    background: #DB6888;
}

.fm-filter-chip[data-category="masquerading"] .fm-filter-chip-dot {
    background: #DC8D67;
}

.fm-filter-chip[data-category="user-events"] .fm-filter-chip-dot {
    background: #DCAF67;
}

.fm-filter-chip[data-category="custom-indicators"] .fm-filter-chip-dot {
    background: #67cadc;
}

/* -----------------------------------------------------------------------------
   Timeline Summary Stats
   ----------------------------------------------------------------------------- */
.fm-timeline-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 0;
    margin-bottom: 12px;
}

.fm-timeline-stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fm-timeline-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--fm-text-primary);
    font-variant-numeric: tabular-nums;
}

.fm-timeline-stat-label {
    font-size: 12px;
    color: var(--fm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* -----------------------------------------------------------------------------
   Activity Heatmap Alternative (optional)
   ----------------------------------------------------------------------------- */
.fm-activity-heatmap {
    display: flex;
    gap: 2px;
    padding: 16px 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.fm-heatmap-column {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 14px;
}

.fm-heatmap-cell {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.15s ease;
    cursor: pointer;
}

.fm-heatmap-cell:hover {
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(88, 166, 255, 0.4);
}

.fm-heatmap-cell[data-level="0"] {
    background: rgba(255, 255, 255, 0.03);
}

.fm-heatmap-cell[data-level="1"] {
    background: rgba(59, 130, 246, 0.2);
}

.fm-heatmap-cell[data-level="2"] {
    background: rgba(59, 130, 246, 0.4);
}

.fm-heatmap-cell[data-level="3"] {
    background: rgba(59, 130, 246, 0.6);
}

.fm-heatmap-cell[data-level="4"] {
    background: rgba(59, 130, 246, 0.8);
}

.fm-heatmap-cell[data-level="5"] {
    background: #3b82f6;
}

/* Threat level heatmap colors */
.fm-heatmap-cell[data-threat="low"] {
    background: rgba(34, 197, 94, 0.6);
}

.fm-heatmap-cell[data-threat="medium"] {
    background: rgba(234, 179, 8, 0.6);
}

.fm-heatmap-cell[data-threat="high"] {
    background: rgba(249, 115, 22, 0.6);
}

.fm-heatmap-cell[data-threat="critical"] {
    background: rgba(239, 68, 68, 0.8);
}

.fm-heatmap-label {
    font-size: 10px;
    color: var(--fm-text-muted);
    text-align: center;
    padding-top: 4px;
}

/* -----------------------------------------------------------------------------
   Selected Time Range Indicator
   ----------------------------------------------------------------------------- */
.fm-time-range-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--fm-radius-sm);
    margin-top: 12px;
}

.fm-time-range-indicator i {
    color: #58a6ff;
    font-size: 14px;
}

.fm-time-range-text {
    font-size: 12px;
    color: var(--fm-text-secondary);
}

.fm-time-range-text strong {
    color: var(--fm-text-primary);
}

.fm-time-range-clear {
    padding: 4px 10px;
    font-size: 11px;
    color: var(--fm-text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--fm-border-subtle);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fm-time-range-clear:hover {
    background: rgba(248, 81, 73, 0.1);
    border-color: rgba(248, 81, 73, 0.3);
    color: var(--fm-accent-red);
}

/* -----------------------------------------------------------------------------
   MITRE ATT&CK Coverage Section
   ----------------------------------------------------------------------------- */
/* MITRE section - prevent parent from scrolling */
.fm-section-mitre {
    overflow: visible !important;
}

.fm-mitre-body {
    overflow: visible !important;
    padding: 0 !important;
}

.fm-mitre-container {
    padding: 16px;
    max-height: 430px;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) rgba(0, 0, 0, 0.2);
}

/* Slim scrollbar for MITRE container - WebKit */
.fm-mitre-container::-webkit-scrollbar {
    width: 6px !important;
}

.fm-mitre-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 3px;
}

.fm-mitre-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 3px;
}

.fm-mitre-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25) !important;
}

.fm-mitre-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.fm-mitre-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-mitre-title-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    color: var(--fm-accent-red);
    background: rgba(248, 81, 73, 0.12);
    border-radius: 999px;
}

.fm-mitre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 12px;
    padding: 4px 0;
}

.fm-mitre-tactic {
    background: linear-gradient(145deg, rgba(34, 42, 54, 0.48) 0%, rgba(26, 32, 40, 0.68) 100%);
    border: 1px solid var(--fm-border-subtle);
    border-radius: var(--fm-radius-md);
    overflow: hidden;
    transition: all var(--fm-transition-fast);
    display: flex;
    flex-direction: column;
    max-height: 340px;
    min-height: 126px;
}

.fm-mitre-tactic:hover {
    border-color: var(--fm-border-color);
    box-shadow: var(--fm-shadow-md);
}

.fm-mitre-tactic-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 38px;
    padding: 9px 12px;
    background: var(--tactic-color, var(--fm-accent-blue));
    color: white;
    flex-shrink: 0;
    min-width: 0;
}

.fm-mitre-tactic-name {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
    min-width: 0;
}

.fm-mitre-tactic-id {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 7px;
    font-size: 10px;
    font-weight: 700;
    opacity: 0.92;
    font-family: 'SF Mono', 'Consolas', monospace;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    flex-shrink: 0;
}

.fm-mitre-techniques {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* Slim scrollbar for technique list - WebKit */
.fm-mitre-techniques::-webkit-scrollbar {
    width: 4px;
}

.fm-mitre-techniques::-webkit-scrollbar-track {
    background: transparent;
}

.fm-mitre-techniques::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.fm-mitre-techniques::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.fm-mitre-technique {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 8px 10px;
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.045);
    border-radius: var(--fm-radius-sm);
    transition: all var(--fm-transition-fast);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.fm-mitre-technique:last-child {
    margin-bottom: 0;
}

.fm-mitre-technique:hover {
    background: rgba(54, 127, 211, 0.1);
    text-decoration: none;
    color: inherit;
}

.fm-mitre-technique:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--fm-accent-blue-glow);
}

.fm-mitre-technique-info {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.fm-mitre-technique-id {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 6px;
    font-size: 10px;
    font-weight: 700;
    font-family: 'SF Mono', 'Consolas', monospace;
    color: var(--fm-accent-cyan);
    background: rgba(88, 166, 255, 0.1);
    border-radius: 999px;
}

.fm-mitre-technique-name {
    font-size: 12px;
    line-height: 1.35;
    color: var(--fm-text-primary);
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.fm-mitre-technique-count {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 18px;
    padding: 0 6px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    background: var(--fm-accent-red);
    border-radius: 999px;
}

@media (max-width: 760px) {
    .fm-mitre-tactic {
        max-height: 340px;
    }

    .fm-mitre-tactic-header {
        min-height: 38px;
    }
}

/* Light Theme: MITRE ATT&CK Coverage */
[data-theme="light"] .fm-mitre-container,
html[data-theme="light"] .fm-mitre-container {
    scrollbar-color: var(--theme-border-color, rgba(226, 232, 240, 0.8)) var(--theme-bg-tertiary, #f8fafc);
}

[data-theme="light"] .fm-mitre-container::-webkit-scrollbar-track,
html[data-theme="light"] .fm-mitre-container::-webkit-scrollbar-track {
    background: var(--theme-bg-tertiary, #f8fafc) !important;
}

[data-theme="light"] .fm-mitre-container::-webkit-scrollbar-thumb,
html[data-theme="light"] .fm-mitre-container::-webkit-scrollbar-thumb {
    background: var(--theme-border-color, rgba(226, 232, 240, 0.8)) !important;
}

[data-theme="light"] .fm-mitre-tactic,
html[data-theme="light"] .fm-mitre-tactic {
    background: var(--theme-bg-card, rgba(255, 255, 255, 0.95)) !important;
    border: 1px solid var(--theme-border-color, rgba(226, 232, 240, 0.8)) !important;
    box-shadow: var(--theme-shadow-sm);
}

[data-theme="light"] .fm-mitre-tactic:hover,
html[data-theme="light"] .fm-mitre-tactic:hover {
    border-color: var(--theme-border-muted, rgba(148, 163, 184, 0.5)) !important;
    box-shadow: var(--theme-shadow-md);
}

[data-theme="light"] .fm-mitre-techniques,
html[data-theme="light"] .fm-mitre-techniques {
    scrollbar-color: var(--theme-border-color, rgba(226, 232, 240, 0.8)) transparent;
}

[data-theme="light"] .fm-mitre-techniques::-webkit-scrollbar-thumb,
html[data-theme="light"] .fm-mitre-techniques::-webkit-scrollbar-thumb {
    background: var(--theme-border-color, rgba(226, 232, 240, 0.8));
}

[data-theme="light"] .fm-mitre-technique,
html[data-theme="light"] .fm-mitre-technique {
    background: var(--theme-bg-tertiary, #f8fafc);
    color: var(--theme-text-primary, #1e293b);
}

[data-theme="light"] .fm-mitre-technique:hover,
html[data-theme="light"] .fm-mitre-technique:hover {
    background: var(--theme-table-row-hover, rgba(59, 130, 246, 0.06));
}

[data-theme="light"] .fm-mitre-technique-id,
[data-theme="light"] .fm-mitre-technique-name,
html[data-theme="light"] .fm-mitre-technique-id,
html[data-theme="light"] .fm-mitre-technique-name {
    color: var(--theme-text-primary, #1e293b);
}

[data-theme="light"] .fm-mitre-technique-count,
html[data-theme="light"] .fm-mitre-technique-count {
    color: var(--theme-accent-blue, #3b82f6);
    background: var(--theme-accent-blue-bg, rgba(59, 130, 246, 0.12));
}

/* MITRE Tactic Colors */
.fm-mitre-tactic[data-tactic="initial-access"] .fm-mitre-tactic-header {
    background: #ef4444;
}

.fm-mitre-tactic[data-tactic="execution"] .fm-mitre-tactic-header {
    background: #f97316;
}

.fm-mitre-tactic[data-tactic="persistence"] .fm-mitre-tactic-header {
    background: #eab308;
}

.fm-mitre-tactic[data-tactic="privilege-escalation"] .fm-mitre-tactic-header {
    background: #84cc16;
}

.fm-mitre-tactic[data-tactic="defense-evasion"] .fm-mitre-tactic-header {
    background: #22c55e;
}

.fm-mitre-tactic[data-tactic="credential-access"] .fm-mitre-tactic-header {
    background: #14b8a6;
}

.fm-mitre-tactic[data-tactic="discovery"] .fm-mitre-tactic-header {
    background: #06b6d4;
}

.fm-mitre-tactic[data-tactic="lateral-movement"] .fm-mitre-tactic-header {
    background: #3b82f6;
}

.fm-mitre-tactic[data-tactic="collection"] .fm-mitre-tactic-header {
    background: #6366f1;
}

.fm-mitre-tactic[data-tactic="exfiltration"] .fm-mitre-tactic-header {
    background: #8b5cf6;
}

.fm-mitre-tactic[data-tactic="command-control"] .fm-mitre-tactic-header {
    background: #a855f7;
}

.fm-mitre-tactic[data-tactic="impact"] .fm-mitre-tactic-header {
    background: #ec4899;
}

/* Empty state for MITRE */
.fm-mitre-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.fm-mitre-empty-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: rgba(63, 185, 80, 0.1);
    border-radius: 50%;
    font-size: 24px;
    color: var(--fm-accent-green);
}

.fm-mitre-empty-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--fm-text-primary);
    margin-bottom: 8px;
}

.fm-mitre-empty-text {
    font-size: 12px;
    color: var(--fm-text-muted);
}

/* -----------------------------------------------------------------------------
   Threat Cards - Inline Details Design with Infinite Scroll
   ----------------------------------------------------------------------------- */
/* Threats container - no height limit, grows with content */
.fm-threats-list-container {
    /* No max-height - section grows as threats are added */
}

.fm-threats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fm-threats-loading-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    color: var(--fm-text-muted);
    font-size: 13px;
}

.fm-threats-loading-more i {
    color: var(--fm-accent-blue);
}

.fm-threat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 12px 14px;
    background: linear-gradient(145deg, rgba(34, 42, 54, 0.48) 0%, rgba(26, 32, 40, 0.68) 100%);
    border: 1px solid var(--fm-border-subtle);
    border-radius: var(--fm-radius-md);
    border-left: 4px solid var(--threat-color, var(--fm-accent-red));
    transition: all var(--fm-transition-fast);
    cursor: pointer;
}

.fm-threat-card:hover {
    background: var(--fm-bg-card-hover);
    border-color: var(--fm-border-color);
    box-shadow: var(--fm-shadow-md);
    transform: translateX(4px);
}

.fm-threat-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.fm-threat-card-main {
    flex: 1;
    min-width: 0;
}

.fm-threat-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.fm-threat-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--threat-color, var(--fm-accent-red));
    background: rgba(248, 81, 73, 0.12);
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Threat Score Badge */
.fm-threat-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--fm-text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.fm-threat-score-badge i {
    font-size: 10px;
}

.fm-threat-score-badge.critical {
    background: rgba(248, 81, 73, 0.2);
    color: #f85149;
    border-color: rgba(248, 81, 73, 0.4);
}

.fm-threat-score-badge.high {
    background: rgba(255, 123, 0, 0.2);
    color: #ff7b00;
    border-color: rgba(255, 123, 0, 0.4);
}

.fm-threat-score-badge.medium {
    background: rgba(210, 153, 34, 0.2);
    color: #d29922;
    border-color: rgba(210, 153, 34, 0.4);
}

.fm-threat-score-badge.low {
    background: rgba(63, 185, 80, 0.2);
    color: #3fb950;
    border-color: rgba(63, 185, 80, 0.4);
}

.fm-threat-mitre-link {
    font-size: 10px;
    font-family: 'SF Mono', 'Consolas', monospace;
    color: var(--fm-accent-cyan);
    text-decoration: underline;
    text-decoration-color: rgba(88, 166, 255, 0.3);
}

.fm-threat-mitre-link:hover {
    color: var(--fm-accent-blue);
    text-decoration-color: var(--fm-accent-blue);
}

.fm-threat-description {
    font-size: 13px;
    color: var(--fm-text-primary);
    line-height: 1.5;
    margin-bottom: 0;
}

.fm-threat-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.fm-threat-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--fm-border-subtle);
    border-radius: var(--fm-radius-sm);
    background: rgba(255, 255, 255, 0.02);
    color: var(--fm-text-muted);
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-threat-action-btn:hover {
    background: var(--fm-accent-blue);
    border-color: var(--fm-accent-blue);
    color: white;
}

.fm-threat-action-btn.tagged {
    background: rgba(63, 185, 80, 0.15);
    border-color: rgba(63, 185, 80, 0.3);
    color: var(--fm-accent-green);
}

/* Threat Details Grid */
.fm-threat-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--fm-border-subtle);
}

.fm-threat-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fm-threat-detail-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--fm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.fm-threat-detail-value {
    font-size: 12px;
    color: var(--fm-text-primary);
    word-break: break-all;
    font-family: 'SF Mono', 'Consolas', monospace;
}

.fm-threat-detail-value.path {
    font-size: 11px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fm-threat-detail-value.primary {
    color: var(--fm-accent-cyan);
}

/* Threat Meta Row */
.fm-threat-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--fm-border-subtle);
}

.fm-threat-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--fm-text-muted);
}

.fm-threat-meta-item i {
    font-size: 12px;
    opacity: 0.7;
}

.fm-threat-meta-item.timestamp {
    color: var(--fm-text-secondary);
}

.fm-threat-meta-item.endpoint {
    color: var(--fm-accent-blue);
}

/* Alert link styling */
.fm-threat-alert-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    color: var(--fm-accent-cyan);
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: var(--fm-radius-sm);
    text-decoration: none;
    transition: all var(--fm-transition-fast);
}

.fm-threat-alert-link:hover {
    background: rgba(88, 166, 255, 0.2);
    border-color: var(--fm-accent-cyan);
    color: white;
}

/* Threats Pagination */
.fm-threats-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--fm-border-subtle);
}

.fm-threats-pagination .fm-endpoints-nav-btn {
    padding: 8px 16px;
    font-size: 12px;
}

/* Loading state */
.fm-loading {
    position: relative;
    pointer-events: none;
}

.fm-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 22, 29, 0.6);
    backdrop-filter: blur(4px);
    border-radius: inherit;
    z-index: 10;
}

.fm-loading .fm-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
    width: 32px;
    height: 32px;
    border: 3px solid var(--fm-border-subtle);
    border-top-color: var(--fm-accent-blue);
    border-radius: 50%;
    animation: fm-spin 0.8s linear infinite;
}

@keyframes fm-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Empty states */
.fm-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.fm-empty-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: rgba(139, 148, 158, 0.1);
    border-radius: 50%;
    font-size: 22px;
    color: var(--fm-text-muted);
}

.fm-empty-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--fm-text-primary);
    margin-bottom: 6px;
}

.fm-empty-text {
    font-size: 12px;
    color: var(--fm-text-muted);
}

/* -----------------------------------------------------------------------------
   Responsive Adjustments
   ----------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .fm-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .fm-stats-grid {
        padding: 16px;
        gap: 12px;
    }

    .fm-stat-card {
        padding: 16px;
    }

    .fm-stat-value {
        font-size: 26px;
    }

    .fm-threat-card-header {
        flex-direction: column;
        gap: 12px;
    }

    .fm-threat-card-actions {
        align-self: flex-start;
    }

    .fm-threat-details {
        grid-template-columns: 1fr;
    }
}

/* -----------------------------------------------------------------------------
   Animation utilities
   ----------------------------------------------------------------------------- */
/* Enterprise UX: skip the per-element fade-in/slide-up that played
   on every tab entry — content should appear instantly. The class
   is left in markup intentionally so we can re-enable a softer
   transition later without touching templates. The .fm-stagger
   delays below have no effect while animation is disabled. */
.fm-fade-in {
    animation: none;
}

@keyframes fm-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fm-slide-in {
    animation: fm-slide-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fm-slide-in {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Staggered animation for list items */
.fm-stagger>*:nth-child(1) {
    animation-delay: 0s;
}

.fm-stagger>*:nth-child(2) {
    animation-delay: 0.05s;
}

.fm-stagger>*:nth-child(3) {
    animation-delay: 0.1s;
}

.fm-stagger>*:nth-child(4) {
    animation-delay: 0.15s;
}

.fm-stagger>*:nth-child(5) {
    animation-delay: 0.2s;
}

.fm-stagger>*:nth-child(6) {
    animation-delay: 0.25s;
}

.fm-stagger>*:nth-child(7) {
    animation-delay: 0.3s;
}

.fm-stagger>*:nth-child(8) {
    animation-delay: 0.35s;
}

.fm-stagger>*:nth-child(9) {
    animation-delay: 0.4s;
}

.fm-stagger>*:nth-child(10) {
    animation-delay: 0.45s;
}

/* -----------------------------------------------------------------------------
   Scroll to Top - Floating Action Button
   ----------------------------------------------------------------------------- */
.fm-scroll-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 1000;
    width: 48px;
    height: 48px;
    padding: 0;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.9) 0%, rgba(37, 99, 235, 0.95) 100%);
    border: 1px solid rgba(88, 166, 255, 0.3);
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    box-shadow:
        0 4px 16px rgba(59, 130, 246, 0.4),
        0 0 0 0 rgba(59, 130, 246, 0);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fm-scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.fm-scroll-to-top:hover {
    background: linear-gradient(145deg, rgba(79, 147, 247, 0.95) 0%, rgba(59, 130, 246, 1) 100%);
    box-shadow:
        0 6px 24px rgba(59, 130, 246, 0.5),
        0 0 0 4px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px) scale(1.05);
}

.fm-scroll-to-top:active {
    transform: translateY(0) scale(0.95);
    box-shadow:
        0 2px 8px rgba(59, 130, 246, 0.4),
        0 0 0 2px rgba(59, 130, 246, 0.2);
}

.fm-scroll-to-top i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    line-height: 1;
    width: auto;
    height: auto;
    margin: 0 !important;
    padding: 0 !important;
    transition: transform 0.2s ease;
}

.fm-scroll-to-top:hover i {
    transform: translate(-50%, -50%) translateY(-2px);
}

/* Tooltip on hover */
.fm-scroll-to-top::before {
    content: 'Back to top';
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--fm-text-primary);
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border-color);
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    box-shadow: var(--fm-shadow-md);
}

.fm-scroll-to-top::after {
    content: '';
    position: absolute;
    right: calc(100% + 4px);
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: var(--fm-border-color);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.fm-scroll-to-top:hover::before,
.fm-scroll-to-top:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Pulse animation when first appearing */
@keyframes fm-scroll-btn-pulse {
    0% {
        box-shadow:
            0 4px 16px rgba(59, 130, 246, 0.4),
            0 0 0 0 rgba(59, 130, 246, 0.4);
    }

    70% {
        box-shadow:
            0 4px 16px rgba(59, 130, 246, 0.4),
            0 0 0 12px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow:
            0 4px 16px rgba(59, 130, 246, 0.4),
            0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.fm-scroll-to-top.visible.pulse {
    animation: fm-scroll-btn-pulse 1s ease-out;
}

/* Progress ring variant (optional enhancement) */
.fm-scroll-to-top.with-progress {
    background: transparent;
    border: none;
}

.fm-scroll-to-top.with-progress .fm-scroll-progress-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.fm-scroll-to-top.with-progress .fm-scroll-progress-ring circle {
    fill: rgba(22, 27, 34, 0.9);
    stroke-width: 3;
}

.fm-scroll-to-top.with-progress .fm-scroll-progress-ring .progress-bg {
    stroke: rgba(48, 54, 61, 0.6);
}

.fm-scroll-to-top.with-progress .fm-scroll-progress-ring .progress-fill {
    stroke: #3b82f6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s ease;
}

/* Responsive positioning */
@media (max-width: 768px) {
    .fm-scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }

    .fm-scroll-to-top i {
        font-size: 16px;
    }

    /* Hide tooltip on mobile */
    .fm-scroll-to-top::before,
    .fm-scroll-to-top::after {
        display: none;
    }
}

/* =============================================================================
   FORENSICS INVESTIGATIONS LIST PAGE
   Modern redesign for the investigations list view
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Page Header - Title and Breadcrumb
   ----------------------------------------------------------------------------- */
.fm-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0 10px 0;
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--fm-border-subtle);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* SVG icon in header */
.fm-page-title-icon img {
    width: 100%;
    height: 100%;
    filter: brightness(0) saturate(100%) invert(55%) sepia(75%) saturate(500%) hue-rotate(10deg) brightness(100%) contrast(95%);
}

/* Header Right - Company Context Badge */
.fm-header-right {
    display: flex;
    align-items: center;
}

.fm-context-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(54, 127, 211, 0.12);
    border: 1px solid rgba(54, 127, 211, 0.3);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--fm-text-primary);
    font-size: 12px;
    max-width: 420px;
    text-align: left;
}

.fm-context-badge i {
    color: var(--fm-accent-blue, #58a6ff);
    font-size: 14px;
    flex-shrink: 0;
}

[data-theme="light"] .fm-page-title-icon img {
    filter: brightness(0) saturate(100%) invert(45%) sepia(70%) saturate(450%) hue-rotate(15deg) brightness(95%) contrast(90%);
}

[data-theme="light"] .fm-context-badge {
    background: rgba(54, 127, 211, 0.08);
    border-color: rgba(54, 127, 211, 0.25);
    color: var(--theme-text-primary);
}

.fm-page-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fm-page-title-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-radius: 10px;
    color: #58a6ff;
    font-size: 18px;
}

.fm-page-title h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--fm-text-primary);
    margin: 0;
}

.fm-page-title .fm-breadcrumb {
    font-size: 13px;
    color: var(--fm-text-muted);
}

.fm-page-title .fm-breadcrumb strong {
    color: var(--fm-text-primary);
}

/* -----------------------------------------------------------------------------
   List Page Toolbar - Tabs and Actions
   ----------------------------------------------------------------------------- */
.fm-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    flex-wrap: wrap;
}

.fm-list-toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fm-list-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tab Pills for Investigations/Merged */
.fm-list-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border-subtle);
    border-radius: 10px;
}

.fm-list-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--fm-text-muted);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.fm-list-tab:hover {
    color: var(--fm-text-secondary);
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
}

.fm-list-tab.active {
    color: #ffffff;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.25) 0%, rgba(59, 130, 246, 0.15) 100%);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

.fm-list-tab i {
    font-size: 14px;
}

/* Action Buttons */
.fm-list-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--fm-text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--fm-border-subtle);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.fm-list-action-btn:hover {
    color: var(--fm-text-primary);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--fm-border-color);
    text-decoration: none;
}

.fm-list-action-btn i {
    font-size: 14px;
}

.fm-list-action-btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.fm-list-action-btn.primary:hover {
    background: linear-gradient(135deg, #4f93f7 0%, #3b82f6 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

/* Dropdown Button */
.fm-list-dropdown {
    position: relative;
}

.fm-list-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 220px;
    padding: 6px;
    background: rgba(22, 27, 34, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid var(--fm-border-color);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.fm-list-dropdown.open .fm-list-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fm-list-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--fm-text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.fm-list-dropdown-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--fm-text-primary);
    text-decoration: none;
}

.fm-list-dropdown-item i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.fm-list-dropdown-item:hover i {
    opacity: 1;
}

/* -----------------------------------------------------------------------------
   Modern Data Table
   ----------------------------------------------------------------------------- */
.fm-data-table-container {
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.fm-data-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--fm-border-subtle);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

.fm-data-table-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-data-table-title-count {
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--fm-accent-blue);
    background: rgba(59, 130, 246, 0.12);
    border-radius: 999px;
}

.fm-data-table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fm-data-table-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--fm-border-subtle);
    border-radius: 6px;
    color: var(--fm-text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.fm-data-table-refresh:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #58a6ff;
}

.fm-data-table-refresh i {
    color: inherit;
}

[data-theme="light"] .fm-data-table-refresh,
html[data-theme="light"] .fm-data-table-refresh {
    background: #f6f8fa;
    /* Safely hardcoded light bg */
    border-color: #d0d7de;
    /* Safely hardcoded light border */
    color: #57606a !important;
    /* Safely hardcoded dark grey */
}

[data-theme="light"] .fm-data-table-refresh:hover,
html[data-theme="light"] .fm-data-table-refresh:hover {
    background: #eaeef2;
    color: #0969da !important;
    /* Safely hardcoded blue */
}



.fm-data-table-refresh.loading i {
    animation: fm-spin 1s linear infinite;
}

/* Table Wrapper */
.fm-data-table-wrapper {
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.fm-data-table-wrapper::-webkit-scrollbar {
    height: 6px;
}

.fm-data-table-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.fm-data-table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(48, 54, 61, 0.6);
    border-radius: 3px;
}

/* Table Styles */
.fm-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.fm-data-table thead {
    background: var(--theme-table-header-bg, rgba(22, 27, 34, 0.5));
}

.fm-data-table th {
    padding: 9px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--theme-text-secondary, var(--fm-text-muted));
    border-bottom: 1px solid var(--fm-border-subtle);
    white-space: nowrap;
}

.fm-data-table th.fm-col-actions {
    text-align: right;
    padding-right: 12px;
}

.fm-table-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: 8px;
    border-radius: 8px;
    border: 1px solid var(--fm-border-subtle);
    background: var(--fm-bg-secondary);
    color: var(--fm-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.fm-table-refresh i {
    color: inherit;
}

.fm-table-refresh:hover {
    background: var(--fm-bg-card-hover);
    border-color: var(--fm-border-accent);
    color: var(--fm-accent-blue);
}

.fm-table-refresh:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--fm-accent-blue-glow);
}

[data-theme="light"] .fm-table-refresh,
html[data-theme="light"] .fm-table-refresh {
    background: var(--theme-bg-secondary);
    border-color: var(--theme-border-color);
    color: var(--theme-text-dark);
}

[data-theme="light"] .fm-table-refresh i,
html[data-theme="light"] .fm-table-refresh i {
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-table-refresh:hover,
html[data-theme="light"] .fm-table-refresh:hover {
    background: var(--theme-bg-tertiary);
    border-color: var(--theme-border-accent);
    color: var(--theme-accent-blue-dark);
}

.fm-data-table th.center {
    text-align: center;
}

.fm-data-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.fm-data-table th.sortable:hover {
    color: var(--fm-text-secondary);
}

.fm-data-table tbody tr {
    border-bottom: 1px solid var(--fm-border-subtle);
    transition: background 0.1s ease;
}

.fm-data-table tbody tr:last-child {
    border-bottom: none;
}

.fm-data-table tbody tr:hover {
    background: var(--theme-table-row-hover, rgba(59, 130, 246, 0.04));
}

.fm-data-table td {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--fm-text-secondary);
    vertical-align: middle;
}

.fm-data-table td.primary {
    color: var(--fm-text-primary);
    font-weight: 500;
}

.fm-data-table td.center {
    text-align: center;
}

.fm-data-table td.mono {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 13px;
}

/* Row Expiration Status Border */
.fm-data-table tbody tr.expiration-safe {
    border-left: 3px solid var(--fm-accent-green);
}

.fm-data-table tbody tr.expiration-warning {
    border-left: 3px solid var(--fm-accent-orange);
}

.fm-data-table tbody tr.expiration-critical {
    border-left: 3px solid var(--fm-accent-red);
}

.fm-data-table tbody tr.expiration-expired {
    border-left: 3px solid var(--fm-text-muted);
    /* opacity: 0.6; - Removed to prevent dropdown opacity issues */
}

/* Apply dimming to all cells except the actions column */
.fm-data-table tbody tr.expiration-expired td:not(:last-child) {
    opacity: 0.6;
}

/* Ensure actions column and dropdowns are fully visible */
.fm-data-table tbody tr.expiration-expired td:last-child {
    opacity: 1 !important;
}

.fm-data-table tbody tr.expiration-expired .dropdown-menu,
.fm-data-table tbody tr.expiration-expired .fm-dropdown-menu {
    opacity: 1 !important;
}

/* Ensure dropdown menu in expired rows has full opacity */
.fm-data-table tbody tr.expiration-expired .dropdown-menu,
.fm-data-table tbody tr.expiration-expired .fm-dropdown-menu {
    opacity: 1;
}


/* Investigation Name Cell */
.fm-investigation-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fm-investigation-name-text {
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-investigation-desc {
    font-size: 12px;
    color: var(--fm-text-muted);
}

/* Status Badge */
.fm-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 999px;
    white-space: nowrap;
}

.fm-status-badge.in-progress {
    color: var(--fm-accent-orange);
    background: rgba(210, 153, 34, 0.12);
}

.fm-status-badge.in-progress::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--fm-accent-orange);
    border-radius: 50%;
    animation: fm-pulse 2s ease-in-out infinite;
}

.fm-status-badge.completed {
    color: var(--fm-accent-green);
    background: rgba(63, 185, 80, 0.12);
}

.fm-status-badge.completed::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--fm-accent-green);
    border-radius: 50%;
}

@keyframes fm-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* Row Actions Dropdown */
.fm-row-actions {
    position: relative;
}

/* Make dropdown appear above table with high z-index */
.fm-row-actions .dropdown-menu,
.fm-row-actions .fm-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    min-width: 240px;
    max-height: none;
    overflow-y: visible;
    z-index: 1050;
    margin-top: 4px;
}

/* Normalize dropdown menu item colors (handle span permission wrapper) */
.fm-row-actions .dropdown-menu li a,
.fm-row-actions .dropdown-menu li span a,
.fm-row-actions .fm-dropdown-menu li a,
.fm-row-actions .fm-dropdown-menu li span a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--fm-text-primary);
    text-decoration: none;
    transition: all 0.15s ease;
}

.fm-row-actions .dropdown-menu li a i,
.fm-row-actions .dropdown-menu li span a i,
.fm-row-actions .fm-dropdown-menu li a i,
.fm-row-actions .fm-dropdown-menu li span a i {
    width: 16px;
    text-align: center;
    opacity: 0.9;
    color: inherit;
}

.fm-row-actions .dropdown-menu li a:hover,
.fm-row-actions .dropdown-menu li span a:hover,
.fm-row-actions .fm-dropdown-menu li a:hover,
.fm-row-actions .fm-dropdown-menu li span a:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--fm-text-primary);
    text-decoration: none;
}

.fm-row-actions .dropdown-menu li a:hover i,
.fm-row-actions .dropdown-menu li span a:hover i,
.fm-row-actions .fm-dropdown-menu li a:hover i,
.fm-row-actions .fm-dropdown-menu li span a:hover i {
    opacity: 1;
}

/* Ensure table wrapper allows overflow */
.fm-data-table-wrapper {
    overflow: visible !important;
}

.fm-data-table-container {
    overflow: visible !important;
}

/* Override global index.css rule that hides dropdown buttons until hover */
.fm-data-table tbody tr td>.dropdown>button,
.fm-data-table tbody tr td>.fm-row-actions>button,
.fm-row-actions-btn {
    visibility: visible !important;
}

.fm-row-actions-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 6px;
    color: #58a6ff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fm-row-actions-btn:hover {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.4);
    color: #79b8ff;
    transform: scale(1.05);
}

.fm-row-actions-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 180px;
    padding: 6px;
    background: rgba(22, 27, 34, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid var(--fm-border-color);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 100;
}

.fm-row-actions-menu a,
.fm-row-actions-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--fm-text-secondary);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    text-align: left;
}

.fm-row-actions-menu a:hover,
.fm-row-actions-menu button:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--fm-text-primary);
    text-decoration: none;
}

.fm-row-actions-menu .danger:hover {
    background: rgba(248, 81, 73, 0.1);
    color: var(--fm-accent-red);
}

.fm-row-actions-menu i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.fm-row-actions-menu .divider {
    height: 1px;
    background: var(--fm-border-subtle);
    margin: 6px 0;
}

/* -----------------------------------------------------------------------------
   Pagination
   ----------------------------------------------------------------------------- */
.fm-data-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid var(--fm-border-subtle);
    background: var(--theme-bg-tertiary, rgba(22, 27, 34, 0.3));
}

.fm-pagination-info {
    font-size: 13px;
    color: var(--fm-text-muted);
}

.fm-pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fm-pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--fm-text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--fm-border-subtle);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fm-pagination-btn:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #58a6ff;
}

.fm-pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.fm-pagination-btn i {
    font-size: 10px;
}

/* -----------------------------------------------------------------------------
   Empty State
   ----------------------------------------------------------------------------- */
.fm-data-table-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    text-align: center;
}

.fm-data-table-empty-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: rgba(139, 148, 158, 0.1);
    border-radius: 50%;
    font-size: 24px;
    color: var(--fm-text-muted);
}

.fm-data-table-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--fm-text-primary);
    margin-bottom: 8px;
}

.fm-data-table-empty-text {
    font-size: 13px;
    color: var(--fm-text-muted);
    max-width: 300px;
}

.fm-data-table-empty-action {
    margin-top: 20px;
}

/* -----------------------------------------------------------------------------
   Loading State
   ----------------------------------------------------------------------------- */
.fm-data-table-loading {
    position: relative;
}

.fm-data-table-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 22, 29, 0.7);
    backdrop-filter: blur(2px);
    z-index: 10;
}

.fm-data-table-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.fm-data-table-loading-spinner i {
    font-size: 24px;
    color: #58a6ff;
    animation: fm-spin 1s linear infinite;
}

.fm-data-table-loading-spinner span {
    font-size: 13px;
    color: var(--fm-text-muted);
}

/* -----------------------------------------------------------------------------
   Date/Time Cell
   ----------------------------------------------------------------------------- */
.fm-datetime {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fm-datetime-date {
    font-weight: 500;
    color: var(--fm-text-primary);
}

.fm-datetime-time {
    font-size: 13px;
    color: var(--fm-text-muted);
}

/* -----------------------------------------------------------------------------
   User Cell
   ----------------------------------------------------------------------------- */
.fm-user-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fm-user-avatar {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #58a6ff;
    text-transform: uppercase;
}

.fm-user-name {
    font-size: 13px;
    color: var(--fm-text-secondary);
}

/* -----------------------------------------------------------------------------
   ID Cell
   ----------------------------------------------------------------------------- */
.fm-id-cell {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 12px;
    color: var(--fm-text-muted);
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

/* -----------------------------------------------------------------------------
   Responsive Adjustments
   ----------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .fm-list-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .fm-list-toolbar-left,
    .fm-list-toolbar-right {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .fm-data-table-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .fm-data-table-footer {
        flex-direction: column;
        gap: 12px;
    }

    .fm-pagination-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* =============================================================================
   ACTIVITY HEATMAP STYLES
   Modern heatmap visualization for file system activity
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Heatmap Controls
   ----------------------------------------------------------------------------- */
.fm-heatmap-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    padding: 20px;
    margin-bottom: 20px;
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.fm-heatmap-control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fm-heatmap-control-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--fm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Chip Select for Multi-Select Options */
.fm-chip-select {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fm-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--fm-text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--fm-border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--fm-border-subtle);
    color: var(--fm-text-primary);
}

.fm-chip.active {
    background: rgba(54, 127, 211, 0.15);
    border-color: var(--fm-accent-blue);
    color: var(--fm-accent-blue);
}

.fm-chip.active i {
    font-size: 10px;
}

/* Button Group */
.fm-btn-group {
    display: flex;
    border-radius: var(--fm-radius-md);
    overflow: hidden;
    border: 1px solid var(--fm-border-color);
}

.fm-btn-group .fm-btn {
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--fm-border-color);
}

.fm-btn-group .fm-btn:last-child {
    border-right: none;
}

/* Button Styles */
.fm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--fm-text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-md);
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--fm-text-primary);
}

.fm-btn.active {
    background: rgba(54, 127, 211, 0.15);
    border-color: var(--fm-accent-blue);
    color: var(--fm-accent-blue);
}

.fm-btn.primary {
    background: linear-gradient(135deg, var(--fm-accent-blue), #2563eb);
    border-color: var(--fm-accent-blue);
    color: white;
    font-weight: 600;
}

.fm-btn.primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--fm-accent-blue-glow);
}

.fm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fm-btn-accent {
    background: linear-gradient(135deg, var(--fm-accent-purple), var(--fm-accent-blue));
    border-color: var(--fm-accent-purple);
    color: white;
    font-weight: 500;
    padding: 8px 14px;
    font-size: 12px;
}

.fm-btn-accent:hover {
    background: linear-gradient(135deg, var(--fm-accent-purple), var(--fm-accent-blue));
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--fm-accent-purple-glow);
    color: white;
}

.fm-btn-accent i {
    font-size: 12px;
}

.fm-btn-sm {
    padding: 4px 8px;
    font-size: 11px;
}

.fm-btn-block {
    width: 100%;
}

/* Section Header Actions */
.fm-section-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Select Input */
.fm-select {
    padding: 8px 32px 8px 12px;
    font-size: 13px;
    color: var(--fm-text-primary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-md);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b949e' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all var(--fm-transition-fast);
}

.fm-select:hover {
    border-color: var(--fm-border-subtle);
}

.fm-select:focus {
    outline: none;
    border-color: var(--fm-accent-blue);
    box-shadow: 0 0 0 3px var(--fm-accent-blue-glow);
}

/* -----------------------------------------------------------------------------
   Loading State
   ----------------------------------------------------------------------------- */
.fm-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--fm-text-muted);
}

.fm-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--fm-border-color);
    border-top-color: var(--fm-accent-blue);
    border-radius: 50%;
    animation: fm-spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes fm-spin {
    to {
        transform: rotate(360deg);
    }
}

/* -----------------------------------------------------------------------------
   Heatmap Container & Grid
   ----------------------------------------------------------------------------- */
.fm-heatmap-container {
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    padding: 24px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Stats Summary */
.fm-heatmap-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--fm-border-subtle);
}

.fm-heatmap-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fm-heatmap-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--fm-text-primary);
    letter-spacing: -0.5px;
}

.fm-heatmap-stat-value.text-danger {
    color: var(--fm-accent-red);
}

.fm-heatmap-stat-label {
    font-size: 12px;
    color: var(--fm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Grid Wrapper */
.fm-heatmap-grid-wrapper {
    margin-bottom: 20px;
    overflow-x: auto;
}

/* Hour Labels Row */
.fm-heatmap-hour-labels {
    display: grid;
    grid-template-columns: 50px repeat(24, minmax(28px, 1fr));
    gap: 3px;
    margin-bottom: 3px;
}

.fm-heatmap-corner {
    /* Empty corner cell */
}

.fm-heatmap-hour-label {
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--fm-text-muted);
    padding: 4px 0;
}

/* Heatmap Row */
.fm-heatmap-row {
    display: grid;
    grid-template-columns: 50px repeat(24, minmax(28px, 1fr));
    gap: 3px;
    margin-bottom: 3px;
}

.fm-heatmap-day-label {
    display: flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--fm-text-muted);
    padding-right: 8px;
}

/* Heatmap Cell */
.fm-heatmap-cell {
    aspect-ratio: 1;
    min-width: 28px;
    min-height: 28px;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--fm-transition-fast);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fm-heatmap-cell:hover {
    transform: scale(1.15);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.fm-heatmap-cell-value {
    font-size: 9px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    opacity: 0;
    transition: opacity var(--fm-transition-fast);
}

.fm-heatmap-cell:hover .fm-heatmap-cell-value {
    opacity: 1;
}

/* Cell Levels */
.fm-heatmap-cell.level-0 {
    background: rgba(255, 255, 255, 0.03);
}

.fm-heatmap-cell.level-1 {
    background: rgba(59, 130, 246, 0.2);
}

.fm-heatmap-cell.level-2 {
    background: rgba(59, 130, 246, 0.4);
}

.fm-heatmap-cell.level-3 {
    background: rgba(59, 130, 246, 0.6);
}

.fm-heatmap-cell.level-4 {
    background: #3b82f6;
}

.fm-heatmap-cell.level-5 {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    animation: fm-pulse-cell 1.5s ease-in-out infinite;
}

@keyframes fm-pulse-cell {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    50% {
        box-shadow: 0 0 8px 4px rgba(239, 68, 68, 0.2);
    }
}

/* Legend */
.fm-heatmap-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--fm-border-subtle);
}

.fm-heatmap-legend-label {
    font-size: 12px;
    color: var(--fm-text-muted);
    font-weight: 500;
}

.fm-heatmap-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fm-heatmap-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.fm-heatmap-legend-color.level-0 {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--fm-border-color);
}

.fm-heatmap-legend-color.level-1 {
    background: rgba(59, 130, 246, 0.2);
}

.fm-heatmap-legend-color.level-2 {
    background: rgba(59, 130, 246, 0.4);
}

.fm-heatmap-legend-color.level-3 {
    background: rgba(59, 130, 246, 0.6);
}

.fm-heatmap-legend-color.level-4 {
    background: #3b82f6;
}

.fm-heatmap-legend-color.level-5 {
    background: #ef4444;
}

.fm-heatmap-legend-item span {
    font-size: 11px;
    color: var(--fm-text-secondary);
}

/* -----------------------------------------------------------------------------
   Timeline View
   ----------------------------------------------------------------------------- */
.fm-timeline-container {
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    padding: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    margin-bottom: 20px;
}

#heatmapTimelineChart {
    background: transparent !important;
}

/* -----------------------------------------------------------------------------
   Anomalies Section
   ----------------------------------------------------------------------------- */
.fm-heatmap-anomalies {
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    padding: 20px;
    margin-top: 20px;
}

.fm-heatmap-anomalies h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-anomaly-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fm-anomaly-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--fm-border-subtle);
    border-radius: var(--fm-radius-md);
    transition: all var(--fm-transition-fast);
}

.fm-anomaly-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--fm-border-color);
}

.fm-anomaly-item.critical {
    border-left: 3px solid var(--fm-accent-red);
}

.fm-anomaly-item.warning {
    border-left: 3px solid var(--fm-accent-orange);
}

.fm-anomaly-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.fm-anomaly-item.critical .fm-anomaly-icon {
    background: var(--fm-accent-red-glow);
    color: var(--fm-accent-red);
}

.fm-anomaly-item.warning .fm-anomaly-icon {
    background: var(--fm-accent-orange-glow);
    color: var(--fm-accent-orange);
}

.fm-anomaly-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fm-anomaly-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-anomaly-meta {
    font-size: 12px;
    color: var(--fm-text-muted);
}

.fm-anomaly-ops {
    font-size: 11px;
    color: var(--fm-text-secondary);
    font-family: 'SF Mono', 'Consolas', monospace;
}

/* -----------------------------------------------------------------------------
   Extensions Section
   ----------------------------------------------------------------------------- */
.fm-heatmap-extensions,
.fm-heatmap-top-extensions {
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    padding: 20px;
    margin-top: 20px;
}

.fm-heatmap-extensions h4,
.fm-heatmap-top-extensions h4,
.fm-heatmap-breakdown h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-extension-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fm-extension-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--fm-text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--fm-border-color);
    border-radius: 20px;
    font-family: 'SF Mono', 'Consolas', monospace;
}

.fm-extension-chip.danger {
    background: var(--fm-accent-red-glow);
    border-color: var(--fm-accent-red);
    color: var(--fm-accent-red);
}

.fm-extension-count {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

/* -----------------------------------------------------------------------------
   Breakdown Section
   ----------------------------------------------------------------------------- */
.fm-heatmap-breakdown {
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    padding: 20px;
    margin-top: 20px;
}

.fm-breakdown-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fm-breakdown-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fm-breakdown-label {
    width: 120px;
    font-size: 12px;
    color: var(--fm-text-secondary);
    flex-shrink: 0;
}

.fm-breakdown-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.fm-breakdown-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--fm-accent-blue), var(--fm-accent-cyan));
    border-radius: 4px;
    transition: width var(--fm-transition-normal);
}

.fm-breakdown-value {
    width: 80px;
    font-size: 12px;
    font-weight: 600;
    color: var(--fm-text-primary);
    text-align: right;
}

/* -----------------------------------------------------------------------------
   Cell Details Panel
   ----------------------------------------------------------------------------- */
.fm-cell-details-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    max-width: 90vw;
    background: var(--fm-bg-secondary);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    box-shadow: var(--fm-shadow-lg), 0 0 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fm-fade-in 0.2s ease;
}

@keyframes fm-fade-in {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.fm-cell-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--fm-border-color);
}

.fm-cell-details-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-btn-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--fm-text-muted);
    cursor: pointer;
    border-radius: var(--fm-radius-sm);
    transition: all var(--fm-transition-fast);
}

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

.fm-cell-details-body {
    padding: 20px;
}

.fm-cell-stat {
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--fm-text-primary);
}

.fm-cell-operations,
.fm-cell-subcategories {
    margin-bottom: 16px;
}

.fm-cell-operations strong,
.fm-cell-subcategories strong {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--fm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fm-cell-operations ul,
.fm-cell-subcategories ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.fm-cell-operations li,
.fm-cell-subcategories li {
    padding: 6px 0;
    font-size: 13px;
    color: var(--fm-text-secondary);
    border-bottom: 1px solid var(--fm-border-subtle);
}

.fm-cell-operations li:last-child,
.fm-cell-subcategories li:last-child {
    border-bottom: none;
}

/* -----------------------------------------------------------------------------
   Empty State
   ----------------------------------------------------------------------------- */
.fm-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.fm-empty-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--fm-border-color);
    border-radius: 50%;
    margin-bottom: 20px;
}

.fm-empty-icon i {
    font-size: 32px;
    color: var(--fm-text-muted);
}

.fm-empty-state h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-empty-state p {
    margin: 0;
    font-size: 14px;
    color: var(--fm-text-muted);
}

/* -----------------------------------------------------------------------------
   Responsive Adjustments for Heatmap
   ----------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .fm-heatmap-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .fm-heatmap-control-group {
        width: 100%;
    }

    .fm-chip-select {
        justify-content: center;
    }

    .fm-heatmap-stats {
        justify-content: center;
    }

    .fm-heatmap-cell {
        min-width: 20px;
        min-height: 20px;
    }

    .fm-heatmap-hour-label {
        font-size: 8px;
    }

    .fm-heatmap-day-label {
        font-size: 9px;
    }
}

/* =============================================================================
   FORENSICS PROCESSES PAGE - Modern Hunt Interface
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Hunt Search Section
   ----------------------------------------------------------------------------- */
.fm-hunt-section {
    position: relative;
    z-index: 100;
    background: var(--fm-bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--fm-shadow-md);
}

.fm-hunt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.fm-hunt-mode-tabs {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: var(--fm-radius-md);
}

.fm-hunt-mode-tab {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: var(--fm-radius-sm);
    color: var(--fm-text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-hunt-mode-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--fm-text-primary);
}

.fm-hunt-mode-tab.active {
    background: var(--fm-accent-blue);
    color: #fff;
    box-shadow: 0 2px 8px rgba(54, 127, 211, 0.35);
}

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

.fm-hunt-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-sm);
    color: var(--fm-text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-hunt-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--fm-border-accent);
    color: var(--fm-text-primary);
}

.fm-hunt-action-btn i {
    font-size: 14px;
}

/* Search Input Group */
.fm-hunt-input-wrapper {
    position: relative;
}

.fm-hunt-input-group {
    display: flex;
    align-items: stretch;
    background: rgba(0, 0, 0, 0.25);
    border: 2px solid var(--fm-border-color);
    border-radius: var(--fm-radius-md);
    overflow: hidden;
    transition: all var(--fm-transition-fast);
}

.fm-hunt-input-group:focus-within {
    border-color: var(--fm-accent-blue);
    box-shadow: 0 0 0 3px var(--fm-accent-blue-glow);
}

.fm-hunt-input-group.invalid {
    border-color: var(--fm-accent-red);
}

.fm-hunt-input-group.invalid:focus-within {
    box-shadow: 0 0 0 3px var(--fm-accent-red-glow);
}

.fm-hunt-input-group.valid {
    border-color: var(--fm-accent-green);
}

.fm-hunt-input-group.valid:focus-within {
    box-shadow: 0 0 0 3px var(--fm-accent-green-glow);
}

.fm-hunt-input-prefix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.03);
    border-right: 1px solid var(--fm-border-subtle);
}

.fm-hunt-search-input {
    flex: 1;
    padding: 14px 16px;
    background: transparent;
    border: none;
    color: var(--fm-text-primary);
    font-size: 14px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    outline: none;
}

.fm-hunt-search-input::placeholder {
    color: var(--fm-text-muted);
}

.fm-hunt-input-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
}

.fm-hunt-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: var(--fm-radius-sm);
    color: var(--fm-text-muted);
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-hunt-clear-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--fm-text-primary);
}

.fm-hunt-submit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--fm-accent-blue), #2563eb);
    border: none;
    border-radius: var(--fm-radius-sm);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--fm-transition-fast);
    box-shadow: 0 2px 8px rgba(54, 127, 211, 0.35);
}

.fm-hunt-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(54, 127, 211, 0.5);
}

.fm-hunt-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fm-hunt-submit-btn i {
    font-size: 14px;
}

/* Validation Message */
.fm-hunt-validation {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    border-radius: var(--fm-radius-sm);
    color: var(--fm-accent-red);
    font-size: 12px;
}

/* Autocomplete Dropdown */
.fm-hunt-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--fm-bg-secondary);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-md);
    box-shadow: var(--fm-shadow-lg);
    max-height: 350px;
    overflow-y: auto;
    z-index: 1000;
}

.fm-hunt-autocomplete-group {
    padding: 8px 0;
}

.fm-hunt-autocomplete-group+.fm-hunt-autocomplete-group {
    border-top: 1px solid var(--fm-border-subtle);
}

.fm-hunt-autocomplete-title {
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fm-text-muted);
}

.fm-hunt-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background var(--fm-transition-fast);
}

.fm-hunt-autocomplete-item:hover,
.fm-hunt-autocomplete-item.selected {
    background: rgba(54, 127, 211, 0.15);
}

.fm-hunt-autocomplete-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--fm-radius-sm);
    color: var(--fm-accent-blue);
}

.fm-hunt-autocomplete-icon i {
    font-size: 12px;
}

.fm-hunt-autocomplete-content {
    flex: 1;
    min-width: 0;
}

.fm-hunt-autocomplete-value {
    font-size: 13px;
    color: var(--fm-text-primary);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.fm-hunt-autocomplete-label {
    font-size: 11px;
    color: var(--fm-text-muted);
    margin-left: 8px;
}

.fm-hunt-autocomplete-hint {
    font-size: 11px;
    color: var(--fm-text-muted);
    white-space: nowrap;
}

/* Keyboard Shortcuts */
.fm-hunt-shortcuts {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--fm-border-subtle);
}

.fm-hunt-shortcut {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--fm-text-muted);
}

.fm-hunt-shortcut kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--fm-border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 10px;
    color: var(--fm-text-secondary);
}

/* Hint Panel */
.fm-hunt-hint-panel {
    margin-top: 16px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--fm-border-subtle);
    border-radius: var(--fm-radius-md);
}

.fm-hunt-hint-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.fm-hunt-hint-header i {
    color: var(--fm-accent-orange);
}

.fm-hunt-hint-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-hunt-hint-body {
    font-size: 13px;
    color: var(--fm-text-secondary);
    line-height: 1.5;
}

.fm-hunt-hint-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.fm-hunt-hint-chip {
    display: inline-flex;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--fm-border-color);
    border-radius: 12px;
    font-size: 11px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    color: var(--fm-text-secondary);
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-hunt-hint-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--fm-border-accent);
    color: var(--fm-text-primary);
}

.fm-hunt-hint-example {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--fm-radius-sm);
    border-left: 3px solid var(--fm-accent-orange);
}

.fm-hunt-hint-example pre {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--fm-text-secondary);
    font-size: 12px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

.fm-hunt-hint-extra {
    margin-top: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--fm-border-subtle);
    border-radius: var(--fm-radius-sm);
    font-size: 12px;
    color: var(--fm-text-secondary);
    line-height: 1.5;
}

.fm-hunt-hint-extra strong {
    color: var(--fm-text-primary);
    font-weight: 600;
}

.fm-hunt-hint-extra pre {
    margin: 8px 0;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--fm-border-subtle);
    border-radius: var(--fm-radius-sm);
    color: var(--fm-accent-cyan);
    font-size: 11px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
}

.fm-hunt-hint-extra div {
    margin-top: 8px;
    color: var(--fm-text-muted);
    font-size: 11px;
}

/* -----------------------------------------------------------------------------
   Timeline Chart Section
   ----------------------------------------------------------------------------- */
.fm-timeline-section {
    position: relative;
    z-index: 10;
    background: var(--fm-bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--fm-shadow-md);
}

.fm-timeline-section .dropdown-menu {
    z-index: 1050;
}

/* Timeline Actions Bar (below chart) */
.fm-timeline-actions {
    position: relative;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-md);
    margin-top: 12px;
    margin-bottom: 20px;
    overflow: visible;
}

/* Ensure dropdowns in timeline actions appear above other elements */
.fm-timeline-actions .dropdown-menu {
    z-index: 1050;
}

.fm-timeline-actions .fm-timeline-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.fm-timeline-actions .fm-timeline-controls-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.fm-timeline-actions .fm-timeline-controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

/* Filter label styling */
.fm-timeline-actions .fm-filter-label,
.fm-timeline-actions .fm-filter-bar .fm-filter-label {
    color: var(--fm-text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.fm-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.fm-timeline-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-timeline-controls {
    display: flex;
    gap: 8px;
}

.fm-timeline-control-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-sm);
    color: var(--fm-text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-timeline-control-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--fm-border-accent);
    color: var(--fm-text-primary);
}

.fm-timeline-control-btn .caret {
    margin-left: 4px;
}

/* Dropdown menu styling for view toggle */
.fm-results-actions .dropdown-menu {
    background: rgba(30, 35, 45, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    padding: 6px;
    min-width: 140px;
}

.fm-results-actions .dropdown-menu>li>a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: #c8d2dc !important;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.fm-results-actions .dropdown-menu>li>a i {
    width: 16px;
    text-align: center;
    opacity: 0.8;
    color: #c8d2dc !important;
    transition: all 0.15s ease;
}

.fm-results-actions .dropdown-menu>li>a:hover {
    background: rgba(54, 127, 211, 0.3);
    color: #fff !important;
    text-decoration: none;
}

.fm-results-actions .dropdown-menu>li>a:hover i {
    opacity: 1;
    color: #fff !important;
}


/* Consistent dropdown styling for all forensics dropdowns */
/* Active/Selected state - blue background with WHITE text/icons */
.fm-results-actions .dropdown-menu li.active,
.fm-results-actions .dropdown-menu li.active a,
.fm-timeline-section .dropdown-menu li.active,
.fm-timeline-section .dropdown-menu li.active a,
.fm-hunt-interface .dropdown-menu li.active,
.fm-hunt-interface .dropdown-menu li.active a,
.fm-filter-section .dropdown-menu li.active,
.fm-filter-section .dropdown-menu li.active a,
.fm-section .dropdown-menu li.active,
.fm-section .dropdown-menu li.active a {
    background-color: #367fd3 !important;
    color: #fff !important;
}

.fm-results-actions .dropdown-menu li.active a i,
.fm-timeline-section .dropdown-menu li.active a i,
.fm-hunt-interface .dropdown-menu li.active a i,
.fm-filter-section .dropdown-menu li.active a i,
.fm-section .dropdown-menu li.active a i {
    color: #fff !important;
    opacity: 1 !important;
}

/* Hover state - consistent across all forensics dropdowns */
.fm-results-actions .dropdown-menu li a:hover,
.fm-timeline-section .dropdown-menu li a:hover,
.fm-hunt-interface .dropdown-menu li a:hover,
.fm-filter-section .dropdown-menu li a:hover,
.fm-section .dropdown-menu li a:hover {
    background-color: rgba(54, 127, 211, 0.3) !important;
    color: #fff !important;
}

.fm-results-actions .dropdown-menu li a:hover i,
.fm-timeline-section .dropdown-menu li a:hover i,
.fm-hunt-interface .dropdown-menu li a:hover i,
.fm-filter-section .dropdown-menu li a:hover i,
.fm-section .dropdown-menu li a:hover i {
    color: #fff !important;
    opacity: 1 !important;
}

.fm-timeline-chart {
    position: relative;
    height: 180px;
    width: 100%;
}

.fm-timeline-chart.loading {
    opacity: 0.5;
    pointer-events: none;
}

.fm-timeline-info {
    text-align: center;
    padding: 8px 0;
    font-size: 12px;
    color: var(--fm-text-muted);
}

.fm-timeline-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--fm-border-subtle);
    margin-top: 16px;
}

.fm-timeline-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: opacity var(--fm-transition-fast);
}

.fm-timeline-legend-item.disabled {
    opacity: 0.4;
}

.fm-timeline-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.fm-timeline-legend-label {
    font-size: 12px;
    color: var(--fm-text-secondary);
}

.fm-timeline-legend-count {
    font-size: 11px;
    color: var(--fm-text-muted);
}

/* -----------------------------------------------------------------------------
   Results Section
   ----------------------------------------------------------------------------- */
.fm-results-section {
    background: var(--fm-bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    overflow: hidden;
    box-shadow: var(--fm-shadow-md);
}

/* Filter bar needs higher z-index for dropdown to appear above table */
/* Filter Bar - label + button inline */
.fm-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 50;
    overflow: visible;
}

.fm-filter-bar .fm-filter-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--fm-text-secondary);
    white-space: nowrap;
}

.fm-filter-bar .fm-filter-label i {
    color: var(--fm-text-muted);
}

.fm-results-section.fm-filter-bar {
    position: relative;
    z-index: 9;
    overflow: visible;
    /* Override inline style="margin-bottom:20px; padding:12px 20px"
       baked into data-tab HTML across Files/Processes/Networks/etc.
       Inline non-important loses to author !important — this is the
       cleanest CSS-only way to compress the actions bar without
       touching ~30 HTML sites. */
    margin-bottom: 8px !important;
    padding: 6px 14px !important;
}

.fm-filter-bar .dropdown-menu {
    z-index: 1050;
}

/* Toggle Switch Styles */
.fm-toggle-wrapper {
    display: flex;
    align-items: center;
}

.fm-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.fm-toggle input {
    display: none;
}

.fm-toggle-slider {
    position: relative;
    width: 36px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    transition: all 0.2s ease;
}

.fm-toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.fm-toggle input:checked+.fm-toggle-slider {
    background: rgba(54, 127, 211, 0.4);
    border-color: #367fd3;
}

.fm-toggle input:checked+.fm-toggle-slider::before {
    transform: translateX(16px);
    background: #367fd3;
}

.fm-toggle-label {
    font-size: 13px;
    color: var(--fm-text-secondary);
    transition: color 0.2s ease;
}

.fm-toggle:hover .fm-toggle-label {
    color: var(--fm-text-primary);
}

.fm-toggle input:checked~.fm-toggle-label {
    color: #367fd3;
}

/* Light Theme Overrides for Toggle */
html[data-theme="light"] .fm-toggle-slider,
[data-theme="light"] .fm-toggle-slider {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .fm-toggle-slider::before,
[data-theme="light"] .fm-toggle-slider::before {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

html[data-theme="light"] .fm-toggle input:checked+.fm-toggle-slider,
[data-theme="light"] .fm-toggle input:checked+.fm-toggle-slider {
    background: rgba(54, 127, 211, 0.8);
    border-color: #367fd3;
}

.fm-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--fm-border-color);
}

.fm-results-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fm-results-title h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-results-meta {
    font-size: 12px;
    color: var(--fm-text-muted);
}

.fm-results-actions {
    display: flex;
    gap: 8px;
}

/* Filter Tags */
.fm-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--fm-border-subtle);
}

.fm-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--fm-border-color);
    border-radius: 20px;
    font-size: 13px;
    color: var(--fm-text-secondary);
    transition: all var(--fm-transition-fast);
}

/* Include filter tag - Green */
.fm-filter-tag-include {
    background: rgba(63, 185, 80, 0.15);
    border-color: rgba(63, 185, 80, 0.5);
}

.fm-filter-tag-include .fm-filter-tag-type {
    background: rgba(63, 185, 80, 0.35);
    color: #fff;
}

.fm-filter-tag-include .fm-filter-tag-value {
    color: var(--fm-text-primary);
}

.fm-filter-tag-include .fm-filter-tag-remove {
    background: rgba(63, 185, 80, 0.3);
    color: #fff;
}

.fm-filter-tag-include .fm-filter-tag-remove:hover {
    background: var(--fm-accent-green);
    color: #fff;
}

/* Exclude filter tag - Red */
.fm-filter-tag-exclude {
    background: rgba(248, 81, 73, 0.15);
    border-color: rgba(248, 81, 73, 0.5);
}

.fm-filter-tag-exclude .fm-filter-tag-type {
    background: rgba(248, 81, 73, 0.35);
    color: #fff;
}

.fm-filter-tag-exclude .fm-filter-tag-value {
    color: var(--fm-text-primary);
}

.fm-filter-tag-exclude .fm-filter-tag-remove {
    background: rgba(248, 81, 73, 0.3);
    color: #fff;
}

.fm-filter-tag-exclude .fm-filter-tag-remove:hover {
    background: var(--fm-accent-red);
    color: #fff;
}

/* Filter tag type label (AND/NOT) */
.fm-filter-tag-type {
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
}

/* Filter tag value */
.fm-filter-tag-value {
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Filter tag remove button */
.fm-filter-tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--fm-text-muted);
    font-size: 10px;
    cursor: pointer;
    transition: all var(--fm-transition-fast);
    margin-left: 2px;
}

.fm-filter-tag-remove:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.fm-filter-tag-remove i {
    font-size: 10px;
}

/* Legacy class support */
.fm-filter-tag.include {
    background: rgba(63, 185, 80, 0.15);
    border-color: rgba(63, 185, 80, 0.5);
    color: var(--fm-text-primary);
}

.fm-filter-tag.exclude {
    background: rgba(248, 81, 73, 0.15);
    border-color: rgba(248, 81, 73, 0.5);
    color: var(--fm-text-primary);
}

.fm-filter-tag-label {
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
}

.fm-filter-tag-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: inherit;
    font-size: 10px;
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-filter-tag-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Results Table */
.fm-results-table-wrapper {
    overflow-x: auto;
    overflow-y: visible;

    /* Custom scrollbar for WebKit browsers */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.fm-results-table-wrapper::-webkit-scrollbar {
    height: 8px;
    background: transparent;
}

.fm-results-table-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    margin: 0 4px;
}

.fm-results-table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.fm-results-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.fm-results-table-wrapper::-webkit-scrollbar-thumb:active {
    background: rgba(54, 127, 211, 0.5);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.fm-results-table-wrapper::-webkit-scrollbar-corner {
    background: transparent;
}

.fm-results-table-wrapper {
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* Light theme: use accent-blue scrollbars for results tables */
html[data-theme="light"] .fm-results-table-wrapper,
[data-theme="light"] .fm-results-table-wrapper {
    scrollbar-color: var(--theme-scrollbar-thumb) var(--theme-scrollbar-track);
}

html[data-theme="light"] .fm-results-table-wrapper::-webkit-scrollbar-track,
[data-theme="light"] .fm-results-table-wrapper::-webkit-scrollbar-track {
    background: var(--theme-scrollbar-track);
}

html[data-theme="light"] .fm-results-table-wrapper::-webkit-scrollbar-thumb,
[data-theme="light"] .fm-results-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--theme-scrollbar-thumb);
    border: 2px solid transparent;
    background-clip: padding-box;
}

html[data-theme="light"] .fm-results-table-wrapper::-webkit-scrollbar-thumb:hover,
[data-theme="light"] .fm-results-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--theme-scrollbar-thumb-hover);
}

html[data-theme="light"] .fm-results-table-wrapper::-webkit-scrollbar-thumb:active,
[data-theme="light"] .fm-results-table-wrapper::-webkit-scrollbar-thumb:active {
    background: var(--theme-accent-blue);
}

.fm-results-table {
    width: 100%;
    border-collapse: collapse;
}

.fm-results-table th {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 8px 14px;
    background: rgba(13, 17, 23, 0.96);
    border-bottom: 1px solid var(--fm-border-color);
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fm-text-muted);
    white-space: nowrap;
}

[data-theme="light"] .fm-results-table th,
html[data-theme="light"] .fm-results-table th {
    background: rgba(248, 250, 252, 0.98);
}

.fm-results-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--fm-border-subtle);
    font-size: 13px;
    color: var(--fm-text-secondary);
    vertical-align: middle;
}

.fm-results-table tbody tr {
    transition: background var(--fm-transition-fast);
}

.fm-results-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.015);
}

[data-theme="light"] .fm-results-table tbody tr:nth-child(even),
html[data-theme="light"] .fm-results-table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.025);
}

.fm-results-table tbody tr:hover {
    background: rgba(54, 127, 211, 0.08);
}

.fm-results-table tbody tr.expanded {
    background: rgba(54, 127, 211, 0.12);
}

/* Cell with Hover Actions */
/* Cell with Hover Actions - Modern Overlay Style */
.fm-cell-hoverable {
    position: relative;
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

/* Overlay background on hover */
.fm-cell-hoverable::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -4px;
    right: -4px;
    bottom: -2px;
    background: rgba(54, 127, 211, 0.08);
    border: 1px solid rgba(54, 127, 211, 0.3);
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: all var(--fm-transition-fast);
    z-index: 1;
}

.fm-cell-hoverable:hover::before {
    opacity: 1;
}

/* Cell content wrapper for proper z-index */
.fm-cell-hoverable>span,
.fm-cell-hoverable>.fm-hash,
.fm-cell-hoverable>.fm-cmdline,
.fm-cell-hoverable>.fm-signer-status {
    position: relative;
    z-index: 2;
}

/* Actions toolbar - same as Cards View */
.fm-cell-actions,
.fm-cell-actions-toolbar {
    position: absolute;
    top: -28px;
    left: 8px;
    transform: none;
    display: flex;
    gap: 2px;
    padding: 3px;
    background: rgba(22, 28, 36, 0.98);
    border: 1px solid var(--fm-border-color);
    border-radius: 6px;
    box-shadow: var(--fm-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.15s ease;
    z-index: 100;
}

.fm-cell-hoverable:hover .fm-cell-actions-toolbar {
    opacity: 1;
    visibility: visible;
    top: -32px;
}

/* Legacy - keep for backwards compatibility */
.fm-cell-actions-legacy {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
    padding: 4px;
    background: var(--fm-bg-secondary);
    border: 1px solid var(--fm-border-color);
    border-radius: 8px;
    box-shadow: var(--fm-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--fm-transition-fast);
    z-index: 100;
}

/* Arrow pointing down from toolbar */
.fm-cell-actions::after,
.fm-cell-actions-toolbar::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--fm-border-color);
}

.fm-cell-actions::before,
.fm-cell-actions-toolbar::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--fm-bg-secondary);
    z-index: 1;
}

.fm-cell-hoverable:hover .fm-cell-actions {
    opacity: 1;
    visibility: visible;
    top: -32px;
}

/* Individual action buttons - same as Cards View */
.fm-cell-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--fm-text-secondary);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fm-cell-action:hover {
    transform: scale(1.1);
}

/* Include button (first action or with .include class) */
.fm-cell-action:first-child:hover,
.fm-cell-action.include:hover {
    background: var(--fm-accent-green);
    color: #fff !important;
}

.fm-cell-action:first-child:hover i,
.fm-cell-action.include:hover i {
    color: #fff !important;
}

/* Exclude button */
.fm-cell-action.exclude:hover {
    background: var(--fm-accent-red);
    color: #fff !important;
}

.fm-cell-action.exclude:hover i {
    color: #fff !important;
}

/* Copy button (last action or default) */
.fm-cell-action:last-child:hover {
    background: var(--fm-accent-orange);
    color: #fff !important;
}

.fm-cell-action:last-child:hover i {
    color: #fff !important;
}

/* Tooltip labels for actions */
.fm-cell-action[title] {
    position: relative;
}

/* Light theme for Cell Actions (Table View) */
[data-theme="light"] .fm-cell-actions,
[data-theme="light"] .fm-cell-actions-toolbar {
    background: rgba(255, 255, 255, 0.98);
    border-color: var(--theme-border-solid);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .fm-cell-actions::before,
[data-theme="light"] .fm-cell-actions-toolbar::before {
    border-top-color: rgba(255, 255, 255, 0.98);
}

[data-theme="light"] .fm-cell-actions::after,
[data-theme="light"] .fm-cell-actions-toolbar::after {
    border-top-color: var(--theme-border-solid);
}

[data-theme="light"] .fm-cell-action {
    color: #333;
}

/* Override darkblue.css .fa-plus:hover for cell actions */
[data-theme="light"] .fm-cell-action .fa-plus,
[data-theme="light"] .fm-cell-action .fa-plus:hover,
[data-theme="light"] .fm-cell-action:first-child .fa-plus,
[data-theme="light"] .fm-cell-action:first-child:hover .fa-plus {
    color: #333 !important;
}

[data-theme="light"] .fm-cell-action:first-child:hover,
[data-theme="light"] .fm-cell-action.include:hover,
[data-theme="light"] .fm-cell-action.exclude:hover,
[data-theme="light"] .fm-cell-action:last-child:hover {
    color: #fff !important;
}

[data-theme="light"] .fm-cell-action:first-child:hover .fa-plus,
[data-theme="light"] .fm-cell-action.include:hover .fa-plus {
    color: #fff !important;
}


/* Process Tree Button */
.fm-tree-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(54, 127, 211, 0.1);
    border: 1px solid rgba(54, 127, 211, 0.3);
    border-radius: var(--fm-radius-sm);
    color: var(--fm-accent-blue);
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-tree-btn:hover {
    background: rgba(54, 127, 211, 0.2);
    border-color: var(--fm-accent-blue);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(54, 127, 211, 0.3);
}

.fm-tree-btn:active {
    transform: scale(0.95);
}

.fm-tree-btn i {
    font-size: 14px;
}

/* No Tree Indicator */
.fm-no-tree {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--fm-text-muted);
    opacity: 0.3;
}

.fm-no-tree i {
    font-size: 10px;
}

/* -----------------------------------------------------------------------------
   Process Tree Modal (Fullscreen)
   ----------------------------------------------------------------------------- */
.fm-tree-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99999;
}

.fm-tree-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.fm-tree-modal {
    position: fixed;
    top: 30px;
    left: 30px;
    right: 30px;
    bottom: 30px;
    background: #0f1419;
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(59, 130, 246, 0.1);
    transform: scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100000;
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
}

.fm-tree-modal.show {
    transform: scale(1);
    opacity: 1;
    visibility: visible;
    display: flex !important;
}

.fm-tree-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.fm-tree-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.fm-tree-modal-title>i {
    color: #3b82f6;
    font-size: 22px;
}

.fm-tree-process-name {
    color: #22d3ee;
    font-weight: 500;
    margin-left: 4px;
}

.fm-tree-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #f87171;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.fm-tree-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ffffff;
}

.fm-tree-modal-close i {
    font-size: 16px;
}

.fm-tree-modal-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    background-color: #0f1419;
}

.fm-tree-modal-content process-tree {
    display: block;
    height: 100%;
}

.fm-tree-modal-content .process-tree-container {
    height: 100% !important;
    border-radius: 0 0 14px 14px;
}

/* Light Theme Overrides for Process Tree Modal */
html[data-theme="light"] .fm-tree-modal-overlay,
[data-theme="light"] .fm-tree-modal-overlay {
    background: rgba(255, 255, 255, 0.75);
}

html[data-theme="light"] .fm-tree-modal,
[data-theme="light"] .fm-tree-modal {
    background: #ffffff;
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15), 0 0 40px rgba(59, 130, 246, 0.05);
}

html[data-theme="light"] .fm-tree-modal-content,
[data-theme="light"] .fm-tree-modal-content {
    background-color: #ffffff;
}

html[data-theme="light"] .fm-tree-modal-header,
[data-theme="light"] .fm-tree-modal-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .fm-tree-modal-title,
[data-theme="light"] .fm-tree-modal-title {
    color: #1e293b;
}

html[data-theme="light"] .fm-tree-modal-title > i,
[data-theme="light"] .fm-tree-modal-title > i {
    color: #2563eb;
}

html[data-theme="light"] .fm-tree-process-name,
[data-theme="light"] .fm-tree-process-name {
    color: #0284c7;
}

html[data-theme="light"] .fm-tree-modal-close,
[data-theme="light"] .fm-tree-modal-close {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

html[data-theme="light"] .fm-tree-modal-close:hover,
[data-theme="light"] .fm-tree-modal-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

.fm-tree-loading,
.fm-tree-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--fm-text-secondary);
}

.fm-tree-loading h3,
.fm-tree-error h3 {
    margin: 16px 0 8px;
    font-size: 18px;
    color: var(--fm-text-primary);
}

.fm-tree-error .fm-empty-icon i {
    color: var(--fm-accent-orange);
}

.fm-tree-error p {
    margin-bottom: 16px;
    color: var(--fm-text-muted);
}

/* Legacy Expand Button (keep for backward compatibility) */
.fm-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-sm);
    color: var(--fm-text-muted);
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-expand-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--fm-accent-blue);
    color: var(--fm-accent-blue);
}

.fm-expand-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.fm-expand-btn.expanded {
    background: rgba(54, 127, 211, 0.15);
    border-color: var(--fm-accent-blue);
    color: var(--fm-accent-blue);
}

/* Tag Button */
.fm-tag-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    transition: transform 0.2s ease;
    outline: none !important;
    box-shadow: none !important;
}

.fm-tag-btn:hover {
    transform: scale(1.1);
}

.fm-tag-btn:focus,
.fm-tag-btn:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.fm-tag-btn img {
    width: 24px;
    height: 24px;
}

/* Signer Status */
.fm-signer-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

.fm-signer-status.signed {
    background: rgba(63, 185, 80, 0.1);
    color: var(--fm-accent-green);
}

.fm-signer-status.unsigned {
    background: rgba(248, 81, 73, 0.1);
    color: var(--fm-accent-red);
}

/* Hash Display */
.fm-hash {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: var(--fm-text-muted);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Command Line Display */
.fm-cmdline {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: var(--fm-text-secondary);
    max-width: 400px;
    word-break: break-all;
    line-height: 1.4;
}

/* Score Badge */
.fm-score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.fm-score-badge.low {
    background: rgba(63, 185, 80, 0.15);
    color: var(--fm-accent-green);
}

.fm-score-badge.medium {
    background: rgba(210, 153, 34, 0.15);
    color: var(--fm-accent-orange);
}

.fm-score-badge.high {
    background: rgba(248, 81, 73, 0.15);
    color: var(--fm-accent-red);
}

/* -----------------------------------------------------------------------------
   Raw View - Modern JSON Cards
   ----------------------------------------------------------------------------- */
.fm-raw-view {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.fm-raw-view.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Override any inherited table styles */
.fm-results-table-wrapper .fm-raw-view,
.fm-results-table-wrapper .fm-raw-card,
.fm-results-table-wrapper .fm-raw-card *,
.fm-results-table-wrapper pre,
.fm-results-table-wrapper code {
    border-collapse: separate !important;
}

.fm-raw-card {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    overflow: hidden;
    transition: all 0.2s ease;
    outline: none !important;
    box-shadow: none;
}

.fm-raw-card * {
    outline: none !important;
}

.fm-raw-card:hover {
    border-color: rgba(54, 127, 211, 0.4) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.fm-raw-card:focus,
.fm-raw-card:focus-within {
    outline: none !important;
    box-shadow: none;
}

.fm-raw-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.fm-raw-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-raw-card-timestamp {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--fm-text-secondary);
    margin-left: 16px;
}

.fm-raw-card-timestamp i {
    color: var(--fm-text-muted);
    font-size: 11px;
}

.fm-raw-card-spacer {
    flex: 1;
}

.fm-raw-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(54, 127, 211, 0.15);
    border: 1px solid rgba(54, 127, 211, 0.25);
    border-radius: 6px;
    color: #367fd3;
    font-size: 13px;
}

.fm-raw-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fm-raw-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-raw-card-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--fm-text-muted);
}

.fm-raw-card-time i {
    font-size: 11px;
}

.fm-raw-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fm-raw-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    color: rgba(180, 190, 210, 1) !important;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none !important;
    box-shadow: none !important;
}

.fm-raw-action-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

.fm-raw-action-btn:focus,
.fm-raw-action-btn:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border-color: rgba(54, 127, 211, 0.5) !important;
}

.fm-raw-action-btn:active {
    background: rgba(255, 255, 255, 0.06) !important;
}

.fm-raw-action-btn i {
    font-size: 12px;
}

.fm-raw-card-body {
    padding: 10px 14px;
    background: transparent !important;
    border: none !important;
    max-height: 360px;
    overflow: auto;
}

/* Compact Fields View */
.fm-raw-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.fm-raw-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.25) !important;
    border-radius: 6px !important;
    border: none !important;
    border-left: 3px solid rgba(255, 165, 0, 0.5) !important;
}

.fm-raw-field-key {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fm-text-muted);
}

.fm-raw-field-value {
    font-size: 13px;
    color: var(--fm-text-primary);
    word-break: break-all;
}

.fm-raw-field-path,
.fm-raw-field-cmd {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    color: var(--fm-accent-cyan);
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.fm-raw-field-hash {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 11px;
    color: var(--fm-text-secondary);
}

.fm-signer-signed {
    color: var(--fm-accent-green) !important;
}

.fm-signer-unsigned {
    color: var(--fm-accent-orange) !important;
}

/* Expanded JSON View */
.fm-raw-json-view {
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 0 !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.fm-raw-json,
.fm-raw-card .fm-raw-json,
.fm-raw-card-body .fm-raw-json,
.fm-raw-json-view .fm-raw-json,
.fm-raw-card pre,
.fm-raw-card-body pre {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: rgba(180, 190, 210, 1);
    white-space: pre-wrap;
    word-break: break-all;
}

.fm-raw-json code,
.fm-raw-card code,
.fm-raw-card-body code,
.fm-raw-json-view code,
.fm-raw-card .code,
.fm-raw-card-body .code {
    display: block;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.fm-json-key {
    color: #9cdcfe;
}

.fm-json-value {
    color: var(--fm-text-secondary);
}

.fm-json-string {
    color: #ce9178;
}

.fm-json-number {
    color: #b5cea8;
}

.fm-json-bool {
    color: #569cd6;
}

.fm-json-null {
    color: #6b7280;
    font-style: italic;
}

/* Light Theme Overrides for JSON Viewer */
html[data-theme="light"] .fm-json-key,
[data-theme="light"] .fm-json-key {
    color: #0451a5;
}

html[data-theme="light"] .fm-json-string,
[data-theme="light"] .fm-json-string {
    color: #a31515;
}

html[data-theme="light"] .fm-json-number,
[data-theme="light"] .fm-json-number {
    color: #098658;
}

html[data-theme="light"] .fm-json-bool,
[data-theme="light"] .fm-json-bool {
    color: #0000ff;
}

html[data-theme="light"] .fm-json-null,
[data-theme="light"] .fm-json-null {
    color: #0000ff;
}

/* Process Tree Container */
.fm-process-tree {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
}

.fm-process-tree-canvas {
    height: 500px;
    width: 100%;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--fm-border-subtle);
    border-radius: var(--fm-radius-md);
}

/* Load More Button */
.fm-load-more {
    display: flex;
    justify-content: center;
    padding: 20px;
    border-top: 1px solid var(--fm-border-subtle);
}

.fm-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: rgba(54, 127, 211, 0.15);
    border: 1px solid rgba(54, 127, 211, 0.3);
    border-radius: var(--fm-radius-md);
    color: var(--fm-accent-blue);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-load-more-btn:hover:not(:disabled) {
    background: rgba(54, 127, 211, 0.25);
    border-color: var(--fm-accent-blue);
}

.fm-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Active Users List */
.fm-active-users {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fm-active-user {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--fm-text-secondary);
}

.fm-active-user i {
    font-size: 12px;
    color: var(--fm-text-muted);
}

/* -----------------------------------------------------------------------------
   Responsive Adjustments for Processes Page
   ----------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .fm-hunt-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .fm-hunt-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .fm-hunt-section {
        padding: 16px;
    }

    .fm-hunt-mode-tabs {
        width: 100%;
    }

    .fm-hunt-mode-tab {
        flex: 1;
        justify-content: center;
    }

    .fm-hunt-input-prefix {
        display: none;
    }

    .fm-hunt-submit-btn span {
        display: none;
    }

    .fm-timeline-controls {
        flex-wrap: wrap;
    }

    .fm-results-table th,
    .fm-results-table td {
        padding: 10px 12px;
    }
}

/* -----------------------------------------------------------------------------
   Raw View - Global Override (Fix inherited borders)
   ----------------------------------------------------------------------------- */
.fm-raw-view,
.fm-raw-view *,
.fm-raw-card,
.fm-raw-card *,
.fm-raw-card-header,
.fm-raw-card-header *,
.fm-raw-card-body,
.fm-raw-card-body *,
.fm-raw-json-view,
.fm-raw-json-view * {
    border-color: transparent !important;
    outline-color: transparent !important;
}

.fm-raw-card {
    border: 1px solid rgba(60, 70, 90, 0.4) !important;
}

.fm-raw-card-header {
    border-bottom: 1px solid rgba(60, 70, 90, 0.3) !important;
}

/* Raw View Header Text Colors */
.fm-raw-card-title {
    color: #e6edf3 !important;
}

.fm-raw-card-timestamp {
    color: #8b949e !important;
}

.fm-raw-card-timestamp i {
    color: #6e7681 !important;
}

.fm-raw-field {
    border: none !important;
    border-left: 3px solid rgba(255, 165, 0, 0.4) !important;
    background: transparent !important;
}

/* -----------------------------------------------------------------------------
   Cards View - Semantic Card Component
   
   Naming Convention (reusable across artifact types):
   .fm-card                 → Main card container
     .fm-card-header        → Identity bar: primary identifier + badges + actions
     .fm-card-body          → Card content wrapper
       .fm-card-attributes  → Key-value property pairs grid
         .fm-card-attribute → Individual property item
       .fm-card-identifiers → Unique fingerprints (hashes, GUIDs)
         .fm-card-identifier→ Individual identifier item
       .fm-card-context     → Primary context/location (path, URL, address)
       .fm-card-content     → Main payload/data (command line, value, body)
   ----------------------------------------------------------------------------- */
.fm-cards-view,
.fm-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(540px, 1fr));
    gap: 10px;
    padding: 12px;
    align-items: start;
}

@media (max-width: 980px) {

    .fm-cards-view,
    .fm-cards-container {
        grid-template-columns: 1fr;
    }
}

.fm-cards-view.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Main Card Container */
.fm-card {
    background: linear-gradient(145deg, rgba(22, 28, 36, 0.95) 0%, rgba(17, 22, 29, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.15s ease;
}

.fm-card:hover {
    border-color: rgba(255, 165, 0, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 165, 0, 0.1);
}

/* Card Header */
.fm-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    flex-wrap: wrap;
}

.fm-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: var(--fm-text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.fm-card-btn:hover {
    background: rgba(255, 165, 0, 0.2);
    border-color: rgba(255, 165, 0, 0.4);
    color: var(--fm-accent-orange);
}

.fm-card-btn.tree {
    color: var(--fm-accent-orange);
    background: rgba(255, 165, 0, 0.1);
    border-color: rgba(255, 165, 0, 0.25);
}

.fm-card-btn.tree:hover {
    background: rgba(255, 165, 0, 0.25);
    color: #fff;
}

.fm-card-btn.no-tree {
    opacity: 0.25;
    cursor: default;
}

.fm-card-btn.no-tree:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--fm-text-muted);
}

.fm-card-btn.tagged {
    background: rgba(255, 165, 0, 0.2);
    border-color: var(--fm-accent-orange);
    color: var(--fm-accent-orange);
}

.fm-card-header-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 6px;
}

.fm-card-name-wrapper {
    position: relative;
    cursor: pointer;
    padding: 4px 8px;
    margin: -4px 0;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.fm-card-name-wrapper:hover {
    background: rgba(255, 255, 255, 0.05);
}

.fm-card-name-wrapper:hover .fm-item-actions {
    opacity: 1;
    visibility: visible;
}

.fm-card-name-wrapper .fm-item-actions {
    top: -10px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
}

.fm-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.fm-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--fm-text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.fm-badge-label {
    opacity: 0.6;
    text-transform: uppercase;
    font-size: 9px;
}

.fm-card-badge.artifact {
    background: rgba(163, 113, 247, 0.15);
    color: var(--fm-accent-purple);
    border: 1px solid rgba(163, 113, 247, 0.25);
    position: relative;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fm-card-badge.artifact:hover {
    background: rgba(163, 113, 247, 0.25);
}

.fm-card-badge.artifact:hover .fm-item-actions {
    opacity: 1;
    visibility: visible;
}

.fm-card-badge .fm-item-actions {
    top: -10px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
}

.fm-card-badge.score-low {
    background: rgba(63, 185, 80, 0.2);
    color: var(--fm-accent-green);
    border: 1px solid rgba(63, 185, 80, 0.3);
}

.fm-card-badge.score-med {
    background: rgba(210, 153, 34, 0.2);
    color: var(--fm-accent-orange);
    border: 1px solid rgba(210, 153, 34, 0.3);
}

.fm-card-badge.score-high {
    background: rgba(248, 81, 73, 0.2);
    color: var(--fm-accent-red);
    border: 1px solid rgba(248, 81, 73, 0.3);
}

/* Event Level Badge - Specific styles */
.fm-card-badge.level-info,
.fm-card-badge.level-information {
    background: rgba(88, 166, 255, 0.2) !important;
    color: #58a6ff !important;
    border: 1px solid rgba(88, 166, 255, 0.4) !important;
}

.fm-card-badge.level-warning {
    background: rgba(210, 153, 34, 0.2) !important;
    color: #d29922 !important;
    border: 1px solid rgba(210, 153, 34, 0.4) !important;
}

.fm-card-badge.level-error,
.fm-card-badge.level-critical {
    background: rgba(248, 81, 73, 0.2) !important;
    color: #f85149 !important;
    border: 1px solid rgba(248, 81, 73, 0.4) !important;
}

/* Raw View Badge Overrides - ensure colors visible */
.fm-raw-card-header .fm-card-badge {
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.fm-raw-card-header .fm-card-badge.level-info,
.fm-raw-card-header .fm-card-badge.level-information {
    border-color: rgba(88, 166, 255, 0.4) !important;
}

.fm-raw-card-header .fm-card-badge.level-warning {
    border-color: rgba(210, 153, 34, 0.4) !important;
}

.fm-raw-card-header .fm-card-badge.level-error,
.fm-raw-card-header .fm-card-badge.level-critical {
    border-color: rgba(248, 81, 73, 0.4) !important;
}

.fm-card-spacer {
    flex: 1;
}

.fm-card-timestamp {
    font-size: 13px;
    color: var(--fm-text-muted);
    margin-left: auto;
    white-space: nowrap;
}

.fm-card-timestamp i {
    margin-right: 5px;
    opacity: 0.6;
}

/* Card Body */
.fm-card-body {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Attributes Grid */
.fm-card-attributes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 6px 10px;
}

.fm-card-attribute {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border-left: 3px solid rgba(255, 255, 255, 0.1);
    position: relative;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fm-card-attribute:hover {
    background: rgba(255, 255, 255, 0.04);
    border-left-color: var(--fm-accent-orange);
}

.fm-card-attribute:hover .fm-item-actions {
    opacity: 1;
    visibility: visible;
}

.fm-card-attribute.signer.signed {
    border-left-color: rgba(63, 185, 80, 0.5);
}

.fm-card-attribute.signer.unsigned {
    border-left-color: rgba(248, 81, 73, 0.5);
}

.fm-card-attribute.users {
    border-left-color: rgba(163, 113, 247, 0.4);
}

.fm-attribute-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fm-text-muted);
    min-width: 55px;
}

.fm-attribute-value {
    font-size: 13px;
    color: var(--fm-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fm-attribute-value.signed {
    color: var(--fm-accent-green);
}

.fm-attribute-value.unsigned {
    color: var(--fm-accent-red);
}

/* Item Hover Actions */
.fm-item-actions {
    position: absolute;
    top: -28px;
    left: 8px;
    display: flex;
    gap: 2px;
    padding: 3px;
    background: rgba(22, 28, 36, 0.98);
    border: 1px solid var(--fm-border-color);
    border-radius: 6px;
    box-shadow: var(--fm-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.15s ease;
    z-index: 10;
}

/* Arrow pointing down from item actions */
.fm-item-actions::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--fm-border-color);
}

.fm-item-actions::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 21px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(22, 28, 36, 0.98);
    z-index: 1;
}

/* Light theme arrow */
[data-theme="light"] .fm-item-actions::before {
    border-top-color: rgba(255, 255, 255, 0.98);
}

[data-theme="light"] .fm-item-actions::after {
    border-top-color: var(--theme-border-solid);
}

.fm-item-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--fm-text-secondary);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fm-item-action:hover {
    transform: scale(1.1);
}

.fm-item-action.include:hover {
    background: var(--fm-accent-green);
    color: #fff !important;
}

.fm-item-action.include:hover i {
    color: #fff !important;
}

.fm-item-action.exclude:hover {
    background: var(--fm-accent-red);
    color: #fff !important;
}

.fm-item-action.exclude:hover i {
    color: #fff !important;
}

.fm-item-action.copy:hover {
    background: var(--fm-accent-orange);
    color: #fff !important;
}

.fm-item-action.copy:hover i {
    color: #fff !important;
}

/* Light theme for Item Actions */
[data-theme="light"] .fm-item-actions {
    background: rgba(255, 255, 255, 0.98);
    border-color: var(--theme-border-solid);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .fm-item-action {
    color: var(--theme-text-secondary);
}

[data-theme="light"] .fm-item-action.include,
[data-theme="light"] .fm-item-action.exclude {
    color: #333;
}

/* Override darkblue.css .fa-plus:hover color for item actions */
[data-theme="light"] .fm-item-action .fa-plus,
[data-theme="light"] .fm-item-action .fa-plus:hover,
[data-theme="light"] .fm-item-action.include .fa-plus,
[data-theme="light"] .fm-item-action.include:hover .fa-plus {
    color: #333 !important;
}

/* Light theme for all icon types in fm-item-action */
[data-theme="light"] .fm-item-action .fa-minus,
[data-theme="light"] .fm-item-action .fa-clipboard,
[data-theme="light"] .fm-item-action i {
    color: #333 !important;
}

[data-theme="light"] .fm-item-action.include:hover {
    background: var(--fm-accent-green) !important;
    color: #fff !important;
}

[data-theme="light"] .fm-item-action.exclude:hover {
    background: var(--fm-accent-red) !important;
    color: #fff !important;
}

[data-theme="light"] .fm-item-action.copy:hover,
[data-theme="light"] .fm-item-action:last-child:hover {
    background: var(--fm-accent-orange) !important;
    color: #fff !important;
}

[data-theme="light"] .fm-item-action.include:hover i,
[data-theme="light"] .fm-item-action.exclude:hover i,
[data-theme="light"] .fm-item-action.copy:hover i,
[data-theme="light"] .fm-item-action:last-child:hover i {
    color: #fff !important;
}

[data-theme="light"] .fm-item-action:hover {
    color: var(--theme-text-primary);
}

/* Users List */
.fm-users-list {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.fm-user-tag {
    padding: 2px 8px;
    background: rgba(163, 113, 247, 0.12);
    border-radius: 10px;
    font-size: 12px;
    color: var(--fm-accent-purple);
}

/* Identifiers Section (Hashes/Fingerprints) - Same style as attributes */
.fm-card-identifiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 6px;
}

.fm-card-identifiers.empty {
    display: block;
}

.fm-card-identifier {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border-left: 3px solid var(--fm-accent-cyan);
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.fm-card-identifier:hover {
    background: rgba(255, 255, 255, 0.04);
    border-left-color: var(--fm-accent-orange);
}

.fm-card-identifier:hover .fm-item-actions {
    opacity: 1;
    visibility: visible;
}

.fm-identifier-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fm-text-muted);
    min-width: 45px;
}

.fm-identifier-value {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    color: rgba(180, 200, 220, 0.9);
    letter-spacing: 0.3px;
    word-break: break-all;
    overflow-wrap: anywhere;
    line-height: 1.35;
    flex: 1;
    min-width: 0;
}

.fm-no-identifiers {
    font-size: 11px;
    color: var(--fm-text-muted);
    font-style: italic;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border-left: 3px solid rgba(255, 255, 255, 0.1);
}

/* Context Section (Path/Location) */
.fm-card-context {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border-left: 3px solid var(--fm-accent-orange);
    position: relative;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fm-card-context:hover {
    background: rgba(255, 255, 255, 0.02);
}

.fm-card-context:hover .fm-item-actions {
    opacity: 1;
    visibility: visible;
}

/* Content Section (Command Line/Payload) */
.fm-card-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border-left: 3px solid var(--fm-accent-red);
    position: relative;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fm-card-content:hover {
    background: rgba(255, 255, 255, 0.02);
}

.fm-card-content:hover .fm-item-actions {
    opacity: 1;
    visibility: visible;
}

.fm-context-label,
.fm-content-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fm-text-muted);
    min-width: 35px;
    padding-top: 2px;
}

.fm-context-value-wrapper,
.fm-content-value-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.fm-context-value-wrapper:hover .fm-item-actions,
.fm-content-value-wrapper:hover .fm-item-actions {
    opacity: 1;
    visibility: visible;
}

.fm-context-value,
.fm-content-value {
    flex: 1;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: rgba(100, 200, 220, 0.9);
    line-height: 1.5;
    word-break: break-all;
}

.fm-context-value.truncated,
.fm-content-value.truncated {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fm-context-value.expanded,
.fm-content-value.expanded {
    -webkit-line-clamp: unset;
}

.fm-expand-toggle {
    font-size: 12px;
    color: var(--fm-accent-orange);
    cursor: pointer;
    padding: 4px 8px;
    background: rgba(255, 165, 0, 0.1);
    border-radius: 4px;
    border: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
}

.fm-expand-toggle:hover {
    background: rgba(255, 165, 0, 0.2);
}

/* -----------------------------------------------------------------------------
   BAM Activity Section (Process/Network I/O)
   ----------------------------------------------------------------------------- */
.fm-card-bam-section {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    border-left: 3px solid var(--fm-accent-cyan);
}

.fm-card-bam-section.network {
    border-left-color: var(--fm-accent-purple);
}

.fm-bam-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fm-text-secondary);
    margin-bottom: 10px;
}

.fm-bam-header i {
    font-size: 12px;
    opacity: 0.7;
}

.fm-card-bam-section .fm-bam-header i {
    color: var(--fm-accent-cyan);
}

.fm-card-bam-section.network .fm-bam-header i {
    color: var(--fm-accent-purple);
}

.fm-bam-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.fm-bam-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    min-width: 70px;
}

.fm-bam-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--fm-text-muted);
}

.fm-bam-value {
    font-size: 13px;
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    color: var(--fm-text-primary);
}

.fm-bam-value.read {
    color: var(--fm-accent-cyan);
}

.fm-bam-value.write {
    color: var(--fm-accent-orange);
}

/* -----------------------------------------------------------------------------
   Details Toggle Button (legacy, keeping for reference)
   ----------------------------------------------------------------------------- */
.fm-details-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(180, 190, 210, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
}

.fm-details-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.fm-details-btn.active {
    background: rgba(54, 127, 211, 0.2);
    border-color: rgba(54, 127, 211, 0.4);
    color: #367fd3;
}

/* -----------------------------------------------------------------------------
   Details Row & Cards
   ----------------------------------------------------------------------------- */
.fm-details-row {
    background: rgba(0, 0, 0, 0.15) !important;
}

.fm-details-row>td {
    padding: 16px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.fm-details-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.fm-detail-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.fm-detail-card-wide {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .fm-detail-card-wide {
        grid-column: span 1;
    }
}

.fm-detail-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
    font-weight: 600;
    color: rgba(180, 190, 210, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fm-detail-card-header i {
    color: rgba(255, 165, 0, 0.7);
    font-size: 11px;
}

.fm-detail-card-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fm-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.fm-detail-item-full {
    flex-direction: column;
    gap: 6px;
}

.fm-detail-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(140, 150, 170, 0.8);
    min-width: 80px;
    flex-shrink: 0;
}

.fm-detail-value {
    font-size: 13px;
    color: rgba(230, 235, 245, 0.95);
    word-break: break-word;
}

.fm-detail-value-long {
    position: relative;
    width: 100%;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.fm-detail-value-long:hover {
    border-color: rgba(54, 127, 211, 0.3);
    background: rgba(54, 127, 211, 0.05);
}

.fm-detail-value-long code {
    display: block;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    color: rgba(100, 200, 220, 0.9);
    word-break: break-all;
    white-space: pre-wrap;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.fm-detail-hash {
    position: relative;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    flex: 1;
}

.fm-detail-hash:hover {
    border-color: rgba(54, 127, 211, 0.3);
    background: rgba(54, 127, 211, 0.05);
}

.fm-detail-hash code {
    display: block;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 11px;
    color: rgba(180, 190, 210, 0.9);
    word-break: break-all;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* Cell actions for detail cards */
.fm-detail-value-long .fm-cell-actions-toolbar,
.fm-detail-hash .fm-cell-actions-toolbar {
    position: absolute;
    top: -32px;
    right: 8px;
    left: auto;
    transform: none;
    opacity: 0;
    visibility: hidden;
}

.fm-detail-value-long:hover .fm-cell-actions-toolbar,
.fm-detail-hash:hover .fm-cell-actions-toolbar {
    opacity: 1;
    visibility: visible;
}

/* =============================================================================
   FILES PAGE SPECIFIC STYLES
   ============================================================================= */

/* Stats Charts Section */
.fm-stats-charts {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
}

.fm-chart-card {
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border-subtle);
    border-radius: var(--fm-radius-md);
    padding: 20px;
    min-height: 400px;
}

.fm-chart-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--fm-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    text-align: center;
}

/* MFT Timestamps */
.fm-timestamps,
.fm-mft-timestamps {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fm-timestamp-item {
    font-size: 12px;
    color: var(--fm-text-secondary);
}

.fm-timestamp-label {
    color: var(--fm-text-muted);
    margin-right: 6px;
}

.fm-mft-timestamps div {
    font-size: 12px;
    color: var(--fm-text-secondary);
}

.fm-mft-timestamps div span {
    color: var(--fm-text-muted);
    margin-right: 4px;
}

/* File Attribute Tags */
.fm-attribute-tag {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(54, 127, 211, 0.15);
    border: 1px solid rgba(54, 127, 211, 0.3);
    border-radius: 4px;
    font-size: 11px;
    color: var(--fm-accent-cyan);
    margin: 2px;
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-attribute-tag:hover {
    background: rgba(54, 127, 211, 0.25);
    border-color: rgba(54, 127, 211, 0.5);
}

/* USN Reason Tags */
.fm-reason-tag {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(210, 153, 34, 0.15);
    border: 1px solid rgba(210, 153, 34, 0.3);
    border-radius: 4px;
    font-size: 11px;
    color: var(--fm-accent-orange);
    margin: 2px;
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-reason-tag:hover {
    background: rgba(210, 153, 34, 0.25);
    border-color: rgba(210, 153, 34, 0.5);
}

/* -----------------------------------------------------------------------------
   Data-tab sub-tab strip (Files: Artefacts / USN / MFT / Deleted / Heatmap,
   Networks: Connections / DNS / etc.) — markup uses .fm-tab-nav > li.fm-tab-item
   with no scoped CSS, so it was rendering as a default <ul>. Style as a
   compact secondary nav-pill row, consistent with the outer tab navbar.
   ----------------------------------------------------------------------------- */
.fm-tab-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 0 0 10px 0;
    padding: 4px;
    list-style: none;
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border-subtle);
    border-radius: 10px;
    box-shadow: var(--fm-shadow-sm);
}

.fm-tab-nav>.fm-tab-item {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fm-tab-nav>.fm-tab-item>a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--fm-text-secondary);
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.fm-tab-nav>.fm-tab-item>a:hover {
    color: var(--fm-text-primary);
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
}

.fm-tab-nav>.fm-tab-item.active>a {
    color: #fff;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.22) 0%, rgba(59, 130, 246, 0.12) 100%);
    border: 1px solid rgba(59, 130, 246, 0.4);
    padding: 5px 11px;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.12);
}

.fm-tab-nav>.fm-tab-item>a i {
    font-size: 11px;
    opacity: 0.75;
}

.fm-tab-nav>.fm-tab-item.active>a i {
    opacity: 1;
}

[data-theme="light"] .fm-tab-nav,
html[data-theme="light"] .fm-tab-nav {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .fm-tab-nav>.fm-tab-item.active>a,
html[data-theme="light"] .fm-tab-nav>.fm-tab-item.active>a {
    color: var(--fm-accent-blue);
    background: rgba(59, 130, 246, 0.10);
    border-color: rgba(59, 130, 246, 0.35);
}

/* Show More Button */
.fm-show-more {
    display: flex;
    justify-content: center;
    padding: 12px;
}

.fm-btn-show-more {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: var(--fm-accent-blue);
    border: none;
    border-radius: var(--fm-radius-sm);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-btn-show-more:hover:not(:disabled) {
    background: #4a90e2;
    transform: translateY(-1px);
}

.fm-btn-show-more:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* File Row Event Classes */
.fm-results-table tbody tr.file-create {
    border-left: 3px solid var(--fm-accent-green);
}

.fm-results-table tbody tr.file-delete {
    border-left: 3px solid var(--fm-accent-red);
}

.fm-results-table tbody tr.file-modify {
    border-left: 3px solid var(--fm-accent-orange);
}

/* File Card Event Classes */
.fm-card.file-create {
    border-left: 3px solid var(--fm-accent-green);
}

.fm-card.file-delete {
    border-left: 3px solid var(--fm-accent-red);
}

.fm-card.file-modify {
    border-left: 3px solid var(--fm-accent-orange);
}

/* File Types Row */
.fm-file-types-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid var(--fm-border-subtle);
    flex-wrap: wrap;
}

.fm-file-types-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fm-file-type-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fm-file-type-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(54, 127, 211, 0.1);
    border: 1px solid rgba(54, 127, 211, 0.25);
    border-radius: 20px;
    font-size: 12px;
    color: var(--fm-text-primary);
    transition: all var(--fm-transition-fast);
    cursor: default;
}

.fm-file-type-chip:hover {
    background: rgba(54, 127, 211, 0.2);
    border-color: rgba(54, 127, 211, 0.4);
}

.fm-file-type-ext {
    font-weight: 600;
    color: var(--fm-accent-cyan);
    text-transform: uppercase;
}

.fm-file-type-count {
    font-weight: 500;
    color: var(--fm-text-secondary);
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* Files stat card color */
.fm-stat-card.files .fm-stat-icon {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.2) 0%, rgba(88, 166, 255, 0.05) 100%);
    color: var(--fm-accent-cyan);
}

.fm-stat-card.realtime .fm-stat-icon {
    background: linear-gradient(135deg, rgba(63, 185, 80, 0.2) 0%, rgba(63, 185, 80, 0.05) 100%);
    color: var(--fm-accent-green);
}

/* Make stat cards clickable */
.fm-stat-card[ng-click] {
    cursor: pointer;
}

.fm-stat-card[ng-click]:hover {
    transform: translateY(-2px);
    box-shadow: var(--fm-shadow-md), 0 0 20px rgba(54, 127, 211, 0.1);
}

/* Network Card - Country + Destination Header */
.fm-card-name .fm-country-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(63, 185, 80, 0.12);
    border: 1px solid rgba(63, 185, 80, 0.25);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--fm-accent-green);
    margin-right: 10px;
    vertical-align: middle;
}

.fm-card-name .fm-country-badge img {
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.fm-card-name .fm-country-badge span {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fm-card-name .fm-destination {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    color: var(--fm-accent-cyan);
    vertical-align: middle;
}

/* Ensure card header has proper flex alignment */
.fm-card-header .fm-card-actions[style*="order: -1"] {
    margin-right: 12px;
}

/* =============================================================================
   NETWORK PAGE - Overview Section
   ============================================================================= */

.fm-network-overview-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    padding: 20px;
}

@media (max-width: 1200px) {
    .fm-network-overview-grid {
        grid-template-columns: 1fr;
    }
}

.fm-network-map-card,
.fm-network-interfaces-card {
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border-subtle);
    border-radius: var(--fm-radius-md);
    overflow: hidden;
}

.fm-card-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--fm-border-subtle);
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fm-card-subtitle i {
    color: var(--fm-accent-orange);
    opacity: 0.8;
}

.fm-network-map-card .am4chart {
    background: transparent !important;
}

.fm-interfaces-table-wrapper {
    max-height: 280px;
    overflow-y: auto;
    overflow-x: auto;
}

.fm-interfaces-table-wrapper::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.fm-interfaces-table-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.fm-interfaces-table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.fm-interfaces-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.fm-interfaces-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--fm-border-subtle);
}

/* =============================================================================
   COLLAPSIBLE SECTIONS
   ============================================================================= */

.fm-collapsible-header {
    cursor: pointer;
    user-select: none;
    transition: background var(--fm-transition-fast);
}

.fm-collapsible-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.fm-collapse-toggle {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--fm-border-subtle);
    background: transparent;
    color: var(--fm-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--fm-transition-fast);
    margin-left: auto;
}

.fm-collapse-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--fm-border-color);
    color: var(--fm-text-primary);
}

.fm-collapse-toggle i {
    font-size: 12px;
    transition: transform var(--fm-transition-fast);
}

.fm-collapsible-content {
    overflow: hidden;
    transition: all var(--fm-transition-normal);
}

.fm-stats-section.collapsed {
    border-bottom: 1px solid var(--fm-border-subtle);
}

.fm-stats-section.collapsed .fm-section-header {
    border-bottom: none;
}

/* =============================================================================
   FILES PAGE - Inline Stats Row Layout
   ============================================================================= */

.fm-stats-groups-row {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 20px;
    flex-wrap: wrap;
}

.fm-stats-group-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fm-stats-group-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--fm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.fm-stats-group-label i {
    color: var(--fm-accent-orange);
    font-size: 12px;
}

.fm-stats-inline-cards {
    display: flex;
    gap: 8px;
}

.fm-stats-separator {
    width: 1px;
    height: 40px;
    background: var(--fm-border-color);
    margin: 0 8px;
}

/* Compact stat cards for inline display */
.fm-stat-card-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border-subtle);
    border-radius: var(--fm-radius-sm);
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-stat-card-compact:hover {
    background: var(--fm-bg-card-hover);
    border-color: var(--fm-border-accent);
    transform: translateY(-1px);
}

.fm-stat-card-compact i {
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.fm-stat-card-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--fm-text-primary);
}

.fm-stat-card-label {
    font-size: 12px;
    color: var(--fm-text-secondary);
    text-transform: capitalize;
}

/* Origin card colors */
.fm-stat-card-compact.origin.local {
    border-left: 3px solid var(--fm-accent-green);
}

.fm-stat-card-compact.origin.local i {
    color: var(--fm-accent-green);
}

.fm-stat-card-compact.origin.internet {
    border-left: 3px solid var(--fm-accent-red);
}

.fm-stat-card-compact.origin.internet i {
    color: var(--fm-accent-red);
}

.fm-stat-card-compact.origin.intranet {
    border-left: 3px solid var(--fm-accent-blue);
}

.fm-stat-card-compact.origin.intranet i {
    color: var(--fm-accent-blue);
}

/* Type card colors */
.fm-stat-card-compact.type.executable {
    border-left: 3px solid var(--fm-accent-red);
}

.fm-stat-card-compact.type.executable i {
    color: var(--fm-accent-red);
}

.fm-stat-card-compact.type.document {
    border-left: 3px solid var(--fm-accent-blue);
}

.fm-stat-card-compact.type.document i {
    color: var(--fm-accent-blue);
}

.fm-stat-card-compact.type.archive {
    border-left: 3px solid var(--fm-accent-purple);
}

.fm-stat-card-compact.type.archive i {
    color: var(--fm-accent-purple);
}

.fm-stat-card-compact.type.other {
    border-left: 3px solid var(--fm-text-muted);
}

.fm-stat-card-compact.type.other i {
    color: var(--fm-text-muted);
}

/* Default type styling */
.fm-stat-card-compact.type:not(.executable):not(.document):not(.archive):not(.other) {
    border-left: 3px solid var(--fm-accent-orange);
}

.fm-stat-card-compact.type:not(.executable):not(.document):not(.archive):not(.other) i {
    color: var(--fm-accent-orange);
}

@media (max-width: 1200px) {
    .fm-stats-groups-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .fm-stats-separator {
        width: 100%;
        height: 1px;
        margin: 8px 0;
    }
}

/* =============================================================================
   USERS PAGE - Stats Cards
   ============================================================================= */

.fm-stats-rows {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fm-stats-group-full {
    width: 100%;
}

.fm-stats-group-full .fm-stats-inline-cards {
    flex-wrap: wrap;
}

/* User Type card colors */
.fm-stat-card-compact.user-type.human {
    border-left: 3px solid var(--fm-accent-blue);
}

.fm-stat-card-compact.user-type.human i {
    color: var(--fm-accent-blue);
}

.fm-stat-card-compact.user-type.service {
    border-left: 3px solid var(--fm-accent-orange);
}

.fm-stat-card-compact.user-type.service i {
    color: var(--fm-accent-orange);
}

.fm-stat-card-compact.user-type.computer {
    border-left: 3px solid var(--fm-accent-cyan);
}

.fm-stat-card-compact.user-type.computer i {
    color: var(--fm-accent-cyan);
}

.fm-stat-card-compact.user-type.anonymous {
    border-left: 3px solid var(--fm-accent-purple);
}

.fm-stat-card-compact.user-type.anonymous i {
    color: var(--fm-accent-purple);
}

.fm-stat-card-compact.user-type.system {
    border-left: 3px solid var(--fm-text-muted);
}

.fm-stat-card-compact.user-type.system i {
    color: var(--fm-text-muted);
}

/* Default user type (fallback) */
.fm-stat-card-compact.user-type:not(.human):not(.service):not(.computer):not(.anonymous):not(.system) {
    border-left: 3px solid var(--fm-accent-green);
}

.fm-stat-card-compact.user-type:not(.human):not(.service):not(.computer):not(.anonymous):not(.system) i {
    color: var(--fm-accent-green);
}

/* Login Type card colors */
.fm-stat-card-compact.login-type.interactive {
    border-left: 3px solid var(--fm-accent-blue);
}

.fm-stat-card-compact.login-type.interactive i {
    color: var(--fm-accent-blue);
}

.fm-stat-card-compact.login-type.network {
    border-left: 3px solid var(--fm-accent-cyan);
}

.fm-stat-card-compact.login-type.network i {
    color: var(--fm-accent-cyan);
}

.fm-stat-card-compact.login-type.service {
    border-left: 3px solid var(--fm-accent-orange);
}

.fm-stat-card-compact.login-type.service i {
    color: var(--fm-accent-orange);
}

.fm-stat-card-compact.login-type.remote {
    border-left: 3px solid var(--fm-accent-green);
}

.fm-stat-card-compact.login-type.remote i {
    color: var(--fm-accent-green);
}

/* Default login type (fallback) */
.fm-stat-card-compact.login-type:not(.interactive):not(.network):not(.service):not(.remote) {
    border-left: 3px solid var(--fm-accent-purple);
}

.fm-stat-card-compact.login-type:not(.interactive):not(.network):not(.service):not(.remote) i {
    color: var(--fm-accent-purple);
}

/* Event Type card colors */
.fm-stat-card-compact.event-type.login {
    border-left: 3px solid var(--fm-accent-green);
}

.fm-stat-card-compact.event-type.login i {
    color: var(--fm-accent-green);
}

.fm-stat-card-compact.event-type.logout {
    border-left: 3px solid var(--fm-accent-blue);
}

.fm-stat-card-compact.event-type.logout i {
    color: var(--fm-accent-blue);
}

.fm-stat-card-compact.event-type.failed {
    border-left: 3px solid var(--fm-accent-red);
}

.fm-stat-card-compact.event-type.failed i {
    color: var(--fm-accent-red);
}

.fm-stat-card-compact.event-type.add {
    border-left: 3px solid var(--fm-accent-orange);
}

.fm-stat-card-compact.event-type.add i {
    color: var(--fm-accent-orange);
}

.fm-stat-card-compact.event-type.password {
    border-left: 3px solid var(--fm-accent-purple);
}

.fm-stat-card-compact.event-type.password i {
    color: var(--fm-accent-purple);
}

.fm-stat-card-compact.event-type.lock {
    border-left: 3px solid var(--fm-accent-cyan);
}

.fm-stat-card-compact.event-type.lock i {
    color: var(--fm-accent-cyan);
}

/* Default event type (fallback) */
.fm-stat-card-compact.event-type:not(.login):not(.logout):not(.failed):not(.add):not(.password):not(.lock) {
    border-left: 3px solid var(--fm-text-muted);
}

.fm-stat-card-compact.event-type:not(.login):not(.logout):not(.failed):not(.add):not(.password):not(.lock) i {
    color: var(--fm-text-muted);
}

/* =============================================================================
   USER DIRECTORY - Compact Card Grid
   ============================================================================= */

.fm-user-directory-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

@media (max-width: 1200px) {
    .fm-user-directory-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1600px) {
    .fm-user-directory-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* User Card */
.fm-user-card {
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border-subtle);
    border-radius: var(--fm-radius-md);
    overflow: hidden;
    transition: all var(--fm-transition-fast);
}

.fm-user-card:hover {
    border-color: var(--fm-border-accent);
    box-shadow: var(--fm-shadow-md);
    transform: translateY(-1px);
}

.fm-user-card.disabled {
    opacity: 0.7;
    border-left: 3px solid var(--fm-accent-red);
}

.fm-user-card.has-failed-logins {
    border-left: 3px solid var(--fm-accent-orange);
}

/* User Card Header */
.fm-user-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(90deg, rgba(54, 127, 211, 0.06) 0%, transparent 60%);
    border-bottom: 1px solid var(--fm-border-subtle);
}

/* User Avatar */
.fm-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(54, 127, 211, 0.15);
    color: var(--fm-accent-blue);
    font-size: 18px;
    flex-shrink: 0;
}

.fm-user-avatar.human {
    background: rgba(54, 127, 211, 0.15);
    color: var(--fm-accent-blue);
}

.fm-user-avatar.service {
    background: rgba(210, 153, 34, 0.15);
    color: var(--fm-accent-orange);
}

.fm-user-avatar.computer {
    background: rgba(88, 166, 255, 0.15);
    color: var(--fm-accent-cyan);
}

.fm-user-avatar.system {
    background: rgba(110, 118, 129, 0.15);
    color: var(--fm-text-muted);
}

/* User Info */
.fm-user-info {
    flex: 1;
    min-width: 0;
}

.fm-user-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fm-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--fm-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.fm-user-type-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: rgba(54, 127, 211, 0.15);
    color: var(--fm-accent-blue);
}

.fm-user-type-badge.human {
    background: rgba(54, 127, 211, 0.15);
    color: var(--fm-accent-blue);
}

.fm-user-type-badge.service {
    background: rgba(210, 153, 34, 0.15);
    color: var(--fm-accent-orange);
}

.fm-user-type-badge.computer {
    background: rgba(88, 166, 255, 0.15);
    color: var(--fm-accent-cyan);
}

.fm-user-type-badge.system {
    background: rgba(110, 118, 129, 0.15);
    color: var(--fm-text-muted);
}

.fm-user-disabled-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(248, 81, 73, 0.15);
    color: var(--fm-accent-red);
}

.fm-user-domain-row {
    margin-top: 4px;
}

.fm-user-domain {
    font-size: 12px;
    color: var(--fm-text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.fm-user-domain i {
    font-size: 10px;
    opacity: 0.7;
}

/* User Card Actions */
.fm-user-card-actions {
    display: flex;
    gap: 4px;
}

.fm-user-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--fm-border-subtle);
    background: transparent;
    color: var(--fm-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--fm-transition-fast);
}

.fm-user-action-btn:hover {
    background: var(--fm-accent-blue);
    border-color: var(--fm-accent-blue);
    color: #fff;
}

/* User Card Body */
.fm-user-card-body {
    padding: 12px 16px;
}

/* User SID */
.fm-user-sid {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    margin-bottom: 12px;
}

.fm-sid-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--fm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fm-sid-value {
    flex: 1;
    font-size: 11px;
    font-family: 'Consolas', 'Monaco', monospace;
    color: var(--fm-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fm-copy-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: var(--fm-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--fm-transition-fast);
    opacity: 0;
}

.fm-user-sid:hover .fm-copy-btn {
    opacity: 1;
}

.fm-copy-btn:hover {
    background: var(--fm-accent-blue);
    color: #fff;
}

/* User Stats Row */
.fm-user-stats-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fm-user-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    border-left: 2px solid transparent;
}

.fm-user-stat.success {
    border-left-color: var(--fm-accent-green);
}

.fm-user-stat.success i {
    color: var(--fm-accent-green);
}

.fm-user-stat.danger {
    border-left-color: var(--fm-accent-red);
    background: rgba(248, 81, 73, 0.08);
}

.fm-user-stat.danger i,
.fm-user-stat.danger .fm-stat-number {
    color: var(--fm-accent-red);
}

.fm-user-stat.muted {
    opacity: 0.6;
}

.fm-user-stat i {
    font-size: 12px;
    color: var(--fm-text-muted);
}

.fm-stat-number {
    font-size: 14px;
    font-weight: 700;
    color: var(--fm-text-primary);
}

.fm-stat-text {
    font-size: 11px;
    color: var(--fm-text-muted);
}

/* User Last Login */
.fm-user-last-login {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-size: 12px;
    color: var(--fm-text-secondary);
}

.fm-user-last-login i {
    color: var(--fm-text-muted);
    font-size: 12px;
}

.fm-user-last-login .never {
    color: var(--fm-text-muted);
    font-style: italic;
}

/* Pagination Info */
.fm-pagination-info {
    font-size: 13px;
    color: var(--fm-text-secondary);
    padding: 0 16px;
}

/* -----------------------------------------------------------------------------
   Sysmon Rule Badges
   ----------------------------------------------------------------------------- */
.fm-sysmon-rule {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.fm-sysmon-details {
    font-size: 13px;
    color: var(--fm-text-secondary);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Rule type colors */
.rule-process,
.fm-card-badge.rule-process {
    background: rgba(63, 185, 80, 0.15) !important;
    color: #3fb950 !important;
    border: 1px solid rgba(63, 185, 80, 0.3) !important;
}

.rule-file,
.fm-card-badge.rule-file {
    background: rgba(88, 166, 255, 0.15) !important;
    color: #58a6ff !important;
    border: 1px solid rgba(88, 166, 255, 0.3) !important;
}

.rule-network,
.fm-card-badge.rule-network {
    background: rgba(86, 212, 221, 0.15) !important;
    color: #56d4dd !important;
    border: 1px solid rgba(86, 212, 221, 0.3) !important;
}

.rule-registry,
.fm-card-badge.rule-registry {
    background: rgba(210, 153, 34, 0.15) !important;
    color: #d29922 !important;
    border: 1px solid rgba(210, 153, 34, 0.3) !important;
}

.rule-image,
.fm-card-badge.rule-image {
    background: rgba(163, 113, 247, 0.15) !important;
    color: #a371f7 !important;
    border: 1px solid rgba(163, 113, 247, 0.3) !important;
}

.rule-pipe,
.fm-card-badge.rule-pipe {
    background: rgba(248, 81, 73, 0.15) !important;
    color: #f85149 !important;
    border: 1px solid rgba(248, 81, 73, 0.3) !important;
}

.rule-wmi,
.fm-card-badge.rule-wmi {
    background: rgba(255, 123, 114, 0.15) !important;
    color: #ff7b72 !important;
    border: 1px solid rgba(255, 123, 114, 0.3) !important;
}

.rule-other,
.fm-card-badge.rule-other {
    background: rgba(139, 148, 158, 0.15) !important;
    color: #8b949e !important;
    border: 1px solid rgba(139, 148, 158, 0.3) !important;
}

/* -----------------------------------------------------------------------------
   Autorun Type and Event Badges
   ----------------------------------------------------------------------------- */
.fm-autorun-type,
.fm-event-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Autorun Type Classes */
.type-registry,
.fm-card-badge.type-registry {
    background: rgba(210, 153, 34, 0.15) !important;
    color: #d29922 !important;
    border: 1px solid rgba(210, 153, 34, 0.3) !important;
}

.type-service,
.fm-card-badge.type-service {
    background: rgba(88, 166, 255, 0.15) !important;
    color: #58a6ff !important;
    border: 1px solid rgba(88, 166, 255, 0.3) !important;
}

.type-task,
.fm-card-badge.type-task {
    background: rgba(163, 113, 247, 0.15) !important;
    color: #a371f7 !important;
    border: 1px solid rgba(163, 113, 247, 0.3) !important;
}

.type-driver,
.fm-card-badge.type-driver {
    background: rgba(248, 81, 73, 0.15) !important;
    color: #f85149 !important;
    border: 1px solid rgba(248, 81, 73, 0.3) !important;
}

.type-startup,
.fm-card-badge.type-startup {
    background: rgba(63, 185, 80, 0.15) !important;
    color: #3fb950 !important;
    border: 1px solid rgba(63, 185, 80, 0.3) !important;
}

.type-dll,
.fm-card-badge.type-dll {
    background: rgba(255, 123, 114, 0.15) !important;
    color: #ff7b72 !important;
    border: 1px solid rgba(255, 123, 114, 0.3) !important;
}

.type-other,
.fm-card-badge.type-other {
    background: rgba(139, 148, 158, 0.15) !important;
    color: #8b949e !important;
    border: 1px solid rgba(139, 148, 158, 0.3) !important;
}

/* Autorun Event Classes */
.event-created,
.fm-card-badge.event-created {
    background: rgba(63, 185, 80, 0.15) !important;
    color: #3fb950 !important;
    border: 1px solid rgba(63, 185, 80, 0.3) !important;
}

.event-modified,
.fm-card-badge.event-modified {
    background: rgba(210, 153, 34, 0.15) !important;
    color: #d29922 !important;
    border: 1px solid rgba(210, 153, 34, 0.3) !important;
}

.event-deleted,
.fm-card-badge.event-deleted {
    background: rgba(248, 81, 73, 0.15) !important;
    color: #f85149 !important;
    border: 1px solid rgba(248, 81, 73, 0.3) !important;
}

.event-existing,
.fm-card-badge.event-existing {
    background: rgba(88, 166, 255, 0.15) !important;
    color: #58a6ff !important;
    border: 1px solid rgba(88, 166, 255, 0.3) !important;
}

.event-other,
.fm-card-badge.event-other {
    background: rgba(139, 148, 158, 0.15) !important;
    color: #8b949e !important;
    border: 1px solid rgba(139, 148, 158, 0.3) !important;
}

/* Application Artifact Badges */
.artifact-registry,
.fm-card-badge.artifact-registry {
    background: rgba(210, 153, 34, 0.15) !important;
    color: #d29922 !important;
    border: 1px solid rgba(210, 153, 34, 0.3) !important;
}

.artifact-wmi,
.fm-card-badge.artifact-wmi {
    background: rgba(255, 123, 114, 0.15) !important;
    color: #ff7b72 !important;
    border: 1px solid rgba(255, 123, 114, 0.3) !important;
}

.artifact-app,
.fm-card-badge.artifact-app {
    background: rgba(88, 166, 255, 0.15) !important;
    color: #58a6ff !important;
    border: 1px solid rgba(88, 166, 255, 0.3) !important;
}

.artifact-default,
.fm-card-badge.artifact-default {
    background: rgba(139, 148, 158, 0.15) !important;
    color: #8b949e !important;
    border: 1px solid rgba(139, 148, 158, 0.3) !important;
}

/* Application Name Styling */
.fm-app-name {
    font-weight: 500;
    color: var(--fm-text-primary);
}

.fm-path {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    font-size: 12px;
    color: var(--fm-text-secondary);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Event Badge Installed/Uninstalled */
.fm-event-badge.created {
    background: rgba(63, 185, 80, 0.15) !important;
    color: #3fb950 !important;
    border: 1px solid rgba(63, 185, 80, 0.3) !important;
}

.fm-event-badge.modified {
    background: rgba(210, 153, 34, 0.15) !important;
    color: #d29922 !important;
    border: 1px solid rgba(210, 153, 34, 0.3) !important;
}

.fm-event-badge.deleted {
    background: rgba(248, 81, 73, 0.15) !important;
    color: #f85149 !important;
    border: 1px solid rgba(248, 81, 73, 0.3) !important;
}

.fm-event-badge.existing {
    background: rgba(88, 166, 255, 0.15) !important;
    color: #58a6ff !important;
    border: 1px solid rgba(88, 166, 255, 0.3) !important;
}

/* Artifact Badge */
.fm-artifact-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.08);
    color: var(--fm-text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Card Users Section */
.fm-card-users {
    padding: 12px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--fm-radius-sm);
    border-left: 3px solid rgba(88, 166, 255, 0.5);
}

.fm-users-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fm-text-muted);
    margin-bottom: 8px;
}

/* -----------------------------------------------------------------------------
   Active Filter Banner
   ----------------------------------------------------------------------------- */
.fm-active-filter-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    margin-bottom: 16px;
    background: linear-gradient(90deg, rgba(54, 127, 211, 0.15) 0%, rgba(54, 127, 211, 0.05) 100%);
    border: 1px solid rgba(54, 127, 211, 0.3);
    border-radius: var(--fm-radius-md);
    border-left: 3px solid var(--fm-accent-blue);
}

.fm-filter-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.fm-filter-banner-content>i {
    color: var(--fm-accent-blue);
    font-size: 14px;
}

.fm-filter-banner-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-filter-banner-value {
    font-size: 12px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    color: var(--fm-text-secondary);
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 10px;
    border-radius: 4px;
    max-width: 500px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fm-filter-banner-clear {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    border-radius: var(--fm-radius-sm);
    color: var(--fm-accent-red);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fm-filter-banner-clear:hover {
    background: rgba(248, 81, 73, 0.2);
    border-color: rgba(248, 81, 73, 0.5);
}

.fm-filter-banner-clear i {
    font-size: 11px;
}

/* -----------------------------------------------------------------------------
   Event Bookmarks / Quick Filters Section
   ----------------------------------------------------------------------------- */
.fm-bookmarks-section {
    margin-bottom: 20px;
}

.fm-bookmarks-section .fm-section-header {
    padding: 14px 20px;
}

.fm-bookmarks-section .fm-section-subtitle {
    margin-left: 12px;
    font-size: 12px;
    font-weight: 400;
    color: var(--fm-text-muted);
}

.fm-bookmarks-content {
    padding: 16px 20px;
    max-height: 500px;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out, opacity 0.3s ease-out;
}

.fm-bookmarks-content.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    overflow: hidden;
}

.fm-bookmarks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.fm-bookmark-category {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--fm-radius-md);
    border: 1px solid var(--fm-border-color);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.fm-bookmark-category:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.fm-bookmark-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.15);
    border-left: 3px solid;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--fm-text-primary);
    text-transform: uppercase;
}

.fm-bookmark-category-header i {
    font-size: 14px;
}

.fm-bookmark-items {
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 4px;
}

.fm-bookmark-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--fm-radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}

.fm-bookmark-item:hover {
    background: rgba(54, 127, 211, 0.1);
    border-color: rgba(54, 127, 211, 0.3);
}

.fm-bookmark-item:active {
    background: rgba(54, 127, 211, 0.2);
    transform: scale(0.98);
}

.fm-bookmark-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--fm-text-secondary);
    transition: color 0.15s ease;
}

.fm-bookmark-item:hover .fm-bookmark-name {
    color: var(--fm-text-primary);
}

.fm-bookmark-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--fm-text-muted);
    transition: all 0.15s ease;
}

.fm-bookmark-item:hover .fm-bookmark-count {
    background: rgba(54, 127, 211, 0.3);
    color: var(--fm-text-primary);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .fm-bookmarks-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .fm-bookmarks-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fm-bookmarks-section .fm-section-subtitle {
        display: none;
    }
}

@media (max-width: 480px) {
    .fm-bookmarks-grid {
        grid-template-columns: 1fr;
    }
}

/* -----------------------------------------------------------------------------
   Vulnerabilities Page Styles (Original Layout with Modern Colors)
   ----------------------------------------------------------------------------- */

/* Active Filters Bar */
.fm-vuln-active-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-md);
}

.fm-vuln-filters-label {
    font-size: 14px;
    color: var(--fm-text-secondary);
}

.fm-vuln-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.fm-vuln-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(63, 185, 80, 0.15);
    border: 1px solid rgba(63, 185, 80, 0.4);
    border-radius: 4px;
    color: var(--fm-text-primary);
    font-size: 13px;
}

.fm-vuln-filter-tag strong {
    color: #3fb950;
}

.fm-vuln-filter-remove {
    background: none;
    border: none;
    color: var(--fm-text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s ease;
}

.fm-vuln-filter-remove:hover {
    color: var(--fm-accent-red);
}

/* Statistics Filter Bar (Horizontal Layout) */
.fm-vuln-stats-bar {
    display: flex;
    gap: 16px;
    padding: 16px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-md);
    overflow-x: auto;
}

.fm-vuln-filter-col {
    flex: 1;
    min-width: 200px;
}

.fm-vuln-filter-title {
    color: var(--fm-text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 0;
    margin: 0;
}

.fm-vuln-search-dropdown-wrapper {
    position: relative;
    z-index: 999;
}

.fm-vuln-search-dropdown {
    position: absolute;
    top: 0;
    left: 0;
    width: 260px;
    max-height: 220px;
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-md);
    box-shadow: var(--fm-shadow-lg);
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    z-index: 1050;
}

.fm-vuln-search-dropdown li {
    margin: 3px;
}

.fm-vuln-search-dropdown li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    color: var(--fm-text-secondary);
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.fm-vuln-search-dropdown li a:hover {
    background: rgba(54, 127, 211, 0.15);
    text-decoration: none;
}

.fm-vuln-search-dropdown li.active a {
    background: rgba(54, 127, 211, 0.25);
}

.fm-vuln-empty a {
    color: var(--fm-text-muted) !important;
    cursor: default !important;
}

.fm-vuln-item-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fm-vuln-item-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--fm-text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 8px;
    border-radius: 10px;
}

.fm-vuln-stats-list {
    max-height: 160px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.fm-vuln-stats-list::-webkit-scrollbar {
    width: 6px;
}

.fm-vuln-stats-list::-webkit-scrollbar-track {
    background: transparent;
}

.fm-vuln-stats-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.fm-vuln-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 0;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s ease;
    color: var(--fm-text-secondary);
    font-size: 13px;
}

.fm-vuln-stat-item:hover {
    background: rgba(54, 127, 211, 0.1);
}

.fm-vuln-stat-item.active {
    background: rgba(54, 127, 211, 0.2);
    border-left: 3px solid var(--fm-accent-blue);
}

/* Date Range */
.fm-vuln-date-range {
    padding: 12px 20px;
    margin-bottom: 16px;
}

/* Vulnerability Cards Container */
.fm-vuln-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Vulnerability Card */
.fm-vuln-card {
    background: linear-gradient(135deg, rgba(22, 27, 34, 0.9) 0%, rgba(13, 17, 23, 0.95) 100%);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

.fm-vuln-card:hover {
    border-color: rgba(54, 127, 211, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.fm-vuln-card.expanded {
    border-color: var(--fm-accent-orange);
    box-shadow: 0 4px 20px rgba(210, 153, 34, 0.15);
}

/* Card Header */
.fm-vuln-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.fm-vuln-card-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.fm-vuln-card-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.fm-vuln-cve-id {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--fm-accent-cyan);
    text-decoration: none;
    padding: 6px 12px;
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 6px;
    transition: all 0.15s ease;
}

.fm-vuln-cve-id:hover {
    background: rgba(88, 166, 255, 0.2);
    border-color: rgba(88, 166, 255, 0.4);
    color: #79c0ff;
    text-decoration: none;
}

.fm-vuln-cve-id i {
    font-size: 12px;
}

/* Severity Badge */
.fm-vuln-severity {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.fm-vuln-severity.critical {
    background: rgba(248, 81, 73, 0.2);
    color: #f85149;
    border: 1px solid rgba(248, 81, 73, 0.4);
}

.fm-vuln-severity.high {
    background: rgba(255, 123, 114, 0.2);
    color: #ff7b72;
    border: 1px solid rgba(255, 123, 114, 0.4);
}

.fm-vuln-severity.medium {
    background: rgba(210, 153, 34, 0.2);
    color: #d29922;
    border: 1px solid rgba(210, 153, 34, 0.4);
}

.fm-vuln-severity.low {
    background: rgba(63, 185, 80, 0.2);
    color: #3fb950;
    border: 1px solid rgba(63, 185, 80, 0.4);
}

/* Score Badge */
.fm-vuln-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
}

.fm-vuln-score.critical {
    background: linear-gradient(135deg, rgba(248, 81, 73, 0.3) 0%, rgba(248, 81, 73, 0.15) 100%);
    color: #f85149;
    border: 1px solid rgba(248, 81, 73, 0.5);
}

.fm-vuln-score.high {
    background: linear-gradient(135deg, rgba(255, 123, 114, 0.3) 0%, rgba(255, 123, 114, 0.15) 100%);
    color: #ff7b72;
    border: 1px solid rgba(255, 123, 114, 0.5);
}

.fm-vuln-score.medium {
    background: linear-gradient(135deg, rgba(210, 153, 34, 0.3) 0%, rgba(210, 153, 34, 0.15) 100%);
    color: #d29922;
    border: 1px solid rgba(210, 153, 34, 0.5);
}

.fm-vuln-score.low {
    background: linear-gradient(135deg, rgba(63, 185, 80, 0.3) 0%, rgba(63, 185, 80, 0.15) 100%);
    color: #3fb950;
    border: 1px solid rgba(63, 185, 80, 0.5);
}

/* Card Meta Info */
.fm-vuln-card-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    margin-left: 16px;
}

.fm-vuln-endpoint,
.fm-vuln-product {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--fm-text-secondary);
}

.fm-vuln-endpoint i,
.fm-vuln-product i {
    color: var(--fm-text-muted);
    font-size: 12px;
}

/* Resolution Status */
.fm-vuln-resolution {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-left: auto;
}

.fm-vuln-resolution.open {
    background: rgba(210, 153, 34, 0.15);
    color: #d29922;
    border: 1px solid rgba(210, 153, 34, 0.3);
}

/* Expand Icon */
.fm-vuln-expand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--fm-text-muted);
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.fm-vuln-card:hover .fm-vuln-expand-icon {
    background: rgba(54, 127, 211, 0.15);
    color: var(--fm-accent-blue);
}

.fm-vuln-card.expanded .fm-vuln-expand-icon {
    background: rgba(210, 153, 34, 0.2);
    color: var(--fm-accent-orange);
}

/* Card Body (Expanded Details) */
.fm-vuln-card-body {
    border-top: 1px solid var(--fm-border-color);
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
}

.fm-vuln-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* Info Sections */
.fm-vuln-info-section,
.fm-vuln-endpoint-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fm-vuln-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--fm-border-color);
}

.fm-vuln-info-header i {
    color: var(--fm-accent-blue);
}

.fm-vuln-info-header.resolved i {
    color: #3fb950;
}

/* Description Box */
.fm-vuln-description-box {
    padding: 16px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--fm-radius-md);
    border-left: 3px solid var(--fm-accent-orange);
    max-height: 140px;
    overflow-y: auto;
}

.fm-vuln-description-box p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--fm-text-secondary);
}

/* Info Grid */
.fm-vuln-info-grid,
.fm-vuln-endpoint-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.fm-vuln-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fm-vuln-info-item label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fm-text-muted);
}

.fm-vuln-info-item span {
    font-size: 13px;
    color: var(--fm-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Severity/Score Inline */
.fm-vuln-severity-inline,
.fm-vuln-score-inline {
    font-weight: 700;
}

.fm-vuln-severity-inline.critical,
.fm-vuln-score-inline.critical {
    color: #f85149;
}

.fm-vuln-severity-inline.high,
.fm-vuln-score-inline.high {
    color: #ff7b72;
}

.fm-vuln-severity-inline.medium,
.fm-vuln-score-inline.medium {
    color: #d29922;
}

.fm-vuln-severity-inline.low,
.fm-vuln-score-inline.low {
    color: #3fb950;
}

/* Links Section */
.fm-vuln-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.fm-vuln-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-sm);
    color: var(--fm-text-secondary);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.fm-vuln-link-btn:hover {
    background: rgba(54, 127, 211, 0.15);
    border-color: rgba(54, 127, 211, 0.4);
    color: var(--fm-text-primary);
    text-decoration: none;
}

.fm-vuln-link-btn.primary {
    background: rgba(54, 127, 211, 0.15);
    border-color: rgba(54, 127, 211, 0.3);
    color: var(--fm-accent-cyan);
}

.fm-vuln-link-btn.primary:hover {
    background: rgba(54, 127, 211, 0.25);
    border-color: rgba(54, 127, 211, 0.5);
}

.fm-vuln-endpoint-section {
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--fm-radius-md);
    padding: 16px;
    border: 1px solid var(--fm-border-color);
}

/* Responsive adjustments for Vulnerabilities */
@media (max-width: 1200px) {
    .fm-vuln-stats-bar {
        flex-wrap: wrap;
    }

    .fm-vuln-filter-col {
        flex: 1 1 45%;
    }

    .fm-vuln-card-meta {
        flex-wrap: wrap;
        gap: 12px;
    }
}

@media (max-width: 992px) {
    .fm-vuln-detail-grid {
        grid-template-columns: 1fr;
    }

    .fm-vuln-endpoint-section {
        margin-top: 16px;
    }
}

@media (max-width: 768px) {
    .fm-vuln-filter-col {
        flex: 1 1 100%;
    }

    .fm-vuln-card-header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .fm-vuln-card-main {
        width: 100%;
    }

    .fm-vuln-card-meta {
        width: 100%;
        margin-left: 0;
    }

    .fm-vuln-resolution {
        margin-left: 0;
    }

    .fm-vuln-expand-icon {
        position: absolute;
        top: 16px;
        right: 16px;
    }

    .fm-vuln-card-header {
        position: relative;
        padding-right: 60px;
    }

    .fm-vuln-info-grid,
    .fm-vuln-endpoint-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   OTHER PAGE STYLES
   ========================================== */

.fm-other-page {
    padding: 20px;
}

.fm-other-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.fm-other-row.fm-full-width {
    grid-template-columns: 1fr;
}

.fm-other-section {
    background: var(--fm-bg-glass);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    overflow: hidden;
}

.fm-other-section .fm-section-header {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--fm-border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fm-other-section .fm-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-other-section .fm-section-title i {
    color: var(--fm-accent-orange);
    font-size: 16px;
}

.fm-section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 8px;
    background: rgba(54, 127, 211, 0.2);
    color: var(--fm-accent-blue);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.fm-other-table-container {
    max-height: 350px;
    overflow-y: auto;
    position: relative;
}

.fm-other-table-container.fm-loading {
    opacity: 0.5;
    pointer-events: none;
}

.fm-other-table {
    width: 100%;
    border-collapse: collapse;
}

.fm-other-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--fm-bg-dark-alt);
}

.fm-other-table th {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fm-text-muted);
    text-align: left;
    border-bottom: 1px solid var(--fm-border-color);
    white-space: nowrap;
}

.fm-other-table td {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--fm-text-secondary);
    border-bottom: 1px solid var(--fm-border-subtle);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fm-other-table tbody tr:hover {
    background: rgba(54, 127, 211, 0.05);
}

.fm-other-table tbody tr:last-child td {
    border-bottom: none;
}

.fm-other-table td strong {
    color: var(--fm-text-primary);
}

.fm-other-table td.fm-mono {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    color: var(--fm-accent-cyan);
}

.fm-other-table td.fm-break-word {
    word-wrap: break-word;
    white-space: normal;
    max-width: 250px;
}

.fm-other-table td.fm-datetime {
    color: var(--fm-accent-blue);
    font-weight: 500;
    white-space: nowrap;
}

.fm-other-table td.fm-cmdline {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    color: var(--fm-accent-orange);
    white-space: normal;
    word-break: break-all;
    max-width: 100%;
}

.fm-other-table td.fm-empty-cell {
    text-align: center;
    color: var(--fm-text-muted);
    padding: 40px 16px;
    font-style: italic;
}

.fm-event-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(210, 153, 34, 0.15);
    color: var(--fm-accent-orange);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.fm-other-pagination {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid var(--fm-border-subtle);
}

.fm-other-pagination .fm-btn {
    padding: 8px 16px;
    font-size: 12px;
}

.fm-other-pagination .fm-btn i {
    font-size: 10px;
}

/* Scrollbar styling for other tables */
.fm-other-table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.fm-other-table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.fm-other-table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.fm-other-table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Responsive */
@media (max-width: 1200px) {
    .fm-other-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .fm-other-page {
        padding: 12px;
    }

    .fm-other-table th,
    .fm-other-table td {
        padding: 10px 12px;
    }
}

/* ==========================================
   CUSTOM RULES PAGE STYLES
   ========================================== */

.fm-rules-page {
    padding: 20px;
}

/* Header with Stats */
.fm-rules-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.fm-rules-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.fm-rule-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    background: var(--fm-bg-glass);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
}

.fm-rule-stat:hover {
    border-color: var(--fm-border-hover);
    transform: translateY(-2px);
}

.fm-rule-stat.active {
    border-color: var(--fm-accent-blue);
    background: rgba(54, 127, 211, 0.1);
}

.fm-rule-stat.yara .fm-rule-stat-icon {
    background: rgba(248, 81, 73, 0.15);
    color: var(--fm-accent-red);
}

.fm-rule-stat.sigma .fm-rule-stat-icon {
    background: rgba(210, 153, 34, 0.15);
    color: var(--fm-accent-orange);
}

.fm-rule-stat.regex .fm-rule-stat-icon {
    background: rgba(88, 166, 255, 0.15);
    color: var(--fm-accent-cyan);
}

.fm-rule-stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 20px;
}

.fm-rule-stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fm-rule-stat-count {
    font-size: 24px;
    font-weight: 700;
    color: var(--fm-text-primary);
}

.fm-rule-stat-label {
    font-size: 12px;
    color: var(--fm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Development Banner */
.fm-dev-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(210, 153, 34, 0.1);
    border: 1px solid rgba(210, 153, 34, 0.3);
    border-radius: var(--fm-radius-md);
    margin-bottom: 20px;
    color: var(--fm-accent-orange);
    font-size: 13px;
}

.fm-dev-banner i {
    font-size: 16px;
}

/* Rules Section */
.fm-rules-section {
    margin-bottom: 24px;
}

.fm-rules-section .fm-section-header {
    margin-bottom: 16px;
}

.fm-rules-section .fm-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--fm-text-primary);
    margin-bottom: 4px;
}

.fm-rules-section .fm-section-title i {
    color: var(--fm-accent-orange);
}

.fm-rules-section .fm-section-subtitle {
    font-size: 13px;
    color: var(--fm-text-muted);
    margin-left: 26px;
}

.fm-badge.yara {
    background: rgba(248, 81, 73, 0.2);
    color: var(--fm-accent-red);
}

.fm-badge.sigma {
    background: rgba(210, 153, 34, 0.2);
    color: var(--fm-accent-orange);
}

.fm-badge.regex {
    background: rgba(88, 166, 255, 0.2);
    color: var(--fm-accent-cyan);
}

/* Rule Cards Container */
.fm-rule-cards-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Rule Card */
.fm-rule-card {
    background: var(--fm-bg-glass);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
}

.fm-rule-card:hover {
    border-color: var(--fm-border-hover);
    box-shadow: var(--fm-shadow-md);
}

.fm-rule-card.critical {
    border-left: 4px solid var(--fm-accent-red);
}

.fm-rule-card.high {
    border-left: 4px solid var(--fm-accent-orange);
}

.fm-rule-card.medium {
    border-left: 4px solid #f0c744;
}

.fm-rule-card.low {
    border-left: 4px solid var(--fm-accent-blue);
}

/* Card Header */
.fm-rule-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--fm-border-subtle);
}

.fm-rule-card-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fm-rule-card-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fm-rule-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.fm-rule-type-badge.yara {
    background: rgba(248, 81, 73, 0.2);
    color: var(--fm-accent-red);
    border: 1px solid rgba(248, 81, 73, 0.4);
}

.fm-rule-type-badge.sigma {
    background: rgba(210, 153, 34, 0.2);
    color: var(--fm-accent-orange);
    border: 1px solid rgba(210, 153, 34, 0.4);
}

.fm-rule-type-badge.regex {
    background: rgba(88, 166, 255, 0.2);
    color: var(--fm-accent-cyan);
    border: 1px solid rgba(88, 166, 255, 0.4);
}

.fm-rule-severity-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.fm-rule-severity-badge.critical {
    background: rgba(248, 81, 73, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(248, 81, 73, 0.4);
}

.fm-rule-severity-badge.high {
    background: rgba(210, 153, 34, 0.2);
    color: var(--fm-accent-orange);
    border: 1px solid rgba(210, 153, 34, 0.4);
}

.fm-rule-severity-badge.medium {
    background: rgba(240, 199, 68, 0.2);
    color: #f0c744;
    border: 1px solid rgba(240, 199, 68, 0.4);
}

.fm-rule-severity-badge.low {
    background: rgba(54, 127, 211, 0.2);
    color: var(--fm-accent-blue);
    border: 1px solid rgba(54, 127, 211, 0.4);
}

.fm-rule-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--fm-text-muted);
    border: 1px solid var(--fm-border-color);
}

.fm-rule-timestamp {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--fm-text-muted);
}

.fm-rule-timestamp i {
    color: var(--fm-text-muted);
}

/* Rule Name Section */
.fm-rule-name-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--fm-border-subtle);
}

.fm-rule-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--fm-accent-blue);
    margin: 0 0 6px 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.fm-rule-name:hover {
    color: #58a6ff;
    text-decoration: underline;
}

.fm-rule-description {
    font-size: 13px;
    color: var(--fm-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Match Section */
.fm-rule-match-section {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--fm-border-subtle);
}

.fm-rule-match-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--fm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.fm-rule-match-header i {
    color: var(--fm-accent-red);
}

.fm-rule-match-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fm-rule-match-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fm-rule-match-item label {
    font-size: 11px;
    color: var(--fm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fm-rule-match-strings {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fm-match-string {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(248, 81, 73, 0.15);
    color: var(--fm-accent-red);
    border-radius: 4px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 12px;
}

.fm-match-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

/* MITRE Section (Sigma) */
.fm-rule-mitre-section {
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--fm-border-subtle);
}

.fm-mitre-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--fm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.fm-mitre-header i {
    color: var(--fm-accent-orange);
}

.fm-mitre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fm-mitre-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.fm-mitre-tag.tactic {
    background: rgba(210, 153, 34, 0.15);
    color: var(--fm-accent-orange);
    border: 1px solid rgba(210, 153, 34, 0.3);
}

.fm-mitre-tag.technique {
    background: rgba(54, 127, 211, 0.15);
    color: var(--fm-accent-blue);
    border: 1px solid rgba(54, 127, 211, 0.3);
}

/* Detection Section (Sigma) */
.fm-rule-detection-section {
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--fm-border-subtle);
}

.fm-detection-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--fm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.fm-detection-header i {
    color: var(--fm-accent-cyan);
}

.fm-detection-fields {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fm-detection-field {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    font-family: 'SF Mono', 'Consolas', monospace;
}

.fm-field-key {
    color: var(--fm-accent-cyan);
    flex-shrink: 0;
}

.fm-field-value {
    color: var(--fm-text-secondary);
    word-break: break-all;
}

/* Pattern Section (Regex) */
.fm-rule-pattern-section {
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--fm-border-subtle);
}

.fm-pattern-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--fm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.fm-pattern-header i {
    color: var(--fm-accent-cyan);
}

.fm-regex-pattern {
    display: block;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-sm);
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 12px;
    color: var(--fm-accent-orange);
    word-break: break-all;
    overflow-x: auto;
}

[data-theme="light"] .fm-regex-pattern,
html[data-theme="light"] .fm-regex-pattern {
    background: rgba(255, 165, 0, 0.1);
    border-color: rgba(255, 165, 0, 0.3);
    color: #b45309 !important;
    /* Darker orange/brown for visibility */
}

/* Regex Matches */
.fm-regex-matches {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
}

.fm-regex-match {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--fm-radius-sm);
}

.fm-match-line {
    font-size: 11px;
    color: var(--fm-text-muted);
    flex-shrink: 0;
}

.fm-match-content {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 12px;
    color: var(--fm-accent-green);
    word-break: break-all;
}

/* Source Section */
.fm-rule-source-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--fm-border-subtle);
}

.fm-rule-attr {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fm-rule-attr.full-width {
    grid-column: 1 / -1;
}

.fm-rule-attr i {
    display: none;
}

.fm-rule-attr label {
    font-size: 10px;
    color: var(--fm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fm-rule-attr span {
    font-size: 13px;
    color: var(--fm-text-secondary);
}

.fm-rule-path {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 12px !important;
    color: var(--fm-text-primary) !important;
    word-break: break-all;
}

.fm-source-type-badge {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    font-size: 11px !important;
    font-weight: 600;
    color: var(--fm-text-secondary) !important;
    text-transform: uppercase;
}

/* Card Actions */
.fm-rule-card-actions {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.15);
}

.fm-rule-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-sm);
    color: var(--fm-text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fm-rule-action-btn:hover {
    background: rgba(54, 127, 211, 0.15);
    border-color: var(--fm-accent-blue);
    color: var(--fm-accent-blue);
}

.fm-rule-action-btn i {
    font-size: 12px;
}

/* Empty State */
.fm-rules-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.fm-rules-empty i {
    font-size: 48px;
    color: var(--fm-text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.fm-rules-empty h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--fm-text-primary);
    margin: 0 0 8px 0;
}

.fm-rules-empty p {
    font-size: 14px;
    color: var(--fm-text-muted);
    margin: 0;
}

/* Rule Modal */
.fm-rule-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    backdrop-filter: blur(4px);
}

.fm-rule-modal {
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    background: var(--fm-bg-dark);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.fm-rule-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--fm-border-color);
}

.fm-rule-modal-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--fm-text-primary);
    margin: 0;
}

.fm-modal-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    border-radius: 6px;
    color: var(--fm-accent-red);
    cursor: pointer;
    transition: all 0.2s ease;
}

.fm-modal-close-btn:hover {
    background: rgba(248, 81, 73, 0.2);
}

.fm-rule-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.fm-rule-definition h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.fm-rule-definition h4 i {
    color: var(--fm-accent-cyan);
}

.fm-rule-code {
    display: block;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-md);
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: var(--fm-text-secondary);
    white-space: pre-wrap;
    overflow-x: auto;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .fm-rules-header {
        flex-direction: column;
        align-items: stretch;
    }

    .fm-rules-stats {
        flex-direction: column;
    }

    .fm-rule-stat {
        justify-content: flex-start;
    }

    .fm-rule-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .fm-rule-source-section {
        grid-template-columns: 1fr;
    }

    .fm-rule-card-actions {
        flex-wrap: wrap;
    }
}

/* Light Theme - Rule Modal */
[data-theme="light"] .fm-rule-modal-overlay,
html[data-theme="light"] .fm-rule-modal-overlay {
    background: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .fm-rule-modal,
html[data-theme="light"] .fm-rule-modal {
    background: #ffffff;
    border-color: #d0d7de;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .fm-rule-modal-header,
html[data-theme="light"] .fm-rule-modal-header {
    background: #f6f8fa;
    border-bottom-color: #d0d7de;
}

[data-theme="light"] .fm-rule-modal-header h3,
html[data-theme="light"] .fm-rule-modal-header h3 {
    color: #24292f;
}

[data-theme="light"] .fm-modal-close-btn,
html[data-theme="light"] .fm-modal-close-btn {
    background: rgba(248, 81, 73, 0.1);
    border-color: rgba(248, 81, 73, 0.3);
}

[data-theme="light"] .fm-modal-close-btn:hover,
html[data-theme="light"] .fm-modal-close-btn:hover {
    background: rgba(248, 81, 73, 0.2);
}

[data-theme="light"] .fm-rule-modal-body,
html[data-theme="light"] .fm-rule-modal-body {
    background: #ffffff;
}

[data-theme="light"] .fm-rule-definition h4,
html[data-theme="light"] .fm-rule-definition h4 {
    color: #57606a;
}

[data-theme="light"] .fm-rule-code,
html[data-theme="light"] .fm-rule-code {
    background: #f6f8fa;
    border-color: #d0d7de;
    color: #24292f;
}

/* ==========================================
   TIMELINE PAGE STYLES
   ========================================== */

.fm-timeline-page {
    padding: 20px 0px;
}

.fm-timeline-page .fm-section-body {
    padding: 0 20px 20px 20px;
}

/* Timeline Chart Wrapper */
.fm-timeline-page .fm-timeline-chart-wrapper {
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--fm-radius-md);
    padding: 8px;
    position: relative;
    z-index: 30;
    overflow: visible;
}

.fm-timeline-page .fm-timeline-chart {
    width: 100%;
    height: 200px;
    background: transparent !important;
    overflow: visible !important;
}

.fm-timeline-page .fm-timeline-chart.loading {
    opacity: 0.5;
}

.fm-timeline-page .fm-timeline-chart>div,
.fm-timeline-page .fm-timeline-chart canvas,
.fm-timeline-page .fm-timeline-chart svg {
    background: transparent !important;
    overflow: visible !important;
}

.fm-timeline-page .amcharts-tooltip,
.fm-timeline-page .amcharts-tooltip-container {
    z-index: 100000 !important;
    pointer-events: none !important;
}

.fm-timeline-combined-tooltip {
    position: absolute;
    z-index: 100000;
    pointer-events: none;
    background: transparent;
    border-radius: 8px;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
}

.fm-timeline-combined-tooltip>div {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
}

.fm-timeline-tooltip-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 148, 158, 0.8) rgba(22, 27, 34, 0.35);
    scrollbar-gutter: stable;
}

.fm-timeline-tooltip-body::-webkit-scrollbar {
    width: 7px;
}

.fm-timeline-tooltip-body::-webkit-scrollbar-track {
    background: rgba(22, 27, 34, 0.35);
    border-radius: 999px;
}

.fm-timeline-tooltip-body::-webkit-scrollbar-thumb {
    background: rgba(139, 148, 158, 0.8);
    border: 2px solid rgba(22, 27, 34, 0.9);
    border-radius: 999px;
}

.fm-timeline-tooltip-body::-webkit-scrollbar-thumb:hover {
    background: rgba(177, 186, 196, 0.9);
}

.fm-timeline-selection-overlay {
    position: absolute;
    z-index: 99999;
    pointer-events: none;
    background: rgba(54, 127, 211, 0.18);
    border: 1px solid rgba(54, 127, 211, 0.65);
    border-radius: 3px;
}

[data-theme="light"] .fm-timeline-combined-tooltip>div,
html[data-theme="light"] .fm-timeline-combined-tooltip>div {
    background: #ffffff;
    border-color: #d0d7de;
}

[data-theme="light"] .fm-timeline-tooltip-body,
html[data-theme="light"] .fm-timeline-tooltip-body {
    scrollbar-color: rgba(101, 109, 118, 0.75) rgba(208, 215, 222, 0.35);
}

[data-theme="light"] .fm-timeline-tooltip-body::-webkit-scrollbar-track,
html[data-theme="light"] .fm-timeline-tooltip-body::-webkit-scrollbar-track {
    background: rgba(208, 215, 222, 0.35);
}

[data-theme="light"] .fm-timeline-tooltip-body::-webkit-scrollbar-thumb,
html[data-theme="light"] .fm-timeline-tooltip-body::-webkit-scrollbar-thumb {
    background: rgba(101, 109, 118, 0.75);
    border-color: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .fm-timeline-tooltip-body::-webkit-scrollbar-thumb:hover,
html[data-theme="light"] .fm-timeline-tooltip-body::-webkit-scrollbar-thumb:hover {
    background: rgba(87, 96, 106, 0.85);
}

[data-theme="light"] .fm-timeline-selection-overlay,
html[data-theme="light"] .fm-timeline-selection-overlay {
    background: rgba(54, 127, 211, 0.14);
    border-color: rgba(54, 127, 211, 0.5);
}

/* Timeline Actions Bar */
.fm-timeline-page .fm-timeline-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-top: 12px;
    border-top: 1px solid var(--fm-border-subtle);
    flex-wrap: wrap;
    gap: 12px;
    overflow: visible;
    position: relative;
    z-index: 5;
}

/* Allow dropdown to overflow section - CRITICAL fix for timezone dropdown */
.fm-timeline-page .fm-section {
    overflow: visible;
}

.fm-timeline-page .fm-section-body {
    overflow: visible;
}

.fm-timeline-page .fm-timeline-controls-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fm-timeline-page .fm-timeline-controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Timezone Dropdown - ensure it can overflow parent container */
.fm-timeline-page .fm-timeline-controls-right .dropdown {
    position: relative;
}

.fm-timeline-page .fm-timeline-controls-right .dropdown-menu {
    position: absolute;
    z-index: 9999;
    background: rgba(30, 35, 45, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    padding: 6px;
    min-width: 195px;
    max-height: 300px;
    overflow-y: auto;
}

.fm-timeline-page .fm-timeline-controls-right .dropdown-menu>li>a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: #c8d2dc !important;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.fm-timeline-page .fm-timeline-controls-right .dropdown-menu>li>a:hover {
    background: rgba(54, 127, 211, 0.15);
    color: #fff !important;
}

.fm-timeline-page .fm-timeline-controls-right .dropdown-menu>li.active>a {
    background: rgba(54, 127, 211, 0.2);
    color: var(--fm-accent-blue) !important;
}

.fm-timeline-page .fm-timeline-controls-right .dropdown-menu>li>a .fa-check {
    color: var(--fm-accent-green);
    margin-right: 4px;
}

/* Light theme dropdown */
[data-theme="light"] .fm-timeline-page .fm-timeline-controls-right .dropdown-menu,
html[data-theme="light"] .fm-timeline-page .fm-timeline-controls-right .dropdown-menu {
    background: #ffffff;
    border-color: #d0d7de;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .fm-timeline-page .fm-timeline-controls-right .dropdown-menu>li>a,
html[data-theme="light"] .fm-timeline-page .fm-timeline-controls-right .dropdown-menu>li>a {
    color: #24292f !important;
}

[data-theme="light"] .fm-timeline-page .fm-timeline-controls-right .dropdown-menu>li>a:hover,
html[data-theme="light"] .fm-timeline-page .fm-timeline-controls-right .dropdown-menu>li>a:hover {
    background: rgba(54, 127, 211, 0.1);
}

/* Filter Chips Container with Actions */
.fm-filter-chips-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 0;
    border-bottom: 1px solid var(--fm-border-subtle);
    margin-bottom: 16px;
}

.fm-filter-chips-actions {
    display: flex;
    gap: 8px;
}

.fm-timeline-page .fm-filter-chips-actions {
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.fm-filter-actions-left,
.fm-filter-actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fm-filter-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-sm);
    color: var(--fm-text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fm-filter-action-btn:hover {
    background: rgba(54, 127, 211, 0.1);
    border-color: var(--fm-accent-blue);
    color: var(--fm-accent-blue);
}

.fm-filter-action-btn i {
    font-size: 13px;
}

.fm-artifacts-dropdown {
    position: relative;
}

.fm-artifacts-count {
    padding: 1px 6px;
    border-radius: 10px;
    background: rgba(54, 127, 211, 0.18);
    color: var(--fm-accent-blue);
    font-size: 11px;
    font-weight: 600;
}

.fm-artifacts-menu {
    min-width: 340px;
    max-height: 420px;
    overflow-y: auto;
    padding: 8px !important;
}

.fm-artifacts-menu-header {
    position: sticky;
    top: -8px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 8px 10px;
    margin: -8px -8px 4px;
    background: rgba(30, 35, 45, 0.98);
    border-bottom: 1px solid var(--fm-border-subtle);
    color: var(--fm-text-primary);
    font-size: 12px;
    font-weight: 600;
}

.fm-artifacts-menu-action {
    border: none;
    background: transparent;
    color: var(--fm-accent-blue);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.fm-artifacts-option {
    list-style: none;
}

.fm-artifacts-option label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px;
    border-radius: var(--fm-radius-sm);
    color: var(--fm-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.fm-artifacts-option label:hover {
    background: rgba(54, 127, 211, 0.14);
    color: var(--fm-text-primary);
}

.fm-artifacts-option input {
    margin: 0;
    flex-shrink: 0;
}

.fm-artifacts-option-label {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.fm-artifacts-option-count {
    color: var(--fm-text-muted);
    font-size: 11px;
    font-weight: 600;
}

.fm-timeline-page .fm-filter-chips {
    align-items: center;
}

.fm-timeline-page .fm-filter-chips.compact {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
}

.fm-timeline-page .fm-filter-chips.compact::-webkit-scrollbar {
    height: 6px;
}

.fm-timeline-page .fm-filter-chips.compact::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.fm-timeline-page .fm-filter-chips.compact::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.fm-timeline-page .fm-filter-chips.compact::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

[data-theme="light"] .fm-timeline-page .fm-filter-chips.compact::-webkit-scrollbar-track,
html[data-theme="light"] .fm-timeline-page .fm-filter-chips.compact::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .fm-timeline-page .fm-filter-chips.compact::-webkit-scrollbar-thumb,
html[data-theme="light"] .fm-timeline-page .fm-filter-chips.compact::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .fm-timeline-page .fm-filter-chips.compact::-webkit-scrollbar-thumb:hover,
html[data-theme="light"] .fm-timeline-page .fm-filter-chips.compact::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.fm-timeline-page .fm-filter-chip {
    max-width: 240px;
    flex-shrink: 0;
}

.fm-timeline-page .fm-filter-chip-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fm-filter-chip.excluded {
    opacity: 0.48;
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.08);
}

.fm-filter-chip-more {
    color: var(--fm-accent-blue);
    border-color: rgba(54, 127, 211, 0.35);
    background: rgba(54, 127, 211, 0.08);
}

.fm-filter-chip-more:hover {
    color: #fff;
    background: rgba(54, 127, 211, 0.22);
}

[data-theme="light"] .fm-artifacts-menu-header,
html[data-theme="light"] .fm-artifacts-menu-header {
    background: #ffffff;
    border-bottom-color: #d0d7de;
}

[data-theme="light"] .fm-filter-chip.excluded,
html[data-theme="light"] .fm-filter-chip.excluded {
    background: rgba(36, 41, 47, 0.03);
    border-color: rgba(36, 41, 47, 0.08);
}

/* Results Info */
.fm-timeline-results-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    font-size: 13px;
    color: var(--fm-text-secondary);
    border-bottom: 1px solid var(--fm-border-subtle);
    margin-bottom: 16px;
}

.fm-timeline-results-info .fm-results-duration {
    color: var(--fm-text-muted);
    font-size: 12px;
}

/* Timeline Cards View - Reusing existing card classes */
.fm-timeline-page .fm-cards-view {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    overflow-x: hidden;
}

.fm-timeline-page .fm-cards-view.loading {
    opacity: 0.6;
    pointer-events: none;
}

.fm-timeline-page .fm-card {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.fm-timeline-page .fm-card-header {
    min-width: 0;
}

.fm-timeline-page .fm-card-name-wrapper {
    flex: 0 1 auto;
    max-width: min(420px, 40vw);
    min-width: 0;
}

.fm-timeline-page .fm-card-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fm-timeline-page .fm-card-badge.artifact {
    max-width: 280px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fm-timeline-page .fm-card-endpoint {
    max-width: 190px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fm-timeline-page .fm-card-timestamp {
    flex-shrink: 0;
}

.fm-timeline-page .fm-card-body {
    gap: 10px;
    min-width: 0;
    overflow: hidden;
}

.fm-timeline-page .fm-card-body>div[ng-if] {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.fm-timeline-page .fm-card-attributes,
.fm-timeline-page .fm-card-identifiers,
.fm-timeline-page .fm-card-context,
.fm-timeline-page .fm-card-content {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.018);
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 7px;
    cursor: default;
}

.fm-timeline-page .fm-card-attributes::before,
.fm-timeline-page .fm-card-identifiers::before,
.fm-timeline-page .fm-card-context::before,
.fm-timeline-page .fm-card-content::before {
    content: attr(data-section-label);
    color: var(--fm-text-muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fm-timeline-page .fm-card-attributes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}

.fm-timeline-page .fm-card-attributes::before {
    flex: 0 0 70px;
}

.fm-timeline-page .fm-card-attribute {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.fm-timeline-page .fm-card-attribute:hover {
    background: transparent;
    border-left-color: transparent;
}

.fm-timeline-page .fm-card-identifiers {
    display: grid;
    grid-template-columns: 70px repeat(auto-fit, minmax(300px, 1fr));
    align-items: center;
    gap: 6px 10px;
}

.fm-timeline-page .fm-card-identifiers::before {
    align-self: center;
}

.fm-timeline-page .fm-card-identifier {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.fm-timeline-page .fm-card-identifier:hover {
    background: transparent;
    border-left-color: transparent;
}

.fm-timeline-page .fm-card-context,
.fm-timeline-page .fm-card-content {
    display: grid;
    grid-template-columns: 70px auto minmax(0, 1fr);
    align-items: center;
    gap: 6px 8px;
}

.fm-timeline-page .fm-card-context::before,
.fm-timeline-page .fm-card-content::before {
    align-self: center;
}

.fm-timeline-page .fm-card-context[data-section-label="Path"] .fm-context-label {
    display: none;
}

.fm-timeline-page .fm-card-context[data-section-label="Path"] .fm-context-value {
    grid-column: 2 / -1;
}

.fm-timeline-page .fm-attribute-label,
.fm-timeline-page .fm-identifier-label,
.fm-timeline-page .fm-context-label,
.fm-timeline-page .fm-content-label {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    height: 20px;
    padding: 0 7px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--fm-text-secondary);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.fm-timeline-page .fm-attribute-value,
.fm-timeline-page .fm-identifier-value,
.fm-timeline-page .fm-context-value,
.fm-timeline-page .fm-content-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    line-height: 1.35;
}

.fm-timeline-page .fm-attribute-value {
    max-width: min(520px, 100%);
}

.fm-timeline-page .fm-identifier-value,
.fm-timeline-page .fm-context-value,
.fm-timeline-page .fm-content-value {
    font-size: 12px;
}

@media (max-width: 1200px) {
    .fm-timeline-page .fm-card-name-wrapper {
        max-width: 300px;
    }

    .fm-timeline-page .fm-card-badge.artifact {
        max-width: 220px;
    }
}

@media (max-width: 760px) {
    .fm-timeline-page .fm-card-header {
        align-items: flex-start;
    }

    .fm-timeline-page .fm-card-name-wrapper,
    .fm-timeline-page .fm-card-badge.artifact,
    .fm-timeline-page .fm-card-endpoint {
        max-width: 100%;
    }

    .fm-timeline-page .fm-card-spacer {
        display: none;
    }

    .fm-timeline-page .fm-card-attributes::before {
        flex-basis: 100%;
    }

    .fm-timeline-page .fm-card-identifiers,
    .fm-timeline-page .fm-card-context,
    .fm-timeline-page .fm-card-content {
        grid-template-columns: 1fr;
    }

    .fm-timeline-page .fm-card-context[data-section-label="Path"] .fm-context-value {
        grid-column: 1;
    }
}

/* Card Endpoint in Header */
.fm-card-endpoint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--fm-text-secondary);
}

.fm-card-endpoint i {
    color: var(--fm-text-muted);
    font-size: 11px;
}

/* Severity Classes for Rules */
.severity-critical {
    color: #f85149 !important;
    font-weight: 600;
}

.severity-high {
    color: #ffa657 !important;
    font-weight: 600;
}

.severity-medium {
    color: #d29922 !important;
}

.severity-low {
    color: #58a6ff !important;
}

/* Event Type Badges for User Events */
.fm-event-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fm-event-type-badge.login {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
    border: 1px solid rgba(63, 185, 80, 0.4);
}

.fm-event-type-badge.logout {
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
    border: 1px solid rgba(88, 166, 255, 0.4);
}

.fm-event-type-badge.failed {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
    border: 1px solid rgba(248, 81, 73, 0.4);
}

/* File Event Badges */
.fm-file-event-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fm-file-event-badge.accessed {
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
    border: 1px solid rgba(88, 166, 255, 0.4);
}

.fm-file-event-badge.created {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
    border: 1px solid rgba(63, 185, 80, 0.4);
}

.fm-file-event-badge.modified {
    background: rgba(210, 153, 34, 0.15);
    color: #d29922;
    border: 1px solid rgba(210, 153, 34, 0.4);
}

.fm-file-event-badge.deleted {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
    border: 1px solid rgba(248, 81, 73, 0.4);
}

/* Empty State */
.fm-timeline-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background: var(--fm-bg-glass);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
}

.fm-timeline-empty i {
    font-size: 48px;
    color: var(--fm-text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.fm-timeline-empty h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--fm-text-primary);
    margin: 0 0 8px 0;
}

.fm-timeline-empty p {
    font-size: 14px;
    color: var(--fm-text-muted);
    margin: 0;
}

/* Loading State */
.fm-timeline-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--fm-text-muted);
    font-size: 14px;
    gap: 12px;
}

.fm-timeline-loading-state i {
    font-size: 24px;
    color: var(--fm-accent-blue);
}

/* Load More Button */
.fm-load-more {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.fm-load-more .fm-btn {
    min-width: 150px;
}

/* Responsive */
@media (max-width: 992px) {
    .fm-timeline-page .fm-timeline-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .fm-timeline-page .fm-timeline-controls-left,
    .fm-timeline-page .fm-timeline-controls-right {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .fm-timeline-page {
        padding: 12px;
    }
}

/* ==========================================
   REPORT / CHRONOLOGY PAGE STYLES
   ========================================== */

.fm-report-page {
    padding: 20px;
}

/* ===== CHRONOLOGY CARDS ===== */
.fm-chrono-card {
    display: flex;
    background: linear-gradient(135deg, rgba(13, 17, 23, 0.9) 0%, rgba(22, 27, 34, 0.95) 100%);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.fm-chrono-card:hover {
    border-color: rgba(54, 127, 211, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(54, 127, 211, 0.2);
    transform: translateY(-2px);
}

/* Color Accent Bar */
.fm-chrono-card-accent {
    width: 5px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--fm-accent-blue) 0%, rgba(54, 127, 211, 0.3) 100%);
}

.fm-chrono-card.process .fm-chrono-card-accent {
    background: linear-gradient(180deg, #3fb950 0%, rgba(63, 185, 80, 0.3) 100%);
}

.fm-chrono-card.file .fm-chrono-card-accent {
    background: linear-gradient(180deg, #58a6ff 0%, rgba(88, 166, 255, 0.3) 100%);
}

.fm-chrono-card.network .fm-chrono-card-accent {
    background: linear-gradient(180deg, #367fd3 0%, rgba(54, 127, 211, 0.3) 100%);
}

.fm-chrono-card.registry .fm-chrono-card-accent {
    background: linear-gradient(180deg, #a371f7 0%, rgba(163, 113, 247, 0.3) 100%);
}

.fm-chrono-card.autorun .fm-chrono-card-accent {
    background: linear-gradient(180deg, #d29922 0%, rgba(210, 153, 34, 0.3) 100%);
}

.fm-chrono-card.rule .fm-chrono-card-accent {
    background: linear-gradient(180deg, #f85149 0%, rgba(248, 81, 73, 0.3) 100%);
}

.fm-chrono-card.user .fm-chrono-card-accent {
    background: linear-gradient(180deg, #8b949e 0%, rgba(139, 148, 158, 0.3) 100%);
}

.fm-chrono-card.sysmon .fm-chrono-card-accent {
    background: linear-gradient(180deg, #ffa657 0%, rgba(255, 166, 87, 0.3) 100%);
}

.fm-chrono-card.manual .fm-chrono-card-accent {
    background: linear-gradient(180deg, #d29922 0%, rgba(210, 153, 34, 0.3) 100%);
}

/* Card Actions */
.fm-chrono-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 12px;
    background: rgba(0, 0, 0, 0.25);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.fm-chrono-action {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--fm-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.fm-chrono-action:hover {
    transform: scale(1.05);
}

.fm-chrono-action.delete:hover {
    background: rgba(248, 81, 73, 0.2);
    border-color: rgba(248, 81, 73, 0.5);
    color: #f85149;
    box-shadow: 0 0 12px rgba(248, 81, 73, 0.2);
}

.fm-chrono-action.edit:hover {
    background: rgba(54, 127, 211, 0.2);
    border-color: rgba(54, 127, 211, 0.5);
    color: #367fd3;
    box-shadow: 0 0 12px rgba(54, 127, 211, 0.2);
}

/* Card Main */
.fm-chrono-card-main {
    flex: 1;
    min-width: 0;
}

/* Header */
.fm-chrono-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
}

/* Artifact Badge */
.fm-chrono-artifact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    background: rgba(54, 127, 211, 0.15);
    color: #58a6ff;
    border: 1px solid rgba(54, 127, 211, 0.3);
}

.fm-chrono-artifact i {
    font-size: 12px;
}

.fm-chrono-artifact.process {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
    border-color: rgba(63, 185, 80, 0.3);
}

.fm-chrono-artifact.file {
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
    border-color: rgba(88, 166, 255, 0.3);
}

.fm-chrono-artifact.network {
    background: rgba(54, 127, 211, 0.15);
    color: #367fd3;
    border-color: rgba(54, 127, 211, 0.3);
}

.fm-chrono-artifact.registry {
    background: rgba(163, 113, 247, 0.15);
    color: #a371f7;
    border-color: rgba(163, 113, 247, 0.3);
}

.fm-chrono-artifact.autorun {
    background: rgba(210, 153, 34, 0.15);
    color: #d29922;
    border-color: rgba(210, 153, 34, 0.3);
}

.fm-chrono-artifact.rule {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
    border-color: rgba(248, 81, 73, 0.3);
}

.fm-chrono-artifact.user {
    background: rgba(139, 148, 158, 0.15);
    color: #8b949e;
    border-color: rgba(139, 148, 158, 0.3);
}

.fm-chrono-artifact.sysmon {
    background: rgba(255, 166, 87, 0.15);
    color: #ffa657;
    border-color: rgba(255, 166, 87, 0.3);
}

.fm-chrono-artifact.manual {
    background: rgba(210, 153, 34, 0.2);
    color: #d29922;
    border-color: rgba(210, 153, 34, 0.4);
}

.fm-chrono-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fm-chrono-endpoint,
.fm-chrono-user {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--fm-text-secondary);
}

.fm-chrono-endpoint i,
.fm-chrono-user i {
    color: var(--fm-text-muted);
}

.fm-chrono-timestamp {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--fm-accent-cyan);
    padding: 6px 12px;
    background: rgba(88, 166, 255, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(88, 166, 255, 0.2);
}

.fm-chrono-timestamp i {
    color: var(--fm-accent-cyan);
}

/* Description Section */
.fm-chrono-description {
    padding: 20px;
}

/* Manual Event */
.fm-chrono-manual-event {
    background: linear-gradient(135deg, rgba(210, 153, 34, 0.1) 0%, rgba(210, 153, 34, 0.05) 100%);
    border: 1px solid rgba(210, 153, 34, 0.25);
    border-left: 4px solid #d29922;
    border-radius: 8px;
    padding: 16px 20px;
}

.fm-manual-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #d29922;
    margin-bottom: 10px;
}

.fm-manual-text {
    font-size: 14px;
    color: var(--fm-text-primary);
    line-height: 1.7;
    margin: 0;
}

/* Event Detail */
.fm-chrono-event-detail {
    /* nothing special */
}

.fm-event-summary {
    font-size: 15px;
    color: var(--fm-text-primary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.fm-event-action {
    color: var(--fm-text-secondary);
}

.fm-event-status {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 4px;
}

.fm-event-status.created {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
}

.fm-event-status.started {
    background: rgba(54, 127, 211, 0.15);
    color: #58a6ff;
}

.fm-event-status.modified {
    background: rgba(210, 153, 34, 0.15);
    color: #d29922;
}

.fm-event-status.deleted {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
}

.fm-event-status.login {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
}

.fm-event-status.logout {
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
}

.fm-event-status.failed {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
}

/* Code Highlights */
.fm-code-highlight {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    font-weight: 500;
    word-break: break-all;
}

.fm-code-highlight.name {
    background: rgba(54, 127, 211, 0.15);
    color: #58a6ff;
    border: 1px solid rgba(54, 127, 211, 0.25);
}

.fm-code-highlight.path {
    background: rgba(210, 153, 34, 0.12);
    color: #d29922;
    border: 1px solid rgba(210, 153, 34, 0.2);
}

.fm-code-highlight.rule {
    background: rgba(248, 81, 73, 0.12);
    color: #f85149;
    border: 1px solid rgba(248, 81, 73, 0.2);
}

.fm-code-highlight.network {
    background: rgba(54, 127, 211, 0.15);
    color: #367fd3;
    border: 1px solid rgba(54, 127, 211, 0.25);
}

.fm-code-highlight.file {
    background: rgba(88, 166, 255, 0.12);
    color: #79c0ff;
    border: 1px solid rgba(88, 166, 255, 0.2);
}

.fm-code-highlight.user {
    background: rgba(139, 148, 158, 0.15);
    color: #c9d1d9;
    border: 1px solid rgba(139, 148, 158, 0.25);
}

/* Event Attributes */
.fm-event-attrs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.fm-attr {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border-left: 3px solid var(--fm-border-color);
}

.fm-attr.path {
    border-left-color: #d29922;
}

.fm-attr.hash {
    border-left-color: #58a6ff;
}

.fm-attr.cmdline {
    border-left-color: #f85149;
    grid-column: 1 / -1;
}

.fm-attr.signer {
    border-left-color: #3fb950;
}

.fm-attr-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fm-text-muted);
}

.fm-attr-value {
    font-size: 12px;
    color: var(--fm-text-secondary);
    word-break: break-all;
}

.fm-attr-value.signed {
    color: #3fb950;
}

.fm-attr-value.score {
    color: #d29922;
    font-weight: 600;
}

code.fm-attr-value {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    background: transparent;
    padding: 0;
}

/* Comment Section */
.fm-chrono-comment {
    display: flex;
    gap: 14px;
    margin-top: 16px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(54, 127, 211, 0.08) 0%, rgba(54, 127, 211, 0.03) 100%);
    border: 1px solid rgba(54, 127, 211, 0.15);
    border-radius: 8px;
}

.fm-comment-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(54, 127, 211, 0.15);
    border-radius: 50%;
    color: var(--fm-accent-blue);
    font-size: 14px;
    flex-shrink: 0;
}

.fm-comment-content {
    flex: 1;
}

.fm-comment-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fm-accent-blue);
    margin-bottom: 4px;
    display: block;
}

.fm-comment-text {
    font-size: 13px;
    color: var(--fm-text-secondary);
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

/* ===== VERTICAL TIMELINE VIEW ===== */
.fm-v-timeline {
    position: relative;
    padding: 20px 0 20px 60px;
}

.fm-v-timeline-event {
    position: relative;
    margin-bottom: 24px;
}

/* Timeline Connector */
.fm-v-timeline-connector {
    position: absolute;
    left: -60px;
    top: 0;
    bottom: -24px;
    width: 60px;
}

.fm-v-timeline-line {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, rgba(54, 127, 211, 0.5) 0%, rgba(54, 127, 211, 0.2) 100%);
    border-radius: 2px;
}

.fm-v-timeline-event:last-child .fm-v-timeline-line {
    display: none;
}

.fm-v-timeline-dot {
    position: absolute;
    left: 6px;
    top: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--fm-bg-dark);
    border: 3px solid #367fd3;
    border-radius: 50%;
    color: #367fd3;
    font-size: 12px;
    z-index: 1;
    box-shadow: 0 0 16px rgba(54, 127, 211, 0.4);
}

.fm-v-timeline-dot.process {
    border-color: #3fb950;
    color: #3fb950;
    box-shadow: 0 0 16px rgba(63, 185, 80, 0.4);
}

.fm-v-timeline-dot.file {
    border-color: #58a6ff;
    color: #58a6ff;
    box-shadow: 0 0 16px rgba(88, 166, 255, 0.4);
}

.fm-v-timeline-dot.network {
    border-color: #367fd3;
    color: #367fd3;
    box-shadow: 0 0 16px rgba(54, 127, 211, 0.4);
}

.fm-v-timeline-dot.registry {
    border-color: #a371f7;
    color: #a371f7;
    box-shadow: 0 0 16px rgba(163, 113, 247, 0.4);
}

.fm-v-timeline-dot.autorun {
    border-color: #d29922;
    color: #d29922;
    box-shadow: 0 0 16px rgba(210, 153, 34, 0.4);
}

.fm-v-timeline-dot.rule {
    border-color: #f85149;
    color: #f85149;
    box-shadow: 0 0 16px rgba(248, 81, 73, 0.4);
}

.fm-v-timeline-dot.user {
    border-color: #8b949e;
    color: #8b949e;
    box-shadow: 0 0 16px rgba(139, 148, 158, 0.4);
}

.fm-v-timeline-dot.manual {
    border-color: #d29922;
    color: #d29922;
    box-shadow: 0 0 16px rgba(210, 153, 34, 0.4);
}

/* Timeline Content */
.fm-v-timeline-content {
    background: var(--fm-bg-glass);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
}

.fm-v-timeline-content:hover {
    border-color: var(--fm-border-hover);
    box-shadow: var(--fm-shadow-lg);
}

.fm-v-timeline-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid var(--fm-border-subtle);
    flex-wrap: wrap;
}

.fm-v-timeline-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--fm-accent-cyan);
    padding: 4px 10px;
    background: rgba(88, 166, 255, 0.1);
    border-radius: 4px;
}

.fm-v-timeline-artifact {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--fm-text-secondary);
}

.fm-v-timeline-artifact.process {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
}

.fm-v-timeline-artifact.file {
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
}

.fm-v-timeline-artifact.network {
    background: rgba(54, 127, 211, 0.15);
    color: #367fd3;
}

.fm-v-timeline-artifact.registry {
    background: rgba(163, 113, 247, 0.15);
    color: #a371f7;
}

.fm-v-timeline-artifact.autorun {
    background: rgba(210, 153, 34, 0.15);
    color: #d29922;
}

.fm-v-timeline-artifact.rule {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
}

.fm-v-timeline-artifact.user {
    background: rgba(139, 148, 158, 0.15);
    color: #8b949e;
}

.fm-v-timeline-artifact.manual {
    background: rgba(210, 153, 34, 0.15);
    color: #d29922;
}

.fm-v-timeline-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--fm-text-muted);
}

.fm-v-timeline-meta i {
    margin-right: 4px;
}

.fm-v-timeline-actions {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.fm-v-action {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--fm-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.fm-v-action:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--fm-border-color);
    color: var(--fm-text-primary);
}

/* Timeline Body */
.fm-v-timeline-body {
    padding: 14px 16px;
}

.fm-v-timeline-text {
    font-size: 13px;
    color: var(--fm-text-primary);
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.fm-v-timeline-text.manual {
    padding: 10px 14px;
    background: rgba(210, 153, 34, 0.1);
    border-left: 3px solid #d29922;
    border-radius: 0 6px 6px 0;
}

.fm-v-timeline-text code {
    background: rgba(54, 127, 211, 0.15);
    color: #58a6ff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.fm-v-timeline-text .status {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.fm-v-timeline-text .status.created {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
}

.fm-v-timeline-text .status.started {
    background: rgba(54, 127, 211, 0.15);
    color: #58a6ff;
}

.fm-v-timeline-text .status.modified {
    background: rgba(210, 153, 34, 0.15);
    color: #d29922;
}

.fm-v-timeline-text .status.deleted {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
}

.fm-v-timeline-text .status.login {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
}

.fm-v-timeline-text .status.logout {
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
}

.fm-v-timeline-text .status.failed {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
}

.fm-v-timeline-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.fm-v-timeline-details .detail {
    font-size: 11px;
    color: var(--fm-text-secondary);
}

.fm-v-timeline-details .detail strong {
    color: var(--fm-text-muted);
    margin-right: 4px;
}

.fm-v-timeline-details .detail code {
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
}

.fm-v-timeline-comment {
    font-size: 12px;
    color: var(--fm-text-muted);
    font-style: italic;
    padding: 10px 14px;
    background: rgba(54, 127, 211, 0.08);
    border-radius: 6px;
}

.fm-v-timeline-comment i {
    color: var(--fm-accent-blue);
    margin-right: 6px;
}

/* View Toggle */
.fm-view-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-md);
    padding: 4px;
    gap: 4px;
}

.fm-view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: var(--fm-radius-sm);
    color: var(--fm-text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fm-view-btn:hover {
    color: var(--fm-text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.fm-view-btn.active {
    background: var(--fm-accent-blue);
    color: #fff;
    box-shadow: 0 2px 8px rgba(54, 127, 211, 0.3);
}

.fm-view-btn i {
    font-size: 14px;
}

/* Report Cards View */
.fm-report-cards-view {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.fm-report-cards-view.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Report Card */
.fm-report-card {
    display: flex;
    background: var(--fm-bg-glass);
    border: 1px solid var(--fm-border-color);
    border-bottom: none;
    transition: all 0.2s ease;
}

.fm-report-card:first-child {
    border-radius: var(--fm-radius-lg) var(--fm-radius-lg) 0 0;
}

.fm-report-card:last-child {
    border-bottom: 1px solid var(--fm-border-color);
    border-radius: 0 0 var(--fm-radius-lg) var(--fm-radius-lg);
}

.fm-report-card:only-child {
    border-radius: var(--fm-radius-lg);
    border-bottom: 1px solid var(--fm-border-color);
}

.fm-report-card:hover {
    background: rgba(54, 127, 211, 0.05);
    z-index: 1;
}

.fm-report-card.manual-event {
    border-left: 3px solid var(--fm-accent-orange);
}

/* Card Actions */
.fm-report-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 12px;
    border-right: 1px solid var(--fm-border-subtle);
    background: rgba(0, 0, 0, 0.1);
}

.fm-report-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-sm);
    color: var(--fm-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.fm-report-action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--fm-text-primary);
}

.fm-report-action-btn.delete:hover {
    background: rgba(248, 81, 73, 0.15);
    border-color: rgba(248, 81, 73, 0.4);
    color: var(--fm-accent-red);
}

.fm-report-action-btn.edit:hover {
    background: rgba(54, 127, 211, 0.15);
    border-color: rgba(54, 127, 211, 0.4);
    color: var(--fm-accent-blue);
}

/* Card Content */
.fm-report-card-content {
    flex: 1;
    min-width: 0;
}

/* Card Header */
.fm-report-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--fm-border-subtle);
    flex-wrap: wrap;
    gap: 10px;
}

.fm-report-card-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.fm-report-card-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Artifact Badge */
.fm-report-artifact-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.08);
    color: var(--fm-text-secondary);
    border: 1px solid var(--fm-border-color);
}

.fm-report-artifact-badge.process {
    background: rgba(63, 185, 80, 0.15);
    color: var(--fm-accent-green);
    border-color: rgba(63, 185, 80, 0.4);
}

.fm-report-artifact-badge.file {
    background: rgba(88, 166, 255, 0.15);
    color: var(--fm-accent-cyan);
    border-color: rgba(88, 166, 255, 0.4);
}

.fm-report-artifact-badge.network {
    background: rgba(54, 127, 211, 0.15);
    color: var(--fm-accent-blue);
    border-color: rgba(54, 127, 211, 0.4);
}

.fm-report-artifact-badge.registry {
    background: rgba(163, 113, 247, 0.15);
    color: #a371f7;
    border-color: rgba(163, 113, 247, 0.4);
}

.fm-report-artifact-badge.autorun {
    background: rgba(210, 153, 34, 0.15);
    color: var(--fm-accent-orange);
    border-color: rgba(210, 153, 34, 0.4);
}

.fm-report-artifact-badge.rule {
    background: rgba(248, 81, 73, 0.15);
    color: var(--fm-accent-red);
    border-color: rgba(248, 81, 73, 0.4);
}

.fm-report-artifact-badge.user {
    background: rgba(139, 148, 158, 0.15);
    color: #8b949e;
    border-color: rgba(139, 148, 158, 0.4);
}

.fm-report-artifact-badge.sysmon {
    background: rgba(255, 166, 87, 0.15);
    color: #ffa657;
    border-color: rgba(255, 166, 87, 0.4);
}

.fm-report-artifact-badge.manual {
    background: rgba(210, 153, 34, 0.2);
    color: var(--fm-accent-orange);
    border-color: rgba(210, 153, 34, 0.5);
}

.fm-report-endpoint,
.fm-report-user {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--fm-text-secondary);
}

.fm-report-endpoint i,
.fm-report-user i {
    color: var(--fm-text-muted);
    font-size: 11px;
}

.fm-report-timestamp {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--fm-text-muted);
}

.fm-report-timestamp i {
    font-size: 11px;
}

/* Card Body */
.fm-report-card-body {
    padding: 16px;
}

.fm-report-description {
    margin-bottom: 12px;
}

.fm-report-summary {
    font-size: 14px;
    color: var(--fm-text-primary);
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.fm-report-summary code {
    background: rgba(54, 127, 211, 0.15);
    color: var(--fm-accent-cyan);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    word-break: break-all;
}

.fm-report-manual-text {
    font-size: 14px;
    color: var(--fm-text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 12px 16px;
    background: rgba(210, 153, 34, 0.1);
    border-left: 3px solid var(--fm-accent-orange);
    border-radius: 0 var(--fm-radius-sm) var(--fm-radius-sm) 0;
}

.fm-report-attrs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.fm-report-attr {
    font-size: 12px;
    color: var(--fm-text-secondary);
}

.fm-report-attr label {
    color: var(--fm-text-muted);
    margin-right: 4px;
}

.fm-report-attr code {
    background: rgba(0, 0, 0, 0.2);
    color: var(--fm-text-secondary);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    word-break: break-all;
}

/* Comment Section */
.fm-report-comment {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(54, 127, 211, 0.08);
    border: 1px solid rgba(54, 127, 211, 0.2);
    border-radius: var(--fm-radius-sm);
}

.fm-report-comment-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fm-accent-blue);
    margin-bottom: 6px;
}

.fm-report-comment-text {
    font-size: 13px;
    color: var(--fm-text-secondary);
    line-height: 1.5;
    margin: 0;
    font-style: italic;
}

/* Empty State */
.fm-report-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    background: var(--fm-bg-glass);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
}

.fm-report-empty-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(210, 153, 34, 0.1);
    border: 2px solid rgba(210, 153, 34, 0.3);
    border-radius: 50%;
    margin-bottom: 20px;
}

.fm-report-empty-icon i {
    font-size: 32px;
    color: var(--fm-accent-orange);
}

.fm-report-empty h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--fm-text-primary);
    margin: 0 0 8px 0;
}

.fm-report-empty p {
    font-size: 14px;
    color: var(--fm-text-muted);
    margin: 0 0 20px 0;
    max-width: 400px;
}

/* ==================== TIMELINE VIEW ==================== */

.fm-report-timeline-view {
    padding: 20px 0;
}

.fm-report-timeline-view.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Vertical Timeline */
.fm-vertical-timeline {
    position: relative;
    padding: 20px 0;
    max-width: 900px;
    margin: 0 auto;
}

.fm-timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg,
            var(--fm-accent-blue) 0%,
            var(--fm-accent-orange) 50%,
            var(--fm-accent-green) 100%);
    transform: translateX(-50%);
    border-radius: 1px;
}

.fm-timeline-event {
    display: flex;
    align-items: flex-start;
    margin-bottom: 40px;
    position: relative;
}

.fm-timeline-event.odd {
    flex-direction: row;
}

.fm-timeline-event.even {
    flex-direction: row-reverse;
}

/* Timeline Node */
.fm-timeline-node {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.fm-timeline-dot {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--fm-bg-dark);
    border: 3px solid var(--fm-accent-blue);
    border-radius: 50%;
    color: var(--fm-accent-blue);
    font-size: 14px;
    box-shadow: 0 0 20px rgba(54, 127, 211, 0.3);
}

.fm-timeline-dot.process {
    border-color: var(--fm-accent-green);
    color: var(--fm-accent-green);
    box-shadow: 0 0 20px rgba(63, 185, 80, 0.3);
}

.fm-timeline-dot.file {
    border-color: var(--fm-accent-cyan);
    color: var(--fm-accent-cyan);
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.3);
}

.fm-timeline-dot.network {
    border-color: var(--fm-accent-blue);
    color: var(--fm-accent-blue);
    box-shadow: 0 0 20px rgba(54, 127, 211, 0.3);
}

.fm-timeline-dot.autorun {
    border-color: var(--fm-accent-orange);
    color: var(--fm-accent-orange);
    box-shadow: 0 0 20px rgba(210, 153, 34, 0.3);
}

.fm-timeline-dot.rule {
    border-color: var(--fm-accent-red);
    color: var(--fm-accent-red);
    box-shadow: 0 0 20px rgba(248, 81, 73, 0.3);
}

.fm-timeline-dot.user {
    border-color: #8b949e;
    color: #8b949e;
    box-shadow: 0 0 20px rgba(139, 148, 158, 0.3);
}

.fm-timeline-dot.manual {
    border-color: var(--fm-accent-orange);
    color: var(--fm-accent-orange);
    box-shadow: 0 0 20px rgba(210, 153, 34, 0.3);
}

.fm-timeline-date {
    margin-top: 8px;
    text-align: center;
}

.fm-date-primary {
    font-size: 11px;
    font-weight: 600;
    color: var(--fm-text-primary);
    white-space: nowrap;
}

/* Timeline Event Card */
.fm-timeline-event-card {
    width: calc(50% - 60px);
    background: var(--fm-bg-glass);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
}

.fm-timeline-event.odd .fm-timeline-event-card {
    margin-right: auto;
}

.fm-timeline-event.even .fm-timeline-event-card {
    margin-left: auto;
}

.fm-timeline-event-card:hover {
    border-color: var(--fm-border-hover);
    box-shadow: var(--fm-shadow-lg);
    transform: translateY(-2px);
}

.fm-timeline-event-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--fm-border-subtle);
}

.fm-timeline-artifact {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--fm-text-secondary);
}

.fm-timeline-artifact.process {
    background: rgba(63, 185, 80, 0.15);
    color: var(--fm-accent-green);
}

.fm-timeline-artifact.file {
    background: rgba(88, 166, 255, 0.15);
    color: var(--fm-accent-cyan);
}

.fm-timeline-artifact.network {
    background: rgba(54, 127, 211, 0.15);
    color: var(--fm-accent-blue);
}

.fm-timeline-artifact.autorun {
    background: rgba(210, 153, 34, 0.15);
    color: var(--fm-accent-orange);
}

.fm-timeline-artifact.rule {
    background: rgba(248, 81, 73, 0.15);
    color: var(--fm-accent-red);
}

.fm-timeline-artifact.user {
    background: rgba(139, 148, 158, 0.15);
    color: #8b949e;
}

.fm-timeline-artifact.manual {
    background: rgba(210, 153, 34, 0.15);
    color: var(--fm-accent-orange);
}

.fm-timeline-endpoint,
.fm-timeline-user {
    font-size: 11px;
    color: var(--fm-text-muted);
}

.fm-timeline-endpoint i,
.fm-timeline-user i {
    margin-right: 4px;
}

.fm-timeline-event-actions {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.fm-action-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--fm-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.fm-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--fm-text-primary);
}

/* Event Body */
.fm-timeline-event-body {
    padding: 14px;
}

.fm-timeline-description {
    font-size: 13px;
    color: var(--fm-text-primary);
    line-height: 1.5;
    margin: 0 0 10px 0;
}

.fm-timeline-description code {
    background: rgba(54, 127, 211, 0.15);
    color: var(--fm-accent-cyan);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11px;
}

.fm-timeline-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.fm-timeline-detail {
    font-size: 11px;
    color: var(--fm-text-secondary);
}

.fm-timeline-detail label {
    color: var(--fm-text-muted);
    margin-right: 4px;
}

.fm-timeline-detail code {
    background: rgba(0, 0, 0, 0.2);
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 10px;
}

.fm-timeline-comment {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(54, 127, 211, 0.08);
    border-radius: var(--fm-radius-sm);
    font-size: 12px;
    color: var(--fm-text-secondary);
    font-style: italic;
}

.fm-timeline-comment i {
    color: var(--fm-accent-blue);
    margin-top: 2px;
}

/* Modal Styles */
.fm-modal .modal-content {
    background: var(--fm-bg-dark);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
}

.fm-modal .modal-header {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--fm-border-color);
    padding: 16px 20px;
}

.fm-modal .modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--fm-text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.fm-modal .modal-title i {
    color: var(--fm-accent-blue);
}

.fm-modal .close {
    color: var(--fm-text-muted);
    opacity: 1;
    font-size: 24px;
    text-shadow: none;
}

.fm-modal .close:hover {
    color: var(--fm-text-primary);
}

.fm-modal .modal-body {
    padding: 20px;
}

.fm-modal .modal-footer {
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--fm-border-color);
    padding: 16px 20px;
}

.fm-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

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

.fm-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--fm-text-secondary);
    margin-bottom: 6px;
    text-transform: none;
    letter-spacing: 0;
}

.fm-form-control {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-sm);
    color: var(--fm-text-primary);
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.fm-form-control:focus {
    outline: none;
    border-color: var(--fm-accent-blue);
    box-shadow: 0 0 0 3px rgba(54, 127, 211, 0.15);
}

.fm-form-control::placeholder {
    color: var(--fm-text-muted);
}

textarea.fm-form-control {
    resize: vertical;
    min-height: 80px;
}

select.fm-form-control {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

select.fm-form-control option {
    background: var(--fm-bg-primary);
    color: var(--fm-text-primary);
    padding: 10px;
}

.fm-form-control.error,
.fm-form-control.ng-invalid.ng-touched {
    border-color: #f85149;
}

.fm-form-label-required {
    color: #f85149;
}

/* Responsive Timeline */
@media (max-width: 992px) {
    .fm-vertical-timeline {
        padding-left: 40px;
    }

    .fm-timeline-line {
        left: 20px;
    }

    .fm-timeline-node {
        left: 20px;
    }

    .fm-timeline-event,
    .fm-timeline-event.odd,
    .fm-timeline-event.even {
        flex-direction: row;
    }

    .fm-timeline-event-card,
    .fm-timeline-event.odd .fm-timeline-event-card,
    .fm-timeline-event.even .fm-timeline-event-card {
        width: calc(100% - 60px);
        margin-left: auto;
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .fm-report-page {
        padding: 12px;
    }

    .fm-view-toggle {
        width: 100%;
        justify-content: center;
    }

    .fm-report-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .fm-report-card-header-right {
        width: 100%;
    }
}

/* =============================================================================
   ATTACK STORY - Kill Chain Timeline Visualization
   ============================================================================= */

.fm-attack-story {
    padding: 24px;
    min-height: 100%;
    font-size: 15px !important;
    /* Base font size for Attack Story */
}

/* Header Section */
.fm-attack-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.fm-attack-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fm-attack-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 26px !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35), 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.fm-attack-title {
    font-size: 28px !important;
    font-weight: 700;
    color: var(--fm-text-primary);
    margin: 0;
}

.fm-attack-subtitle {
    font-size: 16px !important;
    color: var(--fm-text-muted);
    margin: 4px 0 0 0;
}

.fm-attack-actions {
    display: flex;
    gap: 10px;
}

.fm-attack-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px !important;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.fm-attack-btn.secondary {
    background: var(--fm-bg-secondary);
    color: var(--fm-text-primary);
    border: 1px solid var(--fm-border-color);
}

.fm-attack-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--fm-accent-blue);
}

.fm-attack-btn.primary {
    background: linear-gradient(135deg, var(--fm-accent-blue), var(--fm-accent-cyan));
    color: white;
}

.fm-attack-btn.primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* Stats Cards */
.fm-attack-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.fm-attack-stat-card {
    background: linear-gradient(145deg, rgba(22, 28, 36, 0.9) 0%, rgba(17, 22, 29, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.25s ease;
}

.fm-attack-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
}

.fm-attack-stat-card.highlight {
    background: linear-gradient(145deg, rgba(54, 127, 211, 0.15) 0%, rgba(22, 28, 36, 0.95) 100%);
    border-color: rgba(54, 127, 211, 0.4);
    border-left: 4px solid var(--fm-accent-blue);
}

.fm-attack-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.fm-attack-stat-icon.critical {
    background: linear-gradient(135deg, rgba(54, 127, 211, 0.25) 0%, rgba(54, 127, 211, 0.1) 100%);
    color: #60a5fa;
    box-shadow: 0 4px 12px rgba(54, 127, 211, 0.2);
}

.fm-attack-stat-icon.danger {
    background: linear-gradient(135deg, rgba(248, 81, 73, 0.25) 0%, rgba(248, 81, 73, 0.1) 100%);
    color: #f87171;
    box-shadow: 0 4px 12px rgba(248, 81, 73, 0.2);
}

.fm-attack-stat-icon.warning {
    background: linear-gradient(135deg, rgba(210, 153, 34, 0.25) 0%, rgba(210, 153, 34, 0.1) 100%);
    color: #fbbf24;
    box-shadow: 0 4px 12px rgba(210, 153, 34, 0.2);
}

.fm-attack-stat-icon.info {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.25) 0%, rgba(88, 166, 255, 0.1) 100%);
    color: #38bdf8;
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.2);
}

.fm-attack-stat-icon.success {
    background: linear-gradient(135deg, rgba(63, 185, 80, 0.25) 0%, rgba(63, 185, 80, 0.1) 100%);
    color: #4ade80;
    box-shadow: 0 4px 12px rgba(63, 185, 80, 0.2);
}

.fm-attack-stat-icon.purple {
    background: linear-gradient(135deg, rgba(163, 113, 247, 0.25) 0%, rgba(163, 113, 247, 0.1) 100%);
    color: #c084fc;
    box-shadow: 0 4px 12px rgba(163, 113, 247, 0.2);
}

.fm-attack-stat-content {
    display: flex;
    flex-direction: column;
}

.fm-attack-stat-value {
    font-size: 28px !important;
    font-weight: 700;
    color: var(--fm-text-primary);
    line-height: 1;
}

.fm-attack-stat-label {
    font-size: 13px !important;
    color: var(--fm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Filter Pills */
.fm-attack-filters {
    display: flex;
    gap: 32px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.fm-filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fm-filter-actions {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.fm-filter-group label {
    font-size: 13px !important;
    font-weight: 600;
    color: var(--fm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fm-filter-pills {
    display: flex;
    gap: 6px;
}

.fm-filter-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px !important;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--fm-border-color);
    background: var(--fm-bg-secondary);
    color: var(--fm-text-secondary);
}

.fm-filter-pill:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.fm-filter-pill.active {
    background: linear-gradient(135deg, var(--fm-accent-blue), var(--fm-accent-cyan));
    color: white !important;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(54, 127, 211, 0.3);
}

.fm-filter-pill.severity.critical.active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.fm-filter-pill.severity.high.active {
    background: linear-gradient(135deg, #f97316, #ea580c);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.fm-filter-pill.severity.medium.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.fm-filter-pill.severity.low.active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.fm-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.fm-pill-dot.sigma {
    background: #8b5cf6;
}

.fm-pill-dot.yara {
    background: #06b6d4;
}

.fm-pill-dot.internal {
    background: #3b82f6;
}

.fm-pill-dot.tagged {
    background: #f97316;
}

.fm-pill-dot.process {
    background: #8b5cf6;
}

.fm-pill-dot.file {
    background: #06b6d4;
}

.fm-pill-dot.network {
    background: #3b82f6;
}

.fm-pill-dot.autorun {
    background: #f97316;
}

.fm-pill-dot.rule {
    background: #ef4444;
}

/* Kill Chain Progress Bar */
.fm-kill-chain-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 20px 24px;
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border-color);
    border-radius: 16px;
    margin-bottom: 24px;
    overflow-x: auto;
}

.fm-kill-chain-phase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fm-kill-chain-phase.inactive {
    opacity: 0.3;
}

.fm-kill-chain-phase:hover {
    transform: scale(1.08);
}

.fm-phase-marker {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--phase-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    position: relative;
    box-shadow: 0 3px 12px color-mix(in srgb, var(--phase-color) 45%, transparent);
}

.fm-phase-count {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    color: var(--phase-color);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--phase-color);
}

.fm-phase-name {
    font-size: 12px !important;
    font-weight: 600;
    color: var(--fm-text-secondary);
    text-align: center;
    max-width: 80px;
    white-space: nowrap;
}

.fm-kill-chain-connector {
    width: 24px;
    height: 2px;
    background: var(--fm-border-color);
    position: relative;
}

.fm-kill-chain-connector::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-left-color: var(--fm-border-color);
}

/* Main Attack Timeline */
.fm-attack-timeline {
    position: relative;
    padding: 32px 0;
}

.fm-timeline-spine {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--fm-accent-blue) 0%, var(--fm-accent-cyan) 40%, var(--fm-accent-purple) 70%, var(--fm-accent-red) 100%);
    transform: translateX(-50%);
    border-radius: 4px;
}

.fm-timeline-spine::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--fm-accent-blue);
    box-shadow: 0 0 0 5px rgba(54, 127, 211, 0.2);
}

/* Timeline Event Cards */
.fm-attack-event {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    animation: fadeSlideInAttack 0.5s ease forwards;
    opacity: 0;
}

.fm-attack-event:last-of-type {
    margin-bottom: 32px;
}

@keyframes fadeSlideInAttack {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fm-attack-event.left {
    flex-direction: row;
    padding-right: calc(50% + 40px);
}

.fm-attack-event.right {
    flex-direction: row-reverse;
    padding-left: calc(50% + 40px);
    margin-top: 120px;
}

.fm-attack-event.left+.fm-attack-event.right,
.fm-attack-event.right+.fm-attack-event.left {
    margin-top: 40px;
}

/* Event Connector */
.fm-event-connector {
    position: absolute;
    display: flex;
    align-items: center;
}

.fm-attack-event.left .fm-event-connector {
    right: calc(50% - 25px);
    flex-direction: row-reverse;
}

.fm-attack-event.right .fm-event-connector {
    left: calc(50% - 25px);
}

.fm-connector-line {
    width: 35px;
    height: 2px;
    background: var(--phase-color);
}

.fm-connector-dot {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.fm-connector-dot::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: var(--phase-color);
    opacity: 0.2;
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.2;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.1;
    }
}

/* Event Card */
.fm-event-card {
    flex: 1;
    background: linear-gradient(145deg, rgba(22, 28, 36, 0.95) 0%, rgba(17, 22, 29, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 4px solid var(--phase-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.fm-event-card:hover {
    /* Removed translateY to prevent button focus loss */
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--phase-color);
    border-color: var(--phase-color);
    z-index: 10;
}

.fm-event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--phase-color) 12%, transparent) 0%, transparent 60%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.fm-event-phase-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px !important;
    font-weight: 600;
    background: color-mix(in srgb, var(--phase-color) 15%, transparent) !important;
    color: var(--phase-color) !important;
    border: 1px solid color-mix(in srgb, var(--phase-color) 40%, transparent) !important;
}

.fm-event-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px !important;
    color: var(--fm-text-muted);
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
}

.fm-event-card-body {
    padding: 16px;
}

.fm-event-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.fm-event-title {
    font-size: 17px !important;
    font-weight: 600;
    color: var(--phase-color, var(--fm-text-primary));
    margin: 0;
}

.fm-tagged-indicator {
    color: var(--fm-accent-orange);
    font-size: 17px !important;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.fm-event-description {
    font-size: 15px !important;
    color: var(--fm-text-secondary);
    margin: 0 0 14px 0;
    line-height: 1.6;
}

.fm-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.fm-meta-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.fm-meta-badge.source {
    background: rgba(255, 255, 255, 0.08);
    color: var(--fm-text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.fm-meta-badge.source.sigma {
    background: rgba(163, 113, 247, 0.2) !important;
    color: #a371f7 !important;
    border: 1px solid rgba(163, 113, 247, 0.4) !important;
}

.fm-meta-badge.source.yara {
    background: rgba(88, 166, 255, 0.2) !important;
    color: #58a6ff !important;
    border: 1px solid rgba(88, 166, 255, 0.4) !important;
}

.fm-meta-badge.source.internal {
    background: rgba(63, 185, 80, 0.2) !important;
    color: #3fb950 !important;
    border: 1px solid rgba(63, 185, 80, 0.4) !important;
}

.fm-meta-badge.source.process {
    background: rgba(139, 92, 246, 0.2) !important;
    color: #a78bfa !important;
    border: 1px solid rgba(139, 92, 246, 0.4) !important;
}

.fm-meta-badge.source.file {
    background: rgba(6, 182, 212, 0.2) !important;
    color: #22d3ee !important;
    border: 1px solid rgba(6, 182, 212, 0.4) !important;
}

.fm-meta-badge.source.network {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.4) !important;
}

.fm-meta-badge.source.autorun {
    background: rgba(249, 115, 22, 0.2) !important;
    color: #fb923c !important;
    border: 1px solid rgba(249, 115, 22, 0.4) !important;
}

.fm-meta-badge.source.registry {
    background: rgba(234, 179, 8, 0.2) !important;
    color: #facc15 !important;
    border: 1px solid rgba(234, 179, 8, 0.4) !important;
}

.fm-meta-badge.source.rule {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

.fm-meta-badge.source.user {
    background: rgba(34, 197, 94, 0.2) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(34, 197, 94, 0.4) !important;
}

.fm-meta-badge.source.sysmon {
    background: rgba(168, 85, 247, 0.2) !important;
    color: #c084fc !important;
    border: 1px solid rgba(168, 85, 247, 0.4) !important;
}

.fm-meta-badge.source.manual {
    background: rgba(99, 102, 241, 0.2) !important;
    color: #818cf8 !important;
    border: 1px solid rgba(99, 102, 241, 0.4) !important;
}

.fm-meta-badge.source.other {
    background: rgba(107, 114, 128, 0.2) !important;
    color: #9ca3af !important;
    border: 1px solid rgba(107, 114, 128, 0.4) !important;
}

.fm-meta-badge.severity.critical {
    background: rgba(248, 81, 73, 0.2) !important;
    color: #f85149 !important;
    border: 1px solid rgba(248, 81, 73, 0.4) !important;
}

.fm-meta-badge.severity.high {
    background: rgba(210, 153, 34, 0.2) !important;
    color: #d29922 !important;
    border: 1px solid rgba(210, 153, 34, 0.4) !important;
}

.fm-meta-badge.severity.medium {
    background: rgba(54, 127, 211, 0.2) !important;
    color: #58a6ff !important;
    border: 1px solid rgba(54, 127, 211, 0.4) !important;
}

.fm-meta-badge.severity.low {
    background: rgba(63, 185, 80, 0.2) !important;
    color: #3fb950 !important;
    border: 1px solid rgba(63, 185, 80, 0.4) !important;
}

.fm-meta-badge.mitre {
    background: rgba(163, 113, 247, 0.2) !important;
    color: #a371f7 !important;
    border: 1px solid rgba(163, 113, 247, 0.4) !important;
}

.fm-event-details {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    padding: 14px;
    border-left: 3px solid color-mix(in srgb, var(--phase-color) 50%, transparent);
}

.fm-detail-row {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px !important;
    border-bottom: 1px solid var(--fm-border-subtle);
}

.fm-detail-row:last-child {
    border-bottom: none;
}

.fm-detail-label {
    color: var(--fm-text-muted);
    min-width: 100px;
    font-weight: 500;
    font-size: 14px !important;
}

.fm-detail-value {
    color: var(--fm-text-primary);
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 13px !important;
    word-break: break-all;
}

.fm-event-card-footer {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--fm-border-subtle);
    background: rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.fm-event-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px !important;
    font-weight: 500;
    color: var(--fm-text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
    position: relative;
    z-index: 5;
}

.fm-event-action-btn:hover {
    background: rgba(54, 127, 211, 0.15);
    border-color: rgba(54, 127, 211, 0.4);
    color: #60a5fa;
}

.fm-event-action-btn:hover i {
    color: #60a5fa;
}

.fm-event-action-btn.tagged {
    background: rgba(210, 153, 34, 0.2);
    border-color: rgba(210, 153, 34, 0.5);
    color: #fbbf24;
}

.fm-event-action-btn.tagged i {
    color: #fbbf24;
}

/* Delete/Remove button hover */
.fm-event-action-btn:last-child:hover {
    background: rgba(248, 81, 73, 0.15);
    border-color: rgba(248, 81, 73, 0.4);
    color: #f87171;
}

.fm-event-action-btn:last-child:hover i {
    color: #f87171;
}

/* Remove from Story Button */
.fm-event-action-btn.fm-btn-remove {
    background: rgba(248, 81, 73, 0.1);
    border-color: rgba(248, 81, 73, 0.3);
    color: var(--fm-text-secondary);
}

.fm-event-action-btn.fm-btn-remove:hover {
    background: rgba(248, 81, 73, 0.25);
    border-color: rgba(248, 81, 73, 0.5);
    color: #f87171;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(248, 81, 73, 0.2);
}

.fm-event-action-btn.fm-btn-remove:hover i {
    color: #f87171;
}

.fm-event-action-btn.fm-btn-remove:active {
    transform: translateY(0);
    box-shadow: none;
}

.fm-event-action-btn.fm-btn-remove:disabled,
.fm-event-action-btn.fm-btn-remove[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Timeline End Marker */
.fm-timeline-end-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: 60px;
}

.fm-end-marker-dot {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #ef4444 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.375rem;
    box-shadow: 0 6px 24px rgba(168, 85, 247, 0.4), 0 0 0 4px rgba(168, 85, 247, 0.15);
    animation: end-pulse 2s ease-in-out infinite;
}

@keyframes end-pulse {

    0%,
    100% {
        box-shadow: 0 6px 24px rgba(168, 85, 247, 0.4), 0 0 0 4px rgba(168, 85, 247, 0.15);
    }

    50% {
        box-shadow: 0 6px 32px rgba(168, 85, 247, 0.5), 0 0 0 8px rgba(168, 85, 247, 0.1);
    }
}

.fm-end-marker-label {
    font-size: 15px !important;
    font-weight: 600;
    color: var(--fm-text-secondary);
    background: linear-gradient(90deg, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading More Indicator */
.fm-loading-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 60px 20px;
    margin: 20px 0;
    background: linear-gradient(180deg, transparent 0%, rgba(54, 127, 211, 0.05) 50%, transparent 100%);
    border-radius: var(--fm-radius-lg);
}

.fm-loading-more-spinner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fm-accent-blue), var(--fm-accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 6px 24px rgba(54, 127, 211, 0.5), 0 0 0 4px rgba(54, 127, 211, 0.15);
    animation: fm-loading-pulse 1.5s ease-in-out infinite;
}

@keyframes fm-loading-pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 6px 24px rgba(54, 127, 211, 0.5), 0 0 0 4px rgba(54, 127, 211, 0.15);
    }

    50% {
        transform: scale(1.08);
        box-shadow: 0 8px 32px rgba(54, 127, 211, 0.6), 0 0 0 8px rgba(54, 127, 211, 0.1);
    }
}

.fm-loading-more-text {
    font-size: 15px;
    color: var(--fm-text-secondary);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Loading dots animation */
.fm-loading-more-text::after {
    content: '';
    animation: fm-loading-dots 1.5s infinite;
}

@keyframes fm-loading-dots {
    0% {
        content: '';
    }

    25% {
        content: '.';
    }

    50% {
        content: '..';
    }

    75% {
        content: '...';
    }
}

/* Loading progress bar */
.fm-loading-progress-bar {
    width: 200px;
    height: 4px;
    background: rgba(54, 127, 211, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.fm-loading-progress-fill {
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, var(--fm-accent-blue), var(--fm-accent-purple));
    border-radius: 2px;
    animation: fm-loading-progress 1.2s ease-in-out infinite;
}

@keyframes fm-loading-progress {
    0% {
        width: 0%;
        margin-left: 0%;
    }

    50% {
        width: 40%;
        margin-left: 30%;
    }

    100% {
        width: 0%;
        margin-left: 100%;
    }
}

/* Empty State */
.fm-attack-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
}

.fm-attack-empty-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--fm-bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.75rem;
    color: var(--fm-text-muted);
    margin-bottom: 24px;
}

.fm-attack-empty-title {
    font-size: 22px !important;
    font-weight: 600;
    color: var(--fm-text-primary);
    margin: 0 0 10px 0;
}

.fm-attack-empty-text {
    font-size: 16px !important;
    color: var(--fm-text-muted);
    margin: 0;
    max-width: 450px;
    line-height: 1.6;
}

/* Attack Story Responsive */
@media (max-width: 1400px) {
    .fm-attack-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {

    .fm-attack-event.left,
    .fm-attack-event.right {
        padding-left: 60px;
        padding-right: 0;
        flex-direction: row;
    }

    .fm-attack-event.right {
        margin-top: 20px;
    }

    .fm-timeline-spine {
        left: 30px;
    }

    .fm-attack-event.left .fm-event-connector,
    .fm-attack-event.right .fm-event-connector {
        left: 10px;
        right: auto;
        flex-direction: row;
    }

    .fm-attack-filters {
        gap: 16px;
    }
}

@media (max-width: 992px) {
    .fm-attack-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .fm-kill-chain-progress {
        justify-content: flex-start;
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .fm-attack-story {
        padding: 16px;
    }

    .fm-attack-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .fm-attack-stats {
        grid-template-columns: 1fr;
    }

    .fm-attack-filters {
        flex-direction: column;
        gap: 12px;
    }

    .fm-filter-pills {
        flex-wrap: wrap;
    }
}

/* =============================================================================
   LATERAL MOVEMENT ANALYZER
   Graph visualization for user lateral movement analysis
   ============================================================================= */

/* Modal Overlay */
.fm-lateral-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fm-fadeIn 0.2s ease-out;
}

/* Light Theme Overrides for Lateral Modal Overlay */
html[data-theme="light"] .fm-lateral-modal-overlay,
[data-theme="light"] .fm-lateral-modal-overlay {
    background: rgba(255, 255, 255, 0.75);
}

.fm-lateral-modal {
    width: calc(100vw - 40px);
    height: calc(100vh - 40px);
    max-width: 1800px;
    max-height: 1000px;
    background: var(--fm-bg-primary);
    border-radius: var(--fm-radius-lg);
    border: 1px solid var(--fm-border-color);
    box-shadow: var(--fm-shadow-lg), var(--fm-shadow-glow);
    display: grid;
    grid-template-columns: 320px 1fr 360px;
    grid-template-rows: 70px 1fr 100px;
    overflow: hidden;
    animation: fm-scaleIn 0.3s ease-out;
}

@keyframes fm-scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Modal Header */
.fm-lateral-header {
    grid-column: 1 / -1;
    background: var(--fm-bg-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--fm-border-color);
}

.fm-lateral-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fm-lateral-logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--fm-accent-blue), var(--fm-accent-purple));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fm-lateral-logo-icon i {
    font-size: 22px;
    color: #fff;
}

.fm-lateral-logo-text h2 {
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--fm-accent-blue), var(--fm-accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.fm-lateral-logo-text span {
    font-size: 12px;
    color: var(--fm-text-muted);
}

.fm-lateral-stats {
    display: flex;
    gap: 36px;
}

.fm-lateral-stat {
    text-align: center;
}

.fm-lateral-stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--fm-text-primary);
}

.fm-lateral-stat-value.danger {
    color: var(--fm-accent-red);
}

.fm-lateral-stat-value.warning {
    color: var(--fm-accent-orange);
}

.fm-lateral-stat-value.success {
    color: var(--fm-accent-green);
}

.fm-lateral-stat-label {
    font-size: 11px;
    color: var(--fm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.fm-lateral-close-btn {
    width: 38px;
    height: 38px;
    background: rgba(248, 81, 73, 0.15);
    border: 1px solid rgba(248, 81, 73, 0.3);
    border-radius: var(--fm-radius-md);
    color: var(--fm-accent-red);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--fm-transition-fast);
}

.fm-lateral-close-btn:hover {
    background: rgba(248, 81, 73, 0.25);
    border-color: var(--fm-accent-red);
    transform: scale(1.05);
}

/* Left Panel */
.fm-lateral-left-panel {
    background: var(--fm-bg-secondary);
    padding: 16px;
    overflow-y: auto;
    border-right: 1px solid var(--fm-border-color);
    scrollbar-width: thin;
    scrollbar-color: var(--fm-text-muted) var(--fm-bg-primary);
}

.fm-lateral-left-panel::-webkit-scrollbar {
    width: 6px;
}

.fm-lateral-left-panel::-webkit-scrollbar-track {
    background: var(--fm-bg-primary);
    border-radius: 3px;
}

.fm-lateral-left-panel::-webkit-scrollbar-thumb {
    background: var(--fm-text-muted);
    border-radius: 3px;
}

.fm-lateral-left-panel::-webkit-scrollbar-thumb:hover {
    background: var(--fm-text-secondary);
}

.fm-lateral-panel-section {
    margin-bottom: 20px;
}

.fm-lateral-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.fm-lateral-panel-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--fm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fm-lateral-panel-title i {
    font-size: 12px;
    color: var(--fm-accent-blue);
}

/* Search Box */
.fm-lateral-search {
    position: relative;
    margin-bottom: 16px;
}

.fm-lateral-search input {
    width: 100%;
    padding: 11px 12px 11px 38px;
    background: var(--fm-bg-primary);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-md);
    color: var(--fm-text-primary);
    font-size: 13px;
    transition: all var(--fm-transition-fast);
}

.fm-lateral-search input:focus {
    outline: none;
    border-color: var(--fm-accent-blue);
    box-shadow: 0 0 0 3px rgba(54, 127, 211, 0.15);
}

.fm-lateral-search input::placeholder {
    color: var(--fm-text-muted);
}

.fm-lateral-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--fm-text-muted);
}

/* Filter Chips */
.fm-lateral-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.fm-lateral-filter-chip {
    padding: 5px 10px;
    background: var(--fm-bg-primary);
    border: 1px solid var(--fm-border-color);
    border-radius: 16px;
    font-size: 10px;
    color: var(--fm-text-secondary);
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-lateral-filter-chip:hover {
    border-color: var(--fm-accent-blue);
    color: var(--fm-text-primary);
}

.fm-lateral-filter-chip.active {
    background: rgba(54, 127, 211, 0.2);
    border-color: var(--fm-accent-blue);
    color: var(--fm-accent-blue);
}

/* Entity List */
.fm-lateral-entity-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Slim scrollbar for entity lists */
.fm-lateral-entity-list::-webkit-scrollbar {
    width: 6px;
}

.fm-lateral-entity-list::-webkit-scrollbar-track {
    background: var(--fm-bg-primary);
    border-radius: 3px;
}

.fm-lateral-entity-list::-webkit-scrollbar-thumb {
    background: var(--fm-text-muted);
    border-radius: 3px;
}

.fm-lateral-entity-list::-webkit-scrollbar-thumb:hover {
    background: var(--fm-text-secondary);
}

/* Firefox scrollbar */
.fm-lateral-entity-list {
    scrollbar-width: thin;
    scrollbar-color: var(--fm-text-muted) var(--fm-bg-primary);
}

.fm-lateral-entity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--fm-bg-primary);
    border-radius: var(--fm-radius-md);
    cursor: pointer;
    transition: all var(--fm-transition-fast);
    border: 1px solid transparent;
}

.fm-lateral-entity-item:hover {
    background: rgba(54, 127, 211, 0.1);
    border-color: var(--fm-accent-blue);
}

.fm-lateral-entity-item.selected {
    background: rgba(54, 127, 211, 0.15);
    border-color: var(--fm-accent-blue);
}

.fm-lateral-entity-item.highlighted {
    background: rgba(163, 113, 247, 0.15);
    border-color: var(--fm-accent-purple);
}

.fm-lateral-entity-item.dimmed {
    opacity: 0.4;
}

/* Entity Icon */
.fm-lateral-entity-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fm-lateral-entity-icon.user {
    background: linear-gradient(135deg, var(--fm-accent-blue), var(--fm-accent-purple));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.fm-lateral-entity-icon.user.admin {
    background: linear-gradient(135deg, var(--fm-accent-red), var(--fm-accent-orange));
}

.fm-lateral-entity-icon.user.service {
    background: linear-gradient(135deg, var(--fm-accent-purple), #ec4899);
}

.fm-lateral-entity-icon.user.external {
    background: linear-gradient(135deg, var(--fm-accent-orange), #eab308);
}

.fm-lateral-entity-icon.system {
    background: linear-gradient(135deg, var(--fm-accent-cyan), var(--fm-accent-green));
    border-radius: 6px;
}

.fm-lateral-entity-icon.system.dc {
    background: linear-gradient(135deg, var(--fm-accent-red), #dc2626);
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

.fm-lateral-entity-icon.system.server {
    background: linear-gradient(135deg, var(--fm-accent-blue), var(--theme-accent-blue-darker));
    border-radius: 4px;
}

.fm-lateral-entity-icon.system.workstation {
    background: linear-gradient(135deg, var(--fm-accent-green), #059669);
    border-radius: 8px;
}

.fm-lateral-entity-icon i {
    font-size: 14px;
    color: #fff;
}

.fm-lateral-entity-info {
    flex: 1;
    min-width: 0;
}

.fm-lateral-entity-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--fm-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fm-lateral-entity-meta {
    font-size: 10px;
    color: var(--fm-text-muted);
}

.fm-lateral-entity-badge {
    padding: 3px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Checkbox for entity visibility */
.fm-lateral-checkbox {
    position: relative;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
}

.fm-lateral-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 1;
    margin: 0;
}

.fm-lateral-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    background: var(--fm-bg-secondary);
    border: 2px solid var(--fm-text-muted);
    border-radius: 4px;
    transition: all var(--fm-transition-fast);
}

.fm-lateral-checkbox input:checked+.fm-lateral-checkmark {
    background: var(--fm-accent-blue);
    border-color: var(--fm-accent-blue);
}

.fm-lateral-checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.fm-lateral-checkbox input:checked+.fm-lateral-checkmark::after {
    display: block;
}

.fm-lateral-badge-critical {
    background: rgba(248, 81, 73, 0.2);
    color: var(--fm-accent-red);
}

.fm-lateral-badge-high {
    background: rgba(249, 115, 22, 0.2);
    color: var(--fm-accent-orange);
}

.fm-lateral-badge-medium {
    background: rgba(210, 153, 34, 0.2);
    color: var(--fm-accent-orange);
}

.fm-lateral-badge-low {
    background: rgba(63, 185, 80, 0.2);
    color: var(--fm-accent-green);
}

/* Legend */
.fm-lateral-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
    background: var(--fm-bg-primary);
    border-radius: var(--fm-radius-md);
    margin-bottom: 16px;
}

.fm-lateral-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: var(--fm-text-secondary);
}

.fm-lateral-legend-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fm-lateral-legend-icon.user-admin {
    background: linear-gradient(135deg, var(--fm-accent-red), var(--fm-accent-orange));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.fm-lateral-legend-icon.user-standard {
    background: linear-gradient(135deg, var(--fm-accent-blue), var(--fm-accent-purple));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.fm-lateral-legend-icon.user-service {
    background: linear-gradient(135deg, var(--fm-accent-purple), #ec4899);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.fm-lateral-legend-icon.system-dc {
    background: linear-gradient(135deg, var(--fm-accent-red), #dc2626);
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

.fm-lateral-legend-icon.system-server {
    background: linear-gradient(135deg, var(--fm-accent-blue), var(--theme-accent-blue-darker));
    border-radius: 3px;
}

.fm-lateral-legend-icon.system-workstation {
    background: linear-gradient(135deg, var(--fm-accent-green), #059669);
    border-radius: 5px;
}

.fm-lateral-legend-icon i {
    font-size: 10px;
    color: #fff;
}

/* Graph Container */
.fm-lateral-graph {
    background: var(--fm-bg-primary);
    position: relative;
    overflow: hidden;
}

.fm-lateral-graph::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(54, 127, 211, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(54, 127, 211, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.fm-lateral-graph-canvas {
    width: 100%;
    height: 100%;
}

/* Graph Controls */
.fm-lateral-graph-controls {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.fm-lateral-control-btn {
    width: 38px;
    height: 38px;
    background: var(--fm-bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--fm-transition-fast);
    color: var(--fm-text-secondary);
}

.fm-lateral-control-btn:hover {
    background: var(--fm-bg-secondary);
    border-color: var(--fm-accent-blue);
    color: var(--fm-text-primary);
}

.fm-lateral-control-btn.active {
    background: var(--fm-accent-blue);
    border-color: var(--fm-accent-blue);
    color: #fff;
}

.fm-lateral-control-btn i {
    font-size: 14px;
}

/* Layout Selector */
.fm-lateral-layout-selector {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    background: var(--fm-bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-md);
    overflow: hidden;
    z-index: 10;
}

.fm-lateral-layout-option {
    padding: 10px 16px;
    font-size: 12px;
    color: var(--fm-text-secondary);
    cursor: pointer;
    transition: all var(--fm-transition-fast);
    border-right: 1px solid var(--fm-border-color);
}

.fm-lateral-layout-option:last-child {
    border-right: none;
}

.fm-lateral-layout-option:hover {
    color: var(--fm-text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.fm-lateral-layout-option.active {
    color: var(--fm-accent-blue);
    background: rgba(54, 127, 211, 0.15);
}

/* Visibility Counter */
.fm-lateral-visibility-counter {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: var(--fm-bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-md);
    padding: 12px 16px;
    z-index: 10;
    display: flex;
    gap: 20px;
}

.fm-lateral-counter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fm-lateral-counter-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fm-lateral-counter-icon.user {
    background: linear-gradient(135deg, var(--fm-accent-blue), var(--fm-accent-purple));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.fm-lateral-counter-icon.system {
    background: linear-gradient(135deg, var(--fm-accent-cyan), var(--fm-accent-green));
    border-radius: 3px;
}

.fm-lateral-counter-icon i {
    font-size: 10px;
    color: #fff;
}

.fm-lateral-counter-text {
    font-size: 12px;
    color: var(--fm-text-secondary);
}

.fm-lateral-counter-text strong {
    color: var(--fm-text-primary);
}

/* Path Mode Indicator */
.fm-lateral-path-indicator {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--fm-accent-blue), var(--fm-accent-purple));
    padding: 12px 24px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(54, 127, 211, 0.4);
}

.fm-lateral-path-indicator span {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
}

.fm-lateral-path-indicator .fm-close {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--fm-transition-fast);
    color: #fff;
}

.fm-lateral-path-indicator .fm-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Right Panel */
.fm-lateral-right-panel {
    background: var(--fm-bg-secondary);
    padding: 16px;
    overflow-y: auto;
    border-left: 1px solid var(--fm-border-color);
    scrollbar-width: thin;
    scrollbar-color: var(--fm-text-muted) var(--fm-bg-primary);
}

.fm-lateral-right-panel::-webkit-scrollbar {
    width: 6px;
}

.fm-lateral-right-panel::-webkit-scrollbar-track {
    background: var(--fm-bg-primary);
    border-radius: 3px;
}

.fm-lateral-right-panel::-webkit-scrollbar-thumb {
    background: var(--fm-text-muted);
    border-radius: 3px;
}

.fm-lateral-right-panel::-webkit-scrollbar-thumb:hover {
    background: var(--fm-text-secondary);
}

.fm-lateral-detail-card {
    background: var(--fm-bg-primary);
    border-radius: var(--fm-radius-md);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--fm-border-color);
}

.fm-lateral-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--fm-border-color);
}

.fm-lateral-detail-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fm-lateral-detail-icon.user {
    background: linear-gradient(135deg, var(--fm-accent-blue), var(--fm-accent-purple));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.fm-lateral-detail-icon.user.admin {
    background: linear-gradient(135deg, var(--fm-accent-red), var(--fm-accent-orange));
}

.fm-lateral-detail-icon.system {
    background: linear-gradient(135deg, var(--fm-accent-cyan), var(--fm-accent-green));
    border-radius: 8px;
}

.fm-lateral-detail-icon.system.dc {
    background: linear-gradient(135deg, var(--fm-accent-red), #dc2626);
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

.fm-lateral-detail-icon i {
    font-size: 22px;
    color: #fff;
}

.fm-lateral-detail-title h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--fm-text-primary);
}

.fm-lateral-detail-title span {
    font-size: 12px;
    color: var(--fm-text-muted);
}

.fm-lateral-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.fm-lateral-detail-row:last-child {
    border-bottom: none;
}

.fm-lateral-detail-label {
    font-size: 12px;
    color: var(--fm-text-muted);
}

.fm-lateral-detail-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--fm-text-primary);
}

.fm-lateral-risk-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
}

.fm-lateral-risk-critical {
    background: rgba(248, 81, 73, 0.2);
    color: var(--fm-accent-red);
}

.fm-lateral-risk-high {
    background: rgba(249, 115, 22, 0.2);
    color: var(--fm-accent-orange);
}

.fm-lateral-risk-medium {
    background: rgba(210, 153, 34, 0.2);
    color: var(--fm-accent-orange);
}

.fm-lateral-risk-low {
    background: rgba(63, 185, 80, 0.2);
    color: var(--fm-accent-green);
}

/* Connection List */
.fm-lateral-connection-list {
    margin-top: 12px;
}

.fm-lateral-connection-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--fm-bg-secondary);
    border-radius: var(--fm-radius-sm);
    margin-bottom: 6px;
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-lateral-connection-item:hover {
    background: rgba(54, 127, 211, 0.1);
}

.fm-lateral-connection-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fm-lateral-connection-icon.user {
    background: linear-gradient(135deg, var(--fm-accent-blue), var(--fm-accent-purple));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.fm-lateral-connection-icon.system {
    background: linear-gradient(135deg, var(--fm-accent-cyan), var(--fm-accent-green));
    border-radius: 4px;
}

.fm-lateral-connection-icon.system.dc {
    background: linear-gradient(135deg, var(--fm-accent-red), #dc2626);
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

.fm-lateral-connection-icon i {
    font-size: 12px;
    color: #fff;
}

.fm-lateral-connection-info {
    flex: 1;
}

.fm-lateral-connection-target {
    font-size: 12px;
    font-weight: 500;
    color: var(--fm-text-primary);
}

.fm-lateral-connection-meta {
    font-size: 10px;
    color: var(--fm-text-muted);
}

.fm-lateral-connection-count {
    text-align: right;
}

.fm-lateral-connection-count .count {
    font-size: 14px;
    font-weight: 700;
    color: var(--fm-accent-blue);
}

.fm-lateral-connection-count .label {
    font-size: 9px;
    color: var(--fm-text-muted);
}

/* Empty State */
.fm-lateral-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.fm-lateral-empty-state i {
    font-size: 48px;
    color: var(--fm-text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.fm-lateral-empty-state h4 {
    font-size: 14px;
    color: var(--fm-text-secondary);
    margin: 0 0 8px 0;
}

.fm-lateral-empty-state p {
    font-size: 12px;
    color: var(--fm-text-muted);
    margin: 0;
}

/* Timeline Panel */
.fm-lateral-timeline-panel {
    grid-column: 1 / -1;
    background: var(--fm-bg-secondary);
    padding: 16px 24px;
    border-top: 1px solid var(--fm-border-color);
}

.fm-lateral-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.fm-lateral-timeline-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fm-lateral-timeline-title h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: var(--fm-text-primary);
}

.fm-lateral-timeline-range {
    font-size: 12px;
    color: var(--fm-accent-blue);
    background: rgba(54, 127, 211, 0.15);
    padding: 5px 12px;
    border-radius: var(--fm-radius-sm);
}

.fm-lateral-timeline-controls {
    display: flex;
    gap: 6px;
}

.fm-lateral-timeline-btn {
    padding: 7px 14px;
    background: var(--fm-bg-primary);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-sm);
    font-size: 11px;
    color: var(--fm-text-secondary);
    cursor: pointer;
    transition: all var(--fm-transition-fast);
}

.fm-lateral-timeline-btn:hover {
    background: var(--fm-bg-secondary);
    color: var(--fm-text-primary);
}

.fm-lateral-timeline-btn.active {
    background: var(--fm-accent-blue);
    border-color: var(--fm-accent-blue);
    color: #fff;
}

.fm-lateral-timeline-events {
    height: 36px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    margin-bottom: 8px;
}

.fm-lateral-timeline-bar {
    flex: 1;
    background: var(--fm-accent-blue);
    border-radius: 2px 2px 0 0;
    min-height: 4px;
    opacity: 0.6;
    transition: all var(--fm-transition-fast);
    cursor: pointer;
}

.fm-lateral-timeline-bar:hover {
    opacity: 1;
    background: var(--fm-accent-purple);
}

.fm-lateral-timeline-bar.danger {
    background: var(--fm-accent-red);
    opacity: 0.9;
}

.fm-lateral-timeline-bar.warning {
    background: var(--fm-accent-orange);
    opacity: 0.8;
}

.fm-lateral-timeline-track {
    height: 4px;
    background: var(--fm-bg-primary);
    border-radius: 2px;
    margin-bottom: 8px;
}

.fm-lateral-timeline-labels {
    display: flex;
    justify-content: space-between;
}

.fm-lateral-timeline-label {
    font-size: 10px;
    color: var(--fm-text-muted);
}

/* Trace Path Button */
.fm-lateral-trace-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--fm-accent-blue), var(--fm-accent-purple));
    border: none;
    border-radius: var(--fm-radius-md);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--fm-transition-fast);
    margin-top: 16px;
}

.fm-lateral-trace-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(54, 127, 211, 0.4);
}

/* Loading State */
.fm-lateral-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 16px;
}

.fm-lateral-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--fm-border-color);
    border-top-color: var(--fm-accent-blue);
    border-radius: 50%;
    animation: fm-spin 1s linear infinite;
}

.fm-lateral-loading-text {
    font-size: 14px;
    color: var(--fm-text-secondary);
}

/* Responsive */
@media (max-width: 1400px) {
    .fm-lateral-modal {
        grid-template-columns: 280px 1fr 320px;
    }
}

@media (max-width: 1200px) {
    .fm-lateral-modal {
        grid-template-columns: 260px 1fr 300px;
    }

    .fm-lateral-stats {
        gap: 24px;
    }

    .fm-lateral-stat-value {
        font-size: 22px;
    }
}

@media (max-width: 992px) {
    .fm-lateral-modal {
        grid-template-columns: 1fr;
        grid-template-rows: 70px 60px 1fr 80px;
    }

    .fm-lateral-left-panel,
    .fm-lateral-right-panel {
        display: none;
    }

    .fm-lateral-stats {
        display: none;
    }
}

/* =============================================================================
   ARTEFACTS PAGE - Sidebar Layout with Category Navigation
   ============================================================================= */

.fm-artefacts-page {
    min-height: 100%;
}

.fm-artefacts-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    min-height: calc(100vh - 200px);
}

/* Sidebar Styling */
.fm-artefacts-sidebar {
    background: var(--fm-bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    overflow: hidden;
    height: fit-content;
    max-height: calc(100vh - 200px);
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
}

.fm-sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    border-bottom: 1px solid var(--fm-border-color);
    font-size: 14px;
    font-weight: 600;
    color: var(--fm-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fm-sidebar-header i {
    color: var(--fm-accent-blue);
    font-size: 16px;
}

.fm-sidebar-content {
    overflow-y: auto;
    padding: 12px;
    flex: 1;
}

.fm-sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.fm-sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.fm-sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.fm-sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Artefact Categories */
.fm-artefact-category {
    margin-bottom: 8px;
}

.fm-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--fm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fm-category-header i {
    font-size: 12px;
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.fm-category-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fm-artefact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px 10px 28px;
    font-size: 13px;
    color: var(--fm-text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--fm-radius-sm);
    cursor: pointer;
    transition: all var(--fm-transition-fast);
    text-decoration: none;
}

.fm-artefact-item:hover {
    color: var(--fm-text-primary);
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
}

.fm-artefact-item.active {
    color: #ffffff;
    background: linear-gradient(145deg, rgba(54, 127, 211, 0.25) 0%, rgba(54, 127, 211, 0.12) 100%);
    border-color: rgba(54, 127, 211, 0.4);
    font-weight: 500;
}

.fm-artefact-item.active::before {
    content: '';
    position: absolute;
    left: 12px;
    width: 3px;
    height: 16px;
    background: var(--fm-accent-blue);
    border-radius: 2px;
}

.fm-artefact-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Content Area */
.fm-artefacts-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fm-artefacts-header {
    background: var(--fm-bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
    padding: 20px;
}

.fm-artefacts-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.fm-artefacts-title h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-artefacts-title .fm-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 12px;
    background: linear-gradient(145deg, rgba(54, 127, 211, 0.25) 0%, rgba(54, 127, 211, 0.15) 100%);
    color: #58a6ff;
    border: 1px solid rgba(54, 127, 211, 0.4);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-left: auto;
}

.fm-artefact-description {
    font-size: 13px;
    color: var(--fm-text-muted);
    margin-left: 8px;
}

.fm-title-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fm-title-text h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-title-text .fm-artefact-description {
    margin-left: 0;
}

/* Search Bar */
.fm-artefacts-search {
    display: flex;
    gap: 12px;
    align-items: center;
}

.fm-search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.fm-search-icon {
    position: absolute;
    left: 14px;
    color: var(--fm-text-muted);
    font-size: 14px;
    pointer-events: none;
}

.fm-search-input {
    width: 100%;
    padding: 12px 40px 12px 42px;
    background: rgba(22, 27, 34, 0.6);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-md);
    color: var(--fm-text-primary);
    font-size: 14px;
    transition: all var(--fm-transition-fast);
}

.fm-search-input:focus {
    outline: none;
    border-color: var(--fm-accent-blue);
    box-shadow: 0 0 0 3px var(--fm-accent-blue-glow);
}

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

.fm-search-clear {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--fm-text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color var(--fm-transition-fast);
}

.fm-search-clear:hover {
    color: var(--fm-text-primary);
}

/* Results Info */
.fm-artefacts-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--fm-text-secondary);
    padding: 0 4px;
}

/* Results Container */
.fm-artefacts-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    min-height: 200px;
}

.fm-artefacts-results.loading {
    opacity: 0.7;
}

/* Loading Overlay */
.fm-loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    color: var(--fm-text-muted);
}

.fm-loading-overlay i {
    font-size: 32px;
    color: var(--fm-accent-blue);
}

/* Empty State */
.fm-artefacts-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 80px 20px;
    text-align: center;
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border-color);
    border-radius: var(--fm-radius-lg);
}

.fm-artefacts-empty i {
    font-size: 48px;
    color: var(--fm-text-muted);
    opacity: 0.5;
}

.fm-artefacts-empty h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-artefacts-empty p {
    margin: 0;
    font-size: 14px;
    color: var(--fm-text-muted);
    max-width: 400px;
}

/* Helper classes for artefact values */
.fm-yes {
    color: var(--fm-accent-green) !important;
}

.fm-no {
    color: var(--fm-text-muted) !important;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .fm-artefacts-layout {
        grid-template-columns: 240px 1fr;
    }

    .fm-artefact-item {
        padding: 8px 10px 8px 24px;
        font-size: 12px;
    }
}

@media (max-width: 992px) {
    .fm-artefacts-layout {
        grid-template-columns: 1fr;
    }

    .fm-artefacts-sidebar {
        position: static;
        max-height: none;
        height: auto;
    }

    .fm-sidebar-content {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px;
    }

    .fm-artefact-category {
        flex: 1 1 200px;
        margin-bottom: 0;
    }

    .fm-category-items {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
    }

    .fm-artefact-item {
        padding: 6px 12px;
        font-size: 12px;
    }

    .fm-artefact-item.active::before {
        display: none;
    }
}

/* =============================================================================
   LIGHT THEME OVERRIDES
   Light theme specific styles for forensics module
   ============================================================================= */

[data-theme="light"],
html[data-theme="light"] {
    --fm-scrollbar-bg: rgba(0, 0, 0, 0.05);
    --fm-scrollbar-thumb: rgba(0, 0, 0, 0.15);
    --fm-scrollbar-thumb-hover: rgba(0, 0, 0, 0.25);
}

/* =============================================================================
   CREATE INVESTIGATION SLIDE PANEL & WIZARD
   ============================================================================= */

/* Panel Overlay */
.fm-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9998;
}

.fm-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Slim Scrollbar */
.fm-slim-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.fm-slim-scroll::-webkit-scrollbar-track {
    background: var(--fm-scrollbar-bg);
    border-radius: 3px;
}

.fm-slim-scroll::-webkit-scrollbar-thumb {
    background: var(--fm-scrollbar-thumb);
    border-radius: 3px;
    transition: background 0.2s ease;
}

.fm-slim-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--fm-scrollbar-thumb-hover);
}

.fm-slim-scroll {
    scrollbar-width: thin;
    scrollbar-color: var(--fm-scrollbar-thumb) var(--fm-scrollbar-bg);
}

/* Slide Panel */
.fm-slide-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 90%;
    min-width: 1000px;
    max-width: 1650px;
    height: 100vh;
    background: var(--fm-bg-primary, #11161d);
    border-left: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fm-slide-panel.active {
    transform: translateX(0);
}

/* Panel Header */
.fm-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--fm-bg-secondary, #1c2229);
    border-bottom: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    flex-shrink: 0;
}

.fm-panel-header-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fm-panel-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(240, 136, 62, 0.25) 0%, rgba(240, 136, 62, 0.12) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f0883e;
    font-size: 16px;
}

.fm-panel-header-text h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--fm-text-primary, #e6edf3);
}

.fm-panel-subtitle {
    font-size: 12px;
    color: var(--fm-text-secondary, #8b949e);
    margin-top: 2px;
}

.fm-panel-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--fm-text-secondary, #8b949e);
    font-size: 18px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fm-panel-close:hover {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
}

/* Wizard Header */
.fm-wizard-header {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background: var(--fm-bg-secondary, #1c2229);
    border-bottom: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    flex-shrink: 0;
}

.fm-wizard-steps {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.fm-wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 24px;
    background: transparent;
    transition: all 0.2s ease;
}

.fm-wizard-step:hover {
    background: var(--fm-bg-card, rgba(30, 38, 50, 0.5));
}

.fm-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--fm-bg-card, rgba(30, 38, 50, 0.85));
    border: 2px solid var(--fm-border-color, rgba(255, 255, 255, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--fm-text-muted, #6e7681);
    transition: all 0.2s ease;
}

.fm-step-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--fm-text-muted, #6e7681);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fm-wizard-step.active {
    background: rgba(240, 136, 62, 0.12);
}

.fm-wizard-step.active .fm-step-number {
    background: linear-gradient(145deg, rgba(240, 136, 62, 0.3) 0%, rgba(240, 136, 62, 0.15) 100%);
    border-color: var(--fm-accent-orange, #f0883e);
    color: var(--fm-accent-orange, #f0883e);
}

.fm-wizard-step.active .fm-step-label {
    color: var(--fm-accent-orange, #f0883e);
}

.fm-wizard-step.done .fm-step-number {
    background: linear-gradient(145deg, rgba(63, 185, 80, 0.3) 0%, rgba(63, 185, 80, 0.15) 100%);
    border-color: var(--fm-accent-green, #3fb950);
    color: var(--fm-accent-green, #3fb950);
}

.fm-wizard-step.done .fm-step-label {
    color: var(--fm-accent-green, #3fb950);
}

.fm-step-connector {
    width: 32px;
    height: 2px;
    background: var(--fm-border-color, rgba(255, 255, 255, 0.15));
    transition: background 0.2s ease;
}

.fm-step-connector.done {
    background: var(--fm-accent-green, #3fb950);
}

.fm-wizard-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--fm-text-secondary, #8b949e);
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fm-wizard-close:hover {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
}

/* Panel Body */
.fm-panel-body {
    flex: 1;
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Wizard Content */
.fm-wizard-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* Scrollable area for wizard cards */
.fm-wizard-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    min-height: 0;
}

.fm-wizard-scroll--padded {
    padding: 24px;
}

/* Wizard Cards */
.fm-wizard-card {
    margin: 20px 24px;
    background: var(--fm-bg-secondary, #1c2229);
    border-radius: 12px;
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    flex: 1;
}

.fm-wizard-card--full {
    display: flex;
    flex-direction: column;
}

.fm-wizard-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    font-size: 15px;
    font-weight: 600;
    color: var(--fm-text-primary, #e6edf3);
}

.fm-wizard-card-header i {
    color: #f0883e;
}

.fm-card-header-info {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 400;
    color: var(--fm-text-secondary, #8b949e);
}

.fm-card-header-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.fm-wizard-card-body {
    padding: 20px;
}

.fm-wizard-card-body.fm-no-padding {
    padding: 0;
}

/* Wizard Footer */
.fm-wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--fm-bg-secondary, #1c2229);
    border-top: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    flex-shrink: 0;
}

.fm-wizard-footer-left,
.fm-wizard-footer-right {
    display: flex;
    gap: 12px;
}

/* Form Elements */
.fm-form-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.fm-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fm-form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--fm-text-secondary, #8b949e);
}

.fm-form-label.fm-label-error {
    color: #f85149;
}

.fm-label.fm-label-error {
    color: #f85149;
}

.fm-label-hint {
    font-size: 11px;
    font-weight: 400;
    color: var(--fm-text-muted);
    margin-left: 4px;
}

.fm-form-control {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fm-input,
.fm-textarea,
.fm-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--fm-bg-card, rgba(30, 38, 50, 0.85));
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.12));
    border-radius: 8px;
    color: var(--fm-text-primary, #e6edf3);
    font-size: 14px;
    transition: all 0.2s ease;
}

.fm-input:focus,
.fm-textarea:focus,
.fm-select:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

.fm-input.fm-input-error,
.fm-textarea.fm-input-error {
    border-color: #f85149 !important;
}

.fm-input-small {
    width: 80px;
    padding: 6px 10px;
}

.fm-textarea {
    resize: vertical;
    min-height: 80px;
}

.fm-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.fm-form-hint {
    font-size: 12px;
    color: var(--fm-text-muted, #6e7681);
}

/* Form Labels */
.fm-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--fm-text-secondary, #8b949e);
}

/* Step 1 Layout */
.fm-config-layout {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 24px;
}

.fm-config-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.fm-config-section {
    background: var(--fm-bg-card, rgba(30, 38, 50, 0.5));
    border-radius: 12px;
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.06));
    overflow: hidden;
}

.fm-config-section.flex-grow {
    flex: 1;
}

.fm-config-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--fm-bg-secondary, #1c2229);
    border-bottom: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-primary, #e6edf3);
}

.fm-config-section-header i {
    color: var(--fm-accent-orange, #f0883e);
}

.fm-config-section-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fm-config-section-body--compact {
    padding: 10px 14px;
    gap: 8px;
}

.fm-config-section-body--compact .fm-form-group {
    margin-bottom: 8px;
    gap: 2px;
}

.fm-config-section-body--compact .fm-form-group label {
    margin-bottom: 2px;
}

.fm-config-section-body--tight {
    gap: 6px;
}

.fm-config-section-body--tight .fm-timezone-section {
    margin-top: 4px;
    padding-top: 6px;
    gap: 8px;
}

.fm-config-section-body--tight .fm-timezone-info {
    margin-top: 8px;
}

.fm-config-section-body--tight .fm-calendar-container {
    margin-bottom: 6px;
}

.fm-config-section-body--tight .fm-date-range-display,
.fm-config-section-body--tight .fm-calendar-container {
    margin-bottom: 0;
}

.fm-option-box {
    background: var(--fm-bg-card-hover, rgba(34, 42, 52, 0.75));
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fm-option-box+.fm-option-box {
    margin-top: 4px;
}

.fm-option-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.fm-option-box-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-primary, #e6edf3);
}

.fm-option-box-title i {
    color: var(--fm-accent-blue, #58a6ff);
}

.fm-option-box-description {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: var(--fm-text-muted, #6e7681);
}

.fm-option-box-description i {
    color: var(--fm-text-muted, #6e7681);
    margin-top: 2px;
}

/* Priority Toggle */
.fm-priority-toggle {
    display: flex;
    gap: 6px;
    background: var(--fm-bg-secondary, #1c2229);
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    border-radius: 10px;
    padding: 4px;
}

.fm-priority-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--fm-text-muted, #6e7681);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fm-priority-btn:hover {
    color: var(--fm-text-primary, #e6edf3);
}

.fm-priority-btn.active {
    background: rgba(54, 127, 211, 0.2);
    color: var(--fm-accent-blue, #58a6ff);
}

.fm-priority-btn.high.active,
.fm-priority-btn.high:hover {
    background: rgba(248, 81, 73, 0.15);
    color: var(--fm-accent-red, #f85149);
}

/* Switch */
.fm-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.fm-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.fm-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--fm-bg-card, rgba(30, 38, 50, 0.85));
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.12));
    border-radius: 12px;
    transition: all 0.2s ease;
}

.fm-switch-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--fm-text-muted, #6e7681);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.fm-switch input:checked+.fm-switch-slider {
    background: rgba(54, 127, 211, 0.15);
    border-color: rgba(54, 127, 211, 0.5);
}

.fm-switch input:checked+.fm-switch-slider::before {
    transform: translateX(20px);
    background: var(--fm-accent-blue, #58a6ff);
}

/* Time Interval */
.fm-date-range-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--fm-bg-tertiary, #1c2229);
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--fm-text-secondary, #8b949e);
}

.fm-date-range-display .datepiker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--fm-text-primary, #e6edf3);
    cursor: pointer;
}

.fm-date-range-display i {
    color: var(--fm-accent-orange, #f0883e);
}

.fm-calendar-container {
    display: flex;
    flex-direction: column;
    background: var(--fm-bg-tertiary, #1c2229);
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    flex: 1;
}

.fm-calendar-main {
    display: flex;
    flex: 1;
}

.fm-calendar-embed {
    flex: 1;
    min-width: 0;
}

.fm-calendar-footer {
    display: flex;
    justify-content: flex-end;
    padding: 12px 16px;
    background: var(--fm-bg-card, rgba(30, 38, 50, 0.85));
    border-top: 1px solid var(--fm-border-subtle, rgba(255, 255, 255, 0.08));
}

.fm-selected-range {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--fm-text-secondary, #8b949e);
}

.fm-selected-range i {
    color: var(--fm-accent-green, #3fb950);
}

.fm-calendar-embed .daterangepicker {
    position: static !important;
    display: flex !important;
    width: 100%;
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 0;
    padding: 0;
}

.fm-calendar-embed .daterangepicker:before,
.fm-calendar-embed .daterangepicker:after {
    display: none;
}

.fm-calendar-embed .daterangepicker .ranges,
.fm-calendar-embed .daterangepicker .drp-calendar {
    float: none;
}

.fm-calendar-embed .daterangepicker .ranges {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: var(--fm-bg-card, rgba(30, 38, 50, 0.85));
    border-right: 1px solid var(--fm-border-subtle, rgba(255, 255, 255, 0.08));
    min-width: 130px;
}

.fm-calendar-embed .daterangepicker .ranges ul {
    width: 100%;
    padding: 0;
    margin: 0;
}

.fm-calendar-embed .daterangepicker .ranges li {
    padding: 8px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--fm-text-secondary, #8b949e);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fm-calendar-embed .daterangepicker .ranges li:hover {
    background: var(--fm-bg-subtle, rgba(255, 255, 255, 0.04));
    color: var(--fm-text-primary, #e6edf3);
}

.fm-calendar-embed .daterangepicker .ranges li.active {
    background: var(--fm-accent-blue-bg, rgba(54, 127, 211, 0.2));
    border-color: var(--fm-accent-blue, #58a6ff);
    color: var(--fm-accent-blue, #58a6ff);
}

.fm-calendar-embed .daterangepicker .drp-calendar {
    display: flex;
    flex-direction: column;
    padding: 16px;
    max-width: none;
    width: 50%;
}

.fm-calendar-embed .daterangepicker.single .drp-calendar {
    width: 100%;
}

.fm-calendar-embed .daterangepicker.single .drp-calendar.left {
    border-right: none;
}

.fm-calendar-embed .daterangepicker .drp-calendar.left {
    border-right: 1px solid var(--fm-border-subtle, rgba(255, 255, 255, 0.08));
    padding-right: 16px;
}

.fm-calendar-embed .daterangepicker .calendar-table {
    background: transparent;
    border: none;
}

.fm-calendar-embed .daterangepicker .calendar-table table {
    width: 100%;
}

.fm-calendar-embed .daterangepicker th {
    font-size: 10px;
    font-weight: 600;
    color: var(--fm-text-muted, #6e7681);
    text-transform: uppercase;
}

.fm-calendar-embed .daterangepicker td {
    font-size: 12px;
    color: var(--fm-text-secondary, #8b949e);
    border-radius: 6px;
}

.fm-calendar-embed .daterangepicker td.available:hover {
    background: var(--fm-bg-subtle, rgba(255, 255, 255, 0.04));
    color: var(--fm-text-primary, #e6edf3);
}

.fm-calendar-embed .daterangepicker td.off,
.fm-calendar-embed .daterangepicker td.off.in-range {
    color: var(--fm-text-muted, #6e7681);
    opacity: 0.5;
}

.fm-calendar-embed .daterangepicker td.in-range {
    background: var(--fm-accent-blue-bg, rgba(54, 127, 211, 0.2));
    color: var(--fm-accent-blue, #58a6ff);
    border-radius: 0;
}

.fm-calendar-embed .daterangepicker td.active,
.fm-calendar-embed .daterangepicker td.active:hover {
    background: var(--fm-accent-blue, #58a6ff);
    color: #ffffff;
}

.fm-calendar-embed .daterangepicker .calendar-time {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}

.fm-calendar-embed .daterangepicker select.monthselect,
.fm-calendar-embed .daterangepicker select.yearselect,
.fm-calendar-embed .daterangepicker select.hourselect,
.fm-calendar-embed .daterangepicker select.minuteselect,
.fm-calendar-embed .daterangepicker select.ampmselect {
    padding: 4px 8px;
    background: var(--fm-bg-input, rgba(13, 17, 23, 0.8));
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.12));
    border-radius: 6px;
    color: var(--fm-text-primary, #e6edf3);
    font-size: 12px;
}

.fm-calendar-embed .daterangepicker .drp-buttons {
    display: none;
}

.fm-timezone-section {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fm-timezone-info {
    margin-top: 12px;
    padding: 12px;
    background: var(--fm-bg-subtle, rgba(255, 255, 255, 0.04));
    border-radius: 8px;
    border-left: 3px solid var(--fm-accent-blue, #58a6ff);
}

.fm-timezone-row {
    display: flex;
    gap: 8px;
    font-size: 12px;
    margin-bottom: 4px;
}

.fm-timezone-row:last-child {
    margin-bottom: 0;
}

.fm-timezone-label {
    color: var(--fm-text-muted, #6e7681);
    min-width: 120px;
}

.fm-timezone-value {
    color: var(--fm-text-primary, #e6edf3);
}

@media (max-width: 1200px) {
    .fm-config-layout {
        grid-template-columns: 1fr;
    }

    .fm-calendar-embed .daterangepicker {
        flex-direction: column;
    }

    .fm-calendar-embed .daterangepicker .ranges {
        flex-direction: row;
        flex-wrap: wrap;
        border-right: none;
        border-bottom: 1px solid var(--fm-border-subtle, rgba(255, 255, 255, 0.08));
    }

    .fm-calendar-embed .daterangepicker .drp-calendar {
        width: 100%;
        border-right: none;
    }
}

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

.fm-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    min-width: 180px;
    width: 100%;
    background: var(--fm-bg-card, rgba(30, 38, 50, 0.85));
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.12));
    border-radius: 8px;
    color: var(--fm-text-primary, #e6edf3);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fm-dropdown-toggle:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.fm-dropdown-toggle i {
    font-size: 10px;
    color: var(--fm-text-muted, #6e7681);
}

.fm-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background: var(--fm-bg-secondary, #1c2229);
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.12));
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 100;
    padding: 4px 0;
    margin-top: 4px;
    list-style: none;
    display: none;
}

/* Show dropdown when parent has open class (Bootstrap 3) or show class (Bootstrap 4) */
.fm-dropdown.open .fm-dropdown-menu,
.fm-dropdown.show .fm-dropdown-menu,
.dropdown.open .fm-dropdown-menu,
.dropdown.show .fm-dropdown-menu,
.fm-filter-dropdown.open .fm-dropdown-menu,
.fm-filter-dropdown.show .fm-dropdown-menu {
    display: block;
}

.fm-dropdown-menu li a {
    display: block;
    padding: 10px 14px;
    color: var(--fm-text-primary, #e6edf3);
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.fm-dropdown-menu li a:hover {
    background: rgba(54, 127, 211, 0.15);
    color: #58a6ff;
}

.fm-dropdown-menu li.active a {
    background: rgba(54, 127, 211, 0.2);
    color: #58a6ff;
    position: relative;
    padding-right: 30px;
}

.fm-dropdown-menu li.active a::after {
    content: "\f00c";
    font-family: "FontAwesome";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
}

/* Toggle Group */
.fm-toggle-group {
    display: inline-flex;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.12));
}

.fm-toggle-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--fm-text-secondary, #8b949e);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fm-toggle-btn:not(:last-child) {
    border-right: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.12));
}

.fm-toggle-group--compact {
    border-radius: 6px;
}

.fm-toggle-group--compact .fm-toggle-btn {
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 500;
}

.fm-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.fm-toggle-btn.active {
    background: rgba(54, 127, 211, 0.2);
    color: #58a6ff;
}

.fm-toggle-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Timezone Info */
.fm-timezone-info {
    display: flex;
    gap: 20px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--fm-text-muted, #6e7681);
}

/* Buttons */
.fm-btn-primary,
.fm-btn-secondary,
.fm-btn-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.fm-btn-primary {
    background: linear-gradient(145deg, rgba(54, 127, 211, 0.3) 0%, rgba(54, 127, 211, 0.15) 100%);
    border: 1px solid rgba(54, 127, 211, 0.4);
    color: #58a6ff;
}

.fm-btn-primary:hover {
    background: linear-gradient(145deg, rgba(54, 127, 211, 0.4) 0%, rgba(54, 127, 211, 0.25) 100%);
    border-color: #58a6ff;
}

.fm-btn-secondary {
    background: var(--fm-bg-card, rgba(30, 38, 50, 0.85));
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.12));
    color: var(--fm-text-primary, #e6edf3);
}

.fm-btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);
}

.fm-btn-success {
    background: linear-gradient(145deg, rgba(63, 185, 80, 0.3) 0%, rgba(63, 185, 80, 0.15) 100%);
    border: 1px solid rgba(63, 185, 80, 0.4);
    color: #3fb950;
}

.fm-btn-success:hover {
    background: linear-gradient(145deg, rgba(63, 185, 80, 0.4) 0%, rgba(63, 185, 80, 0.25) 100%);
    border-color: #3fb950;
}

.fm-btn-lg {
    padding: 12px 24px;
    font-size: 14px;
}

.fm-btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--fm-text-secondary, #8b949e);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.fm-btn-icon--dual {
    width: auto;
    padding: 0 8px;
    gap: 4px;
}

.fm-btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--fm-text-primary, #e6edf3);
}

.fm-btn-icon.fm-btn-danger:hover {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
}

button:disabled,
.fm-btn-primary:disabled,
.fm-btn-success:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tables */
.fm-table-container {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    background: var(--fm-bg-card, #1e2632);
}

.fm-endpoints-table-container {
    flex: 1;
    overflow: auto;
    max-height: calc(100vh - 334px);
}

.fm-endpoints-table-container.table-dropdown-open {
    overflow: visible !important;
}

.fm-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--fm-bg-card, #1e2632);
}

.fm-table th,
.fm-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.06));
}

.fm-table th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fm-text-muted, #6e7681);
    background: var(--fm-bg-secondary, #1c2229);
    position: sticky;
    top: 0;
    z-index: 10;
}

.fm-table--sticky thead tr:first-child th {
    top: 0;
}

.fm-table--sticky thead tr:nth-child(2) th {
    top: 38px;
}

.fm-table td {
    font-size: 13px;
    color: var(--fm-text-primary, #e6edf3);
    background: var(--fm-bg-card, #1e2632);
}

.fm-table tbody tr {
    background: var(--fm-bg-card, #1e2632);
}

.fm-table tbody tr:hover {
    background: #232b36;
}

.fm-table tbody tr:hover td {
    background: #232b36;
}

.fm-table tbody tr.selected {
    background: #1f3449;
}

.fm-table tbody tr.selected td {
    background: #1f3449;
}

.fm-cell-truncate {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fm-table.fm-loading {
    opacity: 0.5;
    pointer-events: none;
}

.fm-table-empty,
.fm-table-loading {
    padding: 40px;
    text-align: center;
    color: var(--fm-text-muted, #6e7681);
    font-size: 14px;
}

.fm-table-pagination {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.06));
}

/* Filter Row */
.fm-filter-row th {
    background: var(--fm-bg-secondary, #1c2229);
    padding: 8px 12px;
}

.fm-filter-input {
    width: 100%;
    padding: 6px 10px;
    background: var(--fm-bg-card, rgba(30, 38, 50, 0.85));
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.1));
    border-radius: 4px;
    color: var(--fm-text-primary, #e6edf3);
    font-size: 12px;
}

.fm-filter-dropdown {
    position: relative;
}

/* Active Filters Bar */
.fm-active-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--fm-bg-tertiary, #1c2229);
    border-bottom: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    border-top: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
}

.fm-filters-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--fm-text-secondary, #8b949e);
}

.fm-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.fm-filter-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--fm-bg-card, rgba(30, 38, 50, 0.85));
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.15));
    border-radius: 12px;
    font-size: 11px;
    color: var(--fm-text-primary, #e6edf3);
}

.fm-filter-tag strong {
    color: var(--fm-accent-blue, #58a6ff);
    font-weight: 600;
}

.fm-filter-remove {
    background: transparent;
    border: none;
    color: var(--fm-text-muted, #6e7681);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 2px 0;
    transition: color 0.2s;
    outline: none;
}

.fm-filter-remove:focus {
    outline: none;
}

.fm-filter-remove:hover {
    color: #f85149;
}

/* Active Filters Light Theme */
[data-theme="light"] .fm-active-filters {
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;
}

[data-theme="light"] .fm-filters-header {
    color: #4b5563;
}

[data-theme="light"] .fm-filter-tag {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #1f2937;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .fm-filter-tag strong {
    color: #0366d6;
}

[data-theme="light"] .fm-filter-remove {
    color: #9ca3af;
}

[data-theme="light"] .fm-filter-remove:hover {
    color: #dc3545;
}

.fm-filter-btn {
    padding: 6px 10px;
    background: transparent;
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.1));
    border-radius: 4px;
    color: var(--fm-text-secondary, #8b949e);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fm-filter-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.fm-filter-btn.active {
    background: rgba(88, 166, 255, 0.15);
    border-color: rgba(88, 166, 255, 0.5);
    color: var(--fm-accent-blue, #58a6ff);
}

/* Status Badges */
.fm-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.fm-status--success {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
}

.fm-status--warning {
    background: rgba(210, 153, 34, 0.15);
    color: #d29922;
}

.fm-status--danger {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
}

/* Artifacts Layout */
.fm-wizard-scroll--column {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.fm-wizard-scroll--artifacts {
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.fm-artifacts-layout {
    display: grid;
    grid-template-columns: 0.6fr 1.4fr;
    grid-template-rows: 1fr;
    gap: 24px;
    flex: 1;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.fm-artifacts-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--fm-bg-card, rgba(30, 38, 50, 0.5));
    border-radius: 12px;
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.06));
    overflow: hidden;
}

.fm-artifacts-panel-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-primary, #e6edf3);
    background: var(--fm-bg-secondary, #1c2229);
}

.fm-artifacts-panel-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fm-artifacts-panel-header i {
    color: var(--fm-accent-orange, #f0883e);
}

.fm-profile-selector {
    padding: 12px 16px;
    border-bottom: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.06));
    background: var(--fm-bg-card-hover, rgba(34, 42, 52, 0.5));
}

.fm-profile-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.fm-profile-row .fm-label {
    margin: 0;
}

.fm-create-profile-form {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.06));
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fm-create-profile-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.fm-event-logs-editor {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.06));
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fm-event-logs-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--fm-bg-secondary, #1c2229);
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    border-radius: 6px;
    padding: 6px 10px;
}

.fm-event-logs-search i {
    color: var(--fm-text-secondary, #8b949e);
    font-size: 12px;
}

.fm-event-logs-search input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--fm-text-primary, #e6edf3);
    font-size: 12px;
    outline: none;
}

.fm-event-logs-search input::placeholder {
    color: var(--fm-text-secondary, #8b949e);
}

.fm-event-logs-table-wrapper {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    border-radius: 6px;
    background: var(--fm-bg-secondary, #1c2229);
}

.fm-event-logs-table {
    width: 100%;
    border-collapse: collapse;
}

.fm-event-logs-table thead {
    position: sticky;
    top: 0;
    background: var(--fm-bg-tertiary, #161b22);
    z-index: 1;
}

.fm-event-logs-table th {
    padding: 10px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--fm-text-secondary, #8b949e);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
}

.fm-event-logs-table td {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--fm-text-primary, #e6edf3);
    border-bottom: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.05));
}

.fm-event-logs-table tbody tr:last-child td {
    border-bottom: none;
}

.fm-event-logs-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.fm-rules-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--fm-bg-secondary, #1c2229);
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    border-radius: 6px;
    padding: 8px 12px;
}

.fm-rules-search i {
    color: var(--fm-text-secondary, #8b949e);
    font-size: 13px;
}

.fm-rules-search input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--fm-text-primary, #e6edf3);
    font-size: 13px;
    outline: none;
}

.fm-rules-search input::placeholder {
    color: var(--fm-text-secondary, #8b949e);
}

.fm-rules-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}

.fm-rules-table-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.fm-rules-options-section {
    position: sticky;
    top: 0;
}

.fm-rules-options-section .fm-option-group {
    background: var(--fm-bg-secondary, #1c2229);
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    border-radius: 8px;
    padding: 16px;
}

.fm-rules-options-section .fm-option-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-primary, #e6edf3);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.06));
}

.fm-artifacts-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.06));
    background: var(--fm-bg-secondary, #1c2229);
}

.fm-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 10px;
    background: var(--fm-bg-tertiary, #1c2229);
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    flex: 1;
}

.fm-search-box i {
    color: var(--fm-text-muted, #6e7681);
}

.fm-search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--fm-text-primary, #e6edf3);
    font-size: 12px;
    width: 100%;
}

.fm-artifacts-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.fm-artifacts-list {
    flex: 1;
    padding: 12px 16px;
    overflow-y: auto;
}

.fm-artifacts-list .fm-tree-container {
    max-height: none;
    height: 100%;
}

.fm-artifacts-list .jstree-container-ul,
.fm-artifacts-list .jstree-children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fm-artifacts-list .jstree-node {
    margin-bottom: 8px;
}

.fm-artifacts-list .jstree-children {
    margin-left: 18px;
    padding-left: 12px;
    border-left: 1px solid var(--fm-border-subtle, rgba(255, 255, 255, 0.08));
}

.fm-artifacts-list .jstree-ocl {
    color: var(--fm-text-muted, #6e7681);
    cursor: pointer;
    margin-right: 6px;
}

.fm-artifacts-list a {
    color: var(--fm-text-secondary, #8b949e);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fm-artifacts-list a:hover {
    color: var(--fm-text-primary, #e6edf3);
}

.fm-artifacts-list .jstree-checkbox {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.2));
    background: var(--fm-bg-secondary, #1c2229);
    margin-right: 6px;
    position: relative;
    flex-shrink: 0;
}

.fm-artifacts-list .jstree-checkbox::after {
    content: "";
    display: none;
    width: 6px;
    height: 10px;
    border: solid var(--fm-accent-blue, #58a6ff);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.fm-artifacts-list .jstree-checkbox.jstree-clicked {
    background: var(--fm-accent-blue-bg, rgba(56, 139, 253, 0.15));
    border-color: var(--fm-accent-blue, #58a6ff);
}

.fm-artifacts-list .jstree-checkbox.jstree-clicked::after {
    display: block;
}

.fm-artifacts-list .jstree-checkbox.jstree-undetermined {
    background: var(--fm-accent-blue-bg, rgba(56, 139, 253, 0.12));
    border-color: var(--fm-accent-blue, #58a6ff);
}

.fm-artifacts-list .jstree-checkbox.jstree-undetermined::after {
    display: block;
    width: 8px;
    height: 2px;
    border: none;
    background: var(--fm-accent-blue, #58a6ff);
    transform: none;
}

.fm-options-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    max-height: 100%;
    padding-right: 6px;
}

.fm-options-panel .fm-chip-grid--scroll {
    max-height: none;
    overflow: visible;
}

/* Scrollable container for artifacts step options (Bootstrap col-md-6 layout) */
.artifacts-options-scroll {
    max-height: 550px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
}

/* Custom scrollbar styling for artifacts options */
.artifacts-options-scroll::-webkit-scrollbar {
    width: 8px;
}

.artifacts-options-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.artifacts-options-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.artifacts-options-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.fm-option-card {
    background: var(--fm-bg-card, rgba(30, 38, 50, 0.5));
    border-radius: 12px;
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.06));
    overflow: hidden;
    flex-shrink: 0;
}

.fm-option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: var(--fm-bg-secondary, #1c2229);
    border-bottom: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-primary, #e6edf3);
}

.fm-option-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fm-option-header i {
    color: var(--fm-accent-blue, #58a6ff);
}

.fm-option-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fm-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fm-chip {
    position: relative;
    display: inline-flex;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.fm-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fm-chip span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 6px;
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    background: var(--fm-bg-secondary, #1c2229);
    color: var(--fm-text-secondary, #8b949e);
    font-size: 11px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.fm-chip input:checked+span {
    background: var(--fm-accent-blue-bg, rgba(56, 139, 253, 0.15));
    border-color: var(--fm-accent-blue, #58a6ff);
    color: var(--fm-accent-blue, #58a6ff);
}

.fm-chip input:disabled+span {
    opacity: 0.7;
    cursor: not-allowed;
}

.fm-chip--required input:checked+span {
    background: var(--fm-accent-green-bg, rgba(63, 185, 80, 0.15));
    border-color: var(--fm-accent-green, #3fb950);
    color: var(--fm-accent-green, #3fb950);
}

.fm-chip--wide {
    flex: 1 1 100%;
}

.fm-chip--wide span {
    padding: 6px 10px;
    font-size: 12px;
    gap: 6px;
    border-radius: 8px;
}

.fm-chip-grid--scroll {
    max-height: 160px;
    overflow-y: auto;
}

.fm-regex-input--compact {
    margin-top: 6px;
}

.fm-option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.fm-option-row-label {
    font-size: 12px;
    color: var(--fm-text-secondary, #8b949e);
}

/* Artifacts Grid (legacy) */
.fm-artifacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.fm-artifacts-tree,
.fm-artifacts-options {
    background: var(--fm-bg-card, rgba(30, 38, 50, 0.5));
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.06));
}

.fm-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-primary, #e6edf3);
    margin-bottom: 12px;
}

.fm-section-title.fm-error {
    color: #f85149;
}

.fm-tree-container {
    max-height: 400px;
    overflow-y: auto;
}

/* Checkbox Group */
.fm-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fm-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--fm-text-primary, #e6edf3);
    cursor: pointer;
}

.fm-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: #58a6ff;
}

.fm-checkbox.fm-indent {
    margin-left: 24px;
}

.fm-option-group {
    margin-bottom: 20px;
}

.fm-option-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--fm-text-secondary, #8b949e);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fm-regex-input {
    margin-top: 12px;
    min-height: 36px;
    max-height: 36px;
    resize: none;
    overflow-x: auto;
    white-space: nowrap;
}

.fm-usn-list {
    max-height: 150px;
    overflow-y: auto;
    margin-top: 8px;
}

/* Tabs */
.fm-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: var(--fm-bg-card, rgba(30, 38, 50, 0.5));
    padding: 4px;
    border-radius: 8px;
}

.fm-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--fm-text-secondary, #8b949e);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fm-tab:hover {
    color: var(--fm-text-primary, #e6edf3);
}

.fm-tab.active {
    background: rgba(54, 127, 211, 0.2);
    color: #58a6ff;
}

.fm-rules-content {
    margin-top: 16px;
}

.fm-rules-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.fm-rule-options {
    margin-top: 20px;
    padding: 16px;
    background: var(--fm-bg-card, rgba(30, 38, 50, 0.5));
    border-radius: 8px;
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.06));
}

.fm-form-row-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--fm-text-primary, #e6edf3);
}

/* Indicators */
.fm-indicators-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    flex: 1;
    min-height: 0;
}

.fm-indicators-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--fm-bg-card, rgba(30, 38, 50, 0.5));
    border-radius: 12px;
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.06));
    overflow: hidden;
}

.fm-indicators-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--fm-bg-secondary, #1c2229);
    border-bottom: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-primary, #e6edf3);
}

.fm-indicators-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fm-indicators-header i {
    color: var(--fm-accent-yellow, #d29922);
}

.fm-indicators-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fm-indicators-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--fm-text-muted, #6e7681);
}

.fm-indicators-categories {
    padding: 12px 16px 16px;
    flex: 1;
    overflow-y: auto;
}

.fm-indicator-category {
    border-bottom: 1px solid var(--fm-border-subtle, rgba(255, 255, 255, 0.08));
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.fm-indicator-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.fm-indicator-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--fm-bg-tertiary, #1c2229);
    border-radius: 8px;
    cursor: pointer;
}

.fm-indicator-category-toggle {
    color: var(--fm-text-muted, #6e7681);
    transition: transform 0.2s ease, color 0.2s ease;
}

.fm-indicator-category-toggle.is-open {
    transform: rotate(90deg);
    color: var(--fm-accent-blue, #58a6ff);
}

.fm-indicator-category-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
}

.fm-indicator-category-icon.md5 {
    background: var(--fm-accent-purple-bg, rgba(163, 113, 247, 0.15));
    color: var(--fm-accent-purple, #a371f7);
}

.fm-indicator-category-icon.sha {
    background: var(--fm-accent-blue-bg, rgba(56, 139, 253, 0.15));
    color: var(--fm-accent-blue, #58a6ff);
}

.fm-indicator-category-icon.ip {
    background: var(--fm-accent-orange-bg, rgba(240, 136, 62, 0.15));
    color: var(--fm-accent-orange, #f0883e);
}

.fm-indicator-category-icon.domain {
    background: var(--fm-accent-green-bg, rgba(63, 185, 80, 0.15));
    color: var(--fm-accent-green, #3fb950);
}

.fm-indicator-category-name {
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    color: var(--fm-text-primary, #e6edf3);
}

.fm-indicator-category-count {
    font-size: 11px;
    color: var(--fm-text-muted, #6e7681);
    background: var(--fm-bg-subtle, rgba(255, 255, 255, 0.04));
    padding: 2px 8px;
    border-radius: 999px;
}

.fm-indicator-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 4px 0 4px;
}

.fm-indicator-value {
    font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
    font-size: 11px;
    color: var(--fm-text-primary, #e6edf3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.fm-indicator-count {
    font-size: 11px;
    color: var(--fm-text-secondary, #8b949e);
    background: var(--fm-bg-tertiary, #1c2229);
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    padding: 4px 8px;
    border-radius: 999px;
}

.fm-indicators-empty {
    font-size: 12px;
    color: var(--fm-text-muted, #6e7681);
}

.fm-indicators-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.fm-indicators-input,
.fm-indicators-list {
    background: var(--fm-bg-card, rgba(30, 38, 50, 0.5));
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.06));
}

.fm-indicators-textarea {
    min-height: 300px;
    margin-bottom: 12px;
}

.fm-indicators-body .fm-indicators-textarea {
    margin-bottom: 0;
}

.fm-indicators-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 350px;
    overflow-y: auto;
}

.fm-indicators-categories .fm-indicators-items {
    max-height: none;
    overflow-y: visible;
}

.fm-indicator-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    background: var(--fm-bg-secondary, #1c2229);
    border-radius: 6px;
    font-size: 12px;
    color: var(--fm-text-primary, #e6edf3);
}

/* Summary */
.fm-summary-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.fm-summary-card {
    background: var(--fm-bg-card, rgba(30, 38, 50, 0.5));
    border-radius: 12px;
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.06));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.fm-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--fm-bg-secondary, #1c2229);
    border-bottom: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-primary, #e6edf3);
}

.fm-summary-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fm-summary-header i {
    color: var(--fm-accent-blue, #58a6ff);
}

.fm-summary-count {
    font-size: 11px;
    color: var(--fm-text-secondary, #8b949e);
    background: var(--fm-bg-tertiary, #1c2229);
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    padding: 4px 8px;
    border-radius: 999px;
}

.fm-summary-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fm-summary-body .fm-summary-row {
    margin-bottom: 0;
}

.fm-summary-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--fm-text-muted, #6e7681);
    margin-top: 4px;
}

.fm-summary-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--fm-bg-tertiary, #1c2229);
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08));
    color: var(--fm-text-secondary, #8b949e);
    font-size: 11px;
}

.fm-summary-tree {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fm-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.fm-summary-section {
    background: var(--fm-bg-card, rgba(30, 38, 50, 0.5));
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.06));
}

.fm-summary-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-primary, #e6edf3);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.06));
}

.fm-summary-row {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 13px;
}

.fm-summary-label {
    color: var(--fm-text-muted, #6e7681);
    min-width: 100px;
}

.fm-summary-value {
    color: var(--fm-text-primary, #e6edf3);
}

.fm-summary-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fm-summary-list--tags {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}

.fm-summary-list--scroll {
    max-height: 150px;
    overflow-y: auto;
}

.fm-summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--fm-text-primary, #e6edf3);
}

.fm-summary-item i {
    color: #3fb950;
    font-size: 11px;
}

/* Merge Section */
.fm-merge-section {
    margin-top: 24px;
}

.fm-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-primary, #e6edf3);
}

/* Modal overrides */
.fm-modal {
    background: var(--fm-bg-secondary, #1c2229) !important;
    border: 1px solid var(--fm-border-color, rgba(255, 255, 255, 0.08)) !important;
    border-radius: 12px !important;
}

.fm-modal .modal-header {
    border-bottom-color: var(--fm-border-color, rgba(255, 255, 255, 0.08)) !important;
}

.fm-modal .modal-title {
    color: var(--fm-text-primary, #e6edf3) !important;
}

.fm-modal .modal-footer {
    border-top-color: var(--fm-border-color, rgba(255, 255, 255, 0.08)) !important;
}

.fm-event-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 16px 0;
}

.fm-custom-events {
    margin-top: 16px;
}

.fm-custom-events label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--fm-text-primary, #e6edf3);
}

/* Loading state */
.fm-loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

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

/* Responsive */
@media (max-width: 1200px) {
    .fm-slide-panel {
        width: 90%;
        min-width: 0;
    }

    .fm-artifacts-layout,
    .fm-artifacts-grid,
    .fm-indicators-layout,
    .fm-indicators-grid,
    .fm-summary-layout,
    .fm-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .fm-slide-panel {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .fm-wizard-steps {
        flex-wrap: wrap;
    }

    .fm-step-connector {
        display: none;
    }

    .fm-step-label {
        display: none;
    }
}

/* Light theme overrides */
[data-theme="light"] .fm-panel-overlay {
    background: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .fm-slide-panel {
    background: var(--theme-bg-primary);
    border-left-color: var(--theme-border-solid);
}

[data-theme="light"] .fm-panel-header,
[data-theme="light"] .fm-wizard-header,
[data-theme="light"] .fm-wizard-footer {
    background: var(--theme-bg-secondary);
    border-color: var(--theme-border-solid);
}

[data-theme="light"] .fm-panel-header-text h2,
[data-theme="light"] .fm-section-title,
[data-theme="light"] .fm-summary-title,
[data-theme="light"] .fm-wizard-card-header {
    color: var(--theme-text-primary);
}

[data-theme="light"] .fm-panel-subtitle,
[data-theme="light"] .fm-form-label,
[data-theme="light"] .fm-label,
[data-theme="light"] .fm-option-title,
[data-theme="light"] .fm-step-label {
    color: var(--theme-text-secondary);
}

[data-theme="light"] .fm-wizard-card {
    background: var(--theme-bg-secondary);
    border-color: var(--theme-border-solid);
}

[data-theme="light"] .fm-input,
[data-theme="light"] .fm-textarea,
[data-theme="light"] .fm-select,
[data-theme="light"] .fm-dropdown-toggle,
[data-theme="light"] .fm-filter-input {
    background: var(--theme-bg-tertiary);
    border-color: var(--theme-border-muted);
    color: var(--theme-text-primary);
}

[data-theme="light"] .fm-dropdown-menu {
    background: var(--theme-bg-secondary);
    border-color: var(--theme-border-solid);
}

[data-theme="light"] .fm-dropdown-menu li a {
    color: var(--theme-text-primary);
}

[data-theme="light"] .fm-table th {
    background: var(--theme-bg-tertiary);
    color: var(--theme-text-secondary);
}

[data-theme="light"] .fm-table td {
    color: var(--theme-text-primary);
}

[data-theme="light"] .fm-table tbody tr {
    background: var(--theme-bg-secondary);
}

[data-theme="light"] .fm-table tbody tr:hover,
[data-theme="light"] .fm-table tbody tr:hover td {
    background: var(--theme-table-row-hover);
}

[data-theme="light"] .fm-table tbody tr.selected,
[data-theme="light"] .fm-table tbody tr.selected td {
    background: var(--theme-accent-blue-bg);
}

[data-theme="light"] .fm-date-range-display {
    background: var(--theme-bg-tertiary);
    border-color: var(--theme-border-solid);
    color: var(--theme-text-secondary);
}

[data-theme="light"] .fm-date-range-display .datepiker {
    color: var(--theme-text-primary);
}

[data-theme="light"] .fm-calendar-container {
    background: var(--theme-bg-tertiary);
    border-color: var(--theme-border-solid);
}

[data-theme="light"] .fm-search-box {
    background: var(--theme-bg-tertiary);
    border-color: var(--theme-border-muted);
}

[data-theme="light"] .fm-search-box input {
    color: var(--theme-text-primary);
}

/* Light Theme: Logs Modal Specifics */
[data-theme="light"] #logs .table thead tr th {
    background-color: var(--theme-bg-secondary) !important;
    color: var(--theme-text-secondary) !important;
    border-bottom: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] #logs .modal-footer {
    border-top-color: var(--theme-border-solid) !important;
    background-color: var(--theme-bg-secondary) !important;
}

[data-theme="light"] #logs .table tbody tr td {
    color: var(--theme-text-primary) !important;
    border-bottom: 1px solid var(--theme-border-muted) !important;
}

[data-theme="light"] #logs .table tbody tr:hover td {
    background-color: var(--theme-bg-tertiary) !important;
}

[data-theme="light"] #logs .modal-footer .fm-btn-secondary:hover {
    background-color: var(--theme-bg-tertiary) !important;
    border-color: var(--theme-border-active) !important;
}

[data-theme="light"] #logs .modal-footer .fm-btn-primary[disabled],
[data-theme="light"] #logs .modal-footer .fm-btn-primary:disabled {
    background-color: var(--theme-accent-blue-bg) !important;
    border-color: var(--theme-border-muted) !important;
    color: var(--theme-text-primary) !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

[data-theme="light"] .fm-indicator-category-header {
    background: var(--theme-bg-tertiary);
}

/* Reduced size for modal close button */
#logs .modal-header .close {
    font-size: 1.5rem;
    padding: 0.5rem;
}

[data-theme="light"] #logs .modal-footer .fm-btn-secondary {
    background-color: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-primary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

/* Fix dropdown menu visibility in light theme */
[data-theme="light"] .dropdown-menu>li>a {
    color: var(--theme-text-primary) !important;
}

[data-theme="light"] .dropdown-menu li a:hover {
    background-color: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-primary) !important;
}

[data-theme="light"] .dropdown-menu li a i {
    color: var(--theme-text-primary) !important;
}

[data-theme="light"] .fm-btn-primary {
    color: #fff;
    background: linear-gradient(135deg,
            var(--theme-accent-blue) 0%,
            var(--theme-accent-blue-dark) 100%);
}

[data-theme="light"] .fm-btn-primary:hover {
    filter: brightness(1.05);
}

[data-theme="light"] .fm-btn-primary:active {
    filter: brightness(0.98);
}

[data-theme="light"] .fm-summary-count,
[data-theme="light"] .fm-summary-tag {
    background: var(--theme-bg-tertiary);
    border-color: var(--theme-border-solid);
    color: var(--theme-text-secondary);
}

[data-theme="light"] .fm-indicator-count {
    background: var(--theme-bg-tertiary);
    border-color: var(--theme-border-solid);
    color: var(--theme-text-secondary);
}

[data-theme="light"] .fm-checkbox,
[data-theme="light"] .fm-summary-value,
[data-theme="light"] .fm-summary-item,
[data-theme="light"] .fm-indicator-item {
    color: var(--theme-text-primary);
}

[data-theme="light"] .fm-summary-label,
[data-theme="light"] .fm-form-hint {
    color: var(--theme-text-muted);
}

[data-theme="light"] .fm-btn-secondary {
    background: var(--theme-bg-tertiary);
    border-color: var(--theme-border-muted);
    color: var(--theme-text-primary);
}

[data-theme="light"] .fm-btn-secondary:hover {
    background: #d0d7de;
    border-color: #8c959f;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .fm-btn-secondary i {
    color: #333;
}

[data-theme="light"] .fm-artifacts-tree,
[data-theme="light"] .fm-artifacts-options,
[data-theme="light"] .fm-indicators-input,
[data-theme="light"] .fm-indicators-list,
[data-theme="light"] .fm-summary-section,
[data-theme="light"] .fm-rule-options,
[data-theme="light"] .fm-tabs {
    background: var(--theme-bg-tertiary);
    border-color: var(--theme-border-muted);
}

[data-theme="light"] .fm-indicator-item {
    background: var(--theme-bg-secondary);
}

[data-theme="light"] .fm-modal {
    background: var(--theme-bg-secondary) !important;
    border-color: var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-modal .modal-title {
    color: var(--theme-text-primary) !important;
}

/* =============================================================================
   END CREATE INVESTIGATION SLIDE PANEL & WIZARD
   ============================================================================= */

/* Light Theme: Override fm CSS variables */
[data-theme="light"] .fm-page,
[data-theme="light"] .forensics-modern,
[data-theme="light"] #append.fm-page,
html[data-theme="light"] .fm-page,
html[data-theme="light"] .forensics-modern {
    --fm-bg-primary: var(--theme-bg-primary);
    --fm-bg-secondary: var(--theme-bg-secondary);
    --fm-bg-card: var(--theme-bg-card);
    --fm-bg-card-hover: var(--theme-bg-card-hover);
    --fm-bg-glass: var(--theme-bg-glass);
    --fm-border-color: var(--theme-border-color);
    --fm-border-subtle: var(--theme-border-subtle);
    --fm-border-accent: var(--theme-border-accent);
    --fm-text-primary: var(--theme-text-primary);
    --fm-text-secondary: var(--theme-text-muted-info);
    --fm-text-muted: var(--theme-text-muted);
}

/* Light Theme: Tab Navbar */
[data-theme="light"] .fm-tabs-navbar,
html[data-theme="light"] .fm-tabs-navbar {
    background: var(--theme-bg-secondary) !important;
    border-color: var(--theme-border-color) !important;
    box-shadow: var(--theme-shadow-md) !important;
}

[data-theme="light"] .fm-tab-item,
html[data-theme="light"] .fm-tab-item {
    color: var(--theme-text-secondary) !important;
}

[data-theme="light"] .fm-tab-item:hover,
html[data-theme="light"] .fm-tab-item:hover {
    background: var(--theme-table-row-hover) !important;
    color: var(--theme-text-primary) !important;
}

[data-theme="light"] .fm-tab-item.active,
html[data-theme="light"] .fm-tab-item.active {
    background: var(--theme-accent-blue-bg) !important;
    color: var(--theme-accent-blue) !important;
}

/* Light Theme: List Toolbar */
[data-theme="light"] .fm-list-toolbar,
html[data-theme="light"] .fm-list-toolbar {
    background: var(--theme-bg-secondary) !important;
}

/* Light Theme: Tab Pills (Investigations/Merged) */
[data-theme="light"] .fm-list-tabs,
html[data-theme="light"] .fm-list-tabs {
    background: var(--theme-bg-tertiary) !important;
    border-color: var(--theme-border-color) !important;
}

[data-theme="light"] .fm-list-tab,
html[data-theme="light"] .fm-list-tab {
    color: var(--theme-text-secondary) !important;
}

[data-theme="light"] .fm-list-tab:hover,
html[data-theme="light"] .fm-list-tab:hover {
    color: var(--theme-text-primary) !important;
    background: var(--theme-table-row-hover) !important;
}

[data-theme="light"] .fm-list-tab.active,
html[data-theme="light"] .fm-list-tab.active {
    color: var(--theme-accent-blue) !important;
    background: var(--theme-accent-blue-bg) !important;
    box-shadow: 0 0 8px var(--theme-accent-blue-bg) !important;
}

/* Light Theme: Action Buttons (Investigation, Merge, etc.) */
[data-theme="light"] .fm-list-action-btn,
html[data-theme="light"] .fm-list-action-btn {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-color) !important;
    color: var(--theme-text-secondary) !important;
}

[data-theme="light"] .fm-list-action-btn:hover,
html[data-theme="light"] .fm-list-action-btn:hover {
    background: var(--theme-table-row-hover) !important;
    border-color: var(--theme-accent-blue) !important;
    color: var(--theme-accent-blue) !important;
}

[data-theme="light"] .fm-list-action-btn.primary,
html[data-theme="light"] .fm-list-action-btn.primary {
    background: linear-gradient(135deg, var(--theme-accent-blue) 0%, var(--theme-accent-blue-dark) 100%) !important;
    color: var(--theme-text-inverse) !important;
    border-color: transparent !important;
}

[data-theme="light"] .fm-list-action-btn.primary:hover,
html[data-theme="light"] .fm-list-action-btn.primary:hover {
    background: linear-gradient(135deg, var(--theme-accent-blue-light) 0%, var(--theme-accent-blue) 100%) !important;
}

/* Light Theme: Action Buttons (fm-action-btn) */
[data-theme="light"] .fm-action-btn,
[data-theme="light"] button.fm-action-btn,
html[data-theme="light"] .fm-action-btn {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-color) !important;
    color: var(--theme-text-secondary) !important;
}

[data-theme="light"] .fm-action-btn:hover,
[data-theme="light"] button.fm-action-btn:hover,
html[data-theme="light"] .fm-action-btn:hover {
    background: var(--theme-table-row-hover) !important;
    border-color: var(--theme-accent-blue) !important;
    color: var(--theme-text-primary) !important;
}

[data-theme="light"] .fm-action-btn.fm-action-primary,
html[data-theme="light"] .fm-action-btn.fm-action-primary {
    background: linear-gradient(145deg, var(--theme-accent-blue-bg) 0%, var(--theme-table-row-hover) 100%) !important;
    border-color: var(--theme-border-accent) !important;
    color: var(--theme-accent-blue) !important;
}

[data-theme="light"] .fm-action-btn.fm-action-primary:hover,
html[data-theme="light"] .fm-action-btn.fm-action-primary:hover {
    background: linear-gradient(145deg, var(--theme-accent-blue-glow) 0%, var(--theme-accent-blue-bg) 100%) !important;
    border-color: var(--theme-accent-blue) !important;
}

[data-theme="light"] .fm-action-btn.fm-action-danger,
html[data-theme="light"] .fm-action-btn.fm-action-danger {
    background: linear-gradient(145deg, var(--theme-danger-bg) 0%, var(--theme-danger-bg) 100%) !important;
    border-color: var(--theme-danger-glow) !important;
    color: var(--theme-danger) !important;
}

/* Light Theme: Table Container */
[data-theme="light"] .fm-list-table-container,
[data-theme="light"] .fm-data-table-container,
html[data-theme="light"] .fm-list-table-container,
html[data-theme="light"] .fm-data-table-container {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-color) !important;
}

/* Light Theme: Data Table Header Area */
[data-theme="light"] .fm-data-table-header,
html[data-theme="light"] .fm-data-table-header {
    background: var(--theme-bg-tertiary) !important;
    border-bottom: 1px solid var(--theme-border-color) !important;
}

/* Light Theme: Table Header */
[data-theme="light"] .fm-list-table thead,
[data-theme="light"] .fm-list-table thead tr,
[data-theme="light"] .fm-data-table thead,
[data-theme="light"] .fm-data-table thead tr,
[data-theme="light"] .table thead,
[data-theme="light"] #forensics-page .table thead,
[data-theme="light"] #forensics-page table thead,
html[data-theme="light"] .fm-list-table thead,
html[data-theme="light"] .fm-data-table thead,
html[data-theme="light"] #forensics-page .table thead {
    background: var(--theme-table-header-bg) !important;
}

[data-theme="light"] .fm-list-table thead th,
[data-theme="light"] .fm-data-table thead th,
[data-theme="light"] .fm-data-table th,
[data-theme="light"] #forensics-page .table thead th,
[data-theme="light"] #forensics-page table th,
html[data-theme="light"] .fm-list-table thead th,
html[data-theme="light"] .fm-data-table thead th,
html[data-theme="light"] #forensics-page .table thead th {
    background: var(--theme-table-header-bg) !important;
    color: var(--theme-text-tertiary) !important;
    /* Darker text for visibility */
    border-bottom: 1px solid var(--theme-border-color) !important;
}

/* Light Theme: Table Body */
[data-theme="light"] .fm-list-table tbody tr,
[data-theme="light"] .fm-data-table tbody tr,
[data-theme="light"] #forensics-page .table tbody tr,
[data-theme="light"] #forensics-page table tbody tr,
html[data-theme="light"] .fm-list-table tbody tr,
html[data-theme="light"] .fm-data-table tbody tr,
html[data-theme="light"] #forensics-page .table tbody tr {
    background: var(--theme-bg-secondary) !important;
    border-bottom: 1px solid var(--theme-border-subtle) !important;
}

[data-theme="light"] .fm-list-table tbody tr:hover,
[data-theme="light"] .fm-data-table tbody tr:hover,
[data-theme="light"] #forensics-page .table tbody tr:hover,
[data-theme="light"] #forensics-page table tbody tr:hover,
html[data-theme="light"] .fm-list-table tbody tr:hover,
html[data-theme="light"] .fm-data-table tbody tr:hover,
html[data-theme="light"] #forensics-page .table tbody tr:hover {
    background: var(--theme-table-row-hover) !important;
}

[data-theme="light"] .fm-list-table tbody td,
[data-theme="light"] .fm-data-table tbody td,
[data-theme="light"] .fm-data-table td,
[data-theme="light"] #forensics-page .table tbody td,
[data-theme="light"] #forensics-page table td,
html[data-theme="light"] .fm-list-table tbody td,
html[data-theme="light"] .fm-data-table tbody td,
html[data-theme="light"] #forensics-page .table tbody td {
    color: var(--theme-text-primary) !important;
    border-color: var(--theme-border-subtle) !important;
    background: transparent !important;
}

/* Light Theme: Investigation Name */
[data-theme="light"] .fm-investigation-name-text,
html[data-theme="light"] .fm-investigation-name-text {
    color: var(--theme-text-primary) !important;
}

[data-theme="light"] .fm-investigation-desc,
html[data-theme="light"] .fm-investigation-desc {
    color: var(--theme-text-muted) !important;
}

/* Light Theme: Status Badges */
[data-theme="light"] .fm-status-badge,
html[data-theme="light"] .fm-status-badge {
    background: var(--theme-bg-tertiary) !important;
    border-color: var(--theme-border-color) !important;
}

/* Light Theme: Cards and Panels */
[data-theme="light"] .fm-card,
[data-theme="light"] .fm-panel,
html[data-theme="light"] .fm-card,
html[data-theme="light"] .fm-panel {
    background: var(--theme-bg-secondary) !important;
    border-color: var(--theme-border-color) !important;
    box-shadow: var(--theme-shadow-sm) !important;
}

/* Light Theme: Page Container */
[data-theme="light"] .fm-page,
[data-theme="light"] #forensics-page,
html[data-theme="light"] .fm-page,
html[data-theme="light"] #forensics-page {
    background: var(--theme-bg-primary) !important;
}

/* Light Theme: Event Cards */
[data-theme="light"] .fm-event-card,
html[data-theme="light"] .fm-event-card {
    background: linear-gradient(145deg, var(--theme-bg-secondary) 0%, var(--theme-bg-tertiary) 100%) !important;
    border-color: var(--theme-border-color) !important;
    box-shadow: var(--theme-shadow-md) !important;
}

[data-theme="light"] .fm-event-card:hover,
html[data-theme="light"] .fm-event-card:hover {
    box-shadow: var(--theme-shadow-lg), 0 0 0 1px var(--phase-color) !important;
}

[data-theme="light"] .fm-event-card-header,
html[data-theme="light"] .fm-event-card-header {
    border-bottom: 1px solid var(--theme-border-subtle) !important;
}

/* Light Theme: Artefacts Sidebar */
[data-theme="light"] .fm-artefacts-sidebar,
html[data-theme="light"] .fm-artefacts-sidebar {
    background: var(--theme-bg-secondary) !important;
    border-color: var(--theme-border-color) !important;
}

[data-theme="light"] .fm-artefact-category-header,
html[data-theme="light"] .fm-artefact-category-header {
    color: var(--theme-text-secondary) !important;
}

[data-theme="light"] .fm-artefact-item,
html[data-theme="light"] .fm-artefact-item {
    color: var(--theme-text-secondary) !important;
}

[data-theme="light"] .fm-artefact-item:hover,
html[data-theme="light"] .fm-artefact-item:hover {
    background: var(--theme-table-row-hover) !important;
    color: var(--theme-text-primary) !important;
}

[data-theme="light"] .fm-artefact-item.active,
html[data-theme="light"] .fm-artefact-item.active {
    background: var(--theme-accent-blue-bg) !important;
    color: var(--theme-accent-blue) !important;
}

/* Light Theme: Dropdowns */
[data-theme="light"] .fm-dropdown-menu,
html[data-theme="light"] .fm-dropdown-menu {
    background: var(--theme-bg-dropdown) !important;
    border-color: var(--theme-border-color) !important;
    box-shadow: var(--theme-shadow-lg) !important;
}

[data-theme="light"] .fm-dropdown-item,
html[data-theme="light"] .fm-dropdown-item {
    color: var(--theme-text-primary) !important;
}

[data-theme="light"] .fm-dropdown-item:hover,
html[data-theme="light"] .fm-dropdown-item:hover {
    background: var(--theme-table-row-hover) !important;
    color: var(--theme-accent-blue) !important;
}

/* Light Theme: Dropdown menu list items */
[data-theme="light"] .fm-dropdown-menu li a,
html[data-theme="light"] .fm-dropdown-menu li a {
    color: var(--theme-text-tertiary) !important;
    /* gray-700 */
    background: transparent !important;
}

[data-theme="light"] .fm-dropdown-menu li a i,
html[data-theme="light"] .fm-dropdown-menu li a i {
    color: var(--theme-text-medium) !important;
    /* gray-500 */
    opacity: 0.9 !important;
}

[data-theme="light"] .fm-dropdown-menu li a:hover,
html[data-theme="light"] .fm-dropdown-menu li a:hover {
    background: var(--theme-table-row-hover) !important;
    color: var(--theme-accent-blue-dark) !important;
    /* blue-600 */
}

[data-theme="light"] .fm-dropdown-menu li a:hover i,
html[data-theme="light"] .fm-dropdown-menu li a:hover i {
    color: var(--theme-accent-blue-dark) !important;
    /* blue-600 */
    opacity: 1 !important;
}

/* Light Theme: Danger items in dropdown (Delete, etc.) */
[data-theme="light"] .fm-dropdown-menu li a.danger,
html[data-theme="light"] .fm-dropdown-menu li a.danger {
    color: var(--theme-danger-dark) !important;
    /* red-600 */
}

[data-theme="light"] .fm-dropdown-menu li a.danger i,
html[data-theme="light"] .fm-dropdown-menu li a.danger i {
    color: var(--theme-danger-dark) !important;
    /* red-600 */
}

[data-theme="light"] .fm-dropdown-menu li a.danger:hover,
html[data-theme="light"] .fm-dropdown-menu li a.danger:hover {
    background: var(--theme-danger-bg) !important;
    color: var(--theme-danger-dark) !important;
    /* red-700 */
}

[data-theme="light"] .fm-dropdown-menu li a.danger:hover i,
html[data-theme="light"] .fm-dropdown-menu li a.danger:hover i {
    color: var(--theme-danger-dark) !important;
    /* red-700 */
}

/* Light Theme: Dropdown menu divider */
[data-theme="light"] .fm-dropdown-menu li.divider,
html[data-theme="light"] .fm-dropdown-menu li.divider {
    border-top-color: var(--theme-border-muted) !important;
    /* gray-200 */
    background: transparent !important;
}

/* Light Theme: Row actions button */
[data-theme="light"] .fm-row-actions-btn,
html[data-theme="light"] .fm-row-actions-btn {
    background: var(--theme-table-row-hover) !important;
    border: 1px solid var(--theme-border-accent) !important;
    color: var(--theme-accent-blue) !important;
}

[data-theme="light"] .fm-row-actions-btn:hover,
html[data-theme="light"] .fm-row-actions-btn:hover {
    background: var(--theme-accent-blue-bg) !important;
    border-color: var(--theme-border-accent) !important;
    color: var(--theme-accent-blue-dark) !important;
}

/* Light Theme: Row actions dropdown menu */
[data-theme="light"] .fm-row-actions .dropdown-menu,
[data-theme="light"] .fm-row-actions .fm-dropdown-menu,
[data-theme="light"] .fm-row-actions-menu {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .fm-row-actions .dropdown-menu li a,
[data-theme="light"] .fm-row-actions .dropdown-menu li span a,
[data-theme="light"] .fm-row-actions .fm-dropdown-menu li a,
[data-theme="light"] .fm-row-actions .fm-dropdown-menu li span a,
[data-theme="light"] .fm-row-actions-menu a,
[data-theme="light"] .fm-row-actions-menu button {
    color: var(--theme-text-primary) !important;
}

[data-theme="light"] .fm-row-actions .dropdown-menu li a i,
[data-theme="light"] .fm-row-actions .dropdown-menu li span a i,
[data-theme="light"] .fm-row-actions .fm-dropdown-menu li a i,
[data-theme="light"] .fm-row-actions .fm-dropdown-menu li span a i,
[data-theme="light"] .fm-row-actions-menu i {
    color: var(--theme-text-secondary) !important;
    opacity: 1 !important;
}

[data-theme="light"] .fm-row-actions .dropdown-menu li a:hover,
[data-theme="light"] .fm-row-actions .dropdown-menu li span a:hover,
[data-theme="light"] .fm-row-actions .fm-dropdown-menu li a:hover,
[data-theme="light"] .fm-row-actions .fm-dropdown-menu li span a:hover,
[data-theme="light"] .fm-row-actions-menu a:hover,
[data-theme="light"] .fm-row-actions-menu button:hover {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-primary) !important;
}

[data-theme="light"] .fm-row-actions .dropdown-menu li a:hover i,
[data-theme="light"] .fm-row-actions .dropdown-menu li span a:hover i,
[data-theme="light"] .fm-row-actions .fm-dropdown-menu li a:hover i,
[data-theme="light"] .fm-row-actions .fm-dropdown-menu li span a:hover i,
[data-theme="light"] .fm-row-actions-menu a:hover i,
[data-theme="light"] .fm-row-actions-menu button:hover i {
    color: var(--theme-accent-blue) !important;
}

/* Light Theme: Forensics Data Table - Explicit Header Text Color Fix */
[data-theme="light"] .fm-data-table th,
[data-theme="light"] .fm-data-table thead th,
[data-theme="light"] .forensics-modern .fm-data-table th,
[data-theme="light"] #forensics-page .fm-data-table th,
[data-theme="light"] .fm-page .fm-data-table th,
html[data-theme="light"] .fm-data-table th,
html[data-theme="light"] .fm-data-table thead th {
    color: var(--theme-text-dark) !important;
    /* Very dark gray for maximum visibility */
    background: var(--theme-table-header-bg, var(--theme-bg-tertiary)) !important;
}

/* Light Theme: Generic table headers in forensics context */
[data-theme="light"] #forensics-page th,
[data-theme="light"] #forensics-page .table th,
[data-theme="light"] .forensics-modern th,
[data-theme="light"] .forensics-modern .table th,
[data-theme="light"] .fm-page th,
[data-theme="light"] .fm-page .table th,
html[data-theme="light"] #forensics-page th,
html[data-theme="light"] .forensics-modern th,
html[data-theme="light"] .fm-page th {
    color: var(--theme-text-dark) !important;
    /* Very dark gray for maximum visibility */
    background: var(--theme-table-header-bg, var(--theme-bg-tertiary)) !important;
}

/* Light Theme: EXPLICIT fix for forensics investigations table header */
html[data-theme="light"] .fm-page.forensics-modern .fm-data-table thead th,
html[data-theme="light"] .fm-page .fm-data-table thead th,
html[data-theme="light"] .forensics-modern .fm-data-table thead th,
html[data-theme="light"] #append.fm-page .fm-data-table thead th,
html[data-theme="light"] #append.forensics-modern .fm-data-table thead th,
[data-theme="light"] .fm-page.forensics-modern .fm-data-table thead th,
[data-theme="light"] .fm-page .fm-data-table thead th,
[data-theme="light"] .forensics-modern .fm-data-table thead th,
[data-theme="light"] #append.fm-page .fm-data-table thead th,
[data-theme="light"] #append.forensics-modern .fm-data-table thead th,
[data-theme="light"] .fm-data-table thead tr th,
[data-theme="light"] table.fm-data-table thead th {
    color: var(--theme-text-dark) !important;
    /* gray-900 - maximum contrast */
    background-color: var(--theme-bg-primary) !important;
    /* slate-100 */
    border-bottom: 1px solid var(--theme-border-solid) !important;
}

/* Light Theme: Table body text colors */
html[data-theme="light"] .fm-page.forensics-modern .fm-data-table td,
html[data-theme="light"] .fm-page .fm-data-table td,
html[data-theme="light"] .forensics-modern .fm-data-table td,
[data-theme="light"] .fm-page.forensics-modern .fm-data-table td,
[data-theme="light"] .fm-page .fm-data-table td,
[data-theme="light"] .forensics-modern .fm-data-table td,
[data-theme="light"] .fm-data-table tbody td,
[data-theme="light"] table.fm-data-table td {
    color: var(--theme-text-tertiary) !important;
    /* gray-700 */
}

/* Light Theme: Date/time cells */
html[data-theme="light"] .fm-datetime-date,
html[data-theme="light"] .fm-datetime-time,
[data-theme="light"] .fm-datetime-date,
[data-theme="light"] .fm-datetime-time {
    color: var(--theme-text-medium) !important;
    /* gray-600 */
}

/* Light Theme: Investigation name */
html[data-theme="light"] .fm-investigation-name-text,
[data-theme="light"] .fm-investigation-name-text {
    color: var(--theme-text-dark) !important;
    /* gray-900 */
}

/* Light Theme: Investigation description */
html[data-theme="light"] .fm-investigation-desc,
[data-theme="light"] .fm-investigation-desc {
    color: var(--theme-text-medium) !important;
    /* gray-500 */
}

/* Light Theme: ID cell */
html[data-theme="light"] .fm-id-cell,
[data-theme="light"] .fm-id-cell {
    color: var(--theme-text-tertiary) !important;
    /* gray-700 */
}

/* Light Theme: Pagination Footer */
html[data-theme="light"] .fm-data-table-footer,
[data-theme="light"] .fm-data-table-footer {
    background: var(--theme-bg-tertiary) !important;
    border-top: 1px solid var(--theme-border-color, var(--theme-border-solid)) !important;
}

html[data-theme="light"] .fm-pagination-info,
[data-theme="light"] .fm-pagination-info {
    color: var(--theme-text-tertiary) !important;
    /* gray-700 */
}

html[data-theme="light"] .fm-pagination-btn,
[data-theme="light"] .fm-pagination-btn {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-color, var(--theme-border-solid)) !important;
    color: var(--theme-text-tertiary) !important;
    /* gray-700 */
}

html[data-theme="light"] .fm-pagination-btn:hover:not(:disabled),
[data-theme="light"] .fm-pagination-btn:hover:not(:disabled) {
    background: var(--theme-table-row-hover) !important;
    border-color: var(--theme-accent-blue) !important;
    color: var(--theme-accent-blue) !important;
}

html[data-theme="light"] .fm-pagination-btn:disabled,
[data-theme="light"] .fm-pagination-btn:disabled {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-muted-decorative) !important;
    /* gray-400 */
}

/* Light Theme: Stronger pagination footer overrides with full path */
html[data-theme="light"] .fm-page .fm-data-table-footer,
html[data-theme="light"] .forensics-modern .fm-data-table-footer,
html[data-theme="light"] #append .fm-data-table-footer,
[data-theme="light"] .fm-page .fm-data-table-footer,
[data-theme="light"] .forensics-modern .fm-data-table-footer,
[data-theme="light"] #append .fm-data-table-footer {
    background: var(--theme-bg-primary) !important;
    /* slate-100 */
    border-top: 1px solid var(--theme-border-solid) !important;
}

html[data-theme="light"] .fm-page .fm-pagination-info,
html[data-theme="light"] .forensics-modern .fm-pagination-info,
html[data-theme="light"] #append .fm-pagination-info,
[data-theme="light"] .fm-page .fm-pagination-info,
[data-theme="light"] .forensics-modern .fm-pagination-info,
[data-theme="light"] #append .fm-pagination-info {
    color: var(--theme-text-tertiary) !important;
}

html[data-theme="light"] .fm-page .fm-pagination-btn,
html[data-theme="light"] .forensics-modern .fm-pagination-btn,
html[data-theme="light"] #append .fm-pagination-btn,
[data-theme="light"] .fm-page .fm-pagination-btn,
[data-theme="light"] .forensics-modern .fm-pagination-btn,
[data-theme="light"] #append .fm-pagination-btn {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-tertiary) !important;
}

html[data-theme="light"] .fm-page .fm-pagination-btn:hover:not(:disabled),
html[data-theme="light"] .forensics-modern .fm-pagination-btn:hover:not(:disabled),
html[data-theme="light"] #append .fm-pagination-btn:hover:not(:disabled),
[data-theme="light"] .fm-page .fm-pagination-btn:hover:not(:disabled),
[data-theme="light"] .forensics-modern .fm-pagination-btn:hover:not(:disabled),
[data-theme="light"] #append .fm-pagination-btn:hover:not(:disabled) {
    background: var(--theme-table-row-hover) !important;
    border-color: var(--theme-accent-blue) !important;
    color: var(--theme-accent-blue) !important;
}

/* =============================================================================
   LIGHT THEME: FORENSICS V3 DETAILS
   ============================================================================= */

html[data-theme="light"] .forensics-details,
[data-theme="light"] .forensics-details {
    color: var(--theme-text-primary);
}

html[data-theme="light"] .forensics-details>a,
[data-theme="light"] .forensics-details>a {
    color: var(--theme-text-muted-info) !important;
}

html[data-theme="light"] .forensics-details>a:hover,
[data-theme="light"] .forensics-details>a:hover {
    background-color: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-primary) !important;
}

html[data-theme="light"] .forensics-details tr th,
[data-theme="light"] .forensics-details tr th {
    color: var(--theme-text-muted-info) !important;
}

html[data-theme="light"] .forensics-details thead,
[data-theme="light"] .forensics-details thead {
    border-top: 1px solid var(--theme-border-solid) !important;
    background-color: var(--theme-bg-tertiary) !important;
}

html[data-theme="light"] .forensics-details .eventIdInput,
[data-theme="light"] .forensics-details .eventIdInput {
    border-color: var(--theme-border-solid);
    background-color: var(--theme-bg-secondary);
    color: var(--theme-text-primary);
}

html[data-theme="light"] .forensics-details .details-custom-btn,
[data-theme="light"] .forensics-details .details-custom-btn {
    background-color: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-muted-info) !important;
    box-shadow: var(--theme-shadow-sm) !important;
}

html[data-theme="light"] .forensics-details .details-custom-btn:hover,
[data-theme="light"] .forensics-details .details-custom-btn:hover {
    background-color: var(--theme-bg-tertiary) !important;
    border-color: var(--theme-accent-blue) !important;
    color: var(--theme-text-primary) !important;
}

html[data-theme="light"] .forensics-details .details-custom-btn i,
[data-theme="light"] .forensics-details .details-custom-btn i {
    color: var(--theme-text-muted) !important;
}

html[data-theme="light"] .forensics-details .details-custom-btn:hover i,
[data-theme="light"] .forensics-details .details-custom-btn:hover i {
    color: var(--theme-text-primary) !important;
}

html[data-theme="light"] .forensics-details .details-custom-btn.fm-action-primary,
[data-theme="light"] .forensics-details .details-custom-btn.fm-action-primary {
    background: var(--theme-accent-blue-bg) !important;
    border-color: var(--theme-border-accent) !important;
    color: var(--theme-accent-blue) !important;
}

html[data-theme="light"] .forensics-details .details-custom-btn.fm-action-primary:hover,
[data-theme="light"] .forensics-details .details-custom-btn.fm-action-primary:hover {
    background: var(--theme-accent-blue-glow) !important;
    border-color: var(--theme-accent-blue) !important;
}

html[data-theme="light"] .forensics-details .details-custom-btn.fm-action-primary i,
[data-theme="light"] .forensics-details .details-custom-btn.fm-action-primary i {
    color: var(--theme-accent-blue) !important;
}

html[data-theme="light"] .forensics-details .details-custom-btn.fm-action-danger,
[data-theme="light"] .forensics-details .details-custom-btn.fm-action-danger {
    background: var(--theme-danger-bg) !important;
    border-color: var(--theme-danger-glow) !important;
    color: var(--theme-danger) !important;
}

html[data-theme="light"] .forensics-details .details-custom-btn.fm-action-danger:hover,
[data-theme="light"] .forensics-details .details-custom-btn.fm-action-danger:hover {
    background: var(--theme-danger-glow) !important;
    border-color: var(--theme-danger) !important;
}

html[data-theme="light"] .forensics-details .details-custom-btn.fm-action-danger i,
[data-theme="light"] .forensics-details .details-custom-btn.fm-action-danger i {
    color: var(--theme-danger) !important;
}

html[data-theme="light"] .forensics-details .modal.dark .modal-content,
[data-theme="light"] .forensics-details .modal.dark .modal-content {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    box-shadow: var(--theme-shadow-xl);
}

html[data-theme="light"] .forensics-details .modal.dark .modal-header,
html[data-theme="light"] .forensics-details .modal.dark .modal-footer,
[data-theme="light"] .forensics-details .modal.dark .modal-header,
[data-theme="light"] .forensics-details .modal.dark .modal-footer {
    border-color: var(--theme-border-solid) !important;
}

html[data-theme="light"] .forensics-details .modal.dark .modal-title,
[data-theme="light"] .forensics-details .modal.dark .modal-title {
    color: var(--theme-text-primary) !important;
}

html[data-theme="light"] .forensics-details .modal.dark .close,
[data-theme="light"] .forensics-details .modal.dark .close {
    color: var(--theme-text-secondary) !important;
    opacity: 1;
}

html[data-theme="light"] .forensics-details .modal.dark .btn.btn-default,
[data-theme="light"] .forensics-details .modal.dark .btn.btn-default {
    background: var(--theme-bg-tertiary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-muted-info) !important;
}

html[data-theme="light"] .forensics-details .modal.dark .table thead th,
[data-theme="light"] .forensics-details .modal.dark .table thead th {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-muted-info) !important;
    border-bottom-color: var(--theme-border-solid) !important;
}

html[data-theme="light"] .forensics-details .modal.dark .table tbody td,
[data-theme="light"] .forensics-details .modal.dark .table tbody td {
    color: var(--theme-text-primary) !important;
    border-bottom-color: var(--theme-border-solid) !important;
}

html[data-theme="light"] .forensics-details .modal.dark input.dark,
html[data-theme="light"] .forensics-details .modal.dark textarea.dark,
html[data-theme="light"] .forensics-details .modal.dark select.dark,
[data-theme="light"] .forensics-details .modal.dark input.dark,
[data-theme="light"] .forensics-details .modal.dark textarea.dark,
[data-theme="light"] .forensics-details .modal.dark select.dark {
    background: var(--theme-bg-secondary) !important;
    color: var(--theme-text-primary) !important;
    border-color: var(--theme-border-solid) !important;
}

html[data-theme="light"] .forensics-details .modal.dark input.dark::placeholder,
html[data-theme="light"] .forensics-details .modal.dark textarea.dark::placeholder,
[data-theme="light"] .forensics-details .modal.dark input.dark::placeholder,
[data-theme="light"] .forensics-details .modal.dark textarea.dark::placeholder {
    color: var(--theme-text-muted);
}

/* Light Theme: Investigation details modals (Settings/Rescan) */
html[data-theme="light"] #detailsModal.modal.dark .modal-content,
html[data-theme="light"] #Rescan.modal.dark .modal-content,
[data-theme="light"] #detailsModal.modal.dark .modal-content,
[data-theme="light"] #Rescan.modal.dark .modal-content {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    box-shadow: var(--theme-shadow-xl);
}

html[data-theme="light"] #detailsModal .modal-body,
html[data-theme="light"] #Rescan .modal-body,
[data-theme="light"] #detailsModal .modal-body,
[data-theme="light"] #Rescan .modal-body {
    background: var(--theme-bg-secondary) !important;
    color: var(--theme-text-primary) !important;
}

html[data-theme="light"] #endpointsList.modal.dark .modal-content,
[data-theme="light"] #endpointsList.modal.dark .modal-content {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    box-shadow: var(--theme-shadow-xl);
}

html[data-theme="light"] #endpointsList.modal.dark .modal-header,
html[data-theme="light"] #endpointsList.modal.dark .modal-footer,
[data-theme="light"] #endpointsList.modal.dark .modal-header,
[data-theme="light"] #endpointsList.modal.dark .modal-footer {
    border-color: var(--theme-border-solid) !important;
}

html[data-theme="light"] #endpointsList.modal.dark .modal-title,
[data-theme="light"] #endpointsList.modal.dark .modal-title {
    color: var(--theme-text-primary) !important;
}

html[data-theme="light"] #endpointsList.modal.dark .close,
[data-theme="light"] #endpointsList.modal.dark .close {
    color: var(--theme-text-secondary) !important;
    opacity: 1;
}

html[data-theme="light"] #endpointsList .modal-body,
[data-theme="light"] #endpointsList .modal-body {
    background: var(--theme-bg-secondary) !important;
    color: var(--theme-text-primary) !important;
}

html[data-theme="light"] #endpointsList .table thead th,
[data-theme="light"] #endpointsList .table thead th {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-secondary) !important;
    border-bottom-color: var(--theme-border-solid) !important;
}

html[data-theme="light"] #endpointsList .table tbody td,
[data-theme="light"] #endpointsList .table tbody td {
    color: var(--theme-text-primary) !important;
    border-bottom-color: var(--theme-border-solid) !important;
}

html[data-theme="light"] #endpointsList .table tbody tr,
[data-theme="light"] #endpointsList .table tbody tr {
    background: var(--theme-bg-secondary) !important;
}

html[data-theme="light"] #endpointsList .table tbody tr:hover,
[data-theme="light"] #endpointsList .table tbody tr:hover {
    background: var(--theme-table-row-hover, rgba(59, 130, 246, 0.06)) !important;
}

html[data-theme="light"] #endpointsList .modal-footer .btn.btn-default[ng-click="onClickAddEndpoints()"],
[data-theme="light"] #endpointsList .modal-footer .btn.btn-default[ng-click="onClickAddEndpoints()"] {
    background-color: var(--theme-accent-blue) !important;
    border-color: var(--theme-accent-blue) !important;
    color: var(--theme-text-inverse) !important;
}

html[data-theme="light"] #endpointsList .modal-footer .btn.btn-default[ng-click="onClickAddEndpoints()"]:hover,
[data-theme="light"] #endpointsList .modal-footer .btn.btn-default[ng-click="onClickAddEndpoints()"]:hover {
    background-color: var(--theme-accent-blue-dark) !important;
    border-color: var(--theme-accent-blue-dark) !important;
    color: var(--theme-text-inverse) !important;
}

html[data-theme="light"] #endpointsList .modal-footer .btn.btn-default[ng-click="onClickAddEndpoints()"]:disabled,
[data-theme="light"] #endpointsList .modal-footer .btn.btn-default[ng-click="onClickAddEndpoints()"]:disabled {
    background-color: var(--theme-accent-blue-bg) !important;
    border-color: var(--theme-accent-blue-bg) !important;
    color: var(--theme-text-inverse) !important;
    opacity: 0.6;
}

html[data-theme="light"] #detailsModal.modal.dark .modal-header,
html[data-theme="light"] #detailsModal.modal.dark .modal-footer,
html[data-theme="light"] #Rescan.modal.dark .modal-header,
html[data-theme="light"] #Rescan.modal.dark .modal-footer,
[data-theme="light"] #detailsModal.modal.dark .modal-header,
[data-theme="light"] #detailsModal.modal.dark .modal-footer,
[data-theme="light"] #Rescan.modal.dark .modal-header,
[data-theme="light"] #Rescan.modal.dark .modal-footer {
    border-color: var(--theme-border-solid) !important;
}

html[data-theme="light"] #detailsModal.modal.dark .modal-title,
html[data-theme="light"] #Rescan.modal.dark .modal-title,
[data-theme="light"] #detailsModal.modal.dark .modal-title,
[data-theme="light"] #Rescan.modal.dark .modal-title {
    color: var(--theme-text-primary) !important;
}

html[data-theme="light"] #detailsModal.modal.dark .close,
html[data-theme="light"] #Rescan.modal.dark .close,
[data-theme="light"] #detailsModal.modal.dark .close,
[data-theme="light"] #Rescan.modal.dark .close {
    color: var(--theme-text-secondary) !important;
    opacity: 1;
}

html[data-theme="light"] #detailsModal.modal.dark .btn.btn-default,
html[data-theme="light"] #Rescan.modal.dark .btn.btn-default,
[data-theme="light"] #detailsModal.modal.dark .btn.btn-default,
[data-theme="light"] #Rescan.modal.dark .btn.btn-default {
    background: var(--theme-bg-tertiary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-muted-info) !important;
}

html[data-theme="light"] #detailsModal.modal.dark .table thead th,
html[data-theme="light"] #Rescan.modal.dark .table thead th,
[data-theme="light"] #detailsModal.modal.dark .table thead th,
[data-theme="light"] #Rescan.modal.dark .table thead th {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-muted-info) !important;
    border-bottom-color: var(--theme-border-solid) !important;
}

html[data-theme="light"] #detailsModal.modal.dark .table tbody td,
html[data-theme="light"] #Rescan.modal.dark .table tbody td,
[data-theme="light"] #detailsModal.modal.dark .table tbody td,
[data-theme="light"] #Rescan.modal.dark .table tbody td {
    color: var(--theme-text-primary) !important;
    border-bottom-color: var(--theme-border-solid) !important;
}

html[data-theme="light"] #detailsModal.modal.dark input.dark,
html[data-theme="light"] #detailsModal.modal.dark textarea.dark,
html[data-theme="light"] #detailsModal.modal.dark select.dark,
html[data-theme="light"] #Rescan.modal.dark input.dark,
html[data-theme="light"] #Rescan.modal.dark textarea.dark,
html[data-theme="light"] #Rescan.modal.dark select.dark,
[data-theme="light"] #detailsModal.modal.dark input.dark,
[data-theme="light"] #detailsModal.modal.dark textarea.dark,
[data-theme="light"] #detailsModal.modal.dark select.dark,
[data-theme="light"] #Rescan.modal.dark input.dark,
[data-theme="light"] #Rescan.modal.dark textarea.dark,
[data-theme="light"] #Rescan.modal.dark select.dark {
    background: var(--theme-bg-secondary) !important;
    color: var(--theme-text-primary) !important;
    border-color: var(--theme-border-solid) !important;
}

html[data-theme="light"] #detailsModal.modal.dark input.dark::placeholder,
html[data-theme="light"] #detailsModal.modal.dark textarea.dark::placeholder,
html[data-theme="light"] #Rescan.modal.dark input.dark::placeholder,
html[data-theme="light"] #Rescan.modal.dark textarea.dark::placeholder,
[data-theme="light"] #detailsModal.modal.dark input.dark::placeholder,
[data-theme="light"] #detailsModal.modal.dark textarea.dark::placeholder,
[data-theme="light"] #Rescan.modal.dark input.dark::placeholder,
[data-theme="light"] #Rescan.modal.dark textarea.dark::placeholder {
    color: var(--theme-text-muted);
}

html[data-theme="light"] #detailsModal .table.table-summery,
[data-theme="light"] #detailsModal .table.table-summery {
    background: transparent;
    border: none;
    border-radius: 0;
}

html[data-theme="light"] #detailsModal .table.table-summery>tbody>tr,
[data-theme="light"] #detailsModal .table.table-summery>tbody>tr {
    background: var(--theme-bg-primary);
}

html[data-theme="light"] #detailsModal .table.table-summery td,
[data-theme="light"] #detailsModal .table.table-summery td {
    padding: 8px 10px;
    border-bottom: none;
}

html[data-theme="light"] #detailsModal .table.table-summery>tbody>tr>td,
[data-theme="light"] #detailsModal .table.table-summery>tbody>tr>td {
    border-top: none !important;
}

html[data-theme="light"] #detailsModal .table.table-summery .control-label.btn,
[data-theme="light"] #detailsModal .table.table-summery .control-label.btn {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

html[data-theme="light"] #detailsModal .table.table-summery .forensicsInput.dark,
html[data-theme="light"] #detailsModal .table.table-summery .forensicsTexArea.dark,
html[data-theme="light"] #detailsModal .table.table-summery .forensicsSelect.dark,
[data-theme="light"] #detailsModal .table.table-summery .forensicsInput.dark,
[data-theme="light"] #detailsModal .table.table-summery .forensicsTexArea.dark,
[data-theme="light"] #detailsModal .table.table-summery .forensicsSelect.dark {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    color: var(--theme-text-primary) !important;
}

html[data-theme="light"] #detailsModal .mt-checkbox,
[data-theme="light"] #detailsModal .mt-checkbox {
    color: var(--theme-text-primary) !important;
}

html[data-theme="light"] .forensics-details .table.table-summery,
[data-theme="light"] .forensics-details .table.table-summery {
    background: transparent;
    border: none;
    border-radius: 0;
}

html[data-theme="light"] .forensics-details .table.table-summery>tbody>tr,
[data-theme="light"] .forensics-details .table.table-summery>tbody>tr {
    background: var(--theme-bg-primary);
}

html[data-theme="light"] .forensics-details .table.table-summery td,
[data-theme="light"] .forensics-details .table.table-summery td {
    padding: 8px 10px;
    border-bottom: none;
}

html[data-theme="light"] .forensics-details .table.table-summery>tbody>tr>td,
[data-theme="light"] .forensics-details .table.table-summery>tbody>tr>td {
    border-top: none !important;
}

html[data-theme="light"] .forensics-details .table.table-summery .control-label.btn,
[data-theme="light"] .forensics-details .table.table-summery .control-label.btn {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

html[data-theme="light"] .forensics-details .table.table-summery .forensicsInput.dark,
html[data-theme="light"] .forensics-details .table.table-summery .forensicsTexArea.dark,
html[data-theme="light"] .forensics-details .table.table-summery .forensicsSelect.dark,
[data-theme="light"] .forensics-details .table.table-summery .forensicsInput.dark,
[data-theme="light"] .forensics-details .table.table-summery .forensicsTexArea.dark,
[data-theme="light"] .forensics-details .table.table-summery .forensicsSelect.dark {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    color: var(--theme-text-primary) !important;
}

html[data-theme="light"] #detailsModal [style*="color: white"],
[data-theme="light"] #detailsModal [style*="color: white"] {
    color: var(--theme-text-primary) !important;
}

html[data-theme="light"] #Rescan .alert,
[data-theme="light"] #Rescan .alert {
    background-color: var(--theme-bg-secondary) !important;
    border-color: var(--theme-warning-light) !important;
    color: var(--theme-warning-dark) !important;
}

html[data-theme="light"] #Rescan .datepiker,
[data-theme="light"] #Rescan .datepiker {
    color: var(--theme-text-muted-info) !important;
}

html[data-theme="light"] #Rescan #date>.daterangepicker,
[data-theme="light"] #Rescan #date>.daterangepicker {
    background-color: var(--theme-bg-secondary);
    border-color: var(--theme-border-solid);
    color: var(--theme-text-primary);
}

html[data-theme="light"] #Rescan #ci-timezone,
[data-theme="light"] #Rescan #ci-timezone {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-primary) !important;
}

/* =============================================================================
   LIGHT THEME: Users Modal (#usersModal)
   ============================================================================= */
html[data-theme="light"] #usersModal.modal.dark .modal-content,
[data-theme="light"] #usersModal.modal.dark .modal-content {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    box-shadow: var(--theme-shadow-xl);
}

html[data-theme="light"] #usersModal.modal.dark .modal-header,
html[data-theme="light"] #usersModal.modal.dark .modal-footer,
[data-theme="light"] #usersModal.modal.dark .modal-header,
[data-theme="light"] #usersModal.modal.dark .modal-footer {
    background: var(--theme-bg-tertiary) !important;
    border-color: var(--theme-border-solid) !important;
}

html[data-theme="light"] #usersModal.modal.dark .modal-title,
[data-theme="light"] #usersModal.modal.dark .modal-title {
    color: var(--theme-text-primary) !important;
}

html[data-theme="light"] #usersModal.modal.dark .close,
[data-theme="light"] #usersModal.modal.dark .close {
    color: var(--theme-text-secondary) !important;
    opacity: 1;
}

html[data-theme="light"] #usersModal .modal-body,
[data-theme="light"] #usersModal .modal-body {
    background: var(--theme-bg-secondary) !important;
    color: var(--theme-text-primary) !important;
}

html[data-theme="light"] #usersModal .table thead th,
[data-theme="light"] #usersModal .table thead th {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-secondary) !important;
    border-bottom-color: var(--theme-border-solid) !important;
}

html[data-theme="light"] #usersModal .table tbody td,
[data-theme="light"] #usersModal .table tbody td {
    color: var(--theme-text-primary) !important;
    border-bottom-color: var(--theme-border-solid) !important;
}

html[data-theme="light"] #usersModal .table tbody tr,
[data-theme="light"] #usersModal .table tbody tr {
    background: var(--theme-bg-secondary) !important;
}

html[data-theme="light"] #usersModal .table tbody tr:hover,
[data-theme="light"] #usersModal .table tbody tr:hover {
    background: var(--theme-table-row-hover, rgba(59, 130, 246, 0.06)) !important;
}

/* Users Modal: forensics-entry status colors */
html[data-theme="light"] #usersModal .forensics-entry.Green,
[data-theme="light"] #usersModal .forensics-entry.Green {
    background: rgba(34, 197, 94, 0.08) !important;
    border-left: 3px solid var(--theme-success) !important;
}

html[data-theme="light"] #usersModal .forensics-entry.Red,
[data-theme="light"] #usersModal .forensics-entry.Red {
    background: rgba(239, 68, 68, 0.08) !important;
    border-left: 3px solid var(--theme-danger) !important;
}

/* Users Modal: Buttons */
html[data-theme="light"] #usersModal .btn.btn-default,
[data-theme="light"] #usersModal .btn.btn-default {
    background: var(--theme-bg-tertiary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-secondary) !important;
}

html[data-theme="light"] #usersModal .btn.btn-default:hover,
[data-theme="light"] #usersModal .btn.btn-default:hover {
    background: var(--theme-table-row-hover) !important;
    border-color: var(--theme-accent-blue) !important;
    color: var(--theme-accent-blue) !important;
}

html[data-theme="light"] #usersModal .btn.btn-default:disabled,
[data-theme="light"] #usersModal .btn.btn-default:disabled {
    background: var(--theme-bg-tertiary) !important;
    border-color: var(--theme-border-solid) !important;
    color: var(--theme-text-muted-decorative) !important;
    opacity: 0.6;
}

/* Users Modal: Pagination buttons - styled like btn-default (same as Close button) */
html[data-theme="light"] #usersModal .btn.btn-primary,
[data-theme="light"] #usersModal .btn.btn-primary {
    background: var(--theme-bg-tertiary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-secondary) !important;
}

html[data-theme="light"] #usersModal .btn.btn-primary:hover,
[data-theme="light"] #usersModal .btn.btn-primary:hover {
    background: var(--theme-table-row-hover) !important;
    border-color: var(--theme-accent-blue) !important;
    color: var(--theme-accent-blue) !important;
}

html[data-theme="light"] #usersModal .btn.btn-primary:disabled,
html[data-theme="light"] #usersModal .btn.btn-primary[disabled],
[data-theme="light"] #usersModal .btn.btn-primary:disabled,
[data-theme="light"] #usersModal .btn.btn-primary[disabled] {
    background: var(--theme-bg-tertiary) !important;
    border-color: var(--theme-border-solid) !important;
    color: var(--theme-text-muted-decorative) !important;
    opacity: 0.6;
}

/* Users Modal: Pagination */
html[data-theme="light"] #usersModal .forensicsDetailsPagination,
[data-theme="light"] #usersModal .forensicsDetailsPagination {
    background: transparent !important;
}

html[data-theme="light"] #usersModal .fixed-table-pagination,
[data-theme="light"] #usersModal .fixed-table-pagination {
    background: var(--theme-bg-secondary) !important;
    border-top: 1px solid var(--theme-border-solid) !important;
}

/* Users Modal: Text and strong elements */
html[data-theme="light"] #usersModal strong,
html[data-theme="light"] #usersModal .font-info,
[data-theme="light"] #usersModal strong,
[data-theme="light"] #usersModal .font-info {
    color: var(--theme-text-primary) !important;
}

/* Users Modal: Hunt Directive Light Theme - scoped to #usersModal only */
html[data-theme="light"] #usersModal .hunt-interface-container,
[data-theme="light"] #usersModal .hunt-interface-container {
    --hunt-bg-primary: var(--theme-bg-primary);
    --hunt-bg-secondary: var(--theme-bg-secondary);
    --hunt-bg-tertiary: var(--theme-bg-tertiary);
    --hunt-bg-card: var(--theme-bg-secondary);
    --hunt-bg-hover: var(--theme-table-row-hover);
    --hunt-text-primary: var(--theme-text-primary);
    --hunt-text-secondary: var(--theme-text-secondary);
    --hunt-text-muted: var(--theme-text-muted-info);
    --hunt-accent-primary: var(--theme-accent-blue);
    --hunt-border-color: var(--theme-border-solid);
    --hunt-border-hover: var(--theme-accent-blue);
}

html[data-theme="light"] #usersModal .hunt-search-section,
[data-theme="light"] #usersModal .hunt-search-section {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    box-shadow: var(--theme-shadow-sm) !important;
}

html[data-theme="light"] #usersModal .hunt-input-group,
[data-theme="light"] #usersModal .hunt-input-group {
    background: var(--theme-bg-secondary) !important;
    border: 2px solid var(--theme-border-solid) !important;
}

html[data-theme="light"] #usersModal .hunt-input-group:focus-within,
[data-theme="light"] #usersModal .hunt-input-group:focus-within {
    border-color: var(--theme-accent-blue) !important;
}

html[data-theme="light"] #usersModal .hunt-search-input,
[data-theme="light"] #usersModal .hunt-search-input {
    background: transparent !important;
    color: var(--theme-text-primary) !important;
}

html[data-theme="light"] #usersModal .hunt-search-input::placeholder,
[data-theme="light"] #usersModal .hunt-search-input::placeholder {
    color: var(--theme-text-muted-info) !important;
}

html[data-theme="light"] #usersModal .hunt-input-prefix,
[data-theme="light"] #usersModal .hunt-input-prefix {
    background: var(--theme-bg-tertiary) !important;
    border-right-color: var(--theme-border-solid) !important;
}

html[data-theme="light"] #usersModal .hunt-input-prefix select,
[data-theme="light"] #usersModal .hunt-input-prefix select {
    color: var(--theme-accent-blue) !important;
    background: transparent !important;
}

html[data-theme="light"] #usersModal .hunt-btn,
[data-theme="light"] #usersModal .hunt-btn {
    background: var(--theme-accent-blue) !important;
    border-color: var(--theme-accent-blue) !important;
    color: var(--theme-text-inverse) !important;
}

html[data-theme="light"] #usersModal .hunt-btn:hover,
[data-theme="light"] #usersModal .hunt-btn:hover {
    background: var(--theme-accent-blue-dark) !important;
    border-color: var(--theme-accent-blue-dark) !important;
}

html[data-theme="light"] #usersModal .hunt-action-btn,
html[data-theme="light"] #usersModal .hunt-input-action-btn,
[data-theme="light"] #usersModal .hunt-action-btn,
[data-theme="light"] #usersModal .hunt-input-action-btn {
    background: var(--theme-bg-tertiary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-secondary) !important;
}

html[data-theme="light"] #usersModal .hunt-action-btn:hover,
html[data-theme="light"] #usersModal .hunt-input-action-btn:hover,
[data-theme="light"] #usersModal .hunt-action-btn:hover,
[data-theme="light"] #usersModal .hunt-input-action-btn:hover {
    background: var(--theme-table-row-hover) !important;
    border-color: var(--theme-accent-blue) !important;
    color: var(--theme-accent-blue) !important;
}

html[data-theme="light"] #usersModal .hunt-date-picker .date-picker-button,
[data-theme="light"] #usersModal .hunt-date-picker .date-picker-button {
    color: var(--theme-accent-blue) !important;
}

html[data-theme="light"] #usersModal .hunt-mode-tabs,
[data-theme="light"] #usersModal .hunt-mode-tabs {
    background: var(--theme-bg-tertiary) !important;
}

html[data-theme="light"] #usersModal .hunt-mode-tab,
[data-theme="light"] #usersModal .hunt-mode-tab {
    color: var(--theme-text-secondary) !important;
}

html[data-theme="light"] #usersModal .hunt-mode-tab.active,
[data-theme="light"] #usersModal .hunt-mode-tab.active {
    background: var(--theme-accent-blue) !important;
    color: var(--theme-text-inverse) !important;
}

html[data-theme="light"] #usersModal .hunt-mode-tab:not(.active):hover,
[data-theme="light"] #usersModal .hunt-mode-tab:not(.active):hover {
    background: var(--theme-table-row-hover) !important;
    color: var(--theme-text-primary) !important;
}

html[data-theme="light"] #usersModal .hunt-dropdown-menu,
html[data-theme="light"] #usersModal .hunt-autocomplete-dropdown,
[data-theme="light"] #usersModal .hunt-dropdown-menu,
[data-theme="light"] #usersModal .hunt-autocomplete-dropdown {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

html[data-theme="light"] #usersModal .hunt-dropdown-menu li a,
html[data-theme="light"] #usersModal .hunt-autocomplete-item,
[data-theme="light"] #usersModal .hunt-dropdown-menu li a,
[data-theme="light"] #usersModal .hunt-autocomplete-item {
    color: var(--theme-text-primary) !important;
}

html[data-theme="light"] #usersModal .hunt-dropdown-menu li a:hover,
html[data-theme="light"] #usersModal .hunt-autocomplete-item:hover,
[data-theme="light"] #usersModal .hunt-dropdown-menu li a:hover,
[data-theme="light"] #usersModal .hunt-autocomplete-item:hover {
    background: var(--theme-table-row-hover) !important;
    color: var(--theme-accent-blue) !important;
}

html[data-theme="light"] .forensics-details.processTab tr[ng-show="process.expanded"],
html[data-theme="light"] .forensics-details .processTab tr[ng-show="process.expanded"],
[data-theme="light"] .forensics-details.processTab tr[ng-show="process.expanded"],
[data-theme="light"] .forensics-details .processTab tr[ng-show="process.expanded"] {
    background: var(--theme-table-row-hover) !important;
}

/* =============================================================================
   LIGHT THEME: FORENSICS V3 CREATE WIZARD
   ============================================================================= */

[data-theme="light"] .forensics-wizard,
html[data-theme="light"] .forensics-wizard {
    --primary-bg: var(--theme-bg-primary);
    --secondary-bg: var(--theme-bg-secondary);
    --panel-bg: var(--theme-bg-tertiary);
    --highlight: var(--theme-accent-blue);
    --title-green: var(--theme-accent-blue-dark);
    --selection-blue: var(--theme-accent-blue);
    --selection-blue-darker: var(--theme-accent-blue-dark);
    --selection-blue-rgba: var(--theme-accent-blue-glow);
    --accent-color-blue: var(--theme-accent-blue);
    --accent-color-blue-darker: var(--theme-accent-blue-dark);
    --accent-color-blue-rgba: var(--theme-accent-blue-glow);
    --warning: var(--theme-warning);
    --danger: var(--theme-danger);
    --healthy: var(--theme-success);
    --at-risk: var(--theme-warning);
    --high-risk: var(--theme-danger);
    --text-color: var(--theme-text-primary);
    --muted-text: var(--theme-text-secondary);
    --border-color: var(--theme-border-solid);
    background: var(--theme-bg-primary);
}

[data-theme="light"] .forensics-wizard .main-card,
html[data-theme="light"] .forensics-wizard .main-card {
    background-color: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border-solid);
    box-shadow: var(--theme-shadow-md);
}

[data-theme="light"] .forensics-wizard .card-title,
html[data-theme="light"] .forensics-wizard .card-title {
    color: var(--theme-accent-blue-dark);
}

[data-theme="light"] .forensics-wizard .col-1,
html[data-theme="light"] .forensics-wizard .col-1 {
    color: var(--theme-text-muted);
}

[data-theme="light"] .forensics-wizard .col-2,
html[data-theme="light"] .forensics-wizard .col-2 {
    color: var(--theme-text-muted-info);
}

[data-theme="light"] .forensics-wizard .control-label>.col-2,
[data-theme="light"] .forensics-wizard .control-label>.col-6,
html[data-theme="light"] .forensics-wizard .control-label>.col-2,
html[data-theme="light"] .forensics-wizard .control-label>.col-6 {
    color: var(--theme-text-muted-info);
}

[data-theme="light"] .forensics-wizard input.dark,
[data-theme="light"] .forensics-wizard textarea.dark,
[data-theme="light"] .forensics-wizard select.dark,
html[data-theme="light"] .forensics-wizard input.dark,
html[data-theme="light"] .forensics-wizard textarea.dark,
html[data-theme="light"] .forensics-wizard select.dark {
    background: var(--theme-bg-secondary) !important;
    color: var(--theme-text-primary) !important;
    border-color: var(--theme-border-solid) !important;
}

[data-theme="light"] .forensics-wizard input.dark::placeholder,
[data-theme="light"] .forensics-wizard textarea.dark::placeholder,
html[data-theme="light"] .forensics-wizard input.dark::placeholder,
html[data-theme="light"] .forensics-wizard textarea.dark::placeholder {
    color: var(--theme-text-muted);
}

[data-theme="light"] .forensics-wizard input.dark:focus,
[data-theme="light"] .forensics-wizard textarea.dark:focus,
[data-theme="light"] .forensics-wizard select.dark:focus,
html[data-theme="light"] .forensics-wizard input.dark:focus,
html[data-theme="light"] .forensics-wizard textarea.dark:focus,
html[data-theme="light"] .forensics-wizard select.dark:focus {
    border-color: var(--theme-accent-blue) !important;
    box-shadow: 0 0 0 3px var(--theme-accent-blue-bg);
}

[data-theme="light"] .forensics-wizard .forensicsInput.dark,
[data-theme="light"] .forensics-wizard .forensicsTexArea.dark,
html[data-theme="light"] .forensics-wizard .forensicsInput.dark,
html[data-theme="light"] .forensics-wizard .forensicsTexArea.dark {
    background: var(--theme-bg-secondary);
    color: var(--theme-text-primary);
    border: 1px solid var(--theme-border-solid);
    border-radius: 6px;
    padding: 6px 12px;
}

[data-theme="light"] .forensics-wizard #ci-timezone,
html[data-theme="light"] .forensics-wizard #ci-timezone {
    background: var(--theme-bg-secondary);
    color: var(--theme-text-primary);
    border: 1px solid var(--theme-border-solid);
    border-radius: 6px;
    padding: 6px 10px;
}

[data-theme="light"] .forensics-wizard .btn.btn-primary,
[data-theme="light"] .forensics-wizard .btn-primary,
html[data-theme="light"] .forensics-wizard .btn.btn-primary,
html[data-theme="light"] .forensics-wizard .btn-primary {
    background: linear-gradient(145deg, var(--theme-accent-blue) 0%, var(--theme-accent-blue-dark) 100%) !important;
    border-color: var(--theme-accent-blue-dark) !important;
    color: var(--theme-text-inverse) !important;
    box-shadow: 0 4px 12px var(--theme-accent-blue-glow);
}

[data-theme="light"] .forensics-wizard .btn.btn-primary:hover,
[data-theme="light"] .forensics-wizard .btn-primary:hover,
html[data-theme="light"] .forensics-wizard .btn.btn-primary:hover,
html[data-theme="light"] .forensics-wizard .btn-primary:hover {
    background: linear-gradient(145deg, var(--theme-accent-blue-dark) 0%, var(--theme-accent-blue-darker) 100%) !important;
    border-color: var(--theme-accent-blue-darker) !important;
    box-shadow: 0 6px 16px var(--theme-accent-blue-glow);
}

[data-theme="light"] .forensics-wizard .btn-1.green,
html[data-theme="light"] .forensics-wizard .btn-1.green {
    background: linear-gradient(145deg, var(--theme-success) 0%, var(--theme-success-dark) 100%) !important;
    border-color: var(--theme-success-dark) !important;
    color: var(--theme-text-inverse) !important;
}

[data-theme="light"] .forensics-wizard .btn-1.green[disabled],
html[data-theme="light"] .forensics-wizard .btn-1.green[disabled] {
    background: var(--theme-border-solid) !important;
    border-color: var(--theme-border-solid) !important;
    color: var(--theme-text-muted) !important;
}

[data-theme="light"] .forensics-wizard .btn-bar,
html[data-theme="light"] .forensics-wizard .btn-bar {
    background: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border-solid);
    color: var(--theme-text-muted-info);
}

[data-theme="light"] .forensics-wizard .btn-bar.active,
html[data-theme="light"] .forensics-wizard .btn-bar.active {
    background: var(--theme-accent-blue-bg);
    border-color: var(--theme-accent-blue);
    color: var(--theme-accent-blue-dark);
}

[data-theme="light"] .forensics-wizard .btn-bar:hover,
html[data-theme="light"] .forensics-wizard .btn-bar:hover {
    background: var(--theme-table-row-hover);
    border-color: var(--theme-accent-blue);
    color: var(--theme-text-primary);
}

[data-theme="light"] .forensics-wizard .dropdown-toggle,
html[data-theme="light"] .forensics-wizard .dropdown-toggle {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-primary) !important;
}

[data-theme="light"] .forensics-wizard .btn.btn-primary.dropdown-toggle,
html[data-theme="light"] .forensics-wizard .btn.btn-primary.dropdown-toggle {
    background: linear-gradient(145deg, var(--theme-accent-blue) 0%, var(--theme-accent-blue-dark) 100%) !important;
    border-color: var(--theme-accent-blue-dark) !important;
    color: var(--theme-text-inverse) !important;
}

[data-theme="light"] .forensics-wizard .dropdown-menu,
html[data-theme="light"] .forensics-wizard .dropdown-menu {
    background: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border-solid);
    box-shadow: var(--theme-shadow-lg);
}

[data-theme="light"] .forensics-wizard .dropdown-menu>li>a,
html[data-theme="light"] .forensics-wizard .dropdown-menu>li>a {
    color: var(--theme-text-muted-info) !important;
}

[data-theme="light"] .forensics-wizard .dropdown-menu>li>a:hover,
html[data-theme="light"] .forensics-wizard .dropdown-menu>li>a:hover {
    background: var(--theme-table-row-hover);
    color: var(--theme-text-primary) !important;
}

[data-theme="light"] .forensics-wizard .dropdown-menu>li.active>a,
html[data-theme="light"] .forensics-wizard .dropdown-menu>li.active>a {
    background: var(--theme-accent-blue);
    color: var(--theme-text-inverse) !important;
}

[data-theme="light"] .forensics-wizard .mt-checkbox.mt-checkbox-outline,
html[data-theme="light"] .forensics-wizard .mt-checkbox.mt-checkbox-outline {
    color: var(--theme-text-muted-info);
}

[data-theme="light"] .forensics-wizard .mt-checkbox>span,
html[data-theme="light"] .forensics-wizard .mt-checkbox>span {
    border-color: var(--theme-border-muted);
    background: var(--theme-bg-secondary);
}

[data-theme="light"] .forensics-wizard .mt-checkbox>input:checked~span,
html[data-theme="light"] .forensics-wizard .mt-checkbox>input:checked~span {
    background: var(--theme-accent-blue-bg) !important;
    border-color: var(--theme-accent-blue) !important;
}

[data-theme="light"] .forensics-wizard .mt-checkbox>input:checked~span:after,
html[data-theme="light"] .forensics-wizard .mt-checkbox>input:checked~span:after {
    border-color: var(--theme-accent-blue-dark) !important;
}

[data-theme="light"] .forensics-wizard .mt-checkbox.mt-checkbox-outline>input:checked~span,
html[data-theme="light"] .forensics-wizard .mt-checkbox.mt-checkbox-outline>input:checked~span {
    background: var(--theme-accent-blue-bg) !important;
    border-color: var(--theme-accent-blue) !important;
}

[data-theme="light"] .forensics-wizard .mt-checkbox.mt-checkbox-outline>input:checked~span:after,
html[data-theme="light"] .forensics-wizard .mt-checkbox.mt-checkbox-outline>input:checked~span:after {
    border-color: var(--theme-accent-blue-dark) !important;
}

[data-theme="light"] .forensics-wizard .create-step .jstree-default.jstree-checkbox-selection .jstree-clicked,
html[data-theme="light"] .forensics-wizard .create-step .jstree-default.jstree-checkbox-selection .jstree-clicked {
    background-color: var(--theme-accent-blue);
    box-shadow: inset 0 0 1px var(--theme-bg-subtle-strong);
}

[data-theme="light"] .forensics-wizard .create-step .jstree-default.jstree-checkbox-selection .jstree-unclicked,
html[data-theme="light"] .forensics-wizard .create-step .jstree-default.jstree-checkbox-selection .jstree-unclicked {
    background-color: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border-muted);
    box-shadow: inset 0 0 1px var(--theme-bg-subtle-strong);
}

[data-theme="light"] .forensics-wizard .create-step .jstree-default.jstree-checkbox-selection .jstree-undetermined,
html[data-theme="light"] .forensics-wizard .create-step .jstree-default.jstree-checkbox-selection .jstree-undetermined {
    background-color: var(--theme-accent-blue-glow);
    border: 1px solid var(--theme-accent-blue-light);
    box-shadow: inset 0 0 1px var(--theme-bg-subtle-strong);
}

[data-theme="light"] .forensics-wizard .undetermined-checkbox>span,
html[data-theme="light"] .forensics-wizard .undetermined-checkbox>span {
    background-color: var(--theme-border-muted) !important;
    box-shadow: inset 0 0 1px var(--theme-bg-subtle-strong);
}

[data-theme="light"] .forensics-wizard .create-step .cm-s-default,
html[data-theme="light"] .forensics-wizard .create-step .cm-s-default {
    background-color: var(--theme-bg-secondary);
    color: var(--theme-text-primary);
    border-color: var(--theme-border-solid);
}

[data-theme="light"] .forensics-wizard .create-step .CodeMirror-placeholder,
html[data-theme="light"] .forensics-wizard .create-step .CodeMirror-placeholder {
    color: var(--theme-text-muted) !important;
}

[data-theme="light"] .forensics-wizard #endpoints-step .data-table thead th,
html[data-theme="light"] .forensics-wizard #endpoints-step .data-table thead th {
    background-color: var(--theme-bg-tertiary);
    color: var(--theme-text-muted-info);
}

[data-theme="light"] .forensics-wizard #endpoints-step .data-table thead tr.filter-row th,
html[data-theme="light"] .forensics-wizard #endpoints-step .data-table thead tr.filter-row th {
    background-color: var(--theme-bg-secondary);
}

[data-theme="light"] .forensics-wizard #endpoints-step .data-table tbody tr:hover,
html[data-theme="light"] .forensics-wizard #endpoints-step .data-table tbody tr:hover {
    background-color: var(--theme-table-row-hover);
}

[data-theme="light"] .forensics-wizard #endpoints-step .th-filter-input,
[data-theme="light"] .forensics-wizard #endpoints-step .th-filter-select,
html[data-theme="light"] .forensics-wizard #endpoints-step .th-filter-input,
html[data-theme="light"] .forensics-wizard #endpoints-step .th-filter-select {
    background-color: var(--theme-bg-secondary);
    border-color: var(--theme-border-solid);
    color: var(--theme-text-primary);
}

[data-theme="light"] .forensics-wizard #endpoints-step .th-filter-select option,
html[data-theme="light"] .forensics-wizard #endpoints-step .th-filter-select option {
    background-color: var(--theme-bg-secondary);
    color: var(--theme-text-primary);
}

[data-theme="light"] .forensics-wizard .modal,
html[data-theme="light"] .forensics-wizard .modal {
    background-color: var(--theme-bg-overlay);
}

[data-theme="light"] #wizard,
html[data-theme="light"] #wizard {
    background: transparent;
}

[data-theme="light"] #wizard .mt-step-number,
html[data-theme="light"] #wizard .mt-step-number {
    background: var(--theme-border-solid) !important;
    color: var(--theme-text-secondary) !important;
    border: 1px solid var(--theme-border-muted);
}

[data-theme="light"] #wizard .mt-step-title,
html[data-theme="light"] #wizard .mt-step-title {
    color: var(--theme-text-muted) !important;
}

[data-theme="light"] #wizard .mt-step-col.active,
html[data-theme="light"] #wizard .mt-step-col.active {
    background-color: transparent;
}

[data-theme="light"] #wizard .mt-step-col.active .mt-step-number,
html[data-theme="light"] #wizard .mt-step-col.active .mt-step-number {
    background: var(--theme-accent-blue) !important;
    color: var(--theme-text-inverse) !important;
    border-color: var(--theme-accent-blue-dark);
}

[data-theme="light"] #wizard .mt-step-col.active .mt-step-title,
html[data-theme="light"] #wizard .mt-step-col.active .mt-step-title {
    color: var(--theme-text-primary) !important;
}

[data-theme="light"] #wizard .mt-step-col.done .mt-step-number,
html[data-theme="light"] #wizard .mt-step-col.done .mt-step-number {
    background: var(--theme-success) !important;
    color: var(--theme-text-inverse) !important;
    border-color: var(--theme-success-dark);
}

[data-theme="light"] #wizard .mt-step-col.done .mt-step-title,
html[data-theme="light"] #wizard .mt-step-col.done .mt-step-title {
    color: var(--theme-success-dark) !important;
}

[data-theme="light"] #wizard .mt-step-col.active:hover,
html[data-theme="light"] #wizard .mt-step-col.active:hover {
    background-color: transparent;
}

[data-theme="light"] #wizard.mt-element-step .step-line .mt-step-title:before,
[data-theme="light"] #wizard.mt-element-step .step-line .mt-step-title:after,
html[data-theme="light"] #wizard.mt-element-step .step-line .mt-step-title:before,
html[data-theme="light"] #wizard.mt-element-step .step-line .mt-step-title:after {
    background: var(--theme-border-solid);
}

[data-theme="light"] #wizard.mt-element-step .step-line .active .mt-step-title:before,
[data-theme="light"] #wizard.mt-element-step .step-line .active .mt-step-title:after,
html[data-theme="light"] #wizard.mt-element-step .step-line .active .mt-step-title:before,
html[data-theme="light"] #wizard.mt-element-step .step-line .active .mt-step-title:after {
    background: var(--theme-accent-blue);
}

[data-theme="light"] #wizard.mt-element-step .step-line .done .mt-step-title:before,
[data-theme="light"] #wizard.mt-element-step .step-line .done .mt-step-title:after,
html[data-theme="light"] #wizard.mt-element-step .step-line .done .mt-step-title:before,
html[data-theme="light"] #wizard.mt-element-step .step-line .done .mt-step-title:after {
    background: var(--theme-success);
}

[data-theme="light"] .forensics-wizard .datepiker,
html[data-theme="light"] .forensics-wizard .datepiker {
    color: var(--theme-text-primary) !important;
}

[data-theme="light"] .forensics-wizard .fa-pencil,
html[data-theme="light"] .forensics-wizard .fa-pencil {
    color: var(--theme-accent-blue-dark) !important;
}

[data-theme="light"] .forensics-wizard .mt-checkbox-list span[style*="color: white"],
html[data-theme="light"] .forensics-wizard .mt-checkbox-list span[style*="color: white"] {
    color: var(--theme-text-primary) !important;
}

[data-theme="light"] .forensics-wizard p[style*="color: white"],
html[data-theme="light"] .forensics-wizard p[style*="color: white"] {
    color: var(--theme-text-primary) !important;
}

[data-theme="light"] .forensics-wizard .fa-search,
html[data-theme="light"] .forensics-wizard .fa-search {
    color: var(--theme-text-muted) !important;
}

[data-theme="light"] .forensics-wizard [style*="color: #bec0c2"],
html[data-theme="light"] .forensics-wizard [style*="color: #bec0c2"] {
    color: var(--theme-text-muted-info) !important;
}

[data-theme="light"] .forensics-wizard .portlet-body,
html[data-theme="light"] .forensics-wizard .portlet-body {
    background: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border-solid);
    border-radius: 8px;
    padding: 16px;
}

[data-theme="light"] .forensics-wizard .create-step .mt-checkbox,
[data-theme="light"] .forensics-wizard .create-step .mt-checkbox.mt-checkbox-outline,
html[data-theme="light"] .forensics-wizard .create-step .mt-checkbox,
html[data-theme="light"] .forensics-wizard .create-step .mt-checkbox.mt-checkbox-outline {
    color: var(--theme-text-muted-info) !important;
}

[data-theme="light"] .forensics-wizard .create-step .mt-checkbox-list,
html[data-theme="light"] .forensics-wizard .create-step .mt-checkbox-list {
    color: var(--theme-text-muted-info);
}

[data-theme="light"] .forensics-wizard .tree-demo,
html[data-theme="light"] .forensics-wizard .tree-demo {
    background: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border-solid);
    border-radius: 8px;
    padding: 8px 10px;
}

[data-theme="light"] .forensics-wizard .tree-demo a,
html[data-theme="light"] .forensics-wizard .tree-demo a {
    color: var(--theme-text-muted-info) !important;
}

[data-theme="light"] .forensics-wizard .tree-demo a.red,
html[data-theme="light"] .forensics-wizard .tree-demo a.red {
    color: var(--theme-danger) !important;
}

[data-theme="light"] .artifacts-options-scroll::-webkit-scrollbar-track,
html[data-theme="light"] .artifacts-options-scroll::-webkit-scrollbar-track {
    background: var(--theme-bg-tertiary, #f8fafc);
}

[data-theme="light"] .artifacts-options-scroll::-webkit-scrollbar-thumb,
html[data-theme="light"] .artifacts-options-scroll::-webkit-scrollbar-thumb {
    background: var(--theme-border-color, rgba(226, 232, 240, 0.8));
}

[data-theme="light"] .artifacts-options-scroll::-webkit-scrollbar-thumb:hover,
html[data-theme="light"] .artifacts-options-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--theme-border-solid, rgba(203, 213, 225, 1));
}

[data-theme="light"] .forensics-wizard #malware-table thead th,
html[data-theme="light"] .forensics-wizard #malware-table thead th {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-muted-info) !important;
    border-bottom-color: var(--theme-border-solid) !important;
}

[data-theme="light"] .forensics-wizard #malware-table thead,
html[data-theme="light"] .forensics-wizard #malware-table thead {
    background: var(--theme-bg-tertiary) !important;
}

[data-theme="light"] .forensics-wizard #malware-table tbody tr:hover,
html[data-theme="light"] .forensics-wizard #malware-table tbody tr:hover {
    background: var(--theme-table-row-hover);
}

[data-theme="light"] .forensics-wizard #malware-table tbody td,
html[data-theme="light"] .forensics-wizard #malware-table tbody td {
    color: var(--theme-text-primary) !important;
    border-bottom-color: var(--theme-border-solid) !important;
}

[data-theme="light"] .forensics-wizard #malware-table2,
html[data-theme="light"] .forensics-wizard #malware-table2 {
    background: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border-solid);
    border-radius: 8px;
}

[data-theme="light"] .forensics-wizard #malware-table2.table-summery,
html[data-theme="light"] .forensics-wizard #malware-table2.table-summery {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

[data-theme="light"] .forensics-wizard #malware-table2 thead th,
html[data-theme="light"] .forensics-wizard #malware-table2 thead th {
    background: var(--theme-bg-tertiary);
    color: var(--theme-text-muted-info);
    border-bottom-color: var(--theme-border-solid);
}

[data-theme="light"] .forensics-wizard #malware-table2 tbody td,
html[data-theme="light"] .forensics-wizard #malware-table2 tbody td {
    color: var(--theme-text-primary);
    border-bottom-color: var(--theme-border-solid);
}

[data-theme="light"] .forensics-wizard .table.table-summery,
html[data-theme="light"] .forensics-wizard .table.table-summery {
    background: transparent;
    border: none;
    border-radius: 0;
}

[data-theme="light"] .forensics-wizard .table.table-summery>tbody>tr,
html[data-theme="light"] .forensics-wizard .table.table-summery>tbody>tr {
    background: var(--theme-bg-primary);
}

[data-theme="light"] .forensics-wizard .table.table-summery td,
html[data-theme="light"] .forensics-wizard .table.table-summery td {
    padding: 8px 10px;
    border-bottom: none;
}

[data-theme="light"] .forensics-wizard .table.table-summery>tbody>tr>td,
html[data-theme="light"] .forensics-wizard .table.table-summery>tbody>tr>td {
    border-top: none !important;
}

[data-theme="light"] .forensics-wizard .table.table-summery tr:last-child td,
html[data-theme="light"] .forensics-wizard .table.table-summery tr:last-child td {
    border-bottom: none;
}

[data-theme="light"] .forensics-wizard .table.table-summery .control-label.btn,
html[data-theme="light"] .forensics-wizard .table.table-summery .control-label.btn {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

[data-theme="light"] .forensics-wizard .table.table-summery .forensicsInput.dark,
[data-theme="light"] .forensics-wizard .table.table-summery .forensicsTexArea.dark,
[data-theme="light"] .forensics-wizard .table.table-summery .forensicsSelect.dark,
html[data-theme="light"] .forensics-wizard .table.table-summery .forensicsInput.dark,
html[data-theme="light"] .forensics-wizard .table.table-summery .forensicsTexArea.dark,
html[data-theme="light"] .forensics-wizard .table.table-summery .forensicsSelect.dark {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    color: var(--theme-text-primary) !important;
}

[data-theme="light"] #events.modal.dark .modal-content,
[data-theme="light"] #createProfile.modal.dark .modal-content,
[data-theme="light"] #updateProfile.modal.dark .modal-content,
html[data-theme="light"] #events.modal.dark .modal-content,
html[data-theme="light"] #createProfile.modal.dark .modal-content,
html[data-theme="light"] #updateProfile.modal.dark .modal-content {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    box-shadow: var(--theme-shadow-xl);
}

[data-theme="light"] #events.modal.dark .modal-header,
[data-theme="light"] #events.modal.dark .modal-footer,
[data-theme="light"] #createProfile.modal.dark .modal-header,
[data-theme="light"] #createProfile.modal.dark .modal-footer,
[data-theme="light"] #updateProfile.modal.dark .modal-header,
[data-theme="light"] #updateProfile.modal.dark .modal-footer,
html[data-theme="light"] #events.modal.dark .modal-header,
html[data-theme="light"] #events.modal.dark .modal-footer,
html[data-theme="light"] #createProfile.modal.dark .modal-header,
html[data-theme="light"] #createProfile.modal.dark .modal-footer,
html[data-theme="light"] #updateProfile.modal.dark .modal-header,
html[data-theme="light"] #updateProfile.modal.dark .modal-footer {
    border-color: var(--theme-border-solid) !important;
}

[data-theme="light"] #events.modal.dark .modal-title,
[data-theme="light"] #createProfile.modal.dark .modal-title,
[data-theme="light"] #updateProfile.modal.dark .modal-title,
html[data-theme="light"] #events.modal.dark .modal-title,
html[data-theme="light"] #createProfile.modal.dark .modal-title,
html[data-theme="light"] #updateProfile.modal.dark .modal-title {
    color: var(--theme-text-primary) !important;
}

[data-theme="light"] #events.modal.dark .close,
[data-theme="light"] #createProfile.modal.dark .close,
[data-theme="light"] #updateProfile.modal.dark .close,
html[data-theme="light"] #events.modal.dark .close,
html[data-theme="light"] #createProfile.modal.dark .close,
html[data-theme="light"] #updateProfile.modal.dark .close {
    color: var(--theme-text-secondary) !important;
    opacity: 1;
}

[data-theme="light"] #events.modal.dark .btn.btn-default,
[data-theme="light"] #createProfile.modal.dark .btn.btn-default,
[data-theme="light"] #updateProfile.modal.dark .btn.btn-default,
html[data-theme="light"] #events.modal.dark .btn.btn-default,
html[data-theme="light"] #createProfile.modal.dark .btn.btn-default,
html[data-theme="light"] #updateProfile.modal.dark .btn.btn-default {
    background: var(--theme-bg-tertiary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-muted-info) !important;
}

[data-theme="light"] #events.modal.dark .table thead th,
html[data-theme="light"] #events.modal.dark .table thead th {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-muted-info) !important;
    border-bottom-color: var(--theme-border-solid) !important;
}

[data-theme="light"] #events.modal.dark input.dark,
[data-theme="light"] #events.modal.dark textarea.dark,
[data-theme="light"] #createProfile.modal.dark input.dark,
[data-theme="light"] #createProfile.modal.dark textarea.dark,
[data-theme="light"] #updateProfile.modal.dark input.dark,
[data-theme="light"] #updateProfile.modal.dark textarea.dark,
html[data-theme="light"] #events.modal.dark input.dark,
html[data-theme="light"] #events.modal.dark textarea.dark,
html[data-theme="light"] #createProfile.modal.dark input.dark,
html[data-theme="light"] #createProfile.modal.dark textarea.dark,
html[data-theme="light"] #updateProfile.modal.dark input.dark,
html[data-theme="light"] #updateProfile.modal.dark textarea.dark {
    background: var(--theme-bg-secondary) !important;
    color: var(--theme-text-primary) !important;
    border-color: var(--theme-border-solid) !important;
}

[data-theme="light"] #events.modal.dark input.dark::placeholder,
[data-theme="light"] #events.modal.dark textarea.dark::placeholder,
[data-theme="light"] #createProfile.modal.dark input.dark::placeholder,
[data-theme="light"] #createProfile.modal.dark textarea.dark::placeholder,
[data-theme="light"] #updateProfile.modal.dark input.dark::placeholder,
[data-theme="light"] #updateProfile.modal.dark textarea.dark::placeholder,
html[data-theme="light"] #events.modal.dark input.dark::placeholder,
html[data-theme="light"] #events.modal.dark textarea.dark::placeholder,
html[data-theme="light"] #createProfile.modal.dark input.dark::placeholder,
html[data-theme="light"] #createProfile.modal.dark textarea.dark::placeholder,
html[data-theme="light"] #updateProfile.modal.dark input.dark::placeholder,
html[data-theme="light"] #updateProfile.modal.dark textarea.dark::placeholder {
    color: var(--theme-text-muted) !important;
}

/* =============================================================================
   FORENSICS DETAILS - LIGHT THEME OVERRIDES
   ============================================================================= */

/* Light Theme: Scan Summary Stat Cards */
[data-theme="light"] .fm-stat-card,
html[data-theme="light"] .fm-stat-card {
    background: linear-gradient(145deg, var(--theme-bg-secondary) 0%, var(--theme-bg-tertiary) 100%) !important;
    border: 1px solid var(--theme-border-solid) !important;
    box-shadow: var(--theme-shadow-sm) !important;
}

[data-theme="light"] .fm-stat-card:hover,
html[data-theme="light"] .fm-stat-card:hover {
    box-shadow: var(--theme-shadow-md), 0 0 0 1px var(--stat-color) !important;
}

[data-theme="light"] .fm-stat-value,
html[data-theme="light"] .fm-stat-value {
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-stat-label,
html[data-theme="light"] .fm-stat-label {
    color: var(--theme-text-medium) !important;
}

[data-theme="light"] .fm-stat-icon,
html[data-theme="light"] .fm-stat-icon {
    color: var(--stat-color, var(--theme-text-medium)) !important;
    opacity: 0.8 !important;
}

/* Light Theme: Endpoints Section */
[data-theme="light"] .fm-endpoints-section,
html[data-theme="light"] .fm-endpoints-section {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-endpoint-card,
html[data-theme="light"] .fm-endpoint-card {
    background: linear-gradient(145deg, var(--theme-bg-secondary) 0%, var(--theme-bg-tertiary) 100%) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-endpoint-card:hover,
html[data-theme="light"] .fm-endpoint-card:hover {
    border-color: var(--theme-accent-blue) !important;
    box-shadow: 0 4px 16px var(--theme-accent-blue-bg) !important;
}

[data-theme="light"] .fm-endpoint-name,
html[data-theme="light"] .fm-endpoint-name {
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-endpoint-meta,
[data-theme="light"] .fm-endpoint-meta-item,
html[data-theme="light"] .fm-endpoint-meta,
html[data-theme="light"] .fm-endpoint-meta-item {
    color: var(--theme-text-medium) !important;
}

[data-theme="light"] .fm-carousel-arrow,
html[data-theme="light"] .fm-carousel-arrow {
    background: var(--theme-bg-primary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-medium) !important;
}

[data-theme="light"] .fm-carousel-arrow:hover:not(:disabled),
html[data-theme="light"] .fm-carousel-arrow:hover:not(:disabled) {
    background: var(--theme-border-solid) !important;
    color: var(--theme-text-dark) !important;
}

/* Light Theme: Suspicious Activity Timeline */
[data-theme="light"] .fm-timeline-section,
html[data-theme="light"] .fm-timeline-section {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-section-title,
html[data-theme="light"] .fm-section-title {
    color: var(--theme-text-dark) !important;
}

/* Light Theme: Suspicious Activity Details */
[data-theme="light"] .fm-activity-section,
html[data-theme="light"] .fm-activity-section {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

/* Light Theme: Section Headers */
[data-theme="light"] .fm-section-header,
html[data-theme="light"] .fm-section-header {
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-section-header i,
html[data-theme="light"] .fm-section-header i {
    color: var(--theme-text-medium) !important;
}

/* Light Theme: Active Tab - ensure label text is visible */
[data-theme="light"] .fm-tab-item.active .fm-tab-label,
html[data-theme="light"] .fm-tab-item.active .fm-tab-label {
    color: var(--theme-accent-blue-dark) !important;
    /* blue-600 for visibility */
}

[data-theme="light"] .fm-tab-item.active .fm-tab-icon,
html[data-theme="light"] .fm-tab-item.active .fm-tab-icon {
    color: var(--theme-accent-blue-dark) !important;
}

/* Light Theme: Threat Cards (Suspicious Activity Details) */
[data-theme="light"] .fm-threat-card,
html[data-theme="light"] .fm-threat-card {
    background: linear-gradient(145deg, var(--theme-bg-secondary) 0%, var(--theme-bg-tertiary) 100%) !important;
    border: 1px solid var(--theme-border-solid) !important;
    box-shadow: var(--theme-shadow-sm) !important;
}

[data-theme="light"] .fm-threat-card:hover,
html[data-theme="light"] .fm-threat-card:hover {
    background: var(--theme-bg-tertiary) !important;
    border-color: var(--theme-border-muted) !important;
    box-shadow: var(--theme-shadow-md) !important;
}

[data-theme="light"] .fm-threat-header,
[data-theme="light"] .fm-threat-title,
html[data-theme="light"] .fm-threat-header,
html[data-theme="light"] .fm-threat-title {
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-threat-desc,
[data-theme="light"] .fm-threat-meta,
html[data-theme="light"] .fm-threat-desc,
html[data-theme="light"] .fm-threat-meta {
    color: var(--theme-text-medium) !important;
}

[data-theme="light"] .fm-threat-tags .fm-tag,
html[data-theme="light"] .fm-threat-tags .fm-tag {
    background: var(--theme-bg-primary) !important;
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-detection-header,
html[data-theme="light"] .fm-detection-header {
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-detection-field,
html[data-theme="light"] .fm-detection-field {
    color: var(--theme-text-medium) !important;
}

[data-theme="light"] .fm-detection-field-label,
html[data-theme="light"] .fm-detection-field-label {
    color: var(--theme-text-medium) !important;
}

[data-theme="light"] .fm-detection-field-value,
html[data-theme="light"] .fm-detection-field-value {
    color: var(--theme-text-dark) !important;
}

/* Light Theme: Header Action Buttons (Local Time, Settings, Rescan) */
[data-theme="light"] .fm-action-btn,
[data-theme="light"] button.fm-action-btn,
[data-theme="light"] .fm-page .page-bar .fm-action-btn,
[data-theme="light"] .page-bar .row.mytitle .fm-header-actions .fm-action-btn,
html[data-theme="light"] .fm-action-btn,
html[data-theme="light"] button.fm-action-btn {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-action-btn:hover,
[data-theme="light"] button.fm-action-btn:hover,
html[data-theme="light"] .fm-action-btn:hover,
html[data-theme="light"] button.fm-action-btn:hover {
    background: var(--theme-bg-primary) !important;
    border-color: var(--theme-border-muted) !important;
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-action-btn i,
[data-theme="light"] button.fm-action-btn i,
html[data-theme="light"] .fm-action-btn i,
html[data-theme="light"] button.fm-action-btn i {
    color: var(--theme-text-medium) !important;
}

[data-theme="light"] .fm-action-btn:hover i,
[data-theme="light"] button.fm-action-btn:hover i,
html[data-theme="light"] .fm-action-btn:hover i,
html[data-theme="light"] button.fm-action-btn:hover i {
    color: var(--theme-accent-blue) !important;
}

/* Light Theme: Primary action buttons */
[data-theme="light"] .fm-action-btn.fm-action-primary,
html[data-theme="light"] .fm-action-btn.fm-action-primary {
    background: var(--theme-accent-blue) !important;
    border-color: var(--theme-accent-blue) !important;
    color: var(--theme-text-inverse) !important;
}

[data-theme="light"] .fm-action-btn.fm-action-primary:hover,
html[data-theme="light"] .fm-action-btn.fm-action-primary:hover {
    background: var(--theme-accent-blue-dark) !important;
    border-color: var(--theme-accent-blue-dark) !important;
}

[data-theme="light"] .fm-action-btn.fm-action-primary i,
html[data-theme="light"] .fm-action-btn.fm-action-primary i {
    color: var(--theme-text-medium) !important;
}

/* Light Theme: Date range selector */
[data-theme="light"] .fm-date-range-btn,
[data-theme="light"] .fm-date-picker-btn,
html[data-theme="light"] .fm-date-range-btn,
html[data-theme="light"] .fm-date-picker-btn {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-date-range-btn:hover,
[data-theme="light"] .fm-date-picker-btn:hover,
html[data-theme="light"] .fm-date-range-btn:hover,
html[data-theme="light"] .fm-date-picker-btn:hover {
    background: var(--theme-bg-primary) !important;
    border-color: var(--theme-accent-blue-light) !important;
}

/* Light Theme: Hunt Mode Tabs (Simple/Advanced toggle) */
[data-theme="light"] .fm-hunt-mode-tabs,
html[data-theme="light"] .fm-hunt-mode-tabs {
    background: var(--theme-bg-primary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-hunt-mode-tab,
html[data-theme="light"] .fm-hunt-mode-tab {
    color: var(--theme-text-medium) !important;
}

[data-theme="light"] .fm-hunt-mode-tab:hover,
html[data-theme="light"] .fm-hunt-mode-tab:hover {
    background: var(--theme-border-solid) !important;
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-hunt-mode-tab.active,
html[data-theme="light"] .fm-hunt-mode-tab.active {
    background: var(--theme-accent-blue) !important;
    color: var(--theme-text-inverse) !important;
}

/* Light Theme: Hunt Section and Input */
[data-theme="light"] .fm-hunt-section,
html[data-theme="light"] .fm-hunt-section {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-hunt-input-group,
html[data-theme="light"] .fm-hunt-input-group {
    background: var(--theme-bg-secondary) !important;
    border: 2px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-hunt-input-group:focus-within,
html[data-theme="light"] .fm-hunt-input-group:focus-within {
    border-color: var(--theme-accent-blue) !important;
    box-shadow: none !important;
    outline: none !important;
}

[data-theme="light"] .fm-hunt-input-group.invalid:focus-within,
html[data-theme="light"] .fm-hunt-input-group.invalid:focus-within {
    border-color: var(--theme-danger) !important;
    box-shadow: none !important;
    outline: none !important;
}

[data-theme="light"] .fm-hunt-input-group.valid:focus-within,
html[data-theme="light"] .fm-hunt-input-group.valid:focus-within {
    border-color: var(--theme-success) !important;
    box-shadow: none !important;
    outline: none !important;
}

[data-theme="light"] .fm-hunt-input,
html[data-theme="light"] .fm-hunt-input {
    background: transparent !important;
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-hunt-input::placeholder,
html[data-theme="light"] .fm-hunt-input::placeholder {
    color: var(--theme-text-muted-decorative) !important;
}

[data-theme="light"] .fm-hunt-search-input:focus,
[data-theme="light"] .fm-hunt-search-input:focus-visible,
html[data-theme="light"] .fm-hunt-search-input:focus,
html[data-theme="light"] .fm-hunt-search-input:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* Light Theme: Cards View (Search Results) */
[data-theme="light"] .fm-card,
html[data-theme="light"] .fm-card {
    background: linear-gradient(145deg, var(--theme-bg-secondary) 0%, var(--theme-bg-tertiary) 100%) !important;
    border: 1px solid var(--theme-border-solid) !important;
    box-shadow: var(--theme-shadow-sm) !important;
}

[data-theme="light"] .fm-card:hover,
html[data-theme="light"] .fm-card:hover {
    border-color: var(--theme-accent-blue-light) !important;
    box-shadow: var(--theme-shadow-md) !important;
}

[data-theme="light"] .fm-card-header,
html[data-theme="light"] .fm-card-header {
    background: var(--theme-bg-tertiary) !important;
    border-bottom: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-card-title,
[data-theme="light"] .fm-card-primary,
html[data-theme="light"] .fm-card-title,
html[data-theme="light"] .fm-card-primary {
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-card-name,
html[data-theme="light"] .fm-card-name {
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-card-body,
html[data-theme="light"] .fm-card-body {
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-card-attribute,
[data-theme="light"] .fm-card-identifier,
html[data-theme="light"] .fm-card-attribute,
html[data-theme="light"] .fm-card-identifier {
    background: var(--theme-bg-primary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-card-attribute-label,
[data-theme="light"] .fm-card-identifier-label,
html[data-theme="light"] .fm-card-attribute-label,
html[data-theme="light"] .fm-card-identifier-label {
    color: var(--theme-text-medium) !important;
}

[data-theme="light"] .fm-card-attribute-value,
[data-theme="light"] .fm-card-identifier-value,
html[data-theme="light"] .fm-card-attribute-value,
html[data-theme="light"] .fm-card-identifier-value {
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-identifier-value,
html[data-theme="light"] .fm-identifier-value {
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-hash,
html[data-theme="light"] .fm-hash {
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-raw-field-hash,
html[data-theme="light"] .fm-raw-field-hash {
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-detail-hash code,
html[data-theme="light"] .fm-detail-hash code {
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-card-context,
html[data-theme="light"] .fm-card-context {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-medium) !important;
}

[data-theme="light"] .fm-card-content,
html[data-theme="light"] .fm-card-content {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-medium) !important;
}

[data-theme="light"] .fm-context-label,
[data-theme="light"] .fm-content-label,
html[data-theme="light"] .fm-context-label,
html[data-theme="light"] .fm-content-label {
    background: var(--theme-border-solid) !important;
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-context-value,
[data-theme="light"] .fm-content-value,
html[data-theme="light"] .fm-context-value,
html[data-theme="light"] .fm-content-value {
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-timeline-page .fm-card-attributes,
[data-theme="light"] .fm-timeline-page .fm-card-identifiers,
[data-theme="light"] .fm-timeline-page .fm-card-context,
[data-theme="light"] .fm-timeline-page .fm-card-content,
html[data-theme="light"] .fm-timeline-page .fm-card-attributes,
html[data-theme="light"] .fm-timeline-page .fm-card-identifiers,
html[data-theme="light"] .fm-timeline-page .fm-card-context,
html[data-theme="light"] .fm-timeline-page .fm-card-content {
    background: var(--theme-bg-primary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-timeline-page .fm-card-attribute,
[data-theme="light"] .fm-timeline-page .fm-card-identifier,
html[data-theme="light"] .fm-timeline-page .fm-card-attribute,
html[data-theme="light"] .fm-timeline-page .fm-card-identifier {
    background: transparent !important;
    border: 0 !important;
}

[data-theme="light"] .fm-timeline-page .fm-attribute-label,
[data-theme="light"] .fm-timeline-page .fm-identifier-label,
[data-theme="light"] .fm-timeline-page .fm-context-label,
[data-theme="light"] .fm-timeline-page .fm-content-label,
html[data-theme="light"] .fm-timeline-page .fm-attribute-label,
html[data-theme="light"] .fm-timeline-page .fm-identifier-label,
html[data-theme="light"] .fm-timeline-page .fm-context-label,
html[data-theme="light"] .fm-timeline-page .fm-content-label {
    background: var(--theme-bg-tertiary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-medium) !important;
}

[data-theme="light"] .fm-card-users,
html[data-theme="light"] .fm-card-users {
    background: var(--theme-bg-primary) !important;
    border-left: 3px solid var(--theme-accent-blue) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-users-label,
html[data-theme="light"] .fm-users-label {
    color: var(--theme-text-medium) !important;
}

/* Light Theme: Timeline Chart Wrapper */
[data-theme="light"] .fm-timeline-chart-wrapper,
html[data-theme="light"] .fm-timeline-chart-wrapper {
    background: var(--theme-bg-tertiary) !important;
}

[data-theme="light"] .fm-timeline-chart,
html[data-theme="light"] .fm-timeline-chart {
    background: transparent !important;
}

[data-theme="light"] .fm-card-btn,
html[data-theme="light"] .fm-card-btn {
    background: var(--theme-bg-primary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-medium) !important;
}

[data-theme="light"] .fm-card-btn:hover,
html[data-theme="light"] .fm-card-btn:hover {
    background: var(--theme-border-solid) !important;
    color: var(--theme-accent-blue) !important;
}

/* Light Theme: Card Subtitle Headers (CONNECTION ORIGINS, NETWORK INTERFACES, etc.) */
[data-theme="light"] .fm-card-subtitle,
html[data-theme="light"] .fm-card-subtitle {
    background: var(--theme-bg-primary) !important;
    border-bottom: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-card-subtitle i,
html[data-theme="light"] .fm-card-subtitle i {
    color: var(--theme-accent-orange) !important;
    /* Keep orange for visibility */
}

/* Light Theme: Network Overview Cards */
[data-theme="light"] .fm-network-map-card,
[data-theme="light"] .fm-network-interfaces-card,
html[data-theme="light"] .fm-network-map-card,
html[data-theme="light"] .fm-network-interfaces-card {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

/* Light Theme: Raw Card Headers */
[data-theme="light"] .fm-raw-card-header,
html[data-theme="light"] .fm-raw-card-header {
    background: var(--theme-bg-tertiary) !important;
    border-bottom: 1px solid var(--theme-border-solid) !important;
}

/* Light Theme: Raw Card */
[data-theme="light"] .fm-raw-card,
html[data-theme="light"] .fm-raw-card {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-raw-card-title,
html[data-theme="light"] .fm-raw-card-title {
    color: var(--theme-text-primary) !important;
}

[data-theme="light"] .fm-raw-card-time,
html[data-theme="light"] .fm-raw-card-time {
    color: var(--theme-text-secondary) !important;
}

/* Light Theme: Raw Action Button (Copy) */
[data-theme="light"] .fm-raw-action-btn,
html[data-theme="light"] .fm-raw-action-btn {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-secondary) !important;
}

[data-theme="light"] .fm-raw-action-btn:hover,
html[data-theme="light"] .fm-raw-action-btn:hover {
    background: rgba(0, 0, 0, 0.1) !important;
    border-color: var(--theme-border-muted) !important;
    color: var(--theme-text-primary) !important;
}

/* Light Theme: Raw Card Body / JSON Viewer */
[data-theme="light"] .fm-raw-card-body,
html[data-theme="light"] .fm-raw-card-body {
    background: var(--theme-bg-primary) !important;
}

[data-theme="light"] .fm-raw-card-body pre,
[data-theme="light"] .fm-raw-card pre,
[data-theme="light"] .fm-json-viewer,
html[data-theme="light"] .fm-raw-card-body pre,
html[data-theme="light"] .fm-raw-card pre,
html[data-theme="light"] .fm-json-viewer {
    background: var(--theme-bg-primary) !important;
    color: var(--theme-text-primary) !important;
    border: none !important;
}

/* Light Theme: Raw Fields */
[data-theme="light"] .fm-raw-field,
html[data-theme="light"] .fm-raw-field {
    background: rgba(0, 0, 0, 0.03) !important;
    border-left-color: var(--theme-accent-orange) !important;
}

[data-theme="light"] .fm-raw-field-key,
html[data-theme="light"] .fm-raw-field-key {
    color: var(--theme-text-muted) !important;
}

[data-theme="light"] .fm-raw-field-value,
html[data-theme="light"] .fm-raw-field-value {
    color: var(--theme-text-primary) !important;
}

/* Light Theme: Section Headers with backgrounds */
[data-theme="light"] .fm-other-section .fm-section-header,
[data-theme="light"] .fm-stats-section .fm-section-header,
html[data-theme="light"] .fm-other-section .fm-section-header,
html[data-theme="light"] .fm-stats-section .fm-section-header {
    background: var(--theme-bg-tertiary) !important;
    border-bottom: 1px solid var(--theme-border-solid) !important;
}

/* Light Theme: Interfaces Table */
[data-theme="light"] .fm-interfaces-table-wrapper,
html[data-theme="light"] .fm-interfaces-table-wrapper {
    background: var(--theme-bg-secondary) !important;
}

[data-theme="light"] .fm-interfaces-table-wrapper::-webkit-scrollbar-track,
html[data-theme="light"] .fm-interfaces-table-wrapper::-webkit-scrollbar-track {
    background: var(--theme-bg-primary) !important;
}

[data-theme="light"] .fm-interfaces-table-wrapper::-webkit-scrollbar-thumb,
html[data-theme="light"] .fm-interfaces-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--theme-border-muted) !important;
}

[data-theme="light"] .fm-interfaces-pagination,
html[data-theme="light"] .fm-interfaces-pagination {
    background: var(--theme-bg-primary) !important;
    border-top: 1px solid var(--theme-border-solid) !important;
}

/* Light Theme: Results section header */
[data-theme="light"] .fm-results-header,
[data-theme="light"] .fm-results-section-header,
html[data-theme="light"] .fm-results-header,
html[data-theme="light"] .fm-results-section-header {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-dark) !important;
}

/* Light Theme: Filter Tags Bar */
[data-theme="light"] .fm-filter-tags,
html[data-theme="light"] .fm-filter-tags {
    background: var(--theme-bg-primary) !important;
    border-bottom: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-filter-tag,
html[data-theme="light"] .fm-filter-tag {
    background: rgba(34, 197, 94, 0.45) !important;
    border-color: var(--theme-border-solid) !important;
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-filter-tag-exclude,
html[data-theme="light"] .fm-filter-tag-exclude {
    background: var(--theme-danger-bg) !important;
    border-color: var(--theme-danger-glow) !important;
}

[data-theme="light"] .fm-filter-tag-include,
html[data-theme="light"] .fm-filter-tag-include {
    background: rgba(34, 197, 94, 0.15) !important;
    border-color: var(--theme-success-glow) !important;
}

/* Light Theme: User SID Box */
[data-theme="light"] .fm-user-sid,
html[data-theme="light"] .fm-user-sid {
    background: var(--theme-bg-primary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-sid-label,
html[data-theme="light"] .fm-sid-label {
    color: var(--theme-text-medium) !important;
}

[data-theme="light"] .fm-sid-value,
html[data-theme="light"] .fm-sid-value {
    color: var(--theme-text-dark) !important;
}

/* Light Theme: User Stats (Login Count, Failed, etc.) */
[data-theme="light"] .fm-user-stat,
html[data-theme="light"] .fm-user-stat {
    background: var(--theme-bg-tertiary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-user-stat i,
html[data-theme="light"] .fm-user-stat i {
    color: var(--theme-text-medium) !important;
}

[data-theme="light"] .fm-user-stat .fm-stat-number,
[data-theme="light"] .fm-user-stat .fm-stat-label,
html[data-theme="light"] .fm-user-stat .fm-stat-number,
html[data-theme="light"] .fm-user-stat .fm-stat-label {
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-user-stat.success,
html[data-theme="light"] .fm-user-stat.success {
    background: var(--theme-success-bg) !important;
    border-left-color: var(--theme-success) !important;
}

[data-theme="light"] .fm-user-stat.success i,
html[data-theme="light"] .fm-user-stat.success i {
    color: var(--theme-success) !important;
}

[data-theme="light"] .fm-user-stat.danger,
html[data-theme="light"] .fm-user-stat.danger {
    background: var(--theme-danger-bg) !important;
    border-left-color: var(--theme-danger) !important;
}

[data-theme="light"] .fm-user-stat.danger i,
[data-theme="light"] .fm-user-stat.danger .fm-stat-number,
html[data-theme="light"] .fm-user-stat.danger i,
html[data-theme="light"] .fm-user-stat.danger .fm-stat-number {
    color: var(--theme-danger) !important;
}

/* Light Theme: User Card */
[data-theme="light"] .fm-user-card,
html[data-theme="light"] .fm-user-card {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-user-card-header,
html[data-theme="light"] .fm-user-card-header {
    background: linear-gradient(90deg, var(--theme-table-row-hover) 0%, transparent 60%) !important;
}

[data-theme="light"] .fm-user-name,
html[data-theme="light"] .fm-user-name {
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-user-machine,
html[data-theme="light"] .fm-user-machine {
    color: var(--theme-text-medium) !important;
}

[data-theme="light"] .fm-user-card-body,
html[data-theme="light"] .fm-user-card-body {
    background: var(--theme-bg-secondary) !important;
}

/* Light Theme: Event Quick Filters / Bookmark Categories */
[data-theme="light"] .fm-bookmark-category,
html[data-theme="light"] .fm-bookmark-category {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-bookmark-category:hover,
html[data-theme="light"] .fm-bookmark-category:hover {
    border-color: var(--theme-border-muted) !important;
}

[data-theme="light"] .fm-bookmark-category-header,
html[data-theme="light"] .fm-bookmark-category-header {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-bookmarks-content,
html[data-theme="light"] .fm-bookmarks-content {
    background: var(--theme-bg-tertiary) !important;
}

[data-theme="light"] .fm-bookmark-items,
html[data-theme="light"] .fm-bookmark-items {
    background: var(--theme-bg-secondary) !important;
}

[data-theme="light"] .fm-bookmark-item,
html[data-theme="light"] .fm-bookmark-item {
    background: transparent !important;
    color: var(--theme-text-tertiary) !important;
    border-color: transparent !important;
}

[data-theme="light"] .fm-bookmark-item:hover,
html[data-theme="light"] .fm-bookmark-item:hover {
    background: var(--theme-bg-primary) !important;
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-bookmark-name,
html[data-theme="light"] .fm-bookmark-name {
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-bookmark-count,
html[data-theme="light"] .fm-bookmark-count {
    background: var(--theme-border-solid) !important;
    color: var(--theme-text-tertiary) !important;
}

/* ============================================================================
   Light Theme: Vulnerabilities Tab
   ============================================================================ */

/* Light Theme: Vuln Stats Bar (Filter Columns) */
[data-theme="light"] .fm-vuln-stats-bar,
html[data-theme="light"] .fm-vuln-stats-bar {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-vuln-filter-col,
html[data-theme="light"] .fm-vuln-filter-col {
    background: transparent !important;
}

[data-theme="light"] .fm-vuln-filter-title,
html[data-theme="light"] .fm-vuln-filter-title {
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-vuln-stat-item,
html[data-theme="light"] .fm-vuln-stat-item {
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-vuln-stat-item:hover,
html[data-theme="light"] .fm-vuln-stat-item:hover {
    background: var(--theme-bg-primary) !important;
}

[data-theme="light"] .fm-vuln-stat-item.active,
html[data-theme="light"] .fm-vuln-stat-item.active {
    background: var(--theme-accent-blue-bg) !important;
    border-left: 3px solid var(--theme-accent-blue) !important;
}

[data-theme="light"] .fm-vuln-item-count,
html[data-theme="light"] .fm-vuln-item-count {
    background: var(--theme-border-solid) !important;
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-vuln-stats-list::-webkit-scrollbar-thumb,
html[data-theme="light"] .fm-vuln-stats-list::-webkit-scrollbar-thumb {
    background: var(--theme-border-muted) !important;
}

/* Light Theme: Vuln Cards */
[data-theme="light"] .fm-vuln-card,
html[data-theme="light"] .fm-vuln-card {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-vuln-card:hover,
html[data-theme="light"] .fm-vuln-card:hover {
    border-color: var(--theme-accent-blue) !important;
    box-shadow: var(--theme-shadow-lg) !important;
}

[data-theme="light"] .fm-vuln-card.expanded,
html[data-theme="light"] .fm-vuln-card.expanded {
    border-color: var(--theme-accent-orange) !important;
}

[data-theme="light"] .fm-vuln-card-header:hover,
html[data-theme="light"] .fm-vuln-card-header:hover {
    background: var(--theme-bg-tertiary) !important;
}

/* Light Theme: Vuln Card Body (Expanded) */
[data-theme="light"] .fm-vuln-card-body,
html[data-theme="light"] .fm-vuln-card-body {
    background: var(--theme-bg-tertiary) !important;
    border-top: 1px solid var(--theme-border-solid) !important;
}

/* Light Theme: Vuln Description Box */
[data-theme="light"] .fm-vuln-description-box,
html[data-theme="light"] .fm-vuln-description-box {
    background: var(--theme-bg-secondary) !important;
    border-left: 3px solid var(--theme-accent-orange) !important;
}

[data-theme="light"] .fm-vuln-description-box p,
html[data-theme="light"] .fm-vuln-description-box p {
    color: var(--theme-text-tertiary) !important;
}

/* Light Theme: Vuln Endpoint Section (Right Panel) */
[data-theme="light"] .fm-vuln-endpoint-section,
html[data-theme="light"] .fm-vuln-endpoint-section {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

/* Light Theme: Vuln Info Headers */
[data-theme="light"] .fm-vuln-info-header,
html[data-theme="light"] .fm-vuln-info-header {
    color: var(--theme-text-dark) !important;
    border-bottom: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-vuln-info-header i,
html[data-theme="light"] .fm-vuln-info-header i {
    color: var(--theme-accent-blue) !important;
}

/* Light Theme: Vuln Info Items */
[data-theme="light"] .fm-vuln-info-item label,
html[data-theme="light"] .fm-vuln-info-item label {
    color: var(--theme-text-medium) !important;
}

[data-theme="light"] .fm-vuln-info-item span,
html[data-theme="light"] .fm-vuln-info-item span {
    color: var(--theme-text-dark) !important;
}

/* Light Theme: Vuln Meta Info */
[data-theme="light"] .fm-vuln-endpoint,
[data-theme="light"] .fm-vuln-product,
html[data-theme="light"] .fm-vuln-endpoint,
html[data-theme="light"] .fm-vuln-product {
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-vuln-endpoint i,
[data-theme="light"] .fm-vuln-product i,
html[data-theme="light"] .fm-vuln-endpoint i,
html[data-theme="light"] .fm-vuln-product i {
    color: var(--theme-text-medium) !important;
}

/* Light Theme: Vuln Link Buttons */
[data-theme="light"] .fm-vuln-link-btn,
html[data-theme="light"] .fm-vuln-link-btn {
    background: var(--theme-bg-tertiary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-vuln-link-btn:hover,
html[data-theme="light"] .fm-vuln-link-btn:hover {
    background: var(--theme-border-solid) !important;
    border-color: var(--theme-border-muted) !important;
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-vuln-link-btn.primary,
html[data-theme="light"] .fm-vuln-link-btn.primary {
    background: var(--theme-accent-blue-bg) !important;
    border-color: var(--theme-border-accent) !important;
    color: var(--theme-accent-blue) !important;
}

/* Light Theme: Vuln Active Filters */
[data-theme="light"] .fm-vuln-active-filters,
html[data-theme="light"] .fm-vuln-active-filters {
    background: var(--theme-bg-tertiary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-vuln-filters-label,
html[data-theme="light"] .fm-vuln-filters-label {
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-vuln-filter-tag,
html[data-theme="light"] .fm-vuln-filter-tag {
    background: var(--theme-success-bg) !important;
    color: var(--theme-text-dark) !important;
}

/* Light Theme: Vuln Search Dropdown */
[data-theme="light"] .fm-vuln-search-dropdown,
html[data-theme="light"] .fm-vuln-search-dropdown {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-vuln-search-dropdown li a,
html[data-theme="light"] .fm-vuln-search-dropdown li a {
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-vuln-search-dropdown li a:hover,
html[data-theme="light"] .fm-vuln-search-dropdown li a:hover {
    background: var(--theme-bg-primary) !important;
}

[data-theme="light"] .fm-vuln-search-dropdown li.active a,
html[data-theme="light"] .fm-vuln-search-dropdown li.active a {
    background: var(--theme-accent-blue-bg) !important;
}

/* ============================================================================
   Light Theme: Rules Tab
   ============================================================================ */

/* Light Theme: Rule Stats Cards */
[data-theme="light"] .fm-rule-stat,
html[data-theme="light"] .fm-rule-stat {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-rule-stat:hover,
html[data-theme="light"] .fm-rule-stat:hover {
    border-color: var(--theme-border-muted) !important;
}

[data-theme="light"] .fm-rule-stat.active,
html[data-theme="light"] .fm-rule-stat.active {
    border-color: var(--theme-accent-blue) !important;
    background: var(--theme-accent-blue-bg-subtle) !important;
}

[data-theme="light"] .fm-rule-stat-count,
html[data-theme="light"] .fm-rule-stat-count {
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-rule-stat-label,
html[data-theme="light"] .fm-rule-stat-label {
    color: var(--theme-text-medium) !important;
}

/* Light Theme: Rule Cards */
[data-theme="light"] .fm-rule-card,
html[data-theme="light"] .fm-rule-card {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-rule-card:hover,
html[data-theme="light"] .fm-rule-card:hover {
    border-color: var(--theme-border-muted) !important;
}

[data-theme="light"] .fm-rule-card-header,
html[data-theme="light"] .fm-rule-card-header {
    background: var(--theme-bg-tertiary) !important;
    border-bottom: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-rule-card-body,
html[data-theme="light"] .fm-rule-card-body {
    background: var(--theme-bg-secondary) !important;
}

[data-theme="light"] .fm-rule-timestamp,
html[data-theme="light"] .fm-rule-timestamp {
    color: var(--theme-text-medium) !important;
}

[data-theme="light"] .fm-rule-name,
html[data-theme="light"] .fm-rule-name {
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-rule-description,
html[data-theme="light"] .fm-rule-description {
    color: var(--theme-text-tertiary) !important;
}

/* Light Theme: Rule Match Details */
[data-theme="light"] .fm-rule-match-section,
html[data-theme="light"] .fm-rule-match-section {
    background: var(--theme-bg-tertiary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-rule-match-title,
html[data-theme="light"] .fm-rule-match-title {
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-rule-info-label,
html[data-theme="light"] .fm-rule-info-label {
    color: var(--theme-text-medium) !important;
}

[data-theme="light"] .fm-rule-info-value,
html[data-theme="light"] .fm-rule-info-value {
    color: var(--theme-text-dark) !important;
}

/* Light Theme: Rule Actions */
[data-theme="light"] .fm-rule-action-btn,
html[data-theme="light"] .fm-rule-action-btn {
    background: var(--theme-bg-tertiary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-rule-action-btn:hover,
html[data-theme="light"] .fm-rule-action-btn:hover {
    background: var(--theme-border-solid) !important;
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-rule-card-actions,
html[data-theme="light"] .fm-rule-card-actions {
    background: var(--theme-bg-tertiary) !important;
    border-top: 1px solid var(--theme-border-solid) !important;
}

/* Light Theme: Attack Story Modals */
[data-theme="light"] #addModalReport .modal-content,
[data-theme="light"] #eventDetailsModal .modal-content,
html[data-theme="light"] #addModalReport .modal-content,
html[data-theme="light"] #eventDetailsModal .modal-content {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    box-shadow: var(--theme-shadow-lg) !important;
}

[data-theme="light"] #addModalReport .modal-header,
[data-theme="light"] #addModalReport .modal-footer,
[data-theme="light"] #eventDetailsModal .modal-header,
[data-theme="light"] #eventDetailsModal .modal-footer,
html[data-theme="light"] #addModalReport .modal-header,
html[data-theme="light"] #addModalReport .modal-footer,
html[data-theme="light"] #eventDetailsModal .modal-header,
html[data-theme="light"] #eventDetailsModal .modal-footer {
    border-color: var(--theme-border-solid) !important;
}

[data-theme="light"] #addModalReport .modal-title,
[data-theme="light"] #eventDetailsModal .modal-title,
html[data-theme="light"] #addModalReport .modal-title,
html[data-theme="light"] #eventDetailsModal .modal-title {
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] #addModalReport .close,
[data-theme="light"] #eventDetailsModal .close,
html[data-theme="light"] #addModalReport .close,
html[data-theme="light"] #eventDetailsModal .close {
    color: var(--theme-text-muted) !important;
    opacity: 1;
}

[data-theme="light"] #addModalReport label,
[data-theme="light"] #eventDetailsModal label,
html[data-theme="light"] #addModalReport label,
html[data-theme="light"] #eventDetailsModal label {
    color: var(--theme-text-secondary) !important;
}

[data-theme="light"] #addModalReport label[style*="#f85149"],
html[data-theme="light"] #addModalReport label[style*="#f85149"] {
    color: var(--theme-danger) !important;
}

[data-theme="light"] #addModalReport .form-control,
[data-theme="light"] #addModalReport .fm-form-control,
[data-theme="light"] #eventDetailsModal .form-control,
[data-theme="light"] #eventDetailsModal .fm-form-control,
html[data-theme="light"] #addModalReport .form-control,
html[data-theme="light"] #addModalReport .fm-form-control,
html[data-theme="light"] #eventDetailsModal .form-control,
html[data-theme="light"] #eventDetailsModal .fm-form-control {
    background: var(--theme-bg-primary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-primary) !important;
}

[data-theme="light"] #addModalReport .form-control::placeholder,
[data-theme="light"] #addModalReport .fm-form-control::placeholder,
[data-theme="light"] #eventDetailsModal .form-control::placeholder,
[data-theme="light"] #eventDetailsModal .fm-form-control::placeholder,
html[data-theme="light"] #addModalReport .form-control::placeholder,
html[data-theme="light"] #addModalReport .fm-form-control::placeholder,
html[data-theme="light"] #eventDetailsModal .form-control::placeholder,
html[data-theme="light"] #eventDetailsModal .fm-form-control::placeholder {
    color: var(--theme-text-muted) !important;
}

[data-theme="light"] #addModalReport .modal-body,
[data-theme="light"] #eventDetailsModal .modal-body,
html[data-theme="light"] #addModalReport .modal-body,
html[data-theme="light"] #eventDetailsModal .modal-body {
    background: var(--theme-bg-secondary) !important;
}

[data-theme="light"] #addModalReport input[style*="border: 2px solid #f85149"],
html[data-theme="light"] #addModalReport input[style*="border: 2px solid #f85149"] {
    border-color: var(--theme-danger) !important;
}

[data-theme="light"] #addModalReport .fm-btn.fm-btn-primary,
html[data-theme="light"] #addModalReport .fm-btn.fm-btn-primary {
    background: var(--theme-accent-blue) !important;
    border-color: var(--theme-accent-blue) !important;
    color: var(--theme-text-inverse) !important;
}

[data-theme="light"] #addModalReport .fm-btn.fm-btn-primary:hover,
html[data-theme="light"] #addModalReport .fm-btn.fm-btn-primary:hover {
    background: var(--theme-accent-blue-dark) !important;
    border-color: var(--theme-accent-blue-dark) !important;
    color: var(--theme-text-inverse) !important;
}

[data-theme="light"] #addModalReport .fm-btn.fm-btn-primary:disabled,
html[data-theme="light"] #addModalReport .fm-btn.fm-btn-primary:disabled {
    background: var(--theme-accent-blue-bg) !important;
    border-color: var(--theme-accent-blue) !important;
    color: var(--theme-accent-blue-dark) !important;
    opacity: 1;
}

[data-theme="light"] #addModalReport .fm-btn.fm-btn-primary:disabled i,
html[data-theme="light"] #addModalReport .fm-btn.fm-btn-primary:disabled i {
    color: var(--theme-accent-blue-dark) !important;
}

[data-theme="light"] #addModalReport select.form-control,
[data-theme="light"] #addModalReport select.fm-form-control,
html[data-theme="light"] #addModalReport select.form-control,
html[data-theme="light"] #addModalReport select.fm-form-control {
    height: 40px !important;
    line-height: 20px;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* ============================================================================
   Light Theme: Other Tab
   ============================================================================ */

/* Light Theme: Other Section */
[data-theme="light"] .fm-other-section,
html[data-theme="light"] .fm-other-section {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-other-section .fm-section-header,
html[data-theme="light"] .fm-other-section .fm-section-header {
    background: var(--theme-bg-tertiary) !important;
    border-bottom: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-other-section .fm-section-title,
html[data-theme="light"] .fm-other-section .fm-section-title {
    color: var(--theme-text-dark) !important;
}

/* Light Theme: Other Table */
[data-theme="light"] .fm-other-table thead,
html[data-theme="light"] .fm-other-table thead {
    background: var(--theme-bg-tertiary) !important;
}

[data-theme="light"] .fm-other-table th,
html[data-theme="light"] .fm-other-table th {
    color: var(--theme-text-tertiary) !important;
    border-bottom: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-other-table td,
html[data-theme="light"] .fm-other-table td {
    color: var(--theme-text-tertiary) !important;
    border-bottom: 1px solid var(--theme-border-subtle) !important;
}

[data-theme="light"] .fm-other-table tbody tr:hover,
html[data-theme="light"] .fm-other-table tbody tr:hover {
    background: var(--theme-bg-tertiary) !important;
}

[data-theme="light"] .fm-other-table-container,
html[data-theme="light"] .fm-other-table-container {
    background: var(--theme-bg-secondary) !important;
}

/* Light Theme: Section Badge */
[data-theme="light"] .fm-section-badge,
html[data-theme="light"] .fm-section-badge {
    background: var(--theme-border-solid) !important;
    color: var(--theme-text-tertiary) !important;
}

/* Light Theme: Other Pagination */
[data-theme="light"] .fm-other-pagination,
html[data-theme="light"] .fm-other-pagination {
    background: var(--theme-bg-tertiary) !important;
    border-top: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-other-pagination .fm-btn,
html[data-theme="light"] .fm-other-pagination .fm-btn {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-other-pagination .fm-btn:hover,
html[data-theme="light"] .fm-other-pagination .fm-btn:hover {
    background: var(--theme-bg-primary) !important;
    color: var(--theme-text-dark) !important;
}

/* Light Theme: Other Table Scrollbars */
[data-theme="light"] .fm-other-table-container::-webkit-scrollbar-track,
html[data-theme="light"] .fm-other-table-container::-webkit-scrollbar-track {
    background: var(--theme-bg-primary) !important;
}

[data-theme="light"] .fm-other-table-container::-webkit-scrollbar-thumb,
html[data-theme="light"] .fm-other-table-container::-webkit-scrollbar-thumb {
    background: var(--theme-border-muted) !important;
}

/* Light Theme: Other Table Header Row */
[data-theme="light"] .fm-other-table thead tr,
html[data-theme="light"] .fm-other-table thead tr {
    background: var(--theme-bg-tertiary) !important;
}

/* Light Theme: Other Section Header Title Icon */
[data-theme="light"] .fm-other-section .fm-section-title i,
html[data-theme="light"] .fm-other-section .fm-section-title i {
    color: var(--theme-accent-orange) !important;
}

/* ============================================================================
   Light Theme: Attack Story
   ============================================================================ */

/* Light Theme: Attack Stat Cards */
[data-theme="light"] .fm-attack-stat-card,
html[data-theme="light"] .fm-attack-stat-card {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-attack-stat-card:hover,
html[data-theme="light"] .fm-attack-stat-card:hover {
    box-shadow: var(--theme-shadow-lg) !important;
    border-color: var(--theme-border-muted) !important;
}

[data-theme="light"] .fm-attack-stat-card.highlight,
html[data-theme="light"] .fm-attack-stat-card.highlight {
    background: linear-gradient(145deg, var(--theme-table-row-hover) 0%, var(--theme-bg-secondary) 100%) !important;
    border-color: var(--theme-border-accent) !important;
}

[data-theme="light"] .fm-attack-stat-value,
html[data-theme="light"] .fm-attack-stat-value {
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-attack-stat-label,
html[data-theme="light"] .fm-attack-stat-label {
    color: var(--theme-text-medium) !important;
}

/* Light Theme: Attack Title */
[data-theme="light"] .fm-attack-title,
html[data-theme="light"] .fm-attack-title {
    color: var(--theme-text-dark) !important;
}

[data-theme="light"] .fm-attack-subtitle,
html[data-theme="light"] .fm-attack-subtitle {
    color: var(--theme-text-medium) !important;
}

/* Light Theme: Attack Buttons */
[data-theme="light"] .fm-attack-btn.secondary,
html[data-theme="light"] .fm-attack-btn.secondary {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-attack-btn.secondary:hover,
html[data-theme="light"] .fm-attack-btn.secondary:hover {
    background: var(--theme-bg-tertiary) !important;
    border-color: var(--theme-accent-blue) !important;
}

/* Light Theme: Event Details Table */
[data-theme="light"] .fm-event-details,
html[data-theme="light"] .fm-event-details {
    background: var(--theme-bg-tertiary) !important;
    border-left: 3px solid color-mix(in srgb, var(--phase-color) 50%, var(--theme-border-solid)) !important;
}

[data-theme="light"] .fm-detail-row,
html[data-theme="light"] .fm-detail-row {
    border-bottom: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-detail-label,
html[data-theme="light"] .fm-detail-label {
    color: var(--theme-text-medium) !important;
}

[data-theme="light"] .fm-detail-value,
html[data-theme="light"] .fm-detail-value {
    color: var(--theme-text-dark) !important;
}

/* Light Theme: Event Card Footer */
[data-theme="light"] .fm-event-card-footer,
html[data-theme="light"] .fm-event-card-footer {
    background: var(--theme-bg-tertiary) !important;
    border-top: 1px solid var(--theme-border-solid) !important;
}

[data-theme="light"] .fm-event-action-btn,
html[data-theme="light"] .fm-event-action-btn {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-event-action-btn:hover,
html[data-theme="light"] .fm-event-action-btn:hover {
    background: var(--theme-bg-primary) !important;
    color: var(--theme-text-dark) !important;
}

/* Light Theme: Filter Pills */
[data-theme="light"] .fm-filter-pill,
html[data-theme="light"] .fm-filter-pill {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-solid) !important;
    color: var(--theme-text-tertiary) !important;
}

[data-theme="light"] .fm-filter-pill:hover,
html[data-theme="light"] .fm-filter-pill:hover {
    background: var(--theme-bg-tertiary) !important;
    border-color: var(--theme-border-muted) !important;
}

[data-theme="light"] .fm-filter-group label,
html[data-theme="light"] .fm-filter-group label {
    color: var(--theme-text-medium) !important;
}

/* =============================================================================
   MERGE INVESTIGATIONS SLIDE PANEL
   ============================================================================= */

/* Merge Panel - Narrower than the wizard */
.fm-slide-panel--merge {
    width: 600px;
    min-width: 500px;
    max-width: 90vw;
}

/* Merge Panel Header */
.fm-merge-panel-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 24px;
    background: linear-gradient(180deg, var(--fm-card-bg) 0%, var(--fm-bg-page) 100%);
    border-bottom: 1px solid var(--fm-border);
    flex-shrink: 0;
}

.fm-merge-panel-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.08) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fm-accent);
    font-size: 20px;
}

.fm-merge-panel-title {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.fm-merge-panel-title h3 {
    margin: 0 0 2px;
    font-size: 18px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-merge-panel-title p {
    margin: 0;
    font-size: 13px;
    color: var(--fm-text-muted);
}

.fm-merge-panel-close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--fm-text-muted);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.fm-merge-panel-close:hover {
    background: var(--fm-card-bg);
    color: var(--fm-text-primary);
}

/* Merge Panel Body */
.fm-merge-panel-body {
    flex: 1;
    overflow: hidden;
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    /* Important for flexbox overflow */
}

/* Merge Section */
.fm-merge-section {
    background: var(--fm-card-bg);
    border: 1px solid var(--fm-border);
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    /* Don't shrink the details section */
}

.fm-merge-section--table {
    flex: 1;
    flex-shrink: 1;
    /* Allow shrinking */
    display: flex;
    flex-direction: column;
    min-height: 200px;
    /* Minimum height for the table section */
    overflow: hidden;
}

.fm-merge-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--fm-bg-elevated);
    border-bottom: 1px solid var(--fm-border);
    font-size: 14px;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.fm-merge-section-header i {
    color: var(--fm-accent);
    font-size: 14px;
}

.fm-merge-section-header>span:first-of-type {
    flex: 1;
}

.fm-merge-count {
    padding: 3px 10px;
    margin-right: 8px;
    background: var(--fm-accent);
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Merge table refresh icon in header */
i.fm-merge-refresh.fa.fa-refresh {
    margin-left: 8px;
    cursor: pointer;
    color: #6b7280 !important;
    transition: color 0.15s ease;
}

i.fm-merge-refresh.fa.fa-refresh:hover {
    color: #3b82f6 !important;
}

.fm-merge-section-body {
    padding: 16px;
}

.fm-merge-section-body--table {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    /* Important for flexbox overflow */
    overflow: hidden;
}

/* Merge Info Banner */
.fm-merge-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.08);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
    font-size: 13px;
    color: var(--fm-text-secondary);
}

.fm-merge-info i {
    color: var(--fm-accent);
    font-size: 14px;
}

/* Merge Table */
.fm-merge-table-wrapper {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    /* Important for flexbox overflow */
    scrollbar-width: thin;
    scrollbar-color: var(--fm-scrollbar-thumb, rgba(255, 255, 255, 0.2)) var(--fm-scrollbar-bg, transparent);
}

.fm-merge-table-wrapper::-webkit-scrollbar {
    width: 8px;
}

.fm-merge-table-wrapper::-webkit-scrollbar-track {
    background: var(--fm-scrollbar-bg, transparent);
}

.fm-merge-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--fm-scrollbar-thumb, rgba(255, 255, 255, 0.2));
    border-radius: 4px;
}

.fm-merge-table {
    width: 100%;
    border-collapse: collapse;
}

.fm-merge-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.fm-merge-table thead th {
    padding: 12px 14px;
    background: var(--fm-bg-elevated);
    color: var(--fm-text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    border-bottom: 1px solid var(--fm-border);
}

.fm-merge-table tbody tr {
    cursor: pointer;
    transition: background 0.15s ease;
}

.fm-merge-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

.fm-merge-table tbody tr.selected {
    background: rgba(59, 130, 246, 0.1);
}

.fm-merge-table tbody td {
    padding: 12px 14px;
    color: var(--fm-text-primary);
    font-size: 13px;
    border-bottom: 1px solid var(--fm-border-subtle);
}

.fm-merge-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--fm-accent);
    cursor: pointer;
}

.fm-merge-table .fm-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.fm-merge-table .fm-status-badge.completed {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.fm-merge-table .fm-status-badge.running {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

/* Merge Empty & Loading States */
.fm-merge-empty,
.fm-merge-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    color: var(--fm-text-muted);
    text-align: center;
}

.fm-merge-empty i,
.fm-merge-loading i {
    font-size: 32px;
    opacity: 0.5;
}

.fm-merge-empty span,
.fm-merge-loading span {
    font-size: 13px;
}

/* Merge Panel Footer */
.fm-merge-panel-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    background: var(--fm-bg-elevated);
    border-top: 1px solid var(--fm-border);
    flex-shrink: 0;
}

/* Light Theme: Merge Panel */
[data-theme="light"] .fm-merge-panel-header,
html[data-theme="light"] .fm-merge-panel-header {
    background: linear-gradient(180deg, var(--theme-bg-tertiary) 0%, var(--theme-bg-secondary) 100%);
    border-bottom-color: var(--theme-border-solid);
}

[data-theme="light"] .fm-merge-panel-title h3,
html[data-theme="light"] .fm-merge-panel-title h3 {
    color: var(--theme-text-dark);
}

[data-theme="light"] .fm-merge-panel-title p,
html[data-theme="light"] .fm-merge-panel-title p {
    color: var(--theme-text-secondary);
}

[data-theme="light"] .fm-merge-section,
html[data-theme="light"] .fm-merge-section {
    background: var(--theme-bg-secondary);
    border-color: var(--theme-border-solid);
}

[data-theme="light"] .fm-merge-section-header,
html[data-theme="light"] .fm-merge-section-header {
    background: var(--theme-bg-tertiary);
    border-bottom-color: var(--theme-border-solid);
    color: var(--theme-text-dark);
}

[data-theme="light"] .fm-merge-info,
html[data-theme="light"] .fm-merge-info {
    background: rgba(59, 130, 246, 0.06);
    border-bottom-color: rgba(59, 130, 246, 0.12);
    color: var(--theme-text-secondary);
}

[data-theme="light"] .fm-merge-table thead th,
html[data-theme="light"] .fm-merge-table thead th {
    background: var(--theme-bg-tertiary);
    color: var(--theme-text-medium);
    border-bottom-color: var(--theme-border-solid);
}

[data-theme="light"] .fm-merge-table tbody tr:hover,
html[data-theme="light"] .fm-merge-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.04);
}

[data-theme="light"] .fm-merge-table tbody tr.selected,
html[data-theme="light"] .fm-merge-table tbody tr.selected {
    background: rgba(59, 130, 246, 0.08);
}

[data-theme="light"] .fm-merge-table tbody td,
html[data-theme="light"] .fm-merge-table tbody td {
    color: var(--theme-text-dark);
    border-bottom-color: var(--theme-border-solid);
}

[data-theme="light"] .fm-merge-table .fm-status-badge.completed,
html[data-theme="light"] .fm-merge-table .fm-status-badge.completed {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

[data-theme="light"] .fm-merge-table .fm-status-badge.running,
html[data-theme="light"] .fm-merge-table .fm-status-badge.running {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

[data-theme="light"] .fm-merge-panel-footer,
html[data-theme="light"] .fm-merge-panel-footer {
    background: var(--theme-bg-tertiary);
    border-top-color: var(--theme-border-solid);
}

/* =============================================================================
   Validation Styles
   ============================================================================= */
/* Specific override for CreateInv modal validation with ID selector to beat existing !important */
#CreateInv .forensicsInput.ng-invalid,
#CreateInv .forensicsTexArea.ng-invalid,
.forensicsInput.ng-invalid,
.forensicsTexArea.ng-invalid,
.forensicsInput.fm-input-error,
.forensicsTexArea.fm-input-error {
    border: 1px solid #f85149 !important;
    /* using var(--fm-accent-red) color */
}

#CreateInv .ng-invalid-color,
.ng-invalid-color {
    color: #f85149 !important;
}

/* =============================================================================
   Users Modal - Ensure proper z-index and visibility
   ============================================================================= */
#usersModal.modal {
    z-index: 10500 !important;
}

#usersModal+.modal-backdrop {
    z-index: 10400 !important;
}

#usersModal .modal-dialog {
    z-index: 10600 !important;
}

.fm-details-container {
    padding-left: 25px;
    padding-top: 6px;
}

/* =============================================================
 * Forensics Detail Layout — horizontal / vertical tabs + overflow
 * dropdown. Ported from the standalone TR Forensics analyzer
 * (.fm-detail-layout / .h-more-wrap / .rail).
 * ============================================================= */

.fm-detail-layout {
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* Lift the whole layout above page content so the overflow
       dropdown (anchored under .h-more-wrap) is never hidden behind
       cards rendered later in the DOM. .fm-tabs-navbar creates its
       own stacking context via backdrop-filter, so this container
       z-index has to win at the parent level. */
    position: relative;
    z-index: 50;
}

.fm-detail-layout .fm-tabs-container {
    position: relative;
    z-index: 60;
}

/* Make the horizontal track measurable for overflow detection. */
.fm-detail-layout .fm-tabs-navbar {
    position: relative;
    overflow: visible;
    z-index: 60;
}

.fm-detail-layout .fm-tabs-track {
    overflow: hidden;
    flex: 1 1 auto;
    min-width: 0;
}

.fm-detail-layout .hidden-overflow {
    display: none !important;
}

/* "More" button + overflow dropdown */
.fm-detail-layout .h-more-wrap {
    position: relative;
    display: none;
    align-items: stretch;
    flex: 0 0 auto;
    margin-left: 6px;
}

.fm-detail-layout .h-more-wrap.has-overflow {
    display: inline-flex;
}

.fm-detail-layout .h-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    color: #b0b8c1;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.fm-detail-layout .h-more:hover,
.fm-detail-layout .h-more.is-open {
    color: #e6edf3;
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(60, 68, 78, 0.8);
}

.fm-detail-layout .h-more.has-active {
    color: #58a6ff;
    border-color: rgba(59, 130, 246, 0.4);
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0.1) 100%);
}

.fm-detail-layout .h-more i {
    font-size: 13px;
    opacity: 0.8;
}

.fm-detail-layout .h-more-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 600;
    color: var(--fm-text-primary, #e6edf3);
    background: rgba(139, 148, 158, 0.25);
    border-radius: 9px;
}

.fm-detail-layout .h-more.has-active .h-more-count {
    background: rgba(59, 130, 246, 0.35);
    color: #58a6ff;
}

/* The overflow menu is portalled to <body> when opened so it can
   escape ancestor backdrop-filter/transform stacking contexts.
   Rules below are intentionally NOT scoped under .fm-detail-layout
   because, once portalled, the menu lives directly under <body>. */
.h-overflow-menu {
    position: fixed;
    left: 0;
    top: 0;
    display: none;
    flex-direction: column;
    gap: 2px;
    min-width: 240px;
    padding: 6px;
    background: #1c2530;
    border: 1px solid rgba(88, 166, 255, 0.35);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.4);
    z-index: 10000;
}

/* Invisible hover-bridge so cursor can move from button to menu. */
.h-overflow-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
    background: transparent;
}

.h-overflow-menu.is-open {
    display: flex;
}

.h-overflow-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: #b0b8c1;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.h-overflow-item:hover {
    color: #e6edf3;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(60, 68, 78, 0.7);
}

.h-overflow-item.is-active {
    color: #ffffff;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.22) 0%, rgba(59, 130, 246, 0.13) 100%);
    border-color: rgba(59, 130, 246, 0.45);
}

.h-overflow-item .fm-tab-icon-img {
    width: 16px;
    height: 16px;
    opacity: 0.85;
}

.h-overflow-item .fm-tab-icon {
    font-size: 14px;
    opacity: 0.85;
}

/* Layout-switch button (lives in both the horizontal tab bar
   and the vertical rail header). */
.fm-detail-layout .layout-switch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #b0b8c1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.fm-detail-layout .layout-switch-btn:hover {
    color: #e6edf3;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(60, 68, 78, 0.85);
}

.fm-detail-layout .layout-switch-btn i {
    font-size: 14px;
}

/* Shell body: 1 column horizontally, rail + main vertically. */
.fm-detail-layout .detail-shell-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    min-width: 0;
}

.fm-detail-layout[data-layout="vertical"] .detail-shell-body {
    grid-template-columns: minmax(232px, 232px) minmax(0, 1fr);
    align-items: start;
}

.fm-detail-layout[data-layout="vertical"] > .fm-tabs-container {
    display: none;
}

/* In Artefact mode the evidence tab bar is hidden entirely and the
   layout is forced vertical (the rail carries artefact categories). */
.fm-detail-layout[data-view-mode="artefact"] > .fm-tabs-container {
    display: none;
}

/* Hide the artefacts page's built-in sidebar when the parent rail
   already shows the categories (otherwise we'd render them twice). */
.fm-detail-layout[data-view-mode="artefact"] .fm-artefacts-sidebar {
    display: none;
}

.fm-detail-layout[data-view-mode="artefact"] .fm-artefacts-layout {
    grid-template-columns: 1fr !important;
    display: block !important;
}

.fm-detail-layout[data-view-mode="artefact"] .fm-artefacts-main {
    width: 100%;
}

/* =============================================================
 * fm-inline-edit — hover-to-reveal pencil that turns a label into
 * an inline input. Used on the investigation name in both the list
 * and the details header (variant="header").
 * ============================================================= */
.fm-inline-edit {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
}

/* While editing the directive needs to span its container so the
   meta-row (note + counter) wraps neatly under the form. */
.fm-inline-edit.is-editing {
    display: flex;
    width: 100%;
}

.fm-inline-edit-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    border-radius: 6px;
    padding: 2px 4px;
    margin: -2px -4px;
    transition: background-color 0.15s ease;
}

.fm-inline-edit-display:hover {
    background: rgba(255, 255, 255, 0.04);
}

.fm-inline-edit-text {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: text;
    color: inherit;
    font: inherit;
}

.fm-inline-edit-trigger {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8b949e;
    border-radius: 4px;
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.fm-inline-edit-display:hover .fm-inline-edit-trigger,
.fm-inline-edit-trigger:focus-visible {
    opacity: 0.85;
}

.fm-inline-edit-trigger:hover {
    color: #e6edf3;
    background: rgba(255, 255, 255, 0.06);
    opacity: 1;
}

.fm-inline-edit-trigger i {
    font-size: 11px;
}

.fm-inline-edit-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

.fm-inline-edit-input {
    flex: 1 1 auto;
    min-width: 120px;
    height: 32px;
    padding: 4px 10px;
    border: 1px solid rgba(88, 166, 255, 0.4);
    border-radius: 6px;
    background: rgba(13, 17, 23, 0.7);
    color: var(--fm-text-primary, #e6edf3);
    font: inherit;
    line-height: 1.2;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fm-inline-edit-input:focus {
    border-color: rgba(88, 166, 255, 0.85);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

.fm-inline-edit.has-error .fm-inline-edit-input {
    border-color: rgba(248, 81, 73, 0.7);
    box-shadow: 0 0 0 3px rgba(248, 81, 73, 0.15);
}

.fm-inline-edit-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.fm-inline-edit-btn i {
    font-size: 12px;
}

.fm-inline-edit-save {
    color: #58a6ff;
    background: rgba(54, 127, 211, 0.16);
    border-color: rgba(54, 127, 211, 0.4);
}

.fm-inline-edit-save:hover:not([disabled]) {
    color: #ffffff;
    background: rgba(54, 127, 211, 0.32);
    border-color: rgba(88, 166, 255, 0.7);
}

.fm-inline-edit-save[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.fm-inline-edit-cancel {
    color: #b0b8c1;
    border-color: rgba(60, 68, 78, 0.65);
}

.fm-inline-edit-cancel:hover:not([disabled]) {
    color: #f85149;
    background: rgba(248, 81, 73, 0.12);
    border-color: rgba(248, 81, 73, 0.4);
}

/* Helper note + character counter that lives under an input or
   textarea (e.g. in the create-investigation wizard). Independent
   from the inline-edit widget so it can be dropped into any form. */
.fm-input-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--fm-text-muted, #8b949e);
    line-height: 1.3;
}

.fm-input-meta-note {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fm-input-meta-note.is-error {
    color: #f85149;
    font-weight: 600;
}

.fm-input-meta-note.is-limit {
    color: #d29922;
}

.fm-input-meta-counter {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    font-family: var(--tr-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
    color: var(--fm-text-muted, #8b949e);
    transition: color 0.15s ease;
}

.fm-input-meta-counter.is-error {
    color: #f85149;
    font-weight: 600;
}

.fm-input-meta-counter.is-limit {
    color: #d29922;
    font-weight: 600;
}

[data-theme="light"] .fm-input-meta,
html[data-theme="light"] .fm-input-meta,
[data-theme="light"] .fm-input-meta-counter,
html[data-theme="light"] .fm-input-meta-counter {
    color: #6b7280;
}

/* Meta row: help text on the left, character counter on the right.
   Sits under the input while editing. Mirrors the reference
   .fm-page-title-edit-meta. */
.fm-inline-edit-meta {
    width: 100%;
    flex-basis: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--fm-text-muted, #8b949e);
    line-height: 1.3;
}

.fm-inline-edit-note {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fm-inline-edit-note.is-error {
    color: #f85149;
    font-weight: 600;
}

.fm-inline-edit-note.is-limit {
    color: #d29922;
}

.fm-inline-edit-counter {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    font-family: var(--tr-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
    color: var(--fm-text-muted, #8b949e);
    transition: color 0.15s ease;
}

.fm-inline-edit-counter.is-limit {
    color: #d29922;
    font-weight: 600;
}

/* Header variant: sits in place of an h1 in the page header. */
.fm-inline-edit[data-variant="header"] {
    display: flex;
    width: 100%;
    min-width: 0;
}

.fm-inline-edit[data-variant="header"] .fm-inline-edit-display,
.fm-inline-edit[data-variant="header"] .fm-inline-edit-form {
    width: 100%;
}

.fm-inline-edit[data-variant="header"] .fm-inline-edit-text {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--fm-text-primary, #e6edf3);
    letter-spacing: -0.01em;
}

.fm-inline-edit[data-variant="header"] .fm-inline-edit-input {
    height: 36px;
    font-size: 16px;
    font-weight: 600;
}

.fm-inline-edit[data-variant="header"] .fm-inline-edit-btn {
    width: 36px;
    height: 36px;
}

/* Row variant inside the investigations list. */
.fm-investigation-name .fm-inline-edit {
    width: 100%;
}

.fm-investigation-name .fm-inline-edit-text {
    color: var(--fm-text-primary, #e6edf3);
    font-weight: 600;
}

/* Light theme */
[data-theme="light"] .fm-inline-edit-display:hover,
html[data-theme="light"] .fm-inline-edit-display:hover {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .fm-inline-edit-input,
html[data-theme="light"] .fm-inline-edit-input {
    background: #ffffff;
    color: #1f2937;
    border-color: rgba(29, 78, 216, 0.4);
}

[data-theme="light"] .fm-inline-edit-trigger,
html[data-theme="light"] .fm-inline-edit-trigger {
    color: #6b7280;
}

[data-theme="light"] .fm-inline-edit-trigger:hover,
html[data-theme="light"] .fm-inline-edit-trigger:hover {
    color: #111827;
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .fm-inline-edit-meta,
html[data-theme="light"] .fm-inline-edit-meta,
[data-theme="light"] .fm-inline-edit-counter,
html[data-theme="light"] .fm-inline-edit-counter {
    color: #6b7280;
}

/* =============================================================
 * Forensics Page Header (Investigation title + actions)
 * Replaces the old inline .details-custom-btn !important block.
 * ============================================================= */
.fm-details-container>div>.fm-page-header,
.fm-page-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 6px 6px 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(60, 68, 78, 0.45);
    min-width: 0;
}

.fm-page-header-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.fm-page-header-eyebrow {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8b949e;
}

.fm-page-header-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--fm-text-primary, #e6edf3);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.fm-page-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.fm-page-header-divider {
    display: inline-block;
    width: 1px;
    height: 24px;
    background: rgba(60, 68, 78, 0.6);
    margin: 0 6px;
    flex: 0 0 auto;
}

/* Header button (Time / Settings / Rescan) */
.fm-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid rgba(60, 68, 78, 0.65);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    color: #c9d1d9;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
}

.fm-header-btn:hover,
.fm-header-btn:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(88, 166, 255, 0.45);
    text-decoration: none;
    outline: none;
}

.fm-header-btn i {
    font-size: 13px;
    opacity: 0.8;
}

.fm-header-btn:hover i {
    opacity: 1;
}

.fm-header-btn-chevron {
    font-size: 10px !important;
    opacity: 0.55;
    margin-left: 2px;
}

.fm-header-btn-primary {
    color: #58a6ff;
    background: rgba(54, 127, 211, 0.16);
    border-color: rgba(54, 127, 211, 0.45);
}

.fm-header-btn-primary:hover,
.fm-header-btn-primary:focus {
    color: #ffffff;
    background: rgba(54, 127, 211, 0.28);
    border-color: rgba(88, 166, 255, 0.7);
    box-shadow: 0 0 10px rgba(54, 127, 211, 0.18);
}

.fm-header-btn-group {
    position: relative;
    display: inline-flex;
}

/* Page-level mode switch (Evidence | Artefact) */
.fm-mode-switch {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 3px;
    border: 1px solid rgba(60, 68, 78, 0.65);
    border-radius: 9px;
    background: rgba(20, 26, 34, 0.55);
}

.fm-mode-switch button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: #8b949e;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

.fm-mode-switch button i {
    font-size: 11px;
    opacity: 0.85;
}

.fm-mode-switch button:hover {
    color: #e6edf3;
    background: rgba(255, 255, 255, 0.04);
}

.fm-mode-switch button.is-active {
    color: #ffffff;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.32) 0%, rgba(59, 130, 246, 0.18) 100%);
    box-shadow: 0 0 0 1px rgba(88, 166, 255, 0.35) inset;
}

.fm-mode-switch button.is-active i {
    opacity: 1;
}

/* Light-theme overrides for the new header */
[data-theme="light"] .fm-page-header,
html[data-theme="light"] .fm-page-header {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .fm-page-header-name,
html[data-theme="light"] .fm-page-header-name {
    color: #1f2937;
}

[data-theme="light"] .fm-header-btn,
html[data-theme="light"] .fm-header-btn {
    color: #4b5563;
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .fm-header-btn:hover,
html[data-theme="light"] .fm-header-btn:hover {
    color: #111827;
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(29, 78, 216, 0.45);
}

[data-theme="light"] .fm-mode-switch,
html[data-theme="light"] .fm-mode-switch {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .fm-mode-switch button,
html[data-theme="light"] .fm-mode-switch button {
    color: #4b5563;
}

[data-theme="light"] .fm-mode-switch button.is-active,
html[data-theme="light"] .fm-mode-switch button.is-active {
    color: #1d4ed8;
    background: rgba(29, 78, 216, 0.12);
    box-shadow: 0 0 0 1px rgba(29, 78, 216, 0.25) inset;
}

[data-theme="light"] .fm-page-header-divider,
html[data-theme="light"] .fm-page-header-divider {
    background: rgba(0, 0, 0, 0.1);
}

/* Mode switch (small variant kept for the rail header) */
.detail-mode-switch-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8b949e;
}

.detail-mode-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid rgba(60, 68, 78, 0.85);
    background: rgba(20, 26, 34, 0.6);
    border-radius: 9px;
}

.fm-detail-layout .rail-header .detail-mode-switch {
    width: 100%;
    margin-top: 4px;
}

.detail-mode-switch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #8b949e;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease;
}

.fm-detail-layout .rail-header .detail-mode-switch-btn {
    flex: 1 1 0;
}

.detail-mode-switch-btn:hover {
    color: #e6edf3;
    background: rgba(255, 255, 255, 0.04);
}

.detail-mode-switch-btn.is-active {
    color: #58a6ff;
    background: rgba(59, 130, 246, 0.18);
}

/* Light-theme overrides for the mode switch */
[data-theme="light"] .detail-mode-switch,
html[data-theme="light"] .detail-mode-switch {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .detail-mode-switch-btn,
html[data-theme="light"] .detail-mode-switch-btn {
    color: #4b5563;
}

[data-theme="light"] .detail-mode-switch-btn.is-active,
html[data-theme="light"] .detail-mode-switch-btn.is-active {
    color: #1d4ed8;
    background: rgba(29, 78, 216, 0.1);
}

.fm-detail-layout[data-layout="horizontal"] .rail {
    display: none;
}

.fm-detail-layout .detail-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Vertical rail */
.fm-detail-layout .rail {
    position: sticky;
    top: 10px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px;
    background: var(--fm-bg-card, rgba(20, 26, 34, 0.85));
    border: 1px solid var(--fm-border-color, rgba(60, 68, 78, 0.8));
    border-radius: 14px;
    box-shadow: var(--fm-shadow-md, 0 8px 24px rgba(0, 0, 0, 0.3));
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    /* NOTE: do NOT set scrollbar-width here. In modern Chromium,
       `scrollbar-width` (any value) disables the ::-webkit-scrollbar
       pseudo-element rules below, which gives us the chunky default
       scrollbar. We rely on ::-webkit-scrollbar for Chrome/Edge and
       a separate scrollbar-color/width block for Firefox. */
}

.fm-detail-layout .rail::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.fm-detail-layout .rail::-webkit-scrollbar-track {
    background: transparent;
    margin: 8px 0;
}

.fm-detail-layout .rail::-webkit-scrollbar-thumb {
    background: rgba(139, 148, 158, 0.28);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.fm-detail-layout .rail::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 148, 158, 0.5);
    background-clip: padding-box;
    border: 2px solid transparent;
}

/* Firefox uses the standard properties */
@supports (scrollbar-color: auto) {
    @-moz-document url-prefix() {
        .fm-detail-layout .rail {
            scrollbar-width: thin;
            scrollbar-color: rgba(139, 148, 158, 0.4) transparent;
        }
    }
}

.fm-detail-layout .rail-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--fm-border-subtle, rgba(60, 68, 78, 0.4));
}

.fm-detail-layout .rail-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.fm-detail-layout .rail-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.fm-detail-layout .rail-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--fm-text-primary, #e6edf3);
    letter-spacing: -0.01em;
}

.fm-detail-layout .rail-count {
    font-size: 11px;
    color: #8b949e;
}

.fm-detail-layout .rail-header .layout-switch-btn {
    margin-left: 0;
    border-color: rgba(60, 68, 78, 0.7);
    background: rgba(255, 255, 255, 0.03);
}

.fm-detail-layout .rail-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fm-detail-layout .rail-group-label {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #8b949e;
    padding: 0 2px;
}

.fm-detail-layout .rail-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fm-detail-layout .rail-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: #b0b8c1;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.fm-detail-layout .rail-item:hover {
    color: #e6edf3;
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
}

.fm-detail-layout .rail-item.is-active {
    color: #ffffff;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.22) 0%, rgba(59, 130, 246, 0.12) 100%);
    border-color: rgba(59, 130, 246, 0.4);
}

.fm-detail-layout .rail-item-icon {
    width: 16px;
    height: 16px;
    opacity: 0.8;
    flex-shrink: 0;
    transition: opacity 0.15s ease, filter 0.15s ease;
}

.fm-detail-layout .rail-item.is-active .rail-item-icon {
    opacity: 1;
    filter: brightness(1.3) drop-shadow(0 0 4px rgba(88, 166, 255, 0.45));
}

.fm-detail-layout .rail-item i {
    font-size: 14px;
    opacity: 0.8;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.fm-detail-layout .rail-item.is-active i {
    opacity: 1;
}

.fm-detail-layout .rail-item-label {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Group-color accents on active rail items */
.fm-detail-layout .rail-group[data-color="violet"] .rail-item.is-active {
    background: linear-gradient(145deg, rgba(167, 139, 250, 0.22) 0%, rgba(167, 139, 250, 0.12) 100%);
    border-color: rgba(167, 139, 250, 0.45);
}

.fm-detail-layout .rail-group[data-color="amber"] .rail-item.is-active {
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.22) 0%, rgba(245, 158, 11, 0.12) 100%);
    border-color: rgba(245, 158, 11, 0.45);
}

.fm-detail-layout .rail-group[data-color="cyan"] .rail-item.is-active {
    background: linear-gradient(145deg, rgba(34, 211, 238, 0.22) 0%, rgba(34, 211, 238, 0.12) 100%);
    border-color: rgba(34, 211, 238, 0.45);
}

.fm-detail-layout .rail-group[data-color="coral"] .rail-item.is-active {
    background: linear-gradient(145deg, rgba(248, 113, 113, 0.22) 0%, rgba(248, 113, 113, 0.12) 100%);
    border-color: rgba(248, 113, 113, 0.45);
}

/* Light-theme overrides — keep parity with rest of the page. */
[data-theme="light"] .h-overflow-menu,
html[data-theme="light"] .h-overflow-menu,
[data-theme="light"] .fm-detail-layout .rail,
html[data-theme="light"] .fm-detail-layout .rail {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .h-overflow-item,
html[data-theme="light"] .h-overflow-item,
[data-theme="light"] .fm-detail-layout .rail-item,
html[data-theme="light"] .fm-detail-layout .rail-item,
[data-theme="light"] .fm-detail-layout .h-more,
html[data-theme="light"] .fm-detail-layout .h-more,
[data-theme="light"] .fm-detail-layout .layout-switch-btn,
html[data-theme="light"] .fm-detail-layout .layout-switch-btn {
    color: #4b5563;
}

[data-theme="light"] .fm-detail-layout .rail-title,
html[data-theme="light"] .fm-detail-layout .rail-title {
    color: #1f2937;
}