/* Threadlinqs Intelligence - Black + Pastel Command Center */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Surfaces */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-surface: #111111;
    --bg-surface-alt: #0e0e0e;
    --bg-elevated: #1a1a1a;
    --bg-tertiary: #1a1a1a;
    --bg-card: #141414;
    --bg-hover: #1e1e1e;
    --bg-active: #222222;

    /* Typography */
    --text-primary: #f0f0f0;
    --text-secondary: #888888;
    --text-muted: #555555;

    /* Borders */
    --border-color: #222222;
    --border-light: #333333;
    --border-active: #444444;

    /* Accents */
    --accent-primary: #f0f0f0;
    --accent-blue: #7dd3fc;
    --accent-green: #a8e6cf;
    --accent-purple: #c4b5fd;
    --highlight-bg: rgba(253, 186, 116, 0.2);
    --highlight-text: #fdba74;

    /* Severity — pastel spectrum */
    --severity-critical: #fda4af;
    --severity-high: #fdba74;
    --severity-medium: #c4b5fd;
    --severity-low: #a8e6cf;

    /* Detection languages */
    --det-spl: #a8e6cf;
    --det-kql: #c4b5fd;
    --det-sigma: #7dd3fc;

    /* Status */
    --status-active: #fda4af;
    --status-monitoring: #fdba74;
    --status-resolved: #a8e6cf;

    /* Layout */
    --sidebar-width: 240px;
    --detail-width: 720px;
    --header-height: 56px;

    /* Zero radius — sharp edges throughout */
    --radius-sm: 0;
    --radius-md: 0;
    --radius-lg: 0;

    /* Fonts */
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Monaco', monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Shadows — subtle on near-black */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #0a0a0a;
    border-bottom: 1px solid #1e1e1e;
    padding: 0 12px;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
}

.mobile-menu-btn,
.mobile-filter-btn {
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid #1e1e1e;
    border-radius: 0;
    color: #737373;
    font-family: var(--font-mono);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.mobile-menu-btn:active,
.mobile-filter-btn:active {
    color: #e8e8e8;
    border-color: #c4b5fd;
}

.mobile-filter-btn {
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* Sidebar */
/* Sidebar — terminal aesthetic per mockup */
.sidebar {
    width: var(--sidebar-width);
    background: #0a0a0a;
    border-right: 1px solid #1e1e1e;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 200;
}

.sidebar-close {
    display: none;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: #525252;
    font-size: 20px;
    cursor: pointer;
}

.sidebar-header {
    padding: 24px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 4px;
}

.logo-prompt {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    color: #c4b5fd;
}

.logo-subtitle {
    font-family: var(--font-mono);
    font-size: 11px;
    font-style: italic;
    font-weight: 400;
    color: #c4b5fd;
    width: 100%;
    padding-left: 20px;
    margin-top: -6px;
    letter-spacing: 1px;
}

.logo-icon { display: none; }

.logo-text {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 500;
    color: #e8e8e8;
}

.sidebar-nav {
    flex: 1;
    padding: 0 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-section {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-section-title {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: normal;
    color: #737373;
    letter-spacing: 0;
    text-transform: none;
    padding: 0 8px;
    margin-bottom: 0;
    margin-top: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    height: 32px;
    border-radius: 0;
    color: #737373;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: normal;
    transition: all 0.15s ease;
    cursor: pointer;
}

/* Intelligence section items are taller */
.nav-section:first-child .nav-item {
    height: 36px;
    font-size: 13px;
}

.nav-item:hover {
    background: #161616;
    color: #e8e8e8;
}

.nav-item.active {
    background: #161616;
    color: #e8e8e8;
}

.nav-item.active .nav-count {
    color: #c4b5fd;
}

.nav-icon { display: none; }

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #7c3aed;
    flex-shrink: 0;
}

/* Intelligence section dots are slightly larger */
.nav-section:first-child .nav-dot {
    width: 10px;
    height: 10px;
}

.nav-label {
    flex: 1;
    color: #a0a0a0;
}

.nav-item:hover .nav-label {
    color: #e8e8e8;
}

.nav-item.active .nav-label {
    color: #e8e8e8;
}

.nav-count {
    font-family: var(--font-mono);
    font-size: 11px;
    background: none;
    padding: 0;
    border-radius: 0;
    color: #737373;
}

.nav-badge { display: none; }

.sidebar-footer {
    display: none;
}
.topbar-plan-btn {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 4px 12px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid;
}

.stats-mini {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #525252;
}

.stats-mini .dot {
    margin: 0 6px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 150;
}

/* Main Content — matches mockup: bg #0a0a0a, padding 24px 32px */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
    background: #0a0a0a;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 0;
}

/* Hide old header — mockup has no "Threat Intelligence" heading */
.main-header {
    display: none;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-container {
    position: relative;
}

.search-input {
    width: 220px;
    padding: 10px 16px 10px 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.15s ease;
}

.search-input:focus {
    border-color: var(--border-light);
    background: var(--bg-card);
}

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

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--text-muted);
}

.advanced-search-btn {
    padding: 10px 16px;
    background: var(--accent-blue);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.advanced-search-btn:hover {
    background: #5ab8e6;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 24px 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all 0.15s ease;
}

.stat-card:hover {
    border-color: var(--border-light);
}

.stat-card.critical {
    border-left: 3px solid var(--severity-critical);
}

.stat-card.high {
    border-left: 3px solid var(--severity-high);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Filters Section */
.filters-section {
    display: none;
    padding: 0 32px;
    margin-bottom: 16px;
}

.filters-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.filters-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.filters-toggle-icon {
    font-size: 16px;
}

.filters-toggle-text {
    flex: 1;
    text-align: left;
}

.filters-toggle-arrow {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.filters-toggle-arrow.open {
    transform: rotate(180deg);
}

.filters-panel {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0;
    padding: 20px;
}

.filters-panel.open {
    display: block;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.filter-select {
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

.filter-select:focus {
    border-color: var(--accent-blue);
}

.filters-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.filter-btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-btn-clear {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.filter-btn-clear:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.filter-results {
    font-size: 13px;
    color: var(--text-muted);
}

/* Threats Section */
.threats-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 32px 24px;
}

.section-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
}

.sort-select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

/* Threat feed — mockup: 1px gap between rows, padding 0 32px */
.threats-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 0 32px;
}

/* Threat Card */
.threat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.threat-card:hover {
    border-color: var(--border-light);
    background: var(--bg-hover);
}

.threat-card.active {
    border-color: var(--accent-blue);
}

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

.threat-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Threat ID — mockup: #737373, JetBrains Mono 12px, normal weight */
.threat-id {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: normal;
    color: #737373;
}

/* Severity badge — mockup: 10px 600 text, padding 2px 8px, colored text on 10% bg */
.severity-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0;
}

.severity-badge.critical {
    background: rgba(253, 164, 175, 0.1);
    color: #fda4af;
}

.severity-badge.high {
    background: rgba(253, 186, 116, 0.1);
    color: #fdba74;
}

.severity-badge.medium {
    background: rgba(253, 230, 138, 0.1);
    color: #fde68a;
}

.severity-badge.low {
    background: rgba(168, 230, 207, 0.1);
    color: #a8e6cf;
}

/* Status badge — mockup: ACTIVE in mint green on 10% bg */
.status-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: normal;
    padding: 2px 8px;
    border-radius: 0;
    text-transform: uppercase;
}

.status-badge.active-status {
    background: rgba(168, 230, 207, 0.1);
    color: #a8e6cf;
}

.status-badge.monitoring-status {
    background: rgba(253, 186, 116, 0.1);
    color: #fdba74;
}

.status-badge.resolved-status {
    background: rgba(125, 211, 252, 0.1);
    color: #7dd3fc;
}

.status-badge.active_exploitation-status {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

.status-badge.research-status {
    background: rgba(196, 181, 253, 0.1);
    color: #c4b5fd;
}

.status-badge.patched-status {
    background: rgba(125, 211, 252, 0.15);
    color: #7dd3fc;
}

.status-badge.disrupted-status {
    background: rgba(253, 224, 71, 0.1);
    color: #fde047;
}

.threat-row-rl-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    background: rgba(196, 181, 253, 0.15);
    color: #c4b5fd;
    text-transform: none;
    letter-spacing: 0.5px;
}

[data-theme="light"] .threat-row-rl-badge {
    background: rgba(139, 92, 246, 0.12);
    color: #7c3aed;
}

.threat-card-date {
    font-size: 12px;
    color: var(--text-muted);
}

.threat-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.threat-card-summary {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.threat-card-footer {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.threat-tag {
    font-size: 11px;
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border-radius: 0;
    color: var(--text-secondary);
}

.threat-tag.mitre {
    background: rgba(125, 211, 252, 0.15);
    color: var(--accent-blue);
}

.detection-count {
    font-size: 11px;
    padding: 4px 8px;
    background: rgba(168, 230, 207, 0.15);
    color: var(--accent-green);
    border-radius: 0;
    margin-left: auto;
}

.view-count {
    font-size: 11px;
    padding: 4px 8px;
    background: rgba(125, 211, 252, 0.15);
    color: var(--accent-blue);
    border-radius: 0;
}

.popularity-badge {
    font-size: 14px;
    margin-left: 4px;
}

/* Research Lab Tag - for threats created via Research Lab */
.research-lab-tag {
    background: linear-gradient(135deg, rgba(168, 230, 207, 0.3), rgba(168, 230, 207, 0.15));
    color: white;
    padding: 2px 8px;
    border-radius: 0;
    font-size: 11px;
    font-weight: 600;
}

/* Advanced Search Modal */
.search-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 400;
}

.search-modal.open {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10vh;
}

.search-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.8);
}

.search-modal-content {
    position: relative;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.search-modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.search-modal-input-wrap {
    position: relative;
    padding: 16px 24px;
}

.search-modal-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    transition: all 0.15s ease;
}

.search-modal-input:focus {
    border-color: var(--accent-blue);
}

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

.search-modal-icon {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-muted);
}

.search-modal-hint {
    padding: 0 24px 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.search-modal-results {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 24px;
}

.search-result-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.search-result-item:hover {
    border-color: var(--accent-blue);
    background: var(--bg-hover);
}

.search-result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.search-result-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.search-result-snippet {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.search-result-snippet mark {
    background: var(--highlight-bg);
    color: var(--highlight-text);
    padding: 1px 4px;
    border-radius: 0;
}

.search-result-count {
    padding: 8px 16px;
    font-size: 12px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.search-no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* Detail Modal */
.detail-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
}

.detail-modal.open {
    display: flex;
    justify-content: center;
    align-items: center;
}

.detail-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
}

/* ===== DETAIL PANEL (dp-*) ===== */
.detail-panel {
    position: relative;
    width: 90%;
    max-width: 860px;
    max-height: 90vh;
    background: #0a0a0a;
    border: 1px solid #1e1e1e;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Detail Header — mockup: padding 24px 32px, bottom border */
.dp-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 32px;
    border-bottom: 1px solid #1e1e1e;
}
.detail-header { display: none; }

.dp-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dp-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-id {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: #fdba74;
}

.dp-sev-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    text-transform: uppercase;
}

.close-btn {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: normal;
    color: #525252;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: static;
    width: auto;
    height: auto;
}

.close-btn:hover {
    color: #e8e8e8;
    background: none;
}

