/* Geist Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

@font-face {
    font-family: 'Geist';
    src: url('https://cdn.jsdelivr.net/npm/geist@1.3.0/dist/fonts/geist-sans/Geist-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geist';
    src: url('https://cdn.jsdelivr.net/npm/geist@1.3.0/dist/fonts/geist-sans/Geist-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geist';
    src: url('https://cdn.jsdelivr.net/npm/geist@1.3.0/dist/fonts/geist-sans/Geist-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geist';
    src: url('https://cdn.jsdelivr.net/npm/geist@1.3.0/dist/fonts/geist-sans/Geist-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Lucerna Design Tokens - Rufilla Brand */
:root {
    /* Primary Colors - Rufilla Brand */
    --color-primary: #DB3512;
    --color-primary-hover: #b82c0f;
    --color-primary-light: #fde8e4;
    
    /* Secondary/Accent - Rufilla Purple */
    --color-accent: #764AB7;
    --color-accent-hover: #5f3a94;
    --color-accent-light: #ebe4f4;
    
    /* Brand Colors */
    --color-brand-red: #DB3512;
    --color-brand-black: #131313;
    --color-brand-purple: #764AB7;
    --color-brand-gray: #ECECEC;
    
    /* Neutral Colors */
    --color-gray-50: #fafafa;
    --color-gray-100: #f5f5f5;
    --color-gray-200: #ECECEC;
    --color-gray-300: #d4d4d4;
    --color-gray-400: #a3a3a3;
    --color-gray-500: #737373;
    --color-gray-600: #525252;
    --color-gray-700: #404040;
    --color-gray-800: #262626;
    --color-gray-900: #131313;
    
    /* Status Colors */
    --color-success: #10b981;
    --color-success-dark: #065f46;
    --color-warning: #f59e0b;
    --color-warning-dark: #92400e;
    --color-danger: #dc2626;
    --color-danger-dark: #991b1b;
    --color-danger-hover: #b91c1c;
    --color-info: #764AB7;
    --color-info-dark: #5f3a94;
    /* Status Backgrounds */
    --color-success-light: #d1fae5;
    --color-warning-light: #fef3c7;
    --color-danger-light: #fee2e2;
    --color-info-light: #ebe4f4;
    --color-info-lighter: #f5f0fa;
    
    /* UI Colors */
    --color-white: #ffffff;
    --color-white-translucent: rgba(255, 255, 255, 0.3);
    --color-overlay: rgba(19, 19, 19, 0.5);
    --color-gray-light: #a3a3a3;
    --color-black: #131313;
    
    /* Letter Spacing */
    --letter-spacing-tight: 0.5px;
    --letter-spacing-wide: 1px;
    
    /* Typography - Geist Font Family */
    --font-base: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    
    /* Sizes */
    --size-icon: 40px;
    --size-spinner: 14px;
    --size-stat-icon: 60px;
    --size-close-icon: 28px;
    --size-auth-offset: 200px;
    
    /* Min Widths */
    --min-width-form-control: 300px;
    --min-width-card: 180px;
    --min-width-card-grid: 300px;
    
    /* Max Widths */
    --max-width-container: 2400px;
    --max-width-form: 800px;
    --max-width-modal: 500px;
    --max-width-auth: 450px;
    --max-width-logo: 200px;
    --max-width-content: 300px;
    
    /* Borders */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --border-width-xs: 1px;
    --border-width-sm: 2px;
    --border-width-md: 3px;
    --border-width-lg: 4px;
    
    /* Breakpoints */
    --breakpoint-form-row: 200px;
    --breakpoint-mobile: 768px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 10px 15px rgba(0, 0, 0, 0.1);
}

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

html {
    overflow-y: scroll;
}

html.has-sidebar {
    overflow: hidden;
    height: 100vh;
}

body {
    font-family: var(--font-base);
    line-height: 1.6;
    color: var(--color-gray-900);
    background-color: var(--color-gray-50);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.has-sidebar {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.navbar {
    background-color: var(--color-white);
    color: var(--color-gray-900);
    padding: var(--space-4) 0;
    box-shadow: var(--shadow-md);
    border-bottom: var(--border-width-xs) solid var(--color-gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    width: 90%;
    max-width: var(--max-width-container);
    margin: 0 auto;
    padding: 0 var(--space-8);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.nav-brand-link {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
    cursor: pointer;
}

.nav-brand-link:hover {
    opacity: 0.8;
}

.nav-logo {
    height: var(--size-icon);
    width: auto;
}

.nav-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-lucerna {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: var(--letter-spacing-tight);
}

.brand-subtitle {
    font-size: var(--text-xs);
    color: var(--color-gray-600);
    font-weight: 400;
}

.nav-menu {
    display: flex;
    gap: var(--space-6);
    align-items: center;
}

.nav-link {
    color: var(--color-gray-700);
    text-decoration: none;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    transition: all 0.3s;
    font-weight: 500;
}

.nav-link:hover {
    background-color: var(--color-gray-100);
    color: var(--color-primary);
}

.nav-logout {
    background-color: var(--color-danger);
    color: var(--color-white);
}

.nav-logout:hover {
    background-color: var(--color-danger-hover);
    color: var(--color-white);
}

.nav-user-link {
    text-decoration: none;
    transition: all 0.3s;
}

.nav-user-link:hover .nav-user {
    background-color: var(--color-gray-200);
    color: var(--color-primary);
}

.nav-user {
    color: var(--color-gray-700);
    padding: var(--space-2) var(--space-4);
    background-color: var(--color-gray-100);
    border-radius: var(--radius-sm);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
}

.nav-user::before {
    content: "👤";
    font-size: var(--text-lg);
}

/* Container */
.container {
    width: 90%;
    max-width: var(--max-width-container);
    margin: var(--space-8) auto;
    padding: 0 var(--space-8);
    flex: 1;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.dashboard-subtitle {
    color: var(--color-gray-600);
    font-size: var(--text-base);
}

/* CVE Trend Chart Container */
.cve-trend-chart-container {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}

.cve-trend-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
}

.cve-trend-chart-header h3 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-gray-700);
    margin: 0;
}

.cve-trend-chart-subtitle {
    font-size: var(--text-xs);
    color: var(--color-gray-500);
}

.cve-trend-chart-wrapper {
    height: 220px;
    position: relative;
}

/* Scan Info Section - Metadata on left, compact tiles on right */
.scan-info-section {
    display: flex;
    gap: var(--space-5);
    align-items: flex-start;
    margin-bottom: var(--space-4);
}

.scan-metadata-card {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    flex-shrink: 0;
}

.meta-table {
    border-collapse: separate;
    border-spacing: 16px 4px;
}

.meta-table td {
    padding: 0;
    vertical-align: top;
}

.meta-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-gray-900);
    white-space: nowrap;
    text-align: right;
}

.meta-label::after {
    content: ":";
}

.meta-value {
    font-size: 0.9375rem;
    font-weight: 400;
    color: #6b7280;
}

/* Filter pills - compact horizontal badges */
.filter-grid-compact {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
    align-content: center;
    height: 100%;
}

.filter-tile-sm {
    background: #f8f9fa;
    border: 2px solid var(--color-gray-200);
    border-radius: 20px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    text-decoration: none;
    color: inherit;
    min-width: 60px;
}

.filter-tile-sm:hover {
    background: #f3f4f6;
    border-color: var(--color-gray-300);
}

.filter-tile-sm.filter-tile-active {
    background: var(--color-white);
    border-color: var(--color-gray-400);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-tile-sm .filter-tile-number {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-gray-900);
    line-height: 1.2;
}

.filter-tile-sm .filter-tile-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--color-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Pill accent colors - colored dot indicator */
.filter-tile-sm::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-gray-300);
    position: absolute;
    top: 6px;
    left: 6px;
    display: none;
}

/* Pill colors matching chart legend */
.filter-tile-sm[data-filter="total"] { border-color: #6b7280; }
.filter-tile-sm[data-filter="untriaged"] { border-color: #d97706; }
.filter-tile-sm[data-filter="unpatched"] { border-color: #dc2626; }
.filter-tile-sm[data-filter="patched"] { border-color: #059669; }
.filter-tile-sm[data-filter="triaged"] { border-color: #7c3aed; }

/* Severity scorecard container */
.severity-scorecard-container {
    margin-bottom: var(--space-4);
}

.severity-scorecard-container .stat-card-scorecard {
    max-width: none;
    width: 100%;
}

/* Dashboard 2-column row layout */
.dashboard-row-two-col {
    display: grid;
    grid-template-columns: minmax(280px, 320px) 1fr;
    gap: var(--space-4);
    align-items: stretch;
    margin-bottom: var(--space-4);
}

.dashboard-row-two-col .scan-metadata-card {
    margin-bottom: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.dashboard-row-two-col .cve-trend-chart-inline {
    margin-bottom: 0;
    min-height: 240px;
}

.dashboard-row-two-col .cve-trend-chart-inline .cve-trend-chart-wrapper {
    height: 200px;
}

/* View Mode Bar with Filter Tags */
.view-mode-bar {
    margin: var(--space-3) 0;
    padding: var(--space-2) var(--space-3);
    background-color: #f8f9fa;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-gray-200);
}

/* Filter Tags - compact colored pills */
.filter-tags {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-left: auto;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.filter-tag-count {
    font-weight: 600;
}

/* Individual tag colors - muted palette */
.filter-tag-total {
    background-color: #e5e7eb;
    color: #374151;
}
.filter-tag-total:hover, .filter-tag-total.filter-tag-active {
    background-color: #6b7280;
    color: white;
}

.filter-tag-open,
.filter-tag-untriaged {
    background-color: #fef3c7;
    color: #92400e;
}
.filter-tag-open:hover, .filter-tag-open.filter-tag-active,
.filter-tag-untriaged:hover, .filter-tag-untriaged.filter-tag-active {
    background-color: #f59e0b;
    color: white;
}

.filter-tag-unpatched {
    background-color: #fee2e2;
    color: #991b1b;
}
.filter-tag-unpatched:hover, .filter-tag-unpatched.filter-tag-active {
    background-color: #dc2626;
    color: white;
}

.filter-tag-patched {
    background-color: #d1fae5;
    color: #065f46;
}
.filter-tag-patched:hover, .filter-tag-patched.filter-tag-active {
    background-color: #059669;
    color: white;
}

.filter-tag-ignored {
    background-color: #fef3c7;
    color: #92400e;
}
.filter-tag-ignored:hover, .filter-tag-ignored.filter-tag-active {
    background-color: #f59e0b;
    color: white;
}

.filter-tag-triaged {
    background-color: #ede9fe;
    color: #5b21b6;
}
.filter-tag-triaged:hover, .filter-tag-triaged.filter-tag-active {
    background-color: #7c3aed;
    color: white;
}

/* Full-width trend chart */
.cve-trend-chart-fullwidth {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    margin-bottom: var(--space-4);
}

.cve-trend-chart-fullwidth .cve-trend-chart-wrapper {
    height: 180px;
}

.severity-scorecard-inline {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-3);
}

.severity-scorecard-inline .severity-breakdown h3 {
    font-size: var(--text-sm);
    margin-bottom: var(--space-2);
}

/* Responsive: stack columns on smaller screens */
@media (max-width: 900px) {
    .dashboard-row-two-col {
        grid-template-columns: 1fr;
    }
    
    .dashboard-row-filters {
        grid-template-columns: 1fr;
    }
    
    .filter-pills-vertical {
        grid-template-columns: repeat(5, 1fr);
        grid-template-rows: auto;
    }
}

/* Filter and Scorecard Row Layout - Using CSS Grid */
.filter-scorecard-row {
    display: grid;
    grid-template-columns: minmax(400px, 500px) 1fr;
    gap: var(--space-6);
    align-items: start;
    margin-bottom: var(--space-4);
}

/* Filter Grid tile layout - all 5 tiles in one row */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-2);
    margin: 0;
    padding: 0;
}

/* Scorecard in row layout */
.stat-card.stat-card-scorecard {
    min-width: 0;
    max-width: none;
    padding: var(--space-4);
    align-items: flex-start;
    display: block;
    margin: 0;
}

/* Muted filter tiles with subtle left border accent */
.filter-tile {
    background: #f8f9fa;
    border: 1px solid var(--color-gray-200);
    border-left: 4px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    text-decoration: none;
    color: inherit;
}

.filter-tile:hover {
    background: #f3f4f6;
    border-color: var(--color-gray-300);
    box-shadow: var(--shadow-sm);
}

.filter-tile-active {
    background: #f3f4f6;
    border-color: var(--color-gray-400);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.filter-tile-number {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-gray-900);
}

.filter-tile-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-gray-500);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-tight);
}

/* Muted tile colors - subtle left border accent only */
.filter-tile[data-filter="total"] {
    border-left-color: #6b7280;
}

.filter-tile[data-filter="untriaged"] {
    border-left-color: #d97706;
}

.filter-tile[data-filter="unpatched"] {
    border-left-color: #dc2626;
}

.filter-tile[data-filter="patched"] {
    border-left-color: #059669;
}

.filter-tile[data-filter="triaged"] {
    border-left-color: #7c3aed;
}

/* Active state - darker left border */
.filter-tile[data-filter="total"].filter-tile-active {
    border-left-color: #374151;
}

.filter-tile[data-filter="untriaged"].filter-tile-active {
    border-left-color: #b45309;
}

.filter-tile[data-filter="unpatched"].filter-tile-active {
    border-left-color: #b91c1c;
}

.filter-tile[data-filter="patched"].filter-tile-active {
    border-left-color: #047857;
}

.filter-tile[data-filter="triaged"].filter-tile-active {
    border-left-color: #6d28d9;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--min-width-card), 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-10);
}

.stat-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    box-shadow: var(--shadow-md);
    display: flex;
    gap: var(--space-3);
    align-items: center;
    transition: all 0.3s;
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
}