.share-btn {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #525252;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.share-btn:hover { color: #e8e8e8; }

.detail-title {
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 700;
    color: #e8e8e8;
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

.dp-date-row {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 12px;
}

.dp-date-row .dp-date { color: #525252; }
.dp-date-row .dp-actor { color: #c4b5fd; }

/* ===== 8-TAB BAR — scrollable overflow ===== */
.dp-tabs {
    display: flex;
    padding: 0 32px;
    border-bottom: 1px solid #1e1e1e;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    flex-wrap: nowrap;
    flex-shrink: 0;
}
.dp-tabs::-webkit-scrollbar {
    display: none;
}

.dp-tab {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: normal;
    color: #525252;
    padding: 12px 6px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease;
    flex-shrink: 0;
}

.dp-tab:hover { color: #a0a0a0; }

.dp-tab.active {
    color: #e8e8e8;
    font-weight: 500;
    border-bottom-color: #c4b5fd;
}

.detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
}

/* ===== SECTION LABELS — comment style per mockup ===== */
.dp-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: normal;
    color: #525252;
    margin-bottom: 0;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section-title {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: normal;
    color: #525252;
    letter-spacing: 0;
    margin-bottom: 8px;
    text-transform: none;
}

.detail-section-content {
    font-family: var(--font-sans);
    font-size: 14px;
    color: #a0a0a0;
    line-height: 1.65;

}

.detail-section-content p {
    margin: 0 0 10px 0;
}

.detail-section-content p:last-child {
    margin-bottom: 0;
}

.desc-cve {
    color: #fda4af;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    background: rgba(253, 164, 175, 0.08);
    padding: 1px 5px;
}

.desc-cve-clickable { cursor: pointer; }
.desc-cve-clickable:hover { background: rgba(253, 164, 175, 0.18); text-decoration: underline; }

.desc-cwe {
    color: #fdba74;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    background: rgba(253, 186, 116, 0.08);
    padding: 1px 5px;
}

.desc-cwe-clickable { cursor: pointer; }
.desc-cwe-clickable:hover { background: rgba(253, 186, 116, 0.18); text-decoration: underline; }

.desc-technique {
    color: #c4b5fd;
    font-family: var(--font-mono);
    font-size: 13px;
    background: rgba(196, 181, 253, 0.08);
    padding: 1px 5px;
}

.desc-ip {
    color: #7dd3fc;
    font-family: var(--font-mono);
    font-size: 12px;
    background: rgba(125, 211, 252, 0.08);
    padding: 1px 5px;
}

.desc-defang {
    color: #fdba74;
    font-weight: 600;
}

.desc-hash {
    color: #86efac;
    font-family: var(--font-mono);
    font-size: 11.5px;
    background: rgba(134, 239, 172, 0.08);
    padding: 1px 5px;
    word-break: break-all;
}

.desc-hr {
    border: none;
    border-top: 1px solid #333;
    margin: 20px 0;
}

.desc-heading {
    font-family: var(--font-mono);
    margin: 16px 0 8px;
}

.desc-h2 {
    font-size: 0.95rem;
    color: #c4b5fd;
}

.desc-h3 {
    font-size: 0.85rem;
    color: #a5b4fc;
    font-weight: 600;
}

.detail-section-content code {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #a8e6cf;
    background: rgba(168, 230, 207, 0.08);
    padding: 1px 5px;
}

/* ===== METADATA GRID — 2-col asymmetric (left: CVSS/Coverage/IOC, right: Exploitability spanning) ===== */
.detail-meta-grid {
    display: flex;
    gap: 0;
    border: 1px solid #1a1a1a;
    overflow: hidden;
}

.detail-meta-item.exploit-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.detail-meta-item {
    flex: 1;
    background: #111111;
    padding: 10px 14px;
    border-right: 1px solid #1a1a1a;
    text-align: center;
    min-width: 0;
}

.detail-meta-item:last-child {
    border-right: none;
}

.detail-meta-label {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: normal;
    color: #525252;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.detail-meta-value {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
}

.detail-meta-value.cvss-val {
    font-size: 15px;
    font-weight: 700;
    color: #fda4af;
}

.detail-meta-value.exploit-val { color: #fda4af; }
.detail-meta-value.coverage-val { color: #a8e6cf; }
.detail-meta-value.ioc-val { color: #fdba74; }

/* ===== ATTRIBUTION / AFFECTED GRIDS — 3-column ===== */
.dp-attr-grid {
    display: flex;
    gap: 1px;
}

.dp-attr-cell {
    flex: 1;
    background: #111111;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dp-attr-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: normal;
    color: #525252;
}

.dp-attr-value {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    color: #e8e8e8;
}

.dp-attr-value.actor { color: #c4b5fd; }

/* ===== MITRE KILL CHAIN (DETAIL) — full width, 12px height per mockup ===== */
.dp-killchain {
    display: flex;
    gap: 2px;
    width: 100%;
}

.dp-kc-cell {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.dp-kc-bar {
    width: 100%;
    height: 12px;
    background: #333333;
}

.dp-kc-bar.active { background: #c4b5fd; }

.dp-kc-label {
    font-family: var(--font-mono);
    font-size: 8px;
    font-weight: normal;
    color: #525252;
}

.dp-kc-bar.active + .dp-kc-label,
.dp-kc-cell.active .dp-kc-label { color: #737373; }

/* ===== TECHNIQUE LIST ===== */
.dp-technique-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 12px;
}

.dp-technique-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
}

.dp-technique-row:nth-child(odd) { background: #111111; }
.dp-technique-row:nth-child(even) { background: #0e0e0e; }

.dp-technique-id {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: normal;
    color: #7dd3fc;
}

.dp-technique-name {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: normal;
    color: #a0a0a0;
}

/* ===== TIMELINE ===== */
.dp-timeline-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #1a1a1a;
}

.dp-timeline-row:last-child { border-bottom: none; }

.dp-tl-date {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: normal;
    color: #525252;
    width: 100px;
    flex-shrink: 0;
    padding-top: 2px;
}

.dp-tl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}

.dp-tl-text {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: normal;
    color: #a0a0a0;
}

.dp-tl-content { flex: 1; }
.dp-tl-nested { margin-top: 8px; padding-left: 12px; border-left: 1px solid #333; }
.dp-tl-sub-section { margin-bottom: 6px; }
.dp-tl-sub-label { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted, #525252); margin-right: 8px; }
.dp-tl-sub-item { display: inline-block; font-size: 11px; padding: 2px 6px; margin: 2px 4px 2px 0; background: var(--bg-surface, #1a1a1a); text-decoration: none; }
.dp-tl-sub-item.technique { color: #c4b5fd; }
.dp-tl-sub-item.tag { color: #7dd3fc; }
.dp-tl-sub-item.actor { color: #fda4af; }
.dp-tl-sub-item.ref { color: #a8e6cf; }
.dp-tl-sub-item.ref:hover { text-decoration: underline; }
.dp-tl-source-row { margin-top: 4px; }
.dp-tl-source-link {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #7dd3fc;
    text-decoration: none;
    padding: 2px 8px;
    background: #7dd3fc0d;
    border-left: 2px solid #7dd3fc;
    transition: color 0.2s, background 0.2s;
}
.dp-tl-source-link:hover { color: #bae6fd; background: #7dd3fc1a; text-decoration: underline; }
.dp-tl-source {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #666;
    padding: 2px 8px;
    background: rgba(255,255,255,0.03);
    border-left: 2px solid #444;
}
.dp-tl-sub-item.ioc { color: #fde68a; }

/* ===== TAGS — per mockup: #1e1e1e pills, #737373 text ===== */
.dp-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: normal;
    color: #737373;
    background: #1e1e1e;
    padding: 4px 10px;
    margin: 0 6px 6px 0;
}

/* ===== REFERENCES ===== */
.dp-ref-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
}

.dp-ref-row:nth-child(odd) { background: #111111; }
.dp-ref-row:nth-child(even) { background: #0e0e0e; }

/* ===== MUTED TEXT ===== */
.dp-muted-text { color: #525252; }

.dp-ref-type {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
}

.dp-ref-title {
    font-family: var(--font-sans);
    font-size: 12px;
    color: #7dd3fc;
    text-decoration: none;
}

.dp-ref-title:hover { color: #e8e8e8; }

.dp-ref-agent {
    font-family: var(--font-mono);
    font-size: 10px;
    opacity: 0.6;
    margin-left: auto;
    flex-shrink: 0;
}

/* ===== OVERVIEW TAB LAYOUT ===== */
.dp-overview {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px 32px;
}

.dp-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dp-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dp-refs-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.dp-timeline-list {
    display: flex;
    flex-direction: column;
}

.dp-attr-value.dp-inter {
    font-family: var(--font-sans);
    font-weight: normal;
}

/* Coverage bar per mockup */
.dp-coverage-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dp-cov-bar-bg {
    width: 60px;
    height: 6px;
    background: #1e1e1e;
}

.dp-cov-bar-fill {
    height: 100%;
    background: #a8e6cf;
}

/* ===== DETECTIONS TAB ===== */
.dp-det-content {
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dp-det-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dp-det-header .dp-label { margin-bottom: 0; }

.dp-det-export {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dp-bracket-btn {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: normal;
    color: #525252;
    cursor: pointer;
    user-select: none;
}

.dp-bracket-btn:hover { color: #a0a0a0; }

.dp-det-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* Expanded detection per mockup */
.dp-det-expanded {
    border: 1px solid #1e1e1e;
    display: flex;
    flex-direction: column;
}

.dp-det-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #111111;
}

.dp-det-row-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dp-det-num {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: #c4b5fd;
}

.dp-det-title-expanded {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: #e8e8e8;
}

.dp-det-sev {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
}

/* Language tabs per mockup */
.dp-det-lang-tabs {
    display: flex;
    background: #0e0e0e;
}

.dp-lang-tab {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: normal;
    color: #525252;
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.dp-lang-tab:hover { color: #a0a0a0; }

.dp-lang-tab.active[data-lang="spl"] {
    color: #a8e6cf;
    font-weight: 500;
    border-bottom-color: #a8e6cf;
    background: #a8e6cf12;
}

.dp-lang-tab.active[data-lang="kql"] {
    color: #c4b5fd;
    font-weight: 500;
    border-bottom-color: #c4b5fd;
    background: #c4b5fd12;
}

.dp-lang-tab.active[data-lang="sigma"] {
    color: #7dd3fc;
    font-weight: 500;
    border-bottom-color: #7dd3fc;
    background: #7dd3fc12;
}

.dp-det-lang-tabs .dp-bracket-btn {
    margin-left: auto;
    padding: 10px 16px;
}

/* Code block per mockup */
.dp-det-code-wrap {
    background: #0a0a0a;
    min-height: 280px;
    max-height: 340px;
    overflow-y: auto;
}

.dp-det-code {
    display: flex;
    padding: 16px 0;
}

.dp-code-lines {
    display: flex;
    flex-direction: column;
    padding: 0 16px;
    border-right: 1px solid #1e1e1e;
    user-select: none;
}

.dp-code-lines span {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
    color: #2a2a2a;
}

.dp-code-content {
    padding: 0 20px;
    flex: 1;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
    color: #e8e8e8;
    white-space: pre;
}

/* MITRE footer per detection */
.dp-det-mitre-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #111111;
    border-top: 1px solid #1e1e1e;
}

.dp-det-mitre-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #525252;
}

.dp-det-mitre-id {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #7dd3fc;
}

.dp-det-mitre-name {
    font-family: var(--font-sans);
    font-size: 11px;
    color: #737373;
}

/* Collapsed detection per mockup */
.dp-det-collapsed {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #1e1e1e;
    cursor: pointer;
}

.dp-det-collapsed:nth-child(odd) { background: #111111; }
.dp-det-collapsed:nth-child(even) { background: #0e0e0e; }

.dp-det-collapsed:hover { background: #1a1a1a; }

.dp-det-title-collapsed {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    color: #e8e8e8;
}

.dp-det-row-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dp-det-lang-spl {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #a8e6cf;
}

.dp-det-lang-kql {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #c4b5fd;
}

.dp-det-lang-sigma {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #7dd3fc;
}

.mitre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mitre-tag {
    font-size: 12px;
    padding: 8px 12px;
    background: rgba(125, 211, 252, 0.1);
    border: 1px solid rgba(125, 211, 252, 0.3);
    border-radius: var(--radius-sm);
    color: var(--accent-blue);
}

.detection-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 14px;
}

.detection-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.detection-item-name {
    font-size: 15px;
    font-weight: 600;
}

.detection-item-severity {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 0;
}

.detection-item-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    line-height: 1.6;
}

.detection-query-wrap {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.detection-query {
    background: var(--bg-primary);
    padding: 14px;
    padding-right: 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent-green);
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.5;
}

/* Detection query type-specific backgrounds (threat detail panel) */
.detection-query.spl {
    background: linear-gradient(135deg, rgba(168, 230, 207, 0.05) 0%, var(--bg-primary) 100%);
    border-left: 3px solid var(--det-spl);
    color: var(--det-spl);
}

.detection-query.kql {
    background: linear-gradient(135deg, rgba(196, 181, 253, 0.05) 0%, var(--bg-primary) 100%);
    border-left: 3px solid var(--det-kql);
    color: var(--det-kql);
}

.detection-query.sigma {
    background: linear-gradient(135deg, rgba(125, 211, 252, 0.05) 0%, var(--bg-primary) 100%);
    border-left: 3px solid var(--det-sigma);
    color: var(--det-sigma);
}

/* Detection copy actions row */
.detection-copy-actions {
    display: flex;
    gap: 6px;
    padding: 8px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 0;
}

.copy-btn {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.copy-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.copy-btn.copied {
    background: var(--accent-green);
    color: white;
    border-color: var(--accent-green);
}

.copy-fmt-btn, .export-sigma-btn {
    padding: 5px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-fmt-btn:hover {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.export-sigma-btn {
    color: var(--severity-medium);
    border-color: var(--severity-medium);
}

.export-sigma-btn:hover {
    background: var(--severity-medium);
    color: var(--bg-primary);
}

.copy-fmt-btn.copied, .export-sigma-btn.copied {
    background: var(--accent-green);
    color: white;
    border-color: var(--accent-green);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 500;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

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

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--text-muted);
}

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

.loading-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state-text {
    font-size: 14px;
}

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

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

@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .sidebar-overlay.open {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        padding-top: 56px;
        overflow-x: hidden;
    }
    
    .main-header {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-right {
        width: 100%;
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
    }
    
    .advanced-search-btn {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 16px;
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .filters-section {
        padding: 0 16px;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }

    .detail-meta-item.exploit-item {
        grid-row: auto;
        grid-column: auto;
    }

    .threats-section {
        padding: 0 16px 24px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .sort-select {
        width: 100%;
    }
    
    .threat-card {
        padding: 16px;
    }
    
    .threat-card-title {
        font-size: 15px;
    }
    
    .detail-panel {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }
    
    .detail-header {
        padding: 20px 16px;
    }
    
    .detail-title {
        font-size: 18px;
        padding-right: 40px;
    }
    
    .detail-content {
        padding: 16px;
    }

    .detection-item {
        padding: 14px;
    }
    
    .detection-query {
        font-size: 11px;
        padding: 12px;
    }
    
    .search-modal-content {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }
    
    .search-modal.open {
        padding-top: 0;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .threat-card-footer {
        gap: 6px;
    }
    
    .threat-tag {
        font-size: 10px;
        padding: 3px 6px;
    }
}

/* Query Language Tabs */
.query-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-color);
}

.query-tab {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.query-tab:hover {
    color: var(--text-secondary);
}

.query-tab.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

/* Query tab type-specific active colors */
.query-tab[data-tab="spl"].active {
    color: var(--det-spl);
    border-bottom-color: var(--det-spl);
}

.query-tab[data-tab="kql"].active {
    color: var(--det-kql);
    border-bottom-color: var(--det-kql);
}

.query-tab[data-tab="sigma"].active {
    color: var(--det-sigma);
    border-bottom-color: var(--det-sigma);
}

/* Triple Query Tabs - SPL, KQL, Sigma with colors */
.query-tabs.triple-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-tertiary);
    border-radius: 0;
}

.query-tabs.triple-tabs .query-tab {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

/* SPL Tab - Green */
.query-tab.spl-tab {
    color: var(--text-muted);
}

.query-tab.spl-tab:hover {
    color: var(--det-spl);
    background: rgba(168, 230, 207, 0.1);
}

.query-tab.spl-tab.active {
    color: var(--det-spl) !important;
    border-bottom-color: var(--det-spl) !important;
    background: rgba(168, 230, 207, 0.15);
}

/* KQL Tab - Purple */
.query-tab.kql-tab {
    color: var(--text-muted);
}

.query-tab.kql-tab:hover {
    color: var(--det-kql);
    background: rgba(196, 181, 253, 0.1);
}

.query-tab.kql-tab.active {
    color: var(--det-kql) !important;
    border-bottom-color: var(--det-kql) !important;
    background: rgba(196, 181, 253, 0.15);
}

/* Sigma Tab - Blue */
.query-tab.sigma-tab {
    color: var(--text-muted);
}

.query-tab.sigma-tab:hover {
    color: var(--det-sigma);
    background: rgba(125, 211, 252, 0.1);
}

.query-tab.sigma-tab.active {
    color: var(--det-sigma) !important;
    border-bottom-color: var(--det-sigma) !important;
    background: rgba(125, 211, 252, 0.15);
}

/* Detection Query Code Colors */
.detection-query.spl {
    border-left: 3px solid var(--det-spl);
}

.detection-query.kql {
    border-left: 3px solid var(--det-kql);
}

.detection-query.sigma {
    border-left: 3px solid var(--det-sigma);
}

/* Detection Library dl-* classes are defined in the main detection library section below */

/* ===== TRENDING SECTION ===== */
.trending-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 16px;
    margin-bottom: 20px;
}

.trending-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.trending-icon {
    font-size: 16px;
}

.trending-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.trending-item {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.trending-item:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

.trending-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.trending-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 0;
    text-transform: uppercase;
}

.trending-badge.new {
    background: var(--accent-green);
    color: white;
}

.trending-badge.urgent {
    background: var(--severity-critical);
    color: white;
    animation: pulse 1.5s infinite;
}

.trending-badge.active {
    background: var(--severity-high);
    color: white;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.trending-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trending-id {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ===== TIMELINE ===== */
.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-left: 16px;
}

.timeline-event {
    display: flex;
    align-items: flex-start;
    position: relative;
    padding-bottom: 24px;
}

.timeline-event:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 1;
    flex-shrink: 0;
}

.timeline-event.past .timeline-dot {
    border-color: var(--accent-blue);
    background: var(--bg-primary);
}

.timeline-event.future .timeline-dot {
    border-color: var(--border-color);
    opacity: 0.6;
}

.timeline-line {
    position: absolute;
    left: 15px;
    top: 32px;
    width: 2px;
    height: calc(100% - 8px);
    background: var(--border-color);
}

.timeline-event.past .timeline-line {
    background: var(--accent-blue);
}

.timeline-content {
    margin-left: 16px;
    padding-top: 4px;
}

.timeline-date {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.timeline-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-top: 2px;
}

/* ===== RELATED THREATS ===== */
.related-threats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.related-threat-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.related-threat-item:hover {
    border-color: var(--accent-blue);
    background: var(--bg-secondary);
}

.related-threat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.related-threat-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-threat-actor {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ===== MOBILE RESPONSIVE FOR NEW SECTIONS ===== */
@media (max-width: 768px) {
    .trending-section {
        padding: 12px;
    }
    
    .trending-list {
        flex-direction: column;
    }
    
    .trending-item {
        max-width: 100%;
    }
    
    .timeline-container {
        padding-left: 8px;
    }
    
    .related-threats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== HEADER STATS (COMPACT) ===== */
.header-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.header-stat {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-stat strong {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-stat.critical strong {
    color: var(--severity-critical);
}

.header-stat.high strong {
    color: var(--severity-high);
}

/* Remove old stats grid since we moved to header */
.stats-grid {
    display: none;
}

@media (max-width: 768px) {
    .header-stats {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .header-stat {
        font-size: 12px;
    }
    
    .header-stat strong {
        font-size: 14px;
    }
}

/* ===== CHANGELOG PAGE ===== */
.changelog-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.changelog-intro {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 16px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.changelog-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.changelog-entry {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 20px;
    border-left: 4px solid var(--accent-blue);
}

.changelog-entry.changelog-major {
    border-left-color: var(--accent-green);
}

.changelog-entry.changelog-milestone {
    border-left-color: var(--severity-high);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(253, 186, 116, 0.1) 100%);
}

.changelog-entry.changelog-feature {
    border-left-color: var(--accent-blue);
}

.changelog-entry.changelog-improvement {
    border-left-color: var(--accent-purple);
}

.changelog-entry.changelog-fix {
    border-left-color: var(--severity-critical);
}

.changelog-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.changelog-version {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-blue);
    background: rgba(125, 211, 252, 0.1);
    padding: 4px 8px;
    border-radius: 0;
}

.changelog-type {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 0;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    text-transform: uppercase;
}

.changelog-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

.changelog-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.changelog-changes {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}

.changelog-changes li {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 4px 0 4px 20px;
    position: relative;
}

.changelog-changes li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-blue);
}

.changelog-author {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

/* ===== ABOUT PAGE (abt-*) ===== */
.about-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.about-hero {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    margin-bottom: 24px;
}

.about-avatar {
    font-size: 64px;
    margin-bottom: 16px;
}

.about-hero h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.about-tagline {
    font-size: 16px;
    color: var(--text-muted);
    font-style: italic;
}

.about-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 20px;
    margin-bottom: 16px;
}

.about-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.about-section p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.about-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.about-section li {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.about-section li:last-child {
    border-bottom: none;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.about-stat {
    text-align: center;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: 0;
}

.about-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-blue);
    display: block;
}

.about-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.about-section blockquote {
    font-size: 16px;
    color: var(--text-primary);
    font-style: italic;
    border-left: 3px solid var(--accent-blue);
    padding-left: 16px;
    margin: 0;
}

.about-footer {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 14px;
}

@media (max-width: 768px) {
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .changelog-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .changelog-date {
        margin-left: 0;
    }
}

/* ===== API DOCUMENTATION PAGE ===== */
.api-docs-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.api-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 20px;
    margin-bottom: 16px;
}

.api-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.api-code {
    display: block;
    background: var(--bg-primary);
    padding: 12px 16px;
    border-radius: 0;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent-blue);
    word-break: break-all;
}

.api-endpoint {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 16px;
    margin-bottom: 12px;
}

.api-method {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
}

.api-method.get {
    background: var(--accent-green);
    color: white;
}

.api-method.post {
    background: var(--accent-blue);
    color: white;
}

.api-endpoint code {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-primary);
}

.api-endpoint p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 8px 0 0 0;
}

.api-params {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.api-params strong {
    font-size: 12px;
    color: var(--text-muted);
}

.api-params ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.api-params li {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 4px 0;
}

.api-params code {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 0;
    font-size: 12px;
}

.api-example {
    background: var(--bg-primary);
    padding: 16px;
    border-radius: 0;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-secondary);
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.api-notice {
    border-left: 4px solid var(--severity-high);
    background: rgba(253, 186, 116, 0.1);
}

.api-notice h3 {
    color: var(--severity-high);
}

/* ===== IOC CORRELATION PAGE ===== */
.correlation-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.correlation-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 20px;
    margin-bottom: 20px;
}

.correlation-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.section-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.correlation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.correlation-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 16px;
}

.correlation-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.actor-name, .ioc-value {
    font-weight: 600;
    color: var(--text-primary);
}

.threat-count {
    font-size: 12px;
    background: var(--accent-blue);
    color: white;
    padding: 2px 8px;
    border-radius: 0;
    margin-left: auto;
}

.correlated-threats {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
}

.correlated-threats li {
    padding: 4px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.correlated-threats li:last-child {
    border-bottom: none;
}

.correlated-threats a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
}

.correlated-threats a:hover {
    text-decoration: underline;
}

.technique-card .correlation-header {
    flex-direction: column;
    align-items: flex-start;
}

.technique-id {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-blue);
    background: rgba(125, 211, 252, 0.1);
    padding: 2px 8px;
    border-radius: 0;
}

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

.technique-threats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.threat-chip {
    font-size: 11px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.2s;
}

.threat-chip:hover {
    background: var(--accent-blue);
    color: white;
}

.more-threats {
    font-size: 11px;
    color: var(--text-muted);
    padding: 4px 8px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tag-item {
    color: var(--accent-blue);
    cursor: pointer;
    transition: color 0.2s;
}

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

.no-data {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 20px;
}

@media (max-width: 768px) {
    .correlation-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== ROADMAP PANEL ===== */
.changelog-page-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.changelog-main {
    min-width: 0;
}

.roadmap-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 16px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.roadmap-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.roadmap-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.roadmap-header p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.roadmap-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.roadmap-idea {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: var(--bg-primary);
    border-radius: 0;
    border: 1px solid var(--border-color);
}

.roadmap-priority {
    font-size: 12px;
    flex-shrink: 0;
}

.roadmap-content {
    flex: 1;
    min-width: 0;
}

.roadmap-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.roadmap-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

.roadmap-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.roadmap-footer p {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
}

.roadmap-empty {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
    padding: 20px;
}

@media (max-width: 900px) {
    .changelog-page-layout {
        grid-template-columns: 1fr;
    }
    
    .roadmap-panel {
        position: static;
        order: -1;
    }
}

/* ===== ANALYTICS & POPULARITY ===== */
.popularity-badge {
    display: inline-block;
    font-size: 11px;
    background: linear-gradient(135deg, rgba(253, 186, 116, 0.3), rgba(253, 164, 175, 0.3));
    color: white;
    padding: 2px 8px;
    border-radius: 0;
    margin-left: 8px;
    font-weight: 600;
}

.copy-btn.copied,
.detection-copy-btn.copied {
    background: var(--accent-green) !important;
    color: white !important;
}

.stats-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 16px;
    margin-bottom: 16px;
}

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

.stat-item {
    text-align: center;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 0;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-blue);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.engagement-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.engagement-indicator span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== KEYBOARD SHORTCUTS MODAL ===== */
.shortcuts-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shortcuts-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.shortcuts-content {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 24px;
    max-width: 400px;
    width: 90%;
}

.shortcuts-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    text-align: center;
}

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

.shortcut {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: var(--bg-primary);
    border-radius: 0;
}

.shortcut kbd {
    display: inline-block;
    min-width: 32px;
    padding: 4px 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    text-align: center;
}

.shortcut span {
    font-size: 13px;
    color: var(--text-secondary);
}

.shortcuts-footer {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin: 16px 0 0 0;
}

/* ===== DAILY DEBRIEFS (db-*) ===== */
.debrief-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.debrief-loading,
.debrief-empty,
.debrief-error {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.debrief-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.debrief-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

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

.debrief-stats {
    display: flex;
    gap: 16px;
}

.debrief-stat {
    background: var(--bg-tertiary);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
}

.debrief-themes {
    margin-bottom: 24px;
}

.debrief-themes h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.debrief-themes ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.debrief-themes li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    color: var(--text-secondary);
}

.debrief-themes li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-blue);
}

.debrief-threats {
    margin-bottom: 20px;
}

.debrief-severity {
    margin-bottom: 20px;
}

.debrief-severity h4 {
    margin-bottom: 12px;
    font-size: 1rem;
}

.debrief-severity.critical h4 { color: var(--severity-critical); }
.debrief-severity.high h4 { color: var(--severity-high); }
.debrief-severity.medium h4 { color: var(--severity-medium); }
.debrief-severity.low h4 { color: var(--severity-low); }

.debrief-severity ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.debrief-severity li {
    padding: 6px 0;
    font-size: 14px;
}

.debrief-severity a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
}

.debrief-severity a:hover {
    text-decoration: underline;
}

.debrief-footer {
    text-align: right;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-style: italic;
}

/* ===== RESEARCH LAB ===== */

.nav-badge.new {
    background: var(--accent-green);
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 0;
    margin-left: auto;
    font-weight: 600;
}

.adhoc-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
}

.adhoc-intro {
    text-align: center;
    margin-bottom: 32px;
}

.adhoc-intro h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.adhoc-intro p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.adhoc-input-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 24px;
    margin-bottom: 24px;
}

.adhoc-input-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.adhoc-textarea {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
}

.adhoc-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.adhoc-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}

.btn-large {
    padding: 14px 28px;
    font-size: 1rem;
}

.adhoc-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Login */
.adhoc-login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 24px;
}

.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 48px;
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.login-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.login-card h2 {
    margin-bottom: 8px;
    color: var(--text-primary);
}

.login-card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.login-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 16px;
    text-align: center;
}

.login-error {
    color: var(--severity-critical);
    margin-top: 12px;
    font-size: 0.9rem;
}

/* Progress */
.adhoc-progress {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 24px;
    margin-bottom: 24px;
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.progress-icon {
    font-size: 1.5rem;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.progress-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.progress-steps {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}

.progress-step {
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border-radius: 0;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.progress-step.active {
    background: var(--accent-blue);
    color: white;
}

.progress-step.complete {
    opacity: 0.7;
}

.progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    width: 0%;
    transition: width 0.5s ease;
}

/* Results */
.adhoc-results {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 24px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.results-header h3 {
    font-size: 1.2rem;
}

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

.threat-preview-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 20px;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.preview-id {
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.confidence-badge {
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 0;
    font-size: 0.8rem;
}

.preview-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.preview-summary {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.preview-section {
    margin-bottom: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.preview-section h4 {
    margin-bottom: 12px;
    font-size: 1rem;
}

.mitre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mitre-tag {
    background: var(--bg-tertiary);
    padding: 6px 12px;
    border-radius: 0;
    font-size: 0.85rem;
}

.ioc-list code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 0;
    font-size: 0.85rem;
}

.ioc-group {
    margin-bottom: 8px;
}

.detection-list {
    display: grid;
    gap: 12px;
}

.detection-item {
    background: var(--bg-tertiary);
    padding: 12px;
    border-radius: 0;
}

.detection-item strong {
    display: block;
    margin-bottom: 6px;
}

.det-severity {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 0;
    text-transform: uppercase;
}

.det-severity.high {
    background: rgba(253, 186, 116, 0.15);
    color: var(--severity-high);
}

.det-severity.critical {
    background: rgba(253, 164, 175, 0.15);
    color: var(--severity-critical);
}

.det-severity.medium {
    background: rgba(196, 181, 253, 0.15);
    color: var(--severity-medium);
}

.detection-item details {
    margin-top: 8px;
}

.detection-item summary {
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--accent-blue);
}

.detection-item pre {
    margin-top: 8px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 0;
    overflow-x: auto;
    font-size: 0.8rem;
}

.json-preview {
    max-height: 400px;
    overflow: auto;
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: 0;
    font-size: 0.8rem;
}

/* Mobile */
@media (max-width: 600px) {
    .adhoc-container {
        padding: 16px;
    }
    
    .adhoc-input-section,
    .login-card,
    .adhoc-progress,
    .adhoc-results {
        padding: 16px;
    }
    
    .adhoc-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .results-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .results-actions {
        justify-content: stretch;
    }
    
    .results-actions button {
        flex: 1;
    }
}
/* Build trigger 20260203205102 */

/* Enrichment styles */
.enrichment-list {
    display: grid;
    gap: 12px;
}

.enrichment-item {
    background: var(--bg-tertiary);
    border-radius: 0;
    padding: 12px;
}

.enrichment-item strong {
    display: block;
    margin-bottom: 8px;
}

.enrichment-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.9rem;
}

.enrichment-details span {
    background: var(--bg-primary);
    padding: 4px 8px;
    border-radius: 0;
}

.threatfox-match {
    padding: 4px 0;
    border-bottom: 1px solid var(--border-color);
}

.threatfox-match:last-child {
    border-bottom: none;
}

/* ===== RESEARCH LAB (REDESIGNED) ===== */
.adhoc-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 24px;
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .adhoc-layout {
        grid-template-columns: 1fr;
    }
}

.adhoc-panel {
    background: var(--bg-secondary);
    border-radius: 0;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.panel-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.panel-content {
    padding: 20px;
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.adhoc-textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 180px;
}

.adhoc-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-full {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-icon {
    font-size: 1.2rem;
}

.research-hint {
    margin-top: 12px;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Progress */
.research-progress {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 0;
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-weight: 500;
}

.progress-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.progress-steps .step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.progress-steps .step.active {
    color: var(--accent-blue);
}

.progress-steps .step.done .step-icon {
    color: var(--accent-green);
}

.progress-bar {
    height: 4px;
    background: var(--bg-primary);
    border-radius: 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    width: 0%;
    transition: width 0.3s ease;
}

/* Panel Tabs */
.panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.panel-tab {
    flex: 1;
    padding: 14px 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.panel-tab:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.panel-tab.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

.tab-count {
    background: var(--bg-primary);
    padding: 2px 8px;
    border-radius: 0;
    font-size: 0.8rem;
    margin-left: 6px;
}

.panel-tab-content {
    padding: 20px;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 8px;
    color: var(--text-primary);
}

.empty-state p {
    margin: 0;
    font-size: 0.95rem;
}

/* Result Card */
.result-card {
    background: var(--bg-tertiary);
    border-radius: 0;
    overflow: hidden;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    gap: 16px;
    flex-wrap: wrap;
}

.result-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.result-title-section h3 {
    margin: 0;
    font-size: 1.1rem;
}

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

.btn-icon-only {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    cursor: pointer;
    font-size: 1.1rem;
}

.btn-icon-only:hover {
    background: var(--bg-primary);
}

.result-body {
    padding: 20px;
}

.result-section {
    margin-bottom: 24px;
}

.result-section:last-child {
    margin-bottom: 0;
}

.result-section h4 {
    margin: 0 0 12px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.mitre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mitre-tag {
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 0;
    font-size: 0.85rem;
}

.mitre-tag .tactic {
    color: var(--accent-blue);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.iocs-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ioc-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ioc-label {
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 80px;
}

.ioc-value {
    background: var(--bg-secondary);
    padding: 4px 8px;
    border-radius: 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

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

.detection-item {
    background: var(--bg-secondary);
    border-radius: 0;
    overflow: hidden;
}

.detection-item summary {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detection-item summary:hover {
    background: var(--bg-primary);
}

.det-name {
    font-weight: 500;
}

.det-type {
    font-size: 0.8rem;
    padding: 2px 8px;
    background: var(--bg-tertiary);
    border-radius: 0;
    color: var(--text-secondary);
}

.det-query {
    margin: 0;
    padding: 16px;
    background: var(--bg-primary);
    overflow-x: auto;
    font-size: 0.85rem;
}

.json-section summary {
    cursor: pointer;
    padding: 8px 0;
}

.json-preview {
    background: var(--bg-primary);
    padding: 16px;
    border-radius: 0;
    overflow-x: auto;
    font-size: 0.8rem;
    max-height: 400px;
}

.no-data {
    color: var(--text-secondary);
    font-style: italic;
}

/* Lab Threats */
.lab-threats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lab-threat-card {
    background: var(--bg-tertiary);
    border-radius: 0;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.lab-threat-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

.threat-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.threat-category {
    background: var(--accent-purple);
    color: white;
    padding: 2px 8px;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 500;
}

.threat-title {
    margin: 0 0 8px;
    font-size: 1rem;
}

.threat-summary {
    margin: 0 0 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.threat-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Research count badge */
.research-count {
    background: var(--bg-tertiary);
    padding: 6px 12px;
    border-radius: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Attribution info */
.attribution-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.actor-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--accent-blue);
}

.nation-state, .motivation {
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: 0;
    font-size: 0.85rem;
}

/* ===== ENHANCED RESEARCH RESULTS ===== */
.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 12px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.meta-item {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.meta-item strong {
    color: var(--text-primary);
}

.description-text {
    line-height: 1.7;
    white-space: pre-wrap;
}

.analysis-summary {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent-blue);
    border-radius: 0;
}

/* Attribution Card */
.attribution-card {
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: 0;
}

.actor-main {
    margin-bottom: 12px;
}

.actor-aliases {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.actor-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-badge {
    padding: 4px 10px;
    border-radius: 0;
    font-size: 0.85rem;
    background: var(--bg-secondary);
}

.detail-badge.nation { background: rgba(125, 211, 252, 0.12); }
.detail-badge.motivation { background: rgba(196, 181, 253, 0.12); }

/* Targets */
.targets-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.target-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.target-label {
    min-width: 80px;
    font-weight: 500;
    color: var(--text-secondary);
}

.target-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.target-tag {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: 0;
    font-size: 0.85rem;
}

/* MITRE Grid */
.mitre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 8px;
}

.mitre-item {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: 0;
    border-left: 3px solid var(--accent-blue);
}

.mitre-tactic {
    font-size: 0.75rem;
    color: var(--accent-blue);
    text-transform: uppercase;
    font-weight: 500;
}

.mitre-technique {
    font-size: 0.9rem;
    margin: 4px 0;
}

.mitre-id {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* IOCs Container */
.iocs-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ioc-category h5 {
    margin: 0 0 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.ioc-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ioc-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg-tertiary);
    border-radius: 0;
}

.ioc-type {
    font-size: 0.75rem;
    padding: 2px 6px;
    background: var(--bg-secondary);
    border-radius: 0;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.ioc-value {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    word-break: break-all;
}

.ioc-hash {
    font-size: 0.75rem;
}

.ioc-context {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: auto;
}

.behavioral-list {
    margin: 0;
    padding-left: 20px;
}

.behavioral-list li {
    margin-bottom: 6px;
}

/* Detections Section - THE STAR */
.detections-section {
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: 0;
    margin: 16px 0;
}

.detection-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.det-stat {
    padding: 6px 12px;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.det-stat.splunk { background: rgba(168, 230, 207, 0.12); color: var(--det-spl); }
.det-stat.kql { background: rgba(125, 211, 252, 0.12); color: var(--det-sigma); }

.detection-card {
    background: var(--bg-secondary);
    border-radius: 0;
    margin-bottom: 12px;
    overflow: hidden;
    border-left: 4px solid var(--accent-green);
}

.detection-card.kql {
    border-left-color: var(--accent-blue);
}

.detection-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-primary);
}

.det-number {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.det-name {
    flex: 1;
    font-weight: 500;
}

.det-type-badge {
    padding: 3px 8px;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 600;
}

.det-type-badge.spl { background: rgba(168, 230, 207, 0.15); color: var(--det-spl); }
.det-type-badge.kql { background: rgba(196, 181, 253, 0.15); color: var(--det-sigma); }

.det-description {
    padding: 8px 16px;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.det-query-container {
    position: relative;
    margin: 0 16px 12px;
}

.copy-query-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    font-size: 0.8rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    cursor: pointer;
    z-index: 1;
}

.copy-query-btn:hover {
    background: var(--accent-blue);
}

.det-query {
    margin: 0;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 0;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.5;
}

.det-query code {
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

.det-meta {
    display: flex;
    gap: 12px;
    padding: 8px 16px;
}

.det-severity {
    padding: 2px 8px;
    border-radius: 0;
    font-size: 0.8rem;
    text-transform: capitalize;
}

.det-severity.critical { background: rgba(253, 164, 175, 0.15); color: var(--severity-critical); }
.det-severity.high { background: rgba(253, 186, 116, 0.15); color: var(--severity-high); }
.det-severity.medium { background: rgba(196, 181, 253, 0.15); color: var(--severity-medium); }
.det-severity.low { background: rgba(168, 230, 207, 0.15); color: var(--severity-low); }

.det-confidence {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Remediation */
.remediation-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.remediation-group h5 {
    margin: 0 0 8px;
    font-size: 0.95rem;
}

.remediation-group ul {
    margin: 0;
    padding-left: 20px;
}

.remediation-group li {
    margin-bottom: 6px;
    line-height: 1.5;
}

/* References */
.references-list {
    margin: 0;
    padding-left: 20px;
}

.references-list a {
    color: var(--accent-blue);
    text-decoration: none;
}

.references-list a:hover {
    text-decoration: underline;
}

.references-list li {
    margin-bottom: 6px;
}

/* ===== RESEARCH RESULT COMPACT CARD ===== */
.research-result-card {
    background: var(--bg-secondary);
    border-radius: 0;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.result-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
}

.result-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-id {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.result-card-actions {
    display: flex;
    gap: 8px;
}

.result-card-name {
    margin: 0;
    padding: 16px 20px 8px;
    font-size: 1.3rem;
}

.result-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 0 20px 16px;
    font-size: 0.9rem;
}

.stat-item {
    color: var(--text-secondary);
}

.stat-item strong {
    color: var(--text-primary);
}

.result-card-summary {
    padding: 0 20px 16px;
    line-height: 1.6;
}

.result-card-summary p {
    margin: 0;
    color: var(--text-secondary);
}

.result-card-attribution {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 20px 16px;
}

.attr-actor {
    font-weight: 600;
    color: var(--accent-blue);
}

.attr-nation, .attr-motivation {
    padding: 3px 10px;
    background: var(--bg-tertiary);
    border-radius: 0;
    font-size: 0.85rem;
}

.result-card-mitre {
    padding: 0 20px 16px;
    font-size: 0.9rem;
}

.mitre-chip {
    display: inline-block;
    padding: 3px 8px;
    margin: 2px 4px 2px 0;
    background: var(--bg-tertiary);
    border-radius: 0;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.mitre-more {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.result-card-detections-preview {
    padding: 12px 20px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.detection-preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.det-badge {
    padding: 2px 8px;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 600;
}

.det-badge.spl { background: rgba(168, 230, 207, 0.15); color: var(--det-spl); }
.det-badge.kql { background: rgba(196, 181, 253, 0.15); color: var(--det-sigma); }

.det-preview-name {
    color: var(--text-primary);
}

.det-more {
    margin: 8px 0 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.result-card-footer {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

/* Detection item type badge */
.detection-item-type {
    padding: 2px 8px;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 600;
}

.detection-item-type.spl { background: rgba(168, 230, 207, 0.15); color: var(--det-spl); }
.detection-item-type.kql { background: rgba(196, 181, 253, 0.15); color: var(--det-sigma); }

/* ===== DETECTION LIBRARY ===== */

/* Main Container */
.detection-library-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* Header Stats */
.detection-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.detection-stats .stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.detection-stats .stat-badge strong {
    color: var(--text-primary);
    font-weight: 600;
}

.detection-stats .stat-badge.total {
    background: var(--bg-tertiary);
    border-color: var(--accent-blue);
}

.detection-stats .stat-badge.total strong {
    color: var(--accent-blue);
}

.detection-stats .stat-badge.spl {
    background: rgba(22, 101, 52, 0.2);
    border-color: rgba(74, 222, 128, 0.3);
}

.detection-stats .stat-badge.spl strong {
    color: var(--det-spl);
}

.detection-stats .stat-badge.kql {
    background: rgba(29, 78, 216, 0.2);
    border-color: rgba(147, 197, 253, 0.3);
}

.detection-stats .stat-badge.kql strong {
    color: var(--det-sigma);
}

/* Filters Section */
.detection-filters {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    overflow: hidden;
}

.detection-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s ease;
}

.detection-filters-header:hover {
    background: var(--bg-hover);
}

.detection-filters-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detection-filters-header .toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.detection-filters-header.open .toggle-icon {
    transform: rotate(180deg);
}

.detection-filters-body {
    display: none;
    padding: 20px;
}

.detection-filters-body.open {
    display: block;
}

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

.detection-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detection-filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detection-filter-select {
    padding: 10px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s ease;
}

.detection-filter-select:focus {
    border-color: var(--accent-blue);
}

.detection-filter-select:hover {
    border-color: var(--border-light);
}

/* Multi-select dropdown styling */
.detection-filter-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 8px;
}

/* Search within filters */
.detection-search-input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.15s ease;
}

.detection-search-input:focus {
    border-color: var(--accent-blue);
}

.detection-search-wrapper {
    position: relative;
}

.detection-search-wrapper .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Filter Actions */
.detection-filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.filter-results-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.filter-results-count strong {
    color: var(--text-primary);
}

.btn-clear-filters {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-clear-filters:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Active Filter Chips */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.filter-chip .chip-label {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
}

.filter-chip .chip-value {
    font-weight: 500;
}

.filter-chip .chip-remove {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-chip .chip-remove:hover {
    background: var(--severity-critical);
    color: white;
}

/* Detection Grid */
.detection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 16px;
}

/* Detection Card */
.detection-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
}

.detection-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.detection-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 18px 12px;
    gap: 12px;
}

.detection-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Type Badge - SPL/KQL */
.detection-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 0;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detection-type-badge.spl {
    background: rgba(22, 101, 52, 0.25);
    color: var(--det-spl);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.detection-type-badge.kql {
    background: rgba(88, 28, 135, 0.25);
    color: var(--det-kql);
    border: 1px solid rgba(192, 132, 252, 0.3);
}

/* Severity Badge - Reusing existing severity colors */
.detection-severity-badge {
    padding: 4px 10px;
    border-radius: 0;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detection-severity-badge.critical {
    background: rgba(253, 164, 175, 0.15);
    color: var(--severity-critical);
}

.detection-severity-badge.high {
    background: rgba(253, 186, 116, 0.15);
    color: var(--severity-high);
}

.detection-severity-badge.medium {
    background: rgba(196, 181, 253, 0.15);
    color: var(--severity-medium);
}

.detection-severity-badge.low {
    background: rgba(168, 230, 207, 0.15);
    color: var(--severity-low);
}

.detection-card-id {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.detection-card-title {
    padding: 0 18px 12px;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
}

.detection-card-description {
    padding: 0 18px 14px;
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* MITRE Chips in Card */
.detection-card-mitre {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 18px 14px;
}

.mitre-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(125, 211, 252, 0.1);
    border: 1px solid rgba(125, 211, 252, 0.25);
    border-radius: 0;
    font-size: 0.75rem;
    color: var(--accent-blue);
    font-family: var(--font-mono);
}

.mitre-chip .tactic {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.mitre-chip-more {
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border-radius: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Expandable Query Section */
.detection-card-query-section {
    border-top: 1px solid var(--border-color);
}

.detection-query-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.detection-query-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.detection-query-toggle .toggle-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

.detection-query-toggle .toggle-arrow {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.detection-query-toggle.open .toggle-arrow {
    transform: rotate(180deg);
}

/* Detection Query Code Block */
.detection-query {
    display: none;
    position: relative;
    margin: 0;
    padding: 0;
}

.detection-query.open {
    display: block;
}

.detection-query-code {
    margin: 0;
    padding: 16px 18px;
    padding-right: 70px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--accent-green);
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 300px;
    overflow-y: auto;
}

/* SPL vs KQL vs Sigma different background tints */
.detection-query.spl .detection-query-code,
.detection-query.spl {
    background: linear-gradient(135deg, rgba(168, 230, 207, 0.05) 0%, var(--bg-primary) 100%);
    border-left: 3px solid var(--det-spl);
}

.detection-query.kql .detection-query-code,
.detection-query.kql {
    background: linear-gradient(135deg, rgba(196, 181, 253, 0.05) 0%, var(--bg-primary) 100%);
    border-left: 3px solid var(--det-kql);
    color: var(--det-kql);
}

.detection-query.sigma .detection-query-code,
.detection-query.sigma {
    background: linear-gradient(135deg, rgba(125, 211, 252, 0.05) 0%, var(--bg-primary) 100%);
    border-left: 3px solid var(--det-sigma);
    color: var(--det-sigma);
}

/* Copy Button in Query Block */
.detection-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
    z-index: 1;
}

.detection-copy-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.detection-copy-btn.copied {
    background: var(--accent-green);
    color: white;
    border-color: var(--accent-green);
}

/* Card Footer */
.detection-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    background: var(--bg-tertiary);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.detection-card-source {
    display: flex;
    align-items: center;
    gap: 4px;
}

.detection-card-date {
    font-family: var(--font-mono);
}

/* Loading State */
.detection-library-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

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

/* Empty State */
.detection-library-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.detection-library-empty .empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.detection-library-empty h3 {
    margin: 0 0 8px;
    color: var(--text-primary);
}

.detection-library-empty p {
    margin: 0;
    font-size: 0.95rem;
}

/* Pagination */
.detection-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.detection-pagination .page-btn {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.detection-pagination .page-btn:hover:not(:disabled) {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

.detection-pagination .page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.detection-pagination .page-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* View Toggle (Grid/List) */
.detection-view-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px;
}

.detection-view-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.detection-view-btn:hover {
    color: var(--text-primary);
}

.detection-view-btn.active {
    background: var(--accent-blue);
    color: white;
}

/* List View Alternative */
.detection-grid.list-view {
    grid-template-columns: 1fr;
}

.detection-grid.list-view .detection-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 16px 20px;
    gap: 20px;
}

.detection-grid.list-view .detection-card-header,
.detection-grid.list-view .detection-card-title,
.detection-grid.list-view .detection-card-description,
.detection-grid.list-view .detection-card-mitre,
.detection-grid.list-view .detection-card-query-section,
.detection-grid.list-view .detection-card-footer {
    padding: 0;
    border: none;
    background: none;
}

/* ===== DETECTION LIBRARY RESPONSIVE ===== */

@media (max-width: 1200px) {
    .detection-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }
    
    .detection-filter-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .detection-library-container {
        padding: 16px;
    }
    
    .detection-filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .detection-grid {
        grid-template-columns: 1fr;
    }
    
    .detection-stats {
        gap: 8px;
    }
    
    .detection-stats .stat-badge {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    .detection-filter-grid {
        grid-template-columns: 1fr;
    }
    
    .detection-filters-header {
        padding: 12px 16px;
    }
    
    .detection-filters-body {
        padding: 16px;
    }
    
    .detection-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 14px 16px 10px;
    }
    
    .detection-card-title {
        padding: 0 16px 10px;
        font-size: 0.95rem;
    }
    
    .detection-card-description {
        padding: 0 16px 12px;
        font-size: 0.8rem;
    }
    
    .detection-card-mitre {
        padding: 0 16px 12px;
    }
    
    .detection-query-toggle {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
    
    .detection-query-code {
        padding: 14px 16px;
        padding-right: 60px;
        font-size: 0.75rem;
    }
    
    .detection-card-footer {
        padding: 8px 16px;
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }
    
    .filter-chip {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .detection-filter-actions {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .filter-results-count {
        text-align: center;
    }
    
    .btn-clear-filters {
        width: 100%;
    }
    
    .detection-pagination {
        flex-direction: column;
        gap: 12px;
    }
    
    .detection-pagination .page-btn {
        width: 100%;
    }
}

/* Mobile filter collapse */
@media (max-width: 768px) {
    .detection-filters-body {
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* ===== DETECTION LIBRARY (dl-*) ===== */
.dl-container { padding: 0; }
.dl-loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 80px 20px; }
.dl-loading-spinner { width: 20px; height: 20px; border: 2px solid #333; border-top-color: #a8e6cf; border-radius: 50%; animation: dl-spin 0.8s linear infinite; }
@keyframes dl-spin { to { transform: rotate(360deg); } }
.dl-loading-text { font-family: var(--font-mono); font-size: 13px; color: #525252; }

/* Header */
.dl-header { display: flex; justify-content: space-between; align-items: baseline; padding: 0 0 12px 0; border-bottom: 1px solid #1a1a1a; margin-bottom: 0; }
.dl-title { font-family: var(--font-mono); font-size: 16px; font-weight: 700; color: #e5e5e5; letter-spacing: 0.5px; }
.dl-header-stats { display: flex; gap: 16px; }
.dl-stat { font-family: var(--font-mono); font-size: 12px; color: #525252; }
.dl-stat-total { color: #737373; }
.dl-stat-spl { color: #a8e6cf; }
.dl-stat-kql { color: #c4b5fd; }
.dl-stat-sigma { color: #7dd3fc; }

/* Language Tabs */
.dl-lang-tabs { display: flex; gap: 0; border-bottom: 1px solid #1a1a1a; }
.dl-lang-tab { padding: 10px 20px; font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: #525252; background: transparent; border: none; border-bottom: 2px solid transparent; cursor: pointer; transition: color 0.15s, border-color 0.15s; text-transform: lowercase; }
.dl-lang-tab:hover { color: #a3a3a3; }
.dl-lang-active { color: #e5e5e5; }
.dl-lang-spl.dl-lang-active { color: #a8e6cf; border-bottom-color: #a8e6cf; }
.dl-lang-kql.dl-lang-active { color: #c4b5fd; border-bottom-color: #c4b5fd; }
.dl-lang-sigma.dl-lang-active { color: #7dd3fc; border-bottom-color: #7dd3fc; }

/* Filter Bar */
.dl-filter-bar { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid #1a1a1a; flex-wrap: wrap; }
.dl-search-wrap { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 200px; background: #111111; border: 1px solid #222; padding: 0 10px; }
.dl-search-prompt { font-family: var(--font-mono); font-size: 13px; color: #a8e6cf; font-weight: 700; }
.dl-search-input { flex: 1; background: transparent; border: none; color: #e5e5e5; font-family: var(--font-mono); font-size: 12px; padding: 8px 0; outline: none; }
.dl-search-input::placeholder { color: #404040; }
.dl-filter-select { background: #111111; border: 1px solid #222; color: #a3a3a3; font-family: var(--font-mono); font-size: 11px; padding: 7px 8px; cursor: pointer; min-width: 80px; }
.dl-filter-input { background: #111111; border: 1px solid #222; color: #a3a3a3; font-family: var(--font-mono); font-size: 11px; padding: 7px 8px; width: 90px; outline: none; }
.dl-filter-input::placeholder { color: #404040; }
.dl-sort-btn { background: #111111; border: 1px solid #222; color: #737373; font-family: var(--font-mono); font-size: 12px; padding: 6px 10px; cursor: pointer; }
.dl-sort-btn:hover { color: #e5e5e5; border-color: #333; }
.dl-correlate-btn { background: transparent; border: 1px solid #222; color: #525252; font-family: var(--font-mono); font-size: 11px; padding: 6px 12px; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.dl-correlate-btn:hover { color: #c4b5fd; border-color: #c4b5fd; }
.dl-correlate-active { color: #c4b5fd; border-color: #c4b5fd; background: rgba(196, 181, 253, 0.08); }

/* Detection Library Search Modal */
.dl-search-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 10000; display: flex; align-items: flex-start; justify-content: center; padding-top: 80px; }
.dl-search-modal-backdrop { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); }
.dl-search-modal-content { position: relative; width: 700px; max-width: 90vw; max-height: 70vh; background: #0f0f0f; border: 1px solid #222; display: flex; flex-direction: column; overflow: hidden; }
.dl-search-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px 8px; }
.dl-search-modal-title { font: 13px/1 var(--font-mono); color: #555; }
.dl-search-modal-close { background: none; border: none; color: #555; font-size: 20px; cursor: pointer; padding: 0 4px; }
.dl-search-modal-close:hover { color: #e0e0e0; }
.dl-search-modal-input-wrap { display: flex; align-items: center; gap: 8px; padding: 0 18px 10px; }
.dl-search-modal-input { flex: 1; background: #111; border: 1px solid #222; color: #e0e0e0; font: 14px/1.4 var(--font-mono); padding: 10px 12px; outline: none; }
.dl-search-modal-input:focus { border-color: #444; }
.dl-search-modal-input::placeholder { color: #444; }
.dl-search-modal-hint { padding: 0 18px 10px; font: 10px/1.4 var(--font-mono); color: #444; }
.dl-search-modal-results { overflow-y: auto; flex: 1; padding: 0 18px 14px; }
.dl-search-modal-count { font: 11px/1 var(--font-mono); color: #555; margin-bottom: 10px; }
.dl-search-modal-empty { font: 12px/1.4 var(--font-mono); color: #444; padding: 20px 0; text-align: center; }
.dl-search-modal-result { padding: 10px 12px; margin-bottom: 6px; border: 1px solid #1a1a1a; cursor: pointer; transition: all 0.1s; }
.dl-search-modal-result:hover { background: #151515; border-color: #333; }
.dl-search-modal-result-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.dl-search-modal-tid { font: 11px/1 var(--font-mono); color: #888; }
.dl-search-modal-sev { font: 9px/1 var(--font-mono); padding: 2px 6px; text-transform: uppercase; }
.dl-sev-critical { background: #7f1d1d; color: #fca5a5; }
.dl-sev-high { background: #7c2d12; color: #fed7aa; }
.dl-sev-medium { background: #713f12; color: #fef08a; }
.dl-sev-low { background: #14532d; color: #bbf7d0; }
.dl-search-modal-det-count { font: 10px/1 var(--font-mono); color: #555; margin-left: auto; }
.dl-search-modal-result-title { font: 12px/1.4 var(--font-mono); color: #e0e0e0; margin-bottom: 3px; }
.dl-search-modal-result-title mark { background: rgba(196, 181, 253, 0.25); color: #c4b5fd; padding: 0 1px; }
.dl-search-modal-result-actor { font: 10px/1 var(--font-mono); color: #c4b5fd; margin-bottom: 3px; }
.dl-search-modal-result-snippet { font: 11px/1.4 var(--font-sans); color: #666; }
.dl-search-modal-result-snippet mark { background: rgba(196, 181, 253, 0.15); color: #c4b5fd; }
[data-theme="light"] .dl-search-modal-content { background: #fff; border-color: #e0e0e0; }
[data-theme="light"] .dl-search-modal-input { background: #f8f8f8; border-color: #ddd; color: #333; }
[data-theme="light"] .dl-search-modal-result { border-color: #e8e8e8; }
[data-theme="light"] .dl-search-modal-result:hover { background: #f5f5f5; border-color: #ccc; }
[data-theme="light"] .dl-search-modal-result-title { color: #333; }
[data-theme="light"] .dl-search-modal-result-title mark { background: rgba(124, 58, 237, 0.15); color: #7c3aed; }
[data-theme="light"] .dl-search-modal-result-actor { color: #7c3aed; }
[data-theme="light"] .dl-search-modal-backdrop { background: rgba(0,0,0,0.4); }

/* Active Filter Pills */
.dl-active-pills { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; }
.dl-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; background: rgba(168, 230, 207, 0.08); border: 1px solid rgba(168, 230, 207, 0.2); color: #a8e6cf; font-family: var(--font-mono); font-size: 11px; }
.dl-pill-x { cursor: pointer; color: #525252; font-weight: 700; }
.dl-pill-x:hover { color: #fda4af; }
.dl-pill-clear { background: transparent; border-color: #333; color: #525252; cursor: pointer; }
.dl-pill-clear:hover { color: #fda4af; border-color: #fda4af; }

/* Results Info */
.dl-results-info { padding: 8px 0; }
.dl-results-count { font-family: var(--font-mono); font-size: 11px; color: #404040; }

/* Correlation Panel */
.dl-correlation-panel { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid #1a1a1a; margin-bottom: 8px; }
.dl-corr-section { }
.dl-corr-header { display: block; font-family: var(--font-mono); font-size: 11px; color: #525252; margin-bottom: 8px; }
.dl-corr-list { display: flex; flex-wrap: wrap; gap: 4px; }
.dl-corr-item { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; font-family: var(--font-mono); font-size: 11px; cursor: pointer; transition: all 0.15s; }
.dl-corr-technique { color: #c4b5fd; background: rgba(196, 181, 253, 0.06); border: 1px solid rgba(196, 181, 253, 0.15); }
.dl-corr-technique:hover { background: rgba(196, 181, 253, 0.15); border-color: #c4b5fd; }
.dl-corr-source { color: #a8e6cf; background: rgba(168, 230, 207, 0.06); border: 1px solid rgba(168, 230, 207, 0.15); }
.dl-corr-source:hover { background: rgba(168, 230, 207, 0.15); border-color: #a8e6cf; }
.dl-corr-actor { color: #fda4af; background: rgba(253, 164, 175, 0.06); border: 1px solid rgba(253, 164, 175, 0.15); }
.dl-corr-actor:hover { background: rgba(253, 164, 175, 0.15); border-color: #fda4af; }
.dl-corr-count { color: #404040; font-size: 10px; }
.dl-corr-empty { color: #333; font-family: var(--font-mono); font-size: 11px; }
.dl-corr-selected { background: rgba(196, 181, 253, 0.15) !important; border-color: #c4b5fd !important; color: #e8e8e8 !important; }

/* ===== CORRELATION PILLS + AND/OR ===== */
.dl-corr-pills { display: flex; align-items: center; gap: 6px; padding: 8px 16px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 11px; }
.dl-corr-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; background: rgba(255,255,255,0.05); border-left: 2px solid #737373; color: #a0a0a0; cursor: default; }
.dl-corr-pill-x { color: #525252; cursor: pointer; margin-left: 2px; }
.dl-corr-pill-x:hover { color: #fda4af; }
.dl-corr-op { color: #525252; font-size: 10px; padding: 0 2px; }
.dl-corr-op-toggle { background: transparent; border: 1px solid #333333; color: #a0a0a0; font-family: var(--font-mono); font-size: 10px; padding: 3px 8px; cursor: pointer; }
.dl-corr-op-toggle:hover { border-color: #c4b5fd; color: #c4b5fd; }
.dl-corr-clear { background: transparent; border: 1px solid #333333; color: #525252; font-family: var(--font-mono); font-size: 10px; padding: 3px 8px; cursor: pointer; }
.dl-corr-clear:hover { border-color: #fda4af; color: #fda4af; }

/* Detection Rows */
.dl-rows { }
.dl-row { border-bottom: 1px solid #1a1a1a; }
.dl-row:nth-child(odd) { background: #111111; }
.dl-row:nth-child(even) { background: #0e0e0e; }
.dl-row-header { display: flex; align-items: center; gap: 12px; padding: 10px 16px; cursor: pointer; transition: background 0.1s; }
.dl-row-header:hover { background: rgba(255, 255, 255, 0.02); }
.dl-row-num { font-family: var(--font-mono); font-size: 11px; color: #333; min-width: 32px; }
.dl-row-name { flex: 1; font-family: var(--font-mono); font-size: 12px; color: #d4d4d4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-row-sev { font-family: var(--font-mono); font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 2px 8px; min-width: 60px; text-align: center; }
.dl-sev-critical { color: #fda4af; background: rgba(253, 164, 175, 0.1); }
.dl-sev-high { color: #fdba74; background: rgba(253, 186, 116, 0.1); }
.dl-sev-medium { color: #fde68a; background: rgba(253, 230, 138, 0.1); }
.dl-sev-low { color: #a8e6cf; background: rgba(168, 230, 207, 0.1); }
.dl-row-mitre-chips { display: flex; gap: 4px; flex-shrink: 0; }
.dl-mitre-chip { font-family: var(--font-mono); font-size: 10px; color: #c4b5fd; padding: 1px 6px; background: rgba(196, 181, 253, 0.08); border: 1px solid rgba(196, 181, 253, 0.15); }
.dl-mitre-more { font-family: var(--font-mono); font-size: 10px; color: #404040; padding: 1px 4px; }
.dl-row-langs { display: flex; gap: 4px; flex-shrink: 0; }
.dl-lang-badge { font-family: var(--font-mono); font-size: 9px; font-weight: 700; text-transform: uppercase; padding: 2px 6px; }
.dl-lang-badge-spl { color: #a8e6cf; background: rgba(168, 230, 207, 0.1); }
.dl-lang-badge-kql { color: #c4b5fd; background: rgba(196, 181, 253, 0.1); }
.dl-lang-badge-sigma { color: #7dd3fc; background: rgba(125, 211, 252, 0.1); }

/* Expanded Row */
.dl-row-open { background: #0a0a0a !important; }
.dl-row-open .dl-row-header { border-bottom: 1px solid #1a1a1a; }
.dl-row-open .dl-row-name { color: #e5e5e5; }
.dl-row-expanded { padding: 0 16px 16px; }
.dl-row-meta { padding: 10px 0; }
.dl-row-threat-link { font-family: var(--font-mono); font-size: 11px; color: #525252; text-decoration: none; transition: color 0.15s; }
.dl-row-threat-link:hover { color: #7dd3fc; }

/* Code Tabs in expanded row */
.dl-code-tabs { display: flex; gap: 0; border-bottom: 1px solid #1a1a1a; margin-bottom: 0; }
.dl-code-tab { padding: 6px 14px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: #404040; background: transparent; border: none; border-bottom: 2px solid transparent; cursor: pointer; transition: all 0.15s; }
.dl-code-tab:hover { color: #737373; }
.dl-code-tab-active { color: #a3a3a3; }
.dl-code-tab-spl.dl-code-tab-active { color: #a8e6cf; border-bottom-color: #a8e6cf; }
.dl-code-tab-kql.dl-code-tab-active { color: #c4b5fd; border-bottom-color: #c4b5fd; }
.dl-code-tab-sigma.dl-code-tab-active { color: #7dd3fc; border-bottom-color: #7dd3fc; }
.dl-copy-btn { margin-left: auto; padding: 4px 10px; font-family: var(--font-mono); font-size: 10px; color: #404040; background: transparent; border: 1px solid #222; cursor: pointer; transition: all 0.15s; }
.dl-copy-btn:hover { color: #a3a3a3; border-color: #333; }
.dl-copied { color: #a8e6cf !important; border-color: #a8e6cf !important; }

/* Code Block */
.dl-code-block { margin: 0; padding: 14px 16px; background: #0a0a0a; border-left: 3px solid #222; font-family: var(--font-mono); font-size: 12px; line-height: 1.7; color: #d4d4d4; white-space: pre-wrap; word-break: break-word; overflow-x: auto; min-height: 240px; max-height: 500px; overflow-y: auto; }
.dl-code-spl { border-left-color: #a8e6cf; }
.dl-code-kql { border-left-color: #c4b5fd; }
.dl-code-sigma { border-left-color: #7dd3fc; }
.dl-line-num { color: #333; margin-right: 16px; user-select: none; display: inline-block; min-width: 24px; text-align: right; }

/* Row Footer (MITRE + Sources below code) */
.dl-row-footer { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 0 0; }
.dl-row-mitre { display: flex; flex-wrap: wrap; gap: 4px; }
.dl-mitre-tag { font-family: var(--font-mono); font-size: 10px; color: #c4b5fd; padding: 2px 8px; background: rgba(196, 181, 253, 0.06); border: 1px solid rgba(196, 181, 253, 0.15); }
.dl-row-sources { display: flex; flex-wrap: wrap; gap: 4px; }
.dl-src-tag { font-family: var(--font-mono); font-size: 10px; padding: 2px 8px; }
.dl-src-index { color: #a8e6cf; background: rgba(168, 230, 207, 0.06); border: 1px solid rgba(168, 230, 207, 0.15); }
.dl-src-st { color: #fdba74; background: rgba(253, 186, 116, 0.06); border: 1px solid rgba(253, 186, 116, 0.15); }
.dl-src-table { color: #c4b5fd; background: rgba(196, 181, 253, 0.06); border: 1px solid rgba(196, 181, 253, 0.15); }

/* Correlated Section in expanded row */
.dl-correlated { border-top: 1px solid #1a1a1a; padding-top: 10px; margin-top: 10px; }
.dl-correlated-header { font-family: var(--font-mono); font-size: 11px; color: #404040; display: block; margin-bottom: 6px; }
.dl-correlated-items { display: flex; flex-wrap: wrap; gap: 6px; }
.dl-correlated-link { font-family: var(--font-mono); font-size: 11px; color: #737373; cursor: pointer; padding: 2px 8px; background: rgba(255, 255, 255, 0.02); border: 1px solid #1a1a1a; transition: all 0.15s; }
.dl-correlated-link:hover { color: #c4b5fd; border-color: rgba(196, 181, 253, 0.3); background: rgba(196, 181, 253, 0.06); }

/* Empty State */
.dl-empty { text-align: center; padding: 60px 20px; }
.dl-empty-text { display: block; font-family: var(--font-mono); font-size: 13px; color: #404040; margin-bottom: 8px; }
.dl-empty-hint { display: block; font-family: var(--font-mono); font-size: 11px; color: #333; }

/* Pagination */
.dl-pagination { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid #1a1a1a; margin-top: 8px; }
.dl-page-btn { padding: 6px 16px; background: #111111; border: 1px solid #222; color: #737373; font-family: var(--font-mono); font-size: 11px; cursor: pointer; transition: all 0.15s; }
.dl-page-btn:hover:not(:disabled) { color: #e5e5e5; border-color: #333; }
.dl-page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.dl-page-info { font-family: var(--font-mono); font-size: 11px; color: #404040; }

/* Syntax highlighting (shared — keep existing classes) */
.spl-keyword { color: var(--severity-high); font-weight: 600; }
.spl-pipe { color: var(--accent-green); font-weight: 700; }
.spl-string { color: var(--highlight-text); }
.spl-operator { color: #a8e6cf; }
.kql-keyword { color: var(--det-sigma); font-weight: 600; }
.kql-table { color: var(--det-kql); font-weight: 600; }
.kql-string { color: var(--highlight-text); }
.kql-operator { color: #c4b5fd; }
.sigma-keyword { color: var(--det-sigma); font-weight: 600; }
.sigma-key { color: var(--det-sigma); font-weight: 500; }
.sigma-status { color: var(--accent-green); font-style: italic; }
.sigma-level { color: var(--highlight-text); font-weight: 600; }
.sigma-string { color: var(--det-kql); }
.sigma-tag { color: #fda4af; }

/* Light mode overrides */
[data-theme="light"] .dl-header { border-bottom-color: #e5e5e5; }
[data-theme="light"] .dl-title { color: #171717; }
[data-theme="light"] .dl-stat { color: #737373; }
[data-theme="light"] .dl-stat-spl { color: #059669; }
[data-theme="light"] .dl-stat-kql { color: #7c3aed; }
[data-theme="light"] .dl-stat-sigma { color: #0284c7; }
[data-theme="light"] .dl-lang-tabs { border-bottom-color: #e5e5e5; }
[data-theme="light"] .dl-lang-tab { color: #a3a3a3; }
[data-theme="light"] .dl-lang-tab:hover { color: #525252; }
[data-theme="light"] .dl-lang-active { color: #171717; }
[data-theme="light"] .dl-lang-spl.dl-lang-active { color: #059669; border-bottom-color: #059669; }
[data-theme="light"] .dl-lang-kql.dl-lang-active { color: #7c3aed; border-bottom-color: #7c3aed; }
[data-theme="light"] .dl-lang-sigma.dl-lang-active { color: #0284c7; border-bottom-color: #0284c7; }
[data-theme="light"] .dl-filter-bar { border-bottom-color: #e5e5e5; }
[data-theme="light"] .dl-search-wrap { background: #f5f5f5; border-color: #e5e5e5; }
[data-theme="light"] .dl-search-prompt { color: #059669; }
[data-theme="light"] .dl-search-input { color: #171717; }
[data-theme="light"] .dl-search-input::placeholder { color: #a3a3a3; }
[data-theme="light"] .dl-filter-select { background: #f5f5f5; border-color: #e5e5e5; color: #525252; }
[data-theme="light"] .dl-filter-input { background: #f5f5f5; border-color: #e5e5e5; color: #525252; }
[data-theme="light"] .dl-filter-input::placeholder { color: #a3a3a3; }
[data-theme="light"] .dl-sort-btn { background: #f5f5f5; border-color: #e5e5e5; color: #525252; }
[data-theme="light"] .dl-correlate-btn { border-color: #e5e5e5; color: #a3a3a3; }
[data-theme="light"] .dl-correlate-btn:hover { color: #7c3aed; border-color: #7c3aed; }
[data-theme="light"] .dl-correlate-active { color: #7c3aed; border-color: #7c3aed; background: rgba(124, 58, 237, 0.05); }
[data-theme="light"] .dl-pill { background: rgba(5, 150, 105, 0.06); border-color: rgba(5, 150, 105, 0.2); color: #059669; }
[data-theme="light"] .dl-pill-x { color: #a3a3a3; }
[data-theme="light"] .dl-pill-x:hover { color: #dc2626; }
[data-theme="light"] .dl-pill-clear { border-color: #e5e5e5; color: #a3a3a3; }
[data-theme="light"] .dl-results-count { color: #a3a3a3; }
[data-theme="light"] .dl-correlation-panel { border-bottom-color: #e5e5e5; }
[data-theme="light"] .dl-corr-header { color: #a3a3a3; }
[data-theme="light"] .dl-corr-technique { color: #7c3aed; background: rgba(124, 58, 237, 0.04); border-color: rgba(124, 58, 237, 0.15); }
[data-theme="light"] .dl-corr-source { color: #059669; background: rgba(5, 150, 105, 0.04); border-color: rgba(5, 150, 105, 0.15); }
[data-theme="light"] .dl-corr-actor { color: #dc2626; background: rgba(220, 38, 38, 0.04); border-color: rgba(220, 38, 38, 0.15); }
[data-theme="light"] .dl-corr-count { color: #a3a3a3; }
[data-theme="light"] .dl-corr-selected { background: rgba(196, 181, 253, 0.2) !important; color: #333 !important; }
[data-theme="light"] .dl-corr-pill { background: rgba(0,0,0,0.05); color: #333; }
[data-theme="light"] .dl-corr-op-toggle { border-color: #ccc; color: #333; }
[data-theme="light"] .dl-corr-clear { border-color: #ccc; color: #888; }
[data-theme="light"] .dl-row { border-bottom-color: #f0f0f0; }
[data-theme="light"] .dl-row:nth-child(odd) { background: #ffffff; }
[data-theme="light"] .dl-row:nth-child(even) { background: #fafafa; }
[data-theme="light"] .dl-row-header:hover { background: rgba(0, 0, 0, 0.02); }
[data-theme="light"] .dl-row-num { color: #d4d4d4; }
[data-theme="light"] .dl-row-name { color: #262626; }
[data-theme="light"] .dl-sev-critical { color: #dc2626; background: rgba(220, 38, 38, 0.06); }
[data-theme="light"] .dl-sev-high { color: #ea580c; background: rgba(234, 88, 12, 0.06); }
[data-theme="light"] .dl-sev-medium { color: #ca8a04; background: rgba(202, 138, 4, 0.06); }
[data-theme="light"] .dl-sev-low { color: #059669; background: rgba(5, 150, 105, 0.06); }
[data-theme="light"] .dl-mitre-chip { color: #7c3aed; background: rgba(124, 58, 237, 0.05); border-color: rgba(124, 58, 237, 0.15); }
[data-theme="light"] .dl-mitre-more { color: #a3a3a3; }
[data-theme="light"] .dl-lang-badge-spl { color: #059669; background: rgba(5, 150, 105, 0.06); }
[data-theme="light"] .dl-lang-badge-kql { color: #7c3aed; background: rgba(124, 58, 237, 0.06); }
[data-theme="light"] .dl-lang-badge-sigma { color: #0284c7; background: rgba(2, 132, 199, 0.06); }
[data-theme="light"] .dl-row-open { background: #ffffff !important; }
[data-theme="light"] .dl-row-open .dl-row-header { border-bottom-color: #f0f0f0; }
[data-theme="light"] .dl-row-open .dl-row-name { color: #171717; }
[data-theme="light"] .dl-row-threat-link { color: #737373; }
[data-theme="light"] .dl-row-threat-link:hover { color: #0284c7; }
[data-theme="light"] .dl-code-tabs { border-bottom-color: #e5e5e5; }
[data-theme="light"] .dl-code-tab { color: #a3a3a3; }
[data-theme="light"] .dl-code-tab:hover { color: #525252; }
[data-theme="light"] .dl-code-tab-spl.dl-code-tab-active { color: #059669; border-bottom-color: #059669; }
[data-theme="light"] .dl-code-tab-kql.dl-code-tab-active { color: #7c3aed; border-bottom-color: #7c3aed; }
[data-theme="light"] .dl-code-tab-sigma.dl-code-tab-active { color: #0284c7; border-bottom-color: #0284c7; }
[data-theme="light"] .dl-copy-btn { color: #a3a3a3; border-color: #e5e5e5; }
[data-theme="light"] .dl-copy-btn:hover { color: #525252; border-color: #d4d4d4; }
[data-theme="light"] .dl-copied { color: #059669 !important; border-color: #059669 !important; }
[data-theme="light"] .dl-code-block { background: #fafafa; color: #262626; border-left-color: #e5e5e5; }
[data-theme="light"] .dl-code-spl { border-left-color: #059669; }
[data-theme="light"] .dl-code-kql { border-left-color: #7c3aed; }
[data-theme="light"] .dl-code-sigma { border-left-color: #0284c7; }
[data-theme="light"] .dl-line-num { color: #d4d4d4; }
[data-theme="light"] .dl-mitre-tag { color: #7c3aed; background: rgba(124, 58, 237, 0.04); border-color: rgba(124, 58, 237, 0.12); }
[data-theme="light"] .dl-src-index { color: #059669; background: rgba(5, 150, 105, 0.04); border-color: rgba(5, 150, 105, 0.12); }
[data-theme="light"] .dl-src-st { color: #ea580c; background: rgba(234, 88, 12, 0.04); border-color: rgba(234, 88, 12, 0.12); }
[data-theme="light"] .dl-src-table { color: #7c3aed; background: rgba(124, 58, 237, 0.04); border-color: rgba(124, 58, 237, 0.12); }
[data-theme="light"] .dl-correlated { border-top-color: #f0f0f0; }
[data-theme="light"] .dl-correlated-header { color: #a3a3a3; }
[data-theme="light"] .dl-correlated-link { color: #525252; background: rgba(0, 0, 0, 0.02); border-color: #f0f0f0; }
[data-theme="light"] .dl-correlated-link:hover { color: #7c3aed; border-color: rgba(124, 58, 237, 0.3); }
[data-theme="light"] .dl-empty-text { color: #a3a3a3; }
[data-theme="light"] .dl-empty-hint { color: #d4d4d4; }
[data-theme="light"] .dl-pagination { border-top-color: #e5e5e5; }
[data-theme="light"] .dl-page-btn { background: #f5f5f5; border-color: #e5e5e5; color: #525252; }
[data-theme="light"] .dl-page-btn:hover:not(:disabled) { color: #171717; border-color: #d4d4d4; }
[data-theme="light"] .dl-page-info { color: #a3a3a3; }

/* Responsive */
@media (max-width: 768px) {
    .dl-filter-bar { flex-direction: column; align-items: stretch; }
    .dl-search-wrap { min-width: 100%; }
    .dl-header { flex-direction: column; gap: 8px; }
    .dl-header-stats { flex-wrap: wrap; }
    .dl-correlation-panel { grid-template-columns: 1fr; }
    .dl-row-header { flex-wrap: wrap; gap: 6px; }
    .dl-row-name { min-width: 100%; order: -1; white-space: normal; word-break: break-word; }
    .dl-code-tabs { flex-wrap: wrap; }
    .dl-row-mitre-chips { display: none; }
    .dl-row-langs { display: none; }
    .dl-filter-pill { max-width: 140px; }
    /* iOS auto-zoom prevention: inputs/selects must be >= 16px */
    .dl-search-input { font-size: 16px; }
    .dl-filter-select { font-size: 16px; }
    .dl-filter-input { font-size: 16px; }
}

/* ===== DETECTION LIBRARY FILTER SIDEBAR (dl-filter-*) ===== */

/* Layout */
.dl-panels { display: flex; gap: 0; min-height: 400px; }
.dl-filter-sidebar { width: 240px; flex-shrink: 0; border-right: 1px solid #1a1a1a; padding: 12px; overflow-y: auto; max-height: calc(100vh - 220px); background: #0a0a0a; }
.dl-content { flex: 1; min-width: 0; overflow: hidden; }

/* Filter Groups */
.dl-filter-group { margin-bottom: 8px; }
.dl-filter-group-header { font-family: var(--font-mono); font-size: 11px; color: #525252; padding: 6px 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; user-select: none; }
.dl-filter-group-header:hover { color: #737373; }
.dl-filter-chevron { font-size: 10px; transition: transform 0.15s; color: #404040; }
.dl-filter-group.collapsed .dl-filter-group-body { display: none; }
.dl-filter-group.collapsed .dl-filter-chevron { transform: rotate(-90deg); }
.dl-filter-group-body { padding: 2px 0 4px 4px; }
.dl-filter-item { display: flex; align-items: center; gap: 8px; padding: 3px 4px; cursor: pointer; font-family: var(--font-mono); font-size: 11px; color: #737373; transition: background 0.1s; }
.dl-filter-item:hover { background: rgba(255, 255, 255, 0.02); }
.dl-filter-item.active { color: #e5e5e5; }
.dl-filter-check { width: 12px; height: 12px; border: 1px solid #333; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; flex-shrink: 0; }
.dl-filter-item.active .dl-filter-check { border-color: #a8e6cf; color: #a8e6cf; }
.dl-filter-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.dl-filter-count { color: #333; margin-left: auto; font-size: 10px; flex-shrink: 0; }
.dl-filter-item.active .dl-filter-count { color: #525252; }

/* Filter search inputs */
.dl-filter-search { width: 100%; background: #111111; border: 1px solid #222; color: #a3a3a3; font-family: var(--font-mono); font-size: 10px; padding: 5px 8px; outline: none; margin-bottom: 4px; }
.dl-filter-search::placeholder { color: #333; }
.dl-filter-search:focus { border-color: #333; }

/* Active filter pills in sidebar */
.dl-filter-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid #1a1a1a; }
.dl-filter-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: rgba(168, 230, 207, 0.08); border: 1px solid rgba(168, 230, 207, 0.15); color: #a8e6cf; font-family: var(--font-mono); font-size: 10px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-filter-pill-x { cursor: pointer; color: #525252; font-weight: 700; font-size: 11px; }
.dl-filter-pill-x:hover { color: #fda4af; }
.dl-filter-clear { font-family: var(--font-mono); font-size: 10px; color: #525252; cursor: pointer; padding: 4px 0; margin-bottom: 8px; }
.dl-filter-clear:hover { color: #fda4af; }

/* Sidebar search bar */
.dl-sidebar-search { width: 100%; background: #111111; border: 1px solid #222; color: #e5e5e5; font-family: var(--font-mono); font-size: 11px; padding: 7px 8px; outline: none; margin-bottom: 10px; }
.dl-sidebar-search::placeholder { color: #404040; }
.dl-sidebar-search:focus { border-color: #333; }

/* Filter toggle for mobile */
.dl-filter-toggle { display: none; font-family: var(--font-mono); font-size: 11px; color: #737373; background: #111111; border: 1px solid #222; padding: 6px 12px; cursor: pointer; margin-bottom: 8px; }
.dl-filter-toggle:hover { color: #e5e5e5; border-color: #333; }
.dl-filter-toggle .dl-filter-toggle-count { color: #a8e6cf; }

/* Show all link */
.dl-filter-show-all { font-family: var(--font-mono); font-size: 10px; color: #c4b5fd; cursor: pointer; padding: 4px; }
.dl-filter-show-all:hover { color: #e5e5e5; }

/* Sort bar in content area */
.dl-sort-bar { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #1a1a1a; }
.dl-sort-item { font-family: var(--font-mono); font-size: 11px; color: #525252; cursor: pointer; padding: 3px 8px; }
.dl-sort-item:hover { color: #a3a3a3; }
.dl-sort-item.active { color: #e5e5e5; }

/* Filter Sidebar Light Mode */
[data-theme="light"] .dl-filter-sidebar { background: #fafafa; border-right-color: #e5e5e5; }
[data-theme="light"] .dl-filter-group-header { color: #a3a3a3; }
[data-theme="light"] .dl-filter-group-header:hover { color: #525252; }
[data-theme="light"] .dl-filter-chevron { color: #a3a3a3; }
[data-theme="light"] .dl-filter-item { color: #737373; }
[data-theme="light"] .dl-filter-item:hover { background: rgba(0, 0, 0, 0.02); }
[data-theme="light"] .dl-filter-item.active { color: #262626; }
[data-theme="light"] .dl-filter-check { border-color: #d4d4d4; }
[data-theme="light"] .dl-filter-item.active .dl-filter-check { border-color: #059669; color: #059669; }
[data-theme="light"] .dl-filter-count { color: #d4d4d4; }
[data-theme="light"] .dl-filter-item.active .dl-filter-count { color: #737373; }
[data-theme="light"] .dl-filter-search { background: #f5f5f5; border-color: #e5e5e5; color: #525252; }
[data-theme="light"] .dl-filter-search::placeholder { color: #a3a3a3; }
[data-theme="light"] .dl-filter-pills { border-bottom-color: #e5e5e5; }
[data-theme="light"] .dl-filter-pill { background: rgba(5, 150, 105, 0.06); border-color: rgba(5, 150, 105, 0.15); color: #059669; }
[data-theme="light"] .dl-filter-pill-x { color: #a3a3a3; }
[data-theme="light"] .dl-filter-pill-x:hover { color: #dc2626; }
[data-theme="light"] .dl-filter-clear { color: #a3a3a3; }
[data-theme="light"] .dl-filter-clear:hover { color: #dc2626; }
[data-theme="light"] .dl-sidebar-search { background: #f5f5f5; border-color: #e5e5e5; color: #171717; }
[data-theme="light"] .dl-sidebar-search::placeholder { color: #a3a3a3; }
[data-theme="light"] .dl-filter-toggle { background: #f5f5f5; border-color: #e5e5e5; color: #525252; }
[data-theme="light"] .dl-filter-toggle:hover { color: #171717; border-color: #d4d4d4; }
[data-theme="light"] .dl-sort-bar { border-bottom-color: #e5e5e5; }
[data-theme="light"] .dl-sort-item { color: #a3a3a3; }
[data-theme="light"] .dl-sort-item:hover { color: #525252; }
[data-theme="light"] .dl-sort-item.active { color: #171717; }
[data-theme="light"] .dl-filter-show-all { color: #7c3aed; }
[data-theme="light"] .dl-filter-show-all:hover { color: #171717; }

/* Filter Sidebar Responsive */
@media (max-width: 768px) {
    .dl-filter-toggle { display: block; }
    .dl-panels { flex-direction: column; }
    .dl-filter-sidebar { width: 100%; max-height: none; border-right: none; border-bottom: 1px solid #1a1a1a; display: none; padding: 8px; }
    .dl-filter-sidebar.dl-sidebar-open { display: block; }
}
@media (max-width: 480px) {
    .dl-filter-sidebar { padding: 6px; }
    .dl-filter-group-header { font-size: 10px; }
    .dl-filter-item { font-size: 10px; }
}

/* ===== MCP SERVER PAGE STYLES ===== */
.mcp-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 15px;
}

.mcp-hero {
    text-align: center;
    padding: 30px 15px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    border-radius: 0;
    margin-bottom: 20px;
}

.mcp-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.mcp-icon {
    font-size: 36px;
}

.mcp-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.mcp-tagline {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.mcp-badges {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mcp-badge {
    background: rgba(255,255,255,0.15);
    padding: 5px 12px;
    border-radius: 0;
    font-size: 12px;
    color: var(--text-primary);
}

.mcp-section {
    background: var(--bg-card);
    border-radius: 0;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.mcp-section h2 {
    color: var(--text-primary);
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mcp-code-block {
    background: var(--bg-tertiary);
    border-radius: 0;
    overflow: hidden;
    margin: 12px 0;
}

.mcp-code-block .code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.mcp-code-block .code-header span {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.mcp-code-block pre {
    margin: 0;
    padding: 12px;
    overflow-x: auto;
    font-size: 12px;
}

.mcp-code-block code {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-all;
}

.mcp-note {
    color: var(--text-muted);
    font-size: 13px;
    margin: 8px 0;
}

/* Config Tabs */
.mcp-config-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.mcp-tab {
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.mcp-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.mcp-tab.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

/* Tools Grid */
.mcp-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.mcp-tool-card {
    background: var(--bg-tertiary);
    border-radius: 0;
    padding: 14px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.mcp-tool-card:hover {
    border-color: var(--accent-blue);
}

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

.tool-icon {
    font-size: 18px;
}

.tool-name {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-blue);
}

.tool-desc {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.tool-params {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tool-params .param {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--bg-hover);
    border-radius: 0;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.tool-params .param.required {
    background: rgba(168, 230, 207, 0.15);
    color: var(--accent-green);
}

/* Resources List */
.mcp-resources-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mcp-resource {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: 0;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.mcp-resource code {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--det-kql);
    background: var(--bg-hover);
    padding: 3px 8px;
    border-radius: 0;
    white-space: nowrap;
}

.mcp-resource span {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Examples */
.mcp-examples {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mcp-example {
    background: var(--bg-tertiary);
    border-radius: 0;
    padding: 12px;
    border: 1px solid var(--border-color);
}

.example-prompt {
    color: var(--text-primary);
    font-size: 13px;
    margin-bottom: 6px;
    line-height: 1.4;
}

.example-prompt::before {
    content: '💬 ';
}

.example-tool {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent-green);
    padding-left: 20px;
    word-break: break-all;
}

/* Links */
.mcp-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mcp-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border-radius: 0;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 13px;
}

.mcp-link:hover {
    background: var(--bg-hover);
    border-color: var(--accent-blue);
}

.link-icon {
    font-size: 16px;
}

/* Nav badge for NEW */
.nav-badge.new {
    background: var(--accent-green);
    color: #000;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 0;
    margin-left: auto;
    font-weight: 700;
}

/* Responsive MCP - Mobile First */
@media (max-width: 600px) {
    .mcp-container {
        padding: 10px;
    }
    
    .mcp-hero {
        padding: 20px 12px;
        border-radius: 0;
        margin-bottom: 15px;
    }
    
    .mcp-logo {
        flex-direction: column;
        gap: 8px;
    }
    
    .mcp-icon {
        font-size: 32px;
    }
    
    .mcp-title {
        font-size: 20px;
    }
    
    .mcp-tagline {
        font-size: 13px;
    }
    
    .mcp-badges {
        gap: 6px;
    }
    
    .mcp-badge {
        font-size: 11px;
        padding: 4px 10px;
    }
    
    .mcp-section {
        padding: 15px 12px;
        border-radius: 0;
        margin-bottom: 12px;
    }
    
    .mcp-section h2 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .mcp-config-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .mcp-tab {
        padding: 8px 10px;
        font-size: 12px;
        text-align: center;
    }
    
    .mcp-code-block pre {
        padding: 10px;
        font-size: 11px;
    }
    
    .mcp-code-block code {
        font-size: 11px;
    }
    
    .mcp-tools-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .mcp-tool-card {
        padding: 12px;
    }
    
    .tool-name {
        font-size: 12px;
    }
    
    .tool-desc {
        font-size: 11px;
    }
    
    .mcp-resource {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 10px;
    }
    
    .mcp-resource code {
        font-size: 10px;
    }
    
    .mcp-resource span {
        font-size: 12px;
    }
    
    .mcp-example {
        padding: 10px;
    }
    
    .example-prompt {
        font-size: 12px;
    }
    
    .example-tool {
        font-size: 10px;
        padding-left: 0;
        margin-top: 6px;
    }
    
    .mcp-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .mcp-link {
        padding: 10px 12px;
        font-size: 12px;
    }
}

/* Tablet adjustments */
@media (min-width: 601px) and (max-width: 900px) {
    .mcp-container {
        padding: 15px;
    }
    
    .mcp-tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mcp-config-tabs {
        flex-wrap: wrap;
    }
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-surface: #f5f5f5;
    --bg-surface-alt: #fafafa;
    --bg-elevated: #ffffff;
    --bg-tertiary: #e5e5e5;
    --bg-card: #fafafa;
    --bg-hover: #eeeeee;
    --bg-active: #e0e0e0;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #888888;
    --border-color: #dddddd;
    --border-light: #cccccc;
    --accent-primary: #1a1a1a;
    --highlight-bg: rgba(253, 186, 116, 0.2);
    --highlight-text: #b45309;
    --severity-critical: #e11d48;
    --severity-high: #ea580c;
    --severity-medium: #7c3aed;
    --severity-low: #059669;
    --det-spl: #059669;
    --det-kql: #7c3aed;
    --det-sigma: #0284c7;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
}

/* Light theme overrides for hardcoded dark colors */
[data-theme="light"] .main-content {
    background: #f5f5f5;
}

[data-theme="light"] .nav-section-title {
    color: #888888;
}

[data-theme="light"] .nav-item {
    color: #555555;
}

[data-theme="light"] .nav-item:hover {
    background: #e8e8e8;
    color: #1a1a1a;
}

[data-theme="light"] .nav-item.active {
    background: #e8e8e8;
    color: #1a1a1a;
}

[data-theme="light"] .nav-label {
    color: #444444;
}

[data-theme="light"] .nav-item:hover .nav-label {
    color: #1a1a1a;
}

[data-theme="light"] .nav-item.active .nav-label {
    color: #1a1a1a;
}

[data-theme="light"] .nav-dot {
    background: #8b5cf6;
}

[data-theme="light"] .nav-count {
    color: #888888;
}

[data-theme="light"] .sidebar-footer {
    border-top-color: #dddddd;
}

[data-theme="light"] .stats-bar {
    background: #ffffff;
    border-bottom-color: #dddddd;
}

[data-theme="light"] .stat-chip-label {
    color: #888888;
}

[data-theme="light"] .feed-header {
    border-bottom-color: #dddddd;
}

[data-theme="light"] .feed-title {
    color: #555555;
}

[data-theme="light"] .threat-row {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

[data-theme="light"] .threat-row:nth-child(even) {
    background: #fafafa;
}

[data-theme="light"] .threat-row:hover {
    background: #f0f0f0;
}

[data-theme="light"] .detection-query.spl {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.08) 0%, #fff 100%);
    color: #059669;
}

[data-theme="light"] .detection-query.kql {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, #fff 100%);
    color: #7c3aed;
}

[data-theme="light"] .detection-query.sigma {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, #fff 100%);
    color: #0284c7;
}

[data-theme="light"] .sidebar {
    box-shadow: 2px 0 8px rgba(0,0,0,0.05);
}

[data-theme="light"] .threat-row {
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ===== THEME TOGGLE BUTTON ===== */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 12px;
    color: #525252;
    padding: 4px 8px;
    margin-left: auto;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.theme-toggle-btn:hover {
    color: #e8e8e8;
}

.theme-bracket {
    color: #525252;
    font-weight: 600;
}

.theme-toggle-btn:hover .theme-bracket {
    color: #a8e6cf;
}

.theme-icon {
    font-size: 14px;
}

.theme-label {
    font-size: 11px;
    letter-spacing: 0.5px;
}

[data-theme="light"] .theme-toggle-btn {
    color: #888888;
}

[data-theme="light"] .theme-toggle-btn:hover {
    color: #1a1a1a;
}

[data-theme="light"] .theme-toggle-btn:hover .theme-bracket {
    color: #059669;
}

/* Topbar User Badge */
.topbar-user {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 16px;
    border-left: 1px solid #1a1a1a;
    margin-left: 0;
}
.topbar-user-dot {
    width: 6px;
    height: 6px;
    flex-shrink: 0;
}
.topbar-user-email {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #737373;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}
.topbar-user-tier {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.topbar-user-link {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    cursor: pointer;
}
.topbar-user-link:hover .topbar-user-email {
    color: #e8e8e8;
}
.topbar-signout-btn {
    font-family: var(--font-mono);
    font-size: 10px;
    background: none;
    border: none;
    color: #525252;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
    white-space: nowrap;
}
.topbar-signout-btn:hover {
    color: #fda4af;
}
a.logo {
    text-decoration: none;
    cursor: pointer;
}
[data-theme="light"] .topbar-user {
    border-left-color: #e0e0e0;
}
[data-theme="light"] .topbar-user-email {
    color: #737373;
}
[data-theme="light"] .topbar-user-link:hover .topbar-user-email {
    color: #1a1a1a;
}
[data-theme="light"] .topbar-signout-btn {
    color: #a3a3a3;
}
[data-theme="light"] .topbar-signout-btn:hover {
    color: #e11d48;
}

/* ===== CISA KEV WIDGET ===== */
.cisa-kev-widget {
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    border: 2px solid;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cisa-kev-widget.overdue {
    background: rgba(253, 164, 175, 0.15);
    border-color: var(--severity-critical);
}

.cisa-kev-widget.urgent {
    background: rgba(253, 164, 175, 0.1);
    border-color: var(--severity-critical);
}

.cisa-kev-widget.warning {
    background: rgba(196, 181, 253, 0.1);
    border-color: var(--severity-medium);
}

.cisa-kev-widget.ok {
    background: rgba(168, 230, 207, 0.1);
    border-color: var(--accent-green);
}

.cisa-kev-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
}

.cisa-kev-date {
    font-size: 13px;
    color: var(--text-secondary);
}

.cisa-kev-countdown {
    font-size: 18px;
    font-weight: 700;
}

.cisa-kev-overdue {
    color: var(--severity-critical);
    animation: pulse 2s ease-in-out infinite;
}

.cisa-kev-timer {
    color: var(--text-primary);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.cisa-badge {
    background: rgba(253, 164, 175, 0.2);
    color: var(--severity-critical);
    padding: 2px 8px;
    border-radius: 0;
    font-size: 10px;
    font-weight: 700;
}

/* ===== DETECTION EXPORT BAR ===== */
.detection-export-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.export-all-sigma-btn {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.export-all-sigma-btn:hover {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

/* ===== SYNTAX HIGHLIGHTING ===== */
.detection-query {
    display: flex;
    gap: 0;
    padding: 0;
}

.line-numbers {
    display: flex;
    flex-direction: column;
    padding: 14px 8px 14px 12px;
    text-align: right;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.5;
    border-right: 1px solid var(--border-color);
    user-select: none;
    opacity: 0.5;
    min-width: 30px;
}

.line-numbers span {
    display: block;
}

.code-content {
    flex: 1;
    padding: 14px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.5;
    font-family: var(--font-mono);
    font-size: 12px;
}

.spl-keyword { color: var(--det-spl); font-weight: 600; }
.spl-operator { color: var(--highlight-text); }
.spl-string { color: var(--severity-high); }

.kql-keyword { color: var(--det-kql); font-weight: 600; }
.kql-operator { color: var(--highlight-text); }
.kql-string { color: var(--severity-high); }

.sigma-key { color: var(--det-sigma); font-weight: 600; }
.sigma-tag { color: var(--det-spl); }

[data-theme="light"] .spl-keyword { color: #16a34a; }
[data-theme="light"] .kql-keyword { color: #7c3aed; }
[data-theme="light"] .sigma-key { color: #5ab8e6; }

/* ===== SIMILAR THREATS GRID ===== */
.similar-threats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.similar-threat-card {
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s ease;
}

.similar-threat-card:hover {
    border-color: var(--accent-blue);
    background: var(--bg-hover);
}

.similar-threat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.similar-threat-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.similar-threat-shared {
    font-size: 10px;
    color: var(--accent-blue);
    margin-top: 6px;
}

/* ===== KEYBOARD SHORTCUTS MODAL ===== */
.shortcuts-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.shortcuts-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
}

.shortcuts-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 450px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.shortcuts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.shortcuts-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.shortcuts-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.shortcut-item kbd {
    display: inline-block;
    padding: 3px 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 28px;
    text-align: center;
}

.shortcut-item span {
    flex: 1;
}

/* ===== COMPARISON PANEL ===== */
.compare-panel {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    max-height: 50vh;
    background: var(--bg-card);
    border-top: 2px solid var(--accent-blue);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    z-index: 500;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

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

.compare-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.compare-content {
    padding: 16px 20px;
    overflow-y: auto;
}

.compare-placeholder {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    font-size: 14px;
}

.compare-table {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.compare-row {
    display: grid;
    grid-template-columns: 150px 1fr 1fr;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.compare-header-row {
    background: var(--bg-tertiary);
    font-weight: 700;
    position: sticky;
    top: 0;
}

.compare-diff {
    background: rgba(196, 181, 253, 0.08);
}

.compare-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.compare-val {
    color: var(--text-primary);
    word-break: break-word;
}

.threat-row.compare-selected {
    outline: 2px solid var(--accent-blue);
    outline-offset: -2px;
}

.threat-row.keyboard-focused {
    outline: 2px solid var(--accent-green);
    outline-offset: -2px;
}

/* ===== STATS PAGE ===== */
.stats-page {
    padding: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stats-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.stats-card-wide {
    grid-column: 1 / -1;
}

.stats-card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.stats-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stats-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-bar-label {
    min-width: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
}

.stats-bar-label.mitre-label {
    font-family: var(--font-mono);
    color: var(--accent-blue);
}

.stats-bar-track {
    flex: 1;
    height: 20px;
    background: var(--bg-tertiary);
    border-radius: 0;
    overflow: hidden;
}

.stats-bar-fill {
    height: 100%;
    border-radius: 0;
    transition: width 0.5s ease;
}

.severity-fill-critical { background: var(--severity-critical); }
.severity-fill-high { background: var(--severity-high); }
.severity-fill-medium { background: var(--severity-medium); }
.severity-fill-low { background: var(--severity-low); }
.cat-fill { background: var(--accent-blue); }
.mitre-fill { background: linear-gradient(90deg, var(--accent-blue), var(--det-sigma)); }

.stats-bar-value {
    min-width: 30px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
}

.stats-donut {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.donut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
}

.spl-donut { background: rgba(168, 230, 207, 0.1); }
.kql-donut { background: rgba(196, 181, 253, 0.1); }
.sigma-donut { background: rgba(125, 211, 252, 0.1); }

.donut-label { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.donut-value { font-size: 20px; font-weight: 700; color: var(--text-primary); }

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tag-cloud-item {
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    transition: all 0.15s ease;
    cursor: default;
}

.tag-cloud-item:hover {
    background: var(--accent-blue);
    color: white;
}

.tag-cloud-item sup {
    font-size: 0.7em;
    color: var(--text-muted);
}

/* ===== COVERAGE PAGE ===== */
.coverage-page {
    padding: 20px;
}

.coverage-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.coverage-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
}

.coverage-stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
}

.coverage-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.heatmap-section {
    margin: 24px 0;
}

.heatmap-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.heatmap-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.heatmap-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.heatmap-tactic {
    min-width: 160px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    padding-top: 4px;
}

.heatmap-cells {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
}

.heatmap-cell {
    padding: 4px 8px;
    border-radius: 0;
    font-size: 10px;
    font-family: var(--font-mono);
    color: white;
    cursor: default;
    font-weight: 600;
}

.heatmap-empty {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    padding: 4px 0;
}

.gaps-section {
    margin: 24px 0;
    padding: 20px;
    background: rgba(253, 164, 175, 0.05);
    border: 1px solid rgba(253, 164, 175, 0.2);
    border-radius: var(--radius-lg);
}

.gaps-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.gaps-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gap-badge {
    padding: 6px 12px;
    background: rgba(253, 164, 175, 0.15);
    border: 1px solid rgba(253, 164, 175, 0.3);
    border-radius: var(--radius-sm);
    color: var(--severity-critical);
    font-size: 12px;
    font-weight: 600;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .compare-panel {
        left: 0;
    }
    .compare-row {
        grid-template-columns: 100px 1fr 1fr;
        font-size: 11px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .heatmap-row {
        flex-direction: column;
    }
    .heatmap-tactic {
        min-width: auto;
    }
    .shortcuts-content {
        max-width: 95%;
    }
    .similar-threats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== NEW COMPONENTS — Black + Pastel Command Center ===== */

/* ===== STATS BAR (Compact Horizontal) ===== */
/* ===== STATS BAR — per mockup: 97 threats | 955 det | 12 crit | 28 high | sparkline ===== */
.stats-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 48px;
    padding: 0 24px;
    background: #0a0a0a;
}

.stat-chip {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.stat-chip-value {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    color: #e8e8e8;
}

.stat-chip-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: normal;
    color: #525252;
    text-transform: none;
    letter-spacing: 0;
}

.stat-chip-value.critical { color: #fda4af; }
.stat-chip-value.high { color: #fdba74; }
.stat-chip-value.medium { color: #c4b5fd; }
.stat-chip-value.low { color: #a8e6cf; }

.stat-divider {
    width: 1px;
    height: 32px;
    background: #1e1e1e;
}

/* ===== SPARKLINE — colored bars aligned bottom ===== */
.sparkline-container {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 40px;
    flex: 1;
    padding-bottom: 4px;
}

.sparkline-bar {
    width: 4px;
    background: #fde68a;
    transition: opacity 0.15s ease;
}

.sparkline-bar:hover {
    opacity: 0.8;
}

.sparkline-bar.critical { background: #fda4af; }
.sparkline-bar.high { background: #fdba74; }
.sparkline-bar.medium { background: #c4b5fd; }
.sparkline-bar.low { background: #a8e6cf; }

/* ===== THREAT ROW — vertical stack per mockup, NO left severity bar ===== */
.threat-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 20px;
    background: #111111;
    border: 1px solid #1e1e1e;
    cursor: pointer;
    transition: background 0.15s ease;
}

.threat-row:nth-child(even) {
    background: #0e0e0e;
}

.threat-row:hover {
    background: #161616;
}

.threat-row.active {
    background: #161616;
    border-color: #c4b5fd;
}

/* Hidden — no left severity bar in mockup */
.threat-row-severity { display: none; }

.threat-row-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.threat-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.threat-row-top-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.threat-row-title {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: #e8e8e8;
    line-height: 1.4;
}

.threat-row-subtitle {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: normal;
    color: #737373;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.threat-row-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 4px;
}

.threat-row-tags {
    display: flex;
    align-items: center;
    gap: 8px;
}

.threat-row-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: normal;
    color: #7dd3fc;
}

.threat-row-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.threat-row-meta-det {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #a8e6cf;
}

.threat-row-meta-ioc {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #fdba74;
}

.threat-row-meta-actor {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #c4b5fd;
    max-width: 400px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Date shown in top row, right side */
.threat-row-date {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: normal;
    color: #525252;
}

/* Hidden — the right column from old layout is gone */
.threat-row-right { display: none; }
.threat-row-badges { display: none; }

.threat-row-footer {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ===== MITRE KILL CHAIN STRIP — 14 cells, 8px height ===== */
.mitre-strip-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mitre-strip {
    display: flex;
    gap: 2px;
}

.mitre-strip-cell {
    width: 14px;
    height: 8px;
    background: #1e1e1e;
    transition: background 0.15s ease;
}

.mitre-strip-cell.active {
    background: #c4b5fd;
}

.mitre-strip-labels {
    display: flex;
    gap: 2px;
}

.mitre-strip-label {
    width: 14px;
    font-family: var(--font-mono);
    font-size: 7px;
    font-weight: normal;
    color: #525252;
    text-align: center;
}

/* ===== MITRE KILL CHAIN (DETAIL PANEL) ===== */
.mitre-chain {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.mitre-chain-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 42px;
}

.mitre-chain-box {
    width: 100%;
    height: 28px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mitre-chain-box.active {
    background: rgba(196, 181, 253, 0.3);
    border: 1px solid var(--accent-purple);
}

.mitre-chain-box .count {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-purple);
}

.mitre-chain-label {
    font-family: var(--font-mono);
    font-size: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.3px;
}

/* ===== COVERAGE GAUGE ===== */
.coverage-gauge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.coverage-ring {
    width: 48px;
    height: 48px;
    position: relative;
}

.coverage-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.coverage-ring .ring-bg {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 4;
}

.coverage-ring .ring-fill {
    fill: none;
    stroke: var(--accent-green);
    stroke-width: 4;
    stroke-linecap: square;
    transition: stroke-dashoffset 0.5s ease;
}

.coverage-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ===== IOC OVERLAP INDICATOR ===== */
.ioc-overlap {
    display: flex;
    gap: 4px;
    align-items: center;
}

.ioc-overlap-bar {
    height: 8px;
    flex: 1;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.ioc-overlap-fill {
    height: 100%;
    background: var(--severity-critical);
    transition: width 0.3s ease;
}

.ioc-overlap-value {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 36px;
    text-align: right;
}

/* ===== CVSS HISTOGRAM ===== */
.cvss-histogram {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 40px;
}

.cvss-bar {
    flex: 1;
    background: var(--accent-blue);
    opacity: 0.5;
    min-width: 4px;
    transition: opacity 0.15s ease;
}

.cvss-bar:hover {
    opacity: 1;
}

/* ===== DETECTION CODE BLOCK (NEW) ===== */
.det-code-block {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.det-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.det-code-lang {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.det-code-lang.spl { color: var(--det-spl); }
.det-code-lang.kql { color: var(--det-kql); }
.det-code-lang.sigma { color: var(--det-sigma); }

.det-code-body {
    display: flex;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.6;
}

.det-code-lines {
    padding: 12px 0;
    text-align: right;
    color: var(--text-muted);
    user-select: none;
    border-right: 1px solid var(--border-color);
    min-width: 36px;
}

.det-code-lines span {
    display: block;
    padding: 0 8px;
    font-size: 11px;
}

.det-code-content {
    padding: 12px 16px;
    overflow-x: auto;
    white-space: pre;
    color: var(--text-secondary);
    flex: 1;
}

/* Syntax highlight tokens */
.spl-keyword { color: var(--det-spl); font-weight: 600; }
.spl-pipe { color: var(--severity-high); }
.spl-field { color: var(--accent-blue); }
.spl-string { color: var(--severity-critical); }
.spl-func { color: var(--det-kql); }

.kql-keyword { color: var(--det-kql); font-weight: 600; }
.kql-pipe { color: var(--severity-high); }
.kql-field { color: var(--accent-blue); }
.kql-string { color: var(--severity-critical); }
.kql-func { color: var(--det-spl); }

.sigma-key { color: var(--det-sigma); font-weight: 600; }
.sigma-value { color: var(--text-primary); }
.sigma-string { color: var(--severity-critical); }

/* ===== DETAIL PANEL TABS (NEW STYLE) ===== */
.detail-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.detail-tab {
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-tab:hover {
    color: var(--text-secondary);
}

.detail-tab.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

/* ===== METADATA GRID (DETAIL PANEL) ===== */
.meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
}

.meta-cell {
    background: var(--bg-card);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-cell-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-cell-value {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ===== SECTOR RISK MINI BARS ===== */
.sector-risk-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sector-risk-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sector-risk-label {
    font-size: 11px;
    color: var(--text-secondary);
    min-width: 80px;
}

.sector-risk-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.sector-risk-fill {
    height: 100%;
    background: var(--severity-critical);
    transition: width 0.3s ease;
}

.sector-risk-value {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 32px;
    text-align: right;
}

/* ===== FEED HEADER — terminal comment style ===== */
.feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    margin-bottom: 8px;
}

.feed-title {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: normal;
    color: #525252;
}

.feed-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.feed-sort {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: normal;
    color: #c4b5fd;
    cursor: pointer;
}

.feed-sort:hover {
    color: #e8e8e8;
}

.advanced-search-btn {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #c4b5fd;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.advanced-search-btn:hover {
    color: #e8e8e8;
}

/* ===== RESPONSIVE FOR NEW COMPONENTS ===== */
@media (max-width: 768px) {
    .threat-row {
        flex-direction: column;
    }

    .threat-row-severity {
        width: 100%;
        height: 3px;
    }

    .threat-row-right {
        flex-direction: row;
        justify-content: space-between;
        min-width: auto;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }

    .mitre-strip {
        flex-wrap: wrap;
    }

    .meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .threat-pulse {
        margin-left: 0;
        width: 100%;
    }
}

/* ===== COMPREHENSIVE RESPONSIVE DESIGN ===== */

/* -------------------------------------------------------------------
   TABLET (768px - 1024px)
   Sidebar visible but narrower, content adapts
   ------------------------------------------------------------------- */
@media (max-width: 1024px) and (min-width: 769px) {
    /* Sidebar: slightly narrower on tablet */
    .sidebar {
        width: 220px;
    }

    .main-content {
        margin-left: 220px;
    }

    .compare-panel {
        left: 220px;
    }

    /* Stats bar: reduce padding and gap */
    .stats-bar {
        padding: 0 20px;
        gap: 16px;
    }

    .stat-chip-value {
        font-size: 15px;
    }

    /* Feed header: reduce padding */
    .feed-header {
        padding: 0 20px;
    }

    /* Threats list: reduce padding */
    .threats-list {
        padding: 0 20px;
    }

    .threats-section {
        padding: 0 20px 24px;
    }

    /* Detail panel: full width on tablet */
    .detail-panel {
        width: 95%;
        max-width: 700px;
    }

    .dp-overview {
        padding: 20px 24px;
    }

    .dp-det-content {
        padding: 20px 24px;
    }

    .detail-content {
        padding: 20px 24px;
    }

    .dp-header {
        padding: 20px 24px;
    }

    .dp-tabs {
        padding: 0 24px;
    }

    /* Attribution grid: stack on narrower tablets */
    .dp-attr-grid {
        flex-wrap: wrap;
    }

    .dp-attr-cell {
        min-width: 120px;
    }

    /* Kill chain: allow wrapping */
    .dp-killchain {
        flex-wrap: wrap;
    }

    .dp-kc-cell {
        min-width: 40px;
    }
}

/* -------------------------------------------------------------------
   MOBILE (max-width: 768px)
   Full-width layout, sidebar as overlay, compact spacing
   ------------------------------------------------------------------- */
@media (max-width: 768px) {
    /* --- Mobile Header --- */
    .mobile-header {
        display: flex;
        height: 56px;
        z-index: 100;
    }

    .mobile-menu-btn,
    .mobile-filter-btn {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
    }

    /* --- Sidebar: Off-screen overlay --- */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 200;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

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

    .sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 150;
        -webkit-tap-highlight-color: transparent;
    }

    .sidebar-overlay.open {
        display: block;
    }

    /* Nav items: larger touch targets */
    .nav-item {
        height: 44px;
        padding: 0 12px;
    }

    .nav-section:first-child .nav-item {
        height: 48px;
    }

    /* --- Main Content: Full width --- */
    .main-content {
        margin-left: 0;
        padding-top: 56px;
        min-height: 100vh;
    }

    /* --- Stats Bar: Horizontal scroll --- */
    .stats-bar {
        padding: 0 16px;
        gap: 16px;
        height: auto;
        min-height: 56px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .stats-bar::-webkit-scrollbar {
        display: none;
    }

    .stat-chip {
        flex-shrink: 0;
    }

    .stat-chip-value {
        font-size: 14px;
    }

    .stat-chip-label {
        font-size: 11px;
    }

    .stat-divider {
        height: 24px;
        flex-shrink: 0;
    }

    .sparkline-container {
        flex: 0 0 auto;
        min-width: 80px;
        max-width: 120px;
        height: 32px;
    }

    .theme-toggle-btn {
        flex-shrink: 0;
    }

    /* --- Feed Header: Stack on mobile --- */
    .feed-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 0 16px;
        margin-bottom: 12px;
    }

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

    /* --- Threats Section: Reduce padding --- */
    .threats-section {
        padding: 0 16px 24px;
    }

    .threats-list {
        padding: 0 16px;
    }

    /* --- Threat Row: Compact mobile layout --- */
    .threat-row {
        padding: 12px 14px;
        gap: 6px;
    }

    .threat-row-top {
        flex-wrap: wrap;
        gap: 6px;
    }

    .threat-row-top-left {
        gap: 6px;
        flex-wrap: wrap;
    }

    .threat-row-title {
        font-size: 14px;
        line-height: 1.3;
    }

    .threat-row-subtitle {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    .threat-row-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .threat-row-tags {
        flex-wrap: wrap;
        gap: 6px;
    }

    .threat-row-meta {
        gap: 8px;
        flex-wrap: wrap;
    }

    .threat-row-date {
        font-size: 10px;
    }

    /* MITRE strip: still visible but smaller */
    .mitre-strip-cell {
        width: 10px;
        height: 6px;
    }

    .mitre-strip-label {
        width: 10px;
        font-size: 8px;
    }

    /* --- Detail Panel: Full-screen modal on mobile --- */
    .detail-modal.open {
        align-items: stretch;
        justify-content: stretch;
    }

    .detail-panel {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border: none;
        position: fixed;
        inset: 0;
    }

    .dp-header {
        padding: 16px;
        gap: 12px;
    }

    .dp-header-top {
        gap: 8px;
    }

    .dp-header-left {
        gap: 8px;
        flex-wrap: wrap;
    }

    .detail-id {
        font-size: 12px;
    }

    .detail-title {
        font-size: 16px;
        line-height: 1.3;
    }

    .dp-date-row {
        font-size: 11px;
        gap: 10px;
        flex-wrap: wrap;
    }

    /* Tabs: Horizontally scrollable */
    .dp-tabs {
        padding: 0 16px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
    }

    .dp-tabs::-webkit-scrollbar {
        display: none;
    }

    .dp-tab {
        flex-shrink: 0;
        padding: 10px 6px;
        font-size: 11px;
    }

    /* Detail content */
    .detail-content {
        padding: 16px;
    }

    .dp-overview {
        padding: 16px;
        gap: 20px;
    }

    .dp-det-content {
        padding: 16px;
        gap: 16px;
    }

    /* Metadata grid: wrap on small screens */
    .detail-meta-grid {
        flex-wrap: wrap;
    }

    .detail-meta-item {
        flex: 1 0 30%;
        padding: 8px 10px;
    }

    .detail-meta-value.cvss-val {
        font-size: 20px;
    }

    /* Attribution grid: stack vertically */
    .dp-attr-grid {
        flex-direction: column;
        gap: 1px;
    }

    .dp-attr-cell {
        padding: 10px 14px;
    }

    /* Kill chain: compact */
    .dp-killchain {
        flex-wrap: wrap;
        gap: 1px;
    }

    .dp-kc-cell {
        min-width: 30px;
        flex: 1 0 auto;
    }

    .dp-kc-bar {
        height: 10px;
    }

    .dp-kc-label {
        font-size: 9px;
    }

    /* Technique rows */
    .dp-technique-row {
        padding: 8px 10px;
        gap: 8px;
    }

    .dp-technique-id {
        font-size: 10px;
    }

    .dp-technique-name {
        font-size: 11px;
    }

    /* Timeline */
    .dp-timeline-row {
        gap: 10px;
        padding: 8px 0;
    }

    .dp-tl-date {
        width: 70px;
        font-size: 10px;
    }

    .dp-tl-text {
        font-size: 12px;
    }

    .dp-tl-nested { padding-left: 8px; }
    .dp-tl-sub-item { font-size: 10px; padding: 1px 4px; }
    .dp-tl-sub-label { font-size: 10px; }

    /* References */
    .dp-ref-row {
        padding: 8px 10px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .dp-ref-title {
        font-size: 11px;
        word-break: break-word;
    }

    /* Detection expanded */
    .dp-det-row-header {
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 6px;
    }

    .dp-det-row-left {
        gap: 6px;
    }

    .dp-det-title-expanded {
        font-size: 12px;
    }

    .dp-det-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .dp-det-lang-tabs {
        flex-wrap: wrap;
        overflow-x: auto;
    }

    .dp-lang-tab {
        padding: 8px 14px;
        font-size: 10px;
    }

    .dp-det-code-wrap {
        min-height: 160px;
        max-height: 280px;
        overflow-x: auto;
    }

    .dp-det-code {
        min-width: 0;
    }

    /* Code block: allow horizontal scroll */
    .dp-code-content {
        padding: 0 12px;
        font-size: 11px;
        min-width: 0;
    }

    .dp-code-lines span {
        font-size: 10px;
    }

    .dp-det-mitre-footer {
        padding: 8px 12px;
        gap: 8px;
        flex-wrap: wrap;
    }

    /* Collapsed detection */
    .dp-det-collapsed {
        padding: 12px 14px;
        flex-wrap: wrap;
        gap: 6px;
    }

    .dp-det-title-collapsed {
        font-size: 12px;
    }

    .dp-det-row-right {
        gap: 6px;
    }

    /* --- Search Modal: Full screen on mobile --- */
    .search-modal.open {
        padding-top: 0;
    }

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

    .search-modal-header {
        padding: 16px;
    }

    .search-modal-input-wrap {
        padding: 12px 16px;
    }

    .search-modal-input {
        font-size: 16px; /* prevents iOS zoom on focus */
        padding: 12px 14px 12px 42px;
    }

    .search-modal-results {
        padding: 0 16px 16px;
    }

    .search-result-item {
        padding: 12px;
    }

    .search-result-title {
        font-size: 14px;
    }

    .search-result-snippet {
        font-size: 12px;
    }

    /* --- Shortcuts Modal --- */
    .shortcuts-content {
        max-width: 95%;
        padding: 16px;
    }

    .shortcuts-header h2 {
        font-size: 16px;
    }

    .shortcut-item {
        font-size: 13px;
        gap: 8px;
    }

    .shortcut-item kbd {
        font-size: 11px;
        padding: 2px 6px;
    }

    /* --- Compare Panel --- */
    .compare-panel {
        left: 0;
        max-height: 60vh;
    }

    .compare-row {
        grid-template-columns: 80px 1fr 1fr;
        gap: 8px;
        padding: 8px 10px;
        font-size: 11px;
    }

    .compare-header {
        padding: 10px 16px;
    }

    .compare-content {
        padding: 12px 16px;
    }

    /* --- Trending Section --- */
    .trending-section {
        padding: 12px;
    }

    .trending-list {
        flex-direction: column;
    }

    .trending-item {
        max-width: 100%;
        min-width: 0;
    }

    /* --- Stats Grid (old style) --- */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 16px;
        gap: 12px;
    }

    /* --- Filters --- */
    .filters-section {
        padding: 0 16px;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    /* --- Meta Grid --- */
    .meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* --- Detection Items --- */
    .detection-item {
        padding: 12px;
    }

    .detection-item-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .detection-item-name {
        font-size: 14px;
    }

    .detection-query {
        font-size: 11px;
        padding: 10px;
    }

    /* --- Detection Library --- */
    .dl-code-block {
        min-height: 160px;
        max-height: 300px;
        font-size: 11px;
        width: 100%;
        overflow-x: auto;
    }
    .dl-line-num {
        display: none;
    }

    .dl-code-tab {
        padding: 5px 10px;
        font-size: 10px;
    }

    /* --- Related threats --- */
    .related-threats-grid {
        grid-template-columns: 1fr;
    }

    /* --- Loading/Empty States --- */
    .loading-state,
    .loading,
    .empty-state {
        padding: 40px 16px;
    }

    /* --- Toast --- */
    .toast {
        left: 16px;
        right: 16px;
        transform: translateX(0) translateY(100px);
        text-align: center;
        font-size: 13px;
    }

    .toast.show {
        transform: translateX(0) translateY(0);
    }

    /* --- CISA KEV Widget --- */
    .cisa-kev-widget {
        padding: 12px;
    }

    .cisa-kev-countdown {
        font-size: 16px;
    }

    /* --- Scrollbar: Hide on mobile (touch devices) --- */
    ::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }

    /* --- Simulation Tab --- */
    .sim-page-grid {
        grid-template-columns: 1fr;
    }
    .sim-tab-content {
        padding: 16px;
    }
    .sim-card-header {
        padding: 12px;
    }
    .sim-card-desc {
        padding: 0 12px 8px;
    }
    .sim-caution-banner {
        margin: 0 12px 8px;
    }
    .sim-requirements {
        padding: 0 12px 8px;
    }

    /* --- Transcript Tab --- */
    .tx-participants-strip {
        flex-direction: column;
    }
    .tx-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tx-phase-timeline {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .tx-phase-block {
        min-width: 80px;
    }
    .tx-signal-row {
        flex-wrap: wrap;
        gap: 4px;
    }
    .tx-message-header {
        flex-wrap: wrap;
    }
}

/* -------------------------------------------------------------------
   SMALL MOBILE (max-width: 480px)
   Ultra-compact for smallest phones (320px-480px)
   ------------------------------------------------------------------- */
@media (max-width: 480px) {
    /* Even more compact stats bar */
    .stats-bar {
        gap: 10px;
        padding: 0 12px;
        min-height: 48px;
    }

    .stat-chip-value {
        font-size: 18px;
    }

    .stat-chip-label {
        font-size: 10px;
    }

    .stat-divider {
        height: 20px;
    }

    .sparkline-container {
        display: none; /* hide sparkline on very small screens */
    }

    /* Compact threat rows */
    .threat-row {
        padding: 10px 12px;
        gap: 4px;
    }

    .threat-row-title {
        font-size: 13px;
    }

    .threat-row-subtitle {
        font-size: 11px;
    }

    .threat-row-tag {
        font-size: 10px;
    }

    .threat-row-meta-det,
    .threat-row-meta-ioc,
    .threat-row-meta-actor {
        font-size: 10px;
    }

    /* MITRE strip: even smaller */
    .mitre-strip-cell {
        width: 8px;
        height: 5px;
    }

    .mitre-strip-labels {
        display: none; /* hide labels on very small screens */
    }

    /* Feed header */
    .feed-header {
        padding: 0 12px;
    }

    .feed-title {
        font-size: 11px;
    }

    /* Threats list */
    .threats-list {
        padding: 0 12px;
    }

    .threats-section {
        padding: 0 12px 20px;
    }

    /* Detail panel: extra compact */
    .dp-header {
        padding: 12px;
        gap: 8px;
    }

    .detail-title {
        font-size: 15px;
    }

    .dp-tabs {
        padding: 0 12px;
    }

    .dp-tab {
        padding: 8px 5px;
        font-size: 10px;
    }

    .detail-content {
        padding: 12px;
    }

    .dp-overview {
        padding: 12px;
        gap: 16px;
    }

    .dp-det-content {
        padding: 12px;
        gap: 12px;
    }

    /* Tags */
    .dp-tag {
        font-size: 10px;
        padding: 3px 8px;
    }

    .threat-tag {
        font-size: 10px;
        padding: 3px 6px;
    }

    /* Severity/status badges */
    .severity-badge,
    .dp-sev-badge,
    .status-badge {
        font-size: 10px;
        padding: 2px 6px;
    }

    /* Compare panel: two column on tiny screens */
    .compare-row {
        grid-template-columns: 60px 1fr 1fr;
        gap: 6px;
        font-size: 10px;
    }

    /* Sidebar: slightly narrower on small phones */
    .sidebar {
        width: 260px;
    }

    /* Copy buttons */
    .copy-btn {
        padding: 5px 10px;
        font-size: 10px;
    }

    .copy-fmt-btn, .export-sigma-btn {
        padding: 4px 8px;
        font-size: 9px;
    }

    /* Detection code */
    .dp-code-content {
        font-size: 10px;
        padding: 0 10px;
    }

    .dp-code-lines {
        padding: 0 8px;
    }

    .dp-code-lines span {
        font-size: 9px;
    }

    /* Search modal */
    .search-modal-header h2 {
        font-size: 16px;
    }

    .search-modal-input {
        font-size: 16px; /* prevents iOS zoom */
    }

    /* --- Simulation Tab --- */
    .sim-platform-tabs {
        flex-wrap: wrap;
    }
    .sim-code-content {
        font-size: 10px;
        padding: 0 10px;
    }
    .sim-code-lines {
        padding: 0 8px;
    }
    .sim-code-lines span {
        font-size: 10px;
    }
}

/* -------------------------------------------------------------------
   LANDSCAPE MOBILE FIX
   ------------------------------------------------------------------- */
@media (max-width: 768px) and (orientation: landscape) {
    .detail-panel {
        max-height: 100vh;
    }

    .stats-bar {
        min-height: 44px;
    }

    .mobile-header {
        height: 44px;
    }

    .main-content {
        padding-top: 44px;
    }
}

/* -------------------------------------------------------------------
   TOUCH DEVICE OPTIMIZATIONS
   ------------------------------------------------------------------- */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects on touch — cleaner UX */
    .threat-row:hover {
        background: inherit;
    }

    .threat-row:nth-child(even):hover {
        background: #0e0e0e;
    }

    .threat-row:nth-child(odd):hover {
        background: #111111;
    }

    /* Active state instead of hover for touch */
    .threat-row:active {
        background: #1a1a1a;
    }

    .nav-item:hover {
        background: inherit;
        color: inherit;
    }

    .nav-item:active {
        background: #161616;
        color: #e8e8e8;
    }

    /* Larger touch targets for interactive elements */
    .dp-tab {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .dp-lang-tab {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .dp-det-collapsed {
        min-height: 48px;
    }

    .close-btn {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .share-btn {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .feed-sort {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Prevent text selection during scroll on touch */
    .threats-list {
        -webkit-user-select: none;
        user-select: none;
    }

    /* Allow text selection in detail content */
    .detail-content {
        -webkit-user-select: text;
        user-select: text;
    }

    .dp-code-content {
        -webkit-user-select: text;
        user-select: text;
    }

    /* Touch target fixes — 44px minimum for WCAG 2.5.5 */
    .library-btn {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .advanced-search-btn {
        min-height: 44px;
        padding: 10px 16px;
    }

    .topbar-signout-btn {
        min-height: 44px;
        padding: 12px 8px;
    }

    .nav-logout-btn {
        min-height: 44px;
        padding: 12px 8px;
    }

    .nav-auth-btn {
        min-height: 44px;
        padding: 12px 16px;
    }

    .nav-sub-item {
        min-height: 44px;
        padding: 10px 12px 10px 28px;
    }
}

/* -------------------------------------------------------------------
   SAFE AREA INSETS (iPhone notch/Dynamic Island)
   ------------------------------------------------------------------- */
@supports (padding: env(safe-area-inset-top)) {
    .mobile-header {
        padding-top: env(safe-area-inset-top);
        height: calc(56px + env(safe-area-inset-top));
    }

    .sidebar {
        padding-top: env(safe-area-inset-top);
    }

    @media (max-width: 768px) {
        .main-content {
            padding-top: calc(56px + env(safe-area-inset-top));
        }

        .detail-panel {
            padding-top: env(safe-area-inset-top);
            padding-bottom: env(safe-area-inset-bottom);
        }

        .toast {
            bottom: calc(24px + env(safe-area-inset-bottom));
        }
    }
}

/* ===== COMPREHENSIVE LIGHT THEME OVERRIDES ===== */

/* ---- SIDEBAR ---- */
[data-theme="light"] .sidebar {
    background: #ffffff;
    border-right: 1px solid #e0e0e0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.05);
}

[data-theme="light"] .sidebar-close {
    color: #999999;
}

[data-theme="light"] .logo-prompt {
    color: #7c3aed;
}

[data-theme="light"] .logo-text {
    color: #1a1a1a;
}

[data-theme="light"] .logo-subtitle {
    color: #7c3aed;
}

[data-theme="light"] .nav-section-title {
    color: #999999;
}

[data-theme="light"] .nav-item {
    color: #777777;
}

[data-theme="light"] .nav-item:hover {
    background: #f0f0f0;
    color: #1a1a1a;
}

[data-theme="light"] .nav-item.active {
    background: #f0f0f0;
    color: #1a1a1a;
}

[data-theme="light"] .nav-item.active .nav-count {
    color: #7c3aed;
}

[data-theme="light"] .nav-dot {
    background: #8b5cf6;
}

[data-theme="light"] .nav-label {
    color: #555555;
}

[data-theme="light"] .nav-item:hover .nav-label {
    color: #1a1a1a;
}

[data-theme="light"] .nav-item.active .nav-label {
    color: #1a1a1a;
}

[data-theme="light"] .nav-count {
    color: #999999;
}

[data-theme="light"] .sidebar-footer {
    border-top: 1px solid #e0e0e0;
}

[data-theme="light"] .stats-mini {
    color: #999999;
}

[data-theme="light"] .sidebar-overlay {
    background: rgba(0, 0, 0, 0.3);
}

/* ---- MAIN CONTENT ---- */
[data-theme="light"] .main-content {
    background: #f5f5f5;
}

/* ---- STATS BAR ---- */
[data-theme="light"] .stats-bar {
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

[data-theme="light"] .stat-chip-value {
    color: #1a1a1a;
}

[data-theme="light"] .stat-chip-label {
    color: #999999;
}

[data-theme="light"] .stat-chip-value.critical { color: #e11d48; }
[data-theme="light"] .stat-chip-value.high { color: #ea580c; }
[data-theme="light"] .stat-chip-value.medium { color: #7c3aed; }
[data-theme="light"] .stat-chip-value.low { color: #059669; }

[data-theme="light"] .stat-divider {
    background: #e0e0e0;
}

/* ---- FEED HEADER ---- */
[data-theme="light"] .feed-header {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .feed-title {
    color: #999999;
}

[data-theme="light"] .feed-sort {
    color: #7c3aed;
}

[data-theme="light"] .feed-sort:hover {
    color: #1a1a1a;
}

[data-theme="light"] .advanced-search-btn {
    color: #7c3aed;
}

[data-theme="light"] .advanced-search-btn:hover {
    color: #1a1a1a;
}

/* ---- THREAT ROWS ---- */
[data-theme="light"] .threat-row {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

[data-theme="light"] .threat-row:nth-child(even) {
    background: #fafafa;
}

[data-theme="light"] .threat-row:hover {
    background: #f0f0f0;
}

[data-theme="light"] .threat-row.active {
    background: #f0f0f0;
    border-color: #7c3aed;
}

[data-theme="light"] .threat-row-title {
    color: #1a1a1a;
}

[data-theme="light"] .threat-row-subtitle {
    color: #888888;
}

[data-theme="light"] .threat-row-tag {
    color: #0284c7;
}

[data-theme="light"] .threat-row-meta-det {
    color: #059669;
}

[data-theme="light"] .threat-row-meta-ioc {
    color: #ea580c;
}

[data-theme="light"] .threat-row-meta-actor {
    color: #7c3aed;
}

[data-theme="light"] .threat-row-date {
    color: #999999;
}

[data-theme="light"] .threat-id {
    color: #999999;
}

/* ---- SEVERITY BADGES ---- */
[data-theme="light"] .severity-badge.critical {
    background: rgba(225, 29, 72, 0.1);
    color: #e11d48;
}

[data-theme="light"] .severity-badge.high {
    background: rgba(234, 88, 12, 0.1);
    color: #ea580c;
}

[data-theme="light"] .severity-badge.medium {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

[data-theme="light"] .severity-badge.low {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

/* ---- STATUS BADGES ---- */
[data-theme="light"] .status-badge.active-status {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

[data-theme="light"] .status-badge.monitoring-status {
    background: rgba(234, 88, 12, 0.1);
    color: #ea580c;
}

[data-theme="light"] .status-badge.resolved-status {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
}

[data-theme="light"] .status-badge.active_exploitation-status {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

[data-theme="light"] .status-badge.research-status {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

[data-theme="light"] .status-badge.patched-status {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
}

[data-theme="light"] .status-badge.disrupted-status {
    background: rgba(202, 138, 4, 0.1);
    color: #ca8a04;
}

/* ---- MITRE STRIP (THREAT ROW) ---- */
[data-theme="light"] .mitre-strip-cell {
    background: #e0e0e0;
}

[data-theme="light"] .mitre-strip-cell.active {
    background: #7c3aed;
}

[data-theme="light"] .mitre-strip-label {
    color: #999999;
}

/* ---- DETAIL PANEL ---- */
[data-theme="light"] .detail-modal-backdrop {
    background: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .detail-panel {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

[data-theme="light"] .dp-header {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .detail-id {
    color: #ea580c;
}

[data-theme="light"] .close-btn {
    color: #999999;
}

[data-theme="light"] .close-btn:hover {
    color: #1a1a1a;
    background: none;
}

[data-theme="light"] .share-btn {
    color: #999999;
}

[data-theme="light"] .share-btn:hover {
    color: #1a1a1a;
}

[data-theme="light"] .detail-title {
    color: #1a1a1a;
}

[data-theme="light"] .dp-date-row .dp-date {
    color: #999999;
}

[data-theme="light"] .dp-date-row .dp-actor {
    color: #7c3aed;
}

/* ---- DETAIL PANEL TABS ---- */
[data-theme="light"] .dp-tabs {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .dp-tab {
    color: #999999;
}

[data-theme="light"] .dp-tab:hover {
    color: #555555;
}

[data-theme="light"] .dp-tab.active {
    color: #1a1a1a;
    border-bottom-color: #7c3aed;
}

/* ---- DETAIL PANEL SECTIONS ---- */
[data-theme="light"] .dp-label {
    color: #999999;
}

[data-theme="light"] .detail-section-title {
    color: #999999;
}

[data-theme="light"] .detail-section-content {
    color: #555555;
}

[data-theme="light"] .desc-cve {
    color: #be123c;
    background: rgba(190, 18, 60, 0.06);
}

[data-theme="light"] .desc-technique {
    color: #6d28d9;
    background: rgba(109, 40, 217, 0.06);
}

[data-theme="light"] .desc-ip {
    color: #0369a1;
    background: rgba(3, 105, 161, 0.06);
}

[data-theme="light"] .desc-defang {
    color: #c2410c;
}

[data-theme="light"] .desc-hash {
    color: #15803d;
    background: rgba(21, 128, 61, 0.06);
}

[data-theme="light"] .desc-hr {
    border-top-color: #d1d5db;
}

[data-theme="light"] .desc-h2 {
    color: #6d28d9;
}

[data-theme="light"] .desc-h3 {
    color: #7c3aed;
}

[data-theme="light"] .detail-section-content code {
    color: #047857;
    background: rgba(4, 120, 87, 0.06);
}

/* ---- META GRID (DETAIL PANEL) ---- */
[data-theme="light"] .detail-meta-grid { border-color: #e5e5e5; }
[data-theme="light"] .detail-meta-item { border-right-color: #e5e5e5; }
[data-theme="light"] .detail-meta-item {
    background: #f5f5f5;
}

[data-theme="light"] .detail-meta-label {
    color: #999999;
}

[data-theme="light"] .detail-meta-value.cvss-val {
    color: #e11d48;
}

[data-theme="light"] .detail-meta-value.exploit-val {
    color: #e11d48;
}

[data-theme="light"] .detail-meta-value.coverage-val {
    color: #059669;
}

[data-theme="light"] .detail-meta-value.ioc-val {
    color: #ea580c;
}

/* ---- ATTRIBUTION / AFFECTED GRIDS ---- */
[data-theme="light"] .dp-attr-cell {
    background: #f5f5f5;
}

[data-theme="light"] .dp-attr-label {
    color: #999999;
}

[data-theme="light"] .dp-attr-value {
    color: #1a1a1a;
}

[data-theme="light"] .dp-attr-value.actor {
    color: #7c3aed;
}

/* ---- KILL CHAIN (DETAIL PANEL) ---- */
[data-theme="light"] .dp-kc-bar {
    background: #e0e0e0;
}

[data-theme="light"] .dp-kc-bar.active {
    background: #7c3aed;
}

[data-theme="light"] .dp-kc-label {
    color: #999999;
}

[data-theme="light"] .dp-kc-bar.active + .dp-kc-label,
[data-theme="light"] .dp-kc-cell.active .dp-kc-label {
    color: #555555;
}

/* ---- MITRE CHAIN (ALTERNATE) ---- */
[data-theme="light"] .mitre-chain-box {
    background: #eeeeee;
}

[data-theme="light"] .mitre-chain-box.active {
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid #7c3aed;
}

[data-theme="light"] .mitre-chain-box .count {
    color: #7c3aed;
}

/* ---- TECHNIQUE LIST ---- */
[data-theme="light"] .dp-technique-row:nth-child(odd) {
    background: #f5f5f5;
}

[data-theme="light"] .dp-technique-row:nth-child(even) {
    background: #fafafa;
}

[data-theme="light"] .dp-technique-id {
    color: #0284c7;
}

[data-theme="light"] .dp-technique-name {
    color: #555555;
}

/* ---- TIMELINE ---- */
[data-theme="light"] .dp-tl-date {
    color: #999999;
}

[data-theme="light"] .dp-tl-text {
    color: #555555;
}

[data-theme="light"] .dp-tl-nested { border-color: #d4d4d4; }
[data-theme="light"] .dp-tl-sub-item { background: #f0f0f0; }

/* ---- TAGS ---- */
[data-theme="light"] .dp-tag {
    color: #777777;
    background: #eeeeee;
}

/* ---- REFERENCES ---- */
[data-theme="light"] .dp-ref-row:nth-child(odd) {
    background: #f5f5f5;
}

[data-theme="light"] .dp-ref-row:nth-child(even) {
    background: #fafafa;
}

[data-theme="light"] .dp-ref-title {
    color: #0284c7;
}

[data-theme="light"] .dp-ref-title:hover {
    color: #1a1a1a;
}

/* ---- MUTED TEXT ---- */
[data-theme="light"] .dp-muted-text {
    color: #737373;
}

/* ---- COVERAGE BAR ---- */
[data-theme="light"] .dp-cov-bar-bg {
    background: #e0e0e0;
}

/* ---- DETECTIONS TAB ---- */
[data-theme="light"] .dp-bracket-btn {
    color: #999999;
}

[data-theme="light"] .dp-bracket-btn:hover {
    color: #555555;
}

[data-theme="light"] .dp-det-expanded {
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .dp-det-row-header {
    background: #f5f5f5;
}

[data-theme="light"] .dp-det-num {
    color: #7c3aed;
}

[data-theme="light"] .dp-det-title-expanded {
    color: #1a1a1a;
}

[data-theme="light"] .dp-det-lang-tabs {
    background: #fafafa;
}

[data-theme="light"] .dp-lang-tab {
    color: #999999;
}

[data-theme="light"] .dp-lang-tab:hover {
    color: #555555;
}

[data-theme="light"] .dp-lang-tab.active[data-lang="spl"] {
    color: #059669;
    border-bottom-color: #059669;
    background: rgba(5, 150, 105, 0.06);
}

[data-theme="light"] .dp-lang-tab.active[data-lang="kql"] {
    color: #7c3aed;
    border-bottom-color: #7c3aed;
    background: rgba(124, 58, 237, 0.06);
}

[data-theme="light"] .dp-lang-tab.active[data-lang="sigma"] {
    color: #0284c7;
    border-bottom-color: #0284c7;
    background: rgba(2, 132, 199, 0.06);
}

[data-theme="light"] .dp-det-code-wrap {
    background: #fafafa;
}

[data-theme="light"] .dp-code-lines {
    border-right: 1px solid #e0e0e0;
}

[data-theme="light"] .dp-code-lines span {
    color: #cccccc;
}

[data-theme="light"] .dp-code-content {
    color: #333333;
}

[data-theme="light"] .dp-det-mitre-footer {
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
}

[data-theme="light"] .dp-det-mitre-label {
    color: #999999;
}

[data-theme="light"] .dp-det-mitre-id {
    color: #0284c7;
}

[data-theme="light"] .dp-det-mitre-name {
    color: #888888;
}

[data-theme="light"] .dp-det-collapsed {
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .dp-det-collapsed:nth-child(odd) {
    background: #ffffff;
}

[data-theme="light"] .dp-det-collapsed:nth-child(even) {
    background: #fafafa;
}

[data-theme="light"] .dp-det-collapsed:hover {
    background: #f0f0f0;
}

[data-theme="light"] .dp-det-title-collapsed {
    color: #1a1a1a;
}

[data-theme="light"] .dp-det-lang-spl {
    color: #059669;
}

[data-theme="light"] .dp-det-lang-kql {
    color: #7c3aed;
}

[data-theme="light"] .dp-det-lang-sigma {
    color: #0284c7;
}

/* ---- DETECTION QUERY BLOCKS ---- */
[data-theme="light"] .detection-query {
    background: #fafafa;
    color: #059669;
}

[data-theme="light"] .detection-query.spl {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.08) 0%, #ffffff 100%);
    color: #059669;
}

[data-theme="light"] .detection-query.kql {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, #ffffff 100%);
    color: #7c3aed;
}

[data-theme="light"] .detection-query.sigma {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, #ffffff 100%);
    color: #0284c7;
}

/* ---- DET CODE BLOCK (NEW) ---- */
[data-theme="light"] .det-code-block {
    background: #fafafa;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .det-code-header {
    background: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .det-code-lang.spl { color: #059669; }
[data-theme="light"] .det-code-lang.kql { color: #7c3aed; }
[data-theme="light"] .det-code-lang.sigma { color: #0284c7; }

[data-theme="light"] .det-code-content {
    color: #333333;
}

/* Syntax highlight tokens -- light theme */
[data-theme="light"] .spl-keyword { color: #059669; }
[data-theme="light"] .spl-pipe { color: #ea580c; }
[data-theme="light"] .spl-field { color: #0284c7; }
[data-theme="light"] .spl-string { color: #e11d48; }
[data-theme="light"] .spl-func { color: #7c3aed; }
[data-theme="light"] .spl-operator { color: #b45309; }

[data-theme="light"] .kql-keyword { color: #7c3aed; }
[data-theme="light"] .kql-pipe { color: #ea580c; }
[data-theme="light"] .kql-field { color: #0284c7; }
[data-theme="light"] .kql-string { color: #e11d48; }
[data-theme="light"] .kql-func { color: #059669; }
[data-theme="light"] .kql-operator { color: #b45309; }

[data-theme="light"] .sigma-key { color: #0284c7; }
[data-theme="light"] .sigma-value { color: #1a1a1a; }
[data-theme="light"] .sigma-string { color: #e11d48; }
[data-theme="light"] .sigma-tag { color: #059669; }

/* ---- SEARCH MODAL ---- */
[data-theme="light"] .search-modal-backdrop {
    background: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .search-modal-content {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

[data-theme="light"] .search-modal-header {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .search-modal-input {
    background: #f5f5f5;
    border: 2px solid #d0d0d0;
    color: #1a1a1a;
}

[data-theme="light"] .search-modal-input:focus {
    border-color: #0284c7;
}

[data-theme="light"] .search-result-item {
    background: #fafafa;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .search-result-item:hover {
    border-color: #0284c7;
    background: #f0f0f0;
}

[data-theme="light"] .search-result-snippet mark {
    background: rgba(234, 88, 12, 0.15);
    color: #b45309;
}

[data-theme="light"] .search-result-count {
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

/* ---- SHORTCUTS MODAL ---- */
[data-theme="light"] .shortcuts-backdrop {
    background: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .shortcuts-content {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

[data-theme="light"] .shortcut-item kbd {
    background: #f0f0f0;
    border: 1px solid #d0d0d0;
}

/* ---- COMPARISON PANEL ---- */
[data-theme="light"] .compare-panel {
    background: #ffffff;
    border-top: 2px solid #0284c7;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

[data-theme="light"] .compare-header {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .compare-row {
    border-bottom: 1px solid #e8e8e8;
}

[data-theme="light"] .compare-header-row {
    background: #f5f5f5;
}

[data-theme="light"] .compare-diff {
    background: rgba(124, 58, 237, 0.06);
}

/* ---- TOAST ---- */
[data-theme="light"] .toast {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* ---- SCROLLBAR ---- */
[data-theme="light"] ::-webkit-scrollbar-track {
    background: transparent;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #cccccc;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #aaaaaa;
}

/* ---- MITRE TAGS ---- */
[data-theme="light"] .mitre-tag {
    background: rgba(2, 132, 199, 0.08);
    border: 1px solid rgba(2, 132, 199, 0.25);
    color: #0284c7;
}

/* ---- THREAT CARD ---- */
[data-theme="light"] .threat-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .threat-card:hover {
    border-color: #cccccc;
    background: #fafafa;
}

[data-theme="light"] .threat-card.active {
    border-color: #0284c7;
}

/* ---- THREAT TAG ---- */
[data-theme="light"] .threat-tag {
    background: #f0f0f0;
    color: #555555;
}

[data-theme="light"] .threat-tag.mitre {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
}

/* ---- DETECTION COUNT / VIEW COUNT ---- */
[data-theme="light"] .detection-count {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

[data-theme="light"] .view-count {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
}

/* ---- RESEARCH LAB TAG ---- */
[data-theme="light"] .research-lab-tag {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.2), rgba(5, 150, 105, 0.1));
    color: #059669;
}

/* ---- CISA KEV WIDGET ---- */
[data-theme="light"] .cisa-kev-widget.overdue {
    background: rgba(225, 29, 72, 0.08);
}

[data-theme="light"] .cisa-kev-widget.urgent {
    background: rgba(225, 29, 72, 0.05);
}

[data-theme="light"] .cisa-kev-widget.warning {
    background: rgba(124, 58, 237, 0.06);
}

[data-theme="light"] .cisa-kev-widget.ok {
    background: rgba(5, 150, 105, 0.06);
}

[data-theme="light"] .cisa-badge {
    background: rgba(225, 29, 72, 0.1);
    color: #e11d48;
}

/* ---- SIMILAR THREATS ---- */
[data-theme="light"] .similar-threat-card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .similar-threat-card:hover {
    border-color: #0284c7;
    background: #f0f0f0;
}

/* ---- SPARKLINE ---- */
[data-theme="light"] .sparkline-bar { background: #d4a017; }
[data-theme="light"] .sparkline-bar.critical { background: #e11d48; }
[data-theme="light"] .sparkline-bar.high { background: #ea580c; }
[data-theme="light"] .sparkline-bar.medium { background: #7c3aed; }
[data-theme="light"] .sparkline-bar.low { background: #059669; }

/* ---- GAPS SECTION ---- */
[data-theme="light"] .gaps-section {
    background: rgba(225, 29, 72, 0.04);
    border: 1px solid rgba(225, 29, 72, 0.15);
}

[data-theme="light"] .gap-badge {
    background: rgba(225, 29, 72, 0.08);
    border: 1px solid rgba(225, 29, 72, 0.2);
    color: #e11d48;
}

/* ---- HEATMAP ---- */
[data-theme="light"] .heatmap-empty {
    color: #aaaaaa;
}

/* ---- MOBILE HEADER ---- */
[data-theme="light"] .mobile-header {
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .mobile-menu-btn,
[data-theme="light"] .mobile-filter-btn {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #1a1a1a;
}

/* ---- SEARCH INPUT ---- */
[data-theme="light"] .search-input {
    background: #f5f5f5;
    border: 1px solid #d0d0d0;
    color: #1a1a1a;
}

[data-theme="light"] .search-input:focus {
    border-color: #cccccc;
    background: #ffffff;
}

/* ---- LINE NUMBERS / CODE BLOCKS ---- */
[data-theme="light"] .line-numbers {
    color: #cccccc;
    border-right: 1px solid #e0e0e0;
}

[data-theme="light"] .code-content {
    color: #333333;
}

/* ---- STAT CARD (ORIGINAL GRID) ---- */
[data-theme="light"] .stat-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .stat-card:hover {
    border-color: #cccccc;
}

/* ---- DETECTION ITEMS ---- */
[data-theme="light"] .detection-item {
    background: #fafafa;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .detection-copy-actions {
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
}

[data-theme="light"] .copy-btn {
    background: #f0f0f0;
    border: 1px solid #d0d0d0;
    color: #555555;
}

[data-theme="light"] .copy-btn:hover {
    background: #e0e0e0;
    color: #1a1a1a;
}

[data-theme="light"] .copy-fmt-btn,
[data-theme="light"] .export-sigma-btn {
    background: #f0f0f0;
    border: 1px solid #d0d0d0;
}

/* ---- DETAIL TABS (ALTERNATE) ---- */
[data-theme="light"] .detail-tabs {
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

[data-theme="light"] .detail-tab.active {
    color: #0284c7;
    border-bottom-color: #0284c7;
}

/* ---- META GRID (ALTERNATE) ---- */
[data-theme="light"] .meta-grid {
    background: #e0e0e0;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .meta-cell {
    background: #ffffff;
}

/* ---- FILTER ELEMENTS ---- */
[data-theme="light"] .filter-select {
    background: #f5f5f5;
    border: 1px solid #d0d0d0;
    color: #1a1a1a;
}

[data-theme="light"] .sort-select {
    background: #f5f5f5;
    border: 1px solid #d0d0d0;
    color: #555555;
}

/* ---- VARIOUS BARS ---- */
[data-theme="light"] .sector-risk-bar {
    background: #f0f0f0;
}

[data-theme="light"] .ioc-overlap-bar {
    background: #f0f0f0;
}

[data-theme="light"] .stats-bar-track {
    background: #f0f0f0;
}

/* ---- COVERAGE GAUGE RING ---- */
[data-theme="light"] .coverage-ring .ring-bg {
    stroke: #e0e0e0;
}

/* ---- STATS PAGE ---- */
[data-theme="light"] .stats-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .coverage-stat-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

/* ---- DONUT ITEMS ---- */
[data-theme="light"] .spl-donut {
    background: rgba(5, 150, 105, 0.06);
}

[data-theme="light"] .kql-donut {
    background: rgba(124, 58, 237, 0.06);
}

[data-theme="light"] .sigma-donut {
    background: rgba(2, 132, 199, 0.06);
}

/* ---- TAG CLOUD ---- */
[data-theme="light"] .tag-cloud-item {
    background: #f0f0f0;
    color: #555555;
}

[data-theme="light"] .tag-cloud-item:hover {
    background: #0284c7;
    color: white;
}

[data-theme="light"] .tag-cloud-item sup {
    color: #aaaaaa;
}

/* ---- COMPARE SELECTION OUTLINES ---- */
[data-theme="light"] .threat-row.compare-selected {
    outline: 2px solid #0284c7;
}

[data-theme="light"] .threat-row.keyboard-focused {
    outline: 2px solid #059669;
}

/* ---- TOUCH DEVICE LIGHT OVERRIDES ---- */
@media (hover: none) and (pointer: coarse) {
    [data-theme="light"] .threat-row:nth-child(even):hover {
        background: #fafafa;
    }

    [data-theme="light"] .threat-row:nth-child(odd):hover {
        background: #ffffff;
    }

    [data-theme="light"] .threat-row:active {
        background: #f0f0f0;
    }

    [data-theme="light"] .nav-item:active {
        background: #f0f0f0;
        color: #1a1a1a;
    }
}

/* ===== PAGE SCRIPT LIGHT THEME OVERRIDES ===== */

/* ===== STATISTICS PAGE LIGHT MODE (sp-*) ===== */
[data-theme="light"] .sp-header {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .sp-header-title {
    color: #1a1a1a;
}

[data-theme="light"] .sp-header-sub {
    color: #999999;
}

[data-theme="light"] .sp-header-ts {
    color: #999999;
}

[data-theme="light"] .sp-header-ver {
    color: #888888;
}

[data-theme="light"] .sp-hero-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .sp-hero-card:hover {
    border-color: #cccccc;
}

[data-theme="light"] .sp-hero-label {
    color: #999999;
}

[data-theme="light"] .sp-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .sp-card:hover {
    border-color: #cccccc;
}

[data-theme="light"] .sp-card-header {
    color: #999999;
}

[data-theme="light"] .sp-card-sub {
    color: #aaaaaa;
}

[data-theme="light"] .sp-empty {
    color: #aaaaaa;
}

[data-theme="light"] .sp-empty-state {
    color: #999999;
}

[data-theme="light"] .sp-bar-track {
    background: #f0f0f0;
}

[data-theme="light"] .sp-bar-count {
    color: #1a1a1a;
}

[data-theme="light"] .sp-bar-pct {
    color: #999999;
}

[data-theme="light"] .sp-lang-bar {
    background: #f0f0f0;
}

[data-theme="light"] .sp-lang-name {
    color: #999999;
}

[data-theme="light"] .sp-lang-pct {
    color: #aaaaaa;
}

[data-theme="light"] .sp-mitre-row:nth-child(odd) {
    background: #f8f8f8;
}

[data-theme="light"] .sp-mitre-row:hover {
    background: #f0f0f0;
}

[data-theme="light"] .sp-mitre-rank {
    color: #aaaaaa;
}

[data-theme="light"] .sp-mitre-name {
    color: #555555;
}

[data-theme="light"] .sp-mitre-tactic {
    color: #999999;
}

[data-theme="light"] .sp-actor-row:nth-child(odd) {
    background: #f8f8f8;
}

[data-theme="light"] .sp-actor-row:hover {
    background: #f0f0f0;
}

[data-theme="light"] .sp-actor-rank {
    color: #aaaaaa;
}

[data-theme="light"] .sp-actor-name {
    color: #1a1a1a;
}

[data-theme="light"] .sp-actor-meta {
    color: #999999;
}

[data-theme="light"] .sp-actor-sep {
    color: #d0d0d0;
}

[data-theme="light"] .sp-chart-val {
    color: #999999;
}

[data-theme="light"] .sp-chart-label {
    color: #aaaaaa;
}

[data-theme="light"] .sp-ring-inner {
    background: #ffffff;
}

[data-theme="light"] .sp-ring-total {
    color: #1a1a1a;
}

[data-theme="light"] .sp-ring-label {
    color: #999999;
}

[data-theme="light"] .sp-ring-leg-item {
    color: #555555;
}

[data-theme="light"] .sp-ring-leg-val {
    color: #1a1a1a;
}

[data-theme="light"] .sp-tag-count {
    color: #aaaaaa;
}

[data-theme="light"] .sp-footer {
    border-top: 1px solid #e0e0e0;
}

[data-theme="light"] .sp-sparkline-text {
    color: #7c3aed;
}

/* ===== COVERAGE PAGE LIGHT MODE (cm-*) ===== */
[data-theme="light"] .cm-page-header {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .cm-page-title {
    color: #1a1a1a;
}

[data-theme="light"] .cm-page-sub {
    color: #999999;
}

[data-theme="light"] .cm-hero-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .cm-hero-label {
    color: #999999;
}

[data-theme="light"] .cm-hero-val {
    color: #1a1a1a;
}

[data-theme="light"] .cm-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .cm-card-header {
    color: #999999;
}

[data-theme="light"] .cm-ring-bg {
    stroke: #e0e0e0;
}

[data-theme="light"] .cm-ring-inner text {
    fill: #1a1a1a;
}

[data-theme="light"] .cm-ring-label {
    fill: #999999;
}

[data-theme="light"] .cm-tactic-row {
    background: #f8f8f8;
}

[data-theme="light"] .cm-tactic-name {
    color: #1a1a1a;
}

[data-theme="light"] .cm-tactic-tech-count {
    color: #999999;
}

[data-theme="light"] .cm-tactic-sep {
    color: #d0d0d0;
}

[data-theme="light"] .cm-tech-pill {
    background: #f0f0f0;
}

[data-theme="light"] .cm-tech-id {
    color: #999999;
}

[data-theme="light"] .cm-tech-name {
    color: #aaaaaa;
}

[data-theme="light"] .cm-gap-card {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .cm-gap-label {
    color: #999999;
}

[data-theme="light"] .cm-gap-title {
    color: #1a1a1a;
}

[data-theme="light"] .cm-gap-desc {
    color: #555555;
}

[data-theme="light"] .cm-gap-tag {
    color: #888888;
    background: #eeeeee;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .cm-gap-tag.active {
    border-color: #999999;
    color: #555555;
}

[data-theme="light"] .cm-no-gaps {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .cm-footer {
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
}

[data-theme="light"] .cm-footer-prompt {
    color: #999999;
}

[data-theme="light"] .cm-matrix-header {
    background: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .cm-matrix-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .cm-tactic-header {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .cm-bar-track {
    background: #f0f0f0;
}

[data-theme="light"] .cm-empty-state {
    color: #999999;
}

[data-theme="light"] .cm-section-title {
    color: #1a1a1a;
}

/* ===== ABOUT PAGE LIGHT MODE (abt-*) ===== */
[data-theme="light"] .abt-page {
    color: #1a1a1a;
}

[data-theme="light"] .abt-header {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .abt-title {
    color: #1a1a1a;
}

[data-theme="light"] .abt-subtitle {
    color: #555555;
}

[data-theme="light"] .abt-section-label {
    color: #999999;
}

[data-theme="light"] .abt-card {
    border: 1px solid #e0e0e0;
    background: #fafafa;
}

[data-theme="light"] .abt-card:hover {
    background: #f0f0f0;
}

[data-theme="light"] .abt-card-header {
    border-bottom: 1px solid #e0e0e0;
    background: #f8f8f8;
}

[data-theme="light"] .abt-card-label {
    color: #999999;
}

[data-theme="light"] .abt-card-title {
    color: #1a1a1a;
}

[data-theme="light"] .abt-card-desc {
    color: #555555;
}

[data-theme="light"] .abt-stat-card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .abt-stat-card:hover {
    border-color: #cccccc;
    background: #f0f0f0;
}

[data-theme="light"] .abt-stat-val {
    color: #1a1a1a;
}

[data-theme="light"] .abt-stat-label {
    color: #999999;
}

[data-theme="light"] .abt-stat-sub {
    color: #999999;
}

[data-theme="light"] .abt-mission-card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .abt-mission-title {
    color: #1a1a1a;
}

[data-theme="light"] .abt-mission-text {
    color: #555555;
}

[data-theme="light"] .abt-stack-card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .abt-stack-item {
    background: #f8f8f8;
    border-bottom: 1px solid #e8e8e8;
}

[data-theme="light"] .abt-stack-name {
    color: #1a1a1a;
}

[data-theme="light"] .abt-stack-desc {
    color: #555555;
}

[data-theme="light"] .abt-timeline-card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .abt-timeline-entry {
    border-bottom: 1px solid #eeeeee;
}

[data-theme="light"] .abt-timeline-date {
    color: #999999;
}

[data-theme="light"] .abt-timeline-text {
    color: #555555;
}

[data-theme="light"] .abt-ack-card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .abt-footer {
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
}

[data-theme="light"] .abt-footer-prompt {
    color: #999999;
}

[data-theme="light"] .abt-footer-ver {
    color: #aaaaaa;
}

/* ===== DAILY DEBRIEFS LIGHT MODE (db-*) ===== */
[data-theme="light"] .db-page-header {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .db-page-title {
    color: #1a1a1a;
}

[data-theme="light"] .db-page-sub {
    color: #999999;
}

[data-theme="light"] .db-tabs {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .db-tab {
    color: #999999;
}

[data-theme="light"] .db-tab:hover {
    color: #555555;
}

[data-theme="light"] .db-tab.active {
    color: #1a1a1a;
}

[data-theme="light"] .db-hero-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .db-hero-label {
    color: #999999;
}

[data-theme="light"] .db-hero-val {
    color: #1a1a1a;
}

[data-theme="light"] .db-filter-bar {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .db-filter-label {
    color: #999999;
}

[data-theme="light"] .db-filter-btn {
    color: #888888;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .db-filter-btn:hover {
    color: #555555;
    border-color: #cccccc;
}

[data-theme="light"] .db-filter-btn.active {
    color: #1a1a1a;
    background: #f0f0f0;
}

[data-theme="light"] .db-debrief-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .db-debrief-card:hover {
    border-color: #cccccc;
}

[data-theme="light"] .db-debrief-header {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .db-debrief-id {
    color: #999999;
}

[data-theme="light"] .db-debrief-title {
    color: #1a1a1a;
}

[data-theme="light"] .db-debrief-date {
    color: #999999;
}

[data-theme="light"] .db-debrief-desc {
    color: #555555;
}

[data-theme="light"] .db-debrief-meta-label {
    color: #999999;
}

[data-theme="light"] .db-debrief-meta-val {
    color: #555555;
}

[data-theme="light"] .db-val-total {
    color: #555555;
}

[data-theme="light"] .db-empty-state {
    color: #999999;
}

[data-theme="light"] .db-detail-overlay {
    background: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .db-detail-panel {
    background: #ffffff;
    border: 1px solid #d0d0d0;
}

[data-theme="light"] .db-detail-header {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .db-detail-id {
    color: #999999;
}

[data-theme="light"] .db-detail-title {
    color: #1a1a1a;
}

[data-theme="light"] .db-detail-date {
    color: #999999;
}

[data-theme="light"] .db-detail-desc {
    color: #555555;
}

[data-theme="light"] .db-detail-section-label {
    color: #999999;
}

[data-theme="light"] .db-detail-finding:nth-child(odd) {
    background: #f8f8f8;
}

[data-theme="light"] .db-detail-finding:nth-child(even) {
    background: #fafafa;
}

[data-theme="light"] .db-detail-finding:hover {
    background: #f0f0f0;
}

[data-theme="light"] .db-finding-title {
    color: #1a1a1a;
}

[data-theme="light"] .db-finding-desc {
    color: #555555;
}

[data-theme="light"] .db-finding-meta-label {
    color: #999999;
}

[data-theme="light"] .db-rec-item {
    border-bottom: 1px solid #eeeeee;
}

[data-theme="light"] .db-rec-title {
    color: #1a1a1a;
}

[data-theme="light"] .db-rec-desc {
    color: #555555;
}

[data-theme="light"] .db-close-btn {
    color: #999999;
}

[data-theme="light"] .db-close-btn:hover {
    color: #1a1a1a;
}

[data-theme="light"] .db-footer {
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
}

[data-theme="light"] .db-footer-prompt {
    color: #999999;
}

/* ===== CORRELATION PAGE LIGHT MODE (corr-*) ===== */
[data-theme="light"] .corr-page-header {
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

[data-theme="light"] .corr-page-title {
    color: #1a1a1a;
}

[data-theme="light"] .corr-page-sub {
    color: #999999;
}

[data-theme="light"] .corr-stats-row .corr-stat {
    color: #1a1a1a;
}

[data-theme="light"] .corr-stat-label {
    color: #999999;
}

[data-theme="light"] .corr-search-box {
    background: #fafafa;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .corr-search-input {
    color: #1a1a1a;
    background: transparent;
}

[data-theme="light"] .corr-search-input::placeholder {
    color: #aaaaaa;
}

[data-theme="light"] .corr-filter-btn {
    border: 1px solid #e0e0e0;
    color: #888888;
}

[data-theme="light"] .corr-filter-btn:hover {
    border-color: #cccccc;
    color: #555555;
}

[data-theme="light"] .corr-filter-btn.active {
    background: #e8e8e8;
    color: #1a1a1a;
}

[data-theme="light"] .corr-search-results {
    background: #fafafa;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .corr-search-results::-webkit-scrollbar-track {
    background: #fafafa;
}

[data-theme="light"] .corr-result-item {
    color: #999999;
}

[data-theme="light"] .corr-result-name {
    color: #1a1a1a;
}

[data-theme="light"] .corr-result-meta {
    color: #888888;
}

[data-theme="light"] .corr-result-item:hover {
    background: #f0f0f0;
}

[data-theme="light"] .corr-selected-threats {
    background: #fafafa;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .corr-threat-header {
    background: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .corr-threat-title {
    color: #1a1a1a;
}

[data-theme="light"] .corr-threat-meta {
    color: #999999;
}

[data-theme="light"] .corr-remove-btn {
    background: #e0e0e0;
}

[data-theme="light"] .corr-section-header {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .corr-section-title {
    color: #555555;
}

[data-theme="light"] .corr-section-count {
    color: #999999;
}

[data-theme="light"] .corr-shared-label {
    color: #999999;
}

[data-theme="light"] .corr-matrix-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .corr-matrix-header {
    background: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .corr-matrix-title {
    color: #1a1a1a;
}

[data-theme="light"] .corr-col-header {
    border-right: 1px solid #e0e0e0;
}

[data-theme="light"] .corr-col-header-inner {
    background: #f0f0f0;
}

[data-theme="light"] .corr-feature-row {
    border-bottom: 1px solid #eeeeee;
}

[data-theme="light"] .corr-feature-label {
    color: #555555;
}

[data-theme="light"] .corr-cell-label {
    color: #999999;
}

[data-theme="light"] .corr-cell-sub {
    color: #999999;
}

[data-theme="light"] .corr-empty-cell {
    color: #999999;
}

[data-theme="light"] .corr-ioc-tag {
    color: #555555;
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .corr-ioc-tag.shared {
    color: #1a1a1a;
}

[data-theme="light"] .corr-technique-tag {
    color: #555555;
    background: #f0f0f0;
}

[data-theme="light"] .corr-technique-tag.shared {
    color: #1a1a1a;
    background: #e0e0e0;
}

[data-theme="light"] .corr-timeline-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .corr-timeline-header {
    background: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .corr-insights-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .corr-insights-header {
    background: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .corr-insight {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .corr-insight-title {
    color: #1a1a1a;
}

[data-theme="light"] .corr-insight-desc {
    color: #555555;
}

[data-theme="light"] .corr-insight-label {
    color: #999999;
}

[data-theme="light"] .corr-footer {
    background: #fafafa;
}

[data-theme="light"] .corr-footer-prompt {
    color: #999999;
}

[data-theme="light"] .corr-empty-state {
    color: #999999;
}

[data-theme="light"] .corr-pair-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .corr-pair-header {
    background: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .corr-pair-names {
    color: #1a1a1a;
}

[data-theme="light"] .corr-pair-sep {
    color: #cccccc;
}

[data-theme="light"] .corr-pair-vs {
    background: #e8e8e8;
    color: #555555;
}

[data-theme="light"] .corr-pair-stat-label {
    color: #999999;
}

[data-theme="light"] .corr-pair-detail-row {
    border-bottom: 1px solid #eeeeee;
}

[data-theme="light"] .corr-pair-detail-label {
    color: #888888;
}

[data-theme="light"] .corr-pair-detail-val {
    color: #555555;
}

[data-theme="light"] .corr-help-toggle {
    border: 1px solid #e0e0e0;
    color: #888888;
}

[data-theme="light"] .corr-help-toggle:hover {
    border-color: #cccccc;
    color: #555555;
}

[data-theme="light"] .corr-help-panel {
    background: #f0f0f0;
}

[data-theme="light"] .corr-help-text {
    color: #555555;
}

/* ===== CHANGELOG PAGE LIGHT MODE (cl-*) ===== */
[data-theme="light"] .cl-page-header {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .cl-page-title {
    color: #1a1a1a;
}

[data-theme="light"] .cl-page-sub {
    color: #999999;
}

[data-theme="light"] .cl-filter-bar {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .cl-filter-label {
    color: #999999;
}

[data-theme="light"] .cl-filter-btn {
    color: #888888;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .cl-filter-btn:hover {
    color: #555555;
}

[data-theme="light"] .cl-filter-btn.active {
    color: #1a1a1a;
}

[data-theme="light"] .cl-entry {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .cl-entry-header {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .cl-entry-version {
    color: #1a1a1a;
}

[data-theme="light"] .cl-entry-date {
    color: #999999;
}

[data-theme="light"] .cl-change-item {
    color: #555555;
}

[data-theme="light"] .cl-change-item:nth-child(odd) {
    background: #fafafa;
}

[data-theme="light"] .cl-type-badge {
    background: #e8e8e8;
}

[data-theme="light"] .cl-change-desc {
    color: #555555;
}

[data-theme="light"] .cl-expand-btn {
    color: #999999;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .cl-expand-btn:hover {
    color: #555555;
    border-color: #cccccc;
}

[data-theme="light"] .cl-details {
    background: #f8f8f8;
}

[data-theme="light"] .cl-details-label {
    color: #999999;
}

[data-theme="light"] .cl-details-text {
    color: #555555;
}

[data-theme="light"] .cl-stat-label {
    color: #999999;
}

[data-theme="light"] .cl-stat-val {
    color: #1a1a1a;
}

[data-theme="light"] .cl-timeline-line {
    border-right: 1.5px solid #cccccc;
    border-bottom: 1.5px solid #cccccc;
}

[data-theme="light"] .cl-footer {
    border-top: 1px solid #e0e0e0;
}

[data-theme="light"] .cl-footer-prompt {
    color: #999999;
}

[data-theme="light"] .cl-idea-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .cl-idea-card-header {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .cl-idea-title {
    color: #1a1a1a;
}

[data-theme="light"] .cl-idea-desc {
    color: #555555;
}

[data-theme="light"] .cl-idea-meta {
    color: #999999;
}

[data-theme="light"] .cl-idea-empty {
    color: #999999;
}

/* ===== MCP PAGE LIGHT MODE (mcp-*) ===== */
[data-theme="light"] .mcp-page-header {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .mcp-page-title {
    color: #1a1a1a;
}

[data-theme="light"] .mcp-page-sub {
    color: #555555;
}

[data-theme="light"] .mcp-page-ts {
    color: #999999;
}

[data-theme="light"] .mcp-config-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .mcp-config-header {
    background: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .mcp-config-label {
    color: #999999;
}

[data-theme="light"] .mcp-config-tabs {
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .mcp-config-tab {
    color: #999999;
}

[data-theme="light"] .mcp-config-tab:hover {
    color: #555555;
}

[data-theme="light"] .mcp-config-tab.active {
    color: #1a1a1a;
}

[data-theme="light"] .mcp-config-body {
    background: #fafafa;
}

[data-theme="light"] .mcp-code-block {
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .mcp-code-content {
    color: #555555;
}

[data-theme="light"] .mcp-syn-brace,
[data-theme="light"] .mcp-syn-bracket,
[data-theme="light"] .mcp-syn-colon,
[data-theme="light"] .mcp-syn-comma {
    color: #999999;
}

[data-theme="light"] .mcp-syn-comment {
    color: #999999;
}

[data-theme="light"] .mcp-tools-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .mcp-tools-header {
    background: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .mcp-tools-label {
    color: #999999;
}

[data-theme="light"] .mcp-tool-item {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .mcp-tool-item:hover {
    border-color: #cccccc;
}

[data-theme="light"] .mcp-tool-name {
    color: #1a1a1a;
}

[data-theme="light"] .mcp-tool-desc {
    color: #555555;
}

[data-theme="light"] .mcp-tool-schema-label {
    color: #999999;
}

[data-theme="light"] .mcp-schema-viewer {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .mcp-schema-header {
    background: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .mcp-schema-title {
    color: #1a1a1a;
}

[data-theme="light"] .mcp-prop-row {
    border-bottom: 1px solid #f0f0f0;
}

[data-theme="light"] .mcp-prop-name {
    color: #1a1a1a;
}

[data-theme="light"] .mcp-prop-type {
    color: #888888;
    background: #e8e8e8;
}

[data-theme="light"] .mcp-prop-desc {
    color: #555555;
}

[data-theme="light"] .mcp-prop-req {
    color: #e11d48;
}

[data-theme="light"] .mcp-link {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .mcp-link:hover {
    border-color: #cccccc;
}

[data-theme="light"] .mcp-link-name {
    color: #1a1a1a;
}

[data-theme="light"] .mcp-link-url {
    color: #999999;
}

[data-theme="light"] .mcp-copy-btn {
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    color: #555555;
}

[data-theme="light"] .mcp-copy-btn:hover {
    background: #e0e0e0;
}

[data-theme="light"] .mcp-empty-tool {
    color: #999999;
}

[data-theme="light"] .mcp-footer {
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
}

[data-theme="light"] .mcp-footer-prompt {
    color: #999999;
}

[data-theme="light"] .mcp-container {
    background: #f5f5f5;
}

/* ===== SIMULATIONS (sim-*) ===== */
.sim-platform-tabs {
    display: flex;
    background: #0e0e0e;
}

.sim-platform-tab {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: normal;
    color: #525252;
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.sim-platform-tab:hover { color: #a0a0a0; }

.sim-platform-tab.active[data-platform="windows"] {
    color: #7dd3fc;
    font-weight: 500;
    border-bottom-color: #7dd3fc;
    background: #7dd3fc12;
}

.sim-platform-tab.active[data-platform="linux"] {
    color: #a8e6cf;
    font-weight: 500;
    border-bottom-color: #a8e6cf;
    background: #a8e6cf12;
}

.sim-platform-tab.active[data-platform="python"] {
    color: #fde68a;
    font-weight: 500;
    border-bottom-color: #fde68a;
    background: #fde68a12;
}

.sim-platform-tabs .dp-bracket-btn {
    margin-left: auto;
    padding: 10px 16px;
}

.sim-platform-content {
    display: none;
}

.sim-platform-content.active {
    display: block;
}

.sim-card {
    background: #111111;
    margin-bottom: 16px;
}

.sim-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
}

.sim-card-title {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: #f0f0f0;
}

.sim-card-num {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #525252;
    margin-right: 8px;
}

.sim-card-desc {
    font-family: var(--font-sans);
    font-size: 12px;
    color: #888888;
    padding: 0 16px 12px;
    line-height: 1.5;
}

.sim-caution-banner {
    background: #fda4af19;
    border-left: 3px solid #fda4af;
    color: #fda4af;
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 12px 16px;
    margin: 0 16px 12px;
    line-height: 1.5;
}

.sim-requirements {
    padding: 0 16px 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: #888888;
}

.sim-requirements-title {
    color: #525252;
    margin-bottom: 6px;
    font-weight: 500;
}

.sim-requirements li {
    margin-bottom: 4px;
    margin-left: 16px;
    list-style-type: none;
}

.sim-requirements li::before {
    content: "- ";
    color: #525252;
}

.sim-code-block {
    background: #0a0a0a;
    max-height: 500px;
    overflow-y: auto;
}

.sim-code-block .dp-code-wrap {
    display: flex;
    padding: 16px 0;
}

.sim-code-block .dp-code-lines {
    display: flex;
    flex-direction: column;
    padding: 0 12px 0 16px;
    border-right: 1px solid #1e1e1e;
    user-select: none;
    flex-shrink: 0;
}

.sim-code-block .dp-code-lines span {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
    color: #3a3a3a;
    text-align: right;
    min-width: 24px;
}

.sim-code-block .dp-code-content {
    padding: 0 20px;
    flex: 1;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
    color: #e8e8e8;
    white-space: pre;
    word-break: break-word;
}

/* Step-based simulation blocks */
.sim-step-block {
    margin-bottom: 2px;
}

.sim-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #0f0f0f;
    border-top: 1px solid #1a1a1a;
}

.sim-step-num {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.sim-step-title {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #a0a0a0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sim-step-desc {
    font-family: var(--font-sans);
    font-size: 11px;
    color: #666;
    padding: 6px 16px 8px;
    background: #0a0a0a;
    line-height: 1.5;
}

.sim-step-count {
    font-family: var(--font-mono);
    font-size: 11px;
    background: rgba(255,255,255,0.05);
    padding: 2px 8px;
    border-radius: 2px;
}

.sim-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #0f0f0f;
    border-bottom: 1px solid #1a1a1a;
}

.sim-code-wrap {
    display: flex;
    padding: 16px 0;
}

.sim-code-lines {
    display: flex;
    flex-direction: column;
    padding: 0 16px;
    border-right: 1px solid #1e1e1e;
    user-select: none;
}

.sim-code-lines span {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
    color: #2a2a2a;
}

.sim-code-content {
    padding: 0 20px;
    flex: 1;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
    color: #e8e8e8;
    white-space: pre;
}

.sim-copy-row {
    display: flex;
    justify-content: flex-end;
    padding: 0 16px 8px;
}

.sim-mitre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 16px;
}

.sim-mitre-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    background: #c4b5fd19;
    color: #c4b5fd;
    padding: 2px 8px;
}

.sim-refs-section {
    padding: 16px;
    margin-top: 8px;
}

.sim-refs-section .dp-label {
    margin-bottom: 8px;
}

.sim-ref-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    font-size: 12px;
}

.sim-ref-type {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    padding: 2px 8px;
    white-space: nowrap;
}

.sim-ref-title {
    color: #888888;
    text-decoration: none;
    font-family: var(--font-sans);
}

.sim-ref-title:hover {
    color: #f0f0f0;
}

.sim-empty {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #525252;
    padding: 32px;
    text-align: center;
}

.sim-tab-content {
    padding: 24px 32px;
}

/* ===== SIMULATIONS PAGE (sim-*) ===== */
.sim-page-container {
    padding: 24px 32px;
}

.sim-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.sim-page-stats {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #888888;
    margin-top: 4px;
}

/* Simulations page tabs */
.sim-page-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 1px solid #222;
}

.sim-page-tab {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #525252;
    padding: 10px 20px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    border-bottom: 2px solid transparent;
    min-width: 44px;
    text-align: center;
}

.sim-page-tab:hover { color: #a0a0a0; }
.sim-page-tab.active { color: #c4b5fd; border-bottom-color: #c4b5fd; }

/* Correlation sections */
.sim-corr-section {
    margin-bottom: 32px;
}

.sim-corr-section .dp-label {
    margin-bottom: 16px;
}

.sim-corr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}

.sim-corr-card {
    background: #111;
    padding: 16px;
    border-left: 3px solid #c4b5fd;
    transition: background 0.15s;
}

.sim-corr-card:hover { background: #1a1a1a; }

.sim-corr-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.sim-corr-tech-id {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
}

.sim-corr-tech-name {
    font-family: var(--font-sans);
    font-size: 12px;
    color: #a0a0a0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sim-corr-count {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #c4b5fd;
    background: #c4b5fd19;
    padding: 2px 8px;
    flex-shrink: 0;
}

.sim-corr-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sim-corr-tactic {
    font-family: var(--font-mono);
    font-size: 11px;
}

.sim-corr-threat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sim-corr-pill {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #7dd3fc;
    background: #7dd3fc0d;
    padding: 3px 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.sim-corr-pill:hover { background: #7dd3fc1a; }

/* Attack chain similarity cards */
.sim-corr-chain-card {
    background: #111;
    padding: 16px;
    border-left: 3px solid #fda4af;
}

.sim-corr-chain-pair {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.sim-corr-chain-threat {
    font-family: var(--font-sans);
    font-size: 12px;
    color: #e8e8e8;
    cursor: pointer;
    padding: 4px 8px;
    background: rgba(255,255,255,0.03);
    transition: background 0.15s;
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sim-corr-chain-threat:hover { background: rgba(255,255,255,0.08); }

.sim-corr-chain-arrow {
    font-family: var(--font-mono);
    font-size: 14px;
    color: #525252;
    flex-shrink: 0;
}

.sim-corr-chain-techniques {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sim-corr-chain-count {
    font-family: var(--font-mono);
    font-size: 11px;
}

.sim-corr-tech-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sim-corr-tech-pill {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #c4b5fd;
    background: #c4b5fd0d;
    padding: 2px 8px;
}

/* Coverage section */
.sim-coverage-platforms {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 8px;
}

.sim-coverage-platform {
    padding: 16px;
    background: #111;
}

.sim-coverage-platform-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.sim-coverage-platform-name {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
}

.sim-coverage-platform-stats {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #666;
    margin-left: auto;
}

.sim-coverage-bar-track {
    height: 6px;
    background: #1a1a1a;
    border-radius: 3px;
    overflow: hidden;
}

.sim-coverage-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Kill Chain Heatmap */
.sim-coverage-killchain {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}

.sim-coverage-kc-cell {
    padding: 14px;
    border: 1px solid #1a1a1a;
    transition: border-color 0.2s;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sim-coverage-kc-cell:hover { border-color: #333; }

.sim-coverage-kc-name {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #a0a0a0;
    margin-bottom: 6px;
    line-height: 1.3;
}

.sim-coverage-kc-stats {
    font-family: var(--font-mono);
    font-size: 12px;
}

.sim-coverage-kc-tech {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #525252;
    margin-top: 2px;
}

.sim-tactic-group {
    margin-bottom: 32px;
}

.sim-tactic-title {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #525252;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #222222;
}

.sim-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 12px;
}

.sim-threat-card {
    background: #111111;
    padding: 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.sim-threat-card:hover {
    background: #1a1a1a;
}

.sim-threat-card-title {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: #f0f0f0;
    margin-bottom: 8px;
    line-height: 1.4;
}

.sim-threat-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 11px;
}

.sim-threat-card-platforms {
    display: flex;
    gap: 6px;
    align-items: center;
}

.sim-platform-icon {
    font-size: 14px;
}

/* ===== SIMULATIONS LIGHT MODE (sim-*) ===== */
[data-theme="light"] .sim-platform-tabs {
    background: #fafafa;
}

[data-theme="light"] .sim-platform-tab {
    color: #999999;
}

[data-theme="light"] .sim-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .sim-card-title {
    color: #1a1a1a;
}

[data-theme="light"] .sim-card-desc {
    color: #666666;
}

[data-theme="light"] .sim-caution-banner {
    background: #fda4af12;
}

[data-theme="light"] .sim-requirements {
    color: #666666;
}

[data-theme="light"] .sim-code-block {
    background: #f8f8f8;
}

[data-theme="light"] .sim-code-block .dp-code-lines {
    border-right: 1px solid #e5e5e5;
}

[data-theme="light"] .sim-code-block .dp-code-lines span {
    color: #b0b0b0;
}

[data-theme="light"] .sim-code-block .dp-code-content {
    color: #1a1a1a;
}

[data-theme="light"] .sim-step-header {
    background: #f0f0f0;
    border-top-color: #e5e5e5;
}

[data-theme="light"] .sim-step-title {
    color: #555555;
}

[data-theme="light"] .sim-step-desc {
    background: #f8f8f8;
    color: #666666;
}

[data-theme="light"] .sim-code-header {
    background: #f0f0f0;
}

[data-theme="light"] .sim-mitre-tag {
    background: #c4b5fd22;
}

[data-theme="light"] .sim-ref-title {
    color: #666666;
}

[data-theme="light"] .sim-ref-title:hover {
    color: #1a1a1a;
}

[data-theme="light"] .sim-empty {
    color: #999999;
}

[data-theme="light"] .sim-threat-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .sim-threat-card:hover {
    background: #fafafa;
}

[data-theme="light"] .sim-threat-card-title {
    color: #1a1a1a;
}

[data-theme="light"] .sim-tactic-title {
    color: #999999;
    border-color: #e0e0e0;
}

[data-theme="light"] .sim-page-stats {
    color: #999999;
}


/* ====== SIMULATION LIBRARY (sl-*) ====== */

/* Layout */
.sl-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    overflow: hidden;
}
.sl-stats-bar {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}
.sl-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.sl-stat-val {
    font-size: 24px;
    font-weight: 700;
    font-family: var(--font-mono);
}
.sl-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.sl-val-lavender { color: #c4b5fd; }
.sl-val-mint { color: #a8e6cf; }
.sl-val-peach { color: #fdba74; }
.sl-val-sky { color: #7dd3fc; }

.sl-page-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
    gap: 0;
}
.sl-page-tab {
    padding: 10px 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.sl-page-tab:hover {
    color: var(--text-primary);
}
.sl-page-tab.active {
    color: #c4b5fd;
    border-bottom-color: #c4b5fd;
}

.sl-breadcrumb {
    padding: 8px 20px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface-alt);
}
.sl-breadcrumb-item {
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}
.sl-breadcrumb-item:hover {
    color: var(--text-primary);
}
.sl-breadcrumb-item.current {
    color: var(--text-primary);
    cursor: default;
}
.sl-breadcrumb-sep {
    color: var(--text-muted);
    margin: 0 2px;
}

.sl-body {
    flex: 1;
    overflow: hidden;
}
.sl-panels {
    display: flex;
    height: 100%;
    overflow: hidden;
}

/* Filter Sidebar (Panel 1) */
.sl-filter-sidebar {
    width: 260px;
    min-width: 260px;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
    background: var(--bg-surface);
    padding: 0;
}
.sl-filter-group {
    border-bottom: 1px solid var(--border-color);
}
.sl-filter-group-header {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
    user-select: none;
    transition: background 0.2s;
}
.sl-filter-group-header:hover {
    background: var(--bg-hover);
}
.sl-filter-chevron {
    font-size: 10px;
    color: var(--text-muted);
    transition: transform 0.2s;
}
.sl-filter-group.collapsed .sl-filter-chevron {
    transform: rotate(-90deg);
}
.sl-filter-group-body {
    padding: 4px 14px 10px;
    max-height: 200px;
    overflow-y: auto;
}
.sl-filter-group.collapsed .sl-filter-group-body {
    display: none;
}
.sl-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    font-size: 12px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}
.sl-filter-item:hover {
    color: var(--text-primary);
}
.sl-filter-item.active {
    color: var(--text-primary);
}
.sl-filter-check {
    width: 14px;
    height: 14px;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 9px;
}
.sl-filter-item.active .sl-filter-check {
    border-color: #c4b5fd;
    color: #c4b5fd;
}
.sl-filter-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-mono);
}
.sl-filter-count {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.sl-filter-search {
    width: 100%;
    padding: 5px 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 11px;
    margin-bottom: 6px;
    outline: none;
}
.sl-filter-search:focus {
    border-color: var(--border-active);
}
.sl-filter-search::placeholder {
    color: var(--text-muted);
}
.sl-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 14px;
}
.sl-filter-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #c4b5fd19;
    color: #c4b5fd;
    font-family: var(--font-mono);
    font-size: 10px;
    cursor: default;
}
.sl-filter-pill-x {
    cursor: pointer;
    font-size: 12px;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.sl-filter-pill-x:hover {
    opacity: 1;
}
.sl-filter-clear {
    padding: 4px 14px 8px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}
.sl-filter-clear:hover {
    color: #fda4af;
}

/* Threat List (Panel 2) */
.sl-threat-panel {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid var(--border-color);
}
.sl-search-bar {
    padding: 10px 14px;
    display: flex;
    gap: 8px;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}
.sl-search-input {
    flex: 1;
    padding: 6px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 12px;
    outline: none;
}
.sl-search-input:focus {
    border-color: var(--border-active);
}
.sl-search-input::placeholder {
    color: var(--text-muted);
}
.sl-search-count {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}
.sl-sort-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 0 14px;
    border-bottom: 1px solid var(--border-color);
}
.sl-sort-btn {
    padding: 6px 10px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.sl-sort-btn:hover {
    color: var(--text-secondary);
}
.sl-sort-btn.active {
    color: #c4b5fd;
    border-bottom-color: #c4b5fd;
}
.sl-threat-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}
.sl-threat-card {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
    border-left: 3px solid transparent;
}
.sl-threat-card:hover {
    background: var(--bg-hover);
}
.sl-threat-card.selected {
    background: var(--bg-active);
    border-left-color: #c4b5fd;
}
.sl-threat-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}
.sl-threat-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.sl-threat-id {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
}
.sl-threat-sev {
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 1px 6px;
    font-weight: 600;
}
.sl-threat-actor {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #fda4af;
}
.sl-threat-nation {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #7dd3fc;
}
.sl-threat-cat {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    background: var(--bg-hover);
    padding: 1px 6px;
}
.sl-threat-platforms {
    display: flex;
    gap: 4px;
    margin-left: auto;
}
.sl-platform-icon {
    font-size: 13px;
}
.sl-threat-sim-count {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #c4b5fd;
    background: #c4b5fd15;
    padding: 1px 6px;
}

/* Simulations List (Panel 3) */
.sl-sim-panel {
    width: 0;
    min-width: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}
.sl-sim-panel.visible {
    width: 360px;
    min-width: 360px;
}
.sl-sim-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface-alt);
}
.sl-sim-header-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.sl-sim-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 10px;
}
.sl-sim-list {
    flex: 1;
    overflow-y: auto;
}
.sl-sim-platform-group {
    border-bottom: 1px solid var(--border-color);
}
.sl-sim-platform-label {
    padding: 8px 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    position: sticky;
    top: 0;
    z-index: 1;
}
.sl-sim-card {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}
.sl-sim-card:hover {
    background: var(--bg-hover);
}
.sl-sim-card.selected {
    background: var(--bg-active);
}
.sl-sim-title {
    font-size: 12px;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}
.sl-sim-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.sl-sim-caution {
    font-family: var(--font-mono);
    font-size: 9px;
    padding: 1px 5px;
    font-weight: 600;
    text-transform: uppercase;
}
.sl-sim-caution-critical {
    color: #fda4af;
    background: #fda4af19;
}
.sl-sim-caution-high {
    color: #fdba74;
    background: #fdba7419;
}
.sl-sim-caution-medium {
    color: #c4b5fd;
    background: #c4b5fd19;
}
.sl-sim-caution-low {
    color: #a8e6cf;
    background: #a8e6cf19;
}
.sl-sim-mitre-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 4px;
}
.sl-sim-mitre-pill {
    font-family: var(--font-mono);
    font-size: 9px;
    color: #c4b5fd;
    background: #c4b5fd12;
    padding: 1px 5px;
}
.sl-sim-author {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-muted);
}

/* Simulation Detail (Panel 4) */
.sl-detail-panel {
    width: 0;
    min-width: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.sl-detail-panel.visible {
    width: 500px;
    min-width: 500px;
}
.sl-detail-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}
.sl-detail-header {
    padding: 14px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface-alt);
}
.sl-detail-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.sl-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
}
.sl-detail-section {
    padding: 14px;
    border-bottom: 1px solid var(--border-color);
}
.sl-detail-section-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Code Block */
.sl-code-block {
    background: #0a0a0a;
    border: 1px solid var(--border-color);
    overflow: hidden;
}
.sl-code-header {
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
}
.sl-code-copy {
    cursor: pointer;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 10px;
    transition: color 0.2s;
}
.sl-code-copy:hover {
    color: #a8e6cf;
}
.sl-code-content {
    padding: 10px;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: pre;
}
.sl-code-line {
    display: flex;
}
.sl-code-line-num {
    width: 35px;
    text-align: right;
    padding-right: 10px;
    color: var(--text-muted);
    user-select: none;
    flex-shrink: 0;
}
.sl-code-line-text {
    flex: 1;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Requirements & References */
.sl-req-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sl-req-item {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
    padding-left: 12px;
    position: relative;
}
.sl-req-item::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}
.sl-ref-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sl-ref-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 11px;
}
.sl-ref-type {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-muted);
    background: var(--bg-hover);
    padding: 1px 5px;
    flex-shrink: 0;
}
.sl-ref-link {
    color: #7dd3fc;
    text-decoration: none;
    font-family: var(--font-mono);
    word-break: break-all;
}
.sl-ref-link:hover {
    text-decoration: underline;
}
.sl-notes {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Correlation & Coverage (sl-corr-*, sl-cov-*) */
.sl-corr-section {
    padding: 16px 20px;
}
.sl-corr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}
.sl-corr-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 12px;
}
.sl-corr-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.sl-corr-tech-id {
    font-family: var(--font-mono);
    font-size: 11px;
}
.sl-corr-tech-name {
    font-size: 12px;
    color: var(--text-primary);
}
.sl-corr-count {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    margin-left: auto;
}
.sl-corr-tactic {
    font-family: var(--font-mono);
    font-size: 10px;
}
.sl-corr-threat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}
.sl-corr-pill {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #fda4af;
    background: #fda4af12;
    padding: 1px 6px;
    cursor: pointer;
}
.sl-corr-pill:hover {
    background: #fda4af25;
}
.sl-corr-chain-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 12px;
}
.sl-corr-chain-pair {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.sl-corr-chain-threat {
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
}
.sl-corr-chain-threat:hover {
    color: #c4b5fd;
}
.sl-corr-chain-arrow {
    color: var(--text-muted);
    font-size: 14px;
}
.sl-corr-chain-count {
    font-family: var(--font-mono);
    font-size: 11px;
}
.sl-corr-tech-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 4px;
}
.sl-corr-tech-pill {
    font-family: var(--font-mono);
    font-size: 9px;
    color: #c4b5fd;
    background: #c4b5fd12;
    padding: 1px 5px;
}

/* Coverage */
.sl-cov-platforms {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sl-cov-platform {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sl-cov-platform-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}
.sl-cov-platform-name {
    font-family: var(--font-mono);
    font-weight: 600;
}
.sl-cov-platform-stats {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
}
.sl-cov-bar-track {
    height: 6px;
    background: var(--bg-primary);
    width: 100%;
}
.sl-cov-bar-fill {
    height: 100%;
    transition: width 0.5s;
}
.sl-cov-killchain {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}
.sl-cov-kc-cell {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background 0.2s;
}
.sl-cov-kc-name {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
}
.sl-cov-kc-stats {
    font-family: var(--font-mono);
    font-size: 11px;
}
.sl-cov-kc-tech {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-muted);
}

/* Utilities */
.sl-empty {
    padding: 40px 20px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
}
.sl-loading {
    padding: 40px 20px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
    animation: sl-pulse 1.5s ease-in-out infinite;
}
@keyframes sl-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.sl-section-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding: 12px 20px 0;
}

/* Syntax Highlighting */
.sl-hl-keyword { color: #c4b5fd; }
.sl-hl-string { color: #a8e6cf; }
.sl-hl-comment { color: #555555; font-style: italic; }
.sl-hl-variable { color: #fda4af; }
.sl-hl-operator { color: #fdba74; }
.sl-hl-builtin { color: #7dd3fc; }
.sl-hl-decorator { color: #fde68a; }

/* ====== SIMULATION LIBRARY LIGHT MODE (sl-*) ====== */
[data-theme="light"] .sl-filter-sidebar {
    background: #fafafa;
    border-color: #e5e5e5;
}
[data-theme="light"] .sl-filter-group {
    border-color: #e5e5e5;
}
[data-theme="light"] .sl-filter-group-header:hover {
    background: #f5f5f5;
}
[data-theme="light"] .sl-filter-check {
    border-color: #d4d4d4;
}
[data-theme="light"] .sl-filter-search {
    background: #ffffff;
    border-color: #e5e5e5;
    color: #1a1a1a;
}
[data-theme="light"] .sl-filter-pill {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}
[data-theme="light"] .sl-filter-item.active .sl-filter-check {
    border-color: #7c3aed;
    color: #7c3aed;
}
[data-theme="light"] .sl-stats-bar {
    border-color: #e5e5e5;
}
[data-theme="light"] .sl-page-tabs {
    border-color: #e5e5e5;
}
[data-theme="light"] .sl-page-tab.active {
    color: #7c3aed;
    border-bottom-color: #7c3aed;
}
[data-theme="light"] .sl-breadcrumb {
    background: #f5f5f5;
    border-color: #e5e5e5;
}
[data-theme="light"] .sl-threat-panel {
    border-color: #e5e5e5;
}
[data-theme="light"] .sl-search-bar {
    border-color: #e5e5e5;
}
[data-theme="light"] .sl-search-input {
    background: #ffffff;
    border-color: #e5e5e5;
    color: #1a1a1a;
}
[data-theme="light"] .sl-sort-bar {
    border-color: #e5e5e5;
}
[data-theme="light"] .sl-sort-btn.active {
    color: #7c3aed;
    border-bottom-color: #7c3aed;
}
[data-theme="light"] .sl-threat-card {
    border-bottom-color: #e5e5e5;
    border-left-color: transparent;
}
[data-theme="light"] .sl-threat-card:hover {
    background: #f5f5f5;
}
[data-theme="light"] .sl-threat-card.selected {
    background: #f0f0f0;
    border-left-color: #7c3aed;
}
[data-theme="light"] .sl-threat-title {
    color: #1a1a1a;
}
[data-theme="light"] .sl-threat-cat {
    background: #f0f0f0;
    color: #737373;
}
[data-theme="light"] .sl-threat-sim-count {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.08);
}
[data-theme="light"] .sl-sim-panel {
    background: #ffffff;
    border-color: #e5e5e5;
}
[data-theme="light"] .sl-sim-header {
    background: #f5f5f5;
    border-color: #e5e5e5;
}
[data-theme="light"] .sl-sim-platform-label {
    background: #fafafa;
    color: #737373;
}
[data-theme="light"] .sl-sim-platform-group {
    border-color: #e5e5e5;
}
[data-theme="light"] .sl-sim-card {
    border-color: #e5e5e5;
}
[data-theme="light"] .sl-sim-card:hover {
    background: #f5f5f5;
}
[data-theme="light"] .sl-sim-card.selected {
    background: #f0f0f0;
}
[data-theme="light"] .sl-sim-title {
    color: #1a1a1a;
}
[data-theme="light"] .sl-sim-mitre-pill {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.08);
}
[data-theme="light"] .sl-detail-panel {
    background: #ffffff;
}
[data-theme="light"] .sl-detail-header {
    background: #f5f5f5;
    border-color: #e5e5e5;
}
[data-theme="light"] .sl-detail-title {
    color: #1a1a1a;
}
[data-theme="light"] .sl-detail-section {
    border-color: #e5e5e5;
}
[data-theme="light"] .sl-code-block {
    background: #f8f8f8;
    border-color: #e5e5e5;
}
[data-theme="light"] .sl-code-header {
    background: #f0f0f0;
    border-color: #e5e5e5;
}
[data-theme="light"] .sl-code-content {
    color: #1a1a1a;
}
[data-theme="light"] .sl-code-copy:hover {
    color: #059669;
}
[data-theme="light"] .sl-ref-link {
    color: #0284c7;
}
[data-theme="light"] .sl-notes {
    color: #525252;
}
[data-theme="light"] .sl-corr-card {
    background: #ffffff;
    border-color: #e5e5e5;
}
[data-theme="light"] .sl-corr-pill {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.06);
}
[data-theme="light"] .sl-corr-pill:hover {
    background: rgba(220, 38, 38, 0.12);
}
[data-theme="light"] .sl-corr-chain-card {
    background: #ffffff;
    border-color: #e5e5e5;
}
[data-theme="light"] .sl-corr-chain-threat:hover {
    color: #7c3aed;
}
[data-theme="light"] .sl-corr-tech-pill {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.08);
}
[data-theme="light"] .sl-cov-bar-track {
    background: #e5e5e5;
}
[data-theme="light"] .sl-empty {
    color: #999999;
}
[data-theme="light"] .sl-loading {
    color: #999999;
}

/* Syntax Highlighting — Light */
[data-theme="light"] .sl-hl-keyword { color: #7c3aed; }
[data-theme="light"] .sl-hl-string { color: #059669; }
[data-theme="light"] .sl-hl-comment { color: #9ca3af; }
[data-theme="light"] .sl-hl-variable { color: #dc2626; }
[data-theme="light"] .sl-hl-operator { color: #d97706; }
[data-theme="light"] .sl-hl-builtin { color: #0284c7; }
[data-theme="light"] .sl-hl-decorator { color: #b45309; }

/* ====== SIMULATION LIBRARY RESPONSIVE (sl-*) ====== */
@media (max-width: 768px) {
    .sl-container {
        height: auto;
        overflow: visible;
    }
    .sl-body {
        overflow: visible;
    }
    .sl-panels {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }
    .sl-filter-sidebar {
        width: 100%;
        min-width: 100%;
        max-height: 300px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .sl-threat-panel {
        min-width: 0;
        border-right: none;
        overflow: visible;
    }
    .sl-threat-list {
        max-height: 60vh;
        overflow-y: auto;
    }
    .sl-sim-panel {
        border-right: none;
    }
    .sl-sim-panel.visible {
        width: 100%;
        min-width: 100%;
        max-height: 60vh;
        overflow-y: auto;
    }
    .sl-detail-panel.visible {
        width: 100%;
        min-width: 100%;
    }
    .sl-stats-bar {
        flex-wrap: wrap;
        gap: 8px;
    }
    .sl-corr-grid {
        grid-template-columns: 1fr;
    }
    .sl-cov-killchain {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .sl-stats-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .sl-threat-meta {
        gap: 4px;
    }
    .sl-detail-panel.visible {
        width: 100%;
        min-width: 100%;
    }
    .sl-page-tab {
        padding: 8px 10px;
        font-size: 11px;
    }
    .sl-cov-killchain {
        grid-template-columns: 1fr;
    }
}


/* ===== TRANSCRIPT (tx-*) ===== */

.tx-header {
    padding: 16px 0;
    border-bottom: 1px solid #1e1e1e;
    margin-bottom: 16px;
}

.tx-header-title {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tx-header-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.tx-meta-item {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-primary);
}

.tx-score-badge {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    padding: 2px 8px;
    border: 1px solid;
}

.tx-status-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tx-header-timestamps {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-primary);
    margin-top: 8px;
}

.tx-section {
    margin-bottom: 20px;
}

/* Participants strip */
.tx-participants-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.tx-participant {
    background: #111111;
    border-left: 3px solid;
    padding: 10px 14px;
    min-width: 120px;
    flex: 1;
}

.tx-participant-name {
    display: block;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.tx-participant-role {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    margin-bottom: 2px;
}

.tx-participant-msgs {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #525252;
}

/* Phase timeline */
.tx-phase-timeline {
    display: flex;
    align-items: flex-start;
    gap: 0;
    overflow-x: auto;
    margin-top: 8px;
    padding-bottom: 4px;
}

.tx-phase-block {
    min-width: 100px;
    flex: 1;
    text-align: center;
}

.tx-phase-bar {
    height: 6px;
    width: 100%;
    margin-bottom: 8px;
}

.tx-phase-name {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.tx-phase-agent {
    font-size: 10px;
}

.tx-phase-duration {
    font-size: 10px;
}

.tx-phase-status {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: lowercase;
}

.tx-phase-connector {
    width: 16px;
    min-width: 16px;
    border-top: 2px dashed #333333;
    margin-top: 3px;
    align-self: flex-start;
}

/* Signal log */
.tx-signal-log {
    background: #0e0e0e;
    padding: 12px;
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
}

.tx-signal-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px;
}

.tx-signal-row:hover {
    background: #111111;
}

.tx-signal-seq {
    color: #525252;
    min-width: 20px;
}

.tx-signal-from,
.tx-signal-to {
    font-weight: 500;
    min-width: 70px;
}

.tx-signal-arrow {
    color: #525252;
}

.tx-signal-name {
    color: var(--text-primary);
    flex: 1;
}

.tx-signal-time {
    font-size: 10px;
    min-width: 50px;
    text-align: right;
}

/* Message feed */
.tx-message-feed {
    margin-top: 8px;
}

.tx-message-entry {
    border-left: 2px solid #1e1e1e;
    margin-bottom: 2px;
}

.tx-message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 12px;
}

.tx-message-header:hover {
    background: #111111;
}

.tx-msg-seq {
    color: #525252;
    min-width: 30px;
}

.tx-msg-agent {
    font-weight: 600;
    min-width: 80px;
}

.tx-msg-phase {
    font-size: 11px;
}

.tx-msg-signal {
    font-size: 11px;
    color: #fde68a;
    padding: 1px 6px;
    background: rgba(253, 230, 138, 0.1);
}

.tx-msg-toggle {
    margin-left: auto;
    color: #525252;
    font-size: 11px;
}

.tx-message-body {
    padding: 8px 12px 12px 42px;
}

.tx-msg-content {
    font-family: var(--font-secondary);
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 6px;
}

.tx-msg-meta {
    display: flex;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 10px;
}

/* Summary grid */
.tx-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    margin-top: 8px;
    background: #1a1a1a;
}

.tx-summary-cell {
    background: #111111;
    padding: 12px;
    text-align: center;
}

.tx-summary-value {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.tx-summary-label {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* ===== TRANSCRIPT LIGHT MODE (tx-*) ===== */

[data-theme="light"] .tx-header {
    border-bottom-color: #e0e0e0;
}

[data-theme="light"] .tx-participant {
    background: #fafafa;
    border-left-width: 3px;
}

[data-theme="light"] .tx-participant-msgs {
    color: #999999;
}

[data-theme="light"] .tx-phase-connector {
    border-top-color: #d0d0d0;
}

[data-theme="light"] .tx-signal-log {
    background: #fafafa;
}

[data-theme="light"] .tx-signal-row:hover {
    background: #f0f0f0;
}

[data-theme="light"] .tx-signal-seq {
    color: #999999;
}

[data-theme="light"] .tx-signal-arrow {
    color: #999999;
}

[data-theme="light"] .tx-message-entry {
    border-left-color: #e0e0e0;
}

[data-theme="light"] .tx-message-header:hover {
    background: #fafafa;
}

[data-theme="light"] .tx-msg-seq {
    color: #999999;
}

[data-theme="light"] .tx-msg-toggle {
    color: #999999;
}

[data-theme="light"] .tx-msg-signal {
    background: rgba(253, 230, 138, 0.2);
}

[data-theme="light"] .tx-summary-grid {
    background: #e0e0e0;
}

[data-theme="light"] .tx-summary-cell {
    background: #ffffff;
}

/* ===== 3-FLAVOR DETECTION STATES ===== */
.dp-code-unavailable {
    color: #333333;
    font-style: italic;
    padding: 24px 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.8;
    white-space: pre;
}
.dp-lang-dim {
    opacity: 0.3;
}
[data-theme="light"] .dp-code-unavailable {
    color: #cccccc;
}

/* ===== AUTH: Locked Nav Items ===== */
.nav-locked {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
    position: relative;
}
.nav-tier-badge {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
    margin-left: 6px;
}
[data-theme="light"] .nav-locked {
    opacity: 0.45;
}

/* ===== AUTH: Detail Panel Tab Locked ===== */
.dp-tab-locked {
    opacity: 0.35;
    cursor: not-allowed !important;
    pointer-events: none;
}
.dp-tab-locked::after {
    content: '';
}

/* ===== AUTH: Sidebar User Info ===== */
.user-info {
    padding: 8px 16px;
    border-top: 1px solid #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 11px;
}
.user-email {
    color: #737373;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
    text-decoration: none;
    cursor: pointer;
}
.user-email:hover {
    color: #c4b5fd;
}
.user-tier {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    font-family: var(--font-mono);
}
.tier-blue { color: #7dd3fc; }
.tier-red { color: #fda4af; }
.tier-purple { color: #c4b5fd; }
.tier-gold { color: #fde68a; }
.tier-free { color: #525252; }
.nav-logout-btn {
    background: none;
    border: none;
    color: #525252;
    font-family: var(--font-mono);
    font-size: 10px;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
}
.nav-logout-btn:hover {
    color: #fda4af;
}
[data-theme="light"] .tier-gold { color: #ca8a04; }
[data-theme="light"] .user-info {
    border-top-color: #e5e5e5;
}
[data-theme="light"] .user-email {
    color: #737373;
}
[data-theme="light"] .user-email:hover {
    color: #7c3aed;
}
[data-theme="light"] .nav-logout-btn {
    color: #a3a3a3;
}
[data-theme="light"] .nav-logout-btn:hover {
    color: #e11d48;
}

/* Auth Buttons (sidebar) */
.auth-buttons {
    display: flex;
    gap: 8px;
    padding: 8px 16px;
    border-top: 1px solid #1a1a1a;
}
.nav-auth-btn {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 6px 12px;
    text-align: center;
    text-decoration: none;
    flex: 1;
    cursor: pointer;
}
.nav-auth-login {
    background: transparent;
    border: 1px solid #333;
    color: #737373;
}
.nav-auth-login:hover {
    color: #a3a3a3;
    border-color: #525252;
}
.nav-auth-signup {
    background: #c4b5fd;
    border: 1px solid #c4b5fd;
    color: #0a0a0a;
}
.nav-auth-signup:hover {
    background: #d4c8fe;
    border-color: #d4c8fe;
}
[data-theme="light"] .auth-buttons {
    border-top-color: #e5e5e5;
}
[data-theme="light"] .nav-auth-login {
    border-color: #d4d4d4;
    color: #737373;
}
[data-theme="light"] .nav-auth-login:hover {
    color: #525252;
    border-color: #a3a3a3;
}
[data-theme="light"] .nav-auth-signup {
    background: #c4b5fd;
    border-color: #c4b5fd;
    color: #1a1a1a;
}
[data-theme="light"] .nav-auth-signup:hover {
    background: #b4a3fc;
    border-color: #b4a3fc;
}

/* ===== AUTH: Upgrade Gate Page ===== */
.upgrade-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 24px;
    text-align: center;
    font-family: var(--font-mono);
}
.upgrade-gate-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}
.upgrade-gate-title {
    font-size: 20px;
    color: #e5e5e5;
    margin-bottom: 8px;
    font-weight: 600;
}
.upgrade-gate-tier {
    font-size: 14px;
    margin-bottom: 24px;
}
.upgrade-gate-desc {
    color: #737373;
    font-size: 13px;
    max-width: 400px;
    line-height: 1.6;
    margin-bottom: 32px;
}
.upgrade-gate-cta {
    display: inline-block;
    padding: 10px 24px;
    background: transparent;
    border: 1px solid #c4b5fd;
    color: #c4b5fd;
    font-family: var(--font-mono);
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
}
.upgrade-gate-cta:hover {
    background: rgba(196, 181, 253, 0.1);
}
[data-theme="light"] .upgrade-gate-title {
    color: #171717;
}
[data-theme="light"] .upgrade-gate-desc {
    color: #737373;
}
[data-theme="light"] .upgrade-gate-cta {
    border-color: #7c3aed;
    color: #7c3aed;
}
[data-theme="light"] .upgrade-gate-cta:hover {
    background: rgba(124, 58, 237, 0.08);
}

/* ===== AUTH: Email Verification Banner ===== */
.verify-banner {
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: #fdba74;
    display: flex;
    align-items: center;
    gap: 8px;
}
.verify-banner-btn {
    background: none;
    border: 1px solid #fdba74;
    color: #fdba74;
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 2px 8px;
    cursor: pointer;
    margin-left: auto;
}
.verify-banner-btn:hover {
    background: rgba(253, 186, 116, 0.1);
}
[data-theme="light"] .verify-banner {
    background: #fef3c7;
    border-bottom-color: #fcd34d;
    color: #92400e;
}
[data-theme="light"] .verify-banner-btn {
    border-color: #92400e;
    color: #92400e;
}

/* ===== ADMIN DASHBOARD (adm-*) ===== */

.adm-container {
    padding: 0 24px 40px;
    max-width: 1200px;
}

.adm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0 16px;
    border-bottom: 1px solid #1a1a1a;
    margin-bottom: 16px;
}

.adm-header-left { display: flex; align-items: baseline; gap: 12px; }

.adm-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    color: #fda4af;
}

.adm-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #525252;
}

.adm-user {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #737373;
}

/* Stats strip */
.adm-stats-strip {
    display: flex;
    gap: 24px;
    padding: 12px 0;
    border-bottom: 1px solid #1a1a1a;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.adm-stat-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; }

.adm-stat-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 700;
    color: #e5e5e5;
}

.adm-stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #525252;
    text-transform: uppercase;
}

/* Tabs */
.adm-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #1a1a1a;
    margin-bottom: 16px;
    overflow-x: auto;
    flex-shrink: 0;
}

.adm-tab {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #737373;
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.adm-tab:hover { color: #a3a3a3; }

.adm-tab.active {
    color: #fda4af;
    border-bottom-color: #fda4af;
}

/* Content area */
.adm-content { min-height: 300px; }

.adm-loading, .adm-empty {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #525252;
    padding: 40px 0;
    text-align: center;
}

/* Search input */
.adm-user-search { margin-bottom: 12px; }

.adm-search-input {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    background: #0e0e0e;
    border: 1px solid #1a1a1a;
    color: #e5e5e5;
    padding: 8px 12px;
    width: 100%;
    max-width: 400px;
    outline: none;
}

.adm-search-input:focus { border-color: #333333; }

/* Table layout */
.adm-table { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

.adm-table-header {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #1a1a1a;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #525252;
    text-transform: uppercase;
}

/* User table columns */
.adm-user-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #111111;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #d4d4d4;
    cursor: pointer;
    transition: background 0.1s;
}

.adm-user-row:nth-child(4n+1) { background: #0e0e0e; }
.adm-user-row:nth-child(4n+3) { background: #111111; }
.adm-user-row:hover { background: #171717; }
.adm-user-row.adm-row-expanded { background: #171717; border-left: 2px solid #fda4af; }

.adm-user-col { padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-user-email { flex: 3; min-width: 160px; }
.adm-user-tier { flex: 1; min-width: 70px; }
.adm-user-verified { flex: 0.5; min-width: 40px; text-align: center; }
.adm-user-status { flex: 0.8; min-width: 60px; }
.adm-user-views { flex: 0.5; min-width: 40px; text-align: right; }
.adm-user-lib { flex: 0.5; min-width: 40px; text-align: center; }
.adm-user-active { flex: 1; min-width: 70px; }
.adm-user-created { flex: 1; min-width: 70px; }
.adm-user-actions { flex: 1; min-width: 80px; text-align: right; }

.adm-verified { color: #a8e6cf; }
.adm-unverified { color: #fda4af; }
.adm-admin-badge { color: #fda4af; font-size: 10px; }
.adm-trial-badge { font-family: var(--font-mono); font-size: 10px; color: #c4b5fd; margin-left: 6px; }
.prf-plan-trial-note { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted, #525252); margin-top: 4px; }
.adm-status-active { color: #a8e6cf; }
.adm-status-suspended { color: #fda4af; }
.adm-lib-badge { color: #c4b5fd; font-size: 10px; }

.adm-tier-select {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    background: transparent;
    border: 1px solid #333333;
    padding: 2px 4px;
    cursor: pointer;
    outline: none;
}

.adm-tier-select option {
    background: #0a0a0a;
    color: #e5e5e5;
}

/* Action buttons */
.adm-action-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    background: transparent;
    border: 1px solid #333333;
    color: #a3a3a3;
    padding: 3px 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.adm-action-btn:hover {
    border-color: #737373;
    color: #e5e5e5;
}

.adm-suspend-btn:hover { border-color: #fda4af; color: #fda4af; }
.adm-activate-btn:hover { border-color: #a8e6cf; color: #a8e6cf; }
.adm-revoke-btn:hover { border-color: #fdba74; color: #fdba74; }

/* Checkbox + bulk selection */
.adm-user-check { width: 30px; flex: 0 0 30px; display: flex; align-items: center; justify-content: center; }
.adm-user-checkbox, .adm-select-all { cursor: pointer; accent-color: var(--lavender, #c4b5fd); }
.adm-bulk-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #111; border: 1px solid #222; margin-bottom: 8px; font-family: var(--font-mono, 'JetBrains Mono', monospace); font-size: 12px; flex-wrap: wrap; }
.adm-bulk-count { color: var(--lavender, #c4b5fd); min-width: 80px; }
.adm-bulk-tier-select { font-family: var(--font-mono, 'JetBrains Mono', monospace); font-size: 11px; background: #0a0a0a; border: 1px solid #333; color: #a3a3a3; padding: 4px 8px; cursor: pointer; }
.adm-bulk-btn { font-size: 11px; }
.adm-delete-btn { color: #fda4af; border-color: #fda4af; }
.adm-delete-btn:hover { background: rgba(253,164,175,0.1); }
.adm-delete-confirm { padding: 10px 14px; background: #1a0a0a; border: 1px solid #fda4af; margin: 4px 0; font-family: var(--font-mono, 'JetBrains Mono', monospace); font-size: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adm-delete-input { background: #111; border: 1px solid #333; color: #e8e8e8; padding: 6px 10px; font-family: var(--font-mono, 'JetBrains Mono', monospace); font-size: 12px; width: 120px; outline: none; }
.adm-delete-input:focus { border-color: #fda4af; }
.adm-verify-btn { color: #86efac; border-color: #86efac; }
.adm-verify-btn:hover { background: rgba(134,239,172,0.1); }

/* Expandable user detail panel */
.adm-user-detail {
    background: #0a0a0a;
    border-bottom: 1px solid #1a1a1a;
    padding: 0;
}

.adm-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 16px;
}

.adm-detail-section {
    background: #111111;
    padding: 12px;
}

.adm-detail-wide { grid-column: 1 / -1; }

.adm-detail-timeline {
    max-height: 300px;
    overflow-y: auto;
}

.adm-timeline-event {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #a3a3a3;
}

.adm-activity-icon { font-size: 8px; flex-shrink: 0; }
.adm-timeline-time { color: #525252; min-width: 60px; font-size: 10px; }
.adm-timeline-type { color: #737373; min-width: 100px; }
.adm-timeline-target { color: #a3a3a3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.adm-engagement-big {
    font-family: 'JetBrains Mono', monospace;
    font-size: 32px;
    font-weight: 700;
    color: #fda4af;
    margin-bottom: 8px;
}

.adm-engagement-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.adm-eng-item {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #525252;
    background: #1a1a1a;
    padding: 2px 6px;
}

.adm-detail-lib, .adm-detail-sessions {
    max-height: 200px;
    overflow-y: auto;
}

.adm-lib-item {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #a3a3a3;
    padding: 2px 0;
}

.adm-lib-type { color: #c4b5fd; }

.adm-detail-session {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #a3a3a3;
    padding: 3px 0;
}

/* Admin notes */
.adm-notes-list { margin-bottom: 8px; }

.adm-note-item {
    padding: 6px 0;
    border-bottom: 1px solid #1a1a1a;
}

.adm-note-admin {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #c4b5fd;
}

.adm-note-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #525252;
    margin-left: 8px;
}

.adm-note-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #d4d4d4;
    margin-top: 2px;
}

.adm-note-form {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.adm-note-input {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    background: #0a0a0a;
    border: 1px solid #333333;
    color: #e5e5e5;
    padding: 4px 8px;
    flex: 1;
    outline: none;
}

.adm-note-input:focus { border-color: #525252; }
.adm-note-btn:hover { border-color: #c4b5fd; color: #c4b5fd; }

/* Session table columns */
.adm-session-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #111111;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #d4d4d4;
}

.adm-session-row:nth-child(odd) { background: #0e0e0e; }
.adm-session-row:nth-child(even) { background: #111111; }

.adm-session-col { padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-session-user { flex: 2.5; min-width: 150px; }
.adm-session-tier { flex: 0.7; min-width: 50px; }
.adm-session-ip { flex: 1.2; min-width: 100px; }
.adm-session-country { flex: 0.7; min-width: 50px; }
.adm-session-device { flex: 0.7; min-width: 60px; }
.adm-session-created { flex: 1.5; min-width: 100px; }
.adm-session-actions { flex: 0.8; min-width: 60px; text-align: right; }

/* Activity feed */
.adm-activity-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    align-items: center;
}

.adm-filter-select {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    background: #0e0e0e;
    border: 1px solid #333333;
    color: #e5e5e5;
    padding: 4px 8px;
    outline: none;
}

.adm-filter-select option { background: #0a0a0a; color: #e5e5e5; }

.adm-activity-feed {
    max-height: 600px;
    overflow-y: auto;
}

.adm-activity-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #111111;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #a3a3a3;
}

.adm-activity-row:nth-child(odd) { background: #0e0e0e; }
.adm-activity-row:nth-child(even) { background: #111111; }

.adm-activity-time { color: #525252; min-width: 60px; font-size: 10px; }
.adm-activity-user { color: #7dd3fc; min-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-activity-type { min-width: 120px; color: #737373; }
.adm-activity-target { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-activity-geo { color: #525252; min-width: 30px; text-align: right; }

.adm-activity-more { padding: 12px 0; text-align: center; }

/* Waitlist columns */
.adm-wl-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #111111;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #d4d4d4;
}

.adm-wl-row:nth-child(odd) { background: #0e0e0e; }
.adm-wl-row:nth-child(even) { background: #111111; }

.adm-wl-col { padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-wl-email { flex: 3; min-width: 200px; }
.adm-wl-source { flex: 1; min-width: 80px; }
.adm-wl-status { flex: 1; min-width: 80px; }
.adm-wl-date { flex: 2; min-width: 140px; }

.adm-converted { color: #a8e6cf; }
.adm-pending { color: #fdba74; }

/* Pagination */
.adm-pagination {
    padding: 12px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #525252;
}

/* Analytics grid */
.adm-analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.adm-analytics-wide { grid-column: 1 / -1; }

.adm-analytics-section {
    background: #111111;
    padding: 16px;
}

.adm-section-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #525252;
    margin-bottom: 12px;
}

.adm-muted { color: #525252; font-size: 11px; }

/* Bar charts */
.adm-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.adm-bar-label { font-family: 'JetBrains Mono', monospace; font-size: 10px; min-width: 80px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-bar-track { flex: 1; height: 14px; background: #1a1a1a; }
.adm-bar-fill { height: 100%; min-width: 2px; transition: width 0.3s; }
.adm-bar-val { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #a3a3a3; width: 40px; text-align: right; }

/* DAU sparkline */
.adm-sparkline {
    width: 100%;
    height: 60px;
}

/* Hourly heatstrip */
.adm-heatstrip {
    display: flex;
    gap: 2px;
}

.adm-heat-cell {
    flex: 1;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    color: #525252;
}

/* Power users */
.adm-pwr-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.adm-pwr-email {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #a3a3a3;
    min-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Conversion funnel */
.adm-funnel { display: flex; flex-direction: column; gap: 4px; }

.adm-funnel-step {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.adm-funnel-bar {
    height: 24px;
    background: #c4b5fd;
    opacity: 0.3;
    transition: width 0.3s;
}

.adm-funnel-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #a3a3a3;
    min-width: 80px;
}

.adm-funnel-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #e5e5e5;
    font-weight: 600;
}

.adm-funnel-rate {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #a8e6cf;
}

/* Content leaderboard */
.adm-leaderboard { width: 100%; }

.adm-lb-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #525252;
    text-transform: uppercase;
    border-bottom: 1px solid #1a1a1a;
}

.adm-lb-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    border-bottom: 1px solid #111111;
}

.adm-lb-row:nth-child(odd) { background: #0e0e0e; }
.adm-lb-row:nth-child(even) { background: #111111; }

.adm-lb-rank { color: #525252; width: 24px; }
.adm-lb-id { width: 120px; flex-shrink: 0; }
.adm-lb-title { flex: 1; color: #a3a3a3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-lb-views { color: #7dd3fc; width: 50px; text-align: right; }
.adm-lb-copies { color: #a8e6cf; width: 50px; text-align: right; }
.adm-lb-saves { color: #c4b5fd; width: 50px; text-align: right; }

.adm-sort-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    background: transparent;
    border: 1px solid #333333;
    color: #525252;
    padding: 2px 6px;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.15s;
}

.adm-sort-btn:hover { border-color: #737373; color: #a3a3a3; }

/* Daily views chart */
.adm-daily-chart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 120px;
    padding-top: 8px;
}

.adm-chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.adm-chart-bar {
    width: 100%;
    background: #c4b5fd;
    min-height: 2px;
    transition: height 0.3s;
}

.adm-chart-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    color: #525252;
    margin-top: 4px;
    transform: rotate(-45deg);
    white-space: nowrap;
}

/* System tab */
.adm-platform-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.adm-platform-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.adm-email-list { max-height: 300px; overflow-y: auto; }

.adm-email-row {
    display: flex;
    gap: 12px;
    padding: 4px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #a3a3a3;
    border-bottom: 1px solid #111111;
}

.adm-email-time { color: #525252; min-width: 60px; font-size: 10px; }
.adm-email-user { color: #7dd3fc; min-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-email-type { color: #737373; }
.adm-email-geo { color: #525252; }

/* ===== ADMIN DASHBOARD LIGHT MODE (adm-*) ===== */
[data-theme="light"] .adm-header { border-bottom-color: #e5e5e5; }
[data-theme="light"] .adm-stats-strip { border-bottom-color: #e5e5e5; }
[data-theme="light"] .adm-stat-val { color: #171717; }
[data-theme="light"] .adm-tabs { border-bottom-color: #e5e5e5; }
[data-theme="light"] .adm-tab { color: #a3a3a3; }
[data-theme="light"] .adm-tab.active { color: #be123c; border-bottom-color: #be123c; }
[data-theme="light"] .adm-table-header { border-bottom-color: #e5e5e5; color: #a3a3a3; }
[data-theme="light"] .adm-user-row,
[data-theme="light"] .adm-session-row,
[data-theme="light"] .adm-wl-row,
[data-theme="light"] .adm-activity-row,
[data-theme="light"] .adm-lb-row { border-bottom-color: #e5e5e5; color: #374151; }
[data-theme="light"] .adm-user-row:nth-child(4n+1),
[data-theme="light"] .adm-session-row:nth-child(odd),
[data-theme="light"] .adm-wl-row:nth-child(odd),
[data-theme="light"] .adm-activity-row:nth-child(odd),
[data-theme="light"] .adm-lb-row:nth-child(odd) { background: #fafafa; }
[data-theme="light"] .adm-user-row:nth-child(4n+3),
[data-theme="light"] .adm-session-row:nth-child(even),
[data-theme="light"] .adm-wl-row:nth-child(even),
[data-theme="light"] .adm-activity-row:nth-child(even),
[data-theme="light"] .adm-lb-row:nth-child(even) { background: #f5f5f5; }
[data-theme="light"] .adm-user-row:hover { background: #eeeeee; }
[data-theme="light"] .adm-user-row.adm-row-expanded { background: #eeeeee; border-left-color: #be123c; }
[data-theme="light"] .adm-tier-select { border-color: #d4d4d4; }
[data-theme="light"] .adm-tier-select option { background: #ffffff; color: #171717; }
[data-theme="light"] .adm-action-btn { border-color: #d4d4d4; color: #737373; }
[data-theme="light"] .adm-bulk-bar { background: #f5f5f5; border-color: #e5e5e5; }
[data-theme="light"] .adm-bulk-tier-select { background: #ffffff; border-color: #d4d4d4; color: #374151; }
[data-theme="light"] .adm-delete-btn { color: #be123c; border-color: #fca5a5; }
[data-theme="light"] .adm-delete-btn:hover { background: rgba(190,18,60,0.06); }
[data-theme="light"] .adm-delete-confirm { background: #fef2f2; border-color: #fca5a5; }
[data-theme="light"] .adm-delete-input { background: #ffffff; border-color: #d4d4d4; color: #171717; }
[data-theme="light"] .adm-verify-btn { color: #15803d; border-color: #86efac; }
[data-theme="light"] .adm-verify-btn:hover { background: rgba(21,128,61,0.06); }
[data-theme="light"] .adm-user-checkbox, [data-theme="light"] .adm-select-all { accent-color: #7c3aed; }
[data-theme="light"] .adm-sort-btn { border-color: #d4d4d4; color: #a3a3a3; }
[data-theme="light"] .adm-analytics-section { background: #f5f5f5; }
[data-theme="light"] .adm-bar-track { background: #e5e5e5; }
[data-theme="light"] .adm-lb-title { color: #6b7280; }
[data-theme="light"] .adm-search-input { background: #fafafa; border-color: #e5e5e5; color: #171717; }
[data-theme="light"] .adm-filter-select { background: #fafafa; border-color: #e5e5e5; color: #171717; }
[data-theme="light"] .adm-filter-select option { background: #ffffff; color: #171717; }
[data-theme="light"] .adm-user-detail { background: #fafafa; border-bottom-color: #e5e5e5; }
[data-theme="light"] .adm-detail-section { background: #f0f0f0; }
[data-theme="light"] .adm-engagement-big { color: #be123c; }
[data-theme="light"] .adm-eng-item { background: #e5e5e5; color: #6b7280; }
[data-theme="light"] .adm-note-input { background: #ffffff; border-color: #d4d4d4; color: #171717; }
[data-theme="light"] .adm-note-text { color: #374151; }
[data-theme="light"] .adm-heat-cell { color: #a3a3a3; }
[data-theme="light"] .adm-funnel-bar { background: #7c3aed; }
[data-theme="light"] .adm-lb-header { border-bottom-color: #e5e5e5; }
[data-theme="light"] .adm-trial-badge { color: #7c3aed; }
[data-theme="light"] .prf-plan-trial-note { color: #6b7280; }

/* ===== ADMIN DASHBOARD RESPONSIVE (adm-*) ===== */
@media (max-width: 768px) {
    .adm-container { padding: 0 12px 24px; }
    .adm-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .adm-stats-strip { gap: 12px; }
    .adm-stat-val { font-size: 16px; }
    .adm-analytics-grid { grid-template-columns: 1fr; }
    .adm-detail-grid { grid-template-columns: 1fr; }
    .adm-user-row, .adm-session-row, .adm-wl-row, .adm-activity-row, .adm-table-header {
        font-size: 10px;
    }
    .adm-user-active, .adm-user-created, .adm-user-views, .adm-user-lib { display: none; }
    .adm-session-ip, .adm-session-device { display: none; }
    .adm-activity-geo { display: none; }
    .adm-platform-grid { grid-template-columns: 1fr 1fr; }
    .adm-activity-filters { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .adm-stats-strip { gap: 8px; }
    .adm-stat-chip { min-width: calc(50% - 8px); }
    .adm-tab { padding: 8px 8px; font-size: 10px; }
    .adm-pwr-email { min-width: 100px; }
    .adm-bar-label { min-width: 60px; font-size: 9px; }
    .adm-platform-grid { grid-template-columns: 1fr; }
}

/* ===== COPY COUNT BADGE ===== */
.threat-row-meta-copies {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #a8e6cf;
}

[data-theme="light"] .threat-row-meta-copies {
    color: #059669;
}

/* ===== ADMIN — SESSION DRILLDOWN ===== */
.adm-session-row {
    cursor: pointer;
    transition: background 0.15s;
}
.adm-session-row:hover {
    background: #1a1a1a;
}
.adm-session-row.adm-row-expanded {
    border-left: 2px solid #7dd3fc;
    background: #111;
}
.adm-session-detail {
    padding: 12px 16px;
    border-left: 2px solid #7dd3fc;
    background: #0d0d0d;
    margin-bottom: 2px;
}
.adm-session-detail .adm-timeline-event {
    padding: 4px 0;
}

/* ===== ADMIN — ACTIVITY CLICKABLE ===== */
.adm-activity-row {
    cursor: pointer;
    transition: background 0.15s;
}
.adm-activity-row:hover {
    background: #1a1a1a;
}
.adm-activity-row[data-userid] {
    cursor: pointer;
}

/* ===== ADMIN — FLASH ANIMATION ===== */
@keyframes adm-flash-anim {
    0% { background: rgba(253, 164, 175, 0.25); }
    100% { background: transparent; }
}
.adm-flash {
    animation: adm-flash-anim 2s ease-out;
}

/* ===== ADMIN — CONTENT DRILL-IN ===== */
.adm-content-detail {
    padding: 12px 16px;
    border-left: 2px solid #c4b5fd;
    background: #0d0d0d;
    margin: 4px 0;
}
.adm-content-section-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #525252;
    margin: 8px 0 4px;
}
.adm-content-viewer {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 3px 0;
    font-size: 11px;
    color: #d4d4d4;
}
.adm-content-viewer-email {
    min-width: 160px;
    color: #a3a3a3;
}
.adm-content-viewer-type {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    padding: 1px 6px;
}
.adm-content-viewer-type.click {
    color: #7dd3fc;
    background: rgba(125, 211, 252, 0.1);
}
.adm-content-viewer-type.copy {
    color: #a8e6cf;
    background: rgba(168, 230, 207, 0.1);
}
.adm-content-viewer-time {
    color: #525252;
    font-size: 10px;
}

/* ===== ADMIN — COPY BADGE IN USERS ===== */
.adm-copy-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #a8e6cf;
    margin-left: 4px;
}

/* ===== ADMIN — UNVERIFIED TAB ===== */
.adm-unv-section-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #525252;
    margin: 16px 0 8px;
}
.adm-unv-row {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    font-size: 11px;
    color: #d4d4d4;
    border-bottom: 1px solid #1a1a1a;
}
.adm-unv-row:nth-child(even) {
    background: #0d0d0d;
}
.adm-unv-email { flex: 2; min-width: 160px; }
.adm-unv-date { flex: 1; color: #737373; font-size: 10px; }
.adm-unv-age { flex: 0 0 60px; font-family: 'JetBrains Mono', monospace; font-size: 10px; text-align: center; }
.adm-unv-age.urgent { color: #fda4af; }
.adm-unv-age.warning { color: #fdba74; }
.adm-unv-age.ok { color: #a8e6cf; }
.adm-unv-attempt { flex: 1; color: #525252; font-size: 10px; }
.adm-unv-status { flex: 0 0 70px; font-size: 10px; }

/* ===== ADMIN — GEO TAB ===== */
.adm-geo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.adm-geo-section {
    background: #111;
    border: 1px solid #1a1a1a;
    padding: 12px;
}
.adm-geo-section-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #525252;
    margin-bottom: 8px;
}
.adm-geo-city-row {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 3px 0;
    font-size: 11px;
    color: #d4d4d4;
}
.adm-geo-city-name { flex: 1; }
.adm-geo-city-country { color: #525252; font-size: 10px; }
.adm-geo-city-cnt { font-family: 'JetBrains Mono', monospace; color: #7dd3fc; font-size: 10px; }
.adm-geo-devices {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.adm-geo-device {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: #0d0d0d;
    border: 1px solid #1a1a1a;
}
.adm-geo-device-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #d4d4d4;
}
.adm-geo-device-cnt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 600;
}

/* ===== ADMIN — RETENTION HEATMAP ===== */
.adm-ret-table {
    width: 100%;
    border-collapse: collapse;
}
.adm-ret-table th {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #525252;
    padding: 6px 8px;
    text-align: center;
    border-bottom: 1px solid #1a1a1a;
}
.adm-ret-table td {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    padding: 6px 8px;
    text-align: center;
    border-bottom: 1px solid #0d0d0d;
}
.adm-ret-week {
    color: #a3a3a3;
    text-align: left !important;
    white-space: nowrap;
}
.adm-ret-size {
    color: #737373;
}
.adm-ret-cell {
    font-weight: 600;
}

/* ===== ADMIN — FEATURE ADOPTION ===== */
.adm-adopt-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
}
.adm-adopt-label {
    font-size: 10px;
    color: #a3a3a3;
    min-width: 130px;
    font-family: 'JetBrains Mono', monospace;
}
.adm-adopt-track {
    flex: 1;
    height: 12px;
    background: #1a1a1a;
}
.adm-adopt-fill {
    height: 100%;
    transition: width 0.3s;
}
.adm-adopt-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #737373;
    min-width: 35px;
    text-align: right;
}

/* ===== ADMIN — ANOMALY DETECTION ===== */
.adm-anomaly-section {
    margin-bottom: 16px;
}
.adm-anomaly-header {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #525252;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.adm-anomaly-count {
    font-size: 10px;
    padding: 1px 6px;
    background: rgba(253, 164, 175, 0.15);
    color: #fda4af;
}
.adm-anomaly-clear {
    font-size: 10px;
    padding: 1px 6px;
    background: rgba(168, 230, 207, 0.15);
    color: #a8e6cf;
}
.adm-anomaly-icon {
    font-size: 12px;
}
.adm-anomaly-icon.volume { color: #fdba74; }
.adm-anomaly-icon.geo { color: #fda4af; }
.adm-anomaly-icon.burst { color: #c4b5fd; }
.adm-anomaly-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.adm-anomaly-row {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 4px 8px;
    font-size: 11px;
    color: #d4d4d4;
    background: #111;
    border-left: 2px solid transparent;
}
.adm-anomaly-row.volume { border-left-color: #fdba74; }
.adm-anomaly-row.geo { border-left-color: #fda4af; }
.adm-anomaly-row.burst { border-left-color: #c4b5fd; }
.adm-anomaly-email { min-width: 160px; color: #a3a3a3; }
.adm-anomaly-detail { color: #737373; font-size: 10px; }

/* ===== ADMIN — TRACKING COVERAGE ===== */
.adm-tracking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}
.adm-tracking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #111;
    border: 1px solid #1a1a1a;
    font-size: 11px;
}
.adm-tracking-type {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #a3a3a3;
}
.adm-tracking-cnt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: #d4d4d4;
}
.adm-tracking-item.gap {
    border-color: #fda4af33;
    background: rgba(253, 164, 175, 0.05);
}
.adm-tracking-item.gap .adm-tracking-cnt {
    color: #fda4af;
}

/* ===== ADMIN — LEADERBOARD CLICKABLE ===== */
.adm-lb-row {
    cursor: pointer;
    transition: background 0.15s;
}
.adm-lb-row:hover {
    background: #1a1a1a;
}

/* ===== ADMIN DEEP OVERHAUL — LIGHT MODE ===== */
[data-theme="light"] .adm-session-row:hover,
[data-theme="light"] .adm-activity-row:hover,
[data-theme="light"] .adm-lb-row:hover {
    background: #f5f5f5;
}
[data-theme="light"] .adm-session-row.adm-row-expanded {
    background: #f8fafc;
}
[data-theme="light"] .adm-session-detail,
[data-theme="light"] .adm-content-detail {
    background: #f8fafc;
    border-left-color: #38bdf8;
}
[data-theme="light"] .adm-content-detail {
    border-left-color: #8b5cf6;
}
[data-theme="light"] .adm-content-viewer { color: #374151; }
[data-theme="light"] .adm-content-viewer-email { color: #6b7280; }
[data-theme="light"] .adm-content-viewer-time { color: #9ca3af; }
[data-theme="light"] .adm-copy-badge { color: #059669; }
[data-theme="light"] .adm-unv-row { color: #374151; border-bottom-color: #e5e7eb; }
[data-theme="light"] .adm-unv-row:nth-child(even) { background: #f9fafb; }
[data-theme="light"] .adm-unv-email { color: #374151; }
[data-theme="light"] .adm-unv-date { color: #9ca3af; }
[data-theme="light"] .adm-unv-age.urgent { color: #e11d48; }
[data-theme="light"] .adm-unv-age.warning { color: #d97706; }
[data-theme="light"] .adm-unv-age.ok { color: #059669; }
[data-theme="light"] .adm-geo-section { background: #fafafa; border-color: #e5e7eb; }
[data-theme="light"] .adm-geo-section-title { color: #9ca3af; }
[data-theme="light"] .adm-geo-city-row { color: #374151; }
[data-theme="light"] .adm-geo-city-country { color: #9ca3af; }
[data-theme="light"] .adm-geo-city-cnt { color: #0284c7; }
[data-theme="light"] .adm-geo-device { background: #f5f5f5; border-color: #e5e7eb; }
[data-theme="light"] .adm-geo-device-name { color: #374151; }
[data-theme="light"] .adm-ret-table th { color: #9ca3af; border-bottom-color: #e5e7eb; }
[data-theme="light"] .adm-ret-table td { color: #374151; border-bottom-color: #f3f4f6; }
[data-theme="light"] .adm-ret-week { color: #6b7280; }
[data-theme="light"] .adm-ret-size { color: #9ca3af; }
[data-theme="light"] .adm-adopt-label { color: #6b7280; }
[data-theme="light"] .adm-adopt-track { background: #e5e7eb; }
[data-theme="light"] .adm-adopt-val { color: #9ca3af; }
[data-theme="light"] .adm-anomaly-header { color: #9ca3af; }
[data-theme="light"] .adm-anomaly-count { background: rgba(225, 29, 72, 0.1); color: #e11d48; }
[data-theme="light"] .adm-anomaly-clear { background: rgba(5, 150, 105, 0.1); color: #059669; }
[data-theme="light"] .adm-anomaly-row { background: #f9fafb; color: #374151; }
[data-theme="light"] .adm-anomaly-email { color: #6b7280; }
[data-theme="light"] .adm-anomaly-detail { color: #9ca3af; }
[data-theme="light"] .adm-tracking-item { background: #fafafa; border-color: #e5e7eb; }
[data-theme="light"] .adm-tracking-type { color: #6b7280; }
[data-theme="light"] .adm-tracking-cnt { color: #374151; }
[data-theme="light"] .adm-tracking-item.gap { border-color: rgba(225, 29, 72, 0.2); background: rgba(225, 29, 72, 0.03); }
[data-theme="light"] .adm-tracking-item.gap .adm-tracking-cnt { color: #e11d48; }
[data-theme="light"] .adm-unv-section-title { color: #9ca3af; }

/* ===== ADMIN DEEP OVERHAUL — RESPONSIVE ===== */
@media (max-width: 768px) {
    .adm-geo-grid { grid-template-columns: 1fr; }
    .adm-unv-attempt, .adm-unv-status { display: none; }
    .adm-ret-table { font-size: 9px; }
    .adm-ret-table th, .adm-ret-table td { padding: 4px 4px; }
    .adm-anomaly-email { min-width: 100px; }
    .adm-tracking-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

@media (max-width: 480px) {
    .adm-unv-date { display: none; }
    .adm-geo-devices { flex-direction: column; }
    .adm-adopt-label { min-width: 90px; font-size: 9px; }
    .adm-anomaly-detail { display: none; }
    .adm-content-viewer-email { min-width: 100px; }
}

/* ===== VIEW COUNT BADGE ===== */
.threat-row-meta-views {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #525252;
}

[data-theme="light"] .threat-row-meta-views {
    color: #a3a3a3;
}

/* ===== LIBRARY BUTTON ===== */
.library-btn {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #525252;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
}

.library-btn:hover { color: #a8e6cf; }

.library-btn.saved {
    color: #a8e6cf;
}

.library-btn.saved:hover {
    color: #fda4af;
}

/* Detection library save button — ghost style matching [ copy ] */
.det-lib-btn {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #525252;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
}

.det-lib-btn:hover { color: #a8e6cf; }

.det-lib-btn.saved {
    color: #a8e6cf;
}

.det-lib-btn.saved:hover {
    color: #fda4af;
}

[data-theme="light"] .library-btn { color: #999999; }
[data-theme="light"] .library-btn:hover { color: #059669; }
[data-theme="light"] .library-btn.saved { color: #059669; }
[data-theme="light"] .library-btn.saved:hover { color: #e11d48; }

[data-theme="light"] .det-lib-btn { color: #999999; }
[data-theme="light"] .det-lib-btn:hover { color: #059669; }
[data-theme="light"] .det-lib-btn.saved { color: #059669; }
[data-theme="light"] .det-lib-btn.saved:hover { color: #e11d48; }

/* ===== CVE/CWE VULNERABILITY ENRICHMENT (dp-vuln-*) ===== */

/* Clickable indicator rows */
.dp-vuln-clickable { cursor: pointer; transition: background 0.15s; }
.dp-technique-row.dp-vuln-clickable:hover { background: rgba(253, 164, 175, 0.06); }

/* CVE/CWE tag variants */
.dp-tag-cve {
    color: #fda4af;
    background: rgba(253, 164, 175, 0.1);
    cursor: pointer;
}
.dp-tag-cve:hover { background: rgba(253, 164, 175, 0.22); }

.dp-tag-cwe {
    color: #fdba74;
    background: rgba(253, 186, 116, 0.1);
    cursor: pointer;
}
.dp-tag-cwe:hover { background: rgba(253, 186, 116, 0.22); }

/* Accordion card container */
.dp-vuln-card {
    overflow: hidden;
    animation: dp-vuln-slide 0.2s ease-out;
    margin: 4px 0;
}

@keyframes dp-vuln-slide {
    from { max-height: 0; opacity: 0; }
    to { max-height: 600px; opacity: 1; }
}

.dp-vuln-card-inner {
    background: #111111;
    border-left: 2px solid #333333;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
}

.dp-vuln-loading {
    color: #525252;
    font-style: italic;
}

/* Header row */
.dp-vuln-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dp-vuln-id {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: #e5e5e5;
}

.dp-vuln-name {
    font-family: var(--font-body);
    font-size: 12px;
    color: #a0a0a0;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dp-vuln-score {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
}

/* Severity/status badges */
.dp-vuln-badge {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    text-transform: uppercase;
}

.dp-vuln-badge-critical { color: #fda4af; background: rgba(253, 164, 175, 0.15); }
.dp-vuln-badge-high     { color: #fdba74; background: rgba(253, 186, 116, 0.15); }
.dp-vuln-badge-medium   { color: #fde68a; background: rgba(253, 230, 138, 0.15); }
.dp-vuln-badge-low      { color: #a8e6cf; background: rgba(168, 230, 207, 0.15); }
.dp-vuln-badge-none     { color: #525252; background: rgba(82, 82, 82, 0.15); }
.dp-vuln-badge-kev      { color: #fda4af; background: rgba(253, 164, 175, 0.2); }
.dp-vuln-badge-ransomware { color: #f87171; background: rgba(248, 113, 113, 0.2); }
.dp-vuln-badge-patched  { color: #a8e6cf; background: rgba(168, 230, 207, 0.2); }

/* Description */
.dp-vuln-desc {
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 1.5;
    color: #a0a0a0;
}

/* Stats grid */
.dp-vuln-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding: 6px 0;
}

.dp-vuln-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dp-vuln-stat-label {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
    color: #525252;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.dp-vuln-stat-value {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: #d4d4d4;
}

/* Sections */
.dp-vuln-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dp-vuln-section-label {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
    color: #525252;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.dp-vuln-product {
    font-family: var(--font-body);
    font-size: 12px;
    color: #a0a0a0;
    padding: 2px 0;
    line-height: 1.4;
}

/* External links */
.dp-vuln-link {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #7dd3fc;
    text-decoration: none;
    margin-right: 12px;
}
.dp-vuln-link:hover { text-decoration: underline; }

/* Threat ID links inside vuln cards */
.dp-vuln-threat-link {
    cursor: pointer;
    color: #c4b5fd;
    background: rgba(196, 181, 253, 0.1);
}
.dp-vuln-threat-link:hover { background: rgba(196, 181, 253, 0.22); }

/* ===== LIGHT MODE ===== */
[data-theme="light"] .dp-tag-cve { color: #e11d48; background: rgba(225, 29, 72, 0.08); }
[data-theme="light"] .dp-tag-cve:hover { background: rgba(225, 29, 72, 0.16); }
[data-theme="light"] .dp-tag-cwe { color: #d97706; background: rgba(217, 119, 6, 0.08); }
[data-theme="light"] .dp-tag-cwe:hover { background: rgba(217, 119, 6, 0.16); }

[data-theme="light"] .dp-vuln-card-inner {
    background: #f5f5f5;
    border-left-color: #d4d4d4;
}

[data-theme="light"] .dp-vuln-id { color: #1a1a1a; }
[data-theme="light"] .dp-vuln-name { color: #666666; }
[data-theme="light"] .dp-vuln-desc { color: #555555; }
[data-theme="light"] .dp-vuln-stat-label { color: #999999; }
[data-theme="light"] .dp-vuln-stat-value { color: #333333; }
[data-theme="light"] .dp-vuln-section-label { color: #999999; }
[data-theme="light"] .dp-vuln-product { color: #555555; }
[data-theme="light"] .dp-vuln-link { color: #2563eb; }
[data-theme="light"] .dp-vuln-loading { color: #999999; }

[data-theme="light"] .dp-vuln-badge-critical { color: #e11d48; background: rgba(225, 29, 72, 0.1); }
[data-theme="light"] .dp-vuln-badge-high     { color: #d97706; background: rgba(217, 119, 6, 0.1); }
[data-theme="light"] .dp-vuln-badge-medium   { color: #ca8a04; background: rgba(202, 138, 4, 0.1); }
[data-theme="light"] .dp-vuln-badge-low      { color: #059669; background: rgba(5, 150, 105, 0.1); }
[data-theme="light"] .dp-vuln-badge-none     { color: #999999; background: rgba(153, 153, 153, 0.1); }
[data-theme="light"] .dp-vuln-badge-kev      { color: #e11d48; background: rgba(225, 29, 72, 0.12); }
[data-theme="light"] .dp-vuln-badge-ransomware { color: #dc2626; background: rgba(220, 38, 38, 0.12); }
[data-theme="light"] .dp-vuln-badge-patched  { color: #059669; background: rgba(5, 150, 105, 0.12); }

[data-theme="light"] .dp-vuln-threat-link { color: #7c3aed; background: rgba(124, 58, 237, 0.08); }
[data-theme="light"] .dp-vuln-threat-link:hover { background: rgba(124, 58, 237, 0.16); }

[data-theme="light"] .desc-cve-clickable:hover { background: rgba(225, 29, 72, 0.12); }
[data-theme="light"] .desc-cwe { color: #d97706; background: rgba(217, 119, 6, 0.06); }
[data-theme="light"] .desc-cwe-clickable:hover { background: rgba(217, 119, 6, 0.12); }

[data-theme="light"] .dp-technique-row.dp-vuln-clickable:hover { background: rgba(225, 29, 72, 0.04); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .dp-vuln-card-inner { padding: 10px 12px; }
    .dp-vuln-stats { gap: 10px; }
    .dp-vuln-header { gap: 6px; }
    .dp-vuln-name { display: none; }
}

/* ===== Part 3n: Admin tracking metadata + journey timeline ===== */
.adm-timeline-meta, .adm-activity-meta {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #525252;
    background: rgba(82, 82, 82, 0.1);
    padding: 1px 6px;
    margin-left: 4px;
}

.adm-journey-day { margin-bottom: 12px; }
.adm-journey-date {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #525252;
    padding: 4px 0;
    border-bottom: 1px solid #1a1a1a;
    margin-bottom: 6px;
}
.adm-journey-events { position: relative; padding-left: 12px; }
.adm-journey-event {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 3px 0;
    position: relative;
}
.adm-journey-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 3px;
    position: relative;
    z-index: 1;
}
.adm-journey-line {
    position: absolute;
    left: 15px;
    top: 11px;
    bottom: -3px;
    width: 1px;
    background: #1a1a1a;
}
.adm-journey-event:last-child .adm-journey-line { display: none; }
.adm-journey-content { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.adm-journey-desc {
    font-family: var(--font-sans);
    font-size: 12px;
    color: #a0a0a0;
}

.adm-flow-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    margin-bottom: 8px;
    background: rgba(17, 17, 17, 0.5);
    border: 1px solid #1a1a1a;
    overflow-x: auto;
}
.adm-flow-step {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #a0a0a0;
    padding: 1px 4px;
    background: rgba(196, 181, 253, 0.06);
}
.adm-flow-arrow {
    font-size: 10px;
    color: #333;
}

.adm-session-toggle { margin-bottom: 8px; }
.adm-session-expired { opacity: 0.45; }

/* ===== Part 5c: Simulations filter bar ===== */
.sim-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 12px;
    border: 1px solid #1a1a1a;
    background: #111111;
}
.sim-filter-bar input,
.sim-filter-bar select {
    font-family: var(--font-mono);
    font-size: 11px;
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    color: #d4d4d4;
    padding: 4px 8px;
    outline: none;
}
.sim-filter-bar input:focus,
.sim-filter-bar select:focus { border-color: #c4b5fd; }
.sim-filter-bar input { flex: 1; min-width: 120px; }
.sim-filter-results {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #525252;
    margin-left: auto;
}
/* iOS auto-zoom prevention for sim filter bar */
@media (max-width: 768px) {
    .sim-filter-bar input,
    .sim-filter-bar select { font-size: 16px; }
}

/* ===== Part 6c: Nested category nav ===== */
.nav-cat-group { position: relative; }
.nav-item .nav-chevron {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #525252;
    margin-left: auto;
    padding: 0 4px;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s;
}
.nav-item .nav-chevron:hover { color: #a0a0a0; }
.nav-cat-group.expanded > .nav-item .nav-chevron { color: #c4b5fd; }

.nav-sub-group {
    display: none;
    flex-direction: column;
}
.nav-cat-group.expanded > .nav-sub-group { display: flex; }

.nav-sub-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 28px;
    font-size: 12px;
    color: #737373;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
    position: relative;
}
.nav-sub-item::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #1a1a1a;
}
.nav-sub-item:hover { color: #a0a0a0; background: rgba(255, 255, 255, 0.02); }
.nav-sub-item.active { color: #c4b5fd; background: rgba(196, 181, 253, 0.06); }
.nav-sub-item .nav-label { font-size: 11px; }
.nav-sub-item .nav-count { font-size: 10px; color: #525252; }

.nav-sub-dot {
    width: 6px;
    height: 6px;
    background: #333;
    flex-shrink: 0;
}
.nav-sub-item.active .nav-sub-dot { background: #c4b5fd; }

/* ===== Light mode overrides ===== */
[data-theme="light"] .adm-timeline-meta,
[data-theme="light"] .adm-activity-meta {
    color: #737373;
    background: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .adm-journey-date { color: #737373; border-color: #e5e5e5; }
[data-theme="light"] .adm-journey-line { background: #e5e5e5; }
[data-theme="light"] .adm-journey-desc { color: #525252; }
[data-theme="light"] .adm-flow-breadcrumb { background: rgba(0, 0, 0, 0.02); border-color: #e5e5e5; }
[data-theme="light"] .adm-flow-step { color: #525252; background: rgba(196, 181, 253, 0.1); }
[data-theme="light"] .adm-flow-arrow { color: #d4d4d4; }
[data-theme="light"] .sim-filter-bar { background: #fafafa; border-color: #e5e5e5; }
[data-theme="light"] .sim-filter-bar input,
[data-theme="light"] .sim-filter-bar select { background: #fff; border-color: #e5e5e5; color: #262626; }
[data-theme="light"] .nav-item .nav-chevron { color: #a0a0a0; }
[data-theme="light"] .nav-item .nav-chevron:hover { color: #525252; }
[data-theme="light"] .nav-cat-group.expanded > .nav-item .nav-chevron { color: #7c3aed; }
[data-theme="light"] .nav-sub-item { color: #737373; }
[data-theme="light"] .nav-sub-item::before { background: #e5e5e5; }
[data-theme="light"] .nav-sub-item:hover { color: #525252; background: rgba(0, 0, 0, 0.02); }
[data-theme="light"] .nav-sub-item.active { color: #7c3aed; background: rgba(124, 58, 237, 0.06); }
[data-theme="light"] .nav-sub-dot { background: #d4d4d4; }
[data-theme="light"] .nav-sub-item.active .nav-sub-dot { background: #7c3aed; }

/* ===== IOC DNS Enrichment Badges ===== */
.ioc-dns-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10px;
    color: #a8e6cf;
    background: rgba(168, 230, 207, 0.1);
    padding: 1px 5px;
    margin-left: 6px;
    cursor: pointer;
    transition: background 0.15s;
    vertical-align: middle;
}
.ioc-dns-badge:hover { background: rgba(168, 230, 207, 0.25); }
.ioc-dns-panel {
    background: #0d0d0d;
    border: 1px solid #1a1a1a;
    border-left: 2px solid #a8e6cf;
    margin: 4px 0 8px 20px;
    padding: 8px 12px;
    font-family: var(--font-mono);
    font-size: 11px;
}
.ioc-dns-panel-header {
    color: #666;
    font-size: 10px;
    margin-bottom: 6px;
    text-transform: lowercase;
}
.ioc-dns-domain-list { max-height: 200px; overflow-y: auto; }
.ioc-dns-domain {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
    color: #a0a0a0;
}
.ioc-dns-domain-name { color: #fde68a; }
.ioc-dns-domain-type {
    font-size: 9px;
    color: #555;
    background: #1a1a1a;
    padding: 0 4px;
}
.ioc-dns-crosslink {
    padding: 2px 0;
    color: #a0a0a0;
}
.ioc-dns-crosslink-threat {
    color: #c4b5fd;
    margin-right: 4px;
}
.ioc-dns-fastflux {
    color: #fdba74;
    background: rgba(253, 186, 116, 0.08);
    padding: 4px 8px;
    margin-bottom: 6px;
    font-size: 10px;
}
.ioc-dns-empty {
    color: #555;
    padding: 8px 12px;
    font-size: 11px;
    font-family: var(--font-mono);
}

/* Light mode overrides */
[data-theme="light"] .ioc-dns-badge { color: #059669; background: rgba(5, 150, 105, 0.08); }
[data-theme="light"] .ioc-dns-badge:hover { background: rgba(5, 150, 105, 0.15); }
[data-theme="light"] .ioc-dns-panel { background: #fafafa; border-color: #e5e5e5; border-left-color: #059669; }
[data-theme="light"] .ioc-dns-panel-header { color: #999; }
[data-theme="light"] .ioc-dns-domain { color: #525252; }
[data-theme="light"] .ioc-dns-domain-name { color: #92400e; }
[data-theme="light"] .ioc-dns-domain-type { color: #999; background: #f0f0f0; }
[data-theme="light"] .ioc-dns-crosslink { color: #525252; }
[data-theme="light"] .ioc-dns-crosslink-threat { color: #7c3aed; }
[data-theme="light"] .ioc-dns-fastflux { color: #c2410c; background: rgba(194, 65, 12, 0.06); }
[data-theme="light"] .ioc-dns-empty { color: #999; }

/* ===== SHARED VIEW — Platform-matched detail panel ===== */
.sv-wrap { min-height: 100vh; display: flex; flex-direction: column; }

/* Nav */
.sv-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 100;
}
.sv-nav-brand { display: flex; align-items: center; gap: 6px; }
.sv-logo { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--accent-purple); }
.sv-logo-sub { font-family: var(--font-mono); font-size: 11px; color: var(--accent-purple); }
.sv-badge { font-family: var(--font-mono); font-size: 10px; color: #737373; border: 1px solid #333; padding: 2px 8px; margin-left: 8px; }
.sv-nav-right { display: flex; align-items: center; gap: 16px; }
.sv-expiry { font-family: var(--font-mono); font-size: 10px; color: #525252; }
.sv-nav-link { font-family: var(--font-mono); font-size: 11px; color: #737373; text-decoration: none; }
.sv-nav-link:hover { color: var(--accent-purple); }
.sv-theme-btn {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #737373;
    background: none;
    border: 1px solid #333;
    padding: 4px 12px;
    cursor: pointer;
}
.sv-theme-btn:hover { color: var(--accent-purple); border-color: var(--accent-purple); }

/* Shared detail panel overrides */
.shared-detail-panel {
    position: static !important;
    max-width: 900px;
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
    margin: 0 auto;
    width: 100%;
    border: none;
    height: auto;
    overflow: visible;
    background: var(--bg-primary);
    flex: 1;
}
.shared-detail-panel .dp-header { padding: 24px 32px; }
.shared-detail-panel .dp-tabs { position: static; }
.shared-detail-panel .detail-content { padding: 0 32px 32px; overflow: visible !important; height: auto !important; max-height: none !important; flex: none; }
.sv-tab-content { display: none; }
.sv-tab-content.sv-tab-active { display: block; }

/* Footer CTA */
.sv-footer {
    text-align: center;
    padding: 40px 24px;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface);
}
.sv-footer-text {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #525252;
    margin-bottom: 20px;
    line-height: 1.6;
}
.sv-footer-btns { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.sv-cta {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent-purple);
    border: 1px solid var(--accent-purple);
    padding: 10px 24px;
    text-decoration: none;
    transition: all 0.15s;
}
.sv-cta:hover { background: rgba(196, 181, 253, 0.1); }
.sv-cta-sec {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #737373;
    border: 1px solid #333;
    padding: 10px 24px;
    text-decoration: none;
}
.sv-cta-sec:hover { color: var(--text-primary); border-color: #555; }

/* IOC row styles for shared view */
.sv-ioc-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 12px;
    font-family: var(--font-mono);
    font-size: 11px;
}
.sv-ioc-row:nth-child(odd) { background: var(--bg-secondary); }
.sv-ioc-row:nth-child(even) { background: var(--bg-surface-alt); }
.sv-ioc-type-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    flex-shrink: 0;
}
.sv-ioc-value { color: #a0a0a0; word-break: break-all; flex: 1; min-width: 0; }
.sv-ioc-ctx { color: #525252; font-size: 10px; max-width: 200px; flex-shrink: 0; }

/* Desc list item arrow */
.desc-list-item { padding-left: 16px; position: relative; }
.desc-list-item::before { content: none; }

/* Responsive */
@media (max-width: 640px) {
    .sv-nav { padding: 10px 16px; }
    .sv-nav-right { gap: 8px; }
    .sv-expiry { display: none; }
    .shared-detail-panel .dp-header { padding: 16px; }
    .shared-detail-panel .dp-tabs { padding: 0 16px; }
    .shared-detail-panel .dp-overview { padding: 16px; }
    .shared-detail-panel .dp-det-content { padding: 16px; }
    .sv-footer { padding: 24px 16px; }
    .sv-ioc-ctx { display: none; }
}

/* Light mode overrides for shared view */
[data-theme="light"] .sv-wrap { background: #fafafa; }
[data-theme="light"] .sv-nav { background: #fff; border-bottom-color: #e5e5e5; }
[data-theme="light"] .sv-logo { color: #7c3aed; }
[data-theme="light"] .sv-logo-sub { color: #7c3aed; }
[data-theme="light"] .sv-badge { color: #737373; border-color: #d4d4d4; }
[data-theme="light"] .sv-expiry { color: #999; }
[data-theme="light"] .sv-nav-link { color: #737373; }
[data-theme="light"] .sv-nav-link:hover { color: #7c3aed; }
[data-theme="light"] .sv-theme-btn { color: #737373; border-color: #d4d4d4; }
[data-theme="light"] .sv-theme-btn:hover { color: #7c3aed; border-color: #7c3aed; }
[data-theme="light"] .shared-detail-panel { background: #fff; }
[data-theme="light"] .sv-footer { background: #f5f5f5; border-top-color: #e5e5e5; }
[data-theme="light"] .sv-footer-text { color: #737373; }
[data-theme="light"] .sv-cta { color: #7c3aed; border-color: #7c3aed; }
[data-theme="light"] .sv-cta:hover { background: rgba(124, 58, 237, 0.08); }
[data-theme="light"] .sv-cta-sec { color: #737373; border-color: #d4d4d4; }
[data-theme="light"] .sv-cta-sec:hover { color: #333; border-color: #999; }
[data-theme="light"] .sv-ioc-row:nth-child(odd) { background: #f5f5f5; }
[data-theme="light"] .sv-ioc-row:nth-child(even) { background: #fafafa; }
[data-theme="light"] .sv-ioc-value { color: #525252; }
[data-theme="light"] .sv-ioc-ctx { color: #999; }