.stat-card-wide {
    grid-column: span 2;
}

.stat-card-filter {
    transition: all 0.2s ease;
}

.stat-card-filter:hover {
    border-left-color: var(--color-primary);
}

.stat-icon {
    font-size: var(--text-2xl);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.stat-icon-total {
    background-color: var(--color-info-light);
}

.stat-icon-critical {
    background-color: var(--color-danger-light);
}

.stat-icon-triaged {
    background-color: var(--color-success-light);
}

.stat-icon-ignored {
    background-color: var(--color-gray-100);
}

.stat-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-content h3 {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--color-gray-600);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-number {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 0;
    line-height: 1.2;
}

.stat-label {
    font-size: var(--text-xs);
    color: var(--color-gray-400);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Alerts */
.alert {
    padding: var(--space-4);
    margin-bottom: var(--space-4);
    border-radius: var(--radius-md);
    border-left: var(--border-width-lg) solid;
}

.alert-success {
    background-color: var(--color-success-light);
    border-color: var(--color-success);
    color: var(--color-success-dark);
}

.alert-error {
    background-color: var(--color-danger-light);
    border-color: var(--color-danger);
    color: var(--color-danger-dark);
}

.alert-info {
    background-color: var(--color-info-light);
    border-color: var(--color-info);
    color: var(--color-info-dark);
}

/* Cards */
.card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--space-8);
    margin-bottom: var(--space-8);
    box-shadow: var(--shadow-md);
}

.card h2 {
    margin-bottom: var(--space-6);
    color: var(--color-gray-900);
    font-size: var(--text-2xl);
}

/* Auth Container */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - var(--size-auth-offset));
}

.auth-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-12);
    width: 100%;
    max-width: var(--max-width-auth);
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    text-align: center;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: var(--space-2);
    color: var(--color-primary);
    font-size: var(--text-3xl);
    font-weight: 700;
}

.auth-card p {
    text-align: center;
    margin-bottom: var(--space-6);
    color: var(--color-gray-600);
}

.auth-subtitle {
    text-align: center;
    margin-bottom: var(--space-8);
    color: var(--color-gray-600);
}

.auth-card form {
    text-align: center;
}

.auth-card form .form-group {
    text-align: left;
}

.auth-links {
    margin-top: var(--space-6);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.auth-links a {
    color: var(--color-primary);
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Utility Classes */
.section-intro {
    margin-bottom: var(--space-4);
}

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

.flex-row {
    display: flex;
    gap: var(--space-5);
    margin-bottom: var(--space-5);
}

.flex-1 {
    flex: 1;
}

.form-container {
    max-width: var(--max-width-form);
    margin: 0 auto;
}

.auth-logo-image {
    max-width: var(--max-width-logo);
    margin-bottom: var(--space-6);
}

.section-title-new {
    color: var(--color-warning);
}

.section-title-fixed {
    color: var(--color-success);
}

.section-title-regressed {
    color: var(--color-danger);
}

.section-title-unchanged {
    color: var(--color-gray-600);
}

.summary-cursor {
    cursor: pointer;
    font-weight: bold;
    padding: var(--space-3);
}

.max-w-300 {
    max-width: var(--max-width-content);
}

.info-banner {
    margin-top: var(--space-5);
    padding: var(--space-3);
    background-color: var(--color-info-lighter);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-info);
    font-weight: bold;
}

/* Spacing Utilities */
.u-mt-1 { margin-top: var(--space-1); }
.u-mt-2 { margin-top: var(--space-2); }
.u-mt-3 { margin-top: var(--space-3); }
.u-mt-4 { margin-top: var(--space-4); }
.u-mt-5 { margin-top: var(--space-5); }
.u-mt-6 { margin-top: var(--space-6); }

/* Visibility */
.is-hidden {
    display: none;
}

.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Inline Modal */
.inline-modal {
    margin-top: var(--space-5);
    padding: var(--space-5);
    background: var(--color-gray-100);
    border-radius: var(--radius-md);
}

.inline-modal h3 {
    margin-bottom: var(--space-4);
    color: var(--color-gray-900);
}

/* Checkbox Items */
.checkbox-item {
    margin-bottom: var(--space-2);
}

.checkbox-item input[type="checkbox"] {
    margin-right: var(--space-2);
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: var(--size-spinner);
    height: var(--size-spinner);
    border: var(--border-width-sm) solid var(--color-white-translucent);
    border-top: var(--border-width-sm) solid var(--color-white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Forms */
.form-group {
    margin-bottom: var(--space-6);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--color-gray-900);
}

.form-control {
    width: 100%;
    padding: var(--space-3);
    border: var(--border-width-xs) solid var(--color-gray-300);
    border-radius: var(--radius-sm);
    font-size: var(--text-base);
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-group small {
    display: block;
    margin-top: var(--space-1);
    color: var(--color-gray-600);
    font-size: var(--text-sm);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--breakpoint-form-row), 1fr));
    gap: var(--space-4);
    align-items: end;
}

/* Buttons */
.btn {
    padding: var(--space-3) var(--space-6);
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--text-base);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #DB3512 0%, #b82c0f 100%);
    color: var(--color-white);
    border: var(--border-width-sm) solid transparent;
    box-shadow: 0 2px 4px rgba(219, 53, 18, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(219, 53, 18, 0.35);
    background: linear-gradient(135deg, #c42f10 0%, #a0260d 100%);
}

.btn-secondary {
    background-color: var(--color-gray-400);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: var(--color-gray-600);
}

.btn-danger {
    background-color: var(--color-danger);
    color: var(--color-white);
}

.btn-danger:hover {
    background-color: var(--color-danger-hover);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
}

.btn-action {
    padding: 8px 16px;
    font-size: 13px;
    min-width: 180px;
    height: 36px;
    line-height: 18px;
    box-sizing: border-box;
}

.btn-back {
    background-color: var(--color-gray-100);
    color: var(--color-gray-700);
    border: 1px solid var(--color-gray-300);
}

.btn-back:hover {
    background-color: var(--color-gray-200);
    color: var(--color-gray-800);
    border-color: var(--color-gray-400);
}

/* Dashboard */
.dashboard,
.dashboard-container {
    padding: var(--space-2) 0;
}

.dashboard h1,
.dashboard-container h1 {
    margin-bottom: var(--space-8);
    color: var(--color-gray-900);
    font-size: var(--text-3xl);
}

/* Override for dashboard-header h1 specifically */
.dashboard-header h1 {
    font-size: 1.1rem;
    margin-bottom: 0;
    font-weight: 600;
}

.dashboard h2 {
    margin-bottom: var(--space-6);
    color: var(--color-gray-900);
    font-size: 1.1rem;
    font-weight: 600;
}

.dashboard-section {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--space-8);
    margin-bottom: var(--space-8);
    box-shadow: var(--shadow-md);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table,
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--space-6);
}

.table th,
.table td,
.data-table th,
.data-table td {
    padding: var(--space-4) var(--space-5);
    text-align: left;
    border-bottom: var(--border-width-xs) solid var(--color-gray-200);
    font-size: var(--text-base);
}

.table th,
.data-table th {
    background-color: var(--color-gray-100);
    font-weight: 600;
    color: var(--color-gray-900);
}

.table tbody tr:hover,
.data-table tbody tr:hover {
    background-color: var(--color-gray-100);
}

/* Clickable table rows */
.clickable-row {
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.clickable-row:hover {
    background-color: var(--color-primary-light) !important;
}

/* Row links for accessibility */
.row-link {
    color: inherit;
    text-decoration: none;
    display: block;
    width: 100%;
}

.row-link:hover {
    text-decoration: none;
    color: inherit;
}

.row-link:focus {
    outline: none;
}

.clickable-row:focus-within {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}

/* Top Progress Bar (YouTube/GitHub style) */
.top-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), #f97316, var(--color-primary));
    background-size: 200% 100%;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 0 10px var(--color-primary), 0 0 5px var(--color-primary);
}

.top-progress-bar.active {
    opacity: 1;
    width: 100%;
    animation: progressShimmer 1s linear infinite;
}

.top-progress-bar.complete {
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Badges */
.badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 500;
}

.badge-admin {
    background-color: var(--color-danger);
    color: var(--color-white);
}

.badge-user {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.badge-viewer {
    background-color: var(--color-gray-400);
    color: var(--color-white);
}

.badge-success {
    background-color: var(--color-success);
    color: var(--color-white);
}

.badge-error {
    background-color: var(--color-danger);
    color: var(--color-white);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: var(--color-overlay);
}

.modal-content {
    background-color: var(--color-white);
    margin: 5% auto;
    padding: var(--space-8);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: var(--max-width-modal);
}

.close {
    color: var(--color-gray-light);
    float: right;
    font-size: var(--size-close-icon);
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: var(--color-black);
}

/* Footer */
.footer {
    background-color: var(--color-brand-black);
    color: var(--color-gray-300);
    text-align: center;
    padding: var(--space-3) var(--space-4);
    margin-top: auto;
    border-top: none;
    font-size: var(--text-sm);
}

.footer a {
    color: var(--color-primary);
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

.text-muted {
    color: var(--color-gray-600);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--min-width-card-grid), 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.card-grid .card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    margin-bottom: 0;
}

.card-grid .card h3 {
    color: var(--color-gray-900);
    margin-bottom: var(--space-2);
}

.card-grid .card p {
    color: var(--color-gray-600);
    margin-bottom: var(--space-2);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

.info-item {
    padding: var(--space-4);
    background: var(--color-gray-100);
    border-radius: var(--radius-sm);
    border-left: var(--border-width-md) solid var(--color-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.info-item strong {
    display: block;
    margin-bottom: var(--space-1);
    color: var(--color-gray-900);
}

/* Inline Forms */
.inline-form {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    margin-bottom: var(--space-4);
}

.inline-form .form-control {
    flex: 1;
    margin-bottom: 0;
    min-width: var(--min-width-form-control);
}

.inline-form .btn {
    margin-top: 0;
    width: auto;
    white-space: nowrap;
}

/* Alert Warning */
.alert-warning {
    background-color: var(--color-warning-light);
    border-color: var(--color-warning);
    color: var(--color-warning-dark);
}

/* Severity Breakdown Card */
.severity-breakdown {
    padding: 0;
}

/* Align scorecard content with filter tiles */
.stat-card-scorecard .severity-breakdown {
    padding-top: 0;
}

.severity-breakdown h3 {
    font-size: var(--text-sm);
    margin-top: 0;
    margin-bottom: var(--space-3);
    color: var(--color-gray-900);
    font-weight: 600;
}

.severity-header {
    display: grid;
    grid-template-columns: 8px 140px 1fr 60px 70px 60px 60px 70px 70px 70px;
    gap: var(--space-2);
    align-items: center;
    margin-bottom: var(--space-1);
    padding: 0 var(--space-2) var(--space-1);
    border-bottom: 1px solid var(--color-gray-200);
}

.severity-header-no-packages {
    grid-template-columns: 8px minmax(120px, auto) 1fr 60px 70px 60px 60px 70px;
}

.severity-header-spacer {
    grid-column: 1 / 4;
}

.severity-header-label {
    text-align: right;
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--color-gray-600);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-tight);
}

.severity-header-label-total {
    font-weight: 600;
    color: var(--color-gray-900);
}

.severity-item {
    display: grid;
    grid-template-columns: 8px 140px 1fr 60px 70px 60px 60px 70px 70px 70px;
    gap: var(--space-2);
    align-items: center;
    margin-bottom: var(--space-2);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
    position: relative;
    z-index: 0;
}
.severity-item-active::before {
    content: "";
    position: absolute;

    /* tuned to match your design tokens */
    top: -2px;
    bottom: -2px;
    left: -6px;
    right: -6px;

    background-color: #f0f8ff;
    border-radius: calc(var(--radius-md) + 2px);
    z-index: -1;
}
.severity-item-no-packages {
    grid-template-columns: 8px minmax(120px, auto) 1fr 60px 70px 60px 60px 70px;
}

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

.severity-item-active {
    background-color: #f0f8ff;
}

.severity-item-clickable:hover {
    background-color: #f5f5f5;
}

.severity-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

.severity-dot-critical {
    background-color: #dc2626;
}

.severity-dot-high {
    background-color: #f59e0b;
}

.severity-dot-medium {
    background-color: #eab308;
}

.severity-dot-low {
    background-color: #3b82f6;
}

.severity-label {
    min-width: 60px;
    font-size: var(--text-xs);
    color: var(--color-gray-700);
    white-space: nowrap;
}

.severity-range {
    font-size: 10px;
    color: var(--color-gray-500);
    font-weight: 400;
    white-space: nowrap;
}

.severity-bar-container {
    height: 8px;
    background-color: var(--color-gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
    min-width: 0;
}

.severity-bar {
    height: 100%;
    border-radius: var(--radius-sm);
}

.severity-bar-critical {
    background-color: #ef4444;
    opacity: 0.75;
}

.severity-bar-high {
    background-color: #f59e0b;
    opacity: 0.7;
}

.severity-bar-medium {
    background-color: #fbbf24;
    opacity: 0.65;
}

.severity-bar-low {
    background-color: #60a5fa;
    opacity: 0.6;
}

.severity-count {
    min-width: 30px;
    text-align: right;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-gray-900);
}

.severity-packages,
.severity-unpatched,
.severity-patched,
.severity-open,
.severity-accepted,
.severity-ignored {
    min-width: 30px;
    text-align: right;
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--color-gray-600);
}

/* Responsive */
@media (max-width: 900px) {
    .filter-scorecard-row {
        grid-template-columns: 1fr;
    }
    
    .filter-grid {
        width: 100%;
        max-width: 400px;
    }
    
    .stat-card-scorecard {
        min-width: unset;
        width: 100%;
    }
    
    .cve-trend-chart-wrapper {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: var(--space-4);
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .table {
        font-size: var(--text-sm);
    }
    
    .table th,
    .table td {
        padding: var(--space-2);
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .inline-form {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Sortable Table Headers */
.sortable-header {
    padding: 0 !important;
}

.sortable-header a.sort-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    color: var(--color-gray-900);
    text-decoration: none;
    font-weight: 600;
    width: 100%;
    transition: background-color 0.2s ease;
}

.sortable-header a.sort-link:hover {
    background-color: var(--color-gray-100);
    cursor: pointer;
}

.sort-arrow {
    margin-left: 8px;
    font-size: 12px;
    color: var(--color-primary);
    font-weight: bold;
}

.filter-indicator {
    margin-left: 8px;
    font-size: 11px;
    color: var(--color-primary);
    font-weight: 600;
    background-color: var(--color-primary-light);
    padding: 2px 6px;
    border-radius: 3px;
}

/* CVE Detail Table - Disable sorting appearance */
.cve-detail-table thead th {
    cursor: default !important;
}

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

.modal-overlay.is-active {
    display: flex;
}

.modal-dialog {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-header h3 {
    margin: 0;
    font-size: var(--text-xl);
    color: var(--color-gray-900);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--color-gray-400);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--color-gray-700);
}

.modal-body {
    padding: var(--space-6);
}

.modal-body .form-group {
    margin-bottom: var(--space-4);
}

.modal-body .form-actions {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-gray-200);
}

/* Upload Progress */
.upload-progress {
    margin: var(--space-4) 0;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: var(--color-gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--color-primary);
    border-radius: var(--radius-sm);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    margin-top: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-gray-600);
    text-align: center;
}

/* Upload Result */
.upload-result {
    margin: var(--space-4) 0;
}

.upload-result .alert {
    margin: 0;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--color-gray-300);
    border-radius: var(--radius-md);
    padding: var(--space-8);
    text-align: center;
    transition: all 0.2s ease;
    background-color: var(--color-gray-50);
    cursor: pointer;
}

.drop-zone:hover {
    border-color: var(--color-primary);
    background-color: rgba(219, 53, 18, 0.03);
}

.drop-zone.drag-over {
    border-color: var(--color-primary);
    background-color: rgba(219, 53, 18, 0.06);
    border-style: solid;
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.drop-zone-icon {
    color: var(--color-gray-400);
    margin-bottom: var(--space-2);
}

.drop-zone.drag-over .drop-zone-icon {
    color: var(--color-primary);
}

.drop-zone-text {
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--color-gray-700);
    margin: 0;
}

.drop-zone-hint {
    font-size: var(--text-sm);
    color: var(--color-gray-400);
    margin: var(--space-1) 0;
}

.drop-zone-formats {
    font-size: var(--text-xs);
    color: var(--color-gray-400);
    margin-top: var(--space-2);
}

.btn-browse {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
}

.drop-zone-selected {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-4);
}

.drop-zone-selected .file-icon {
    color: var(--color-primary);
    flex-shrink: 0;
}

.drop-zone-selected #selectedFileName {
    font-weight: 500;
    color: var(--color-gray-800);
    word-break: break-all;
}

.btn-clear-file {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--color-gray-400);
    cursor: pointer;
    padding: 0 var(--space-1);
    line-height: 1;
    transition: color 0.2s;
}

.btn-clear-file:hover {
    color: var(--color-danger);
}

.drop-zone.has-file {
    border-color: var(--color-primary);
    background-color: rgba(219, 53, 18, 0.03);
    border-style: solid;
}

/* Accent/Secondary Button - Rufilla Purple */
.btn-accent {
    background: linear-gradient(135deg, #764AB7 0%, #5f3a94 100%);
    color: var(--color-white);
    border: var(--border-width-sm) solid transparent;
    box-shadow: 0 2px 4px rgba(118, 74, 183, 0.25);
}

.btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(118, 74, 183, 0.35);
    background: linear-gradient(135deg, #6a42a5 0%, #543385 100%);
}

/* Outline Button Variant */
.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Sidebar Layout */
.app-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    height: calc(100vh - 73px);
    overflow: hidden;
}

.sidebar {
    width: 340px;
    min-width: 340px;
    background-color: var(--color-white);
    border-right: 1px solid var(--color-gray-200);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.sidebar-nav {
    padding: var(--space-4);
    flex: 1;
}

.sidebar-business-switcher {
    position: relative;
    margin: calc(-1 * var(--space-4));
    margin-bottom: var(--space-4);
    background-color: var(--color-white);
    border-bottom: 2px solid var(--color-primary);
}

.business-switcher-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    transition: background-color 0.15s ease;
}

.business-switcher-current[onclick] {
    cursor: pointer;
}

.business-switcher-current[onclick]:hover {
    background-color: var(--color-gray-50);
}

.business-switcher-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.business-switcher-name {
    font-weight: 700;
    font-size: var(--text-base);
    color: var(--color-brand-black);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.business-switcher-role-label {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    width: fit-content;
}

.business-switcher-role-label.role-admin {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
}

.business-switcher-role-label.role-member {
    background-color: var(--color-accent-light);
    color: var(--color-accent);
}

.business-switcher-role-label.role-viewer {
    background-color: var(--color-gray-100);
    color: var(--color-gray-600);
}

.business-switcher-chevron {
    font-size: 16px;
    color: var(--color-gray-400);
    flex-shrink: 0;
    line-height: 1;
}

.business-switcher-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.business-switcher-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: var(--space-3) var(--space-5);
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.15s ease;
}

.business-switcher-item:hover {
    background-color: var(--color-gray-50);
}

.business-switcher-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.business-switcher-item-name {
    font-weight: 500;
    font-size: var(--text-sm);
    color: var(--color-gray-700);
}

.business-switcher-item:hover .business-switcher-item-name {
    color: var(--color-brand-black);
}

.sidebar-section {
    margin-bottom: var(--space-4);
}

.sidebar-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-3);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--color-gray-700);
    transition: background-color 0.2s;
}

.sidebar-section-header:hover {
    background-color: var(--color-gray-100);
}

.sidebar-section-header.active {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
}

.sidebar-chevron {
    transition: transform 0.2s;
    font-size: 12px;
}

.sidebar-section.expanded > .sidebar-section-header > .sidebar-chevron {
    transform: rotate(90deg);
}

.sidebar-section-content {
    display: none;
    padding-left: var(--space-3);
}

.sidebar-section.expanded .sidebar-section-content {
    display: block;
}

.sidebar-item {
    display: block;
    padding: var(--space-2) var(--space-3);
    color: var(--color-gray-600);
    text-decoration: none;
    font-size: var(--text-sm);
    border-radius: var(--radius-sm);
    margin: 2px 0;
    transition: all 0.2s;
}

.sidebar-item:hover {
    background-color: var(--color-gray-100);
    color: var(--color-gray-900);
}

.sidebar-item.active {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 500;
}

.sidebar-nested {
    padding-left: var(--space-4);
}

.sidebar-nested .sidebar-item {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-3);
}

.sidebar-product-name {
    padding: 0;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sidebar-chevron-product {
    font-size: 10px;
    flex-shrink: 0;
    margin-left: var(--space-1);
}

.sidebar-chevron-bsp {
    font-size: 8px;
    flex-shrink: 0;
    margin-left: var(--space-1);
}

.sidebar-bsp-item {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}


.sidebar-bsp-group {
    margin: 0;
}

.sidebar-bsp-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
}

.sidebar-bsp-toggle:hover {
    background-color: var(--color-gray-100);
}

.sidebar-bsp-toggle .sidebar-chevron {
    margin-right: var(--space-2);
    flex-shrink: 0;
}

.sidebar-bsp-group.expanded > .sidebar-bsp-toggle > .sidebar-chevron {
    transform: rotate(90deg);
}

.sidebar-image-list {
    display: none;
    padding-left: var(--space-3);
}

.sidebar-bsp-group.expanded > .sidebar-image-list {
    display: block;
}

.sidebar-image-item {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-2);
    color: var(--color-gray-500);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    color: var(--color-gray-700);
    text-decoration: none;
    font-size: var(--text-sm);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.sidebar-link:hover {
    background-color: var(--color-gray-100);
    color: var(--color-primary);
}

.sidebar-link.active {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 500;
}

.sidebar-icon {
    font-size: var(--text-base);
    width: 20px;
    text-align: center;
}

.sidebar-divider {
    height: 1px;
    background-color: var(--color-gray-200);
    margin: var(--space-3) 0;
}

.main-content {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: auto;
}

.main-content .container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: var(--space-6);
}


body.has-sidebar .container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: var(--space-6);
}

.product-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    padding: var(--space-1) var(--space-3);
    color: var(--color-gray-600);
    font-size: var(--text-sm);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.product-toggle:hover {
    background-color: var(--color-gray-100);
}

.product-toggle.active {
    color: var(--color-primary);
}

.product-images {
    display: none;
    padding-left: var(--space-3);
}

.product-toggle.expanded + .product-images {
    display: block;
}

.product-toggle.expanded .sidebar-chevron {
    transform: rotate(90deg);
}

.sidebar-cve-search {
    padding: var(--space-2) var(--space-3);
}

.sidebar-cve-search input {
    width: 100%;
    padding: var(--space-2);
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
}

.sidebar-cve-search button {
    width: 100%;
    margin-top: var(--space-2);
    padding: var(--space-2);
    font-size: var(--text-sm);
}

.cve-search-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
    background: rgba(19, 19, 19, 0.15);
}

.cve-search-popup-content {
    background: var(--color-primary-light);
    border: 1px solid #f5c6bb;
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: 0 4px 16px rgba(19, 19, 19, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 380px;
    width: 90%;
    font-size: var(--text-sm);
    font-weight: 500;
    color: #7f1d1d;
}

.cve-search-popup-close {
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #7f1d1d;
    opacity: 0.5;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
}

.cve-search-popup-close:hover {
    opacity: 1;
    background: rgba(127, 29, 29, 0.08);
}

/* Status badges for pending invites */
.status-badge {
    display: inline-block;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 500;
    text-transform: uppercase;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-expired {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Development Mode Buttons - Visually distinct for testing/debugging */
.btn-dev {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    color: #6d28d9;
    border: 2px dashed #8b5cf6;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-dev:hover {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-color: #7c3aed;
    color: #5b21b6;
}

.btn-dev:active {
    transform: scale(0.98);
}

.btn-dev::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #8b5cf6;
    border-radius: 50%;
    animation: dev-pulse 2s infinite;
}

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

.dev-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dev-modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 3px solid #8b5cf6;
}

.dev-modal-header {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    color: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dev-modal-header h3 {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dev-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dev-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.dev-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.dev-prompt-section {
    margin-bottom: 24px;
}

.dev-prompt-section h4 {
    color: #6d28d9;
    font-size: 14px;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dev-prompt-content {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md);
    padding: 16px;
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-x: auto;
    max-height: 300px;
    overflow-y: auto;
}

/* Help Page Content */
.main-content:has(.help-layout) {
    overflow-y: hidden;
}

.main-content:has(.help-layout) > .container {
    height: 100%;
    box-sizing: border-box;
    padding: 0;
}

.help-layout {
    display: flex;
    max-width: 1100px;
    margin: 0 auto;
    gap: 0;
    height: 100%;
    overflow: hidden;
}

.help-sidebar {
    width: 240px;
    min-width: 240px;
    border-right: 1px solid var(--color-gray-200);
    padding: var(--space-6) 0;
    background: var(--color-gray-50);
    height: 100%;
    overflow-y: auto;
}

.help-sidebar-header {
    padding: 0 var(--space-6) var(--space-4);
    border-bottom: 1px solid var(--color-gray-200);
    margin-bottom: var(--space-4);
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
}

.help-sidebar-header a {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-gray-500);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
}

.help-sidebar-header a:hover {
    color: var(--color-primary);
}

.help-sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.help-sidebar-item {
    margin: 0;
}

.help-sidebar-item a {
    display: block;
    padding: var(--space-2) var(--space-6);
    font-family: var(--font-base);
    font-size: var(--text-sm);
    color: var(--color-gray-600);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

.help-sidebar-item a:hover {
    color: var(--color-gray-900);
    background: var(--color-gray-100);
}

.help-sidebar-item.active a {
    color: var(--color-primary);
    font-weight: 600;
    border-left-color: var(--color-primary);
    background: var(--color-primary-light);
}

.help-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.help-container-with-sidebar {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    height: 100%;
}

@media (max-width: 768px) {
    .help-layout {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }
    
    .help-sidebar {
        width: 100%;
        min-width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--color-gray-200);
        padding: var(--space-4) 0;
        height: auto;
        overflow-y: visible;
    }
    
    .help-sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-1);
        padding: 0 var(--space-4);
    }
    
    .help-sidebar-item a {
        padding: var(--space-1) var(--space-3);
        border-left: none;
        border-radius: var(--space-1);
        font-size: var(--text-xs);
    }
    
    .help-sidebar-item.active a {
        border-left-color: transparent;
    }
}

.help-content {
    line-height: 1.7;
    color: var(--color-gray-800);
}

.help-content h1 {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--color-gray-900);
}

.help-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--color-gray-800);
    border-bottom: 1px solid var(--color-gray-200);
    padding-bottom: 0.5rem;
}

.help-content h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--color-gray-700);
}

.help-content p {
    margin-bottom: 1rem;
}

.help-content ul, .help-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.help-content li {
    margin-bottom: 0.5rem;
}

.help-content a {
    color: var(--color-primary);
    text-decoration: none;
}

.help-content a:hover {
    text-decoration: underline;
}

.help-content code {
    background: var(--color-gray-100);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.help-content pre {
    background: var(--color-gray-100);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.help-content pre code {
    background: none;
    padding: 0;
}

.help-content hr {
    border: none;
    border-top: 1px solid var(--color-gray-200);
    margin: 2rem 0;
}

.help-content blockquote {
    border-left: 4px solid var(--color-primary);
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    background: var(--color-gray-50);
    color: var(--color-gray-700);
}

.help-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.help-content th, .help-content td {
    border: 1px solid var(--color-gray-200);
    padding: 0.75rem;
    text-align: left;
}

.help-content th {
    background: var(--color-gray-100);
    font-weight: 600;
}

.help-content em {
    color: var(--color-gray-500);
    font-style: italic;
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    animation: toastSlideIn 0.3s ease-out;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Super Admin Navigation */
.super-admin-nav {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.super-admin-nav .nav-tab {
    padding: 8px 16px;
    margin-right: 8px;
    text-decoration: none;
    color: var(--color-gray-600);
}

.super-admin-nav .nav-tab.active {
    color: var(--color-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--color-primary);
}

/* Token Management Form */
.token-form-container {
    background: var(--color-gray-50, #f9fafb);
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.token-form-container h3 {
    margin-bottom: 16px;
    font-size: 16px;
}

.token-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.token-form-grid label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 14px;
}

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

/* Code Token Display */
.code-inline {
    background: var(--color-gray-100);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Feature Flag Cards */
.feature-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-card {
    background: var(--color-white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

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

.feature-card h3 {
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-card p {
    color: var(--color-gray-600);
    margin: 0 0 8px 0;
}

.badge-experimental {
    background: var(--color-warning);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
}

.badge-purchasable {
    background: var(--color-info);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
}

.feature-toggle-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-toggle-label {
    color: var(--color-gray-600);
    font-size: 14px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-gray-300);
    transition: .3s;
    border-radius: 26px;
}

.toggle-slider .toggle-knob {
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--color-success);
}

.toggle-switch input:checked + .toggle-slider .toggle-knob {
    left: 26px;
}

/* Small toggle variant */
.toggle-switch-sm {
    width: 44px;
    height: 22px;
}

.toggle-switch-sm .toggle-slider {
    border-radius: 22px;
}

.toggle-switch-sm .toggle-knob {
    height: 16px;
    width: 16px;
}

.toggle-switch-sm input:checked + .toggle-slider .toggle-knob {
    left: 24px;
}

/* Business Access Panel */
.business-access {
    border-top: 1px solid var(--color-gray-200);
    padding-top: 16px;
    margin-top: 16px;
}

.business-access-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.business-access-header h4 {
    margin: 0;
    color: var(--color-gray-700);
}

.business-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.business-access-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--color-gray-50);
    border-radius: var(--radius-md);
}

/* Kernel Config Page */
.kernel-info-banner {
    background: #dbeafe;
    border: 1px solid #3b82f6;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
}

.kernel-info-banner p {
    margin: 8px 0 0 0;
    font-size: 14px;
}

.kernel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kernel-panel {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 20px;
}

.kernel-panel h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: var(--color-gray-700);
}

.kernel-panel-desc {
    font-size: 13px;
    color: var(--color-gray-500);
    margin-bottom: 12px;
}

.kernel-panel-scroll {
    max-height: 300px;
    overflow-y: auto;
}

.kernel-list-item {
    padding: 8px 12px;
    background: var(--color-gray-50);
    border-radius: 4px;
    margin-bottom: 8px;
}

.kernel-list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kernel-list-item-detail {
    font-size: 12px;
    color: var(--color-gray-500);
    margin-top: 4px;
}

.kernel-yaml-container {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 20px;
}

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

.kernel-yaml-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--color-gray-700);
}

.kernel-yaml-pre {
    background: var(--color-gray-900);
    color: #e5e7eb;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.5;
    max-height: 500px;
    overflow-y: auto;
}

/* Reachability Badges */
.reachability-badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
}

.reachability-network {
    background: #fee2e2;
    color: #991b1b;
}

.reachability-physical {
    background: #fef3c7;
    color: #92400e;
}

.reachability-local {
    background: #e0e7ff;
    color: #3730a3;
}

/* Dashboard Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

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

/* Create Modal */
.create-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.create-modal-content {
    background: var(--color-white);
    padding: 32px;
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.create-modal-content h2 {
    margin-top: 0;
}

.create-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Action Bar */
.action-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    margin-bottom: 15px;
}

/* Action Bar Select */
.action-bar-select {
    padding: 8px 32px 8px 14px;
    border: 1px solid #d0d0d0;
    border-left: 3px solid var(--color-accent, #764AB7);
    border-radius: 5px;
    font-size: 13px;
    background-color: #ffffff;
    color: #333;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23764AB7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.15s ease;
}

.action-bar-select:hover {
    border-color: #b0b0b0;
    border-left-color: var(--color-accent-hover, #5f3a94);
    box-shadow: 0 2px 8px rgba(118, 74, 183, 0.12);
    background-color: #fcfaff;
}

.action-bar-select:focus {
    border-color: var(--color-accent, #764AB7);
    border-left-color: var(--color-accent, #764AB7);
    box-shadow: 0 0 0 3px rgba(118, 74, 183, 0.15);
    background-color: #ffffff;
}

.action-bar-select-wide {
    min-width: 310px;
}

.action-bar-select-medium {
    min-width: 210px;
}

/* Chart Placeholder */
.chart-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-placeholder-tall {
    height: 200px;
    flex-direction: column;
}

.chart-placeholder p {
    color: var(--color-gray-500);
    font-size: var(--text-sm);
}

/* Loading Spinner (large) */
.loading-spinner-lg {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner-md {
    width: 30px;
    height: 30px;
    border: 3px solid #e0e0e0;
    border-top: 3px solid #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Report Loading Overlay */
.report-loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.report-loading-overlay.is-active {
    display: flex;
}

.report-loading-overlay p {
    margin-top: 20px;
    color: #333;
    font-size: 16px;
}

/* Previous Scan Warning Banner */
.scan-warning-banner {
    margin-bottom: 15px;
    padding: 12px 16px;
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.scan-warning-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scan-warning-banner-text {
    color: #92400e;
    font-weight: 500;
}

.btn-warning-banner {
    background-color: #f59e0b;
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    font-size: 13px;
}

/* View Mode Bar */
.view-mode-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.view-mode-label {
    font-weight: 600;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-label input {
    margin-right: 5px;
}

/* Pagination */
.pagination-container {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.pagination-buttons {
    display: flex;
    gap: 5px;
}

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

.btn-page-active {
    background-color: #007bff;
    color: white;
}

/* Report Options */
.report-options-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.report-section h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-gray-700);
}

.report-checkboxes {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-gray-900);
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Invite Form Row */
.invite-form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

/* Info Box (Registration) */
.info-box {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 3px solid #3498db;
}

/* Header Filter Dropdown */
.header-filter-container {
    display: flex;
    align-items: center;
}

.header-filter-dropdown {
    position: relative;
}

.header-filter-btn {
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
    color: var(--color-gray-400);
    transition: all 0.2s;
}

.header-filter-btn:hover,
.header-filter-btn.header-filter-active {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    border-color: var(--color-primary-light);
}

.header-filter-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    min-width: 120px;
    padding: 4px 0;
}

.header-filter-menu.is-open {
    display: block;
}

.filter-option {
    display: block;
    padding: 6px 12px;
    text-decoration: none;
    color: var(--color-gray-700);
    font-size: var(--text-sm);
    transition: background 0.15s;
}

.filter-option:hover {
    background-color: var(--color-gray-100);
}

.filter-option.filter-option-active {
    color: var(--color-primary);
    font-weight: 500;
    background-color: var(--color-primary-light);
}

/* Status Badges (CVE Status) */
.status-badge-patched {
    background-color: var(--color-success-light);
    color: var(--color-success-dark);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 500;
}

.status-badge-unpatched {
    background-color: var(--color-danger-light);
    color: var(--color-danger-dark);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 500;
}

/* Severity Badges */
.severity-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
}

.severity-badge-critical {
    background-color: #fee2e2;
    color: #991b1b;
}

.severity-badge-high {
    background-color: #fef3c7;
    color: #92400e;
}

.severity-badge-medium {
    background-color: #fef9c3;
    color: #854d0e;
}

.severity-badge-low {
    background-color: #dbeafe;
    color: #1e40af;
}

.btn-delete-icon {
    background-color: #fef2f2;
    border: 1px solid #dc2626;
    cursor: pointer;
    color: #dc2626;
    padding: 5px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn-delete-icon:hover {
    color: #991b1b;
    border-color: #991b1b;
    background-color: #fee2e2;
}

.btn-delete-icon svg {
    stroke: #dc2626;
}

.btn-delete-icon:hover svg {
    stroke: #991b1b;
}

.delete-confirm-modal .modal-dialog {
    max-width: 440px;
    border: 1px solid #d4d4d4;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.delete-confirm-modal .modal-header {
    border-bottom: 1px solid #ECECEC;
    padding: 1.25rem 1.5rem;
}

.delete-confirm-modal .modal-header h3 {
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    margin: 0;
}

.delete-confirm-body {
    padding: 1.25rem 1.5rem;
}

.delete-confirm-body .delete-warning-text {
    font-size: 0.875rem;
    color: #404040;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.delete-confirm-body .delete-item-name {
    font-weight: 600;
    color: #131313;
}

.delete-confirm-body .delete-permanent-warning {
    background-color: #fee2e2;
    border: 1px solid #dc2626;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #991b1b;
    font-weight: 500;
    margin-bottom: 1rem;
}

.delete-confirm-body label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #404040;
    margin-bottom: 0.5rem;
}

.delete-confirm-body label code {
    background-color: #f5f5f5;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #131313;
}

.delete-confirm-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid #ECECEC;
}

.delete-confirm-footer .btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* PDF Sidebar Status Panel */
.pdf-sidebar-panel {
    padding: 0 12px 12px 12px;
}

.pdf-sidebar-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.pdf-sidebar-spinner {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 2px solid var(--color-gray-300);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: pdfSpin 1s linear infinite;
    flex-shrink: 0;
}

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

.pdf-sidebar-msg {
    font-size: 0.7rem;
    color: var(--color-gray-500);
    margin-bottom: 8px;
    word-break: break-word;
    line-height: 1.4;
}

.pdf-sidebar-bar-wrap {
    width: 100%;
    height: 6px;
    background: var(--color-gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.pdf-sidebar-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), #6366f1);
    border-radius: 3px;
    transition: width 0.4s ease;
    min-width: 4px;
}

.pdf-sidebar-pct {
    font-size: 0.7rem;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 8px;
}

.pdf-sidebar-cancel-btn {
    display: block;
    width: 100%;
    padding: 5px 0;
    background: var(--color-gray-100);
    color: var(--color-gray-600);
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
    text-align: center;
    font-family: inherit;
}

.pdf-sidebar-cancel-btn:hover {
    background: var(--color-gray-200);
}

.pdf-sidebar-download-btn {
    display: block;
    width: 100%;
    padding: 8px 0;
    background: #22c55e;
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    margin-bottom: 6px;
}

.pdf-sidebar-download-btn:hover {
    background: #16a34a;
    color: white;
    text-decoration: none;
}

.pdf-sidebar-error {
    font-size: 0.7rem;
    color: var(--color-red-500, #ef4444);
    margin-bottom: 8px;
}
